From ebb3fb91de1bb723526e52cc8c47e4edaf17f95b Mon Sep 17 00:00:00 2001 From: Sam Date: Sun, 4 Feb 2024 13:40:52 +0100 Subject: [PATCH 1/2] Client - handle keyboard navigation on workouts displayed on calendar --- .../Dashboard/UserCalendar/CalendarCells.vue | 1 + .../UserCalendar/CalendarWorkout.vue | 8 +- .../UserCalendar/CalendarWorkouts.vue | 5 +- .../UserCalendar/CalendarWorkoutsChart.vue | 87 ++++++++++++++++--- fittrackee_client/src/scss/base.scss | 1 + 5 files changed, 84 insertions(+), 18 deletions(-) diff --git a/fittrackee_client/src/components/Dashboard/UserCalendar/CalendarCells.vue b/fittrackee_client/src/components/Dashboard/UserCalendar/CalendarCells.vue index df51896e..1f6b5cd4 100644 --- a/fittrackee_client/src/components/Dashboard/UserCalendar/CalendarCells.vue +++ b/fittrackee_client/src/components/Dashboard/UserCalendar/CalendarCells.vue @@ -15,6 +15,7 @@ :workouts="filterWorkouts(day, workouts)" :sports="sports" :displayHARecord="displayHARecord" + :index="i" />
{{ format(day, 'd') }} diff --git a/fittrackee_client/src/components/Dashboard/UserCalendar/CalendarWorkout.vue b/fittrackee_client/src/components/Dashboard/UserCalendar/CalendarWorkout.vue index df97054b..2ef7e46b 100644 --- a/fittrackee_client/src/components/Dashboard/UserCalendar/CalendarWorkout.vue +++ b/fittrackee_client/src/components/Dashboard/UserCalendar/CalendarWorkout.vue @@ -1,9 +1,7 @@ "||t==="script"&&this.input.substring(this.index,this.index+9)!=="<\/script>"},e}(),the=function(){function e(t,n){n===void 0&&(n={}),this.options=n,this.token=null,this.startLine=1,this.startColumn=0,this.tokens=[],this.tokenizer=new ehe(this,t,n.mode),this._currentAttribute=void 0}return e.prototype.tokenize=function(t){return this.tokens=[],this.tokenizer.tokenize(t),this.tokens},e.prototype.tokenizePart=function(t){return this.tokens=[],this.tokenizer.tokenizePart(t),this.tokens},e.prototype.tokenizeEOF=function(){return this.tokens=[],this.tokenizer.tokenizeEOF(),this.tokens[0]},e.prototype.reset=function(){this.token=null,this.startLine=1,this.startColumn=0},e.prototype.current=function(){var t=this.token;if(t===null)throw new Error("token was unexpectedly null");if(arguments.length===0)return t;for(var n=0;n=0))continue;let c=r.length;ohe(u,n,++i,r),i+=r.length-c-1}else if(o.type!==ud)r.push(o);else{const u=ihe(o.chars,s);r.push.apply(r,u)}}for(let i=0;i0&&(u+=" "+lhe(o.attributes).join(" ")),o.selfClosing&&(u+=" /"),u+=">",a.push(u);break}case kT:a.push(``);break;case ud:a.push(cd(o.chars));break;case rhe:a.push(``);break;case ahe:{let u=`",a.push(u);break}}}return a.join("")}function ihe(e,t){const n=HEe(e),r=[];for(let a=0;a0;){let s=t[n];s.type===Ru&&s.tagName.toUpperCase()===e?a++:s.type===kT&&s.tagName.toUpperCase()===e&&a--,r.push(s),n++}return r}function uhe(e){let{tagName:t,attributes:n,content:r}=e;return`<${t} ${che(n)}>${cd(r)}`}function cd(e){return e.replace(//g,">")}function UT(e){return e.replace(/"/g,""")}function che(e){const t=[];for(const n in e){const r=e[n]+"";t.push(`${n}="${UT(r)}"`)}return t.join(" ")}function lhe(e){const t=[];for(let n=0;n䀾mmaĀ;d׷׸䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇܎ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ޷޼߂ߐĀiyޱ޵rc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄΀HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶߻dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣ঳সে্਷ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗ࡜ࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४Ānrࢃ࢏gleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpw৔ਖਛgȀLRlr৞৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼੝੠੷੼અઋ઎p;椅y;䐜Ādl੥੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑ඗ඞcy;䐊cute;䅃ƀaey઴હાron;䅇dil;䅅;䐝ƀgswે૰଎ativeƀMTV૓૟૨ediumSpace;怋hiĀcn૦૘ë૙eryThiî૙tedĀGL૸ଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷ଺reak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪୼஡௫ఄ౞಄ದ೘ൡඅ櫬Āou୛୤ngruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊ஛ement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater΀;EFGLSTஶஷ஽௉௓௘௥扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲௽ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ೒拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨೹setĀ;E೰ೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂ෉෕ෛ෠෧෼ขภยา฿ไlig;䅒cute耻Ó䃓Āiy෎ීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲ෶cr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬื฼de耻Õ䃕es;樷ml耻Ö䃖erĀBP๋๠Āar๐๓r;怾acĀek๚๜;揞et;掴arenthesis;揜Ҁacfhilors๿ງຊຏຒດຝະ໼rtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ໠໤檻cedesȀ;EST່້໏໚扺qual;檯lantEqual;扼ilde;找me;怳Ādp໩໮uct;戏ortionĀ;aȥ໹l;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬؀BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁࿫࿳ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL࿜࿝࿡憒ar;懥eftArrow;懄eiling;按oǵ࿹\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»࿝pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄ቉ቕ቞ቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHc቎ቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗Āeiቻ኉Dzኀ\0ኇefore;戴a;䎘Ācn኎ኘkSpace;쀀  Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0᏿ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0጖y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻፿on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtè૙a;䎖r;愨pf;愤cr;쀀𝒵௡ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚΀;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒΀;Eaeiop዁ᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;e዁ᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;e዁ᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰ᜼ᝃᝈ᝸᝽០៦ᠹᡐᜍ᤽᥈ᥰot;櫭Ācrᛶ᜞kȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e᜚᜛戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;t፜᜷brk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓ᝛ᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯ᝱ᝳ;䎲;愶een;扬r;쀀𝔟g΀costuvwឍឝឳេ៕៛៞ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀako៭ᠦᠵĀcn៲ᠣkƀlst៺֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘᠝斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈؀DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬ᣿ᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教΀;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ᣷᣹᣻᣽;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ᤟;敛;敘;攘;攔΀;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģ᥂bar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;e᜚᜜lƀ;bhᥨᥩᥫ䁜;槅sub;柈Ŭᥴ᥾lĀ;e᥹᥺怢t»᥺pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭍᭒\0᯽\0ᰌƀcpr᦭ᦲ᧝ute;䄇̀;abcdsᦿᧀᧄ᧊᧕᧙戩nd;橄rcup;橉Āau᧏᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r΀;Ecefms᩟᩠ᩢᩫ᪤᪪᪮旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖᪚᪟»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇᫔᫺\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ᫙\0\0᫢aĀ;t᫞᫟䀬;䁀ƀ;fl᫨᫩᫫戁îᅠeĀmx᫱᫶ent»᫩eóɍǧ᫾\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯΀delprvw᭠᭬᭷ᮂᮬᯔ᯹arrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;p᭿ᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰸᰻᰿ᱝᱩᱵᲊᲞᲬᲷ᳻᳿ᴍᵻᶑᶫᶻ᷆᷍rò΁ar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂͸᳖᳜᳠mƀ;oș᳊᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄ὎὚ĀDoḆᴴoôᲉĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»Ṻƀaeiἒ἖Ἒls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙ῜ῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao‌⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧‪‬\0‮耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₟₥₰₴⃰⃵⃺⃿℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕ₝ute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽⃉ƀ;qsؾٌ⃄lanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqr׮ⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0↎proø₞r;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢␧␭␱␵␻ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀஀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼rò৆òΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonó྘quigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d྘➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ᠛旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐௏쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop඄⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roø඄urĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓΀;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨í஘istĀ;s஠டr;쀀𝔫ȀEest௅⩦⩹⩼ƀ;qs஼⩭௡ƀ;qs஼௅⩴lanô௢ií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚΀AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs఻⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs఻⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast୻⭕⭚⭟lleì୻l;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖ΀chimpqu⮽⯍⯙⬄୸⯤⯯Ȁ;cerല⯆ഷ⯉uå൅;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭å೸åഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñ೗Ā;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰⳴ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥ⵲ⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;c᪞ⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācr⵩⵭ir;榿;쀀𝔬ͯ⵹\0\0⵼\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕ⶘ⶥⶨrò᪀Āir⶝ⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔ⷗ǒr;榷rp;榹΀;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ⹞\0⹽\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ⹧⹲຅脀¶;l⹭⹮䂶leìЃɩ⹸\0\0⹻m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳⻴ᤈ⻹⻽⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp໬⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t໻⾴ï໻rel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⿚⋢⿟⿥⿫⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei⿾々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔઀ABHabcdefhilmnoprstux぀けさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤΀cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstw࿜ガクシスゼゾダッデナp;極Ā;f࿠ゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes㄂㄄;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ì࿲âヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘㇤㇮rrowĀ;t࿜ㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowó࿪arpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓rò࿪aòՑ;怏oustĀ;a㈞㈟掱che»㈟mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦΀Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼਴t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì⹯耻­䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;q኱ኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫ਩war;椪lig耻ß䃟௡㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rë๟ƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproø዁im»ኬsðኞĀas㚺㚮ð዁rn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈ΀adempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xô᝷headĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜΀eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roð໻tré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚΀cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜ៟tré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map(function(e){return e.charCodeAt(0)}));var zf={};Object.defineProperty(zf,"__esModule",{value:!0});zf.default=new Uint16Array("Ȁaglq \x1Bɭ\0\0p;䀦os;䀧t;䀾t;䀼uot;䀢".split("").map(function(e){return e.charCodeAt(0)}));var ld={};(function(e){var t;Object.defineProperty(e,"__esModule",{value:!0}),e.replaceCodePoint=e.fromCodePoint=void 0;var n=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]);e.fromCodePoint=(t=String.fromCodePoint)!==null&&t!==void 0?t:function(s){var i="";return s>65535&&(s-=65536,i+=String.fromCharCode(s>>>10&1023|55296),s=56320|s&1023),i+=String.fromCharCode(s),i};function r(s){var i;return s>=55296&&s<=57343||s>1114111?65533:(i=n.get(s))!==null&&i!==void 0?i:s}e.replaceCodePoint=r;function a(s){return(0,e.fromCodePoint)(r(s))}e.default=a})(ld);(function(e){var t=we&&we.__createBinding||(Object.create?function(L,X,J,ne){ne===void 0&&(ne=J);var D=Object.getOwnPropertyDescriptor(X,J);(!D||("get"in D?!X.__esModule:D.writable||D.configurable))&&(D={enumerable:!0,get:function(){return X[J]}}),Object.defineProperty(L,ne,D)}:function(L,X,J,ne){ne===void 0&&(ne=J),L[ne]=X[J]}),n=we&&we.__setModuleDefault||(Object.create?function(L,X){Object.defineProperty(L,"default",{enumerable:!0,value:X})}:function(L,X){L.default=X}),r=we&&we.__importStar||function(L){if(L&&L.__esModule)return L;var X={};if(L!=null)for(var J in L)J!=="default"&&Object.prototype.hasOwnProperty.call(L,J)&&t(X,L,J);return n(X,L),X},a=we&&we.__importDefault||function(L){return L&&L.__esModule?L:{default:L}};Object.defineProperty(e,"__esModule",{value:!0}),e.decodeXML=e.decodeHTMLStrict=e.decodeHTMLAttribute=e.decodeHTML=e.determineBranch=e.EntityDecoder=e.DecodingMode=e.BinTrieFlags=e.fromCodePoint=e.replaceCodePoint=e.decodeCodePoint=e.xmlDecodeTree=e.htmlDecodeTree=void 0;var s=a(Gf);e.htmlDecodeTree=s.default;var i=a(zf);e.xmlDecodeTree=i.default;var o=r(ld);e.decodeCodePoint=o.default;var u=ld;Object.defineProperty(e,"replaceCodePoint",{enumerable:!0,get:function(){return u.replaceCodePoint}}),Object.defineProperty(e,"fromCodePoint",{enumerable:!0,get:function(){return u.fromCodePoint}});var l;(function(L){L[L.NUM=35]="NUM",L[L.SEMI=59]="SEMI",L[L.EQUALS=61]="EQUALS",L[L.ZERO=48]="ZERO",L[L.NINE=57]="NINE",L[L.LOWER_A=97]="LOWER_A",L[L.LOWER_F=102]="LOWER_F",L[L.LOWER_X=120]="LOWER_X",L[L.LOWER_Z=122]="LOWER_Z",L[L.UPPER_A=65]="UPPER_A",L[L.UPPER_F=70]="UPPER_F",L[L.UPPER_Z=90]="UPPER_Z"})(l||(l={}));var c=32,f;(function(L){L[L.VALUE_LENGTH=49152]="VALUE_LENGTH",L[L.BRANCH_LENGTH=16256]="BRANCH_LENGTH",L[L.JUMP_TABLE=127]="JUMP_TABLE"})(f=e.BinTrieFlags||(e.BinTrieFlags={}));function d(L){return L>=l.ZERO&&L<=l.NINE}function m(L){return L>=l.UPPER_A&&L<=l.UPPER_F||L>=l.LOWER_A&&L<=l.LOWER_F}function E(L){return L>=l.UPPER_A&&L<=l.UPPER_Z||L>=l.LOWER_A&&L<=l.LOWER_Z||d(L)}function v(L){return L===l.EQUALS||E(L)}var R;(function(L){L[L.EntityStart=0]="EntityStart",L[L.NumericStart=1]="NumericStart",L[L.NumericDecimal=2]="NumericDecimal",L[L.NumericHex=3]="NumericHex",L[L.NamedEntity=4]="NamedEntity"})(R||(R={}));var I;(function(L){L[L.Legacy=0]="Legacy",L[L.Strict=1]="Strict",L[L.Attribute=2]="Attribute"})(I=e.DecodingMode||(e.DecodingMode={}));var b=function(){function L(X,J,ne){this.decodeTree=X,this.emitCodePoint=J,this.errors=ne,this.state=R.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=I.Strict}return L.prototype.startEntity=function(X){this.decodeMode=X,this.state=R.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1},L.prototype.write=function(X,J){switch(this.state){case R.EntityStart:return X.charCodeAt(J)===l.NUM?(this.state=R.NumericStart,this.consumed+=1,this.stateNumericStart(X,J+1)):(this.state=R.NamedEntity,this.stateNamedEntity(X,J));case R.NumericStart:return this.stateNumericStart(X,J);case R.NumericDecimal:return this.stateNumericDecimal(X,J);case R.NumericHex:return this.stateNumericHex(X,J);case R.NamedEntity:return this.stateNamedEntity(X,J)}},L.prototype.stateNumericStart=function(X,J){return J>=X.length?-1:(X.charCodeAt(J)|c)===l.LOWER_X?(this.state=R.NumericHex,this.consumed+=1,this.stateNumericHex(X,J+1)):(this.state=R.NumericDecimal,this.stateNumericDecimal(X,J))},L.prototype.addToNumericResult=function(X,J,ne,D){if(J!==ne){var z=ne-J;this.result=this.result*Math.pow(D,z)+parseInt(X.substr(J,z),D),this.consumed+=z}},L.prototype.stateNumericHex=function(X,J){for(var ne=J;J>14;J>14,z!==0){if(V===l.SEMI)return this.emitNamedEntityData(this.treeIndex,z,this.consumed+this.excess);this.decodeMode!==I.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1},L.prototype.emitNotTerminatedNamedEntity=function(){var X,J=this,ne=J.result,D=J.decodeTree,z=(D[ne]&f.VALUE_LENGTH)>>14;return this.emitNamedEntityData(ne,z,this.consumed),(X=this.errors)===null||X===void 0||X.missingSemicolonAfterCharacterReference(),this.consumed},L.prototype.emitNamedEntityData=function(X,J,ne){var D=this.decodeTree;return this.emitCodePoint(J===1?D[X]&~f.VALUE_LENGTH:D[X+1],ne),J===3&&this.emitCodePoint(D[X+2],ne),ne},L.prototype.end=function(){var X;switch(this.state){case R.NamedEntity:return this.result!==0&&(this.decodeMode!==I.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case R.NumericDecimal:return this.emitNumericEntity(0,2);case R.NumericHex:return this.emitNumericEntity(0,3);case R.NumericStart:return(X=this.errors)===null||X===void 0||X.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case R.EntityStart:return 0}},L}();e.EntityDecoder=b;function S(L){var X="",J=new b(L,function(ne){return X+=(0,o.fromCodePoint)(ne)});return function(D,z){for(var V=0,ae=0;(ae=D.indexOf("&",ae))>=0;){X+=D.slice(V,ae),J.startEntity(z);var Be=J.write(D,ae+1);if(Be<0){V=ae+J.end();break}V=ae+Be,ae=Be===0?V+1:V}var Le=X+D.slice(V);return X="",Le}}function O(L,X,J,ne){var D=(X&f.BRANCH_LENGTH)>>7,z=X&f.JUMP_TABLE;if(D===0)return z!==0&&ne===z?J:-1;if(z){var V=ne-z;return V<0||V>=D?-1:L[J+V]-1}for(var ae=J,Be=ae+D-1;ae<=Be;){var Le=ae+Be>>>1,Oe=L[Le];if(Oene)Be=Le-1;else return L[Le+D]}return-1}e.determineBranch=O;var C=S(s.default),P=S(i.default);function M(L,X){return X===void 0&&(X=I.Legacy),C(L,X)}e.decodeHTML=M;function w(L){return C(L,I.Attribute)}e.decodeHTMLAttribute=w;function G(L){return C(L,I.Strict)}e.decodeHTMLStrict=G;function B(L){return P(L,I.Strict)}e.decodeXML=B})(ai);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.QuoteType=void 0;var t=ai,n;(function(d){d[d.Tab=9]="Tab",d[d.NewLine=10]="NewLine",d[d.FormFeed=12]="FormFeed",d[d.CarriageReturn=13]="CarriageReturn",d[d.Space=32]="Space",d[d.ExclamationMark=33]="ExclamationMark",d[d.Number=35]="Number",d[d.Amp=38]="Amp",d[d.SingleQuote=39]="SingleQuote",d[d.DoubleQuote=34]="DoubleQuote",d[d.Dash=45]="Dash",d[d.Slash=47]="Slash",d[d.Zero=48]="Zero",d[d.Nine=57]="Nine",d[d.Semi=59]="Semi",d[d.Lt=60]="Lt",d[d.Eq=61]="Eq",d[d.Gt=62]="Gt",d[d.Questionmark=63]="Questionmark",d[d.UpperA=65]="UpperA",d[d.LowerA=97]="LowerA",d[d.UpperF=70]="UpperF",d[d.LowerF=102]="LowerF",d[d.UpperZ=90]="UpperZ",d[d.LowerZ=122]="LowerZ",d[d.LowerX=120]="LowerX",d[d.OpeningSquareBracket=91]="OpeningSquareBracket"})(n||(n={}));var r;(function(d){d[d.Text=1]="Text",d[d.BeforeTagName=2]="BeforeTagName",d[d.InTagName=3]="InTagName",d[d.InSelfClosingTag=4]="InSelfClosingTag",d[d.BeforeClosingTagName=5]="BeforeClosingTagName",d[d.InClosingTagName=6]="InClosingTagName",d[d.AfterClosingTagName=7]="AfterClosingTagName",d[d.BeforeAttributeName=8]="BeforeAttributeName",d[d.InAttributeName=9]="InAttributeName",d[d.AfterAttributeName=10]="AfterAttributeName",d[d.BeforeAttributeValue=11]="BeforeAttributeValue",d[d.InAttributeValueDq=12]="InAttributeValueDq",d[d.InAttributeValueSq=13]="InAttributeValueSq",d[d.InAttributeValueNq=14]="InAttributeValueNq",d[d.BeforeDeclaration=15]="BeforeDeclaration",d[d.InDeclaration=16]="InDeclaration",d[d.InProcessingInstruction=17]="InProcessingInstruction",d[d.BeforeComment=18]="BeforeComment",d[d.CDATASequence=19]="CDATASequence",d[d.InSpecialComment=20]="InSpecialComment",d[d.InCommentLike=21]="InCommentLike",d[d.BeforeSpecialS=22]="BeforeSpecialS",d[d.SpecialStartSequence=23]="SpecialStartSequence",d[d.InSpecialTag=24]="InSpecialTag",d[d.BeforeEntity=25]="BeforeEntity",d[d.BeforeNumericEntity=26]="BeforeNumericEntity",d[d.InNamedEntity=27]="InNamedEntity",d[d.InNumericEntity=28]="InNumericEntity",d[d.InHexEntity=29]="InHexEntity"})(r||(r={}));function a(d){return d===n.Space||d===n.NewLine||d===n.Tab||d===n.FormFeed||d===n.CarriageReturn}function s(d){return d===n.Slash||d===n.Gt||a(d)}function i(d){return d>=n.Zero&&d<=n.Nine}function o(d){return d>=n.LowerA&&d<=n.LowerZ||d>=n.UpperA&&d<=n.UpperZ}function u(d){return d>=n.UpperA&&d<=n.UpperF||d>=n.LowerA&&d<=n.LowerF}var l;(function(d){d[d.NoValue=0]="NoValue",d[d.Unquoted=1]="Unquoted",d[d.Single=2]="Single",d[d.Double=3]="Double"})(l=e.QuoteType||(e.QuoteType={}));var c={Cdata:new Uint8Array([67,68,65,84,65,91]),CdataEnd:new Uint8Array([93,93,62]),CommentEnd:new Uint8Array([45,45,62]),ScriptEnd:new Uint8Array([60,47,115,99,114,105,112,116]),StyleEnd:new Uint8Array([60,47,115,116,121,108,101]),TitleEnd:new Uint8Array([60,47,116,105,116,108,101])},f=function(){function d(m,E){var v=m.xmlMode,R=v===void 0?!1:v,I=m.decodeEntities,b=I===void 0?!0:I;this.cbs=E,this.state=r.Text,this.buffer="",this.sectionStart=0,this.index=0,this.baseState=r.Text,this.isSpecial=!1,this.running=!0,this.offset=0,this.currentSequence=void 0,this.sequenceIndex=0,this.trieIndex=0,this.trieCurrent=0,this.entityResult=0,this.entityExcess=0,this.xmlMode=R,this.decodeEntities=b,this.entityTrie=R?t.xmlDecodeTree:t.htmlDecodeTree}return d.prototype.reset=function(){this.state=r.Text,this.buffer="",this.sectionStart=0,this.index=0,this.baseState=r.Text,this.currentSequence=void 0,this.running=!0,this.offset=0},d.prototype.write=function(m){this.offset+=this.buffer.length,this.buffer=m,this.parse()},d.prototype.end=function(){this.running&&this.finish()},d.prototype.pause=function(){this.running=!1},d.prototype.resume=function(){this.running=!0,this.indexthis.sectionStart&&this.cbs.ontext(this.sectionStart,this.index),this.state=r.BeforeTagName,this.sectionStart=this.index):this.decodeEntities&&m===n.Amp&&(this.state=r.BeforeEntity)},d.prototype.stateSpecialStartSequence=function(m){var E=this.sequenceIndex===this.currentSequence.length,v=E?s(m):(m|32)===this.currentSequence[this.sequenceIndex];if(!v)this.isSpecial=!1;else if(!E){this.sequenceIndex++;return}this.sequenceIndex=0,this.state=r.InTagName,this.stateInTagName(m)},d.prototype.stateInSpecialTag=function(m){if(this.sequenceIndex===this.currentSequence.length){if(m===n.Gt||a(m)){var E=this.index-this.currentSequence.length;if(this.sectionStart>14)-1;if(!this.allowLegacyEntity()&&m!==n.Semi)this.trieIndex+=v;else{var R=this.index-this.entityExcess+1;R>this.sectionStart&&this.emitPartial(this.sectionStart,R),this.entityResult=this.trieIndex,this.trieIndex+=v,this.entityExcess=0,this.sectionStart=this.index+1,v===0&&this.emitNamedEntity()}}},d.prototype.emitNamedEntity=function(){if(this.state=this.baseState,this.entityResult!==0){var m=(this.entityTrie[this.entityResult]&t.BinTrieFlags.VALUE_LENGTH)>>14;switch(m){case 1:{this.emitCodePoint(this.entityTrie[this.entityResult]&~t.BinTrieFlags.VALUE_LENGTH);break}case 2:{this.emitCodePoint(this.entityTrie[this.entityResult+1]);break}case 3:this.emitCodePoint(this.entityTrie[this.entityResult+1]),this.emitCodePoint(this.entityTrie[this.entityResult+2])}}},d.prototype.stateBeforeNumericEntity=function(m){(m|32)===n.LowerX?(this.entityExcess++,this.state=r.InHexEntity):(this.state=r.InNumericEntity,this.stateInNumericEntity(m))},d.prototype.emitNumericEntity=function(m){var E=this.index-this.entityExcess-1,v=E+2+ +(this.state===r.InHexEntity);v!==this.index&&(E>this.sectionStart&&this.emitPartial(this.sectionStart,E),this.sectionStart=this.index+Number(m),this.emitCodePoint((0,t.replaceCodePoint)(this.entityResult))),this.state=this.baseState},d.prototype.stateInNumericEntity=function(m){m===n.Semi?this.emitNumericEntity(!0):i(m)?(this.entityResult=this.entityResult*10+(m-n.Zero),this.entityExcess++):(this.allowLegacyEntity()?this.emitNumericEntity(!1):this.state=this.baseState,this.index--)},d.prototype.stateInHexEntity=function(m){m===n.Semi?this.emitNumericEntity(!0):i(m)?(this.entityResult=this.entityResult*16+(m-n.Zero),this.entityExcess++):u(m)?(this.entityResult=this.entityResult*16+((m|32)-n.LowerA+10),this.entityExcess++):(this.allowLegacyEntity()?this.emitNumericEntity(!1):this.state=this.baseState,this.index--)},d.prototype.allowLegacyEntity=function(){return!this.xmlMode&&(this.baseState===r.Text||this.baseState===r.InSpecialTag)},d.prototype.cleanup=function(){this.running&&this.sectionStart!==this.index&&(this.state===r.Text||this.state===r.InSpecialTag&&this.sequenceIndex===0?(this.cbs.ontext(this.sectionStart,this.index),this.sectionStart=this.index):(this.state===r.InAttributeValueDq||this.state===r.InAttributeValueSq||this.state===r.InAttributeValueNq)&&(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=this.index))},d.prototype.shouldContinue=function(){return this.index0&&i.has(this.stack[this.stack.length-1]);){var o=this.stack.pop();(r=(n=this.cbs).onclosetag)===null||r===void 0||r.call(n,o,!0)}this.isVoidElement(t)||(this.stack.push(t),rE.has(t)?this.foreignContext.push(!0):aE.has(t)&&this.foreignContext.push(!1)),(s=(a=this.cbs).onopentagname)===null||s===void 0||s.call(a,t),this.cbs.onopentag&&(this.attribs={})},e.prototype.endOpenTag=function(t){var n,r;this.startIndex=this.openTagStart,this.attribs&&((r=(n=this.cbs).onopentag)===null||r===void 0||r.call(n,this.tagname,this.attribs,t),this.attribs=null),this.cbs.onclosetag&&this.isVoidElement(this.tagname)&&this.cbs.onclosetag(this.tagname,!0),this.tagname=""},e.prototype.onopentagend=function(t){this.endIndex=t,this.endOpenTag(!1),this.startIndex=t+1},e.prototype.onclosetag=function(t,n){var r,a,s,i,o,u;this.endIndex=n;var l=this.getSlice(t,n);if(this.lowerCaseTagNames&&(l=l.toLowerCase()),(rE.has(l)||aE.has(l))&&this.foreignContext.pop(),this.isVoidElement(l))!this.options.xmlMode&&l==="br"&&((a=(r=this.cbs).onopentagname)===null||a===void 0||a.call(r,"br"),(i=(s=this.cbs).onopentag)===null||i===void 0||i.call(s,"br",{},!0),(u=(o=this.cbs).onclosetag)===null||u===void 0||u.call(o,"br",!1));else{var c=this.stack.lastIndexOf(l);if(c!==-1)if(this.cbs.onclosetag)for(var f=this.stack.length-c;f--;)this.cbs.onclosetag(this.stack.pop(),f!==0);else this.stack.length=c;else!this.options.xmlMode&&l==="p"&&(this.emitOpenTag("p"),this.closeCurrentTag(!0))}this.startIndex=n+1},e.prototype.onselfclosingtag=function(t){this.endIndex=t,this.options.xmlMode||this.options.recognizeSelfClosing||this.foreignContext[this.foreignContext.length-1]?(this.closeCurrentTag(!1),this.startIndex=t+1):this.onopentagend(t)},e.prototype.closeCurrentTag=function(t){var n,r,a=this.tagname;this.endOpenTag(t),this.stack[this.stack.length-1]===a&&((r=(n=this.cbs).onclosetag)===null||r===void 0||r.call(n,a,!t),this.stack.pop())},e.prototype.onattribname=function(t,n){this.startIndex=t;var r=this.getSlice(t,n);this.attribname=this.lowerCaseAttributeNames?r.toLowerCase():r},e.prototype.onattribdata=function(t,n){this.attribvalue+=this.getSlice(t,n)},e.prototype.onattribentity=function(t){this.attribvalue+=(0,Jm.fromCodePoint)(t)},e.prototype.onattribend=function(t,n){var r,a;this.endIndex=n,(a=(r=this.cbs).onattribute)===null||a===void 0||a.call(r,this.attribname,this.attribvalue,t===qi.QuoteType.Double?'"':t===qi.QuoteType.Single?"'":t===qi.QuoteType.NoValue?void 0:null),this.attribs&&!Object.prototype.hasOwnProperty.call(this.attribs,this.attribname)&&(this.attribs[this.attribname]=this.attribvalue),this.attribvalue=""},e.prototype.getInstructionName=function(t){var n=t.search(hhe),r=n<0?t:t.substr(0,n);return this.lowerCaseTagNames&&(r=r.toLowerCase()),r},e.prototype.ondeclaration=function(t,n){this.endIndex=n;var r=this.getSlice(t,n);if(this.cbs.onprocessinginstruction){var a=this.getInstructionName(r);this.cbs.onprocessinginstruction("!".concat(a),"!".concat(r))}this.startIndex=n+1},e.prototype.onprocessinginstruction=function(t,n){this.endIndex=n;var r=this.getSlice(t,n);if(this.cbs.onprocessinginstruction){var a=this.getInstructionName(r);this.cbs.onprocessinginstruction("?".concat(a),"?".concat(r))}this.startIndex=n+1},e.prototype.oncomment=function(t,n,r){var a,s,i,o;this.endIndex=n,(s=(a=this.cbs).oncomment)===null||s===void 0||s.call(a,this.getSlice(t,n-r)),(o=(i=this.cbs).oncommentend)===null||o===void 0||o.call(i),this.startIndex=n+1},e.prototype.oncdata=function(t,n,r){var a,s,i,o,u,l,c,f,d,m;this.endIndex=n;var E=this.getSlice(t,n-r);this.options.xmlMode||this.options.recognizeCDATA?((s=(a=this.cbs).oncdatastart)===null||s===void 0||s.call(a),(o=(i=this.cbs).ontext)===null||o===void 0||o.call(i,E),(l=(u=this.cbs).oncdataend)===null||l===void 0||l.call(u)):((f=(c=this.cbs).oncomment)===null||f===void 0||f.call(c,"[CDATA[".concat(E,"]]")),(m=(d=this.cbs).oncommentend)===null||m===void 0||m.call(d)),this.startIndex=n+1},e.prototype.onend=function(){var t,n;if(this.cbs.onclosetag){this.endIndex=this.startIndex;for(var r=this.stack.length;r>0;this.cbs.onclosetag(this.stack[--r],!0));}(n=(t=this.cbs).onend)===null||n===void 0||n.call(t)},e.prototype.reset=function(){var t,n,r,a;(n=(t=this.cbs).onreset)===null||n===void 0||n.call(t),this.tokenizer.reset(),this.tagname="",this.attribname="",this.attribs=null,this.stack.length=0,this.startIndex=0,this.endIndex=0,(a=(r=this.cbs).onparserinit)===null||a===void 0||a.call(r,this),this.buffers.length=0,this.bufferOffset=0,this.writeIndex=0,this.ended=!1},e.prototype.parseComplete=function(t){this.reset(),this.end(t)},e.prototype.getSlice=function(t,n){for(;t-this.bufferOffset>=this.buffers[0].length;)this.shiftBuffer();for(var r=this.buffers[0].slice(t-this.bufferOffset,n-this.bufferOffset);n-this.bufferOffset>this.buffers[0].length;)this.shiftBuffer(),r+=this.buffers[0].slice(0,n-this.bufferOffset);return r},e.prototype.shiftBuffer=function(){this.bufferOffset+=this.buffers[0].length,this.writeIndex--,this.buffers.shift()},e.prototype.write=function(t){var n,r;if(this.ended){(r=(n=this.cbs).onerror)===null||r===void 0||r.call(n,new Error(".write() after done!"));return}this.buffers.push(t),this.tokenizer.running&&(this.tokenizer.write(t),this.writeIndex++)},e.prototype.end=function(t){var n,r;if(this.ended){(r=(n=this.cbs).onerror)===null||r===void 0||r.call(n,new Error(".end() after done!"));return}t&&this.write(t),this.ended=!0,this.tokenizer.end()},e.prototype.pause=function(){this.tokenizer.pause()},e.prototype.resume=function(){for(this.tokenizer.resume();this.tokenizer.running&&this.writeIndex0?this.children[this.children.length-1]:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"childNodes",{get:function(){return this.children},set:function(n){this.children=n},enumerable:!1,configurable:!0}),t}(Bf);Qe.NodeWithChildren=dc;var GT=function(e){qr(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=un.ElementType.CDATA,n}return Object.defineProperty(t.prototype,"nodeType",{get:function(){return 4},enumerable:!1,configurable:!0}),t}(dc);Qe.CDATA=GT;var zT=function(e){qr(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=un.ElementType.Root,n}return Object.defineProperty(t.prototype,"nodeType",{get:function(){return 9},enumerable:!1,configurable:!0}),t}(dc);Qe.Document=zT;var BT=function(e){qr(t,e);function t(n,r,a,s){a===void 0&&(a=[]),s===void 0&&(s=n==="script"?un.ElementType.Script:n==="style"?un.ElementType.Style:un.ElementType.Tag);var i=e.call(this,a)||this;return i.name=n,i.attribs=r,i.type=s,i}return Object.defineProperty(t.prototype,"nodeType",{get:function(){return 1},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"tagName",{get:function(){return this.name},set:function(n){this.name=n},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"attributes",{get:function(){var n=this;return Object.keys(this.attribs).map(function(r){var a,s;return{name:r,value:n.attribs[r],namespace:(a=n["x-attribsNamespace"])===null||a===void 0?void 0:a[r],prefix:(s=n["x-attribsPrefix"])===null||s===void 0?void 0:s[r]}})},enumerable:!1,configurable:!0}),t}(dc);Qe.Element=BT;function HT(e){return(0,un.isTag)(e)}Qe.isTag=HT;function VT(e){return e.type===un.ElementType.CDATA}Qe.isCDATA=VT;function jT(e){return e.type===un.ElementType.Text}Qe.isText=jT;function KT(e){return e.type===un.ElementType.Comment}Qe.isComment=KT;function YT(e){return e.type===un.ElementType.Directive}Qe.isDirective=YT;function qT(e){return e.type===un.ElementType.Root}Qe.isDocument=qT;function The(e){return Object.prototype.hasOwnProperty.call(e,"children")}Qe.hasChildren=The;function Hf(e,t){t===void 0&&(t=!1);var n;if(jT(e))n=new xT(e.data);else if(KT(e))n=new FT(e.data);else if(HT(e)){var r=t?el(e.children):[],a=new BT(e.name,Gs({},e.attribs),r);r.forEach(function(u){return u.parent=a}),e.namespace!=null&&(a.namespace=e.namespace),e["x-attribsNamespace"]&&(a["x-attribsNamespace"]=Gs({},e["x-attribsNamespace"])),e["x-attribsPrefix"]&&(a["x-attribsPrefix"]=Gs({},e["x-attribsPrefix"])),n=a}else if(VT(e)){var r=t?el(e.children):[],s=new GT(r);r.forEach(function(l){return l.parent=s}),n=s}else if(qT(e)){var r=t?el(e.children):[],i=new zT(r);r.forEach(function(l){return l.parent=i}),e["x-mode"]&&(i["x-mode"]=e["x-mode"]),n=i}else if(YT(e)){var o=new WT(e.name,e.data);e["x-name"]!=null&&(o["x-name"]=e["x-name"],o["x-publicId"]=e["x-publicId"],o["x-systemId"]=e["x-systemId"]),n=o}else throw new Error("Not implemented yet: ".concat(e.type));return n.startIndex=e.startIndex,n.endIndex=e.endIndex,e.sourceCodeLocation!=null&&(n.sourceCodeLocation=e.sourceCodeLocation),n}Qe.cloneNode=Hf;function el(e){for(var t=e.map(function(r){return Hf(r,!0)}),n=1;n$\x80-\uFFFF]/g;var t=new Map([[34,"""],[38,"&"],[39,"'"],[60,"<"],[62,">"]]);e.getCodePoint=String.prototype.codePointAt!=null?function(a,s){return a.codePointAt(s)}:function(a,s){return(a.charCodeAt(s)&64512)===55296?(a.charCodeAt(s)-55296)*1024+a.charCodeAt(s+1)-56320+65536:a.charCodeAt(s)};function n(a){for(var s="",i=0,o;(o=e.xmlReplacer.exec(a))!==null;){var u=o.index,l=a.charCodeAt(u),c=t.get(l);c!==void 0?(s+=a.substring(i,u)+c,i=u+1):(s+="".concat(a.substring(i,u),"&#x").concat((0,e.getCodePoint)(a,u).toString(16),";"),i=e.xmlReplacer.lastIndex+=+((l&64512)===55296))}return s+a.substr(i)}e.encodeXML=n,e.escape=n;function r(a,s){return function(o){for(var u,l=0,c="";u=a.exec(o);)l!==u.index&&(c+=o.substring(l,u.index)),c+=s.get(u[0].charCodeAt(0)),l=u.index+1;return c+o.substring(l)}}e.escapeUTF8=r(/[&<>'"]/g,t),e.escapeAttribute=r(/["&\u00A0]/g,new Map([[34,"""],[38,"&"],[160," "]])),e.escapeText=r(/[&<>\u00A0]/g,new Map([[38,"&"],[60,"<"],[62,">"],[160," "]]))})(bu);var ghe=we&&we.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(la,"__esModule",{value:!0});la.encodeNonAsciiHTML=la.encodeHTML=void 0;var Ahe=ghe(Vf),ZT=bu,She=/[\t\n!-,./:-@[-`\f{-}$\x80-\uFFFF]/g;function Ohe(e){return QT(She,e)}la.encodeHTML=Ohe;function Ihe(e){return QT(ZT.xmlReplacer,e)}la.encodeNonAsciiHTML=Ihe;function QT(e,t){for(var n="",r=0,a;(a=e.exec(t))!==null;){var s=a.index;n+=t.substring(r,s);var i=t.charCodeAt(s),o=Ahe.default.get(i);if(typeof o=="object"){if(s+10&&(r+=fc(e.children,t)),(t.xmlMode||!sE.has(e.name))&&(r+=""))),r}function $he(e){return"<".concat(e.data,">")}function khe(e,t){var n,r=e.data||"";return((n=t.encodeEntities)!==null&&n!==void 0?n:t.decodeEntities)!==!1&&!(!t.xmlMode&&e.parent&&Nhe.has(e.parent.name))&&(r=t.xmlMode||t.encodeEntities!=="utf8"?(0,Nu.encodeXML)(r):(0,Nu.escapeText)(r)),r}function Uhe(e){return"")}function Mhe(e){return"")}var xhe=we&&we.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(hn,"__esModule",{value:!0});hn.innerText=hn.textContent=hn.getText=hn.getInnerHTML=hn.getOuterHTML=void 0;var Yn=fr,Fhe=xhe(Ni),Whe=fs;function eg(e,t){return(0,Fhe.default)(e,t)}hn.getOuterHTML=eg;function Ghe(e,t){return(0,Yn.hasChildren)(e)?e.children.map(function(n){return eg(n,t)}).join(""):""}hn.getInnerHTML=Ghe;function Co(e){return Array.isArray(e)?e.map(Co).join(""):(0,Yn.isTag)(e)?e.name==="br"?` -`:Co(e.children):(0,Yn.isCDATA)(e)?Co(e.children):(0,Yn.isText)(e)?e.data:""}hn.getText=Co;function dd(e){return Array.isArray(e)?e.map(dd).join(""):(0,Yn.hasChildren)(e)&&!(0,Yn.isComment)(e)?dd(e.children):(0,Yn.isText)(e)?e.data:""}hn.textContent=dd;function fd(e){return Array.isArray(e)?e.map(fd).join(""):(0,Yn.hasChildren)(e)&&(e.type===Whe.ElementType.Tag||(0,Yn.isCDATA)(e))?fd(e.children):(0,Yn.isText)(e)?e.data:""}hn.innerText=fd;var Ut={};Object.defineProperty(Ut,"__esModule",{value:!0});Ut.prevElementSibling=Ut.nextElementSibling=Ut.getName=Ut.hasAttrib=Ut.getAttributeValue=Ut.getSiblings=Ut.getParent=Ut.getChildren=void 0;var jf=fr;function tg(e){return(0,jf.hasChildren)(e)?e.children:[]}Ut.getChildren=tg;function ng(e){return e.parent||null}Ut.getParent=ng;function zhe(e){var t,n,r=ng(e);if(r!=null)return tg(r);for(var a=[e],s=e.prev,i=e.next;s!=null;)a.unshift(s),t=s,s=t.prev;for(;i!=null;)a.push(i),n=i,i=n.next;return a}Ut.getSiblings=zhe;function Bhe(e,t){var n;return(n=e.attribs)===null||n===void 0?void 0:n[t]}Ut.getAttributeValue=Bhe;function Hhe(e,t){return e.attribs!=null&&Object.prototype.hasOwnProperty.call(e.attribs,t)&&e.attribs[t]!=null}Ut.hasAttrib=Hhe;function Vhe(e){return e.name}Ut.getName=Vhe;function jhe(e){for(var t,n=e.next;n!==null&&!(0,jf.isTag)(n);)t=n,n=t.next;return n}Ut.nextElementSibling=jhe;function Khe(e){for(var t,n=e.prev;n!==null&&!(0,jf.isTag)(n);)t=n,n=t.prev;return n}Ut.prevElementSibling=Khe;var on={};Object.defineProperty(on,"__esModule",{value:!0});on.prepend=on.prependChild=on.append=on.appendChild=on.replaceElement=on.removeElement=void 0;function Ci(e){if(e.prev&&(e.prev.next=e.next),e.next&&(e.next.prev=e.prev),e.parent){var t=e.parent.children,n=t.lastIndexOf(e);n>=0&&t.splice(n,1)}e.next=null,e.prev=null,e.parent=null}on.removeElement=Ci;function Yhe(e,t){var n=t.prev=e.prev;n&&(n.next=t);var r=t.next=e.next;r&&(r.prev=t);var a=t.parent=e.parent;if(a){var s=a.children;s[s.lastIndexOf(e)]=t,e.parent=null}}on.replaceElement=Yhe;function qhe(e,t){if(Ci(t),t.next=null,t.parent=e,e.children.push(t)>1){var n=e.children[e.children.length-2];n.next=t,t.prev=n}else t.prev=null}on.appendChild=qhe;function Xhe(e,t){Ci(t);var n=e.parent,r=e.next;if(t.next=r,t.prev=e,e.next=t,t.parent=n,r){if(r.prev=t,n){var a=n.children;a.splice(a.lastIndexOf(r),0,t)}}else n&&n.children.push(t)}on.append=Xhe;function Zhe(e,t){if(Ci(t),t.parent=e,t.prev=null,e.children.unshift(t)!==1){var n=e.children[1];n.prev=t,t.next=n}else t.next=null}on.prependChild=Zhe;function Qhe(e,t){Ci(t);var n=e.parent;if(n){var r=n.children;r.splice(r.indexOf(e),0,t)}e.prev&&(e.prev.next=t),t.parent=n,t.prev=e.prev,t.next=e,e.prev=t}on.prepend=Qhe;var Jt={};Object.defineProperty(Jt,"__esModule",{value:!0});Jt.findAll=Jt.existsOne=Jt.findOne=Jt.findOneChild=Jt.find=Jt.filter=void 0;var pc=fr;function Jhe(e,t,n,r){return n===void 0&&(n=!0),r===void 0&&(r=1/0),rg(e,Array.isArray(t)?t:[t],n,r)}Jt.filter=Jhe;function rg(e,t,n,r){for(var a=[],s=[t],i=[0];;){if(i[0]>=s[0].length){if(i.length===1)return a;s.shift(),i.shift();continue}var o=s[0][i[0]++];if(e(o)&&(a.push(o),--r<=0))return a;n&&(0,pc.hasChildren)(o)&&o.children.length>0&&(i.unshift(0),s.unshift(o.children))}}Jt.find=rg;function e_e(e,t){return t.find(e)}Jt.findOneChild=e_e;function ag(e,t,n){n===void 0&&(n=!0);for(var r=null,a=0;a0&&(r=ag(e,s.children,!0));else continue}return r}Jt.findOne=ag;function sg(e,t){return t.some(function(n){return(0,pc.isTag)(n)&&(e(n)||sg(e,n.children))})}Jt.existsOne=sg;function t_e(e,t){for(var n=[],r=[t],a=[0];;){if(a[0]>=r[0].length){if(r.length===1)return n;r.shift(),a.shift();continue}var s=r[0][a[0]++];(0,pc.isTag)(s)&&(e(s)&&n.push(s),s.children.length>0&&(a.unshift(0),r.unshift(s.children)))}}Jt.findAll=t_e;var _n={};Object.defineProperty(_n,"__esModule",{value:!0});_n.getElementsByTagType=_n.getElementsByTagName=_n.getElementById=_n.getElements=_n.testElement=void 0;var ra=fr,mc=Jt,Cu={tag_name:function(e){return typeof e=="function"?function(t){return(0,ra.isTag)(t)&&e(t.name)}:e==="*"?ra.isTag:function(t){return(0,ra.isTag)(t)&&t.name===e}},tag_type:function(e){return typeof e=="function"?function(t){return e(t.type)}:function(t){return t.type===e}},tag_contains:function(e){return typeof e=="function"?function(t){return(0,ra.isText)(t)&&e(t.data)}:function(t){return(0,ra.isText)(t)&&t.data===e}}};function ig(e,t){return typeof t=="function"?function(n){return(0,ra.isTag)(n)&&t(n.attribs[e])}:function(n){return(0,ra.isTag)(n)&&n.attribs[e]===t}}function n_e(e,t){return function(n){return e(n)||t(n)}}function og(e){var t=Object.keys(e).map(function(n){var r=e[n];return Object.prototype.hasOwnProperty.call(Cu,n)?Cu[n](r):ig(n,r)});return t.length===0?null:t.reduce(n_e)}function r_e(e,t){var n=og(e);return n?n(t):!0}_n.testElement=r_e;function a_e(e,t,n,r){r===void 0&&(r=1/0);var a=og(e);return a?(0,mc.filter)(a,t,n,r):[]}_n.getElements=a_e;function s_e(e,t,n){return n===void 0&&(n=!0),Array.isArray(t)||(t=[t]),(0,mc.findOne)(ig("id",e),t,n)}_n.getElementById=s_e;function i_e(e,t,n,r){return n===void 0&&(n=!0),r===void 0&&(r=1/0),(0,mc.filter)(Cu.tag_name(e),t,n,r)}_n.getElementsByTagName=i_e;function o_e(e,t,n,r){return n===void 0&&(n=!0),r===void 0&&(r=1/0),(0,mc.filter)(Cu.tag_type(e),t,n,r)}_n.getElementsByTagType=o_e;var ug={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.uniqueSort=e.compareDocumentPosition=e.DocumentPosition=e.removeSubsets=void 0;var t=fr;function n(i){for(var o=i.length;--o>=0;){var u=i[o];if(o>0&&i.lastIndexOf(u,o-1)>=0){i.splice(o,1);continue}for(var l=u.parent;l;l=l.parent)if(i.includes(l)){i.splice(o,1);break}}return i}e.removeSubsets=n;var r;(function(i){i[i.DISCONNECTED=1]="DISCONNECTED",i[i.PRECEDING=2]="PRECEDING",i[i.FOLLOWING=4]="FOLLOWING",i[i.CONTAINS=8]="CONTAINS",i[i.CONTAINED_BY=16]="CONTAINED_BY"})(r=e.DocumentPosition||(e.DocumentPosition={}));function a(i,o){var u=[],l=[];if(i===o)return 0;for(var c=(0,t.hasChildren)(i)?i:i.parent;c;)u.unshift(c),c=c.parent;for(c=(0,t.hasChildren)(o)?o:o.parent;c;)l.unshift(c),c=c.parent;for(var f=Math.min(u.length,l.length),d=0;dE.indexOf(R)?m===o?r.FOLLOWING|r.CONTAINED_BY:r.FOLLOWING:m===i?r.PRECEDING|r.CONTAINS:r.PRECEDING}e.compareDocumentPosition=a;function s(i){return i=i.filter(function(o,u,l){return!l.includes(o,u+1)}),i.sort(function(o,u){var l=a(o,u);return l&r.PRECEDING?-1:l&r.FOLLOWING?1:0}),i}e.uniqueSort=s})(ug);var Ec={};Object.defineProperty(Ec,"__esModule",{value:!0});Ec.getFeed=void 0;var u_e=hn,yi=_n;function c_e(e){var t=yu(m_e,e);return t?t.name==="feed"?l_e(t):d_e(t):null}Ec.getFeed=c_e;function l_e(e){var t,n=e.children,r={type:"atom",items:(0,yi.getElementsByTagName)("entry",n).map(function(i){var o,u=i.children,l={media:cg(u)};an(l,"id","id",u),an(l,"title","title",u);var c=(o=yu("link",u))===null||o===void 0?void 0:o.attribs.href;c&&(l.link=c);var f=$r("summary",u)||$r("content",u);f&&(l.description=f);var d=$r("updated",u);return d&&(l.pubDate=new Date(d)),l})};an(r,"id","id",n),an(r,"title","title",n);var a=(t=yu("link",n))===null||t===void 0?void 0:t.attribs.href;a&&(r.link=a),an(r,"description","subtitle",n);var s=$r("updated",n);return s&&(r.updated=new Date(s)),an(r,"author","email",n,!0),r}function d_e(e){var t,n,r=(n=(t=yu("channel",e.children))===null||t===void 0?void 0:t.children)!==null&&n!==void 0?n:[],a={type:e.name.substr(0,3),id:"",items:(0,yi.getElementsByTagName)("item",e.children).map(function(i){var o=i.children,u={media:cg(o)};an(u,"id","guid",o),an(u,"title","title",o),an(u,"link","link",o),an(u,"description","description",o);var l=$r("pubDate",o)||$r("dc:date",o);return l&&(u.pubDate=new Date(l)),u})};an(a,"title","title",r),an(a,"link","link",r),an(a,"description","description",r);var s=$r("lastBuildDate",r);return s&&(a.updated=new Date(s)),an(a,"author","managingEditor",r,!0),a}var f_e=["url","type","lang"],p_e=["fileSize","bitrate","framerate","samplingrate","channels","duration","height","width"];function cg(e){return(0,yi.getElementsByTagName)("media:content",e).map(function(t){for(var n=t.attribs,r={medium:n.medium,isDefault:!!n.isDefault},a=0,s=f_e;a{if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")},Kf={};Object.defineProperty(Kf,"__esModule",{value:!0});/*! +`?(this.line++,this.column=0):this.column++,t},e.prototype.consumeCharRef=function(){var t=this.input.indexOf(";",this.index);if(t!==-1){var n=this.input.slice(this.index,t),r=this.entityParser.parse(n);if(r){for(var a=n.length;a;)this.consume(),a--;return this.consume(),r}}},e.prototype.markTagStart=function(){this.delegate.tagOpen()},e.prototype.appendToTagName=function(t){this.tagNameBuffer+=t,this.delegate.appendToTagName(t)},e.prototype.isIgnoredEndTag=function(){var t=this.tagNameBuffer;return t==="title"&&this.input.substring(this.index,this.index+8)!==""||t==="style"&&this.input.substring(this.index,this.index+8)!==""||t==="script"&&this.input.substring(this.index,this.index+9)!=="<\/script>"},e}(),the=function(){function e(t,n){n===void 0&&(n={}),this.options=n,this.token=null,this.startLine=1,this.startColumn=0,this.tokens=[],this.tokenizer=new ehe(this,t,n.mode),this._currentAttribute=void 0}return e.prototype.tokenize=function(t){return this.tokens=[],this.tokenizer.tokenize(t),this.tokens},e.prototype.tokenizePart=function(t){return this.tokens=[],this.tokenizer.tokenizePart(t),this.tokens},e.prototype.tokenizeEOF=function(){return this.tokens=[],this.tokenizer.tokenizeEOF(),this.tokens[0]},e.prototype.reset=function(){this.token=null,this.startLine=1,this.startColumn=0},e.prototype.current=function(){var t=this.token;if(t===null)throw new Error("token was unexpectedly null");if(arguments.length===0)return t;for(var n=0;n=0))continue;let c=r.length;ohe(u,n,++i,r),i+=r.length-c-1}else if(o.type!==ud)r.push(o);else{const u=ihe(o.chars,s);r.push.apply(r,u)}}for(let i=0;i0&&(u+=" "+lhe(o.attributes).join(" ")),o.selfClosing&&(u+=" /"),u+=">",a.push(u);break}case kT:a.push(``);break;case ud:a.push(cd(o.chars));break;case rhe:a.push(``);break;case ahe:{let u=`",a.push(u);break}}}return a.join("")}function ihe(e,t){const n=HEe(e),r=[];for(let a=0;a0;){let s=t[n];s.type===Ru&&s.tagName.toUpperCase()===e?a++:s.type===kT&&s.tagName.toUpperCase()===e&&a--,r.push(s),n++}return r}function uhe(e){let{tagName:t,attributes:n,content:r}=e;return`<${t} ${che(n)}>${cd(r)}`}function cd(e){return e.replace(//g,">")}function UT(e){return e.replace(/"/g,""")}function che(e){const t=[];for(const n in e){const r=e[n]+"";t.push(`${n}="${UT(r)}"`)}return t.join(" ")}function lhe(e){const t=[];for(let n=0;n䀾mmaĀ;d׷׸䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇܎ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ޷޼߂ߐĀiyޱ޵rc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄΀HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶߻dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣ঳সে্਷ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗ࡜ࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४Ānrࢃ࢏gleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpw৔ਖਛgȀLRlr৞৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼੝੠੷੼અઋ઎p;椅y;䐜Ādl੥੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑ඗ඞcy;䐊cute;䅃ƀaey઴હાron;䅇dil;䅅;䐝ƀgswે૰଎ativeƀMTV૓૟૨ediumSpace;怋hiĀcn૦૘ë૙eryThiî૙tedĀGL૸ଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷ଺reak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪୼஡௫ఄ౞಄ದ೘ൡඅ櫬Āou୛୤ngruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊ஛ement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater΀;EFGLSTஶஷ஽௉௓௘௥扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲௽ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ೒拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨೹setĀ;E೰ೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂ෉෕ෛ෠෧෼ขภยา฿ไlig;䅒cute耻Ó䃓Āiy෎ීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲ෶cr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬื฼de耻Õ䃕es;樷ml耻Ö䃖erĀBP๋๠Āar๐๓r;怾acĀek๚๜;揞et;掴arenthesis;揜Ҁacfhilors๿ງຊຏຒດຝະ໼rtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ໠໤檻cedesȀ;EST່້໏໚扺qual;檯lantEqual;扼ilde;找me;怳Ādp໩໮uct;戏ortionĀ;aȥ໹l;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬؀BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁࿫࿳ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL࿜࿝࿡憒ar;懥eftArrow;懄eiling;按oǵ࿹\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»࿝pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄ቉ቕ቞ቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHc቎ቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗Āeiቻ኉Dzኀ\0ኇefore;戴a;䎘Ācn኎ኘkSpace;쀀  Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0᏿ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0጖y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻፿on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtè૙a;䎖r;愨pf;愤cr;쀀𝒵௡ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚΀;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒΀;Eaeiop዁ᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;e዁ᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;e዁ᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰ᜼ᝃᝈ᝸᝽០៦ᠹᡐᜍ᤽᥈ᥰot;櫭Ācrᛶ᜞kȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e᜚᜛戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;t፜᜷brk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓ᝛ᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯ᝱ᝳ;䎲;愶een;扬r;쀀𝔟g΀costuvwឍឝឳេ៕៛៞ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀako៭ᠦᠵĀcn៲ᠣkƀlst៺֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘᠝斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈؀DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬ᣿ᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教΀;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ᣷᣹᣻᣽;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ᤟;敛;敘;攘;攔΀;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģ᥂bar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;e᜚᜜lƀ;bhᥨᥩᥫ䁜;槅sub;柈Ŭᥴ᥾lĀ;e᥹᥺怢t»᥺pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭍᭒\0᯽\0ᰌƀcpr᦭ᦲ᧝ute;䄇̀;abcdsᦿᧀᧄ᧊᧕᧙戩nd;橄rcup;橉Āau᧏᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r΀;Ecefms᩟᩠ᩢᩫ᪤᪪᪮旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖᪚᪟»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇᫔᫺\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ᫙\0\0᫢aĀ;t᫞᫟䀬;䁀ƀ;fl᫨᫩᫫戁îᅠeĀmx᫱᫶ent»᫩eóɍǧ᫾\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯΀delprvw᭠᭬᭷ᮂᮬᯔ᯹arrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;p᭿ᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰸᰻᰿ᱝᱩᱵᲊᲞᲬᲷ᳻᳿ᴍᵻᶑᶫᶻ᷆᷍rò΁ar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂͸᳖᳜᳠mƀ;oș᳊᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄ὎὚ĀDoḆᴴoôᲉĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»Ṻƀaeiἒ἖Ἒls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙ῜ῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao‌⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧‪‬\0‮耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₟₥₰₴⃰⃵⃺⃿℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕ₝ute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽⃉ƀ;qsؾٌ⃄lanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqr׮ⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0↎proø₞r;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢␧␭␱␵␻ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀஀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼rò৆òΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonó྘quigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d྘➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ᠛旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐௏쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop඄⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roø඄urĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓΀;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨í஘istĀ;s஠டr;쀀𝔫ȀEest௅⩦⩹⩼ƀ;qs஼⩭௡ƀ;qs஼௅⩴lanô௢ií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚΀AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs఻⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs఻⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast୻⭕⭚⭟lleì୻l;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖ΀chimpqu⮽⯍⯙⬄୸⯤⯯Ȁ;cerല⯆ഷ⯉uå൅;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭å೸åഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñ೗Ā;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰⳴ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥ⵲ⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;c᪞ⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācr⵩⵭ir;榿;쀀𝔬ͯ⵹\0\0⵼\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕ⶘ⶥⶨrò᪀Āir⶝ⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔ⷗ǒr;榷rp;榹΀;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ⹞\0⹽\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ⹧⹲຅脀¶;l⹭⹮䂶leìЃɩ⹸\0\0⹻m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳⻴ᤈ⻹⻽⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp໬⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t໻⾴ï໻rel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⿚⋢⿟⿥⿫⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei⿾々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔઀ABHabcdefhilmnoprstux぀けさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤΀cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstw࿜ガクシスゼゾダッデナp;極Ā;f࿠ゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes㄂㄄;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ì࿲âヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘㇤㇮rrowĀ;t࿜ㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowó࿪arpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓rò࿪aòՑ;怏oustĀ;a㈞㈟掱che»㈟mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦΀Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼਴t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì⹯耻­䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;q኱ኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫ਩war;椪lig耻ß䃟௡㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rë๟ƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproø዁im»ኬsðኞĀas㚺㚮ð዁rn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈ΀adempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xô᝷headĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜΀eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roð໻tré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚΀cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜ៟tré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map(function(e){return e.charCodeAt(0)}));var zf={};Object.defineProperty(zf,"__esModule",{value:!0});zf.default=new Uint16Array("Ȁaglq \x1Bɭ\0\0p;䀦os;䀧t;䀾t;䀼uot;䀢".split("").map(function(e){return e.charCodeAt(0)}));var ld={};(function(e){var t;Object.defineProperty(e,"__esModule",{value:!0}),e.replaceCodePoint=e.fromCodePoint=void 0;var n=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]);e.fromCodePoint=(t=String.fromCodePoint)!==null&&t!==void 0?t:function(s){var i="";return s>65535&&(s-=65536,i+=String.fromCharCode(s>>>10&1023|55296),s=56320|s&1023),i+=String.fromCharCode(s),i};function r(s){var i;return s>=55296&&s<=57343||s>1114111?65533:(i=n.get(s))!==null&&i!==void 0?i:s}e.replaceCodePoint=r;function a(s){return(0,e.fromCodePoint)(r(s))}e.default=a})(ld);(function(e){var t=we&&we.__createBinding||(Object.create?function(L,X,J,ne){ne===void 0&&(ne=J);var D=Object.getOwnPropertyDescriptor(X,J);(!D||("get"in D?!X.__esModule:D.writable||D.configurable))&&(D={enumerable:!0,get:function(){return X[J]}}),Object.defineProperty(L,ne,D)}:function(L,X,J,ne){ne===void 0&&(ne=J),L[ne]=X[J]}),n=we&&we.__setModuleDefault||(Object.create?function(L,X){Object.defineProperty(L,"default",{enumerable:!0,value:X})}:function(L,X){L.default=X}),r=we&&we.__importStar||function(L){if(L&&L.__esModule)return L;var X={};if(L!=null)for(var J in L)J!=="default"&&Object.prototype.hasOwnProperty.call(L,J)&&t(X,L,J);return n(X,L),X},a=we&&we.__importDefault||function(L){return L&&L.__esModule?L:{default:L}};Object.defineProperty(e,"__esModule",{value:!0}),e.decodeXML=e.decodeHTMLStrict=e.decodeHTMLAttribute=e.decodeHTML=e.determineBranch=e.EntityDecoder=e.DecodingMode=e.BinTrieFlags=e.fromCodePoint=e.replaceCodePoint=e.decodeCodePoint=e.xmlDecodeTree=e.htmlDecodeTree=void 0;var s=a(Gf);e.htmlDecodeTree=s.default;var i=a(zf);e.xmlDecodeTree=i.default;var o=r(ld);e.decodeCodePoint=o.default;var u=ld;Object.defineProperty(e,"replaceCodePoint",{enumerable:!0,get:function(){return u.replaceCodePoint}}),Object.defineProperty(e,"fromCodePoint",{enumerable:!0,get:function(){return u.fromCodePoint}});var l;(function(L){L[L.NUM=35]="NUM",L[L.SEMI=59]="SEMI",L[L.EQUALS=61]="EQUALS",L[L.ZERO=48]="ZERO",L[L.NINE=57]="NINE",L[L.LOWER_A=97]="LOWER_A",L[L.LOWER_F=102]="LOWER_F",L[L.LOWER_X=120]="LOWER_X",L[L.LOWER_Z=122]="LOWER_Z",L[L.UPPER_A=65]="UPPER_A",L[L.UPPER_F=70]="UPPER_F",L[L.UPPER_Z=90]="UPPER_Z"})(l||(l={}));var c=32,f;(function(L){L[L.VALUE_LENGTH=49152]="VALUE_LENGTH",L[L.BRANCH_LENGTH=16256]="BRANCH_LENGTH",L[L.JUMP_TABLE=127]="JUMP_TABLE"})(f=e.BinTrieFlags||(e.BinTrieFlags={}));function d(L){return L>=l.ZERO&&L<=l.NINE}function m(L){return L>=l.UPPER_A&&L<=l.UPPER_F||L>=l.LOWER_A&&L<=l.LOWER_F}function E(L){return L>=l.UPPER_A&&L<=l.UPPER_Z||L>=l.LOWER_A&&L<=l.LOWER_Z||d(L)}function I(L){return L===l.EQUALS||E(L)}var R;(function(L){L[L.EntityStart=0]="EntityStart",L[L.NumericStart=1]="NumericStart",L[L.NumericDecimal=2]="NumericDecimal",L[L.NumericHex=3]="NumericHex",L[L.NamedEntity=4]="NamedEntity"})(R||(R={}));var v;(function(L){L[L.Legacy=0]="Legacy",L[L.Strict=1]="Strict",L[L.Attribute=2]="Attribute"})(v=e.DecodingMode||(e.DecodingMode={}));var b=function(){function L(X,J,ne){this.decodeTree=X,this.emitCodePoint=J,this.errors=ne,this.state=R.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=v.Strict}return L.prototype.startEntity=function(X){this.decodeMode=X,this.state=R.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1},L.prototype.write=function(X,J){switch(this.state){case R.EntityStart:return X.charCodeAt(J)===l.NUM?(this.state=R.NumericStart,this.consumed+=1,this.stateNumericStart(X,J+1)):(this.state=R.NamedEntity,this.stateNamedEntity(X,J));case R.NumericStart:return this.stateNumericStart(X,J);case R.NumericDecimal:return this.stateNumericDecimal(X,J);case R.NumericHex:return this.stateNumericHex(X,J);case R.NamedEntity:return this.stateNamedEntity(X,J)}},L.prototype.stateNumericStart=function(X,J){return J>=X.length?-1:(X.charCodeAt(J)|c)===l.LOWER_X?(this.state=R.NumericHex,this.consumed+=1,this.stateNumericHex(X,J+1)):(this.state=R.NumericDecimal,this.stateNumericDecimal(X,J))},L.prototype.addToNumericResult=function(X,J,ne,D){if(J!==ne){var z=ne-J;this.result=this.result*Math.pow(D,z)+parseInt(X.substr(J,z),D),this.consumed+=z}},L.prototype.stateNumericHex=function(X,J){for(var ne=J;J>14;J>14,z!==0){if(V===l.SEMI)return this.emitNamedEntityData(this.treeIndex,z,this.consumed+this.excess);this.decodeMode!==v.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1},L.prototype.emitNotTerminatedNamedEntity=function(){var X,J=this,ne=J.result,D=J.decodeTree,z=(D[ne]&f.VALUE_LENGTH)>>14;return this.emitNamedEntityData(ne,z,this.consumed),(X=this.errors)===null||X===void 0||X.missingSemicolonAfterCharacterReference(),this.consumed},L.prototype.emitNamedEntityData=function(X,J,ne){var D=this.decodeTree;return this.emitCodePoint(J===1?D[X]&~f.VALUE_LENGTH:D[X+1],ne),J===3&&this.emitCodePoint(D[X+2],ne),ne},L.prototype.end=function(){var X;switch(this.state){case R.NamedEntity:return this.result!==0&&(this.decodeMode!==v.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case R.NumericDecimal:return this.emitNumericEntity(0,2);case R.NumericHex:return this.emitNumericEntity(0,3);case R.NumericStart:return(X=this.errors)===null||X===void 0||X.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case R.EntityStart:return 0}},L}();e.EntityDecoder=b;function S(L){var X="",J=new b(L,function(ne){return X+=(0,o.fromCodePoint)(ne)});return function(D,z){for(var V=0,ae=0;(ae=D.indexOf("&",ae))>=0;){X+=D.slice(V,ae),J.startEntity(z);var Be=J.write(D,ae+1);if(Be<0){V=ae+J.end();break}V=ae+Be,ae=Be===0?V+1:V}var Le=X+D.slice(V);return X="",Le}}function O(L,X,J,ne){var D=(X&f.BRANCH_LENGTH)>>7,z=X&f.JUMP_TABLE;if(D===0)return z!==0&&ne===z?J:-1;if(z){var V=ne-z;return V<0||V>=D?-1:L[J+V]-1}for(var ae=J,Be=ae+D-1;ae<=Be;){var Le=ae+Be>>>1,Oe=L[Le];if(Oene)Be=Le-1;else return L[Le+D]}return-1}e.determineBranch=O;var C=S(s.default),P=S(i.default);function M(L,X){return X===void 0&&(X=v.Legacy),C(L,X)}e.decodeHTML=M;function w(L){return C(L,v.Attribute)}e.decodeHTMLAttribute=w;function G(L){return C(L,v.Strict)}e.decodeHTMLStrict=G;function B(L){return P(L,v.Strict)}e.decodeXML=B})(ai);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.QuoteType=void 0;var t=ai,n;(function(d){d[d.Tab=9]="Tab",d[d.NewLine=10]="NewLine",d[d.FormFeed=12]="FormFeed",d[d.CarriageReturn=13]="CarriageReturn",d[d.Space=32]="Space",d[d.ExclamationMark=33]="ExclamationMark",d[d.Number=35]="Number",d[d.Amp=38]="Amp",d[d.SingleQuote=39]="SingleQuote",d[d.DoubleQuote=34]="DoubleQuote",d[d.Dash=45]="Dash",d[d.Slash=47]="Slash",d[d.Zero=48]="Zero",d[d.Nine=57]="Nine",d[d.Semi=59]="Semi",d[d.Lt=60]="Lt",d[d.Eq=61]="Eq",d[d.Gt=62]="Gt",d[d.Questionmark=63]="Questionmark",d[d.UpperA=65]="UpperA",d[d.LowerA=97]="LowerA",d[d.UpperF=70]="UpperF",d[d.LowerF=102]="LowerF",d[d.UpperZ=90]="UpperZ",d[d.LowerZ=122]="LowerZ",d[d.LowerX=120]="LowerX",d[d.OpeningSquareBracket=91]="OpeningSquareBracket"})(n||(n={}));var r;(function(d){d[d.Text=1]="Text",d[d.BeforeTagName=2]="BeforeTagName",d[d.InTagName=3]="InTagName",d[d.InSelfClosingTag=4]="InSelfClosingTag",d[d.BeforeClosingTagName=5]="BeforeClosingTagName",d[d.InClosingTagName=6]="InClosingTagName",d[d.AfterClosingTagName=7]="AfterClosingTagName",d[d.BeforeAttributeName=8]="BeforeAttributeName",d[d.InAttributeName=9]="InAttributeName",d[d.AfterAttributeName=10]="AfterAttributeName",d[d.BeforeAttributeValue=11]="BeforeAttributeValue",d[d.InAttributeValueDq=12]="InAttributeValueDq",d[d.InAttributeValueSq=13]="InAttributeValueSq",d[d.InAttributeValueNq=14]="InAttributeValueNq",d[d.BeforeDeclaration=15]="BeforeDeclaration",d[d.InDeclaration=16]="InDeclaration",d[d.InProcessingInstruction=17]="InProcessingInstruction",d[d.BeforeComment=18]="BeforeComment",d[d.CDATASequence=19]="CDATASequence",d[d.InSpecialComment=20]="InSpecialComment",d[d.InCommentLike=21]="InCommentLike",d[d.BeforeSpecialS=22]="BeforeSpecialS",d[d.SpecialStartSequence=23]="SpecialStartSequence",d[d.InSpecialTag=24]="InSpecialTag",d[d.BeforeEntity=25]="BeforeEntity",d[d.BeforeNumericEntity=26]="BeforeNumericEntity",d[d.InNamedEntity=27]="InNamedEntity",d[d.InNumericEntity=28]="InNumericEntity",d[d.InHexEntity=29]="InHexEntity"})(r||(r={}));function a(d){return d===n.Space||d===n.NewLine||d===n.Tab||d===n.FormFeed||d===n.CarriageReturn}function s(d){return d===n.Slash||d===n.Gt||a(d)}function i(d){return d>=n.Zero&&d<=n.Nine}function o(d){return d>=n.LowerA&&d<=n.LowerZ||d>=n.UpperA&&d<=n.UpperZ}function u(d){return d>=n.UpperA&&d<=n.UpperF||d>=n.LowerA&&d<=n.LowerF}var l;(function(d){d[d.NoValue=0]="NoValue",d[d.Unquoted=1]="Unquoted",d[d.Single=2]="Single",d[d.Double=3]="Double"})(l=e.QuoteType||(e.QuoteType={}));var c={Cdata:new Uint8Array([67,68,65,84,65,91]),CdataEnd:new Uint8Array([93,93,62]),CommentEnd:new Uint8Array([45,45,62]),ScriptEnd:new Uint8Array([60,47,115,99,114,105,112,116]),StyleEnd:new Uint8Array([60,47,115,116,121,108,101]),TitleEnd:new Uint8Array([60,47,116,105,116,108,101])},f=function(){function d(m,E){var I=m.xmlMode,R=I===void 0?!1:I,v=m.decodeEntities,b=v===void 0?!0:v;this.cbs=E,this.state=r.Text,this.buffer="",this.sectionStart=0,this.index=0,this.baseState=r.Text,this.isSpecial=!1,this.running=!0,this.offset=0,this.currentSequence=void 0,this.sequenceIndex=0,this.trieIndex=0,this.trieCurrent=0,this.entityResult=0,this.entityExcess=0,this.xmlMode=R,this.decodeEntities=b,this.entityTrie=R?t.xmlDecodeTree:t.htmlDecodeTree}return d.prototype.reset=function(){this.state=r.Text,this.buffer="",this.sectionStart=0,this.index=0,this.baseState=r.Text,this.currentSequence=void 0,this.running=!0,this.offset=0},d.prototype.write=function(m){this.offset+=this.buffer.length,this.buffer=m,this.parse()},d.prototype.end=function(){this.running&&this.finish()},d.prototype.pause=function(){this.running=!1},d.prototype.resume=function(){this.running=!0,this.indexthis.sectionStart&&this.cbs.ontext(this.sectionStart,this.index),this.state=r.BeforeTagName,this.sectionStart=this.index):this.decodeEntities&&m===n.Amp&&(this.state=r.BeforeEntity)},d.prototype.stateSpecialStartSequence=function(m){var E=this.sequenceIndex===this.currentSequence.length,I=E?s(m):(m|32)===this.currentSequence[this.sequenceIndex];if(!I)this.isSpecial=!1;else if(!E){this.sequenceIndex++;return}this.sequenceIndex=0,this.state=r.InTagName,this.stateInTagName(m)},d.prototype.stateInSpecialTag=function(m){if(this.sequenceIndex===this.currentSequence.length){if(m===n.Gt||a(m)){var E=this.index-this.currentSequence.length;if(this.sectionStart>14)-1;if(!this.allowLegacyEntity()&&m!==n.Semi)this.trieIndex+=I;else{var R=this.index-this.entityExcess+1;R>this.sectionStart&&this.emitPartial(this.sectionStart,R),this.entityResult=this.trieIndex,this.trieIndex+=I,this.entityExcess=0,this.sectionStart=this.index+1,I===0&&this.emitNamedEntity()}}},d.prototype.emitNamedEntity=function(){if(this.state=this.baseState,this.entityResult!==0){var m=(this.entityTrie[this.entityResult]&t.BinTrieFlags.VALUE_LENGTH)>>14;switch(m){case 1:{this.emitCodePoint(this.entityTrie[this.entityResult]&~t.BinTrieFlags.VALUE_LENGTH);break}case 2:{this.emitCodePoint(this.entityTrie[this.entityResult+1]);break}case 3:this.emitCodePoint(this.entityTrie[this.entityResult+1]),this.emitCodePoint(this.entityTrie[this.entityResult+2])}}},d.prototype.stateBeforeNumericEntity=function(m){(m|32)===n.LowerX?(this.entityExcess++,this.state=r.InHexEntity):(this.state=r.InNumericEntity,this.stateInNumericEntity(m))},d.prototype.emitNumericEntity=function(m){var E=this.index-this.entityExcess-1,I=E+2+ +(this.state===r.InHexEntity);I!==this.index&&(E>this.sectionStart&&this.emitPartial(this.sectionStart,E),this.sectionStart=this.index+Number(m),this.emitCodePoint((0,t.replaceCodePoint)(this.entityResult))),this.state=this.baseState},d.prototype.stateInNumericEntity=function(m){m===n.Semi?this.emitNumericEntity(!0):i(m)?(this.entityResult=this.entityResult*10+(m-n.Zero),this.entityExcess++):(this.allowLegacyEntity()?this.emitNumericEntity(!1):this.state=this.baseState,this.index--)},d.prototype.stateInHexEntity=function(m){m===n.Semi?this.emitNumericEntity(!0):i(m)?(this.entityResult=this.entityResult*16+(m-n.Zero),this.entityExcess++):u(m)?(this.entityResult=this.entityResult*16+((m|32)-n.LowerA+10),this.entityExcess++):(this.allowLegacyEntity()?this.emitNumericEntity(!1):this.state=this.baseState,this.index--)},d.prototype.allowLegacyEntity=function(){return!this.xmlMode&&(this.baseState===r.Text||this.baseState===r.InSpecialTag)},d.prototype.cleanup=function(){this.running&&this.sectionStart!==this.index&&(this.state===r.Text||this.state===r.InSpecialTag&&this.sequenceIndex===0?(this.cbs.ontext(this.sectionStart,this.index),this.sectionStart=this.index):(this.state===r.InAttributeValueDq||this.state===r.InAttributeValueSq||this.state===r.InAttributeValueNq)&&(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=this.index))},d.prototype.shouldContinue=function(){return this.index0&&i.has(this.stack[this.stack.length-1]);){var o=this.stack.pop();(r=(n=this.cbs).onclosetag)===null||r===void 0||r.call(n,o,!0)}this.isVoidElement(t)||(this.stack.push(t),rE.has(t)?this.foreignContext.push(!0):aE.has(t)&&this.foreignContext.push(!1)),(s=(a=this.cbs).onopentagname)===null||s===void 0||s.call(a,t),this.cbs.onopentag&&(this.attribs={})},e.prototype.endOpenTag=function(t){var n,r;this.startIndex=this.openTagStart,this.attribs&&((r=(n=this.cbs).onopentag)===null||r===void 0||r.call(n,this.tagname,this.attribs,t),this.attribs=null),this.cbs.onclosetag&&this.isVoidElement(this.tagname)&&this.cbs.onclosetag(this.tagname,!0),this.tagname=""},e.prototype.onopentagend=function(t){this.endIndex=t,this.endOpenTag(!1),this.startIndex=t+1},e.prototype.onclosetag=function(t,n){var r,a,s,i,o,u;this.endIndex=n;var l=this.getSlice(t,n);if(this.lowerCaseTagNames&&(l=l.toLowerCase()),(rE.has(l)||aE.has(l))&&this.foreignContext.pop(),this.isVoidElement(l))!this.options.xmlMode&&l==="br"&&((a=(r=this.cbs).onopentagname)===null||a===void 0||a.call(r,"br"),(i=(s=this.cbs).onopentag)===null||i===void 0||i.call(s,"br",{},!0),(u=(o=this.cbs).onclosetag)===null||u===void 0||u.call(o,"br",!1));else{var c=this.stack.lastIndexOf(l);if(c!==-1)if(this.cbs.onclosetag)for(var f=this.stack.length-c;f--;)this.cbs.onclosetag(this.stack.pop(),f!==0);else this.stack.length=c;else!this.options.xmlMode&&l==="p"&&(this.emitOpenTag("p"),this.closeCurrentTag(!0))}this.startIndex=n+1},e.prototype.onselfclosingtag=function(t){this.endIndex=t,this.options.xmlMode||this.options.recognizeSelfClosing||this.foreignContext[this.foreignContext.length-1]?(this.closeCurrentTag(!1),this.startIndex=t+1):this.onopentagend(t)},e.prototype.closeCurrentTag=function(t){var n,r,a=this.tagname;this.endOpenTag(t),this.stack[this.stack.length-1]===a&&((r=(n=this.cbs).onclosetag)===null||r===void 0||r.call(n,a,!t),this.stack.pop())},e.prototype.onattribname=function(t,n){this.startIndex=t;var r=this.getSlice(t,n);this.attribname=this.lowerCaseAttributeNames?r.toLowerCase():r},e.prototype.onattribdata=function(t,n){this.attribvalue+=this.getSlice(t,n)},e.prototype.onattribentity=function(t){this.attribvalue+=(0,Jm.fromCodePoint)(t)},e.prototype.onattribend=function(t,n){var r,a;this.endIndex=n,(a=(r=this.cbs).onattribute)===null||a===void 0||a.call(r,this.attribname,this.attribvalue,t===qi.QuoteType.Double?'"':t===qi.QuoteType.Single?"'":t===qi.QuoteType.NoValue?void 0:null),this.attribs&&!Object.prototype.hasOwnProperty.call(this.attribs,this.attribname)&&(this.attribs[this.attribname]=this.attribvalue),this.attribvalue=""},e.prototype.getInstructionName=function(t){var n=t.search(hhe),r=n<0?t:t.substr(0,n);return this.lowerCaseTagNames&&(r=r.toLowerCase()),r},e.prototype.ondeclaration=function(t,n){this.endIndex=n;var r=this.getSlice(t,n);if(this.cbs.onprocessinginstruction){var a=this.getInstructionName(r);this.cbs.onprocessinginstruction("!".concat(a),"!".concat(r))}this.startIndex=n+1},e.prototype.onprocessinginstruction=function(t,n){this.endIndex=n;var r=this.getSlice(t,n);if(this.cbs.onprocessinginstruction){var a=this.getInstructionName(r);this.cbs.onprocessinginstruction("?".concat(a),"?".concat(r))}this.startIndex=n+1},e.prototype.oncomment=function(t,n,r){var a,s,i,o;this.endIndex=n,(s=(a=this.cbs).oncomment)===null||s===void 0||s.call(a,this.getSlice(t,n-r)),(o=(i=this.cbs).oncommentend)===null||o===void 0||o.call(i),this.startIndex=n+1},e.prototype.oncdata=function(t,n,r){var a,s,i,o,u,l,c,f,d,m;this.endIndex=n;var E=this.getSlice(t,n-r);this.options.xmlMode||this.options.recognizeCDATA?((s=(a=this.cbs).oncdatastart)===null||s===void 0||s.call(a),(o=(i=this.cbs).ontext)===null||o===void 0||o.call(i,E),(l=(u=this.cbs).oncdataend)===null||l===void 0||l.call(u)):((f=(c=this.cbs).oncomment)===null||f===void 0||f.call(c,"[CDATA[".concat(E,"]]")),(m=(d=this.cbs).oncommentend)===null||m===void 0||m.call(d)),this.startIndex=n+1},e.prototype.onend=function(){var t,n;if(this.cbs.onclosetag){this.endIndex=this.startIndex;for(var r=this.stack.length;r>0;this.cbs.onclosetag(this.stack[--r],!0));}(n=(t=this.cbs).onend)===null||n===void 0||n.call(t)},e.prototype.reset=function(){var t,n,r,a;(n=(t=this.cbs).onreset)===null||n===void 0||n.call(t),this.tokenizer.reset(),this.tagname="",this.attribname="",this.attribs=null,this.stack.length=0,this.startIndex=0,this.endIndex=0,(a=(r=this.cbs).onparserinit)===null||a===void 0||a.call(r,this),this.buffers.length=0,this.bufferOffset=0,this.writeIndex=0,this.ended=!1},e.prototype.parseComplete=function(t){this.reset(),this.end(t)},e.prototype.getSlice=function(t,n){for(;t-this.bufferOffset>=this.buffers[0].length;)this.shiftBuffer();for(var r=this.buffers[0].slice(t-this.bufferOffset,n-this.bufferOffset);n-this.bufferOffset>this.buffers[0].length;)this.shiftBuffer(),r+=this.buffers[0].slice(0,n-this.bufferOffset);return r},e.prototype.shiftBuffer=function(){this.bufferOffset+=this.buffers[0].length,this.writeIndex--,this.buffers.shift()},e.prototype.write=function(t){var n,r;if(this.ended){(r=(n=this.cbs).onerror)===null||r===void 0||r.call(n,new Error(".write() after done!"));return}this.buffers.push(t),this.tokenizer.running&&(this.tokenizer.write(t),this.writeIndex++)},e.prototype.end=function(t){var n,r;if(this.ended){(r=(n=this.cbs).onerror)===null||r===void 0||r.call(n,new Error(".end() after done!"));return}t&&this.write(t),this.ended=!0,this.tokenizer.end()},e.prototype.pause=function(){this.tokenizer.pause()},e.prototype.resume=function(){for(this.tokenizer.resume();this.tokenizer.running&&this.writeIndex0?this.children[this.children.length-1]:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"childNodes",{get:function(){return this.children},set:function(n){this.children=n},enumerable:!1,configurable:!0}),t}(Bf);Qe.NodeWithChildren=dc;var GT=function(e){qr(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=cn.ElementType.CDATA,n}return Object.defineProperty(t.prototype,"nodeType",{get:function(){return 4},enumerable:!1,configurable:!0}),t}(dc);Qe.CDATA=GT;var zT=function(e){qr(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=cn.ElementType.Root,n}return Object.defineProperty(t.prototype,"nodeType",{get:function(){return 9},enumerable:!1,configurable:!0}),t}(dc);Qe.Document=zT;var BT=function(e){qr(t,e);function t(n,r,a,s){a===void 0&&(a=[]),s===void 0&&(s=n==="script"?cn.ElementType.Script:n==="style"?cn.ElementType.Style:cn.ElementType.Tag);var i=e.call(this,a)||this;return i.name=n,i.attribs=r,i.type=s,i}return Object.defineProperty(t.prototype,"nodeType",{get:function(){return 1},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"tagName",{get:function(){return this.name},set:function(n){this.name=n},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"attributes",{get:function(){var n=this;return Object.keys(this.attribs).map(function(r){var a,s;return{name:r,value:n.attribs[r],namespace:(a=n["x-attribsNamespace"])===null||a===void 0?void 0:a[r],prefix:(s=n["x-attribsPrefix"])===null||s===void 0?void 0:s[r]}})},enumerable:!1,configurable:!0}),t}(dc);Qe.Element=BT;function HT(e){return(0,cn.isTag)(e)}Qe.isTag=HT;function VT(e){return e.type===cn.ElementType.CDATA}Qe.isCDATA=VT;function jT(e){return e.type===cn.ElementType.Text}Qe.isText=jT;function KT(e){return e.type===cn.ElementType.Comment}Qe.isComment=KT;function YT(e){return e.type===cn.ElementType.Directive}Qe.isDirective=YT;function qT(e){return e.type===cn.ElementType.Root}Qe.isDocument=qT;function The(e){return Object.prototype.hasOwnProperty.call(e,"children")}Qe.hasChildren=The;function Hf(e,t){t===void 0&&(t=!1);var n;if(jT(e))n=new xT(e.data);else if(KT(e))n=new FT(e.data);else if(HT(e)){var r=t?el(e.children):[],a=new BT(e.name,Gs({},e.attribs),r);r.forEach(function(u){return u.parent=a}),e.namespace!=null&&(a.namespace=e.namespace),e["x-attribsNamespace"]&&(a["x-attribsNamespace"]=Gs({},e["x-attribsNamespace"])),e["x-attribsPrefix"]&&(a["x-attribsPrefix"]=Gs({},e["x-attribsPrefix"])),n=a}else if(VT(e)){var r=t?el(e.children):[],s=new GT(r);r.forEach(function(l){return l.parent=s}),n=s}else if(qT(e)){var r=t?el(e.children):[],i=new zT(r);r.forEach(function(l){return l.parent=i}),e["x-mode"]&&(i["x-mode"]=e["x-mode"]),n=i}else if(YT(e)){var o=new WT(e.name,e.data);e["x-name"]!=null&&(o["x-name"]=e["x-name"],o["x-publicId"]=e["x-publicId"],o["x-systemId"]=e["x-systemId"]),n=o}else throw new Error("Not implemented yet: ".concat(e.type));return n.startIndex=e.startIndex,n.endIndex=e.endIndex,e.sourceCodeLocation!=null&&(n.sourceCodeLocation=e.sourceCodeLocation),n}Qe.cloneNode=Hf;function el(e){for(var t=e.map(function(r){return Hf(r,!0)}),n=1;n$\x80-\uFFFF]/g;var t=new Map([[34,"""],[38,"&"],[39,"'"],[60,"<"],[62,">"]]);e.getCodePoint=String.prototype.codePointAt!=null?function(a,s){return a.codePointAt(s)}:function(a,s){return(a.charCodeAt(s)&64512)===55296?(a.charCodeAt(s)-55296)*1024+a.charCodeAt(s+1)-56320+65536:a.charCodeAt(s)};function n(a){for(var s="",i=0,o;(o=e.xmlReplacer.exec(a))!==null;){var u=o.index,l=a.charCodeAt(u),c=t.get(l);c!==void 0?(s+=a.substring(i,u)+c,i=u+1):(s+="".concat(a.substring(i,u),"&#x").concat((0,e.getCodePoint)(a,u).toString(16),";"),i=e.xmlReplacer.lastIndex+=+((l&64512)===55296))}return s+a.substr(i)}e.encodeXML=n,e.escape=n;function r(a,s){return function(o){for(var u,l=0,c="";u=a.exec(o);)l!==u.index&&(c+=o.substring(l,u.index)),c+=s.get(u[0].charCodeAt(0)),l=u.index+1;return c+o.substring(l)}}e.escapeUTF8=r(/[&<>'"]/g,t),e.escapeAttribute=r(/["&\u00A0]/g,new Map([[34,"""],[38,"&"],[160," "]])),e.escapeText=r(/[&<>\u00A0]/g,new Map([[38,"&"],[60,"<"],[62,">"],[160," "]]))})(bu);var ghe=we&&we.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(la,"__esModule",{value:!0});la.encodeNonAsciiHTML=la.encodeHTML=void 0;var Ahe=ghe(Vf),ZT=bu,She=/[\t\n!-,./:-@[-`\f{-}$\x80-\uFFFF]/g;function Ohe(e){return QT(She,e)}la.encodeHTML=Ohe;function Ihe(e){return QT(ZT.xmlReplacer,e)}la.encodeNonAsciiHTML=Ihe;function QT(e,t){for(var n="",r=0,a;(a=e.exec(t))!==null;){var s=a.index;n+=t.substring(r,s);var i=t.charCodeAt(s),o=Ahe.default.get(i);if(typeof o=="object"){if(s+10&&(r+=fc(e.children,t)),(t.xmlMode||!sE.has(e.name))&&(r+=""))),r}function $he(e){return"<".concat(e.data,">")}function khe(e,t){var n,r=e.data||"";return((n=t.encodeEntities)!==null&&n!==void 0?n:t.decodeEntities)!==!1&&!(!t.xmlMode&&e.parent&&Nhe.has(e.parent.name))&&(r=t.xmlMode||t.encodeEntities!=="utf8"?(0,Nu.encodeXML)(r):(0,Nu.escapeText)(r)),r}function Uhe(e){return"")}function Mhe(e){return"")}var xhe=we&&we.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(hn,"__esModule",{value:!0});hn.innerText=hn.textContent=hn.getText=hn.getInnerHTML=hn.getOuterHTML=void 0;var Yn=fr,Fhe=xhe(Ni),Whe=fs;function eg(e,t){return(0,Fhe.default)(e,t)}hn.getOuterHTML=eg;function Ghe(e,t){return(0,Yn.hasChildren)(e)?e.children.map(function(n){return eg(n,t)}).join(""):""}hn.getInnerHTML=Ghe;function Co(e){return Array.isArray(e)?e.map(Co).join(""):(0,Yn.isTag)(e)?e.name==="br"?` +`:Co(e.children):(0,Yn.isCDATA)(e)?Co(e.children):(0,Yn.isText)(e)?e.data:""}hn.getText=Co;function dd(e){return Array.isArray(e)?e.map(dd).join(""):(0,Yn.hasChildren)(e)&&!(0,Yn.isComment)(e)?dd(e.children):(0,Yn.isText)(e)?e.data:""}hn.textContent=dd;function fd(e){return Array.isArray(e)?e.map(fd).join(""):(0,Yn.hasChildren)(e)&&(e.type===Whe.ElementType.Tag||(0,Yn.isCDATA)(e))?fd(e.children):(0,Yn.isText)(e)?e.data:""}hn.innerText=fd;var Ut={};Object.defineProperty(Ut,"__esModule",{value:!0});Ut.prevElementSibling=Ut.nextElementSibling=Ut.getName=Ut.hasAttrib=Ut.getAttributeValue=Ut.getSiblings=Ut.getParent=Ut.getChildren=void 0;var jf=fr;function tg(e){return(0,jf.hasChildren)(e)?e.children:[]}Ut.getChildren=tg;function ng(e){return e.parent||null}Ut.getParent=ng;function zhe(e){var t,n,r=ng(e);if(r!=null)return tg(r);for(var a=[e],s=e.prev,i=e.next;s!=null;)a.unshift(s),t=s,s=t.prev;for(;i!=null;)a.push(i),n=i,i=n.next;return a}Ut.getSiblings=zhe;function Bhe(e,t){var n;return(n=e.attribs)===null||n===void 0?void 0:n[t]}Ut.getAttributeValue=Bhe;function Hhe(e,t){return e.attribs!=null&&Object.prototype.hasOwnProperty.call(e.attribs,t)&&e.attribs[t]!=null}Ut.hasAttrib=Hhe;function Vhe(e){return e.name}Ut.getName=Vhe;function jhe(e){for(var t,n=e.next;n!==null&&!(0,jf.isTag)(n);)t=n,n=t.next;return n}Ut.nextElementSibling=jhe;function Khe(e){for(var t,n=e.prev;n!==null&&!(0,jf.isTag)(n);)t=n,n=t.prev;return n}Ut.prevElementSibling=Khe;var un={};Object.defineProperty(un,"__esModule",{value:!0});un.prepend=un.prependChild=un.append=un.appendChild=un.replaceElement=un.removeElement=void 0;function Ci(e){if(e.prev&&(e.prev.next=e.next),e.next&&(e.next.prev=e.prev),e.parent){var t=e.parent.children,n=t.lastIndexOf(e);n>=0&&t.splice(n,1)}e.next=null,e.prev=null,e.parent=null}un.removeElement=Ci;function Yhe(e,t){var n=t.prev=e.prev;n&&(n.next=t);var r=t.next=e.next;r&&(r.prev=t);var a=t.parent=e.parent;if(a){var s=a.children;s[s.lastIndexOf(e)]=t,e.parent=null}}un.replaceElement=Yhe;function qhe(e,t){if(Ci(t),t.next=null,t.parent=e,e.children.push(t)>1){var n=e.children[e.children.length-2];n.next=t,t.prev=n}else t.prev=null}un.appendChild=qhe;function Xhe(e,t){Ci(t);var n=e.parent,r=e.next;if(t.next=r,t.prev=e,e.next=t,t.parent=n,r){if(r.prev=t,n){var a=n.children;a.splice(a.lastIndexOf(r),0,t)}}else n&&n.children.push(t)}un.append=Xhe;function Zhe(e,t){if(Ci(t),t.parent=e,t.prev=null,e.children.unshift(t)!==1){var n=e.children[1];n.prev=t,t.next=n}else t.next=null}un.prependChild=Zhe;function Qhe(e,t){Ci(t);var n=e.parent;if(n){var r=n.children;r.splice(r.indexOf(e),0,t)}e.prev&&(e.prev.next=t),t.parent=n,t.prev=e.prev,t.next=e,e.prev=t}un.prepend=Qhe;var Jt={};Object.defineProperty(Jt,"__esModule",{value:!0});Jt.findAll=Jt.existsOne=Jt.findOne=Jt.findOneChild=Jt.find=Jt.filter=void 0;var pc=fr;function Jhe(e,t,n,r){return n===void 0&&(n=!0),r===void 0&&(r=1/0),rg(e,Array.isArray(t)?t:[t],n,r)}Jt.filter=Jhe;function rg(e,t,n,r){for(var a=[],s=[t],i=[0];;){if(i[0]>=s[0].length){if(i.length===1)return a;s.shift(),i.shift();continue}var o=s[0][i[0]++];if(e(o)&&(a.push(o),--r<=0))return a;n&&(0,pc.hasChildren)(o)&&o.children.length>0&&(i.unshift(0),s.unshift(o.children))}}Jt.find=rg;function e_e(e,t){return t.find(e)}Jt.findOneChild=e_e;function ag(e,t,n){n===void 0&&(n=!0);for(var r=null,a=0;a0&&(r=ag(e,s.children,!0));else continue}return r}Jt.findOne=ag;function sg(e,t){return t.some(function(n){return(0,pc.isTag)(n)&&(e(n)||sg(e,n.children))})}Jt.existsOne=sg;function t_e(e,t){for(var n=[],r=[t],a=[0];;){if(a[0]>=r[0].length){if(r.length===1)return n;r.shift(),a.shift();continue}var s=r[0][a[0]++];(0,pc.isTag)(s)&&(e(s)&&n.push(s),s.children.length>0&&(a.unshift(0),r.unshift(s.children)))}}Jt.findAll=t_e;var _n={};Object.defineProperty(_n,"__esModule",{value:!0});_n.getElementsByTagType=_n.getElementsByTagName=_n.getElementById=_n.getElements=_n.testElement=void 0;var ra=fr,mc=Jt,Cu={tag_name:function(e){return typeof e=="function"?function(t){return(0,ra.isTag)(t)&&e(t.name)}:e==="*"?ra.isTag:function(t){return(0,ra.isTag)(t)&&t.name===e}},tag_type:function(e){return typeof e=="function"?function(t){return e(t.type)}:function(t){return t.type===e}},tag_contains:function(e){return typeof e=="function"?function(t){return(0,ra.isText)(t)&&e(t.data)}:function(t){return(0,ra.isText)(t)&&t.data===e}}};function ig(e,t){return typeof t=="function"?function(n){return(0,ra.isTag)(n)&&t(n.attribs[e])}:function(n){return(0,ra.isTag)(n)&&n.attribs[e]===t}}function n_e(e,t){return function(n){return e(n)||t(n)}}function og(e){var t=Object.keys(e).map(function(n){var r=e[n];return Object.prototype.hasOwnProperty.call(Cu,n)?Cu[n](r):ig(n,r)});return t.length===0?null:t.reduce(n_e)}function r_e(e,t){var n=og(e);return n?n(t):!0}_n.testElement=r_e;function a_e(e,t,n,r){r===void 0&&(r=1/0);var a=og(e);return a?(0,mc.filter)(a,t,n,r):[]}_n.getElements=a_e;function s_e(e,t,n){return n===void 0&&(n=!0),Array.isArray(t)||(t=[t]),(0,mc.findOne)(ig("id",e),t,n)}_n.getElementById=s_e;function i_e(e,t,n,r){return n===void 0&&(n=!0),r===void 0&&(r=1/0),(0,mc.filter)(Cu.tag_name(e),t,n,r)}_n.getElementsByTagName=i_e;function o_e(e,t,n,r){return n===void 0&&(n=!0),r===void 0&&(r=1/0),(0,mc.filter)(Cu.tag_type(e),t,n,r)}_n.getElementsByTagType=o_e;var ug={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.uniqueSort=e.compareDocumentPosition=e.DocumentPosition=e.removeSubsets=void 0;var t=fr;function n(i){for(var o=i.length;--o>=0;){var u=i[o];if(o>0&&i.lastIndexOf(u,o-1)>=0){i.splice(o,1);continue}for(var l=u.parent;l;l=l.parent)if(i.includes(l)){i.splice(o,1);break}}return i}e.removeSubsets=n;var r;(function(i){i[i.DISCONNECTED=1]="DISCONNECTED",i[i.PRECEDING=2]="PRECEDING",i[i.FOLLOWING=4]="FOLLOWING",i[i.CONTAINS=8]="CONTAINS",i[i.CONTAINED_BY=16]="CONTAINED_BY"})(r=e.DocumentPosition||(e.DocumentPosition={}));function a(i,o){var u=[],l=[];if(i===o)return 0;for(var c=(0,t.hasChildren)(i)?i:i.parent;c;)u.unshift(c),c=c.parent;for(c=(0,t.hasChildren)(o)?o:o.parent;c;)l.unshift(c),c=c.parent;for(var f=Math.min(u.length,l.length),d=0;dE.indexOf(R)?m===o?r.FOLLOWING|r.CONTAINED_BY:r.FOLLOWING:m===i?r.PRECEDING|r.CONTAINS:r.PRECEDING}e.compareDocumentPosition=a;function s(i){return i=i.filter(function(o,u,l){return!l.includes(o,u+1)}),i.sort(function(o,u){var l=a(o,u);return l&r.PRECEDING?-1:l&r.FOLLOWING?1:0}),i}e.uniqueSort=s})(ug);var Ec={};Object.defineProperty(Ec,"__esModule",{value:!0});Ec.getFeed=void 0;var u_e=hn,yi=_n;function c_e(e){var t=yu(m_e,e);return t?t.name==="feed"?l_e(t):d_e(t):null}Ec.getFeed=c_e;function l_e(e){var t,n=e.children,r={type:"atom",items:(0,yi.getElementsByTagName)("entry",n).map(function(i){var o,u=i.children,l={media:cg(u)};sn(l,"id","id",u),sn(l,"title","title",u);var c=(o=yu("link",u))===null||o===void 0?void 0:o.attribs.href;c&&(l.link=c);var f=$r("summary",u)||$r("content",u);f&&(l.description=f);var d=$r("updated",u);return d&&(l.pubDate=new Date(d)),l})};sn(r,"id","id",n),sn(r,"title","title",n);var a=(t=yu("link",n))===null||t===void 0?void 0:t.attribs.href;a&&(r.link=a),sn(r,"description","subtitle",n);var s=$r("updated",n);return s&&(r.updated=new Date(s)),sn(r,"author","email",n,!0),r}function d_e(e){var t,n,r=(n=(t=yu("channel",e.children))===null||t===void 0?void 0:t.children)!==null&&n!==void 0?n:[],a={type:e.name.substr(0,3),id:"",items:(0,yi.getElementsByTagName)("item",e.children).map(function(i){var o=i.children,u={media:cg(o)};sn(u,"id","guid",o),sn(u,"title","title",o),sn(u,"link","link",o),sn(u,"description","description",o);var l=$r("pubDate",o)||$r("dc:date",o);return l&&(u.pubDate=new Date(l)),u})};sn(a,"title","title",r),sn(a,"link","link",r),sn(a,"description","description",r);var s=$r("lastBuildDate",r);return s&&(a.updated=new Date(s)),sn(a,"author","managingEditor",r,!0),a}var f_e=["url","type","lang"],p_e=["fileSize","bitrate","framerate","samplingrate","channels","duration","height","width"];function cg(e){return(0,yi.getElementsByTagName)("media:content",e).map(function(t){for(var n=t.attribs,r={medium:n.medium,isDefault:!!n.isDefault},a=0,s=f_e;a{if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")},Kf={};Object.defineProperty(Kf,"__esModule",{value:!0});/*! * is-plain-object * * Copyright (c) 2014-2017, Jon Schlinkert. * Released under the MIT License. */function iE(e){return Object.prototype.toString.call(e)==="[object Object]"}function h_e(e){var t,n;return iE(e)===!1?!1:(t=e.constructor,t===void 0?!0:(n=t.prototype,!(iE(n)===!1||n.hasOwnProperty("isPrototypeOf")===!1)))}Kf.isPlainObject=h_e;var __e=function(t){return T_e(t)&&!g_e(t)};function T_e(e){return!!e&&typeof e=="object"}function g_e(e){var t=Object.prototype.toString.call(e);return t==="[object RegExp]"||t==="[object Date]"||O_e(e)}var A_e=typeof Symbol=="function"&&Symbol.for,S_e=A_e?Symbol.for("react.element"):60103;function O_e(e){return e.$$typeof===S_e}function I_e(e){return Array.isArray(e)?[]:{}}function si(e,t){return t.clone!==!1&&t.isMergeableObject(e)?ns(I_e(e),e,t):e}function v_e(e,t,n){return e.concat(t).map(function(r){return si(r,n)})}function R_e(e,t){if(!t.customMerge)return ns;var n=t.customMerge(e);return typeof n=="function"?n:ns}function b_e(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter(function(t){return Object.propertyIsEnumerable.call(e,t)}):[]}function oE(e){return Object.keys(e).concat(b_e(e))}function lg(e,t){try{return t in e}catch{return!1}}function N_e(e,t){return lg(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))}function C_e(e,t,n){var r={};return n.isMergeableObject(e)&&oE(e).forEach(function(a){r[a]=si(e[a],n)}),oE(t).forEach(function(a){N_e(e,a)||(lg(e,a)&&n.isMergeableObject(t[a])?r[a]=R_e(a,n)(e[a],t[a],n):r[a]=si(t[a],n))}),r}function ns(e,t,n){n=n||{},n.arrayMerge=n.arrayMerge||v_e,n.isMergeableObject=n.isMergeableObject||__e,n.cloneUnlessOtherwiseSpecified=si;var r=Array.isArray(t),a=Array.isArray(e),s=r===a;return s?r?n.arrayMerge(e,t,n):C_e(e,t,n):si(t,n)}ns.all=function(t,n){if(!Array.isArray(t))throw new Error("first argument should be an array");return t.reduce(function(r,a){return ns(r,a,n)},{})};var y_e=ns,D_e=y_e,dg={exports:{}};(function(e){(function(t,n){e.exports?e.exports=n():t.parseSrcset=n()})(we,function(){return function(t){function n(O){return O===" "||O===" "||O===` -`||O==="\f"||O==="\r"}function r(O){var C,P=O.exec(t.substring(R));if(P)return C=P[0],R+=C.length,C}for(var a=t.length,s=/^[ \t\n\r\u000c]+/,i=/^[, \t\n\r\u000c]+/,o=/^[^ \t\n\r\u000c]+/,u=/[,]+$/,l=/^\d+$/,c=/^-?(?:[0-9]+|[0-9]*\.[0-9]+)(?:[eE][+-]?[0-9]+)?$/,f,d,m,E,v,R=0,I=[];;){if(r(i),R>=a)return I;f=r(o),d=[],f.slice(-1)===","?(f=f.replace(u,""),S()):b()}function b(){for(r(s),m="",E="in descriptor";;){if(v=t.charAt(R),E==="in descriptor")if(n(v))m&&(d.push(m),m="",E="after descriptor");else if(v===","){R+=1,m&&d.push(m),S();return}else if(v==="(")m=m+v,E="in parens";else if(v===""){m&&d.push(m),S();return}else m=m+v;else if(E==="in parens")if(v===")")m=m+v,E="in descriptor";else if(v===""){d.push(m),S();return}else m=m+v;else if(E==="after descriptor"&&!n(v))if(v===""){S();return}else E="in descriptor",R-=1;R+=1}}function S(){var O=!1,C,P,M,w,G={},B,L,X,J,ne;for(w=0;w",typeof this.line<"u"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(t){if(!this.source)return"";let n=this.source;t==null&&(t=uE.isColorSupported),cE&&t&&(n=cE(n));let r=n.split(/\r?\n/),a=Math.max(this.line-3,0),s=Math.min(this.line+2,r.length),i=String(s).length,o,u;if(t){let{bold:l,gray:c,red:f}=uE.createColors(!0);o=d=>l(f(d)),u=d=>c(d)}else o=u=l=>l;return r.slice(a,s).map((l,c)=>{let f=a+1+c,d=" "+(" "+f).slice(-i)+" | ";if(f===this.line){let m=u(d.replace(/\d/g," "))+l.slice(0,this.column-1).replace(/[^\t]/g," ");return o(">")+u(d)+l+` +`||O==="\f"||O==="\r"}function r(O){var C,P=O.exec(t.substring(R));if(P)return C=P[0],R+=C.length,C}for(var a=t.length,s=/^[ \t\n\r\u000c]+/,i=/^[, \t\n\r\u000c]+/,o=/^[^ \t\n\r\u000c]+/,u=/[,]+$/,l=/^\d+$/,c=/^-?(?:[0-9]+|[0-9]*\.[0-9]+)(?:[eE][+-]?[0-9]+)?$/,f,d,m,E,I,R=0,v=[];;){if(r(i),R>=a)return v;f=r(o),d=[],f.slice(-1)===","?(f=f.replace(u,""),S()):b()}function b(){for(r(s),m="",E="in descriptor";;){if(I=t.charAt(R),E==="in descriptor")if(n(I))m&&(d.push(m),m="",E="after descriptor");else if(I===","){R+=1,m&&d.push(m),S();return}else if(I==="(")m=m+I,E="in parens";else if(I===""){m&&d.push(m),S();return}else m=m+I;else if(E==="in parens")if(I===")")m=m+I,E="in descriptor";else if(I===""){d.push(m),S();return}else m=m+I;else if(E==="after descriptor"&&!n(I))if(I===""){S();return}else E="in descriptor",R-=1;R+=1}}function S(){var O=!1,C,P,M,w,G={},B,L,X,J,ne;for(w=0;w",typeof this.line<"u"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(t){if(!this.source)return"";let n=this.source;t==null&&(t=uE.isColorSupported),cE&&t&&(n=cE(n));let r=n.split(/\r?\n/),a=Math.max(this.line-3,0),s=Math.min(this.line+2,r.length),i=String(s).length,o,u;if(t){let{bold:l,gray:c,red:f}=uE.createColors(!0);o=d=>l(f(d)),u=d=>c(d)}else o=u=l=>l;return r.slice(a,s).map((l,c)=>{let f=a+1+c,d=" "+(" "+f).slice(-i)+" | ";if(f===this.line){let m=u(d.replace(/\d/g," "))+l.slice(0,this.column-1).replace(/[^\t]/g," ");return o(">")+u(d)+l+` `+m+o("^")}return" "+u(d)+l}).join(` `)}toString(){let t=this.showSourceCode();return t&&(t=` @@ -396,18 +396,18 @@ Wymagania prawne mogę być inne, jeśli ten serwer znajduje się w innej jurysd `;this.css.includes(`\r `)&&(n=`\r `),this.css+=n+"/*# sourceMappingURL="+t+" */"}applyPrevMaps(){for(let t of this.previous()){let n=this.toUrl(this.path(t.file)),r=t.root||Do(t.file),a;this.mapOpts.sourcesContent===!1?(a=new hg(t.text),a.sourcesContent&&(a.sourcesContent=a.sourcesContent.map(()=>null))):a=t.consumer(),this.map.applySourceMap(a,n,this.toUrl(this.path(r)))}}clearAnnotation(){if(this.mapOpts.annotation!==!1)if(this.root){let t;for(let n=this.root.nodes.length-1;n>=0;n--)t=this.root.nodes[n],t.type==="comment"&&t.text.indexOf("# sourceMappingURL=")===0&&this.root.removeChild(n)}else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),r1e&&n1e&&this.isMap())return this.generateMap();{let t="";return this.stringify(this.root,n=>{t+=n}),[t]}}generateMap(){if(this.root)this.generateString();else if(this.previous().length===1){let t=this.previous()[0].consumer();t.file=this.outputFile(),this.map=yo.fromSourceMap(t)}else this.map=new yo({file:this.outputFile()}),this.map.addMapping({generated:{column:0,line:1},original:{column:0,line:1},source:this.opts.from?this.toUrl(this.path(this.opts.from)):""});return this.isSourcesContent()&&this.setSourcesContent(),this.root&&this.previous().length>0&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]}generateString(){this.css="",this.map=new yo({file:this.outputFile()});let t=1,n=1,r="",a={generated:{column:0,line:0},original:{column:0,line:0},source:""},s,i;this.stringify(this.root,(o,u,l)=>{if(this.css+=o,u&&l!=="end"&&(a.generated.line=t,a.generated.column=n-1,u.source&&u.source.start?(a.source=this.sourcePath(u),a.original.line=u.source.start.line,a.original.column=u.source.start.column-1,this.map.addMapping(a)):(a.source=r,a.original.line=1,a.original.column=0,this.map.addMapping(a))),s=o.match(/\n/g),s?(t+=s.length,i=o.lastIndexOf(` -`),n=o.length-i):n+=o.length,u&&l!=="start"){let c=u.parent||{raws:{}};(!(u.type==="decl"||u.type==="atrule"&&!u.nodes)||u!==c.last||c.raws.semicolon)&&(u.source&&u.source.end?(a.source=this.sourcePath(u),a.original.line=u.source.end.line,a.original.column=u.source.end.column-1,a.generated.line=t,a.generated.column=n-2,this.map.addMapping(a)):(a.source=r,a.original.line=1,a.original.column=0,a.generated.line=t,a.generated.column=n-1,this.map.addMapping(a)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation<"u"?this.mapOpts.annotation:this.previous().length?this.previous().some(t=>t.annotation):!0}isInline(){if(typeof this.mapOpts.inline<"u")return this.mapOpts.inline;let t=this.mapOpts.annotation;return typeof t<"u"&&t!==!0?!1:this.previous().length?this.previous().some(n=>n.inline):!0}isMap(){return typeof this.opts.map<"u"?!!this.opts.map:this.previous().length>0}isSourcesContent(){return typeof this.mapOpts.sourcesContent<"u"?this.mapOpts.sourcesContent:this.previous().length?this.previous().some(t=>t.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(t){if(this.mapOpts.absolute||t.charCodeAt(0)===60||/^\w+:\/\//.test(t))return t;let n=this.memoizedPaths.get(t);if(n)return n;let r=this.opts.to?Do(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(r=Do(Tg(r,this.mapOpts.annotation)));let a=_g(r,t);return this.memoizedPaths.set(t,a),a}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(t=>{if(t.source&&t.source.input.map){let n=t.source.input.map;this.previousMaps.includes(n)||this.previousMaps.push(n)}});else{let t=new t1e(this.originalCSS,this.opts);t.map&&this.previousMaps.push(t.map)}return this.previousMaps}setSourcesContent(){let t={};if(this.root)this.root.walk(n=>{if(n.source){let r=n.source.input.from;if(r&&!t[r]){t[r]=!0;let a=this.usesFileUrls?this.toFileUrl(r):this.toUrl(this.path(r));this.map.setSourceContent(a,n.source.input.css)}}});else if(this.css){let n=this.opts.from?this.toUrl(this.path(this.opts.from)):"";this.map.setSourceContent(n,this.css)}}sourcePath(t){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(t.source.input.from):this.toUrl(this.path(t.source.input.from))}toBase64(t){return Buffer?Buffer.from(t).toString("base64"):window.btoa(unescape(encodeURIComponent(t)))}toFileUrl(t){let n=this.memoizedFileURLs.get(t);if(n)return n;if(hE){let r=hE(t).toString();return this.memoizedFileURLs.set(t,r),r}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(t){let n=this.memoizedURLs.get(t);if(n)return n;gg==="\\"&&(t=t.replace(/\\/g,"/"));let r=encodeURI(t).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(t,r),r}};var Ag=a1e;let s1e=_c,Od=class extends s1e{constructor(t){super(t),this.type="comment"}};var Ac=Od;Od.default=Od;let{isClean:Sg,my:Og}=Di,Ig=Tc,vg=Ac,i1e=_c,Rg,Xf,Zf,bg;function Ng(e){return e.map(t=>(t.nodes&&(t.nodes=Ng(t.nodes)),delete t.source,t))}function Cg(e){if(e[Sg]=!1,e.proxyOf.nodes)for(let t of e.proxyOf.nodes)Cg(t)}let pr=class yg extends i1e{append(...t){for(let n of t){let r=this.normalize(n,this.last);for(let a of r)this.proxyOf.nodes.push(a)}return this.markDirty(),this}cleanRaws(t){if(super.cleanRaws(t),this.nodes)for(let n of this.nodes)n.cleanRaws(t)}each(t){if(!this.proxyOf.nodes)return;let n=this.getIterator(),r,a;for(;this.indexes[n]t[n](...r.map(a=>typeof a=="function"?(s,i)=>a(s.toProxy(),i):a)):n==="every"||n==="some"?r=>t[n]((a,...s)=>r(a.toProxy(),...s)):n==="root"?()=>t.root().toProxy():n==="nodes"?t.nodes.map(r=>r.toProxy()):n==="first"||n==="last"?t[n].toProxy():t[n]:t[n]},set(t,n,r){return t[n]===r||(t[n]=r,(n==="name"||n==="params"||n==="selector")&&t.markDirty()),!0}}}index(t){return typeof t=="number"?t:(t.proxyOf&&(t=t.proxyOf),this.proxyOf.nodes.indexOf(t))}insertAfter(t,n){let r=this.index(t),a=this.normalize(n,this.proxyOf.nodes[r]).reverse();r=this.index(t);for(let i of a)this.proxyOf.nodes.splice(r+1,0,i);let s;for(let i in this.indexes)s=this.indexes[i],r"u")throw new Error("Value field is missed in node creation");typeof t.value!="string"&&(t.value=String(t.value)),t=[new Ig(t)]}else if(t.selector)t=[new Xf(t)];else if(t.name)t=[new Zf(t)];else if(t.text)t=[new vg(t)];else throw new Error("Unknown node type in node creation");return t.map(a=>(a[Og]||yg.rebuild(a),a=a.proxyOf,a.parent&&a.parent.removeChild(a),a[Sg]&&Cg(a),typeof a.raws.before>"u"&&n&&typeof n.raws.before<"u"&&(a.raws.before=n.raws.before.replace(/\S/g,"")),a.parent=this.proxyOf,a))}prepend(...t){t=t.reverse();for(let n of t){let r=this.normalize(n,this.first,"prepend").reverse();for(let a of r)this.proxyOf.nodes.unshift(a);for(let a in this.indexes)this.indexes[a]=this.indexes[a]+r.length}return this.markDirty(),this}push(t){return t.parent=this,this.proxyOf.nodes.push(t),this}removeAll(){for(let t of this.proxyOf.nodes)t.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(t){t=this.index(t),this.proxyOf.nodes[t].parent=void 0,this.proxyOf.nodes.splice(t,1);let n;for(let r in this.indexes)n=this.indexes[r],n>=t&&(this.indexes[r]=n-1);return this.markDirty(),this}replaceValues(t,n,r){return r||(r=n,n={}),this.walkDecls(a=>{n.props&&!n.props.includes(a.prop)||n.fast&&!a.value.includes(n.fast)||(a.value=a.value.replace(t,r))}),this.markDirty(),this}some(t){return this.nodes.some(t)}walk(t){return this.each((n,r)=>{let a;try{a=t(n,r)}catch(s){throw n.addToError(s)}return a!==!1&&n.walk&&(a=n.walk(t)),a})}walkAtRules(t,n){return n?t instanceof RegExp?this.walk((r,a)=>{if(r.type==="atrule"&&t.test(r.name))return n(r,a)}):this.walk((r,a)=>{if(r.type==="atrule"&&r.name===t)return n(r,a)}):(n=t,this.walk((r,a)=>{if(r.type==="atrule")return n(r,a)}))}walkComments(t){return this.walk((n,r)=>{if(n.type==="comment")return t(n,r)})}walkDecls(t,n){return n?t instanceof RegExp?this.walk((r,a)=>{if(r.type==="decl"&&t.test(r.prop))return n(r,a)}):this.walk((r,a)=>{if(r.type==="decl"&&r.prop===t)return n(r,a)}):(n=t,this.walk((r,a)=>{if(r.type==="decl")return n(r,a)}))}walkRules(t,n){return n?t instanceof RegExp?this.walk((r,a)=>{if(r.type==="rule"&&t.test(r.selector))return n(r,a)}):this.walk((r,a)=>{if(r.type==="rule"&&r.selector===t)return n(r,a)}):(n=t,this.walk((r,a)=>{if(r.type==="rule")return n(r,a)}))}get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}};pr.registerParse=e=>{Rg=e};pr.registerRule=e=>{Xf=e};pr.registerAtRule=e=>{Zf=e};pr.registerRoot=e=>{bg=e};var Ta=pr;pr.default=pr;pr.rebuild=e=>{e.type==="atrule"?Object.setPrototypeOf(e,Zf.prototype):e.type==="rule"?Object.setPrototypeOf(e,Xf.prototype):e.type==="decl"?Object.setPrototypeOf(e,Ig.prototype):e.type==="comment"?Object.setPrototypeOf(e,vg.prototype):e.type==="root"&&Object.setPrototypeOf(e,bg.prototype),e[Og]=!0,e.nodes&&e.nodes.forEach(t=>{pr.rebuild(t)})};let o1e=Ta,Dg,Pg,ii=class extends o1e{constructor(t){super({type:"document",...t}),this.nodes||(this.nodes=[])}toResult(t={}){return new Dg(new Pg,this,t).stringify()}};ii.registerLazyResult=e=>{Dg=e};ii.registerProcessor=e=>{Pg=e};var Qf=ii;ii.default=ii;let Id=class{constructor(t,n={}){if(this.type="warning",this.text=t,n.node&&n.node.source){let r=n.node.rangeBy(n);this.line=r.start.line,this.column=r.start.column,this.endLine=r.end.line,this.endColumn=r.end.column}for(let r in n)this[r]=n[r]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}};var wg=Id;Id.default=Id;let u1e=wg,vd=class{constructor(t,n,r){this.processor=t,this.messages=[],this.root=n,this.opts=r,this.css=void 0,this.map=void 0}toString(){return this.css}warn(t,n={}){n.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(n.plugin=this.lastPlugin.postcssPlugin);let r=new u1e(t,n);return this.messages.push(r),r}warnings(){return this.messages.filter(t=>t.type==="warning")}get content(){return this.css}};var Jf=vd;vd.default=vd;const al=39,_E=34,Ji=92,TE=47,eo=10,Rs=32,to=12,no=9,ro=13,c1e=91,l1e=93,d1e=40,f1e=41,p1e=123,m1e=125,E1e=59,h1e=42,_1e=58,T1e=64,ao=/[\t\n\f\r "#'()/;[\\\]{}]/g,so=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,g1e=/.[\r\n"'(/\\]/,gE=/[\da-f]/i;var A1e=function(t,n={}){let r=t.css.valueOf(),a=n.ignoreErrors,s,i,o,u,l,c,f,d,m,E,v=r.length,R=0,I=[],b=[];function S(){return R}function O(w){throw t.error("Unclosed "+w,R)}function C(){return b.length===0&&R>=v}function P(w){if(b.length)return b.pop();if(R>=v)return;let G=w?w.ignoreUnclosed:!1;switch(s=r.charCodeAt(R),s){case eo:case Rs:case no:case ro:case to:{i=R;do i+=1,s=r.charCodeAt(i);while(s===Rs||s===eo||s===no||s===ro||s===to);E=["space",r.slice(R,i)],R=i-1;break}case c1e:case l1e:case p1e:case m1e:case _1e:case E1e:case f1e:{let B=String.fromCharCode(s);E=[B,B,R];break}case d1e:{if(d=I.length?I.pop()[1]:"",m=r.charCodeAt(R+1),d==="url"&&m!==al&&m!==_E&&m!==Rs&&m!==eo&&m!==no&&m!==to&&m!==ro){i=R;do{if(c=!1,i=r.indexOf(")",i+1),i===-1)if(a||G){i=R;break}else O("bracket");for(f=i;r.charCodeAt(f-1)===Ji;)f-=1,c=!c}while(c);E=["brackets",r.slice(R,i+1),R,i],R=i}else i=r.indexOf(")",R+1),u=r.slice(R,i+1),i===-1||g1e.test(u)?E=["(","(",R]:(E=["brackets",u,R,i],R=i);break}case al:case _E:{o=s===al?"'":'"',i=R;do{if(c=!1,i=r.indexOf(o,i+1),i===-1)if(a||G){i=R+1;break}else O("string");for(f=i;r.charCodeAt(f-1)===Ji;)f-=1,c=!c}while(c);E=["string",r.slice(R,i+1),R,i],R=i;break}case T1e:{ao.lastIndex=R+1,ao.test(r),ao.lastIndex===0?i=r.length-1:i=ao.lastIndex-2,E=["at-word",r.slice(R,i+1),R,i],R=i;break}case Ji:{for(i=R,l=!0;r.charCodeAt(i+1)===Ji;)i+=1,l=!l;if(s=r.charCodeAt(i+1),l&&s!==TE&&s!==Rs&&s!==eo&&s!==no&&s!==ro&&s!==to&&(i+=1,gE.test(r.charAt(i)))){for(;gE.test(r.charAt(i+1));)i+=1;r.charCodeAt(i+1)===Rs&&(i+=1)}E=["word",r.slice(R,i+1),R,i],R=i;break}default:{s===TE&&r.charCodeAt(R+1)===h1e?(i=r.indexOf("*/",R+2)+1,i===0&&(a||G?i=r.length:O("comment")),E=["comment",r.slice(R,i+1),R,i],R=i):(so.lastIndex=R+1,so.test(r),so.lastIndex===0?i=r.length-1:i=so.lastIndex-2,E=["word",r.slice(R,i+1),R,i],I.push(E),R=i);break}}return R++,E}function M(w){b.push(w)}return{back:M,endOfFile:C,nextToken:P,position:S}};let Lg=Ta,Pu=class extends Lg{constructor(t){super(t),this.type="atrule"}append(...t){return this.proxyOf.nodes||(this.nodes=[]),super.append(...t)}prepend(...t){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...t)}};var e0=Pu;Pu.default=Pu;Lg.registerAtRule(Pu);let $g=Ta,kg,Ug,rs=class extends $g{constructor(t){super(t),this.type="root",this.nodes||(this.nodes=[])}normalize(t,n,r){let a=super.normalize(t);if(n){if(r==="prepend")this.nodes.length>1?n.raws.before=this.nodes[1].raws.before:delete n.raws.before;else if(this.first!==n)for(let s of a)s.raws.before=n.raws.before}return a}removeChild(t,n){let r=this.index(t);return!n&&r===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[r].raws.before),super.removeChild(t)}toResult(t={}){return new kg(new Ug,this,t).stringify()}};rs.registerLazyResult=e=>{kg=e};rs.registerProcessor=e=>{Ug=e};var Pi=rs;rs.default=rs;$g.registerRoot(rs);let oi={comma(e){return oi.split(e,[","],!0)},space(e){let t=[" ",` -`," "];return oi.split(e,t)},split(e,t,n){let r=[],a="",s=!1,i=0,o=!1,u="",l=!1;for(let c of e)l?l=!1:c==="\\"?l=!0:o?c===u&&(o=!1):c==='"'||c==="'"?(o=!0,u=c):c==="("?i+=1:c===")"?i>0&&(i-=1):i===0&&t.includes(c)&&(s=!0),s?(a!==""&&r.push(a.trim()),a="",s=!1):a+=c;return(n||a!=="")&&r.push(a.trim()),r}};var Mg=oi;oi.default=oi;let xg=Ta,S1e=Mg,wu=class extends xg{constructor(t){super(t),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return S1e.comma(this.selector)}set selectors(t){let n=this.selector?this.selector.match(/,\s*/):null,r=n?n[0]:","+this.raw("between","beforeOpen");this.selector=t.join(r)}};var t0=wu;wu.default=wu;xg.registerRule(wu);let O1e=Tc,I1e=A1e,v1e=Ac,R1e=e0,b1e=Pi,AE=t0;const SE={empty:!0,space:!0};function N1e(e){for(let t=e.length-1;t>=0;t--){let n=e[t],r=n[3]||n[2];if(r)return r}}let C1e=class{constructor(t){this.input=t,this.root=new b1e,this.current=this.root,this.spaces="",this.semicolon=!1,this.customProperty=!1,this.createTokenizer(),this.root.source={input:t,start:{column:1,line:1,offset:0}}}atrule(t){let n=new R1e;n.name=t[1].slice(1),n.name===""&&this.unnamedAtrule(n,t),this.init(n,t[2]);let r,a,s,i=!1,o=!1,u=[],l=[];for(;!this.tokenizer.endOfFile();){if(t=this.tokenizer.nextToken(),r=t[0],r==="("||r==="["?l.push(r==="("?")":"]"):r==="{"&&l.length>0?l.push("}"):r===l[l.length-1]&&l.pop(),l.length===0)if(r===";"){n.source.end=this.getPosition(t[2]),n.source.end.offset++,this.semicolon=!0;break}else if(r==="{"){o=!0;break}else if(r==="}"){if(u.length>0){for(s=u.length-1,a=u[s];a&&a[0]==="space";)a=u[--s];a&&(n.source.end=this.getPosition(a[3]||a[2]),n.source.end.offset++)}this.end(t);break}else u.push(t);else u.push(t);if(this.tokenizer.endOfFile()){i=!0;break}}n.raws.between=this.spacesAndCommentsFromEnd(u),u.length?(n.raws.afterName=this.spacesAndCommentsFromStart(u),this.raw(n,"params",u),i&&(t=u[u.length-1],n.source.end=this.getPosition(t[3]||t[2]),n.source.end.offset++,this.spaces=n.raws.between,n.raws.between="")):(n.raws.afterName="",n.params=""),o&&(n.nodes=[],this.current=n)}checkMissedSemicolon(t){let n=this.colon(t);if(n===!1)return;let r=0,a;for(let s=n-1;s>=0&&(a=t[s],!(a[0]!=="space"&&(r+=1,r===2)));s--);throw this.input.error("Missed semicolon",a[0]==="word"?a[3]+1:a[2])}colon(t){let n=0,r,a,s;for(let[i,o]of t.entries()){if(r=o,a=r[0],a==="("&&(n+=1),a===")"&&(n-=1),n===0&&a===":")if(!s)this.doubleColon(r);else{if(s[0]==="word"&&s[1]==="progid")continue;return i}s=r}return!1}comment(t){let n=new v1e;this.init(n,t[2]),n.source.end=this.getPosition(t[3]||t[2]),n.source.end.offset++;let r=t[1].slice(2,-2);if(/^\s*$/.test(r))n.text="",n.raws.left=r,n.raws.right="";else{let a=r.match(/^(\s*)([^]*\S)(\s*)$/);n.text=a[2],n.raws.left=a[1],n.raws.right=a[3]}}createTokenizer(){this.tokenizer=I1e(this.input)}decl(t,n){let r=new O1e;this.init(r,t[0][2]);let a=t[t.length-1];for(a[0]===";"&&(this.semicolon=!0,t.pop()),r.source.end=this.getPosition(a[3]||a[2]||N1e(t)),r.source.end.offset++;t[0][0]!=="word";)t.length===1&&this.unknownWord(t),r.raws.before+=t.shift()[1];for(r.source.start=this.getPosition(t[0][2]),r.prop="";t.length;){let l=t[0][0];if(l===":"||l==="space"||l==="comment")break;r.prop+=t.shift()[1]}r.raws.between="";let s;for(;t.length;)if(s=t.shift(),s[0]===":"){r.raws.between+=s[1];break}else s[0]==="word"&&/\w/.test(s[1])&&this.unknownWord([s]),r.raws.between+=s[1];(r.prop[0]==="_"||r.prop[0]==="*")&&(r.raws.before+=r.prop[0],r.prop=r.prop.slice(1));let i=[],o;for(;t.length&&(o=t[0][0],!(o!=="space"&&o!=="comment"));)i.push(t.shift());this.precheckMissedSemicolon(t);for(let l=t.length-1;l>=0;l--){if(s=t[l],s[1].toLowerCase()==="!important"){r.important=!0;let c=this.stringFrom(t,l);c=this.spacesFromEnd(t)+c,c!==" !important"&&(r.raws.important=c);break}else if(s[1].toLowerCase()==="important"){let c=t.slice(0),f="";for(let d=l;d>0;d--){let m=c[d][0];if(f.trim().indexOf("!")===0&&m!=="space")break;f=c.pop()[1]+f}f.trim().indexOf("!")===0&&(r.important=!0,r.raws.important=f,t=c)}if(s[0]!=="space"&&s[0]!=="comment")break}t.some(l=>l[0]!=="space"&&l[0]!=="comment")&&(r.raws.between+=i.map(l=>l[1]).join(""),i=[]),this.raw(r,"value",i.concat(t),n),r.value.includes(":")&&!n&&this.checkMissedSemicolon(t)}doubleColon(t){throw this.input.error("Double colon",{offset:t[2]},{offset:t[2]+t[1].length})}emptyRule(t){let n=new AE;this.init(n,t[2]),n.selector="",n.raws.between="",this.current=n}end(t){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(t[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(t)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(t){if(this.spaces+=t[1],this.current.nodes){let n=this.current.nodes[this.current.nodes.length-1];n&&n.type==="rule"&&!n.raws.ownSemicolon&&(n.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(t){let n=this.input.fromOffset(t);return{column:n.col,line:n.line,offset:t}}init(t,n){this.current.push(t),t.source={input:this.input,start:this.getPosition(n)},t.raws.before=this.spaces,this.spaces="",t.type!=="comment"&&(this.semicolon=!1)}other(t){let n=!1,r=null,a=!1,s=null,i=[],o=t[1].startsWith("--"),u=[],l=t;for(;l;){if(r=l[0],u.push(l),r==="("||r==="[")s||(s=l),i.push(r==="("?")":"]");else if(o&&a&&r==="{")s||(s=l),i.push("}");else if(i.length===0)if(r===";")if(a){this.decl(u,o);return}else break;else if(r==="{"){this.rule(u);return}else if(r==="}"){this.tokenizer.back(u.pop()),n=!0;break}else r===":"&&(a=!0);else r===i[i.length-1]&&(i.pop(),i.length===0&&(s=null));l=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(n=!0),i.length>0&&this.unclosedBracket(s),n&&a){if(!o)for(;u.length&&(l=u[u.length-1][0],!(l!=="space"&&l!=="comment"));)this.tokenizer.back(u.pop());this.decl(u,o)}else this.unknownWord(u)}parse(){let t;for(;!this.tokenizer.endOfFile();)switch(t=this.tokenizer.nextToken(),t[0]){case"space":this.spaces+=t[1];break;case";":this.freeSemicolon(t);break;case"}":this.end(t);break;case"comment":this.comment(t);break;case"at-word":this.atrule(t);break;case"{":this.emptyRule(t);break;default:this.other(t);break}this.endFile()}precheckMissedSemicolon(){}raw(t,n,r,a){let s,i,o=r.length,u="",l=!0,c,f;for(let d=0;dm+E[1],"");t.raws[n]={raw:d,value:u}}t[n]=u}rule(t){t.pop();let n=new AE;this.init(n,t[0][2]),n.raws.between=this.spacesAndCommentsFromEnd(t),this.raw(n,"selector",t),this.current=n}spacesAndCommentsFromEnd(t){let n,r="";for(;t.length&&(n=t[t.length-1][0],!(n!=="space"&&n!=="comment"));)r=t.pop()[1]+r;return r}spacesAndCommentsFromStart(t){let n,r="";for(;t.length&&(n=t[0][0],!(n!=="space"&&n!=="comment"));)r+=t.shift()[1];return r}spacesFromEnd(t){let n,r="";for(;t.length&&(n=t[t.length-1][0],n==="space");)r=t.pop()[1]+r;return r}stringFrom(t,n){let r="";for(let a=n;aRd(t)),e}let bd={},ss=class Wg{constructor(t,n,r){this.stringified=!1,this.processed=!1;let a;if(typeof n=="object"&&n!==null&&(n.type==="root"||n.type==="document"))a=Rd(n);else if(n instanceof Wg||n instanceof OE)a=Rd(n.root),n.map&&(typeof r.map>"u"&&(r.map={}),r.map.inline||(r.map.inline=!1),r.map.prev=n.map);else{let s=x1e;r.syntax&&(s=r.syntax.parse),r.parser&&(s=r.parser),s.parse&&(s=s.parse);try{a=s(n,r)}catch(i){this.processed=!0,this.error=i}a&&!a[L1e]&&U1e.rebuild(a)}this.result=new OE(t,a,r),this.helpers={...bd,postcss:bd,result:this.result},this.plugins=this.processor.plugins.map(s=>typeof s=="object"&&s.prepare?{...s,...s.prepare(this.result)}:s)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(t){return this.async().catch(t)}finally(t){return this.async().then(t,t)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(t,n){let r=this.result.lastPlugin;try{n&&n.addToError(t),this.error=t,t.name==="CssSyntaxError"&&!t.plugin?(t.plugin=r.postcssPlugin,t.setMessage()):r.postcssVersion}catch(a){console&&console.error&&console.error(a)}return t}prepareVisitors(){this.listeners={};let t=(n,r,a)=>{this.listeners[r]||(this.listeners[r]=[]),this.listeners[r].push([n,a])};for(let n of this.plugins)if(typeof n=="object")for(let r in n){if(!G1e[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${n.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!z1e[r])if(typeof n[r]=="object")for(let a in n[r])a==="*"?t(n,r,n[r][a]):t(n,r+"-"+a.toLowerCase(),n[r][a]);else typeof n[r]=="function"&&t(n,r,n[r])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let t=0;t0;){let r=this.visitTick(n);if(bs(r))try{await r}catch(a){let s=n[n.length-1].node;throw this.handleError(a,s)}}}if(this.listeners.OnceExit)for(let[n,r]of this.listeners.OnceExit){this.result.lastPlugin=n;try{if(t.type==="document"){let a=t.nodes.map(s=>r(s,this.helpers));await Promise.all(a)}else await r(t,this.helpers)}catch(a){throw this.handleError(a)}}}return this.processed=!0,this.stringify()}runOnRoot(t){this.result.lastPlugin=t;try{if(typeof t=="object"&&t.Once){if(this.result.root.type==="document"){let n=this.result.root.nodes.map(r=>t.Once(r,this.helpers));return bs(n[0])?Promise.all(n):n}return t.Once(this.result.root,this.helpers)}else if(typeof t=="function")return t(this.result.root,this.result)}catch(n){throw this.handleError(n)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let t=this.result.opts,n=k1e;t.syntax&&(n=t.syntax.stringify),t.stringifier&&(n=t.stringifier),n.stringify&&(n=n.stringify);let a=new $1e(n,this.result.root,this.result.opts).generate();return this.result.css=a[0],this.result.map=a[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let t of this.plugins){let n=this.runOnRoot(t);if(bs(n))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let t=this.result.root;for(;!t[Wn];)t[Wn]=!0,this.walkSync(t);if(this.listeners.OnceExit)if(t.type==="document")for(let n of t.nodes)this.visitSync(this.listeners.OnceExit,n);else this.visitSync(this.listeners.OnceExit,t)}return this.result}then(t,n){return this.async().then(t,n)}toString(){return this.css}visitSync(t,n){for(let[r,a]of t){this.result.lastPlugin=r;let s;try{s=a(n,this.helpers)}catch(i){throw this.handleError(i,n.proxyOf)}if(n.type!=="root"&&n.type!=="document"&&!n.parent)return!0;if(bs(s))throw this.getAsyncError()}}visitTick(t){let n=t[t.length-1],{node:r,visitors:a}=n;if(r.type!=="root"&&r.type!=="document"&&!r.parent){t.pop();return}if(a.length>0&&n.visitorIndex{a[Wn]||this.walkSync(a)});else{let a=this.listeners[r];if(a&&this.visitSync(a,t.toProxy()))return}}warnings(){return this.sync().warnings()}get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}};ss.registerPostcss=e=>{bd=e};var Gg=ss;ss.default=ss;F1e.registerLazyResult(ss);M1e.registerLazyResult(ss);let B1e=Ag,H1e=hc,V1e=n0;const j1e=Jf;let Nd=class{constructor(t,n,r){n=n.toString(),this.stringified=!1,this._processor=t,this._css=n,this._opts=r,this._map=void 0;let a,s=H1e;this.result=new j1e(this._processor,a,this._opts),this.result.css=n;let i=this;Object.defineProperty(this.result,"root",{get(){return i.root}});let o=new B1e(s,a,this._opts,n);if(o.isMap()){let[u,l]=o.generate();u&&(this.result.css=u),l&&(this.result.map=l)}else o.clearAnnotation(),this.result.css=o.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(t){return this.async().catch(t)}finally(t){return this.async().then(t,t)}sync(){if(this.error)throw this.error;return this.result}then(t,n){return this.async().then(t,n)}toString(){return this._css}warnings(){return[]}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let t,n=V1e;try{t=n(this._css,this._opts)}catch(r){this.error=r}if(this.error)throw this.error;return this._root=t,t}get[Symbol.toStringTag](){return"NoWorkResult"}};var K1e=Nd;Nd.default=Nd;let Y1e=K1e,q1e=Gg,X1e=Qf,Z1e=Pi,ui=class{constructor(t=[]){this.version="8.4.33",this.plugins=this.normalize(t)}normalize(t){let n=[];for(let r of t)if(r.postcss===!0?r=r():r.postcss&&(r=r.postcss),typeof r=="object"&&Array.isArray(r.plugins))n=n.concat(r.plugins);else if(typeof r=="object"&&r.postcssPlugin)n.push(r);else if(typeof r=="function")n.push(r);else if(!(typeof r=="object"&&(r.parse||r.stringify)))throw new Error(r+" is not a PostCSS plugin");return n}process(t,n={}){return!this.plugins.length&&!n.parser&&!n.stringifier&&!n.syntax?new Y1e(this,t,n):new q1e(this,t,n)}use(t){return this.plugins=this.plugins.concat(this.normalize([t])),this}};var Q1e=ui;ui.default=ui;Z1e.registerProcessor(ui);X1e.registerProcessor(ui);let J1e=Tc,eTe=Eg,tTe=Ac,nTe=e0,rTe=gc,aTe=Pi,sTe=t0;function ci(e,t){if(Array.isArray(e))return e.map(a=>ci(a));let{inputs:n,...r}=e;if(n){t=[];for(let a of n){let s={...a,__proto__:rTe.prototype};s.map&&(s.map={...s.map,__proto__:eTe.prototype}),t.push(s)}}if(r.nodes&&(r.nodes=e.nodes.map(a=>ci(a,t))),r.source){let{inputId:a,...s}=r.source;r.source=s,a!=null&&(r.source.input=t[a])}if(r.type==="root")return new aTe(r);if(r.type==="decl")return new J1e(r);if(r.type==="rule")return new sTe(r);if(r.type==="comment")return new tTe(r);if(r.type==="atrule")return new nTe(r);throw new Error("Unknown node type: "+e.type)}var iTe=ci;ci.default=ci;var vE={};let oTe=qf,zg=Tc,uTe=Gg,cTe=Ta,r0=Q1e,lTe=hc,dTe=iTe,Bg=Qf,fTe=wg,Hg=Ac,Vg=e0,pTe=Jf,mTe=gc,ETe=n0,hTe=Mg,jg=t0,Kg=Pi,_Te=_c;function lt(...e){return e.length===1&&Array.isArray(e[0])&&(e=e[0]),new r0(e)}lt.plugin=function(t,n){let r=!1;function a(...i){console&&console.warn&&!r&&(r=!0,console.warn(t+`: postcss.plugin was deprecated. Migration guide: +`),n=o.length-i):n+=o.length,u&&l!=="start"){let c=u.parent||{raws:{}};(!(u.type==="decl"||u.type==="atrule"&&!u.nodes)||u!==c.last||c.raws.semicolon)&&(u.source&&u.source.end?(a.source=this.sourcePath(u),a.original.line=u.source.end.line,a.original.column=u.source.end.column-1,a.generated.line=t,a.generated.column=n-2,this.map.addMapping(a)):(a.source=r,a.original.line=1,a.original.column=0,a.generated.line=t,a.generated.column=n-1,this.map.addMapping(a)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation<"u"?this.mapOpts.annotation:this.previous().length?this.previous().some(t=>t.annotation):!0}isInline(){if(typeof this.mapOpts.inline<"u")return this.mapOpts.inline;let t=this.mapOpts.annotation;return typeof t<"u"&&t!==!0?!1:this.previous().length?this.previous().some(n=>n.inline):!0}isMap(){return typeof this.opts.map<"u"?!!this.opts.map:this.previous().length>0}isSourcesContent(){return typeof this.mapOpts.sourcesContent<"u"?this.mapOpts.sourcesContent:this.previous().length?this.previous().some(t=>t.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(t){if(this.mapOpts.absolute||t.charCodeAt(0)===60||/^\w+:\/\//.test(t))return t;let n=this.memoizedPaths.get(t);if(n)return n;let r=this.opts.to?Do(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(r=Do(Tg(r,this.mapOpts.annotation)));let a=_g(r,t);return this.memoizedPaths.set(t,a),a}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(t=>{if(t.source&&t.source.input.map){let n=t.source.input.map;this.previousMaps.includes(n)||this.previousMaps.push(n)}});else{let t=new t1e(this.originalCSS,this.opts);t.map&&this.previousMaps.push(t.map)}return this.previousMaps}setSourcesContent(){let t={};if(this.root)this.root.walk(n=>{if(n.source){let r=n.source.input.from;if(r&&!t[r]){t[r]=!0;let a=this.usesFileUrls?this.toFileUrl(r):this.toUrl(this.path(r));this.map.setSourceContent(a,n.source.input.css)}}});else if(this.css){let n=this.opts.from?this.toUrl(this.path(this.opts.from)):"";this.map.setSourceContent(n,this.css)}}sourcePath(t){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(t.source.input.from):this.toUrl(this.path(t.source.input.from))}toBase64(t){return Buffer?Buffer.from(t).toString("base64"):window.btoa(unescape(encodeURIComponent(t)))}toFileUrl(t){let n=this.memoizedFileURLs.get(t);if(n)return n;if(hE){let r=hE(t).toString();return this.memoizedFileURLs.set(t,r),r}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(t){let n=this.memoizedURLs.get(t);if(n)return n;gg==="\\"&&(t=t.replace(/\\/g,"/"));let r=encodeURI(t).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(t,r),r}};var Ag=a1e;let s1e=_c,Od=class extends s1e{constructor(t){super(t),this.type="comment"}};var Ac=Od;Od.default=Od;let{isClean:Sg,my:Og}=Di,Ig=Tc,vg=Ac,i1e=_c,Rg,Xf,Zf,bg;function Ng(e){return e.map(t=>(t.nodes&&(t.nodes=Ng(t.nodes)),delete t.source,t))}function Cg(e){if(e[Sg]=!1,e.proxyOf.nodes)for(let t of e.proxyOf.nodes)Cg(t)}let pr=class yg extends i1e{append(...t){for(let n of t){let r=this.normalize(n,this.last);for(let a of r)this.proxyOf.nodes.push(a)}return this.markDirty(),this}cleanRaws(t){if(super.cleanRaws(t),this.nodes)for(let n of this.nodes)n.cleanRaws(t)}each(t){if(!this.proxyOf.nodes)return;let n=this.getIterator(),r,a;for(;this.indexes[n]t[n](...r.map(a=>typeof a=="function"?(s,i)=>a(s.toProxy(),i):a)):n==="every"||n==="some"?r=>t[n]((a,...s)=>r(a.toProxy(),...s)):n==="root"?()=>t.root().toProxy():n==="nodes"?t.nodes.map(r=>r.toProxy()):n==="first"||n==="last"?t[n].toProxy():t[n]:t[n]},set(t,n,r){return t[n]===r||(t[n]=r,(n==="name"||n==="params"||n==="selector")&&t.markDirty()),!0}}}index(t){return typeof t=="number"?t:(t.proxyOf&&(t=t.proxyOf),this.proxyOf.nodes.indexOf(t))}insertAfter(t,n){let r=this.index(t),a=this.normalize(n,this.proxyOf.nodes[r]).reverse();r=this.index(t);for(let i of a)this.proxyOf.nodes.splice(r+1,0,i);let s;for(let i in this.indexes)s=this.indexes[i],r"u")throw new Error("Value field is missed in node creation");typeof t.value!="string"&&(t.value=String(t.value)),t=[new Ig(t)]}else if(t.selector)t=[new Xf(t)];else if(t.name)t=[new Zf(t)];else if(t.text)t=[new vg(t)];else throw new Error("Unknown node type in node creation");return t.map(a=>(a[Og]||yg.rebuild(a),a=a.proxyOf,a.parent&&a.parent.removeChild(a),a[Sg]&&Cg(a),typeof a.raws.before>"u"&&n&&typeof n.raws.before<"u"&&(a.raws.before=n.raws.before.replace(/\S/g,"")),a.parent=this.proxyOf,a))}prepend(...t){t=t.reverse();for(let n of t){let r=this.normalize(n,this.first,"prepend").reverse();for(let a of r)this.proxyOf.nodes.unshift(a);for(let a in this.indexes)this.indexes[a]=this.indexes[a]+r.length}return this.markDirty(),this}push(t){return t.parent=this,this.proxyOf.nodes.push(t),this}removeAll(){for(let t of this.proxyOf.nodes)t.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(t){t=this.index(t),this.proxyOf.nodes[t].parent=void 0,this.proxyOf.nodes.splice(t,1);let n;for(let r in this.indexes)n=this.indexes[r],n>=t&&(this.indexes[r]=n-1);return this.markDirty(),this}replaceValues(t,n,r){return r||(r=n,n={}),this.walkDecls(a=>{n.props&&!n.props.includes(a.prop)||n.fast&&!a.value.includes(n.fast)||(a.value=a.value.replace(t,r))}),this.markDirty(),this}some(t){return this.nodes.some(t)}walk(t){return this.each((n,r)=>{let a;try{a=t(n,r)}catch(s){throw n.addToError(s)}return a!==!1&&n.walk&&(a=n.walk(t)),a})}walkAtRules(t,n){return n?t instanceof RegExp?this.walk((r,a)=>{if(r.type==="atrule"&&t.test(r.name))return n(r,a)}):this.walk((r,a)=>{if(r.type==="atrule"&&r.name===t)return n(r,a)}):(n=t,this.walk((r,a)=>{if(r.type==="atrule")return n(r,a)}))}walkComments(t){return this.walk((n,r)=>{if(n.type==="comment")return t(n,r)})}walkDecls(t,n){return n?t instanceof RegExp?this.walk((r,a)=>{if(r.type==="decl"&&t.test(r.prop))return n(r,a)}):this.walk((r,a)=>{if(r.type==="decl"&&r.prop===t)return n(r,a)}):(n=t,this.walk((r,a)=>{if(r.type==="decl")return n(r,a)}))}walkRules(t,n){return n?t instanceof RegExp?this.walk((r,a)=>{if(r.type==="rule"&&t.test(r.selector))return n(r,a)}):this.walk((r,a)=>{if(r.type==="rule"&&r.selector===t)return n(r,a)}):(n=t,this.walk((r,a)=>{if(r.type==="rule")return n(r,a)}))}get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}};pr.registerParse=e=>{Rg=e};pr.registerRule=e=>{Xf=e};pr.registerAtRule=e=>{Zf=e};pr.registerRoot=e=>{bg=e};var Ta=pr;pr.default=pr;pr.rebuild=e=>{e.type==="atrule"?Object.setPrototypeOf(e,Zf.prototype):e.type==="rule"?Object.setPrototypeOf(e,Xf.prototype):e.type==="decl"?Object.setPrototypeOf(e,Ig.prototype):e.type==="comment"?Object.setPrototypeOf(e,vg.prototype):e.type==="root"&&Object.setPrototypeOf(e,bg.prototype),e[Og]=!0,e.nodes&&e.nodes.forEach(t=>{pr.rebuild(t)})};let o1e=Ta,Dg,Pg,ii=class extends o1e{constructor(t){super({type:"document",...t}),this.nodes||(this.nodes=[])}toResult(t={}){return new Dg(new Pg,this,t).stringify()}};ii.registerLazyResult=e=>{Dg=e};ii.registerProcessor=e=>{Pg=e};var Qf=ii;ii.default=ii;let Id=class{constructor(t,n={}){if(this.type="warning",this.text=t,n.node&&n.node.source){let r=n.node.rangeBy(n);this.line=r.start.line,this.column=r.start.column,this.endLine=r.end.line,this.endColumn=r.end.column}for(let r in n)this[r]=n[r]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}};var wg=Id;Id.default=Id;let u1e=wg,vd=class{constructor(t,n,r){this.processor=t,this.messages=[],this.root=n,this.opts=r,this.css=void 0,this.map=void 0}toString(){return this.css}warn(t,n={}){n.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(n.plugin=this.lastPlugin.postcssPlugin);let r=new u1e(t,n);return this.messages.push(r),r}warnings(){return this.messages.filter(t=>t.type==="warning")}get content(){return this.css}};var Jf=vd;vd.default=vd;const al=39,_E=34,Ji=92,TE=47,eo=10,Rs=32,to=12,no=9,ro=13,c1e=91,l1e=93,d1e=40,f1e=41,p1e=123,m1e=125,E1e=59,h1e=42,_1e=58,T1e=64,ao=/[\t\n\f\r "#'()/;[\\\]{}]/g,so=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,g1e=/.[\r\n"'(/\\]/,gE=/[\da-f]/i;var A1e=function(t,n={}){let r=t.css.valueOf(),a=n.ignoreErrors,s,i,o,u,l,c,f,d,m,E,I=r.length,R=0,v=[],b=[];function S(){return R}function O(w){throw t.error("Unclosed "+w,R)}function C(){return b.length===0&&R>=I}function P(w){if(b.length)return b.pop();if(R>=I)return;let G=w?w.ignoreUnclosed:!1;switch(s=r.charCodeAt(R),s){case eo:case Rs:case no:case ro:case to:{i=R;do i+=1,s=r.charCodeAt(i);while(s===Rs||s===eo||s===no||s===ro||s===to);E=["space",r.slice(R,i)],R=i-1;break}case c1e:case l1e:case p1e:case m1e:case _1e:case E1e:case f1e:{let B=String.fromCharCode(s);E=[B,B,R];break}case d1e:{if(d=v.length?v.pop()[1]:"",m=r.charCodeAt(R+1),d==="url"&&m!==al&&m!==_E&&m!==Rs&&m!==eo&&m!==no&&m!==to&&m!==ro){i=R;do{if(c=!1,i=r.indexOf(")",i+1),i===-1)if(a||G){i=R;break}else O("bracket");for(f=i;r.charCodeAt(f-1)===Ji;)f-=1,c=!c}while(c);E=["brackets",r.slice(R,i+1),R,i],R=i}else i=r.indexOf(")",R+1),u=r.slice(R,i+1),i===-1||g1e.test(u)?E=["(","(",R]:(E=["brackets",u,R,i],R=i);break}case al:case _E:{o=s===al?"'":'"',i=R;do{if(c=!1,i=r.indexOf(o,i+1),i===-1)if(a||G){i=R+1;break}else O("string");for(f=i;r.charCodeAt(f-1)===Ji;)f-=1,c=!c}while(c);E=["string",r.slice(R,i+1),R,i],R=i;break}case T1e:{ao.lastIndex=R+1,ao.test(r),ao.lastIndex===0?i=r.length-1:i=ao.lastIndex-2,E=["at-word",r.slice(R,i+1),R,i],R=i;break}case Ji:{for(i=R,l=!0;r.charCodeAt(i+1)===Ji;)i+=1,l=!l;if(s=r.charCodeAt(i+1),l&&s!==TE&&s!==Rs&&s!==eo&&s!==no&&s!==ro&&s!==to&&(i+=1,gE.test(r.charAt(i)))){for(;gE.test(r.charAt(i+1));)i+=1;r.charCodeAt(i+1)===Rs&&(i+=1)}E=["word",r.slice(R,i+1),R,i],R=i;break}default:{s===TE&&r.charCodeAt(R+1)===h1e?(i=r.indexOf("*/",R+2)+1,i===0&&(a||G?i=r.length:O("comment")),E=["comment",r.slice(R,i+1),R,i],R=i):(so.lastIndex=R+1,so.test(r),so.lastIndex===0?i=r.length-1:i=so.lastIndex-2,E=["word",r.slice(R,i+1),R,i],v.push(E),R=i);break}}return R++,E}function M(w){b.push(w)}return{back:M,endOfFile:C,nextToken:P,position:S}};let Lg=Ta,Pu=class extends Lg{constructor(t){super(t),this.type="atrule"}append(...t){return this.proxyOf.nodes||(this.nodes=[]),super.append(...t)}prepend(...t){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...t)}};var e0=Pu;Pu.default=Pu;Lg.registerAtRule(Pu);let $g=Ta,kg,Ug,rs=class extends $g{constructor(t){super(t),this.type="root",this.nodes||(this.nodes=[])}normalize(t,n,r){let a=super.normalize(t);if(n){if(r==="prepend")this.nodes.length>1?n.raws.before=this.nodes[1].raws.before:delete n.raws.before;else if(this.first!==n)for(let s of a)s.raws.before=n.raws.before}return a}removeChild(t,n){let r=this.index(t);return!n&&r===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[r].raws.before),super.removeChild(t)}toResult(t={}){return new kg(new Ug,this,t).stringify()}};rs.registerLazyResult=e=>{kg=e};rs.registerProcessor=e=>{Ug=e};var Pi=rs;rs.default=rs;$g.registerRoot(rs);let oi={comma(e){return oi.split(e,[","],!0)},space(e){let t=[" ",` +`," "];return oi.split(e,t)},split(e,t,n){let r=[],a="",s=!1,i=0,o=!1,u="",l=!1;for(let c of e)l?l=!1:c==="\\"?l=!0:o?c===u&&(o=!1):c==='"'||c==="'"?(o=!0,u=c):c==="("?i+=1:c===")"?i>0&&(i-=1):i===0&&t.includes(c)&&(s=!0),s?(a!==""&&r.push(a.trim()),a="",s=!1):a+=c;return(n||a!=="")&&r.push(a.trim()),r}};var Mg=oi;oi.default=oi;let xg=Ta,S1e=Mg,wu=class extends xg{constructor(t){super(t),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return S1e.comma(this.selector)}set selectors(t){let n=this.selector?this.selector.match(/,\s*/):null,r=n?n[0]:","+this.raw("between","beforeOpen");this.selector=t.join(r)}};var t0=wu;wu.default=wu;xg.registerRule(wu);let O1e=Tc,I1e=A1e,v1e=Ac,R1e=e0,b1e=Pi,AE=t0;const SE={empty:!0,space:!0};function N1e(e){for(let t=e.length-1;t>=0;t--){let n=e[t],r=n[3]||n[2];if(r)return r}}let C1e=class{constructor(t){this.input=t,this.root=new b1e,this.current=this.root,this.spaces="",this.semicolon=!1,this.customProperty=!1,this.createTokenizer(),this.root.source={input:t,start:{column:1,line:1,offset:0}}}atrule(t){let n=new R1e;n.name=t[1].slice(1),n.name===""&&this.unnamedAtrule(n,t),this.init(n,t[2]);let r,a,s,i=!1,o=!1,u=[],l=[];for(;!this.tokenizer.endOfFile();){if(t=this.tokenizer.nextToken(),r=t[0],r==="("||r==="["?l.push(r==="("?")":"]"):r==="{"&&l.length>0?l.push("}"):r===l[l.length-1]&&l.pop(),l.length===0)if(r===";"){n.source.end=this.getPosition(t[2]),n.source.end.offset++,this.semicolon=!0;break}else if(r==="{"){o=!0;break}else if(r==="}"){if(u.length>0){for(s=u.length-1,a=u[s];a&&a[0]==="space";)a=u[--s];a&&(n.source.end=this.getPosition(a[3]||a[2]),n.source.end.offset++)}this.end(t);break}else u.push(t);else u.push(t);if(this.tokenizer.endOfFile()){i=!0;break}}n.raws.between=this.spacesAndCommentsFromEnd(u),u.length?(n.raws.afterName=this.spacesAndCommentsFromStart(u),this.raw(n,"params",u),i&&(t=u[u.length-1],n.source.end=this.getPosition(t[3]||t[2]),n.source.end.offset++,this.spaces=n.raws.between,n.raws.between="")):(n.raws.afterName="",n.params=""),o&&(n.nodes=[],this.current=n)}checkMissedSemicolon(t){let n=this.colon(t);if(n===!1)return;let r=0,a;for(let s=n-1;s>=0&&(a=t[s],!(a[0]!=="space"&&(r+=1,r===2)));s--);throw this.input.error("Missed semicolon",a[0]==="word"?a[3]+1:a[2])}colon(t){let n=0,r,a,s;for(let[i,o]of t.entries()){if(r=o,a=r[0],a==="("&&(n+=1),a===")"&&(n-=1),n===0&&a===":")if(!s)this.doubleColon(r);else{if(s[0]==="word"&&s[1]==="progid")continue;return i}s=r}return!1}comment(t){let n=new v1e;this.init(n,t[2]),n.source.end=this.getPosition(t[3]||t[2]),n.source.end.offset++;let r=t[1].slice(2,-2);if(/^\s*$/.test(r))n.text="",n.raws.left=r,n.raws.right="";else{let a=r.match(/^(\s*)([^]*\S)(\s*)$/);n.text=a[2],n.raws.left=a[1],n.raws.right=a[3]}}createTokenizer(){this.tokenizer=I1e(this.input)}decl(t,n){let r=new O1e;this.init(r,t[0][2]);let a=t[t.length-1];for(a[0]===";"&&(this.semicolon=!0,t.pop()),r.source.end=this.getPosition(a[3]||a[2]||N1e(t)),r.source.end.offset++;t[0][0]!=="word";)t.length===1&&this.unknownWord(t),r.raws.before+=t.shift()[1];for(r.source.start=this.getPosition(t[0][2]),r.prop="";t.length;){let l=t[0][0];if(l===":"||l==="space"||l==="comment")break;r.prop+=t.shift()[1]}r.raws.between="";let s;for(;t.length;)if(s=t.shift(),s[0]===":"){r.raws.between+=s[1];break}else s[0]==="word"&&/\w/.test(s[1])&&this.unknownWord([s]),r.raws.between+=s[1];(r.prop[0]==="_"||r.prop[0]==="*")&&(r.raws.before+=r.prop[0],r.prop=r.prop.slice(1));let i=[],o;for(;t.length&&(o=t[0][0],!(o!=="space"&&o!=="comment"));)i.push(t.shift());this.precheckMissedSemicolon(t);for(let l=t.length-1;l>=0;l--){if(s=t[l],s[1].toLowerCase()==="!important"){r.important=!0;let c=this.stringFrom(t,l);c=this.spacesFromEnd(t)+c,c!==" !important"&&(r.raws.important=c);break}else if(s[1].toLowerCase()==="important"){let c=t.slice(0),f="";for(let d=l;d>0;d--){let m=c[d][0];if(f.trim().indexOf("!")===0&&m!=="space")break;f=c.pop()[1]+f}f.trim().indexOf("!")===0&&(r.important=!0,r.raws.important=f,t=c)}if(s[0]!=="space"&&s[0]!=="comment")break}t.some(l=>l[0]!=="space"&&l[0]!=="comment")&&(r.raws.between+=i.map(l=>l[1]).join(""),i=[]),this.raw(r,"value",i.concat(t),n),r.value.includes(":")&&!n&&this.checkMissedSemicolon(t)}doubleColon(t){throw this.input.error("Double colon",{offset:t[2]},{offset:t[2]+t[1].length})}emptyRule(t){let n=new AE;this.init(n,t[2]),n.selector="",n.raws.between="",this.current=n}end(t){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(t[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(t)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(t){if(this.spaces+=t[1],this.current.nodes){let n=this.current.nodes[this.current.nodes.length-1];n&&n.type==="rule"&&!n.raws.ownSemicolon&&(n.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(t){let n=this.input.fromOffset(t);return{column:n.col,line:n.line,offset:t}}init(t,n){this.current.push(t),t.source={input:this.input,start:this.getPosition(n)},t.raws.before=this.spaces,this.spaces="",t.type!=="comment"&&(this.semicolon=!1)}other(t){let n=!1,r=null,a=!1,s=null,i=[],o=t[1].startsWith("--"),u=[],l=t;for(;l;){if(r=l[0],u.push(l),r==="("||r==="[")s||(s=l),i.push(r==="("?")":"]");else if(o&&a&&r==="{")s||(s=l),i.push("}");else if(i.length===0)if(r===";")if(a){this.decl(u,o);return}else break;else if(r==="{"){this.rule(u);return}else if(r==="}"){this.tokenizer.back(u.pop()),n=!0;break}else r===":"&&(a=!0);else r===i[i.length-1]&&(i.pop(),i.length===0&&(s=null));l=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(n=!0),i.length>0&&this.unclosedBracket(s),n&&a){if(!o)for(;u.length&&(l=u[u.length-1][0],!(l!=="space"&&l!=="comment"));)this.tokenizer.back(u.pop());this.decl(u,o)}else this.unknownWord(u)}parse(){let t;for(;!this.tokenizer.endOfFile();)switch(t=this.tokenizer.nextToken(),t[0]){case"space":this.spaces+=t[1];break;case";":this.freeSemicolon(t);break;case"}":this.end(t);break;case"comment":this.comment(t);break;case"at-word":this.atrule(t);break;case"{":this.emptyRule(t);break;default:this.other(t);break}this.endFile()}precheckMissedSemicolon(){}raw(t,n,r,a){let s,i,o=r.length,u="",l=!0,c,f;for(let d=0;dm+E[1],"");t.raws[n]={raw:d,value:u}}t[n]=u}rule(t){t.pop();let n=new AE;this.init(n,t[0][2]),n.raws.between=this.spacesAndCommentsFromEnd(t),this.raw(n,"selector",t),this.current=n}spacesAndCommentsFromEnd(t){let n,r="";for(;t.length&&(n=t[t.length-1][0],!(n!=="space"&&n!=="comment"));)r=t.pop()[1]+r;return r}spacesAndCommentsFromStart(t){let n,r="";for(;t.length&&(n=t[0][0],!(n!=="space"&&n!=="comment"));)r+=t.shift()[1];return r}spacesFromEnd(t){let n,r="";for(;t.length&&(n=t[t.length-1][0],n==="space");)r=t.pop()[1]+r;return r}stringFrom(t,n){let r="";for(let a=n;aRd(t)),e}let bd={},ss=class Wg{constructor(t,n,r){this.stringified=!1,this.processed=!1;let a;if(typeof n=="object"&&n!==null&&(n.type==="root"||n.type==="document"))a=Rd(n);else if(n instanceof Wg||n instanceof OE)a=Rd(n.root),n.map&&(typeof r.map>"u"&&(r.map={}),r.map.inline||(r.map.inline=!1),r.map.prev=n.map);else{let s=x1e;r.syntax&&(s=r.syntax.parse),r.parser&&(s=r.parser),s.parse&&(s=s.parse);try{a=s(n,r)}catch(i){this.processed=!0,this.error=i}a&&!a[L1e]&&U1e.rebuild(a)}this.result=new OE(t,a,r),this.helpers={...bd,postcss:bd,result:this.result},this.plugins=this.processor.plugins.map(s=>typeof s=="object"&&s.prepare?{...s,...s.prepare(this.result)}:s)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(t){return this.async().catch(t)}finally(t){return this.async().then(t,t)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(t,n){let r=this.result.lastPlugin;try{n&&n.addToError(t),this.error=t,t.name==="CssSyntaxError"&&!t.plugin?(t.plugin=r.postcssPlugin,t.setMessage()):r.postcssVersion}catch(a){console&&console.error&&console.error(a)}return t}prepareVisitors(){this.listeners={};let t=(n,r,a)=>{this.listeners[r]||(this.listeners[r]=[]),this.listeners[r].push([n,a])};for(let n of this.plugins)if(typeof n=="object")for(let r in n){if(!G1e[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${n.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!z1e[r])if(typeof n[r]=="object")for(let a in n[r])a==="*"?t(n,r,n[r][a]):t(n,r+"-"+a.toLowerCase(),n[r][a]);else typeof n[r]=="function"&&t(n,r,n[r])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let t=0;t0;){let r=this.visitTick(n);if(bs(r))try{await r}catch(a){let s=n[n.length-1].node;throw this.handleError(a,s)}}}if(this.listeners.OnceExit)for(let[n,r]of this.listeners.OnceExit){this.result.lastPlugin=n;try{if(t.type==="document"){let a=t.nodes.map(s=>r(s,this.helpers));await Promise.all(a)}else await r(t,this.helpers)}catch(a){throw this.handleError(a)}}}return this.processed=!0,this.stringify()}runOnRoot(t){this.result.lastPlugin=t;try{if(typeof t=="object"&&t.Once){if(this.result.root.type==="document"){let n=this.result.root.nodes.map(r=>t.Once(r,this.helpers));return bs(n[0])?Promise.all(n):n}return t.Once(this.result.root,this.helpers)}else if(typeof t=="function")return t(this.result.root,this.result)}catch(n){throw this.handleError(n)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let t=this.result.opts,n=k1e;t.syntax&&(n=t.syntax.stringify),t.stringifier&&(n=t.stringifier),n.stringify&&(n=n.stringify);let a=new $1e(n,this.result.root,this.result.opts).generate();return this.result.css=a[0],this.result.map=a[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let t of this.plugins){let n=this.runOnRoot(t);if(bs(n))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let t=this.result.root;for(;!t[Wn];)t[Wn]=!0,this.walkSync(t);if(this.listeners.OnceExit)if(t.type==="document")for(let n of t.nodes)this.visitSync(this.listeners.OnceExit,n);else this.visitSync(this.listeners.OnceExit,t)}return this.result}then(t,n){return this.async().then(t,n)}toString(){return this.css}visitSync(t,n){for(let[r,a]of t){this.result.lastPlugin=r;let s;try{s=a(n,this.helpers)}catch(i){throw this.handleError(i,n.proxyOf)}if(n.type!=="root"&&n.type!=="document"&&!n.parent)return!0;if(bs(s))throw this.getAsyncError()}}visitTick(t){let n=t[t.length-1],{node:r,visitors:a}=n;if(r.type!=="root"&&r.type!=="document"&&!r.parent){t.pop();return}if(a.length>0&&n.visitorIndex{a[Wn]||this.walkSync(a)});else{let a=this.listeners[r];if(a&&this.visitSync(a,t.toProxy()))return}}warnings(){return this.sync().warnings()}get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}};ss.registerPostcss=e=>{bd=e};var Gg=ss;ss.default=ss;F1e.registerLazyResult(ss);M1e.registerLazyResult(ss);let B1e=Ag,H1e=hc,V1e=n0;const j1e=Jf;let Nd=class{constructor(t,n,r){n=n.toString(),this.stringified=!1,this._processor=t,this._css=n,this._opts=r,this._map=void 0;let a,s=H1e;this.result=new j1e(this._processor,a,this._opts),this.result.css=n;let i=this;Object.defineProperty(this.result,"root",{get(){return i.root}});let o=new B1e(s,a,this._opts,n);if(o.isMap()){let[u,l]=o.generate();u&&(this.result.css=u),l&&(this.result.map=l)}else o.clearAnnotation(),this.result.css=o.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(t){return this.async().catch(t)}finally(t){return this.async().then(t,t)}sync(){if(this.error)throw this.error;return this.result}then(t,n){return this.async().then(t,n)}toString(){return this._css}warnings(){return[]}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let t,n=V1e;try{t=n(this._css,this._opts)}catch(r){this.error=r}if(this.error)throw this.error;return this._root=t,t}get[Symbol.toStringTag](){return"NoWorkResult"}};var K1e=Nd;Nd.default=Nd;let Y1e=K1e,q1e=Gg,X1e=Qf,Z1e=Pi,ui=class{constructor(t=[]){this.version="8.4.33",this.plugins=this.normalize(t)}normalize(t){let n=[];for(let r of t)if(r.postcss===!0?r=r():r.postcss&&(r=r.postcss),typeof r=="object"&&Array.isArray(r.plugins))n=n.concat(r.plugins);else if(typeof r=="object"&&r.postcssPlugin)n.push(r);else if(typeof r=="function")n.push(r);else if(!(typeof r=="object"&&(r.parse||r.stringify)))throw new Error(r+" is not a PostCSS plugin");return n}process(t,n={}){return!this.plugins.length&&!n.parser&&!n.stringifier&&!n.syntax?new Y1e(this,t,n):new q1e(this,t,n)}use(t){return this.plugins=this.plugins.concat(this.normalize([t])),this}};var Q1e=ui;ui.default=ui;Z1e.registerProcessor(ui);X1e.registerProcessor(ui);let J1e=Tc,eTe=Eg,tTe=Ac,nTe=e0,rTe=gc,aTe=Pi,sTe=t0;function ci(e,t){if(Array.isArray(e))return e.map(a=>ci(a));let{inputs:n,...r}=e;if(n){t=[];for(let a of n){let s={...a,__proto__:rTe.prototype};s.map&&(s.map={...s.map,__proto__:eTe.prototype}),t.push(s)}}if(r.nodes&&(r.nodes=e.nodes.map(a=>ci(a,t))),r.source){let{inputId:a,...s}=r.source;r.source=s,a!=null&&(r.source.input=t[a])}if(r.type==="root")return new aTe(r);if(r.type==="decl")return new J1e(r);if(r.type==="rule")return new sTe(r);if(r.type==="comment")return new tTe(r);if(r.type==="atrule")return new nTe(r);throw new Error("Unknown node type: "+e.type)}var iTe=ci;ci.default=ci;var vE={};let oTe=qf,zg=Tc,uTe=Gg,cTe=Ta,r0=Q1e,lTe=hc,dTe=iTe,Bg=Qf,fTe=wg,Hg=Ac,Vg=e0,pTe=Jf,mTe=gc,ETe=n0,hTe=Mg,jg=t0,Kg=Pi,_Te=_c;function ft(...e){return e.length===1&&Array.isArray(e[0])&&(e=e[0]),new r0(e)}ft.plugin=function(t,n){let r=!1;function a(...i){console&&console.warn&&!r&&(r=!0,console.warn(t+`: postcss.plugin was deprecated. Migration guide: https://evilmartians.com/chronicles/postcss-8-plugin-migration`),vE.LANG&&vE.LANG.startsWith("cn")&&console.warn(t+`: 里面 postcss.plugin 被弃用. 迁移指南: -https://www.w3ctech.com/topic/2226`));let o=n(...i);return o.postcssPlugin=t,o.postcssVersion=new r0().version,o}let s;return Object.defineProperty(a,"postcss",{get(){return s||(s=a()),s}}),a.process=function(i,o,u){return lt([a(u)]).process(i,o)},a};lt.stringify=lTe;lt.parse=ETe;lt.fromJSON=dTe;lt.list=hTe;lt.comment=e=>new Hg(e);lt.atRule=e=>new Vg(e);lt.decl=e=>new zg(e);lt.rule=e=>new jg(e);lt.root=e=>new Kg(e);lt.document=e=>new Bg(e);lt.CssSyntaxError=oTe;lt.Declaration=zg;lt.Container=cTe;lt.Processor=r0;lt.Document=Bg;lt.Comment=Hg;lt.Warning=fTe;lt.AtRule=Vg;lt.Result=pTe;lt.Input=mTe;lt.Rule=jg;lt.Root=Kg;lt.Node=_Te;uTe.registerPostcss(lt);var TTe=lt;lt.default=lt;const gTe=MT,RE=E_e,{isPlainObject:ATe}=Kf,bE=D_e,STe=P_e,{parse:OTe}=TTe,ITe=["img","audio","video","picture","svg","object","map","iframe","embed"],vTe=["script","style"];function Ds(e,t){e&&Object.keys(e).forEach(function(n){t(e[n],n)})}function sr(e,t){return{}.hasOwnProperty.call(e,t)}function NE(e,t){const n=[];return Ds(e,function(r){t(r)&&n.push(r)}),n}function RTe(e){for(const t in e)if(sr(e,t))return!1;return!0}function bTe(e){return e.map(function(t){if(!t.url)throw new Error("URL missing");return t.url+(t.w?` ${t.w}w`:"")+(t.h?` ${t.h}h`:"")+(t.d?` ${t.d}x`:"")}).join(", ")}var NTe=li;const CTe=/^[^\0\t\n\f\r /<=>]+$/;function li(e,t,n){if(e==null)return"";typeof e=="number"&&(e=e.toString());let r="",a="";function s(D,z){const V=this;this.tag=D,this.attribs=z||{},this.tagPosition=r.length,this.text="",this.mediaChildren=[],this.updateParentNodeText=function(){if(R.length){const ae=R[R.length-1];ae.text+=V.text}},this.updateParentNodeMediaChildren=function(){R.length&&ITe.includes(this.tag)&&R[R.length-1].mediaChildren.push(this.tag)}}t=Object.assign({},li.defaults,t),t.parser=Object.assign({},yTe,t.parser);const i=function(D){return t.allowedTags===!1||(t.allowedTags||[]).indexOf(D)>-1};vTe.forEach(function(D){i(D)&&!t.allowVulnerableTags&&console.warn(` +https://www.w3ctech.com/topic/2226`));let o=n(...i);return o.postcssPlugin=t,o.postcssVersion=new r0().version,o}let s;return Object.defineProperty(a,"postcss",{get(){return s||(s=a()),s}}),a.process=function(i,o,u){return ft([a(u)]).process(i,o)},a};ft.stringify=lTe;ft.parse=ETe;ft.fromJSON=dTe;ft.list=hTe;ft.comment=e=>new Hg(e);ft.atRule=e=>new Vg(e);ft.decl=e=>new zg(e);ft.rule=e=>new jg(e);ft.root=e=>new Kg(e);ft.document=e=>new Bg(e);ft.CssSyntaxError=oTe;ft.Declaration=zg;ft.Container=cTe;ft.Processor=r0;ft.Document=Bg;ft.Comment=Hg;ft.Warning=fTe;ft.AtRule=Vg;ft.Result=pTe;ft.Input=mTe;ft.Rule=jg;ft.Root=Kg;ft.Node=_Te;uTe.registerPostcss(ft);var TTe=ft;ft.default=ft;const gTe=MT,RE=E_e,{isPlainObject:ATe}=Kf,bE=D_e,STe=P_e,{parse:OTe}=TTe,ITe=["img","audio","video","picture","svg","object","map","iframe","embed"],vTe=["script","style"];function Ds(e,t){e&&Object.keys(e).forEach(function(n){t(e[n],n)})}function sr(e,t){return{}.hasOwnProperty.call(e,t)}function NE(e,t){const n=[];return Ds(e,function(r){t(r)&&n.push(r)}),n}function RTe(e){for(const t in e)if(sr(e,t))return!1;return!0}function bTe(e){return e.map(function(t){if(!t.url)throw new Error("URL missing");return t.url+(t.w?` ${t.w}w`:"")+(t.h?` ${t.h}h`:"")+(t.d?` ${t.d}x`:"")}).join(", ")}var NTe=li;const CTe=/^[^\0\t\n\f\r /<=>]+$/;function li(e,t,n){if(e==null)return"";typeof e=="number"&&(e=e.toString());let r="",a="";function s(D,z){const V=this;this.tag=D,this.attribs=z||{},this.tagPosition=r.length,this.text="",this.mediaChildren=[],this.updateParentNodeText=function(){if(R.length){const ae=R[R.length-1];ae.text+=V.text}},this.updateParentNodeMediaChildren=function(){R.length&&ITe.includes(this.tag)&&R[R.length-1].mediaChildren.push(this.tag)}}t=Object.assign({},li.defaults,t),t.parser=Object.assign({},yTe,t.parser);const i=function(D){return t.allowedTags===!1||(t.allowedTags||[]).indexOf(D)>-1};vTe.forEach(function(D){i(D)&&!t.allowVulnerableTags&&console.warn(` ⚠️ Your \`allowedTags\` option includes, \`${D}\`, which is inherently vulnerable to XSS attacks. Please remove it from \`allowedTags\`. Or, to disable this warning, add the \`allowVulnerableTags\` option and ensure you are accounting for this risk. -`)});const o=t.nonTextTags||["script","style","textarea","option"];let u,l;t.allowedAttributes&&(u={},l={},Ds(t.allowedAttributes,function(D,z){u[z]=[];const V=[];D.forEach(function(ae){typeof ae=="string"&&ae.indexOf("*")>=0?V.push(RE(ae).replace(/\\\*/g,".*")):u[z].push(ae)}),V.length&&(l[z]=new RegExp("^("+V.join("|")+")$"))}));const c={},f={},d={};Ds(t.allowedClasses,function(D,z){if(u&&(sr(u,z)||(u[z]=[]),u[z].push("class")),c[z]=D,Array.isArray(D)){const V=[];c[z]=[],d[z]=[],D.forEach(function(ae){typeof ae=="string"&&ae.indexOf("*")>=0?V.push(RE(ae).replace(/\\\*/g,".*")):ae instanceof RegExp?d[z].push(ae):c[z].push(ae)}),V.length&&(f[z]=new RegExp("^("+V.join("|")+")$"))}});const m={};let E;Ds(t.transformTags,function(D,z){let V;typeof D=="function"?V=D:typeof D=="string"&&(V=li.simpleTransform(D)),z==="*"?E=V:m[z]=V});let v,R,I,b,S,O,C=!1;M();const P=new gTe.Parser({onopentag:function(D,z){if(t.enforceHtmlBoundary&&D==="html"&&M(),S){O++;return}const V=new s(D,z);R.push(V);let ae=!1;const Be=!!V.text;let Le;if(sr(m,D)&&(Le=m[D](D,z),V.attribs=z=Le.attribs,Le.text!==void 0&&(V.innerText=Le.text),D!==Le.tagName&&(V.name=D=Le.tagName,b[v]=Le.tagName)),E&&(Le=E(D,z),V.attribs=z=Le.attribs,D!==Le.tagName&&(V.name=D=Le.tagName,b[v]=Le.tagName)),(!i(D)||t.disallowedTagsMode==="recursiveEscape"&&!RTe(I)||t.nestingLimit!=null&&v>=t.nestingLimit)&&(ae=!0,I[v]=!0,t.disallowedTagsMode==="discard"&&o.indexOf(D)!==-1&&(S=!0,O=1),I[v]=!0),v++,ae){if(t.disallowedTagsMode==="discard")return;a=r,r=""}r+="<"+D,D==="script"&&(t.allowedScriptHostnames||t.allowedScriptDomains)&&(V.innerText=""),(!u||sr(u,D)||u["*"])&&Ds(z,function(Oe,Pe){if(!CTe.test(Pe)){delete V.attribs[Pe];return}if(Oe===""&&(t.nonBooleanAttributes.includes(Pe)||t.nonBooleanAttributes.includes("*"))){delete V.attribs[Pe];return}let Ht=!1;if(!u||sr(u,D)&&u[D].indexOf(Pe)!==-1||u["*"]&&u["*"].indexOf(Pe)!==-1||sr(l,D)&&l[D].test(Pe)||l["*"]&&l["*"].test(Pe))Ht=!0;else if(u&&u[D]){for(const xe of u[D])if(ATe(xe)&&xe.name&&xe.name===Pe){Ht=!0;let He="";if(xe.multiple===!0){const ot=Oe.split(" ");for(const q of ot)xe.values.indexOf(q)!==-1&&(He===""?He=q:He+=" "+q)}else xe.values.indexOf(Oe)>=0&&(He=Oe);Oe=He}}if(Ht){if(t.allowedSchemesAppliedToAttributes.indexOf(Pe)!==-1&&G(D,Oe)){delete V.attribs[Pe];return}if(D==="script"&&Pe==="src"){let xe=!0;try{const He=B(Oe);if(t.allowedScriptHostnames||t.allowedScriptDomains){const ot=(t.allowedScriptHostnames||[]).find(function(ce){return ce===He.url.hostname}),q=(t.allowedScriptDomains||[]).find(function(ce){return He.url.hostname===ce||He.url.hostname.endsWith(`.${ce}`)});xe=ot||q}}catch{xe=!1}if(!xe){delete V.attribs[Pe];return}}if(D==="iframe"&&Pe==="src"){let xe=!0;try{const He=B(Oe);if(He.isRelativeUrl)xe=sr(t,"allowIframeRelativeUrls")?t.allowIframeRelativeUrls:!t.allowedIframeHostnames&&!t.allowedIframeDomains;else if(t.allowedIframeHostnames||t.allowedIframeDomains){const ot=(t.allowedIframeHostnames||[]).find(function(ce){return ce===He.url.hostname}),q=(t.allowedIframeDomains||[]).find(function(ce){return He.url.hostname===ce||He.url.hostname.endsWith(`.${ce}`)});xe=ot||q}}catch{xe=!1}if(!xe){delete V.attribs[Pe];return}}if(Pe==="srcset")try{let xe=STe(Oe);if(xe.forEach(function(He){G("srcset",He.url)&&(He.evil=!0)}),xe=NE(xe,function(He){return!He.evil}),xe.length)Oe=bTe(NE(xe,function(He){return!He.evil})),V.attribs[Pe]=Oe;else{delete V.attribs[Pe];return}}catch{delete V.attribs[Pe];return}if(Pe==="class"){const xe=c[D],He=c["*"],ot=f[D],q=d[D],ce=f["*"],de=[ot,ce].concat(q).filter(function(ge){return ge});if(xe&&He?Oe=ne(Oe,bE(xe,He),de):Oe=ne(Oe,xe||He,de),!Oe.length){delete V.attribs[Pe];return}}if(Pe==="style"){if(t.parseStyleAttributes)try{const xe=OTe(D+" {"+Oe+"}"),He=L(xe,t.allowedStyles);if(Oe=X(He),Oe.length===0){delete V.attribs[Pe];return}}catch{typeof window<"u"&&console.warn('Failed to parse "'+D+" {"+Oe+`}", If you're running this in a browser, we recommend to disable style parsing: options.parseStyleAttributes: false, since this only works in a node environment due to a postcss dependency, More info: https://github.com/apostrophecms/sanitize-html/issues/547`),delete V.attribs[Pe];return}else if(t.allowedStyles)throw new Error("allowedStyles option cannot be used together with parseStyleAttributes: false.")}r+=" "+Pe,Oe&&Oe.length&&(r+='="'+w(Oe,!0)+'"')}else delete V.attribs[Pe]}),t.selfClosing.indexOf(D)!==-1?r+=" />":(r+=">",V.innerText&&!Be&&!t.textFilter&&(r+=w(V.innerText),C=!0)),ae&&(r=a+w(r),a="")},ontext:function(D){if(S)return;const z=R[R.length-1];let V;if(z&&(V=z.tag,D=z.innerText!==void 0?z.innerText:D),t.disallowedTagsMode==="discard"&&(V==="script"||V==="style"))r+=D;else{const ae=w(D,!1);t.textFilter&&!C?r+=t.textFilter(ae,V):C||(r+=ae)}if(R.length){const ae=R[R.length-1];ae.text+=D}},onclosetag:function(D,z){if(S)if(O--,!O)S=!1;else return;const V=R.pop();if(!V)return;if(V.tag!==D){R.push(V);return}S=t.enforceHtmlBoundary?D==="html":!1,v--;const ae=I[v];if(ae){if(delete I[v],t.disallowedTagsMode==="discard"){V.updateParentNodeText();return}a=r,r=""}if(b[v]&&(D=b[v],delete b[v]),t.exclusiveFilter&&t.exclusiveFilter(V)){r=r.substr(0,V.tagPosition);return}if(V.updateParentNodeMediaChildren(),V.updateParentNodeText(),t.selfClosing.indexOf(D)!==-1||z&&!i(D)&&["escape","recursiveEscape"].indexOf(t.disallowedTagsMode)>=0){ae&&(r=a,a="");return}r+="",ae&&(r=a+w(r),a=""),C=!1}},t.parser);return P.write(e),P.end(),r;function M(){r="",v=0,R=[],I={},b={},S=!1,O=0}function w(D,z){return typeof D!="string"&&(D=D+""),t.parser.decodeEntities&&(D=D.replace(/&/g,"&").replace(//g,">"),z&&(D=D.replace(/"/g,"""))),D=D.replace(/&(?![a-zA-Z0-9#]{1,20};)/g,"&").replace(//g,">"),z&&(D=D.replace(/"/g,""")),D}function G(D,z){for(z=z.replace(/[\x00-\x20]+/g,"");;){const Be=z.indexOf("",Be+4);if(Le===-1)break;z=z.substring(0,Be)+z.substring(Le+3)}const V=z.match(/^([a-zA-Z][a-zA-Z0-9.\-+]*):/);if(!V)return z.match(/^[/\\]{2}/)?!t.allowProtocolRelative:!1;const ae=V[1].toLowerCase();return sr(t.allowedSchemesByTag,D)?t.allowedSchemesByTag[D].indexOf(ae)===-1:!t.allowedSchemes||t.allowedSchemes.indexOf(ae)===-1}function B(D){if(D=D.replace(/^(\w+:)?\s*[\\/]\s*[\\/]/,"$1//"),D.startsWith("relative:"))throw new Error("relative: exploit attempt");let z="relative://relative-site";for(let Be=0;Be<100;Be++)z+=`/${Be}`;const V=new URL(D,z);return{isRelativeUrl:V&&V.hostname==="relative-site"&&V.protocol==="relative:",url:V}}function L(D,z){if(!z)return D;const V=D.nodes[0];let ae;return z[V.selector]&&z["*"]?ae=bE(z[V.selector],z["*"]):ae=z[V.selector]||z["*"],ae&&(D.nodes[0].nodes=V.nodes.reduce(J(ae),[])),D}function X(D){return D.nodes[0].nodes.reduce(function(z,V){return z.push(`${V.prop}:${V.value}${V.important?" !important":""}`),z},[]).join(";")}function J(D){return function(z,V){return sr(D,V.prop)&&D[V.prop].some(function(Be){return Be.test(V.value)})&&z.push(V),z}}function ne(D,z,V){return z?(D=D.split(/\s+/),D.filter(function(ae){return z.indexOf(ae)!==-1||V.some(function(Be){return Be.test(ae)})}).join(" ")):D}}const yTe={decodeEntities:!0};li.defaults={allowedTags:["address","article","aside","footer","header","h1","h2","h3","h4","h5","h6","hgroup","main","nav","section","blockquote","dd","div","dl","dt","figcaption","figure","hr","li","main","ol","p","pre","ul","a","abbr","b","bdi","bdo","br","cite","code","data","dfn","em","i","kbd","mark","q","rb","rp","rt","rtc","ruby","s","samp","small","span","strong","sub","sup","time","u","var","wbr","caption","col","colgroup","table","tbody","td","tfoot","th","thead","tr"],nonBooleanAttributes:["abbr","accept","accept-charset","accesskey","action","allow","alt","as","autocapitalize","autocomplete","blocking","charset","cite","class","color","cols","colspan","content","contenteditable","coords","crossorigin","data","datetime","decoding","dir","dirname","download","draggable","enctype","enterkeyhint","fetchpriority","for","form","formaction","formenctype","formmethod","formtarget","headers","height","hidden","high","href","hreflang","http-equiv","id","imagesizes","imagesrcset","inputmode","integrity","is","itemid","itemprop","itemref","itemtype","kind","label","lang","list","loading","low","max","maxlength","media","method","min","minlength","name","nonce","optimum","pattern","ping","placeholder","popover","popovertarget","popovertargetaction","poster","preload","referrerpolicy","rel","rows","rowspan","sandbox","scope","shape","size","sizes","slot","span","spellcheck","src","srcdoc","srclang","srcset","start","step","style","tabindex","target","title","translate","type","usemap","value","width","wrap","onauxclick","onafterprint","onbeforematch","onbeforeprint","onbeforeunload","onbeforetoggle","onblur","oncancel","oncanplay","oncanplaythrough","onchange","onclick","onclose","oncontextlost","oncontextmenu","oncontextrestored","oncopy","oncuechange","oncut","ondblclick","ondrag","ondragend","ondragenter","ondragleave","ondragover","ondragstart","ondrop","ondurationchange","onemptied","onended","onerror","onfocus","onformdata","onhashchange","oninput","oninvalid","onkeydown","onkeypress","onkeyup","onlanguagechange","onload","onloadeddata","onloadedmetadata","onloadstart","onmessage","onmessageerror","onmousedown","onmouseenter","onmouseleave","onmousemove","onmouseout","onmouseover","onmouseup","onoffline","ononline","onpagehide","onpageshow","onpaste","onpause","onplay","onplaying","onpopstate","onprogress","onratechange","onreset","onresize","onrejectionhandled","onscroll","onscrollend","onsecuritypolicyviolation","onseeked","onseeking","onselect","onslotchange","onstalled","onstorage","onsubmit","onsuspend","ontimeupdate","ontoggle","onunhandledrejection","onunload","onvolumechange","onwaiting","onwheel"],disallowedTagsMode:"discard",allowedAttributes:{a:["href","name","target"],img:["src","srcset","alt","title","width","height","loading"]},selfClosing:["img","br","hr","area","base","basefont","input","link","meta"],allowedSchemes:["http","https","ftp","mailto","tel"],allowedSchemesByTag:{},allowedSchemesAppliedToAttributes:["href","src","cite"],allowProtocolRelative:!0,enforceHtmlBoundary:!1,parseStyleAttributes:!0};li.simpleTransform=function(e,t,n){return n=n===void 0?!0:n,t=t||{},function(r,a){let s;if(n)for(s in t)a[s]=t[s];else a=t;return{tagName:e,attribs:a}}};const DTe=xd(NTe),di=e=>DTe(she(e,{target:"_blank"}),{allowedTags:["a"],disallowedTagsMode:"escape"}),PTe=e=>(dt("data-v-a720b26e"),e=e(),ft(),e),wTe={id:"admin-app",class:"admin-card"},LTe={for:"admin_contact"},$Te=["value"],kTe=["disabled"],UTe={for:"max_users"},MTe=["disabled"],xTe={class:"user-limit-help"},FTe={class:"info-box"},WTe=PTe(()=>p("i",{class:"fa fa-info-circle","aria-hidden":"true"},null,-1)),GTe={for:"max_single_file_size"},zTe=["disabled"],BTe={for:"max_zip_file_size"},HTe=["disabled"],VTe={for:"gpx_limit_import"},jTe=["disabled"],KTe={class:"about-label",for:"about"},YTe={class:"textarea-description"},qTe=["innerHTML"],XTe={class:"privacy-policy-label",for:"privacy_policy"},ZTe={class:"textarea-description"},QTe=["innerHTML"],JTe={key:5,class:"form-buttons"},ege={class:"confirm",type:"submit"},tge={key:6,class:"form-buttons"},nge=Z({__name:"AdminApplication",props:{appConfig:{},edition:{type:Boolean,default:!1}},setup(e){const t=e,{edition:n}=_e(t),r=Me(),a=Yr(),s=zt({admin_contact:"",max_users:0,max_single_file_size:0,max_zip_file_size:0,gpx_limit_import:0,about:"",privacy_policy:""}),i=$(()=>r.getters[H.GETTERS.ERROR_MESSAGES]);Nt(()=>{t.appConfig&&o(t.appConfig)});function o(c){Object.keys(s).map(f=>{["max_single_file_size","max_zip_file_size"].includes(f)?s[f]=CEe(c[f]):["about","privacy_policy"].includes(f)?s[f]=c[f]!==null?c[f]:"":s[f]=c[f]})}function u(){o(t.appConfig),r.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),a.push("/admin/application")}function l(){const c=Object.assign({},s);c.max_single_file_size*=1048576,c.max_zip_file_size*=1048576,r.dispatch(H.ACTIONS.UPDATE_APPLICATION_CONFIG,c)}return(c,f)=>{const d=oe("ErrorMessage"),m=oe("Card");return A(),N("div",wTe,[k(m,null,{title:ue(()=>[j(T(c.$t("admin.APP_CONFIG.TITLE")),1)]),content:ue(()=>[p("form",{class:"admin-form",onSubmit:Je(l,["prevent"])},[p("label",LTe,[j(T(c.$t("admin.APP_CONFIG.ADMIN_CONTACT"))+": ",1),!h(n)&&!s.admin_contact?(A(),N("input",{key:0,class:"no-contact",value:c.$t("admin.APP_CONFIG.NO_CONTACT_EMAIL"),disabled:""},null,8,$Te)):qe((A(),N("input",{key:1,id:"admin_contact",name:"admin_contact",type:"email","onUpdate:modelValue":f[0]||(f[0]=E=>s.admin_contact=E),disabled:!h(n)},null,8,kTe)),[[at,s.admin_contact]])]),p("label",UTe,[j(T(c.$t("admin.APP_CONFIG.MAX_USERS_LABEL"))+": ",1),qe(p("input",{id:"max_users",name:"max_users",type:"number",min:"0","onUpdate:modelValue":f[1]||(f[1]=E=>s.max_users=E),disabled:!h(n)},null,8,MTe),[[at,s.max_users]])]),p("div",xTe,[p("span",FTe,[WTe,j(" "+T(c.$t("admin.APP_CONFIG.MAX_USERS_HELP")),1)])]),p("label",GTe,[j(T(c.$t("admin.APP_CONFIG.SINGLE_UPLOAD_MAX_SIZE_LABEL"))+": ",1),qe(p("input",{id:"max_single_file_size",name:"max_single_file_size",type:"number",step:"0.1",min:"0","onUpdate:modelValue":f[2]||(f[2]=E=>s.max_single_file_size=E),disabled:!h(n)},null,8,zTe),[[at,s.max_single_file_size]])]),p("label",BTe,[j(T(c.$t("admin.APP_CONFIG.ZIP_UPLOAD_MAX_SIZE_LABEL"))+": ",1),qe(p("input",{id:"max_zip_file_size",name:"max_zip_file_size",type:"number",step:"0.1",min:"0","onUpdate:modelValue":f[3]||(f[3]=E=>s.max_zip_file_size=E),disabled:!h(n)},null,8,HTe),[[at,s.max_zip_file_size]])]),p("label",VTe,[j(T(c.$t("admin.APP_CONFIG.MAX_FILES_IN_ZIP_LABEL"))+": ",1),qe(p("input",{id:"gpx_limit_import",name:"gpx_limit_import",type:"number",min:"0","onUpdate:modelValue":f[4]||(f[4]=E=>s.gpx_limit_import=E),disabled:!h(n)},null,8,jTe),[[at,s.gpx_limit_import]])]),p("label",KTe,T(c.$t("admin.ABOUT.TEXT"))+": ",1),p("span",YTe,T(c.$t("admin.ABOUT.DESCRIPTION")),1),h(n)?qe((A(),N("textarea",{key:0,id:"about",name:"about",rows:"10","onUpdate:modelValue":f[5]||(f[5]=E=>s.about=E)},null,512)),[[at,s.about]]):(A(),N("div",{key:1,innerHTML:h(ca)(h(di)(s.about?s.about:c.$t("admin.NO_TEXT_ENTERED"))),class:"textarea-content"},null,8,qTe)),p("label",XTe,T(Rt(c.$t("privacy_policy.TITLE")))+": ",1),p("span",ZTe,T(c.$t("admin.PRIVACY_POLICY_DESCRIPTION")),1),h(n)?qe((A(),N("textarea",{key:2,id:"privacy_policy",name:"privacy_policy",rows:"20","onUpdate:modelValue":f[6]||(f[6]=E=>s.privacy_policy=E)},null,512)),[[at,s.privacy_policy]]):(A(),N("div",{key:3,innerHTML:h(ca)(h(di)(s.privacy_policy?s.privacy_policy:c.$t("admin.NO_TEXT_ENTERED"))),class:"textarea-content"},null,8,QTe)),i.value?(A(),te(d,{key:4,message:i.value},null,8,["message"])):x("",!0),h(n)?(A(),N("div",JTe,[p("button",ege,T(c.$t("buttons.SUBMIT")),1),p("button",{class:"cancel",onClick:Je(u,["prevent"])},T(c.$t("buttons.CANCEL")),1)])):(A(),N("div",tge,[p("button",{class:"confirm",onClick:f[7]||(f[7]=Je(E=>c.$router.push("/admin/application/edit"),["prevent"]))},T(c.$t("buttons.EDIT")),1),p("button",{class:"cancel",onClick:f[8]||(f[8]=Je(E=>c.$router.push("/admin"),["prevent"]))},T(c.$t("admin.BACK_TO_ADMIN")),1)]))],32)]),_:1})])}}}),CE=re(nge,[["__scopeId","data-v-a720b26e"]]),rge={class:"stat-card"},age={class:"stat-content box"},sge={class:"stat-icon"},ige={class:"stat-details"},oge={class:"stat-huge"},uge={class:"stat"},cr=Z({__name:"StatCard",props:{icon:{},text:{},value:{}},setup(e){const t=e,{icon:n,text:r,value:a}=_e(t);return(s,i)=>(A(),N("div",rge,[p("div",age,[p("div",sge,[p("i",{class:Se(["fa",`fa-${h(n)}`])},null,2)]),p("div",ige,[p("div",oge,T(h(a)),1),p("div",uge,T(h(r)),1)])])]))}}),cge={id:"user-stats"},lge=Z({__name:"AppStatsCards",props:{appStatistics:{}},setup(e){const t=e,{appStatistics:n}=_e(t),r=$(()=>CT(n.value.uploads_dir_size));return(a,s)=>(A(),N("div",cge,[k(cr,{icon:"users",value:h(n).users,text:a.$t("admin.USER",h(n).users)},null,8,["value","text"]),k(cr,{icon:"tags",value:h(n).sports,text:a.$t("workouts.SPORT",h(n).sports)},null,8,["value","text"]),k(cr,{icon:"calendar",value:h(n).workouts,text:a.$t("workouts.WORKOUT",h(n).workouts)},null,8,["value","text"]),k(cr,{icon:"folder-open",value:r.value.size,text:r.value.suffix},null,8,["value","text"])]))}}),Yg=e=>(dt("data-v-efcd2677"),e=e(),ft(),e),dge={id:"admin-menu",class:"center-card"},fge={class:"admin-menu description-list"},pge={class:"application-config-details"},mge=Yg(()=>p("br",null,null,-1)),Ege={class:"registration-status"},hge={key:0,class:"email-sending-status"},_ge=Yg(()=>p("i",{class:"fa fa-exclamation-triangle","aria-hidden":"true"},null,-1)),Tge=Z({__name:"AdminMenu",props:{appConfig:{},appStatistics:{default:()=>({})}},setup(e){const t=e,{appConfig:n,appStatistics:r}=_e(t);return It(()=>{const a=document.getElementById("adminLink");a&&a.focus()}),(a,s)=>{const i=oe("router-link");return A(),N("div",dge,[k(_T,null,{title:ue(()=>[j(T(a.$t("admin.ADMINISTRATION")),1)]),content:ue(()=>[k(lge,{appStatistics:h(r)},null,8,["appStatistics"]),p("div",fge,[p("dl",null,[p("dt",null,[k(i,{id:"adminLink",to:"/admin/application"},{default:ue(()=>[j(T(a.$t("admin.APPLICATION")),1)]),_:1})]),p("dd",pge,[j(T(a.$t("admin.UPDATE_APPLICATION_DESCRIPTION")),1),mge,p("span",Ege,T(a.$t(`admin.REGISTRATION_${h(n).is_registration_enabled?"ENABLED":"DISABLED"}`)),1),h(n).is_email_sending_enabled?x("",!0):(A(),N("span",hge,[_ge,j(" "+T(a.$t("admin.EMAIL_SENDING_DISABLED")),1)]))]),p("dt",null,[k(i,{to:"/admin/sports"},{default:ue(()=>[j(T(Rt(a.$t("workouts.SPORT",0))),1)]),_:1})]),p("dd",null,T(a.$t("admin.ENABLE_DISABLE_SPORTS")),1),p("dt",null,[k(i,{to:"/admin/users"},{default:ue(()=>[j(T(Rt(a.$t("admin.USER",0))),1)]),_:1})]),p("dd",null,T(a.$t("admin.ADMIN_RIGHTS_DELETE_USER_ACCOUNT")),1)])])]),_:1})])}}}),gge=re(Tge,[["__scopeId","data-v-efcd2677"]]),a0={"Cycling (Sport)":"#4c9792","Cycling (Trekking)":"#a8af88","Cycling (Transport)":"#88af98","Cycling (Virtual)":"#64a360",Hiking:"#bb757c","Mountain Biking":"#d4b371","Mountain Biking (Electric)":"#fc9d6f",Mountaineering:"#48b3b7","Open Water Swimming":"#4058a4",Paragliding:"#c23c50",Rowing:"#fcce72",Running:"#835b83","Skiing (Alpine)":"#67a4bd","Skiing (Cross Country)":"#9498d0",Snowshoes:"#5780a8",Trail:"#09a98a",Walking:"#838383"},Age=e=>{const t={};return e.map(n=>t[n.id]=n.color?n.color:a0[n.label]),t},Sge=(e,t)=>{const n=e.translatedLabel.toLowerCase(),r=t.translatedLabel.toLowerCase();return n>r?1:ne.filter(a=>n==="all"?!0:r.includes(a.id)||a[n]).map(a=>({...a,translatedLabel:t(`sports.${a.label}.LABEL`)})).sort(Sge),s0=(e,t)=>t.filter(n=>n.id===e.sport_id).map(n=>n.label)[0],i0=(e,t)=>t.filter(n=>n.id===e.sport_id).map(n=>n.color)[0],Sc=e=>(dt("data-v-203d96b8"),e=e(),ft(),e),Oge={id:"admin-sports",class:"admin-card"},Ige={class:"responsive-table"},vge=Sc(()=>p("th",null,"#",-1)),Rge={class:"text-left"},bge={class:"text-left sport-action"},Nge=Sc(()=>p("th",null,null,-1)),Cge={class:"text-center"},yge=Sc(()=>p("span",{class:"cell-heading"},"id",-1)),Dge={class:"cell-heading"},Pge={class:"sport-label"},wge={class:"cell-heading"},Lge={class:"text-center"},$ge={class:"cell-heading"},kge={class:"sport-action"},Uge={class:"cell-heading"},Mge={class:"action-button"},xge=["onClick"],Fge={key:0,class:"has-workouts"},Wge=Sc(()=>p("i",{class:"fa fa-warning","aria-hidden":"true"},null,-1)),Gge=Z({__name:"AdminSports",setup(e){const{t}=Yt(),n=Me(),r=$(()=>Xr(n.getters[Mt.GETTERS.SPORTS],t)),a=$(()=>n.getters[H.GETTERS.ERROR_MESSAGES]);function s(i,o){n.dispatch(Mt.ACTIONS.UPDATE_SPORTS,{id:i,isActive:o})}return(i,o)=>{const u=oe("SportImage"),l=oe("ErrorMessage"),c=oe("Card");return A(),N("div",Oge,[k(c,null,{title:ue(()=>[j(T(i.$t("admin.SPORTS.TITLE")),1)]),content:ue(()=>[p("button",{class:"top-button",onClick:o[0]||(o[0]=Je(f=>i.$router.push("/admin"),["prevent"]))},T(i.$t("admin.BACK_TO_ADMIN")),1),p("div",Ige,[p("table",null,[p("thead",null,[p("tr",null,[vge,p("th",null,T(i.$t("admin.SPORTS.TABLE.IMAGE")),1),p("th",Rge,T(i.$t("admin.SPORTS.TABLE.LABEL")),1),p("th",null,T(i.$t("admin.SPORTS.TABLE.ACTIVE")),1),p("th",bge,T(i.$t("admin.ACTION")),1),Nge])]),p("tbody",null,[(A(!0),N(Re,null,ze(r.value,f=>(A(),N("tr",{key:f.id},[p("td",Cge,[yge,j(" "+T(f.id),1)]),p("td",null,[p("span",Dge,T(i.$t("admin.SPORTS.TABLE.IMAGE")),1),k(u,{title:f.translatedLabel,"sport-label":f.label,color:f.color},null,8,["title","sport-label","color"])]),p("td",Pge,[p("span",wge,T(i.$t("admin.SPORTS.TABLE.LABEL")),1),j(" "+T(f.translatedLabel),1)]),p("td",Lge,[p("span",$ge,T(i.$t("admin.SPORTS.TABLE.ACTIVE")),1),p("i",{class:Se(`fa fa${f.is_active?"-check":""}`),"aria-hidden":"true"},null,2)]),p("td",kge,[p("span",Uge,T(i.$t("admin.ACTION")),1),p("div",Mge,[p("button",{class:Se({danger:f.is_active}),onClick:d=>s(f.id,!f.is_active)},T(i.$t(`buttons.${f.is_active?"DIS":"EN"}ABLE`)),11,xge),f.has_workouts?(A(),N("span",Fge,[Wge,j(" "+T(i.$t("admin.SPORTS.TABLE.HAS_WORKOUTS")),1)])):x("",!0)])])]))),128))])]),a.value?(A(),te(l,{key:0,message:a.value},null,8,["message"])):x("",!0),p("button",{onClick:o[1]||(o[1]=Je(f=>i.$router.push("/admin"),["prevent"]))},T(i.$t("admin.BACK_TO_ADMIN")),1)])]),_:1})])}}}),zge=re(Gge,[["__scopeId","data-v-203d96b8"]]),Bge={class:"table-selects"},Hge=["value"],Vge=["value"],jge=["value"],Kge=["value"],Yge=["value"],qge=["value"],Xge=Z({__name:"FilterSelects",props:{order_by:{},query:{},sort:{},message:{}},emits:["updateSelect"],setup(e,{emit:t}){const n=e,r=t,{order_by:a,query:s,sort:i,message:o}=_e(n),u=[10,25,50,100];function l(c){r("updateSelect",c.target.id,c.target.value)}return(c,f)=>(A(),N("div",Bge,[p("label",null,[j(T(c.$t("common.SELECTS.ORDER_BY.LABEL"))+": ",1),p("select",{name:"order_by",id:"order_by",value:h(s).order_by,onChange:l},[(A(!0),N(Re,null,ze(h(a),d=>(A(),N("option",{value:d,key:d},T(c.$t(`${h(o)}.${d.toUpperCase()}`)),9,Vge))),128))],40,Hge)]),p("label",null,[j(T(c.$t("common.SELECTS.ORDER.LABEL"))+": ",1),p("select",{name:"order",id:"order",value:h(s).order,onChange:l},[(A(!0),N(Re,null,ze(h(i),d=>(A(),N("option",{value:d,key:d},T(c.$t(`common.SELECTS.ORDER.${d.toUpperCase()}`)),9,Kge))),128))],40,jge)]),p("label",null,[j(T(c.$t("common.SELECTS.PER_PAGE.LABEL"))+": ",1),p("select",{name:"per_page",id:"per_page",value:h(s).per_page,onChange:l},[(A(),N(Re,null,ze(u,d=>p("option",{value:d,key:d},T(d),9,qge)),64))],40,Yge)])]))}}),qg=re(Xge,[["__scopeId","data-v-fc86ab3c"]]),o0=["asc","desc"],Xg=1,Zge=10,Cd=(e,t)=>e&&typeof e=="string"&&+e>0?+e:t,yE=(e,t,n)=>e&&typeof e=="string"&&t.includes(e)?e:n,yd=(e,t,n,r)=>{const s=(r||{}).defaultSort||"asc",i={};return i.page=Cd(e.page,Xg),i.per_page=Cd(e.per_page,Zge),i.order=yE(e.order,o0,s),i.order_by=yE(e.order_by,t,n),typeof e.q=="string"?i.q=e.q:delete i.q,i},Qge=["from","to","ave_speed_from","ave_speed_to","max_speed_from","max_speed_to","distance_from","distance_to","duration_from","duration_to","sport_id","title"],Ca=(e,t=1)=>Array.from({length:e-t+1},(n,r)=>t+r),Jge=(e,t)=>{if(e<0)return[];if(e<9)return Ca(e);let n=[1,2];return t<4?n=n.concat([3,4,5]):t<6?n=n.concat(Ca(t+2,3)):(n=n.concat(["..."]),t=e-2&&+n[n.length-1](dt("data-v-69dd9739"),e=e(),ft(),e),eAe={class:"pagination-center","aria-label":"navigation"},tAe={class:"pagination"},nAe=Zg(()=>p("i",{class:"fa fa-chevron-left","aria-hidden":"true"},null,-1)),rAe={key:0},aAe=Zg(()=>p("i",{class:"fa fa-chevron-right","aria-hidden":"true"},null,-1)),sAe=Z({__name:"Pagination",props:{pagination:{},path:{},query:{}},setup(e){const t=e,{pagination:n,path:r,query:a}=_e(t);function s(i,o){const u=Object.assign({},a.value);return u.page=o?i+o:i,u}return(i,o)=>{const u=oe("router-link");return A(),N("nav",eAe,[p("ul",tAe,[p("li",{class:Se(["page-prev",{disabled:!h(n).has_prev}])},[k(u,{class:"page-link",to:{path:h(r),query:s(h(n).page,-1)},disabled:!h(n).has_prev,tabindex:h(n).has_prev?0:-1},{default:ue(({navigate:l})=>[Ba(i.$slots,"default",{onClick:c=>h(n).has_next?l:null},()=>[j(T(i.$t("api.PAGINATION.PREVIOUS"))+" ",1),nAe],!0)]),_:3},8,["to","disabled","tabindex"])],2),(A(!0),N(Re,null,ze(h(Jge)(h(n).pages,h(n).page),l=>(A(),N("li",{key:l,class:Se(["page",{active:l===h(n).page}])},[l==="..."?(A(),N("span",rAe," ... ")):(A(),te(u,{key:1,class:"page-link",to:{path:h(r),query:s(+l)}},{default:ue(()=>[j(T(l),1)]),_:2},1032,["to"]))],2))),128)),p("li",{class:Se(["page-next",{disabled:!h(n).has_next}])},[k(u,{class:"page-link",to:{path:h(r),query:s(h(n).page,1)},disabled:!h(n).has_next,tabindex:h(n).has_next?0:-1},{default:ue(({navigate:l})=>[Ba(i.$slots,"default",{onClick:c=>h(n).has_next?l:null},()=>[j(T(i.$t("api.PAGINATION.NEXT"))+" ",1),aAe],!0)]),_:3},8,["to","disabled","tabindex"])],2)])])}}}),$u=re(sAe,[["__scopeId","data-v-69dd9739"]]),iAe={class:"users-filters"},oAe={class:"search-username"},uAe=["placeholder"],cAe=Z({__name:"UsersNameFilter",emits:["filterOnUsername"],setup(e,{emit:t}){const n=qt(),r=le(n.query.q?n.query.q:""),a=t;function s(){r.value!==""&&a("filterOnUsername",r)}function i(){r.value="",a("filterOnUsername",r.value)}return(o,u)=>(A(),N("div",iAe,[p("div",oAe,[qe(p("input",{id:"username",name:"username","onUpdate:modelValue":u[0]||(u[0]=l=>r.value=l),onKeyup:gt(s,["enter"]),placeholder:o.$t("user.FILTER_ON_USERNAME")},null,40,uAe),[[at,r.value,void 0,{trim:!0}]]),r.value!==""?(A(),N("i",{key:0,class:"fa fa-times","aria-hidden":"true",onClick:i})):x("",!0)]),p("i",{class:Se(["fa fa-search",{"fa-disabled":r.value===""}]),"aria-hidden":"true",onClick:s},null,2)]))}}),lAe=re(cAe,[["__scopeId","data-v-553040c7"]]);var Dd={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=n;function n(r){if(r===null||r===!0||r===!1)return NaN;var a=Number(r);return isNaN(a)?a:a<0?Math.ceil(a):Math.floor(a)}e.exports=t.default})(Dd,Dd.exports);var dAe=Dd.exports;const fAe=xd(dAe);var Pd={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=n;function n(r){var a=new Date(Date.UTC(r.getFullYear(),r.getMonth(),r.getDate(),r.getHours(),r.getMinutes(),r.getSeconds(),r.getMilliseconds()));return a.setUTCFullYear(r.getFullYear()),r.getTime()-a.getTime()}e.exports=t.default})(Pd,Pd.exports);var pAe=Pd.exports;const DE=xd(pAe);function mAe(e,t){var n=TAe(t);return n.formatToParts?hAe(n,e):_Ae(n,e)}var EAe={year:0,month:1,day:2,hour:3,minute:4,second:5};function hAe(e,t){try{for(var n=e.formatToParts(t),r=[],a=0;a=0&&(r[s]=parseInt(n[a].value,10))}return r}catch(i){if(i instanceof RangeError)return[NaN];throw i}}function _Ae(e,t){var n=e.format(t).replace(/\u200E/g,""),r=/(\d+)\/(\d+)\/(\d+),? (\d+):(\d+):(\d+)/.exec(n);return[r[3],r[1],r[2],r[4],r[5],r[6]]}var sl={};function TAe(e){if(!sl[e]){var t=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:"America/New_York",year:"numeric",month:"numeric",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}).format(new Date("2014-06-25T04:00:00.123Z")),n=t==="06/25/2014, 00:00:00"||t==="‎06‎/‎25‎/‎2014‎ ‎00‎:‎00‎:‎00";sl[e]=n?new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:e,year:"numeric",month:"numeric",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}):new Intl.DateTimeFormat("en-US",{hourCycle:"h23",timeZone:e,year:"numeric",month:"numeric",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"})}return sl[e]}function Qg(e,t,n,r,a,s,i){var o=new Date(0);return o.setUTCFullYear(e,t,n),o.setUTCHours(r,a,s,i),o}var PE=36e5,gAe=6e4,il={timezone:/([Z+-].*)$/,timezoneZ:/^(Z)$/,timezoneHH:/^([+-]\d{2})$/,timezoneHHMM:/^([+-]\d{2}):?(\d{2})$/};function Jg(e,t,n){var r,a;if(!e||(r=il.timezoneZ.exec(e),r))return 0;var s;if(r=il.timezoneHH.exec(e),r)return s=parseInt(r[1],10),wE(s)?-(s*PE):NaN;if(r=il.timezoneHHMM.exec(e),r){s=parseInt(r[1],10);var i=parseInt(r[2],10);return wE(s,i)?(a=Math.abs(s)*PE+i*gAe,s>0?-a:a):NaN}if(OAe(e)){t=new Date(t||Date.now());var o=n?t:AAe(t),u=wd(o,e),l=n?u:SAe(t,u,e);return-l}return NaN}function AAe(e){return Qg(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds())}function wd(e,t){var n=mAe(e,t),r=Qg(n[0],n[1]-1,n[2],n[3]%24,n[4],n[5],0).getTime(),a=e.getTime(),s=a%1e3;return a-=s>=0?s:1e3+s,r-a}function SAe(e,t,n){var r=e.getTime(),a=r-t,s=wd(new Date(a),n);if(t===s)return t;a-=s-t;var i=wd(new Date(a),n);return s===i?s:Math.max(s,i)}function wE(e,t){return-23<=e&&e<=23&&(t==null||0<=t&&t<=59)}var LE={};function OAe(e){if(LE[e])return!0;try{return new Intl.DateTimeFormat(void 0,{timeZone:e}),LE[e]=!0,!0}catch{return!1}}var IAe=/(Z|[+-]\d{2}(?::?\d{2})?| UTC| [a-zA-Z]+\/[a-zA-Z_]+(?:\/[a-zA-Z_]+)?)$/,ol=36e5,$E=6e4,vAe=2,en={dateTimePattern:/^([0-9W+-]+)(T| )(.*)/,datePattern:/^([0-9W+-]+)(.*)/,plainTime:/:/,YY:/^(\d{2})$/,YYY:[/^([+-]\d{2})$/,/^([+-]\d{3})$/,/^([+-]\d{4})$/],YYYY:/^(\d{4})/,YYYYY:[/^([+-]\d{4})/,/^([+-]\d{5})/,/^([+-]\d{6})/],MM:/^-(\d{2})$/,DDD:/^-?(\d{3})$/,MMDD:/^-?(\d{2})-?(\d{2})$/,Www:/^-?W(\d{2})$/,WwwD:/^-?W(\d{2})-?(\d{1})$/,HH:/^(\d{2}([.,]\d*)?)$/,HHMM:/^(\d{2}):?(\d{2}([.,]\d*)?)$/,HHMMSS:/^(\d{2}):?(\d{2}):?(\d{2}([.,]\d*)?)$/,timeZone:IAe};function RAe(e,t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");if(e===null)return new Date(NaN);var n=t||{},r=n.additionalDigits==null?vAe:fAe(n.additionalDigits);if(r!==2&&r!==1&&r!==0)throw new RangeError("additionalDigits must be 0, 1 or 2");if(e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]")return new Date(e.getTime());if(typeof e=="number"||Object.prototype.toString.call(e)==="[object Number]")return new Date(e);if(!(typeof e=="string"||Object.prototype.toString.call(e)==="[object String]"))return new Date(NaN);var a=bAe(e),s=NAe(a.date,r),i=s.year,o=s.restDateString,u=CAe(o,i);if(isNaN(u))return new Date(NaN);if(u){var l=u.getTime(),c=0,f;if(a.time&&(c=yAe(a.time),isNaN(c)))return new Date(NaN);if(a.timeZone||n.timeZone){if(f=Jg(a.timeZone||n.timeZone,new Date(l+c)),isNaN(f))return new Date(NaN)}else f=DE(new Date(l+c)),f=DE(new Date(l+c+f));return new Date(l+c+f)}else return new Date(NaN)}function bAe(e){var t={},n=en.dateTimePattern.exec(e),r;if(n?(t.date=n[1],r=n[3]):(n=en.datePattern.exec(e),n?(t.date=n[1],r=n[2]):(t.date=null,r=e)),r){var a=en.timeZone.exec(r);a?(t.time=r.replace(a[1],""),t.timeZone=a[1].trim()):t.time=r}return t}function NAe(e,t){var n=en.YYY[t],r=en.YYYYY[t],a;if(a=en.YYYY.exec(e)||r.exec(e),a){var s=a[1];return{year:parseInt(s,10),restDateString:e.slice(s.length)}}if(a=en.YY.exec(e)||n.exec(e),a){var i=a[1];return{year:parseInt(i,10)*100,restDateString:e.slice(i.length)}}return{year:null}}function CAe(e,t){if(t===null)return null;var n,r,a,s;if(e.length===0)return r=new Date(0),r.setUTCFullYear(t),r;if(n=en.MM.exec(e),n)return r=new Date(0),a=parseInt(n[1],10)-1,UE(t,a)?(r.setUTCFullYear(t,a),r):new Date(NaN);if(n=en.DDD.exec(e),n){r=new Date(0);var i=parseInt(n[1],10);return wAe(t,i)?(r.setUTCFullYear(t,0,i),r):new Date(NaN)}if(n=en.MMDD.exec(e),n){r=new Date(0),a=parseInt(n[1],10)-1;var o=parseInt(n[2],10);return UE(t,a,o)?(r.setUTCFullYear(t,a,o),r):new Date(NaN)}if(n=en.Www.exec(e),n)return s=parseInt(n[1],10)-1,ME(t,s)?kE(t,s):new Date(NaN);if(n=en.WwwD.exec(e),n){s=parseInt(n[1],10)-1;var u=parseInt(n[2],10)-1;return ME(t,s,u)?kE(t,s,u):new Date(NaN)}return null}function yAe(e){var t,n,r;if(t=en.HH.exec(e),t)return n=parseFloat(t[1].replace(",",".")),ul(n)?n%24*ol:NaN;if(t=en.HHMM.exec(e),t)return n=parseInt(t[1],10),r=parseFloat(t[2].replace(",",".")),ul(n,r)?n%24*ol+r*$E:NaN;if(t=en.HHMMSS.exec(e),t){n=parseInt(t[1],10),r=parseInt(t[2],10);var a=parseFloat(t[3].replace(",","."));return ul(n,r,a)?n%24*ol+r*$E+a*1e3:NaN}return null}function kE(e,t,n){t=t||0,n=n||0;var r=new Date(0);r.setUTCFullYear(e,0,4);var a=r.getUTCDay()||7,s=t*7+n+1-a;return r.setUTCDate(r.getUTCDate()+s),r}var DAe=[31,28,31,30,31,30,31,31,30,31,30,31],PAe=[31,29,31,30,31,30,31,31,30,31,30,31];function eA(e){return e%400===0||e%4===0&&e%100!==0}function UE(e,t,n){if(t<0||t>11)return!1;if(n!=null){if(n<1)return!1;var r=eA(e);if(r&&n>PAe[t]||!r&&n>DAe[t])return!1}return!0}function wAe(e,t){if(t<1)return!1;var n=eA(e);return!(n&&t>366||!n&&t>365)}function ME(e,t,n){return!(t<0||t>52||n!=null&&(n<0||n>6))}function ul(e,t,n){return!(e!=null&&(e<0||e>=25)||t!=null&&(t<0||t>=60)||n!=null&&(n<0||n>=60))}function LAe(e,t,n){var r=RAe(e,n),a=Jg(t,r,!0),s=new Date(r.getTime()-a),i=new Date(0);return i.setFullYear(s.getUTCFullYear(),s.getUTCMonth(),s.getUTCDate()),i.setHours(s.getUTCHours(),s.getUTCMinutes(),s.getUTCSeconds(),s.getUTCMilliseconds()),i}const{locale:ku}=_a.global,$Ae=(e,t,n)=>{switch(e){case"week":return tc(t,{weekStartsOn:n?1:0});case"year":return Sf(t);case"month":return Ri(t);default:throw new Error(`Invalid duration, expected: "week", "month", "year", got: "${e}"`)}},kAe=(e,t)=>{switch(e){case"week":return Ii(t,7);case"year":return Ho(t,1);case"month":return Ka(t,1);default:throw new Error(`Invalid duration, expected: "week", "month", "year", got: "${e}"`)}},Oc=(e,t)=>LAe(new Date(e),t),xE=(e,t)=>{const n=Ri(e),r=vi(e),a=t?1:0;return{start:tc(n,{weekStartsOn:a}),end:Of(r,{weekStartsOn:a})}},tA=(e,t=null,n=null)=>(t||(t="yyyy/MM/dd"),t=ga(t,ku.value),n||(n="HH:mm"),{workout_date:dn(e,t,{locale:bi[ku.value]}),workout_time:dn(e,n)}),UAe=["MM/dd/yyyy","dd/MM/yyyy","yyyy-MM-dd","date_string"],nA={de:"do MMM yyyy",en:"MMM. do, yyyy",es:"d MMM yyyy",fr:"d MMM yyyy",gl:"d MMM yyyy",it:"d MMM yyyy",pl:"d MMM yyyy",nb:"do MMM yyyy",nl:"d MMM yyyy"},ga=(e,t)=>e==="date_string"?nA[t]:e,kn=(e,t,n,r=!0,a=null,s=!1)=>{a||(a=ku.value);const i=r?s?" HH:mm:ss":" HH:mm":"";return dn(Oc(e,t),`${ga(n,a)}${i}`,{locale:bi[a]})},MAe=(e,t,n=null)=>{const r=n||ku.value,a=[];return UAe.map(s=>{const i=ga(s,r);a.push({label:`${i} - ${kn(e,t,i,!1,r)}`,value:s})}),a},xAe=e=>(dt("data-v-4beb3bfa"),e=e(),ft(),e),FAe={id:"admin-users",class:"admin-card"},WAe={key:0,class:"no-users"},GAe={key:1,class:"responsive-table"},zAe=xAe(()=>p("th",null,"#",-1)),BAe={class:"left-text"},HAe={class:"left-text"},VAe={class:"left-text"},jAe={class:"cell-heading"},KAe={class:"cell-heading"},YAe={class:"cell-heading"},qAe={class:"cell-heading"},XAe={class:"text-center"},ZAe={class:"cell-heading"},QAe={class:"text-center"},JAe={class:"cell-heading"},eSe={class:"text-center"},tSe={class:"cell-heading"},nSe={class:"text-center"},rSe={class:"cell-heading"},aSe=["disabled","onClick"],FE="created_at",sSe=Z({__name:"AdminUsers",setup(e){const t=Me(),n=qt(),r=Yr(),a=["is_active","admin","created_at","username","workouts_count"];let s=zt(yd(n.query,a,FE));const i=$(()=>t.getters[K.GETTERS.AUTH_USER_PROFILE]),o=$(()=>t.getters[De.GETTERS.USERS]),u=$(()=>t.getters[De.GETTERS.USERS_PAGINATION]),l=$(()=>t.getters[H.GETTERS.ERROR_MESSAGES]);Nt(()=>c(s));function c(E){t.dispatch(De.ACTIONS.GET_USERS,E)}function f(E){m("q",E.value)}function d(E,v){t.dispatch(De.ACTIONS.UPDATE_USER,{username:E,admin:v})}function m(E,v){s[E]=v,E==="per_page"&&(s.page=1),r.push({path:"/admin/users",query:s})}return Ct(()=>{t.dispatch(De.ACTIONS.EMPTY_USERS)}),Ge(()=>n.query,E=>{s=yd(E,a,FE,{query:s}),c(s)}),(E,v)=>{const R=oe("router-link"),I=oe("ErrorMessage"),b=oe("Card");return A(),N("div",FAe,[k(b,null,{title:ue(()=>[j(T(Rt(E.$t("admin.USER",0))),1)]),content:ue(()=>[p("button",{class:"top-button",onClick:v[0]||(v[0]=Je(S=>E.$router.push("/admin"),["prevent"]))},T(E.$t("admin.BACK_TO_ADMIN")),1),k(lAe,{onFilterOnUsername:f}),k(qg,{sort:h(o0),order_by:a,query:h(s),message:"admin.USERS.SELECTS.ORDER_BY",onUpdateSelect:m},null,8,["sort","query"]),o.value.length===0?(A(),N("div",WAe,T(E.$t("user.NO_USERS_FOUND")),1)):(A(),N("div",GAe,[p("table",null,[p("thead",null,[p("tr",null,[zAe,p("th",BAe,T(E.$t("user.USERNAME")),1),p("th",HAe,T(E.$t("user.EMAIL")),1),p("th",VAe,T(E.$t("user.PROFILE.REGISTRATION_DATE")),1),p("th",null,T(Rt(E.$t("workouts.WORKOUT",0))),1),p("th",null,T(E.$t("admin.ACTIVE")),1),p("th",null,T(E.$t("user.ADMIN")),1),p("th",null,T(E.$t("admin.ACTION")),1)])]),p("tbody",null,[(A(!0),N(Re,null,ze(o.value,S=>(A(),N("tr",{key:S.username},[p("td",null,[p("span",jAe,T(E.$t("user.PROFILE.PICTURE")),1),k(Oi,{user:S},null,8,["user"])]),p("td",null,[p("span",KAe,T(E.$t("user.USERNAME")),1),k(R,{to:`/admin/users/${S.username}`},{default:ue(()=>[j(T(S.username),1)]),_:2},1032,["to"])]),p("td",null,[p("span",YAe,T(E.$t("user.EMAIL")),1),j(" "+T(S.email),1)]),p("td",null,[p("span",qAe,T(E.$t("user.PROFILE.REGISTRATION_DATE")),1),p("time",null,T(h(kn)(S.created_at,i.value.timezone,i.value.date_format)),1)]),p("td",XAe,[p("span",ZAe,T(Rt(E.$t("workouts.WORKOUT",0))),1),j(" "+T(S.nb_workouts),1)]),p("td",QAe,[p("span",JAe,T(E.$t("admin.ACTIVE")),1),p("i",{class:Se(`fa fa${S.is_active?"-check":""}-square-o`),"aria-hidden":"true"},null,2)]),p("td",eSe,[p("span",tSe,T(E.$t("user.ADMIN")),1),p("i",{class:Se(`fa fa${S.admin?"-check":""}-square-o`),"aria-hidden":"true"},null,2)]),p("td",nSe,[p("span",rSe,T(E.$t("admin.ACTION")),1),p("button",{class:Se({danger:S.admin}),disabled:S.username===i.value.username,onClick:O=>d(S.username,!S.admin)},T(E.$t(`admin.USERS.TABLE.${S.admin?"REMOVE":"ADD"}_ADMIN_RIGHTS`)),11,aSe)])]))),128))])]),u.value.page?(A(),te($u,{key:0,path:"/admin/users",pagination:u.value,query:h(s)},null,8,["pagination","query"])):x("",!0),l.value?(A(),te(I,{key:1,message:l.value},null,8,["message"])):x("",!0),p("button",{onClick:v[1]||(v[1]=Je(S=>E.$router.push("/admin"),["prevent"]))},T(E.$t("admin.BACK_TO_ADMIN")),1)]))]),_:1})])}}}),iSe=re(sSe,[["__scopeId","data-v-4beb3bfa"]]),oSe={class:"box user-header"},uSe={class:"user-details"},cSe={class:"user-name"},lSe={class:"user-stats"},dSe={class:"user-stat"},fSe={class:"stat-number"},pSe={class:"stat-label"},mSe={class:"user-stat"},ESe={class:"stat-label"},hSe={class:"user-stat hide-small"},_Se={class:"stat-number"},TSe={class:"stat-label"},gSe=Z({__name:"UserHeader",props:{user:{}},setup(e){const t=e,{user:n}=_e(t),r=Me(),a=$(()=>r.getters[K.GETTERS.AUTH_USER_PROFILE]);return(s,i)=>{const o=oe("Distance");return A(),N("div",oSe,[k(Oi,{user:h(n)},null,8,["user"]),p("div",uSe,[p("div",cSe,T(h(n).username),1),p("div",lSe,[p("div",dSe,[p("span",fSe,T(h(n).nb_workouts),1),p("span",pSe,T(s.$t("workouts.WORKOUT",h(n).nb_workouts)),1)]),p("div",mSe,[k(o,{distance:h(n).total_distance,unitFrom:"km",digits:0,displayUnit:!1,useImperialUnits:a.value.imperial_units},null,8,["distance","useImperialUnits"]),p("span",ESe,T(a.value.imperial_units?"miles":"km"),1)]),p("div",hSe,[p("span",_Se,T(h(n).nb_sports),1),p("span",TSe,T(s.$t("workouts.SPORT",h(n).nb_sports)),1)])])])])}}}),rA=re(gSe,[["__scopeId","data-v-3abb1646"]]),ASe={class:"profile-tabs custom-checkboxes-group"},SSe={class:"profile-tabs-checkboxes custom-checkboxes"},OSe=["id","name","checked","disabled","onInput"],ISe=["id","onKeydown"],aA=Z({__name:"UserProfileTabs",props:{tabs:{},selectedTab:{},edition:{type:Boolean},disabled:{type:Boolean,default:!1}},setup(e){const t=e,{tabs:n,selectedTab:r,disabled:a}=_e(t);It(()=>{const i=document.getElementById(`tab-${n.value[0]}`);i&&i.focus()});function s(i){switch(i){case"ACCOUNT":case"PICTURE":case"PRIVACY-POLICY":return`/profile/edit/${i.toLocaleLowerCase()}`;case"APPS":case"PREFERENCES":case"SPORTS":return`/profile${t.edition?"/edit":""}/${i.toLocaleLowerCase()}`;default:case"PROFILE":return`/profile${t.edition?"/edit":""}`}}return(i,o)=>(A(),N("div",ASe,[p("div",SSe,[(A(!0),N(Re,null,ze(h(n),u=>(A(),N("div",{class:"profile-tab custom-checkbox",key:u},[p("label",null,[p("input",{type:"radio",id:u,name:u,checked:h(r).split("/")[0]===u,disabled:h(a),onInput:l=>i.$router.push(s(u))},null,40,OSe),p("span",{id:`tab-${u}`,tabindex:0,role:"button",onKeydown:gt(l=>i.$router.push(s(u)),["enter"])},T(i.$t(`user.PROFILE.TABS.${u}`)),41,ISe)])]))),128))])]))}}),vSe={id:"user-profile"},RSe={class:"box"},bSe=Z({__name:"index",props:{user:{},tab:{}},setup(e){const t=e,{user:n,tab:r}=_e(t),a=["PROFILE","PREFERENCES","SPORTS","APPS"];return(s,i)=>{const o=oe("router-view");return A(),N("div",vSe,[k(rA,{user:h(n)},null,8,["user"]),p("div",RSe,[k(aA,{tabs:a,selectedTab:h(r),edition:!1},null,8,["selectedTab"]),k(o,{user:h(n)},null,8,["user"])])])}}}),NSe=re(bSe,[["__scopeId","data-v-8a058d49"]]),CSe={id:"user-infos",class:"description-list"},ySe={key:1,class:"info-box success-message"},DSe={key:4,class:"email-form form-box"},PSe={class:"form-items",for:"email"},wSe={class:"form-items",for:"email"},LSe={class:"form-buttons"},$Se={class:"confirm",type:"submit"},kSe={key:5},USe={key:0},MSe={class:"user-bio"},xSe={key:0,class:"profile-buttons"},FSe={key:1,class:"profile-buttons"},WSe=Z({__name:"UserInfos",props:{user:{},fromAdmin:{type:Boolean,default:!1}},setup(e){const t=e,n=Me(),{user:r,fromAdmin:a}=_e(t),s=$(()=>n.getters[H.GETTERS.LANGUAGE]),i=$(()=>n.getters[K.GETTERS.AUTH_USER_PROFILE]),o=$(()=>t.user.created_at?kn(t.user.created_at,i.value.timezone,i.value.date_format):""),u=$(()=>t.user.birth_date?dn(new Date(t.user.birth_date),`${ga(i.value.date_format,s.value)}`,{locale:bi[s.value]}):""),l=$(()=>n.getters[De.GETTERS.USERS_IS_SUCCESS]),c=$(()=>n.getters[H.GETTERS.ERROR_MESSAGES]),f=$(()=>n.getters[H.GETTERS.APP_CONFIG]),d=le(""),m=le(!1),E=le(!1),v=le(""),R=le("");function I(G){d.value=G,G!==""&&n.commit(De.MUTATIONS.UPDATE_IS_SUCCESS,!1)}function b(G){n.dispatch(De.ACTIONS.DELETE_USER_ACCOUNT,{username:G})}function S(G){R.value="password-reset",n.dispatch(De.ACTIONS.UPDATE_USER,{username:G,resetPassword:!0})}function O(G){n.dispatch(De.ACTIONS.UPDATE_USER,{username:G,activate:!0})}function C(){w(),v.value=r.value.email_to_confirm?r.value.email_to_confirm:"",E.value=!0,R.value="email-update"}function P(){v.value="",E.value=!1}function M(G){n.dispatch(De.ACTIONS.UPDATE_USER,{username:G,new_email:v.value})}function w(){n.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),n.commit(De.MUTATIONS.UPDATE_IS_SUCCESS,!1),R.value=""}return Ct(()=>w()),Ge(()=>l.value,G=>{G&&(I(""),P())}),(G,B)=>{const L=oe("Modal"),X=oe("AlertMessage"),J=oe("ErrorMessage");return A(),N("div",CSe,[d.value?(A(),te(L,{key:0,title:G.$t("common.CONFIRMATION"),message:d.value==="delete"?"admin.CONFIRM_USER_ACCOUNT_DELETION":"admin.CONFIRM_USER_PASSWORD_RESET",strongMessage:h(r).username,onConfirmAction:B[0]||(B[0]=ne=>d.value==="delete"?b(h(r).username):S(h(r).username)),onCancelAction:B[1]||(B[1]=ne=>I("")),onKeydown:B[2]||(B[2]=gt(ne=>I(""),["esc"]))},null,8,["title","message","strongMessage"])):x("",!0),l.value?(A(),N("div",ySe,T(G.$t(`admin.${R.value==="password-reset"?"PASSWORD_RESET":"USER_EMAIL_UPDATE"}_SUCCESSFUL`)),1)):x("",!0),h(r).is_active?x("",!0):(A(),te(X,{key:2,message:"user.THIS_USER_ACCOUNT_IS_INACTIVE"})),c.value?(A(),te(J,{key:3,message:c.value},null,8,["message"])):x("",!0),E.value?(A(),N("div",DSe,[p("form",{class:Se({errors:m.value}),onSubmit:B[5]||(B[5]=Je(ne=>M(h(r).username),["prevent"]))},[p("label",PSe,[j(T(G.$t("admin.CURRENT_EMAIL"))+" ",1),qe(p("input",{id:"email",type:"email","onUpdate:modelValue":B[3]||(B[3]=ne=>h(r).email=ne),disabled:""},null,512),[[at,h(r).email]])]),p("label",wSe,[j(T(G.$t("admin.NEW_EMAIL"))+"* ",1),qe(p("input",{id:"new-email",type:"email",required:"","onUpdate:modelValue":B[4]||(B[4]=ne=>v.value=ne)},null,512),[[at,v.value]])]),p("div",LSe,[p("button",$Se,T(G.$t("buttons.SUBMIT")),1),p("button",{class:"cancel",onClick:Je(P,["prevent"])},T(G.$t("buttons.CANCEL")),1)])],34)])):(A(),N("div",kSe,[p("dl",null,[p("dt",null,T(G.$t("user.PROFILE.REGISTRATION_DATE"))+":",1),p("dd",null,[p("time",null,T(o.value),1)]),p("dt",null,T(G.$t("user.PROFILE.FIRST_NAME"))+":",1),p("dd",null,T(h(r).first_name),1),p("dt",null,T(G.$t("user.PROFILE.LAST_NAME"))+":",1),p("dd",null,T(h(r).last_name),1),p("dt",null,T(G.$t("user.PROFILE.BIRTH_DATE"))+":",1),p("dd",null,[u.value?(A(),N("time",USe,T(u.value),1)):x("",!0)]),p("dt",null,T(G.$t("user.PROFILE.LOCATION"))+":",1),p("dd",null,T(h(r).location),1),p("dt",null,T(G.$t("user.PROFILE.BIO"))+":",1),p("dd",MSe,T(h(r).bio),1)]),h(a)?(A(),N("div",xSe,[i.value.username!==h(r).username?(A(),N("button",{key:0,class:"danger",onClick:B[6]||(B[6]=Je(ne=>I("delete"),["prevent"]))},T(G.$t("admin.DELETE_USER")),1)):x("",!0),h(r).is_active?x("",!0):(A(),N("button",{key:1,onClick:B[7]||(B[7]=Je(ne=>O(h(r).username),["prevent"]))},T(G.$t("admin.ACTIVATE_USER_ACCOUNT")),1)),i.value.username!==h(r).username?(A(),N("button",{key:2,onClick:Je(C,["prevent"])},T(G.$t("admin.UPDATE_USER_EMAIL")),1)):x("",!0),i.value.username!==h(r).username&&f.value.is_email_sending_enabled?(A(),N("button",{key:3,onClick:B[8]||(B[8]=Je(ne=>I("reset"),["prevent"]))},T(G.$t("admin.RESET_USER_PASSWORD")),1)):x("",!0),p("button",{onClick:B[9]||(B[9]=ne=>G.$router.go(-1))},T(G.$t("buttons.BACK")),1)])):(A(),N("div",FSe,[p("button",{onClick:B[10]||(B[10]=ne=>G.$router.push("/profile/edit"))},T(G.$t("user.PROFILE.EDIT")),1),p("button",{onClick:B[11]||(B[11]=ne=>G.$router.push("/"))},T(G.$t("common.HOME")),1)]))]))])}}}),sA=re(WSe,[["__scopeId","data-v-98220281"]]),GSe=e=>(dt("data-v-b0528e22"),e=e(),ft(),e),zSe={id:"user-preferences",class:"description-list"},BSe={class:"preferences-section"},HSe={class:"preferences-section"},VSe={class:"info-box raw-speed-help"},jSe=GSe(()=>p("i",{class:"fa fa-info-circle","aria-hidden":"true"},null,-1)),KSe={class:"profile-buttons"},YSe=Z({__name:"UserPreferences",props:{user:{}},setup(e){const t=e,n=Me(),r=$(()=>n.getters[H.GETTERS.LANGUAGE]),a=$(()=>t.user.language?Xl[t.user.language]:Xl.en),s=$(()=>t.user.weekm?"MONDAY":"SUNDAY"),i=$(()=>t.user.timezone?t.user.timezone:"Europe/Paris"),o=$(()=>t.user.date_format?t.user.date_format:"MM/dd/yyyy"),u=$(()=>t.user.display_ascent?"DISPLAYED":"HIDDEN"),l=$(()=>t.user.use_dark_mode===!0?"DARK":t.user.use_dark_mode===!1?"LIGHT":"DEFAULT");return(c,f)=>(A(),N("div",zSe,[p("div",BSe,T(c.$t("user.PROFILE.INTERFACE")),1),p("dl",null,[p("dt",null,T(c.$t("user.PROFILE.LANGUAGE"))+":",1),p("dd",null,T(a.value),1),p("dt",null,T(c.$t("user.PROFILE.THEME_MODE.LABEL"))+":",1),p("dd",null,T(c.$t(`user.PROFILE.THEME_MODE.VALUES.${l.value}`)),1),p("dt",null,T(c.$t("user.PROFILE.TIMEZONE"))+":",1),p("dd",null,T(i.value),1),p("dt",null,T(c.$t("user.PROFILE.DATE_FORMAT"))+":",1),p("dd",null,T(h(ga)(o.value,r.value)),1),p("dt",null,T(c.$t("user.PROFILE.FIRST_DAY_OF_WEEK"))+":",1),p("dd",null,T(c.$t(`user.PROFILE.${s.value}`)),1)]),p("div",HSe,T(c.$t("workouts.WORKOUT",0)),1),p("dl",null,[p("dt",null,T(c.$t("user.PROFILE.UNITS.LABEL"))+":",1),p("dd",null,T(c.$t(`user.PROFILE.UNITS.${c.user.imperial_units?"IMPERIAL":"METRIC"}`)),1),p("dt",null,T(c.$t("user.PROFILE.ASCENT_DATA"))+":",1),p("dd",null,T(c.$t(`common.${u.value}`)),1),p("dt",null,T(c.$t("user.PROFILE.ELEVATION_CHART_START.LABEL"))+":",1),p("dd",null,T(c.$t(`user.PROFILE.ELEVATION_CHART_START.${c.user.start_elevation_at_zero?"ZERO":"MIN_ALT"}`)),1),p("dt",null,T(c.$t("user.PROFILE.USE_RAW_GPX_SPEED.LABEL"))+":",1),p("dd",null,T(c.$t(`user.PROFILE.USE_RAW_GPX_SPEED.${c.user.use_raw_gpx_speed?"RAW_SPEED":"FILTERED_SPEED"}`)),1),p("div",VSe,[p("span",null,[jSe,j(" "+T(c.$t("user.PROFILE.USE_RAW_GPX_SPEED.HELP")),1)])])]),p("div",KSe,[p("button",{onClick:f[0]||(f[0]=d=>c.$router.push("/profile/edit/preferences"))},T(c.$t("user.PROFILE.EDIT_PREFERENCES")),1),p("button",{onClick:f[1]||(f[1]=d=>c.$router.push("/"))},T(c.$t("common.HOME")),1)])]))}}),qSe=re(YSe,[["__scopeId","data-v-b0528e22"]]),XSe={id:"user-profile-edition",class:"center-card"},ZSe=Z({__name:"index",props:{user:{},tab:{}},setup(e){const t=e,n=Me(),{user:r,tab:a}=_e(t),s=["PROFILE","ACCOUNT","PICTURE","PREFERENCES","SPORTS","PRIVACY-POLICY"],i=$(()=>n.getters[K.GETTERS.USER_LOADING]);return(o,u)=>{const l=oe("router-view"),c=oe("Card");return A(),N("div",XSe,[k(c,null,{title:ue(()=>[j(T(o.$t(`user.PROFILE.${h(a)}_EDITION`)),1)]),content:ue(()=>[k(aA,{tabs:s,selectedTab:h(a),edition:!0,disabled:i.value},null,8,["selectedTab","disabled"]),k(l,{user:h(r)},null,8,["user"])]),_:1})])}}}),zs=new Map,QSe=e=>{const{method:t,url:n,params:r={},data:a={}}=e;return[t,n,JSON.stringify(r),JSON.stringify(a)].join("")},is=e=>{const t=QSe(e);if(zs.has(t)){const n=zs.get(t)||{};n==null||n.abort(),zs.delete(t)}return t},Pr=yt.create({baseURL:Si()});Pr.interceptors.request.use(e=>{const t=new AbortController;e.signal=t.signal;const n=is(e);return zs.set(n,t),e},e=>Promise.reject(e));Pr.interceptors.response.use(e=>(is(e.config),e),e=>(e.message!=="canceled"&&e.response&&is(e.response.config),Promise.reject(e)));const iA=(e,t)=>{e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),je.delete(`users/${t.username}`).then(n=>{n.status===204?t.fromAdmin?vt.push("/admin/users"):e.dispatch(K.ACTIONS.LOGOUT).then(()=>vt.push("/")):Ee(e,null)}).catch(n=>Ee(e,n))},JSe={[De.ACTIONS.EMPTY_USER](e){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),e.commit(De.MUTATIONS.UPDATE_USER,{})},[De.ACTIONS.EMPTY_USERS](e){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),e.commit(De.MUTATIONS.UPDATE_USERS,[]),e.commit(De.MUTATIONS.UPDATE_USERS_PAGINATION,{})},[De.ACTIONS.GET_USER](e,t){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),e.commit(De.MUTATIONS.UPDATE_USERS_LOADING,!0),je.get(`users/${t}`).then(n=>{n.data.status==="success"?e.commit(De.MUTATIONS.UPDATE_USER,n.data.data.users[0]):Ee(e,null)}).catch(n=>Ee(e,n)).finally(()=>e.commit(De.MUTATIONS.UPDATE_USERS_LOADING,!1))},[De.ACTIONS.GET_USERS](e,t){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),e.commit(De.MUTATIONS.UPDATE_USERS_LOADING,!0),je.get("users",{params:t}).then(n=>{n.data.status==="success"?(e.commit(De.MUTATIONS.UPDATE_USERS,n.data.data.users),e.commit(De.MUTATIONS.UPDATE_USERS_PAGINATION,n.data.pagination)):Ee(e,null)}).catch(n=>Ee(e,n)).finally(()=>e.commit(De.MUTATIONS.UPDATE_USERS_LOADING,!1))},[De.ACTIONS.UPDATE_USER](e,t){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),e.commit(De.MUTATIONS.UPDATE_IS_SUCCESS,!1);const n={};t.admin!==void 0&&(n.admin=t.admin),t.resetPassword&&(n.reset_password=t.resetPassword),t.activate&&(n.activate=t.activate),t.new_email!==void 0&&(n.new_email=t.new_email),je.patch(`users/${t.username}`,n).then(r=>{r.data.status==="success"?(e.commit(De.MUTATIONS.UPDATE_USER_IN_USERS,r.data.data.users[0]),(t.resetPassword||t.new_email)&&e.commit(De.MUTATIONS.UPDATE_IS_SUCCESS,!0),(t.activate||t.new_email)&&e.commit(De.MUTATIONS.UPDATE_USER,r.data.data.users[0])):Ee(e,null)}).catch(r=>Ee(e,r)).finally(()=>e.commit(De.MUTATIONS.UPDATE_USERS_LOADING,!1))},[De.ACTIONS.DELETE_USER_ACCOUNT](e,t){iA(e,{username:t.username,fromAdmin:!0})}},io=e=>{localStorage.removeItem("authToken"),e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),e.commit(Br.MUTATIONS.EMPTY_USER_STATS),e.commit(K.MUTATIONS.CLEAR_AUTH_USER_TOKEN),e.commit(De.MUTATIONS.UPDATE_USERS,[]),e.commit(Ae.MUTATIONS.EMPTY_WORKOUTS),e.commit(Ae.MUTATIONS.EMPTY_WORKOUT),vt.push("/login")},eOe={[K.ACTIONS.CHECK_AUTH_USER](e){window.localStorage.authToken&&!e.getters[K.GETTERS.IS_AUTHENTICATED]&&(e.commit(K.MUTATIONS.UPDATE_AUTH_TOKEN,window.localStorage.authToken),e.dispatch(K.ACTIONS.GET_USER_PROFILE,!0)),!window.localStorage.authToken&&e.getters[K.GETTERS.IS_AUTHENTICATED]&&io(e)},[K.ACTIONS.CONFIRM_ACCOUNT](e,t){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),Pr.post("auth/account/confirm",{token:t.token}).then(n=>{if(n.data.status==="success"){const r=n.data.auth_token;window.localStorage.setItem("authToken",r),e.commit(K.MUTATIONS.UPDATE_AUTH_TOKEN,r),e.dispatch(K.ACTIONS.GET_USER_PROFILE).then(()=>vt.push("/"))}else Ee(e,null)}).catch(n=>{Ee(e,n)})},[K.ACTIONS.CONFIRM_EMAIL](e,t){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),e.commit(K.MUTATIONS.UPDATE_IS_SUCCESS,!1),Pr.post("/auth/email/update",{token:t.token}).then(n=>{n.data.status==="success"?(e.commit(K.MUTATIONS.UPDATE_IS_SUCCESS,!0),t.refreshUser&&e.dispatch(K.ACTIONS.GET_USER_PROFILE).then(()=>vt.push("/profile/edit/account")),vt.push("/profile/edit/account")):Ee(e,null)}).catch(n=>{Ee(e,n)})},[K.ACTIONS.GET_USER_PROFILE](e,t=!1){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),je.get("auth/profile").then(n=>{if(n.data.status==="success"){const r=e.getters[K.GETTERS.IS_PROFILE_NOT_LOADED];e.commit(K.MUTATIONS.UPDATE_AUTH_USER_PROFILE,n.data.data),n.data.data.accepted_privacy_policy||e.dispatch(H.ACTIONS.GET_APPLICATION_PRIVACY_POLICY),(r||t)&&(n.data.data.language&&e.dispatch(H.ACTIONS.UPDATE_APPLICATION_LANGUAGE,n.data.data.language),e.commit(H.MUTATIONS.UPDATE_DARK_MODE,n.data.data.use_dark_mode)),e.dispatch(Mt.ACTIONS.GET_SPORTS)}else Ee(e,null),io(e)}).catch(n=>{n.message!=="canceled"&&(Ee(e,n),io(e))})},[K.ACTIONS.LOGIN_OR_REGISTER](e,t){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),e.commit(K.MUTATIONS.UPDATE_IS_REGISTRATION_SUCCESS,!1),Pr.post(`/auth/${t.actionType}`,t.formData).then(n=>{if(n.data.status==="success")if(t.actionType==="login"){const r=n.data.auth_token;window.localStorage.setItem("authToken",r),e.commit(K.MUTATIONS.UPDATE_AUTH_TOKEN,r),e.dispatch(K.ACTIONS.GET_USER_PROFILE,!0).then(()=>vt.push(typeof t.redirectUrl=="string"?t.redirectUrl:"/"))}else vt.push("/login").then(()=>e.commit(K.MUTATIONS.UPDATE_IS_REGISTRATION_SUCCESS,!0));else Ee(e,null)}).catch(n=>Ee(e,n))},[K.ACTIONS.LOGOUT](e){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),je.post("auth/logout").then(t=>{t.data.status==="success"?io(e):Ee(e,null)}).catch(t=>Ee(e,t))},[K.ACTIONS.UPDATE_USER_PROFILE](e,t){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),e.commit(K.MUTATIONS.UPDATE_USER_LOADING,!0),je.post("auth/profile/edit",t).then(n=>{n.data.status==="success"?(e.commit(K.MUTATIONS.UPDATE_AUTH_USER_PROFILE,n.data.data),vt.push("/profile")):Ee(e,null)}).catch(n=>Ee(e,n)).finally(()=>e.commit(K.MUTATIONS.UPDATE_USER_LOADING,!1))},[K.ACTIONS.UPDATE_USER_ACCOUNT](e,t){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),e.commit(K.MUTATIONS.UPDATE_USER_LOADING,!0),e.commit(K.MUTATIONS.UPDATE_IS_SUCCESS,!1),je.patch("auth/profile/edit/account",t).then(n=>{n.data.status==="success"?(e.commit(K.MUTATIONS.UPDATE_AUTH_USER_PROFILE,n.data.data),e.commit(K.MUTATIONS.UPDATE_IS_SUCCESS,!0)):Ee(e,null)}).catch(n=>Ee(e,n)).finally(()=>e.commit(K.MUTATIONS.UPDATE_USER_LOADING,!1))},[K.ACTIONS.UPDATE_USER_PREFERENCES](e,t){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),e.commit(K.MUTATIONS.UPDATE_USER_LOADING,!0),je.post("auth/profile/edit/preferences",t).then(n=>{n.data.status==="success"?(e.commit(K.MUTATIONS.UPDATE_AUTH_USER_PROFILE,n.data.data),e.commit(H.MUTATIONS.UPDATE_DARK_MODE,n.data.data.use_dark_mode),e.dispatch(H.ACTIONS.UPDATE_APPLICATION_LANGUAGE,n.data.data.language).then(()=>vt.push("/profile/preferences"))):Ee(e,null)}).catch(n=>Ee(e,n)).finally(()=>e.commit(K.MUTATIONS.UPDATE_USER_LOADING,!1))},[K.ACTIONS.RESET_USER_SPORT_PREFERENCES](e,t){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),e.commit(K.MUTATIONS.UPDATE_USER_LOADING,!0),je.delete(`auth/profile/reset/sports/${t}`).then(n=>{n.status===204?e.dispatch(Mt.ACTIONS.GET_SPORTS):Ee(e,null)}).catch(n=>{Ee(e,n),e.commit(K.MUTATIONS.UPDATE_USER_LOADING,!1)})},[K.ACTIONS.UPDATE_USER_SPORT_PREFERENCES](e,t){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),e.commit(K.MUTATIONS.UPDATE_USER_LOADING,!0),je.post("auth/profile/edit/sports",t).then(n=>{n.data.status==="success"?e.dispatch(Mt.ACTIONS.GET_SPORTS):Ee(e,null)}).catch(n=>{Ee(e,n),e.commit(K.MUTATIONS.UPDATE_USER_LOADING,!1)})},[K.ACTIONS.UPDATE_USER_PICTURE](e,t){if(e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),e.commit(K.MUTATIONS.UPDATE_USER_LOADING,!0),!t.picture)throw new Error("No file part");const n=new FormData;n.append("file",t.picture),je.post("auth/picture",n,{headers:{"content-type":"multipart/form-data"}}).then(r=>{r.data.status==="success"?e.dispatch(K.ACTIONS.GET_USER_PROFILE).then(()=>vt.push("/profile")):Ee(e,null)}).catch(r=>Ee(e,r)).finally(()=>e.commit(K.MUTATIONS.UPDATE_USER_LOADING,!1))},[K.ACTIONS.DELETE_ACCOUNT](e,t){iA(e,t)},[K.ACTIONS.DELETE_PICTURE](e){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),e.commit(K.MUTATIONS.UPDATE_USER_LOADING,!0),je.delete("auth/picture").then(t=>{t.status===204?e.dispatch(K.ACTIONS.GET_USER_PROFILE).then(()=>vt.push("/profile")):Ee(e,null)}).catch(t=>Ee(e,t)).finally(()=>e.commit(K.MUTATIONS.UPDATE_USER_LOADING,!1))},[K.ACTIONS.SEND_PASSWORD_RESET_REQUEST](e,t){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),Pr.post("auth/password/reset-request",t).then(n=>{n.data.status==="success"?vt.push("/password-reset/sent"):Ee(e,null)}).catch(n=>Ee(e,n))},[K.ACTIONS.RESEND_ACCOUNT_CONFIRMATION_EMAIL](e,t){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),Pr.post("auth/account/resend-confirmation",t).then(n=>{n.data.status==="success"?vt.push("/account-confirmation/email-sent"):Ee(e,null)}).catch(n=>Ee(e,n))},[K.ACTIONS.RESET_USER_PASSWORD](e,t){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),Pr.post("auth/password/update",t).then(n=>{n.data.status==="success"?vt.push("/password-reset/password-updated"):Ee(e,null)}).catch(n=>Ee(e,n))},[K.ACTIONS.ACCEPT_PRIVACY_POLICY](e,t){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),je.post("auth/account/privacy-policy",{accepted_policy:t}).then(n=>{n.data.status==="success"?e.dispatch(K.ACTIONS.GET_USER_PROFILE).then(()=>vt.push("/profile")):Ee(e,null)}).catch(n=>Ee(e,n))},[K.ACTIONS.REQUEST_DATA_EXPORT](e){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),je.post("auth/account/export/request").then(t=>{t.data.status==="success"?e.commit(K.MUTATIONS.SET_EXPORT_REQUEST,t.data.request):Ee(e,null)}).catch(t=>Ee(e,t))},[K.ACTIONS.GET_REQUEST_DATA_EXPORT](e){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),je.get("auth/account/export").then(t=>{t.data.status==="success"?e.commit(K.MUTATIONS.SET_EXPORT_REQUEST,t.data.request):Ee(e,null)}).catch(t=>Ee(e,t))}},tOe={[K.GETTERS.AUTH_TOKEN]:e=>e.authToken,[K.GETTERS.AUTH_USER_PROFILE]:e=>e.authUserProfile,[K.GETTERS.EXPORT_REQUEST]:e=>e.exportRequest,[K.GETTERS.IS_AUTHENTICATED]:e=>e.authToken!==null,[K.GETTERS.IS_ADMIN]:e=>e.authUserProfile&&e.authUserProfile.admin,[K.GETTERS.IS_REGISTRATION_SUCCESS]:e=>e.isRegistrationSuccess,[K.GETTERS.IS_SUCCESS]:e=>e.isSuccess,[K.GETTERS.USER_LOADING]:e=>e.loading,[K.GETTERS.IS_PROFILE_NOT_LOADED]:e=>e.authUserProfile.username===void 0},nOe={[K.MUTATIONS.CLEAR_AUTH_USER_TOKEN](e){e.authToken=null,e.authUserProfile={}},[K.MUTATIONS.UPDATE_AUTH_TOKEN](e,t){e.authToken=t},[K.MUTATIONS.UPDATE_AUTH_USER_PROFILE](e,t){e.authUserProfile=t},[K.MUTATIONS.UPDATE_IS_REGISTRATION_SUCCESS](e,t){e.isRegistrationSuccess=t},[K.MUTATIONS.UPDATE_IS_SUCCESS](e,t){e.isSuccess=t},[K.MUTATIONS.UPDATE_USER_LOADING](e,t){e.loading=t},[K.MUTATIONS.SET_EXPORT_REQUEST](e,t){e.exportRequest=t}},rOe={authToken:null,authUserProfile:{},isSuccess:!1,isRegistrationSuccess:!1,loading:!1,exportRequest:null},aOe={state:rOe,actions:eOe,getters:tOe,mutations:nOe},WE=(e,t)=>{e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),je.get(t).then(n=>{n.data.status==="success"?e.commit(Ye.MUTATIONS.SET_CLIENT,n.data.data.client):Ee(e,null)}).catch(n=>Ee(e,n))},sOe={[Ye.ACTIONS.AUTHORIZE_CLIENT](e,t){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES);const n=new FormData;n.set("client_id",t.client_id),n.set("response_type",t.response_type),n.set("scope",t.scope),n.set("confirm","true"),t.state&&n.set("state",t.state),t.code_challenge&&n.set("code_challenge",t.code_challenge),t.code_challenge_method&&n.set("code_challenge_method",t.code_challenge_method),je.post("oauth/authorize",n,{headers:{"Content-Type":"multipart/form-data"}}).then(r=>{r.status==200&&r.data.redirect_url?window.location.href=r.data.redirect_url:Ee(e,null)}).catch(r=>Ee(e,r))},[Ye.ACTIONS.CREATE_CLIENT](e,t){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),je.post("oauth/apps",t).then(n=>{n.data.status==="created"?(e.commit(Ye.MUTATIONS.SET_CLIENT,n.data.data.client),vt.push(`/profile/apps/${n.data.data.client.id}/created`)):Ee(e,null)}).catch(n=>Ee(e,n))},[Ye.ACTIONS.DELETE_CLIENT](e,t){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),je.delete(`oauth/apps/${t}`).then(n=>{n.status===204?e.dispatch(Ye.ACTIONS.GET_CLIENTS).then(()=>vt.push("/profile/apps")):Ee(e,null)}).catch(n=>Ee(e,n))},[Ye.ACTIONS.GET_CLIENT_BY_CLIENT_ID](e,t){WE(e,`oauth/apps/${t}`)},[Ye.ACTIONS.GET_CLIENT_BY_ID](e,t){WE(e,`oauth/apps/${t}/by_id`)},[Ye.ACTIONS.GET_CLIENTS](e,t){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),je.get("oauth/apps",{params:t}).then(n=>{n.data.status==="success"?(e.commit(Ye.MUTATIONS.SET_CLIENTS,n.data.data.clients),e.commit(Ye.MUTATIONS.SET_CLIENTS_PAGINATION,n.data.pagination)):Ee(e,null)}).catch(n=>Ee(e,n))},[Ye.ACTIONS.REVOKE_ALL_TOKENS](e,t){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),e.commit(Ye.MUTATIONS.SET_REVOCATION_SUCCESSFUL,!1),je.post(`oauth/apps/${t}/revoke`).then(n=>{n.data.status==="success"?e.commit(Ye.MUTATIONS.SET_REVOCATION_SUCCESSFUL,!0):Ee(e,null)}).catch(n=>Ee(e,n))}},iOe={[Ye.GETTERS.CLIENT]:e=>e.client,[Ye.GETTERS.CLIENTS]:e=>e.clients,[Ye.GETTERS.CLIENTS_PAGINATION]:e=>e.pagination,[Ye.GETTERS.REVOCATION_SUCCESSFUL]:e=>e.revocationSuccessful},oOe={[Ye.MUTATIONS.SET_CLIENT](e,t){e.client=t},[Ye.MUTATIONS.EMPTY_CLIENT](e){e.client={}},[Ye.MUTATIONS.SET_CLIENTS](e,t){e.clients=t},[Ye.MUTATIONS.SET_CLIENTS_PAGINATION](e,t){e.pagination=t},[Ye.MUTATIONS.SET_REVOCATION_SUCCESSFUL](e,t){e.revocationSuccessful=t}},uOe={client:{},clients:[],pagination:{},revocationSuccessful:!1},cOe={state:uOe,actions:sOe,getters:iOe,mutations:oOe},{locale:lOe}=_a.global,dOe={[H.ACTIONS.GET_APPLICATION_CONFIG](e){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),e.commit(H.MUTATIONS.UPDATE_APPLICATION_LOADING,!0),je.get("config").then(t=>{t.data.status==="success"?e.commit(H.MUTATIONS.UPDATE_APPLICATION_CONFIG,t.data.data):Ee(e,null)}).catch(t=>Ee(e,t)).finally(()=>e.commit(H.MUTATIONS.UPDATE_APPLICATION_LOADING,!1))},[H.ACTIONS.GET_APPLICATION_STATS](e){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),je.get("stats/all").then(t=>{t.data.status==="success"?e.commit(H.MUTATIONS.UPDATE_APPLICATION_STATS,t.data.data):Ee(e,null)}).catch(t=>Ee(e,t))},[H.ACTIONS.GET_APPLICATION_PRIVACY_POLICY](e){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),je.get("config").then(t=>{t.data.status==="success"?e.commit(H.MUTATIONS.UPDATE_APPLICATION_PRIVACY_POLICY,t.data.data):Ee(e,null)}).catch(t=>Ee(e,t))},[H.ACTIONS.UPDATE_APPLICATION_CONFIG](e,t){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),je.patch("config",t).then(n=>{n.data.status==="success"?(e.commit(H.MUTATIONS.UPDATE_APPLICATION_CONFIG,n.data.data),vt.push("/admin/application")):Ee(e,null)}).catch(n=>Ee(e,n))},[H.ACTIONS.UPDATE_APPLICATION_LANGUAGE](e,t){var n;(n=document.querySelector("html"))==null||n.setAttribute("lang",t),e.commit(H.MUTATIONS.UPDATE_LANG,t),lOe.value=t}},fOe={[H.GETTERS.APP_CONFIG]:e=>e.application.config,[H.GETTERS.APP_LOADING]:e=>e.appLoading,[H.GETTERS.APP_STATS]:e=>e.application.statistics,[H.GETTERS.DARK_MODE]:e=>e.darkMode,[H.GETTERS.ERROR_MESSAGES]:e=>e.errorMessages,[H.GETTERS.LANGUAGE]:e=>e.language,[H.GETTERS.LOCALE]:e=>e.locale},pOe={[H.MUTATIONS.EMPTY_ERROR_MESSAGES](e){e.errorMessages=null},[H.MUTATIONS.SET_ERROR_MESSAGES](e,t){e.errorMessages=t},[H.MUTATIONS.UPDATE_APPLICATION_CONFIG](e,t){e.application.config=t},[H.MUTATIONS.UPDATE_APPLICATION_LOADING](e,t){e.appLoading=t},[H.MUTATIONS.UPDATE_APPLICATION_PRIVACY_POLICY](e,t){e.application.config.privacy_policy=t.privacy_policy,e.application.config.privacy_policy_date=t.privacy_policy_date},[H.MUTATIONS.UPDATE_APPLICATION_STATS](e,t){e.application.statistics=t},[H.MUTATIONS.UPDATE_LANG](e,t){e.language=t,e.locale=bi[t]},[H.MUTATIONS.UPDATE_DARK_MODE](e,t){e.darkMode=t}},mOe={root:!0,language:"en",locale:nc,errorMessages:null,application:{statistics:{sports:0,uploads_dir_size:0,users:0,workouts:0}},appLoading:!1,darkMode:null},EOe={[Mt.ACTIONS.GET_SPORTS](e){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),je.get("sports").then(t=>{t.data.status==="success"?(e.commit(Mt.MUTATIONS.SET_SPORTS,t.data.data.sports),e.commit(K.MUTATIONS.UPDATE_USER_LOADING,!1)):Ee(e,null)}).catch(t=>Ee(e,t))},[Mt.ACTIONS.UPDATE_SPORTS](e,t){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),je.patch(`sports/${t.id}`,{is_active:t.isActive}).then(n=>{n.data.status==="success"?e.dispatch(Mt.ACTIONS.GET_SPORTS):Ee(e,null)}).catch(n=>Ee(e,n))}},hOe={[Mt.GETTERS.SPORTS]:e=>e.sports},_Oe={[Mt.MUTATIONS.SET_SPORTS](e,t){e.sports=t}},TOe={sports:[]},gOe={state:TOe,actions:EOe,getters:hOe,mutations:_Oe},AOe={[Br.ACTIONS.GET_USER_STATS](e,t){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),je.get(`stats/${t.username}/${t.filterType}`,{params:t.params}).then(n=>{n.data.status==="success"?e.commit(Br.MUTATIONS.UPDATE_USER_STATS,n.data.data.statistics):Ee(e,null)}).catch(n=>Ee(e,n))}},SOe={[Br.GETTERS.USER_STATS]:e=>e.statistics},OOe={[Br.MUTATIONS.UPDATE_USER_STATS](e,t){e.statistics=t},[Br.MUTATIONS.EMPTY_USER_STATS](e){e.statistics={}}},IOe={statistics:{}},vOe={state:IOe,actions:AOe,getters:SOe,mutations:OOe},ROe={[De.GETTERS.USER]:e=>e.user,[De.GETTERS.USERS]:e=>e.users,[De.GETTERS.USERS_IS_SUCCESS]:e=>e.isSuccess,[De.GETTERS.USERS_LOADING]:e=>e.loading,[De.GETTERS.USERS_PAGINATION]:e=>e.pagination},bOe={[De.MUTATIONS.UPDATE_USER](e,t){e.user=t},[De.MUTATIONS.UPDATE_USER_IN_USERS](e,t){e.users=e.users.map(n=>n.username===t.username?t:n)},[De.MUTATIONS.UPDATE_USERS](e,t){e.users=t},[De.MUTATIONS.UPDATE_USERS_LOADING](e,t){e.loading=t},[De.MUTATIONS.UPDATE_USERS_PAGINATION](e,t){e.pagination=t},[De.MUTATIONS.UPDATE_IS_SUCCESS](e,t){e.isSuccess=t}},NOe={user:{},users:[],loading:!1,isSuccess:!1,pagination:{}},COe={state:NOe,actions:JSe,getters:ROe,mutations:bOe},oo=(e,t,n)=>{e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),je.get("workouts",{params:t}).then(r=>{r.data.status==="success"?(e.commit(Ae.MUTATIONS[n],r.data.data.workouts),n===sa.SET_USER_WORKOUTS&&e.commit(Ae.MUTATIONS.SET_WORKOUTS_PAGINATION,r.data.pagination)):Ee(e,null)}).catch(r=>Ee(e,r))},yOe={[Ae.ACTIONS.GET_CALENDAR_WORKOUTS](e,t){e.commit(Ae.MUTATIONS.EMPTY_CALENDAR_WORKOUTS),oo(e,t,sa.SET_CALENDAR_WORKOUTS)},[Ae.ACTIONS.GET_USER_WORKOUTS](e,t){oo(e,t,sa.SET_USER_WORKOUTS)},[Ae.ACTIONS.GET_TIMELINE_WORKOUTS](e,t){oo(e,t,sa.SET_TIMELINE_WORKOUTS)},[Ae.ACTIONS.GET_MORE_TIMELINE_WORKOUTS](e,t){oo(e,t,sa.ADD_TIMELINE_WORKOUTS)},[Ae.ACTIONS.GET_WORKOUT_DATA](e,t){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),e.commit(Ae.MUTATIONS.SET_WORKOUT_LOADING,!0);const n=t.segmentId?`/segment/${t.segmentId}`:"";je.get(`workouts/${t.workoutId}`).then(r=>{const a=r.data.data.workouts[0];if(r.data.status==="success"){if(t.segmentId&&(a.segments.length===0||!a.segments[+t.segmentId-1]))throw new Error("WORKOUT_NOT_FOUND");e.commit(Ae.MUTATIONS.SET_WORKOUT,r.data.data.workouts[0]),r.data.data.workouts[0].with_gpx&&(je.get(`workouts/${t.workoutId}/chart_data${n}`).then(s=>{s.data.status==="success"&&e.commit(Ae.MUTATIONS.SET_WORKOUT_CHART_DATA,s.data.data.chart_data)}),je.get(`workouts/${t.workoutId}/gpx${n}`).then(s=>{s.data.status==="success"&&e.commit(Ae.MUTATIONS.SET_WORKOUT_GPX,s.data.data.gpx)}))}else e.commit(Ae.MUTATIONS.EMPTY_WORKOUT),Ee(e,null)}).catch(r=>{e.commit(Ae.MUTATIONS.EMPTY_WORKOUT),Ee(e,r)}).finally(()=>e.commit(Ae.MUTATIONS.SET_WORKOUT_LOADING,!1))},[Ae.ACTIONS.DELETE_WORKOUT](e,t){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),e.commit(Ae.MUTATIONS.SET_WORKOUT_LOADING,!0),je.delete(`workouts/${t.workoutId}`).then(()=>{e.commit(Ae.MUTATIONS.EMPTY_WORKOUT),e.dispatch(K.ACTIONS.GET_USER_PROFILE),vt.push("/")}).catch(n=>{Ee(e,n)}).finally(()=>e.commit(Ae.MUTATIONS.SET_WORKOUT_LOADING,!1))},[Ae.ACTIONS.EDIT_WORKOUT](e,t){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),e.commit(Ae.MUTATIONS.SET_WORKOUT_LOADING,!0),je.patch(`workouts/${t.workoutId}`,t.data).then(()=>{e.dispatch(K.ACTIONS.GET_USER_PROFILE),e.dispatch(Ae.ACTIONS.GET_WORKOUT_DATA,{workoutId:t.workoutId}).then(()=>{vt.push({name:"Workout",params:{workoutId:t.workoutId}})})}).catch(n=>{Ee(e,n)}).finally(()=>e.commit(Ae.MUTATIONS.SET_WORKOUT_LOADING,!1))},[Ae.ACTIONS.ADD_WORKOUT](e,t){if(e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),e.commit(Ae.MUTATIONS.SET_WORKOUT_LOADING,!0),!t.file)throw new Error("No file part");const n=t.notes.replace(/"/g,'\\"'),r=new FormData;r.append("file",t.file),r.append("data",`{"sport_id": ${t.sport_id}, "notes": "${n}"}`),je.post("workouts",r,{headers:{"content-type":"multipart/form-data"}}).then(a=>{if(a.data.status==="created"){e.dispatch(K.ACTIONS.GET_USER_PROFILE);const s=a.data.data.workouts[0];vt.push(a.data.data.workouts.length===1?`/workouts/${s.id}`:"/")}}).catch(a=>{Ee(e,a)}).finally(()=>e.commit(Ae.MUTATIONS.SET_WORKOUT_LOADING,!1))},[Ae.ACTIONS.ADD_WORKOUT_WITHOUT_GPX](e,t){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),e.commit(Ae.MUTATIONS.SET_WORKOUT_LOADING,!0),je.post("workouts/no_gpx",t).then(n=>{if(n.data.status==="created"){e.dispatch(K.ACTIONS.GET_USER_PROFILE);const r=n.data.data.workouts[0];vt.push(`/workouts/${r.id}`)}}).catch(n=>{Ee(e,n)}).finally(()=>e.commit(Ae.MUTATIONS.SET_WORKOUT_LOADING,!1))}},DOe={[Ae.GETTERS.CALENDAR_WORKOUTS]:e=>e.calendar_workouts,[Ae.GETTERS.TIMELINE_WORKOUTS]:e=>e.timeline_workouts,[Ae.GETTERS.USER_WORKOUTS]:e=>e.user_workouts,[Ae.GETTERS.WORKOUT_DATA]:e=>e.workoutData,[Ae.GETTERS.WORKOUTS_PAGINATION]:e=>e.pagination},POe={[Ae.MUTATIONS.ADD_TIMELINE_WORKOUTS](e,t){e.timeline_workouts=e.timeline_workouts.concat(t)},[Ae.MUTATIONS.SET_CALENDAR_WORKOUTS](e,t){e.calendar_workouts=t},[Ae.MUTATIONS.SET_TIMELINE_WORKOUTS](e,t){e.timeline_workouts=t},[Ae.MUTATIONS.SET_USER_WORKOUTS](e,t){e.user_workouts=t},[Ae.MUTATIONS.SET_WORKOUTS_PAGINATION](e,t){e.pagination=t},[Ae.MUTATIONS.SET_WORKOUT](e,t){e.workoutData.workout=t},[Ae.MUTATIONS.SET_WORKOUT_CHART_DATA](e,t){e.workoutData.chartData=t},[Ae.MUTATIONS.SET_WORKOUT_GPX](e,t){e.workoutData.gpx=t},[Ae.MUTATIONS.SET_WORKOUT_LOADING](e,t){e.workoutData.loading=t},[Ae.MUTATIONS.EMPTY_CALENDAR_WORKOUTS](e){e.calendar_workouts=[]},[Ae.MUTATIONS.EMPTY_WORKOUTS](e){e.calendar_workouts=[],e.user_workouts=[],e.timeline_workouts=[]},[Ae.MUTATIONS.EMPTY_WORKOUT](e){e.workoutData={gpx:"",loading:!1,workout:{},chartData:[]}}},wOe={calendar_workouts:[],timeline_workouts:[],pagination:{},user_workouts:[],workoutData:{gpx:"",loading:!1,workout:{},chartData:[]}},LOe={state:wOe,actions:yOe,getters:DOe,mutations:POe},$Oe={authUserModule:aOe,oAuthModule:cOe,sportsModule:gOe,statsModule:vOe,usersModule:COe,workoutsModule:LOe},kOe={state:mOe,actions:dOe,getters:fOe,mutations:pOe,modules:$Oe},Bs=Nb(kOe),u0=yt.create({baseURL:Si()});u0.interceptors.request.use(e=>{const t=new AbortController;e.signal=t.signal;const n=is(e);zs.set(n,t);const r=Bs.getters[K.GETTERS.AUTH_TOKEN];if(r){const a=`Bearer ${r}`;e.headers&&e.headers.Authorization!==a&&(e.headers.Authorization=`Bearer ${r}`)}return e},e=>Promise.reject(e));u0.interceptors.response.use(e=>(is(e.config),e),e=>(e.message!=="canceled"&&e.response&&is(e.response.config),Promise.reject(e)));const je=u0,Ld=(e,t)=>e.push.apply(e,t),os=e=>e.sort((t,n)=>t.i-n.i||t.j-n.j),GE=e=>{const t={};let n=1;return e.forEach(r=>{t[r]=n,n+=1}),t};var UOe={4:[[1,2],[2,3]],5:[[1,3],[2,3],[2,4]],6:[[1,2],[2,4],[4,5]],7:[[1,3],[2,3],[4,5],[4,6]],8:[[2,4],[4,6]]};const zE=2050,BE=1e3,MOe=UOe,xOe=10,FOe=1e4,oA=10,uA=50,cA=20,lA=/^[A-Z\xbf-\xdf][^A-Z\xbf-\xdf]+$/,WOe=/^[^A-Z\xbf-\xdf]+[A-Z\xbf-\xdf]$/,GOe=/^[A-Z\xbf-\xdf]+$/,dA=/^[^a-z\xdf-\xff]+$/,zOe=/^[a-z\xdf-\xff]+$/,BOe=/^[^A-Z\xbf-\xdf]+$/,HOe=/[a-z\xdf-\xff]/,VOe=/[A-Z\xbf-\xdf]/,jOe=/[^A-Za-z\xbf-\xdf]/gi,KOe=/^\d+$/,c0=new Date().getFullYear(),YOe={recentYear:/19\d\d|200\d|201\d|202\d/g},fA=[" ",",",";",":","|","/","\\","_",".","-"],qOe=fA.length;class XOe{match({password:t}){const n=[...this.getMatchesWithoutSeparator(t),...this.getMatchesWithSeparator(t)],r=this.filterNoise(n);return os(r)}getMatchesWithSeparator(t){const n=[],r=/^(\d{1,4})([\s/\\_.-])(\d{1,2})\2(\d{1,4})$/;for(let a=0;a<=Math.abs(t.length-6);a+=1)for(let s=a+5;s<=a+9&&!(s>=t.length);s+=1){const i=t.slice(a,+s+1||9e9),o=r.exec(i);if(o!=null){const u=this.mapIntegersToDayMonthYear([parseInt(o[1],10),parseInt(o[3],10),parseInt(o[4],10)]);u!=null&&n.push({pattern:"date",token:i,i:a,j:s,separator:o[2],year:u.year,month:u.month,day:u.day})}}return n}getMatchesWithoutSeparator(t){const n=[],r=/^\d{4,8}$/,a=s=>Math.abs(s.year-c0);for(let s=0;s<=Math.abs(t.length-4);s+=1)for(let i=s+3;i<=s+7&&!(i>=t.length);i+=1){const o=t.slice(s,+i+1||9e9);if(r.exec(o)){const u=[],l=o.length;if(MOe[l].forEach(([f,d])=>{const m=this.mapIntegersToDayMonthYear([parseInt(o.slice(0,f),10),parseInt(o.slice(f,d),10),parseInt(o.slice(d),10)]);m!=null&&u.push(m)}),u.length>0){let f=u[0],d=a(u[0]);u.slice(1).forEach(m=>{const E=a(m);E{let r=!1;const a=t.length;for(let s=0;s=n.j){r=!0;break}}return!r})}mapIntegersToDayMonthYear(t){if(t[1]>31||t[1]<=0)return null;let n=0,r=0,a=0;for(let s=0,i=t.length;s99&&ozE)return null;o>31&&(r+=1),o>12&&(n+=1),o<=0&&(a+=1)}return r>=2||n===3||a>=2?null:this.getDayMonth(t)}getDayMonth(t){const n=[[t[2],t.slice(0,2)],[t[0],t.slice(1,3)]],r=n.length;for(let a=0;a=1&&s<=31&&i>=1&&i<=12)return{day:s,month:i}}return null}twoToFourDigitYear(t){return t>99?t:t>50?t+1900:t+2e3}}const ir=new Uint32Array(65536),ZOe=(e,t)=>{const n=e.length,r=t.length,a=1<{const n=t.length,r=e.length,a=[],s=[],i=Math.ceil(n/32),o=Math.ceil(r/32);for(let E=0;E>>b&1,C=a[b/32|0]>>>b&1,P=S|E,M=((S|C)&v)+v^v|S|C;let w=E|~(M|v),G=v&M;w>>>31^O&&(s[b/32|0]^=1<>>31^C&&(a[b/32|0]^=1<>>E&1,I=a[E/32|0]>>>E&1,b=v|l,S=((v|I)&c)+c^c|v|I;let O=l|~(S|c),C=c&S;m+=O>>>r-1&1,m-=C>>>r-1&1,O>>>31^R&&(s[E/32|0]^=1<>>31^I&&(a[E/32|0]^=1<{if(e.length{const r=e.length<=t.length,a=e.length<=n;return r||a?Math.ceil(e.length/4):n},tIe=(e,t,n)=>{let r=0;const a=Object.keys(t).find(s=>{const i=eIe(e,s,n);if(Math.abs(e.length-s.length)>i)return!1;const o=JOe(e,s),u=o<=i;return u&&(r=o),u});return a?{levenshteinDistance:r,levenshteinDistanceEntry:a}:{}};var HE={a:["4","@"],b:["8"],c:["(","{","[","<"],d:["6","|)"],e:["3"],f:["#"],g:["6","9","&"],h:["#","|-|"],i:["1","!","|"],k:["<","|<"],l:["!","1","|","7"],m:["^^","nn","2n","/\\\\/\\\\"],n:["//"],o:["0","()"],q:["9"],u:["|_|"],s:["$","5"],t:["+","7"],v:["<",">","/"],w:["^/","uu","vv","2u","2v","\\\\/\\\\/"],x:["%","><"],z:["2"]},cl={warnings:{straightRow:"straightRow",keyPattern:"keyPattern",simpleRepeat:"simpleRepeat",extendedRepeat:"extendedRepeat",sequences:"sequences",recentYears:"recentYears",dates:"dates",topTen:"topTen",topHundred:"topHundred",common:"common",similarToCommon:"similarToCommon",wordByItself:"wordByItself",namesByThemselves:"namesByThemselves",commonNames:"commonNames",userInputs:"userInputs",pwned:"pwned"},suggestions:{l33t:"l33t",reverseWords:"reverseWords",allUppercase:"allUppercase",capitalization:"capitalization",dates:"dates",recentYears:"recentYears",associatedYears:"associatedYears",sequences:"sequences",repeated:"repeated",longerKeyboardPattern:"longerKeyboardPattern",anotherWord:"anotherWord",useWords:"useWords",noNeed:"noNeed",pwned:"pwned"},timeEstimation:{ltSecond:"ltSecond",second:"second",seconds:"seconds",minute:"minute",minutes:"minutes",hour:"hour",hours:"hours",day:"day",days:"days",month:"month",months:"months",year:"year",years:"years",centuries:"centuries"}};class fi{constructor(t=[]){this.parents=t,this.children=new Map}addSub(t,...n){const r=t.charAt(0);this.children.has(r)||this.children.set(r,new fi([...this.parents,r]));let a=this.children.get(r);for(let s=1;s(Object.entries(e).forEach(([n,r])=>{r.forEach(a=>{t.addSub(a,n)})}),t);class nIe{constructor(){this.matchers={},this.l33tTable=HE,this.trieNodeRoot=VE(HE,new fi),this.dictionary={userInputs:[]},this.rankedDictionaries={},this.rankedDictionariesMaxWordSize={},this.translations=cl,this.graphs={},this.useLevenshteinDistance=!1,this.levenshteinThreshold=2,this.l33tMaxSubstitutions=100,this.maxLength=256,this.setRankedDictionaries()}setOptions(t={}){t.l33tTable&&(this.l33tTable=t.l33tTable,this.trieNodeRoot=VE(t.l33tTable,new fi)),t.dictionary&&(this.dictionary=t.dictionary,this.setRankedDictionaries()),t.translations&&this.setTranslations(t.translations),t.graphs&&(this.graphs=t.graphs),t.useLevenshteinDistance!==void 0&&(this.useLevenshteinDistance=t.useLevenshteinDistance),t.levenshteinThreshold!==void 0&&(this.levenshteinThreshold=t.levenshteinThreshold),t.l33tMaxSubstitutions!==void 0&&(this.l33tMaxSubstitutions=t.l33tMaxSubstitutions),t.maxLength!==void 0&&(this.maxLength=t.maxLength)}setTranslations(t){if(this.checkCustomTranslations(t))this.translations=t;else throw new Error("Invalid translations object fallback to keys")}checkCustomTranslations(t){let n=!0;return Object.keys(cl).forEach(r=>{if(r in t){const a=r;Object.keys(cl[a]).forEach(s=>{s in t[a]||(n=!1)})}else n=!1}),n}setRankedDictionaries(){const t={},n={};Object.keys(this.dictionary).forEach(r=>{t[r]=GE(this.dictionary[r]),n[r]=this.getRankedDictionariesMaxWordSize(this.dictionary[r])}),this.rankedDictionaries=t,this.rankedDictionariesMaxWordSize=n}getRankedDictionariesMaxWordSize(t){const n=t.map(r=>typeof r!="string"?r.toString().length:r.length);return n.length===0?0:n.reduce((r,a)=>Math.max(r,a),-1/0)}buildSanitizedRankedDictionary(t){const n=[];return t.forEach(r=>{const a=typeof r;(a==="string"||a==="number"||a==="boolean")&&n.push(r.toString().toLowerCase())}),GE(n)}extendUserInputsDictionary(t){this.dictionary.userInputs||(this.dictionary.userInputs=[]);const n=[...this.dictionary.userInputs,...t];this.rankedDictionaries.userInputs=this.buildSanitizedRankedDictionary(n),this.rankedDictionariesMaxWordSize.userInputs=this.getRankedDictionariesMaxWordSize(n)}addMatcher(t,n){this.matchers[t]?console.info(`Matcher ${t} already exists`):this.matchers[t]=n}}const be=new nIe;class rIe{constructor(t){this.defaultMatch=t}match({password:t}){const n=t.split("").reverse().join("");return this.defaultMatch({password:n}).map(r=>({...r,token:r.token.split("").reverse().join(""),reversed:!0,i:t.length-1-r.j,j:t.length-1-r.i}))}}class aIe{constructor({substr:t,limit:n,trieRoot:r}){this.buffer=[],this.finalPasswords=[],this.substr=t,this.limit=n,this.trieRoot=r}getAllPossibleSubsAtIndex(t){const n=[];let r=this.trieRoot;for(let a=t;a=this.limit)return;if(r===this.substr.length){t===n&&this.finalPasswords.push({password:this.buffer.join(""),changes:s});return}const u=[...this.getAllPossibleSubsAtIndex(r)];let l=!1;for(let c=r+u.length-1;c>=r;c-=1){const f=u[c-r];if(f.isTerminal()){if(i===f.parents.join("")&&o>=3)continue;l=!0;const d=f.subs;for(const m of d){this.buffer.push(m);const E=s.concat({i:a,letter:m,substitution:f.parents.join("")});if(this.helper({onlyFullSub:t,isFullSub:n,index:c+1,subIndex:a+m.length,changes:E,lastSubLetter:f.parents.join(""),consecutiveSubCount:i===f.parents.join("")?o+1:1}),this.buffer.pop(),this.finalPasswords.length>=this.limit)return}}}if(!t||!l){const c=this.substr.charAt(r);this.buffer.push(c),this.helper({onlyFullSub:t,isFullSub:n&&!l,index:r+1,subIndex:a+1,changes:s,lastSubLetter:i,consecutiveSubCount:o}),this.buffer.pop()}}getAll(){return this.helper({onlyFullSub:!0,isFullSub:!0,index:0,subIndex:0,changes:[],lastSubLetter:void 0,consecutiveSubCount:0}),this.helper({onlyFullSub:!1,isFullSub:!0,index:0,subIndex:0,changes:[],lastSubLetter:void 0,consecutiveSubCount:0}),this.finalPasswords}}const sIe=(e,t,n)=>new aIe({substr:e,limit:t,trieRoot:n}).getAll(),iIe=(e,t,n)=>{const a=e.changes.filter(l=>l.il-c.letter.length+c.substitution.length,t),s=e.changes.filter(l=>l.i>=t&&l.i<=n),i=s.reduce((l,c)=>l-c.letter.length+c.substitution.length,n-t+a),o=[],u=[];return s.forEach(l=>{o.findIndex(f=>f.letter===l.letter&&f.substitution===l.substitution)<0&&(o.push({letter:l.letter,substitution:l.substitution}),u.push(`${l.substitution} -> ${l.letter}`))}),{i:a,j:i,subs:o,subDisplay:u.join(", ")}};class oIe{constructor(t){this.defaultMatch=t}isAlreadyIncluded(t,n){return t.some(r=>Object.entries(r).every(([a,s])=>a==="subs"||s===n[a]))}match({password:t}){const n=[],r=sIe(t,be.l33tMaxSubstitutions,be.trieNodeRoot);let a=!1,s=!0;return r.forEach(i=>{if(a)return;const o=this.defaultMatch({password:i.password,useLevenshtein:s});s=!1,o.forEach(u=>{a||(a=u.i===0&&u.j===t.length-1);const l=iIe(i,u.i,u.j),c=t.slice(l.i,+l.j+1||9e9),f={...u,l33t:!0,token:c,...l},d=this.isAlreadyIncluded(n,f);c.toLowerCase()!==u.matchedWord&&!d&&n.push(f)})}),n.filter(i=>i.token.length>1)}}class uIe{constructor(){this.l33t=new oIe(this.defaultMatch),this.reverse=new rIe(this.defaultMatch)}match({password:t}){const n=[...this.defaultMatch({password:t}),...this.reverse.match({password:t}),...this.l33t.match({password:t})];return os(n)}defaultMatch({password:t,useLevenshtein:n=!0}){const r=[],a=t.length,s=t.toLowerCase();return Object.keys(be.rankedDictionaries).forEach(i=>{const o=be.rankedDictionaries[i],u=be.rankedDictionariesMaxWordSize[i],l=Math.min(u,a);for(let c=0;c{const s=n[a];s.lastIndex=0;let i;for(;i=s.exec(t);)if(i){const o=i[0];r.push({pattern:"regex",token:o,i:i.index,j:i.index+i[0].length-1,regexName:a,regexMatch:i})}}),os(r)}}var Aa={nCk(e,t){let n=e;if(t>n)return 0;if(t===0)return 1;let r=1;for(let a=1;a<=t;a+=1)r*=n,r/=a,n-=1;return r},log10(e){return e===0?0:Math.log(e)/Math.log(10)},log2(e){return Math.log(e)/Math.log(2)},factorial(e){let t=1;for(let n=2;n<=e;n+=1)t*=n;return t}},lIe=({token:e})=>{let t=xOe**e.length;t===Number.POSITIVE_INFINITY&&(t=Number.MAX_VALUE);let n;return e.length===1?n=oA+1:n=uA+1,Math.max(t,n)},dIe=({year:e,separator:t})=>{let r=Math.max(Math.abs(e-c0),cA)*365;return t&&(r*=4),r};const fIe=e=>{const t=e.split(""),n=t.filter(i=>i.match(VOe)).length,r=t.filter(i=>i.match(HOe)).length;let a=0;const s=Math.min(n,r);for(let i=1;i<=s;i+=1)a+=Aa.nCk(n+r,i);return a};var pIe=e=>{const t=e.replace(jOe,"");if(t.match(BOe)||t.toLowerCase()===t)return 1;const n=[lA,WOe,dA],r=n.length;for(let a=0;a{let n=0,r=e.indexOf(t);for(;r>=0;)n+=1,r=e.indexOf(t,r+t.length);return n},mIe=({sub:e,token:t})=>{const n=t.toLowerCase(),r=jE(n,e.substitution),a=jE(n,e.letter);return{subbedCount:r,unsubbedCount:a}};var EIe=({l33t:e,subs:t,token:n})=>{if(!e)return 1;let r=1;return t.forEach(a=>{const{subbedCount:s,unsubbedCount:i}=mIe({sub:a,token:n});if(s===0||i===0)r*=2;else{const o=Math.min(i,s);let u=0;for(let l=1;l<=o;l+=1)u+=Aa.nCk(i+s,l);r*=u}}),r},hIe=({rank:e,reversed:t,l33t:n,subs:r,token:a,dictionaryName:s})=>{const i=e,o=pIe(a),u=EIe({l33t:n,subs:r,token:a}),l=t&&2||1;let c;return s==="diceware"?c=6**5/2:c=i*o*u*l,{baseGuesses:i,uppercaseVariations:o,l33tVariations:u,calculation:c}},_Ie=({regexName:e,regexMatch:t,token:n})=>{const r={alphaLower:26,alphaUpper:26,alpha:52,alphanumeric:62,digits:10,symbols:33};if(e in r)return r[e]**n.length;switch(e){case"recentYear":return Math.max(Math.abs(parseInt(t[0],10)-c0),cA)}return 0},TIe=({baseGuesses:e,repeatCount:t})=>e*t,gIe=({token:e,ascending:t})=>{const n=e.charAt(0);let r=0;return["a","A","z","Z","0","1","9"].includes(n)?r=4:n.match(/\d/)?r=10:r=26,t||(r*=2),r*e.length};const AIe=e=>{let t=0;return Object.keys(e).forEach(n=>{const r=e[n];t+=r.filter(a=>!!a).length}),t/=Object.entries(e).length,t},SIe=({token:e,graph:t,turns:n})=>{const r=Object.keys(be.graphs[t]).length,a=AIe(be.graphs[t]);let s=0;const i=e.length;for(let o=2;o<=i;o+=1){const u=Math.min(n,o-1);for(let l=1;l<=u;l+=1)s+=Aa.nCk(o-1,l-1)*r*a**l}return s};var OIe=({graph:e,token:t,shiftedCount:n,turns:r})=>{let a=SIe({token:t,graph:e,turns:r});if(n){const s=t.length-n;if(n===0||s===0)a*=2;else{let i=0;for(let o=1;o<=Math.min(n,s);o+=1)i+=Aa.nCk(n+s,o);a*=i}}return Math.round(a)},IIe=()=>qOe;const vIe=(e,t)=>{let n=1;return e.token.lengthKE[e]?KE[e](t):be.matchers[e]&&"scoring"in be.matchers[e]?be.matchers[e].scoring(t):0;var bIe=(e,t)=>{const n={};if("guesses"in e&&e.guesses!=null)return e;const r=vIe(e,t),a=RIe(e.pattern,e);let s=0;typeof a=="number"?s=a:e.pattern==="dictionary"&&(s=a.calculation,n.baseGuesses=a.baseGuesses,n.uppercaseVariations=a.uppercaseVariations,n.l33tVariations=a.l33tVariations);const i=Math.max(s,r);return{...e,...n,guesses:i,guessesLog10:Aa.log10(i)}};const mn={password:"",optimal:{},excludeAdditive:!1,separatorRegex:void 0,fillArray(e,t){const n=[];for(let r=0;r1&&(a*=this.optimal.pi[r.i-1][t-1]);let s=Aa.factorial(t)*a;this.excludeAdditive||(s+=FOe**(t-1));let i=!1;Object.keys(this.optimal.g[n]).forEach(o=>{const u=this.optimal.g[n][o];parseInt(o,10)<=t&&u<=s&&(i=!0)}),i||(this.optimal.g[n][t]=s,this.optimal.m[n][t]=r,this.optimal.pi[n][t]=a)},bruteforceUpdate(e){let t=this.makeBruteforceMatch(0,e);this.update(t,1);for(let n=1;n<=e;n+=1){t=this.makeBruteforceMatch(n,e);const r=this.optimal.m[n-1];Object.keys(r).forEach(a=>{r[a].pattern!=="bruteforce"&&this.update(t,parseInt(a,10)+1)})}},unwind(e){const t=[];let n=e-1,r=0,a=1/0;const s=this.optimal.g[n];for(s&&Object.keys(s).forEach(i=>{const o=s[i];o=0;){const i=this.optimal.m[n][r];t.unshift(i),n=i.i-1,r-=1}return t}};var $d={mostGuessableMatchSequence(e,t,n=!1){mn.password=e,mn.excludeAdditive=n;const r=e.length;let a=mn.fillArray(r,"array");t.forEach(u=>{a[u.j].push(u)}),a=a.map(u=>u.sort((l,c)=>l.i-c.i)),mn.optimal={m:mn.fillArray(r,"object"),pi:mn.fillArray(r,"object"),g:mn.fillArray(r,"object")};for(let u=0;u{l.i>0?Object.keys(mn.optimal.m[l.i-1]).forEach(c=>{mn.update(l,parseInt(c,10)+1)}):mn.update(l,1)}),mn.bruteforceUpdate(u);const s=mn.unwind(r),i=s.length,o=this.getGuesses(e,i);return{password:e,guesses:o,guessesLog10:Aa.log10(o),sequence:s}},getGuesses(e,t){const n=e.length;let r=0;return e.length===0?r=1:r=mn.optimal.g[n-1][t],r}};class NIe{match({password:t,omniMatch:n}){const r=[];let a=0;for(;ai instanceof Promise)?Promise.all(r):r}normalizeMatch(t,n,r,a){const s={pattern:"repeat",i:r.index,j:n,token:r[0],baseToken:t,baseGuesses:0,repeatCount:r[0].length/t.length};return a instanceof Promise?a.then(i=>({...s,baseGuesses:i})):{...s,baseGuesses:a}}getGreedyMatch(t,n){const r=/(.+)\1+/g;return r.lastIndex=n,r.exec(t)}getLazyMatch(t,n){const r=/(.+?)\1+/g;return r.lastIndex=n,r.exec(t)}setMatchToken(t,n){const r=/^(.+?)\1+$/;let a,s="";if(n&&t[0].length>n[0].length){a=t;const i=r.exec(a[0]);i&&(s=i[1])}else a=n,a&&(s=a[1]);return{match:a,baseToken:s}}getBaseGuesses(t,n){const r=n.match(t);return r instanceof Promise?r.then(s=>$d.mostGuessableMatchSequence(t,s).guesses):$d.mostGuessableMatchSequence(t,r).guesses}}class CIe{constructor(){this.MAX_DELTA=5}match({password:t}){const n=[];if(t.length===1)return[];let r=0,a=null;const s=t.length;for(let i=1;i1||Math.abs(r)===1){const i=Math.abs(r);if(i>0&&i<=this.MAX_DELTA){const o=a.slice(t,+n+1||9e9),{sequenceName:u,sequenceSpace:l}=this.getSequence(o);return s.push({pattern:"sequence",i:t,j:n,token:a.slice(t,+n+1||9e9),sequenceName:u,sequenceSpace:l,ascending:r>0})}}return null}getSequence(t){let n="unicode",r=26;return zOe.test(t)?(n="lower",r=26):GOe.test(t)?(n="upper",r=26):KOe.test(t)&&(n="digits",r=10),{sequenceName:n,sequenceSpace:r}}}class yIe{constructor(){this.SHIFTED_RX=/[~!@#$%^&*()_+QWERTYUIOP{}|ASDFGHJKL:"ZXCVBNM<>?]/}match({password:t}){const n=[];return Object.keys(be.graphs).forEach(r=>{const a=be.graphs[r];Ld(n,this.helper(t,a,r))}),os(n)}checkIfShifted(t,n,r){return!t.includes("keypad")&&this.SHIFTED_RX.test(n.charAt(r))?1:0}helper(t,n,r){let a;const s=[];let i=0;const o=t.length;for(;i2&&s.push({pattern:"spatial",i,j:u-1,token:t.slice(i,u),graph:r,turns:c,shiftedCount:a}),i=u;break}}}return s}}const DIe=new RegExp(`[${fA.join("")}]`);class Uu{static getMostUsedSeparatorChar(t){const n=[...t.split("").filter(a=>DIe.test(a)).reduce((a,s)=>{const i=a.get(s);return i?a.set(s,i+1):a.set(s,1),a},new Map).entries()].sort(([a,s],[i,o])=>o-s);if(!n.length)return;const r=n[0];if(!(r[1]<2))return r[0]}static getSeparatorRegex(t){return new RegExp(`([^${t} -])(${t})(?!${t})`,"g")}match({password:t}){const n=[];if(t.length===0)return n;const r=Uu.getMostUsedSeparatorChar(t);if(r===void 0)return n;const a=Uu.getSeparatorRegex(r);for(const s of t.matchAll(a)){if(s.index===void 0)continue;const i=s.index+1;n.push({pattern:"separator",token:r,i,j:i})}return n}}class PIe{constructor(){this.matchers={date:XOe,dictionary:uIe,regex:cIe,repeat:NIe,sequence:CIe,spatial:yIe,separator:Uu}}match(t){const n=[],r=[];return[...Object.keys(this.matchers),...Object.keys(be.matchers)].forEach(s=>{if(!this.matchers[s]&&!be.matchers[s])return;const i=this.matchers[s]?this.matchers[s]:be.matchers[s].Matching,u=new i().match({password:t,omniMatch:this});u instanceof Promise?(u.then(l=>{Ld(n,l)}),r.push(u)):Ld(n,u)}),r.length>0?new Promise((s,i)=>{Promise.all(r).then(()=>{s(os(n))}).catch(o=>{i(o)})}):os(n)}}const pA=1,mA=pA*60,EA=mA*60,hA=EA*24,_A=hA*31,TA=_A*12,wIe=TA*100,ll={second:pA,minute:mA,hour:EA,day:hA,month:_A,year:TA,century:wIe};class LIe{translate(t,n){let r=t;n!==void 0&&n!==1&&(r+="s");const{timeEstimation:a}=be.translations;return a[r].replace("{base}",`${n}`)}estimateAttackTimes(t){const n={onlineThrottling100PerHour:t/.027777777777777776,onlineNoThrottling10PerSecond:t/10,offlineSlowHashing1e4PerSecond:t/1e4,offlineFastHashing1e10PerSecond:t/1e10},r={onlineThrottling100PerHour:"",onlineNoThrottling10PerSecond:"",offlineSlowHashing1e4PerSecond:"",offlineFastHashing1e10PerSecond:""};return Object.keys(n).forEach(a=>{const s=n[a];r[a]=this.displayTime(s)}),{crackTimesSeconds:n,crackTimesDisplay:r,score:this.guessesToScore(t)}}guessesToScore(t){return t<1005?0:t<1000005?1:t<100000005?2:t<1e10+5?3:4}displayTime(t){let n="centuries",r;const a=Object.keys(ll),s=a.findIndex(i=>t-1&&(n=a[s-1],s!==0?r=Math.round(t/ll[n]):n="ltSecond"),this.translate(n,r)}}var $Ie=()=>null,kIe=()=>({warning:be.translations.warnings.dates,suggestions:[be.translations.suggestions.dates]});const UIe=(e,t)=>{let n=null;return t&&!e.l33t&&!e.reversed?e.rank<=10?n=be.translations.warnings.topTen:e.rank<=100?n=be.translations.warnings.topHundred:n=be.translations.warnings.common:e.guessesLog10<=4&&(n=be.translations.warnings.similarToCommon),n},MIe=(e,t)=>{let n=null;return t&&(n=be.translations.warnings.wordByItself),n},xIe=(e,t)=>t?be.translations.warnings.namesByThemselves:be.translations.warnings.commonNames,FIe=(e,t)=>{let n=null;const r=e.dictionaryName,a=r==="lastnames"||r.toLowerCase().includes("firstnames");return r==="passwords"?n=UIe(e,t):r.includes("wikipedia")?n=MIe(e,t):a?n=xIe(e,t):r==="userInputs"&&(n=be.translations.warnings.userInputs),n};var WIe=(e,t)=>{const n=FIe(e,t),r=[],a=e.token;return a.match(lA)?r.push(be.translations.suggestions.capitalization):a.match(dA)&&a.toLowerCase()!==a&&r.push(be.translations.suggestions.allUppercase),e.reversed&&e.token.length>=4&&r.push(be.translations.suggestions.reverseWords),e.l33t&&r.push(be.translations.suggestions.l33t),{warning:n,suggestions:r}},GIe=e=>e.regexName==="recentYear"?{warning:be.translations.warnings.recentYears,suggestions:[be.translations.suggestions.recentYears,be.translations.suggestions.associatedYears]}:{warning:null,suggestions:[]},zIe=e=>{let t=be.translations.warnings.extendedRepeat;return e.baseToken.length===1&&(t=be.translations.warnings.simpleRepeat),{warning:t,suggestions:[be.translations.suggestions.repeated]}},BIe=()=>({warning:be.translations.warnings.sequences,suggestions:[be.translations.suggestions.sequences]}),HIe=e=>{let t=be.translations.warnings.keyPattern;return e.turns===1&&(t=be.translations.warnings.straightRow),{warning:t,suggestions:[be.translations.suggestions.longerKeyboardPattern]}},VIe=()=>null;const YE={warning:null,suggestions:[]};class jIe{constructor(){this.matchers={bruteforce:$Ie,date:kIe,dictionary:WIe,regex:GIe,repeat:zIe,sequence:BIe,spatial:HIe,separator:VIe},this.defaultFeedback={warning:null,suggestions:[]},this.setDefaultSuggestions()}setDefaultSuggestions(){this.defaultFeedback.suggestions.push(be.translations.suggestions.useWords,be.translations.suggestions.noNeed)}getFeedback(t,n){if(n.length===0)return this.defaultFeedback;if(t>2)return YE;const r=be.translations.suggestions.anotherWord,a=this.getLongestMatch(n);let s=this.getMatchFeedback(a,n.length===1);return s!=null?s.suggestions.unshift(r):s={warning:null,suggestions:[r]},s}getLongestMatch(t){let n=t[0];return t.slice(1).forEach(a=>{a.token.length>n.token.length&&(n=a)}),n}getMatchFeedback(t,n){return this.matchers[t.pattern]?this.matchers[t.pattern](t,n):be.matchers[t.pattern]&&"feedback"in be.matchers[t.pattern]?be.matchers[t.pattern].feedback(t,n):YE}}const gA=()=>new Date().getTime(),KIe=(e,t,n)=>{const r=new jIe,a=new LIe,s=$d.mostGuessableMatchSequence(t,e),i=gA()-n,o=a.estimateAttackTimes(s.guesses);return{calcTime:i,...s,...o,feedback:r.getFeedback(o.score,s.sequence)}},YIe=(e,t)=>(t&&be.extendUserInputsDictionary(t),new PIe().match(e)),qIe=(e,t)=>{const n=gA(),r=YIe(e,t);if(r instanceof Promise)throw new Error("You are using a Promised matcher, please use `zxcvbnAsync` for it.");return KIe(r,e,n)},XIe="modulepreload",ZIe=function(e){return"/"+e},qE={},Dt=function(t,n,r){let a=Promise.resolve();if(n&&n.length>0){const s=document.getElementsByTagName("link");a=Promise.all(n.map(i=>{if(i=ZIe(i),i in qE)return;qE[i]=!0;const o=i.endsWith(".css"),u=o?'[rel="stylesheet"]':"";if(!!r)for(let f=s.length-1;f>=0;f--){const d=s[f];if(d.href===i&&(!o||d.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${i}"]${u}`))return;const c=document.createElement("link");if(c.rel=o?"stylesheet":XIe,o||(c.as="script",c.crossOrigin=""),c.href=i,document.head.appendChild(c),o)return new Promise((f,d)=>{c.addEventListener("load",f),c.addEventListener("error",()=>d(new Error(`Unable to preload CSS for ${i}`)))})}))}return a.then(()=>t()).catch(s=>{const i=new Event("vite:preloadError",{cancelable:!0});if(i.payload=s,window.dispatchEvent(i),!i.defaultPrevented)throw s})},QIe=async e=>{switch(e){case"fr":return await Dt(()=>import("./password.fr-1uJe1-pR.js"),__vite__mapDeps([]));case"de":return await Dt(()=>import("./password.de-qoep7B_f.js"),__vite__mapDeps([]));case"it":return await Dt(()=>import("./password.it-ImDc22WR.js"),__vite__mapDeps([]));case"es":return await Dt(()=>import("./password.es-es--6AdGpRj.js"),__vite__mapDeps([]));case"pl":return await Dt(()=>import("./password.pl-Ipz4x2MM.js"),__vite__mapDeps([]));default:return await Dt(()=>import("./password.en-lIq_N4yZ.js"),__vite__mapDeps([]))}},XE=async e=>{const t=await Dt(()=>import("./password.common-7m77ow97.js"),__vite__mapDeps([])),n=await QIe(e),r={graphs:t.adjacencyGraphs,dictionary:{...t.dictionary,...n.dictionary}};be.setOptions(r)},JIe=e=>{switch(e){case 2:return"AVERAGE";case 3:return"GOOD";case 4:return"STRONG";default:return"WEAK"}},e2e={class:"password-strength"},t2e=["value"],n2e={key:0,class:"password-strength-details"},r2e={class:"password-strength-value"},a2e={key:0,class:"info-box"},s2e={class:"password-feedback"},i2e=Z({__name:"PasswordStength",props:{password:{}},setup(e){const t=e,{password:n}=_e(t),r=Me(),a=$(()=>r.getters[H.GETTERS.LANGUAGE]),s=$(()=>r.getters[K.GETTERS.IS_SUCCESS]),i=le(0),o=le(""),u=le([]),l=le("0% 100%");Nt(async()=>await XE(a.value));function c(f){const d=qIe(f);i.value=d.score,o.value=JIe(i.value),u.value=d.feedback.suggestions,l.value=i.value*100/4+"% 100%"}return Ge(()=>a.value,async f=>{await XE(f)}),Ge(()=>n.value,async f=>{s.value?o.value="":c(f)}),(f,d)=>(A(),N("div",e2e,[p("input",{class:Se(["password-slider",`strength-${i.value}`]),style:Vr({backgroundSize:l.value}),type:"range",value:i.value,min:"0",max:"4",step:"1",tabindex:-1},null,14,t2e),o.value?(A(),N("div",n2e,[p("span",r2e,T(f.$t("user.PASSWORD_STRENGTH.LABEL"))+": "+T(f.$t(`user.PASSWORD_STRENGTH.${o.value}`)),1),u.value.length>0?(A(),N("div",a2e,[p("ul",s2e,[(A(!0),N(Re,null,ze(u.value,m=>(A(),N("li",{key:m},T(f.$t(`user.PASSWORD_STRENGTH.SUGGESTIONS.${m}`)),1))),128))])])):x("",!0)])):x("",!0)]))}}),o2e=re(i2e,[["__scopeId","data-v-1affb508"]]),u2e=e=>(dt("data-v-ac528612"),e=e(),ft(),e),c2e={class:"password-input"},l2e=["id","disabled","placeholder","required","type"],d2e={class:"show-password"},f2e={key:0,class:"form-info"},p2e=u2e(()=>p("i",{class:"fa fa-info-circle","aria-hidden":"true"},null,-1)),m2e=Z({__name:"PasswordInput",props:{checkStrength:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},id:{default:"password"},password:{default:""},placeholder:{},required:{type:Boolean,default:!1}},emits:["updatePassword","passwordError"],setup(e,{emit:t}){const n=e,{checkStrength:r,disabled:a,id:s,password:i,placeholder:o,required:u}=_e(n),l=le(!1),c=le(""),f=t;function d(){l.value=!l.value}function m(v){f("updatePassword",v.target.value)}function E(){f("passwordError")}return Ge(()=>i.value,v=>{v===""&&(c.value="",l.value=!1)}),(v,R)=>(A(),N("div",c2e,[qe(p("input",{id:h(s),disabled:h(a),placeholder:h(o),required:h(u),type:l.value?"text":"password","onUpdate:modelValue":R[0]||(R[0]=I=>c.value=I),minlength:"8",onInput:m,onInvalid:E},null,40,l2e),[[CI,c.value]]),p("div",d2e,[p("button",{class:"transparent",onClick:Je(d,["prevent"]),type:"button"},[j(T(v.$t(`user.${l.value?"HIDE":"SHOW"}_PASSWORD`))+" ",1),p("i",{class:Se(["fa",`fa-eye${l.value?"-slash":""}`]),"aria-hidden":"true"},null,2)])]),h(r)?(A(),N("div",f2e,[p2e,j(" "+T(v.$t("user.PASSWORD_INFO")),1)])):x("",!0),h(r)?(A(),te(o2e,{key:1,password:c.value},null,8,["password"])):x("",!0)]))}}),kd=re(m2e,[["__scopeId","data-v-ac528612"]]),l0=e=>(dt("data-v-8ebb5cd3"),e=e(),ft(),e),E2e={id:"user-infos-edition"},h2e={class:"profile-form form-box"},_2e={key:1,class:"info-box success-message"},T2e={class:"form-items",for:"email"},g2e=["disabled"],A2e={class:"form-items",for:"password-field"},S2e={class:"form-items",for:"new-password-field"},O2e={class:"form-buttons"},I2e={class:"confirm",type:"submit"},v2e={class:"data-export"},R2e={class:"info-box"},b2e=l0(()=>p("i",{class:"fa fa-info-circle","aria-hidden":"true"},null,-1)),N2e={key:0,class:"data-export-archive"},C2e=l0(()=>p("i",{class:"fa fa-download","aria-hidden":"true"},null,-1)),y2e={key:1},D2e={key:2},P2e=l0(()=>p("i",{class:"fa fa-spinner fa-pulse","aria-hidden":"true"},null,-1)),w2e=Z({__name:"UserAccountEdition",props:{user:{}},setup(e){const t=e,{user:n}=_e(t),r=Me(),a=zt({email:"",password:"",new_password:""}),s=$(()=>r.getters[K.GETTERS.USER_LOADING]),i=$(()=>r.getters[H.GETTERS.APP_CONFIG]),o=$(()=>r.getters[K.GETTERS.IS_SUCCESS]),u=le(!1),l=$(()=>r.getters[H.GETTERS.ERROR_MESSAGES]),c=le(!1),f=le(!1),d=$(()=>r.getters[K.GETTERS.EXPORT_REQUEST]),m=$(()=>S()),E=le(!1);It(()=>{t.user&&(r.dispatch(K.ACTIONS.GET_REQUEST_DATA_EXPORT),R(t.user))});function v(){c.value=!0}function R(B){a.email=B.email}function I(B){a.password=B}function b(B){a.new_password=B}function S(){return d.value?kn(d.value.created_at,n.value.timezone,n.value.date_format,!0,null,!0):null}function O(){return m.value?XN(new Date(m.value),JN(new Date,1)):!0}function C(){const B={email:a.email,password:a.password};a.new_password&&(B.new_password=a.new_password),u.value=a.email!==n.value.email,r.dispatch(K.ACTIONS.UPDATE_USER_ACCOUNT,B)}function P(B){f.value=B}function M(B){r.dispatch(K.ACTIONS.DELETE_ACCOUNT,{username:B})}function w(){r.dispatch(K.ACTIONS.REQUEST_DATA_EXPORT)}async function G(B){E.value=!0,await je.get(`/auth/account/export/${B}`,{responseType:"blob"}).then(L=>{const X=window.URL.createObjectURL(new Blob([L.data],{type:"application/zip"})),J=document.createElement("a");J.href=X,J.setAttribute("download",B),document.body.appendChild(J),J.click()}).finally(()=>E.value=!1)}return Ct(()=>{r.commit(K.MUTATIONS.UPDATE_IS_SUCCESS,!1),r.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES)}),Ge(()=>o.value,async B=>{B&&(I(""),b(""),R(n.value),c.value=!1)}),Ge(()=>n.value.email,async()=>{R(n.value)}),(B,L)=>{const X=oe("Modal"),J=oe("ErrorMessage");return A(),N("div",E2e,[f.value?(A(),te(X,{key:0,title:B.$t("common.CONFIRMATION"),message:B.$t("user.CONFIRM_ACCOUNT_DELETION"),onConfirmAction:L[0]||(L[0]=ne=>M(h(n).username)),onCancelAction:L[1]||(L[1]=ne=>P(!1)),onKeydown:L[2]||(L[2]=gt(ne=>P(!1),["esc"]))},null,8,["title","message"])):x("",!0),p("div",h2e,[l.value?(A(),te(J,{key:0,message:l.value},null,8,["message"])):x("",!0),o.value?(A(),N("div",_2e,T(B.$t(`user.PROFILE.SUCCESSFUL_${u.value&&i.value.is_email_sending_enabled?"EMAIL_":""}UPDATE`)),1)):x("",!0),p("form",{class:Se({errors:c.value}),onSubmit:Je(C,["prevent"])},[p("label",T2e,[j(T(B.$t("user.EMAIL"))+"* ",1),qe(p("input",{id:"email","onUpdate:modelValue":L[3]||(L[3]=ne=>a.email=ne),disabled:s.value,required:!0,onInvalid:v},null,40,g2e),[[at,a.email]])]),p("label",A2e,[j(T(B.$t("user.CURRENT_PASSWORD"))+"* ",1),k(kd,{id:"password-field",disabled:s.value,password:a.password,required:!0,onUpdatePassword:I,onPasswordError:v},null,8,["disabled","password"])]),p("label",S2e,[j(T(B.$t("user.NEW_PASSWORD"))+" ",1),k(kd,{id:"new-password-field",disabled:s.value,checkStrength:!0,password:a.new_password,isSuccess:!1,onUpdatePassword:b,onPasswordError:v},null,8,["disabled","password"])]),p("div",O2e,[p("button",I2e,T(B.$t("buttons.SUBMIT")),1),p("button",{class:"cancel",onClick:L[4]||(L[4]=Je(ne=>B.$router.push("/profile"),["prevent"]))},T(B.$t("buttons.CANCEL")),1),p("button",{class:"danger",onClick:L[5]||(L[5]=Je(ne=>P(!0),["prevent"]))},T(B.$t("buttons.DELETE_MY_ACCOUNT")),1),O()?(A(),N("button",{key:0,class:"confirm",onClick:Je(w,["prevent"])},T(B.$t("buttons.REQUEST_DATA_EXPORT")),1)):x("",!0)])],34),p("div",v2e,[p("span",R2e,[b2e,j(" "+T(B.$t("user.EXPORT_REQUEST.ONLY_ONE_EXPORT_PER_DAY")),1)]),d.value?(A(),N("div",N2e,[j(T(B.$t("user.EXPORT_REQUEST.DATA_EXPORT"))+" ("+T(m.value)+"): ",1),d.value.status==="successful"?(A(),N("span",{key:0,class:"archive-link",onClick:L[6]||(L[6]=Je(ne=>G(d.value.file_name),["prevent"]))},[C2e,j(" "+T(B.$t("user.EXPORT_REQUEST.DOWNLOAD_ARCHIVE"))+" ("+T(h(qo)(d.value.file_size))+") ",1)])):(A(),N("span",y2e,T(B.$t(`user.EXPORT_REQUEST.STATUS.${d.value.status}`)),1)),E.value?(A(),N("span",D2e,[j(T(B.$t("user.EXPORT_REQUEST.GENERATING_LINK"))+" ",1),P2e])):x("",!0)])):x("",!0)])])])}}}),L2e=re(w2e,[["__scopeId","data-v-8ebb5cd3"]]),$2e={id:"user-infos-edition"},k2e={class:"profile-form form-box"},U2e={class:"form-items",for:"registrationDate"},M2e=["value"],x2e={class:"form-items",for:"first_name"},F2e=["disabled"],W2e={class:"form-items",for:"last_name"},G2e={class:"form-items",for:"birth_date"},z2e=["disabled"],B2e={class:"form-items",for:"location"},H2e=["disabled"],V2e={class:"form-items"},j2e={class:"form-buttons"},K2e={class:"confirm",type:"submit"},Y2e=Z({__name:"UserInfosEdition",props:{user:{}},setup(e){const t=e,n=Me(),r=zt({first_name:"",last_name:"",birth_date:"",location:"",bio:""}),a=$(()=>t.user.created_at?kn(t.user.created_at,t.user.timezone,t.user.date_format):""),s=$(()=>n.getters[K.GETTERS.USER_LOADING]),i=$(()=>n.getters[H.GETTERS.ERROR_MESSAGES]);It(()=>{t.user&&o(t.user)});function o(c){r.first_name=c.first_name?c.first_name:"",r.last_name=c.last_name?c.last_name:"",r.birth_date=c.birth_date?dn(new Date(c.birth_date),"yyyy-MM-dd"):"",r.location=c.location?c.location:"",r.bio=c.bio?c.bio:""}function u(c){r.bio=c}function l(){n.dispatch(K.ACTIONS.UPDATE_USER_PROFILE,r)}return Ct(()=>{n.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES)}),(c,f)=>{const d=oe("ErrorMessage"),m=oe("CustomTextArea");return A(),N("div",$2e,[p("div",k2e,[i.value?(A(),te(d,{key:0,message:i.value},null,8,["message"])):x("",!0),p("form",{onSubmit:Je(l,["prevent"])},[p("label",U2e,[j(T(c.$t("user.PROFILE.REGISTRATION_DATE"))+" ",1),p("input",{id:"registrationDate",value:a.value,disabled:""},null,8,M2e)]),p("label",x2e,[j(T(c.$t("user.PROFILE.FIRST_NAME"))+" ",1),qe(p("input",{id:"first_name","onUpdate:modelValue":f[0]||(f[0]=E=>r.first_name=E),disabled:s.value},null,8,F2e),[[at,r.first_name]])]),p("label",W2e,[j(T(c.$t("user.PROFILE.LAST_NAME"))+" ",1),qe(p("input",{id:"last_name","onUpdate:modelValue":f[1]||(f[1]=E=>r.last_name=E)},null,512),[[at,r.last_name]])]),p("label",G2e,[j(T(c.$t("user.PROFILE.BIRTH_DATE"))+" ",1),qe(p("input",{id:"birth_date",type:"date",class:"birth-date","onUpdate:modelValue":f[2]||(f[2]=E=>r.birth_date=E),disabled:s.value},null,8,z2e),[[at,r.birth_date]])]),p("label",B2e,[j(T(c.$t("user.PROFILE.LOCATION"))+" ",1),qe(p("input",{id:"location","onUpdate:modelValue":f[3]||(f[3]=E=>r.location=E),disabled:s.value},null,8,H2e),[[at,r.location]])]),p("label",V2e,[j(T(c.$t("user.PROFILE.BIO"))+" ",1),k(m,{name:"bio",charLimit:200,input:r.bio,disabled:s.value,onUpdateValue:u},null,8,["input","disabled"])]),p("div",j2e,[p("button",K2e,T(c.$t("buttons.SUBMIT")),1),p("button",{class:"cancel",onClick:f[4]||(f[4]=Je(E=>c.$router.push("/profile"),["prevent"]))},T(c.$t("buttons.CANCEL")),1)])],32)])])}}}),q2e=re(Y2e,[["__scopeId","data-v-5f5c8fca"]]),X2e=e=>(dt("data-v-8f62d42f"),e=e(),ft(),e),Z2e={id:"user-picture-edition"},Q2e={class:"user-picture-form"},J2e={class:"picture-help"},eve={class:"info-box"},tve=X2e(()=>p("i",{class:"fa fa-info-circle","aria-hidden":"true"},null,-1)),nve={class:"picture-buttons"},rve=["disabled"],ave=Z({__name:"UserPictureEdition",props:{user:{}},setup(e){const t=e,n=Me(),{user:r}=_e(t),a=$(()=>n.getters[H.GETTERS.ERROR_MESSAGES]),s=$(()=>n.getters[H.GETTERS.APP_CONFIG]),i=s.value.max_single_file_size?qo(s.value.max_single_file_size):"",o=le(null);function u(){n.dispatch(K.ACTIONS.DELETE_PICTURE)}function l(f){f.target.files!==null&&(o.value=f.target.files[0])}function c(){o.value&&n.dispatch(K.ACTIONS.UPDATE_USER_PICTURE,{picture:o.value})}return Ct(()=>{n.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES)}),(f,d)=>{const m=oe("ErrorMessage");return A(),N("div",Z2e,[p("div",Q2e,[a.value?(A(),te(m,{key:0,message:a.value},null,8,["message"])):x("",!0),k(Oi,{user:h(r)},null,8,["user"]),p("form",{onSubmit:Je(c,["prevent"])},[p("input",{type:"file",name:"picture",accept:".png,.jpg,.gif",onInput:l},null,32),p("div",J2e,[p("span",eve,[tve,j(" "+T(f.$t("workouts.MAX_SIZE"))+": "+T(h(i)),1)])]),p("div",nve,[p("button",{type:"submit",disabled:!o.value},T(f.$t("user.PROFILE.PICTURE_UPDATE")),9,rve),h(r).picture?(A(),N("button",{key:0,class:"danger",onClick:u},T(f.$t("user.PROFILE.PICTURE_REMOVE")),1)):x("",!0),p("button",{class:"cancel",onClick:d[0]||(d[0]=E=>f.$router.push("/profile"))},T(f.$t("user.PROFILE.BACK_TO_PROFILE")),1)])],32)])])}}}),sve=re(ave,[["__scopeId","data-v-8f62d42f"]]),ZE=["Africa/Abidjan","Africa/Accra","Africa/Algiers","Africa/Bissau","Africa/Cairo","Africa/Casablanca","Africa/Ceuta","Africa/El_Aaiun","Africa/Johannesburg","Africa/Juba","Africa/Khartoum","Africa/Lagos","Africa/Maputo","Africa/Monrovia","Africa/Nairobi","Africa/Ndjamena","Africa/Sao_Tome","Africa/Tripoli","Africa/Tunis","Africa/Windhoek","America/Adak","America/Anchorage","America/Araguaina","America/Argentina/Buenos_Aires","America/Argentina/Catamarca","America/Argentina/Cordoba","America/Argentina/Jujuy","America/Argentina/La_Rioja","America/Argentina/Mendoza","America/Argentina/Rio_Gallegos","America/Argentina/Salta","America/Argentina/San_Juan","America/Argentina/San_Luis","America/Argentina/Tucuman","America/Argentina/Ushuaia","America/Asuncion","America/Atikokan","America/Bahia","America/Bahia_Banderas","America/Barbados","America/Belem","America/Belize","America/Blanc-Sablon","America/Boa_Vista","America/Bogota","America/Boise","America/Cambridge_Bay","America/Campo_Grande","America/Cancun","America/Caracas","America/Cayenne","America/Chicago","America/Chihuahua","America/Costa_Rica","America/Creston","America/Cuiaba","America/Curacao","America/Danmarkshavn","America/Dawson","America/Dawson_Creek","America/Denver","America/Detroit","America/Edmonton","America/Eirunepe","America/El_Salvador","America/Fortaleza","America/Fort_Nelson","America/Glace_Bay","America/Godthab","America/Goose_Bay","America/Grand_Turk","America/Guatemala","America/Guayaquil","America/Guyana","America/Halifax","America/Havana","America/Hermosillo","America/Indiana/Indianapolis","America/Indiana/Knox","America/Indiana/Marengo","America/Indiana/Petersburg","America/Indiana/Tell_City","America/Indiana/Vevay","America/Indiana/Vincennes","America/Indiana/Winamac","America/Inuvik","America/Iqaluit","America/Jamaica","America/Juneau","America/Kentucky/Louisville","America/Kentucky/Monticello","America/La_Paz","America/Lima","America/Los_Angeles","America/Maceio","America/Managua","America/Manaus","America/Martinique","America/Matamoros","America/Mazatlan","America/Menominee","America/Merida","America/Metlakatla","America/Mexico_City","America/Miquelon","America/Moncton","America/Monterrey","America/Montevideo","America/Nassau","America/New_York","America/Nipigon","America/Nome","America/Noronha","America/North_Dakota/Beulah","America/North_Dakota/Center","America/North_Dakota/New_Salem","America/Ojinaga","America/Panama","America/Pangnirtung","America/Paramaribo","America/Phoenix","America/Port-au-Prince","America/Port_of_Spain","America/Porto_Velho","America/Puerto_Rico","America/Punta_Arenas","America/Rainy_River","America/Rankin_Inlet","America/Recife","America/Regina","America/Resolute","America/Rio_Branco","America/Santarem","America/Santiago","America/Santo_Domingo","America/Sao_Paulo","America/Scoresbysund","America/Sitka","America/St_Johns","America/Swift_Current","America/Tegucigalpa","America/Thule","America/Thunder_Bay","America/Tijuana","America/Toronto","America/Vancouver","America/Whitehorse","America/Winnipeg","America/Yakutat","America/Yellowknife","Antarctica/Casey","Antarctica/Davis","Antarctica/DumontDUrville","Antarctica/Macquarie","Antarctica/Mawson","Antarctica/Palmer","Antarctica/Rothera","Antarctica/Syowa","Antarctica/Troll","Antarctica/Vostok","Asia/Almaty","Asia/Amman","Asia/Anadyr","Asia/Aqtau","Asia/Aqtobe","Asia/Ashgabat","Asia/Atyrau","Asia/Baghdad","Asia/Baku","Asia/Bangkok","Asia/Barnaul","Asia/Beirut","Asia/Bishkek","Asia/Brunei","Asia/Chita","Asia/Choibalsan","Asia/Colombo","Asia/Damascus","Asia/Dhaka","Asia/Dili","Asia/Dubai","Asia/Dushanbe","Asia/Famagusta","Asia/Gaza","Asia/Hebron","Asia/Ho_Chi_Minh","Asia/Hong_Kong","Asia/Hovd","Asia/Irkutsk","Asia/Jakarta","Asia/Jayapura","Asia/Jerusalem","Asia/Kabul","Asia/Kamchatka","Asia/Karachi","Asia/Kathmandu","Asia/Khandyga","Asia/Kolkata","Asia/Krasnoyarsk","Asia/Kuala_Lumpur","Asia/Kuching","Asia/Macau","Asia/Magadan","Asia/Makassar","Asia/Manila","Asia/Nicosia","Asia/Novokuznetsk","Asia/Novosibirsk","Asia/Omsk","Asia/Oral","Asia/Pontianak","Asia/Pyongyang","Asia/Qatar","Asia/Qostanay","Asia/Qyzylorda","Asia/Riyadh","Asia/Sakhalin","Asia/Samarkand","Asia/Seoul","Asia/Shanghai","Asia/Singapore","Asia/Srednekolymsk","Asia/Taipei","Asia/Tashkent","Asia/Tbilisi","Asia/Tehran","Asia/Thimphu","Asia/Tokyo","Asia/Tomsk","Asia/Ulaanbaatar","Asia/Urumqi","Asia/Ust-Nera","Asia/Vladivostok","Asia/Yakutsk","Asia/Yangon","Asia/Yekaterinburg","Asia/Yerevan","Atlantic/Azores","Atlantic/Bermuda","Atlantic/Canary","Atlantic/Cape_Verde","Atlantic/Faroe","Atlantic/Madeira","Atlantic/Reykjavik","Atlantic/South_Georgia","Atlantic/Stanley","Australia/Adelaide","Australia/Brisbane","Australia/Broken_Hill","Australia/Currie","Australia/Darwin","Australia/Eucla","Australia/Hobart","Australia/Lindeman","Australia/Lord_Howe","Australia/Melbourne","Australia/Perth","Australia/Sydney","Europe/Amsterdam","Europe/Andorra","Europe/Astrakhan","Europe/Athens","Europe/Belgrade","Europe/Berlin","Europe/Brussels","Europe/Bucharest","Europe/Budapest","Europe/Chisinau","Europe/Copenhagen","Europe/Dublin","Europe/Gibraltar","Europe/Helsinki","Europe/Istanbul","Europe/Kaliningrad","Europe/Kiev","Europe/Kirov","Europe/Lisbon","Europe/London","Europe/Luxembourg","Europe/Madrid","Europe/Malta","Europe/Minsk","Europe/Monaco","Europe/Moscow","Europe/Oslo","Europe/Paris","Europe/Prague","Europe/Riga","Europe/Rome","Europe/Samara","Europe/Saratov","Europe/Simferopol","Europe/Sofia","Europe/Stockholm","Europe/Tallinn","Europe/Tirane","Europe/Ulyanovsk","Europe/Uzhgorod","Europe/Vienna","Europe/Vilnius","Europe/Volgograd","Europe/Warsaw","Europe/Zaporozhye","Europe/Zurich","Indian/Chagos","Indian/Christmas","Indian/Cocos","Indian/Kerguelen","Indian/Mahe","Indian/Maldives","Indian/Mauritius","Indian/Reunion","Pacific/Apia","Pacific/Auckland","Pacific/Bougainville","Pacific/Chatham","Pacific/Chuuk","Pacific/Easter","Pacific/Efate","Pacific/Enderbury","Pacific/Fakaofo","Pacific/Fiji","Pacific/Funafuti","Pacific/Galapagos","Pacific/Gambier","Pacific/Guadalcanal","Pacific/Guam","Pacific/Honolulu","Pacific/Kiritimati","Pacific/Kosrae","Pacific/Kwajalein","Pacific/Majuro","Pacific/Marquesas","Pacific/Nauru","Pacific/Niue","Pacific/Norfolk","Pacific/Noumea","Pacific/Pago_Pago","Pacific/Palau","Pacific/Pitcairn","Pacific/Pohnpei","Pacific/Port_Moresby","Pacific/Rarotonga","Pacific/Tahiti","Pacific/Tarawa","Pacific/Tongatapu","Pacific/Wake","Pacific/Wallis"],ive={id:"tz-dropdown"},ove=["value","disabled","aria-expanded"],uve=["aria-label"],cve=["id","onClick","onMouseover","autofocus"],lve=Z({__name:"TimezoneDropdown",props:{input:{},disabled:{type:Boolean,default:!1}},emits:["updateTimezone"],setup(e,{emit:t}){const n=e,r=t,{input:a,disabled:s}=_e(n),i=le(a.value),o=le(!1),u=le(0),l=$(()=>a.value?ZE.filter(O=>c(O)):ZE);function c(O){return O.toLowerCase().match(i.value.toLowerCase())}function f(O){u.value=O}function d(O){l.value.length>O&&(i.value=l.value[O],r("updateTimezone",i.value),o.value=!1)}function m(O){O.preventDefault(),l.value.length>0&&d(u.value)}function E(O){O.preventDefault(),o.value=!0,i.value=O.target.value.trim()}function v(){d(u.value)}function R(O){const C=document.getElementById(`tz-dropdown-item-${O}`);C&&(C.focus(),C.scrollIntoView({behavior:"smooth",block:"nearest"}))}function I(){o.value=!0,u.value=u.value===null?0:u.value+=1,u.value>=l.value.length&&(u.value=0),R(u.value)}function b(){o.value=!0,u.value=u.value===null?l.value.length-1:u.value-=1,u.value<=-1&&(u.value=l.value.length-1),R(u.value)}function S(){o.value&&(o.value=!1,i.value=a.value)}return Ge(()=>n.input,O=>{i.value=O}),(O,C)=>(A(),N("div",ive,[p("input",{class:"tz-dropdown-input",id:"timezone",name:"timezone",value:i.value,disabled:h(s),required:"",role:"combobox","aria-autocomplete":"list","aria-controls":"tz-dropdown-list","aria-expanded":o.value,onKeydown:[C[0]||(C[0]=gt(P=>S(),["esc"])),gt(m,["enter"]),C[2]||(C[2]=gt(P=>I(),["down"])),C[3]||(C[3]=gt(P=>b(),["up"]))],onInput:E,onBlur:C[1]||(C[1]=P=>v())},null,40,ove),o.value?(A(),N("ul",{key:0,class:"tz-dropdown-list",id:"tz-dropdown-list",role:"listbox",tabindex:"-1","aria-label":O.$t("user.PROFILE.TIMEZONE",0)},[(A(!0),N(Re,null,ze(l.value,(P,M)=>(A(),N("li",{key:P,id:`tz-dropdown-item-${M}`,class:Se(["tz-dropdown-item",{focus:M===u.value}]),onClick:w=>d(M),onMouseover:w=>f(M),autofocus:M===u.value,role:"option"},T(P),43,cve))),128))],8,uve)):x("",!0)]))}}),dve=re(lve,[["__scopeId","data-v-3d9b6b6f"]]),fve=e=>(dt("data-v-7b19a78b"),e=e(),ft(),e),pve={id:"user-preferences-edition"},mve={class:"profile-form form-box"},Eve={class:"preferences-section"},hve={class:"form-items"},_ve=["disabled"],Tve=["value"],gve={class:"form-items"},Ave=["disabled"],Sve=["value"],Ove={class:"form-items"},Ive={class:"form-items"},vve=["disabled"],Rve=["value"],bve={class:"form-items form-checkboxes"},Nve={class:"checkboxes-label"},Cve={class:"checkboxes"},yve=["id","name","checked","disabled","onInput"],Dve={class:"checkbox-label"},Pve={class:"preferences-section"},wve={class:"form-items form-checkboxes"},Lve={class:"checkboxes-label"},$ve={class:"checkboxes"},kve=["id","name","checked","disabled","onInput"],Uve={class:"checkbox-label"},Mve={class:"form-items form-checkboxes"},xve={class:"checkboxes-label"},Fve={class:"checkboxes"},Wve=["id","name","checked","disabled","onInput"],Gve={class:"checkbox-label"},zve={class:"form-items form-checkboxes"},Bve={class:"checkboxes-label"},Hve={class:"checkboxes"},Vve=["id","name","checked","disabled","onInput"],jve={class:"checkbox-label"},Kve={class:"form-items form-checkboxes"},Yve={class:"checkboxes-label"},qve={class:"checkboxes"},Xve=["id","name","checked","disabled","onInput"],Zve={class:"checkbox-label"},Qve={class:"info-box raw-speed-help"},Jve=fve(()=>p("i",{class:"fa fa-info-circle","aria-hidden":"true"},null,-1)),eRe={class:"form-buttons"},tRe={class:"confirm",type:"submit"},nRe=Z({__name:"UserPreferencesEdition",props:{user:{}},setup(e){const t=e,n=Me(),r=zt({display_ascent:!0,imperial_units:!1,language:"en",timezone:"Europe/Paris",date_format:"dd/MM/yyyy",weekm:!1,start_elevation_at_zero:!1,use_raw_gpx_speed:!1,use_dark_mode:!1}),a=[{label:"SUNDAY",value:!1},{label:"MONDAY",value:!0}],s=[{label:"METRIC",value:!1},{label:"IMPERIAL",value:!0}],i=[{label:"DISPLAYED",value:!0},{label:"HIDDEN",value:!1}],o=[{label:"ZERO",value:!0},{label:"MIN_ALT",value:!1}],u=[{label:"FILTERED_SPEED",value:!1},{label:"RAW_SPEED",value:!0}],l=[{label:"DARK",value:!0},{label:"DEFAULT",value:null},{label:"LIGHT",value:!1}],c=$(()=>n.getters[K.GETTERS.USER_LOADING]),f=$(()=>n.getters[H.GETTERS.ERROR_MESSAGES]),d=$(()=>MAe(new Date().toUTCString(),t.user.timezone,r.language));It(()=>{t.user&&m(t.user)});function m(C){r.display_ascent=C.display_ascent,r.start_elevation_at_zero=C.start_elevation_at_zero?C.start_elevation_at_zero:!1,r.use_raw_gpx_speed=C.use_raw_gpx_speed?C.use_raw_gpx_speed:!1,r.imperial_units=C.imperial_units?C.imperial_units:!1,r.language=C.language?C.language:"en",r.timezone=C.timezone?C.timezone:"Europe/Paris",r.date_format=C.date_format?C.date_format:"dd/MM/yyyy",r.weekm=C.weekm?C.weekm:!1,r.use_dark_mode=C.use_dark_mode}function E(){n.dispatch(K.ACTIONS.UPDATE_USER_PREFERENCES,r)}function v(C){r.timezone=C}function R(C){r.start_elevation_at_zero=C}function I(C){r.use_raw_gpx_speed=C}function b(C){r.display_ascent=C}function S(C){r.imperial_units=C}function O(C){r.weekm=C}return Ct(()=>{n.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES)}),(C,P)=>{const M=oe("ErrorMessage");return A(),N("div",pve,[p("div",mve,[f.value?(A(),te(M,{key:0,message:f.value},null,8,["message"])):x("",!0),p("form",{onSubmit:Je(E,["prevent"])},[p("div",Eve,T(C.$t("user.PROFILE.INTERFACE")),1),p("label",hve,[j(T(C.$t("user.PROFILE.LANGUAGE"))+" ",1),qe(p("select",{id:"language","onUpdate:modelValue":P[0]||(P[0]=w=>r.language=w),disabled:c.value},[(A(!0),N(Re,null,ze(h(Zl),w=>(A(),N("option",{value:w.value,key:w.value},T(w.label),9,Tve))),128))],8,_ve),[[ks,r.language]])]),p("label",gve,[j(T(C.$t("user.PROFILE.THEME_MODE.LABEL"))+" ",1),qe(p("select",{id:"use_dark_mode","onUpdate:modelValue":P[1]||(P[1]=w=>r.use_dark_mode=w),disabled:c.value},[(A(),N(Re,null,ze(l,w=>p("option",{value:w.value,key:w.label},T(C.$t(`user.PROFILE.THEME_MODE.VALUES.${w.label}`)),9,Sve)),64))],8,Ave),[[ks,r.use_dark_mode]])]),p("label",Ove,[j(T(C.$t("user.PROFILE.TIMEZONE"))+" ",1),k(dve,{input:r.timezone,disabled:c.value,onUpdateTimezone:v},null,8,["input","disabled"])]),p("label",Ive,[j(T(C.$t("user.PROFILE.DATE_FORMAT"))+" ",1),qe(p("select",{id:"date_format","onUpdate:modelValue":P[2]||(P[2]=w=>r.date_format=w),disabled:c.value},[(A(!0),N(Re,null,ze(d.value,w=>(A(),N("option",{value:w.value,key:w.value},T(w.label),9,Rve))),128))],8,vve),[[ks,r.date_format]])]),p("div",bve,[p("span",Nve,T(C.$t("user.PROFILE.FIRST_DAY_OF_WEEK")),1),p("div",Cve,[(A(),N(Re,null,ze(a,w=>p("label",{key:w.label},[p("input",{type:"radio",id:w.label,name:w.label,checked:w.value===r.weekm,disabled:c.value,onInput:G=>O(w.value)},null,40,yve),p("span",Dve,T(C.$t(`user.PROFILE.${w.label}`)),1)])),64))])]),p("div",Pve,T(C.$t("workouts.WORKOUT",0)),1),p("div",wve,[p("span",Lve,T(C.$t("user.PROFILE.UNITS.LABEL")),1),p("div",$ve,[(A(),N(Re,null,ze(s,w=>p("label",{key:w.label},[p("input",{type:"radio",id:w.label,name:w.label,checked:w.value===r.imperial_units,disabled:c.value,onInput:G=>S(w.value)},null,40,kve),p("span",Uve,T(C.$t(`user.PROFILE.UNITS.${w.label}`)),1)])),64))])]),p("div",Mve,[p("span",xve,T(C.$t("user.PROFILE.ASCENT_DATA")),1),p("div",Fve,[(A(),N(Re,null,ze(i,w=>p("label",{key:w.label},[p("input",{type:"radio",id:w.label,name:w.label,checked:w.value===r.display_ascent,disabled:c.value,onInput:G=>b(w.value)},null,40,Wve),p("span",Gve,T(C.$t(`common.${w.label}`)),1)])),64))])]),p("div",zve,[p("span",Bve,T(C.$t("user.PROFILE.ELEVATION_CHART_START.LABEL")),1),p("div",Hve,[(A(),N(Re,null,ze(o,w=>p("label",{key:w.label},[p("input",{type:"radio",id:w.label,name:w.label,checked:w.value===r.start_elevation_at_zero,disabled:c.value,onInput:G=>R(w.value)},null,40,Vve),p("span",jve,T(C.$t(`user.PROFILE.ELEVATION_CHART_START.${w.label}`)),1)])),64))])]),p("div",Kve,[p("span",Yve,T(C.$t("user.PROFILE.USE_RAW_GPX_SPEED.LABEL")),1),p("div",qve,[(A(),N(Re,null,ze(u,w=>p("label",{key:w.label},[p("input",{type:"radio",id:w.label,name:w.label,checked:w.value===r.use_raw_gpx_speed,disabled:c.value,onInput:G=>I(w.value)},null,40,Xve),p("span",Zve,T(C.$t(`user.PROFILE.USE_RAW_GPX_SPEED.${w.label}`)),1)])),64))]),p("div",Qve,[p("span",null,[Jve,j(" "+T(C.$t("user.PROFILE.USE_RAW_GPX_SPEED.HELP")),1)])])]),p("div",eRe,[p("button",tRe,T(C.$t("buttons.SUBMIT")),1),p("button",{class:"cancel",onClick:P[3]||(P[3]=Je(w=>C.$router.push("/profile/preferences"),["prevent"]))},T(C.$t("buttons.CANCEL")),1)])],32)])])}}}),rRe=re(nRe,[["__scopeId","data-v-7b19a78b"]]),aRe={class:"privacy-policy-text"},sRe={class:"last-update"},iRe=["innerHTML"],oRe=["innerHTML"],uRe="Sun, 26 Feb 2023 17:00:00 GMT",cRe=Z({__name:"PrivacyPolicy",setup(e){const t=Me(),n=$(()=>t.getters[H.GETTERS.APP_CONFIG]),r=$(()=>t.getters[H.GETTERS.LANGUAGE]),a=$(()=>t.getters[K.GETTERS.AUTH_USER_PROFILE]),s=$(()=>c()),i=$(()=>l()),o=$(()=>f()),u=["DATA_COLLECTED","INFORMATION_USAGE","INFORMATION_PROTECTION","INFORMATION_DISCLOSURE","SITE_USAGE_BY_CHILDREN","YOUR_CONSENT","ACCOUNT_DELETION","CHANGES_TO_OUR_PRIVACY_POLICY"];function l(){return a.value.timezone?a.value.timezone:Intl.DateTimeFormat().resolvedOptions().timeZone?Intl.DateTimeFormat().resolvedOptions().timeZone:"Europe/Paris"}function c(){return nA[r.value]}function f(){return kn(n.value.privacy_policy&&n.value.privacy_policy_date?`${n.value.privacy_policy_date}`:uRe,i.value,s.value,!1)}return(d,m)=>(A(),N("div",aRe,[p("h1",null,T(Rt(d.$t("privacy_policy.TITLE"))),1),p("p",sRe,[j(T(d.$t("privacy_policy.LAST_UPDATE"))+": ",1),p("time",null,T(o.value),1)]),n.value.privacy_policy?(A(),N("div",{key:0,innerHTML:h(ca)(h(di)(n.value.privacy_policy))},null,8,iRe)):(A(),N(Re,{key:1},ze(u,E=>(A(),N(Re,{key:E},[p("h2",null,T(d.$t(`privacy_policy.CONTENT.${E}.TITLE`)),1),p("p",{innerHTML:h(ca)(d.$t(`privacy_policy.CONTENT.${E}.CONTENT`))},null,8,oRe)],64))),64))]))}}),AA=re(cRe,[["__scopeId","data-v-31d5cd27"]]),lRe={id:"user-privacy-policy"},dRe={key:1},fRe={class:"policy-content"},pRe={for:"accepted_policy",class:"accepted_policy"},mRe={class:"form-buttons"},ERe={class:"confirm",type:"submit"},hRe=Z({__name:"UserPrivacyPolicyValidation",props:{user:{}},setup(e){const t=e,{user:n}=_e(t),r=Me(),a=$(()=>r.getters[H.GETTERS.ERROR_MESSAGES]),s=le(!1),i=le(!1);function o(){r.dispatch(K.ACTIONS.ACCEPT_PRIVACY_POLICY,s.value)}function u(){i.value=!0}return Ct(()=>{r.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES)}),(l,c)=>{const f=oe("ErrorMessage"),d=oe("router-link"),m=oe("i18n-t");return A(),N("div",lRe,[a.value?(A(),te(f,{key:0,message:a.value},null,8,["message"])):x("",!0),h(n).accepted_privacy_policy?(A(),N("div",dRe,[p("p",null,[k(m,{keypath:"user.YOU_HAVE_ACCEPTED_PRIVACY_POLICY"},{default:ue(()=>[k(d,{to:"/privacy-policy"},{default:ue(()=>[j(T(l.$t("privacy_policy.TITLE")),1)]),_:1})]),_:1})]),p("button",{class:"cancel",onClick:c[0]||(c[0]=E=>l.$router.push("/profile"))},T(l.$t("user.PROFILE.BACK_TO_PROFILE")),1)])):(A(),N("form",{key:2,class:Se({errors:i.value}),onSubmit:c[3]||(c[3]=Je(E=>o(),["prevent"]))},[p("div",fRe,[k(AA)]),p("label",pRe,[qe(p("input",{type:"checkbox",id:"accepted_policy",required:"","onUpdate:modelValue":c[1]||(c[1]=E=>s.value=E),onInvalid:u},null,544),[[rf,s.value]]),p("span",null,[k(m,{keypath:"user.READ_AND_ACCEPT_PRIVACY_POLICY"},{default:ue(()=>[j(T(l.$t("privacy_policy.TITLE")),1)]),_:1})])]),k(d,{to:"/profile/edit/account"},{default:ue(()=>[j(T(l.$t("user.I_WANT_TO_DELETE_MY_ACCOUNT")),1)]),_:1}),p("div",mRe,[p("button",ERe,T(l.$t("buttons.SUBMIT")),1),p("button",{class:"cancel",onClick:c[2]||(c[2]=E=>l.$router.push("/profile"))},T(l.$t("user.PROFILE.BACK_TO_PROFILE")),1)])],34))])}}}),_Re=re(hRe,[["__scopeId","data-v-9b1ceaf7"]]),TRe=["profile:read","profile:write","users:read","users:write","workouts:read","workouts:write"],gRe=["application:write"],ARe={id:"new-oauth2-app"},SRe={id:"new-oauth2-title"},ORe={id:"apps-form"},IRe={class:"form-items"},vRe={class:"form-item"},RRe={for:"app-name"},bRe={class:"form-item"},NRe={for:"app-description"},CRe={class:"form-item"},yRe={for:"app-url"},DRe={class:"form-item"},PRe={for:"app-redirect-uri"},wRe={class:"form-item-scope"},LRe={class:"form-item-scope-label"},$Re={class:"scope-label"},kRe=["name","checked","onChange"],URe=["innerHTML"],MRe={class:"form-buttons"},xRe=["disabled"],FRe=Z({__name:"AddUserApp",props:{authUser:{}},setup(e){const t=e,n=Me(),r=zt({client_name:"",client_uri:"",client_description:"",description:"",redirect_uri:""}),a=zt([]),s=$(()=>l(t.authUser,gRe,TRe));function i(){const c={client_name:r.client_name,client_description:r.client_description,client_uri:r.client_uri,redirect_uris:[r.redirect_uri],scope:a.sort().join(" ")};n.dispatch(Ye.ACTIONS.CREATE_CLIENT,c)}function o(c){r.client_description=c}function u(c){const f=a.indexOf(c);f>-1?a.splice(f,1):a.push(c)}function l(c,f,d){const m=[...d];return c.admin&&m.push(...f),m.sort()}return(c,f)=>{const d=oe("CustomTextArea");return A(),N("div",ARe,[p("h1",SRe,T(c.$t("oauth2.ADD_A_NEW_APP")),1),p("div",ORe,[p("form",{onSubmit:Je(i,["prevent"])},[p("div",IRe,[p("div",vRe,[p("label",RRe,T(c.$t("oauth2.APP.NAME"))+"*",1),qe(p("input",{id:"app-name",type:"text",required:"","onUpdate:modelValue":f[0]||(f[0]=m=>r.client_name=m)},null,512),[[at,r.client_name]])]),p("div",bRe,[p("label",NRe,T(c.$t("oauth2.APP.DESCRIPTION")),1),k(d,{name:"app-description",charLimit:200,input:r.description,onUpdateValue:o},null,8,["input"])]),p("div",CRe,[p("label",yRe,T(c.$t("oauth2.APP.URL"))+"*",1),qe(p("input",{id:"app-url",type:"text",required:"","onUpdate:modelValue":f[1]||(f[1]=m=>r.client_uri=m)},null,512),[[at,r.client_uri]])]),p("div",DRe,[p("label",PRe,T(c.$t("oauth2.APP.REDIRECT_URL"))+"* ",1),qe(p("input",{id:"app-redirect-uri",type:"text",required:"","onUpdate:modelValue":f[2]||(f[2]=m=>r.redirect_uri=m)},null,512),[[at,r.redirect_uri]])]),p("div",wRe,[p("div",LRe,T(c.$t("oauth2.APP.SCOPE.LABEL"))+"* ",1),(A(!0),N(Re,null,ze(s.value,m=>(A(),N("div",{class:"form-item-scope-checkboxes",key:m},[p("label",$Re,[p("input",{type:"checkbox",name:m,checked:a.includes(m),onChange:E=>u(m)},null,40,kRe),p("code",null,T(m),1)]),p("p",{class:"scope-description",innerHTML:c.$t(`oauth2.APP.SCOPE.${m}_DESCRIPTION`)},null,8,URe)]))),128))])]),p("div",MRe,[p("button",{class:"confirm",type:"submit",disabled:a.length===0},T(c.$t("buttons.SUBMIT")),9,xRe),p("button",{class:"cancel",onClick:f[3]||(f[3]=Je(()=>c.$router.push("/profile/apps"),["prevent"]))},T(c.$t("buttons.CANCEL")),1)])],32)])])}}}),WRe=re(FRe,[["__scopeId","data-v-e2284e06"]]),GRe={id:"authorize-oauth2-app"},zRe={key:0},BRe={id:"authorize-oauth2-title"},HRe={class:"oauth2-access description-list"},VRe={class:"client-scope"},jRe=["innerHTML"],KRe={class:"authorize-oauth2-buttons"},YRe={key:1},qRe={class:"no-app"},XRe=Z({__name:"AuthorizeUserApp",setup(e){const t=qt(),n=Me(),r=$(()=>n.getters[Ye.GETTERS.CLIENT]),a=$(()=>n.getters[H.GETTERS.ERROR_MESSAGES]);Nt(()=>s());function s(){t.query.client_id&&typeof t.query.client_id=="string"&&n.dispatch(Ye.ACTIONS.GET_CLIENT_BY_CLIENT_ID,t.query.client_id)}function i(){n.dispatch(Ye.ACTIONS.AUTHORIZE_CLIENT,{client_id:`${t.query.client_id}`,redirect_uri:`${t.query.redirect_uri}`,response_type:`${t.query.response_type}`,scope:`${t.query.scope}`,state:`${t.query.state?t.query.state:""}`,code_challenge:`${t.query.code_challenge?t.query.code_challenge:""}`,code_challenge_method:`${t.query.code_challenge_method?t.query.code_challenge_method:""}`})}return(o,u)=>{const l=oe("router-link"),c=oe("i18n-t"),f=oe("ErrorMessage");return A(),N("div",GRe,[r.value.client_id?(A(),N("div",zRe,[p("h1",BRe,[k(c,{keypath:"oauth2.AUTHORIZE_APP"},{default:ue(()=>[k(l,{to:{name:"UserApp",params:{id:r.value.id}}},{default:ue(()=>[j(T(r.value.name),1)]),_:1},8,["to"])]),_:1})]),a.value?(A(),te(f,{key:0,message:a.value},null,8,["message"])):x("",!0),p("div",HRe,[p("p",null,T(o.$t("oauth2.APP_REQUESTING_ACCESS")),1),p("dl",null,[(A(!0),N(Re,null,ze(r.value.scope.split(" "),d=>(A(),N(Re,{key:d},[p("dt",VRe,[p("code",null,T(d),1)]),p("dd",{innerHTML:o.$t(`oauth2.APP.SCOPE.${d}_DESCRIPTION`)},null,8,jRe)],64))),128))]),p("div",KRe,[p("button",{class:"danger",onClick:i},T(o.$t("buttons.AUTHORIZE")),1),p("button",{class:"cancel",onClick:u[0]||(u[0]=d=>o.$router.push("/profile/apps"))},T(o.$t("buttons.CANCEL")),1)])])])):(A(),N("div",YRe,[p("p",qRe,T(o.$t("oauth2.NO_APP")),1),p("button",{onClick:u[1]||(u[1]=d=>o.$router.push("/profile/apps"))},T(o.$t("buttons.BACK")),1)]))])}}}),ZRe=re(XRe,[["__scopeId","data-v-a8ed6bf8"]]),QRe={id:"oauth2-apps"},JRe=Z({__name:"index",props:{user:{}},setup(e){const t=e,n=Me(),{user:r}=_e(t);return Ct(()=>{n.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),n.commit(Ye.MUTATIONS.SET_CLIENTS,[])}),(a,s)=>{const i=oe("router-view");return A(),N("div",QRe,[k(i,{authUser:h(r)},null,8,["authUser"])])}}}),ebe={id:"oauth2-app",class:"description-list"},tbe={key:1},nbe={key:0,class:"info-box success-message"},rbe=["title"],abe={key:0},sbe={key:1,class:"app-secret"},ibe=["title"],obe={class:"client-scopes"},ube={class:"app-buttons"},cbe={key:2},lbe={class:"no-app"},dbe=Z({__name:"UserApp",props:{authUser:{},afterCreation:{type:Boolean,default:!1}},setup(e){const t=e,n=qt(),r=Me(),{afterCreation:a,authUser:s}=_e(t),i=$(()=>r.getters[Ye.GETTERS.CLIENT]),o=$(()=>r.getters[Ye.GETTERS.REVOCATION_SUCCESSFUL]),u=le(!1),l=le(""),c=le(!1),f=le(!1),d=le(!1);Nt(()=>{m(),navigator.clipboard&&(d.value=!0)});function m(){!a.value&&n.params.id&&typeof n.params.id=="string"&&r.dispatch(Ye.ACTIONS.GET_CLIENT_BY_ID,+n.params.id)}function E(S){l.value=S?"oauth2.APP_DELETION_CONFIRMATION":"oauth2.TOKENS_REVOCATION_CONFIRMATION",v(!0)}function v(S){u.value=S,S||(l.value="")}function R(S){l.value==="oauth2.APP_DELETION_CONFIRMATION"?r.dispatch(Ye.ACTIONS.DELETE_CLIENT,S):r.dispatch(Ye.ACTIONS.REVOKE_ALL_TOKENS,S)}function I(){navigator.clipboard.writeText(i.value.client_id),c.value=!0,f.value=!1,setTimeout(()=>{c.value=!1},3e3)}function b(){i.value.client_secret&&(navigator.clipboard.writeText(i.value.client_secret),f.value=!0,c.value=!1,setTimeout(()=>{f.value=!1},3e3))}return Ct(()=>{r.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),r.commit(Ye.MUTATIONS.EMPTY_CLIENT),r.commit(Ye.MUTATIONS.SET_REVOCATION_SUCCESSFUL,!1)}),Ge(()=>o.value,S=>{S&&v(!1)}),(S,O)=>{const C=oe("Modal");return A(),N("div",ebe,[u.value?(A(),te(C,{key:0,title:S.$t("common.CONFIRMATION"),message:S.$t(l.value),onConfirmAction:O[0]||(O[0]=P=>R(i.value.id)),onCancelAction:O[1]||(O[1]=P=>v(!1)),onKeydown:O[2]||(O[2]=gt(P=>v(!1),["esc"]))},null,8,["title","message"])):x("",!0),i.value&&i.value.client_id?(A(),N("div",tbe,[h(a)||o.value?(A(),N("div",nbe,T(S.$t(h(a)?"oauth2.APP_CREATED_SUCCESSFULLY":"oauth2.TOKENS_REVOKED")),1)):x("",!0),p("dl",null,[p("dt",null,T(S.$t("oauth2.APP.CLIENT_ID"))+":",1),p("dd",null,[j(T(i.value.client_id)+" ",1),h(a)&&d.value?(A(),N("i",{key:0,class:Se(`fa fa-${c.value?"check":"copy"}`),"aria-hidden":"true",title:S.$t("oauth2.COPY_TO_CLIPBOARD"),onClick:I},null,10,rbe)):x("",!0)]),h(a)&&i.value.client_secret?(A(),N("dt",abe,T(S.$t("oauth2.APP.CLIENT_SECRET"))+": ",1)):x("",!0),h(a)&&i.value.client_secret?(A(),N("dd",sbe,[j(T(i.value.client_secret)+" ",1),d.value?(A(),N("i",{key:0,class:Se(`fa fa-${f.value?"check":"copy"}`),"aria-hidden":"true",title:S.$t("oauth2.COPY_TO_CLIPBOARD"),onClick:b},null,10,ibe)):x("",!0)])):x("",!0),p("dt",null,T(Rt(S.$t("oauth2.APP.ISSUE_AT")))+":",1),p("dd",null,[p("time",null,T(h(kn)(i.value.issued_at,h(s).timezone,h(s).date_format)),1)]),p("dt",null,T(S.$t("oauth2.APP.NAME"))+":",1),p("dd",null,T(i.value.name),1),p("dt",null,T(S.$t("oauth2.APP.DESCRIPTION"))+":",1),p("dd",{class:Se({"no-description":!i.value.client_description})},T(i.value.client_description?i.value.client_description:S.$t("oauth2.NO_DESCRIPTION")),3),p("dt",null,T(S.$t("oauth2.APP.URL"))+":",1),p("dd",null,T(i.value.website),1),p("dt",null,T(S.$t("oauth2.APP.REDIRECT_URL"))+":",1),p("dd",null,T(i.value.redirect_uris.length>0?i.value.redirect_uris[0]:""),1),p("dt",null,T(S.$t("oauth2.APP.SCOPE.LABEL"))+":",1),p("dd",obe,[(A(!0),N(Re,null,ze(i.value.scope.split(" "),P=>(A(),N("span",{class:"client-scope",key:P},[p("code",null,T(P),1)]))),128))])]),p("div",ube,[p("button",{class:"danger",onClick:O[3]||(O[3]=P=>E(!1))},T(S.$t("oauth2.REVOKE_ALL_TOKENS")),1),p("button",{class:"danger",onClick:O[4]||(O[4]=P=>E(!0))},T(S.$t("oauth2.DELETE_APP")),1),p("button",{onClick:O[5]||(O[5]=P=>S.$router.push("/profile/apps"))},T(S.$t("buttons.BACK")),1)])])):(A(),N("div",cbe,[p("p",lbe,T(S.$t("oauth2.NO_APP")),1),p("button",{onClick:O[6]||(O[6]=P=>S.$router.push("/profile/apps"))},T(S.$t("buttons.BACK")),1)]))])}}}),QE=re(dbe,[["__scopeId","data-v-3a7d0f4a"]]),fbe={id:"oauth2-apps-list"},pbe={class:"apps-list"},mbe={key:0},Ebe={class:"app-issued-at"},hbe={key:1,class:"no-apps"},_be={class:"app-list-buttons"},Tbe=Z({__name:"UserAppsList",props:{authUser:{}},setup(e){const t=e,n=Me(),r=qt(),{authUser:a}=_e(t),s=$(()=>n.getters[Ye.GETTERS.CLIENTS]),i=$(()=>n.getters[Ye.GETTERS.CLIENTS_PAGINATION]);let o=u(r.query);Nt(()=>{l(o)});function u(c){const f={};return c.page&&(f.page=Cd(c.page,Xg)),f}function l(c){n.dispatch(Ye.ACTIONS.GET_CLIENTS,c)}return Ge(()=>r.query,async c=>{o=u(c),l(o)}),(c,f)=>{const d=oe("router-link");return A(),N("div",fbe,[p("p",pbe,T(c.$t("oauth2.APPS_LIST")),1),s.value.length>0?(A(),N("ul",mbe,[(A(!0),N(Re,null,ze(s.value,m=>(A(),N("li",{key:m.client_id},[k(d,{to:{name:"UserApp",params:{id:m.id}}},{default:ue(()=>[j(T(m.name),1)]),_:2},1032,["to"]),p("span",Ebe,[j(T(c.$t("oauth2.APP.ISSUE_AT"))+" ",1),p("time",null,T(h(kn)(m.issued_at,h(a).timezone,h(a).date_format)),1)])]))),128))])):(A(),N("div",hbe,T(c.$t("oauth2.NO_APPS")),1)),s.value.length>0?(A(),te($u,{key:2,pagination:i.value,path:"/profile/apps",query:h(o)},null,8,["pagination","query"])):x("",!0),p("div",_be,[p("button",{onClick:f[0]||(f[0]=m=>c.$router.push("/profile/apps/new"))},T(c.$t("oauth2.NEW_APP")),1),p("button",{onClick:f[1]||(f[1]=m=>c.$router.push("/"))},T(c.$t("common.HOME")),1)])])}}}),gbe=re(Tbe,[["__scopeId","data-v-064a87b7"]]),Abe={id:"user-sport-preferences"},Sbe={key:0,class:"responsive-table"},Obe={class:"mobile-display"},Ibe={key:0,class:"profile-buttons mobile-display"},vbe={key:1,class:"profile-buttons"},Rbe={class:"text-left"},bbe={key:0},Nbe={class:"cell-heading"},Cbe=["value"],ybe={class:"cell-heading"},Dbe={key:0,class:"disabled-message"},Pbe={key:1,class:"fa fa-refresh fa-spin fa-fw"},wbe={class:"cell-heading"},Lbe={class:"cell-heading"},$be=["checked"],kbe={class:"cell-heading"},Ube=["value"],Mbe={key:1},xbe={key:0,class:"action-buttons"},Fbe={class:"cell-heading"},Wbe=["onClick"],Gbe={key:1,class:"edition-buttons"},zbe=["disabled"],Bbe=["disabled","onClick"],Hbe=["disabled"],Vbe={key:0,class:"profile-buttons"},jbe={key:1,class:"profile-buttons"},Kbe="#838383",Ybe=Z({__name:"UserSportPreferences",props:{user:{},isEdition:{type:Boolean}},setup(e){const t=e,n=Me(),{t:r}=Yt(),{isEdition:a,user:s}=_e(t),i=Ot("sportColors"),o=$(()=>n.getters[Mt.GETTERS.SPORTS]),u=$(()=>Xr(o.value,r,"is_active",s.value.sports_list)),l=$(()=>n.getters[K.GETTERS.USER_LOADING]),c=$(()=>n.getters[H.GETTERS.ERROR_MESSAGES]),f=zt({sport_id:0,color:null,is_active:!0,stopped_speed_threshold:1});function d(O){O!==null?(f.sport_id=O.id,f.color=O.color?O.color:i?i[O.label]:Kbe,f.is_active=O.is_active_for_user,f.stopped_speed_threshold=O.stopped_speed_threshold):I()}function m(O){return f.sport_id===O}function E(O){f.color=O.target.value}function v(O){f.stopped_speed_threshold=parseFloat(O.target.value)}function R(O){f.is_active=O.target.checked}function I(){f.sport_id=0,f.color=null,f.is_active=!0,f.stopped_speed_threshold=1,n.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES)}function b(O){O.preventDefault(),n.dispatch(K.ACTIONS.UPDATE_USER_SPORT_PREFERENCES,f)}function S(O,C){O.preventDefault(),n.dispatch(K.ACTIONS.RESET_USER_SPORT_PREFERENCES,C)}return Ge(()=>l.value,O=>{!O&&!c.value&&I()}),(O,C)=>{const P=oe("SportImage"),M=oe("ErrorMessage");return A(),N("div",Abe,[o.value.length>0?(A(),N("div",Sbe,[p("div",Obe,[h(a)?(A(),N("div",Ibe,[p("button",{class:"cancel",onClick:C[0]||(C[0]=Je(w=>O.$router.push("/profile/sports"),["prevent"]))},T(O.$t("buttons.BACK")),1)])):(A(),N("div",vbe,[p("button",{onClick:C[1]||(C[1]=w=>O.$router.push("/profile/edit/sports"))},T(O.$t("user.PROFILE.EDIT_SPORTS_PREFERENCES")),1),p("button",{onClick:C[2]||(C[2]=w=>O.$router.push("/"))},T(O.$t("common.HOME")),1)]))]),p("table",null,[p("thead",null,[p("tr",null,[p("th",null,T(O.$t("user.PROFILE.SPORT.COLOR")),1),p("th",Rbe,T(O.$t("workouts.SPORT",0)),1),p("th",null,T(O.$t("workouts.WORKOUT",0)),1),p("th",null,T(O.$t("user.PROFILE.SPORT.IS_ACTIVE")),1),p("th",null,T(O.$t("user.PROFILE.SPORT.STOPPED_SPEED_THRESHOLD")),1),h(a)?(A(),N("th",bbe,T(O.$t("user.PROFILE.SPORT.ACTION")),1)):x("",!0)])]),p("tbody",null,[(A(!0),N(Re,null,ze(u.value,w=>(A(),N("tr",{key:w.id},[p("td",null,[p("span",Nbe,T(O.$t("user.PROFILE.SPORT.COLOR")),1),m(w.id)?(A(),N("input",{key:0,class:"sport-color",type:"color",value:f.color,onInput:E},null,40,Cbe)):(A(),te(P,{key:1,title:w.translatedLabel,"sport-label":w.label,color:w.color?w.color:h(i)[w.label]},null,8,["title","sport-label","color"]))]),p("td",{class:Se(["sport-label",{"disabled-sport":!w.is_active}])},[p("span",ybe,T(O.$t("user.PROFILE.SPORT.LABEL")),1),j(" "+T(w.translatedLabel)+" ",1),w.is_active?x("",!0):(A(),N("span",Dbe," ("+T(O.$t("user.PROFILE.SPORT.DISABLED_BY_ADMIN"))+") ",1)),l.value&&m(w.id)?(A(),N("i",Pbe)):x("",!0),c.value&&f.sport_id===w.id?(A(),te(M,{key:2,message:c.value},null,8,["message"])):x("",!0)],2),p("td",{class:Se(["text-center",{"disabled-sport":!w.is_active}])},[p("span",wbe,T(O.$t("workouts.WORKOUT",0)),1),p("i",{class:Se(`fa fa${h(s).sports_list.includes(w.id)?"-check":""}`),"aria-hidden":"true"},null,2)],2),p("td",{class:Se(["text-center",{"disabled-sport":!w.is_active}])},[p("span",Lbe,T(O.$t("user.PROFILE.SPORT.IS_ACTIVE")),1),m(w.id)&&w.is_active?(A(),N("input",{key:0,type:"checkbox",checked:w.is_active_for_user,onChange:R},null,40,$be)):(A(),N("i",{key:1,class:Se(`fa fa${w.is_active_for_user?"-check":""}`),"aria-hidden":"true"},null,2))],2),p("td",{class:Se(["text-center",{"disabled-sport":!w.is_active}])},[p("span",kbe,T(O.$t("user.PROFILE.SPORT.STOPPED_SPEED_THRESHOLD")),1),m(w.id)&&w.is_active?(A(),N("input",{key:0,class:"threshold-input",type:"number",min:"0",step:"0.1",value:f.stopped_speed_threshold,onInput:v},null,40,Ube)):(A(),N("span",Mbe,T(w.stopped_speed_threshold),1))],2),h(a)?(A(),N("td",xbe,[p("span",Fbe,T(O.$t("user.PROFILE.SPORT.ACTION")),1),f.sport_id===0?(A(),N("button",{key:0,onClick:G=>d(w)},T(O.$t("buttons.EDIT")),9,Wbe)):x("",!0),m(w.id)?(A(),N("div",Gbe,[p("button",{disabled:l.value,onClick:b},T(O.$t("buttons.SUBMIT")),9,zbe),p("button",{disabled:l.value,onClick:G=>S(G,w.id)},T(O.$t("buttons.RESET")),9,Bbe),p("button",{disabled:l.value,onClick:C[3]||(C[3]=G=>d(null))},T(O.$t("buttons.CANCEL")),9,Hbe)])):x("",!0)])):x("",!0)]))),128))])]),h(a)?(A(),N("div",Vbe,[p("button",{class:"cancel",onClick:C[4]||(C[4]=Je(w=>O.$router.push("/profile/sports"),["prevent"]))},T(O.$t("buttons.BACK")),1)])):(A(),N("div",jbe,[p("button",{onClick:C[5]||(C[5]=w=>O.$router.push("/profile/edit/sports"))},T(O.$t("user.PROFILE.EDIT_SPORTS_PREFERENCES")),1),p("button",{onClick:C[6]||(C[6]=w=>O.$router.push("/"))},T(O.$t("common.HOME")),1)]))])):x("",!0)])}}}),JE=re(Ybe,[["__scopeId","data-v-aa4857fe"]]),wi=e=>(dt("data-v-34b1686b"),e=e(),ft(),e),qbe={class:"about-text"},Xbe=["innerHTML"],Zbe=wi(()=>p("i",{class:"fa fa-book fa-padding","aria-hidden":"true"},null,-1)),Qbe=["href"],Jbe=wi(()=>p("i",{class:"fa fa-github fa-padding","aria-hidden":"true"},null,-1)),eNe={href:"https://github.com/SamR1/FitTrackee",target:"_blank",rel:"noopener noreferrer"},tNe=wi(()=>p("i",{class:"fa fa-balance-scale fa-padding","aria-hidden":"true"},null,-1)),nNe=wi(()=>p("a",{href:"https://choosealicense.com/licenses/agpl-3.0/",target:"_blank",rel:"noopener noreferrer"},"AGPLv3",-1)),rNe={key:0},aNe=wi(()=>p("i",{class:"fa fa-envelope-o fa-padding","aria-hidden":"true"},null,-1)),sNe=["href"],iNe={key:1},oNe=["href"],uNe={class:"about-instance"},cNe=["innerHTML"],lNe=Z({__name:"About",setup(e){const t=Me(),n=$(()=>t.getters[H.GETTERS.APP_CONFIG]),r=$(()=>i()),a=$(()=>t.getters[H.GETTERS.LANGUAGE]),s=$(()=>o());function i(){const u={};return n.value.weather_provider==="visualcrossing"&&(u.name="Visual Crossing",u.url="https://www.visualcrossing.com"),u}function o(){let u="https://samr1.github.io/FitTrackee/";return a.value==="fr"&&(u+="fr/"),u}return(u,l)=>{const c=oe("i18n-t");return A(),N("div",qbe,[p("div",null,[p("p",{class:"error-message",innerHTML:u.$t("about.FITTRACKEE_DESCRIPTION")},null,8,Xbe),p("p",null,[Zbe,p("a",{class:"documentation-link",href:s.value,target:"_blank",rel:"noopener noreferrer"},T(Rt(u.$t("common.DOCUMENTATION"))),9,Qbe)]),p("p",null,[Jbe,p("a",eNe,T(u.$t("about.SOURCE_CODE")),1)]),p("p",null,[tNe,k(c,{keypath:"about.FITTRACKEE_LICENSE"},{default:ue(()=>[nNe]),_:1})]),n.value.admin_contact?(A(),N("div",rNe,[aNe,p("a",{href:`mailto:${n.value.admin_contact}`},T(u.$t("about.CONTACT_ADMIN")),9,sNe)])):x("",!0),r.value&&r.value.name?(A(),N("div",iNe,[j(T(u.$t("about.WEATHER_DATA_FROM"))+" ",1),p("a",{href:r.value.url,target:"_blank",rel:"nofollow noopener"},T(r.value.name),9,oNe)])):x("",!0),n.value.about?(A(),N(Re,{key:2},[p("p",uNe,T(u.$t("about.ABOUT_THIS_INSTANCE")),1),p("div",{innerHTML:h(ca)(h(di)(n.value.about))},null,8,cNe)],64)):x("",!0)])])}}}),dNe=re(lNe,[["__scopeId","data-v-34b1686b"]]),fNe={},pNe={id:"bike"},mNe=["src"];function ENe(e,t){return A(),N("div",pNe,[p("img",{class:"bike-img",src:"/img/bike.svg",alt:"mountain bike"},null,8,mNe)])}const SA=re(fNe,[["render",ENe],["__scopeId","data-v-dc181e30"]]),hNe={id:"about",class:"view"},_Ne={class:"container"},TNe={class:"container-sub"},gNe={class:"container-sub about-details"},ANe=Z({__name:"AboutView",setup(e){return(t,n)=>(A(),N("div",hNe,[p("div",_Ne,[p("div",TNe,[k(SA)]),p("div",gNe,[k(dNe)])])]))}}),SNe=re(ANe,[["__scopeId","data-v-ef9c7198"]]),ONe={id:"error"},INe={class:"error-content"},vNe=Z({__name:"Error",props:{title:{},message:{},buttonText:{},path:{default:"/"}},setup(e){const t=e,{buttonText:n,title:r,message:a,path:s}=_e(t);return(i,o)=>(A(),N("div",ONe,[p("div",INe,[p("h1",null,T(h(r)),1),p("p",null,T(h(a)),1),h(n)?(A(),N("button",{key:0,onClick:o[0]||(o[0]=u=>i.$router.push(h(s))),class:"upper"},T(h(n)),1)):x("",!0)])]))}}),RNe=re(vNe,[["__scopeId","data-v-48ec856d"]]),d0=Z({__name:"NotFound",props:{target:{default:"PAGE"}},setup(e){const t=e,{target:n}=_e(t),r=le(),a=le(!1);It(()=>s());function s(){r.value=setTimeout(()=>{a.value=!0},500)}return Ct(()=>{r.value&&clearTimeout(r.value)}),(i,o)=>a.value?(A(),te(RNe,{key:0,title:"404",message:i.$t(`error.NOT_FOUND.${h(n)}`),"button-text":i.$t("common.HOME")},null,8,["message","button-text"])):x("",!0)}}),bNe=e=>(dt("data-v-5eee0876"),e=e(),ft(),e),NNe={id:"admin",class:"view"},CNe={key:0,class:"container"},yNe=bNe(()=>p("div",{id:"bottom"},null,-1)),DNe=Z({__name:"AdminView",setup(e){const t=Me(),n=$(()=>t.getters[H.GETTERS.APP_CONFIG]),r=$(()=>t.getters[H.GETTERS.APP_STATS]),a=$(()=>t.getters[K.GETTERS.IS_ADMIN]),s=$(()=>t.getters[K.GETTERS.USER_LOADING]);return Nt(()=>t.dispatch(H.ACTIONS.GET_APPLICATION_STATS)),(i,o)=>{const u=oe("router-view");return A(),N("div",NNe,[s.value?x("",!0):(A(),N("div",CNe,[a.value?(A(),te(u,{key:0,appConfig:n.value,appStatistics:r.value},null,8,["appConfig","appStatistics"])):(A(),te(d0,{key:1})),yNe]))])}}}),PNe=re(DNe,[["__scopeId","data-v-5eee0876"]]),OA="/img/workouts/mountains.svg",wNe=p("div",{class:"map-attribution"},[p("span",{class:"map-attribution-text"},"©"),p("a",{class:"map-attribution-text",href:"https://www.openstreetmap.org/copyright",target:"_blank",rel:"noopener noreferrer"}," OpenStreetMap ")],-1),IA=Z({__name:"StaticMap",props:{workout:{},displayHover:{type:Boolean,default:!1}},setup(e){const t=e,{displayHover:n}=_e(t),r=`${Si()}workouts/map/${t.workout.map}`;return(a,s)=>(A(),N("div",{class:Se(["static-map",{"display-hover":h(n)}])},[h(n)?(A(),N("img",{key:0,src:r,alt:""})):(A(),N("div",{key:1,class:"bg-map-image",style:Vr({backgroundImage:`url(${r})`})},null,4)),wNe],2))}}),f0=e=>(dt("data-v-0bcae633"),e=e(),ft(),e),LNe={class:"timeline-workout"},$Ne={class:"box"},kNe={class:"workout-user-date"},UNe={class:"workout-user"},MNe=["title"],xNe={key:0},FNe={key:1,class:"no-map"},WNe={class:"img"},GNe={class:"data"},zNe=f0(()=>p("i",{class:"fa fa-clock-o","aria-hidden":"true"},null,-1)),BNe={key:0},HNe={class:"data"},VNe=f0(()=>p("i",{class:"fa fa-road","aria-hidden":"true"},null,-1)),jNe={key:0,class:"data elevation"},KNe=["alt"],YNe={class:"data-values"},qNe={key:1,class:"data altitude"},XNe=f0(()=>p("i",{class:"fa fa-location-arrow","aria-hidden":"true"},null,-1)),ZNe={class:"data-values"},QNe=Z({__name:"WorkoutCard",props:{user:{},useImperialUnits:{type:Boolean},workout:{default:()=>({})},sport:{default:()=>({})}},setup(e){const t=e,n=Me(),{user:r,workout:a,sport:s,useImperialUnits:i}=_e(t),o=$(()=>n.getters[H.GETTERS.LOCALE]);function u(c){return c.with_gpx&&c.min_alt!==null&&c.max_alt!==null}function l(c){return u(c)&&c.ascent!==null&&c.descent!==null}return(c,f)=>{var v;const d=oe("router-link"),m=oe("SportImage"),E=oe("Distance");return A(),N("div",LNe,[p("div",$Ne,[p("div",kNe,[p("div",UNe,[k(Oi,{user:h(r)},null,8,["user"]),h(r).username?(A(),te(d,{key:0,class:"workout-user-name",to:{name:"User",params:{username:h(r).username}}},{default:ue(()=>[j(T(h(r).username),1)]),_:1},8,["to"])):x("",!0)]),h(a).id?(A(),te(d,{key:0,class:"workout-title",to:{name:"Workout",params:{workoutId:h(a).id}}},{default:ue(()=>[j(T(h(a).title),1)]),_:1},8,["to"])):x("",!0),h(a).workout_date&&h(r)?(A(),N("div",{key:1,class:"workout-date",title:h(kn)(h(a).workout_date,h(r).timezone,h(r).date_format)},T(h(qN)(new Date(h(a).workout_date),new Date,{addSuffix:!0,locale:o.value})),9,MNe)):x("",!0)]),p("div",{class:Se(["workout-map",{"no-cursor":!h(a)}]),onClick:f[0]||(f[0]=R=>h(a).id?c.$router.push({name:"Workout",params:{workoutId:h(a).id}}):null)},[h(a)?(A(),N("div",xNe,[h(a).with_gpx?(A(),te(IA,{key:0,workout:h(a)},null,8,["workout"])):(A(),N("div",FNe,T(c.$t("workouts.NO_MAP")),1))])):x("",!0)],2),p("div",{class:Se(["workout-data",{"without-elevation":!u(h(a))}]),onClick:f[1]||(f[1]=R=>h(a).id?c.$router.push({name:"Workout",params:{workoutId:h(a).id}}):null)},[p("div",WNe,[(v=h(s))!=null&&v.label?(A(),te(m,{key:0,"sport-label":h(s).label,color:h(s).color},null,8,["sport-label","color"])):x("",!0)]),p("div",GNe,[zNe,h(a)?(A(),N("span",BNe,T(h(a).moving),1)):x("",!0)]),p("div",HNe,[VNe,h(a).id?(A(),te(E,{key:0,distance:h(a).distance,digits:3,unitFrom:"km",useImperialUnits:h(i)},null,8,["distance","useImperialUnits"])):x("",!0)]),u(h(a))?(A(),N("div",jNe,[p("img",{class:"mountains",src:OA,alt:c.$t("workouts.ELEVATION")},null,8,KNe),p("div",YNe,[h(a).id?(A(),te(E,{key:0,distance:h(a).min_alt,unitFrom:"m",displayUnit:!1,useImperialUnits:h(i)},null,8,["distance","useImperialUnits"])):x("",!0),j("/ "),h(a).id?(A(),te(E,{key:1,distance:h(a).max_alt,unitFrom:"m",useImperialUnits:h(i)},null,8,["distance","useImperialUnits"])):x("",!0)])])):x("",!0),l(h(a))?(A(),N("div",qNe,[XNe,p("div",ZNe,[j(" +"),h(a).id?(A(),te(E,{key:0,distance:h(a).ascent,unitFrom:"m",displayUnit:!1,useImperialUnits:h(i)},null,8,["distance","useImperialUnits"])):x("",!0),j("/- "),h(a).id?(A(),te(E,{key:1,distance:h(a).descent,unitFrom:"m",useImperialUnits:h(i)},null,8,["distance","useImperialUnits"])):x("",!0)])])):x("",!0)],2)])])}}}),eh=re(QNe,[["__scopeId","data-v-0bcae633"]]),JNe={},e3e={class:"no-workouts box"};function t3e(e,t){const n=oe("router-link");return A(),N("div",e3e,[p("div",null,[j(T(e.$t("workouts.NO_WORKOUTS"))+" ",1),k(n,{to:"/workouts/add"},{default:ue(()=>[j(T(e.$t("workouts.UPLOAD_FIRST_WORKOUT")),1)]),_:1})])])}const p0=re(JNe,[["render",t3e],["__scopeId","data-v-b0c91cc6"]]),kr={ligthMode:{text:"#666",line:"rgba(0, 0, 0, 0.1)"},darkMode:{text:"#a1a1a1",line:"#3f3f3f"}},n3e=(e,t,n,r=!1)=>{const a={speed:{label:t("workouts.SPEED"),backgroundColor:["transparent"],borderColor:[r?"#5f5c97":"#8884d8"],borderWidth:2,data:[],yAxisID:"ySpeed"},elevation:{label:t("workouts.ELEVATION"),backgroundColor:[r?"#303030":"#e5e5e5"],borderColor:[r?"#222222":"#cccccc"],borderWidth:1,fill:!0,data:[],yAxisID:"yElevation"}},s=[],i=[],o=[];return e.map(u=>{s.push(vo("km",u.distance,n)),i.push(u.duration),a.speed.data.push(vo("km",u.speed,n)),u.elevation!==void 0&&a.elevation.data.push(vo("m",u.elevation,n)),o.push({latitude:u.latitude,longitude:u.longitude})}),{distance_labels:s,duration_labels:i,datasets:a,coordinates:o}},r3e=e=>{const t=e.length;if(t===0)return{};const n={};return e.map(r=>{n[r.sport_id]||(n[r.sport_id]={count:0,percentage:0}),n[r.sport_id].count+=1,n[r.sport_id].percentage=n[r.sport_id].count/t}),n},pi={order:"desc",order_by:"workout_date"},a3e={id:"timeline"},s3e={class:"section-title"},i3e={key:0},o3e={key:1},u3e={key:1,class:"more-workouts"},uo=5,c3e=Z({__name:"Timeline",props:{sports:{},user:{}},setup(e){const t=e,n=Me(),{sports:r,user:a}=_e(t),s=le(1),i=t.user.nb_workouts>=uo?uo:t.user.nb_workouts;Nt(()=>l());const o=$(()=>n.getters[Ae.GETTERS.TIMELINE_WORKOUTS]),u=$(()=>o.value.length>0?o.value[o.value.length-1].previous_workout!==null:!1);function l(){n.dispatch(Ae.ACTIONS.GET_TIMELINE_WORKOUTS,{page:s.value,per_page:uo,...pi})}function c(){s.value+=1,n.dispatch(Ae.ACTIONS.GET_MORE_TIMELINE_WORKOUTS,{page:s.value,per_page:uo,...pi})}return(f,d)=>(A(),N("div",a3e,[p("div",s3e,T(f.$t("workouts.LATEST_WORKOUTS")),1),h(a).nb_workouts>0&&o.value.length===0?(A(),N("div",i3e,[(A(!0),N(Re,null,ze([...Array(h(i)).keys()],m=>(A(),te(eh,{user:h(a),useImperialUnits:h(a).imperial_units,key:m},null,8,["user","useImperialUnits"]))),128))])):(A(),N("div",o3e,[(A(!0),N(Re,null,ze(o.value,m=>(A(),te(eh,{workout:m,sport:o.value.length>0?h(r).filter(E=>E.id===m.sport_id)[0]:null,user:h(a),useImperialUnits:h(a).imperial_units,key:m.id},null,8,["workout","sport","user","useImperialUnits"]))),128)),o.value.length===0?(A(),te(p0,{key:0})):x("",!0),u.value?(A(),N("div",u3e,[p("button",{onClick:c},T(f.$t("workouts.LOAD_MORE_WORKOUT")),1)])):x("",!0)]))]))}}),l3e=re(c3e,[["__scopeId","data-v-e0964959"]]),d3e=["title"],vA=Z({__name:"CalendarWorkout",props:{displayHARecord:{type:Boolean},workout:{},sportLabel:{},sportColor:{}},setup(e){const t=e,{displayHARecord:n,workout:r,sportLabel:a,sportColor:s}=_e(t);return(i,o)=>{const u=oe("SportImage");return A(),N("div",{class:"calendar-workout",onClick:o[0]||(o[0]=l=>i.$router.push({name:"Workout",params:{workoutId:h(r).id}}))},[k(u,{"sport-label":h(a),title:h(r).title,color:h(s)},null,8,["sport-label","title","color"]),p("sup",null,[h(r).records.length>0?(A(),N("i",{key:0,class:"fa fa-trophy custom-fa-small","aria-hidden":"true",title:h(r).records.filter(l=>h(n)?!0:l.record_type!=="HA").map(l=>` ${i.$t(`workouts.RECORD_${l.record_type}`)}`)[0]},null,8,d3e)):x("",!0)])])}}}),f3e={class:"donut-chart"},p3e={height:"34",width:"34",viewBox:"0 0 34 34"},m3e=["stroke","stroke-dashoffset","transform"],th=16,nh=16,rh=14,E3e=Z({__name:"DonutChart",props:{colors:{},datasets:{}},setup(e){const t=e,{colors:n,datasets:r}=_e(t);let a=-90;const s=2*Math.PI*rh;function i(u,l){return l-u*l}function o(u,l){const c=`rotate(${a}, ${th}, ${nh})`;return a=l*360+a,c}return(u,l)=>(A(),N("div",f3e,[(A(),N("svg",p3e,[(A(!0),N(Re,null,ze(Object.entries(h(r)),(c,f)=>(A(),N("g",{key:f},[p("circle",{cx:th,cy:nh,r:rh,fill:"transparent",stroke:h(n)[+c[0]],"stroke-dashoffset":i(c[1].percentage,s),"stroke-dasharray":s,"stroke-width":"3","stroke-opacity":"0.8",transform:o(f,c[1].percentage)},null,8,m3e)]))),128))]))]))}}),h3e={class:"calendar-workouts-chart"},_3e={class:"workouts-count"},T3e={key:0,class:"workouts-pane"},g3e={class:"more-workouts"},A3e=Z({__name:"CalendarWorkoutsChart",props:{colors:{},datasets:{},sports:{},workouts:{},displayHARecord:{type:Boolean}},setup(e){const t=e,{colors:n,datasets:r,sports:a,workouts:s}=_e(t),i=le(!0);function o(u){u.stopPropagation(),i.value=!i.value}return(u,l)=>{const c=fO("click-outside");return A(),N("div",h3e,[p("div",{class:"workouts-chart",onClick:o},[p("div",_3e,T(h(s).length),1),k(E3e,{datasets:h(r),colors:h(n)},null,8,["datasets","colors"])]),i.value?x("",!0):(A(),N("div",T3e,[qe((A(),N("div",g3e,[p("i",{class:"fa fa-times calendar-more","aria-hidden":"true",onClick:o}),(A(!0),N(Re,null,ze(h(s),(f,d)=>(A(),te(vA,{key:d,displayHARecord:u.displayHARecord,workout:f,sportLabel:h(s0)(f,h(a)),sportColor:h(i0)(f,h(a))},null,8,["displayHARecord","workout","sportLabel","sportColor"]))),128))])),[[c,o]])]))])}}}),ah=re(A3e,[["__scopeId","data-v-bf05bb20"]]),S3e={class:"calendar-workouts"},O3e={class:"desktop-display"},I3e={key:0,class:"workouts-display"},v3e={key:1,class:"donut-display"},R3e={class:"mobile-display"},b3e={key:0,class:"donut-display"},sh=6,N3e=Z({__name:"CalendarWorkouts",props:{displayHARecord:{type:Boolean},workouts:{},sports:{}},setup(e){const t=e,{displayHARecord:n,workouts:r,sports:a}=_e(t),s=$(()=>r3e(t.workouts)),i=$(()=>Age(t.sports));return(o,u)=>(A(),N("div",S3e,[p("div",O3e,[h(r).length<=sh?(A(),N("div",I3e,[(A(!0),N(Re,null,ze(h(r).slice(0,sh),(l,c)=>(A(),te(vA,{key:c,displayHARecord:h(n),workout:l,sportLabel:h(s0)(l,h(a)),sportColor:h(i0)(l,h(a))},null,8,["displayHARecord","workout","sportLabel","sportColor"]))),128))])):(A(),N("div",v3e,[k(ah,{workouts:h(r),sports:h(a),datasets:s.value,colors:i.value,displayHARecord:h(n)},null,8,["workouts","sports","datasets","colors","displayHARecord"])]))]),p("div",R3e,[h(r).length>0?(A(),N("div",b3e,[k(ah,{workouts:h(r),sports:h(a),datasets:s.value,colors:i.value,displayHARecord:h(n)},null,8,["workouts","sports","datasets","colors","displayHARecord"])])):x("",!0)])]))}}),C3e={class:"calendar-cells"},y3e={class:"calendar-cell-day"},D3e=Z({__name:"CalendarCells",props:{currentDay:{},displayHARecord:{type:Boolean},endDate:{},sports:{},startDate:{},timezone:{},weekStartingMonday:{type:Boolean},workouts:{}},setup(e){const t=e,{currentDay:n,displayHARecord:r,endDate:a,sports:s,startDate:i,timezone:o,weekStartingMonday:u,workouts:l}=_e(t),c=le([]);It(()=>f());function f(){c.value=[];let E=i.value;for(;E<=a.value;){const v=[];for(let R=0;R<7;R++)v.push(E),E=Ii(E,1);c.value.push(v)}}function d(E){return u.value?[5,6].includes(E):[0,6].includes(E)}function m(E,v){return v?v.filter(R=>W1(Oc(R.workout_date,o.value),E)).reverse():[]}return Ge(()=>t.currentDay,()=>f()),(E,v)=>(A(),N("div",C3e,[(A(!0),N(Re,null,ze(c.value,(R,I)=>(A(),N("div",{class:"calendar-row",key:I},[(A(!0),N(Re,null,ze(R,(b,S)=>(A(),N("div",{class:Se(["calendar-cell",{"disabled-cell":!h(ZN)(b,h(n)),"week-end":d(S),today:h(QN)(b)}]),key:S},[k(N3e,{workouts:m(b,h(l)),sports:h(s),displayHARecord:h(r)},null,8,["workouts","sports","displayHARecord"]),p("div",y3e,T(h(dn)(b,"d")),1)],2))),128))]))),128))]))}}),P3e={class:"calendar-days"},w3e=Z({__name:"CalendarDays",props:{startDate:{},localeOptions:{}},setup(e){const t=e,n=[];for(let r=0;r<7;r++)n.push(Ii(t.startDate,r));return(r,a)=>(A(),N("div",P3e,[(A(),N(Re,null,ze(n,(s,i)=>p("div",{class:"calendar-day",key:i},T(h(dn)(s,"EEE",{locale:r.localeOptions})),1)),64))]))}}),L3e={class:"calendar-header"},$3e=p("i",{class:"fa fa-chevron-left","aria-hidden":"true"},null,-1),k3e=[$3e],U3e={class:"calendar-month"},M3e=p("i",{class:"fa fa-chevron-right","aria-hidden":"true"},null,-1),x3e=[M3e],F3e=Z({__name:"CalendarHeader",props:{day:{},localeOptions:{}},emits:["displayNextMonth","displayPreviousMonth"],setup(e,{emit:t}){const n=e,r=t,{day:a,localeOptions:s}=_e(n);return(i,o)=>(A(),N("div",L3e,[p("button",{class:"calendar-arrow calendar-arrow-left transparent",onClick:o[0]||(o[0]=u=>r("displayPreviousMonth"))},k3e),p("div",U3e,[p("span",null,T(h(dn)(h(a),"MMM yyyy",{locale:h(s)})),1)]),p("button",{class:"calendar-arrow calendar-arrow-right transparent",onClick:o[1]||(o[1]=u=>r("displayNextMonth"))},x3e)]))}}),W3e={id:"user-calendar"},G3e={class:"calendar-card box"},ih="yyyy-MM-dd",z3e=Z({__name:"index",props:{sports:{},user:{}},setup(e){const t=e,n=Me(),{sports:r,user:a}=_e(t),s=le(new Date),i=le(xE(s.value,a.value.weekm)),o=$(()=>n.getters[Ae.GETTERS.CALENDAR_WORKOUTS]),u=$(()=>n.getters[H.GETTERS.LOCALE]);Nt(()=>l());function l(){i.value=xE(s.value,t.user.weekm);const d={from:dn(i.value.start,ih),to:dn(i.value.end,ih),page:1,per_page:100,...pi};n.dispatch(Ae.ACTIONS.GET_CALENDAR_WORKOUTS,d)}function c(){s.value=Ka(s.value,1),l()}function f(){s.value=Zs(s.value,1),l()}return(d,m)=>(A(),N("div",W3e,[p("div",G3e,[k(F3e,{day:s.value,"locale-options":u.value,onDisplayNextMonth:c,onDisplayPreviousMonth:f},null,8,["day","locale-options"]),k(w3e,{"start-date":i.value.start,"locale-options":u.value},null,8,["start-date","locale-options"]),k(D3e,{currentDay:s.value,displayHARecord:h(a).display_ascent,"end-date":i.value.end,sports:h(r),"start-date":i.value.start,timezone:h(a).timezone,workouts:o.value,weekStartingMonday:h(a).weekm},null,8,["currentDay","displayHARecord","end-date","sports","start-date","timezone","workouts","weekStartingMonday"])])]))}}),RA={data:{type:Object,required:!0},options:{type:Object,default:()=>({})},plugins:{type:Array,default:()=>[]},datasetIdKey:{type:String,default:"label"},updateMode:{type:String,default:void 0}},B3e={ariaLabel:{type:String},ariaDescribedby:{type:String}},H3e={type:{type:String,required:!0},...RA,...B3e},V3e=O_[0]==="2"?(e,t)=>Object.assign(e,{attrs:t}):(e,t)=>Object.assign(e,t);function ya(e){return Wu(e)?et(e):e}function j3e(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:e;return Wu(t)?new Proxy(e,{}):e}function K3e(e,t){const n=e.options;n&&t&&Object.assign(n,t)}function bA(e,t){e.labels=t}function NA(e,t,n){const r=[];e.datasets=t.map(a=>{const s=e.datasets.find(i=>i[n]===a[n]);return!s||!a.data||r.includes(s)?{...a}:(r.push(s),Object.assign(s,a),s)})}function Y3e(e,t){const n={labels:[],datasets:[]};return bA(n,e.labels),NA(n,e.datasets,t),n}const q3e=Z({props:H3e,setup(e,t){let{expose:n,slots:r}=t;const a=le(null),s=Ei(null);n({chart:s});const i=()=>{if(!a.value)return;const{type:l,data:c,options:f,plugins:d,datasetIdKey:m}=e,E=Y3e(c,m),v=j3e(E,c);s.value=new Md(a.value,{type:l,data:v,options:{...f},plugins:d})},o=()=>{const l=et(s.value);l&&(l.destroy(),s.value=null)},u=l=>{l.update(e.updateMode)};return It(i),hi(o),Ge([()=>e.options,()=>e.data],(l,c)=>{let[f,d]=l,[m,E]=c;const v=et(s.value);if(!v)return;let R=!1;if(f){const I=ya(f),b=ya(m);I&&I!==b&&(K3e(v,I),R=!0)}if(d){const I=ya(d.labels),b=ya(E.labels),S=ya(d.datasets),O=ya(E.datasets);I!==b&&(bA(v.config.data,I),R=!0),S&&S!==O&&(NA(v.config.data,S,e.datasetIdKey),R=!0)}R&&ln(()=>{u(v)})},{deep:!0}),()=>Tn("canvas",{role:"img",ariaLabel:e.ariaLabel,ariaDescribedby:e.ariaDescribedby,ref:a},[Tn("p",{},[r.default?r.default():""])])}});function CA(e,t){return Md.register(t),Z({props:RA,setup(n,r){let{expose:a}=r;const s=Ei(null),i=o=>{s.value=o==null?void 0:o.chart};return a({chart:s}),()=>Tn(q3e,V3e({ref:i},{type:e,...n}))}})}const X3e=CA("bar",Oh),Z3e=CA("line",Ih),Q3e=(e,t=!1)=>{let n="0";t&&(n=String(Math.floor(e/86400)),e%=86400);const r=String(Math.floor(e/3600)).padStart(2,"0");e%=3600;const a=String(Math.floor(e/60)).padStart(2,"0"),s=String(e%60).padStart(2,"0");return t?`${n==="0"?"":`${n}d `}${r==="00"?"":`${r}h `}${a}m ${s}s`:`${r==="00"?"":`${r}:`}${a}:${s}`},Ns=(e,t,n,r=!0,a="km")=>{const s=n?Pn[a].defaultTarget:a;switch(e){case"average_speed":return`${t.toFixed(2)} ${s}/h`;case"total_duration":return Q3e(t,r);case"total_distance":case"total_ascent":case"total_descent":return`${t.toFixed(2)} ${s}`;default:return t.toString()}},J3e=Z({__name:"Chart",props:{datasets:{},labels:{},displayedData:{},displayedSportIds:{},fullStats:{type:Boolean},useImperialUnits:{type:Boolean}},setup(e){const t=e,{datasets:n,labels:r,displayedData:a,displayedSportIds:s,fullStats:i,useImperialUnits:o}=_e(t),u=_f(),{t:l}=Yt(),c=$(()=>u.getters[H.GETTERS.DARK_MODE]),f=$(()=>hf(c.value)),d=$(()=>({color:f.value?kr.darkMode.line:kr.ligthMode.line})),m=$(()=>({color:f.value?kr.darkMode.text:kr.ligthMode.text})),E=$(()=>({labels:r.value,datasets:JSON.parse(JSON.stringify(n.value))})),v=$(()=>({responsive:!0,maintainAspectRatio:!1,animation:!1,layout:{padding:{top:i.value?40:22}},scales:{x:{stacked:!0,grid:{drawOnChartArea:!1,...d.value},border:{...d.value},ticks:{...m.value}},y:{stacked:a.value!=="average_speed",grid:{drawOnChartArea:!1,...d.value},border:{...d.value},ticks:{maxTicksLimit:6,callback:function(S){return Ns(a.value,+S,o.value,!1,b(a.value))},...m.value},afterFit:function(S){S.width=i.value?90:60}}},plugins:{datalabels:{anchor:"end",align:"end",color:function(S){return a.value==="average_speed"&&S.dataset.backgroundColor?S.dataset.backgroundColor[0]:m.value.color},rotation:function(S){return i.value&&S.chart.chartArea.width<580?310:0},display:function(S){return i.value&&S.chart.chartArea.width<300?!1:a.value==="average_speed"?s.value.length==1?"auto":!1:!0},formatter:function(S,O){if(a.value==="average_speed")return Ns(a.value,S,o.value,!1);{const C=O.chart.data.datasets.map(P=>P.data[O.dataIndex]).reduce((P,M)=>I(P,M),0);return O.datasetIndex===s.value.length-1&&C>0?Ns(a.value,C,o.value,!1,b(a.value)):null}}},legend:{display:!1},tooltip:{interaction:{intersect:!0,mode:"index",position:a.value==="average_speed"?"nearest":"average"},filter:function(S){return S.formattedValue!=="0"},callbacks:{label:function(S){let O=l(`sports.${S.dataset.label}.LABEL`)||"";return O&&(O+=": "),S.parsed.y!==null&&(O+=Ns(a.value,S.parsed.y,o.value,!0,b(a.value))),O},footer:function(S){if(a.value==="average_speed")return"";let O=0;return S.map(C=>{O+=C.parsed.y}),`${l("common.TOTAL")}: `+Ns(a.value,O,o.value,!0,b(a.value))}}}}}));function R(S){return isNaN(S)?0:+S}function I(S,O){return R(S)+R(O)}function b(S){return["total_ascent","total_descent"].includes(S)?"m":"km"}return(S,O)=>(A(),N("div",{class:Se(["bar-chart",{minimal:!h(i)}])},[k(h(X3e),{data:E.value,options:v.value},null,8,["data","options"])],2))}}),eCe=re(J3e,[["__scopeId","data-v-d506f845"]]),{locale:oh}=_a.global,tCe={week:{api:"yyyy-MM-dd",chart:"MM/dd/yyyy"},month:{api:"yyyy-MM",chart:"MM/yyyy"},year:{api:"yyyy",chart:"yyyy"}},nCe=["average_speed","nb_workouts","total_duration","total_distance","total_ascent","total_descent"],rCe=(e,t)=>{const n=[];for(let r=$Ae(e.duration,e.start,t);r<=e.end;r=kAe(e.duration,r))n.push(r);return n},Da=(e,t,n=!1)=>{const r={label:e,backgroundColor:[t],data:[]};return n?(r.type="line",r.borderColor=[t],r.spanGaps=!0):r.type="bar",r},aCe=e=>{const t={average_speed:[],nb_workouts:[],total_distance:[],total_duration:[],total_ascent:[],total_descent:[]};return e.map(n=>{const r=n.color?n.color:a0[n.label];t.average_speed.push(Da(n.label,r,!0)),t.nb_workouts.push(Da(n.label,r)),t.total_distance.push(Da(n.label,r)),t.total_duration.push(Da(n.label,r)),t.total_ascent.push(Da(n.label,r)),t.total_descent.push(Da(n.label,r))}),t},sCe=(e,t,n)=>{switch(e){case"average_speed":case"total_distance":case"total_ascent":case"total_descent":return vo(["average_speed","total_distance"].includes(e)?"km":"m",t,n);default:case"nb_workouts":case"total_duration":return t}},iCe=(e,t,n,r,a,s,i)=>{const o=rCe(e,t),u=tCe[e.duration],l=n.filter(m=>r.includes(m.id)),c=[],f=aCe(l),d={};return l.map(m=>d[m.label]=m.id),o.map(m=>{const E=dn(m,u.api),v=dn(m,e.duration==="week"?ga(i,oh.value):u.chart,{locale:bi[oh.value]});c.push(v),nCe.map(R=>{f[R].map(I=>{I.data.push(E in a&&d[I.label]in a[E]?sCe(R,a[E][d[I.label]][R],s):R==="average_speed"?null:0)})})}),{labels:c,datasets:f}},oCe=(e,t,n)=>{const r=n?1:0,a=t==="year"?Sf(Ml(e,9)):t==="week"?tc(Zs(e,2),{weekStartsOn:r}):Ri(Zs(e,11)),s=t==="year"?G1(e):t==="week"?Of(e,{weekStartsOn:r}):vi(e);return{duration:t,end:s,start:a}},uCe=(e,t,n)=>{const{duration:r,start:a,end:s}=e,i=n?1:0;return{duration:r,end:r==="year"?G1(t?Ml(s,1):Ho(s,1)):r==="week"?Of(t?zp(s,1):Ul(s,1),{weekStartsOn:i}):vi(t?Zs(s,1):Ka(s,1)),start:r==="year"?Sf(t?Ml(a,1):Ho(a,1)):r==="week"?tc(t?zp(a,1):Ul(a,1),{weekStartsOn:i}):Ri(t?Zs(a,1):Ka(a,1))}},cCe={class:"stats-chart"},lCe={key:0},dCe={key:1},fCe={class:"chart-radio"},pCe=["checked","disabled"],mCe=["checked","disabled"],ECe=["checked","disabled"],hCe={key:0},_Ce=["checked","disabled"],TCe={key:1},gCe=["checked","disabled"],ACe={key:2},SCe=["checked","disabled"],OCe=Z({__name:"index",props:{sports:{},user:{},chartParams:{},displayedSportIds:{default:()=>[]},fullStats:{type:Boolean,default:!1},hideChartIfNoData:{type:Boolean,default:!1},isDisabled:{type:Boolean,default:!1}},setup(e){const t=e,{sports:n,user:r,chartParams:a,displayedSportIds:s,fullStats:i,hideChartIfNoData:o,isDisabled:u}=_e(t),l=Me(),c=le("total_distance"),f=$(()=>l.getters[Br.GETTERS.USER_STATS]),d=$(()=>iCe(a.value,r.value.weekm,n.value,s.value,f.value,r.value.imperial_units,r.value.date_format)),m=$(()=>d.value.datasets[c.value]),E=$(()=>d.value.labels),v=$(()=>Object.keys(f.value).length===0);Nt(()=>R(b(a.value,r.value)));function R(S){l.dispatch(Br.ACTIONS.GET_USER_STATS,{username:r.value.username,filterType:"by_time",params:S})}function I(S){c.value=S.target.name}function b(S,O){return{from:dn(S.start,"yyyy-MM-dd"),to:dn(S.end,"yyyy-MM-dd"),time:S.duration==="week"?`week${O.weekm?"m":""}`:S.duration}}return Ge(()=>a.value,async S=>{R(b(S,r.value))}),(S,O)=>(A(),N("div",cCe,[h(o)&&v.value?(A(),N("div",lCe,T(S.$t("workouts.NO_WORKOUTS")),1)):(A(),N("div",dCe,[p("div",fCe,[p("label",null,[p("input",{type:"radio",name:"total_distance",checked:c.value==="total_distance",disabled:h(u),onClick:I},null,8,pCe),j(" "+T(S.$t("workouts.DISTANCE")),1)]),p("label",null,[p("input",{type:"radio",name:"total_duration",checked:c.value==="total_duration",disabled:h(u),onClick:I},null,8,mCe),j(" "+T(S.$t("workouts.DURATION")),1)]),p("label",null,[p("input",{type:"radio",name:"nb_workouts",checked:c.value==="nb_workouts",disabled:h(u),onClick:I},null,8,ECe),j(" "+T(S.$t("workouts.WORKOUT",2)),1)]),h(i)?(A(),N("label",hCe,[p("input",{type:"radio",name:"average_speed",checked:c.value==="average_speed",disabled:h(u),onClick:I},null,8,_Ce),j(" "+T(S.$t("workouts.AVERAGE_SPEED")),1)])):x("",!0),h(i)?(A(),N("label",TCe,[p("input",{type:"radio",name:"total_ascent",checked:c.value==="total_ascent",disabled:h(u),onClick:I},null,8,gCe),j(" "+T(S.$t("workouts.ASCENT")),1)])):x("",!0),h(i)?(A(),N("label",ACe,[p("input",{type:"radio",name:"total_descent",checked:c.value==="total_descent",disabled:h(u),onClick:I},null,8,SCe),j(" "+T(S.$t("workouts.DESCENT")),1)])):x("",!0)]),E.value.length>0?(A(),te(eCe,{key:0,datasets:m.value,labels:E.value,displayedData:c.value,displayedSportIds:h(s),fullStats:h(i),useImperialUnits:h(r).imperial_units},null,8,["datasets","labels","displayedData","displayedSportIds","fullStats","useImperialUnits"])):x("",!0)]))]))}}),yA=re(OCe,[["__scopeId","data-v-b8d7f5c9"]]),ICe={class:"user-month-stats"},vCe=Z({__name:"UserMonthStats",props:{sports:{},user:{}},setup(e){const t=e,{sports:n,user:r}=_e(t),a=new Date,s={duration:"week",start:Ri(a),end:vi(a)},i=n.value.map(o=>o.id);return(o,u)=>{const l=oe("Card");return A(),N("div",ICe,[k(l,null,{title:ue(()=>[j(T(o.$t("dashboard.THIS_MONTH")),1)]),content:ue(()=>[k(yA,{sports:h(n),user:h(r),"chart-params":s,"displayed-sport-ids":h(i),"hide-chart-if-no-data":!0},null,8,["sports","user","displayed-sport-ids"])]),_:1})])}}}),RCe=re(vCe,[["__scopeId","data-v-8f59a282"]]),{locale:bCe}=_a.global,NCe=(e,t,n,r)=>{const a="km",s=n?Pn[a].defaultTarget:a,i="m",o=n?Pn[i].defaultTarget:i;let u;switch(e.record_type){case"AS":case"MS":u=`${sn(+e.value,a,s,2)} ${s}/h`;break;case"FD":u=`${sn(+e.value,a,s,3)} ${s}`;break;case"HA":u=`${sn(+e.value,i,o,2)} ${o}`;break;case"LD":u=e.value;break;default:throw new Error(`Invalid record type, expected: "AS", "FD", "HA", "LD", "MD", got: "${e.record_type}"`)}return{id:e.id,record_type:e.record_type,sport_id:e.sport_id,value:u,user:e.user,workout_date:kn(e.workout_date,t,r,!1),workout_id:e.workout_id}},CCe=(e,t)=>{const n=e.label.toLowerCase(),r=t.label.toLowerCase();return n>r?1:n(s=ga(s,bCe.value),e.filter(i=>a?!0:i.record_type!=="HA").reduce((i,o)=>{const u=t.find(l=>l.id===o.sport_id);return u&&u.label&&(i[u.translatedLabel]===void 0&&(i[u.translatedLabel]={label:u.label,color:u.color,records:[]}),i[u.translatedLabel].records.push(NCe(o,n,r,s))),i},{})),DCe={class:"records-card"},PCe={class:"record-type"},wCe={class:"record-value"},LCe={class:"record-date"},$Ce=Z({__name:"RecordsCard",props:{records:{},sportTranslatedLabel:{}},setup(e){const t=e,{records:n,sportTranslatedLabel:r}=_e(t),{t:a}=Yt();function s(i){const o=[];return i.map(u=>{o.push({...u,label:a(`workouts.RECORD_${u.record_type}`)})}),o.sort(CCe)}return(i,o)=>{const u=oe("SportImage"),l=oe("router-link"),c=oe("Card");return A(),N("div",DCe,[k(c,null,{title:ue(()=>[k(u,{"sport-label":h(n).label,color:h(n).color},null,8,["sport-label","color"]),j(" "+T(h(r)),1)]),content:ue(()=>[(A(!0),N(Re,null,ze(s(h(n).records),f=>(A(),N("div",{class:"record",key:f.id},[p("span",PCe,T(f.label),1),p("span",wCe,T(f.value),1),p("span",LCe,[k(l,{to:{name:"Workout",params:{workoutId:f.workout_id}}},{default:ue(()=>[p("time",null,T(f.workout_date),1)]),_:2},1032,["to"])])]))),128))]),_:1})])}}}),kCe=re($Ce,[["__scopeId","data-v-64523a87"]]),UCe=e=>(dt("data-v-fff33919"),e=e(),ft(),e),MCe={class:"user-records-section"},xCe={class:"section-title"},FCe=UCe(()=>p("i",{class:"fa fa-trophy custom-fa-small","aria-hidden":"true"},null,-1)),WCe={class:"user-records"},GCe={key:0,class:"no-records"},zCe=Z({__name:"index",props:{sports:{},user:{}},setup(e){const t=e,{t:n}=Yt(),r=$(()=>yCe(t.user.records,Xr(t.sports,n),t.user.timezone,t.user.imperial_units,t.user.display_ascent,t.user.date_format));return(a,s)=>(A(),N("div",MCe,[p("div",xCe,[FCe,j(" "+T(a.$t("workouts.RECORD",2)),1)]),p("div",WCe,[Object.keys(r.value).length===0?(A(),N("div",GCe,T(a.$t("workouts.NO_RECORDS")),1)):x("",!0),(A(!0),N(Re,null,ze(Object.keys(r.value).sort(),i=>(A(),te(kCe,{sportTranslatedLabel:i,records:r.value[i],key:i,useImperialUnits:a.user.imperial_units},null,8,["sportTranslatedLabel","records","useImperialUnits"]))),128))])]))}}),BCe=re(zCe,[["__scopeId","data-v-fff33919"]]),HCe={id:"user-stats"},dl="km",fl="m",VCe=Z({__name:"index",props:{user:{}},setup(e){const t=e,{t:n}=Yt(),{user:r}=_e(t),a=$(()=>t.user.total_duration),s=$(()=>c(a)),i=r.value.imperial_units?Pn[dl].defaultTarget:dl,o=$(()=>r.value.imperial_units?sn(r.value.total_distance,dl,i,2):parseFloat(r.value.total_distance.toFixed(2))),u=r.value.imperial_units?Pn[fl].defaultTarget:fl,l=$(()=>r.value.imperial_units?sn(r.value.total_ascent,fl,u,2):parseFloat(r.value.total_ascent.toFixed(2)));function c(f){const d=f.value.match(/day/g)?f.value.split(", ")[1]:f.value;return{days:f.value.match(/day/g)?`${f.value.split(" ")[0]} ${f.value.match(/days/g)?n("common.DAY",2):n("common.DAY",1)}`:`0 ${n("common.DAY",2)},`,duration:`${d.split(":")[0]}h ${d.split(":")[1]}min`}}return(f,d)=>(A(),N("div",HCe,[k(cr,{icon:"calendar",value:h(r).nb_workouts,text:f.$t("workouts.WORKOUT",h(r).nb_workouts)},null,8,["value","text"]),k(cr,{icon:"road",value:o.value,text:h(i)==="mi"?"miles":h(i)},null,8,["value","text"]),h(r).display_ascent?(A(),te(cr,{key:0,icon:"location-arrow",value:l.value,text:h(u)==="ft"?"feet":h(u)},null,8,["value","text"])):x("",!0),k(cr,{icon:"clock-o",value:s.value.days,text:s.value.duration},null,8,["value","text"]),h(r).display_ascent?x("",!0):(A(),te(cr,{key:1,icon:"tags",value:h(r).nb_sports,text:f.$t("workouts.SPORT",h(r).nb_sports)},null,8,["value","text"]))]))}}),jCe={},KCe={class:"privacy-policy-message"};function YCe(e,t){const n=oe("router-link"),r=oe("i18n-t");return A(),N("div",KCe,[p("span",null,[k(r,{keypath:"user.LAST_PRIVACY_POLICY_TO_VALIDATE"},{default:ue(()=>[k(n,{to:"/profile/edit/privacy-policy",class:"policy-link"},{default:ue(()=>[j(T(e.$t("user.REVIEW")),1)]),_:1})]),_:1})])])}const qCe=re(jCe,[["render",YCe],["__scopeId","data-v-1b250692"]]),Li=e=>(dt("data-v-8f5da609"),e=e(),ft(),e),XCe={key:0,id:"dashboard",class:"view"},ZCe={class:"container mobile-menu"},QCe={class:"box"},JCe=Li(()=>p("i",{class:"fa fa-calendar","aria-hidden":"true"},null,-1)),eye=[JCe],tye=Li(()=>p("i",{class:"fa fa-bar-chart","aria-hidden":"true"},null,-1)),nye=[tye],rye=Li(()=>p("i",{class:"fa fa-map-o","aria-hidden":"true"},null,-1)),aye=[rye],sye=Li(()=>p("i",{class:"fa fa-trophy","aria-hidden":"true"},null,-1)),iye=[sye],oye={key:0,class:"container privacy-policy-message"},uye={class:"container"},cye={class:"container dashboard-container"},lye={class:"left-container dashboard-sub-container"},dye={class:"right-container dashboard-sub-container"},fye=Li(()=>p("div",{id:"bottom"},null,-1)),pye={key:1,class:"app-loading"},mye=Z({__name:"Dashboard",setup(e){const t=Me(),n=$(()=>t.getters[K.GETTERS.AUTH_USER_PROFILE]),r=$(()=>t.getters[Mt.GETTERS.SPORTS]),a=le("calendar");Nt(()=>t.dispatch(K.ACTIONS.GET_USER_PROFILE));function s(i){a.value=i}return(i,o)=>{const u=oe("Loader");return n.value.username&&r.value.length>0?(A(),N("div",XCe,[p("div",ZCe,[p("div",QCe,[p("div",{class:Se(["mobile-menu-item",{"is-selected":a.value==="calendar"}]),onClick:o[0]||(o[0]=l=>s("calendar"))},eye,2),p("div",{class:Se(["mobile-menu-item",{"is-selected":a.value==="chart"}]),onClick:o[1]||(o[1]=l=>s("chart"))},nye,2),p("div",{class:Se(["mobile-menu-item",{"is-selected":a.value==="timeline"}]),onClick:o[2]||(o[2]=l=>s("timeline"))},aye,2),p("div",{class:Se(["mobile-menu-item",{"is-selected":a.value==="records"}]),onClick:o[3]||(o[3]=l=>s("records"))},iye,2)])]),n.value.accepted_privacy_policy?x("",!0):(A(),N("div",oye,[k(qCe)])),p("div",uye,[k(VCe,{user:n.value},null,8,["user"])]),p("div",cye,[p("div",lye,[k(RCe,{sports:r.value,user:n.value,class:Se({"is-hidden":a.value!=="chart"})},null,8,["sports","user","class"]),k(BCe,{sports:r.value,user:n.value,class:Se({"is-hidden":a.value!=="records"})},null,8,["sports","user","class"])]),p("div",dye,[k(z3e,{sports:r.value,user:n.value,class:Se({"is-hidden":a.value!=="calendar"})},null,8,["sports","user","class"]),k(l3e,{sports:r.value,user:n.value,class:Se({"is-hidden":a.value!=="timeline"})},null,8,["sports","user","class"])])]),fye])):(A(),N("div",pye,[k(u)]))}}}),Eye=re(mye,[["__scopeId","data-v-8f5da609"]]),hye={class:"not-found view"},_ye=Z({__name:"NotFoundView",setup(e){return(t,n)=>(A(),N("div",hye,[k(d0)]))}}),Tye={id:"privacy-policy",class:"view"},gye={class:"container"},Aye=p("div",{id:"bottom"},null,-1),Sye=Z({__name:"PrivacyPolicyView",setup(e){const t=Me();return Nt(()=>{t.dispatch(H.ACTIONS.GET_APPLICATION_PRIVACY_POLICY)}),(n,r)=>(A(),N("div",Tye,[p("div",gye,[k(AA)]),Aye]))}}),DA=e=>(dt("data-v-174c91c4"),e=e(),ft(),e),Oye={class:"chart-menu"},Iye=["disabled"],vye=DA(()=>p("i",{class:"fa fa-chevron-left","aria-hidden":"true"},null,-1)),Rye=[vye],bye={class:"time-frames custom-checkboxes-group"},Nye={class:"time-frames-checkboxes custom-checkboxes"},Cye=["id","name","checked","onInput","disabled"],yye=["id","tabindex","onKeydown"],Dye=["disabled"],Pye=DA(()=>p("i",{class:"fa fa-chevron-right","aria-hidden":"true"},null,-1)),wye=[Pye],Lye=Z({__name:"StatsMenu",props:{isDisabled:{type:Boolean}},emits:["arrowClick","timeFrameUpdate"],setup(e,{emit:t}){const n=e,{isDisabled:r}=_e(n),a=t,s=le("month"),i=["week","month","year"];function o(u){s.value=u,a("timeFrameUpdate",u)}return It(()=>{if(!r.value){const u=document.getElementById("frame-month");u&&u.focus()}}),(u,l)=>(A(),N("div",Oye,[p("button",{class:"chart-arrow transparent",onClick:l[0]||(l[0]=c=>a("arrowClick",!0)),onKeydown:l[1]||(l[1]=gt(c=>a("arrowClick",!0),["enter"])),disabled:h(r)},Rye,40,Iye),p("div",bye,[p("div",Nye,[(A(),N(Re,null,ze(i,c=>p("div",{class:"time-frame custom-checkbox",key:c},[p("label",null,[p("input",{type:"radio",id:c,name:c,checked:s.value===c,onInput:f=>o(c),disabled:h(r)},null,40,Cye),p("span",{id:`frame-${c}`,tabindex:h(r)?-1:0,role:"button",onKeydown:gt(f=>o(c),["enter"])},T(u.$t(`statistics.TIME_FRAMES.${c}`)),41,yye)])])),64))])]),p("button",{class:"chart-arrow transparent",onClick:l[2]||(l[2]=c=>a("arrowClick",!1)),onKeydown:l[3]||(l[3]=gt(c=>a("arrowClick",!1),["enter"])),disabled:h(r)},wye,40,Dye)]))}}),$ye=re(Lye,[["__scopeId","data-v-174c91c4"]]),kye={class:"sports-menu"},Uye=["id","name","checked","onInput"],Mye={class:"sport-label"},xye=Z({__name:"StatsSportsMenu",props:{userSports:{},selectedSportIds:{default:()=>[]}},emits:["selectedSportIdsUpdate"],setup(e,{emit:t}){const n=e,r=t,{t:a}=Yt(),s=Ot("sportColors"),{selectedSportIds:i}=_e(n),o=$(()=>Xr(n.userSports,a));function u(l){r("selectedSportIdsUpdate",l)}return(l,c)=>{const f=oe("SportImage");return A(),N("div",kye,[(A(!0),N(Re,null,ze(o.value,d=>(A(),N("label",{type:"checkbox",key:d.id,style:Vr({color:d.color?d.color:h(s)[d.label]})},[p("input",{type:"checkbox",id:`${d.id}`,name:d.label,checked:h(i).includes(d.id),onInput:m=>u(d.id)},null,40,Uye),k(f,{"sport-label":d.label,color:d.color},null,8,["sport-label","color"]),p("span",Mye,T(d.translatedLabel),1)],4))),128))])}}}),Fye={key:0,id:"user-statistics"},Wye=Z({__name:"index",props:{sports:{},user:{},isDisabled:{type:Boolean}},setup(e){const t=e,{t:n}=Yt(),{sports:r,user:a}=_e(t),s=le("month"),i=le(c(s.value)),o=$(()=>Xr(t.sports,n)),u=le(d(r.value));function l(E){s.value=E,i.value=c(s.value)}function c(E){return oCe(new Date,E,t.user.weekm)}function f(E){i.value=uCe(i.value,E,t.user.weekm)}function d(E){return E.map(v=>v.id)}function m(E){u.value.includes(E)?u.value=u.value.filter(v=>v!==E):u.value.push(E)}return Ge(()=>t.sports,E=>{u.value=d(E)}),(E,v)=>o.value?(A(),N("div",Fye,[k($ye,{onTimeFrameUpdate:l,onArrowClick:f,isDisabled:E.isDisabled},null,8,["isDisabled"]),k(yA,{sports:h(r),user:h(a),chartParams:i.value,"displayed-sport-ids":u.value,fullStats:!0,isDisabled:E.isDisabled},null,8,["sports","user","chartParams","displayed-sport-ids","isDisabled"]),k(xye,{"selected-sport-ids":u.value,"user-sports":h(r),onSelectedSportIdsUpdate:m},null,8,["selected-sport-ids","user-sports"])])):x("",!0)}}),Gye=re(Wye,[["__scopeId","data-v-b145e4ac"]]),zye={id:"statistics",class:"view"},Bye={key:0,class:"container"},Hye=Z({__name:"StatisticsView",setup(e){const t=Me(),n=$(()=>t.getters[K.GETTERS.AUTH_USER_PROFILE]),r=$(()=>t.getters[Mt.GETTERS.SPORTS].filter(s=>n.value.sports_list.includes(s.id))),a=$(()=>n.value.nb_workouts===0);return(s,i)=>{const o=oe("Card");return A(),N("div",zye,[n.value.username?(A(),N("div",Bye,[k(o,null,{title:ue(()=>[j(T(s.$t("statistics.STATISTICS")),1)]),content:ue(()=>[k(Gye,{class:Se({"stats-disabled":a.value}),user:n.value,sports:r.value,isDisabled:a.value},null,8,["class","user","sports","isDisabled"])]),_:1}),n.value.nb_workouts===0?(A(),te(p0,{key:0})):x("",!0)])):x("",!0)])}}}),Vye=re(Hye,[["__scopeId","data-v-0aa997fa"]]),jye={name:"EmailSent"},Kye={version:"1.1",id:"Capa_1",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",x:"0px",y:"0px",viewBox:"0 0 345.834 345.834",style:{"enable-background":"new 0 0 345.834 345.834"},"xml:space":"preserve"},Yye=p("g",null,[p("path",{d:`M339.798,260.429c0.13-0.026,0.257-0.061,0.385-0.094c0.109-0.028,0.219-0.051,0.326-0.084 +`)});const o=t.nonTextTags||["script","style","textarea","option"];let u,l;t.allowedAttributes&&(u={},l={},Ds(t.allowedAttributes,function(D,z){u[z]=[];const V=[];D.forEach(function(ae){typeof ae=="string"&&ae.indexOf("*")>=0?V.push(RE(ae).replace(/\\\*/g,".*")):u[z].push(ae)}),V.length&&(l[z]=new RegExp("^("+V.join("|")+")$"))}));const c={},f={},d={};Ds(t.allowedClasses,function(D,z){if(u&&(sr(u,z)||(u[z]=[]),u[z].push("class")),c[z]=D,Array.isArray(D)){const V=[];c[z]=[],d[z]=[],D.forEach(function(ae){typeof ae=="string"&&ae.indexOf("*")>=0?V.push(RE(ae).replace(/\\\*/g,".*")):ae instanceof RegExp?d[z].push(ae):c[z].push(ae)}),V.length&&(f[z]=new RegExp("^("+V.join("|")+")$"))}});const m={};let E;Ds(t.transformTags,function(D,z){let V;typeof D=="function"?V=D:typeof D=="string"&&(V=li.simpleTransform(D)),z==="*"?E=V:m[z]=V});let I,R,v,b,S,O,C=!1;M();const P=new gTe.Parser({onopentag:function(D,z){if(t.enforceHtmlBoundary&&D==="html"&&M(),S){O++;return}const V=new s(D,z);R.push(V);let ae=!1;const Be=!!V.text;let Le;if(sr(m,D)&&(Le=m[D](D,z),V.attribs=z=Le.attribs,Le.text!==void 0&&(V.innerText=Le.text),D!==Le.tagName&&(V.name=D=Le.tagName,b[I]=Le.tagName)),E&&(Le=E(D,z),V.attribs=z=Le.attribs,D!==Le.tagName&&(V.name=D=Le.tagName,b[I]=Le.tagName)),(!i(D)||t.disallowedTagsMode==="recursiveEscape"&&!RTe(v)||t.nestingLimit!=null&&I>=t.nestingLimit)&&(ae=!0,v[I]=!0,t.disallowedTagsMode==="discard"&&o.indexOf(D)!==-1&&(S=!0,O=1),v[I]=!0),I++,ae){if(t.disallowedTagsMode==="discard")return;a=r,r=""}r+="<"+D,D==="script"&&(t.allowedScriptHostnames||t.allowedScriptDomains)&&(V.innerText=""),(!u||sr(u,D)||u["*"])&&Ds(z,function(Oe,Pe){if(!CTe.test(Pe)){delete V.attribs[Pe];return}if(Oe===""&&(t.nonBooleanAttributes.includes(Pe)||t.nonBooleanAttributes.includes("*"))){delete V.attribs[Pe];return}let Ht=!1;if(!u||sr(u,D)&&u[D].indexOf(Pe)!==-1||u["*"]&&u["*"].indexOf(Pe)!==-1||sr(l,D)&&l[D].test(Pe)||l["*"]&&l["*"].test(Pe))Ht=!0;else if(u&&u[D]){for(const xe of u[D])if(ATe(xe)&&xe.name&&xe.name===Pe){Ht=!0;let He="";if(xe.multiple===!0){const ct=Oe.split(" ");for(const q of ct)xe.values.indexOf(q)!==-1&&(He===""?He=q:He+=" "+q)}else xe.values.indexOf(Oe)>=0&&(He=Oe);Oe=He}}if(Ht){if(t.allowedSchemesAppliedToAttributes.indexOf(Pe)!==-1&&G(D,Oe)){delete V.attribs[Pe];return}if(D==="script"&&Pe==="src"){let xe=!0;try{const He=B(Oe);if(t.allowedScriptHostnames||t.allowedScriptDomains){const ct=(t.allowedScriptHostnames||[]).find(function(ce){return ce===He.url.hostname}),q=(t.allowedScriptDomains||[]).find(function(ce){return He.url.hostname===ce||He.url.hostname.endsWith(`.${ce}`)});xe=ct||q}}catch{xe=!1}if(!xe){delete V.attribs[Pe];return}}if(D==="iframe"&&Pe==="src"){let xe=!0;try{const He=B(Oe);if(He.isRelativeUrl)xe=sr(t,"allowIframeRelativeUrls")?t.allowIframeRelativeUrls:!t.allowedIframeHostnames&&!t.allowedIframeDomains;else if(t.allowedIframeHostnames||t.allowedIframeDomains){const ct=(t.allowedIframeHostnames||[]).find(function(ce){return ce===He.url.hostname}),q=(t.allowedIframeDomains||[]).find(function(ce){return He.url.hostname===ce||He.url.hostname.endsWith(`.${ce}`)});xe=ct||q}}catch{xe=!1}if(!xe){delete V.attribs[Pe];return}}if(Pe==="srcset")try{let xe=STe(Oe);if(xe.forEach(function(He){G("srcset",He.url)&&(He.evil=!0)}),xe=NE(xe,function(He){return!He.evil}),xe.length)Oe=bTe(NE(xe,function(He){return!He.evil})),V.attribs[Pe]=Oe;else{delete V.attribs[Pe];return}}catch{delete V.attribs[Pe];return}if(Pe==="class"){const xe=c[D],He=c["*"],ct=f[D],q=d[D],ce=f["*"],de=[ct,ce].concat(q).filter(function(ge){return ge});if(xe&&He?Oe=ne(Oe,bE(xe,He),de):Oe=ne(Oe,xe||He,de),!Oe.length){delete V.attribs[Pe];return}}if(Pe==="style"){if(t.parseStyleAttributes)try{const xe=OTe(D+" {"+Oe+"}"),He=L(xe,t.allowedStyles);if(Oe=X(He),Oe.length===0){delete V.attribs[Pe];return}}catch{typeof window<"u"&&console.warn('Failed to parse "'+D+" {"+Oe+`}", If you're running this in a browser, we recommend to disable style parsing: options.parseStyleAttributes: false, since this only works in a node environment due to a postcss dependency, More info: https://github.com/apostrophecms/sanitize-html/issues/547`),delete V.attribs[Pe];return}else if(t.allowedStyles)throw new Error("allowedStyles option cannot be used together with parseStyleAttributes: false.")}r+=" "+Pe,Oe&&Oe.length&&(r+='="'+w(Oe,!0)+'"')}else delete V.attribs[Pe]}),t.selfClosing.indexOf(D)!==-1?r+=" />":(r+=">",V.innerText&&!Be&&!t.textFilter&&(r+=w(V.innerText),C=!0)),ae&&(r=a+w(r),a="")},ontext:function(D){if(S)return;const z=R[R.length-1];let V;if(z&&(V=z.tag,D=z.innerText!==void 0?z.innerText:D),t.disallowedTagsMode==="discard"&&(V==="script"||V==="style"))r+=D;else{const ae=w(D,!1);t.textFilter&&!C?r+=t.textFilter(ae,V):C||(r+=ae)}if(R.length){const ae=R[R.length-1];ae.text+=D}},onclosetag:function(D,z){if(S)if(O--,!O)S=!1;else return;const V=R.pop();if(!V)return;if(V.tag!==D){R.push(V);return}S=t.enforceHtmlBoundary?D==="html":!1,I--;const ae=v[I];if(ae){if(delete v[I],t.disallowedTagsMode==="discard"){V.updateParentNodeText();return}a=r,r=""}if(b[I]&&(D=b[I],delete b[I]),t.exclusiveFilter&&t.exclusiveFilter(V)){r=r.substr(0,V.tagPosition);return}if(V.updateParentNodeMediaChildren(),V.updateParentNodeText(),t.selfClosing.indexOf(D)!==-1||z&&!i(D)&&["escape","recursiveEscape"].indexOf(t.disallowedTagsMode)>=0){ae&&(r=a,a="");return}r+="",ae&&(r=a+w(r),a=""),C=!1}},t.parser);return P.write(e),P.end(),r;function M(){r="",I=0,R=[],v={},b={},S=!1,O=0}function w(D,z){return typeof D!="string"&&(D=D+""),t.parser.decodeEntities&&(D=D.replace(/&/g,"&").replace(//g,">"),z&&(D=D.replace(/"/g,"""))),D=D.replace(/&(?![a-zA-Z0-9#]{1,20};)/g,"&").replace(//g,">"),z&&(D=D.replace(/"/g,""")),D}function G(D,z){for(z=z.replace(/[\x00-\x20]+/g,"");;){const Be=z.indexOf("",Be+4);if(Le===-1)break;z=z.substring(0,Be)+z.substring(Le+3)}const V=z.match(/^([a-zA-Z][a-zA-Z0-9.\-+]*):/);if(!V)return z.match(/^[/\\]{2}/)?!t.allowProtocolRelative:!1;const ae=V[1].toLowerCase();return sr(t.allowedSchemesByTag,D)?t.allowedSchemesByTag[D].indexOf(ae)===-1:!t.allowedSchemes||t.allowedSchemes.indexOf(ae)===-1}function B(D){if(D=D.replace(/^(\w+:)?\s*[\\/]\s*[\\/]/,"$1//"),D.startsWith("relative:"))throw new Error("relative: exploit attempt");let z="relative://relative-site";for(let Be=0;Be<100;Be++)z+=`/${Be}`;const V=new URL(D,z);return{isRelativeUrl:V&&V.hostname==="relative-site"&&V.protocol==="relative:",url:V}}function L(D,z){if(!z)return D;const V=D.nodes[0];let ae;return z[V.selector]&&z["*"]?ae=bE(z[V.selector],z["*"]):ae=z[V.selector]||z["*"],ae&&(D.nodes[0].nodes=V.nodes.reduce(J(ae),[])),D}function X(D){return D.nodes[0].nodes.reduce(function(z,V){return z.push(`${V.prop}:${V.value}${V.important?" !important":""}`),z},[]).join(";")}function J(D){return function(z,V){return sr(D,V.prop)&&D[V.prop].some(function(Be){return Be.test(V.value)})&&z.push(V),z}}function ne(D,z,V){return z?(D=D.split(/\s+/),D.filter(function(ae){return z.indexOf(ae)!==-1||V.some(function(Be){return Be.test(ae)})}).join(" ")):D}}const yTe={decodeEntities:!0};li.defaults={allowedTags:["address","article","aside","footer","header","h1","h2","h3","h4","h5","h6","hgroup","main","nav","section","blockquote","dd","div","dl","dt","figcaption","figure","hr","li","main","ol","p","pre","ul","a","abbr","b","bdi","bdo","br","cite","code","data","dfn","em","i","kbd","mark","q","rb","rp","rt","rtc","ruby","s","samp","small","span","strong","sub","sup","time","u","var","wbr","caption","col","colgroup","table","tbody","td","tfoot","th","thead","tr"],nonBooleanAttributes:["abbr","accept","accept-charset","accesskey","action","allow","alt","as","autocapitalize","autocomplete","blocking","charset","cite","class","color","cols","colspan","content","contenteditable","coords","crossorigin","data","datetime","decoding","dir","dirname","download","draggable","enctype","enterkeyhint","fetchpriority","for","form","formaction","formenctype","formmethod","formtarget","headers","height","hidden","high","href","hreflang","http-equiv","id","imagesizes","imagesrcset","inputmode","integrity","is","itemid","itemprop","itemref","itemtype","kind","label","lang","list","loading","low","max","maxlength","media","method","min","minlength","name","nonce","optimum","pattern","ping","placeholder","popover","popovertarget","popovertargetaction","poster","preload","referrerpolicy","rel","rows","rowspan","sandbox","scope","shape","size","sizes","slot","span","spellcheck","src","srcdoc","srclang","srcset","start","step","style","tabindex","target","title","translate","type","usemap","value","width","wrap","onauxclick","onafterprint","onbeforematch","onbeforeprint","onbeforeunload","onbeforetoggle","onblur","oncancel","oncanplay","oncanplaythrough","onchange","onclick","onclose","oncontextlost","oncontextmenu","oncontextrestored","oncopy","oncuechange","oncut","ondblclick","ondrag","ondragend","ondragenter","ondragleave","ondragover","ondragstart","ondrop","ondurationchange","onemptied","onended","onerror","onfocus","onformdata","onhashchange","oninput","oninvalid","onkeydown","onkeypress","onkeyup","onlanguagechange","onload","onloadeddata","onloadedmetadata","onloadstart","onmessage","onmessageerror","onmousedown","onmouseenter","onmouseleave","onmousemove","onmouseout","onmouseover","onmouseup","onoffline","ononline","onpagehide","onpageshow","onpaste","onpause","onplay","onplaying","onpopstate","onprogress","onratechange","onreset","onresize","onrejectionhandled","onscroll","onscrollend","onsecuritypolicyviolation","onseeked","onseeking","onselect","onslotchange","onstalled","onstorage","onsubmit","onsuspend","ontimeupdate","ontoggle","onunhandledrejection","onunload","onvolumechange","onwaiting","onwheel"],disallowedTagsMode:"discard",allowedAttributes:{a:["href","name","target"],img:["src","srcset","alt","title","width","height","loading"]},selfClosing:["img","br","hr","area","base","basefont","input","link","meta"],allowedSchemes:["http","https","ftp","mailto","tel"],allowedSchemesByTag:{},allowedSchemesAppliedToAttributes:["href","src","cite"],allowProtocolRelative:!0,enforceHtmlBoundary:!1,parseStyleAttributes:!0};li.simpleTransform=function(e,t,n){return n=n===void 0?!0:n,t=t||{},function(r,a){let s;if(n)for(s in t)a[s]=t[s];else a=t;return{tagName:e,attribs:a}}};const DTe=xd(NTe),di=e=>DTe(she(e,{target:"_blank"}),{allowedTags:["a"],disallowedTagsMode:"escape"}),PTe=e=>(ot("data-v-a720b26e"),e=e(),ut(),e),wTe={id:"admin-app",class:"admin-card"},LTe={for:"admin_contact"},$Te=["value"],kTe=["disabled"],UTe={for:"max_users"},MTe=["disabled"],xTe={class:"user-limit-help"},FTe={class:"info-box"},WTe=PTe(()=>p("i",{class:"fa fa-info-circle","aria-hidden":"true"},null,-1)),GTe={for:"max_single_file_size"},zTe=["disabled"],BTe={for:"max_zip_file_size"},HTe=["disabled"],VTe={for:"gpx_limit_import"},jTe=["disabled"],KTe={class:"about-label",for:"about"},YTe={class:"textarea-description"},qTe=["innerHTML"],XTe={class:"privacy-policy-label",for:"privacy_policy"},ZTe={class:"textarea-description"},QTe=["innerHTML"],JTe={key:5,class:"form-buttons"},ege={class:"confirm",type:"submit"},tge={key:6,class:"form-buttons"},nge=Z({__name:"AdminApplication",props:{appConfig:{},edition:{type:Boolean,default:!1}},setup(e){const t=e,{edition:n}=_e(t),r=Me(),a=Yr(),s=zt({admin_contact:"",max_users:0,max_single_file_size:0,max_zip_file_size:0,gpx_limit_import:0,about:"",privacy_policy:""}),i=$(()=>r.getters[H.GETTERS.ERROR_MESSAGES]);Ct(()=>{t.appConfig&&o(t.appConfig)});function o(c){Object.keys(s).map(f=>{["max_single_file_size","max_zip_file_size"].includes(f)?s[f]=CEe(c[f]):["about","privacy_policy"].includes(f)?s[f]=c[f]!==null?c[f]:"":s[f]=c[f]})}function u(){o(t.appConfig),r.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),a.push("/admin/application")}function l(){const c=Object.assign({},s);c.max_single_file_size*=1048576,c.max_zip_file_size*=1048576,r.dispatch(H.ACTIONS.UPDATE_APPLICATION_CONFIG,c)}return(c,f)=>{const d=oe("ErrorMessage"),m=oe("Card");return A(),N("div",wTe,[k(m,null,{title:ue(()=>[j(T(c.$t("admin.APP_CONFIG.TITLE")),1)]),content:ue(()=>[p("form",{class:"admin-form",onSubmit:Je(l,["prevent"])},[p("label",LTe,[j(T(c.$t("admin.APP_CONFIG.ADMIN_CONTACT"))+": ",1),!h(n)&&!s.admin_contact?(A(),N("input",{key:0,class:"no-contact",value:c.$t("admin.APP_CONFIG.NO_CONTACT_EMAIL"),disabled:""},null,8,$Te)):qe((A(),N("input",{key:1,id:"admin_contact",name:"admin_contact",type:"email","onUpdate:modelValue":f[0]||(f[0]=E=>s.admin_contact=E),disabled:!h(n)},null,8,kTe)),[[at,s.admin_contact]])]),p("label",UTe,[j(T(c.$t("admin.APP_CONFIG.MAX_USERS_LABEL"))+": ",1),qe(p("input",{id:"max_users",name:"max_users",type:"number",min:"0","onUpdate:modelValue":f[1]||(f[1]=E=>s.max_users=E),disabled:!h(n)},null,8,MTe),[[at,s.max_users]])]),p("div",xTe,[p("span",FTe,[WTe,j(" "+T(c.$t("admin.APP_CONFIG.MAX_USERS_HELP")),1)])]),p("label",GTe,[j(T(c.$t("admin.APP_CONFIG.SINGLE_UPLOAD_MAX_SIZE_LABEL"))+": ",1),qe(p("input",{id:"max_single_file_size",name:"max_single_file_size",type:"number",step:"0.1",min:"0","onUpdate:modelValue":f[2]||(f[2]=E=>s.max_single_file_size=E),disabled:!h(n)},null,8,zTe),[[at,s.max_single_file_size]])]),p("label",BTe,[j(T(c.$t("admin.APP_CONFIG.ZIP_UPLOAD_MAX_SIZE_LABEL"))+": ",1),qe(p("input",{id:"max_zip_file_size",name:"max_zip_file_size",type:"number",step:"0.1",min:"0","onUpdate:modelValue":f[3]||(f[3]=E=>s.max_zip_file_size=E),disabled:!h(n)},null,8,HTe),[[at,s.max_zip_file_size]])]),p("label",VTe,[j(T(c.$t("admin.APP_CONFIG.MAX_FILES_IN_ZIP_LABEL"))+": ",1),qe(p("input",{id:"gpx_limit_import",name:"gpx_limit_import",type:"number",min:"0","onUpdate:modelValue":f[4]||(f[4]=E=>s.gpx_limit_import=E),disabled:!h(n)},null,8,jTe),[[at,s.gpx_limit_import]])]),p("label",KTe,T(c.$t("admin.ABOUT.TEXT"))+": ",1),p("span",YTe,T(c.$t("admin.ABOUT.DESCRIPTION")),1),h(n)?qe((A(),N("textarea",{key:0,id:"about",name:"about",rows:"10","onUpdate:modelValue":f[5]||(f[5]=E=>s.about=E)},null,512)),[[at,s.about]]):(A(),N("div",{key:1,innerHTML:h(ca)(h(di)(s.about?s.about:c.$t("admin.NO_TEXT_ENTERED"))),class:"textarea-content"},null,8,qTe)),p("label",XTe,T(Rt(c.$t("privacy_policy.TITLE")))+": ",1),p("span",ZTe,T(c.$t("admin.PRIVACY_POLICY_DESCRIPTION")),1),h(n)?qe((A(),N("textarea",{key:2,id:"privacy_policy",name:"privacy_policy",rows:"20","onUpdate:modelValue":f[6]||(f[6]=E=>s.privacy_policy=E)},null,512)),[[at,s.privacy_policy]]):(A(),N("div",{key:3,innerHTML:h(ca)(h(di)(s.privacy_policy?s.privacy_policy:c.$t("admin.NO_TEXT_ENTERED"))),class:"textarea-content"},null,8,QTe)),i.value?(A(),te(d,{key:4,message:i.value},null,8,["message"])):x("",!0),h(n)?(A(),N("div",JTe,[p("button",ege,T(c.$t("buttons.SUBMIT")),1),p("button",{class:"cancel",onClick:Je(u,["prevent"])},T(c.$t("buttons.CANCEL")),1)])):(A(),N("div",tge,[p("button",{class:"confirm",onClick:f[7]||(f[7]=Je(E=>c.$router.push("/admin/application/edit"),["prevent"]))},T(c.$t("buttons.EDIT")),1),p("button",{class:"cancel",onClick:f[8]||(f[8]=Je(E=>c.$router.push("/admin"),["prevent"]))},T(c.$t("admin.BACK_TO_ADMIN")),1)]))],32)]),_:1})])}}}),CE=re(nge,[["__scopeId","data-v-a720b26e"]]),rge={class:"stat-card"},age={class:"stat-content box"},sge={class:"stat-icon"},ige={class:"stat-details"},oge={class:"stat-huge"},uge={class:"stat"},cr=Z({__name:"StatCard",props:{icon:{},text:{},value:{}},setup(e){const t=e,{icon:n,text:r,value:a}=_e(t);return(s,i)=>(A(),N("div",rge,[p("div",age,[p("div",sge,[p("i",{class:Se(["fa",`fa-${h(n)}`])},null,2)]),p("div",ige,[p("div",oge,T(h(a)),1),p("div",uge,T(h(r)),1)])])]))}}),cge={id:"user-stats"},lge=Z({__name:"AppStatsCards",props:{appStatistics:{}},setup(e){const t=e,{appStatistics:n}=_e(t),r=$(()=>CT(n.value.uploads_dir_size));return(a,s)=>(A(),N("div",cge,[k(cr,{icon:"users",value:h(n).users,text:a.$t("admin.USER",h(n).users)},null,8,["value","text"]),k(cr,{icon:"tags",value:h(n).sports,text:a.$t("workouts.SPORT",h(n).sports)},null,8,["value","text"]),k(cr,{icon:"calendar",value:h(n).workouts,text:a.$t("workouts.WORKOUT",h(n).workouts)},null,8,["value","text"]),k(cr,{icon:"folder-open",value:r.value.size,text:r.value.suffix},null,8,["value","text"])]))}}),Yg=e=>(ot("data-v-efcd2677"),e=e(),ut(),e),dge={id:"admin-menu",class:"center-card"},fge={class:"admin-menu description-list"},pge={class:"application-config-details"},mge=Yg(()=>p("br",null,null,-1)),Ege={class:"registration-status"},hge={key:0,class:"email-sending-status"},_ge=Yg(()=>p("i",{class:"fa fa-exclamation-triangle","aria-hidden":"true"},null,-1)),Tge=Z({__name:"AdminMenu",props:{appConfig:{},appStatistics:{default:()=>({})}},setup(e){const t=e,{appConfig:n,appStatistics:r}=_e(t);return _t(()=>{const a=document.getElementById("adminLink");a&&a.focus()}),(a,s)=>{const i=oe("router-link");return A(),N("div",dge,[k(_T,null,{title:ue(()=>[j(T(a.$t("admin.ADMINISTRATION")),1)]),content:ue(()=>[k(lge,{appStatistics:h(r)},null,8,["appStatistics"]),p("div",fge,[p("dl",null,[p("dt",null,[k(i,{id:"adminLink",to:"/admin/application"},{default:ue(()=>[j(T(a.$t("admin.APPLICATION")),1)]),_:1})]),p("dd",pge,[j(T(a.$t("admin.UPDATE_APPLICATION_DESCRIPTION")),1),mge,p("span",Ege,T(a.$t(`admin.REGISTRATION_${h(n).is_registration_enabled?"ENABLED":"DISABLED"}`)),1),h(n).is_email_sending_enabled?x("",!0):(A(),N("span",hge,[_ge,j(" "+T(a.$t("admin.EMAIL_SENDING_DISABLED")),1)]))]),p("dt",null,[k(i,{to:"/admin/sports"},{default:ue(()=>[j(T(Rt(a.$t("workouts.SPORT",0))),1)]),_:1})]),p("dd",null,T(a.$t("admin.ENABLE_DISABLE_SPORTS")),1),p("dt",null,[k(i,{to:"/admin/users"},{default:ue(()=>[j(T(Rt(a.$t("admin.USER",0))),1)]),_:1})]),p("dd",null,T(a.$t("admin.ADMIN_RIGHTS_DELETE_USER_ACCOUNT")),1)])])]),_:1})])}}}),gge=re(Tge,[["__scopeId","data-v-efcd2677"]]),a0={"Cycling (Sport)":"#4c9792","Cycling (Trekking)":"#a8af88","Cycling (Transport)":"#88af98","Cycling (Virtual)":"#64a360",Hiking:"#bb757c","Mountain Biking":"#d4b371","Mountain Biking (Electric)":"#fc9d6f",Mountaineering:"#48b3b7","Open Water Swimming":"#4058a4",Paragliding:"#c23c50",Rowing:"#fcce72",Running:"#835b83","Skiing (Alpine)":"#67a4bd","Skiing (Cross Country)":"#9498d0",Snowshoes:"#5780a8",Trail:"#09a98a",Walking:"#838383"},Age=e=>{const t={};return e.map(n=>t[n.id]=n.color?n.color:a0[n.label]),t},Sge=(e,t)=>{const n=e.translatedLabel.toLowerCase(),r=t.translatedLabel.toLowerCase();return n>r?1:ne.filter(a=>n==="all"?!0:r.includes(a.id)||a[n]).map(a=>({...a,translatedLabel:t(`sports.${a.label}.LABEL`)})).sort(Sge),s0=(e,t)=>t.filter(n=>n.id===e.sport_id).map(n=>n.label)[0],i0=(e,t)=>t.filter(n=>n.id===e.sport_id).map(n=>n.color)[0],Sc=e=>(ot("data-v-203d96b8"),e=e(),ut(),e),Oge={id:"admin-sports",class:"admin-card"},Ige={class:"responsive-table"},vge=Sc(()=>p("th",null,"#",-1)),Rge={class:"text-left"},bge={class:"text-left sport-action"},Nge=Sc(()=>p("th",null,null,-1)),Cge={class:"text-center"},yge=Sc(()=>p("span",{class:"cell-heading"},"id",-1)),Dge={class:"cell-heading"},Pge={class:"sport-label"},wge={class:"cell-heading"},Lge={class:"text-center"},$ge={class:"cell-heading"},kge={class:"sport-action"},Uge={class:"cell-heading"},Mge={class:"action-button"},xge=["onClick"],Fge={key:0,class:"has-workouts"},Wge=Sc(()=>p("i",{class:"fa fa-warning","aria-hidden":"true"},null,-1)),Gge=Z({__name:"AdminSports",setup(e){const{t}=Yt(),n=Me(),r=$(()=>Xr(n.getters[Mt.GETTERS.SPORTS],t)),a=$(()=>n.getters[H.GETTERS.ERROR_MESSAGES]);function s(i,o){n.dispatch(Mt.ACTIONS.UPDATE_SPORTS,{id:i,isActive:o})}return(i,o)=>{const u=oe("SportImage"),l=oe("ErrorMessage"),c=oe("Card");return A(),N("div",Oge,[k(c,null,{title:ue(()=>[j(T(i.$t("admin.SPORTS.TITLE")),1)]),content:ue(()=>[p("button",{class:"top-button",onClick:o[0]||(o[0]=Je(f=>i.$router.push("/admin"),["prevent"]))},T(i.$t("admin.BACK_TO_ADMIN")),1),p("div",Ige,[p("table",null,[p("thead",null,[p("tr",null,[vge,p("th",null,T(i.$t("admin.SPORTS.TABLE.IMAGE")),1),p("th",Rge,T(i.$t("admin.SPORTS.TABLE.LABEL")),1),p("th",null,T(i.$t("admin.SPORTS.TABLE.ACTIVE")),1),p("th",bge,T(i.$t("admin.ACTION")),1),Nge])]),p("tbody",null,[(A(!0),N(Re,null,ze(r.value,f=>(A(),N("tr",{key:f.id},[p("td",Cge,[yge,j(" "+T(f.id),1)]),p("td",null,[p("span",Dge,T(i.$t("admin.SPORTS.TABLE.IMAGE")),1),k(u,{title:f.translatedLabel,"sport-label":f.label,color:f.color},null,8,["title","sport-label","color"])]),p("td",Pge,[p("span",wge,T(i.$t("admin.SPORTS.TABLE.LABEL")),1),j(" "+T(f.translatedLabel),1)]),p("td",Lge,[p("span",$ge,T(i.$t("admin.SPORTS.TABLE.ACTIVE")),1),p("i",{class:Se(`fa fa${f.is_active?"-check":""}`),"aria-hidden":"true"},null,2)]),p("td",kge,[p("span",Uge,T(i.$t("admin.ACTION")),1),p("div",Mge,[p("button",{class:Se({danger:f.is_active}),onClick:d=>s(f.id,!f.is_active)},T(i.$t(`buttons.${f.is_active?"DIS":"EN"}ABLE`)),11,xge),f.has_workouts?(A(),N("span",Fge,[Wge,j(" "+T(i.$t("admin.SPORTS.TABLE.HAS_WORKOUTS")),1)])):x("",!0)])])]))),128))])]),a.value?(A(),te(l,{key:0,message:a.value},null,8,["message"])):x("",!0),p("button",{onClick:o[1]||(o[1]=Je(f=>i.$router.push("/admin"),["prevent"]))},T(i.$t("admin.BACK_TO_ADMIN")),1)])]),_:1})])}}}),zge=re(Gge,[["__scopeId","data-v-203d96b8"]]),Bge={class:"table-selects"},Hge=["value"],Vge=["value"],jge=["value"],Kge=["value"],Yge=["value"],qge=["value"],Xge=Z({__name:"FilterSelects",props:{order_by:{},query:{},sort:{},message:{}},emits:["updateSelect"],setup(e,{emit:t}){const n=e,r=t,{order_by:a,query:s,sort:i,message:o}=_e(n),u=[10,25,50,100];function l(c){r("updateSelect",c.target.id,c.target.value)}return(c,f)=>(A(),N("div",Bge,[p("label",null,[j(T(c.$t("common.SELECTS.ORDER_BY.LABEL"))+": ",1),p("select",{name:"order_by",id:"order_by",value:h(s).order_by,onChange:l},[(A(!0),N(Re,null,ze(h(a),d=>(A(),N("option",{value:d,key:d},T(c.$t(`${h(o)}.${d.toUpperCase()}`)),9,Vge))),128))],40,Hge)]),p("label",null,[j(T(c.$t("common.SELECTS.ORDER.LABEL"))+": ",1),p("select",{name:"order",id:"order",value:h(s).order,onChange:l},[(A(!0),N(Re,null,ze(h(i),d=>(A(),N("option",{value:d,key:d},T(c.$t(`common.SELECTS.ORDER.${d.toUpperCase()}`)),9,Kge))),128))],40,jge)]),p("label",null,[j(T(c.$t("common.SELECTS.PER_PAGE.LABEL"))+": ",1),p("select",{name:"per_page",id:"per_page",value:h(s).per_page,onChange:l},[(A(),N(Re,null,ze(u,d=>p("option",{value:d,key:d},T(d),9,qge)),64))],40,Yge)])]))}}),qg=re(Xge,[["__scopeId","data-v-fc86ab3c"]]),o0=["asc","desc"],Xg=1,Zge=10,Cd=(e,t)=>e&&typeof e=="string"&&+e>0?+e:t,yE=(e,t,n)=>e&&typeof e=="string"&&t.includes(e)?e:n,yd=(e,t,n,r)=>{const s=(r||{}).defaultSort||"asc",i={};return i.page=Cd(e.page,Xg),i.per_page=Cd(e.per_page,Zge),i.order=yE(e.order,o0,s),i.order_by=yE(e.order_by,t,n),typeof e.q=="string"?i.q=e.q:delete i.q,i},Qge=["from","to","ave_speed_from","ave_speed_to","max_speed_from","max_speed_to","distance_from","distance_to","duration_from","duration_to","sport_id","title"],Ca=(e,t=1)=>Array.from({length:e-t+1},(n,r)=>t+r),Jge=(e,t)=>{if(e<0)return[];if(e<9)return Ca(e);let n=[1,2];return t<4?n=n.concat([3,4,5]):t<6?n=n.concat(Ca(t+2,3)):(n=n.concat(["..."]),t=e-2&&+n[n.length-1](ot("data-v-69dd9739"),e=e(),ut(),e),eAe={class:"pagination-center","aria-label":"navigation"},tAe={class:"pagination"},nAe=Zg(()=>p("i",{class:"fa fa-chevron-left","aria-hidden":"true"},null,-1)),rAe={key:0},aAe=Zg(()=>p("i",{class:"fa fa-chevron-right","aria-hidden":"true"},null,-1)),sAe=Z({__name:"Pagination",props:{pagination:{},path:{},query:{}},setup(e){const t=e,{pagination:n,path:r,query:a}=_e(t);function s(i,o){const u=Object.assign({},a.value);return u.page=o?i+o:i,u}return(i,o)=>{const u=oe("router-link");return A(),N("nav",eAe,[p("ul",tAe,[p("li",{class:Se(["page-prev",{disabled:!h(n).has_prev}])},[k(u,{class:"page-link",to:{path:h(r),query:s(h(n).page,-1)},disabled:!h(n).has_prev,tabindex:h(n).has_prev?0:-1},{default:ue(({navigate:l})=>[Ba(i.$slots,"default",{onClick:c=>h(n).has_next?l:null},()=>[j(T(i.$t("api.PAGINATION.PREVIOUS"))+" ",1),nAe],!0)]),_:3},8,["to","disabled","tabindex"])],2),(A(!0),N(Re,null,ze(h(Jge)(h(n).pages,h(n).page),l=>(A(),N("li",{key:l,class:Se(["page",{active:l===h(n).page}])},[l==="..."?(A(),N("span",rAe," ... ")):(A(),te(u,{key:1,class:"page-link",to:{path:h(r),query:s(+l)}},{default:ue(()=>[j(T(l),1)]),_:2},1032,["to"]))],2))),128)),p("li",{class:Se(["page-next",{disabled:!h(n).has_next}])},[k(u,{class:"page-link",to:{path:h(r),query:s(h(n).page,1)},disabled:!h(n).has_next,tabindex:h(n).has_next?0:-1},{default:ue(({navigate:l})=>[Ba(i.$slots,"default",{onClick:c=>h(n).has_next?l:null},()=>[j(T(i.$t("api.PAGINATION.NEXT"))+" ",1),aAe],!0)]),_:3},8,["to","disabled","tabindex"])],2)])])}}}),$u=re(sAe,[["__scopeId","data-v-69dd9739"]]),iAe={class:"users-filters"},oAe={class:"search-username"},uAe=["placeholder"],cAe=Z({__name:"UsersNameFilter",emits:["filterOnUsername"],setup(e,{emit:t}){const n=qt(),r=le(n.query.q?n.query.q:""),a=t;function s(){r.value!==""&&a("filterOnUsername",r)}function i(){r.value="",a("filterOnUsername",r.value)}return(o,u)=>(A(),N("div",iAe,[p("div",oAe,[qe(p("input",{id:"username",name:"username","onUpdate:modelValue":u[0]||(u[0]=l=>r.value=l),onKeyup:At(s,["enter"]),placeholder:o.$t("user.FILTER_ON_USERNAME")},null,40,uAe),[[at,r.value,void 0,{trim:!0}]]),r.value!==""?(A(),N("i",{key:0,class:"fa fa-times","aria-hidden":"true",onClick:i})):x("",!0)]),p("i",{class:Se(["fa fa-search",{"fa-disabled":r.value===""}]),"aria-hidden":"true",onClick:s},null,2)]))}}),lAe=re(cAe,[["__scopeId","data-v-553040c7"]]);var Dd={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=n;function n(r){if(r===null||r===!0||r===!1)return NaN;var a=Number(r);return isNaN(a)?a:a<0?Math.ceil(a):Math.floor(a)}e.exports=t.default})(Dd,Dd.exports);var dAe=Dd.exports;const fAe=xd(dAe);var Pd={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=n;function n(r){var a=new Date(Date.UTC(r.getFullYear(),r.getMonth(),r.getDate(),r.getHours(),r.getMinutes(),r.getSeconds(),r.getMilliseconds()));return a.setUTCFullYear(r.getFullYear()),r.getTime()-a.getTime()}e.exports=t.default})(Pd,Pd.exports);var pAe=Pd.exports;const DE=xd(pAe);function mAe(e,t){var n=TAe(t);return n.formatToParts?hAe(n,e):_Ae(n,e)}var EAe={year:0,month:1,day:2,hour:3,minute:4,second:5};function hAe(e,t){try{for(var n=e.formatToParts(t),r=[],a=0;a=0&&(r[s]=parseInt(n[a].value,10))}return r}catch(i){if(i instanceof RangeError)return[NaN];throw i}}function _Ae(e,t){var n=e.format(t).replace(/\u200E/g,""),r=/(\d+)\/(\d+)\/(\d+),? (\d+):(\d+):(\d+)/.exec(n);return[r[3],r[1],r[2],r[4],r[5],r[6]]}var sl={};function TAe(e){if(!sl[e]){var t=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:"America/New_York",year:"numeric",month:"numeric",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}).format(new Date("2014-06-25T04:00:00.123Z")),n=t==="06/25/2014, 00:00:00"||t==="‎06‎/‎25‎/‎2014‎ ‎00‎:‎00‎:‎00";sl[e]=n?new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:e,year:"numeric",month:"numeric",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}):new Intl.DateTimeFormat("en-US",{hourCycle:"h23",timeZone:e,year:"numeric",month:"numeric",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"})}return sl[e]}function Qg(e,t,n,r,a,s,i){var o=new Date(0);return o.setUTCFullYear(e,t,n),o.setUTCHours(r,a,s,i),o}var PE=36e5,gAe=6e4,il={timezone:/([Z+-].*)$/,timezoneZ:/^(Z)$/,timezoneHH:/^([+-]\d{2})$/,timezoneHHMM:/^([+-]\d{2}):?(\d{2})$/};function Jg(e,t,n){var r,a;if(!e||(r=il.timezoneZ.exec(e),r))return 0;var s;if(r=il.timezoneHH.exec(e),r)return s=parseInt(r[1],10),wE(s)?-(s*PE):NaN;if(r=il.timezoneHHMM.exec(e),r){s=parseInt(r[1],10);var i=parseInt(r[2],10);return wE(s,i)?(a=Math.abs(s)*PE+i*gAe,s>0?-a:a):NaN}if(OAe(e)){t=new Date(t||Date.now());var o=n?t:AAe(t),u=wd(o,e),l=n?u:SAe(t,u,e);return-l}return NaN}function AAe(e){return Qg(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds())}function wd(e,t){var n=mAe(e,t),r=Qg(n[0],n[1]-1,n[2],n[3]%24,n[4],n[5],0).getTime(),a=e.getTime(),s=a%1e3;return a-=s>=0?s:1e3+s,r-a}function SAe(e,t,n){var r=e.getTime(),a=r-t,s=wd(new Date(a),n);if(t===s)return t;a-=s-t;var i=wd(new Date(a),n);return s===i?s:Math.max(s,i)}function wE(e,t){return-23<=e&&e<=23&&(t==null||0<=t&&t<=59)}var LE={};function OAe(e){if(LE[e])return!0;try{return new Intl.DateTimeFormat(void 0,{timeZone:e}),LE[e]=!0,!0}catch{return!1}}var IAe=/(Z|[+-]\d{2}(?::?\d{2})?| UTC| [a-zA-Z]+\/[a-zA-Z_]+(?:\/[a-zA-Z_]+)?)$/,ol=36e5,$E=6e4,vAe=2,en={dateTimePattern:/^([0-9W+-]+)(T| )(.*)/,datePattern:/^([0-9W+-]+)(.*)/,plainTime:/:/,YY:/^(\d{2})$/,YYY:[/^([+-]\d{2})$/,/^([+-]\d{3})$/,/^([+-]\d{4})$/],YYYY:/^(\d{4})/,YYYYY:[/^([+-]\d{4})/,/^([+-]\d{5})/,/^([+-]\d{6})/],MM:/^-(\d{2})$/,DDD:/^-?(\d{3})$/,MMDD:/^-?(\d{2})-?(\d{2})$/,Www:/^-?W(\d{2})$/,WwwD:/^-?W(\d{2})-?(\d{1})$/,HH:/^(\d{2}([.,]\d*)?)$/,HHMM:/^(\d{2}):?(\d{2}([.,]\d*)?)$/,HHMMSS:/^(\d{2}):?(\d{2}):?(\d{2}([.,]\d*)?)$/,timeZone:IAe};function RAe(e,t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");if(e===null)return new Date(NaN);var n=t||{},r=n.additionalDigits==null?vAe:fAe(n.additionalDigits);if(r!==2&&r!==1&&r!==0)throw new RangeError("additionalDigits must be 0, 1 or 2");if(e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]")return new Date(e.getTime());if(typeof e=="number"||Object.prototype.toString.call(e)==="[object Number]")return new Date(e);if(!(typeof e=="string"||Object.prototype.toString.call(e)==="[object String]"))return new Date(NaN);var a=bAe(e),s=NAe(a.date,r),i=s.year,o=s.restDateString,u=CAe(o,i);if(isNaN(u))return new Date(NaN);if(u){var l=u.getTime(),c=0,f;if(a.time&&(c=yAe(a.time),isNaN(c)))return new Date(NaN);if(a.timeZone||n.timeZone){if(f=Jg(a.timeZone||n.timeZone,new Date(l+c)),isNaN(f))return new Date(NaN)}else f=DE(new Date(l+c)),f=DE(new Date(l+c+f));return new Date(l+c+f)}else return new Date(NaN)}function bAe(e){var t={},n=en.dateTimePattern.exec(e),r;if(n?(t.date=n[1],r=n[3]):(n=en.datePattern.exec(e),n?(t.date=n[1],r=n[2]):(t.date=null,r=e)),r){var a=en.timeZone.exec(r);a?(t.time=r.replace(a[1],""),t.timeZone=a[1].trim()):t.time=r}return t}function NAe(e,t){var n=en.YYY[t],r=en.YYYYY[t],a;if(a=en.YYYY.exec(e)||r.exec(e),a){var s=a[1];return{year:parseInt(s,10),restDateString:e.slice(s.length)}}if(a=en.YY.exec(e)||n.exec(e),a){var i=a[1];return{year:parseInt(i,10)*100,restDateString:e.slice(i.length)}}return{year:null}}function CAe(e,t){if(t===null)return null;var n,r,a,s;if(e.length===0)return r=new Date(0),r.setUTCFullYear(t),r;if(n=en.MM.exec(e),n)return r=new Date(0),a=parseInt(n[1],10)-1,UE(t,a)?(r.setUTCFullYear(t,a),r):new Date(NaN);if(n=en.DDD.exec(e),n){r=new Date(0);var i=parseInt(n[1],10);return wAe(t,i)?(r.setUTCFullYear(t,0,i),r):new Date(NaN)}if(n=en.MMDD.exec(e),n){r=new Date(0),a=parseInt(n[1],10)-1;var o=parseInt(n[2],10);return UE(t,a,o)?(r.setUTCFullYear(t,a,o),r):new Date(NaN)}if(n=en.Www.exec(e),n)return s=parseInt(n[1],10)-1,ME(t,s)?kE(t,s):new Date(NaN);if(n=en.WwwD.exec(e),n){s=parseInt(n[1],10)-1;var u=parseInt(n[2],10)-1;return ME(t,s,u)?kE(t,s,u):new Date(NaN)}return null}function yAe(e){var t,n,r;if(t=en.HH.exec(e),t)return n=parseFloat(t[1].replace(",",".")),ul(n)?n%24*ol:NaN;if(t=en.HHMM.exec(e),t)return n=parseInt(t[1],10),r=parseFloat(t[2].replace(",",".")),ul(n,r)?n%24*ol+r*$E:NaN;if(t=en.HHMMSS.exec(e),t){n=parseInt(t[1],10),r=parseInt(t[2],10);var a=parseFloat(t[3].replace(",","."));return ul(n,r,a)?n%24*ol+r*$E+a*1e3:NaN}return null}function kE(e,t,n){t=t||0,n=n||0;var r=new Date(0);r.setUTCFullYear(e,0,4);var a=r.getUTCDay()||7,s=t*7+n+1-a;return r.setUTCDate(r.getUTCDate()+s),r}var DAe=[31,28,31,30,31,30,31,31,30,31,30,31],PAe=[31,29,31,30,31,30,31,31,30,31,30,31];function eA(e){return e%400===0||e%4===0&&e%100!==0}function UE(e,t,n){if(t<0||t>11)return!1;if(n!=null){if(n<1)return!1;var r=eA(e);if(r&&n>PAe[t]||!r&&n>DAe[t])return!1}return!0}function wAe(e,t){if(t<1)return!1;var n=eA(e);return!(n&&t>366||!n&&t>365)}function ME(e,t,n){return!(t<0||t>52||n!=null&&(n<0||n>6))}function ul(e,t,n){return!(e!=null&&(e<0||e>=25)||t!=null&&(t<0||t>=60)||n!=null&&(n<0||n>=60))}function LAe(e,t,n){var r=RAe(e,n),a=Jg(t,r,!0),s=new Date(r.getTime()-a),i=new Date(0);return i.setFullYear(s.getUTCFullYear(),s.getUTCMonth(),s.getUTCDate()),i.setHours(s.getUTCHours(),s.getUTCMinutes(),s.getUTCSeconds(),s.getUTCMilliseconds()),i}const{locale:ku}=_a.global,$Ae=(e,t,n)=>{switch(e){case"week":return tc(t,{weekStartsOn:n?1:0});case"year":return Sf(t);case"month":return Ri(t);default:throw new Error(`Invalid duration, expected: "week", "month", "year", got: "${e}"`)}},kAe=(e,t)=>{switch(e){case"week":return Ii(t,7);case"year":return Ho(t,1);case"month":return Ka(t,1);default:throw new Error(`Invalid duration, expected: "week", "month", "year", got: "${e}"`)}},Oc=(e,t)=>LAe(new Date(e),t),xE=(e,t)=>{const n=Ri(e),r=vi(e),a=t?1:0;return{start:tc(n,{weekStartsOn:a}),end:Of(r,{weekStartsOn:a})}},tA=(e,t=null,n=null)=>(t||(t="yyyy/MM/dd"),t=ga(t,ku.value),n||(n="HH:mm"),{workout_date:dn(e,t,{locale:bi[ku.value]}),workout_time:dn(e,n)}),UAe=["MM/dd/yyyy","dd/MM/yyyy","yyyy-MM-dd","date_string"],nA={de:"do MMM yyyy",en:"MMM. do, yyyy",es:"d MMM yyyy",fr:"d MMM yyyy",gl:"d MMM yyyy",it:"d MMM yyyy",pl:"d MMM yyyy",nb:"do MMM yyyy",nl:"d MMM yyyy"},ga=(e,t)=>e==="date_string"?nA[t]:e,kn=(e,t,n,r=!0,a=null,s=!1)=>{a||(a=ku.value);const i=r?s?" HH:mm:ss":" HH:mm":"";return dn(Oc(e,t),`${ga(n,a)}${i}`,{locale:bi[a]})},MAe=(e,t,n=null)=>{const r=n||ku.value,a=[];return UAe.map(s=>{const i=ga(s,r);a.push({label:`${i} - ${kn(e,t,i,!1,r)}`,value:s})}),a},xAe=e=>(ot("data-v-4beb3bfa"),e=e(),ut(),e),FAe={id:"admin-users",class:"admin-card"},WAe={key:0,class:"no-users"},GAe={key:1,class:"responsive-table"},zAe=xAe(()=>p("th",null,"#",-1)),BAe={class:"left-text"},HAe={class:"left-text"},VAe={class:"left-text"},jAe={class:"cell-heading"},KAe={class:"cell-heading"},YAe={class:"cell-heading"},qAe={class:"cell-heading"},XAe={class:"text-center"},ZAe={class:"cell-heading"},QAe={class:"text-center"},JAe={class:"cell-heading"},eSe={class:"text-center"},tSe={class:"cell-heading"},nSe={class:"text-center"},rSe={class:"cell-heading"},aSe=["disabled","onClick"],FE="created_at",sSe=Z({__name:"AdminUsers",setup(e){const t=Me(),n=qt(),r=Yr(),a=["is_active","admin","created_at","username","workouts_count"];let s=zt(yd(n.query,a,FE));const i=$(()=>t.getters[K.GETTERS.AUTH_USER_PROFILE]),o=$(()=>t.getters[De.GETTERS.USERS]),u=$(()=>t.getters[De.GETTERS.USERS_PAGINATION]),l=$(()=>t.getters[H.GETTERS.ERROR_MESSAGES]);Ct(()=>c(s));function c(E){t.dispatch(De.ACTIONS.GET_USERS,E)}function f(E){m("q",E.value)}function d(E,I){t.dispatch(De.ACTIONS.UPDATE_USER,{username:E,admin:I})}function m(E,I){s[E]=I,E==="per_page"&&(s.page=1),r.push({path:"/admin/users",query:s})}return bt(()=>{t.dispatch(De.ACTIONS.EMPTY_USERS)}),Ge(()=>n.query,E=>{s=yd(E,a,FE,{query:s}),c(s)}),(E,I)=>{const R=oe("router-link"),v=oe("ErrorMessage"),b=oe("Card");return A(),N("div",FAe,[k(b,null,{title:ue(()=>[j(T(Rt(E.$t("admin.USER",0))),1)]),content:ue(()=>[p("button",{class:"top-button",onClick:I[0]||(I[0]=Je(S=>E.$router.push("/admin"),["prevent"]))},T(E.$t("admin.BACK_TO_ADMIN")),1),k(lAe,{onFilterOnUsername:f}),k(qg,{sort:h(o0),order_by:a,query:h(s),message:"admin.USERS.SELECTS.ORDER_BY",onUpdateSelect:m},null,8,["sort","query"]),o.value.length===0?(A(),N("div",WAe,T(E.$t("user.NO_USERS_FOUND")),1)):(A(),N("div",GAe,[p("table",null,[p("thead",null,[p("tr",null,[zAe,p("th",BAe,T(E.$t("user.USERNAME")),1),p("th",HAe,T(E.$t("user.EMAIL")),1),p("th",VAe,T(E.$t("user.PROFILE.REGISTRATION_DATE")),1),p("th",null,T(Rt(E.$t("workouts.WORKOUT",0))),1),p("th",null,T(E.$t("admin.ACTIVE")),1),p("th",null,T(E.$t("user.ADMIN")),1),p("th",null,T(E.$t("admin.ACTION")),1)])]),p("tbody",null,[(A(!0),N(Re,null,ze(o.value,S=>(A(),N("tr",{key:S.username},[p("td",null,[p("span",jAe,T(E.$t("user.PROFILE.PICTURE")),1),k(Oi,{user:S},null,8,["user"])]),p("td",null,[p("span",KAe,T(E.$t("user.USERNAME")),1),k(R,{to:`/admin/users/${S.username}`},{default:ue(()=>[j(T(S.username),1)]),_:2},1032,["to"])]),p("td",null,[p("span",YAe,T(E.$t("user.EMAIL")),1),j(" "+T(S.email),1)]),p("td",null,[p("span",qAe,T(E.$t("user.PROFILE.REGISTRATION_DATE")),1),p("time",null,T(h(kn)(S.created_at,i.value.timezone,i.value.date_format)),1)]),p("td",XAe,[p("span",ZAe,T(Rt(E.$t("workouts.WORKOUT",0))),1),j(" "+T(S.nb_workouts),1)]),p("td",QAe,[p("span",JAe,T(E.$t("admin.ACTIVE")),1),p("i",{class:Se(`fa fa${S.is_active?"-check":""}-square-o`),"aria-hidden":"true"},null,2)]),p("td",eSe,[p("span",tSe,T(E.$t("user.ADMIN")),1),p("i",{class:Se(`fa fa${S.admin?"-check":""}-square-o`),"aria-hidden":"true"},null,2)]),p("td",nSe,[p("span",rSe,T(E.$t("admin.ACTION")),1),p("button",{class:Se({danger:S.admin}),disabled:S.username===i.value.username,onClick:O=>d(S.username,!S.admin)},T(E.$t(`admin.USERS.TABLE.${S.admin?"REMOVE":"ADD"}_ADMIN_RIGHTS`)),11,aSe)])]))),128))])]),u.value.page?(A(),te($u,{key:0,path:"/admin/users",pagination:u.value,query:h(s)},null,8,["pagination","query"])):x("",!0),l.value?(A(),te(v,{key:1,message:l.value},null,8,["message"])):x("",!0),p("button",{onClick:I[1]||(I[1]=Je(S=>E.$router.push("/admin"),["prevent"]))},T(E.$t("admin.BACK_TO_ADMIN")),1)]))]),_:1})])}}}),iSe=re(sSe,[["__scopeId","data-v-4beb3bfa"]]),oSe={class:"box user-header"},uSe={class:"user-details"},cSe={class:"user-name"},lSe={class:"user-stats"},dSe={class:"user-stat"},fSe={class:"stat-number"},pSe={class:"stat-label"},mSe={class:"user-stat"},ESe={class:"stat-label"},hSe={class:"user-stat hide-small"},_Se={class:"stat-number"},TSe={class:"stat-label"},gSe=Z({__name:"UserHeader",props:{user:{}},setup(e){const t=e,{user:n}=_e(t),r=Me(),a=$(()=>r.getters[K.GETTERS.AUTH_USER_PROFILE]);return(s,i)=>{const o=oe("Distance");return A(),N("div",oSe,[k(Oi,{user:h(n)},null,8,["user"]),p("div",uSe,[p("div",cSe,T(h(n).username),1),p("div",lSe,[p("div",dSe,[p("span",fSe,T(h(n).nb_workouts),1),p("span",pSe,T(s.$t("workouts.WORKOUT",h(n).nb_workouts)),1)]),p("div",mSe,[k(o,{distance:h(n).total_distance,unitFrom:"km",digits:0,displayUnit:!1,useImperialUnits:a.value.imperial_units},null,8,["distance","useImperialUnits"]),p("span",ESe,T(a.value.imperial_units?"miles":"km"),1)]),p("div",hSe,[p("span",_Se,T(h(n).nb_sports),1),p("span",TSe,T(s.$t("workouts.SPORT",h(n).nb_sports)),1)])])])])}}}),rA=re(gSe,[["__scopeId","data-v-3abb1646"]]),ASe={class:"profile-tabs custom-checkboxes-group"},SSe={class:"profile-tabs-checkboxes custom-checkboxes"},OSe=["id","name","checked","disabled","onInput"],ISe=["id","onKeydown"],aA=Z({__name:"UserProfileTabs",props:{tabs:{},selectedTab:{},edition:{type:Boolean},disabled:{type:Boolean,default:!1}},setup(e){const t=e,{tabs:n,selectedTab:r,disabled:a}=_e(t);_t(()=>{const i=document.getElementById(`tab-${n.value[0]}`);i&&i.focus()});function s(i){switch(i){case"ACCOUNT":case"PICTURE":case"PRIVACY-POLICY":return`/profile/edit/${i.toLocaleLowerCase()}`;case"APPS":case"PREFERENCES":case"SPORTS":return`/profile${t.edition?"/edit":""}/${i.toLocaleLowerCase()}`;default:case"PROFILE":return`/profile${t.edition?"/edit":""}`}}return(i,o)=>(A(),N("div",ASe,[p("div",SSe,[(A(!0),N(Re,null,ze(h(n),u=>(A(),N("div",{class:"profile-tab custom-checkbox",key:u},[p("label",null,[p("input",{type:"radio",id:u,name:u,checked:h(r).split("/")[0]===u,disabled:h(a),onInput:l=>i.$router.push(s(u))},null,40,OSe),p("span",{id:`tab-${u}`,tabindex:0,role:"button",onKeydown:At(l=>i.$router.push(s(u)),["enter"])},T(i.$t(`user.PROFILE.TABS.${u}`)),41,ISe)])]))),128))])]))}}),vSe={id:"user-profile"},RSe={class:"box"},bSe=Z({__name:"index",props:{user:{},tab:{}},setup(e){const t=e,{user:n,tab:r}=_e(t),a=["PROFILE","PREFERENCES","SPORTS","APPS"];return(s,i)=>{const o=oe("router-view");return A(),N("div",vSe,[k(rA,{user:h(n)},null,8,["user"]),p("div",RSe,[k(aA,{tabs:a,selectedTab:h(r),edition:!1},null,8,["selectedTab"]),k(o,{user:h(n)},null,8,["user"])])])}}}),NSe=re(bSe,[["__scopeId","data-v-8a058d49"]]),CSe={id:"user-infos",class:"description-list"},ySe={key:1,class:"info-box success-message"},DSe={key:4,class:"email-form form-box"},PSe={class:"form-items",for:"email"},wSe={class:"form-items",for:"email"},LSe={class:"form-buttons"},$Se={class:"confirm",type:"submit"},kSe={key:5},USe={key:0},MSe={class:"user-bio"},xSe={key:0,class:"profile-buttons"},FSe={key:1,class:"profile-buttons"},WSe=Z({__name:"UserInfos",props:{user:{},fromAdmin:{type:Boolean,default:!1}},setup(e){const t=e,n=Me(),{user:r,fromAdmin:a}=_e(t),s=$(()=>n.getters[H.GETTERS.LANGUAGE]),i=$(()=>n.getters[K.GETTERS.AUTH_USER_PROFILE]),o=$(()=>t.user.created_at?kn(t.user.created_at,i.value.timezone,i.value.date_format):""),u=$(()=>t.user.birth_date?dn(new Date(t.user.birth_date),`${ga(i.value.date_format,s.value)}`,{locale:bi[s.value]}):""),l=$(()=>n.getters[De.GETTERS.USERS_IS_SUCCESS]),c=$(()=>n.getters[H.GETTERS.ERROR_MESSAGES]),f=$(()=>n.getters[H.GETTERS.APP_CONFIG]),d=le(""),m=le(!1),E=le(!1),I=le(""),R=le("");function v(G){d.value=G,G!==""&&n.commit(De.MUTATIONS.UPDATE_IS_SUCCESS,!1)}function b(G){n.dispatch(De.ACTIONS.DELETE_USER_ACCOUNT,{username:G})}function S(G){R.value="password-reset",n.dispatch(De.ACTIONS.UPDATE_USER,{username:G,resetPassword:!0})}function O(G){n.dispatch(De.ACTIONS.UPDATE_USER,{username:G,activate:!0})}function C(){w(),I.value=r.value.email_to_confirm?r.value.email_to_confirm:"",E.value=!0,R.value="email-update"}function P(){I.value="",E.value=!1}function M(G){n.dispatch(De.ACTIONS.UPDATE_USER,{username:G,new_email:I.value})}function w(){n.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),n.commit(De.MUTATIONS.UPDATE_IS_SUCCESS,!1),R.value=""}return bt(()=>w()),Ge(()=>l.value,G=>{G&&(v(""),P())}),(G,B)=>{const L=oe("Modal"),X=oe("AlertMessage"),J=oe("ErrorMessage");return A(),N("div",CSe,[d.value?(A(),te(L,{key:0,title:G.$t("common.CONFIRMATION"),message:d.value==="delete"?"admin.CONFIRM_USER_ACCOUNT_DELETION":"admin.CONFIRM_USER_PASSWORD_RESET",strongMessage:h(r).username,onConfirmAction:B[0]||(B[0]=ne=>d.value==="delete"?b(h(r).username):S(h(r).username)),onCancelAction:B[1]||(B[1]=ne=>v("")),onKeydown:B[2]||(B[2]=At(ne=>v(""),["esc"]))},null,8,["title","message","strongMessage"])):x("",!0),l.value?(A(),N("div",ySe,T(G.$t(`admin.${R.value==="password-reset"?"PASSWORD_RESET":"USER_EMAIL_UPDATE"}_SUCCESSFUL`)),1)):x("",!0),h(r).is_active?x("",!0):(A(),te(X,{key:2,message:"user.THIS_USER_ACCOUNT_IS_INACTIVE"})),c.value?(A(),te(J,{key:3,message:c.value},null,8,["message"])):x("",!0),E.value?(A(),N("div",DSe,[p("form",{class:Se({errors:m.value}),onSubmit:B[5]||(B[5]=Je(ne=>M(h(r).username),["prevent"]))},[p("label",PSe,[j(T(G.$t("admin.CURRENT_EMAIL"))+" ",1),qe(p("input",{id:"email",type:"email","onUpdate:modelValue":B[3]||(B[3]=ne=>h(r).email=ne),disabled:""},null,512),[[at,h(r).email]])]),p("label",wSe,[j(T(G.$t("admin.NEW_EMAIL"))+"* ",1),qe(p("input",{id:"new-email",type:"email",required:"","onUpdate:modelValue":B[4]||(B[4]=ne=>I.value=ne)},null,512),[[at,I.value]])]),p("div",LSe,[p("button",$Se,T(G.$t("buttons.SUBMIT")),1),p("button",{class:"cancel",onClick:Je(P,["prevent"])},T(G.$t("buttons.CANCEL")),1)])],34)])):(A(),N("div",kSe,[p("dl",null,[p("dt",null,T(G.$t("user.PROFILE.REGISTRATION_DATE"))+":",1),p("dd",null,[p("time",null,T(o.value),1)]),p("dt",null,T(G.$t("user.PROFILE.FIRST_NAME"))+":",1),p("dd",null,T(h(r).first_name),1),p("dt",null,T(G.$t("user.PROFILE.LAST_NAME"))+":",1),p("dd",null,T(h(r).last_name),1),p("dt",null,T(G.$t("user.PROFILE.BIRTH_DATE"))+":",1),p("dd",null,[u.value?(A(),N("time",USe,T(u.value),1)):x("",!0)]),p("dt",null,T(G.$t("user.PROFILE.LOCATION"))+":",1),p("dd",null,T(h(r).location),1),p("dt",null,T(G.$t("user.PROFILE.BIO"))+":",1),p("dd",MSe,T(h(r).bio),1)]),h(a)?(A(),N("div",xSe,[i.value.username!==h(r).username?(A(),N("button",{key:0,class:"danger",onClick:B[6]||(B[6]=Je(ne=>v("delete"),["prevent"]))},T(G.$t("admin.DELETE_USER")),1)):x("",!0),h(r).is_active?x("",!0):(A(),N("button",{key:1,onClick:B[7]||(B[7]=Je(ne=>O(h(r).username),["prevent"]))},T(G.$t("admin.ACTIVATE_USER_ACCOUNT")),1)),i.value.username!==h(r).username?(A(),N("button",{key:2,onClick:Je(C,["prevent"])},T(G.$t("admin.UPDATE_USER_EMAIL")),1)):x("",!0),i.value.username!==h(r).username&&f.value.is_email_sending_enabled?(A(),N("button",{key:3,onClick:B[8]||(B[8]=Je(ne=>v("reset"),["prevent"]))},T(G.$t("admin.RESET_USER_PASSWORD")),1)):x("",!0),p("button",{onClick:B[9]||(B[9]=ne=>G.$router.go(-1))},T(G.$t("buttons.BACK")),1)])):(A(),N("div",FSe,[p("button",{onClick:B[10]||(B[10]=ne=>G.$router.push("/profile/edit"))},T(G.$t("user.PROFILE.EDIT")),1),p("button",{onClick:B[11]||(B[11]=ne=>G.$router.push("/"))},T(G.$t("common.HOME")),1)]))]))])}}}),sA=re(WSe,[["__scopeId","data-v-98220281"]]),GSe=e=>(ot("data-v-b0528e22"),e=e(),ut(),e),zSe={id:"user-preferences",class:"description-list"},BSe={class:"preferences-section"},HSe={class:"preferences-section"},VSe={class:"info-box raw-speed-help"},jSe=GSe(()=>p("i",{class:"fa fa-info-circle","aria-hidden":"true"},null,-1)),KSe={class:"profile-buttons"},YSe=Z({__name:"UserPreferences",props:{user:{}},setup(e){const t=e,n=Me(),r=$(()=>n.getters[H.GETTERS.LANGUAGE]),a=$(()=>t.user.language?Xl[t.user.language]:Xl.en),s=$(()=>t.user.weekm?"MONDAY":"SUNDAY"),i=$(()=>t.user.timezone?t.user.timezone:"Europe/Paris"),o=$(()=>t.user.date_format?t.user.date_format:"MM/dd/yyyy"),u=$(()=>t.user.display_ascent?"DISPLAYED":"HIDDEN"),l=$(()=>t.user.use_dark_mode===!0?"DARK":t.user.use_dark_mode===!1?"LIGHT":"DEFAULT");return(c,f)=>(A(),N("div",zSe,[p("div",BSe,T(c.$t("user.PROFILE.INTERFACE")),1),p("dl",null,[p("dt",null,T(c.$t("user.PROFILE.LANGUAGE"))+":",1),p("dd",null,T(a.value),1),p("dt",null,T(c.$t("user.PROFILE.THEME_MODE.LABEL"))+":",1),p("dd",null,T(c.$t(`user.PROFILE.THEME_MODE.VALUES.${l.value}`)),1),p("dt",null,T(c.$t("user.PROFILE.TIMEZONE"))+":",1),p("dd",null,T(i.value),1),p("dt",null,T(c.$t("user.PROFILE.DATE_FORMAT"))+":",1),p("dd",null,T(h(ga)(o.value,r.value)),1),p("dt",null,T(c.$t("user.PROFILE.FIRST_DAY_OF_WEEK"))+":",1),p("dd",null,T(c.$t(`user.PROFILE.${s.value}`)),1)]),p("div",HSe,T(c.$t("workouts.WORKOUT",0)),1),p("dl",null,[p("dt",null,T(c.$t("user.PROFILE.UNITS.LABEL"))+":",1),p("dd",null,T(c.$t(`user.PROFILE.UNITS.${c.user.imperial_units?"IMPERIAL":"METRIC"}`)),1),p("dt",null,T(c.$t("user.PROFILE.ASCENT_DATA"))+":",1),p("dd",null,T(c.$t(`common.${u.value}`)),1),p("dt",null,T(c.$t("user.PROFILE.ELEVATION_CHART_START.LABEL"))+":",1),p("dd",null,T(c.$t(`user.PROFILE.ELEVATION_CHART_START.${c.user.start_elevation_at_zero?"ZERO":"MIN_ALT"}`)),1),p("dt",null,T(c.$t("user.PROFILE.USE_RAW_GPX_SPEED.LABEL"))+":",1),p("dd",null,T(c.$t(`user.PROFILE.USE_RAW_GPX_SPEED.${c.user.use_raw_gpx_speed?"RAW_SPEED":"FILTERED_SPEED"}`)),1),p("div",VSe,[p("span",null,[jSe,j(" "+T(c.$t("user.PROFILE.USE_RAW_GPX_SPEED.HELP")),1)])])]),p("div",KSe,[p("button",{onClick:f[0]||(f[0]=d=>c.$router.push("/profile/edit/preferences"))},T(c.$t("user.PROFILE.EDIT_PREFERENCES")),1),p("button",{onClick:f[1]||(f[1]=d=>c.$router.push("/"))},T(c.$t("common.HOME")),1)])]))}}),qSe=re(YSe,[["__scopeId","data-v-b0528e22"]]),XSe={id:"user-profile-edition",class:"center-card"},ZSe=Z({__name:"index",props:{user:{},tab:{}},setup(e){const t=e,n=Me(),{user:r,tab:a}=_e(t),s=["PROFILE","ACCOUNT","PICTURE","PREFERENCES","SPORTS","PRIVACY-POLICY"],i=$(()=>n.getters[K.GETTERS.USER_LOADING]);return(o,u)=>{const l=oe("router-view"),c=oe("Card");return A(),N("div",XSe,[k(c,null,{title:ue(()=>[j(T(o.$t(`user.PROFILE.${h(a)}_EDITION`)),1)]),content:ue(()=>[k(aA,{tabs:s,selectedTab:h(a),edition:!0,disabled:i.value},null,8,["selectedTab","disabled"]),k(l,{user:h(r)},null,8,["user"])]),_:1})])}}}),zs=new Map,QSe=e=>{const{method:t,url:n,params:r={},data:a={}}=e;return[t,n,JSON.stringify(r),JSON.stringify(a)].join("")},is=e=>{const t=QSe(e);if(zs.has(t)){const n=zs.get(t)||{};n==null||n.abort(),zs.delete(t)}return t},Pr=yt.create({baseURL:Si()});Pr.interceptors.request.use(e=>{const t=new AbortController;e.signal=t.signal;const n=is(e);return zs.set(n,t),e},e=>Promise.reject(e));Pr.interceptors.response.use(e=>(is(e.config),e),e=>(e.message!=="canceled"&&e.response&&is(e.response.config),Promise.reject(e)));const iA=(e,t)=>{e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),je.delete(`users/${t.username}`).then(n=>{n.status===204?t.fromAdmin?vt.push("/admin/users"):e.dispatch(K.ACTIONS.LOGOUT).then(()=>vt.push("/")):Ee(e,null)}).catch(n=>Ee(e,n))},JSe={[De.ACTIONS.EMPTY_USER](e){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),e.commit(De.MUTATIONS.UPDATE_USER,{})},[De.ACTIONS.EMPTY_USERS](e){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),e.commit(De.MUTATIONS.UPDATE_USERS,[]),e.commit(De.MUTATIONS.UPDATE_USERS_PAGINATION,{})},[De.ACTIONS.GET_USER](e,t){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),e.commit(De.MUTATIONS.UPDATE_USERS_LOADING,!0),je.get(`users/${t}`).then(n=>{n.data.status==="success"?e.commit(De.MUTATIONS.UPDATE_USER,n.data.data.users[0]):Ee(e,null)}).catch(n=>Ee(e,n)).finally(()=>e.commit(De.MUTATIONS.UPDATE_USERS_LOADING,!1))},[De.ACTIONS.GET_USERS](e,t){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),e.commit(De.MUTATIONS.UPDATE_USERS_LOADING,!0),je.get("users",{params:t}).then(n=>{n.data.status==="success"?(e.commit(De.MUTATIONS.UPDATE_USERS,n.data.data.users),e.commit(De.MUTATIONS.UPDATE_USERS_PAGINATION,n.data.pagination)):Ee(e,null)}).catch(n=>Ee(e,n)).finally(()=>e.commit(De.MUTATIONS.UPDATE_USERS_LOADING,!1))},[De.ACTIONS.UPDATE_USER](e,t){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),e.commit(De.MUTATIONS.UPDATE_IS_SUCCESS,!1);const n={};t.admin!==void 0&&(n.admin=t.admin),t.resetPassword&&(n.reset_password=t.resetPassword),t.activate&&(n.activate=t.activate),t.new_email!==void 0&&(n.new_email=t.new_email),je.patch(`users/${t.username}`,n).then(r=>{r.data.status==="success"?(e.commit(De.MUTATIONS.UPDATE_USER_IN_USERS,r.data.data.users[0]),(t.resetPassword||t.new_email)&&e.commit(De.MUTATIONS.UPDATE_IS_SUCCESS,!0),(t.activate||t.new_email)&&e.commit(De.MUTATIONS.UPDATE_USER,r.data.data.users[0])):Ee(e,null)}).catch(r=>Ee(e,r)).finally(()=>e.commit(De.MUTATIONS.UPDATE_USERS_LOADING,!1))},[De.ACTIONS.DELETE_USER_ACCOUNT](e,t){iA(e,{username:t.username,fromAdmin:!0})}},io=e=>{localStorage.removeItem("authToken"),e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),e.commit(Br.MUTATIONS.EMPTY_USER_STATS),e.commit(K.MUTATIONS.CLEAR_AUTH_USER_TOKEN),e.commit(De.MUTATIONS.UPDATE_USERS,[]),e.commit(Ae.MUTATIONS.EMPTY_WORKOUTS),e.commit(Ae.MUTATIONS.EMPTY_WORKOUT),vt.push("/login")},eOe={[K.ACTIONS.CHECK_AUTH_USER](e){window.localStorage.authToken&&!e.getters[K.GETTERS.IS_AUTHENTICATED]&&(e.commit(K.MUTATIONS.UPDATE_AUTH_TOKEN,window.localStorage.authToken),e.dispatch(K.ACTIONS.GET_USER_PROFILE,!0)),!window.localStorage.authToken&&e.getters[K.GETTERS.IS_AUTHENTICATED]&&io(e)},[K.ACTIONS.CONFIRM_ACCOUNT](e,t){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),Pr.post("auth/account/confirm",{token:t.token}).then(n=>{if(n.data.status==="success"){const r=n.data.auth_token;window.localStorage.setItem("authToken",r),e.commit(K.MUTATIONS.UPDATE_AUTH_TOKEN,r),e.dispatch(K.ACTIONS.GET_USER_PROFILE).then(()=>vt.push("/"))}else Ee(e,null)}).catch(n=>{Ee(e,n)})},[K.ACTIONS.CONFIRM_EMAIL](e,t){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),e.commit(K.MUTATIONS.UPDATE_IS_SUCCESS,!1),Pr.post("/auth/email/update",{token:t.token}).then(n=>{n.data.status==="success"?(e.commit(K.MUTATIONS.UPDATE_IS_SUCCESS,!0),t.refreshUser&&e.dispatch(K.ACTIONS.GET_USER_PROFILE).then(()=>vt.push("/profile/edit/account")),vt.push("/profile/edit/account")):Ee(e,null)}).catch(n=>{Ee(e,n)})},[K.ACTIONS.GET_USER_PROFILE](e,t=!1){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),je.get("auth/profile").then(n=>{if(n.data.status==="success"){const r=e.getters[K.GETTERS.IS_PROFILE_NOT_LOADED];e.commit(K.MUTATIONS.UPDATE_AUTH_USER_PROFILE,n.data.data),n.data.data.accepted_privacy_policy||e.dispatch(H.ACTIONS.GET_APPLICATION_PRIVACY_POLICY),(r||t)&&(n.data.data.language&&e.dispatch(H.ACTIONS.UPDATE_APPLICATION_LANGUAGE,n.data.data.language),e.commit(H.MUTATIONS.UPDATE_DARK_MODE,n.data.data.use_dark_mode)),e.dispatch(Mt.ACTIONS.GET_SPORTS)}else Ee(e,null),io(e)}).catch(n=>{n.message!=="canceled"&&(Ee(e,n),io(e))})},[K.ACTIONS.LOGIN_OR_REGISTER](e,t){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),e.commit(K.MUTATIONS.UPDATE_IS_REGISTRATION_SUCCESS,!1),Pr.post(`/auth/${t.actionType}`,t.formData).then(n=>{if(n.data.status==="success")if(t.actionType==="login"){const r=n.data.auth_token;window.localStorage.setItem("authToken",r),e.commit(K.MUTATIONS.UPDATE_AUTH_TOKEN,r),e.dispatch(K.ACTIONS.GET_USER_PROFILE,!0).then(()=>vt.push(typeof t.redirectUrl=="string"?t.redirectUrl:"/"))}else vt.push("/login").then(()=>e.commit(K.MUTATIONS.UPDATE_IS_REGISTRATION_SUCCESS,!0));else Ee(e,null)}).catch(n=>Ee(e,n))},[K.ACTIONS.LOGOUT](e){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),je.post("auth/logout").then(t=>{t.data.status==="success"?io(e):Ee(e,null)}).catch(t=>Ee(e,t))},[K.ACTIONS.UPDATE_USER_PROFILE](e,t){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),e.commit(K.MUTATIONS.UPDATE_USER_LOADING,!0),je.post("auth/profile/edit",t).then(n=>{n.data.status==="success"?(e.commit(K.MUTATIONS.UPDATE_AUTH_USER_PROFILE,n.data.data),vt.push("/profile")):Ee(e,null)}).catch(n=>Ee(e,n)).finally(()=>e.commit(K.MUTATIONS.UPDATE_USER_LOADING,!1))},[K.ACTIONS.UPDATE_USER_ACCOUNT](e,t){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),e.commit(K.MUTATIONS.UPDATE_USER_LOADING,!0),e.commit(K.MUTATIONS.UPDATE_IS_SUCCESS,!1),je.patch("auth/profile/edit/account",t).then(n=>{n.data.status==="success"?(e.commit(K.MUTATIONS.UPDATE_AUTH_USER_PROFILE,n.data.data),e.commit(K.MUTATIONS.UPDATE_IS_SUCCESS,!0)):Ee(e,null)}).catch(n=>Ee(e,n)).finally(()=>e.commit(K.MUTATIONS.UPDATE_USER_LOADING,!1))},[K.ACTIONS.UPDATE_USER_PREFERENCES](e,t){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),e.commit(K.MUTATIONS.UPDATE_USER_LOADING,!0),je.post("auth/profile/edit/preferences",t).then(n=>{n.data.status==="success"?(e.commit(K.MUTATIONS.UPDATE_AUTH_USER_PROFILE,n.data.data),e.commit(H.MUTATIONS.UPDATE_DARK_MODE,n.data.data.use_dark_mode),e.dispatch(H.ACTIONS.UPDATE_APPLICATION_LANGUAGE,n.data.data.language).then(()=>vt.push("/profile/preferences"))):Ee(e,null)}).catch(n=>Ee(e,n)).finally(()=>e.commit(K.MUTATIONS.UPDATE_USER_LOADING,!1))},[K.ACTIONS.RESET_USER_SPORT_PREFERENCES](e,t){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),e.commit(K.MUTATIONS.UPDATE_USER_LOADING,!0),je.delete(`auth/profile/reset/sports/${t}`).then(n=>{n.status===204?e.dispatch(Mt.ACTIONS.GET_SPORTS):Ee(e,null)}).catch(n=>{Ee(e,n),e.commit(K.MUTATIONS.UPDATE_USER_LOADING,!1)})},[K.ACTIONS.UPDATE_USER_SPORT_PREFERENCES](e,t){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),e.commit(K.MUTATIONS.UPDATE_USER_LOADING,!0),je.post("auth/profile/edit/sports",t).then(n=>{n.data.status==="success"?e.dispatch(Mt.ACTIONS.GET_SPORTS):Ee(e,null)}).catch(n=>{Ee(e,n),e.commit(K.MUTATIONS.UPDATE_USER_LOADING,!1)})},[K.ACTIONS.UPDATE_USER_PICTURE](e,t){if(e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),e.commit(K.MUTATIONS.UPDATE_USER_LOADING,!0),!t.picture)throw new Error("No file part");const n=new FormData;n.append("file",t.picture),je.post("auth/picture",n,{headers:{"content-type":"multipart/form-data"}}).then(r=>{r.data.status==="success"?e.dispatch(K.ACTIONS.GET_USER_PROFILE).then(()=>vt.push("/profile")):Ee(e,null)}).catch(r=>Ee(e,r)).finally(()=>e.commit(K.MUTATIONS.UPDATE_USER_LOADING,!1))},[K.ACTIONS.DELETE_ACCOUNT](e,t){iA(e,t)},[K.ACTIONS.DELETE_PICTURE](e){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),e.commit(K.MUTATIONS.UPDATE_USER_LOADING,!0),je.delete("auth/picture").then(t=>{t.status===204?e.dispatch(K.ACTIONS.GET_USER_PROFILE).then(()=>vt.push("/profile")):Ee(e,null)}).catch(t=>Ee(e,t)).finally(()=>e.commit(K.MUTATIONS.UPDATE_USER_LOADING,!1))},[K.ACTIONS.SEND_PASSWORD_RESET_REQUEST](e,t){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),Pr.post("auth/password/reset-request",t).then(n=>{n.data.status==="success"?vt.push("/password-reset/sent"):Ee(e,null)}).catch(n=>Ee(e,n))},[K.ACTIONS.RESEND_ACCOUNT_CONFIRMATION_EMAIL](e,t){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),Pr.post("auth/account/resend-confirmation",t).then(n=>{n.data.status==="success"?vt.push("/account-confirmation/email-sent"):Ee(e,null)}).catch(n=>Ee(e,n))},[K.ACTIONS.RESET_USER_PASSWORD](e,t){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),Pr.post("auth/password/update",t).then(n=>{n.data.status==="success"?vt.push("/password-reset/password-updated"):Ee(e,null)}).catch(n=>Ee(e,n))},[K.ACTIONS.ACCEPT_PRIVACY_POLICY](e,t){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),je.post("auth/account/privacy-policy",{accepted_policy:t}).then(n=>{n.data.status==="success"?e.dispatch(K.ACTIONS.GET_USER_PROFILE).then(()=>vt.push("/profile")):Ee(e,null)}).catch(n=>Ee(e,n))},[K.ACTIONS.REQUEST_DATA_EXPORT](e){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),je.post("auth/account/export/request").then(t=>{t.data.status==="success"?e.commit(K.MUTATIONS.SET_EXPORT_REQUEST,t.data.request):Ee(e,null)}).catch(t=>Ee(e,t))},[K.ACTIONS.GET_REQUEST_DATA_EXPORT](e){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),je.get("auth/account/export").then(t=>{t.data.status==="success"?e.commit(K.MUTATIONS.SET_EXPORT_REQUEST,t.data.request):Ee(e,null)}).catch(t=>Ee(e,t))}},tOe={[K.GETTERS.AUTH_TOKEN]:e=>e.authToken,[K.GETTERS.AUTH_USER_PROFILE]:e=>e.authUserProfile,[K.GETTERS.EXPORT_REQUEST]:e=>e.exportRequest,[K.GETTERS.IS_AUTHENTICATED]:e=>e.authToken!==null,[K.GETTERS.IS_ADMIN]:e=>e.authUserProfile&&e.authUserProfile.admin,[K.GETTERS.IS_REGISTRATION_SUCCESS]:e=>e.isRegistrationSuccess,[K.GETTERS.IS_SUCCESS]:e=>e.isSuccess,[K.GETTERS.USER_LOADING]:e=>e.loading,[K.GETTERS.IS_PROFILE_NOT_LOADED]:e=>e.authUserProfile.username===void 0},nOe={[K.MUTATIONS.CLEAR_AUTH_USER_TOKEN](e){e.authToken=null,e.authUserProfile={}},[K.MUTATIONS.UPDATE_AUTH_TOKEN](e,t){e.authToken=t},[K.MUTATIONS.UPDATE_AUTH_USER_PROFILE](e,t){e.authUserProfile=t},[K.MUTATIONS.UPDATE_IS_REGISTRATION_SUCCESS](e,t){e.isRegistrationSuccess=t},[K.MUTATIONS.UPDATE_IS_SUCCESS](e,t){e.isSuccess=t},[K.MUTATIONS.UPDATE_USER_LOADING](e,t){e.loading=t},[K.MUTATIONS.SET_EXPORT_REQUEST](e,t){e.exportRequest=t}},rOe={authToken:null,authUserProfile:{},isSuccess:!1,isRegistrationSuccess:!1,loading:!1,exportRequest:null},aOe={state:rOe,actions:eOe,getters:tOe,mutations:nOe},WE=(e,t)=>{e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),je.get(t).then(n=>{n.data.status==="success"?e.commit(Ye.MUTATIONS.SET_CLIENT,n.data.data.client):Ee(e,null)}).catch(n=>Ee(e,n))},sOe={[Ye.ACTIONS.AUTHORIZE_CLIENT](e,t){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES);const n=new FormData;n.set("client_id",t.client_id),n.set("response_type",t.response_type),n.set("scope",t.scope),n.set("confirm","true"),t.state&&n.set("state",t.state),t.code_challenge&&n.set("code_challenge",t.code_challenge),t.code_challenge_method&&n.set("code_challenge_method",t.code_challenge_method),je.post("oauth/authorize",n,{headers:{"Content-Type":"multipart/form-data"}}).then(r=>{r.status==200&&r.data.redirect_url?window.location.href=r.data.redirect_url:Ee(e,null)}).catch(r=>Ee(e,r))},[Ye.ACTIONS.CREATE_CLIENT](e,t){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),je.post("oauth/apps",t).then(n=>{n.data.status==="created"?(e.commit(Ye.MUTATIONS.SET_CLIENT,n.data.data.client),vt.push(`/profile/apps/${n.data.data.client.id}/created`)):Ee(e,null)}).catch(n=>Ee(e,n))},[Ye.ACTIONS.DELETE_CLIENT](e,t){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),je.delete(`oauth/apps/${t}`).then(n=>{n.status===204?e.dispatch(Ye.ACTIONS.GET_CLIENTS).then(()=>vt.push("/profile/apps")):Ee(e,null)}).catch(n=>Ee(e,n))},[Ye.ACTIONS.GET_CLIENT_BY_CLIENT_ID](e,t){WE(e,`oauth/apps/${t}`)},[Ye.ACTIONS.GET_CLIENT_BY_ID](e,t){WE(e,`oauth/apps/${t}/by_id`)},[Ye.ACTIONS.GET_CLIENTS](e,t){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),je.get("oauth/apps",{params:t}).then(n=>{n.data.status==="success"?(e.commit(Ye.MUTATIONS.SET_CLIENTS,n.data.data.clients),e.commit(Ye.MUTATIONS.SET_CLIENTS_PAGINATION,n.data.pagination)):Ee(e,null)}).catch(n=>Ee(e,n))},[Ye.ACTIONS.REVOKE_ALL_TOKENS](e,t){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),e.commit(Ye.MUTATIONS.SET_REVOCATION_SUCCESSFUL,!1),je.post(`oauth/apps/${t}/revoke`).then(n=>{n.data.status==="success"?e.commit(Ye.MUTATIONS.SET_REVOCATION_SUCCESSFUL,!0):Ee(e,null)}).catch(n=>Ee(e,n))}},iOe={[Ye.GETTERS.CLIENT]:e=>e.client,[Ye.GETTERS.CLIENTS]:e=>e.clients,[Ye.GETTERS.CLIENTS_PAGINATION]:e=>e.pagination,[Ye.GETTERS.REVOCATION_SUCCESSFUL]:e=>e.revocationSuccessful},oOe={[Ye.MUTATIONS.SET_CLIENT](e,t){e.client=t},[Ye.MUTATIONS.EMPTY_CLIENT](e){e.client={}},[Ye.MUTATIONS.SET_CLIENTS](e,t){e.clients=t},[Ye.MUTATIONS.SET_CLIENTS_PAGINATION](e,t){e.pagination=t},[Ye.MUTATIONS.SET_REVOCATION_SUCCESSFUL](e,t){e.revocationSuccessful=t}},uOe={client:{},clients:[],pagination:{},revocationSuccessful:!1},cOe={state:uOe,actions:sOe,getters:iOe,mutations:oOe},{locale:lOe}=_a.global,dOe={[H.ACTIONS.GET_APPLICATION_CONFIG](e){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),e.commit(H.MUTATIONS.UPDATE_APPLICATION_LOADING,!0),je.get("config").then(t=>{t.data.status==="success"?e.commit(H.MUTATIONS.UPDATE_APPLICATION_CONFIG,t.data.data):Ee(e,null)}).catch(t=>Ee(e,t)).finally(()=>e.commit(H.MUTATIONS.UPDATE_APPLICATION_LOADING,!1))},[H.ACTIONS.GET_APPLICATION_STATS](e){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),je.get("stats/all").then(t=>{t.data.status==="success"?e.commit(H.MUTATIONS.UPDATE_APPLICATION_STATS,t.data.data):Ee(e,null)}).catch(t=>Ee(e,t))},[H.ACTIONS.GET_APPLICATION_PRIVACY_POLICY](e){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),je.get("config").then(t=>{t.data.status==="success"?e.commit(H.MUTATIONS.UPDATE_APPLICATION_PRIVACY_POLICY,t.data.data):Ee(e,null)}).catch(t=>Ee(e,t))},[H.ACTIONS.UPDATE_APPLICATION_CONFIG](e,t){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),je.patch("config",t).then(n=>{n.data.status==="success"?(e.commit(H.MUTATIONS.UPDATE_APPLICATION_CONFIG,n.data.data),vt.push("/admin/application")):Ee(e,null)}).catch(n=>Ee(e,n))},[H.ACTIONS.UPDATE_APPLICATION_LANGUAGE](e,t){var n;(n=document.querySelector("html"))==null||n.setAttribute("lang",t),e.commit(H.MUTATIONS.UPDATE_LANG,t),lOe.value=t}},fOe={[H.GETTERS.APP_CONFIG]:e=>e.application.config,[H.GETTERS.APP_LOADING]:e=>e.appLoading,[H.GETTERS.APP_STATS]:e=>e.application.statistics,[H.GETTERS.DARK_MODE]:e=>e.darkMode,[H.GETTERS.ERROR_MESSAGES]:e=>e.errorMessages,[H.GETTERS.LANGUAGE]:e=>e.language,[H.GETTERS.LOCALE]:e=>e.locale},pOe={[H.MUTATIONS.EMPTY_ERROR_MESSAGES](e){e.errorMessages=null},[H.MUTATIONS.SET_ERROR_MESSAGES](e,t){e.errorMessages=t},[H.MUTATIONS.UPDATE_APPLICATION_CONFIG](e,t){e.application.config=t},[H.MUTATIONS.UPDATE_APPLICATION_LOADING](e,t){e.appLoading=t},[H.MUTATIONS.UPDATE_APPLICATION_PRIVACY_POLICY](e,t){e.application.config.privacy_policy=t.privacy_policy,e.application.config.privacy_policy_date=t.privacy_policy_date},[H.MUTATIONS.UPDATE_APPLICATION_STATS](e,t){e.application.statistics=t},[H.MUTATIONS.UPDATE_LANG](e,t){e.language=t,e.locale=bi[t]},[H.MUTATIONS.UPDATE_DARK_MODE](e,t){e.darkMode=t}},mOe={root:!0,language:"en",locale:nc,errorMessages:null,application:{statistics:{sports:0,uploads_dir_size:0,users:0,workouts:0}},appLoading:!1,darkMode:null},EOe={[Mt.ACTIONS.GET_SPORTS](e){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),je.get("sports").then(t=>{t.data.status==="success"?(e.commit(Mt.MUTATIONS.SET_SPORTS,t.data.data.sports),e.commit(K.MUTATIONS.UPDATE_USER_LOADING,!1)):Ee(e,null)}).catch(t=>Ee(e,t))},[Mt.ACTIONS.UPDATE_SPORTS](e,t){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),je.patch(`sports/${t.id}`,{is_active:t.isActive}).then(n=>{n.data.status==="success"?e.dispatch(Mt.ACTIONS.GET_SPORTS):Ee(e,null)}).catch(n=>Ee(e,n))}},hOe={[Mt.GETTERS.SPORTS]:e=>e.sports},_Oe={[Mt.MUTATIONS.SET_SPORTS](e,t){e.sports=t}},TOe={sports:[]},gOe={state:TOe,actions:EOe,getters:hOe,mutations:_Oe},AOe={[Br.ACTIONS.GET_USER_STATS](e,t){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),je.get(`stats/${t.username}/${t.filterType}`,{params:t.params}).then(n=>{n.data.status==="success"?e.commit(Br.MUTATIONS.UPDATE_USER_STATS,n.data.data.statistics):Ee(e,null)}).catch(n=>Ee(e,n))}},SOe={[Br.GETTERS.USER_STATS]:e=>e.statistics},OOe={[Br.MUTATIONS.UPDATE_USER_STATS](e,t){e.statistics=t},[Br.MUTATIONS.EMPTY_USER_STATS](e){e.statistics={}}},IOe={statistics:{}},vOe={state:IOe,actions:AOe,getters:SOe,mutations:OOe},ROe={[De.GETTERS.USER]:e=>e.user,[De.GETTERS.USERS]:e=>e.users,[De.GETTERS.USERS_IS_SUCCESS]:e=>e.isSuccess,[De.GETTERS.USERS_LOADING]:e=>e.loading,[De.GETTERS.USERS_PAGINATION]:e=>e.pagination},bOe={[De.MUTATIONS.UPDATE_USER](e,t){e.user=t},[De.MUTATIONS.UPDATE_USER_IN_USERS](e,t){e.users=e.users.map(n=>n.username===t.username?t:n)},[De.MUTATIONS.UPDATE_USERS](e,t){e.users=t},[De.MUTATIONS.UPDATE_USERS_LOADING](e,t){e.loading=t},[De.MUTATIONS.UPDATE_USERS_PAGINATION](e,t){e.pagination=t},[De.MUTATIONS.UPDATE_IS_SUCCESS](e,t){e.isSuccess=t}},NOe={user:{},users:[],loading:!1,isSuccess:!1,pagination:{}},COe={state:NOe,actions:JSe,getters:ROe,mutations:bOe},oo=(e,t,n)=>{e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),je.get("workouts",{params:t}).then(r=>{r.data.status==="success"?(e.commit(Ae.MUTATIONS[n],r.data.data.workouts),n===sa.SET_USER_WORKOUTS&&e.commit(Ae.MUTATIONS.SET_WORKOUTS_PAGINATION,r.data.pagination)):Ee(e,null)}).catch(r=>Ee(e,r))},yOe={[Ae.ACTIONS.GET_CALENDAR_WORKOUTS](e,t){e.commit(Ae.MUTATIONS.EMPTY_CALENDAR_WORKOUTS),oo(e,t,sa.SET_CALENDAR_WORKOUTS)},[Ae.ACTIONS.GET_USER_WORKOUTS](e,t){oo(e,t,sa.SET_USER_WORKOUTS)},[Ae.ACTIONS.GET_TIMELINE_WORKOUTS](e,t){oo(e,t,sa.SET_TIMELINE_WORKOUTS)},[Ae.ACTIONS.GET_MORE_TIMELINE_WORKOUTS](e,t){oo(e,t,sa.ADD_TIMELINE_WORKOUTS)},[Ae.ACTIONS.GET_WORKOUT_DATA](e,t){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),e.commit(Ae.MUTATIONS.SET_WORKOUT_LOADING,!0);const n=t.segmentId?`/segment/${t.segmentId}`:"";je.get(`workouts/${t.workoutId}`).then(r=>{const a=r.data.data.workouts[0];if(r.data.status==="success"){if(t.segmentId&&(a.segments.length===0||!a.segments[+t.segmentId-1]))throw new Error("WORKOUT_NOT_FOUND");e.commit(Ae.MUTATIONS.SET_WORKOUT,r.data.data.workouts[0]),r.data.data.workouts[0].with_gpx&&(je.get(`workouts/${t.workoutId}/chart_data${n}`).then(s=>{s.data.status==="success"&&e.commit(Ae.MUTATIONS.SET_WORKOUT_CHART_DATA,s.data.data.chart_data)}),je.get(`workouts/${t.workoutId}/gpx${n}`).then(s=>{s.data.status==="success"&&e.commit(Ae.MUTATIONS.SET_WORKOUT_GPX,s.data.data.gpx)}))}else e.commit(Ae.MUTATIONS.EMPTY_WORKOUT),Ee(e,null)}).catch(r=>{e.commit(Ae.MUTATIONS.EMPTY_WORKOUT),Ee(e,r)}).finally(()=>e.commit(Ae.MUTATIONS.SET_WORKOUT_LOADING,!1))},[Ae.ACTIONS.DELETE_WORKOUT](e,t){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),e.commit(Ae.MUTATIONS.SET_WORKOUT_LOADING,!0),je.delete(`workouts/${t.workoutId}`).then(()=>{e.commit(Ae.MUTATIONS.EMPTY_WORKOUT),e.dispatch(K.ACTIONS.GET_USER_PROFILE),vt.push("/")}).catch(n=>{Ee(e,n)}).finally(()=>e.commit(Ae.MUTATIONS.SET_WORKOUT_LOADING,!1))},[Ae.ACTIONS.EDIT_WORKOUT](e,t){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),e.commit(Ae.MUTATIONS.SET_WORKOUT_LOADING,!0),je.patch(`workouts/${t.workoutId}`,t.data).then(()=>{e.dispatch(K.ACTIONS.GET_USER_PROFILE),e.dispatch(Ae.ACTIONS.GET_WORKOUT_DATA,{workoutId:t.workoutId}).then(()=>{vt.push({name:"Workout",params:{workoutId:t.workoutId}})})}).catch(n=>{Ee(e,n)}).finally(()=>e.commit(Ae.MUTATIONS.SET_WORKOUT_LOADING,!1))},[Ae.ACTIONS.ADD_WORKOUT](e,t){if(e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),e.commit(Ae.MUTATIONS.SET_WORKOUT_LOADING,!0),!t.file)throw new Error("No file part");const n=t.notes.replace(/"/g,'\\"'),r=new FormData;r.append("file",t.file),r.append("data",`{"sport_id": ${t.sport_id}, "notes": "${n}"}`),je.post("workouts",r,{headers:{"content-type":"multipart/form-data"}}).then(a=>{if(a.data.status==="created"){e.dispatch(K.ACTIONS.GET_USER_PROFILE);const s=a.data.data.workouts[0];vt.push(a.data.data.workouts.length===1?`/workouts/${s.id}`:"/")}}).catch(a=>{Ee(e,a)}).finally(()=>e.commit(Ae.MUTATIONS.SET_WORKOUT_LOADING,!1))},[Ae.ACTIONS.ADD_WORKOUT_WITHOUT_GPX](e,t){e.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),e.commit(Ae.MUTATIONS.SET_WORKOUT_LOADING,!0),je.post("workouts/no_gpx",t).then(n=>{if(n.data.status==="created"){e.dispatch(K.ACTIONS.GET_USER_PROFILE);const r=n.data.data.workouts[0];vt.push(`/workouts/${r.id}`)}}).catch(n=>{Ee(e,n)}).finally(()=>e.commit(Ae.MUTATIONS.SET_WORKOUT_LOADING,!1))}},DOe={[Ae.GETTERS.CALENDAR_WORKOUTS]:e=>e.calendar_workouts,[Ae.GETTERS.TIMELINE_WORKOUTS]:e=>e.timeline_workouts,[Ae.GETTERS.USER_WORKOUTS]:e=>e.user_workouts,[Ae.GETTERS.WORKOUT_DATA]:e=>e.workoutData,[Ae.GETTERS.WORKOUTS_PAGINATION]:e=>e.pagination},POe={[Ae.MUTATIONS.ADD_TIMELINE_WORKOUTS](e,t){e.timeline_workouts=e.timeline_workouts.concat(t)},[Ae.MUTATIONS.SET_CALENDAR_WORKOUTS](e,t){e.calendar_workouts=t},[Ae.MUTATIONS.SET_TIMELINE_WORKOUTS](e,t){e.timeline_workouts=t},[Ae.MUTATIONS.SET_USER_WORKOUTS](e,t){e.user_workouts=t},[Ae.MUTATIONS.SET_WORKOUTS_PAGINATION](e,t){e.pagination=t},[Ae.MUTATIONS.SET_WORKOUT](e,t){e.workoutData.workout=t},[Ae.MUTATIONS.SET_WORKOUT_CHART_DATA](e,t){e.workoutData.chartData=t},[Ae.MUTATIONS.SET_WORKOUT_GPX](e,t){e.workoutData.gpx=t},[Ae.MUTATIONS.SET_WORKOUT_LOADING](e,t){e.workoutData.loading=t},[Ae.MUTATIONS.EMPTY_CALENDAR_WORKOUTS](e){e.calendar_workouts=[]},[Ae.MUTATIONS.EMPTY_WORKOUTS](e){e.calendar_workouts=[],e.user_workouts=[],e.timeline_workouts=[]},[Ae.MUTATIONS.EMPTY_WORKOUT](e){e.workoutData={gpx:"",loading:!1,workout:{},chartData:[]}}},wOe={calendar_workouts:[],timeline_workouts:[],pagination:{},user_workouts:[],workoutData:{gpx:"",loading:!1,workout:{},chartData:[]}},LOe={state:wOe,actions:yOe,getters:DOe,mutations:POe},$Oe={authUserModule:aOe,oAuthModule:cOe,sportsModule:gOe,statsModule:vOe,usersModule:COe,workoutsModule:LOe},kOe={state:mOe,actions:dOe,getters:fOe,mutations:pOe,modules:$Oe},Bs=Nb(kOe),u0=yt.create({baseURL:Si()});u0.interceptors.request.use(e=>{const t=new AbortController;e.signal=t.signal;const n=is(e);zs.set(n,t);const r=Bs.getters[K.GETTERS.AUTH_TOKEN];if(r){const a=`Bearer ${r}`;e.headers&&e.headers.Authorization!==a&&(e.headers.Authorization=`Bearer ${r}`)}return e},e=>Promise.reject(e));u0.interceptors.response.use(e=>(is(e.config),e),e=>(e.message!=="canceled"&&e.response&&is(e.response.config),Promise.reject(e)));const je=u0,Ld=(e,t)=>e.push.apply(e,t),os=e=>e.sort((t,n)=>t.i-n.i||t.j-n.j),GE=e=>{const t={};let n=1;return e.forEach(r=>{t[r]=n,n+=1}),t};var UOe={4:[[1,2],[2,3]],5:[[1,3],[2,3],[2,4]],6:[[1,2],[2,4],[4,5]],7:[[1,3],[2,3],[4,5],[4,6]],8:[[2,4],[4,6]]};const zE=2050,BE=1e3,MOe=UOe,xOe=10,FOe=1e4,oA=10,uA=50,cA=20,lA=/^[A-Z\xbf-\xdf][^A-Z\xbf-\xdf]+$/,WOe=/^[^A-Z\xbf-\xdf]+[A-Z\xbf-\xdf]$/,GOe=/^[A-Z\xbf-\xdf]+$/,dA=/^[^a-z\xdf-\xff]+$/,zOe=/^[a-z\xdf-\xff]+$/,BOe=/^[^A-Z\xbf-\xdf]+$/,HOe=/[a-z\xdf-\xff]/,VOe=/[A-Z\xbf-\xdf]/,jOe=/[^A-Za-z\xbf-\xdf]/gi,KOe=/^\d+$/,c0=new Date().getFullYear(),YOe={recentYear:/19\d\d|200\d|201\d|202\d/g},fA=[" ",",",";",":","|","/","\\","_",".","-"],qOe=fA.length;class XOe{match({password:t}){const n=[...this.getMatchesWithoutSeparator(t),...this.getMatchesWithSeparator(t)],r=this.filterNoise(n);return os(r)}getMatchesWithSeparator(t){const n=[],r=/^(\d{1,4})([\s/\\_.-])(\d{1,2})\2(\d{1,4})$/;for(let a=0;a<=Math.abs(t.length-6);a+=1)for(let s=a+5;s<=a+9&&!(s>=t.length);s+=1){const i=t.slice(a,+s+1||9e9),o=r.exec(i);if(o!=null){const u=this.mapIntegersToDayMonthYear([parseInt(o[1],10),parseInt(o[3],10),parseInt(o[4],10)]);u!=null&&n.push({pattern:"date",token:i,i:a,j:s,separator:o[2],year:u.year,month:u.month,day:u.day})}}return n}getMatchesWithoutSeparator(t){const n=[],r=/^\d{4,8}$/,a=s=>Math.abs(s.year-c0);for(let s=0;s<=Math.abs(t.length-4);s+=1)for(let i=s+3;i<=s+7&&!(i>=t.length);i+=1){const o=t.slice(s,+i+1||9e9);if(r.exec(o)){const u=[],l=o.length;if(MOe[l].forEach(([f,d])=>{const m=this.mapIntegersToDayMonthYear([parseInt(o.slice(0,f),10),parseInt(o.slice(f,d),10),parseInt(o.slice(d),10)]);m!=null&&u.push(m)}),u.length>0){let f=u[0],d=a(u[0]);u.slice(1).forEach(m=>{const E=a(m);E{let r=!1;const a=t.length;for(let s=0;s=n.j){r=!0;break}}return!r})}mapIntegersToDayMonthYear(t){if(t[1]>31||t[1]<=0)return null;let n=0,r=0,a=0;for(let s=0,i=t.length;s99&&ozE)return null;o>31&&(r+=1),o>12&&(n+=1),o<=0&&(a+=1)}return r>=2||n===3||a>=2?null:this.getDayMonth(t)}getDayMonth(t){const n=[[t[2],t.slice(0,2)],[t[0],t.slice(1,3)]],r=n.length;for(let a=0;a=1&&s<=31&&i>=1&&i<=12)return{day:s,month:i}}return null}twoToFourDigitYear(t){return t>99?t:t>50?t+1900:t+2e3}}const ir=new Uint32Array(65536),ZOe=(e,t)=>{const n=e.length,r=t.length,a=1<{const n=t.length,r=e.length,a=[],s=[],i=Math.ceil(n/32),o=Math.ceil(r/32);for(let E=0;E>>b&1,C=a[b/32|0]>>>b&1,P=S|E,M=((S|C)&I)+I^I|S|C;let w=E|~(M|I),G=I&M;w>>>31^O&&(s[b/32|0]^=1<>>31^C&&(a[b/32|0]^=1<>>E&1,v=a[E/32|0]>>>E&1,b=I|l,S=((I|v)&c)+c^c|I|v;let O=l|~(S|c),C=c&S;m+=O>>>r-1&1,m-=C>>>r-1&1,O>>>31^R&&(s[E/32|0]^=1<>>31^v&&(a[E/32|0]^=1<{if(e.length{const r=e.length<=t.length,a=e.length<=n;return r||a?Math.ceil(e.length/4):n},tIe=(e,t,n)=>{let r=0;const a=Object.keys(t).find(s=>{const i=eIe(e,s,n);if(Math.abs(e.length-s.length)>i)return!1;const o=JOe(e,s),u=o<=i;return u&&(r=o),u});return a?{levenshteinDistance:r,levenshteinDistanceEntry:a}:{}};var HE={a:["4","@"],b:["8"],c:["(","{","[","<"],d:["6","|)"],e:["3"],f:["#"],g:["6","9","&"],h:["#","|-|"],i:["1","!","|"],k:["<","|<"],l:["!","1","|","7"],m:["^^","nn","2n","/\\\\/\\\\"],n:["//"],o:["0","()"],q:["9"],u:["|_|"],s:["$","5"],t:["+","7"],v:["<",">","/"],w:["^/","uu","vv","2u","2v","\\\\/\\\\/"],x:["%","><"],z:["2"]},cl={warnings:{straightRow:"straightRow",keyPattern:"keyPattern",simpleRepeat:"simpleRepeat",extendedRepeat:"extendedRepeat",sequences:"sequences",recentYears:"recentYears",dates:"dates",topTen:"topTen",topHundred:"topHundred",common:"common",similarToCommon:"similarToCommon",wordByItself:"wordByItself",namesByThemselves:"namesByThemselves",commonNames:"commonNames",userInputs:"userInputs",pwned:"pwned"},suggestions:{l33t:"l33t",reverseWords:"reverseWords",allUppercase:"allUppercase",capitalization:"capitalization",dates:"dates",recentYears:"recentYears",associatedYears:"associatedYears",sequences:"sequences",repeated:"repeated",longerKeyboardPattern:"longerKeyboardPattern",anotherWord:"anotherWord",useWords:"useWords",noNeed:"noNeed",pwned:"pwned"},timeEstimation:{ltSecond:"ltSecond",second:"second",seconds:"seconds",minute:"minute",minutes:"minutes",hour:"hour",hours:"hours",day:"day",days:"days",month:"month",months:"months",year:"year",years:"years",centuries:"centuries"}};class fi{constructor(t=[]){this.parents=t,this.children=new Map}addSub(t,...n){const r=t.charAt(0);this.children.has(r)||this.children.set(r,new fi([...this.parents,r]));let a=this.children.get(r);for(let s=1;s(Object.entries(e).forEach(([n,r])=>{r.forEach(a=>{t.addSub(a,n)})}),t);class nIe{constructor(){this.matchers={},this.l33tTable=HE,this.trieNodeRoot=VE(HE,new fi),this.dictionary={userInputs:[]},this.rankedDictionaries={},this.rankedDictionariesMaxWordSize={},this.translations=cl,this.graphs={},this.useLevenshteinDistance=!1,this.levenshteinThreshold=2,this.l33tMaxSubstitutions=100,this.maxLength=256,this.setRankedDictionaries()}setOptions(t={}){t.l33tTable&&(this.l33tTable=t.l33tTable,this.trieNodeRoot=VE(t.l33tTable,new fi)),t.dictionary&&(this.dictionary=t.dictionary,this.setRankedDictionaries()),t.translations&&this.setTranslations(t.translations),t.graphs&&(this.graphs=t.graphs),t.useLevenshteinDistance!==void 0&&(this.useLevenshteinDistance=t.useLevenshteinDistance),t.levenshteinThreshold!==void 0&&(this.levenshteinThreshold=t.levenshteinThreshold),t.l33tMaxSubstitutions!==void 0&&(this.l33tMaxSubstitutions=t.l33tMaxSubstitutions),t.maxLength!==void 0&&(this.maxLength=t.maxLength)}setTranslations(t){if(this.checkCustomTranslations(t))this.translations=t;else throw new Error("Invalid translations object fallback to keys")}checkCustomTranslations(t){let n=!0;return Object.keys(cl).forEach(r=>{if(r in t){const a=r;Object.keys(cl[a]).forEach(s=>{s in t[a]||(n=!1)})}else n=!1}),n}setRankedDictionaries(){const t={},n={};Object.keys(this.dictionary).forEach(r=>{t[r]=GE(this.dictionary[r]),n[r]=this.getRankedDictionariesMaxWordSize(this.dictionary[r])}),this.rankedDictionaries=t,this.rankedDictionariesMaxWordSize=n}getRankedDictionariesMaxWordSize(t){const n=t.map(r=>typeof r!="string"?r.toString().length:r.length);return n.length===0?0:n.reduce((r,a)=>Math.max(r,a),-1/0)}buildSanitizedRankedDictionary(t){const n=[];return t.forEach(r=>{const a=typeof r;(a==="string"||a==="number"||a==="boolean")&&n.push(r.toString().toLowerCase())}),GE(n)}extendUserInputsDictionary(t){this.dictionary.userInputs||(this.dictionary.userInputs=[]);const n=[...this.dictionary.userInputs,...t];this.rankedDictionaries.userInputs=this.buildSanitizedRankedDictionary(n),this.rankedDictionariesMaxWordSize.userInputs=this.getRankedDictionariesMaxWordSize(n)}addMatcher(t,n){this.matchers[t]?console.info(`Matcher ${t} already exists`):this.matchers[t]=n}}const be=new nIe;class rIe{constructor(t){this.defaultMatch=t}match({password:t}){const n=t.split("").reverse().join("");return this.defaultMatch({password:n}).map(r=>({...r,token:r.token.split("").reverse().join(""),reversed:!0,i:t.length-1-r.j,j:t.length-1-r.i}))}}class aIe{constructor({substr:t,limit:n,trieRoot:r}){this.buffer=[],this.finalPasswords=[],this.substr=t,this.limit=n,this.trieRoot=r}getAllPossibleSubsAtIndex(t){const n=[];let r=this.trieRoot;for(let a=t;a=this.limit)return;if(r===this.substr.length){t===n&&this.finalPasswords.push({password:this.buffer.join(""),changes:s});return}const u=[...this.getAllPossibleSubsAtIndex(r)];let l=!1;for(let c=r+u.length-1;c>=r;c-=1){const f=u[c-r];if(f.isTerminal()){if(i===f.parents.join("")&&o>=3)continue;l=!0;const d=f.subs;for(const m of d){this.buffer.push(m);const E=s.concat({i:a,letter:m,substitution:f.parents.join("")});if(this.helper({onlyFullSub:t,isFullSub:n,index:c+1,subIndex:a+m.length,changes:E,lastSubLetter:f.parents.join(""),consecutiveSubCount:i===f.parents.join("")?o+1:1}),this.buffer.pop(),this.finalPasswords.length>=this.limit)return}}}if(!t||!l){const c=this.substr.charAt(r);this.buffer.push(c),this.helper({onlyFullSub:t,isFullSub:n&&!l,index:r+1,subIndex:a+1,changes:s,lastSubLetter:i,consecutiveSubCount:o}),this.buffer.pop()}}getAll(){return this.helper({onlyFullSub:!0,isFullSub:!0,index:0,subIndex:0,changes:[],lastSubLetter:void 0,consecutiveSubCount:0}),this.helper({onlyFullSub:!1,isFullSub:!0,index:0,subIndex:0,changes:[],lastSubLetter:void 0,consecutiveSubCount:0}),this.finalPasswords}}const sIe=(e,t,n)=>new aIe({substr:e,limit:t,trieRoot:n}).getAll(),iIe=(e,t,n)=>{const a=e.changes.filter(l=>l.il-c.letter.length+c.substitution.length,t),s=e.changes.filter(l=>l.i>=t&&l.i<=n),i=s.reduce((l,c)=>l-c.letter.length+c.substitution.length,n-t+a),o=[],u=[];return s.forEach(l=>{o.findIndex(f=>f.letter===l.letter&&f.substitution===l.substitution)<0&&(o.push({letter:l.letter,substitution:l.substitution}),u.push(`${l.substitution} -> ${l.letter}`))}),{i:a,j:i,subs:o,subDisplay:u.join(", ")}};class oIe{constructor(t){this.defaultMatch=t}isAlreadyIncluded(t,n){return t.some(r=>Object.entries(r).every(([a,s])=>a==="subs"||s===n[a]))}match({password:t}){const n=[],r=sIe(t,be.l33tMaxSubstitutions,be.trieNodeRoot);let a=!1,s=!0;return r.forEach(i=>{if(a)return;const o=this.defaultMatch({password:i.password,useLevenshtein:s});s=!1,o.forEach(u=>{a||(a=u.i===0&&u.j===t.length-1);const l=iIe(i,u.i,u.j),c=t.slice(l.i,+l.j+1||9e9),f={...u,l33t:!0,token:c,...l},d=this.isAlreadyIncluded(n,f);c.toLowerCase()!==u.matchedWord&&!d&&n.push(f)})}),n.filter(i=>i.token.length>1)}}class uIe{constructor(){this.l33t=new oIe(this.defaultMatch),this.reverse=new rIe(this.defaultMatch)}match({password:t}){const n=[...this.defaultMatch({password:t}),...this.reverse.match({password:t}),...this.l33t.match({password:t})];return os(n)}defaultMatch({password:t,useLevenshtein:n=!0}){const r=[],a=t.length,s=t.toLowerCase();return Object.keys(be.rankedDictionaries).forEach(i=>{const o=be.rankedDictionaries[i],u=be.rankedDictionariesMaxWordSize[i],l=Math.min(u,a);for(let c=0;c{const s=n[a];s.lastIndex=0;let i;for(;i=s.exec(t);)if(i){const o=i[0];r.push({pattern:"regex",token:o,i:i.index,j:i.index+i[0].length-1,regexName:a,regexMatch:i})}}),os(r)}}var Aa={nCk(e,t){let n=e;if(t>n)return 0;if(t===0)return 1;let r=1;for(let a=1;a<=t;a+=1)r*=n,r/=a,n-=1;return r},log10(e){return e===0?0:Math.log(e)/Math.log(10)},log2(e){return Math.log(e)/Math.log(2)},factorial(e){let t=1;for(let n=2;n<=e;n+=1)t*=n;return t}},lIe=({token:e})=>{let t=xOe**e.length;t===Number.POSITIVE_INFINITY&&(t=Number.MAX_VALUE);let n;return e.length===1?n=oA+1:n=uA+1,Math.max(t,n)},dIe=({year:e,separator:t})=>{let r=Math.max(Math.abs(e-c0),cA)*365;return t&&(r*=4),r};const fIe=e=>{const t=e.split(""),n=t.filter(i=>i.match(VOe)).length,r=t.filter(i=>i.match(HOe)).length;let a=0;const s=Math.min(n,r);for(let i=1;i<=s;i+=1)a+=Aa.nCk(n+r,i);return a};var pIe=e=>{const t=e.replace(jOe,"");if(t.match(BOe)||t.toLowerCase()===t)return 1;const n=[lA,WOe,dA],r=n.length;for(let a=0;a{let n=0,r=e.indexOf(t);for(;r>=0;)n+=1,r=e.indexOf(t,r+t.length);return n},mIe=({sub:e,token:t})=>{const n=t.toLowerCase(),r=jE(n,e.substitution),a=jE(n,e.letter);return{subbedCount:r,unsubbedCount:a}};var EIe=({l33t:e,subs:t,token:n})=>{if(!e)return 1;let r=1;return t.forEach(a=>{const{subbedCount:s,unsubbedCount:i}=mIe({sub:a,token:n});if(s===0||i===0)r*=2;else{const o=Math.min(i,s);let u=0;for(let l=1;l<=o;l+=1)u+=Aa.nCk(i+s,l);r*=u}}),r},hIe=({rank:e,reversed:t,l33t:n,subs:r,token:a,dictionaryName:s})=>{const i=e,o=pIe(a),u=EIe({l33t:n,subs:r,token:a}),l=t&&2||1;let c;return s==="diceware"?c=6**5/2:c=i*o*u*l,{baseGuesses:i,uppercaseVariations:o,l33tVariations:u,calculation:c}},_Ie=({regexName:e,regexMatch:t,token:n})=>{const r={alphaLower:26,alphaUpper:26,alpha:52,alphanumeric:62,digits:10,symbols:33};if(e in r)return r[e]**n.length;switch(e){case"recentYear":return Math.max(Math.abs(parseInt(t[0],10)-c0),cA)}return 0},TIe=({baseGuesses:e,repeatCount:t})=>e*t,gIe=({token:e,ascending:t})=>{const n=e.charAt(0);let r=0;return["a","A","z","Z","0","1","9"].includes(n)?r=4:n.match(/\d/)?r=10:r=26,t||(r*=2),r*e.length};const AIe=e=>{let t=0;return Object.keys(e).forEach(n=>{const r=e[n];t+=r.filter(a=>!!a).length}),t/=Object.entries(e).length,t},SIe=({token:e,graph:t,turns:n})=>{const r=Object.keys(be.graphs[t]).length,a=AIe(be.graphs[t]);let s=0;const i=e.length;for(let o=2;o<=i;o+=1){const u=Math.min(n,o-1);for(let l=1;l<=u;l+=1)s+=Aa.nCk(o-1,l-1)*r*a**l}return s};var OIe=({graph:e,token:t,shiftedCount:n,turns:r})=>{let a=SIe({token:t,graph:e,turns:r});if(n){const s=t.length-n;if(n===0||s===0)a*=2;else{let i=0;for(let o=1;o<=Math.min(n,s);o+=1)i+=Aa.nCk(n+s,o);a*=i}}return Math.round(a)},IIe=()=>qOe;const vIe=(e,t)=>{let n=1;return e.token.lengthKE[e]?KE[e](t):be.matchers[e]&&"scoring"in be.matchers[e]?be.matchers[e].scoring(t):0;var bIe=(e,t)=>{const n={};if("guesses"in e&&e.guesses!=null)return e;const r=vIe(e,t),a=RIe(e.pattern,e);let s=0;typeof a=="number"?s=a:e.pattern==="dictionary"&&(s=a.calculation,n.baseGuesses=a.baseGuesses,n.uppercaseVariations=a.uppercaseVariations,n.l33tVariations=a.l33tVariations);const i=Math.max(s,r);return{...e,...n,guesses:i,guessesLog10:Aa.log10(i)}};const mn={password:"",optimal:{},excludeAdditive:!1,separatorRegex:void 0,fillArray(e,t){const n=[];for(let r=0;r1&&(a*=this.optimal.pi[r.i-1][t-1]);let s=Aa.factorial(t)*a;this.excludeAdditive||(s+=FOe**(t-1));let i=!1;Object.keys(this.optimal.g[n]).forEach(o=>{const u=this.optimal.g[n][o];parseInt(o,10)<=t&&u<=s&&(i=!0)}),i||(this.optimal.g[n][t]=s,this.optimal.m[n][t]=r,this.optimal.pi[n][t]=a)},bruteforceUpdate(e){let t=this.makeBruteforceMatch(0,e);this.update(t,1);for(let n=1;n<=e;n+=1){t=this.makeBruteforceMatch(n,e);const r=this.optimal.m[n-1];Object.keys(r).forEach(a=>{r[a].pattern!=="bruteforce"&&this.update(t,parseInt(a,10)+1)})}},unwind(e){const t=[];let n=e-1,r=0,a=1/0;const s=this.optimal.g[n];for(s&&Object.keys(s).forEach(i=>{const o=s[i];o=0;){const i=this.optimal.m[n][r];t.unshift(i),n=i.i-1,r-=1}return t}};var $d={mostGuessableMatchSequence(e,t,n=!1){mn.password=e,mn.excludeAdditive=n;const r=e.length;let a=mn.fillArray(r,"array");t.forEach(u=>{a[u.j].push(u)}),a=a.map(u=>u.sort((l,c)=>l.i-c.i)),mn.optimal={m:mn.fillArray(r,"object"),pi:mn.fillArray(r,"object"),g:mn.fillArray(r,"object")};for(let u=0;u{l.i>0?Object.keys(mn.optimal.m[l.i-1]).forEach(c=>{mn.update(l,parseInt(c,10)+1)}):mn.update(l,1)}),mn.bruteforceUpdate(u);const s=mn.unwind(r),i=s.length,o=this.getGuesses(e,i);return{password:e,guesses:o,guessesLog10:Aa.log10(o),sequence:s}},getGuesses(e,t){const n=e.length;let r=0;return e.length===0?r=1:r=mn.optimal.g[n-1][t],r}};class NIe{match({password:t,omniMatch:n}){const r=[];let a=0;for(;ai instanceof Promise)?Promise.all(r):r}normalizeMatch(t,n,r,a){const s={pattern:"repeat",i:r.index,j:n,token:r[0],baseToken:t,baseGuesses:0,repeatCount:r[0].length/t.length};return a instanceof Promise?a.then(i=>({...s,baseGuesses:i})):{...s,baseGuesses:a}}getGreedyMatch(t,n){const r=/(.+)\1+/g;return r.lastIndex=n,r.exec(t)}getLazyMatch(t,n){const r=/(.+?)\1+/g;return r.lastIndex=n,r.exec(t)}setMatchToken(t,n){const r=/^(.+?)\1+$/;let a,s="";if(n&&t[0].length>n[0].length){a=t;const i=r.exec(a[0]);i&&(s=i[1])}else a=n,a&&(s=a[1]);return{match:a,baseToken:s}}getBaseGuesses(t,n){const r=n.match(t);return r instanceof Promise?r.then(s=>$d.mostGuessableMatchSequence(t,s).guesses):$d.mostGuessableMatchSequence(t,r).guesses}}class CIe{constructor(){this.MAX_DELTA=5}match({password:t}){const n=[];if(t.length===1)return[];let r=0,a=null;const s=t.length;for(let i=1;i1||Math.abs(r)===1){const i=Math.abs(r);if(i>0&&i<=this.MAX_DELTA){const o=a.slice(t,+n+1||9e9),{sequenceName:u,sequenceSpace:l}=this.getSequence(o);return s.push({pattern:"sequence",i:t,j:n,token:a.slice(t,+n+1||9e9),sequenceName:u,sequenceSpace:l,ascending:r>0})}}return null}getSequence(t){let n="unicode",r=26;return zOe.test(t)?(n="lower",r=26):GOe.test(t)?(n="upper",r=26):KOe.test(t)&&(n="digits",r=10),{sequenceName:n,sequenceSpace:r}}}class yIe{constructor(){this.SHIFTED_RX=/[~!@#$%^&*()_+QWERTYUIOP{}|ASDFGHJKL:"ZXCVBNM<>?]/}match({password:t}){const n=[];return Object.keys(be.graphs).forEach(r=>{const a=be.graphs[r];Ld(n,this.helper(t,a,r))}),os(n)}checkIfShifted(t,n,r){return!t.includes("keypad")&&this.SHIFTED_RX.test(n.charAt(r))?1:0}helper(t,n,r){let a;const s=[];let i=0;const o=t.length;for(;i2&&s.push({pattern:"spatial",i,j:u-1,token:t.slice(i,u),graph:r,turns:c,shiftedCount:a}),i=u;break}}}return s}}const DIe=new RegExp(`[${fA.join("")}]`);class Uu{static getMostUsedSeparatorChar(t){const n=[...t.split("").filter(a=>DIe.test(a)).reduce((a,s)=>{const i=a.get(s);return i?a.set(s,i+1):a.set(s,1),a},new Map).entries()].sort(([a,s],[i,o])=>o-s);if(!n.length)return;const r=n[0];if(!(r[1]<2))return r[0]}static getSeparatorRegex(t){return new RegExp(`([^${t} +])(${t})(?!${t})`,"g")}match({password:t}){const n=[];if(t.length===0)return n;const r=Uu.getMostUsedSeparatorChar(t);if(r===void 0)return n;const a=Uu.getSeparatorRegex(r);for(const s of t.matchAll(a)){if(s.index===void 0)continue;const i=s.index+1;n.push({pattern:"separator",token:r,i,j:i})}return n}}class PIe{constructor(){this.matchers={date:XOe,dictionary:uIe,regex:cIe,repeat:NIe,sequence:CIe,spatial:yIe,separator:Uu}}match(t){const n=[],r=[];return[...Object.keys(this.matchers),...Object.keys(be.matchers)].forEach(s=>{if(!this.matchers[s]&&!be.matchers[s])return;const i=this.matchers[s]?this.matchers[s]:be.matchers[s].Matching,u=new i().match({password:t,omniMatch:this});u instanceof Promise?(u.then(l=>{Ld(n,l)}),r.push(u)):Ld(n,u)}),r.length>0?new Promise((s,i)=>{Promise.all(r).then(()=>{s(os(n))}).catch(o=>{i(o)})}):os(n)}}const pA=1,mA=pA*60,EA=mA*60,hA=EA*24,_A=hA*31,TA=_A*12,wIe=TA*100,ll={second:pA,minute:mA,hour:EA,day:hA,month:_A,year:TA,century:wIe};class LIe{translate(t,n){let r=t;n!==void 0&&n!==1&&(r+="s");const{timeEstimation:a}=be.translations;return a[r].replace("{base}",`${n}`)}estimateAttackTimes(t){const n={onlineThrottling100PerHour:t/.027777777777777776,onlineNoThrottling10PerSecond:t/10,offlineSlowHashing1e4PerSecond:t/1e4,offlineFastHashing1e10PerSecond:t/1e10},r={onlineThrottling100PerHour:"",onlineNoThrottling10PerSecond:"",offlineSlowHashing1e4PerSecond:"",offlineFastHashing1e10PerSecond:""};return Object.keys(n).forEach(a=>{const s=n[a];r[a]=this.displayTime(s)}),{crackTimesSeconds:n,crackTimesDisplay:r,score:this.guessesToScore(t)}}guessesToScore(t){return t<1005?0:t<1000005?1:t<100000005?2:t<1e10+5?3:4}displayTime(t){let n="centuries",r;const a=Object.keys(ll),s=a.findIndex(i=>t-1&&(n=a[s-1],s!==0?r=Math.round(t/ll[n]):n="ltSecond"),this.translate(n,r)}}var $Ie=()=>null,kIe=()=>({warning:be.translations.warnings.dates,suggestions:[be.translations.suggestions.dates]});const UIe=(e,t)=>{let n=null;return t&&!e.l33t&&!e.reversed?e.rank<=10?n=be.translations.warnings.topTen:e.rank<=100?n=be.translations.warnings.topHundred:n=be.translations.warnings.common:e.guessesLog10<=4&&(n=be.translations.warnings.similarToCommon),n},MIe=(e,t)=>{let n=null;return t&&(n=be.translations.warnings.wordByItself),n},xIe=(e,t)=>t?be.translations.warnings.namesByThemselves:be.translations.warnings.commonNames,FIe=(e,t)=>{let n=null;const r=e.dictionaryName,a=r==="lastnames"||r.toLowerCase().includes("firstnames");return r==="passwords"?n=UIe(e,t):r.includes("wikipedia")?n=MIe(e,t):a?n=xIe(e,t):r==="userInputs"&&(n=be.translations.warnings.userInputs),n};var WIe=(e,t)=>{const n=FIe(e,t),r=[],a=e.token;return a.match(lA)?r.push(be.translations.suggestions.capitalization):a.match(dA)&&a.toLowerCase()!==a&&r.push(be.translations.suggestions.allUppercase),e.reversed&&e.token.length>=4&&r.push(be.translations.suggestions.reverseWords),e.l33t&&r.push(be.translations.suggestions.l33t),{warning:n,suggestions:r}},GIe=e=>e.regexName==="recentYear"?{warning:be.translations.warnings.recentYears,suggestions:[be.translations.suggestions.recentYears,be.translations.suggestions.associatedYears]}:{warning:null,suggestions:[]},zIe=e=>{let t=be.translations.warnings.extendedRepeat;return e.baseToken.length===1&&(t=be.translations.warnings.simpleRepeat),{warning:t,suggestions:[be.translations.suggestions.repeated]}},BIe=()=>({warning:be.translations.warnings.sequences,suggestions:[be.translations.suggestions.sequences]}),HIe=e=>{let t=be.translations.warnings.keyPattern;return e.turns===1&&(t=be.translations.warnings.straightRow),{warning:t,suggestions:[be.translations.suggestions.longerKeyboardPattern]}},VIe=()=>null;const YE={warning:null,suggestions:[]};class jIe{constructor(){this.matchers={bruteforce:$Ie,date:kIe,dictionary:WIe,regex:GIe,repeat:zIe,sequence:BIe,spatial:HIe,separator:VIe},this.defaultFeedback={warning:null,suggestions:[]},this.setDefaultSuggestions()}setDefaultSuggestions(){this.defaultFeedback.suggestions.push(be.translations.suggestions.useWords,be.translations.suggestions.noNeed)}getFeedback(t,n){if(n.length===0)return this.defaultFeedback;if(t>2)return YE;const r=be.translations.suggestions.anotherWord,a=this.getLongestMatch(n);let s=this.getMatchFeedback(a,n.length===1);return s!=null?s.suggestions.unshift(r):s={warning:null,suggestions:[r]},s}getLongestMatch(t){let n=t[0];return t.slice(1).forEach(a=>{a.token.length>n.token.length&&(n=a)}),n}getMatchFeedback(t,n){return this.matchers[t.pattern]?this.matchers[t.pattern](t,n):be.matchers[t.pattern]&&"feedback"in be.matchers[t.pattern]?be.matchers[t.pattern].feedback(t,n):YE}}const gA=()=>new Date().getTime(),KIe=(e,t,n)=>{const r=new jIe,a=new LIe,s=$d.mostGuessableMatchSequence(t,e),i=gA()-n,o=a.estimateAttackTimes(s.guesses);return{calcTime:i,...s,...o,feedback:r.getFeedback(o.score,s.sequence)}},YIe=(e,t)=>(t&&be.extendUserInputsDictionary(t),new PIe().match(e)),qIe=(e,t)=>{const n=gA(),r=YIe(e,t);if(r instanceof Promise)throw new Error("You are using a Promised matcher, please use `zxcvbnAsync` for it.");return KIe(r,e,n)},XIe="modulepreload",ZIe=function(e){return"/"+e},qE={},Dt=function(t,n,r){let a=Promise.resolve();if(n&&n.length>0){const s=document.getElementsByTagName("link");a=Promise.all(n.map(i=>{if(i=ZIe(i),i in qE)return;qE[i]=!0;const o=i.endsWith(".css"),u=o?'[rel="stylesheet"]':"";if(!!r)for(let f=s.length-1;f>=0;f--){const d=s[f];if(d.href===i&&(!o||d.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${i}"]${u}`))return;const c=document.createElement("link");if(c.rel=o?"stylesheet":XIe,o||(c.as="script",c.crossOrigin=""),c.href=i,document.head.appendChild(c),o)return new Promise((f,d)=>{c.addEventListener("load",f),c.addEventListener("error",()=>d(new Error(`Unable to preload CSS for ${i}`)))})}))}return a.then(()=>t()).catch(s=>{const i=new Event("vite:preloadError",{cancelable:!0});if(i.payload=s,window.dispatchEvent(i),!i.defaultPrevented)throw s})},QIe=async e=>{switch(e){case"fr":return await Dt(()=>import("./password.fr-1uJe1-pR.js"),__vite__mapDeps([]));case"de":return await Dt(()=>import("./password.de-qoep7B_f.js"),__vite__mapDeps([]));case"it":return await Dt(()=>import("./password.it-ImDc22WR.js"),__vite__mapDeps([]));case"es":return await Dt(()=>import("./password.es-es--6AdGpRj.js"),__vite__mapDeps([]));case"pl":return await Dt(()=>import("./password.pl-Ipz4x2MM.js"),__vite__mapDeps([]));default:return await Dt(()=>import("./password.en-lIq_N4yZ.js"),__vite__mapDeps([]))}},XE=async e=>{const t=await Dt(()=>import("./password.common-7m77ow97.js"),__vite__mapDeps([])),n=await QIe(e),r={graphs:t.adjacencyGraphs,dictionary:{...t.dictionary,...n.dictionary}};be.setOptions(r)},JIe=e=>{switch(e){case 2:return"AVERAGE";case 3:return"GOOD";case 4:return"STRONG";default:return"WEAK"}},e2e={class:"password-strength"},t2e=["value"],n2e={key:0,class:"password-strength-details"},r2e={class:"password-strength-value"},a2e={key:0,class:"info-box"},s2e={class:"password-feedback"},i2e=Z({__name:"PasswordStength",props:{password:{}},setup(e){const t=e,{password:n}=_e(t),r=Me(),a=$(()=>r.getters[H.GETTERS.LANGUAGE]),s=$(()=>r.getters[K.GETTERS.IS_SUCCESS]),i=le(0),o=le(""),u=le([]),l=le("0% 100%");Ct(async()=>await XE(a.value));function c(f){const d=qIe(f);i.value=d.score,o.value=JIe(i.value),u.value=d.feedback.suggestions,l.value=i.value*100/4+"% 100%"}return Ge(()=>a.value,async f=>{await XE(f)}),Ge(()=>n.value,async f=>{s.value?o.value="":c(f)}),(f,d)=>(A(),N("div",e2e,[p("input",{class:Se(["password-slider",`strength-${i.value}`]),style:Vr({backgroundSize:l.value}),type:"range",value:i.value,min:"0",max:"4",step:"1",tabindex:-1},null,14,t2e),o.value?(A(),N("div",n2e,[p("span",r2e,T(f.$t("user.PASSWORD_STRENGTH.LABEL"))+": "+T(f.$t(`user.PASSWORD_STRENGTH.${o.value}`)),1),u.value.length>0?(A(),N("div",a2e,[p("ul",s2e,[(A(!0),N(Re,null,ze(u.value,m=>(A(),N("li",{key:m},T(f.$t(`user.PASSWORD_STRENGTH.SUGGESTIONS.${m}`)),1))),128))])])):x("",!0)])):x("",!0)]))}}),o2e=re(i2e,[["__scopeId","data-v-1affb508"]]),u2e=e=>(ot("data-v-ac528612"),e=e(),ut(),e),c2e={class:"password-input"},l2e=["id","disabled","placeholder","required","type"],d2e={class:"show-password"},f2e={key:0,class:"form-info"},p2e=u2e(()=>p("i",{class:"fa fa-info-circle","aria-hidden":"true"},null,-1)),m2e=Z({__name:"PasswordInput",props:{checkStrength:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},id:{default:"password"},password:{default:""},placeholder:{},required:{type:Boolean,default:!1}},emits:["updatePassword","passwordError"],setup(e,{emit:t}){const n=e,{checkStrength:r,disabled:a,id:s,password:i,placeholder:o,required:u}=_e(n),l=le(!1),c=le(""),f=t;function d(){l.value=!l.value}function m(I){f("updatePassword",I.target.value)}function E(){f("passwordError")}return Ge(()=>i.value,I=>{I===""&&(c.value="",l.value=!1)}),(I,R)=>(A(),N("div",c2e,[qe(p("input",{id:h(s),disabled:h(a),placeholder:h(o),required:h(u),type:l.value?"text":"password","onUpdate:modelValue":R[0]||(R[0]=v=>c.value=v),minlength:"8",onInput:m,onInvalid:E},null,40,l2e),[[CI,c.value]]),p("div",d2e,[p("button",{class:"transparent",onClick:Je(d,["prevent"]),type:"button"},[j(T(I.$t(`user.${l.value?"HIDE":"SHOW"}_PASSWORD`))+" ",1),p("i",{class:Se(["fa",`fa-eye${l.value?"-slash":""}`]),"aria-hidden":"true"},null,2)])]),h(r)?(A(),N("div",f2e,[p2e,j(" "+T(I.$t("user.PASSWORD_INFO")),1)])):x("",!0),h(r)?(A(),te(o2e,{key:1,password:c.value},null,8,["password"])):x("",!0)]))}}),kd=re(m2e,[["__scopeId","data-v-ac528612"]]),l0=e=>(ot("data-v-8ebb5cd3"),e=e(),ut(),e),E2e={id:"user-infos-edition"},h2e={class:"profile-form form-box"},_2e={key:1,class:"info-box success-message"},T2e={class:"form-items",for:"email"},g2e=["disabled"],A2e={class:"form-items",for:"password-field"},S2e={class:"form-items",for:"new-password-field"},O2e={class:"form-buttons"},I2e={class:"confirm",type:"submit"},v2e={class:"data-export"},R2e={class:"info-box"},b2e=l0(()=>p("i",{class:"fa fa-info-circle","aria-hidden":"true"},null,-1)),N2e={key:0,class:"data-export-archive"},C2e=l0(()=>p("i",{class:"fa fa-download","aria-hidden":"true"},null,-1)),y2e={key:1},D2e={key:2},P2e=l0(()=>p("i",{class:"fa fa-spinner fa-pulse","aria-hidden":"true"},null,-1)),w2e=Z({__name:"UserAccountEdition",props:{user:{}},setup(e){const t=e,{user:n}=_e(t),r=Me(),a=zt({email:"",password:"",new_password:""}),s=$(()=>r.getters[K.GETTERS.USER_LOADING]),i=$(()=>r.getters[H.GETTERS.APP_CONFIG]),o=$(()=>r.getters[K.GETTERS.IS_SUCCESS]),u=le(!1),l=$(()=>r.getters[H.GETTERS.ERROR_MESSAGES]),c=le(!1),f=le(!1),d=$(()=>r.getters[K.GETTERS.EXPORT_REQUEST]),m=$(()=>S()),E=le(!1);_t(()=>{t.user&&(r.dispatch(K.ACTIONS.GET_REQUEST_DATA_EXPORT),R(t.user))});function I(){c.value=!0}function R(B){a.email=B.email}function v(B){a.password=B}function b(B){a.new_password=B}function S(){return d.value?kn(d.value.created_at,n.value.timezone,n.value.date_format,!0,null,!0):null}function O(){return m.value?XN(new Date(m.value),JN(new Date,1)):!0}function C(){const B={email:a.email,password:a.password};a.new_password&&(B.new_password=a.new_password),u.value=a.email!==n.value.email,r.dispatch(K.ACTIONS.UPDATE_USER_ACCOUNT,B)}function P(B){f.value=B}function M(B){r.dispatch(K.ACTIONS.DELETE_ACCOUNT,{username:B})}function w(){r.dispatch(K.ACTIONS.REQUEST_DATA_EXPORT)}async function G(B){E.value=!0,await je.get(`/auth/account/export/${B}`,{responseType:"blob"}).then(L=>{const X=window.URL.createObjectURL(new Blob([L.data],{type:"application/zip"})),J=document.createElement("a");J.href=X,J.setAttribute("download",B),document.body.appendChild(J),J.click()}).finally(()=>E.value=!1)}return bt(()=>{r.commit(K.MUTATIONS.UPDATE_IS_SUCCESS,!1),r.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES)}),Ge(()=>o.value,async B=>{B&&(v(""),b(""),R(n.value),c.value=!1)}),Ge(()=>n.value.email,async()=>{R(n.value)}),(B,L)=>{const X=oe("Modal"),J=oe("ErrorMessage");return A(),N("div",E2e,[f.value?(A(),te(X,{key:0,title:B.$t("common.CONFIRMATION"),message:B.$t("user.CONFIRM_ACCOUNT_DELETION"),onConfirmAction:L[0]||(L[0]=ne=>M(h(n).username)),onCancelAction:L[1]||(L[1]=ne=>P(!1)),onKeydown:L[2]||(L[2]=At(ne=>P(!1),["esc"]))},null,8,["title","message"])):x("",!0),p("div",h2e,[l.value?(A(),te(J,{key:0,message:l.value},null,8,["message"])):x("",!0),o.value?(A(),N("div",_2e,T(B.$t(`user.PROFILE.SUCCESSFUL_${u.value&&i.value.is_email_sending_enabled?"EMAIL_":""}UPDATE`)),1)):x("",!0),p("form",{class:Se({errors:c.value}),onSubmit:Je(C,["prevent"])},[p("label",T2e,[j(T(B.$t("user.EMAIL"))+"* ",1),qe(p("input",{id:"email","onUpdate:modelValue":L[3]||(L[3]=ne=>a.email=ne),disabled:s.value,required:!0,onInvalid:I},null,40,g2e),[[at,a.email]])]),p("label",A2e,[j(T(B.$t("user.CURRENT_PASSWORD"))+"* ",1),k(kd,{id:"password-field",disabled:s.value,password:a.password,required:!0,onUpdatePassword:v,onPasswordError:I},null,8,["disabled","password"])]),p("label",S2e,[j(T(B.$t("user.NEW_PASSWORD"))+" ",1),k(kd,{id:"new-password-field",disabled:s.value,checkStrength:!0,password:a.new_password,isSuccess:!1,onUpdatePassword:b,onPasswordError:I},null,8,["disabled","password"])]),p("div",O2e,[p("button",I2e,T(B.$t("buttons.SUBMIT")),1),p("button",{class:"cancel",onClick:L[4]||(L[4]=Je(ne=>B.$router.push("/profile"),["prevent"]))},T(B.$t("buttons.CANCEL")),1),p("button",{class:"danger",onClick:L[5]||(L[5]=Je(ne=>P(!0),["prevent"]))},T(B.$t("buttons.DELETE_MY_ACCOUNT")),1),O()?(A(),N("button",{key:0,class:"confirm",onClick:Je(w,["prevent"])},T(B.$t("buttons.REQUEST_DATA_EXPORT")),1)):x("",!0)])],34),p("div",v2e,[p("span",R2e,[b2e,j(" "+T(B.$t("user.EXPORT_REQUEST.ONLY_ONE_EXPORT_PER_DAY")),1)]),d.value?(A(),N("div",N2e,[j(T(B.$t("user.EXPORT_REQUEST.DATA_EXPORT"))+" ("+T(m.value)+"): ",1),d.value.status==="successful"?(A(),N("span",{key:0,class:"archive-link",onClick:L[6]||(L[6]=Je(ne=>G(d.value.file_name),["prevent"]))},[C2e,j(" "+T(B.$t("user.EXPORT_REQUEST.DOWNLOAD_ARCHIVE"))+" ("+T(h(qo)(d.value.file_size))+") ",1)])):(A(),N("span",y2e,T(B.$t(`user.EXPORT_REQUEST.STATUS.${d.value.status}`)),1)),E.value?(A(),N("span",D2e,[j(T(B.$t("user.EXPORT_REQUEST.GENERATING_LINK"))+" ",1),P2e])):x("",!0)])):x("",!0)])])])}}}),L2e=re(w2e,[["__scopeId","data-v-8ebb5cd3"]]),$2e={id:"user-infos-edition"},k2e={class:"profile-form form-box"},U2e={class:"form-items",for:"registrationDate"},M2e=["value"],x2e={class:"form-items",for:"first_name"},F2e=["disabled"],W2e={class:"form-items",for:"last_name"},G2e={class:"form-items",for:"birth_date"},z2e=["disabled"],B2e={class:"form-items",for:"location"},H2e=["disabled"],V2e={class:"form-items"},j2e={class:"form-buttons"},K2e={class:"confirm",type:"submit"},Y2e=Z({__name:"UserInfosEdition",props:{user:{}},setup(e){const t=e,n=Me(),r=zt({first_name:"",last_name:"",birth_date:"",location:"",bio:""}),a=$(()=>t.user.created_at?kn(t.user.created_at,t.user.timezone,t.user.date_format):""),s=$(()=>n.getters[K.GETTERS.USER_LOADING]),i=$(()=>n.getters[H.GETTERS.ERROR_MESSAGES]);_t(()=>{t.user&&o(t.user)});function o(c){r.first_name=c.first_name?c.first_name:"",r.last_name=c.last_name?c.last_name:"",r.birth_date=c.birth_date?dn(new Date(c.birth_date),"yyyy-MM-dd"):"",r.location=c.location?c.location:"",r.bio=c.bio?c.bio:""}function u(c){r.bio=c}function l(){n.dispatch(K.ACTIONS.UPDATE_USER_PROFILE,r)}return bt(()=>{n.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES)}),(c,f)=>{const d=oe("ErrorMessage"),m=oe("CustomTextArea");return A(),N("div",$2e,[p("div",k2e,[i.value?(A(),te(d,{key:0,message:i.value},null,8,["message"])):x("",!0),p("form",{onSubmit:Je(l,["prevent"])},[p("label",U2e,[j(T(c.$t("user.PROFILE.REGISTRATION_DATE"))+" ",1),p("input",{id:"registrationDate",value:a.value,disabled:""},null,8,M2e)]),p("label",x2e,[j(T(c.$t("user.PROFILE.FIRST_NAME"))+" ",1),qe(p("input",{id:"first_name","onUpdate:modelValue":f[0]||(f[0]=E=>r.first_name=E),disabled:s.value},null,8,F2e),[[at,r.first_name]])]),p("label",W2e,[j(T(c.$t("user.PROFILE.LAST_NAME"))+" ",1),qe(p("input",{id:"last_name","onUpdate:modelValue":f[1]||(f[1]=E=>r.last_name=E)},null,512),[[at,r.last_name]])]),p("label",G2e,[j(T(c.$t("user.PROFILE.BIRTH_DATE"))+" ",1),qe(p("input",{id:"birth_date",type:"date",class:"birth-date","onUpdate:modelValue":f[2]||(f[2]=E=>r.birth_date=E),disabled:s.value},null,8,z2e),[[at,r.birth_date]])]),p("label",B2e,[j(T(c.$t("user.PROFILE.LOCATION"))+" ",1),qe(p("input",{id:"location","onUpdate:modelValue":f[3]||(f[3]=E=>r.location=E),disabled:s.value},null,8,H2e),[[at,r.location]])]),p("label",V2e,[j(T(c.$t("user.PROFILE.BIO"))+" ",1),k(m,{name:"bio",charLimit:200,input:r.bio,disabled:s.value,onUpdateValue:u},null,8,["input","disabled"])]),p("div",j2e,[p("button",K2e,T(c.$t("buttons.SUBMIT")),1),p("button",{class:"cancel",onClick:f[4]||(f[4]=Je(E=>c.$router.push("/profile"),["prevent"]))},T(c.$t("buttons.CANCEL")),1)])],32)])])}}}),q2e=re(Y2e,[["__scopeId","data-v-5f5c8fca"]]),X2e=e=>(ot("data-v-8f62d42f"),e=e(),ut(),e),Z2e={id:"user-picture-edition"},Q2e={class:"user-picture-form"},J2e={class:"picture-help"},eve={class:"info-box"},tve=X2e(()=>p("i",{class:"fa fa-info-circle","aria-hidden":"true"},null,-1)),nve={class:"picture-buttons"},rve=["disabled"],ave=Z({__name:"UserPictureEdition",props:{user:{}},setup(e){const t=e,n=Me(),{user:r}=_e(t),a=$(()=>n.getters[H.GETTERS.ERROR_MESSAGES]),s=$(()=>n.getters[H.GETTERS.APP_CONFIG]),i=s.value.max_single_file_size?qo(s.value.max_single_file_size):"",o=le(null);function u(){n.dispatch(K.ACTIONS.DELETE_PICTURE)}function l(f){f.target.files!==null&&(o.value=f.target.files[0])}function c(){o.value&&n.dispatch(K.ACTIONS.UPDATE_USER_PICTURE,{picture:o.value})}return bt(()=>{n.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES)}),(f,d)=>{const m=oe("ErrorMessage");return A(),N("div",Z2e,[p("div",Q2e,[a.value?(A(),te(m,{key:0,message:a.value},null,8,["message"])):x("",!0),k(Oi,{user:h(r)},null,8,["user"]),p("form",{onSubmit:Je(c,["prevent"])},[p("input",{type:"file",name:"picture",accept:".png,.jpg,.gif",onInput:l},null,32),p("div",J2e,[p("span",eve,[tve,j(" "+T(f.$t("workouts.MAX_SIZE"))+": "+T(h(i)),1)])]),p("div",nve,[p("button",{type:"submit",disabled:!o.value},T(f.$t("user.PROFILE.PICTURE_UPDATE")),9,rve),h(r).picture?(A(),N("button",{key:0,class:"danger",onClick:u},T(f.$t("user.PROFILE.PICTURE_REMOVE")),1)):x("",!0),p("button",{class:"cancel",onClick:d[0]||(d[0]=E=>f.$router.push("/profile"))},T(f.$t("user.PROFILE.BACK_TO_PROFILE")),1)])],32)])])}}}),sve=re(ave,[["__scopeId","data-v-8f62d42f"]]),ZE=["Africa/Abidjan","Africa/Accra","Africa/Algiers","Africa/Bissau","Africa/Cairo","Africa/Casablanca","Africa/Ceuta","Africa/El_Aaiun","Africa/Johannesburg","Africa/Juba","Africa/Khartoum","Africa/Lagos","Africa/Maputo","Africa/Monrovia","Africa/Nairobi","Africa/Ndjamena","Africa/Sao_Tome","Africa/Tripoli","Africa/Tunis","Africa/Windhoek","America/Adak","America/Anchorage","America/Araguaina","America/Argentina/Buenos_Aires","America/Argentina/Catamarca","America/Argentina/Cordoba","America/Argentina/Jujuy","America/Argentina/La_Rioja","America/Argentina/Mendoza","America/Argentina/Rio_Gallegos","America/Argentina/Salta","America/Argentina/San_Juan","America/Argentina/San_Luis","America/Argentina/Tucuman","America/Argentina/Ushuaia","America/Asuncion","America/Atikokan","America/Bahia","America/Bahia_Banderas","America/Barbados","America/Belem","America/Belize","America/Blanc-Sablon","America/Boa_Vista","America/Bogota","America/Boise","America/Cambridge_Bay","America/Campo_Grande","America/Cancun","America/Caracas","America/Cayenne","America/Chicago","America/Chihuahua","America/Costa_Rica","America/Creston","America/Cuiaba","America/Curacao","America/Danmarkshavn","America/Dawson","America/Dawson_Creek","America/Denver","America/Detroit","America/Edmonton","America/Eirunepe","America/El_Salvador","America/Fortaleza","America/Fort_Nelson","America/Glace_Bay","America/Godthab","America/Goose_Bay","America/Grand_Turk","America/Guatemala","America/Guayaquil","America/Guyana","America/Halifax","America/Havana","America/Hermosillo","America/Indiana/Indianapolis","America/Indiana/Knox","America/Indiana/Marengo","America/Indiana/Petersburg","America/Indiana/Tell_City","America/Indiana/Vevay","America/Indiana/Vincennes","America/Indiana/Winamac","America/Inuvik","America/Iqaluit","America/Jamaica","America/Juneau","America/Kentucky/Louisville","America/Kentucky/Monticello","America/La_Paz","America/Lima","America/Los_Angeles","America/Maceio","America/Managua","America/Manaus","America/Martinique","America/Matamoros","America/Mazatlan","America/Menominee","America/Merida","America/Metlakatla","America/Mexico_City","America/Miquelon","America/Moncton","America/Monterrey","America/Montevideo","America/Nassau","America/New_York","America/Nipigon","America/Nome","America/Noronha","America/North_Dakota/Beulah","America/North_Dakota/Center","America/North_Dakota/New_Salem","America/Ojinaga","America/Panama","America/Pangnirtung","America/Paramaribo","America/Phoenix","America/Port-au-Prince","America/Port_of_Spain","America/Porto_Velho","America/Puerto_Rico","America/Punta_Arenas","America/Rainy_River","America/Rankin_Inlet","America/Recife","America/Regina","America/Resolute","America/Rio_Branco","America/Santarem","America/Santiago","America/Santo_Domingo","America/Sao_Paulo","America/Scoresbysund","America/Sitka","America/St_Johns","America/Swift_Current","America/Tegucigalpa","America/Thule","America/Thunder_Bay","America/Tijuana","America/Toronto","America/Vancouver","America/Whitehorse","America/Winnipeg","America/Yakutat","America/Yellowknife","Antarctica/Casey","Antarctica/Davis","Antarctica/DumontDUrville","Antarctica/Macquarie","Antarctica/Mawson","Antarctica/Palmer","Antarctica/Rothera","Antarctica/Syowa","Antarctica/Troll","Antarctica/Vostok","Asia/Almaty","Asia/Amman","Asia/Anadyr","Asia/Aqtau","Asia/Aqtobe","Asia/Ashgabat","Asia/Atyrau","Asia/Baghdad","Asia/Baku","Asia/Bangkok","Asia/Barnaul","Asia/Beirut","Asia/Bishkek","Asia/Brunei","Asia/Chita","Asia/Choibalsan","Asia/Colombo","Asia/Damascus","Asia/Dhaka","Asia/Dili","Asia/Dubai","Asia/Dushanbe","Asia/Famagusta","Asia/Gaza","Asia/Hebron","Asia/Ho_Chi_Minh","Asia/Hong_Kong","Asia/Hovd","Asia/Irkutsk","Asia/Jakarta","Asia/Jayapura","Asia/Jerusalem","Asia/Kabul","Asia/Kamchatka","Asia/Karachi","Asia/Kathmandu","Asia/Khandyga","Asia/Kolkata","Asia/Krasnoyarsk","Asia/Kuala_Lumpur","Asia/Kuching","Asia/Macau","Asia/Magadan","Asia/Makassar","Asia/Manila","Asia/Nicosia","Asia/Novokuznetsk","Asia/Novosibirsk","Asia/Omsk","Asia/Oral","Asia/Pontianak","Asia/Pyongyang","Asia/Qatar","Asia/Qostanay","Asia/Qyzylorda","Asia/Riyadh","Asia/Sakhalin","Asia/Samarkand","Asia/Seoul","Asia/Shanghai","Asia/Singapore","Asia/Srednekolymsk","Asia/Taipei","Asia/Tashkent","Asia/Tbilisi","Asia/Tehran","Asia/Thimphu","Asia/Tokyo","Asia/Tomsk","Asia/Ulaanbaatar","Asia/Urumqi","Asia/Ust-Nera","Asia/Vladivostok","Asia/Yakutsk","Asia/Yangon","Asia/Yekaterinburg","Asia/Yerevan","Atlantic/Azores","Atlantic/Bermuda","Atlantic/Canary","Atlantic/Cape_Verde","Atlantic/Faroe","Atlantic/Madeira","Atlantic/Reykjavik","Atlantic/South_Georgia","Atlantic/Stanley","Australia/Adelaide","Australia/Brisbane","Australia/Broken_Hill","Australia/Currie","Australia/Darwin","Australia/Eucla","Australia/Hobart","Australia/Lindeman","Australia/Lord_Howe","Australia/Melbourne","Australia/Perth","Australia/Sydney","Europe/Amsterdam","Europe/Andorra","Europe/Astrakhan","Europe/Athens","Europe/Belgrade","Europe/Berlin","Europe/Brussels","Europe/Bucharest","Europe/Budapest","Europe/Chisinau","Europe/Copenhagen","Europe/Dublin","Europe/Gibraltar","Europe/Helsinki","Europe/Istanbul","Europe/Kaliningrad","Europe/Kiev","Europe/Kirov","Europe/Lisbon","Europe/London","Europe/Luxembourg","Europe/Madrid","Europe/Malta","Europe/Minsk","Europe/Monaco","Europe/Moscow","Europe/Oslo","Europe/Paris","Europe/Prague","Europe/Riga","Europe/Rome","Europe/Samara","Europe/Saratov","Europe/Simferopol","Europe/Sofia","Europe/Stockholm","Europe/Tallinn","Europe/Tirane","Europe/Ulyanovsk","Europe/Uzhgorod","Europe/Vienna","Europe/Vilnius","Europe/Volgograd","Europe/Warsaw","Europe/Zaporozhye","Europe/Zurich","Indian/Chagos","Indian/Christmas","Indian/Cocos","Indian/Kerguelen","Indian/Mahe","Indian/Maldives","Indian/Mauritius","Indian/Reunion","Pacific/Apia","Pacific/Auckland","Pacific/Bougainville","Pacific/Chatham","Pacific/Chuuk","Pacific/Easter","Pacific/Efate","Pacific/Enderbury","Pacific/Fakaofo","Pacific/Fiji","Pacific/Funafuti","Pacific/Galapagos","Pacific/Gambier","Pacific/Guadalcanal","Pacific/Guam","Pacific/Honolulu","Pacific/Kiritimati","Pacific/Kosrae","Pacific/Kwajalein","Pacific/Majuro","Pacific/Marquesas","Pacific/Nauru","Pacific/Niue","Pacific/Norfolk","Pacific/Noumea","Pacific/Pago_Pago","Pacific/Palau","Pacific/Pitcairn","Pacific/Pohnpei","Pacific/Port_Moresby","Pacific/Rarotonga","Pacific/Tahiti","Pacific/Tarawa","Pacific/Tongatapu","Pacific/Wake","Pacific/Wallis"],ive={id:"tz-dropdown"},ove=["value","disabled","aria-expanded"],uve=["aria-label"],cve=["id","onClick","onMouseover","autofocus"],lve=Z({__name:"TimezoneDropdown",props:{input:{},disabled:{type:Boolean,default:!1}},emits:["updateTimezone"],setup(e,{emit:t}){const n=e,r=t,{input:a,disabled:s}=_e(n),i=le(a.value),o=le(!1),u=le(0),l=$(()=>a.value?ZE.filter(O=>c(O)):ZE);function c(O){return O.toLowerCase().match(i.value.toLowerCase())}function f(O){u.value=O}function d(O){l.value.length>O&&(i.value=l.value[O],r("updateTimezone",i.value),o.value=!1)}function m(O){O.preventDefault(),l.value.length>0&&d(u.value)}function E(O){O.preventDefault(),o.value=!0,i.value=O.target.value.trim()}function I(){d(u.value)}function R(O){const C=document.getElementById(`tz-dropdown-item-${O}`);C&&(C.focus(),C.scrollIntoView({behavior:"smooth",block:"nearest"}))}function v(){o.value=!0,u.value=u.value===null?0:u.value+=1,u.value>=l.value.length&&(u.value=0),R(u.value)}function b(){o.value=!0,u.value=u.value===null?l.value.length-1:u.value-=1,u.value<=-1&&(u.value=l.value.length-1),R(u.value)}function S(){o.value&&(o.value=!1,i.value=a.value)}return Ge(()=>n.input,O=>{i.value=O}),(O,C)=>(A(),N("div",ive,[p("input",{class:"tz-dropdown-input",id:"timezone",name:"timezone",value:i.value,disabled:h(s),required:"",role:"combobox","aria-autocomplete":"list","aria-controls":"tz-dropdown-list","aria-expanded":o.value,onKeydown:[C[0]||(C[0]=At(P=>S(),["esc"])),At(m,["enter"]),C[2]||(C[2]=At(P=>v(),["down"])),C[3]||(C[3]=At(P=>b(),["up"]))],onInput:E,onBlur:C[1]||(C[1]=P=>I())},null,40,ove),o.value?(A(),N("ul",{key:0,class:"tz-dropdown-list",id:"tz-dropdown-list",role:"listbox",tabindex:"-1","aria-label":O.$t("user.PROFILE.TIMEZONE",0)},[(A(!0),N(Re,null,ze(l.value,(P,M)=>(A(),N("li",{key:P,id:`tz-dropdown-item-${M}`,class:Se(["tz-dropdown-item",{focus:M===u.value}]),onClick:w=>d(M),onMouseover:w=>f(M),autofocus:M===u.value,role:"option"},T(P),43,cve))),128))],8,uve)):x("",!0)]))}}),dve=re(lve,[["__scopeId","data-v-3d9b6b6f"]]),fve=e=>(ot("data-v-7b19a78b"),e=e(),ut(),e),pve={id:"user-preferences-edition"},mve={class:"profile-form form-box"},Eve={class:"preferences-section"},hve={class:"form-items"},_ve=["disabled"],Tve=["value"],gve={class:"form-items"},Ave=["disabled"],Sve=["value"],Ove={class:"form-items"},Ive={class:"form-items"},vve=["disabled"],Rve=["value"],bve={class:"form-items form-checkboxes"},Nve={class:"checkboxes-label"},Cve={class:"checkboxes"},yve=["id","name","checked","disabled","onInput"],Dve={class:"checkbox-label"},Pve={class:"preferences-section"},wve={class:"form-items form-checkboxes"},Lve={class:"checkboxes-label"},$ve={class:"checkboxes"},kve=["id","name","checked","disabled","onInput"],Uve={class:"checkbox-label"},Mve={class:"form-items form-checkboxes"},xve={class:"checkboxes-label"},Fve={class:"checkboxes"},Wve=["id","name","checked","disabled","onInput"],Gve={class:"checkbox-label"},zve={class:"form-items form-checkboxes"},Bve={class:"checkboxes-label"},Hve={class:"checkboxes"},Vve=["id","name","checked","disabled","onInput"],jve={class:"checkbox-label"},Kve={class:"form-items form-checkboxes"},Yve={class:"checkboxes-label"},qve={class:"checkboxes"},Xve=["id","name","checked","disabled","onInput"],Zve={class:"checkbox-label"},Qve={class:"info-box raw-speed-help"},Jve=fve(()=>p("i",{class:"fa fa-info-circle","aria-hidden":"true"},null,-1)),eRe={class:"form-buttons"},tRe={class:"confirm",type:"submit"},nRe=Z({__name:"UserPreferencesEdition",props:{user:{}},setup(e){const t=e,n=Me(),r=zt({display_ascent:!0,imperial_units:!1,language:"en",timezone:"Europe/Paris",date_format:"dd/MM/yyyy",weekm:!1,start_elevation_at_zero:!1,use_raw_gpx_speed:!1,use_dark_mode:!1}),a=[{label:"SUNDAY",value:!1},{label:"MONDAY",value:!0}],s=[{label:"METRIC",value:!1},{label:"IMPERIAL",value:!0}],i=[{label:"DISPLAYED",value:!0},{label:"HIDDEN",value:!1}],o=[{label:"ZERO",value:!0},{label:"MIN_ALT",value:!1}],u=[{label:"FILTERED_SPEED",value:!1},{label:"RAW_SPEED",value:!0}],l=[{label:"DARK",value:!0},{label:"DEFAULT",value:null},{label:"LIGHT",value:!1}],c=$(()=>n.getters[K.GETTERS.USER_LOADING]),f=$(()=>n.getters[H.GETTERS.ERROR_MESSAGES]),d=$(()=>MAe(new Date().toUTCString(),t.user.timezone,r.language));_t(()=>{t.user&&m(t.user)});function m(C){r.display_ascent=C.display_ascent,r.start_elevation_at_zero=C.start_elevation_at_zero?C.start_elevation_at_zero:!1,r.use_raw_gpx_speed=C.use_raw_gpx_speed?C.use_raw_gpx_speed:!1,r.imperial_units=C.imperial_units?C.imperial_units:!1,r.language=C.language?C.language:"en",r.timezone=C.timezone?C.timezone:"Europe/Paris",r.date_format=C.date_format?C.date_format:"dd/MM/yyyy",r.weekm=C.weekm?C.weekm:!1,r.use_dark_mode=C.use_dark_mode}function E(){n.dispatch(K.ACTIONS.UPDATE_USER_PREFERENCES,r)}function I(C){r.timezone=C}function R(C){r.start_elevation_at_zero=C}function v(C){r.use_raw_gpx_speed=C}function b(C){r.display_ascent=C}function S(C){r.imperial_units=C}function O(C){r.weekm=C}return bt(()=>{n.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES)}),(C,P)=>{const M=oe("ErrorMessage");return A(),N("div",pve,[p("div",mve,[f.value?(A(),te(M,{key:0,message:f.value},null,8,["message"])):x("",!0),p("form",{onSubmit:Je(E,["prevent"])},[p("div",Eve,T(C.$t("user.PROFILE.INTERFACE")),1),p("label",hve,[j(T(C.$t("user.PROFILE.LANGUAGE"))+" ",1),qe(p("select",{id:"language","onUpdate:modelValue":P[0]||(P[0]=w=>r.language=w),disabled:c.value},[(A(!0),N(Re,null,ze(h(Zl),w=>(A(),N("option",{value:w.value,key:w.value},T(w.label),9,Tve))),128))],8,_ve),[[ks,r.language]])]),p("label",gve,[j(T(C.$t("user.PROFILE.THEME_MODE.LABEL"))+" ",1),qe(p("select",{id:"use_dark_mode","onUpdate:modelValue":P[1]||(P[1]=w=>r.use_dark_mode=w),disabled:c.value},[(A(),N(Re,null,ze(l,w=>p("option",{value:w.value,key:w.label},T(C.$t(`user.PROFILE.THEME_MODE.VALUES.${w.label}`)),9,Sve)),64))],8,Ave),[[ks,r.use_dark_mode]])]),p("label",Ove,[j(T(C.$t("user.PROFILE.TIMEZONE"))+" ",1),k(dve,{input:r.timezone,disabled:c.value,onUpdateTimezone:I},null,8,["input","disabled"])]),p("label",Ive,[j(T(C.$t("user.PROFILE.DATE_FORMAT"))+" ",1),qe(p("select",{id:"date_format","onUpdate:modelValue":P[2]||(P[2]=w=>r.date_format=w),disabled:c.value},[(A(!0),N(Re,null,ze(d.value,w=>(A(),N("option",{value:w.value,key:w.value},T(w.label),9,Rve))),128))],8,vve),[[ks,r.date_format]])]),p("div",bve,[p("span",Nve,T(C.$t("user.PROFILE.FIRST_DAY_OF_WEEK")),1),p("div",Cve,[(A(),N(Re,null,ze(a,w=>p("label",{key:w.label},[p("input",{type:"radio",id:w.label,name:w.label,checked:w.value===r.weekm,disabled:c.value,onInput:G=>O(w.value)},null,40,yve),p("span",Dve,T(C.$t(`user.PROFILE.${w.label}`)),1)])),64))])]),p("div",Pve,T(C.$t("workouts.WORKOUT",0)),1),p("div",wve,[p("span",Lve,T(C.$t("user.PROFILE.UNITS.LABEL")),1),p("div",$ve,[(A(),N(Re,null,ze(s,w=>p("label",{key:w.label},[p("input",{type:"radio",id:w.label,name:w.label,checked:w.value===r.imperial_units,disabled:c.value,onInput:G=>S(w.value)},null,40,kve),p("span",Uve,T(C.$t(`user.PROFILE.UNITS.${w.label}`)),1)])),64))])]),p("div",Mve,[p("span",xve,T(C.$t("user.PROFILE.ASCENT_DATA")),1),p("div",Fve,[(A(),N(Re,null,ze(i,w=>p("label",{key:w.label},[p("input",{type:"radio",id:w.label,name:w.label,checked:w.value===r.display_ascent,disabled:c.value,onInput:G=>b(w.value)},null,40,Wve),p("span",Gve,T(C.$t(`common.${w.label}`)),1)])),64))])]),p("div",zve,[p("span",Bve,T(C.$t("user.PROFILE.ELEVATION_CHART_START.LABEL")),1),p("div",Hve,[(A(),N(Re,null,ze(o,w=>p("label",{key:w.label},[p("input",{type:"radio",id:w.label,name:w.label,checked:w.value===r.start_elevation_at_zero,disabled:c.value,onInput:G=>R(w.value)},null,40,Vve),p("span",jve,T(C.$t(`user.PROFILE.ELEVATION_CHART_START.${w.label}`)),1)])),64))])]),p("div",Kve,[p("span",Yve,T(C.$t("user.PROFILE.USE_RAW_GPX_SPEED.LABEL")),1),p("div",qve,[(A(),N(Re,null,ze(u,w=>p("label",{key:w.label},[p("input",{type:"radio",id:w.label,name:w.label,checked:w.value===r.use_raw_gpx_speed,disabled:c.value,onInput:G=>v(w.value)},null,40,Xve),p("span",Zve,T(C.$t(`user.PROFILE.USE_RAW_GPX_SPEED.${w.label}`)),1)])),64))]),p("div",Qve,[p("span",null,[Jve,j(" "+T(C.$t("user.PROFILE.USE_RAW_GPX_SPEED.HELP")),1)])])]),p("div",eRe,[p("button",tRe,T(C.$t("buttons.SUBMIT")),1),p("button",{class:"cancel",onClick:P[3]||(P[3]=Je(w=>C.$router.push("/profile/preferences"),["prevent"]))},T(C.$t("buttons.CANCEL")),1)])],32)])])}}}),rRe=re(nRe,[["__scopeId","data-v-7b19a78b"]]),aRe={class:"privacy-policy-text"},sRe={class:"last-update"},iRe=["innerHTML"],oRe=["innerHTML"],uRe="Sun, 26 Feb 2023 17:00:00 GMT",cRe=Z({__name:"PrivacyPolicy",setup(e){const t=Me(),n=$(()=>t.getters[H.GETTERS.APP_CONFIG]),r=$(()=>t.getters[H.GETTERS.LANGUAGE]),a=$(()=>t.getters[K.GETTERS.AUTH_USER_PROFILE]),s=$(()=>c()),i=$(()=>l()),o=$(()=>f()),u=["DATA_COLLECTED","INFORMATION_USAGE","INFORMATION_PROTECTION","INFORMATION_DISCLOSURE","SITE_USAGE_BY_CHILDREN","YOUR_CONSENT","ACCOUNT_DELETION","CHANGES_TO_OUR_PRIVACY_POLICY"];function l(){return a.value.timezone?a.value.timezone:Intl.DateTimeFormat().resolvedOptions().timeZone?Intl.DateTimeFormat().resolvedOptions().timeZone:"Europe/Paris"}function c(){return nA[r.value]}function f(){return kn(n.value.privacy_policy&&n.value.privacy_policy_date?`${n.value.privacy_policy_date}`:uRe,i.value,s.value,!1)}return(d,m)=>(A(),N("div",aRe,[p("h1",null,T(Rt(d.$t("privacy_policy.TITLE"))),1),p("p",sRe,[j(T(d.$t("privacy_policy.LAST_UPDATE"))+": ",1),p("time",null,T(o.value),1)]),n.value.privacy_policy?(A(),N("div",{key:0,innerHTML:h(ca)(h(di)(n.value.privacy_policy))},null,8,iRe)):(A(),N(Re,{key:1},ze(u,E=>(A(),N(Re,{key:E},[p("h2",null,T(d.$t(`privacy_policy.CONTENT.${E}.TITLE`)),1),p("p",{innerHTML:h(ca)(d.$t(`privacy_policy.CONTENT.${E}.CONTENT`))},null,8,oRe)],64))),64))]))}}),AA=re(cRe,[["__scopeId","data-v-31d5cd27"]]),lRe={id:"user-privacy-policy"},dRe={key:1},fRe={class:"policy-content"},pRe={for:"accepted_policy",class:"accepted_policy"},mRe={class:"form-buttons"},ERe={class:"confirm",type:"submit"},hRe=Z({__name:"UserPrivacyPolicyValidation",props:{user:{}},setup(e){const t=e,{user:n}=_e(t),r=Me(),a=$(()=>r.getters[H.GETTERS.ERROR_MESSAGES]),s=le(!1),i=le(!1);function o(){r.dispatch(K.ACTIONS.ACCEPT_PRIVACY_POLICY,s.value)}function u(){i.value=!0}return bt(()=>{r.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES)}),(l,c)=>{const f=oe("ErrorMessage"),d=oe("router-link"),m=oe("i18n-t");return A(),N("div",lRe,[a.value?(A(),te(f,{key:0,message:a.value},null,8,["message"])):x("",!0),h(n).accepted_privacy_policy?(A(),N("div",dRe,[p("p",null,[k(m,{keypath:"user.YOU_HAVE_ACCEPTED_PRIVACY_POLICY"},{default:ue(()=>[k(d,{to:"/privacy-policy"},{default:ue(()=>[j(T(l.$t("privacy_policy.TITLE")),1)]),_:1})]),_:1})]),p("button",{class:"cancel",onClick:c[0]||(c[0]=E=>l.$router.push("/profile"))},T(l.$t("user.PROFILE.BACK_TO_PROFILE")),1)])):(A(),N("form",{key:2,class:Se({errors:i.value}),onSubmit:c[3]||(c[3]=Je(E=>o(),["prevent"]))},[p("div",fRe,[k(AA)]),p("label",pRe,[qe(p("input",{type:"checkbox",id:"accepted_policy",required:"","onUpdate:modelValue":c[1]||(c[1]=E=>s.value=E),onInvalid:u},null,544),[[rf,s.value]]),p("span",null,[k(m,{keypath:"user.READ_AND_ACCEPT_PRIVACY_POLICY"},{default:ue(()=>[j(T(l.$t("privacy_policy.TITLE")),1)]),_:1})])]),k(d,{to:"/profile/edit/account"},{default:ue(()=>[j(T(l.$t("user.I_WANT_TO_DELETE_MY_ACCOUNT")),1)]),_:1}),p("div",mRe,[p("button",ERe,T(l.$t("buttons.SUBMIT")),1),p("button",{class:"cancel",onClick:c[2]||(c[2]=E=>l.$router.push("/profile"))},T(l.$t("user.PROFILE.BACK_TO_PROFILE")),1)])],34))])}}}),_Re=re(hRe,[["__scopeId","data-v-9b1ceaf7"]]),TRe=["profile:read","profile:write","users:read","users:write","workouts:read","workouts:write"],gRe=["application:write"],ARe={id:"new-oauth2-app"},SRe={id:"new-oauth2-title"},ORe={id:"apps-form"},IRe={class:"form-items"},vRe={class:"form-item"},RRe={for:"app-name"},bRe={class:"form-item"},NRe={for:"app-description"},CRe={class:"form-item"},yRe={for:"app-url"},DRe={class:"form-item"},PRe={for:"app-redirect-uri"},wRe={class:"form-item-scope"},LRe={class:"form-item-scope-label"},$Re={class:"scope-label"},kRe=["name","checked","onChange"],URe=["innerHTML"],MRe={class:"form-buttons"},xRe=["disabled"],FRe=Z({__name:"AddUserApp",props:{authUser:{}},setup(e){const t=e,n=Me(),r=zt({client_name:"",client_uri:"",client_description:"",description:"",redirect_uri:""}),a=zt([]),s=$(()=>l(t.authUser,gRe,TRe));function i(){const c={client_name:r.client_name,client_description:r.client_description,client_uri:r.client_uri,redirect_uris:[r.redirect_uri],scope:a.sort().join(" ")};n.dispatch(Ye.ACTIONS.CREATE_CLIENT,c)}function o(c){r.client_description=c}function u(c){const f=a.indexOf(c);f>-1?a.splice(f,1):a.push(c)}function l(c,f,d){const m=[...d];return c.admin&&m.push(...f),m.sort()}return(c,f)=>{const d=oe("CustomTextArea");return A(),N("div",ARe,[p("h1",SRe,T(c.$t("oauth2.ADD_A_NEW_APP")),1),p("div",ORe,[p("form",{onSubmit:Je(i,["prevent"])},[p("div",IRe,[p("div",vRe,[p("label",RRe,T(c.$t("oauth2.APP.NAME"))+"*",1),qe(p("input",{id:"app-name",type:"text",required:"","onUpdate:modelValue":f[0]||(f[0]=m=>r.client_name=m)},null,512),[[at,r.client_name]])]),p("div",bRe,[p("label",NRe,T(c.$t("oauth2.APP.DESCRIPTION")),1),k(d,{name:"app-description",charLimit:200,input:r.description,onUpdateValue:o},null,8,["input"])]),p("div",CRe,[p("label",yRe,T(c.$t("oauth2.APP.URL"))+"*",1),qe(p("input",{id:"app-url",type:"text",required:"","onUpdate:modelValue":f[1]||(f[1]=m=>r.client_uri=m)},null,512),[[at,r.client_uri]])]),p("div",DRe,[p("label",PRe,T(c.$t("oauth2.APP.REDIRECT_URL"))+"* ",1),qe(p("input",{id:"app-redirect-uri",type:"text",required:"","onUpdate:modelValue":f[2]||(f[2]=m=>r.redirect_uri=m)},null,512),[[at,r.redirect_uri]])]),p("div",wRe,[p("div",LRe,T(c.$t("oauth2.APP.SCOPE.LABEL"))+"* ",1),(A(!0),N(Re,null,ze(s.value,m=>(A(),N("div",{class:"form-item-scope-checkboxes",key:m},[p("label",$Re,[p("input",{type:"checkbox",name:m,checked:a.includes(m),onChange:E=>u(m)},null,40,kRe),p("code",null,T(m),1)]),p("p",{class:"scope-description",innerHTML:c.$t(`oauth2.APP.SCOPE.${m}_DESCRIPTION`)},null,8,URe)]))),128))])]),p("div",MRe,[p("button",{class:"confirm",type:"submit",disabled:a.length===0},T(c.$t("buttons.SUBMIT")),9,xRe),p("button",{class:"cancel",onClick:f[3]||(f[3]=Je(()=>c.$router.push("/profile/apps"),["prevent"]))},T(c.$t("buttons.CANCEL")),1)])],32)])])}}}),WRe=re(FRe,[["__scopeId","data-v-e2284e06"]]),GRe={id:"authorize-oauth2-app"},zRe={key:0},BRe={id:"authorize-oauth2-title"},HRe={class:"oauth2-access description-list"},VRe={class:"client-scope"},jRe=["innerHTML"],KRe={class:"authorize-oauth2-buttons"},YRe={key:1},qRe={class:"no-app"},XRe=Z({__name:"AuthorizeUserApp",setup(e){const t=qt(),n=Me(),r=$(()=>n.getters[Ye.GETTERS.CLIENT]),a=$(()=>n.getters[H.GETTERS.ERROR_MESSAGES]);Ct(()=>s());function s(){t.query.client_id&&typeof t.query.client_id=="string"&&n.dispatch(Ye.ACTIONS.GET_CLIENT_BY_CLIENT_ID,t.query.client_id)}function i(){n.dispatch(Ye.ACTIONS.AUTHORIZE_CLIENT,{client_id:`${t.query.client_id}`,redirect_uri:`${t.query.redirect_uri}`,response_type:`${t.query.response_type}`,scope:`${t.query.scope}`,state:`${t.query.state?t.query.state:""}`,code_challenge:`${t.query.code_challenge?t.query.code_challenge:""}`,code_challenge_method:`${t.query.code_challenge_method?t.query.code_challenge_method:""}`})}return(o,u)=>{const l=oe("router-link"),c=oe("i18n-t"),f=oe("ErrorMessage");return A(),N("div",GRe,[r.value.client_id?(A(),N("div",zRe,[p("h1",BRe,[k(c,{keypath:"oauth2.AUTHORIZE_APP"},{default:ue(()=>[k(l,{to:{name:"UserApp",params:{id:r.value.id}}},{default:ue(()=>[j(T(r.value.name),1)]),_:1},8,["to"])]),_:1})]),a.value?(A(),te(f,{key:0,message:a.value},null,8,["message"])):x("",!0),p("div",HRe,[p("p",null,T(o.$t("oauth2.APP_REQUESTING_ACCESS")),1),p("dl",null,[(A(!0),N(Re,null,ze(r.value.scope.split(" "),d=>(A(),N(Re,{key:d},[p("dt",VRe,[p("code",null,T(d),1)]),p("dd",{innerHTML:o.$t(`oauth2.APP.SCOPE.${d}_DESCRIPTION`)},null,8,jRe)],64))),128))]),p("div",KRe,[p("button",{class:"danger",onClick:i},T(o.$t("buttons.AUTHORIZE")),1),p("button",{class:"cancel",onClick:u[0]||(u[0]=d=>o.$router.push("/profile/apps"))},T(o.$t("buttons.CANCEL")),1)])])])):(A(),N("div",YRe,[p("p",qRe,T(o.$t("oauth2.NO_APP")),1),p("button",{onClick:u[1]||(u[1]=d=>o.$router.push("/profile/apps"))},T(o.$t("buttons.BACK")),1)]))])}}}),ZRe=re(XRe,[["__scopeId","data-v-a8ed6bf8"]]),QRe={id:"oauth2-apps"},JRe=Z({__name:"index",props:{user:{}},setup(e){const t=e,n=Me(),{user:r}=_e(t);return bt(()=>{n.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),n.commit(Ye.MUTATIONS.SET_CLIENTS,[])}),(a,s)=>{const i=oe("router-view");return A(),N("div",QRe,[k(i,{authUser:h(r)},null,8,["authUser"])])}}}),ebe={id:"oauth2-app",class:"description-list"},tbe={key:1},nbe={key:0,class:"info-box success-message"},rbe=["title"],abe={key:0},sbe={key:1,class:"app-secret"},ibe=["title"],obe={class:"client-scopes"},ube={class:"app-buttons"},cbe={key:2},lbe={class:"no-app"},dbe=Z({__name:"UserApp",props:{authUser:{},afterCreation:{type:Boolean,default:!1}},setup(e){const t=e,n=qt(),r=Me(),{afterCreation:a,authUser:s}=_e(t),i=$(()=>r.getters[Ye.GETTERS.CLIENT]),o=$(()=>r.getters[Ye.GETTERS.REVOCATION_SUCCESSFUL]),u=le(!1),l=le(""),c=le(!1),f=le(!1),d=le(!1);Ct(()=>{m(),navigator.clipboard&&(d.value=!0)});function m(){!a.value&&n.params.id&&typeof n.params.id=="string"&&r.dispatch(Ye.ACTIONS.GET_CLIENT_BY_ID,+n.params.id)}function E(S){l.value=S?"oauth2.APP_DELETION_CONFIRMATION":"oauth2.TOKENS_REVOCATION_CONFIRMATION",I(!0)}function I(S){u.value=S,S||(l.value="")}function R(S){l.value==="oauth2.APP_DELETION_CONFIRMATION"?r.dispatch(Ye.ACTIONS.DELETE_CLIENT,S):r.dispatch(Ye.ACTIONS.REVOKE_ALL_TOKENS,S)}function v(){navigator.clipboard.writeText(i.value.client_id),c.value=!0,f.value=!1,setTimeout(()=>{c.value=!1},3e3)}function b(){i.value.client_secret&&(navigator.clipboard.writeText(i.value.client_secret),f.value=!0,c.value=!1,setTimeout(()=>{f.value=!1},3e3))}return bt(()=>{r.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),r.commit(Ye.MUTATIONS.EMPTY_CLIENT),r.commit(Ye.MUTATIONS.SET_REVOCATION_SUCCESSFUL,!1)}),Ge(()=>o.value,S=>{S&&I(!1)}),(S,O)=>{const C=oe("Modal");return A(),N("div",ebe,[u.value?(A(),te(C,{key:0,title:S.$t("common.CONFIRMATION"),message:S.$t(l.value),onConfirmAction:O[0]||(O[0]=P=>R(i.value.id)),onCancelAction:O[1]||(O[1]=P=>I(!1)),onKeydown:O[2]||(O[2]=At(P=>I(!1),["esc"]))},null,8,["title","message"])):x("",!0),i.value&&i.value.client_id?(A(),N("div",tbe,[h(a)||o.value?(A(),N("div",nbe,T(S.$t(h(a)?"oauth2.APP_CREATED_SUCCESSFULLY":"oauth2.TOKENS_REVOKED")),1)):x("",!0),p("dl",null,[p("dt",null,T(S.$t("oauth2.APP.CLIENT_ID"))+":",1),p("dd",null,[j(T(i.value.client_id)+" ",1),h(a)&&d.value?(A(),N("i",{key:0,class:Se(`fa fa-${c.value?"check":"copy"}`),"aria-hidden":"true",title:S.$t("oauth2.COPY_TO_CLIPBOARD"),onClick:v},null,10,rbe)):x("",!0)]),h(a)&&i.value.client_secret?(A(),N("dt",abe,T(S.$t("oauth2.APP.CLIENT_SECRET"))+": ",1)):x("",!0),h(a)&&i.value.client_secret?(A(),N("dd",sbe,[j(T(i.value.client_secret)+" ",1),d.value?(A(),N("i",{key:0,class:Se(`fa fa-${f.value?"check":"copy"}`),"aria-hidden":"true",title:S.$t("oauth2.COPY_TO_CLIPBOARD"),onClick:b},null,10,ibe)):x("",!0)])):x("",!0),p("dt",null,T(Rt(S.$t("oauth2.APP.ISSUE_AT")))+":",1),p("dd",null,[p("time",null,T(h(kn)(i.value.issued_at,h(s).timezone,h(s).date_format)),1)]),p("dt",null,T(S.$t("oauth2.APP.NAME"))+":",1),p("dd",null,T(i.value.name),1),p("dt",null,T(S.$t("oauth2.APP.DESCRIPTION"))+":",1),p("dd",{class:Se({"no-description":!i.value.client_description})},T(i.value.client_description?i.value.client_description:S.$t("oauth2.NO_DESCRIPTION")),3),p("dt",null,T(S.$t("oauth2.APP.URL"))+":",1),p("dd",null,T(i.value.website),1),p("dt",null,T(S.$t("oauth2.APP.REDIRECT_URL"))+":",1),p("dd",null,T(i.value.redirect_uris.length>0?i.value.redirect_uris[0]:""),1),p("dt",null,T(S.$t("oauth2.APP.SCOPE.LABEL"))+":",1),p("dd",obe,[(A(!0),N(Re,null,ze(i.value.scope.split(" "),P=>(A(),N("span",{class:"client-scope",key:P},[p("code",null,T(P),1)]))),128))])]),p("div",ube,[p("button",{class:"danger",onClick:O[3]||(O[3]=P=>E(!1))},T(S.$t("oauth2.REVOKE_ALL_TOKENS")),1),p("button",{class:"danger",onClick:O[4]||(O[4]=P=>E(!0))},T(S.$t("oauth2.DELETE_APP")),1),p("button",{onClick:O[5]||(O[5]=P=>S.$router.push("/profile/apps"))},T(S.$t("buttons.BACK")),1)])])):(A(),N("div",cbe,[p("p",lbe,T(S.$t("oauth2.NO_APP")),1),p("button",{onClick:O[6]||(O[6]=P=>S.$router.push("/profile/apps"))},T(S.$t("buttons.BACK")),1)]))])}}}),QE=re(dbe,[["__scopeId","data-v-3a7d0f4a"]]),fbe={id:"oauth2-apps-list"},pbe={class:"apps-list"},mbe={key:0},Ebe={class:"app-issued-at"},hbe={key:1,class:"no-apps"},_be={class:"app-list-buttons"},Tbe=Z({__name:"UserAppsList",props:{authUser:{}},setup(e){const t=e,n=Me(),r=qt(),{authUser:a}=_e(t),s=$(()=>n.getters[Ye.GETTERS.CLIENTS]),i=$(()=>n.getters[Ye.GETTERS.CLIENTS_PAGINATION]);let o=u(r.query);Ct(()=>{l(o)});function u(c){const f={};return c.page&&(f.page=Cd(c.page,Xg)),f}function l(c){n.dispatch(Ye.ACTIONS.GET_CLIENTS,c)}return Ge(()=>r.query,async c=>{o=u(c),l(o)}),(c,f)=>{const d=oe("router-link");return A(),N("div",fbe,[p("p",pbe,T(c.$t("oauth2.APPS_LIST")),1),s.value.length>0?(A(),N("ul",mbe,[(A(!0),N(Re,null,ze(s.value,m=>(A(),N("li",{key:m.client_id},[k(d,{to:{name:"UserApp",params:{id:m.id}}},{default:ue(()=>[j(T(m.name),1)]),_:2},1032,["to"]),p("span",Ebe,[j(T(c.$t("oauth2.APP.ISSUE_AT"))+" ",1),p("time",null,T(h(kn)(m.issued_at,h(a).timezone,h(a).date_format)),1)])]))),128))])):(A(),N("div",hbe,T(c.$t("oauth2.NO_APPS")),1)),s.value.length>0?(A(),te($u,{key:2,pagination:i.value,path:"/profile/apps",query:h(o)},null,8,["pagination","query"])):x("",!0),p("div",_be,[p("button",{onClick:f[0]||(f[0]=m=>c.$router.push("/profile/apps/new"))},T(c.$t("oauth2.NEW_APP")),1),p("button",{onClick:f[1]||(f[1]=m=>c.$router.push("/"))},T(c.$t("common.HOME")),1)])])}}}),gbe=re(Tbe,[["__scopeId","data-v-064a87b7"]]),Abe={id:"user-sport-preferences"},Sbe={key:0,class:"responsive-table"},Obe={class:"mobile-display"},Ibe={key:0,class:"profile-buttons mobile-display"},vbe={key:1,class:"profile-buttons"},Rbe={class:"text-left"},bbe={key:0},Nbe={class:"cell-heading"},Cbe=["value"],ybe={class:"cell-heading"},Dbe={key:0,class:"disabled-message"},Pbe={key:1,class:"fa fa-refresh fa-spin fa-fw"},wbe={class:"cell-heading"},Lbe={class:"cell-heading"},$be=["checked"],kbe={class:"cell-heading"},Ube=["value"],Mbe={key:1},xbe={key:0,class:"action-buttons"},Fbe={class:"cell-heading"},Wbe=["onClick"],Gbe={key:1,class:"edition-buttons"},zbe=["disabled"],Bbe=["disabled","onClick"],Hbe=["disabled"],Vbe={key:0,class:"profile-buttons"},jbe={key:1,class:"profile-buttons"},Kbe="#838383",Ybe=Z({__name:"UserSportPreferences",props:{user:{},isEdition:{type:Boolean}},setup(e){const t=e,n=Me(),{t:r}=Yt(),{isEdition:a,user:s}=_e(t),i=It("sportColors"),o=$(()=>n.getters[Mt.GETTERS.SPORTS]),u=$(()=>Xr(o.value,r,"is_active",s.value.sports_list)),l=$(()=>n.getters[K.GETTERS.USER_LOADING]),c=$(()=>n.getters[H.GETTERS.ERROR_MESSAGES]),f=zt({sport_id:0,color:null,is_active:!0,stopped_speed_threshold:1});function d(O){O!==null?(f.sport_id=O.id,f.color=O.color?O.color:i?i[O.label]:Kbe,f.is_active=O.is_active_for_user,f.stopped_speed_threshold=O.stopped_speed_threshold):v()}function m(O){return f.sport_id===O}function E(O){f.color=O.target.value}function I(O){f.stopped_speed_threshold=parseFloat(O.target.value)}function R(O){f.is_active=O.target.checked}function v(){f.sport_id=0,f.color=null,f.is_active=!0,f.stopped_speed_threshold=1,n.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES)}function b(O){O.preventDefault(),n.dispatch(K.ACTIONS.UPDATE_USER_SPORT_PREFERENCES,f)}function S(O,C){O.preventDefault(),n.dispatch(K.ACTIONS.RESET_USER_SPORT_PREFERENCES,C)}return Ge(()=>l.value,O=>{!O&&!c.value&&v()}),(O,C)=>{const P=oe("SportImage"),M=oe("ErrorMessage");return A(),N("div",Abe,[o.value.length>0?(A(),N("div",Sbe,[p("div",Obe,[h(a)?(A(),N("div",Ibe,[p("button",{class:"cancel",onClick:C[0]||(C[0]=Je(w=>O.$router.push("/profile/sports"),["prevent"]))},T(O.$t("buttons.BACK")),1)])):(A(),N("div",vbe,[p("button",{onClick:C[1]||(C[1]=w=>O.$router.push("/profile/edit/sports"))},T(O.$t("user.PROFILE.EDIT_SPORTS_PREFERENCES")),1),p("button",{onClick:C[2]||(C[2]=w=>O.$router.push("/"))},T(O.$t("common.HOME")),1)]))]),p("table",null,[p("thead",null,[p("tr",null,[p("th",null,T(O.$t("user.PROFILE.SPORT.COLOR")),1),p("th",Rbe,T(O.$t("workouts.SPORT",0)),1),p("th",null,T(O.$t("workouts.WORKOUT",0)),1),p("th",null,T(O.$t("user.PROFILE.SPORT.IS_ACTIVE")),1),p("th",null,T(O.$t("user.PROFILE.SPORT.STOPPED_SPEED_THRESHOLD")),1),h(a)?(A(),N("th",bbe,T(O.$t("user.PROFILE.SPORT.ACTION")),1)):x("",!0)])]),p("tbody",null,[(A(!0),N(Re,null,ze(u.value,w=>(A(),N("tr",{key:w.id},[p("td",null,[p("span",Nbe,T(O.$t("user.PROFILE.SPORT.COLOR")),1),m(w.id)?(A(),N("input",{key:0,class:"sport-color",type:"color",value:f.color,onInput:E},null,40,Cbe)):(A(),te(P,{key:1,title:w.translatedLabel,"sport-label":w.label,color:w.color?w.color:h(i)[w.label]},null,8,["title","sport-label","color"]))]),p("td",{class:Se(["sport-label",{"disabled-sport":!w.is_active}])},[p("span",ybe,T(O.$t("user.PROFILE.SPORT.LABEL")),1),j(" "+T(w.translatedLabel)+" ",1),w.is_active?x("",!0):(A(),N("span",Dbe," ("+T(O.$t("user.PROFILE.SPORT.DISABLED_BY_ADMIN"))+") ",1)),l.value&&m(w.id)?(A(),N("i",Pbe)):x("",!0),c.value&&f.sport_id===w.id?(A(),te(M,{key:2,message:c.value},null,8,["message"])):x("",!0)],2),p("td",{class:Se(["text-center",{"disabled-sport":!w.is_active}])},[p("span",wbe,T(O.$t("workouts.WORKOUT",0)),1),p("i",{class:Se(`fa fa${h(s).sports_list.includes(w.id)?"-check":""}`),"aria-hidden":"true"},null,2)],2),p("td",{class:Se(["text-center",{"disabled-sport":!w.is_active}])},[p("span",Lbe,T(O.$t("user.PROFILE.SPORT.IS_ACTIVE")),1),m(w.id)&&w.is_active?(A(),N("input",{key:0,type:"checkbox",checked:w.is_active_for_user,onChange:R},null,40,$be)):(A(),N("i",{key:1,class:Se(`fa fa${w.is_active_for_user?"-check":""}`),"aria-hidden":"true"},null,2))],2),p("td",{class:Se(["text-center",{"disabled-sport":!w.is_active}])},[p("span",kbe,T(O.$t("user.PROFILE.SPORT.STOPPED_SPEED_THRESHOLD")),1),m(w.id)&&w.is_active?(A(),N("input",{key:0,class:"threshold-input",type:"number",min:"0",step:"0.1",value:f.stopped_speed_threshold,onInput:I},null,40,Ube)):(A(),N("span",Mbe,T(w.stopped_speed_threshold),1))],2),h(a)?(A(),N("td",xbe,[p("span",Fbe,T(O.$t("user.PROFILE.SPORT.ACTION")),1),f.sport_id===0?(A(),N("button",{key:0,onClick:G=>d(w)},T(O.$t("buttons.EDIT")),9,Wbe)):x("",!0),m(w.id)?(A(),N("div",Gbe,[p("button",{disabled:l.value,onClick:b},T(O.$t("buttons.SUBMIT")),9,zbe),p("button",{disabled:l.value,onClick:G=>S(G,w.id)},T(O.$t("buttons.RESET")),9,Bbe),p("button",{disabled:l.value,onClick:C[3]||(C[3]=G=>d(null))},T(O.$t("buttons.CANCEL")),9,Hbe)])):x("",!0)])):x("",!0)]))),128))])]),h(a)?(A(),N("div",Vbe,[p("button",{class:"cancel",onClick:C[4]||(C[4]=Je(w=>O.$router.push("/profile/sports"),["prevent"]))},T(O.$t("buttons.BACK")),1)])):(A(),N("div",jbe,[p("button",{onClick:C[5]||(C[5]=w=>O.$router.push("/profile/edit/sports"))},T(O.$t("user.PROFILE.EDIT_SPORTS_PREFERENCES")),1),p("button",{onClick:C[6]||(C[6]=w=>O.$router.push("/"))},T(O.$t("common.HOME")),1)]))])):x("",!0)])}}}),JE=re(Ybe,[["__scopeId","data-v-aa4857fe"]]),wi=e=>(ot("data-v-34b1686b"),e=e(),ut(),e),qbe={class:"about-text"},Xbe=["innerHTML"],Zbe=wi(()=>p("i",{class:"fa fa-book fa-padding","aria-hidden":"true"},null,-1)),Qbe=["href"],Jbe=wi(()=>p("i",{class:"fa fa-github fa-padding","aria-hidden":"true"},null,-1)),eNe={href:"https://github.com/SamR1/FitTrackee",target:"_blank",rel:"noopener noreferrer"},tNe=wi(()=>p("i",{class:"fa fa-balance-scale fa-padding","aria-hidden":"true"},null,-1)),nNe=wi(()=>p("a",{href:"https://choosealicense.com/licenses/agpl-3.0/",target:"_blank",rel:"noopener noreferrer"},"AGPLv3",-1)),rNe={key:0},aNe=wi(()=>p("i",{class:"fa fa-envelope-o fa-padding","aria-hidden":"true"},null,-1)),sNe=["href"],iNe={key:1},oNe=["href"],uNe={class:"about-instance"},cNe=["innerHTML"],lNe=Z({__name:"About",setup(e){const t=Me(),n=$(()=>t.getters[H.GETTERS.APP_CONFIG]),r=$(()=>i()),a=$(()=>t.getters[H.GETTERS.LANGUAGE]),s=$(()=>o());function i(){const u={};return n.value.weather_provider==="visualcrossing"&&(u.name="Visual Crossing",u.url="https://www.visualcrossing.com"),u}function o(){let u="https://samr1.github.io/FitTrackee/";return a.value==="fr"&&(u+="fr/"),u}return(u,l)=>{const c=oe("i18n-t");return A(),N("div",qbe,[p("div",null,[p("p",{class:"error-message",innerHTML:u.$t("about.FITTRACKEE_DESCRIPTION")},null,8,Xbe),p("p",null,[Zbe,p("a",{class:"documentation-link",href:s.value,target:"_blank",rel:"noopener noreferrer"},T(Rt(u.$t("common.DOCUMENTATION"))),9,Qbe)]),p("p",null,[Jbe,p("a",eNe,T(u.$t("about.SOURCE_CODE")),1)]),p("p",null,[tNe,k(c,{keypath:"about.FITTRACKEE_LICENSE"},{default:ue(()=>[nNe]),_:1})]),n.value.admin_contact?(A(),N("div",rNe,[aNe,p("a",{href:`mailto:${n.value.admin_contact}`},T(u.$t("about.CONTACT_ADMIN")),9,sNe)])):x("",!0),r.value&&r.value.name?(A(),N("div",iNe,[j(T(u.$t("about.WEATHER_DATA_FROM"))+" ",1),p("a",{href:r.value.url,target:"_blank",rel:"nofollow noopener"},T(r.value.name),9,oNe)])):x("",!0),n.value.about?(A(),N(Re,{key:2},[p("p",uNe,T(u.$t("about.ABOUT_THIS_INSTANCE")),1),p("div",{innerHTML:h(ca)(h(di)(n.value.about))},null,8,cNe)],64)):x("",!0)])])}}}),dNe=re(lNe,[["__scopeId","data-v-34b1686b"]]),fNe={},pNe={id:"bike"},mNe=["src"];function ENe(e,t){return A(),N("div",pNe,[p("img",{class:"bike-img",src:"/img/bike.svg",alt:"mountain bike"},null,8,mNe)])}const SA=re(fNe,[["render",ENe],["__scopeId","data-v-dc181e30"]]),hNe={id:"about",class:"view"},_Ne={class:"container"},TNe={class:"container-sub"},gNe={class:"container-sub about-details"},ANe=Z({__name:"AboutView",setup(e){return(t,n)=>(A(),N("div",hNe,[p("div",_Ne,[p("div",TNe,[k(SA)]),p("div",gNe,[k(dNe)])])]))}}),SNe=re(ANe,[["__scopeId","data-v-ef9c7198"]]),ONe={id:"error"},INe={class:"error-content"},vNe=Z({__name:"Error",props:{title:{},message:{},buttonText:{},path:{default:"/"}},setup(e){const t=e,{buttonText:n,title:r,message:a,path:s}=_e(t);return(i,o)=>(A(),N("div",ONe,[p("div",INe,[p("h1",null,T(h(r)),1),p("p",null,T(h(a)),1),h(n)?(A(),N("button",{key:0,onClick:o[0]||(o[0]=u=>i.$router.push(h(s))),class:"upper"},T(h(n)),1)):x("",!0)])]))}}),RNe=re(vNe,[["__scopeId","data-v-48ec856d"]]),d0=Z({__name:"NotFound",props:{target:{default:"PAGE"}},setup(e){const t=e,{target:n}=_e(t),r=le(),a=le(!1);_t(()=>s());function s(){r.value=setTimeout(()=>{a.value=!0},500)}return bt(()=>{r.value&&clearTimeout(r.value)}),(i,o)=>a.value?(A(),te(RNe,{key:0,title:"404",message:i.$t(`error.NOT_FOUND.${h(n)}`),"button-text":i.$t("common.HOME")},null,8,["message","button-text"])):x("",!0)}}),bNe=e=>(ot("data-v-5eee0876"),e=e(),ut(),e),NNe={id:"admin",class:"view"},CNe={key:0,class:"container"},yNe=bNe(()=>p("div",{id:"bottom"},null,-1)),DNe=Z({__name:"AdminView",setup(e){const t=Me(),n=$(()=>t.getters[H.GETTERS.APP_CONFIG]),r=$(()=>t.getters[H.GETTERS.APP_STATS]),a=$(()=>t.getters[K.GETTERS.IS_ADMIN]),s=$(()=>t.getters[K.GETTERS.USER_LOADING]);return Ct(()=>t.dispatch(H.ACTIONS.GET_APPLICATION_STATS)),(i,o)=>{const u=oe("router-view");return A(),N("div",NNe,[s.value?x("",!0):(A(),N("div",CNe,[a.value?(A(),te(u,{key:0,appConfig:n.value,appStatistics:r.value},null,8,["appConfig","appStatistics"])):(A(),te(d0,{key:1})),yNe]))])}}}),PNe=re(DNe,[["__scopeId","data-v-5eee0876"]]),OA="/img/workouts/mountains.svg",wNe=p("div",{class:"map-attribution"},[p("span",{class:"map-attribution-text"},"©"),p("a",{class:"map-attribution-text",href:"https://www.openstreetmap.org/copyright",target:"_blank",rel:"noopener noreferrer"}," OpenStreetMap ")],-1),IA=Z({__name:"StaticMap",props:{workout:{},displayHover:{type:Boolean,default:!1}},setup(e){const t=e,{displayHover:n}=_e(t),r=`${Si()}workouts/map/${t.workout.map}`;return(a,s)=>(A(),N("div",{class:Se(["static-map",{"display-hover":h(n)}])},[h(n)?(A(),N("img",{key:0,src:r,alt:""})):(A(),N("div",{key:1,class:"bg-map-image",style:Vr({backgroundImage:`url(${r})`})},null,4)),wNe],2))}}),f0=e=>(ot("data-v-0bcae633"),e=e(),ut(),e),LNe={class:"timeline-workout"},$Ne={class:"box"},kNe={class:"workout-user-date"},UNe={class:"workout-user"},MNe=["title"],xNe={key:0},FNe={key:1,class:"no-map"},WNe={class:"img"},GNe={class:"data"},zNe=f0(()=>p("i",{class:"fa fa-clock-o","aria-hidden":"true"},null,-1)),BNe={key:0},HNe={class:"data"},VNe=f0(()=>p("i",{class:"fa fa-road","aria-hidden":"true"},null,-1)),jNe={key:0,class:"data elevation"},KNe=["alt"],YNe={class:"data-values"},qNe={key:1,class:"data altitude"},XNe=f0(()=>p("i",{class:"fa fa-location-arrow","aria-hidden":"true"},null,-1)),ZNe={class:"data-values"},QNe=Z({__name:"WorkoutCard",props:{user:{},useImperialUnits:{type:Boolean},workout:{default:()=>({})},sport:{default:()=>({})}},setup(e){const t=e,n=Me(),{user:r,workout:a,sport:s,useImperialUnits:i}=_e(t),o=$(()=>n.getters[H.GETTERS.LOCALE]);function u(c){return c.with_gpx&&c.min_alt!==null&&c.max_alt!==null}function l(c){return u(c)&&c.ascent!==null&&c.descent!==null}return(c,f)=>{var I;const d=oe("router-link"),m=oe("SportImage"),E=oe("Distance");return A(),N("div",LNe,[p("div",$Ne,[p("div",kNe,[p("div",UNe,[k(Oi,{user:h(r)},null,8,["user"]),h(r).username?(A(),te(d,{key:0,class:"workout-user-name",to:{name:"User",params:{username:h(r).username}}},{default:ue(()=>[j(T(h(r).username),1)]),_:1},8,["to"])):x("",!0)]),h(a).id?(A(),te(d,{key:0,class:"workout-title",to:{name:"Workout",params:{workoutId:h(a).id}}},{default:ue(()=>[j(T(h(a).title),1)]),_:1},8,["to"])):x("",!0),h(a).workout_date&&h(r)?(A(),N("div",{key:1,class:"workout-date",title:h(kn)(h(a).workout_date,h(r).timezone,h(r).date_format)},T(h(qN)(new Date(h(a).workout_date),new Date,{addSuffix:!0,locale:o.value})),9,MNe)):x("",!0)]),p("div",{class:Se(["workout-map",{"no-cursor":!h(a)}]),onClick:f[0]||(f[0]=R=>h(a).id?c.$router.push({name:"Workout",params:{workoutId:h(a).id}}):null)},[h(a)?(A(),N("div",xNe,[h(a).with_gpx?(A(),te(IA,{key:0,workout:h(a)},null,8,["workout"])):(A(),N("div",FNe,T(c.$t("workouts.NO_MAP")),1))])):x("",!0)],2),p("div",{class:Se(["workout-data",{"without-elevation":!u(h(a))}]),onClick:f[1]||(f[1]=R=>h(a).id?c.$router.push({name:"Workout",params:{workoutId:h(a).id}}):null)},[p("div",WNe,[(I=h(s))!=null&&I.label?(A(),te(m,{key:0,"sport-label":h(s).label,color:h(s).color},null,8,["sport-label","color"])):x("",!0)]),p("div",GNe,[zNe,h(a)?(A(),N("span",BNe,T(h(a).moving),1)):x("",!0)]),p("div",HNe,[VNe,h(a).id?(A(),te(E,{key:0,distance:h(a).distance,digits:3,unitFrom:"km",useImperialUnits:h(i)},null,8,["distance","useImperialUnits"])):x("",!0)]),u(h(a))?(A(),N("div",jNe,[p("img",{class:"mountains",src:OA,alt:c.$t("workouts.ELEVATION")},null,8,KNe),p("div",YNe,[h(a).id?(A(),te(E,{key:0,distance:h(a).min_alt,unitFrom:"m",displayUnit:!1,useImperialUnits:h(i)},null,8,["distance","useImperialUnits"])):x("",!0),j("/ "),h(a).id?(A(),te(E,{key:1,distance:h(a).max_alt,unitFrom:"m",useImperialUnits:h(i)},null,8,["distance","useImperialUnits"])):x("",!0)])])):x("",!0),l(h(a))?(A(),N("div",qNe,[XNe,p("div",ZNe,[j(" +"),h(a).id?(A(),te(E,{key:0,distance:h(a).ascent,unitFrom:"m",displayUnit:!1,useImperialUnits:h(i)},null,8,["distance","useImperialUnits"])):x("",!0),j("/- "),h(a).id?(A(),te(E,{key:1,distance:h(a).descent,unitFrom:"m",useImperialUnits:h(i)},null,8,["distance","useImperialUnits"])):x("",!0)])])):x("",!0)],2)])])}}}),eh=re(QNe,[["__scopeId","data-v-0bcae633"]]),JNe={},e3e={class:"no-workouts box"};function t3e(e,t){const n=oe("router-link");return A(),N("div",e3e,[p("div",null,[j(T(e.$t("workouts.NO_WORKOUTS"))+" ",1),k(n,{to:"/workouts/add"},{default:ue(()=>[j(T(e.$t("workouts.UPLOAD_FIRST_WORKOUT")),1)]),_:1})])])}const p0=re(JNe,[["render",t3e],["__scopeId","data-v-b0c91cc6"]]),kr={ligthMode:{text:"#666",line:"rgba(0, 0, 0, 0.1)"},darkMode:{text:"#a1a1a1",line:"#3f3f3f"}},n3e=(e,t,n,r=!1)=>{const a={speed:{label:t("workouts.SPEED"),backgroundColor:["transparent"],borderColor:[r?"#5f5c97":"#8884d8"],borderWidth:2,data:[],yAxisID:"ySpeed"},elevation:{label:t("workouts.ELEVATION"),backgroundColor:[r?"#303030":"#e5e5e5"],borderColor:[r?"#222222":"#cccccc"],borderWidth:1,fill:!0,data:[],yAxisID:"yElevation"}},s=[],i=[],o=[];return e.map(u=>{s.push(vo("km",u.distance,n)),i.push(u.duration),a.speed.data.push(vo("km",u.speed,n)),u.elevation!==void 0&&a.elevation.data.push(vo("m",u.elevation,n)),o.push({latitude:u.latitude,longitude:u.longitude})}),{distance_labels:s,duration_labels:i,datasets:a,coordinates:o}},r3e=e=>{const t=e.length;if(t===0)return{};const n={};return e.map(r=>{n[r.sport_id]||(n[r.sport_id]={count:0,percentage:0}),n[r.sport_id].count+=1,n[r.sport_id].percentage=n[r.sport_id].count/t}),n},pi={order:"desc",order_by:"workout_date"},a3e={id:"timeline"},s3e={class:"section-title"},i3e={key:0},o3e={key:1},u3e={key:1,class:"more-workouts"},uo=5,c3e=Z({__name:"Timeline",props:{sports:{},user:{}},setup(e){const t=e,n=Me(),{sports:r,user:a}=_e(t),s=le(1),i=t.user.nb_workouts>=uo?uo:t.user.nb_workouts;Ct(()=>l());const o=$(()=>n.getters[Ae.GETTERS.TIMELINE_WORKOUTS]),u=$(()=>o.value.length>0?o.value[o.value.length-1].previous_workout!==null:!1);function l(){n.dispatch(Ae.ACTIONS.GET_TIMELINE_WORKOUTS,{page:s.value,per_page:uo,...pi})}function c(){s.value+=1,n.dispatch(Ae.ACTIONS.GET_MORE_TIMELINE_WORKOUTS,{page:s.value,per_page:uo,...pi})}return(f,d)=>(A(),N("div",a3e,[p("div",s3e,T(f.$t("workouts.LATEST_WORKOUTS")),1),h(a).nb_workouts>0&&o.value.length===0?(A(),N("div",i3e,[(A(!0),N(Re,null,ze([...Array(h(i)).keys()],m=>(A(),te(eh,{user:h(a),useImperialUnits:h(a).imperial_units,key:m},null,8,["user","useImperialUnits"]))),128))])):(A(),N("div",o3e,[(A(!0),N(Re,null,ze(o.value,m=>(A(),te(eh,{workout:m,sport:o.value.length>0?h(r).filter(E=>E.id===m.sport_id)[0]:null,user:h(a),useImperialUnits:h(a).imperial_units,key:m.id},null,8,["workout","sport","user","useImperialUnits"]))),128)),o.value.length===0?(A(),te(p0,{key:0})):x("",!0),u.value?(A(),N("div",u3e,[p("button",{onClick:c},T(f.$t("workouts.LOAD_MORE_WORKOUT")),1)])):x("",!0)]))]))}}),l3e=re(c3e,[["__scopeId","data-v-e0964959"]]),d3e=["title"],vA=Z({__name:"CalendarWorkout",props:{displayHARecord:{type:Boolean},workout:{},sportLabel:{},sportColor:{}},setup(e){const t=e,{displayHARecord:n,workout:r,sportLabel:a,sportColor:s}=_e(t);return(i,o)=>{const u=oe("SportImage"),l=oe("router-link");return A(),te(l,{class:"calendar-workout",to:{name:"Workout",params:{workoutId:h(r).id}}},{default:ue(()=>[k(u,{"sport-label":h(a),title:h(r).title,color:h(s)},null,8,["sport-label","title","color"]),p("sup",null,[h(r).records.length>0?(A(),N("i",{key:0,class:"fa fa-trophy custom-fa-small","aria-hidden":"true",title:h(r).records.filter(c=>h(n)?!0:c.record_type!=="HA").map(c=>` ${i.$t(`workouts.RECORD_${c.record_type}`)}`)[0]},null,8,d3e)):x("",!0)])]),_:1},8,["to"])}}}),f3e={class:"donut-chart"},p3e={height:"34",width:"34",viewBox:"0 0 34 34"},m3e=["stroke","stroke-dashoffset","transform"],th=16,nh=16,rh=14,E3e=Z({__name:"DonutChart",props:{colors:{},datasets:{}},setup(e){const t=e,{colors:n,datasets:r}=_e(t);let a=-90;const s=2*Math.PI*rh;function i(u,l){return l-u*l}function o(u,l){const c=`rotate(${a}, ${th}, ${nh})`;return a=l*360+a,c}return(u,l)=>(A(),N("div",f3e,[(A(),N("svg",p3e,[(A(!0),N(Re,null,ze(Object.entries(h(r)),(c,f)=>(A(),N("g",{key:f},[p("circle",{cx:th,cy:nh,r:rh,fill:"transparent",stroke:h(n)[+c[0]],"stroke-dashoffset":i(c[1].percentage,s),"stroke-dasharray":s,"stroke-width":"3","stroke-opacity":"0.8",transform:o(f,c[1].percentage)},null,8,m3e)]))),128))]))]))}}),h3e=e=>(ot("data-v-c143b24d"),e=e(),ut(),e),_3e={class:"calendar-workouts-chart"},T3e=["id"],g3e={class:"workouts-count"},A3e={key:0,class:"workouts-pane"},S3e=["id"],O3e=h3e(()=>p("i",{class:"fa fa-times","aria-hidden":"true"},null,-1)),I3e=[O3e],v3e=Z({__name:"CalendarWorkoutsChart",props:{colors:{},datasets:{},sports:{},workouts:{},displayHARecord:{type:Boolean},index:{}},setup(e){const t=e;let n=0;const{colors:r,datasets:a,index:s,sports:i,workouts:o}=_e(t),u=le(!0);function l(){const d=document.getElementById(`workouts-pane-${s.value}`);return d!=null&&d.children&&(d==null?void 0:d.children.length)>0?d:null}async function c(d){var E;d.preventDefault(),d.stopPropagation(),u.value=!u.value,await nn();const m=l();u.value?(E=document.getElementById(`workouts-donut-${s.value}`))==null||E.focus():(m==null?void 0:m.children[0]).focus()}function f(d){if(!u.value){if(!u.value&&(d.key==="Tab"||d.keyCode===9)){d.preventDefault(),d.stopPropagation();const m=l();m&&(d.shiftKey?(n-=1,n<0&&(n=m.children.length-1)):(n+=1,n>=m.children.length&&(n=0)),m.children[n].focus())}d.key==="Escape"&&c(d)}}return _t(()=>{document.addEventListener("keydown",f)}),bt(()=>{document.removeEventListener("keydown",f)}),(d,m)=>{const E=fO("click-outside");return A(),N("div",_3e,[p("button",{class:"workouts-chart transparent",id:`workouts-donut-${h(s)}`,onClick:c},[p("div",g3e,T(h(o).length),1),k(E3e,{datasets:h(a),colors:h(r)},null,8,["datasets","colors"])],8,T3e),u.value?x("",!0):(A(),N("div",A3e,[qe((A(),N("div",{class:"more-workouts",id:`workouts-pane-${h(s)}`},[p("button",{class:"calendar-more-close transparent",onClick:c},I3e),(A(!0),N(Re,null,ze(h(o),(I,R)=>(A(),te(vA,{key:R,displayHARecord:d.displayHARecord,workout:I,sportLabel:h(s0)(I,h(i)),sportColor:h(i0)(I,h(i))},null,8,["displayHARecord","workout","sportLabel","sportColor"]))),128))],8,S3e)),[[E,c]])]))])}}}),ah=re(v3e,[["__scopeId","data-v-c143b24d"]]),R3e={class:"calendar-workouts"},b3e={class:"desktop-display"},N3e={key:0,class:"workouts-display"},C3e={key:1,class:"donut-display"},y3e={class:"mobile-display"},D3e={key:0,class:"donut-display"},sh=6,P3e=Z({__name:"CalendarWorkouts",props:{displayHARecord:{type:Boolean},workouts:{},sports:{},index:{}},setup(e){const t=e,{displayHARecord:n,index:r,sports:a,workouts:s}=_e(t),i=$(()=>r3e(t.workouts)),o=$(()=>Age(t.sports));return(u,l)=>(A(),N("div",R3e,[p("div",b3e,[h(s).length<=sh?(A(),N("div",N3e,[(A(!0),N(Re,null,ze(h(s).slice(0,sh),(c,f)=>(A(),te(vA,{key:f,displayHARecord:h(n),workout:c,sportLabel:h(s0)(c,h(a)),sportColor:h(i0)(c,h(a))},null,8,["displayHARecord","workout","sportLabel","sportColor"]))),128))])):(A(),N("div",C3e,[k(ah,{workouts:h(s),sports:h(a),datasets:i.value,colors:o.value,displayHARecord:h(n),index:h(r)},null,8,["workouts","sports","datasets","colors","displayHARecord","index"])]))]),p("div",y3e,[h(s).length>0?(A(),N("div",D3e,[k(ah,{workouts:h(s),sports:h(a),datasets:i.value,colors:o.value,displayHARecord:h(n),index:h(r)},null,8,["workouts","sports","datasets","colors","displayHARecord","index"])])):x("",!0)])]))}}),w3e={class:"calendar-cells"},L3e={class:"calendar-cell-day"},$3e=Z({__name:"CalendarCells",props:{currentDay:{},displayHARecord:{type:Boolean},endDate:{},sports:{},startDate:{},timezone:{},weekStartingMonday:{type:Boolean},workouts:{}},setup(e){const t=e,{currentDay:n,displayHARecord:r,endDate:a,sports:s,startDate:i,timezone:o,weekStartingMonday:u,workouts:l}=_e(t),c=le([]);_t(()=>f());function f(){c.value=[];let E=i.value;for(;E<=a.value;){const I=[];for(let R=0;R<7;R++)I.push(E),E=Ii(E,1);c.value.push(I)}}function d(E){return u.value?[5,6].includes(E):[0,6].includes(E)}function m(E,I){return I?I.filter(R=>W1(Oc(R.workout_date,o.value),E)).reverse():[]}return Ge(()=>t.currentDay,()=>f()),(E,I)=>(A(),N("div",w3e,[(A(!0),N(Re,null,ze(c.value,(R,v)=>(A(),N("div",{class:"calendar-row",key:v},[(A(!0),N(Re,null,ze(R,(b,S)=>(A(),N("div",{class:Se(["calendar-cell",{"disabled-cell":!h(ZN)(b,h(n)),"week-end":d(S),today:h(QN)(b)}]),key:S},[k(P3e,{workouts:m(b,h(l)),sports:h(s),displayHARecord:h(r),index:S},null,8,["workouts","sports","displayHARecord","index"]),p("div",L3e,T(h(dn)(b,"d")),1)],2))),128))]))),128))]))}}),k3e={class:"calendar-days"},U3e=Z({__name:"CalendarDays",props:{startDate:{},localeOptions:{}},setup(e){const t=e,n=[];for(let r=0;r<7;r++)n.push(Ii(t.startDate,r));return(r,a)=>(A(),N("div",k3e,[(A(),N(Re,null,ze(n,(s,i)=>p("div",{class:"calendar-day",key:i},T(h(dn)(s,"EEE",{locale:r.localeOptions})),1)),64))]))}}),M3e={class:"calendar-header"},x3e=p("i",{class:"fa fa-chevron-left","aria-hidden":"true"},null,-1),F3e=[x3e],W3e={class:"calendar-month"},G3e=p("i",{class:"fa fa-chevron-right","aria-hidden":"true"},null,-1),z3e=[G3e],B3e=Z({__name:"CalendarHeader",props:{day:{},localeOptions:{}},emits:["displayNextMonth","displayPreviousMonth"],setup(e,{emit:t}){const n=e,r=t,{day:a,localeOptions:s}=_e(n);return(i,o)=>(A(),N("div",M3e,[p("button",{class:"calendar-arrow calendar-arrow-left transparent",onClick:o[0]||(o[0]=u=>r("displayPreviousMonth"))},F3e),p("div",W3e,[p("span",null,T(h(dn)(h(a),"MMM yyyy",{locale:h(s)})),1)]),p("button",{class:"calendar-arrow calendar-arrow-right transparent",onClick:o[1]||(o[1]=u=>r("displayNextMonth"))},z3e)]))}}),H3e={id:"user-calendar"},V3e={class:"calendar-card box"},ih="yyyy-MM-dd",j3e=Z({__name:"index",props:{sports:{},user:{}},setup(e){const t=e,n=Me(),{sports:r,user:a}=_e(t),s=le(new Date),i=le(xE(s.value,a.value.weekm)),o=$(()=>n.getters[Ae.GETTERS.CALENDAR_WORKOUTS]),u=$(()=>n.getters[H.GETTERS.LOCALE]);Ct(()=>l());function l(){i.value=xE(s.value,t.user.weekm);const d={from:dn(i.value.start,ih),to:dn(i.value.end,ih),page:1,per_page:100,...pi};n.dispatch(Ae.ACTIONS.GET_CALENDAR_WORKOUTS,d)}function c(){s.value=Ka(s.value,1),l()}function f(){s.value=Zs(s.value,1),l()}return(d,m)=>(A(),N("div",H3e,[p("div",V3e,[k(B3e,{day:s.value,"locale-options":u.value,onDisplayNextMonth:c,onDisplayPreviousMonth:f},null,8,["day","locale-options"]),k(U3e,{"start-date":i.value.start,"locale-options":u.value},null,8,["start-date","locale-options"]),k($3e,{currentDay:s.value,displayHARecord:h(a).display_ascent,"end-date":i.value.end,sports:h(r),"start-date":i.value.start,timezone:h(a).timezone,workouts:o.value,weekStartingMonday:h(a).weekm},null,8,["currentDay","displayHARecord","end-date","sports","start-date","timezone","workouts","weekStartingMonday"])])]))}}),RA={data:{type:Object,required:!0},options:{type:Object,default:()=>({})},plugins:{type:Array,default:()=>[]},datasetIdKey:{type:String,default:"label"},updateMode:{type:String,default:void 0}},K3e={ariaLabel:{type:String},ariaDescribedby:{type:String}},Y3e={type:{type:String,required:!0},...RA,...K3e},q3e=O_[0]==="2"?(e,t)=>Object.assign(e,{attrs:t}):(e,t)=>Object.assign(e,t);function ya(e){return Wu(e)?et(e):e}function X3e(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:e;return Wu(t)?new Proxy(e,{}):e}function Z3e(e,t){const n=e.options;n&&t&&Object.assign(n,t)}function bA(e,t){e.labels=t}function NA(e,t,n){const r=[];e.datasets=t.map(a=>{const s=e.datasets.find(i=>i[n]===a[n]);return!s||!a.data||r.includes(s)?{...a}:(r.push(s),Object.assign(s,a),s)})}function Q3e(e,t){const n={labels:[],datasets:[]};return bA(n,e.labels),NA(n,e.datasets,t),n}const J3e=Z({props:Y3e,setup(e,t){let{expose:n,slots:r}=t;const a=le(null),s=Ei(null);n({chart:s});const i=()=>{if(!a.value)return;const{type:l,data:c,options:f,plugins:d,datasetIdKey:m}=e,E=Q3e(c,m),I=X3e(E,c);s.value=new Md(a.value,{type:l,data:I,options:{...f},plugins:d})},o=()=>{const l=et(s.value);l&&(l.destroy(),s.value=null)},u=l=>{l.update(e.updateMode)};return _t(i),hi(o),Ge([()=>e.options,()=>e.data],(l,c)=>{let[f,d]=l,[m,E]=c;const I=et(s.value);if(!I)return;let R=!1;if(f){const v=ya(f),b=ya(m);v&&v!==b&&(Z3e(I,v),R=!0)}if(d){const v=ya(d.labels),b=ya(E.labels),S=ya(d.datasets),O=ya(E.datasets);v!==b&&(bA(I.config.data,v),R=!0),S&&S!==O&&(NA(I.config.data,S,e.datasetIdKey),R=!0)}R&&nn(()=>{u(I)})},{deep:!0}),()=>Tn("canvas",{role:"img",ariaLabel:e.ariaLabel,ariaDescribedby:e.ariaDescribedby,ref:a},[Tn("p",{},[r.default?r.default():""])])}});function CA(e,t){return Md.register(t),Z({props:RA,setup(n,r){let{expose:a}=r;const s=Ei(null),i=o=>{s.value=o==null?void 0:o.chart};return a({chart:s}),()=>Tn(J3e,q3e({ref:i},{type:e,...n}))}})}const eCe=CA("bar",Oh),tCe=CA("line",Ih),nCe=(e,t=!1)=>{let n="0";t&&(n=String(Math.floor(e/86400)),e%=86400);const r=String(Math.floor(e/3600)).padStart(2,"0");e%=3600;const a=String(Math.floor(e/60)).padStart(2,"0"),s=String(e%60).padStart(2,"0");return t?`${n==="0"?"":`${n}d `}${r==="00"?"":`${r}h `}${a}m ${s}s`:`${r==="00"?"":`${r}:`}${a}:${s}`},Ns=(e,t,n,r=!0,a="km")=>{const s=n?Pn[a].defaultTarget:a;switch(e){case"average_speed":return`${t.toFixed(2)} ${s}/h`;case"total_duration":return nCe(t,r);case"total_distance":case"total_ascent":case"total_descent":return`${t.toFixed(2)} ${s}`;default:return t.toString()}},rCe=Z({__name:"Chart",props:{datasets:{},labels:{},displayedData:{},displayedSportIds:{},fullStats:{type:Boolean},useImperialUnits:{type:Boolean}},setup(e){const t=e,{datasets:n,labels:r,displayedData:a,displayedSportIds:s,fullStats:i,useImperialUnits:o}=_e(t),u=_f(),{t:l}=Yt(),c=$(()=>u.getters[H.GETTERS.DARK_MODE]),f=$(()=>hf(c.value)),d=$(()=>({color:f.value?kr.darkMode.line:kr.ligthMode.line})),m=$(()=>({color:f.value?kr.darkMode.text:kr.ligthMode.text})),E=$(()=>({labels:r.value,datasets:JSON.parse(JSON.stringify(n.value))})),I=$(()=>({responsive:!0,maintainAspectRatio:!1,animation:!1,layout:{padding:{top:i.value?40:22}},scales:{x:{stacked:!0,grid:{drawOnChartArea:!1,...d.value},border:{...d.value},ticks:{...m.value}},y:{stacked:a.value!=="average_speed",grid:{drawOnChartArea:!1,...d.value},border:{...d.value},ticks:{maxTicksLimit:6,callback:function(S){return Ns(a.value,+S,o.value,!1,b(a.value))},...m.value},afterFit:function(S){S.width=i.value?90:60}}},plugins:{datalabels:{anchor:"end",align:"end",color:function(S){return a.value==="average_speed"&&S.dataset.backgroundColor?S.dataset.backgroundColor[0]:m.value.color},rotation:function(S){return i.value&&S.chart.chartArea.width<580?310:0},display:function(S){return i.value&&S.chart.chartArea.width<300?!1:a.value==="average_speed"?s.value.length==1?"auto":!1:!0},formatter:function(S,O){if(a.value==="average_speed")return Ns(a.value,S,o.value,!1);{const C=O.chart.data.datasets.map(P=>P.data[O.dataIndex]).reduce((P,M)=>v(P,M),0);return O.datasetIndex===s.value.length-1&&C>0?Ns(a.value,C,o.value,!1,b(a.value)):null}}},legend:{display:!1},tooltip:{interaction:{intersect:!0,mode:"index",position:a.value==="average_speed"?"nearest":"average"},filter:function(S){return S.formattedValue!=="0"},callbacks:{label:function(S){let O=l(`sports.${S.dataset.label}.LABEL`)||"";return O&&(O+=": "),S.parsed.y!==null&&(O+=Ns(a.value,S.parsed.y,o.value,!0,b(a.value))),O},footer:function(S){if(a.value==="average_speed")return"";let O=0;return S.map(C=>{O+=C.parsed.y}),`${l("common.TOTAL")}: `+Ns(a.value,O,o.value,!0,b(a.value))}}}}}));function R(S){return isNaN(S)?0:+S}function v(S,O){return R(S)+R(O)}function b(S){return["total_ascent","total_descent"].includes(S)?"m":"km"}return(S,O)=>(A(),N("div",{class:Se(["bar-chart",{minimal:!h(i)}])},[k(h(eCe),{data:E.value,options:I.value},null,8,["data","options"])],2))}}),aCe=re(rCe,[["__scopeId","data-v-d506f845"]]),{locale:oh}=_a.global,sCe={week:{api:"yyyy-MM-dd",chart:"MM/dd/yyyy"},month:{api:"yyyy-MM",chart:"MM/yyyy"},year:{api:"yyyy",chart:"yyyy"}},iCe=["average_speed","nb_workouts","total_duration","total_distance","total_ascent","total_descent"],oCe=(e,t)=>{const n=[];for(let r=$Ae(e.duration,e.start,t);r<=e.end;r=kAe(e.duration,r))n.push(r);return n},Da=(e,t,n=!1)=>{const r={label:e,backgroundColor:[t],data:[]};return n?(r.type="line",r.borderColor=[t],r.spanGaps=!0):r.type="bar",r},uCe=e=>{const t={average_speed:[],nb_workouts:[],total_distance:[],total_duration:[],total_ascent:[],total_descent:[]};return e.map(n=>{const r=n.color?n.color:a0[n.label];t.average_speed.push(Da(n.label,r,!0)),t.nb_workouts.push(Da(n.label,r)),t.total_distance.push(Da(n.label,r)),t.total_duration.push(Da(n.label,r)),t.total_ascent.push(Da(n.label,r)),t.total_descent.push(Da(n.label,r))}),t},cCe=(e,t,n)=>{switch(e){case"average_speed":case"total_distance":case"total_ascent":case"total_descent":return vo(["average_speed","total_distance"].includes(e)?"km":"m",t,n);default:case"nb_workouts":case"total_duration":return t}},lCe=(e,t,n,r,a,s,i)=>{const o=oCe(e,t),u=sCe[e.duration],l=n.filter(m=>r.includes(m.id)),c=[],f=uCe(l),d={};return l.map(m=>d[m.label]=m.id),o.map(m=>{const E=dn(m,u.api),I=dn(m,e.duration==="week"?ga(i,oh.value):u.chart,{locale:bi[oh.value]});c.push(I),iCe.map(R=>{f[R].map(v=>{v.data.push(E in a&&d[v.label]in a[E]?cCe(R,a[E][d[v.label]][R],s):R==="average_speed"?null:0)})})}),{labels:c,datasets:f}},dCe=(e,t,n)=>{const r=n?1:0,a=t==="year"?Sf(Ml(e,9)):t==="week"?tc(Zs(e,2),{weekStartsOn:r}):Ri(Zs(e,11)),s=t==="year"?G1(e):t==="week"?Of(e,{weekStartsOn:r}):vi(e);return{duration:t,end:s,start:a}},fCe=(e,t,n)=>{const{duration:r,start:a,end:s}=e,i=n?1:0;return{duration:r,end:r==="year"?G1(t?Ml(s,1):Ho(s,1)):r==="week"?Of(t?zp(s,1):Ul(s,1),{weekStartsOn:i}):vi(t?Zs(s,1):Ka(s,1)),start:r==="year"?Sf(t?Ml(a,1):Ho(a,1)):r==="week"?tc(t?zp(a,1):Ul(a,1),{weekStartsOn:i}):Ri(t?Zs(a,1):Ka(a,1))}},pCe={class:"stats-chart"},mCe={key:0},ECe={key:1},hCe={class:"chart-radio"},_Ce=["checked","disabled"],TCe=["checked","disabled"],gCe=["checked","disabled"],ACe={key:0},SCe=["checked","disabled"],OCe={key:1},ICe=["checked","disabled"],vCe={key:2},RCe=["checked","disabled"],bCe=Z({__name:"index",props:{sports:{},user:{},chartParams:{},displayedSportIds:{default:()=>[]},fullStats:{type:Boolean,default:!1},hideChartIfNoData:{type:Boolean,default:!1},isDisabled:{type:Boolean,default:!1}},setup(e){const t=e,{sports:n,user:r,chartParams:a,displayedSportIds:s,fullStats:i,hideChartIfNoData:o,isDisabled:u}=_e(t),l=Me(),c=le("total_distance"),f=$(()=>l.getters[Br.GETTERS.USER_STATS]),d=$(()=>lCe(a.value,r.value.weekm,n.value,s.value,f.value,r.value.imperial_units,r.value.date_format)),m=$(()=>d.value.datasets[c.value]),E=$(()=>d.value.labels),I=$(()=>Object.keys(f.value).length===0);Ct(()=>R(b(a.value,r.value)));function R(S){l.dispatch(Br.ACTIONS.GET_USER_STATS,{username:r.value.username,filterType:"by_time",params:S})}function v(S){c.value=S.target.name}function b(S,O){return{from:dn(S.start,"yyyy-MM-dd"),to:dn(S.end,"yyyy-MM-dd"),time:S.duration==="week"?`week${O.weekm?"m":""}`:S.duration}}return Ge(()=>a.value,async S=>{R(b(S,r.value))}),(S,O)=>(A(),N("div",pCe,[h(o)&&I.value?(A(),N("div",mCe,T(S.$t("workouts.NO_WORKOUTS")),1)):(A(),N("div",ECe,[p("div",hCe,[p("label",null,[p("input",{type:"radio",name:"total_distance",checked:c.value==="total_distance",disabled:h(u),onClick:v},null,8,_Ce),j(" "+T(S.$t("workouts.DISTANCE")),1)]),p("label",null,[p("input",{type:"radio",name:"total_duration",checked:c.value==="total_duration",disabled:h(u),onClick:v},null,8,TCe),j(" "+T(S.$t("workouts.DURATION")),1)]),p("label",null,[p("input",{type:"radio",name:"nb_workouts",checked:c.value==="nb_workouts",disabled:h(u),onClick:v},null,8,gCe),j(" "+T(S.$t("workouts.WORKOUT",2)),1)]),h(i)?(A(),N("label",ACe,[p("input",{type:"radio",name:"average_speed",checked:c.value==="average_speed",disabled:h(u),onClick:v},null,8,SCe),j(" "+T(S.$t("workouts.AVERAGE_SPEED")),1)])):x("",!0),h(i)?(A(),N("label",OCe,[p("input",{type:"radio",name:"total_ascent",checked:c.value==="total_ascent",disabled:h(u),onClick:v},null,8,ICe),j(" "+T(S.$t("workouts.ASCENT")),1)])):x("",!0),h(i)?(A(),N("label",vCe,[p("input",{type:"radio",name:"total_descent",checked:c.value==="total_descent",disabled:h(u),onClick:v},null,8,RCe),j(" "+T(S.$t("workouts.DESCENT")),1)])):x("",!0)]),E.value.length>0?(A(),te(aCe,{key:0,datasets:m.value,labels:E.value,displayedData:c.value,displayedSportIds:h(s),fullStats:h(i),useImperialUnits:h(r).imperial_units},null,8,["datasets","labels","displayedData","displayedSportIds","fullStats","useImperialUnits"])):x("",!0)]))]))}}),yA=re(bCe,[["__scopeId","data-v-b8d7f5c9"]]),NCe={class:"user-month-stats"},CCe=Z({__name:"UserMonthStats",props:{sports:{},user:{}},setup(e){const t=e,{sports:n,user:r}=_e(t),a=new Date,s={duration:"week",start:Ri(a),end:vi(a)},i=n.value.map(o=>o.id);return(o,u)=>{const l=oe("Card");return A(),N("div",NCe,[k(l,null,{title:ue(()=>[j(T(o.$t("dashboard.THIS_MONTH")),1)]),content:ue(()=>[k(yA,{sports:h(n),user:h(r),"chart-params":s,"displayed-sport-ids":h(i),"hide-chart-if-no-data":!0},null,8,["sports","user","displayed-sport-ids"])]),_:1})])}}}),yCe=re(CCe,[["__scopeId","data-v-8f59a282"]]),{locale:DCe}=_a.global,PCe=(e,t,n,r)=>{const a="km",s=n?Pn[a].defaultTarget:a,i="m",o=n?Pn[i].defaultTarget:i;let u;switch(e.record_type){case"AS":case"MS":u=`${on(+e.value,a,s,2)} ${s}/h`;break;case"FD":u=`${on(+e.value,a,s,3)} ${s}`;break;case"HA":u=`${on(+e.value,i,o,2)} ${o}`;break;case"LD":u=e.value;break;default:throw new Error(`Invalid record type, expected: "AS", "FD", "HA", "LD", "MD", got: "${e.record_type}"`)}return{id:e.id,record_type:e.record_type,sport_id:e.sport_id,value:u,user:e.user,workout_date:kn(e.workout_date,t,r,!1),workout_id:e.workout_id}},wCe=(e,t)=>{const n=e.label.toLowerCase(),r=t.label.toLowerCase();return n>r?1:n(s=ga(s,DCe.value),e.filter(i=>a?!0:i.record_type!=="HA").reduce((i,o)=>{const u=t.find(l=>l.id===o.sport_id);return u&&u.label&&(i[u.translatedLabel]===void 0&&(i[u.translatedLabel]={label:u.label,color:u.color,records:[]}),i[u.translatedLabel].records.push(PCe(o,n,r,s))),i},{})),$Ce={class:"records-card"},kCe={class:"record-type"},UCe={class:"record-value"},MCe={class:"record-date"},xCe=Z({__name:"RecordsCard",props:{records:{},sportTranslatedLabel:{}},setup(e){const t=e,{records:n,sportTranslatedLabel:r}=_e(t),{t:a}=Yt();function s(i){const o=[];return i.map(u=>{o.push({...u,label:a(`workouts.RECORD_${u.record_type}`)})}),o.sort(wCe)}return(i,o)=>{const u=oe("SportImage"),l=oe("router-link"),c=oe("Card");return A(),N("div",$Ce,[k(c,null,{title:ue(()=>[k(u,{"sport-label":h(n).label,color:h(n).color},null,8,["sport-label","color"]),j(" "+T(h(r)),1)]),content:ue(()=>[(A(!0),N(Re,null,ze(s(h(n).records),f=>(A(),N("div",{class:"record",key:f.id},[p("span",kCe,T(f.label),1),p("span",UCe,T(f.value),1),p("span",MCe,[k(l,{to:{name:"Workout",params:{workoutId:f.workout_id}}},{default:ue(()=>[p("time",null,T(f.workout_date),1)]),_:2},1032,["to"])])]))),128))]),_:1})])}}}),FCe=re(xCe,[["__scopeId","data-v-64523a87"]]),WCe=e=>(ot("data-v-fff33919"),e=e(),ut(),e),GCe={class:"user-records-section"},zCe={class:"section-title"},BCe=WCe(()=>p("i",{class:"fa fa-trophy custom-fa-small","aria-hidden":"true"},null,-1)),HCe={class:"user-records"},VCe={key:0,class:"no-records"},jCe=Z({__name:"index",props:{sports:{},user:{}},setup(e){const t=e,{t:n}=Yt(),r=$(()=>LCe(t.user.records,Xr(t.sports,n),t.user.timezone,t.user.imperial_units,t.user.display_ascent,t.user.date_format));return(a,s)=>(A(),N("div",GCe,[p("div",zCe,[BCe,j(" "+T(a.$t("workouts.RECORD",2)),1)]),p("div",HCe,[Object.keys(r.value).length===0?(A(),N("div",VCe,T(a.$t("workouts.NO_RECORDS")),1)):x("",!0),(A(!0),N(Re,null,ze(Object.keys(r.value).sort(),i=>(A(),te(FCe,{sportTranslatedLabel:i,records:r.value[i],key:i,useImperialUnits:a.user.imperial_units},null,8,["sportTranslatedLabel","records","useImperialUnits"]))),128))])]))}}),KCe=re(jCe,[["__scopeId","data-v-fff33919"]]),YCe={id:"user-stats"},dl="km",fl="m",qCe=Z({__name:"index",props:{user:{}},setup(e){const t=e,{t:n}=Yt(),{user:r}=_e(t),a=$(()=>t.user.total_duration),s=$(()=>c(a)),i=r.value.imperial_units?Pn[dl].defaultTarget:dl,o=$(()=>r.value.imperial_units?on(r.value.total_distance,dl,i,2):parseFloat(r.value.total_distance.toFixed(2))),u=r.value.imperial_units?Pn[fl].defaultTarget:fl,l=$(()=>r.value.imperial_units?on(r.value.total_ascent,fl,u,2):parseFloat(r.value.total_ascent.toFixed(2)));function c(f){const d=f.value.match(/day/g)?f.value.split(", ")[1]:f.value;return{days:f.value.match(/day/g)?`${f.value.split(" ")[0]} ${f.value.match(/days/g)?n("common.DAY",2):n("common.DAY",1)}`:`0 ${n("common.DAY",2)},`,duration:`${d.split(":")[0]}h ${d.split(":")[1]}min`}}return(f,d)=>(A(),N("div",YCe,[k(cr,{icon:"calendar",value:h(r).nb_workouts,text:f.$t("workouts.WORKOUT",h(r).nb_workouts)},null,8,["value","text"]),k(cr,{icon:"road",value:o.value,text:h(i)==="mi"?"miles":h(i)},null,8,["value","text"]),h(r).display_ascent?(A(),te(cr,{key:0,icon:"location-arrow",value:l.value,text:h(u)==="ft"?"feet":h(u)},null,8,["value","text"])):x("",!0),k(cr,{icon:"clock-o",value:s.value.days,text:s.value.duration},null,8,["value","text"]),h(r).display_ascent?x("",!0):(A(),te(cr,{key:1,icon:"tags",value:h(r).nb_sports,text:f.$t("workouts.SPORT",h(r).nb_sports)},null,8,["value","text"]))]))}}),XCe={},ZCe={class:"privacy-policy-message"};function QCe(e,t){const n=oe("router-link"),r=oe("i18n-t");return A(),N("div",ZCe,[p("span",null,[k(r,{keypath:"user.LAST_PRIVACY_POLICY_TO_VALIDATE"},{default:ue(()=>[k(n,{to:"/profile/edit/privacy-policy",class:"policy-link"},{default:ue(()=>[j(T(e.$t("user.REVIEW")),1)]),_:1})]),_:1})])])}const JCe=re(XCe,[["render",QCe],["__scopeId","data-v-1b250692"]]),Li=e=>(ot("data-v-8f5da609"),e=e(),ut(),e),eye={key:0,id:"dashboard",class:"view"},tye={class:"container mobile-menu"},nye={class:"box"},rye=Li(()=>p("i",{class:"fa fa-calendar","aria-hidden":"true"},null,-1)),aye=[rye],sye=Li(()=>p("i",{class:"fa fa-bar-chart","aria-hidden":"true"},null,-1)),iye=[sye],oye=Li(()=>p("i",{class:"fa fa-map-o","aria-hidden":"true"},null,-1)),uye=[oye],cye=Li(()=>p("i",{class:"fa fa-trophy","aria-hidden":"true"},null,-1)),lye=[cye],dye={key:0,class:"container privacy-policy-message"},fye={class:"container"},pye={class:"container dashboard-container"},mye={class:"left-container dashboard-sub-container"},Eye={class:"right-container dashboard-sub-container"},hye=Li(()=>p("div",{id:"bottom"},null,-1)),_ye={key:1,class:"app-loading"},Tye=Z({__name:"Dashboard",setup(e){const t=Me(),n=$(()=>t.getters[K.GETTERS.AUTH_USER_PROFILE]),r=$(()=>t.getters[Mt.GETTERS.SPORTS]),a=le("calendar");Ct(()=>t.dispatch(K.ACTIONS.GET_USER_PROFILE));function s(i){a.value=i}return(i,o)=>{const u=oe("Loader");return n.value.username&&r.value.length>0?(A(),N("div",eye,[p("div",tye,[p("div",nye,[p("div",{class:Se(["mobile-menu-item",{"is-selected":a.value==="calendar"}]),onClick:o[0]||(o[0]=l=>s("calendar"))},aye,2),p("div",{class:Se(["mobile-menu-item",{"is-selected":a.value==="chart"}]),onClick:o[1]||(o[1]=l=>s("chart"))},iye,2),p("div",{class:Se(["mobile-menu-item",{"is-selected":a.value==="timeline"}]),onClick:o[2]||(o[2]=l=>s("timeline"))},uye,2),p("div",{class:Se(["mobile-menu-item",{"is-selected":a.value==="records"}]),onClick:o[3]||(o[3]=l=>s("records"))},lye,2)])]),n.value.accepted_privacy_policy?x("",!0):(A(),N("div",dye,[k(JCe)])),p("div",fye,[k(qCe,{user:n.value},null,8,["user"])]),p("div",pye,[p("div",mye,[k(yCe,{sports:r.value,user:n.value,class:Se({"is-hidden":a.value!=="chart"})},null,8,["sports","user","class"]),k(KCe,{sports:r.value,user:n.value,class:Se({"is-hidden":a.value!=="records"})},null,8,["sports","user","class"])]),p("div",Eye,[k(j3e,{sports:r.value,user:n.value,class:Se({"is-hidden":a.value!=="calendar"})},null,8,["sports","user","class"]),k(l3e,{sports:r.value,user:n.value,class:Se({"is-hidden":a.value!=="timeline"})},null,8,["sports","user","class"])])]),hye])):(A(),N("div",_ye,[k(u)]))}}}),gye=re(Tye,[["__scopeId","data-v-8f5da609"]]),Aye={class:"not-found view"},Sye=Z({__name:"NotFoundView",setup(e){return(t,n)=>(A(),N("div",Aye,[k(d0)]))}}),Oye={id:"privacy-policy",class:"view"},Iye={class:"container"},vye=p("div",{id:"bottom"},null,-1),Rye=Z({__name:"PrivacyPolicyView",setup(e){const t=Me();return Ct(()=>{t.dispatch(H.ACTIONS.GET_APPLICATION_PRIVACY_POLICY)}),(n,r)=>(A(),N("div",Oye,[p("div",Iye,[k(AA)]),vye]))}}),DA=e=>(ot("data-v-174c91c4"),e=e(),ut(),e),bye={class:"chart-menu"},Nye=["disabled"],Cye=DA(()=>p("i",{class:"fa fa-chevron-left","aria-hidden":"true"},null,-1)),yye=[Cye],Dye={class:"time-frames custom-checkboxes-group"},Pye={class:"time-frames-checkboxes custom-checkboxes"},wye=["id","name","checked","onInput","disabled"],Lye=["id","tabindex","onKeydown"],$ye=["disabled"],kye=DA(()=>p("i",{class:"fa fa-chevron-right","aria-hidden":"true"},null,-1)),Uye=[kye],Mye=Z({__name:"StatsMenu",props:{isDisabled:{type:Boolean}},emits:["arrowClick","timeFrameUpdate"],setup(e,{emit:t}){const n=e,{isDisabled:r}=_e(n),a=t,s=le("month"),i=["week","month","year"];function o(u){s.value=u,a("timeFrameUpdate",u)}return _t(()=>{if(!r.value){const u=document.getElementById("frame-month");u&&u.focus()}}),(u,l)=>(A(),N("div",bye,[p("button",{class:"chart-arrow transparent",onClick:l[0]||(l[0]=c=>a("arrowClick",!0)),onKeydown:l[1]||(l[1]=At(c=>a("arrowClick",!0),["enter"])),disabled:h(r)},yye,40,Nye),p("div",Dye,[p("div",Pye,[(A(),N(Re,null,ze(i,c=>p("div",{class:"time-frame custom-checkbox",key:c},[p("label",null,[p("input",{type:"radio",id:c,name:c,checked:s.value===c,onInput:f=>o(c),disabled:h(r)},null,40,wye),p("span",{id:`frame-${c}`,tabindex:h(r)?-1:0,role:"button",onKeydown:At(f=>o(c),["enter"])},T(u.$t(`statistics.TIME_FRAMES.${c}`)),41,Lye)])])),64))])]),p("button",{class:"chart-arrow transparent",onClick:l[2]||(l[2]=c=>a("arrowClick",!1)),onKeydown:l[3]||(l[3]=At(c=>a("arrowClick",!1),["enter"])),disabled:h(r)},Uye,40,$ye)]))}}),xye=re(Mye,[["__scopeId","data-v-174c91c4"]]),Fye={class:"sports-menu"},Wye=["id","name","checked","onInput"],Gye={class:"sport-label"},zye=Z({__name:"StatsSportsMenu",props:{userSports:{},selectedSportIds:{default:()=>[]}},emits:["selectedSportIdsUpdate"],setup(e,{emit:t}){const n=e,r=t,{t:a}=Yt(),s=It("sportColors"),{selectedSportIds:i}=_e(n),o=$(()=>Xr(n.userSports,a));function u(l){r("selectedSportIdsUpdate",l)}return(l,c)=>{const f=oe("SportImage");return A(),N("div",Fye,[(A(!0),N(Re,null,ze(o.value,d=>(A(),N("label",{type:"checkbox",key:d.id,style:Vr({color:d.color?d.color:h(s)[d.label]})},[p("input",{type:"checkbox",id:`${d.id}`,name:d.label,checked:h(i).includes(d.id),onInput:m=>u(d.id)},null,40,Wye),k(f,{"sport-label":d.label,color:d.color},null,8,["sport-label","color"]),p("span",Gye,T(d.translatedLabel),1)],4))),128))])}}}),Bye={key:0,id:"user-statistics"},Hye=Z({__name:"index",props:{sports:{},user:{},isDisabled:{type:Boolean}},setup(e){const t=e,{t:n}=Yt(),{sports:r,user:a}=_e(t),s=le("month"),i=le(c(s.value)),o=$(()=>Xr(t.sports,n)),u=le(d(r.value));function l(E){s.value=E,i.value=c(s.value)}function c(E){return dCe(new Date,E,t.user.weekm)}function f(E){i.value=fCe(i.value,E,t.user.weekm)}function d(E){return E.map(I=>I.id)}function m(E){u.value.includes(E)?u.value=u.value.filter(I=>I!==E):u.value.push(E)}return Ge(()=>t.sports,E=>{u.value=d(E)}),(E,I)=>o.value?(A(),N("div",Bye,[k(xye,{onTimeFrameUpdate:l,onArrowClick:f,isDisabled:E.isDisabled},null,8,["isDisabled"]),k(yA,{sports:h(r),user:h(a),chartParams:i.value,"displayed-sport-ids":u.value,fullStats:!0,isDisabled:E.isDisabled},null,8,["sports","user","chartParams","displayed-sport-ids","isDisabled"]),k(zye,{"selected-sport-ids":u.value,"user-sports":h(r),onSelectedSportIdsUpdate:m},null,8,["selected-sport-ids","user-sports"])])):x("",!0)}}),Vye=re(Hye,[["__scopeId","data-v-b145e4ac"]]),jye={id:"statistics",class:"view"},Kye={key:0,class:"container"},Yye=Z({__name:"StatisticsView",setup(e){const t=Me(),n=$(()=>t.getters[K.GETTERS.AUTH_USER_PROFILE]),r=$(()=>t.getters[Mt.GETTERS.SPORTS].filter(s=>n.value.sports_list.includes(s.id))),a=$(()=>n.value.nb_workouts===0);return(s,i)=>{const o=oe("Card");return A(),N("div",jye,[n.value.username?(A(),N("div",Kye,[k(o,null,{title:ue(()=>[j(T(s.$t("statistics.STATISTICS")),1)]),content:ue(()=>[k(Vye,{class:Se({"stats-disabled":a.value}),user:n.value,sports:r.value,isDisabled:a.value},null,8,["class","user","sports","isDisabled"])]),_:1}),n.value.nb_workouts===0?(A(),te(p0,{key:0})):x("",!0)])):x("",!0)])}}}),qye=re(Yye,[["__scopeId","data-v-0aa997fa"]]),Xye={name:"EmailSent"},Zye={version:"1.1",id:"Capa_1",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",x:"0px",y:"0px",viewBox:"0 0 345.834 345.834",style:{"enable-background":"new 0 0 345.834 345.834"},"xml:space":"preserve"},Qye=p("g",null,[p("path",{d:`M339.798,260.429c0.13-0.026,0.257-0.061,0.385-0.094c0.109-0.028,0.219-0.051,0.326-0.084 c0.125-0.038,0.247-0.085,0.369-0.129c0.108-0.039,0.217-0.074,0.324-0.119c0.115-0.048,0.226-0.104,0.338-0.157 c0.109-0.052,0.22-0.1,0.327-0.158c0.107-0.057,0.208-0.122,0.312-0.184c0.107-0.064,0.215-0.124,0.319-0.194 c0.111-0.074,0.214-0.156,0.321-0.236c0.09-0.067,0.182-0.13,0.27-0.202c0.162-0.133,0.316-0.275,0.466-0.421 @@ -436,7 +436,7 @@ and ensure you are accounting for this risk. V234.967z M185.878,179.888c0.535-0.535,0.969-1.131,1.308-1.765l28.051,24.835c1.418,1.255,3.194,1.885,4.972,1.885 c1.726,0,3.451-0.593,4.853-1.781l28.587-24.254c0.26,0.38,0.553,0.743,0.89,1.08l65.687,65.687H120.191L185.878,179.888z`}),p("path",{d:`M7.5,170.676h126.667c4.143,0,7.5-3.357,7.5-7.5s-3.357-7.5-7.5-7.5H7.5c-4.143,0-7.5,3.357-7.5,7.5 S3.357,170.676,7.5,170.676z`}),p("path",{d:`M20.625,129.345H77.5c4.143,0,7.5-3.357,7.5-7.5s-3.357-7.5-7.5-7.5H20.625c-4.143,0-7.5,3.357-7.5,7.5 - S16.482,129.345,20.625,129.345z`}),p("path",{d:"M62.5,226.51h-55c-4.143,0-7.5,3.357-7.5,7.5s3.357,7.5,7.5,7.5h55c4.143,0,7.5-3.357,7.5-7.5S66.643,226.51,62.5,226.51z"})],-1),qye=[Yye];function Xye(e,t,n,r,a,s){return A(),N("svg",Kye,qye)}const PA=re(jye,[["render",Xye]]),wA=e=>(dt("data-v-13388f00"),e=e(),ft(),e),Zye={id:"user-form"},Qye={key:2,class:"info-box success-message"},Jye={class:"form-items"},e4e=["disabled","placeholder"],t4e={key:1,class:"form-info"},n4e=wA(()=>p("i",{class:"fa fa-info-circle","aria-hidden":"true"},null,-1)),r4e=["disabled","placeholder"],a4e={key:3,class:"form-info"},s4e=wA(()=>p("i",{class:"fa fa-info-circle","aria-hidden":"true"},null,-1)),i4e={key:5,for:"accepted_policy",class:"accepted_policy"},o4e=["disabled"],u4e=["disabled"],c4e={key:3},l4e={key:0},d4e={key:4},f4e={class:"account"},p4e={key:5},m4e=Z({__name:"UserAuthForm",props:{action:{},token:{default:""}},setup(e){const t=e,n=qt(),r=Me(),{action:a}=_e(t),s=zt({username:"",email:"",password:"",accepted_policy:!1}),i=$(()=>v(t.action)),o=$(()=>r.getters[H.GETTERS.ERROR_MESSAGES]),u=$(()=>r.getters[K.GETTERS.IS_REGISTRATION_SUCCESS]),l=$(()=>r.getters[K.GETTERS.IS_SUCCESS]),c=$(()=>r.getters[H.GETTERS.APP_CONFIG]),f=$(()=>r.getters[H.GETTERS.LANGUAGE]),d=$(()=>t.action==="register"&&!c.value.is_registration_enabled),m=$(()=>["reset-request","account-confirmation-resend"].includes(t.action)&&!c.value.is_email_sending_enabled),E=le(!1);function v(O){switch(O){case"reset-request":case"reset":return"buttons.SUBMIT";default:return`buttons.${t.action.toUpperCase()}`}}function R(){E.value=!0}function I(O){s.password=O}function b(O){switch(O){case"reset":return t.token?r.dispatch(K.ACTIONS.RESET_USER_PASSWORD,{password:s.password,token:t.token}):r.commit(H.MUTATIONS.SET_ERROR_MESSAGES,"user.INVALID_TOKEN");case"reset-request":return r.dispatch(K.ACTIONS.SEND_PASSWORD_RESET_REQUEST,{email:s.email});case"account-confirmation-resend":return r.dispatch(K.ACTIONS.RESEND_ACCOUNT_CONFIRMATION_EMAIL,{email:s.email});default:s.language=f.value,r.dispatch(K.ACTIONS.LOGIN_OR_REGISTER,{actionType:O,formData:s,redirectUrl:n.query.from})}}function S(){s.username="",s.email="",s.password="",s.accepted_policy=!1}return Ct(()=>r.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES)),Ge(()=>n.path,async()=>{r.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),r.commit(K.MUTATIONS.UPDATE_IS_SUCCESS,!1),r.commit(K.MUTATIONS.UPDATE_IS_REGISTRATION_SUCCESS,!1),E.value=!1,S()}),(O,C)=>{const P=oe("AlertMessage"),M=oe("router-link"),w=oe("i18n-t"),G=oe("ErrorMessage");return A(),N("div",{id:"user-auth-form",class:Se(`${["reset","reset-request"].includes(h(a))?h(a):"user-form"}`)},[p("div",Zye,[p("div",{class:Se(["form-box",{disabled:d.value}])},[d.value?(A(),te(P,{key:0,message:"user.REGISTER_DISABLED"})):x("",!0),m.value?(A(),te(P,{key:1,message:"admin.EMAIL_SENDING_DISABLED"})):x("",!0),l.value||u.value?(A(),N("div",Qye,T(O.$t(`user.PROFILE.SUCCESSFUL_${u.value?`REGISTRATION${c.value.is_email_sending_enabled?"_WITH_EMAIL":""}`:"UPDATE"}`)),1)):x("",!0),p("form",{class:Se({errors:E.value}),onSubmit:C[3]||(C[3]=Je(B=>b(h(a)),["prevent"]))},[p("div",Jye,[h(a)==="register"?qe((A(),N("input",{key:0,id:"username",disabled:d.value,required:"",pattern:"[a-zA-Z0-9_]+",minlength:"3",maxlength:"30",onInvalid:R,"onUpdate:modelValue":C[0]||(C[0]=B=>s.username=B),placeholder:O.$t("user.USERNAME")},null,40,e4e)),[[at,s.username]]):x("",!0),h(a)==="register"?(A(),N("div",t4e,[n4e,j(" "+T(O.$t("user.USERNAME_INFO")),1)])):x("",!0),h(a)!=="reset"?qe((A(),N("input",{key:2,id:"email",disabled:d.value||m.value,required:"",onInvalid:R,type:"email","onUpdate:modelValue":C[1]||(C[1]=B=>s.email=B),placeholder:O.$t("user.EMAIL")},null,40,r4e)),[[at,s.email]]):x("",!0),["reset-request","register","account-confirmation-resend"].includes(h(a))?(A(),N("div",a4e,[s4e,j(" "+T(O.$t("user.EMAIL_INFO")),1)])):x("",!0),["account-confirmation-resend","reset-request"].includes(h(a))?x("",!0):(A(),te(kd,{key:4,disabled:d.value,required:!0,placeholder:h(a)==="reset"?O.$t("user.ENTER_PASSWORD"):O.$t("user.PASSWORD"),password:s.password,checkStrength:["reset","register"].includes(h(a)),onUpdatePassword:I,onPasswordError:R},null,8,["disabled","placeholder","password","checkStrength"])),h(a)==="register"?(A(),N("label",i4e,[qe(p("input",{type:"checkbox",id:"accepted_policy",disabled:d.value,required:"",onInvalid:R,"onUpdate:modelValue":C[2]||(C[2]=B=>s.accepted_policy=B)},null,40,o4e),[[rf,s.accepted_policy]]),p("span",null,[k(w,{keypath:"user.READ_AND_ACCEPT_PRIVACY_POLICY"},{default:ue(()=>[k(M,{to:"/privacy-policy",target:"_blank"},{default:ue(()=>[j(T(O.$t("privacy_policy.TITLE")),1)]),_:1})]),_:1})])])):x("",!0)]),p("button",{type:"submit",disabled:d.value||m.value},T(O.$t(i.value)),9,u4e)],34),h(a)==="login"?(A(),N("div",c4e,[k(M,{class:"links",to:"/register"},{default:ue(()=>[j(T(O.$t("user.REGISTER")),1)]),_:1}),c.value.is_email_sending_enabled?(A(),N("span",l4e,"-")):x("",!0),c.value.is_email_sending_enabled?(A(),te(M,{key:1,class:"links",to:"/password-reset/request"},{default:ue(()=>[j(T(O.$t("user.PASSWORD_FORGOTTEN")),1)]),_:1})):x("",!0)])):x("",!0),h(a)==="register"?(A(),N("div",d4e,[p("span",f4e,T(O.$t("user.ALREADY_HAVE_ACCOUNT")),1),k(M,{class:"links",to:"/login"},{default:ue(()=>[j(T(O.$t("user.LOGIN")),1)]),_:1})])):x("",!0),["login","register"].includes(h(a))&&c.value.is_email_sending_enabled?(A(),N("div",p4e,[k(M,{class:"links",to:"/account-confirmation/resend"},{default:ue(()=>[j(T(O.$t("user.ACCOUNT_CONFIRMATION_NOT_RECEIVED")),1)]),_:1})])):x("",!0),o.value?(A(),te(G,{key:6,message:o.value},null,8,["message"])):x("",!0)],2)])],2)}}}),m0=re(m4e,[["__scopeId","data-v-13388f00"]]),E4e={id:"account-confirmation-email",class:"center-card with-margin"},h4e={key:0,class:"email-sent"},_4e={class:"email-sent-message"},T4e={key:1},g4e=Z({__name:"AccountConfirmationEmail",props:{action:{}},setup(e){const t=e,{action:n}=_e(t);return(r,a)=>{const s=oe("Card");return A(),N("div",E4e,[h(n)==="email-sent"?(A(),N("div",h4e,[k(PA),p("div",_4e,T(r.$t("user.ACCOUNT_CONFIRMATION_SENT")),1)])):(A(),N("div",T4e,[k(s,null,{title:ue(()=>[j(T(r.$t("user.RESENT_ACCOUNT_CONFIRMATION")),1)]),content:ue(()=>[k(m0,{action:h(n)},null,8,["action"])]),_:1})]))])}}}),A4e=re(g4e,[["__scopeId","data-v-b0299010"]]),S4e={id:"account-confirmation",class:"view"},O4e={class:"container"},I4e=Z({__name:"AccountConfirmationResendView",props:{action:{}},setup(e){const t=e,{action:n}=_e(t);return(r,a)=>(A(),N("div",S4e,[p("div",O4e,[k(A4e,{action:h(n)},null,8,["action"])])]))}}),uh=re(I4e,[["__scopeId","data-v-9a9c1644"]]),v4e={key:0,id:"account-confirmation",class:"center-card with-margin"},R4e={class:"error-message"},b4e=Z({__name:"AccountConfirmationView",setup(e){const t=qt(),n=Yr(),r=Me(),a=$(()=>r.getters[H.GETTERS.ERROR_MESSAGES]),s=$(()=>t.query.token);Nt(()=>i());function i(){s.value?r.dispatch(K.ACTIONS.CONFIRM_ACCOUNT,{token:s.value}):n.push("/")}return Ct(()=>r.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES)),(o,u)=>{const l=oe("router-link");return a.value?(A(),N("div",v4e,[k(Df),p("p",R4e,[p("span",null,T(o.$t("error.SOMETHING_WRONG"))+".",1),k(l,{class:"links",to:"/account-confirmation/resend"},{default:ue(()=>[j(T(o.$t("buttons.ACCOUNT-CONFIRMATION-RESEND"))+"? ",1)]),_:1})])])):x("",!0)}}}),N4e=re(b4e,[["__scopeId","data-v-a0fa0b62"]]),C4e={key:0,id:"email-update",class:"center-card with-margin"},y4e={class:"error-message"},D4e=Z({__name:"EmailUpdateView",setup(e){const t=qt(),n=Yr(),r=Me(),a=$(()=>r.getters[K.GETTERS.AUTH_USER_PROFILE]),s=$(()=>r.getters[K.GETTERS.IS_AUTHENTICATED]),i=$(()=>r.getters[H.GETTERS.ERROR_MESSAGES]),o=$(()=>t.query.token);Nt(()=>u());function u(){o.value?r.dispatch(K.ACTIONS.CONFIRM_EMAIL,{token:o.value,refreshUser:s.value}):n.push("/")}return Ct(()=>r.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES)),Ge(()=>i.value,l=>{a.value.username&&l&&n.push("/")}),(l,c)=>{const f=oe("router-link"),d=oe("i18n-t");return i.value&&!a.value.username?(A(),N("div",C4e,[k(Df),p("p",y4e,[p("span",null,T(l.$t("error.SOMETHING_WRONG"))+".",1),p("span",null,[k(d,{keypath:"user.PROFILE.ERRORED_EMAIL_UPDATE"},{default:ue(()=>[k(f,{to:"/login"},{default:ue(()=>[j(T(l.$t("user.LOG_IN")),1)]),_:1})]),_:1})])])])):x("",!0)}}}),P4e=re(D4e,[["__scopeId","data-v-b8fbd32f"]]),w4e={id:"loginOrRegister",class:"view"},L4e={class:"container"},$4e={class:"container-sub"},k4e={class:"container-sub"},U4e=Z({__name:"LoginOrRegister",props:{action:{}},setup(e){const t=e,{action:n}=_e(t);return(r,a)=>(A(),N("div",w4e,[p("div",L4e,[p("div",$4e,[k(SA)]),p("div",k4e,[k(m0,{action:h(n)},null,8,["action"])])])]))}}),ch=re(U4e,[["__scopeId","data-v-84d61340"]]),M4e={name:"Password"},x4e={version:"1.1",id:"Layer_1",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",x:"0px",y:"0px",viewBox:"0 0 512.001 512.001",style:{"enable-background":"new 0 0 512.001 512.001"},"xml:space":"preserve"},F4e=Zn(`(ot("data-v-13388f00"),e=e(),ut(),e),t4e={id:"user-form"},n4e={key:2,class:"info-box success-message"},r4e={class:"form-items"},a4e=["disabled","placeholder"],s4e={key:1,class:"form-info"},i4e=wA(()=>p("i",{class:"fa fa-info-circle","aria-hidden":"true"},null,-1)),o4e=["disabled","placeholder"],u4e={key:3,class:"form-info"},c4e=wA(()=>p("i",{class:"fa fa-info-circle","aria-hidden":"true"},null,-1)),l4e={key:5,for:"accepted_policy",class:"accepted_policy"},d4e=["disabled"],f4e=["disabled"],p4e={key:3},m4e={key:0},E4e={key:4},h4e={class:"account"},_4e={key:5},T4e=Z({__name:"UserAuthForm",props:{action:{},token:{default:""}},setup(e){const t=e,n=qt(),r=Me(),{action:a}=_e(t),s=zt({username:"",email:"",password:"",accepted_policy:!1}),i=$(()=>I(t.action)),o=$(()=>r.getters[H.GETTERS.ERROR_MESSAGES]),u=$(()=>r.getters[K.GETTERS.IS_REGISTRATION_SUCCESS]),l=$(()=>r.getters[K.GETTERS.IS_SUCCESS]),c=$(()=>r.getters[H.GETTERS.APP_CONFIG]),f=$(()=>r.getters[H.GETTERS.LANGUAGE]),d=$(()=>t.action==="register"&&!c.value.is_registration_enabled),m=$(()=>["reset-request","account-confirmation-resend"].includes(t.action)&&!c.value.is_email_sending_enabled),E=le(!1);function I(O){switch(O){case"reset-request":case"reset":return"buttons.SUBMIT";default:return`buttons.${t.action.toUpperCase()}`}}function R(){E.value=!0}function v(O){s.password=O}function b(O){switch(O){case"reset":return t.token?r.dispatch(K.ACTIONS.RESET_USER_PASSWORD,{password:s.password,token:t.token}):r.commit(H.MUTATIONS.SET_ERROR_MESSAGES,"user.INVALID_TOKEN");case"reset-request":return r.dispatch(K.ACTIONS.SEND_PASSWORD_RESET_REQUEST,{email:s.email});case"account-confirmation-resend":return r.dispatch(K.ACTIONS.RESEND_ACCOUNT_CONFIRMATION_EMAIL,{email:s.email});default:s.language=f.value,r.dispatch(K.ACTIONS.LOGIN_OR_REGISTER,{actionType:O,formData:s,redirectUrl:n.query.from})}}function S(){s.username="",s.email="",s.password="",s.accepted_policy=!1}return bt(()=>r.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES)),Ge(()=>n.path,async()=>{r.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES),r.commit(K.MUTATIONS.UPDATE_IS_SUCCESS,!1),r.commit(K.MUTATIONS.UPDATE_IS_REGISTRATION_SUCCESS,!1),E.value=!1,S()}),(O,C)=>{const P=oe("AlertMessage"),M=oe("router-link"),w=oe("i18n-t"),G=oe("ErrorMessage");return A(),N("div",{id:"user-auth-form",class:Se(`${["reset","reset-request"].includes(h(a))?h(a):"user-form"}`)},[p("div",t4e,[p("div",{class:Se(["form-box",{disabled:d.value}])},[d.value?(A(),te(P,{key:0,message:"user.REGISTER_DISABLED"})):x("",!0),m.value?(A(),te(P,{key:1,message:"admin.EMAIL_SENDING_DISABLED"})):x("",!0),l.value||u.value?(A(),N("div",n4e,T(O.$t(`user.PROFILE.SUCCESSFUL_${u.value?`REGISTRATION${c.value.is_email_sending_enabled?"_WITH_EMAIL":""}`:"UPDATE"}`)),1)):x("",!0),p("form",{class:Se({errors:E.value}),onSubmit:C[3]||(C[3]=Je(B=>b(h(a)),["prevent"]))},[p("div",r4e,[h(a)==="register"?qe((A(),N("input",{key:0,id:"username",disabled:d.value,required:"",pattern:"[a-zA-Z0-9_]+",minlength:"3",maxlength:"30",onInvalid:R,"onUpdate:modelValue":C[0]||(C[0]=B=>s.username=B),placeholder:O.$t("user.USERNAME")},null,40,a4e)),[[at,s.username]]):x("",!0),h(a)==="register"?(A(),N("div",s4e,[i4e,j(" "+T(O.$t("user.USERNAME_INFO")),1)])):x("",!0),h(a)!=="reset"?qe((A(),N("input",{key:2,id:"email",disabled:d.value||m.value,required:"",onInvalid:R,type:"email","onUpdate:modelValue":C[1]||(C[1]=B=>s.email=B),placeholder:O.$t("user.EMAIL")},null,40,o4e)),[[at,s.email]]):x("",!0),["reset-request","register","account-confirmation-resend"].includes(h(a))?(A(),N("div",u4e,[c4e,j(" "+T(O.$t("user.EMAIL_INFO")),1)])):x("",!0),["account-confirmation-resend","reset-request"].includes(h(a))?x("",!0):(A(),te(kd,{key:4,disabled:d.value,required:!0,placeholder:h(a)==="reset"?O.$t("user.ENTER_PASSWORD"):O.$t("user.PASSWORD"),password:s.password,checkStrength:["reset","register"].includes(h(a)),onUpdatePassword:v,onPasswordError:R},null,8,["disabled","placeholder","password","checkStrength"])),h(a)==="register"?(A(),N("label",l4e,[qe(p("input",{type:"checkbox",id:"accepted_policy",disabled:d.value,required:"",onInvalid:R,"onUpdate:modelValue":C[2]||(C[2]=B=>s.accepted_policy=B)},null,40,d4e),[[rf,s.accepted_policy]]),p("span",null,[k(w,{keypath:"user.READ_AND_ACCEPT_PRIVACY_POLICY"},{default:ue(()=>[k(M,{to:"/privacy-policy",target:"_blank"},{default:ue(()=>[j(T(O.$t("privacy_policy.TITLE")),1)]),_:1})]),_:1})])])):x("",!0)]),p("button",{type:"submit",disabled:d.value||m.value},T(O.$t(i.value)),9,f4e)],34),h(a)==="login"?(A(),N("div",p4e,[k(M,{class:"links",to:"/register"},{default:ue(()=>[j(T(O.$t("user.REGISTER")),1)]),_:1}),c.value.is_email_sending_enabled?(A(),N("span",m4e,"-")):x("",!0),c.value.is_email_sending_enabled?(A(),te(M,{key:1,class:"links",to:"/password-reset/request"},{default:ue(()=>[j(T(O.$t("user.PASSWORD_FORGOTTEN")),1)]),_:1})):x("",!0)])):x("",!0),h(a)==="register"?(A(),N("div",E4e,[p("span",h4e,T(O.$t("user.ALREADY_HAVE_ACCOUNT")),1),k(M,{class:"links",to:"/login"},{default:ue(()=>[j(T(O.$t("user.LOGIN")),1)]),_:1})])):x("",!0),["login","register"].includes(h(a))&&c.value.is_email_sending_enabled?(A(),N("div",_4e,[k(M,{class:"links",to:"/account-confirmation/resend"},{default:ue(()=>[j(T(O.$t("user.ACCOUNT_CONFIRMATION_NOT_RECEIVED")),1)]),_:1})])):x("",!0),o.value?(A(),te(G,{key:6,message:o.value},null,8,["message"])):x("",!0)],2)])],2)}}}),m0=re(T4e,[["__scopeId","data-v-13388f00"]]),g4e={id:"account-confirmation-email",class:"center-card with-margin"},A4e={key:0,class:"email-sent"},S4e={class:"email-sent-message"},O4e={key:1},I4e=Z({__name:"AccountConfirmationEmail",props:{action:{}},setup(e){const t=e,{action:n}=_e(t);return(r,a)=>{const s=oe("Card");return A(),N("div",g4e,[h(n)==="email-sent"?(A(),N("div",A4e,[k(PA),p("div",S4e,T(r.$t("user.ACCOUNT_CONFIRMATION_SENT")),1)])):(A(),N("div",O4e,[k(s,null,{title:ue(()=>[j(T(r.$t("user.RESENT_ACCOUNT_CONFIRMATION")),1)]),content:ue(()=>[k(m0,{action:h(n)},null,8,["action"])]),_:1})]))])}}}),v4e=re(I4e,[["__scopeId","data-v-b0299010"]]),R4e={id:"account-confirmation",class:"view"},b4e={class:"container"},N4e=Z({__name:"AccountConfirmationResendView",props:{action:{}},setup(e){const t=e,{action:n}=_e(t);return(r,a)=>(A(),N("div",R4e,[p("div",b4e,[k(v4e,{action:h(n)},null,8,["action"])])]))}}),uh=re(N4e,[["__scopeId","data-v-9a9c1644"]]),C4e={key:0,id:"account-confirmation",class:"center-card with-margin"},y4e={class:"error-message"},D4e=Z({__name:"AccountConfirmationView",setup(e){const t=qt(),n=Yr(),r=Me(),a=$(()=>r.getters[H.GETTERS.ERROR_MESSAGES]),s=$(()=>t.query.token);Ct(()=>i());function i(){s.value?r.dispatch(K.ACTIONS.CONFIRM_ACCOUNT,{token:s.value}):n.push("/")}return bt(()=>r.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES)),(o,u)=>{const l=oe("router-link");return a.value?(A(),N("div",C4e,[k(Df),p("p",y4e,[p("span",null,T(o.$t("error.SOMETHING_WRONG"))+".",1),k(l,{class:"links",to:"/account-confirmation/resend"},{default:ue(()=>[j(T(o.$t("buttons.ACCOUNT-CONFIRMATION-RESEND"))+"? ",1)]),_:1})])])):x("",!0)}}}),P4e=re(D4e,[["__scopeId","data-v-a0fa0b62"]]),w4e={key:0,id:"email-update",class:"center-card with-margin"},L4e={class:"error-message"},$4e=Z({__name:"EmailUpdateView",setup(e){const t=qt(),n=Yr(),r=Me(),a=$(()=>r.getters[K.GETTERS.AUTH_USER_PROFILE]),s=$(()=>r.getters[K.GETTERS.IS_AUTHENTICATED]),i=$(()=>r.getters[H.GETTERS.ERROR_MESSAGES]),o=$(()=>t.query.token);Ct(()=>u());function u(){o.value?r.dispatch(K.ACTIONS.CONFIRM_EMAIL,{token:o.value,refreshUser:s.value}):n.push("/")}return bt(()=>r.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES)),Ge(()=>i.value,l=>{a.value.username&&l&&n.push("/")}),(l,c)=>{const f=oe("router-link"),d=oe("i18n-t");return i.value&&!a.value.username?(A(),N("div",w4e,[k(Df),p("p",L4e,[p("span",null,T(l.$t("error.SOMETHING_WRONG"))+".",1),p("span",null,[k(d,{keypath:"user.PROFILE.ERRORED_EMAIL_UPDATE"},{default:ue(()=>[k(f,{to:"/login"},{default:ue(()=>[j(T(l.$t("user.LOG_IN")),1)]),_:1})]),_:1})])])])):x("",!0)}}}),k4e=re($4e,[["__scopeId","data-v-b8fbd32f"]]),U4e={id:"loginOrRegister",class:"view"},M4e={class:"container"},x4e={class:"container-sub"},F4e={class:"container-sub"},W4e=Z({__name:"LoginOrRegister",props:{action:{}},setup(e){const t=e,{action:n}=_e(t);return(r,a)=>(A(),N("div",U4e,[p("div",M4e,[p("div",x4e,[k(SA)]),p("div",F4e,[k(m0,{action:h(n)},null,8,["action"])])])]))}}),ch=re(W4e,[["__scopeId","data-v-84d61340"]]),G4e={name:"Password"},z4e={version:"1.1",id:"Layer_1",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",x:"0px",y:"0px",viewBox:"0 0 512.001 512.001",style:{"enable-background":"new 0 0 512.001 512.001"},"xml:space":"preserve"},B4e=Zn(``,7),W4e=[F4e];function G4e(e,t,n,r,a,s){return A(),N("svg",x4e,W4e)}const z4e=re(M4e,[["render",G4e]]),B4e={id:"password-action-done",class:"center-card with-margin"},H4e={class:"password-message"},V4e={key:0},j4e=Z({__name:"PasswordActionDone",props:{action:{}},setup(e){const t=e,{action:n}=_e(t);return(r,a)=>{const s=oe("router-link"),i=oe("i18n-t");return A(),N("div",B4e,[h(n)==="request-sent"?(A(),te(PA,{key:0})):(A(),te(z4e,{key:1})),p("div",H4e,[h(n)==="request-sent"?(A(),N("span",V4e,T(r.$t("user.PASSWORD_SENT_EMAIL_TEXT")),1)):(A(),te(i,{key:1,keypath:"user.PASSWORD_UPDATED"},{default:ue(()=>[k(s,{to:"/login"},{default:ue(()=>[j(T(r.$t("common.HERE")),1)]),_:1})]),_:1}))])])}}}),K4e=re(j4e,[["__scopeId","data-v-ee1004fc"]]),Y4e={id:"password-reset-request",class:"center-card with-margin"},q4e=Z({__name:"PasswordResetForm",props:{action:{},token:{default:""}},setup(e){const t=e,{action:n,token:r}=_e(t);return(a,s)=>{const i=oe("Card");return A(),N("div",Y4e,[k(i,null,{title:ue(()=>[j(T(a.$t("user.RESET_PASSWORD")),1)]),content:ue(()=>[k(m0,{action:h(n),token:h(r)},null,8,["action","token"])]),_:1})])}}}),X4e=re(q4e,[["__scopeId","data-v-97f01ba1"]]),Z4e={id:"password-reset",class:"view"},Q4e={class:"container"},J4e=Z({__name:"PasswordResetView",props:{action:{}},setup(e){const t=e,n=qt(),r=Yr(),{action:a}=_e(t),s=$(()=>n.query.token);return Nt(()=>{t.action==="reset"&&!s.value&&r.push("/")}),(i,o)=>(A(),N("div",Z4e,[p("div",Q4e,[h(a).startsWith("reset")?(A(),te(X4e,{key:0,action:h(a),token:s.value},null,8,["action","token"])):(A(),te(K4e,{key:1,action:h(a)},null,8,["action"]))])]))}}),co=re(J4e,[["__scopeId","data-v-5cbe9029"]]),eDe=e=>(dt("data-v-af92ad3a"),e=e(),ft(),e),tDe={key:0,id:"profile",class:"view"},nDe=eDe(()=>p("div",{id:"bottom"},null,-1)),rDe=Z({__name:"ProfileView",setup(e){const t=Me(),n=$(()=>t.getters[K.GETTERS.AUTH_USER_PROFILE]);return(r,a)=>{const s=oe("router-view");return n.value.username?(A(),N("div",tDe,[k(s,{user:n.value},null,8,["user"]),nDe])):x("",!0)}}}),aDe=re(rDe,[["__scopeId","data-v-af92ad3a"]]),sDe={key:0,id:"user",class:"view"},iDe={class:"box"},oDe=Z({__name:"UserView",props:{fromAdmin:{type:Boolean}},setup(e){const t=e,{fromAdmin:n}=_e(t),r=qt(),a=Me(),s=$(()=>a.getters[De.GETTERS.USER]);return Nt(()=>{r.params.username&&typeof r.params.username=="string"&&a.dispatch(De.ACTIONS.GET_USER,r.params.username)}),hi(()=>{a.dispatch(De.ACTIONS.EMPTY_USER)}),(i,o)=>s.value.username?(A(),N("div",sDe,[k(rA,{user:s.value},null,8,["user"]),p("div",iDe,[k(sA,{user:s.value,"from-admin":h(n)},null,8,["user","from-admin"])])])):x("",!0)}}),lh=re(oDe,[["__scopeId","data-v-1b7a0b4f"]]),uDe={id:"workout-form"},cDe={class:"form-items"},lDe={key:0,class:"form-item-radio"},dDe=["checked","disabled"],fDe={for:"withGpx"},pDe=["checked","disabled"],mDe={for:"withoutGpx"},EDe={class:"form-item"},hDe=["disabled"],_De=["value"],TDe={key:1,class:"form-item"},gDe={for:"gpxFile"},ADe=["disabled"],SDe={class:"files-help info-box"},ODe={key:2,class:"form-item"},IDe={for:"title"},vDe=["required","disabled"],RDe={key:3},bDe={class:"workout-date-duration"},NDe={class:"form-item"},CDe={class:"workout-date-time"},yDe=["disabled"],DDe=["disabled"],PDe={class:"form-item"},wDe=["disabled"],LDe=["disabled"],$De=["disabled"],kDe={class:"workout-data"},UDe={class:"form-item"},MDe=["disabled"],xDe={class:"form-item"},FDe=["disabled"],WDe={class:"form-item"},GDe=["disabled"],zDe={class:"form-item"},BDe={key:1},HDe={key:2,class:"form-buttons"},VDe=["disabled"],jDe=Z({__name:"WorkoutEdition",props:{authUser:{},sports:{},isCreation:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},workout:{default:()=>({})}},setup(e){const t=e,{t:n}=Yt(),r=Me(),a=Yr(),{authUser:s,workout:i,isCreation:o,loading:u}=_e(t),l=$(()=>Xr(t.sports,n,"is_active_for_user",i.value.id?[i.value.sport_id]:[])),c=$(()=>r.getters[H.GETTERS.APP_CONFIG]),f=c.value.max_single_file_size?qo(c.value.max_single_file_size):"",d=c.value.gpx_limit_import,m=c.value.max_zip_file_size?qo(c.value.max_zip_file_size):"",E=$(()=>r.getters[H.GETTERS.ERROR_MESSAGES]),v=zt({sport_id:"",title:"",notes:"",workoutDate:"",workoutTime:"",workoutDurationHour:"",workoutDurationMinutes:"",workoutDurationSeconds:"",workoutDistance:"",workoutAscent:"",workoutDescent:""}),R=le(i.value.id?i.value.with_gpx:o.value);let I=null;const b=le(!1),S=le([]);It(()=>{let D;t.workout.id?(M(t.workout),D=document.getElementById("sport")):D=document.getElementById("withGpx"),D&&D.focus()});function O(D){v.notes=D}function C(){R.value=!R.value,b.value=!1}function P(D){D.target.files&&(I=D.target.files[0])}function M(D){if(v.sport_id=`${D.sport_id}`,v.title=D.title,v.notes=D.notes,!D.with_gpx){const z=tA(Oc(D.workout_date,t.authUser.timezone),"yyyy-MM-dd"),V=D.duration.split(":");v.workoutDistance=`${s.value.imperial_units?sn(D.distance,"km","mi",3):parseFloat(D.distance.toFixed(3))}`,v.workoutDate=z.workout_date,v.workoutTime=z.workout_time,v.workoutDurationHour=V[0],v.workoutDurationMinutes=V[1],v.workoutDurationSeconds=V[2],v.workoutAscent=D.ascent===null?"":`${s.value.imperial_units?sn(D.ascent,"m","ft",2):parseFloat(D.ascent.toFixed(2))}`,v.workoutDescent=D.descent===null?"":`${s.value.imperial_units?sn(D.descent,"m","ft",2):parseFloat(D.descent.toFixed(2))}`}}function w(){return S.value.includes("workouts.INVALID_DISTANCE")}function G(){return S.value.includes("workouts.INVALID_DURATION")}function B(){return S.value.includes("workouts.INVALID_ASCENT_OR_DESCENT")}function L(D){S.value=[],D.title=v.title,D.duration=+v.workoutDurationHour*3600+ +v.workoutDurationMinutes*60+ +v.workoutDurationSeconds,D.duration<=0&&S.value.push("workouts.INVALID_DURATION"),D.distance=s.value.imperial_units?sn(+v.workoutDistance,"mi","km",3):+v.workoutDistance,D.distance<=0&&S.value.push("workouts.INVALID_DISTANCE"),D.workout_date=`${v.workoutDate} ${v.workoutTime}`,D.ascent=v.workoutAscent===""?null:s.value.imperial_units?sn(+v.workoutAscent,"ft","m",3):+v.workoutAscent,D.descent=v.workoutDescent===""?null:s.value.imperial_units?sn(+v.workoutDescent,"ft","m",3):+v.workoutDescent,(D.ascent!==null&&D.descent===null||D.ascent===null&&D.descent!==null)&&S.value.push("workouts.INVALID_ASCENT_OR_DESCENT")}function X(){const D={sport_id:+v.sport_id,notes:v.notes};if(t.workout.id)t.workout.with_gpx?D.title=v.title:L(D),S.value.length>0?r.commit(H.MUTATIONS.SET_ERROR_MESSAGES,S.value):r.dispatch(Ae.ACTIONS.EDIT_WORKOUT,{workoutId:t.workout.id,data:D});else if(R.value){if(!I){r.commit(H.MUTATIONS.SET_ERROR_MESSAGES,"workouts.NO_FILE_PROVIDED");return}D.file=I,r.dispatch(Ae.ACTIONS.ADD_WORKOUT,D)}else L(D),S.value.length>0?r.commit(H.MUTATIONS.SET_ERROR_MESSAGES,S.value):r.dispatch(Ae.ACTIONS.ADD_WORKOUT_WITHOUT_GPX,D)}function J(){t.workout.id?a.push({name:"Workout",params:{workoutId:t.workout.id}}):a.go(-1)}function ne(){b.value=!0}return Ct(()=>r.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES)),Ge(()=>t.workout,async(D,z)=>{D!==z&&D&&D.id&&M(D)}),(D,z)=>{const V=oe("CustomTextArea"),ae=oe("ErrorMessage"),Be=oe("Loader"),Le=oe("Card");return A(),N("div",{id:"workout-edition",class:Se(["center-card with-margin",{"center-form":h(i)&&h(i).with_gpx}])},[k(Le,null,{title:ue(()=>[j(T(D.$t(`workouts.${h(o)?"ADD":"EDIT"}_WORKOUT`)),1)]),content:ue(()=>[p("div",uDe,[p("form",{class:Se({errors:b.value}),onSubmit:Je(X,["prevent"])},[p("div",cDe,[h(o)?(A(),N("div",lDe,[p("div",null,[p("input",{id:"withGpx",type:"radio",checked:R.value,disabled:h(u),onClick:C},null,8,dDe),p("label",fDe,T(D.$t("workouts.WITH_GPX")),1)]),p("div",null,[p("input",{id:"withoutGpx",type:"radio",checked:!R.value,disabled:h(u),onClick:C},null,8,pDe),p("label",mDe,T(D.$t("workouts.WITHOUT_GPX")),1)])])):x("",!0),p("div",EDe,[p("label",null,T(D.$t("workouts.SPORT",1))+"*: ",1),qe(p("select",{id:"sport",required:"",onInvalid:ne,disabled:h(u),"onUpdate:modelValue":z[0]||(z[0]=Oe=>v.sport_id=Oe)},[(A(!0),N(Re,null,ze(l.value,Oe=>(A(),N("option",{value:Oe.id,key:Oe.id},T(Oe.translatedLabel),9,_De))),128))],40,hDe),[[ks,v.sport_id]])]),h(o)&&R.value?(A(),N("div",TDe,[p("label",gDe,T(D.$t("workouts.GPX_FILE"))+" "+T(D.$t("workouts.ZIP_ARCHIVE_DESCRIPTION"))+"*: ",1),p("input",{id:"gpxFile",name:"gpxFile",type:"file",accept:".gpx, .zip",disabled:h(u),required:"",onInvalid:ne,onInput:P},null,40,ADe),p("div",SDe,[p("div",null,[p("strong",null,T(D.$t("workouts.GPX_FILE"))+":",1),p("ul",null,[p("li",null,T(D.$t("workouts.MAX_SIZE"))+": "+T(h(f)),1)])]),p("div",null,[p("strong",null,T(D.$t("workouts.ZIP_ARCHIVE"))+":",1),p("ul",null,[p("li",null,T(D.$t("workouts.NO_FOLDER")),1),p("li",null,T(D.$t("workouts.MAX_FILES"))+": "+T(h(d)),1),p("li",null,T(D.$t("workouts.MAX_SIZE"))+": "+T(h(m)),1)])])])])):(A(),N("div",ODe,[p("label",IDe,T(D.$t("workouts.TITLE"))+": ",1),qe(p("input",{id:"title",name:"title",type:"text",required:!h(o),onInvalid:ne,disabled:h(u),"onUpdate:modelValue":z[1]||(z[1]=Oe=>v.title=Oe)},null,40,vDe),[[at,v.title]])])),R.value?x("",!0):(A(),N("div",RDe,[p("div",bDe,[p("div",NDe,[p("label",null,T(D.$t("workouts.WORKOUT_DATE"))+"*:",1),p("div",CDe,[qe(p("input",{id:"workout-date",name:"workout-date",type:"date",required:"",onInvalid:ne,disabled:h(u),"onUpdate:modelValue":z[2]||(z[2]=Oe=>v.workoutDate=Oe)},null,40,yDe),[[at,v.workoutDate]]),qe(p("input",{id:"workout-time",name:"workout-time",class:"workout-time",type:"time",required:"",onInvalid:ne,disabled:h(u),"onUpdate:modelValue":z[3]||(z[3]=Oe=>v.workoutTime=Oe)},null,40,DDe),[[at,v.workoutTime]])])]),p("div",PDe,[p("label",null,T(D.$t("workouts.DURATION"))+"*:",1),p("div",null,[qe(p("input",{id:"workout-duration-hour",name:"workout-duration-hour",class:Se(["workout-duration",{errored:G()}]),type:"text",placeholder:"HH",minlength:"1",maxlength:"2",pattern:"^([0-1]?[0-9]|2[0-3])$",required:"",onInvalid:ne,disabled:h(u),"onUpdate:modelValue":z[4]||(z[4]=Oe=>v.workoutDurationHour=Oe)},null,42,wDe),[[at,v.workoutDurationHour]]),j(" : "),qe(p("input",{id:"workout-duration-minutes",name:"workout-duration-minutes",class:Se(["workout-duration",{errored:G()}]),type:"text",pattern:"^([0-5][0-9])$",minlength:"2",maxlength:"2",placeholder:"MM",required:"",onInvalid:ne,disabled:h(u),"onUpdate:modelValue":z[5]||(z[5]=Oe=>v.workoutDurationMinutes=Oe)},null,42,LDe),[[at,v.workoutDurationMinutes]]),j(" : "),qe(p("input",{id:"workout-duration-seconds",name:"workout-duration-seconds",class:Se(["workout-duration",{errored:G()}]),type:"text",pattern:"^([0-5][0-9])$",minlength:"2",maxlength:"2",placeholder:"SS",required:"",onInvalid:ne,disabled:h(u),"onUpdate:modelValue":z[6]||(z[6]=Oe=>v.workoutDurationSeconds=Oe)},null,42,$De),[[at,v.workoutDurationSeconds]])])])]),p("div",kDe,[p("div",UDe,[p("label",null,T(D.$t("workouts.DISTANCE"))+" ("+T(h(s).imperial_units?"mi":"km")+")*: ",1),qe(p("input",{class:Se({errored:w()}),name:"workout-distance",type:"number",min:"0",step:"0.001",required:"",onInvalid:ne,disabled:h(u),"onUpdate:modelValue":z[7]||(z[7]=Oe=>v.workoutDistance=Oe)},null,42,MDe),[[at,v.workoutDistance]])]),p("div",xDe,[p("label",null,T(D.$t("workouts.ASCENT"))+" ("+T(h(s).imperial_units?"ft":"m")+"): ",1),qe(p("input",{class:Se({errored:B()}),name:"workout-ascent",type:"number",min:"0",step:"0.01",onInvalid:ne,disabled:h(u),"onUpdate:modelValue":z[8]||(z[8]=Oe=>v.workoutAscent=Oe)},null,42,FDe),[[at,v.workoutAscent]])]),p("div",WDe,[p("label",null,T(D.$t("workouts.DESCENT"))+" ("+T(h(s).imperial_units?"ft":"m")+"): ",1),qe(p("input",{class:Se({errored:B()}),name:"workout-descent",type:"number",min:"0",step:"0.01",onInvalid:ne,disabled:h(u),"onUpdate:modelValue":z[9]||(z[9]=Oe=>v.workoutDescent=Oe)},null,42,GDe),[[at,v.workoutDescent]])])])])),p("div",zDe,[p("label",null,T(D.$t("workouts.NOTES"))+": ",1),k(V,{name:"notes",input:v.notes,disabled:h(u),onUpdateValue:O},null,8,["input","disabled"])])]),E.value?(A(),te(ae,{key:0,message:E.value},null,8,["message"])):x("",!0),h(u)?(A(),N("div",BDe,[k(Be)])):(A(),N("div",HDe,[p("button",{class:"confirm",type:"submit",disabled:h(u)},T(D.$t("buttons.SUBMIT")),9,VDe),p("button",{class:"cancel",onClick:Je(J,["prevent"])},T(D.$t("buttons.CANCEL")),1)]))],34)])]),_:1})],2)}}}),LA=re(jDe,[["__scopeId","data-v-4c5a9cd1"]]),KDe={id:"add-workout",class:"view"},YDe={class:"container"},qDe=Z({__name:"AddWorkout",setup(e){const t=Me(),n=$(()=>t.getters[Mt.GETTERS.SPORTS]),r=$(()=>t.getters[K.GETTERS.AUTH_USER_PROFILE]),a=$(()=>t.getters[Ae.GETTERS.WORKOUT_DATA]);return(s,i)=>(A(),N("div",KDe,[p("div",YDe,[k(LA,{authUser:r.value,sports:n.value,isCreation:!0,loading:a.value.loading},null,8,["authUser","sports","loading"])])]))}}),XDe={id:"edit-workout",class:"view"},ZDe={class:"container"},QDe=Z({__name:"EditWorkout",setup(e){const t=qt(),n=Me(),r=$(()=>n.getters[K.GETTERS.AUTH_USER_PROFILE]),a=$(()=>n.getters[Mt.GETTERS.SPORTS]),s=$(()=>n.getters[Ae.GETTERS.WORKOUT_DATA]);return Nt(()=>{n.dispatch(Ae.ACTIONS.GET_WORKOUT_DATA,{workoutId:t.params.workoutId})}),Ge(()=>t.params.workoutId,async i=>{i||n.commit(Ae.MUTATIONS.EMPTY_WORKOUT)}),(i,o)=>(A(),N("div",XDe,[p("div",ZDe,[s.value.workout.id?(A(),te(LA,{key:0,authUser:r.value,sports:a.value,workout:s.value.workout,loading:s.value.loading},null,8,["authUser","sports","workout","loading"])):x("",!0)])]))}}),ps=e=>(dt("data-v-e1628a52"),e=e(),ft(),e),JDe={id:"workout-card-title"},ePe=["disabled","title"],tPe=ps(()=>p("i",{class:"fa fa-chevron-left","aria-hidden":"true"},null,-1)),nPe=[tPe],rPe={class:"workout-card-title"},aPe={class:"workout-title-date"},sPe={key:0,class:"workout-title"},iPe=["aria-label"],oPe=ps(()=>p("i",{class:"fa fa-edit","aria-hidden":"true"},null,-1)),uPe=[oPe],cPe=["aria-label"],lPe=ps(()=>p("i",{class:"fa fa-download","aria-hidden":"true"},null,-1)),dPe=[lPe],fPe=["aria-label"],pPe=ps(()=>p("i",{class:"fa fa-trash","aria-hidden":"true"},null,-1)),mPe=[pPe],EPe={key:1,class:"workout-title"},hPe={class:"workout-segment"},_Pe=ps(()=>p("i",{class:"fa fa-map-marker","aria-hidden":"true"},null,-1)),TPe={class:"workout-date"},gPe={class:"workout-link"},APe=["disabled","title"],SPe=ps(()=>p("i",{class:"fa fa-chevron-right","aria-hidden":"true"},null,-1)),OPe=[SPe],IPe=Z({__name:"WorkoutCardTitle",props:{sport:{},workoutObject:{}},emits:["displayModal"],setup(e,{emit:t}){const n=e,r=t,{sport:a,workoutObject:s}=_e(n);async function i(u){await je.get(`workouts/${u}/gpx/download`,{responseType:"blob"}).then(l=>{const c=window.URL.createObjectURL(new Blob([l.data],{type:"application/gpx+xml"})),f=document.createElement("a");f.href=c,f.setAttribute("download",`${u}.gpx`),document.body.appendChild(f),f.click()})}function o(){r("displayModal",!0)}return(u,l)=>{const c=oe("SportImage"),f=oe("router-link");return A(),N("div",JDe,[p("button",{class:Se(["workout-previous workout-arrow transparent",{inactive:!h(s).previousUrl}]),disabled:!h(s).previousUrl,title:h(s).previousUrl?u.$t(`workouts.PREVIOUS_${h(s).type}`):u.$t(`workouts.NO_PREVIOUS_${h(s).type}`),onClick:l[0]||(l[0]=d=>h(s).previousUrl?u.$router.push(h(s).previousUrl):null)},nPe,10,ePe),p("div",rPe,[k(c,{"sport-label":h(a).label,color:h(a).color},null,8,["sport-label","color"]),p("div",aPe,[h(s).type==="WORKOUT"?(A(),N("div",sPe,[p("span",null,T(h(s).title),1),p("button",{class:"transparent icon-button",onClick:l[1]||(l[1]=d=>u.$router.push({name:"EditWorkout",params:{workoutId:h(s).workoutId}})),"aria-label":u.$t("workouts.EDIT_WORKOUT")},uPe,8,iPe),h(s).with_gpx?(A(),N("button",{key:0,class:"transparent icon-button",onClick:l[2]||(l[2]=Je(d=>i(h(s).workoutId),["prevent"])),"aria-label":u.$t("workouts.DOWNLOAD_WORKOUT")},dPe,8,cPe)):x("",!0),p("button",{id:"delete-workout-button",class:"transparent icon-button",onClick:Je(o,["prevent"]),"aria-label":u.$t("workouts.DELETE_WORKOUT")},mPe,8,fPe)])):h(s).segmentId!==null?(A(),N("div",EPe,[j(T(h(s).title)+" ",1),p("span",hPe,[j(" — "),_Pe,j(" "+T(u.$t("workouts.SEGMENT"))+" "+T(h(s).segmentId+1),1)])])):x("",!0),p("div",TPe,[p("time",null,T(h(s).workoutDate)+" - "+T(h(s).workoutTime),1),p("span",gPe,[h(s).type==="SEGMENT"?(A(),te(f,{key:0,to:{name:"Workout",params:{workoutId:h(s).workoutId}}},{default:ue(()=>[j(" > "+T(u.$t("workouts.BACK_TO_WORKOUT")),1)]),_:1},8,["to"])):x("",!0)])])])]),p("button",{class:Se(["workout-next workout-arrow transparent",{inactive:!h(s).nextUrl}]),disabled:!h(s).nextUrl,title:h(s).nextUrl?u.$t(`workouts.NEXT_${h(s).type}`):u.$t(`workouts.NO_NEXT_${h(s).type}`),onClick:l[3]||(l[3]=d=>h(s).nextUrl?u.$router.push(h(s).nextUrl):null)},OPe,10,APe)])}}}),vPe=re(IPe,[["__scopeId","data-v-e1628a52"]]),RPe=e=>(dt("data-v-1b247cbe"),e=e(),ft(),e),bPe={key:0,class:"workout-record"},NPe=RPe(()=>p("sup",null,[p("i",{class:"fa fa-trophy","aria-hidden":"true"})],-1)),CPe=[NPe],yPe=Z({__name:"WorkoutRecord",props:{recordType:{},workoutObject:{}},setup(e){const t=e,{recordType:n,workoutObject:r}=_e(t);return(a,s)=>h(r).records&&h(r).records.find(i=>i.record_type===h(n))?(A(),N("span",bPe,CPe)):x("",!0)}}),Cs=re(yPe,[["__scopeId","data-v-1b247cbe"]]),DPe="/img/weather/temperature.svg",PPe="/img/weather/pour-rain.svg",wPe="/img/weather/breeze.svg",LPe=["N","NNE","NE","ENE","E","ESE","SE","SSE","S","SSW","SW","WSW","W","WNW","NW","NNW"],$Pe=e=>{const t=Math.floor(e/22.5+.5);return LPe[t%16]},kPe={class:"wind"},UPe={class:"wind-bearing"},MPe=["title"],xPe=Z({__name:"WeatherWind",props:{weather:{},useImperialUnits:{type:Boolean}},setup(e){const t=e,{useImperialUnits:n,weather:r}=_e(t),{t:a}=Yt();function s(i){return a(`workouts.WEATHER.WIND_DIRECTIONS.${$Pe(i)}`)}return(i,o)=>(A(),N("div",kPe,[j(T(h(jfe)(h(r).wind,h(n)))+" ",1),p("div",UPe,[h(r).windBearing?(A(),N("i",{key:0,class:"fa fa-long-arrow-down",style:Vr({transform:`rotate(${h(r).windBearing}deg)`}),"aria-hidden":"true",title:s(h(r).windBearing)},null,12,MPe)):x("",!0)])]))}}),dh=re(xPe,[["__scopeId","data-v-e1f7f9cc"]]),FPe=e=>(dt("data-v-be2fffb0"),e=e(),ft(),e),WPe={key:0,id:"workout-weather"},GPe={class:"weather-table"},zPe=FPe(()=>p("th",null,null,-1)),BPe={class:"weather-th"},HPe=["src","alt","title"],VPe={class:"weather-th"},jPe=["src","alt","title"],KPe=["alt","title"],YPe=["alt","title"],qPe=["alt","title"],XPe=Z({__name:"WorkoutWeather",props:{workoutObject:{},useImperialUnits:{type:Boolean}},setup(e){const t=e,{useImperialUnits:n,workoutObject:r}=_e(t);return(a,s)=>h(r).weatherStart&&h(r).weatherEnd?(A(),N("div",WPe,[p("table",GPe,[p("thead",null,[p("tr",null,[zPe,p("th",null,[p("div",BPe,[j(T(a.$t("workouts.START"))+" ",1),p("img",{class:"weather-img",src:`/img/weather/${h(r).weatherStart.icon}.svg`,alt:a.$t(`workouts.WEATHER.DARK_SKY.${h(r).weatherStart.icon}`),title:a.$t(`workouts.WEATHER.DARK_SKY.${h(r).weatherStart.icon}`)},null,8,HPe)])]),p("th",null,[p("div",VPe,[j(T(a.$t("workouts.END"))+" ",1),p("img",{class:"weather-img",src:`/img/weather/${h(r).weatherEnd.icon}.svg`,alt:a.$t(`workouts.WEATHER.DARK_SKY.${h(r).weatherEnd.icon}`),title:a.$t(`workouts.WEATHER.DARK_SKY.${h(r).weatherEnd.icon}`)},null,8,jPe)])])])]),p("tbody",null,[p("tr",null,[p("td",null,[p("img",{class:"weather-img weather-img-small",src:DPe,alt:a.$t("workouts.WEATHER.TEMPERATURE"),title:a.$t("workouts.WEATHER.TEMPERATURE")},null,8,KPe)]),p("td",null,T(h(bm)(h(r).weatherStart.temperature,h(n))),1),p("td",null,T(h(bm)(h(r).weatherEnd.temperature,h(n))),1)]),p("tr",null,[p("td",null,[p("img",{class:"weather-img weather-img-small",src:PPe,alt:a.$t("workouts.WEATHER.HUMIDITY"),title:a.$t("workouts.WEATHER.HUMIDITY")},null,8,YPe)]),p("td",null,T(Number(h(r).weatherStart.humidity*100).toFixed(1))+"% ",1),p("td",null,T(Number(h(r).weatherEnd.humidity*100).toFixed(1))+"% ",1)]),p("tr",null,[p("td",null,[p("img",{class:"weather-img weather-img-small",src:wPe,alt:a.$t("workouts.WEATHER.WIND"),title:a.$t("workouts.WEATHER.WIND")},null,8,qPe)]),p("td",null,[k(dh,{weather:h(r).weatherStart,useImperialUnits:h(n)},null,8,["weather","useImperialUnits"])]),p("td",null,[k(dh,{weather:h(r).weatherEnd,useImperialUnits:h(n)},null,8,["weather","useImperialUnits"])])])])])])):x("",!0)}}),ZPe=re(XPe,[["__scopeId","data-v-be2fffb0"]]),Sa=e=>(dt("data-v-9341b3e8"),e=e(),ft(),e),QPe={id:"workout-info"},JPe={class:"workout-data"},e6e=Sa(()=>p("i",{class:"fa fa-clock-o","aria-hidden":"true"},null,-1)),t6e={class:"label"},n6e={class:"value"},r6e={key:0},a6e={class:"value"},s6e={class:"value"},i6e={key:0,class:"workout-data"},o6e=Sa(()=>p("i",{class:"fa fa-road","aria-hidden":"true"},null,-1)),u6e={class:"label"},c6e={key:1,class:"workout-data"},l6e=Sa(()=>p("i",{class:"fa fa-tachometer","aria-hidden":"true"},null,-1)),d6e={class:"label"},f6e=Sa(()=>p("br",null,null,-1)),p6e={class:"label"},m6e={key:2,class:"workout-data"},E6e=["alt"],h6e={class:"label"},_6e=Sa(()=>p("br",null,null,-1)),T6e={class:"label"},g6e={key:3,class:"workout-data"},A6e=Sa(()=>p("i",{class:"fa fa-location-arrow","aria-hidden":"true"},null,-1)),S6e={class:"label"},O6e=Sa(()=>p("br",null,null,-1)),I6e={class:"label"},v6e=Z({__name:"WorkoutData",props:{workoutObject:{},useImperialUnits:{type:Boolean},displayHARecord:{type:Boolean}},setup(e){const t=e,{displayHARecord:n,workoutObject:r,useImperialUnits:a}=_e(t),s=$(()=>t.workoutObject.pauses!=="0:00:00"&&t.workoutObject.pauses!==null);return(i,o)=>{const u=oe("Distance");return A(),N("div",QPe,[p("div",JPe,[e6e,p("span",t6e,T(i.$t("workouts.DURATION")),1),j(": "),p("span",n6e,T(h(r).moving),1),k(Cs,{workoutObject:h(r),recordType:"LD"},null,8,["workoutObject"]),s.value?(A(),N("div",r6e,[j(" ("+T(i.$t("workouts.PAUSES"))+": ",1),p("span",a6e,T(h(r).pauses),1),j(" - "+T(i.$t("workouts.TOTAL_DURATION"))+": ",1),p("span",s6e,T(h(r).duration)+")",1)])):x("",!0)]),h(r).distance!==null?(A(),N("div",i6e,[o6e,p("span",u6e,T(i.$t("workouts.DISTANCE")),1),j(": "),k(u,{distance:h(r).distance,digits:3,unitFrom:"km",strong:!0,useImperialUnits:h(a)},null,8,["distance","useImperialUnits"]),k(Cs,{workoutObject:h(r),recordType:"FD"},null,8,["workoutObject"])])):x("",!0),h(r).aveSpeed!==null&&h(r).maxSpeed!==null?(A(),N("div",c6e,[l6e,p("span",d6e,T(i.$t("workouts.AVERAGE_SPEED")),1),j(": "),k(u,{distance:h(r).aveSpeed,unitFrom:"km",speed:!0,strong:!0,useImperialUnits:h(a)},null,8,["distance","useImperialUnits"]),k(Cs,{workoutObject:h(r),recordType:"AS"},null,8,["workoutObject"]),f6e,p("span",p6e,T(i.$t("workouts.MAX_SPEED")),1),j(": "),k(u,{distance:h(r).maxSpeed,unitFrom:"km",speed:!0,strong:!0,useImperialUnits:h(a)},null,8,["distance","useImperialUnits"]),k(Cs,{workoutObject:h(r),recordType:"MS"},null,8,["workoutObject"])])):x("",!0),h(r).maxAlt!==null&&h(r).minAlt!==null?(A(),N("div",m6e,[p("img",{class:"mountains",src:OA,alt:i.$t("workouts.ELEVATION")},null,8,E6e),p("span",h6e,T(i.$t("workouts.MIN_ALTITUDE")),1),j(": "),k(u,{distance:h(r).minAlt,unitFrom:"m",strong:!0,useImperialUnits:h(a)},null,8,["distance","useImperialUnits"]),_6e,p("span",T6e,T(i.$t("workouts.MAX_ALTITUDE")),1),j(": "),k(u,{distance:h(r).maxAlt,unitFrom:"m",strong:!0,useImperialUnits:h(a)},null,8,["distance","useImperialUnits"])])):x("",!0),h(r).ascent!==null&&h(r).descent!==null?(A(),N("div",g6e,[A6e,p("span",S6e,T(i.$t("workouts.ASCENT")),1),j(": "),k(u,{distance:h(r).ascent,unitFrom:"m",strong:!0,useImperialUnits:h(a)},null,8,["distance","useImperialUnits"]),h(n)?(A(),te(Cs,{key:0,workoutObject:h(r),recordType:"HA"},null,8,["workoutObject"])):x("",!0),O6e,p("span",I6e,T(i.$t("workouts.DESCENT")),1),j(": "),k(u,{distance:h(r).descent,unitFrom:"m",strong:!0,useImperialUnits:h(a)},null,8,["distance","useImperialUnits"])])):x("",!0),k(ZPe,{workoutObject:h(r),useImperialUnits:h(a)},null,8,["workoutObject","useImperialUnits"])])}}}),R6e=re(v6e,[["__scopeId","data-v-9341b3e8"]]);function Ga(e,t){return Array.from(e.getElementsByTagName(t))}function ms(e){return e==null||e.normalize(),e&&e.textContent||""}function da(e,t,n){const r=e.getElementsByTagName(t),a=r.length?r[0]:null;return a&&n&&n(a),a}function b6e(e,t,n){const r={};if(!e)return r;const a=e.getElementsByTagName(t),s=a.length?a[0]:null;return s&&n?n(s,r):r}function $A(e,t,n){const r=ms(da(e,t));return r&&n?n(r)||{}:{}}function fh(e,t,n){const r=parseFloat(ms(da(e,t)));if(!isNaN(r))return r&&n?n(r)||{}:{}}function N6e(e,t,n){const r=parseFloat(ms(da(e,t)));if(!isNaN(r))return n&&n(r),r}function Ud(e,t){const n={};for(const r of t)$A(e,r,a=>{n[r]=a});return n}function C6e(e){return(e==null?void 0:e.nodeType)===1}function kA(e){return b6e(e,"line",t=>Object.assign({},$A(t,"color",r=>({stroke:`#${r}`})),fh(t,"opacity",r=>({"stroke-opacity":r})),fh(t,"width",r=>({"stroke-width":r*96/25.4}))))}function UA(e){let t=[];if(e===null)return t;for(const n of Array.from(e.childNodes)){if(!C6e(n))continue;const r=y6e(n.nodeName);if(r==="gpxtpx:TrackPointExtension")t=t.concat(UA(n));else{const a=ms(n);t.push([r,D6e(a)])}}return t}function y6e(e){return["heart","gpxtpx:hr","hr"].includes(e)?"heart":e}function D6e(e){const t=parseFloat(e);return isNaN(t)?e:t}function MA(e){const t=[parseFloat(e.getAttribute("lon")||""),parseFloat(e.getAttribute("lat")||"")];if(isNaN(t[0])||isNaN(t[1]))return null;N6e(e,"ele",r=>{t.push(r)});const n=da(e,"time");return{coordinates:t,time:n?ms(n):null,extendedValues:UA(da(e,"extensions"))}}function E0(e){var a;const t=Ud(e,["name","cmt","desc","type","time","keywords"]),n=Array.from(e.getElementsByTagNameNS("http://www.garmin.com/xmlschemas/GpxExtensions/v3","*"));for(const s of n)((a=s.parentNode)==null?void 0:a.parentNode)===e&&(t[s.tagName.replace(":","_")]=ms(s));const r=Ga(e,"link");return r.length&&(t.links=r.map(s=>Object.assign({href:s.getAttribute("href")},Ud(s,["text","type"])))),t}function xA(e,t){const n=Ga(e,t),r=[],a=[],s={};for(let i=0;i1,i=Object.assign({_gpxType:"trk"},E0(e),kA(da(e,"extensions")),r.length?{coordinateProperties:{times:s?r:r[0]}}:{});for(const o of a){n.push(o.line),i.coordinateProperties||(i.coordinateProperties={});const u=i.coordinateProperties,l=Object.entries(o.extendedValues);for(let c=0;cnew Array(m.line.length).fill(null))),u[f][c]=d):u[f]=d}}return{type:"Feature",properties:i,geometry:s?{type:"MultiLineString",coordinates:n}:{type:"LineString",coordinates:n[0]}}}function L6e(e){const t=Object.assign(E0(e),Ud(e,["sym"])),n=MA(e);return n?{type:"Feature",properties:t,geometry:{type:"Point",coordinates:n.coordinates}}:null}function*$6e(e){for(const t of Ga(e,"trk")){const n=w6e(t);n&&(yield n)}for(const t of Ga(e,"rte")){const n=P6e(t);n&&(yield n)}for(const t of Ga(e,"wpt")){const n=L6e(t);n&&(yield n)}}function k6e(e){return{type:"FeatureCollection",features:Array.from($6e(e))}}const ph=(e,t)=>{for(const n of Object.keys(t))e.on(n,t[n])},FA=e=>{for(const t of Object.keys(e)){const n=e[t];n&&wr(n.cancel)&&n.cancel()}},U6e=e=>!e||typeof e.charAt!="function"?e:e.charAt(0).toUpperCase()+e.slice(1),wr=e=>typeof e=="function",hr=(e,t,n)=>{for(const r in n){const a="set"+U6e(r);e[a]?Ge(()=>n[r],(s,i)=>{e[a](s,i)}):t[a]&&Ge(()=>n[r],s=>{t[a](s)})}},Jn=(e,t,n={})=>{const r={...n};for(const a in e){const s=t[a],i=e[a];s&&(s&&s.custom===!0||i!==void 0&&(r[a]=i))}return r},Oa=e=>{const t={},n={};for(const r in e)if(r.startsWith("on")&&!r.startsWith("onUpdate")&&r!=="onReady"){const a=r.slice(2).toLocaleLowerCase();t[a]=e[r]}else n[r]=e[r];return{listeners:t,attrs:n}},M6e=async e=>{const t=await Promise.all([Dt(()=>import("./maps-ZyuCPqes.js").then(n=>n.m),__vite__mapDeps([0,1])),Dt(()=>import("./maps-ZyuCPqes.js").then(n=>n.b),__vite__mapDeps([0,1])),Dt(()=>import("./maps-ZyuCPqes.js").then(n=>n.d),__vite__mapDeps([0,1]))]);delete e.Default.prototype._getIconUrl,e.Default.mergeOptions({iconRetinaUrl:t[0].default,iconUrl:t[1].default,shadowUrl:t[2].default})},lo=e=>{const t=le((...r)=>console.warn(`Method ${e} has been invoked without being replaced`)),n=(...r)=>t.value(...r);return n.wrapped=t,tn(e,n),n},fo=(e,t)=>e.wrapped.value=t,Dn=typeof self=="object"&&self.self===self&&self||typeof global=="object"&&global.global===global&&global||globalThis,Rn=e=>{const t=Ot(e);if(t===void 0)throw new Error(`Attempt to inject ${e.description} before it was provided.`);return t},_r=Symbol("useGlobalLeaflet"),Zr=Symbol("addLayer"),h0=Symbol("removeLayer"),WA=Symbol("registerControl"),GA=Symbol("registerLayerControl"),zA=Symbol("canSetParentHtml"),BA=Symbol("setParentHtml"),HA=Symbol("setIcon"),x6e=Symbol("bindPopup"),F6e=Symbol("bindTooltip"),W6e=Symbol("unbindPopup"),G6e=Symbol("unbindTooltip"),$i={options:{type:Object,default:()=>({}),custom:!0}},Ic=e=>({options:e.options,methods:{}}),Es={...$i,pane:{type:String},attribution:{type:String},name:{type:String,custom:!0},layerType:{type:String,custom:!0},visible:{type:Boolean,custom:!0,default:!0}},_0=(e,t,n)=>{const r=Rn(Zr),a=Rn(h0),{options:s,methods:i}=Ic(e),o=Jn(e,Es,s),u=()=>r({leafletObject:t.value}),l=()=>a({leafletObject:t.value}),c={...i,setAttribution(f){l(),t.value.options.attribution=f,e.visible&&u()},setName(){l(),e.visible&&u()},setLayerType(){l(),e.visible&&u()},setVisible(f){t.value&&(f?u():l())},bindPopup(f){if(!t.value||!wr(t.value.bindPopup)){console.warn("Attempt to bind popup before bindPopup method available on layer.");return}t.value.bindPopup(f)},bindTooltip(f){if(!t.value||!wr(t.value.bindTooltip)){console.warn("Attempt to bind tooltip before bindTooltip method available on layer.");return}t.value.bindTooltip(f)},unbindTooltip(){t.value&&(wr(t.value.closeTooltip)&&t.value.closeTooltip(),wr(t.value.unbindTooltip)&&t.value.unbindTooltip())},unbindPopup(){t.value&&(wr(t.value.closePopup)&&t.value.closePopup(),wr(t.value.unbindPopup)&&t.value.unbindPopup())},updateVisibleProp(f){n.emit("update:visible",f)}};return tn(x6e,c.bindPopup),tn(F6e,c.bindTooltip),tn(W6e,c.unbindPopup),tn(G6e,c.unbindTooltip),Ct(()=>{c.unbindPopup(),c.unbindTooltip(),l()}),{options:o,methods:c}},T0=(e,t)=>{if(e&&t.default)return Tn("div",{style:{display:"none"}},t.default())},z6e={...Es,interactive:{type:Boolean,default:void 0},bubblingMouseEvents:{type:Boolean,default:void 0}},VA={...z6e,stroke:{type:Boolean,default:void 0},color:{type:String},weight:{type:Number},opacity:{type:Number},lineCap:{type:String},lineJoin:{type:String},dashArray:{type:String},dashOffset:{type:String},fill:{type:Boolean,default:void 0},fillColor:{type:String},fillOpacity:{type:Number},fillRule:{type:String},className:{type:String}},B6e={...VA,radius:{type:Number},latLng:{type:[Object,Array],required:!0,custom:!0}};({...B6e});const hs={...$i,position:{type:String}},jA=(e,t)=>{const{options:n,methods:r}=Ic(e),a=Jn(e,hs,n),s={...r,setPosition(i){t.value&&t.value.setPosition(i)}};return Ct(()=>{t.value&&t.value.remove()}),{options:a,methods:s}},H6e=e=>e.default?Tn("div",{ref:"root"},e.default()):null,mh=Z({name:"LControl",props:{...hs,disableClickPropagation:{type:Boolean,custom:!0,default:!0},disableScrollPropagation:{type:Boolean,custom:!0,default:!1}},setup(e,t){const n=le(),r=le(),a=Ot(_r),s=Rn(WA),{options:i,methods:o}=jA(e,n);return It(async()=>{const{Control:u,DomEvent:l}=a?Dn.L:await Dt(()=>import("./maps-ZyuCPqes.js").then(f=>f.e),__vite__mapDeps([0,1])),c=u.extend({onAdd(){return r.value}});n.value=Xn(new c(i)),hr(o,n.value,e),s({leafletObject:n.value}),e.disableClickPropagation&&r.value&&l.disableClickPropagation(r.value),e.disableScrollPropagation&&r.value&&l.disableScrollPropagation(r.value),ln(()=>t.emit("ready",n.value))}),{root:r,leafletObject:n}},render(){return H6e(this.$slots)}});({...hs});const KA={...hs,collapsed:{type:Boolean,default:void 0},autoZIndex:{type:Boolean,default:void 0},hideSingleBase:{type:Boolean,default:void 0},sortLayers:{type:Boolean,default:void 0},sortFunction:{type:Function}},V6e=(e,t)=>{const{options:n}=jA(e,t);return{options:Jn(e,KA,n),methods:{addLayer(r){r.layerType==="base"?t.value.addBaseLayer(r.leafletObject,r.name):r.layerType==="overlay"&&t.value.addOverlay(r.leafletObject,r.name)},removeLayer(r){t.value.removeLayer(r.leafletObject)}}}},j6e=Z({name:"LControlLayers",props:KA,setup(e,t){const n=le(),r=Ot(_r),a=Rn(GA),{options:s,methods:i}=V6e(e,n);return It(async()=>{const{control:o}=r?Dn.L:await Dt(()=>import("./maps-ZyuCPqes.js").then(u=>u.e),__vite__mapDeps([0,1]));n.value=Xn(o.layers(void 0,void 0,s)),hr(i,n.value,e),a({...e,...i,leafletObject:n.value}),ln(()=>t.emit("ready",n.value))}),{leafletObject:n}},render(){return null}});({...hs});({...hs});const vc={...Es},YA=(e,t,n)=>{const{options:r,methods:a}=_0(e,t,n),s=Jn(e,vc,r),i={...a,addLayer(o){t.value.addLayer(o.leafletObject)},removeLayer(o){t.value.removeLayer(o.leafletObject)}};return tn(Zr,i.addLayer),tn(h0,i.removeLayer),{options:s,methods:i}};({...vc});const qA={...vc,geojson:{type:[Object,Array],custom:!0},optionsStyle:{type:Function,custom:!0}},K6e=(e,t,n)=>{const{options:r,methods:a}=YA(e,t,n),s=Jn(e,qA,r);Object.prototype.hasOwnProperty.call(e,"optionsStyle")&&(s.style=e.optionsStyle);const i={...a,setGeojson(o){t.value.clearLayers(),t.value.addData(o)},setOptionsStyle(o){t.value.setStyle(o)},getGeoJSONData(){return t.value.toGeoJSON()},getBounds(){return t.value.getBounds()}};return{options:s,methods:i}},Y6e=Z({props:qA,setup(e,t){const n=le(),r=le(!1),a=Ot(_r),s=Rn(Zr),{methods:i,options:o}=K6e(e,n,t);return It(async()=>{const{geoJSON:u}=a?Dn.L:await Dt(()=>import("./maps-ZyuCPqes.js").then(c=>c.e),__vite__mapDeps([0,1]));n.value=Xn(u(e.geojson,o));const{listeners:l}=Oa(t.attrs);n.value.on(l),hr(i,n.value,e),s({...e,...i,leafletObject:n.value}),r.value=!0,ln(()=>t.emit("ready",n.value))}),{ready:r,leafletObject:n}},render(){return T0(this.ready,this.$slots)}}),g0={...Es,opacity:{type:Number},zIndex:{type:Number},tileSize:{type:[Number,Array,Object]},noWrap:{type:Boolean,default:void 0},minZoom:{type:Number},maxZoom:{type:Number},className:{type:String}},XA=(e,t,n)=>{const{options:r,methods:a}=_0(e,t,n),s=Jn(e,g0,r),i={...a,setTileComponent(){var o;(o=t.value)==null||o.redraw()}};return Ct(()=>{t.value.off()}),{options:s,methods:i}},q6e=(e,t,n,r)=>e.extend({initialize(a){this.tileComponents={},this.on("tileunload",this._unloadTile),n.setOptions(this,a)},createTile(a){const s=this._tileCoordsToKey(a);this.tileComponents[s]=t.create("div");const i=Tn({setup:r,props:["coords"]},{coords:a});return $I(i,this.tileComponents[s]),this.tileComponents[s]},_unloadTile(a){const s=this._tileCoordsToKey(a.coords);this.tileComponents[s]&&(this.tileComponents[s].innerHTML="",this.tileComponents[s]=void 0)}});({...g0});const Eh={iconUrl:{type:String},iconRetinaUrl:{type:String},iconSize:{type:[Object,Array]},iconAnchor:{type:[Object,Array]},popupAnchor:{type:[Object,Array]},tooltipAnchor:{type:[Object,Array]},shadowUrl:{type:String},shadowRetinaUrl:{type:String},shadowSize:{type:[Object,Array]},shadowAnchor:{type:[Object,Array]},bgPos:{type:[Object,Array]},className:{type:String}},X6e=Z({name:"LIcon",props:{...Eh,...$i},setup(e,t){const n=le(),r=Ot(_r),a=Rn(zA),s=Rn(BA),i=Rn(HA);let o,u,l,c,f;const d=(R,I,b)=>{const S=R&&R.innerHTML;if(!I){b&&f&&a()&&s(S);return}const{listeners:O}=Oa(t.attrs);f&&u(f,O);const{options:C}=Ic(e),P=Jn(e,Eh,C);S&&(P.html=S),f=P.html?l(P):c(P),o(f,O),i(f)},m=()=>{ln(()=>d(n.value,!0,!1))},E=()=>{ln(()=>d(n.value,!1,!0))},v={setIconUrl:m,setIconRetinaUrl:m,setIconSize:m,setIconAnchor:m,setPopupAnchor:m,setTooltipAnchor:m,setShadowUrl:m,setShadowRetinaUrl:m,setShadowAnchor:m,setBgPos:m,setClassName:m,setHtml:m};return It(async()=>{const{DomEvent:R,divIcon:I,icon:b}=r?Dn.L:await Dt(()=>import("./maps-ZyuCPqes.js").then(S=>S.e),__vite__mapDeps([0,1]));o=R.on,u=R.off,l=I,c=b,hr(v,{},e),new MutationObserver(E).observe(n.value,{attributes:!0,childList:!0,characterData:!0,subtree:!0}),m()}),{root:n}},render(){const e=this.$slots.default?this.$slots.default():void 0;return Tn("div",{ref:"root"},e)}});({...Es});const Z6e=Z({props:vc,setup(e,t){const n=le(),r=le(!1),a=Ot(_r),s=Rn(Zr),{methods:i}=YA(e,n,t);return It(async()=>{const{layerGroup:o}=a?Dn.L:await Dt(()=>import("./maps-ZyuCPqes.js").then(l=>l.e),__vite__mapDeps([0,1]));n.value=Xn(o(void 0,e.options));const{listeners:u}=Oa(t.attrs);n.value.on(u),hr(i,n.value,e),s({...e,...i,leafletObject:n.value}),r.value=!0,ln(()=>t.emit("ready",n.value))}),{ready:r,leafletObject:n}},render(){return T0(this.ready,this.$slots)}});function ZA(e,t,n){var r,a,s;t===void 0&&(t=50),n===void 0&&(n={});var i=(r=n.isImmediate)!=null&&r,o=(a=n.callback)!=null&&a,u=n.maxWait,l=Date.now(),c=[];function f(){if(u!==void 0){var m=Date.now()-l;if(m+t>=u)return u-m}return t}var d=function(){var m=[].slice.call(arguments),E=this;return new Promise(function(v,R){var I=i&&s===void 0;if(s!==void 0&&clearTimeout(s),s=setTimeout(function(){if(s=void 0,l=Date.now(),!i){var S=e.apply(E,m);o&&o(S),c.forEach(function(O){return(0,O.resolve)(S)}),c=[]}},f()),I){var b=e.apply(E,m);return o&&o(b),v(b)}c.push({resolve:v,reject:R})})};return d.cancel=function(m){s!==void 0&&clearTimeout(s),c.forEach(function(E){return(0,E.reject)(m)}),c=[]},d}const hh={...$i,center:{type:[Object,Array]},bounds:{type:[Array,Object]},maxBounds:{type:[Array,Object]},zoom:{type:Number},minZoom:{type:Number},maxZoom:{type:Number},paddingBottomRight:{type:[Object,Array]},paddingTopLeft:{type:Object},padding:{type:Object},worldCopyJump:{type:Boolean,default:void 0},crs:{type:[String,Object]},maxBoundsViscosity:{type:Number},inertia:{type:Boolean,default:void 0},inertiaDeceleration:{type:Number},inertiaMaxSpeed:{type:Number},easeLinearity:{type:Number},zoomAnimation:{type:Boolean,default:void 0},zoomAnimationThreshold:{type:Number},fadeAnimation:{type:Boolean,default:void 0},markerZoomAnimation:{type:Boolean,default:void 0},noBlockingAnimations:{type:Boolean,default:void 0},useGlobalLeaflet:{type:Boolean,default:!0,custom:!0}},Q6e=Z({inheritAttrs:!1,emits:["ready","update:zoom","update:center","update:bounds"],props:hh,setup(e,t){const n=le(),r=zt({ready:!1,layersToAdd:[],layersInControl:[]}),{options:a}=Ic(e),s=Jn(e,hh,a),{listeners:i,attrs:o}=Oa(t.attrs),u=lo(Zr),l=lo(h0),c=lo(WA),f=lo(GA);tn(_r,e.useGlobalLeaflet);const d=$(()=>{const I={};return e.noBlockingAnimations&&(I.animate=!1),I}),m=$(()=>{const I=d.value;return e.padding&&(I.padding=e.padding),e.paddingTopLeft&&(I.paddingTopLeft=e.paddingTopLeft),e.paddingBottomRight&&(I.paddingBottomRight=e.paddingBottomRight),I}),E={moveend:ZA(I=>{r.leafletRef&&(t.emit("update:zoom",r.leafletRef.getZoom()),t.emit("update:center",r.leafletRef.getCenter()),t.emit("update:bounds",r.leafletRef.getBounds()))}),overlayadd(I){const b=r.layersInControl.find(S=>S.name===I.name);b&&b.updateVisibleProp(!0)},overlayremove(I){const b=r.layersInControl.find(S=>S.name===I.name);b&&b.updateVisibleProp(!1)}};It(async()=>{e.useGlobalLeaflet&&(Dn.L=Dn.L||await Dt(()=>import("./maps-ZyuCPqes.js").then(G=>G.l),__vite__mapDeps([0,1])));const{map:I,CRS:b,Icon:S,latLngBounds:O,latLng:C,stamp:P}=e.useGlobalLeaflet?Dn.L:await Dt(()=>import("./maps-ZyuCPqes.js").then(G=>G.e),__vite__mapDeps([0,1]));try{s.beforeMapMount&&await s.beforeMapMount()}catch(G){console.error(`The following error occurred running the provided beforeMapMount hook ${G.message}`)}await M6e(S);const M=typeof s.crs=="string"?b[s.crs]:s.crs;s.crs=M||b.EPSG3857;const w={addLayer(G){G.layerType!==void 0&&(r.layerControl===void 0?r.layersToAdd.push(G):r.layersInControl.find(B=>P(B.leafletObject)===P(G.leafletObject))||(r.layerControl.addLayer(G),r.layersInControl.push(G))),G.visible!==!1&&r.leafletRef.addLayer(G.leafletObject)},removeLayer(G){G.layerType!==void 0&&(r.layerControl===void 0?r.layersToAdd=r.layersToAdd.filter(B=>B.name!==G.name):(r.layerControl.removeLayer(G.leafletObject),r.layersInControl=r.layersInControl.filter(B=>P(B.leafletObject)!==P(G.leafletObject)))),r.leafletRef.removeLayer(G.leafletObject)},registerLayerControl(G){r.layerControl=G,r.layersToAdd.forEach(B=>{r.layerControl.addLayer(B)}),r.layersToAdd=[],c(G)},registerControl(G){r.leafletRef.addControl(G.leafletObject)},setZoom(G){const B=r.leafletRef.getZoom();G!==B&&r.leafletRef.setZoom(G,d.value)},setCrs(G){const B=r.leafletRef.getBounds();r.leafletRef.options.crs=G,r.leafletRef.fitBounds(B,{animate:!1,padding:[0,0]})},fitBounds(G){r.leafletRef.fitBounds(G,m.value)},setBounds(G){if(!G)return;const B=O(G);B.isValid()&&!(r.lastSetBounds||r.leafletRef.getBounds()).equals(B,0)&&(r.lastSetBounds=B,r.leafletRef.fitBounds(B))},setCenter(G){if(G==null)return;const B=C(G),L=r.lastSetCenter||r.leafletRef.getCenter();(L.lat!==B.lat||L.lng!==B.lng)&&(r.lastSetCenter=B,r.leafletRef.panTo(B,d.value))}};fo(u,w.addLayer),fo(l,w.removeLayer),fo(c,w.registerControl),fo(f,w.registerLayerControl),r.leafletRef=Xn(I(n.value,s)),hr(w,r.leafletRef,e),ph(r.leafletRef,E),ph(r.leafletRef,i),r.ready=!0,ln(()=>t.emit("ready",r.leafletRef))}),hi(()=>{FA(E),r.leafletRef&&(r.leafletRef.off(),r.leafletRef.remove())});const v=$(()=>r.leafletRef),R=$(()=>r.ready);return{root:n,ready:R,leafletObject:v,attrs:o}},render({attrs:e}){return e.style||(e.style={}),e.style.width||(e.style.width="100%"),e.style.height||(e.style.height="100%"),Tn("div",{...e,ref:"root"},this.ready&&this.$slots.default?this.$slots.default():{})}}),J6e=["Symbol(Comment)","Symbol(Text)"],ewe=["LTooltip","LPopup"],QA={...Es,draggable:{type:Boolean,default:void 0},icon:{type:[Object]},zIndexOffset:{type:Number},latLng:{type:[Object,Array],custom:!0,required:!0}},twe=(e,t,n)=>{const{options:r,methods:a}=_0(e,t,n),s=Jn(e,QA,r),i={...a,setDraggable(o){t.value.dragging&&(o?t.value.dragging.enable():t.value.dragging.disable())},latLngSync(o){n.emit("update:latLng",o.latlng),n.emit("update:lat-lng",o.latlng)},setLatLng(o){if(o!=null&&t.value){const u=t.value.getLatLng();(!u||!u.equals(o))&&t.value.setLatLng(o)}}};return{options:s,methods:i}},nwe=(e,t)=>{const n=t.slots.default&&t.slots.default();return n&&n.length&&n.some(rwe)};function rwe(e){return!(J6e.includes(e.type.toString())||ewe.includes(e.type.name))}const JA=Z({name:"LMarker",props:QA,setup(e,t){const n=le(),r=le(!1),a=Ot(_r),s=Rn(Zr);tn(zA,()=>{var l;return!!((l=n.value)!=null&&l.getElement())}),tn(BA,l=>{var c,f;const d=wr((c=n.value)==null?void 0:c.getElement)&&((f=n.value)==null?void 0:f.getElement());d&&(d.innerHTML=l)}),tn(HA,l=>{var c;return((c=n.value)==null?void 0:c.setIcon)&&n.value.setIcon(l)});const{options:i,methods:o}=twe(e,n,t),u={moveHandler:ZA(o.latLngSync)};return It(async()=>{const{marker:l,divIcon:c}=a?Dn.L:await Dt(()=>import("./maps-ZyuCPqes.js").then(d=>d.e),__vite__mapDeps([0,1]));nwe(i,t)&&(i.icon=c({className:""})),n.value=Xn(l(e.latLng,i));const{listeners:f}=Oa(t.attrs);n.value.on(f),n.value.on("move",u.moveHandler),hr(o,n.value,e),s({...e,...o,leafletObject:n.value}),r.value=!0,ln(()=>t.emit("ready",n.value))}),hi(()=>FA(u)),{ready:r,leafletObject:n}},render(){return T0(this.ready,this.$slots)}}),awe={...VA,smoothFactor:{type:Number},noClip:{type:Boolean,default:void 0},latLngs:{type:Array,required:!0,custom:!0}},_h={...awe},eS={...$i,content:{type:String,default:null}};({...eS});({..._h,latLngs:{..._h.latLngs}});const A0={...g0,tms:{type:Boolean,default:void 0},subdomains:{type:[String,Array],validator:e=>typeof e=="string"?!0:Array.isArray(e)?e.every(t=>typeof t=="string"):!1},detectRetina:{type:Boolean,default:void 0},url:{type:String,required:!0,custom:!0}},swe=(e,t,n)=>{const{options:r,methods:a}=XA(e,t,n),s=Jn(e,A0,r),i={...a};return{options:s,methods:i}},iwe=Z({props:A0,setup(e,t){const n=le(),r=Ot(_r),a=Rn(Zr),{options:s,methods:i}=swe(e,n,t);return It(async()=>{const{tileLayer:o}=r?Dn.L:await Dt(()=>import("./maps-ZyuCPqes.js").then(l=>l.e),__vite__mapDeps([0,1]));n.value=Xn(o(e.url,s));const{listeners:u}=Oa(t.attrs);n.value.on(u),hr(i,n.value,e),a({...e,...i,leafletObject:n.value}),ln(()=>t.emit("ready",n.value))}),{leafletObject:n}},render(){return null}});({...eS});({...A0});const Th=Z({__name:"CustomMarker",props:{markerCoordinates:{},isStart:{type:Boolean}},setup(e){const t=e,{isStart:n,markerCoordinates:r}=_e(t);return(a,s)=>h(r).latitude?(A(),te(h(JA),{key:0,"lat-lng":[h(r).latitude,h(r).longitude]},{default:ue(()=>[k(h(X6e),{"icon-url":`/img/workouts/${h(n)?"start":"finish"}.svg`,iconSize:[15,15]},null,8,["icon-url"])]),_:1},8,["lat-lng"])):x("",!0)}}),owe=e=>(dt("data-v-dac2dfa0"),e=e(),ft(),e),uwe={id:"workout-map"},cwe={key:0,class:"leaflet-container"},lwe={key:1},dwe=owe(()=>p("i",{class:"fa fa-refresh","aria-hidden":"true"},null,-1)),fwe={key:1,class:"no-map"},pwe=Z({__name:"index",props:{workoutData:{},markerCoordinates:{default:()=>({})}},setup(e){const t=e,n=Me(),{workoutData:r,markerCoordinates:a}=_e(t),s=le(null),i=$(()=>R()),o=$(()=>n.getters[H.GETTERS.APP_CONFIG]),u=$(()=>E(i)),l=$(()=>t.workoutData&&t.workoutData.gpx?m(t.workoutData.gpx):{}),c=$(()=>t.workoutData&&t.workoutData.chartData.length>0?{latitude:t.workoutData.chartData[0].latitude,longitude:t.workoutData.chartData[0].longitude}:{}),f=$(()=>t.workoutData&&t.workoutData.chartData.length>0?{latitude:t.workoutData.chartData[t.workoutData.chartData.length-1].latitude,longitude:t.workoutData.chartData[t.workoutData.chartData.length-1].longitude}:{}),d=le(!1);function m(S){if(!S||S!=="")try{return{jsonData:k6e(new DOMParser().parseFromString(S,"text/xml"))}}catch{return console.error("Invalid gpx content"),{}}return{}}function E(S){return[(S.value[0][0]+S.value[1][0])/2,(S.value[0][1]+S.value[1][1])/2]}function v(S){var O,C;(O=s.value)!=null&&O.leafletObject&&((C=s.value)==null||C.leafletObject.fitBounds(S))}function R(){return t.workoutData?[[t.workoutData.workout.bounds[0],t.workoutData.workout.bounds[1]],[t.workoutData.workout.bounds[2],t.workoutData.workout.bounds[3]]]:[]}function I(){var S;(S=s.value)==null||S.leafletObject.fitBounds(R())}function b(){d.value=!d.value,d.value||setTimeout(()=>{I()},100)}return(S,O)=>{const C=oe("VFullscreen");return A(),N("div",uwe,[h(r).loading?(A(),N("div",cwe)):(A(),N("div",lwe,[h(r).workout.with_gpx?(A(),te(C,{key:0,modelValue:d.value,"onUpdate:modelValue":O[1]||(O[1]=P=>d.value=P)},{default:ue(()=>[p("div",{class:Se(["leaflet-container",{"fullscreen-map":d.value}])},[l.value.jsonData&&u.value&&i.value.length===2?(A(),te(h(Q6e),{key:0,zoom:13,maxZoom:19,center:u.value,bounds:i.value,zoomAnimation:!1,ref_key:"workoutMap",ref:s,onReady:O[0]||(O[0]=P=>v(i.value)),"use-global-leaflet":!1,class:"map"},{default:ue(()=>[k(h(j6e)),k(h(mh),{position:"topleft",class:"map-control",tabindex:"0",role:"button","aria-label":S.$t("workouts.RESET_ZOOM"),onClick:I},{default:ue(()=>[dwe]),_:1},8,["aria-label"]),k(h(mh),{position:"topleft",class:"map-control",tabindex:"0",role:"button","aria-label":S.$t(`workouts.${d.value?"EXIT":"VIEW"}_FULLSCREEN`),onClick:b},{default:ue(()=>[p("i",{class:Se(`fa fa-${d.value?"compress":"arrows-alt"}`),"aria-hidden":"true"},null,2)]),_:1},8,["aria-label"]),k(h(iwe),{url:`${h(Si)()}workouts/map_tile/{s}/{z}/{x}/{y}.png`,attribution:o.value.map_attribution,bounds:i.value},null,8,["url","attribution","bounds"]),k(h(Y6e),{geojson:l.value.jsonData},null,8,["geojson"]),h(a).latitude?(A(),te(h(JA),{key:0,"lat-lng":[h(a).latitude,h(a).longitude]},null,8,["lat-lng"])):x("",!0),k(h(Z6e),{name:S.$t("workouts.START_AND_FINISH"),"layer-type":"overlay"},{default:ue(()=>[c.value.latitude?(A(),te(Th,{key:0,markerCoordinates:c.value,isStart:!0},null,8,["markerCoordinates"])):x("",!0),f.value.latitude?(A(),te(Th,{key:1,markerCoordinates:f.value,isStart:!1},null,8,["markerCoordinates"])):x("",!0)]),_:1},8,["name"])]),_:1},8,["center","bounds"])):x("",!0)],2)]),_:1},8,["modelValue"])):(A(),N("div",fwe,T(S.$t("workouts.NO_MAP")),1))]))])}}}),mwe=re(pwe,[["__scopeId","data-v-dac2dfa0"]]),Ewe={class:"workout-detail"},hwe=Z({__name:"index",props:{authUser:{},displaySegment:{type:Boolean},sports:{},workoutData:{},markerCoordinates:{default:()=>({})}},setup(e){const t=e,n=qt(),r=Me(),{authUser:a,markerCoordinates:s,workoutData:i}=_e(t),o=$(()=>t.workoutData.workout),u=le(n.params.workoutId?+n.params.segmentId:null),l=$(()=>o.value.segments.length>0&&u.value?o.value.segments[+u.value-1]:null),c=le(!1),f=$(()=>t.sports?t.sports.find(S=>S.id===t.workoutData.workout.sport_id):{}),d=$(()=>E(o.value,l.value));function m(S,O,C){const P=O&&C&&C!==1?`/workouts/${S.id}/segment/${C-1}`:!O&&S.previous_workout?`/workouts/${S.previous_workout}`:null,M=O&&C&&Cn.params.segmentId,async S=>{S&&(u.value=+S,b())}),Ge(()=>n.params.workoutId,async S=>{S&&(c.value=!1,b())}),(S,O)=>{const C=oe("Modal"),P=oe("Card");return A(),N("div",Ewe,[c.value?(A(),te(C,{key:0,title:S.$t("common.CONFIRMATION"),message:S.$t("workouts.WORKOUT_DELETION_CONFIRMATION"),onConfirmAction:O[0]||(O[0]=M=>I(d.value.workoutId)),onCancelAction:R,onKeydown:gt(R,["esc"])},null,8,["title","message"])):x("",!0),k(P,null,{title:ue(()=>[f.value?(A(),te(vPe,{key:0,sport:f.value,workoutObject:d.value,onDisplayModal:O[1]||(O[1]=M=>v(!0))},null,8,["sport","workoutObject"])):x("",!0)]),content:ue(()=>[k(mwe,{workoutData:h(i),markerCoordinates:h(s)},null,8,["workoutData","markerCoordinates"]),k(R6e,{workoutObject:d.value,useImperialUnits:h(a).imperial_units,displayHARecord:h(a).display_ascent},null,8,["workoutObject","useImperialUnits","displayHARecord"])]),_:1})])}}}),_we=re(hwe,[["__scopeId","data-v-f8b05eca"]]),Twe=e=>{const t=document.getElementById(e);if(t){let n=t.querySelector("ul");return n||(n=document.createElement("ul"),t.appendChild(n)),n}throw new Error("No legend container")},gwe={id:"htmlLegend",afterUpdate(e,t,n){var s,i,o,u,l,c;const r=Twe(n.containerID);for(;r.firstChild;)r.firstChild.remove();((o=(i=(s=e.options.plugins)==null?void 0:s.legend)==null?void 0:i.labels)!=null&&o.generateLabels?(c=(l=(u=e.options.plugins)==null?void 0:u.legend)==null?void 0:l.labels)==null?void 0:c.generateLabels(e):[]).forEach(f=>{var R,I,b;if(!((b=(I=(R=e.config.options)==null?void 0:R.scales)==null?void 0:I.yElevation)!=null&&b.display)&&f.datasetIndex===1)return;const d=document.createElement("li");d.onclick=()=>{f.datasetIndex!==void 0&&(e.setDatasetVisibility(f.datasetIndex,!e.isDatasetVisible(f.datasetIndex)),e.update())};const m=document.createElement("input");m&&(m.type="checkbox",m.id=f.text,m.checked=!f.hidden);const E=document.createTextNode(f.text),v=document.createElement("span");v&&(v.style.background=String(f.fillStyle),v.style.borderColor=String(f.strokeStyle)),d.appendChild(m),d.appendChild(E),d.appendChild(v),r.appendChild(d)})}},Awe=e=>(dt("data-v-b15bb69d"),e=e(),ft(),e),Swe={id:"workout-chart"},Owe={class:"chart-radio"},Iwe=["checked"],vwe=["checked"],Rwe=Awe(()=>p("div",{id:"chart-legend"},null,-1)),bwe={class:"line-chart"},Nwe={class:"chart-info"},Cwe={class:"no-data-cleaning"},ywe={key:0,class:"elevation-start"},Dwe=["checked"],Pwe=Z({__name:"index",props:{authUser:{},workoutData:{}},emits:["getCoordinates"],setup(e,{emit:t}){const n=e,r=t,a=_f(),{t:s}=Yt(),{authUser:i,workoutData:o}=_e(n),u=$(()=>a.getters[H.GETTERS.DARK_MODE]),l=$(()=>hf(u.value)),c=le(!0),f=le(i.value.start_elevation_at_zero),d=$(()=>n3e(o.value.chartData,s,i.value.imperial_units,l.value)),m=$(()=>d.value&&d.value.datasets.elevation.data.length>0),E=B("km"),v=B("m"),R=$(()=>({labels:c.value?d.value.distance_labels:d.value.duration_labels,datasets:JSON.parse(JSON.stringify([d.value.datasets.speed,d.value.datasets.elevation]))})),I=$(()=>d.value.coordinates),b=$(()=>({color:l.value?kr.darkMode.line:kr.ligthMode.line})),S=$(()=>({color:l.value?kr.darkMode.text:kr.ligthMode.text})),O=$(()=>({responsive:!0,maintainAspectRatio:!1,animation:!1,layout:{padding:{top:22}},scales:{x:{grid:{drawOnChartArea:!1,...b.value},border:{...b.value},ticks:{count:10,callback:function(L){return c.value?Number(L).toFixed(2):M(L)},...S.value},type:"linear",bounds:"data",title:{display:!0,text:c.value?s("workouts.DISTANCE")+` (${E})`:s("workouts.DURATION"),...S.value}},ySpeed:{grid:{drawOnChartArea:!1,...b.value},border:{...b.value},position:"left",title:{display:!0,text:s("workouts.SPEED")+` (${E}/h)`,...S.value},ticks:{...S.value}},yElevation:{beginAtZero:f.value,display:m.value,grid:{drawOnChartArea:!1,...b.value},border:{...b.value},position:"right",title:{display:!0,text:s("workouts.ELEVATION")+` (${v})`,...S.value},ticks:{...S.value}}},elements:{point:{pointStyle:"circle",pointRadius:0}},plugins:{datalabels:{display:!1},tooltip:{interaction:{intersect:!1,mode:"index"},callbacks:{label:function(L){const X=` ${L.dataset.label}: ${L.formattedValue}`;return L.dataset.yAxisID==="yElevation"?X+` ${v}`:X+` ${E}/h`},title:function(L){return L.length>0&&w(I.value[L[0].dataIndex]),L.length===0?"":c.value?`${s("workouts.DISTANCE")}: ${L[0].label} ${E}`:`${s("workouts.DURATION")}: ${M(L[0].label.replace(",",""))}`}}},legend:{display:!1},htmlLegend:{containerID:"chart-legend",displayElevation:m.value}}})),C=[gwe];function P(){c.value=!c.value}function M(L){return new Date(+L*1e3).toISOString().substr(11,8)}function w(L){r("getCoordinates",L)}function G(){w({latitude:null,longitude:null})}function B(L){return n.authUser.imperial_units?Pn[L].defaultTarget:L}return(L,X)=>{const J=oe("Card");return A(),N("div",Swe,[k(J,null,{title:ue(()=>[j(T(L.$t("workouts.ANALYSIS")),1)]),content:ue(()=>[p("div",Owe,[p("label",null,[p("input",{type:"radio",name:"distance",checked:c.value,onClick:P},null,8,Iwe),j(" "+T(L.$t("workouts.DISTANCE")),1)]),p("label",null,[p("input",{type:"radio",name:"duration",checked:!c.value,onClick:P},null,8,vwe),j(" "+T(L.$t("workouts.DURATION")),1)])]),Rwe,p("div",bwe,[k(h(Z3e),{data:R.value,options:O.value,plugins:C,onMouseleave:G},null,8,["data","options"])]),p("div",Nwe,[p("div",Cwe,T(L.$t("workouts.NO_DATA_CLEANING")),1),m.value?(A(),N("div",ywe,[p("label",null,[p("input",{type:"checkbox",checked:f.value,onClick:X[0]||(X[0]=ne=>f.value=!f.value)},null,8,Dwe),j(" "+T(L.$t("workouts.START_ELEVATION_AT_ZERO")),1)])])):x("",!0)])]),_:1})])}}}),wwe=re(Pwe,[["__scopeId","data-v-b15bb69d"]]),Lwe={id:"workout-note"},$we=["innerHTML"],kwe=Z({__name:"WorkoutNotes",props:{notes:{default:()=>""}},setup(e){const t=e,{notes:n}=_e(t);return(r,a)=>{const s=oe("Card");return A(),N("div",Lwe,[k(s,null,{title:ue(()=>[j(T(r.$t("workouts.NOTES")),1)]),content:ue(()=>[p("span",{innerHTML:h(n)&&h(n)!==""?h(di)(h(n)):r.$t("workouts.NO_NOTES")},null,8,$we)]),_:1})])}}}),Uwe=re(kwe,[["__scopeId","data-v-f3e81eff"]]),Mwe={id:"workout-segments"},xwe=Z({__name:"WorkoutSegments",props:{segments:{},useImperialUnits:{type:Boolean}},setup(e){const t=e,{segments:n,useImperialUnits:r}=_e(t);return(a,s)=>{const i=oe("router-link"),o=oe("Distance"),u=oe("Card");return A(),N("div",Mwe,[k(u,null,{title:ue(()=>[j(T(a.$t("workouts.SEGMENT",2)),1)]),content:ue(()=>[p("ul",null,[(A(!0),N(Re,null,ze(h(n),(l,c)=>(A(),N("li",{key:l.segment_id},[k(i,{to:{name:"WorkoutSegment",params:{workoutId:l.workout_id,segmentId:c+1}}},{default:ue(()=>[j(T(a.$t("workouts.SEGMENT",1))+" "+T(c+1),1)]),_:2},1032,["to"]),j(" ("+T(a.$t("workouts.DISTANCE"))+": ",1),k(o,{distance:l.distance,unitFrom:"km",useImperialUnits:h(r)},null,8,["distance","useImperialUnits"]),j(", "+T(a.$t("workouts.DURATION"))+": "+T(l.duration)+") ",1)]))),128))])]),_:1})])}}}),Fwe=re(xwe,[["__scopeId","data-v-15725c61"]]),Wwe=e=>(dt("data-v-eac6aa4b"),e=e(),ft(),e),Gwe={id:"workout",class:"view"},zwe={class:"container"},Bwe={key:0,class:"workout-container"},Hwe={key:0},Vwe=Wwe(()=>p("div",{id:"bottom"},null,-1)),jwe={key:1},Kwe=Z({__name:"Workout",props:{displaySegment:{type:Boolean}},setup(e){const t=e,n=qt(),r=Me(),{displaySegment:a}=_e(t),s=$(()=>r.getters[Ae.GETTERS.WORKOUT_DATA]),i=$(()=>r.getters[K.GETTERS.AUTH_USER_PROFILE]),o=$(()=>r.getters[Mt.GETTERS.SPORTS]),u=le({latitude:null,longitude:null});Nt(()=>{const c={workoutId:n.params.workoutId};t.displaySegment&&(c.segmentId=n.params.segmentId),r.dispatch(Ae.ACTIONS.GET_WORKOUT_DATA,c)}),Ct(()=>{r.commit(Ae.MUTATIONS.EMPTY_WORKOUT)});function l(c){u.value={latitude:c.latitude,longitude:c.longitude}}return Ge(()=>n.params.workoutId,async c=>{c&&r.dispatch(Ae.ACTIONS.GET_WORKOUT_DATA,{workoutId:c})}),Ge(()=>n.params.segmentId,async c=>{if(n.params.workoutId){const f={workoutId:n.params.workoutId};c&&(f.segmentId=c),r.dispatch(Ae.ACTIONS.GET_WORKOUT_DATA,f)}}),(c,f)=>(A(),N("div",Gwe,[p("div",zwe,[o.value.length>0?(A(),N("div",Bwe,[s.value.workout.id?(A(),N("div",Hwe,[k(_we,{workoutData:s.value,sports:o.value,authUser:i.value,markerCoordinates:u.value,displaySegment:h(a)},null,8,["workoutData","sports","authUser","markerCoordinates","displaySegment"]),s.value.workout.with_gpx&&s.value.chartData.length>0?(A(),te(wwe,{key:0,workoutData:s.value,authUser:i.value,displaySegment:h(a),onGetCoordinates:l},null,8,["workoutData","authUser","displaySegment"])):x("",!0),!h(a)&&s.value.workout.segments.length>1?(A(),te(Fwe,{key:1,segments:s.value.workout.segments,useImperialUnits:i.value.imperial_units},null,8,["segments","useImperialUnits"])):x("",!0),h(a)?x("",!0):(A(),te(Uwe,{key:2,notes:s.value.workout.notes},null,8,["notes"])),Vwe])):(A(),N("div",jwe,[s.value.loading?x("",!0):(A(),te(d0,{key:0,target:"WORKOUT"}))]))])):x("",!0)])]))}}),gh=re(Kwe,[["__scopeId","data-v-eac6aa4b"]]),Ywe=e=>(dt("data-v-29caaf8f"),e=e(),ft(),e),qwe={class:"workouts-filters"},Xwe={class:"box"},Zwe={class:"form-all-items"},Qwe={class:"form-items-group"},Jwe={class:"form-item"},eLe=["value"],tLe={class:"form-item"},nLe=["value"],rLe={class:"form-items-group"},aLe={class:"form-item"},sLe=["value"],iLe=Ywe(()=>p("option",{value:""},null,-1)),oLe=["value"],uLe={class:"form-item form-item-title"},cLe={class:"form-inputs-group"},lLe=["value"],dLe={class:"form-items-group"},fLe={class:"form-item"},pLe={class:"form-inputs-group"},mLe=["value"],ELe=["value"],hLe={class:"form-items-group"},_Le={class:"form-item"},TLe={class:"form-inputs-group"},gLe=["value"],ALe=["value"],SLe={class:"form-items-group"},OLe={class:"form-item"},ILe={class:"form-inputs-group"},vLe=["value"],RLe=["value"],bLe={class:"form-items-group"},NLe={class:"form-item"},CLe={class:"form-inputs-group"},yLe=["value"],DLe=["value"],PLe={class:"form-button"},wLe=Z({__name:"WorkoutsFilters",props:{authUser:{},sports:{}},emits:["filter"],setup(e,{emit:t}){const n=e,r=t,{t:a}=Yt(),s=qt(),i=Yr(),{authUser:o}=_e(n),u=o.value.imperial_units?Pn.km.defaultTarget:"km",l=$(()=>Xr(n.sports,a));let c=Object.assign({},s.query);It(()=>{const E=document.getElementById("from");E&&E.focus()});function f(E){const v=E.target.name,R=E.target.value;R===""?delete c[v]:c[v]=R}function d(){r("filter"),"page"in c&&(c.page="1"),i.push({path:"/workouts",query:c})}function m(){r("filter"),i.push({path:"/workouts",query:{}})}return Ge(()=>s.query,E=>{c=Object.assign({},E)}),(E,v)=>(A(),N("div",qwe,[p("div",Xwe,[p("form",{onSubmit:Je(d,["prevent"]),class:"form"},[p("div",Zwe,[p("div",Qwe,[p("div",Jwe,[p("label",null,T(E.$t("workouts.FROM"))+": ",1),p("input",{id:"from",name:"from",type:"date",value:E.$route.query.from,onChange:f},null,40,eLe)]),p("div",tLe,[p("label",null,T(E.$t("workouts.TO"))+": ",1),p("input",{name:"to",type:"date",value:E.$route.query.to,onChange:f},null,40,nLe)])]),p("div",rLe,[p("div",aLe,[p("label",null,T(E.$t("workouts.SPORT",1))+":",1),p("select",{name:"sport_id",value:E.$route.query.sport_id,onChange:f,onKeyup:gt(d,["enter"])},[iLe,(A(!0),N(Re,null,ze(l.value.filter(R=>h(o).sports_list.includes(R.id)),R=>(A(),N("option",{value:R.id,key:R.id},T(R.translatedLabel),9,oLe))),128))],40,sLe)]),p("div",uLe,[p("label",null,T(E.$t("workouts.TITLE",1))+":",1),p("div",cLe,[p("input",{class:"title",name:"title",value:E.$route.query.title,onChange:f,placeholder:"",type:"text",onKeyup:gt(d,["enter"])},null,40,lLe)])])]),p("div",dLe,[p("div",fLe,[p("label",null,T(E.$t("workouts.DISTANCE"))+" ("+T(h(u))+"): ",1),p("div",pLe,[p("input",{name:"distance_from",type:"number",min:"0",step:"0.1",value:E.$route.query.distance_from,onChange:f,onKeyup:gt(d,["enter"])},null,40,mLe),p("span",null,T(E.$t("workouts.TO")),1),p("input",{name:"distance_to",type:"number",min:"0",step:"0.1",value:E.$route.query.distance_to,onChange:f,onKeyup:gt(d,["enter"])},null,40,ELe)])])]),p("div",hLe,[p("div",_Le,[p("label",null,T(E.$t("workouts.DURATION"))+": ",1),p("div",TLe,[p("input",{name:"duration_from",value:E.$route.query.duration_from,onChange:f,pattern:"^([0-9]*[0-9]):([0-5][0-9])$",placeholder:"hh:mm",type:"text",onKeyup:gt(d,["enter"])},null,40,gLe),p("span",null,T(E.$t("workouts.TO")),1),p("input",{name:"duration_to",value:E.$route.query.duration_to,onChange:f,pattern:"^([0-9]*[0-9]):([0-5][0-9])$",placeholder:"hh:mm",type:"text",onKeyup:gt(d,["enter"])},null,40,ALe)])])]),p("div",SLe,[p("div",OLe,[p("label",null,T(E.$t("workouts.AVE_SPEED"))+" ("+T(h(u))+"/h): ",1),p("div",ILe,[p("input",{min:"0",name:"ave_speed_from",value:E.$route.query.ave_speed_from,onChange:f,step:"0.1",type:"number",onKeyup:gt(d,["enter"])},null,40,vLe),p("span",null,T(E.$t("workouts.TO")),1),p("input",{min:"0",name:"ave_speed_to",value:E.$route.query.ave_speed_to,onChange:f,step:"0.1",type:"number",onKeyup:gt(d,["enter"])},null,40,RLe)])])]),p("div",bLe,[p("div",NLe,[p("label",null,T(E.$t("workouts.MAX_SPEED"))+" ("+T(h(u))+"/h): ",1),p("div",CLe,[p("input",{min:"0",name:"max_speed_from",value:E.$route.query.max_speed_from,onChange:f,step:"0.1",type:"number",onKeyup:gt(d,["enter"])},null,40,yLe),p("span",null,T(E.$t("workouts.TO")),1),p("input",{min:"0",name:"max_speed_to",value:E.$route.query.max_speed_to,onChange:f,step:"0.1",type:"number",onKeyup:gt(d,["enter"])},null,40,DLe)])])])]),p("div",PLe,[p("button",{type:"submit",class:"confirm",onClick:d},T(E.$t("buttons.FILTER")),1),p("button",{class:"confirm",onClick:m},T(E.$t("buttons.CLEAR_FILTER")),1)])],32)])]))}}),LLe=re(wLe,[["__scopeId","data-v-29caaf8f"]]),tS=e=>(dt("data-v-bb980a00"),e=e(),ft(),e),$Le={class:"workouts-list"},kLe={class:"total"},ULe={class:"total-label"},MLe={key:0},xLe={key:0,class:"workouts-table responsive-table"},FLe=tS(()=>p("th",{class:"sport-col"},null,-1)),WLe={class:"sport-col"},GLe={class:"cell-heading"},zLe=["onMouseover"],BLe={class:"cell-heading"},HLe={key:0,class:"fa fa-map-o","aria-hidden":"true"},VLe={class:"title"},jLe={class:"workout-date"},KLe={class:"cell-heading"},YLe={class:"text-right"},qLe={class:"cell-heading"},XLe={class:"text-right"},ZLe={class:"cell-heading"},QLe={class:"text-right"},JLe={class:"cell-heading"},e8e={class:"text-right"},t8e={class:"cell-heading"},n8e={class:"text-right"},r8e={class:"cell-heading"},a8e={class:"text-right"},s8e={class:"cell-heading"},i8e=tS(()=>p("div",{id:"bottom"},null,-1)),o8e=Z({__name:"WorkoutsList",props:{user:{},sports:{}},setup(e){const t=e,n=Me(),r=qt(),a=Yr(),{user:s,sports:i}=_e(t),o=["ave_speed","distance","duration","workout_date"],u=$(()=>n.getters[Ae.GETTERS.USER_WORKOUTS]),l=$(()=>n.getters[Ae.GETTERS.WORKOUTS_PAGINATION]),c=$(()=>n.getters[H.GETTERS.LANGUAGE]);let f=v(r.query);const d=le(null);Nt(()=>{m(f)});function m(b){n.dispatch(Ae.ACTIONS.GET_USER_WORKOUTS,s.value.imperial_units?R(b):b)}function E(b,S){const O=Object.assign({},r.query);O[b]=S,b==="per_page"&&(O.page="1"),f=v(O),a.push({path:"/workouts",query:f})}function v(b){const S=yd(b,o,pi.order_by,{defaultSort:pi.order});return Object.keys(b).filter(O=>Qge.includes(O)).map(O=>{typeof b[O]=="string"&&(S[O]=b[O])}),S}function R(b){const S={...b};return Object.entries(S).map(O=>{O[0].match("speed|distance")&&O[1]&&(S[O[0]]=sn(+O[1],"mi","km"))}),S}function I(b){d.value=b}return Ge(()=>r.query,async b=>{f=v(b),m(f)}),(b,S)=>{const O=oe("SportImage"),C=oe("router-link"),P=oe("Distance");return A(),N("div",$Le,[p("div",{class:Se(["box",{"empty-table":u.value.length===0}])},[p("div",kLe,[p("span",ULe,T(b.$t("common.TOTAL").toLowerCase())+": ",1),l.value.total?(A(),N("span",MLe,T(l.value.total)+" "+T(b.$t("workouts.WORKOUT",l.value.total)),1)):x("",!0)]),k(qg,{sort:h(o0),order_by:o,query:h(f),message:"workouts",onUpdateSelect:E},null,8,["sort","query"]),u.value.length>0?(A(),N("div",xLe,[k($u,{class:"top-pagination",pagination:l.value,path:"/workouts",query:h(f)},null,8,["pagination","query"]),p("table",null,[p("thead",{class:Se({smaller:c.value==="de"})},[p("tr",null,[FLe,p("th",null,T(Rt(b.$t("workouts.WORKOUT",1))),1),p("th",null,T(Rt(b.$t("workouts.DATE"))),1),p("th",null,T(Rt(b.$t("workouts.DISTANCE"))),1),p("th",null,T(Rt(b.$t("workouts.DURATION"))),1),p("th",null,T(Rt(b.$t("workouts.AVE_SPEED"))),1),p("th",null,T(Rt(b.$t("workouts.MAX_SPEED"))),1),p("th",null,T(Rt(b.$t("workouts.ASCENT"))),1),p("th",null,T(Rt(b.$t("workouts.DESCENT"))),1)])],2),p("tbody",null,[(A(!0),N(Re,null,ze(u.value,M=>(A(),N("tr",{key:M.id},[p("td",WLe,[p("span",GLe,T(b.$t("workouts.SPORT",1)),1),h(i).length>0?(A(),te(O,{key:0,title:h(i).filter(w=>w.id===M.sport_id)[0].translatedLabel,"sport-label":h(s0)(M,h(i)),color:h(i0)(M,h(i))},null,8,["title","sport-label","color"])):x("",!0)]),p("td",{class:"workout-title",onMouseover:w=>I(M.id),onMouseleave:S[0]||(S[0]=w=>I(null))},[p("span",BLe,T(Rt(b.$t("workouts.WORKOUT",1))),1),k(C,{class:"nav-item",to:{name:"Workout",params:{workoutId:M.id}}},{default:ue(()=>[M.with_gpx?(A(),N("i",HLe)):x("",!0),p("span",VLe,T(M.title),1)]),_:2},1032,["to"]),M.with_gpx&&d.value===M.id?(A(),te(IA,{key:0,workout:M,"display-hover":!0},null,8,["workout"])):x("",!0)],40,zLe),p("td",jLe,[p("span",KLe,T(b.$t("workouts.DATE")),1),p("time",null,T(h(kn)(M.workout_date,h(s).timezone,h(s).date_format)),1)]),p("td",YLe,[p("span",qLe,T(b.$t("workouts.DISTANCE")),1),M.distance!==null?(A(),te(P,{key:0,distance:M.distance,unitFrom:"km",useImperialUnits:h(s).imperial_units},null,8,["distance","useImperialUnits"])):x("",!0)]),p("td",XLe,[p("span",ZLe,T(b.$t("workouts.DURATION")),1),j(" "+T(M.moving),1)]),p("td",QLe,[p("span",JLe,T(b.$t("workouts.AVE_SPEED")),1),M.ave_speed!==null?(A(),te(P,{key:0,distance:M.ave_speed,unitFrom:"km",speed:!0,useImperialUnits:h(s).imperial_units},null,8,["distance","useImperialUnits"])):x("",!0)]),p("td",e8e,[p("span",t8e,T(b.$t("workouts.MAX_SPEED")),1),M.max_speed!==null?(A(),te(P,{key:0,distance:M.max_speed,unitFrom:"km",speed:!0,useImperialUnits:h(s).imperial_units},null,8,["distance","useImperialUnits"])):x("",!0)]),p("td",n8e,[p("span",r8e,T(b.$t("workouts.ASCENT")),1),M.ascent!==null?(A(),te(P,{key:0,distance:M.ascent,unitFrom:"m",useImperialUnits:h(s).imperial_units},null,8,["distance","useImperialUnits"])):x("",!0)]),p("td",a8e,[p("span",s8e,T(b.$t("workouts.DESCENT")),1),M.descent!==null?(A(),te(P,{key:0,distance:M.descent,unitFrom:"m",useImperialUnits:h(s).imperial_units},null,8,["distance","useImperialUnits"])):x("",!0)])]))),128))])]),k($u,{pagination:l.value,path:"/workouts",query:h(f)},null,8,["pagination","query"])])):x("",!0)],2),u.value.length===0?(A(),te(p0,{key:0})):x("",!0),i8e])}}}),u8e=re(o8e,[["__scopeId","data-v-bb980a00"]]),c8e={key:0,id:"workouts",class:"view"},l8e={class:"container workouts-container"},d8e={class:"display-filters"},f8e={class:"list-container"},p8e=Z({__name:"WorkoutsView",setup(e){const{t}=Yt(),n=Me(),r=$(()=>n.getters[K.GETTERS.AUTH_USER_PROFILE]),a=$(()=>n.getters[Mt.GETTERS.SPORTS]),s=$(()=>Xr(a.value,t)),i=le(!0);function o(){i.value=!i.value}return(u,l)=>r.value.username?(A(),N("div",c8e,[p("div",l8e,[p("div",{class:Se(["filters-container",{hidden:i.value}])},[k(LLe,{sports:s.value,authUser:r.value,onFilter:o},null,8,["sports","authUser"])],2),p("div",d8e,[p("div",{onClick:o},[p("i",{class:Se(`fa fa-caret-${i.value?"down":"up"}`),"aria-hidden":"true"},null,2),p("span",null,T(u.$t(`workouts.${i.value?"DISPLAY":"HIDE"}_FILTERS`)),1)])]),p("div",f8e,[k(u8e,{user:r.value,sports:s.value},null,8,["user","sports"])])])])):x("",!0)}}),m8e=re(p8e,[["__scopeId","data-v-3fa59b88"]]),{t:Ah}=_a.global,Sh=e=>{const t=/(\/profile)(\/edit)*(\/*)/,n=e.replace(t,"").toUpperCase();return n===""?"PROFILE":n.toUpperCase()},E8e=[{path:"/",name:"Dashboard",component:Eye,meta:{title:"dashboard.DASHBOARD"}},{path:"/login",name:"Login",component:ch,props:{action:"login"},meta:{title:"user.LOGIN",withoutAuth:!0}},{path:"/register",name:"Register",component:ch,props:{action:"register"},meta:{title:"user.REGISTER",withoutAuth:!0}},{path:"/account-confirmation",name:"AccountConfirmation",component:N4e,meta:{title:"user.ACCOUNT_CONFIRMATION",withoutAuth:!0}},{path:"/account-confirmation/resend",name:"AccountConfirmationResend",component:uh,props:{action:"account-confirmation-resend"},meta:{title:"buttons.ACCOUNT-CONFIRMATION-RESEND",withoutAuth:!0}},{path:"/account-confirmation/email-sent",name:"AccountConfirmationEmailSend",component:uh,props:{action:"email-sent"},meta:{title:"buttons.ACCOUNT-CONFIRMATION-RESEND",withoutAuth:!0}},{path:"/password-reset/sent",name:"PasswordEmailSent",component:co,props:{action:"request-sent"},meta:{title:"user.PASSWORD_RESET",withoutAuth:!0}},{path:"/password-reset/request",name:"PasswordResetRequest",component:co,props:{action:"reset-request"},meta:{title:"user.PASSWORD_RESET",withoutAuth:!0}},{path:"/password-reset/password-updated",name:"PasswordUpdated",component:co,props:{action:"password-updated"},meta:{title:"user.PASSWORD_RESET",withoutAuth:!0}},{path:"/password-reset",name:"PasswordReset",component:co,props:{action:"reset"},meta:{title:"user.PASSWORD_RESET",withoutAuth:!0}},{path:"/email-update",name:"EmailUpdate",component:P4e,meta:{title:"user.EMAIL_UPDATE",withoutChecks:!0}},{path:"/profile",name:"Profile",component:aDe,children:[{path:"",name:"UserProfile",component:NSe,props:e=>({tab:Sh(e.path)}),children:[{path:"",name:"UserInfos",component:sA,meta:{title:"user.PROFILE.TABS.PROFILE"}},{path:"preferences",name:"UserPreferences",component:qSe,meta:{title:"user.PROFILE.TABS.PREFERENCES"}},{path:"sports",name:"UserSportPreferences",component:JE,props:{isEdition:!1},meta:{title:"user.PROFILE.TABS.SPORTS"}},{path:"apps",name:"UserApps",component:JRe,children:[{path:"",name:"UserAppsList",component:gbe,meta:{title:"user.PROFILE.TABS.APPS"}},{path:":id",name:"UserApp",component:QE,meta:{title:"user.PROFILE.TABS.APPS"}},{path:":id/created",name:"CreatedUserApp",component:QE,props:{afterCreation:!0},meta:{title:"user.PROFILE.TABS.APPS"}},{path:"new",name:"AddUserApp",component:WRe,meta:{title:"user.PROFILE.TABS.APPS"}},{path:"authorize",name:"AuthorizeUserApp",component:ZRe,meta:{title:"user.PROFILE.TABS.APPS"}}]}]},{path:"edit",name:"UserProfileEdition",component:ZSe,props:e=>({tab:Sh(e.path)}),children:[{path:"",name:"UserInfosEdition",component:q2e,meta:{title:"user.PROFILE.EDIT"}},{path:"account",name:"UserAccountEdition",component:L2e,meta:{title:"user.PROFILE.ACCOUNT_EDITION"}},{path:"picture",name:"UserPictureEdition",component:sve,meta:{title:"user.PROFILE.PICTURE_EDITION"}},{path:"preferences",name:"UserPreferencesEdition",component:rRe,meta:{title:"user.PROFILE.EDIT_PREFERENCES"}},{path:"sports",name:"UserSportPreferencesEdition",component:JE,props:{isEdition:!0},meta:{title:"user.PROFILE.EDIT_SPORTS_PREFERENCES"}},{path:"privacy-policy",name:"UserPrivacyPolicy",component:_Re,meta:{title:"user.PROFILE.PRIVACY-POLICY_EDITION"}}]}]},{path:"/statistics",name:"Statistics",component:Vye,meta:{title:"statistics.STATISTICS"}},{path:"/users/:username",name:"User",component:lh,meta:{title:"administration.USER"}},{path:"/workouts",name:"Workouts",component:m8e,meta:{title:"workouts.WORKOUT",count:0}},{path:"/workouts/:workoutId",name:"Workout",component:gh,props:{displaySegment:!1},meta:{title:"workouts.WORKOUT"}},{path:"/workouts/:workoutId/edit",name:"EditWorkout",component:QDe,meta:{title:"workouts.EDIT_WORKOUT"}},{path:"/workouts/:workoutId/segment/:segmentId",name:"WorkoutSegment",component:gh,props:{displaySegment:!0},meta:{title:"workouts.SEGMENT",count:0}},{path:"/workouts/add",name:"AddWorkout",component:qDe,meta:{title:"workouts.ADD_WORKOUT"}},{path:"/admin",name:"Administration",component:PNe,children:[{path:"",name:"AdministrationMenu",component:gge,meta:{title:"admin.ADMINISTRATION"}},{path:"application",name:"ApplicationAdministration",component:CE,meta:{title:"admin.APP_CONFIG.TITLE"}},{path:"application/edit",name:"ApplicationAdministrationEdition",component:CE,props:{edition:!0},meta:{title:"admin.APPLICATION"}},{path:"sports",name:"SportsAdministration",component:zge,meta:{title:"admin.SPORTS.TITLE"}},{path:"users/:username",name:"UserFromAdmin",component:lh,props:{fromAdmin:!0},meta:{title:"admin.USER",count:1}},{path:"users",name:"UsersAdministration",component:iSe,meta:{title:"admin.USERS.TITLE"}}]},{path:"/about",name:"About",component:SNe,meta:{title:"common.ABOUT",withoutChecks:!0}},{path:"/privacy-policy",name:"PrivacyPolicy",component:Sye,meta:{title:"privacy_policy.TITLE",withoutChecks:!0}},{path:"/:pathMatch(.*)*",name:"not-found",component:_ye,meta:{title:"error.NOT_FOUND.PAGE"}}],nS=X0e({history:f0e("/"),routes:E8e});nS.beforeEach((e,t,n)=>{if("title"in e.meta){const r=typeof e.meta.title=="string"?e.meta.title:"",a=r?typeof e.meta.count=="number"?Ah(r,+e.meta.count):Ah(r):"";window.document.title=`FitTrackee${r?` - ${Rt(a)}`:""}`}Bs.dispatch(K.ACTIONS.CHECK_AUTH_USER).then(()=>{if(e.meta.withoutChecks)return n();if(Bs.getters[K.GETTERS.IS_AUTHENTICATED]&&e.meta.withoutAuth)return n("/");if(!Bs.getters[K.GETTERS.IS_AUTHENTICATED]&&!e.meta.withoutAuth){const r=e.path==="/"?{path:"/login"}:{path:"/login",query:{from:e.fullPath}};n(r)}else n()}).catch(r=>{console.error(r),n()})});const vt=nS;Md.register(aS,sS,iS,oS,uS,cS,lS,Oh,dS,Ih,fS,pS);const rS=kI(Dfe).provide("sportColors",a0).use(_a).use(Bs).use(vt).use(Sv,{name:"VFullscreen"}).directive("click-outside",REe);vEe.forEach(e=>{rS.component(e.name,e.target)});rS.mount("#app"); + C512.001,172.24,506.387,166.626,499.487,166.626z">`,7),H4e=[B4e];function V4e(e,t,n,r,a,s){return A(),N("svg",z4e,H4e)}const j4e=re(G4e,[["render",V4e]]),K4e={id:"password-action-done",class:"center-card with-margin"},Y4e={class:"password-message"},q4e={key:0},X4e=Z({__name:"PasswordActionDone",props:{action:{}},setup(e){const t=e,{action:n}=_e(t);return(r,a)=>{const s=oe("router-link"),i=oe("i18n-t");return A(),N("div",K4e,[h(n)==="request-sent"?(A(),te(PA,{key:0})):(A(),te(j4e,{key:1})),p("div",Y4e,[h(n)==="request-sent"?(A(),N("span",q4e,T(r.$t("user.PASSWORD_SENT_EMAIL_TEXT")),1)):(A(),te(i,{key:1,keypath:"user.PASSWORD_UPDATED"},{default:ue(()=>[k(s,{to:"/login"},{default:ue(()=>[j(T(r.$t("common.HERE")),1)]),_:1})]),_:1}))])])}}}),Z4e=re(X4e,[["__scopeId","data-v-ee1004fc"]]),Q4e={id:"password-reset-request",class:"center-card with-margin"},J4e=Z({__name:"PasswordResetForm",props:{action:{},token:{default:""}},setup(e){const t=e,{action:n,token:r}=_e(t);return(a,s)=>{const i=oe("Card");return A(),N("div",Q4e,[k(i,null,{title:ue(()=>[j(T(a.$t("user.RESET_PASSWORD")),1)]),content:ue(()=>[k(m0,{action:h(n),token:h(r)},null,8,["action","token"])]),_:1})])}}}),eDe=re(J4e,[["__scopeId","data-v-97f01ba1"]]),tDe={id:"password-reset",class:"view"},nDe={class:"container"},rDe=Z({__name:"PasswordResetView",props:{action:{}},setup(e){const t=e,n=qt(),r=Yr(),{action:a}=_e(t),s=$(()=>n.query.token);return Ct(()=>{t.action==="reset"&&!s.value&&r.push("/")}),(i,o)=>(A(),N("div",tDe,[p("div",nDe,[h(a).startsWith("reset")?(A(),te(eDe,{key:0,action:h(a),token:s.value},null,8,["action","token"])):(A(),te(Z4e,{key:1,action:h(a)},null,8,["action"]))])]))}}),co=re(rDe,[["__scopeId","data-v-5cbe9029"]]),aDe=e=>(ot("data-v-af92ad3a"),e=e(),ut(),e),sDe={key:0,id:"profile",class:"view"},iDe=aDe(()=>p("div",{id:"bottom"},null,-1)),oDe=Z({__name:"ProfileView",setup(e){const t=Me(),n=$(()=>t.getters[K.GETTERS.AUTH_USER_PROFILE]);return(r,a)=>{const s=oe("router-view");return n.value.username?(A(),N("div",sDe,[k(s,{user:n.value},null,8,["user"]),iDe])):x("",!0)}}}),uDe=re(oDe,[["__scopeId","data-v-af92ad3a"]]),cDe={key:0,id:"user",class:"view"},lDe={class:"box"},dDe=Z({__name:"UserView",props:{fromAdmin:{type:Boolean}},setup(e){const t=e,{fromAdmin:n}=_e(t),r=qt(),a=Me(),s=$(()=>a.getters[De.GETTERS.USER]);return Ct(()=>{r.params.username&&typeof r.params.username=="string"&&a.dispatch(De.ACTIONS.GET_USER,r.params.username)}),hi(()=>{a.dispatch(De.ACTIONS.EMPTY_USER)}),(i,o)=>s.value.username?(A(),N("div",cDe,[k(rA,{user:s.value},null,8,["user"]),p("div",lDe,[k(sA,{user:s.value,"from-admin":h(n)},null,8,["user","from-admin"])])])):x("",!0)}}),lh=re(dDe,[["__scopeId","data-v-1b7a0b4f"]]),fDe={id:"workout-form"},pDe={class:"form-items"},mDe={key:0,class:"form-item-radio"},EDe=["checked","disabled"],hDe={for:"withGpx"},_De=["checked","disabled"],TDe={for:"withoutGpx"},gDe={class:"form-item"},ADe=["disabled"],SDe=["value"],ODe={key:1,class:"form-item"},IDe={for:"gpxFile"},vDe=["disabled"],RDe={class:"files-help info-box"},bDe={key:2,class:"form-item"},NDe={for:"title"},CDe=["required","disabled"],yDe={key:3},DDe={class:"workout-date-duration"},PDe={class:"form-item"},wDe={class:"workout-date-time"},LDe=["disabled"],$De=["disabled"],kDe={class:"form-item"},UDe=["disabled"],MDe=["disabled"],xDe=["disabled"],FDe={class:"workout-data"},WDe={class:"form-item"},GDe=["disabled"],zDe={class:"form-item"},BDe=["disabled"],HDe={class:"form-item"},VDe=["disabled"],jDe={class:"form-item"},KDe={key:1},YDe={key:2,class:"form-buttons"},qDe=["disabled"],XDe=Z({__name:"WorkoutEdition",props:{authUser:{},sports:{},isCreation:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},workout:{default:()=>({})}},setup(e){const t=e,{t:n}=Yt(),r=Me(),a=Yr(),{authUser:s,workout:i,isCreation:o,loading:u}=_e(t),l=$(()=>Xr(t.sports,n,"is_active_for_user",i.value.id?[i.value.sport_id]:[])),c=$(()=>r.getters[H.GETTERS.APP_CONFIG]),f=c.value.max_single_file_size?qo(c.value.max_single_file_size):"",d=c.value.gpx_limit_import,m=c.value.max_zip_file_size?qo(c.value.max_zip_file_size):"",E=$(()=>r.getters[H.GETTERS.ERROR_MESSAGES]),I=zt({sport_id:"",title:"",notes:"",workoutDate:"",workoutTime:"",workoutDurationHour:"",workoutDurationMinutes:"",workoutDurationSeconds:"",workoutDistance:"",workoutAscent:"",workoutDescent:""}),R=le(i.value.id?i.value.with_gpx:o.value);let v=null;const b=le(!1),S=le([]);_t(()=>{let D;t.workout.id?(M(t.workout),D=document.getElementById("sport")):D=document.getElementById("withGpx"),D&&D.focus()});function O(D){I.notes=D}function C(){R.value=!R.value,b.value=!1}function P(D){D.target.files&&(v=D.target.files[0])}function M(D){if(I.sport_id=`${D.sport_id}`,I.title=D.title,I.notes=D.notes,!D.with_gpx){const z=tA(Oc(D.workout_date,t.authUser.timezone),"yyyy-MM-dd"),V=D.duration.split(":");I.workoutDistance=`${s.value.imperial_units?on(D.distance,"km","mi",3):parseFloat(D.distance.toFixed(3))}`,I.workoutDate=z.workout_date,I.workoutTime=z.workout_time,I.workoutDurationHour=V[0],I.workoutDurationMinutes=V[1],I.workoutDurationSeconds=V[2],I.workoutAscent=D.ascent===null?"":`${s.value.imperial_units?on(D.ascent,"m","ft",2):parseFloat(D.ascent.toFixed(2))}`,I.workoutDescent=D.descent===null?"":`${s.value.imperial_units?on(D.descent,"m","ft",2):parseFloat(D.descent.toFixed(2))}`}}function w(){return S.value.includes("workouts.INVALID_DISTANCE")}function G(){return S.value.includes("workouts.INVALID_DURATION")}function B(){return S.value.includes("workouts.INVALID_ASCENT_OR_DESCENT")}function L(D){S.value=[],D.title=I.title,D.duration=+I.workoutDurationHour*3600+ +I.workoutDurationMinutes*60+ +I.workoutDurationSeconds,D.duration<=0&&S.value.push("workouts.INVALID_DURATION"),D.distance=s.value.imperial_units?on(+I.workoutDistance,"mi","km",3):+I.workoutDistance,D.distance<=0&&S.value.push("workouts.INVALID_DISTANCE"),D.workout_date=`${I.workoutDate} ${I.workoutTime}`,D.ascent=I.workoutAscent===""?null:s.value.imperial_units?on(+I.workoutAscent,"ft","m",3):+I.workoutAscent,D.descent=I.workoutDescent===""?null:s.value.imperial_units?on(+I.workoutDescent,"ft","m",3):+I.workoutDescent,(D.ascent!==null&&D.descent===null||D.ascent===null&&D.descent!==null)&&S.value.push("workouts.INVALID_ASCENT_OR_DESCENT")}function X(){const D={sport_id:+I.sport_id,notes:I.notes};if(t.workout.id)t.workout.with_gpx?D.title=I.title:L(D),S.value.length>0?r.commit(H.MUTATIONS.SET_ERROR_MESSAGES,S.value):r.dispatch(Ae.ACTIONS.EDIT_WORKOUT,{workoutId:t.workout.id,data:D});else if(R.value){if(!v){r.commit(H.MUTATIONS.SET_ERROR_MESSAGES,"workouts.NO_FILE_PROVIDED");return}D.file=v,r.dispatch(Ae.ACTIONS.ADD_WORKOUT,D)}else L(D),S.value.length>0?r.commit(H.MUTATIONS.SET_ERROR_MESSAGES,S.value):r.dispatch(Ae.ACTIONS.ADD_WORKOUT_WITHOUT_GPX,D)}function J(){t.workout.id?a.push({name:"Workout",params:{workoutId:t.workout.id}}):a.go(-1)}function ne(){b.value=!0}return bt(()=>r.commit(H.MUTATIONS.EMPTY_ERROR_MESSAGES)),Ge(()=>t.workout,async(D,z)=>{D!==z&&D&&D.id&&M(D)}),(D,z)=>{const V=oe("CustomTextArea"),ae=oe("ErrorMessage"),Be=oe("Loader"),Le=oe("Card");return A(),N("div",{id:"workout-edition",class:Se(["center-card with-margin",{"center-form":h(i)&&h(i).with_gpx}])},[k(Le,null,{title:ue(()=>[j(T(D.$t(`workouts.${h(o)?"ADD":"EDIT"}_WORKOUT`)),1)]),content:ue(()=>[p("div",fDe,[p("form",{class:Se({errors:b.value}),onSubmit:Je(X,["prevent"])},[p("div",pDe,[h(o)?(A(),N("div",mDe,[p("div",null,[p("input",{id:"withGpx",type:"radio",checked:R.value,disabled:h(u),onClick:C},null,8,EDe),p("label",hDe,T(D.$t("workouts.WITH_GPX")),1)]),p("div",null,[p("input",{id:"withoutGpx",type:"radio",checked:!R.value,disabled:h(u),onClick:C},null,8,_De),p("label",TDe,T(D.$t("workouts.WITHOUT_GPX")),1)])])):x("",!0),p("div",gDe,[p("label",null,T(D.$t("workouts.SPORT",1))+"*: ",1),qe(p("select",{id:"sport",required:"",onInvalid:ne,disabled:h(u),"onUpdate:modelValue":z[0]||(z[0]=Oe=>I.sport_id=Oe)},[(A(!0),N(Re,null,ze(l.value,Oe=>(A(),N("option",{value:Oe.id,key:Oe.id},T(Oe.translatedLabel),9,SDe))),128))],40,ADe),[[ks,I.sport_id]])]),h(o)&&R.value?(A(),N("div",ODe,[p("label",IDe,T(D.$t("workouts.GPX_FILE"))+" "+T(D.$t("workouts.ZIP_ARCHIVE_DESCRIPTION"))+"*: ",1),p("input",{id:"gpxFile",name:"gpxFile",type:"file",accept:".gpx, .zip",disabled:h(u),required:"",onInvalid:ne,onInput:P},null,40,vDe),p("div",RDe,[p("div",null,[p("strong",null,T(D.$t("workouts.GPX_FILE"))+":",1),p("ul",null,[p("li",null,T(D.$t("workouts.MAX_SIZE"))+": "+T(h(f)),1)])]),p("div",null,[p("strong",null,T(D.$t("workouts.ZIP_ARCHIVE"))+":",1),p("ul",null,[p("li",null,T(D.$t("workouts.NO_FOLDER")),1),p("li",null,T(D.$t("workouts.MAX_FILES"))+": "+T(h(d)),1),p("li",null,T(D.$t("workouts.MAX_SIZE"))+": "+T(h(m)),1)])])])])):(A(),N("div",bDe,[p("label",NDe,T(D.$t("workouts.TITLE"))+": ",1),qe(p("input",{id:"title",name:"title",type:"text",required:!h(o),onInvalid:ne,disabled:h(u),"onUpdate:modelValue":z[1]||(z[1]=Oe=>I.title=Oe)},null,40,CDe),[[at,I.title]])])),R.value?x("",!0):(A(),N("div",yDe,[p("div",DDe,[p("div",PDe,[p("label",null,T(D.$t("workouts.WORKOUT_DATE"))+"*:",1),p("div",wDe,[qe(p("input",{id:"workout-date",name:"workout-date",type:"date",required:"",onInvalid:ne,disabled:h(u),"onUpdate:modelValue":z[2]||(z[2]=Oe=>I.workoutDate=Oe)},null,40,LDe),[[at,I.workoutDate]]),qe(p("input",{id:"workout-time",name:"workout-time",class:"workout-time",type:"time",required:"",onInvalid:ne,disabled:h(u),"onUpdate:modelValue":z[3]||(z[3]=Oe=>I.workoutTime=Oe)},null,40,$De),[[at,I.workoutTime]])])]),p("div",kDe,[p("label",null,T(D.$t("workouts.DURATION"))+"*:",1),p("div",null,[qe(p("input",{id:"workout-duration-hour",name:"workout-duration-hour",class:Se(["workout-duration",{errored:G()}]),type:"text",placeholder:"HH",minlength:"1",maxlength:"2",pattern:"^([0-1]?[0-9]|2[0-3])$",required:"",onInvalid:ne,disabled:h(u),"onUpdate:modelValue":z[4]||(z[4]=Oe=>I.workoutDurationHour=Oe)},null,42,UDe),[[at,I.workoutDurationHour]]),j(" : "),qe(p("input",{id:"workout-duration-minutes",name:"workout-duration-minutes",class:Se(["workout-duration",{errored:G()}]),type:"text",pattern:"^([0-5][0-9])$",minlength:"2",maxlength:"2",placeholder:"MM",required:"",onInvalid:ne,disabled:h(u),"onUpdate:modelValue":z[5]||(z[5]=Oe=>I.workoutDurationMinutes=Oe)},null,42,MDe),[[at,I.workoutDurationMinutes]]),j(" : "),qe(p("input",{id:"workout-duration-seconds",name:"workout-duration-seconds",class:Se(["workout-duration",{errored:G()}]),type:"text",pattern:"^([0-5][0-9])$",minlength:"2",maxlength:"2",placeholder:"SS",required:"",onInvalid:ne,disabled:h(u),"onUpdate:modelValue":z[6]||(z[6]=Oe=>I.workoutDurationSeconds=Oe)},null,42,xDe),[[at,I.workoutDurationSeconds]])])])]),p("div",FDe,[p("div",WDe,[p("label",null,T(D.$t("workouts.DISTANCE"))+" ("+T(h(s).imperial_units?"mi":"km")+")*: ",1),qe(p("input",{class:Se({errored:w()}),name:"workout-distance",type:"number",min:"0",step:"0.001",required:"",onInvalid:ne,disabled:h(u),"onUpdate:modelValue":z[7]||(z[7]=Oe=>I.workoutDistance=Oe)},null,42,GDe),[[at,I.workoutDistance]])]),p("div",zDe,[p("label",null,T(D.$t("workouts.ASCENT"))+" ("+T(h(s).imperial_units?"ft":"m")+"): ",1),qe(p("input",{class:Se({errored:B()}),name:"workout-ascent",type:"number",min:"0",step:"0.01",onInvalid:ne,disabled:h(u),"onUpdate:modelValue":z[8]||(z[8]=Oe=>I.workoutAscent=Oe)},null,42,BDe),[[at,I.workoutAscent]])]),p("div",HDe,[p("label",null,T(D.$t("workouts.DESCENT"))+" ("+T(h(s).imperial_units?"ft":"m")+"): ",1),qe(p("input",{class:Se({errored:B()}),name:"workout-descent",type:"number",min:"0",step:"0.01",onInvalid:ne,disabled:h(u),"onUpdate:modelValue":z[9]||(z[9]=Oe=>I.workoutDescent=Oe)},null,42,VDe),[[at,I.workoutDescent]])])])])),p("div",jDe,[p("label",null,T(D.$t("workouts.NOTES"))+": ",1),k(V,{name:"notes",input:I.notes,disabled:h(u),onUpdateValue:O},null,8,["input","disabled"])])]),E.value?(A(),te(ae,{key:0,message:E.value},null,8,["message"])):x("",!0),h(u)?(A(),N("div",KDe,[k(Be)])):(A(),N("div",YDe,[p("button",{class:"confirm",type:"submit",disabled:h(u)},T(D.$t("buttons.SUBMIT")),9,qDe),p("button",{class:"cancel",onClick:Je(J,["prevent"])},T(D.$t("buttons.CANCEL")),1)]))],34)])]),_:1})],2)}}}),LA=re(XDe,[["__scopeId","data-v-4c5a9cd1"]]),ZDe={id:"add-workout",class:"view"},QDe={class:"container"},JDe=Z({__name:"AddWorkout",setup(e){const t=Me(),n=$(()=>t.getters[Mt.GETTERS.SPORTS]),r=$(()=>t.getters[K.GETTERS.AUTH_USER_PROFILE]),a=$(()=>t.getters[Ae.GETTERS.WORKOUT_DATA]);return(s,i)=>(A(),N("div",ZDe,[p("div",QDe,[k(LA,{authUser:r.value,sports:n.value,isCreation:!0,loading:a.value.loading},null,8,["authUser","sports","loading"])])]))}}),ePe={id:"edit-workout",class:"view"},tPe={class:"container"},nPe=Z({__name:"EditWorkout",setup(e){const t=qt(),n=Me(),r=$(()=>n.getters[K.GETTERS.AUTH_USER_PROFILE]),a=$(()=>n.getters[Mt.GETTERS.SPORTS]),s=$(()=>n.getters[Ae.GETTERS.WORKOUT_DATA]);return Ct(()=>{n.dispatch(Ae.ACTIONS.GET_WORKOUT_DATA,{workoutId:t.params.workoutId})}),Ge(()=>t.params.workoutId,async i=>{i||n.commit(Ae.MUTATIONS.EMPTY_WORKOUT)}),(i,o)=>(A(),N("div",ePe,[p("div",tPe,[s.value.workout.id?(A(),te(LA,{key:0,authUser:r.value,sports:a.value,workout:s.value.workout,loading:s.value.loading},null,8,["authUser","sports","workout","loading"])):x("",!0)])]))}}),ps=e=>(ot("data-v-e1628a52"),e=e(),ut(),e),rPe={id:"workout-card-title"},aPe=["disabled","title"],sPe=ps(()=>p("i",{class:"fa fa-chevron-left","aria-hidden":"true"},null,-1)),iPe=[sPe],oPe={class:"workout-card-title"},uPe={class:"workout-title-date"},cPe={key:0,class:"workout-title"},lPe=["aria-label"],dPe=ps(()=>p("i",{class:"fa fa-edit","aria-hidden":"true"},null,-1)),fPe=[dPe],pPe=["aria-label"],mPe=ps(()=>p("i",{class:"fa fa-download","aria-hidden":"true"},null,-1)),EPe=[mPe],hPe=["aria-label"],_Pe=ps(()=>p("i",{class:"fa fa-trash","aria-hidden":"true"},null,-1)),TPe=[_Pe],gPe={key:1,class:"workout-title"},APe={class:"workout-segment"},SPe=ps(()=>p("i",{class:"fa fa-map-marker","aria-hidden":"true"},null,-1)),OPe={class:"workout-date"},IPe={class:"workout-link"},vPe=["disabled","title"],RPe=ps(()=>p("i",{class:"fa fa-chevron-right","aria-hidden":"true"},null,-1)),bPe=[RPe],NPe=Z({__name:"WorkoutCardTitle",props:{sport:{},workoutObject:{}},emits:["displayModal"],setup(e,{emit:t}){const n=e,r=t,{sport:a,workoutObject:s}=_e(n);async function i(u){await je.get(`workouts/${u}/gpx/download`,{responseType:"blob"}).then(l=>{const c=window.URL.createObjectURL(new Blob([l.data],{type:"application/gpx+xml"})),f=document.createElement("a");f.href=c,f.setAttribute("download",`${u}.gpx`),document.body.appendChild(f),f.click()})}function o(){r("displayModal",!0)}return(u,l)=>{const c=oe("SportImage"),f=oe("router-link");return A(),N("div",rPe,[p("button",{class:Se(["workout-previous workout-arrow transparent",{inactive:!h(s).previousUrl}]),disabled:!h(s).previousUrl,title:h(s).previousUrl?u.$t(`workouts.PREVIOUS_${h(s).type}`):u.$t(`workouts.NO_PREVIOUS_${h(s).type}`),onClick:l[0]||(l[0]=d=>h(s).previousUrl?u.$router.push(h(s).previousUrl):null)},iPe,10,aPe),p("div",oPe,[k(c,{"sport-label":h(a).label,color:h(a).color},null,8,["sport-label","color"]),p("div",uPe,[h(s).type==="WORKOUT"?(A(),N("div",cPe,[p("span",null,T(h(s).title),1),p("button",{class:"transparent icon-button",onClick:l[1]||(l[1]=d=>u.$router.push({name:"EditWorkout",params:{workoutId:h(s).workoutId}})),"aria-label":u.$t("workouts.EDIT_WORKOUT")},fPe,8,lPe),h(s).with_gpx?(A(),N("button",{key:0,class:"transparent icon-button",onClick:l[2]||(l[2]=Je(d=>i(h(s).workoutId),["prevent"])),"aria-label":u.$t("workouts.DOWNLOAD_WORKOUT")},EPe,8,pPe)):x("",!0),p("button",{id:"delete-workout-button",class:"transparent icon-button",onClick:Je(o,["prevent"]),"aria-label":u.$t("workouts.DELETE_WORKOUT")},TPe,8,hPe)])):h(s).segmentId!==null?(A(),N("div",gPe,[j(T(h(s).title)+" ",1),p("span",APe,[j(" — "),SPe,j(" "+T(u.$t("workouts.SEGMENT"))+" "+T(h(s).segmentId+1),1)])])):x("",!0),p("div",OPe,[p("time",null,T(h(s).workoutDate)+" - "+T(h(s).workoutTime),1),p("span",IPe,[h(s).type==="SEGMENT"?(A(),te(f,{key:0,to:{name:"Workout",params:{workoutId:h(s).workoutId}}},{default:ue(()=>[j(" > "+T(u.$t("workouts.BACK_TO_WORKOUT")),1)]),_:1},8,["to"])):x("",!0)])])])]),p("button",{class:Se(["workout-next workout-arrow transparent",{inactive:!h(s).nextUrl}]),disabled:!h(s).nextUrl,title:h(s).nextUrl?u.$t(`workouts.NEXT_${h(s).type}`):u.$t(`workouts.NO_NEXT_${h(s).type}`),onClick:l[3]||(l[3]=d=>h(s).nextUrl?u.$router.push(h(s).nextUrl):null)},bPe,10,vPe)])}}}),CPe=re(NPe,[["__scopeId","data-v-e1628a52"]]),yPe=e=>(ot("data-v-1b247cbe"),e=e(),ut(),e),DPe={key:0,class:"workout-record"},PPe=yPe(()=>p("sup",null,[p("i",{class:"fa fa-trophy","aria-hidden":"true"})],-1)),wPe=[PPe],LPe=Z({__name:"WorkoutRecord",props:{recordType:{},workoutObject:{}},setup(e){const t=e,{recordType:n,workoutObject:r}=_e(t);return(a,s)=>h(r).records&&h(r).records.find(i=>i.record_type===h(n))?(A(),N("span",DPe,wPe)):x("",!0)}}),Cs=re(LPe,[["__scopeId","data-v-1b247cbe"]]),$Pe="/img/weather/temperature.svg",kPe="/img/weather/pour-rain.svg",UPe="/img/weather/breeze.svg",MPe=["N","NNE","NE","ENE","E","ESE","SE","SSE","S","SSW","SW","WSW","W","WNW","NW","NNW"],xPe=e=>{const t=Math.floor(e/22.5+.5);return MPe[t%16]},FPe={class:"wind"},WPe={class:"wind-bearing"},GPe=["title"],zPe=Z({__name:"WeatherWind",props:{weather:{},useImperialUnits:{type:Boolean}},setup(e){const t=e,{useImperialUnits:n,weather:r}=_e(t),{t:a}=Yt();function s(i){return a(`workouts.WEATHER.WIND_DIRECTIONS.${xPe(i)}`)}return(i,o)=>(A(),N("div",FPe,[j(T(h(jfe)(h(r).wind,h(n)))+" ",1),p("div",WPe,[h(r).windBearing?(A(),N("i",{key:0,class:"fa fa-long-arrow-down",style:Vr({transform:`rotate(${h(r).windBearing}deg)`}),"aria-hidden":"true",title:s(h(r).windBearing)},null,12,GPe)):x("",!0)])]))}}),dh=re(zPe,[["__scopeId","data-v-e1f7f9cc"]]),BPe=e=>(ot("data-v-be2fffb0"),e=e(),ut(),e),HPe={key:0,id:"workout-weather"},VPe={class:"weather-table"},jPe=BPe(()=>p("th",null,null,-1)),KPe={class:"weather-th"},YPe=["src","alt","title"],qPe={class:"weather-th"},XPe=["src","alt","title"],ZPe=["alt","title"],QPe=["alt","title"],JPe=["alt","title"],e6e=Z({__name:"WorkoutWeather",props:{workoutObject:{},useImperialUnits:{type:Boolean}},setup(e){const t=e,{useImperialUnits:n,workoutObject:r}=_e(t);return(a,s)=>h(r).weatherStart&&h(r).weatherEnd?(A(),N("div",HPe,[p("table",VPe,[p("thead",null,[p("tr",null,[jPe,p("th",null,[p("div",KPe,[j(T(a.$t("workouts.START"))+" ",1),p("img",{class:"weather-img",src:`/img/weather/${h(r).weatherStart.icon}.svg`,alt:a.$t(`workouts.WEATHER.DARK_SKY.${h(r).weatherStart.icon}`),title:a.$t(`workouts.WEATHER.DARK_SKY.${h(r).weatherStart.icon}`)},null,8,YPe)])]),p("th",null,[p("div",qPe,[j(T(a.$t("workouts.END"))+" ",1),p("img",{class:"weather-img",src:`/img/weather/${h(r).weatherEnd.icon}.svg`,alt:a.$t(`workouts.WEATHER.DARK_SKY.${h(r).weatherEnd.icon}`),title:a.$t(`workouts.WEATHER.DARK_SKY.${h(r).weatherEnd.icon}`)},null,8,XPe)])])])]),p("tbody",null,[p("tr",null,[p("td",null,[p("img",{class:"weather-img weather-img-small",src:$Pe,alt:a.$t("workouts.WEATHER.TEMPERATURE"),title:a.$t("workouts.WEATHER.TEMPERATURE")},null,8,ZPe)]),p("td",null,T(h(bm)(h(r).weatherStart.temperature,h(n))),1),p("td",null,T(h(bm)(h(r).weatherEnd.temperature,h(n))),1)]),p("tr",null,[p("td",null,[p("img",{class:"weather-img weather-img-small",src:kPe,alt:a.$t("workouts.WEATHER.HUMIDITY"),title:a.$t("workouts.WEATHER.HUMIDITY")},null,8,QPe)]),p("td",null,T(Number(h(r).weatherStart.humidity*100).toFixed(1))+"% ",1),p("td",null,T(Number(h(r).weatherEnd.humidity*100).toFixed(1))+"% ",1)]),p("tr",null,[p("td",null,[p("img",{class:"weather-img weather-img-small",src:UPe,alt:a.$t("workouts.WEATHER.WIND"),title:a.$t("workouts.WEATHER.WIND")},null,8,JPe)]),p("td",null,[k(dh,{weather:h(r).weatherStart,useImperialUnits:h(n)},null,8,["weather","useImperialUnits"])]),p("td",null,[k(dh,{weather:h(r).weatherEnd,useImperialUnits:h(n)},null,8,["weather","useImperialUnits"])])])])])])):x("",!0)}}),t6e=re(e6e,[["__scopeId","data-v-be2fffb0"]]),Sa=e=>(ot("data-v-9341b3e8"),e=e(),ut(),e),n6e={id:"workout-info"},r6e={class:"workout-data"},a6e=Sa(()=>p("i",{class:"fa fa-clock-o","aria-hidden":"true"},null,-1)),s6e={class:"label"},i6e={class:"value"},o6e={key:0},u6e={class:"value"},c6e={class:"value"},l6e={key:0,class:"workout-data"},d6e=Sa(()=>p("i",{class:"fa fa-road","aria-hidden":"true"},null,-1)),f6e={class:"label"},p6e={key:1,class:"workout-data"},m6e=Sa(()=>p("i",{class:"fa fa-tachometer","aria-hidden":"true"},null,-1)),E6e={class:"label"},h6e=Sa(()=>p("br",null,null,-1)),_6e={class:"label"},T6e={key:2,class:"workout-data"},g6e=["alt"],A6e={class:"label"},S6e=Sa(()=>p("br",null,null,-1)),O6e={class:"label"},I6e={key:3,class:"workout-data"},v6e=Sa(()=>p("i",{class:"fa fa-location-arrow","aria-hidden":"true"},null,-1)),R6e={class:"label"},b6e=Sa(()=>p("br",null,null,-1)),N6e={class:"label"},C6e=Z({__name:"WorkoutData",props:{workoutObject:{},useImperialUnits:{type:Boolean},displayHARecord:{type:Boolean}},setup(e){const t=e,{displayHARecord:n,workoutObject:r,useImperialUnits:a}=_e(t),s=$(()=>t.workoutObject.pauses!=="0:00:00"&&t.workoutObject.pauses!==null);return(i,o)=>{const u=oe("Distance");return A(),N("div",n6e,[p("div",r6e,[a6e,p("span",s6e,T(i.$t("workouts.DURATION")),1),j(": "),p("span",i6e,T(h(r).moving),1),k(Cs,{workoutObject:h(r),recordType:"LD"},null,8,["workoutObject"]),s.value?(A(),N("div",o6e,[j(" ("+T(i.$t("workouts.PAUSES"))+": ",1),p("span",u6e,T(h(r).pauses),1),j(" - "+T(i.$t("workouts.TOTAL_DURATION"))+": ",1),p("span",c6e,T(h(r).duration)+")",1)])):x("",!0)]),h(r).distance!==null?(A(),N("div",l6e,[d6e,p("span",f6e,T(i.$t("workouts.DISTANCE")),1),j(": "),k(u,{distance:h(r).distance,digits:3,unitFrom:"km",strong:!0,useImperialUnits:h(a)},null,8,["distance","useImperialUnits"]),k(Cs,{workoutObject:h(r),recordType:"FD"},null,8,["workoutObject"])])):x("",!0),h(r).aveSpeed!==null&&h(r).maxSpeed!==null?(A(),N("div",p6e,[m6e,p("span",E6e,T(i.$t("workouts.AVERAGE_SPEED")),1),j(": "),k(u,{distance:h(r).aveSpeed,unitFrom:"km",speed:!0,strong:!0,useImperialUnits:h(a)},null,8,["distance","useImperialUnits"]),k(Cs,{workoutObject:h(r),recordType:"AS"},null,8,["workoutObject"]),h6e,p("span",_6e,T(i.$t("workouts.MAX_SPEED")),1),j(": "),k(u,{distance:h(r).maxSpeed,unitFrom:"km",speed:!0,strong:!0,useImperialUnits:h(a)},null,8,["distance","useImperialUnits"]),k(Cs,{workoutObject:h(r),recordType:"MS"},null,8,["workoutObject"])])):x("",!0),h(r).maxAlt!==null&&h(r).minAlt!==null?(A(),N("div",T6e,[p("img",{class:"mountains",src:OA,alt:i.$t("workouts.ELEVATION")},null,8,g6e),p("span",A6e,T(i.$t("workouts.MIN_ALTITUDE")),1),j(": "),k(u,{distance:h(r).minAlt,unitFrom:"m",strong:!0,useImperialUnits:h(a)},null,8,["distance","useImperialUnits"]),S6e,p("span",O6e,T(i.$t("workouts.MAX_ALTITUDE")),1),j(": "),k(u,{distance:h(r).maxAlt,unitFrom:"m",strong:!0,useImperialUnits:h(a)},null,8,["distance","useImperialUnits"])])):x("",!0),h(r).ascent!==null&&h(r).descent!==null?(A(),N("div",I6e,[v6e,p("span",R6e,T(i.$t("workouts.ASCENT")),1),j(": "),k(u,{distance:h(r).ascent,unitFrom:"m",strong:!0,useImperialUnits:h(a)},null,8,["distance","useImperialUnits"]),h(n)?(A(),te(Cs,{key:0,workoutObject:h(r),recordType:"HA"},null,8,["workoutObject"])):x("",!0),b6e,p("span",N6e,T(i.$t("workouts.DESCENT")),1),j(": "),k(u,{distance:h(r).descent,unitFrom:"m",strong:!0,useImperialUnits:h(a)},null,8,["distance","useImperialUnits"])])):x("",!0),k(t6e,{workoutObject:h(r),useImperialUnits:h(a)},null,8,["workoutObject","useImperialUnits"])])}}}),y6e=re(C6e,[["__scopeId","data-v-9341b3e8"]]);function Ga(e,t){return Array.from(e.getElementsByTagName(t))}function ms(e){return e==null||e.normalize(),e&&e.textContent||""}function da(e,t,n){const r=e.getElementsByTagName(t),a=r.length?r[0]:null;return a&&n&&n(a),a}function D6e(e,t,n){const r={};if(!e)return r;const a=e.getElementsByTagName(t),s=a.length?a[0]:null;return s&&n?n(s,r):r}function $A(e,t,n){const r=ms(da(e,t));return r&&n?n(r)||{}:{}}function fh(e,t,n){const r=parseFloat(ms(da(e,t)));if(!isNaN(r))return r&&n?n(r)||{}:{}}function P6e(e,t,n){const r=parseFloat(ms(da(e,t)));if(!isNaN(r))return n&&n(r),r}function Ud(e,t){const n={};for(const r of t)$A(e,r,a=>{n[r]=a});return n}function w6e(e){return(e==null?void 0:e.nodeType)===1}function kA(e){return D6e(e,"line",t=>Object.assign({},$A(t,"color",r=>({stroke:`#${r}`})),fh(t,"opacity",r=>({"stroke-opacity":r})),fh(t,"width",r=>({"stroke-width":r*96/25.4}))))}function UA(e){let t=[];if(e===null)return t;for(const n of Array.from(e.childNodes)){if(!w6e(n))continue;const r=L6e(n.nodeName);if(r==="gpxtpx:TrackPointExtension")t=t.concat(UA(n));else{const a=ms(n);t.push([r,$6e(a)])}}return t}function L6e(e){return["heart","gpxtpx:hr","hr"].includes(e)?"heart":e}function $6e(e){const t=parseFloat(e);return isNaN(t)?e:t}function MA(e){const t=[parseFloat(e.getAttribute("lon")||""),parseFloat(e.getAttribute("lat")||"")];if(isNaN(t[0])||isNaN(t[1]))return null;P6e(e,"ele",r=>{t.push(r)});const n=da(e,"time");return{coordinates:t,time:n?ms(n):null,extendedValues:UA(da(e,"extensions"))}}function E0(e){var a;const t=Ud(e,["name","cmt","desc","type","time","keywords"]),n=Array.from(e.getElementsByTagNameNS("http://www.garmin.com/xmlschemas/GpxExtensions/v3","*"));for(const s of n)((a=s.parentNode)==null?void 0:a.parentNode)===e&&(t[s.tagName.replace(":","_")]=ms(s));const r=Ga(e,"link");return r.length&&(t.links=r.map(s=>Object.assign({href:s.getAttribute("href")},Ud(s,["text","type"])))),t}function xA(e,t){const n=Ga(e,t),r=[],a=[],s={};for(let i=0;i1,i=Object.assign({_gpxType:"trk"},E0(e),kA(da(e,"extensions")),r.length?{coordinateProperties:{times:s?r:r[0]}}:{});for(const o of a){n.push(o.line),i.coordinateProperties||(i.coordinateProperties={});const u=i.coordinateProperties,l=Object.entries(o.extendedValues);for(let c=0;cnew Array(m.line.length).fill(null))),u[f][c]=d):u[f]=d}}return{type:"Feature",properties:i,geometry:s?{type:"MultiLineString",coordinates:n}:{type:"LineString",coordinates:n[0]}}}function M6e(e){const t=Object.assign(E0(e),Ud(e,["sym"])),n=MA(e);return n?{type:"Feature",properties:t,geometry:{type:"Point",coordinates:n.coordinates}}:null}function*x6e(e){for(const t of Ga(e,"trk")){const n=U6e(t);n&&(yield n)}for(const t of Ga(e,"rte")){const n=k6e(t);n&&(yield n)}for(const t of Ga(e,"wpt")){const n=M6e(t);n&&(yield n)}}function F6e(e){return{type:"FeatureCollection",features:Array.from(x6e(e))}}const ph=(e,t)=>{for(const n of Object.keys(t))e.on(n,t[n])},FA=e=>{for(const t of Object.keys(e)){const n=e[t];n&&wr(n.cancel)&&n.cancel()}},W6e=e=>!e||typeof e.charAt!="function"?e:e.charAt(0).toUpperCase()+e.slice(1),wr=e=>typeof e=="function",hr=(e,t,n)=>{for(const r in n){const a="set"+W6e(r);e[a]?Ge(()=>n[r],(s,i)=>{e[a](s,i)}):t[a]&&Ge(()=>n[r],s=>{t[a](s)})}},Jn=(e,t,n={})=>{const r={...n};for(const a in e){const s=t[a],i=e[a];s&&(s&&s.custom===!0||i!==void 0&&(r[a]=i))}return r},Oa=e=>{const t={},n={};for(const r in e)if(r.startsWith("on")&&!r.startsWith("onUpdate")&&r!=="onReady"){const a=r.slice(2).toLocaleLowerCase();t[a]=e[r]}else n[r]=e[r];return{listeners:t,attrs:n}},G6e=async e=>{const t=await Promise.all([Dt(()=>import("./maps-ZyuCPqes.js").then(n=>n.m),__vite__mapDeps([0,1])),Dt(()=>import("./maps-ZyuCPqes.js").then(n=>n.b),__vite__mapDeps([0,1])),Dt(()=>import("./maps-ZyuCPqes.js").then(n=>n.d),__vite__mapDeps([0,1]))]);delete e.Default.prototype._getIconUrl,e.Default.mergeOptions({iconRetinaUrl:t[0].default,iconUrl:t[1].default,shadowUrl:t[2].default})},lo=e=>{const t=le((...r)=>console.warn(`Method ${e} has been invoked without being replaced`)),n=(...r)=>t.value(...r);return n.wrapped=t,tn(e,n),n},fo=(e,t)=>e.wrapped.value=t,Dn=typeof self=="object"&&self.self===self&&self||typeof global=="object"&&global.global===global&&global||globalThis,Rn=e=>{const t=It(e);if(t===void 0)throw new Error(`Attempt to inject ${e.description} before it was provided.`);return t},_r=Symbol("useGlobalLeaflet"),Zr=Symbol("addLayer"),h0=Symbol("removeLayer"),WA=Symbol("registerControl"),GA=Symbol("registerLayerControl"),zA=Symbol("canSetParentHtml"),BA=Symbol("setParentHtml"),HA=Symbol("setIcon"),z6e=Symbol("bindPopup"),B6e=Symbol("bindTooltip"),H6e=Symbol("unbindPopup"),V6e=Symbol("unbindTooltip"),$i={options:{type:Object,default:()=>({}),custom:!0}},Ic=e=>({options:e.options,methods:{}}),Es={...$i,pane:{type:String},attribution:{type:String},name:{type:String,custom:!0},layerType:{type:String,custom:!0},visible:{type:Boolean,custom:!0,default:!0}},_0=(e,t,n)=>{const r=Rn(Zr),a=Rn(h0),{options:s,methods:i}=Ic(e),o=Jn(e,Es,s),u=()=>r({leafletObject:t.value}),l=()=>a({leafletObject:t.value}),c={...i,setAttribution(f){l(),t.value.options.attribution=f,e.visible&&u()},setName(){l(),e.visible&&u()},setLayerType(){l(),e.visible&&u()},setVisible(f){t.value&&(f?u():l())},bindPopup(f){if(!t.value||!wr(t.value.bindPopup)){console.warn("Attempt to bind popup before bindPopup method available on layer.");return}t.value.bindPopup(f)},bindTooltip(f){if(!t.value||!wr(t.value.bindTooltip)){console.warn("Attempt to bind tooltip before bindTooltip method available on layer.");return}t.value.bindTooltip(f)},unbindTooltip(){t.value&&(wr(t.value.closeTooltip)&&t.value.closeTooltip(),wr(t.value.unbindTooltip)&&t.value.unbindTooltip())},unbindPopup(){t.value&&(wr(t.value.closePopup)&&t.value.closePopup(),wr(t.value.unbindPopup)&&t.value.unbindPopup())},updateVisibleProp(f){n.emit("update:visible",f)}};return tn(z6e,c.bindPopup),tn(B6e,c.bindTooltip),tn(H6e,c.unbindPopup),tn(V6e,c.unbindTooltip),bt(()=>{c.unbindPopup(),c.unbindTooltip(),l()}),{options:o,methods:c}},T0=(e,t)=>{if(e&&t.default)return Tn("div",{style:{display:"none"}},t.default())},j6e={...Es,interactive:{type:Boolean,default:void 0},bubblingMouseEvents:{type:Boolean,default:void 0}},VA={...j6e,stroke:{type:Boolean,default:void 0},color:{type:String},weight:{type:Number},opacity:{type:Number},lineCap:{type:String},lineJoin:{type:String},dashArray:{type:String},dashOffset:{type:String},fill:{type:Boolean,default:void 0},fillColor:{type:String},fillOpacity:{type:Number},fillRule:{type:String},className:{type:String}},K6e={...VA,radius:{type:Number},latLng:{type:[Object,Array],required:!0,custom:!0}};({...K6e});const hs={...$i,position:{type:String}},jA=(e,t)=>{const{options:n,methods:r}=Ic(e),a=Jn(e,hs,n),s={...r,setPosition(i){t.value&&t.value.setPosition(i)}};return bt(()=>{t.value&&t.value.remove()}),{options:a,methods:s}},Y6e=e=>e.default?Tn("div",{ref:"root"},e.default()):null,mh=Z({name:"LControl",props:{...hs,disableClickPropagation:{type:Boolean,custom:!0,default:!0},disableScrollPropagation:{type:Boolean,custom:!0,default:!1}},setup(e,t){const n=le(),r=le(),a=It(_r),s=Rn(WA),{options:i,methods:o}=jA(e,n);return _t(async()=>{const{Control:u,DomEvent:l}=a?Dn.L:await Dt(()=>import("./maps-ZyuCPqes.js").then(f=>f.e),__vite__mapDeps([0,1])),c=u.extend({onAdd(){return r.value}});n.value=Xn(new c(i)),hr(o,n.value,e),s({leafletObject:n.value}),e.disableClickPropagation&&r.value&&l.disableClickPropagation(r.value),e.disableScrollPropagation&&r.value&&l.disableScrollPropagation(r.value),nn(()=>t.emit("ready",n.value))}),{root:r,leafletObject:n}},render(){return Y6e(this.$slots)}});({...hs});const KA={...hs,collapsed:{type:Boolean,default:void 0},autoZIndex:{type:Boolean,default:void 0},hideSingleBase:{type:Boolean,default:void 0},sortLayers:{type:Boolean,default:void 0},sortFunction:{type:Function}},q6e=(e,t)=>{const{options:n}=jA(e,t);return{options:Jn(e,KA,n),methods:{addLayer(r){r.layerType==="base"?t.value.addBaseLayer(r.leafletObject,r.name):r.layerType==="overlay"&&t.value.addOverlay(r.leafletObject,r.name)},removeLayer(r){t.value.removeLayer(r.leafletObject)}}}},X6e=Z({name:"LControlLayers",props:KA,setup(e,t){const n=le(),r=It(_r),a=Rn(GA),{options:s,methods:i}=q6e(e,n);return _t(async()=>{const{control:o}=r?Dn.L:await Dt(()=>import("./maps-ZyuCPqes.js").then(u=>u.e),__vite__mapDeps([0,1]));n.value=Xn(o.layers(void 0,void 0,s)),hr(i,n.value,e),a({...e,...i,leafletObject:n.value}),nn(()=>t.emit("ready",n.value))}),{leafletObject:n}},render(){return null}});({...hs});({...hs});const vc={...Es},YA=(e,t,n)=>{const{options:r,methods:a}=_0(e,t,n),s=Jn(e,vc,r),i={...a,addLayer(o){t.value.addLayer(o.leafletObject)},removeLayer(o){t.value.removeLayer(o.leafletObject)}};return tn(Zr,i.addLayer),tn(h0,i.removeLayer),{options:s,methods:i}};({...vc});const qA={...vc,geojson:{type:[Object,Array],custom:!0},optionsStyle:{type:Function,custom:!0}},Z6e=(e,t,n)=>{const{options:r,methods:a}=YA(e,t,n),s=Jn(e,qA,r);Object.prototype.hasOwnProperty.call(e,"optionsStyle")&&(s.style=e.optionsStyle);const i={...a,setGeojson(o){t.value.clearLayers(),t.value.addData(o)},setOptionsStyle(o){t.value.setStyle(o)},getGeoJSONData(){return t.value.toGeoJSON()},getBounds(){return t.value.getBounds()}};return{options:s,methods:i}},Q6e=Z({props:qA,setup(e,t){const n=le(),r=le(!1),a=It(_r),s=Rn(Zr),{methods:i,options:o}=Z6e(e,n,t);return _t(async()=>{const{geoJSON:u}=a?Dn.L:await Dt(()=>import("./maps-ZyuCPqes.js").then(c=>c.e),__vite__mapDeps([0,1]));n.value=Xn(u(e.geojson,o));const{listeners:l}=Oa(t.attrs);n.value.on(l),hr(i,n.value,e),s({...e,...i,leafletObject:n.value}),r.value=!0,nn(()=>t.emit("ready",n.value))}),{ready:r,leafletObject:n}},render(){return T0(this.ready,this.$slots)}}),g0={...Es,opacity:{type:Number},zIndex:{type:Number},tileSize:{type:[Number,Array,Object]},noWrap:{type:Boolean,default:void 0},minZoom:{type:Number},maxZoom:{type:Number},className:{type:String}},XA=(e,t,n)=>{const{options:r,methods:a}=_0(e,t,n),s=Jn(e,g0,r),i={...a,setTileComponent(){var o;(o=t.value)==null||o.redraw()}};return bt(()=>{t.value.off()}),{options:s,methods:i}},J6e=(e,t,n,r)=>e.extend({initialize(a){this.tileComponents={},this.on("tileunload",this._unloadTile),n.setOptions(this,a)},createTile(a){const s=this._tileCoordsToKey(a);this.tileComponents[s]=t.create("div");const i=Tn({setup:r,props:["coords"]},{coords:a});return $I(i,this.tileComponents[s]),this.tileComponents[s]},_unloadTile(a){const s=this._tileCoordsToKey(a.coords);this.tileComponents[s]&&(this.tileComponents[s].innerHTML="",this.tileComponents[s]=void 0)}});({...g0});const Eh={iconUrl:{type:String},iconRetinaUrl:{type:String},iconSize:{type:[Object,Array]},iconAnchor:{type:[Object,Array]},popupAnchor:{type:[Object,Array]},tooltipAnchor:{type:[Object,Array]},shadowUrl:{type:String},shadowRetinaUrl:{type:String},shadowSize:{type:[Object,Array]},shadowAnchor:{type:[Object,Array]},bgPos:{type:[Object,Array]},className:{type:String}},ewe=Z({name:"LIcon",props:{...Eh,...$i},setup(e,t){const n=le(),r=It(_r),a=Rn(zA),s=Rn(BA),i=Rn(HA);let o,u,l,c,f;const d=(R,v,b)=>{const S=R&&R.innerHTML;if(!v){b&&f&&a()&&s(S);return}const{listeners:O}=Oa(t.attrs);f&&u(f,O);const{options:C}=Ic(e),P=Jn(e,Eh,C);S&&(P.html=S),f=P.html?l(P):c(P),o(f,O),i(f)},m=()=>{nn(()=>d(n.value,!0,!1))},E=()=>{nn(()=>d(n.value,!1,!0))},I={setIconUrl:m,setIconRetinaUrl:m,setIconSize:m,setIconAnchor:m,setPopupAnchor:m,setTooltipAnchor:m,setShadowUrl:m,setShadowRetinaUrl:m,setShadowAnchor:m,setBgPos:m,setClassName:m,setHtml:m};return _t(async()=>{const{DomEvent:R,divIcon:v,icon:b}=r?Dn.L:await Dt(()=>import("./maps-ZyuCPqes.js").then(S=>S.e),__vite__mapDeps([0,1]));o=R.on,u=R.off,l=v,c=b,hr(I,{},e),new MutationObserver(E).observe(n.value,{attributes:!0,childList:!0,characterData:!0,subtree:!0}),m()}),{root:n}},render(){const e=this.$slots.default?this.$slots.default():void 0;return Tn("div",{ref:"root"},e)}});({...Es});const twe=Z({props:vc,setup(e,t){const n=le(),r=le(!1),a=It(_r),s=Rn(Zr),{methods:i}=YA(e,n,t);return _t(async()=>{const{layerGroup:o}=a?Dn.L:await Dt(()=>import("./maps-ZyuCPqes.js").then(l=>l.e),__vite__mapDeps([0,1]));n.value=Xn(o(void 0,e.options));const{listeners:u}=Oa(t.attrs);n.value.on(u),hr(i,n.value,e),s({...e,...i,leafletObject:n.value}),r.value=!0,nn(()=>t.emit("ready",n.value))}),{ready:r,leafletObject:n}},render(){return T0(this.ready,this.$slots)}});function ZA(e,t,n){var r,a,s;t===void 0&&(t=50),n===void 0&&(n={});var i=(r=n.isImmediate)!=null&&r,o=(a=n.callback)!=null&&a,u=n.maxWait,l=Date.now(),c=[];function f(){if(u!==void 0){var m=Date.now()-l;if(m+t>=u)return u-m}return t}var d=function(){var m=[].slice.call(arguments),E=this;return new Promise(function(I,R){var v=i&&s===void 0;if(s!==void 0&&clearTimeout(s),s=setTimeout(function(){if(s=void 0,l=Date.now(),!i){var S=e.apply(E,m);o&&o(S),c.forEach(function(O){return(0,O.resolve)(S)}),c=[]}},f()),v){var b=e.apply(E,m);return o&&o(b),I(b)}c.push({resolve:I,reject:R})})};return d.cancel=function(m){s!==void 0&&clearTimeout(s),c.forEach(function(E){return(0,E.reject)(m)}),c=[]},d}const hh={...$i,center:{type:[Object,Array]},bounds:{type:[Array,Object]},maxBounds:{type:[Array,Object]},zoom:{type:Number},minZoom:{type:Number},maxZoom:{type:Number},paddingBottomRight:{type:[Object,Array]},paddingTopLeft:{type:Object},padding:{type:Object},worldCopyJump:{type:Boolean,default:void 0},crs:{type:[String,Object]},maxBoundsViscosity:{type:Number},inertia:{type:Boolean,default:void 0},inertiaDeceleration:{type:Number},inertiaMaxSpeed:{type:Number},easeLinearity:{type:Number},zoomAnimation:{type:Boolean,default:void 0},zoomAnimationThreshold:{type:Number},fadeAnimation:{type:Boolean,default:void 0},markerZoomAnimation:{type:Boolean,default:void 0},noBlockingAnimations:{type:Boolean,default:void 0},useGlobalLeaflet:{type:Boolean,default:!0,custom:!0}},nwe=Z({inheritAttrs:!1,emits:["ready","update:zoom","update:center","update:bounds"],props:hh,setup(e,t){const n=le(),r=zt({ready:!1,layersToAdd:[],layersInControl:[]}),{options:a}=Ic(e),s=Jn(e,hh,a),{listeners:i,attrs:o}=Oa(t.attrs),u=lo(Zr),l=lo(h0),c=lo(WA),f=lo(GA);tn(_r,e.useGlobalLeaflet);const d=$(()=>{const v={};return e.noBlockingAnimations&&(v.animate=!1),v}),m=$(()=>{const v=d.value;return e.padding&&(v.padding=e.padding),e.paddingTopLeft&&(v.paddingTopLeft=e.paddingTopLeft),e.paddingBottomRight&&(v.paddingBottomRight=e.paddingBottomRight),v}),E={moveend:ZA(v=>{r.leafletRef&&(t.emit("update:zoom",r.leafletRef.getZoom()),t.emit("update:center",r.leafletRef.getCenter()),t.emit("update:bounds",r.leafletRef.getBounds()))}),overlayadd(v){const b=r.layersInControl.find(S=>S.name===v.name);b&&b.updateVisibleProp(!0)},overlayremove(v){const b=r.layersInControl.find(S=>S.name===v.name);b&&b.updateVisibleProp(!1)}};_t(async()=>{e.useGlobalLeaflet&&(Dn.L=Dn.L||await Dt(()=>import("./maps-ZyuCPqes.js").then(G=>G.l),__vite__mapDeps([0,1])));const{map:v,CRS:b,Icon:S,latLngBounds:O,latLng:C,stamp:P}=e.useGlobalLeaflet?Dn.L:await Dt(()=>import("./maps-ZyuCPqes.js").then(G=>G.e),__vite__mapDeps([0,1]));try{s.beforeMapMount&&await s.beforeMapMount()}catch(G){console.error(`The following error occurred running the provided beforeMapMount hook ${G.message}`)}await G6e(S);const M=typeof s.crs=="string"?b[s.crs]:s.crs;s.crs=M||b.EPSG3857;const w={addLayer(G){G.layerType!==void 0&&(r.layerControl===void 0?r.layersToAdd.push(G):r.layersInControl.find(B=>P(B.leafletObject)===P(G.leafletObject))||(r.layerControl.addLayer(G),r.layersInControl.push(G))),G.visible!==!1&&r.leafletRef.addLayer(G.leafletObject)},removeLayer(G){G.layerType!==void 0&&(r.layerControl===void 0?r.layersToAdd=r.layersToAdd.filter(B=>B.name!==G.name):(r.layerControl.removeLayer(G.leafletObject),r.layersInControl=r.layersInControl.filter(B=>P(B.leafletObject)!==P(G.leafletObject)))),r.leafletRef.removeLayer(G.leafletObject)},registerLayerControl(G){r.layerControl=G,r.layersToAdd.forEach(B=>{r.layerControl.addLayer(B)}),r.layersToAdd=[],c(G)},registerControl(G){r.leafletRef.addControl(G.leafletObject)},setZoom(G){const B=r.leafletRef.getZoom();G!==B&&r.leafletRef.setZoom(G,d.value)},setCrs(G){const B=r.leafletRef.getBounds();r.leafletRef.options.crs=G,r.leafletRef.fitBounds(B,{animate:!1,padding:[0,0]})},fitBounds(G){r.leafletRef.fitBounds(G,m.value)},setBounds(G){if(!G)return;const B=O(G);B.isValid()&&!(r.lastSetBounds||r.leafletRef.getBounds()).equals(B,0)&&(r.lastSetBounds=B,r.leafletRef.fitBounds(B))},setCenter(G){if(G==null)return;const B=C(G),L=r.lastSetCenter||r.leafletRef.getCenter();(L.lat!==B.lat||L.lng!==B.lng)&&(r.lastSetCenter=B,r.leafletRef.panTo(B,d.value))}};fo(u,w.addLayer),fo(l,w.removeLayer),fo(c,w.registerControl),fo(f,w.registerLayerControl),r.leafletRef=Xn(v(n.value,s)),hr(w,r.leafletRef,e),ph(r.leafletRef,E),ph(r.leafletRef,i),r.ready=!0,nn(()=>t.emit("ready",r.leafletRef))}),hi(()=>{FA(E),r.leafletRef&&(r.leafletRef.off(),r.leafletRef.remove())});const I=$(()=>r.leafletRef),R=$(()=>r.ready);return{root:n,ready:R,leafletObject:I,attrs:o}},render({attrs:e}){return e.style||(e.style={}),e.style.width||(e.style.width="100%"),e.style.height||(e.style.height="100%"),Tn("div",{...e,ref:"root"},this.ready&&this.$slots.default?this.$slots.default():{})}}),rwe=["Symbol(Comment)","Symbol(Text)"],awe=["LTooltip","LPopup"],QA={...Es,draggable:{type:Boolean,default:void 0},icon:{type:[Object]},zIndexOffset:{type:Number},latLng:{type:[Object,Array],custom:!0,required:!0}},swe=(e,t,n)=>{const{options:r,methods:a}=_0(e,t,n),s=Jn(e,QA,r),i={...a,setDraggable(o){t.value.dragging&&(o?t.value.dragging.enable():t.value.dragging.disable())},latLngSync(o){n.emit("update:latLng",o.latlng),n.emit("update:lat-lng",o.latlng)},setLatLng(o){if(o!=null&&t.value){const u=t.value.getLatLng();(!u||!u.equals(o))&&t.value.setLatLng(o)}}};return{options:s,methods:i}},iwe=(e,t)=>{const n=t.slots.default&&t.slots.default();return n&&n.length&&n.some(owe)};function owe(e){return!(rwe.includes(e.type.toString())||awe.includes(e.type.name))}const JA=Z({name:"LMarker",props:QA,setup(e,t){const n=le(),r=le(!1),a=It(_r),s=Rn(Zr);tn(zA,()=>{var l;return!!((l=n.value)!=null&&l.getElement())}),tn(BA,l=>{var c,f;const d=wr((c=n.value)==null?void 0:c.getElement)&&((f=n.value)==null?void 0:f.getElement());d&&(d.innerHTML=l)}),tn(HA,l=>{var c;return((c=n.value)==null?void 0:c.setIcon)&&n.value.setIcon(l)});const{options:i,methods:o}=swe(e,n,t),u={moveHandler:ZA(o.latLngSync)};return _t(async()=>{const{marker:l,divIcon:c}=a?Dn.L:await Dt(()=>import("./maps-ZyuCPqes.js").then(d=>d.e),__vite__mapDeps([0,1]));iwe(i,t)&&(i.icon=c({className:""})),n.value=Xn(l(e.latLng,i));const{listeners:f}=Oa(t.attrs);n.value.on(f),n.value.on("move",u.moveHandler),hr(o,n.value,e),s({...e,...o,leafletObject:n.value}),r.value=!0,nn(()=>t.emit("ready",n.value))}),hi(()=>FA(u)),{ready:r,leafletObject:n}},render(){return T0(this.ready,this.$slots)}}),uwe={...VA,smoothFactor:{type:Number},noClip:{type:Boolean,default:void 0},latLngs:{type:Array,required:!0,custom:!0}},_h={...uwe},eS={...$i,content:{type:String,default:null}};({...eS});({..._h,latLngs:{..._h.latLngs}});const A0={...g0,tms:{type:Boolean,default:void 0},subdomains:{type:[String,Array],validator:e=>typeof e=="string"?!0:Array.isArray(e)?e.every(t=>typeof t=="string"):!1},detectRetina:{type:Boolean,default:void 0},url:{type:String,required:!0,custom:!0}},cwe=(e,t,n)=>{const{options:r,methods:a}=XA(e,t,n),s=Jn(e,A0,r),i={...a};return{options:s,methods:i}},lwe=Z({props:A0,setup(e,t){const n=le(),r=It(_r),a=Rn(Zr),{options:s,methods:i}=cwe(e,n,t);return _t(async()=>{const{tileLayer:o}=r?Dn.L:await Dt(()=>import("./maps-ZyuCPqes.js").then(l=>l.e),__vite__mapDeps([0,1]));n.value=Xn(o(e.url,s));const{listeners:u}=Oa(t.attrs);n.value.on(u),hr(i,n.value,e),a({...e,...i,leafletObject:n.value}),nn(()=>t.emit("ready",n.value))}),{leafletObject:n}},render(){return null}});({...eS});({...A0});const Th=Z({__name:"CustomMarker",props:{markerCoordinates:{},isStart:{type:Boolean}},setup(e){const t=e,{isStart:n,markerCoordinates:r}=_e(t);return(a,s)=>h(r).latitude?(A(),te(h(JA),{key:0,"lat-lng":[h(r).latitude,h(r).longitude]},{default:ue(()=>[k(h(ewe),{"icon-url":`/img/workouts/${h(n)?"start":"finish"}.svg`,iconSize:[15,15]},null,8,["icon-url"])]),_:1},8,["lat-lng"])):x("",!0)}}),dwe=e=>(ot("data-v-dac2dfa0"),e=e(),ut(),e),fwe={id:"workout-map"},pwe={key:0,class:"leaflet-container"},mwe={key:1},Ewe=dwe(()=>p("i",{class:"fa fa-refresh","aria-hidden":"true"},null,-1)),hwe={key:1,class:"no-map"},_we=Z({__name:"index",props:{workoutData:{},markerCoordinates:{default:()=>({})}},setup(e){const t=e,n=Me(),{workoutData:r,markerCoordinates:a}=_e(t),s=le(null),i=$(()=>R()),o=$(()=>n.getters[H.GETTERS.APP_CONFIG]),u=$(()=>E(i)),l=$(()=>t.workoutData&&t.workoutData.gpx?m(t.workoutData.gpx):{}),c=$(()=>t.workoutData&&t.workoutData.chartData.length>0?{latitude:t.workoutData.chartData[0].latitude,longitude:t.workoutData.chartData[0].longitude}:{}),f=$(()=>t.workoutData&&t.workoutData.chartData.length>0?{latitude:t.workoutData.chartData[t.workoutData.chartData.length-1].latitude,longitude:t.workoutData.chartData[t.workoutData.chartData.length-1].longitude}:{}),d=le(!1);function m(S){if(!S||S!=="")try{return{jsonData:F6e(new DOMParser().parseFromString(S,"text/xml"))}}catch{return console.error("Invalid gpx content"),{}}return{}}function E(S){return[(S.value[0][0]+S.value[1][0])/2,(S.value[0][1]+S.value[1][1])/2]}function I(S){var O,C;(O=s.value)!=null&&O.leafletObject&&((C=s.value)==null||C.leafletObject.fitBounds(S))}function R(){return t.workoutData?[[t.workoutData.workout.bounds[0],t.workoutData.workout.bounds[1]],[t.workoutData.workout.bounds[2],t.workoutData.workout.bounds[3]]]:[]}function v(){var S;(S=s.value)==null||S.leafletObject.fitBounds(R())}function b(){d.value=!d.value,d.value||setTimeout(()=>{v()},100)}return(S,O)=>{const C=oe("VFullscreen");return A(),N("div",fwe,[h(r).loading?(A(),N("div",pwe)):(A(),N("div",mwe,[h(r).workout.with_gpx?(A(),te(C,{key:0,modelValue:d.value,"onUpdate:modelValue":O[1]||(O[1]=P=>d.value=P)},{default:ue(()=>[p("div",{class:Se(["leaflet-container",{"fullscreen-map":d.value}])},[l.value.jsonData&&u.value&&i.value.length===2?(A(),te(h(nwe),{key:0,zoom:13,maxZoom:19,center:u.value,bounds:i.value,zoomAnimation:!1,ref_key:"workoutMap",ref:s,onReady:O[0]||(O[0]=P=>I(i.value)),"use-global-leaflet":!1,class:"map"},{default:ue(()=>[k(h(X6e)),k(h(mh),{position:"topleft",class:"map-control",tabindex:"0",role:"button","aria-label":S.$t("workouts.RESET_ZOOM"),onClick:v},{default:ue(()=>[Ewe]),_:1},8,["aria-label"]),k(h(mh),{position:"topleft",class:"map-control",tabindex:"0",role:"button","aria-label":S.$t(`workouts.${d.value?"EXIT":"VIEW"}_FULLSCREEN`),onClick:b},{default:ue(()=>[p("i",{class:Se(`fa fa-${d.value?"compress":"arrows-alt"}`),"aria-hidden":"true"},null,2)]),_:1},8,["aria-label"]),k(h(lwe),{url:`${h(Si)()}workouts/map_tile/{s}/{z}/{x}/{y}.png`,attribution:o.value.map_attribution,bounds:i.value},null,8,["url","attribution","bounds"]),k(h(Q6e),{geojson:l.value.jsonData},null,8,["geojson"]),h(a).latitude?(A(),te(h(JA),{key:0,"lat-lng":[h(a).latitude,h(a).longitude]},null,8,["lat-lng"])):x("",!0),k(h(twe),{name:S.$t("workouts.START_AND_FINISH"),"layer-type":"overlay"},{default:ue(()=>[c.value.latitude?(A(),te(Th,{key:0,markerCoordinates:c.value,isStart:!0},null,8,["markerCoordinates"])):x("",!0),f.value.latitude?(A(),te(Th,{key:1,markerCoordinates:f.value,isStart:!1},null,8,["markerCoordinates"])):x("",!0)]),_:1},8,["name"])]),_:1},8,["center","bounds"])):x("",!0)],2)]),_:1},8,["modelValue"])):(A(),N("div",hwe,T(S.$t("workouts.NO_MAP")),1))]))])}}}),Twe=re(_we,[["__scopeId","data-v-dac2dfa0"]]),gwe={class:"workout-detail"},Awe=Z({__name:"index",props:{authUser:{},displaySegment:{type:Boolean},sports:{},workoutData:{},markerCoordinates:{default:()=>({})}},setup(e){const t=e,n=qt(),r=Me(),{authUser:a,markerCoordinates:s,workoutData:i}=_e(t),o=$(()=>t.workoutData.workout),u=le(n.params.workoutId?+n.params.segmentId:null),l=$(()=>o.value.segments.length>0&&u.value?o.value.segments[+u.value-1]:null),c=le(!1),f=$(()=>t.sports?t.sports.find(S=>S.id===t.workoutData.workout.sport_id):{}),d=$(()=>E(o.value,l.value));function m(S,O,C){const P=O&&C&&C!==1?`/workouts/${S.id}/segment/${C-1}`:!O&&S.previous_workout?`/workouts/${S.previous_workout}`:null,M=O&&C&&Cn.params.segmentId,async S=>{S&&(u.value=+S,b())}),Ge(()=>n.params.workoutId,async S=>{S&&(c.value=!1,b())}),(S,O)=>{const C=oe("Modal"),P=oe("Card");return A(),N("div",gwe,[c.value?(A(),te(C,{key:0,title:S.$t("common.CONFIRMATION"),message:S.$t("workouts.WORKOUT_DELETION_CONFIRMATION"),onConfirmAction:O[0]||(O[0]=M=>v(d.value.workoutId)),onCancelAction:R,onKeydown:At(R,["esc"])},null,8,["title","message"])):x("",!0),k(P,null,{title:ue(()=>[f.value?(A(),te(CPe,{key:0,sport:f.value,workoutObject:d.value,onDisplayModal:O[1]||(O[1]=M=>I(!0))},null,8,["sport","workoutObject"])):x("",!0)]),content:ue(()=>[k(Twe,{workoutData:h(i),markerCoordinates:h(s)},null,8,["workoutData","markerCoordinates"]),k(y6e,{workoutObject:d.value,useImperialUnits:h(a).imperial_units,displayHARecord:h(a).display_ascent},null,8,["workoutObject","useImperialUnits","displayHARecord"])]),_:1})])}}}),Swe=re(Awe,[["__scopeId","data-v-f8b05eca"]]),Owe=e=>{const t=document.getElementById(e);if(t){let n=t.querySelector("ul");return n||(n=document.createElement("ul"),t.appendChild(n)),n}throw new Error("No legend container")},Iwe={id:"htmlLegend",afterUpdate(e,t,n){var s,i,o,u,l,c;const r=Owe(n.containerID);for(;r.firstChild;)r.firstChild.remove();((o=(i=(s=e.options.plugins)==null?void 0:s.legend)==null?void 0:i.labels)!=null&&o.generateLabels?(c=(l=(u=e.options.plugins)==null?void 0:u.legend)==null?void 0:l.labels)==null?void 0:c.generateLabels(e):[]).forEach(f=>{var R,v,b;if(!((b=(v=(R=e.config.options)==null?void 0:R.scales)==null?void 0:v.yElevation)!=null&&b.display)&&f.datasetIndex===1)return;const d=document.createElement("li");d.onclick=()=>{f.datasetIndex!==void 0&&(e.setDatasetVisibility(f.datasetIndex,!e.isDatasetVisible(f.datasetIndex)),e.update())};const m=document.createElement("input");m&&(m.type="checkbox",m.id=f.text,m.checked=!f.hidden);const E=document.createTextNode(f.text),I=document.createElement("span");I&&(I.style.background=String(f.fillStyle),I.style.borderColor=String(f.strokeStyle)),d.appendChild(m),d.appendChild(E),d.appendChild(I),r.appendChild(d)})}},vwe=e=>(ot("data-v-b15bb69d"),e=e(),ut(),e),Rwe={id:"workout-chart"},bwe={class:"chart-radio"},Nwe=["checked"],Cwe=["checked"],ywe=vwe(()=>p("div",{id:"chart-legend"},null,-1)),Dwe={class:"line-chart"},Pwe={class:"chart-info"},wwe={class:"no-data-cleaning"},Lwe={key:0,class:"elevation-start"},$we=["checked"],kwe=Z({__name:"index",props:{authUser:{},workoutData:{}},emits:["getCoordinates"],setup(e,{emit:t}){const n=e,r=t,a=_f(),{t:s}=Yt(),{authUser:i,workoutData:o}=_e(n),u=$(()=>a.getters[H.GETTERS.DARK_MODE]),l=$(()=>hf(u.value)),c=le(!0),f=le(i.value.start_elevation_at_zero),d=$(()=>n3e(o.value.chartData,s,i.value.imperial_units,l.value)),m=$(()=>d.value&&d.value.datasets.elevation.data.length>0),E=B("km"),I=B("m"),R=$(()=>({labels:c.value?d.value.distance_labels:d.value.duration_labels,datasets:JSON.parse(JSON.stringify([d.value.datasets.speed,d.value.datasets.elevation]))})),v=$(()=>d.value.coordinates),b=$(()=>({color:l.value?kr.darkMode.line:kr.ligthMode.line})),S=$(()=>({color:l.value?kr.darkMode.text:kr.ligthMode.text})),O=$(()=>({responsive:!0,maintainAspectRatio:!1,animation:!1,layout:{padding:{top:22}},scales:{x:{grid:{drawOnChartArea:!1,...b.value},border:{...b.value},ticks:{count:10,callback:function(L){return c.value?Number(L).toFixed(2):M(L)},...S.value},type:"linear",bounds:"data",title:{display:!0,text:c.value?s("workouts.DISTANCE")+` (${E})`:s("workouts.DURATION"),...S.value}},ySpeed:{grid:{drawOnChartArea:!1,...b.value},border:{...b.value},position:"left",title:{display:!0,text:s("workouts.SPEED")+` (${E}/h)`,...S.value},ticks:{...S.value}},yElevation:{beginAtZero:f.value,display:m.value,grid:{drawOnChartArea:!1,...b.value},border:{...b.value},position:"right",title:{display:!0,text:s("workouts.ELEVATION")+` (${I})`,...S.value},ticks:{...S.value}}},elements:{point:{pointStyle:"circle",pointRadius:0}},plugins:{datalabels:{display:!1},tooltip:{interaction:{intersect:!1,mode:"index"},callbacks:{label:function(L){const X=` ${L.dataset.label}: ${L.formattedValue}`;return L.dataset.yAxisID==="yElevation"?X+` ${I}`:X+` ${E}/h`},title:function(L){return L.length>0&&w(v.value[L[0].dataIndex]),L.length===0?"":c.value?`${s("workouts.DISTANCE")}: ${L[0].label} ${E}`:`${s("workouts.DURATION")}: ${M(L[0].label.replace(",",""))}`}}},legend:{display:!1},htmlLegend:{containerID:"chart-legend",displayElevation:m.value}}})),C=[Iwe];function P(){c.value=!c.value}function M(L){return new Date(+L*1e3).toISOString().substr(11,8)}function w(L){r("getCoordinates",L)}function G(){w({latitude:null,longitude:null})}function B(L){return n.authUser.imperial_units?Pn[L].defaultTarget:L}return(L,X)=>{const J=oe("Card");return A(),N("div",Rwe,[k(J,null,{title:ue(()=>[j(T(L.$t("workouts.ANALYSIS")),1)]),content:ue(()=>[p("div",bwe,[p("label",null,[p("input",{type:"radio",name:"distance",checked:c.value,onClick:P},null,8,Nwe),j(" "+T(L.$t("workouts.DISTANCE")),1)]),p("label",null,[p("input",{type:"radio",name:"duration",checked:!c.value,onClick:P},null,8,Cwe),j(" "+T(L.$t("workouts.DURATION")),1)])]),ywe,p("div",Dwe,[k(h(tCe),{data:R.value,options:O.value,plugins:C,onMouseleave:G},null,8,["data","options"])]),p("div",Pwe,[p("div",wwe,T(L.$t("workouts.NO_DATA_CLEANING")),1),m.value?(A(),N("div",Lwe,[p("label",null,[p("input",{type:"checkbox",checked:f.value,onClick:X[0]||(X[0]=ne=>f.value=!f.value)},null,8,$we),j(" "+T(L.$t("workouts.START_ELEVATION_AT_ZERO")),1)])])):x("",!0)])]),_:1})])}}}),Uwe=re(kwe,[["__scopeId","data-v-b15bb69d"]]),Mwe={id:"workout-note"},xwe=["innerHTML"],Fwe=Z({__name:"WorkoutNotes",props:{notes:{default:()=>""}},setup(e){const t=e,{notes:n}=_e(t);return(r,a)=>{const s=oe("Card");return A(),N("div",Mwe,[k(s,null,{title:ue(()=>[j(T(r.$t("workouts.NOTES")),1)]),content:ue(()=>[p("span",{innerHTML:h(n)&&h(n)!==""?h(di)(h(n)):r.$t("workouts.NO_NOTES")},null,8,xwe)]),_:1})])}}}),Wwe=re(Fwe,[["__scopeId","data-v-f3e81eff"]]),Gwe={id:"workout-segments"},zwe=Z({__name:"WorkoutSegments",props:{segments:{},useImperialUnits:{type:Boolean}},setup(e){const t=e,{segments:n,useImperialUnits:r}=_e(t);return(a,s)=>{const i=oe("router-link"),o=oe("Distance"),u=oe("Card");return A(),N("div",Gwe,[k(u,null,{title:ue(()=>[j(T(a.$t("workouts.SEGMENT",2)),1)]),content:ue(()=>[p("ul",null,[(A(!0),N(Re,null,ze(h(n),(l,c)=>(A(),N("li",{key:l.segment_id},[k(i,{to:{name:"WorkoutSegment",params:{workoutId:l.workout_id,segmentId:c+1}}},{default:ue(()=>[j(T(a.$t("workouts.SEGMENT",1))+" "+T(c+1),1)]),_:2},1032,["to"]),j(" ("+T(a.$t("workouts.DISTANCE"))+": ",1),k(o,{distance:l.distance,unitFrom:"km",useImperialUnits:h(r)},null,8,["distance","useImperialUnits"]),j(", "+T(a.$t("workouts.DURATION"))+": "+T(l.duration)+") ",1)]))),128))])]),_:1})])}}}),Bwe=re(zwe,[["__scopeId","data-v-15725c61"]]),Hwe=e=>(ot("data-v-eac6aa4b"),e=e(),ut(),e),Vwe={id:"workout",class:"view"},jwe={class:"container"},Kwe={key:0,class:"workout-container"},Ywe={key:0},qwe=Hwe(()=>p("div",{id:"bottom"},null,-1)),Xwe={key:1},Zwe=Z({__name:"Workout",props:{displaySegment:{type:Boolean}},setup(e){const t=e,n=qt(),r=Me(),{displaySegment:a}=_e(t),s=$(()=>r.getters[Ae.GETTERS.WORKOUT_DATA]),i=$(()=>r.getters[K.GETTERS.AUTH_USER_PROFILE]),o=$(()=>r.getters[Mt.GETTERS.SPORTS]),u=le({latitude:null,longitude:null});Ct(()=>{const c={workoutId:n.params.workoutId};t.displaySegment&&(c.segmentId=n.params.segmentId),r.dispatch(Ae.ACTIONS.GET_WORKOUT_DATA,c)}),bt(()=>{r.commit(Ae.MUTATIONS.EMPTY_WORKOUT)});function l(c){u.value={latitude:c.latitude,longitude:c.longitude}}return Ge(()=>n.params.workoutId,async c=>{c&&r.dispatch(Ae.ACTIONS.GET_WORKOUT_DATA,{workoutId:c})}),Ge(()=>n.params.segmentId,async c=>{if(n.params.workoutId){const f={workoutId:n.params.workoutId};c&&(f.segmentId=c),r.dispatch(Ae.ACTIONS.GET_WORKOUT_DATA,f)}}),(c,f)=>(A(),N("div",Vwe,[p("div",jwe,[o.value.length>0?(A(),N("div",Kwe,[s.value.workout.id?(A(),N("div",Ywe,[k(Swe,{workoutData:s.value,sports:o.value,authUser:i.value,markerCoordinates:u.value,displaySegment:h(a)},null,8,["workoutData","sports","authUser","markerCoordinates","displaySegment"]),s.value.workout.with_gpx&&s.value.chartData.length>0?(A(),te(Uwe,{key:0,workoutData:s.value,authUser:i.value,displaySegment:h(a),onGetCoordinates:l},null,8,["workoutData","authUser","displaySegment"])):x("",!0),!h(a)&&s.value.workout.segments.length>1?(A(),te(Bwe,{key:1,segments:s.value.workout.segments,useImperialUnits:i.value.imperial_units},null,8,["segments","useImperialUnits"])):x("",!0),h(a)?x("",!0):(A(),te(Wwe,{key:2,notes:s.value.workout.notes},null,8,["notes"])),qwe])):(A(),N("div",Xwe,[s.value.loading?x("",!0):(A(),te(d0,{key:0,target:"WORKOUT"}))]))])):x("",!0)])]))}}),gh=re(Zwe,[["__scopeId","data-v-eac6aa4b"]]),Qwe=e=>(ot("data-v-29caaf8f"),e=e(),ut(),e),Jwe={class:"workouts-filters"},eLe={class:"box"},tLe={class:"form-all-items"},nLe={class:"form-items-group"},rLe={class:"form-item"},aLe=["value"],sLe={class:"form-item"},iLe=["value"],oLe={class:"form-items-group"},uLe={class:"form-item"},cLe=["value"],lLe=Qwe(()=>p("option",{value:""},null,-1)),dLe=["value"],fLe={class:"form-item form-item-title"},pLe={class:"form-inputs-group"},mLe=["value"],ELe={class:"form-items-group"},hLe={class:"form-item"},_Le={class:"form-inputs-group"},TLe=["value"],gLe=["value"],ALe={class:"form-items-group"},SLe={class:"form-item"},OLe={class:"form-inputs-group"},ILe=["value"],vLe=["value"],RLe={class:"form-items-group"},bLe={class:"form-item"},NLe={class:"form-inputs-group"},CLe=["value"],yLe=["value"],DLe={class:"form-items-group"},PLe={class:"form-item"},wLe={class:"form-inputs-group"},LLe=["value"],$Le=["value"],kLe={class:"form-button"},ULe=Z({__name:"WorkoutsFilters",props:{authUser:{},sports:{}},emits:["filter"],setup(e,{emit:t}){const n=e,r=t,{t:a}=Yt(),s=qt(),i=Yr(),{authUser:o}=_e(n),u=o.value.imperial_units?Pn.km.defaultTarget:"km",l=$(()=>Xr(n.sports,a));let c=Object.assign({},s.query);_t(()=>{const E=document.getElementById("from");E&&E.focus()});function f(E){const I=E.target.name,R=E.target.value;R===""?delete c[I]:c[I]=R}function d(){r("filter"),"page"in c&&(c.page="1"),i.push({path:"/workouts",query:c})}function m(){r("filter"),i.push({path:"/workouts",query:{}})}return Ge(()=>s.query,E=>{c=Object.assign({},E)}),(E,I)=>(A(),N("div",Jwe,[p("div",eLe,[p("form",{onSubmit:Je(d,["prevent"]),class:"form"},[p("div",tLe,[p("div",nLe,[p("div",rLe,[p("label",null,T(E.$t("workouts.FROM"))+": ",1),p("input",{id:"from",name:"from",type:"date",value:E.$route.query.from,onChange:f},null,40,aLe)]),p("div",sLe,[p("label",null,T(E.$t("workouts.TO"))+": ",1),p("input",{name:"to",type:"date",value:E.$route.query.to,onChange:f},null,40,iLe)])]),p("div",oLe,[p("div",uLe,[p("label",null,T(E.$t("workouts.SPORT",1))+":",1),p("select",{name:"sport_id",value:E.$route.query.sport_id,onChange:f,onKeyup:At(d,["enter"])},[lLe,(A(!0),N(Re,null,ze(l.value.filter(R=>h(o).sports_list.includes(R.id)),R=>(A(),N("option",{value:R.id,key:R.id},T(R.translatedLabel),9,dLe))),128))],40,cLe)]),p("div",fLe,[p("label",null,T(E.$t("workouts.TITLE",1))+":",1),p("div",pLe,[p("input",{class:"title",name:"title",value:E.$route.query.title,onChange:f,placeholder:"",type:"text",onKeyup:At(d,["enter"])},null,40,mLe)])])]),p("div",ELe,[p("div",hLe,[p("label",null,T(E.$t("workouts.DISTANCE"))+" ("+T(h(u))+"): ",1),p("div",_Le,[p("input",{name:"distance_from",type:"number",min:"0",step:"0.1",value:E.$route.query.distance_from,onChange:f,onKeyup:At(d,["enter"])},null,40,TLe),p("span",null,T(E.$t("workouts.TO")),1),p("input",{name:"distance_to",type:"number",min:"0",step:"0.1",value:E.$route.query.distance_to,onChange:f,onKeyup:At(d,["enter"])},null,40,gLe)])])]),p("div",ALe,[p("div",SLe,[p("label",null,T(E.$t("workouts.DURATION"))+": ",1),p("div",OLe,[p("input",{name:"duration_from",value:E.$route.query.duration_from,onChange:f,pattern:"^([0-9]*[0-9]):([0-5][0-9])$",placeholder:"hh:mm",type:"text",onKeyup:At(d,["enter"])},null,40,ILe),p("span",null,T(E.$t("workouts.TO")),1),p("input",{name:"duration_to",value:E.$route.query.duration_to,onChange:f,pattern:"^([0-9]*[0-9]):([0-5][0-9])$",placeholder:"hh:mm",type:"text",onKeyup:At(d,["enter"])},null,40,vLe)])])]),p("div",RLe,[p("div",bLe,[p("label",null,T(E.$t("workouts.AVE_SPEED"))+" ("+T(h(u))+"/h): ",1),p("div",NLe,[p("input",{min:"0",name:"ave_speed_from",value:E.$route.query.ave_speed_from,onChange:f,step:"0.1",type:"number",onKeyup:At(d,["enter"])},null,40,CLe),p("span",null,T(E.$t("workouts.TO")),1),p("input",{min:"0",name:"ave_speed_to",value:E.$route.query.ave_speed_to,onChange:f,step:"0.1",type:"number",onKeyup:At(d,["enter"])},null,40,yLe)])])]),p("div",DLe,[p("div",PLe,[p("label",null,T(E.$t("workouts.MAX_SPEED"))+" ("+T(h(u))+"/h): ",1),p("div",wLe,[p("input",{min:"0",name:"max_speed_from",value:E.$route.query.max_speed_from,onChange:f,step:"0.1",type:"number",onKeyup:At(d,["enter"])},null,40,LLe),p("span",null,T(E.$t("workouts.TO")),1),p("input",{min:"0",name:"max_speed_to",value:E.$route.query.max_speed_to,onChange:f,step:"0.1",type:"number",onKeyup:At(d,["enter"])},null,40,$Le)])])])]),p("div",kLe,[p("button",{type:"submit",class:"confirm",onClick:d},T(E.$t("buttons.FILTER")),1),p("button",{class:"confirm",onClick:m},T(E.$t("buttons.CLEAR_FILTER")),1)])],32)])]))}}),MLe=re(ULe,[["__scopeId","data-v-29caaf8f"]]),tS=e=>(ot("data-v-bb980a00"),e=e(),ut(),e),xLe={class:"workouts-list"},FLe={class:"total"},WLe={class:"total-label"},GLe={key:0},zLe={key:0,class:"workouts-table responsive-table"},BLe=tS(()=>p("th",{class:"sport-col"},null,-1)),HLe={class:"sport-col"},VLe={class:"cell-heading"},jLe=["onMouseover"],KLe={class:"cell-heading"},YLe={key:0,class:"fa fa-map-o","aria-hidden":"true"},qLe={class:"title"},XLe={class:"workout-date"},ZLe={class:"cell-heading"},QLe={class:"text-right"},JLe={class:"cell-heading"},e8e={class:"text-right"},t8e={class:"cell-heading"},n8e={class:"text-right"},r8e={class:"cell-heading"},a8e={class:"text-right"},s8e={class:"cell-heading"},i8e={class:"text-right"},o8e={class:"cell-heading"},u8e={class:"text-right"},c8e={class:"cell-heading"},l8e=tS(()=>p("div",{id:"bottom"},null,-1)),d8e=Z({__name:"WorkoutsList",props:{user:{},sports:{}},setup(e){const t=e,n=Me(),r=qt(),a=Yr(),{user:s,sports:i}=_e(t),o=["ave_speed","distance","duration","workout_date"],u=$(()=>n.getters[Ae.GETTERS.USER_WORKOUTS]),l=$(()=>n.getters[Ae.GETTERS.WORKOUTS_PAGINATION]),c=$(()=>n.getters[H.GETTERS.LANGUAGE]);let f=I(r.query);const d=le(null);Ct(()=>{m(f)});function m(b){n.dispatch(Ae.ACTIONS.GET_USER_WORKOUTS,s.value.imperial_units?R(b):b)}function E(b,S){const O=Object.assign({},r.query);O[b]=S,b==="per_page"&&(O.page="1"),f=I(O),a.push({path:"/workouts",query:f})}function I(b){const S=yd(b,o,pi.order_by,{defaultSort:pi.order});return Object.keys(b).filter(O=>Qge.includes(O)).map(O=>{typeof b[O]=="string"&&(S[O]=b[O])}),S}function R(b){const S={...b};return Object.entries(S).map(O=>{O[0].match("speed|distance")&&O[1]&&(S[O[0]]=on(+O[1],"mi","km"))}),S}function v(b){d.value=b}return Ge(()=>r.query,async b=>{f=I(b),m(f)}),(b,S)=>{const O=oe("SportImage"),C=oe("router-link"),P=oe("Distance");return A(),N("div",xLe,[p("div",{class:Se(["box",{"empty-table":u.value.length===0}])},[p("div",FLe,[p("span",WLe,T(b.$t("common.TOTAL").toLowerCase())+": ",1),l.value.total?(A(),N("span",GLe,T(l.value.total)+" "+T(b.$t("workouts.WORKOUT",l.value.total)),1)):x("",!0)]),k(qg,{sort:h(o0),order_by:o,query:h(f),message:"workouts",onUpdateSelect:E},null,8,["sort","query"]),u.value.length>0?(A(),N("div",zLe,[k($u,{class:"top-pagination",pagination:l.value,path:"/workouts",query:h(f)},null,8,["pagination","query"]),p("table",null,[p("thead",{class:Se({smaller:c.value==="de"})},[p("tr",null,[BLe,p("th",null,T(Rt(b.$t("workouts.WORKOUT",1))),1),p("th",null,T(Rt(b.$t("workouts.DATE"))),1),p("th",null,T(Rt(b.$t("workouts.DISTANCE"))),1),p("th",null,T(Rt(b.$t("workouts.DURATION"))),1),p("th",null,T(Rt(b.$t("workouts.AVE_SPEED"))),1),p("th",null,T(Rt(b.$t("workouts.MAX_SPEED"))),1),p("th",null,T(Rt(b.$t("workouts.ASCENT"))),1),p("th",null,T(Rt(b.$t("workouts.DESCENT"))),1)])],2),p("tbody",null,[(A(!0),N(Re,null,ze(u.value,M=>(A(),N("tr",{key:M.id},[p("td",HLe,[p("span",VLe,T(b.$t("workouts.SPORT",1)),1),h(i).length>0?(A(),te(O,{key:0,title:h(i).filter(w=>w.id===M.sport_id)[0].translatedLabel,"sport-label":h(s0)(M,h(i)),color:h(i0)(M,h(i))},null,8,["title","sport-label","color"])):x("",!0)]),p("td",{class:"workout-title",onMouseover:w=>v(M.id),onMouseleave:S[0]||(S[0]=w=>v(null))},[p("span",KLe,T(Rt(b.$t("workouts.WORKOUT",1))),1),k(C,{class:"nav-item",to:{name:"Workout",params:{workoutId:M.id}}},{default:ue(()=>[M.with_gpx?(A(),N("i",YLe)):x("",!0),p("span",qLe,T(M.title),1)]),_:2},1032,["to"]),M.with_gpx&&d.value===M.id?(A(),te(IA,{key:0,workout:M,"display-hover":!0},null,8,["workout"])):x("",!0)],40,jLe),p("td",XLe,[p("span",ZLe,T(b.$t("workouts.DATE")),1),p("time",null,T(h(kn)(M.workout_date,h(s).timezone,h(s).date_format)),1)]),p("td",QLe,[p("span",JLe,T(b.$t("workouts.DISTANCE")),1),M.distance!==null?(A(),te(P,{key:0,distance:M.distance,unitFrom:"km",useImperialUnits:h(s).imperial_units},null,8,["distance","useImperialUnits"])):x("",!0)]),p("td",e8e,[p("span",t8e,T(b.$t("workouts.DURATION")),1),j(" "+T(M.moving),1)]),p("td",n8e,[p("span",r8e,T(b.$t("workouts.AVE_SPEED")),1),M.ave_speed!==null?(A(),te(P,{key:0,distance:M.ave_speed,unitFrom:"km",speed:!0,useImperialUnits:h(s).imperial_units},null,8,["distance","useImperialUnits"])):x("",!0)]),p("td",a8e,[p("span",s8e,T(b.$t("workouts.MAX_SPEED")),1),M.max_speed!==null?(A(),te(P,{key:0,distance:M.max_speed,unitFrom:"km",speed:!0,useImperialUnits:h(s).imperial_units},null,8,["distance","useImperialUnits"])):x("",!0)]),p("td",i8e,[p("span",o8e,T(b.$t("workouts.ASCENT")),1),M.ascent!==null?(A(),te(P,{key:0,distance:M.ascent,unitFrom:"m",useImperialUnits:h(s).imperial_units},null,8,["distance","useImperialUnits"])):x("",!0)]),p("td",u8e,[p("span",c8e,T(b.$t("workouts.DESCENT")),1),M.descent!==null?(A(),te(P,{key:0,distance:M.descent,unitFrom:"m",useImperialUnits:h(s).imperial_units},null,8,["distance","useImperialUnits"])):x("",!0)])]))),128))])]),k($u,{pagination:l.value,path:"/workouts",query:h(f)},null,8,["pagination","query"])])):x("",!0)],2),u.value.length===0?(A(),te(p0,{key:0})):x("",!0),l8e])}}}),f8e=re(d8e,[["__scopeId","data-v-bb980a00"]]),p8e={key:0,id:"workouts",class:"view"},m8e={class:"container workouts-container"},E8e={class:"display-filters"},h8e={class:"list-container"},_8e=Z({__name:"WorkoutsView",setup(e){const{t}=Yt(),n=Me(),r=$(()=>n.getters[K.GETTERS.AUTH_USER_PROFILE]),a=$(()=>n.getters[Mt.GETTERS.SPORTS]),s=$(()=>Xr(a.value,t)),i=le(!0);function o(){i.value=!i.value}return(u,l)=>r.value.username?(A(),N("div",p8e,[p("div",m8e,[p("div",{class:Se(["filters-container",{hidden:i.value}])},[k(MLe,{sports:s.value,authUser:r.value,onFilter:o},null,8,["sports","authUser"])],2),p("div",E8e,[p("div",{onClick:o},[p("i",{class:Se(`fa fa-caret-${i.value?"down":"up"}`),"aria-hidden":"true"},null,2),p("span",null,T(u.$t(`workouts.${i.value?"DISPLAY":"HIDE"}_FILTERS`)),1)])]),p("div",h8e,[k(f8e,{user:r.value,sports:s.value},null,8,["user","sports"])])])])):x("",!0)}}),T8e=re(_8e,[["__scopeId","data-v-3fa59b88"]]),{t:Ah}=_a.global,Sh=e=>{const t=/(\/profile)(\/edit)*(\/*)/,n=e.replace(t,"").toUpperCase();return n===""?"PROFILE":n.toUpperCase()},g8e=[{path:"/",name:"Dashboard",component:gye,meta:{title:"dashboard.DASHBOARD"}},{path:"/login",name:"Login",component:ch,props:{action:"login"},meta:{title:"user.LOGIN",withoutAuth:!0}},{path:"/register",name:"Register",component:ch,props:{action:"register"},meta:{title:"user.REGISTER",withoutAuth:!0}},{path:"/account-confirmation",name:"AccountConfirmation",component:P4e,meta:{title:"user.ACCOUNT_CONFIRMATION",withoutAuth:!0}},{path:"/account-confirmation/resend",name:"AccountConfirmationResend",component:uh,props:{action:"account-confirmation-resend"},meta:{title:"buttons.ACCOUNT-CONFIRMATION-RESEND",withoutAuth:!0}},{path:"/account-confirmation/email-sent",name:"AccountConfirmationEmailSend",component:uh,props:{action:"email-sent"},meta:{title:"buttons.ACCOUNT-CONFIRMATION-RESEND",withoutAuth:!0}},{path:"/password-reset/sent",name:"PasswordEmailSent",component:co,props:{action:"request-sent"},meta:{title:"user.PASSWORD_RESET",withoutAuth:!0}},{path:"/password-reset/request",name:"PasswordResetRequest",component:co,props:{action:"reset-request"},meta:{title:"user.PASSWORD_RESET",withoutAuth:!0}},{path:"/password-reset/password-updated",name:"PasswordUpdated",component:co,props:{action:"password-updated"},meta:{title:"user.PASSWORD_RESET",withoutAuth:!0}},{path:"/password-reset",name:"PasswordReset",component:co,props:{action:"reset"},meta:{title:"user.PASSWORD_RESET",withoutAuth:!0}},{path:"/email-update",name:"EmailUpdate",component:k4e,meta:{title:"user.EMAIL_UPDATE",withoutChecks:!0}},{path:"/profile",name:"Profile",component:uDe,children:[{path:"",name:"UserProfile",component:NSe,props:e=>({tab:Sh(e.path)}),children:[{path:"",name:"UserInfos",component:sA,meta:{title:"user.PROFILE.TABS.PROFILE"}},{path:"preferences",name:"UserPreferences",component:qSe,meta:{title:"user.PROFILE.TABS.PREFERENCES"}},{path:"sports",name:"UserSportPreferences",component:JE,props:{isEdition:!1},meta:{title:"user.PROFILE.TABS.SPORTS"}},{path:"apps",name:"UserApps",component:JRe,children:[{path:"",name:"UserAppsList",component:gbe,meta:{title:"user.PROFILE.TABS.APPS"}},{path:":id",name:"UserApp",component:QE,meta:{title:"user.PROFILE.TABS.APPS"}},{path:":id/created",name:"CreatedUserApp",component:QE,props:{afterCreation:!0},meta:{title:"user.PROFILE.TABS.APPS"}},{path:"new",name:"AddUserApp",component:WRe,meta:{title:"user.PROFILE.TABS.APPS"}},{path:"authorize",name:"AuthorizeUserApp",component:ZRe,meta:{title:"user.PROFILE.TABS.APPS"}}]}]},{path:"edit",name:"UserProfileEdition",component:ZSe,props:e=>({tab:Sh(e.path)}),children:[{path:"",name:"UserInfosEdition",component:q2e,meta:{title:"user.PROFILE.EDIT"}},{path:"account",name:"UserAccountEdition",component:L2e,meta:{title:"user.PROFILE.ACCOUNT_EDITION"}},{path:"picture",name:"UserPictureEdition",component:sve,meta:{title:"user.PROFILE.PICTURE_EDITION"}},{path:"preferences",name:"UserPreferencesEdition",component:rRe,meta:{title:"user.PROFILE.EDIT_PREFERENCES"}},{path:"sports",name:"UserSportPreferencesEdition",component:JE,props:{isEdition:!0},meta:{title:"user.PROFILE.EDIT_SPORTS_PREFERENCES"}},{path:"privacy-policy",name:"UserPrivacyPolicy",component:_Re,meta:{title:"user.PROFILE.PRIVACY-POLICY_EDITION"}}]}]},{path:"/statistics",name:"Statistics",component:qye,meta:{title:"statistics.STATISTICS"}},{path:"/users/:username",name:"User",component:lh,meta:{title:"administration.USER"}},{path:"/workouts",name:"Workouts",component:T8e,meta:{title:"workouts.WORKOUT",count:0}},{path:"/workouts/:workoutId",name:"Workout",component:gh,props:{displaySegment:!1},meta:{title:"workouts.WORKOUT"}},{path:"/workouts/:workoutId/edit",name:"EditWorkout",component:nPe,meta:{title:"workouts.EDIT_WORKOUT"}},{path:"/workouts/:workoutId/segment/:segmentId",name:"WorkoutSegment",component:gh,props:{displaySegment:!0},meta:{title:"workouts.SEGMENT",count:0}},{path:"/workouts/add",name:"AddWorkout",component:JDe,meta:{title:"workouts.ADD_WORKOUT"}},{path:"/admin",name:"Administration",component:PNe,children:[{path:"",name:"AdministrationMenu",component:gge,meta:{title:"admin.ADMINISTRATION"}},{path:"application",name:"ApplicationAdministration",component:CE,meta:{title:"admin.APP_CONFIG.TITLE"}},{path:"application/edit",name:"ApplicationAdministrationEdition",component:CE,props:{edition:!0},meta:{title:"admin.APPLICATION"}},{path:"sports",name:"SportsAdministration",component:zge,meta:{title:"admin.SPORTS.TITLE"}},{path:"users/:username",name:"UserFromAdmin",component:lh,props:{fromAdmin:!0},meta:{title:"admin.USER",count:1}},{path:"users",name:"UsersAdministration",component:iSe,meta:{title:"admin.USERS.TITLE"}}]},{path:"/about",name:"About",component:SNe,meta:{title:"common.ABOUT",withoutChecks:!0}},{path:"/privacy-policy",name:"PrivacyPolicy",component:Rye,meta:{title:"privacy_policy.TITLE",withoutChecks:!0}},{path:"/:pathMatch(.*)*",name:"not-found",component:Sye,meta:{title:"error.NOT_FOUND.PAGE"}}],nS=X0e({history:f0e("/"),routes:g8e});nS.beforeEach((e,t,n)=>{if("title"in e.meta){const r=typeof e.meta.title=="string"?e.meta.title:"",a=r?typeof e.meta.count=="number"?Ah(r,+e.meta.count):Ah(r):"";window.document.title=`FitTrackee${r?` - ${Rt(a)}`:""}`}Bs.dispatch(K.ACTIONS.CHECK_AUTH_USER).then(()=>{if(e.meta.withoutChecks)return n();if(Bs.getters[K.GETTERS.IS_AUTHENTICATED]&&e.meta.withoutAuth)return n("/");if(!Bs.getters[K.GETTERS.IS_AUTHENTICATED]&&!e.meta.withoutAuth){const r=e.path==="/"?{path:"/login"}:{path:"/login",query:{from:e.fullPath}};n(r)}else n()}).catch(r=>{console.error(r),n()})});const vt=nS;Md.register(aS,sS,iS,oS,uS,cS,lS,Oh,dS,Ih,fS,pS);const rS=kI(Dfe).provide("sportColors",a0).use(_a).use(Bs).use(vt).use(Sv,{name:"VFullscreen"}).directive("click-outside",REe);vEe.forEach(e=>{rS.component(e.name,e.target)});rS.mount("#app"); function __vite__mapDeps(indexes) { if (!__vite__mapDeps.viteFileDeps) { __vite__mapDeps.viteFileDeps = ["static/maps-ZyuCPqes.js","static/css/maps-B7qTrBCW.css"]