(()=>{"use strict";var e={607:(e,t,n)=>{n.d(t,{A:()=>c});var s=n(889),o=n.n(s),r=n(786),i=n.n(r)()(o());i.push([e.id,"#wgWidgetScreen{height:100%}.wg-wrapper[data-v-1715325d]{font-family:var(--027a15d2);height:100%}",""]);const c=i},236:(e,t,n)=>{n.d(t,{A:()=>c});var s=n(889),o=n.n(s),r=n(786),i=n.n(r)()(o());i.push([e.id,".wg-loader-p[data-v-3a168de6]{background:var(--ac1a6266);border-bottom:1px solid var(--d5b65788)}",""]);const c=i},437:(e,t,n)=>{n.d(t,{A:()=>c});var s=n(889),o=n.n(s),r=n(786),i=n.n(r)()(o());i.push([e.id,"#wgWidgetScreen .wg-widget-container[data-v-71ede5d7]{padding:8px;display:flex;flex-direction:column}#wgWidgetScreen .wg-widget-container .wgwidget-game__info[data-v-71ede5d7]{display:flex;flex-direction:row}",""]);const c=i},21:(e,t,n)=>{n.d(t,{A:()=>c});var s=n(889),o=n.n(s),r=n(786),i=n.n(r)()(o());i.push([e.id,"#wgWidgetScreen .wg-widget-command[data-v-d0329ce8]{display:flex;justify-content:center;flex-direction:column;align-items:center;margin:auto}#wgWidgetScreen .wg-widget-command__icon[data-v-d0329ce8]{width:60px;height:60px}#wgWidgetScreen .wg-widget-command__name[data-v-d0329ce8]{margin-top:4px;color:var(--48c6238d);font-size:var(--6a023ba8);font-weight:var(--59dd104d);line-height:16px}",""]);const c=i},465:(e,t,n)=>{n.d(t,{A:()=>c});var s=n(889),o=n.n(s),r=n(786),i=n.n(r)()(o());i.push([e.id,"#wgWidgetScreen .wg-widget-placeholder[data-v-ab37b148]{display:flex;flex-direction:row;align-items:center;border-radius:2px;padding:4px 8px;background-color:var(--7125f0f9);font-size:var(--f53d7b10);font-weight:var(--2f75ccf9);color:var(--6ae5934f);margin:8px 0}#wgWidgetScreen .wg-widget-placeholder__icon[data-v-ab37b148]{margin-right:4px}",""]);const c=i},783:(e,t,n)=>{n.d(t,{A:()=>c});var s=n(889),o=n.n(s),r=n(786),i=n.n(r)()(o());i.push([e.id,"#wgWidgetScreen .wg-widget-score[data-v-1780b0c2]{margin:0 16px;display:flex;justify-content:center;align-items:center;flex-direction:column}#wgWidgetScreen .wg-widget-score .wg-score[data-v-1780b0c2]{color:var(--462d4044);font-size:var(--7361240c);font-weight:var(--6643421c)}#wgWidgetScreen .wg-widget-score .wg-score .wg-green[data-v-1780b0c2]{color:var(--cb42d28a)}#wgWidgetScreen .wg-widget-score .wg-score .wg-up-score[data-v-1780b0c2]{color:var(--323e0e49)}#wgWidgetScreen .wg-widget-score .wg-score .wg-down-score[data-v-1780b0c2]{color:var(--7f31873a)}#wgWidgetScreen .wg-widget-score .wg-score .wg-score__divider[data-v-1780b0c2]{margin:0 8px}#wgWidgetScreen .wg-widget-score .wg-status[data-v-1780b0c2]{background:var(--98b34ad4);color:var(--7f31873a);padding:0 8px;border-radius:8px;width:fit-content;margin:auto;font-size:var(--108e9c55);font-weight:var(--09f3aebc)}#wgWidgetScreen .wg-widget-score .wg-live[data-v-1780b0c2]{color:var(--323e0e49)}#wgWidgetScreen .wg-widget-score .wg-pen-score[data-v-1780b0c2]{color:var(--e3d9fbdc);font-size:var(--108e9c55);font-weight:var(--09f3aebc)}",""]);const c=i},449:(e,t,n)=>{n.d(t,{A:()=>c});var s=n(889),o=n.n(s),r=n(786),i=n.n(r)()(o());i.push([e.id,"#wgWidgetScreen .wg-widget-title[data-v-559a7950]{color:var(--66e33070);font-size:var(--5b7fdb8b);font-weight:var(--1d2a5646)}",""]);const c=i},786:e=>{e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n="",s=void 0!==t[5];return t[4]&&(n+="@supports (".concat(t[4],") {")),t[2]&&(n+="@media ".concat(t[2]," {")),s&&(n+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),n+=e(t),s&&(n+="}"),t[2]&&(n+="}"),t[4]&&(n+="}"),n})).join("")},t.i=function(e,n,s,o,r){"string"==typeof e&&(e=[[null,e,void 0]]);var i={};if(s)for(var c=0;c0?" ".concat(u[5]):""," {").concat(u[1],"}")),u[5]=r),n&&(u[2]?(u[1]="@media ".concat(u[2]," {").concat(u[1],"}"),u[2]=n):u[2]=n),o&&(u[4]?(u[1]="@supports (".concat(u[4],") {").concat(u[1],"}"),u[4]=o):u[4]="".concat(o)),t.push(u))}},t}},889:e=>{e.exports=function(e){return e[1]}},374:(e,t)=>{t.A=(e,t)=>{const n=e.__vccOpts||e;for(const[e,s]of t)n[e]=s;return n}},72:e=>{var t=[];function n(e){for(var n=-1,s=0;s{var t={};e.exports=function(e,n){var s=function(e){if(void 0===t[e]){var n=document.querySelector(e);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}t[e]=n}return t[e]}(e);if(!s)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");s.appendChild(n)}},540:e=>{e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}},56:(e,t,n)=>{e.exports=function(e){var t=n.nc;t&&e.setAttribute("nonce",t)}},825:e=>{e.exports=function(e){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var t=e.insertStyleElement(e);return{update:function(n){!function(e,t,n){var s="";n.supports&&(s+="@supports (".concat(n.supports,") {")),n.media&&(s+="@media ".concat(n.media," {"));var o=void 0!==n.layer;o&&(s+="@layer".concat(n.layer.length>0?" ".concat(n.layer):""," {")),s+=n.css,o&&(s+="}"),n.media&&(s+="}"),n.supports&&(s+="}");var r=n.sourceMap;r&&"undefined"!=typeof btoa&&(s+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(r))))," */")),t.styleTagTransform(s,e,t.options)}(t,e,n)},remove:function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(t)}}}},113:e=>{e.exports=function(e,t){if(t.styleSheet)t.styleSheet.cssText=e;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(e))}}}},t={};function n(s){var o=t[s];if(void 0!==o)return o.exports;var r=t[s]={id:s,exports:{}};return e[s](r,r.exports,n),r.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var s in t)n.o(t,s)&&!n.o(e,s)&&Object.defineProperty(e,s,{enumerable:!0,get:t[s]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.nc=void 0;var s={};n.r(s),n.d(s,{colors:()=>u,fonts:()=>l,state:()=>d});const o="football",r="sport:"+o,i={en:["Finished","Half time","Postponed","Cancelled","Results only","Live","Finished (OT)","Finished (P)","Awarded","Extra HT","Penalties","Pause","Break time","Q1","Q2","Q3","Q4","OT"],fr:["Finis","Mi-temps","Reporté","Annulé","Résultats uniquement","En ligne","Terminé (Prol.)","Terminé (P)","Récompensé","HT supplémentaire","Pénalités","Pause","Temps de pause","Q1","Q2","Q3","Q4","Prol."],pt:["Completado","Meia hora","Adiado","Cancelado","Apenas resultados","Ao vivo","Finalizado (TE)","Finalizado (P)","Atribuído","Intervalo extra","Penalidades","Pausa","Tempo de intervalo","Q1","Q2","Q3","Q4","TE"],de:["Beendet","Halbzeit","Verschoben","Annulliert","Nur Ergebnisse","Live","Beendet (Verl.)","Beendet (P)","Ausgezeichnet","Zusätzliche HT","Strafstöße","Pause","Pausezeit","Q1","Q2","Q3","Q4","Verl."],id:["Selesai","Setengah waktu","Ditunda","Dibatalkan","Hanya hasil","Langsung","Selesai (WT)","Selesai (P)","Diberikan","HT tambahan","Penalti","Berhenti sebentar","Waktu istirahat","Q1","Q2","Q3","Q4","WT"],it:["Finito","Metà tempo","posticipato","Annullato","Solo risultati","Dal vivo","Finito (Suppl.)","Finito (P)","Premiato","HT extra","Rigori","Pausa","Tempo di pausa","Q1","Q2","Q3","Q4","Suppl."],ko:["완성 된","하프 타임","연기","취소 된","결과만","생중계","종료 (연장)","종료 (P)","수상","추가 HT","페널티","중지","휴식 시간","Q1","Q2","Q3","Q4","연장"],pl:["Zakończone","Połowa czasu","Odłożony","Odwołany","Tylko wyniki","Na żywo","Zakończony (Dogr.)","Zakończony (P)","Wyróżniony","Dodatkowa HT","Karne","Przerwa","Czas przerwy","Q1","Q2","Q3","Q4","Dogr."],ru:["Завершен","Половина времени","Перенесен","Отменен","Только результаты","В прямом эфире","Завершен (ОТ)","Завершен (П)","Награжден","Дополнительный перерыв","Пенальти","Пауза","Перерыв","Q1","Q2","Q3","Q4","ОТ"],es:["Completado","Medio tiempo","Aplazado","Cancelado","Solo resultados","En vivo","Terminado (Prorr.)","Terminado (P)","Concedido","Descanso extra","Penaltis","Pausa","Tiempo de descanso","Q1","Q2","Q3","Q4","Prorr."],th:["ที่เสร็จเรียบร้อย","ครึ่งแรก","เลื่อนออกไป","ยกเลิก","เฉพาะผลลัพธ์","ถ่ายทอดสด","สิ้นสุด (ต่อเวลา)","สิ้นสุด (P)","ได้รับรางวัล","พักเพิ่มเติม HT","จุดโทษ","หยุด","เวลาพัก","Q1","Q2","Q3","Q4","ต่อเวลา"],tr:["Bitmiş","Yarıya","Ertelenen","İptal edildi","Sadece sonuçlar","Canlı","Bitmiş (Uz.)","Bitmiş (P)","Layık görülmek","Ekstra HT","Penaltılar","Duraklat","Mola zamanı","Q1","Q2","Q3","Q4","Uz."],uk:["Завершено","Половина часу","Перенесений","Скасований","Тільки результати","Наживо","Закінчено (ДЧ)","Закінчено (П)","Нагороджений","Додатковиа перерва","Пенальті","Пауза","Перерва","Q1","Q2","Q3","Q4","ДЧ"],vi:["Hoàn thành","Nửa thời gian","Hoãn lại","Đã hủy","Chỉ kết quả","Trực tiếp","Hoàn thành (PG)","Hoàn thành (P)","Trao giải thưởng","Nghỉ giữa hiệp phụ","Phạt đền","Tạm ngừng","Thời gian nghỉ","Q1","Q2","Q3","Q4","PG"],nl:["Afgelopen","Rust","Uitgesteld","Geannuleerd","Alleen resultaten","Live","Afgerond (Verl.)","Afgerond (P)","Toegekend","Extra HT","Strafschoppen","Pauze","Pauzetijd","Q1","Q2","Q3","Q4","Verl."],ro:["Terminat","Jumătate de timp","Amânat","Anulat","Doar rezultate","Live","Finalizat (Prel.)","Finalizat (P)","Acordat","HT suplimentar","Penalități","Pauză","Timp de pauză","Q1","Q2","Q3","Q4","Prel."],ka:["დასრულდა","Ნახევარი დრო","გადაიდო","გაუქმებულია","მხოლოდ შედეგები","პირდაპირი","დასრულდა (დრო გაგრძ.)","დასრულდა (P)","Დაჯილდოებული","დამატებითი HT","პენალტები","პაუზა","შესვენების დრო","Q1","Q2","Q3","Q4","დრო გაგრძ."],hy:["Ավարտվեց","Կես ժամ","Հետաձգվել է","Չեղյալ է հայտարարվել","Միայն արդյունքները","Ուղիղ","Ավարտված է (Հավ. ժամ.)","Ավարտված է (P)","Պարգևատրվել է","Ավելին HT","Պենալտիներ","Դադար","Դադարի ժամանակ","Q1","Q2","Q3","Q4","Հավ. ժամ."],az:["Başa çatdı","Yarım vaxt","Təxirə salındı","Lağv edildi","Yalnız nəticələr","Canlı","Bitdi (Uzatma)","Bitdi (P)","Mükafatlandırıldı","Əlavə HT","Penalti","Fasilə","Fasilə vaxtı","Q1","Q2","Q3","Q4","Uzatma"],el:["Ολοκληρώθηκε","Ημίχρονο","Αναβλήθηκε","Ακυρώθηκε","Μόνο αποτελέσματα","Ζωντανά","Ολοκληρώθηκε (Παρ.)","Ολοκληρώθηκε (P)","Βραβευμένο","Επιπλέον HT","Πέναλτι","Παύση","Διάλειμμα","Q1","Q2","Q3","Q4","Παρ."],uz:["Bajarildi","Yarim vaqt","Kechiktirildi","Bekor qilindi","Faqat natijalar","Jonli","Tugadi (Uzv.)","Tugadi (P)","Mukofotlangan","Qo'shimcha HT","Penalti tiplari","Pauza","Tanaffus vaqti","Q1","Q2","Q3","Q4","Uzv."]},c={en:"Information will be available later",fr:"Les informations seront disponibles ultérieurement",pt:"As informações estarão disponíveis posteriormente",de:"Informationen werden zu einem späteren Zeitpunkt verfügbar sein",id:"Informasi akan tersedia kemudian",it:"Le informazioni saranno disponibili in seguito",ko:"정보는 추후 제공될 예정입니다.",pl:"Informacje będą dostępne później",ru:"Информация будет доступна позже",es:"La información estará disponible más adelante",th:"ข้อมูลจะพร้อมใช้งานในภายหลัง",tr:"Bilgi daha sonra sunulacaktır",uk:"Інформація буде доступна пізніше",vi:"Thông tin sẽ có sẵn sau",nl:"Informatie is later beschikbaar",ro:"Informațiile vor fi disponibile ulterior",ka:"ინფორმაცია მოგვიანებით იქნება ხელმისაწვდომი",hy:"Տեղեկատվությունը հասանելի կլինի ավելի ուշ",az:"Məlumat daha sonra mövcud olacaq",el:"Οι πληροφορίες θα είναι διαθέσιμες αργότερα",uz:"Ma'lumot keyinchalik beriladi"},a={en:["At the moment there are no Live matches and there are no scheduled matches for the next 2 days.","At the moment there are no Live matches, the closest match is"],de:["At the moment there are no Live matches and there are no scheduled matches for the next 2 days.","At the moment there are no Live matches, the closest match is"],pt:["At the moment there are no Live matches and there are no scheduled matches for the next 2 days.","At the moment there are no Live matches, the closest match is"],id:["At the moment there are no Live matches and there are no scheduled matches for the next 2 days.","At the moment there are no Live matches, the closest match is"],it:["At the moment there are no Live matches and there are no scheduled matches for the next 2 days.","At the moment there are no Live matches, the closest match is"],ko:["At the moment there are no Live matches and there are no scheduled matches for the next 2 days.","At the moment there are no Live matches, the closest match is"],pl:["At the moment there are no Live matches and there are no scheduled matches for the next 2 days.","At the moment there are no Live matches, the closest match is"],ru:["At the moment there are no Live matches and there are no scheduled matches for the next 2 days.","At the moment there are no Live matches, the closest match is"],es:["At the moment there are no Live matches and there are no scheduled matches for the next 2 days.","At the moment there are no Live matches, the closest match is"],th:["At the moment there are no Live matches and there are no scheduled matches for the next 2 days.","At the moment there are no Live matches, the closest match is"],tr:["At the moment there are no Live matches and there are no scheduled matches for the next 2 days.","At the moment there are no Live matches, the closest match is"],uk:["At the moment there are no Live matches and there are no scheduled matches for the next 2 days.","At the moment there are no Live matches, the closest match is"],vi:["At the moment there are no Live matches and there are no scheduled matches for the next 2 days.","At the moment there are no Live matches, the closest match is"],nl:["At the moment there are no Live matches and there are no scheduled matches for the next 2 days.","At the moment there are no Live matches, the closest match is"],ro:["At the moment there are no Live matches and there are no scheduled matches for the next 2 days.","At the moment there are no Live matches, the closest match is"],ka:["At the moment there are no Live matches and there are no scheduled matches for the next 2 days.","At the moment there are no Live matches, the closest match is"],hy:["At the moment there are no Live matches and there are no scheduled matches for the next 2 days.","At the moment there are no Live matches, the closest match is"],az:["At the moment there are no Live matches and there are no scheduled matches for the next 2 days.","At the moment there are no Live matches, the closest match is"],el:["At the moment there are no Live matches and there are no scheduled matches for the next 2 days.","At the moment there are no Live matches, the closest match is"],uz:["At the moment there are no Live matches and there are no scheduled matches for the next 2 days.","At the moment there are no Live matches, the closest match is"]},l={main_font:"Roboto",regular:"400",medium500:"500",bold:"600",bold700:"700",small:"10px",medium:"12px",large:"14px",large32:"32px"},u={primary_black:"#212B36",primary_grey:"#8595A5",white_secondary:"#F9FAFB",secondary_grey:"#6A7B8B",green:"#1B883F",red:"#D70C17",lightGray:"#30365B",midnight:"#111936"},d={on:!0,off:!1};function h(e,t){const n=new Set(e.split(","));return t?e=>n.has(e.toLowerCase()):e=>n.has(e)}Object.freeze(l),Object.freeze(u),Object.freeze(d);const p={},f=[],_=()=>{},m=()=>!1,g=e=>111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),b=e=>e.startsWith("onUpdate:"),v=Object.assign,w=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},y=Object.prototype.hasOwnProperty,S=(e,t)=>y.call(e,t),T=Array.isArray,x=e=>"[object Map]"===R(e),C=e=>"[object Set]"===R(e),k=e=>"function"==typeof e,E=e=>"string"==typeof e,P=e=>"symbol"==typeof e,A=e=>null!==e&&"object"==typeof e,L=e=>(A(e)||k(e))&&k(e.then)&&k(e.catch),O=Object.prototype.toString,R=e=>O.call(e),j=e=>R(e).slice(8,-1),I=e=>"[object Object]"===R(e),z=e=>E(e)&&"NaN"!==e&&"-"!==e[0]&&""+parseInt(e,10)===e,M=h(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),F=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},D=/-(\w)/g,U=F((e=>e.replace(D,((e,t)=>t?t.toUpperCase():"")))),Q=/\B([A-Z])/g,N=F((e=>e.replace(Q,"-$1").toLowerCase())),$=F((e=>e.charAt(0).toUpperCase()+e.slice(1))),B=F((e=>e?`on${$(e)}`:"")),W=(e,t)=>!Object.is(e,t),V=(e,...t)=>{for(let n=0;n{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:s,value:n})},q=e=>{const t=parseFloat(e);return isNaN(t)?e:t},J=e=>{const t=E(e)?Number(e):NaN;return isNaN(t)?e:t};let G;const K=()=>G||(G="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==n.g?n.g:{});function Z(e){if(T(e)){const t={};for(let n=0;n{if(e){const n=e.split(X);n.length>1&&(t[n[0].trim()]=n[1].trim())}})),t}function ne(e){let t="";if(E(e))t=e;else if(T(e))for(let n=0;n!(!e||!0!==e.__v_isRef),ie=e=>E(e)?e:null==e?"":T(e)||A(e)&&(e.toString===O||!k(e.toString))?re(e)?ie(e.value):JSON.stringify(e,ce,2):String(e),ce=(e,t)=>re(t)?ce(e,t.value):x(t)?{[`Map(${t.size})`]:[...t.entries()].reduce(((e,[t,n],s)=>(e[ae(t,s)+" =>"]=n,e)),{})}:C(t)?{[`Set(${t.size})`]:[...t.values()].map((e=>ae(e)))}:P(t)?ae(t):!A(t)||T(t)||I(t)?t:String(t),ae=(e,t="")=>{var n;return P(e)?`Symbol(${null!=(n=e.description)?n:t})`:e};let le,ue;class de{constructor(e=!1){this.detached=e,this._active=!0,this.effects=[],this.cleanups=[],this.parent=le,!e&&le&&(this.index=(le.scopes||(le.scopes=[])).push(this)-1)}get active(){return this._active}run(e){if(this._active){const t=le;try{return le=this,e()}finally{le=t}}}on(){le=this}off(){le=this.parent}stop(e){if(this._active){let t,n;for(t=0,n=this.effects.length;t=4))break}1===this._dirtyLevel&&(this._dirtyLevel=0),ye()}return this._dirtyLevel>=4}set dirty(e){this._dirtyLevel=e?4:0}run(){if(this._dirtyLevel=0,!this.active)return this.fn();let e=ge,t=ue;try{return ge=!0,ue=this,this._runnings++,fe(this),this.fn()}finally{_e(this),this._runnings--,ue=t,ge=e}}stop(){this.active&&(fe(this),_e(this),this.onStop&&this.onStop(),this.active=!1)}}function pe(e){return e.value}function fe(e){e._trackId++,e._depsLength=0}function _e(e){if(e.deps.length>e._depsLength){for(let t=e._depsLength;t{const n=new Map;return n.cleanup=e,n.computed=t,n},Pe=new WeakMap,Ae=Symbol(""),Le=Symbol("");function Oe(e,t,n){if(ge&&ue){let t=Pe.get(e);t||Pe.set(e,t=new Map);let s=t.get(n);s||t.set(n,s=Ee((()=>t.delete(n)))),xe(ue,s)}}function Re(e,t,n,s,o,r){const i=Pe.get(e);if(!i)return;let c=[];if("clear"===t)c=[...i.values()];else if("length"===n&&T(e)){const e=Number(s);i.forEach(((t,n)=>{("length"===n||!P(n)&&n>=e)&&c.push(t)}))}else switch(void 0!==n&&c.push(i.get(n)),t){case"add":T(e)?z(n)&&c.push(i.get("length")):(c.push(i.get(Ae)),x(e)&&c.push(i.get(Le)));break;case"delete":T(e)||(c.push(i.get(Ae)),x(e)&&c.push(i.get(Le)));break;case"set":x(e)&&c.push(i.get(Ae))}Se();for(const e of c)e&&ke(e,4);Te()}const je=h("__proto__,__v_isRef,__isVue"),Ie=new Set(Object.getOwnPropertyNames(Symbol).filter((e=>"arguments"!==e&&"caller"!==e)).map((e=>Symbol[e])).filter(P)),ze=Me();function Me(){const e={};return["includes","indexOf","lastIndexOf"].forEach((t=>{e[t]=function(...e){const n=St(this);for(let e=0,t=this.length;e{e[t]=function(...e){we(),Se();const n=St(this)[t].apply(this,e);return Te(),ye(),n}})),e}function Fe(e){P(e)||(e=String(e));const t=St(this);return Oe(t,0,e),t.hasOwnProperty(e)}class De{constructor(e=!1,t=!1){this._isReadonly=e,this._isShallow=t}get(e,t,n){const s=this._isReadonly,o=this._isShallow;if("__v_isReactive"===t)return!s;if("__v_isReadonly"===t)return s;if("__v_isShallow"===t)return o;if("__v_raw"===t)return n===(s?o?ft:pt:o?ht:dt).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(n)?e:void 0;const r=T(e);if(!s){if(r&&S(ze,t))return Reflect.get(ze,t,n);if("hasOwnProperty"===t)return Fe}const i=Reflect.get(e,t,n);return(P(t)?Ie.has(t):je(t))?i:(s||Oe(e,0,t),o?i:Pt(i)?r&&z(t)?i:i.value:A(i)?s?mt(i):_t(i):i)}}class Ue extends De{constructor(e=!1){super(!1,e)}set(e,t,n,s){let o=e[t];if(!this._isShallow){const t=vt(o);if(wt(n)||vt(n)||(o=St(o),n=St(n)),!T(e)&&Pt(o)&&!Pt(n))return!t&&(o.value=n,!0)}const r=T(e)&&z(t)?Number(t)e,Ve=e=>Reflect.getPrototypeOf(e);function He(e,t,n=!1,s=!1){const o=St(e=e.__v_raw),r=St(t);n||(W(t,r)&&Oe(o,0,t),Oe(o,0,r));const{has:i}=Ve(o),c=s?We:n?xt:Tt;return i.call(o,t)?c(e.get(t)):i.call(o,r)?c(e.get(r)):void(e!==o&&e.get(t))}function qe(e,t=!1){const n=this.__v_raw,s=St(n),o=St(e);return t||(W(e,o)&&Oe(s,0,e),Oe(s,0,o)),e===o?n.has(e):n.has(e)||n.has(o)}function Je(e,t=!1){return e=e.__v_raw,!t&&Oe(St(e),0,Ae),Reflect.get(e,"size",e)}function Ge(e,t=!1){t||wt(e)||vt(e)||(e=St(e));const n=St(this);return Ve(n).has.call(n,e)||(n.add(e),Re(n,"add",e,e)),this}function Ke(e,t,n=!1){n||wt(t)||vt(t)||(t=St(t));const s=St(this),{has:o,get:r}=Ve(s);let i=o.call(s,e);i||(e=St(e),i=o.call(s,e));const c=r.call(s,e);return s.set(e,t),i?W(t,c)&&Re(s,"set",e,t):Re(s,"add",e,t),this}function Ze(e){const t=St(this),{has:n,get:s}=Ve(t);let o=n.call(t,e);o||(e=St(e),o=n.call(t,e)),s&&s.call(t,e);const r=t.delete(e);return o&&Re(t,"delete",e,void 0),r}function Ye(){const e=St(this),t=0!==e.size,n=e.clear();return t&&Re(e,"clear",void 0,void 0),n}function Xe(e,t){return function(n,s){const o=this,r=o.__v_raw,i=St(r),c=t?We:e?xt:Tt;return!e&&Oe(i,0,Ae),r.forEach(((e,t)=>n.call(s,c(e),c(t),o)))}}function et(e,t,n){return function(...s){const o=this.__v_raw,r=St(o),i=x(r),c="entries"===e||e===Symbol.iterator&&i,a="keys"===e&&i,l=o[e](...s),u=n?We:t?xt:Tt;return!t&&Oe(r,0,a?Le:Ae),{next(){const{value:e,done:t}=l.next();return t?{value:e,done:t}:{value:c?[u(e[0]),u(e[1])]:u(e),done:t}},[Symbol.iterator](){return this}}}}function tt(e){return function(...t){return"delete"!==e&&("clear"===e?void 0:this)}}function nt(){const e={get(e){return He(this,e)},get size(){return Je(this)},has:qe,add:Ge,set:Ke,delete:Ze,clear:Ye,forEach:Xe(!1,!1)},t={get(e){return He(this,e,!1,!0)},get size(){return Je(this)},has:qe,add(e){return Ge.call(this,e,!0)},set(e,t){return Ke.call(this,e,t,!0)},delete:Ze,clear:Ye,forEach:Xe(!1,!0)},n={get(e){return He(this,e,!0)},get size(){return Je(this,!0)},has(e){return qe.call(this,e,!0)},add:tt("add"),set:tt("set"),delete:tt("delete"),clear:tt("clear"),forEach:Xe(!0,!1)},s={get(e){return He(this,e,!0,!0)},get size(){return Je(this,!0)},has(e){return qe.call(this,e,!0)},add:tt("add"),set:tt("set"),delete:tt("delete"),clear:tt("clear"),forEach:Xe(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach((o=>{e[o]=et(o,!1,!1),n[o]=et(o,!0,!1),t[o]=et(o,!1,!0),s[o]=et(o,!0,!0)})),[e,n,t,s]}const[st,ot,rt,it]=nt();function ct(e,t){const n=t?e?it:rt:e?ot:st;return(t,s,o)=>"__v_isReactive"===s?!e:"__v_isReadonly"===s?e:"__v_raw"===s?t:Reflect.get(S(n,s)&&s in t?n:t,s,o)}const at={get:ct(!1,!1)},lt={get:ct(!1,!0)},ut={get:ct(!0,!1)},dt=new WeakMap,ht=new WeakMap,pt=new WeakMap,ft=new WeakMap;function _t(e){return vt(e)?e:gt(e,!1,Ne,at,dt)}function mt(e){return gt(e,!0,$e,ut,pt)}function gt(e,t,n,s,o){if(!A(e))return e;if(e.__v_raw&&(!t||!e.__v_isReactive))return e;const r=o.get(e);if(r)return r;const i=(c=e).__v_skip||!Object.isExtensible(c)?0:function(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}(j(c));var c;if(0===i)return e;const a=new Proxy(e,2===i?s:n);return o.set(e,a),a}function bt(e){return vt(e)?bt(e.__v_raw):!(!e||!e.__v_isReactive)}function vt(e){return!(!e||!e.__v_isReadonly)}function wt(e){return!(!e||!e.__v_isShallow)}function yt(e){return!!e&&!!e.__v_raw}function St(e){const t=e&&e.__v_raw;return t?St(t):e}const Tt=e=>A(e)?_t(e):e,xt=e=>A(e)?mt(e):e;class Ct{constructor(e,t,n,s){this.getter=e,this._setter=t,this.dep=void 0,this.__v_isRef=!0,this.__v_isReadonly=!1,this.effect=new he((()=>e(this._value)),(()=>Et(this,2===this.effect._dirtyLevel?2:3))),this.effect.computed=this,this.effect.active=this._cacheable=!s,this.__v_isReadonly=n}get value(){const e=St(this);return e._cacheable&&!e.effect.dirty||!W(e._value,e._value=e.effect.run())||Et(e,4),kt(e),e.effect._dirtyLevel>=2&&Et(e,2),e._value}set value(e){this._setter(e)}get _dirty(){return this.effect.dirty}set _dirty(e){this.effect.dirty=e}}function kt(e){var t;ge&&ue&&(e=St(e),xe(ue,null!=(t=e.dep)?t:e.dep=Ee((()=>e.dep=void 0),e instanceof Ct?e:void 0)))}function Et(e,t=4,n,s){const o=(e=St(e)).dep;o&&ke(o,t)}function Pt(e){return!(!e||!0!==e.__v_isRef)}function At(e){return n=!1,Pt(t=e)?t:new Lt(t,n);var t,n}class Lt{constructor(e,t){this.__v_isShallow=t,this.dep=void 0,this.__v_isRef=!0,this._rawValue=t?e:St(e),this._value=t?e:Tt(e)}get value(){return kt(this),this._value}set value(e){const t=this.__v_isShallow||wt(e)||vt(e);e=t?e:St(e),W(e,this._rawValue)&&(this._rawValue,this._rawValue=e,this._value=t?e:Tt(e),Et(this,4))}}function Ot(e){return Pt(e)?e.value:e}const Rt={get:(e,t,n)=>Ot(Reflect.get(e,t,n)),set:(e,t,n,s)=>{const o=e[t];return Pt(o)&&!Pt(n)?(o.value=n,!0):Reflect.set(e,t,n,s)}};function jt(e){return bt(e)?e:new Proxy(e,Rt)}class It{constructor(e,t,n){this._object=e,this._key=t,this._defaultValue=n,this.__v_isRef=!0}get value(){const e=this._object[this._key];return void 0===e?this._defaultValue:e}set value(e){this._object[this._key]=e}get dep(){return function(e,t){const n=Pe.get(e);return n&&n.get(t)}(St(this._object),this._key)}}class zt{constructor(e){this._getter=e,this.__v_isRef=!0,this.__v_isReadonly=!0}get value(){return this._getter()}}function Mt(e,t,n){return Pt(e)?e:k(e)?new zt(e):A(e)&&arguments.length>1?function(e,t,n){const s=e[t];return Pt(s)?s:new It(e,t,n)}(e,t,n):At(e)}const Ft="plan",Dt="live",Ut="results_only",Qt="cancelled",Nt="postponed",$t="finished",Bt="finished_overtime",Wt="finished_penalty",Vt="finished_technical_defeat",Ht="halftime",qt="pause",Jt="1st_quarter",Gt="2nd_quarter",Kt="3rd_quarter",Zt="4th_quarter",Yt="overtime",Xt="break_time",en="extra_time_halftime",tn="penalties",nn=[Dt,Ut,Ht,qt,Jt,Gt,Kt,Zt,Yt,Xt,en,tn],sn=[Dt,Ht,qt,Jt,Gt,Kt,Zt,Yt,Xt,en,tn],on=[Ft,Dt,Qt,Nt,$t,Bt,Wt,Vt,Ut,Ht,qt,Jt,Gt,Kt,Zt,Xt,Yt,en,tn];function rn(e,t){const n=e=>e&&"object"==typeof e,s=JSON.parse(JSON.stringify(e));return Object.keys(e).forEach((e=>{const o=s[e],r=t[e];n(o)&&n(r)?s[e]=rn(o,r):s[e]=r??s[e]})),s}const cn=e=>e<10?"0"+e:e,an=e=>cn(e.getHours())+":"+cn(e.getMinutes()),ln=_t({matches:{},loading:At(!0)}),un=async()=>{const e=["live","today","tomorrow"];let t=null;for(let n in e)if(hn.initData={period:e[n]},t=await hn.socketEmit(hn.rpcSport,hn.initData),t&&t.length)break;(e=>{if(!e)return void console.log("Data is empty...");console.log("data received. period:"+hn.initData.period);const t=(e=>{hn.debug&&console.log("data:",e);const t={};return e.forEach((e=>{const n=new Date(1e3*e.date),s=on.includes(e.stage)?e.stage:console.log("unknown stages for item:",e)??e.stage,o={...rn({slug:"?",matchTime:null,home:{img:null,abbr:null,name:"?",periods:null,score:null},away:{img:null,abbr:null,name:"?",periods:null,score:null}},e),league:rn({slug:"?",name:"?",country:"?",img:null},e.league),date:(r=n,cn(r.getDate())+"/"+cn(r.getMonth()+1)+"/"+cn(r.getFullYear())),time:an(n),stage:s,live:nn.includes(s),details:{loading:!1,show:!1,events:{body:{}}}};var r;o.home.abbr=o.home.abbr||o.home.name.substr(0,3).toUpperCase(),o.away.abbr=o.away.abbr||o.away.name.substr(0,3).toUpperCase(),t[o.slug]=o})),t})(e);ln.matches=t,ln.loading=At(!1)})(t)};let dn=null;const hn={debug:!1,mainId:"wgWidgetScreen",matchSlug:null,socket:null,sub:null,sport:null,rpcSport:null,rpcSportDetail:null,initData:null,lang:"en",empty:"",widgetMes:[],style:s,resetAutoUpdate:()=>{dn&&clearTimeout(dn),dn=setTimeout((()=>{console.log("auto update match by timeout"),un()}),6e5)},getFullMatch:()=>un(),async socketEmit(...e){let t=3,n=null;const s=async()=>{try{n=await this.socket.rpc(e[0],{lang:this.lang,...e[1]})}catch(e){console.log(e),t&&(t--,await s())}};return await s(),n?.data??[]}};function pn(e,t,n,s){try{return s?e(...s):e()}catch(e){_n(e,t,n)}}function fn(e,t,n,s){if(k(e)){const o=pn(e,t,n,s);return o&&L(o)&&o.catch((e=>{_n(e,t,n)})),o}if(T(e)){const o=[];for(let r=0;r>>1,o=bn[s],r=Ln(o);rLn(e)-Ln(t)));if(wn.length=0,yn)return void yn.push(...e);for(yn=e,Sn=0;Snnull==e.id?1/0:e.id,On=(e,t)=>{const n=Ln(e)-Ln(t);if(0===n){if(e.pre&&!t.pre)return-1;if(t.pre&&!e.pre)return 1}return n};function Rn(e){gn=!1,mn=!0,bn.sort(On);try{for(vn=0;vn{const t=e.subTree;return t.component?Bn(t.component):t},Wn={name:"BaseTransition",props:$n,setup(e,{slots:t}){const n=or(),s=function(){const e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return cs((()=>{e.isMounted=!0})),us((()=>{e.isUnmounting=!0})),e}();return()=>{const o=t.default&&Zn(t.default(),!0);if(!o||!o.length)return;let r=o[0];if(o.length>1){let e=!1;for(const t of o)if(t.type!==Ro){r=t,e=!0;break}}const i=St(e),{mode:c}=i;if(s.isLeaving)return Jn(r);const a=Gn(r);if(!a)return Jn(r);let l=qn(a,i,s,n,(e=>l=e));Kn(a,l);const u=n.subTree,d=u&&Gn(u);if(d&&d.type!==Ro&&!Bo(a,d)&&Bn(n).type!==Ro){const e=qn(d,i,s,n);if(Kn(d,e),"out-in"===c&&a.type!==Ro)return s.isLeaving=!0,e.afterLeave=()=>{s.isLeaving=!1,!1!==n.update.active&&(n.effect.dirty=!0,n.update())},Jn(r);"in-out"===c&&a.type!==Ro&&(e.delayLeave=(e,t,n)=>{Hn(s,d)[String(d.key)]=d,e[Un]=()=>{t(),e[Un]=void 0,delete l.delayedLeave},l.delayedLeave=n})}return r}}},Vn=Wn;function Hn(e,t){const{leavingVNodes:n}=e;let s=n.get(t.type);return s||(s=Object.create(null),n.set(t.type,s)),s}function qn(e,t,n,s,o){const{appear:r,mode:i,persisted:c=!1,onBeforeEnter:a,onEnter:l,onAfterEnter:u,onEnterCancelled:d,onBeforeLeave:h,onLeave:p,onAfterLeave:f,onLeaveCancelled:_,onBeforeAppear:m,onAppear:g,onAfterAppear:b,onAppearCancelled:v}=t,w=String(e.key),y=Hn(n,e),S=(e,t)=>{e&&fn(e,s,9,t)},x=(e,t)=>{const n=t[1];S(e,t),T(e)?e.every((e=>e.length<=1))&&n():e.length<=1&&n()},C={mode:i,persisted:c,beforeEnter(t){let s=a;if(!n.isMounted){if(!r)return;s=m||a}t[Un]&&t[Un](!0);const o=y[w];o&&Bo(e,o)&&o.el[Un]&&o.el[Un](),S(s,[t])},enter(e){let t=l,s=u,o=d;if(!n.isMounted){if(!r)return;t=g||l,s=b||u,o=v||d}let i=!1;const c=e[Qn]=t=>{i||(i=!0,S(t?o:s,[e]),C.delayedLeave&&C.delayedLeave(),e[Qn]=void 0)};t?x(t,[e,c]):c()},leave(t,s){const o=String(e.key);if(t[Qn]&&t[Qn](!0),n.isUnmounting)return s();S(h,[t]);let r=!1;const i=t[Un]=n=>{r||(r=!0,s(),S(n?_:f,[t]),t[Un]=void 0,y[o]===e&&delete y[o])};y[o]=e,p?x(p,[t,i]):i()},clone(e){const r=qn(e,t,n,s,o);return o&&o(r),r}};return C}function Jn(e){if(Xn(e))return(e=Jo(e)).children=null,e}function Gn(e){if(!Xn(e))return e;const{shapeFlag:t,children:n}=e;if(n){if(16&t)return n[0];if(32&t&&k(n.default))return n.default()}}function Kn(e,t){6&e.shapeFlag&&e.component?Kn(e.component.subTree,t):128&e.shapeFlag?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function Zn(e,t=!1,n){let s=[],o=0;for(let r=0;r1)for(let e=0;e!!e.type.__asyncLoader,Xn=e=>e.type.__isKeepAlive;function es(e,t){ns(e,"a",t)}function ts(e,t){ns(e,"da",t)}function ns(e,t,n=sr){const s=e.__wdc||(e.__wdc=()=>{let t=n;for(;t;){if(t.isDeactivated)return;t=t.parent}return e()});if(os(t,s,n),n){let e=n.parent;for(;e&&e.parent;)Xn(e.parent.vnode)&&ss(s,t,n,e),e=e.parent}}function ss(e,t,n,s){const o=os(t,e,s,!0);ds((()=>{w(s[t],o)}),n)}function os(e,t,n=sr,s=!1){if(n){const o=n[e]||(n[e]=[]),r=t.__weh||(t.__weh=(...s)=>{we();const o=cr(n),r=fn(t,n,e,s);return o(),ye(),r});return s?o.unshift(r):o.push(r),r}}RegExp,RegExp;const rs=e=>(t,n=sr)=>{hr&&"sp"!==e||os(e,((...e)=>t(...e)),n)},is=rs("bm"),cs=rs("m"),as=rs("bu"),ls=rs("u"),us=rs("bum"),ds=rs("um"),hs=rs("sp"),ps=rs("rtg"),fs=rs("rtc");function _s(e,t=sr){os("ec",e,t)}const ms=Symbol.for("v-ndc");function gs(e,t,n,s){let o;const r=n&&n[s];if(T(e)||E(e)){o=new Array(e.length);for(let n=0,s=e.length;nt(e,n,void 0,r&&r[n])));else{const n=Object.keys(e);o=new Array(n.length);for(let s=0,i=n.length;se?lr(e)?mr(e):bs(e.parent):null,vs=v(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>bs(e.parent),$root:e=>bs(e.root),$emit:e=>e.emit,$options:e=>ks(e),$forceUpdate:e=>e.f||(e.f=()=>{e.effect.dirty=!0,kn(e.update)}),$nextTick:e=>e.n||(e.n=Cn.bind(e.proxy)),$watch:e=>vo.bind(e)}),ws=(e,t)=>e!==p&&!e.__isScriptSetup&&S(e,t),ys={get({_:e},t){if("__v_skip"===t)return!0;const{ctx:n,setupState:s,data:o,props:r,accessCache:i,type:c,appContext:a}=e;let l;if("$"!==t[0]){const c=i[t];if(void 0!==c)switch(c){case 1:return s[t];case 2:return o[t];case 4:return n[t];case 3:return r[t]}else{if(ws(s,t))return i[t]=1,s[t];if(o!==p&&S(o,t))return i[t]=2,o[t];if((l=e.propsOptions[0])&&S(l,t))return i[t]=3,r[t];if(n!==p&&S(n,t))return i[t]=4,n[t];Ts&&(i[t]=0)}}const u=vs[t];let d,h;return u?("$attrs"===t&&Oe(e.attrs,0,""),u(e)):(d=c.__cssModules)&&(d=d[t])?d:n!==p&&S(n,t)?(i[t]=4,n[t]):(h=a.config.globalProperties,S(h,t)?h[t]:void 0)},set({_:e},t,n){const{data:s,setupState:o,ctx:r}=e;return ws(o,t)?(o[t]=n,!0):s!==p&&S(s,t)?(s[t]=n,!0):!(S(e.props,t)||"$"===t[0]&&t.slice(1)in e||(r[t]=n,0))},has({_:{data:e,setupState:t,accessCache:n,ctx:s,appContext:o,propsOptions:r}},i){let c;return!!n[i]||e!==p&&S(e,i)||ws(t,i)||(c=r[0])&&S(c,i)||S(s,i)||S(vs,i)||S(o.config.globalProperties,i)},defineProperty(e,t,n){return null!=n.get?e._.accessCache[t]=0:S(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};function Ss(e){return T(e)?e.reduce(((e,t)=>(e[t]=null,e)),{}):e}let Ts=!0;function xs(e,t,n){fn(T(e)?e.map((e=>e.bind(t.proxy))):e.bind(t.proxy),t,n)}function Cs(e,t,n,s){const o=s.includes(".")?wo(n,s):()=>n[s];if(E(e)){const n=t[e];k(n)&&go(o,n)}else if(k(e))go(o,e.bind(n));else if(A(e))if(T(e))e.forEach((e=>Cs(e,t,n,s)));else{const s=k(e.handler)?e.handler.bind(n):t[e.handler];k(s)&&go(o,s,e)}}function ks(e){const t=e.type,{mixins:n,extends:s}=t,{mixins:o,optionsCache:r,config:{optionMergeStrategies:i}}=e.appContext,c=r.get(t);let a;return c?a=c:o.length||n||s?(a={},o.length&&o.forEach((e=>Es(a,e,i,!0))),Es(a,t,i)):a=t,A(t)&&r.set(t,a),a}function Es(e,t,n,s=!1){const{mixins:o,extends:r}=t;r&&Es(e,r,n,!0),o&&o.forEach((t=>Es(e,t,n,!0)));for(const o in t)if(s&&"expose"===o);else{const s=Ps[o]||n&&n[o];e[o]=s?s(e[o],t[o]):t[o]}return e}const Ps={data:As,props:js,emits:js,methods:Rs,computed:Rs,beforeCreate:Os,created:Os,beforeMount:Os,mounted:Os,beforeUpdate:Os,updated:Os,beforeDestroy:Os,beforeUnmount:Os,destroyed:Os,unmounted:Os,activated:Os,deactivated:Os,errorCaptured:Os,serverPrefetch:Os,components:Rs,directives:Rs,watch:function(e,t){if(!e)return t;if(!t)return e;const n=v(Object.create(null),e);for(const s in t)n[s]=Os(e[s],t[s]);return n},provide:As,inject:function(e,t){return Rs(Ls(e),Ls(t))}};function As(e,t){return t?e?function(){return v(k(e)?e.call(this,this):e,k(t)?t.call(this,this):t)}:t:e}function Ls(e){if(T(e)){const t={};for(let n=0;n(r.has(e)||(e&&k(e.install)?(r.add(e),e.install(c,...t)):k(e)&&(r.add(e),e(c,...t))),c),mixin:e=>(o.mixins.includes(e)||o.mixins.push(e),c),component:(e,t)=>t?(o.components[e]=t,c):o.components[e],directive:(e,t)=>t?(o.directives[e]=t,c):o.directives[e],mount(r,a,l){if(!i){const u=qo(n,s);return u.appContext=o,!0===l?l="svg":!1===l&&(l=void 0),a&&t?t(u,r):e(u,r,l),i=!0,c._container=r,r.__vue_app__=c,mr(u.component)}},unmount(){i&&(e(null,c._container),delete c._container.__vue_app__)},provide:(e,t)=>(o.provides[e]=t,c),runWithContext(e){const t=Fs;Fs=c;try{return e()}finally{Fs=t}}};return c}}let Fs=null;function Ds(e,t,n=!1){const s=sr||jn;if(s||Fs){const o=s?null==s.parent?s.vnode.appContext&&s.vnode.appContext.provides:s.parent.provides:Fs._context.provides;if(o&&e in o)return o[e];if(arguments.length>1)return n&&k(t)?t.call(s&&s.proxy):t}}const Us={},Qs=()=>Object.create(Us),Ns=e=>Object.getPrototypeOf(e)===Us;function $s(e,t,n,s){const[o,r]=e.propsOptions;let i,c=!1;if(t)for(let a in t){if(M(a))continue;const l=t[a];let u;o&&S(o,u=U(a))?r&&r.includes(u)?(i||(i={}))[u]=l:n[u]=l:Co(e.emitsOptions,a)||a in s&&l===s[a]||(s[a]=l,c=!0)}if(r){const t=St(n),s=i||p;for(let i=0;i{a=!0;const[n,s]=Vs(e,t,!0);v(i,n),s&&c.push(...s)};!n&&t.mixins.length&&t.mixins.forEach(s),e.extends&&s(e.extends),e.mixins&&e.mixins.forEach(s)}if(!r&&!a)return A(e)&&s.set(e,f),f;if(T(r))for(let e=0;e-1,s[1]=n<0||e-1||S(s,"default"))&&c.push(t)}}}const l=[i,c];return A(e)&&s.set(e,l),l}function Hs(e){return"$"!==e[0]&&!M(e)}function qs(e){return null===e?"null":"function"==typeof e?e.name||"":"object"==typeof e&&e.constructor&&e.constructor.name||""}function Js(e,t){return qs(e)===qs(t)}function Gs(e,t){return T(t)?t.findIndex((t=>Js(t,e))):k(t)&&Js(t,e)?0:-1}const Ks=e=>"_"===e[0]||"$stable"===e,Zs=e=>T(e)?e.map(Zo):[Zo(e)],Ys=(e,t,n)=>{if(t._n)return t;const s=function(e,t=jn){if(!t)return e;if(e._n)return e;const n=(...s)=>{n._d&&Do(-1);const o=zn(t);let r;try{r=e(...s)}finally{zn(o),n._d&&Do(1)}return r};return n._n=!0,n._c=!0,n._d=!0,n}(((...e)=>Zs(t(...e))),n);return s._c=!1,s},Xs=(e,t,n)=>{const s=e._ctx;for(const n in e){if(Ks(n))continue;const o=e[n];if(k(o))t[n]=Ys(0,o,s);else if(null!=o){const e=Zs(o);t[n]=()=>e}}},eo=(e,t)=>{const n=Zs(t);e.slots.default=()=>n},to=(e,t,n)=>{for(const s in t)(n||"_"!==s)&&(e[s]=t[s])},no=(e,t,n)=>{const s=e.slots=Qs();if(32&e.vnode.shapeFlag){const e=t._;e?(to(s,t,n),n&&H(s,"_",e,!0)):Xs(t,s)}else t&&eo(e,t)},so=(e,t,n)=>{const{vnode:s,slots:o}=e;let r=!0,i=p;if(32&s.shapeFlag){const e=t._;e?n&&1===e?r=!1:to(o,t,n):(r=!t.$stable,Xs(t,o)),i=t}else t&&(eo(e,t),i={default:1});if(r)for(const e in o)Ks(e)||null!=i[e]||delete o[e]};function oo(e,t,n,s,o=!1){if(T(e))return void e.forEach(((e,r)=>oo(e,t&&(T(t)?t[r]:t),n,s,o)));if(Yn(s)&&!o)return;const r=4&s.shapeFlag?mr(s.component):s.el,i=o?null:r,{i:c,r:a}=e,l=t&&t.r,u=c.refs===p?c.refs={}:c.refs,d=c.setupState;if(null!=l&&l!==a&&(E(l)?(u[l]=null,S(d,l)&&(d[l]=null)):Pt(l)&&(l.value=null)),k(a))pn(a,c,12,[i,u]);else{const t=E(a),s=Pt(a);if(t||s){const c=()=>{if(e.f){const n=t?S(d,a)?d[a]:u[a]:a.value;o?T(n)&&w(n,r):T(n)?n.includes(r)||n.push(r):t?(u[a]=[r],S(d,a)&&(d[a]=u[a])):(a.value=[r],e.k&&(u[e.k]=a.value))}else t?(u[a]=i,S(d,a)&&(d[a]=i)):s&&(a.value=i,e.k&&(u[e.k]=i))};i?(c.id=-1,io(c,n)):c()}}}const ro=Symbol("_vte"),io=function(e,t){t&&t.pendingBranch?T(e)?t.effects.push(...e):t.effects.push(e):(n=e,T(n)?wn.push(...n):yn&&yn.includes(n,n.allowRecurse?Sn+1:Sn)||wn.push(n),En());var n};function co(e,t){K().__VUE__=!0;const{insert:n,remove:s,patchProp:o,createElement:r,createText:i,createComment:c,setText:a,setElementText:l,parentNode:u,nextSibling:d,setScopeId:h=_,insertStaticContent:m}=e,g=(e,t,n,s=null,o=null,r=null,i=void 0,c=null,a=!!t.dynamicChildren)=>{if(e===t)return;e&&!Bo(e,t)&&(s=G(e),B(e,o,r,!0),e=null),-2===t.patchFlag&&(a=!1,t.dynamicChildren=null);const{type:l,ref:u,shapeFlag:d}=t;switch(l){case Oo:b(e,t,n,s);break;case Ro:v(e,t,n,s);break;case jo:null==e&&w(t,n,s,i);break;case Lo:A(e,t,n,s,o,r,i,c,a);break;default:1&d?y(e,t,n,s,o,r,i,c,a):6&d?O(e,t,n,s,o,r,i,c,a):(64&d||128&d)&&l.process(e,t,n,s,o,r,i,c,a,X)}null!=u&&o&&oo(u,e&&e.ref,r,t||e,!t)},b=(e,t,s,o)=>{if(null==e)n(t.el=i(t.children),s,o);else{const n=t.el=e.el;t.children!==e.children&&a(n,t.children)}},v=(e,t,s,o)=>{null==e?n(t.el=c(t.children||""),s,o):t.el=e.el},w=(e,t,n,s)=>{[e.el,e.anchor]=m(e.children,t,n,s,e.el,e.anchor)},y=(e,t,n,s,o,r,i,c,a)=>{"svg"===t.type?i="svg":"math"===t.type&&(i="mathml"),null==e?T(t,n,s,o,r,i,c,a):k(e,t,o,r,i,c,a)},T=(e,t,s,i,c,a,u,d)=>{let h,p;const{props:f,shapeFlag:_,transition:m,dirs:g}=e;if(h=e.el=r(e.type,a,f&&f.is,f),8&_?l(h,e.children):16&_&&C(e.children,h,null,i,c,ao(e,a),u,d),g&&Dn(e,null,i,"created"),x(h,e,e.scopeId,u,i),f){for(const e in f)"value"===e||M(e)||o(h,e,null,f[e],a,i);"value"in f&&o(h,"value",null,f.value,a),(p=f.onVnodeBeforeMount)&&er(p,i,e)}g&&Dn(e,null,i,"beforeMount");const b=function(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}(c,m);b&&m.beforeEnter(h),n(h,t,s),((p=f&&f.onVnodeMounted)||b||g)&&io((()=>{p&&er(p,i,e),b&&m.enter(h),g&&Dn(e,null,i,"mounted")}),c)},x=(e,t,n,s,o)=>{if(n&&h(e,n),s)for(let t=0;t{for(let l=a;l{const a=t.el=e.el;let{patchFlag:u,dynamicChildren:d,dirs:h}=t;u|=16&e.patchFlag;const f=e.props||p,_=t.props||p;let m;if(n&&lo(n,!1),(m=_.onVnodeBeforeUpdate)&&er(m,n,t,e),h&&Dn(t,e,n,"beforeUpdate"),n&&lo(n,!0),(f.innerHTML&&null==_.innerHTML||f.textContent&&null==_.textContent)&&l(a,""),d?E(e.dynamicChildren,d,a,n,s,ao(t,r),i):c||F(e,t,a,null,n,s,ao(t,r),i,!1),u>0){if(16&u)P(a,f,_,n,r);else if(2&u&&f.class!==_.class&&o(a,"class",null,_.class,r),4&u&&o(a,"style",f.style,_.style,r),8&u){const e=t.dynamicProps;for(let t=0;t{m&&er(m,n,t,e),h&&Dn(t,e,n,"updated")}),s)},E=(e,t,n,s,o,r,i)=>{for(let c=0;c{if(t!==n){if(t!==p)for(const i in t)M(i)||i in n||o(e,i,t[i],null,r,s);for(const i in n){if(M(i))continue;const c=n[i],a=t[i];c!==a&&"value"!==i&&o(e,i,a,c,r,s)}"value"in n&&o(e,"value",t.value,n.value,r)}},A=(e,t,s,o,r,c,a,l,u)=>{const d=t.el=e?e.el:i(""),h=t.anchor=e?e.anchor:i("");let{patchFlag:p,dynamicChildren:f,slotScopeIds:_}=t;_&&(l=l?l.concat(_):_),null==e?(n(d,s,o),n(h,s,o),C(t.children||[],s,h,r,c,a,l,u)):p>0&&64&p&&f&&e.dynamicChildren?(E(e.dynamicChildren,f,s,r,c,a,l),(null!=t.key||r&&t===r.subTree)&&uo(e,t,!0)):F(e,t,s,h,r,c,a,l,u)},O=(e,t,n,s,o,r,i,c,a)=>{t.slotScopeIds=c,null==e?512&t.shapeFlag?o.ctx.activate(t,n,s,i,a):R(t,n,s,o,r,i,a):j(e,t,a)},R=(e,t,n,s,o,r,i)=>{const c=e.component=function(e,t,n){const s=e.type,o=(t?t.appContext:e.appContext)||tr,r={uid:nr++,vnode:e,type:s,parent:t,appContext:o,root:null,next:null,subTree:null,effect:null,update:null,scope:new de(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:t?t.provides:Object.create(o.provides),accessCache:null,renderCache:[],components:null,directives:null,propsOptions:Vs(s,o),emitsOptions:xo(s,o),emit:null,emitted:null,propsDefaults:p,inheritAttrs:s.inheritAttrs,ctx:p,data:p,props:p,attrs:p,slots:p,refs:p,setupState:p,setupContext:null,suspense:n,suspenseId:n?n.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};return r.ctx={_:r},r.root=t?t.root:r,r.emit=To.bind(null,r),e.ce&&e.ce(r),r}(e,s,o);if(Xn(e)&&(c.ctx.renderer=X),function(e,t=!1,n=!1){t&&ir(t);const{props:s,children:o}=e.vnode,r=lr(e);(function(e,t,n,s=!1){const o={},r=Qs();e.propsDefaults=Object.create(null),$s(e,t,o,r);for(const t in e.propsOptions[0])t in o||(o[t]=void 0);n?e.props=s?o:gt(o,!1,Be,lt,ht):e.type.props?e.props=o:e.props=r,e.attrs=r})(e,s,r,t),no(e,o,n);const i=r?function(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,ys);const{setup:s}=n;if(s){const n=e.setupContext=s.length>1?function(e){const t=t=>{e.exposed=t||{}};return{attrs:new Proxy(e.attrs,_r),slots:e.slots,emit:e.emit,expose:t}}(e):null,o=cr(e);we();const r=pn(s,e,0,[e.props,n]);if(ye(),o(),L(r)){if(r.then(ar,ar),t)return r.then((n=>{pr(e,n,t)})).catch((t=>{_n(t,e,0)}));e.asyncDep=r}else pr(e,r,t)}else fr(e,t)}(e,t):void 0;t&&ir(!1)}(c,!1,i),c.asyncDep){if(o&&o.registerDep(c,I,i),!e.el){const e=c.subTree=qo(Ro);v(null,e,t,n)}}else I(c,e,t,n,o,r,i)},j=(e,t,n)=>{const s=t.component=e.component;if(function(e,t,n){const{props:s,children:o,component:r}=e,{props:i,children:c,patchFlag:a}=t,l=r.emitsOptions;if(t.dirs||t.transition)return!0;if(!(n&&a>=0))return!(!o&&!c||c&&c.$stable)||s!==i&&(s?!i||Ao(s,i,l):!!i);if(1024&a)return!0;if(16&a)return s?Ao(s,i,l):!!i;if(8&a){const e=t.dynamicProps;for(let t=0;tvn&&bn.splice(t,1)}(s.update),s.effect.dirty=!0,s.update()}else t.el=e.el,s.vnode=t},I=(e,t,n,s,o,r,i)=>{const c=()=>{if(e.isMounted){let{next:t,bu:n,u:s,parent:a,vnode:l}=e;{const n=ho(e);if(n)return t&&(t.el=l.el,z(e,t,i)),void n.asyncDep.then((()=>{e.isUnmounted||c()}))}let d,h=t;lo(e,!1),t?(t.el=l.el,z(e,t,i)):t=l,n&&V(n),(d=t.props&&t.props.onVnodeBeforeUpdate)&&er(d,a,t,l),lo(e,!0);const p=ko(e),f=e.subTree;e.subTree=p,g(f,p,u(f.el),G(f),e,o,r),t.el=p.el,null===h&&function({vnode:e,parent:t},n){for(;t;){const s=t.subTree;if(s.suspense&&s.suspense.activeBranch===e&&(s.el=e.el),s!==e)break;(e=t.vnode).el=n,t=t.parent}}(e,p.el),s&&io(s,o),(d=t.props&&t.props.onVnodeUpdated)&&io((()=>er(d,a,t,l)),o)}else{let i;const{el:c,props:a}=t,{bm:l,m:u,parent:d}=e,h=Yn(t);if(lo(e,!1),l&&V(l),!h&&(i=a&&a.onVnodeBeforeMount)&&er(i,d,t),lo(e,!0),c&&te){const n=()=>{e.subTree=ko(e),te(c,e.subTree,e,o,null)};h?t.type.__asyncLoader().then((()=>!e.isUnmounted&&n())):n()}else{const i=e.subTree=ko(e);g(null,i,n,s,e,o,r),t.el=i.el}if(u&&io(u,o),!h&&(i=a&&a.onVnodeMounted)){const e=t;io((()=>er(i,d,e)),o)}(256&t.shapeFlag||d&&Yn(d.vnode)&&256&d.vnode.shapeFlag)&&e.a&&io(e.a,o),e.isMounted=!0,t=n=s=null}},a=e.effect=new he(c,_,(()=>kn(l)),e.scope),l=e.update=()=>{a.dirty&&a.run()};l.i=e,l.id=e.uid,lo(e,!0),l()},z=(e,t,n)=>{t.component=e;const s=e.vnode.props;e.vnode=t,e.next=null,function(e,t,n,s){const{props:o,attrs:r,vnode:{patchFlag:i}}=e,c=St(o),[a]=e.propsOptions;let l=!1;if(!(s||i>0)||16&i){let s;$s(e,t,o,r)&&(l=!0);for(const r in c)t&&(S(t,r)||(s=N(r))!==r&&S(t,s))||(a?!n||void 0===n[r]&&void 0===n[s]||(o[r]=Bs(a,c,r,void 0,e,!0)):delete o[r]);if(r!==c)for(const e in r)t&&S(t,e)||(delete r[e],l=!0)}else if(8&i){const n=e.vnode.dynamicProps;for(let s=0;s{const u=e&&e.children,d=e?e.shapeFlag:0,h=t.children,{patchFlag:p,shapeFlag:f}=t;if(p>0){if(128&p)return void Q(u,h,n,s,o,r,i,c,a);if(256&p)return void D(u,h,n,s,o,r,i,c,a)}8&f?(16&d&&J(u,o,r),h!==u&&l(n,h)):16&d?16&f?Q(u,h,n,s,o,r,i,c,a):J(u,o,r,!0):(8&d&&l(n,""),16&f&&C(h,n,s,o,r,i,c,a))},D=(e,t,n,s,o,r,i,c,a)=>{t=t||f;const l=(e=e||f).length,u=t.length,d=Math.min(l,u);let h;for(h=0;hu?J(e,o,r,!0,!1,d):C(t,n,s,o,r,i,c,a,d)},Q=(e,t,n,s,o,r,i,c,a)=>{let l=0;const u=t.length;let d=e.length-1,h=u-1;for(;l<=d&&l<=h;){const s=e[l],u=t[l]=a?Yo(t[l]):Zo(t[l]);if(!Bo(s,u))break;g(s,u,n,null,o,r,i,c,a),l++}for(;l<=d&&l<=h;){const s=e[d],l=t[h]=a?Yo(t[h]):Zo(t[h]);if(!Bo(s,l))break;g(s,l,n,null,o,r,i,c,a),d--,h--}if(l>d){if(l<=h){const e=h+1,d=eh)for(;l<=d;)B(e[l],o,r,!0),l++;else{const p=l,_=l,m=new Map;for(l=_;l<=h;l++){const e=t[l]=a?Yo(t[l]):Zo(t[l]);null!=e.key&&m.set(e.key,l)}let b,v=0;const w=h-_+1;let y=!1,S=0;const T=new Array(w);for(l=0;l=w){B(s,o,r,!0);continue}let u;if(null!=s.key)u=m.get(s.key);else for(b=_;b<=h;b++)if(0===T[b-_]&&Bo(s,t[b])){u=b;break}void 0===u?B(s,o,r,!0):(T[u-_]=l+1,u>=S?S=u:y=!0,g(s,t[u],n,null,o,r,i,c,a),v++)}const x=y?function(e){const t=e.slice(),n=[0];let s,o,r,i,c;const a=e.length;for(s=0;s>1,e[n[c]]0&&(t[s]=n[r-1]),n[r]=s)}}for(r=n.length,i=n[r-1];r-->0;)n[r]=i,i=t[i];return n}(T):f;for(b=x.length-1,l=w-1;l>=0;l--){const e=_+l,d=t[e],h=e+1{const{el:i,type:c,transition:a,children:l,shapeFlag:u}=e;if(6&u)$(e.component.subTree,t,s,o);else if(128&u)e.suspense.move(t,s,o);else if(64&u)c.move(e,t,s,X);else if(c!==Lo)if(c!==jo)if(2!==o&&1&u&&a)if(0===o)a.beforeEnter(i),n(i,t,s),io((()=>a.enter(i)),r);else{const{leave:e,delayLeave:o,afterLeave:r}=a,c=()=>n(i,t,s),l=()=>{e(i,(()=>{c(),r&&r()}))};o?o(i,c,l):l()}else n(i,t,s);else(({el:e,anchor:t},s,o)=>{let r;for(;e&&e!==t;)r=d(e),n(e,s,o),e=r;n(t,s,o)})(e,t,s);else{n(i,t,s);for(let e=0;e{const{type:r,props:i,ref:c,children:a,dynamicChildren:l,shapeFlag:u,patchFlag:d,dirs:h,cacheIndex:p}=e;if(-2===d&&(o=!1),null!=c&&oo(c,null,n,e,!0),null!=p&&(t.renderCache[p]=void 0),256&u)return void t.ctx.deactivate(e);const f=1&u&&h,_=!Yn(e);let m;if(_&&(m=i&&i.onVnodeBeforeUnmount)&&er(m,t,e),6&u)q(e.component,n,s);else{if(128&u)return void e.suspense.unmount(n,s);f&&Dn(e,null,t,"beforeUnmount"),64&u?e.type.remove(e,t,n,X,s):l&&!l.hasOnce&&(r!==Lo||d>0&&64&d)?J(l,t,n,!1,!0):(r===Lo&&384&d||!o&&16&u)&&J(a,t,n),s&&W(e)}(_&&(m=i&&i.onVnodeUnmounted)||f)&&io((()=>{m&&er(m,t,e),f&&Dn(e,null,t,"unmounted")}),n)},W=e=>{const{type:t,el:n,anchor:o,transition:r}=e;if(t===Lo)return void H(n,o);if(t===jo)return void(({el:e,anchor:t})=>{let n;for(;e&&e!==t;)n=d(e),s(e),e=n;s(t)})(e);const i=()=>{s(n),r&&!r.persisted&&r.afterLeave&&r.afterLeave()};if(1&e.shapeFlag&&r&&!r.persisted){const{leave:t,delayLeave:s}=r,o=()=>t(n,i);s?s(e.el,i,o):o()}else i()},H=(e,t)=>{let n;for(;e!==t;)n=d(e),s(e),e=n;s(t)},q=(e,t,n)=>{const{bum:s,scope:o,update:r,subTree:i,um:c,m:a,a:l}=e;po(a),po(l),s&&V(s),o.stop(),r&&(r.active=!1,B(i,e,t,n)),c&&io(c,t),io((()=>{e.isUnmounted=!0}),t),t&&t.pendingBranch&&!t.isUnmounted&&e.asyncDep&&!e.asyncResolved&&e.suspenseId===t.pendingId&&(t.deps--,0===t.deps&&t.resolve())},J=(e,t,n,s=!1,o=!1,r=0)=>{for(let i=r;i{if(6&e.shapeFlag)return G(e.component.subTree);if(128&e.shapeFlag)return e.suspense.next();const t=d(e.anchor||e.el),n=t&&t[ro];return n?d(n):t};let Z=!1;const Y=(e,t,n)=>{null==e?t._vnode&&B(t._vnode,null,null,!0):g(t._vnode||null,e,t,null,null,null,n),Z||(Z=!0,Pn(),An(),Z=!1),t._vnode=e},X={p:g,um:B,m:$,r:W,mt:R,mc:C,pc:F,pbc:E,n:G,o:e};let ee,te;return t&&([ee,te]=t(X)),{render:Y,hydrate:ee,createApp:Ms(Y,ee)}}function ao({type:e,props:t},n){return"svg"===n&&"foreignObject"===e||"mathml"===n&&"annotation-xml"===e&&t&&t.encoding&&t.encoding.includes("html")?void 0:n}function lo({effect:e,update:t},n){e.allowRecurse=t.allowRecurse=n}function uo(e,t,n=!1){const s=e.children,o=t.children;if(T(s)&&T(o))for(let e=0;eDs(fo),mo={};function go(e,t,n){return bo(e,t,n)}function bo(e,t,{immediate:n,deep:s,flush:o,once:r,onTrack:i,onTrigger:c}=p){if(t&&r){const e=t;t=(...t)=>{e(...t),C()}}const a=sr,l=e=>!0===s?e:yo(e,!1===s?1:void 0);let u,d,h=!1,f=!1;if(Pt(e)?(u=()=>e.value,h=wt(e)):bt(e)?(u=()=>l(e),h=!0):T(e)?(f=!0,h=e.some((e=>bt(e)||wt(e))),u=()=>e.map((e=>Pt(e)?e.value:bt(e)?l(e):k(e)?pn(e,a,2):void 0))):u=k(e)?t?()=>pn(e,a,2):()=>(d&&d(),fn(e,a,3,[g])):_,t&&s){const e=u;u=()=>yo(e())}let m,g=e=>{d=S.onStop=()=>{pn(e,a,4),d=S.onStop=void 0}};if(hr){if(g=_,t?n&&fn(t,a,3,[u(),f?[]:void 0,g]):u(),"sync"!==o)return _;{const e=_o();m=e.__watcherHandles||(e.__watcherHandles=[])}}let b=f?new Array(e.length).fill(mo):mo;const v=()=>{if(S.active&&S.dirty)if(t){const e=S.run();(s||h||(f?e.some(((e,t)=>W(e,b[t]))):W(e,b)))&&(d&&d(),fn(t,a,3,[e,b===mo?void 0:f&&b[0]===mo?[]:b,g]),b=e)}else S.run()};let y;v.allowRecurse=!!t,"sync"===o?y=v:"post"===o?y=()=>io(v,a&&a.suspense):(v.pre=!0,a&&(v.id=a.uid),y=()=>kn(v));const S=new he(u,_,y),x=le,C=()=>{S.stop(),x&&w(x.effects,S)};return t?n?v():b=S.run():"post"===o?io(S.run.bind(S),a&&a.suspense):S.run(),m&&m.push(C),C}function vo(e,t,n){const s=this.proxy,o=E(e)?e.includes(".")?wo(s,e):()=>s[e]:e.bind(s,s);let r;k(t)?r=t:(r=t.handler,n=t);const i=cr(this),c=bo(o,r.bind(s),n);return i(),c}function wo(e,t){const n=t.split(".");return()=>{let t=e;for(let e=0;e{yo(e,t,n)}));else if(I(e)){for(const s in e)yo(e[s],t,n);for(const s of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,s)&&yo(e[s],t,n)}return e}const So=(e,t)=>"modelValue"===t||"model-value"===t?e.modelModifiers:e[`${t}Modifiers`]||e[`${U(t)}Modifiers`]||e[`${N(t)}Modifiers`];function To(e,t,...n){if(e.isUnmounted)return;const s=e.vnode.props||p;let o=n;const r=t.startsWith("update:"),i=r&&So(s,t.slice(7));let c;i&&(i.trim&&(o=n.map((e=>E(e)?e.trim():e))),i.number&&(o=n.map(q)));let a=s[c=B(t)]||s[c=B(U(t))];!a&&r&&(a=s[c=B(N(t))]),a&&fn(a,e,6,o);const l=s[c+"Once"];if(l){if(e.emitted){if(e.emitted[c])return}else e.emitted={};e.emitted[c]=!0,fn(l,e,6,o)}}function xo(e,t,n=!1){const s=t.emitsCache,o=s.get(e);if(void 0!==o)return o;const r=e.emits;let i={},c=!1;if(!k(e)){const s=e=>{const n=xo(e,t,!0);n&&(c=!0,v(i,n))};!n&&t.mixins.length&&t.mixins.forEach(s),e.extends&&s(e.extends),e.mixins&&e.mixins.forEach(s)}return r||c?(T(r)?r.forEach((e=>i[e]=null)):v(i,r),A(e)&&s.set(e,i),i):(A(e)&&s.set(e,null),null)}function Co(e,t){return!(!e||!g(t))&&(t=t.slice(2).replace(/Once$/,""),S(e,t[0].toLowerCase()+t.slice(1))||S(e,N(t))||S(e,t))}function ko(e){const{type:t,vnode:n,proxy:s,withProxy:o,propsOptions:[r],slots:i,attrs:c,emit:a,render:l,renderCache:u,props:d,data:h,setupState:p,ctx:f,inheritAttrs:_}=e,m=zn(e);let g,v;try{if(4&n.shapeFlag){const e=o||s,t=e;g=Zo(l.call(t,e,u,d,p,h,f)),v=c}else{const e=t;g=Zo(e.length>1?e(d,{attrs:c,slots:i,emit:a}):e(d,null)),v=t.props?c:Eo(c)}}catch(t){Io.length=0,_n(t,e,1),g=qo(Ro)}let w=g;if(v&&!1!==_){const e=Object.keys(v),{shapeFlag:t}=w;e.length&&7&t&&(r&&e.some(b)&&(v=Po(v,r)),w=Jo(w,v,!1,!0))}return n.dirs&&(w=Jo(w,null,!1,!0),w.dirs=w.dirs?w.dirs.concat(n.dirs):n.dirs),n.transition&&(w.transition=n.transition),g=w,zn(m),g}const Eo=e=>{let t;for(const n in e)("class"===n||"style"===n||g(n))&&((t||(t={}))[n]=e[n]);return t},Po=(e,t)=>{const n={};for(const s in e)b(s)&&s.slice(9)in t||(n[s]=e[s]);return n};function Ao(e,t,n){const s=Object.keys(t);if(s.length!==Object.keys(e).length)return!0;for(let o=0;o0?zo||f:null,Io.pop(),zo=Io[Io.length-1]||null,Fo>0&&zo&&zo.push(e),e}function Qo(e,t,n,s,o,r){return Uo(Ho(e,t,n,s,o,r,!0))}function No(e,t,n,s,o){return Uo(qo(e,t,n,s,o,!0))}function $o(e){return!!e&&!0===e.__v_isVNode}function Bo(e,t){return e.type===t.type&&e.key===t.key}const Wo=({key:e})=>null!=e?e:null,Vo=({ref:e,ref_key:t,ref_for:n})=>("number"==typeof e&&(e=""+e),null!=e?E(e)||Pt(e)||k(e)?{i:jn,r:e,k:t,f:!!n}:e:null);function Ho(e,t=null,n=null,s=0,o=null,r=(e===Lo?0:1),i=!1,c=!1){const a={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&Wo(t),ref:t&&Vo(t),scopeId:In,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:r,patchFlag:s,dynamicProps:o,dynamicChildren:null,appContext:null,ctx:jn};return c?(Xo(a,n),128&r&&e.normalize(a)):n&&(a.shapeFlag|=E(n)?8:16),Fo>0&&!i&&zo&&(a.patchFlag>0||6&r)&&32!==a.patchFlag&&zo.push(a),a}const qo=function(e,t=null,n=null,s=0,o=null,r=!1){if(e&&e!==ms||(e=Ro),$o(e)){const s=Jo(e,t,!0);return n&&Xo(s,n),Fo>0&&!r&&zo&&(6&s.shapeFlag?zo[zo.indexOf(e)]=s:zo.push(s)),s.patchFlag=-2,s}if(i=e,k(i)&&"__vccOpts"in i&&(e=e.__vccOpts),t){t=function(e){return e?yt(e)||Ns(e)?v({},e):e:null}(t);let{class:e,style:n}=t;e&&!E(e)&&(t.class=ne(e)),A(n)&&(yt(n)&&!T(n)&&(n=v({},n)),t.style=Z(n))}var i;return Ho(e,t,n,s,o,E(e)?1:(e=>e.__isSuspense)(e)?128:(e=>e.__isTeleport)(e)?64:A(e)?4:k(e)?2:0,r,!0)};function Jo(e,t,n=!1,s=!1){const{props:o,ref:r,patchFlag:i,children:c,transition:a}=e,l=t?function(...e){const t={};for(let n=0;nsr||jn;let rr,ir;{const e=K(),t=(t,n)=>{let s;return(s=e[t])||(s=e[t]=[]),s.push(n),e=>{s.length>1?s.forEach((t=>t(e))):s[0](e)}};rr=t("__VUE_INSTANCE_SETTERS__",(e=>sr=e)),ir=t("__VUE_SSR_SETTERS__",(e=>hr=e))}const cr=e=>{const t=sr;return rr(e),e.scope.on(),()=>{e.scope.off(),rr(t)}},ar=()=>{sr&&sr.scope.off(),rr(null)};function lr(e){return 4&e.vnode.shapeFlag}let ur,dr,hr=!1;function pr(e,t,n){k(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:A(t)&&(e.setupState=jt(t)),fr(e,n)}function fr(e,t,n){const s=e.type;if(!e.render){if(!t&&ur&&!s.render){const t=s.template||ks(e).template;if(t){const{isCustomElement:n,compilerOptions:o}=e.appContext.config,{delimiters:r,compilerOptions:i}=s,c=v(v({isCustomElement:n,delimiters:r},o),i);s.render=ur(t,c)}}e.render=s.render||_,dr&&dr(e)}{const t=cr(e);we();try{!function(e){const t=ks(e),n=e.proxy,s=e.ctx;Ts=!1,t.beforeCreate&&xs(t.beforeCreate,e,"bc");const{data:o,computed:r,methods:i,watch:c,provide:a,inject:l,created:u,beforeMount:d,mounted:h,beforeUpdate:p,updated:f,activated:m,deactivated:g,beforeDestroy:b,beforeUnmount:v,destroyed:w,unmounted:y,render:S,renderTracked:x,renderTriggered:C,errorCaptured:E,serverPrefetch:P,expose:L,inheritAttrs:O,components:R,directives:j,filters:I}=t;if(l&&function(e,t){T(e)&&(e=Ls(e));for(const n in e){const s=e[n];let o;o=A(s)?"default"in s?Ds(s.from||n,s.default,!0):Ds(s.from||n):Ds(s),Pt(o)?Object.defineProperty(t,n,{enumerable:!0,configurable:!0,get:()=>o.value,set:e=>o.value=e}):t[n]=o}}(l,s),i)for(const e in i){const t=i[e];k(t)&&(s[e]=t.bind(n))}if(o){const t=o.call(n,n);A(t)&&(e.data=_t(t))}if(Ts=!0,r)for(const e in r){const t=r[e],o=k(t)?t.bind(n,n):k(t.get)?t.get.bind(n,n):_,i=!k(t)&&k(t.set)?t.set.bind(n):_,c=gr({get:o,set:i});Object.defineProperty(s,e,{enumerable:!0,configurable:!0,get:()=>c.value,set:e=>c.value=e})}if(c)for(const e in c)Cs(c[e],s,n,e);if(a){const e=k(a)?a.call(n):a;Reflect.ownKeys(e).forEach((t=>{!function(e,t){if(sr){let n=sr.provides;const s=sr.parent&&sr.parent.provides;s===n&&(n=sr.provides=Object.create(s)),n[e]=t}}(t,e[t])}))}function z(e,t){T(t)?t.forEach((t=>e(t.bind(n)))):t&&e(t.bind(n))}if(u&&xs(u,e,"c"),z(is,d),z(cs,h),z(as,p),z(ls,f),z(es,m),z(ts,g),z(_s,E),z(fs,x),z(ps,C),z(us,v),z(ds,y),z(hs,P),T(L))if(L.length){const t=e.exposed||(e.exposed={});L.forEach((e=>{Object.defineProperty(t,e,{get:()=>n[e],set:t=>n[e]=t})}))}else e.exposed||(e.exposed={});S&&e.render===_&&(e.render=S),null!=O&&(e.inheritAttrs=O),R&&(e.components=R),j&&(e.directives=j)}(e)}finally{ye(),t()}}}const _r={get:(e,t)=>(Oe(e,0,""),e[t])};function mr(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(jt((t=e.exposed,Object.isExtensible(t)&&H(t,"__v_skip",!0),t)),{get:(t,n)=>n in t?t[n]:n in vs?vs[n](e):void 0,has:(e,t)=>t in e||t in vs})):e.proxy;var t}const gr=(e,t)=>function(e,t,n=!1){let s,o;const r=k(e);return r?(s=e,o=_):(s=e.get,o=e.set),new Ct(s,o,r||!o,n)}(e,0,hr),br="3.4.33",vr="undefined"!=typeof document?document:null,wr=vr&&vr.createElement("template"),yr={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,s)=>{const o="svg"===t?vr.createElementNS("http://www.w3.org/2000/svg",e):"mathml"===t?vr.createElementNS("http://www.w3.org/1998/Math/MathML",e):n?vr.createElement(e,{is:n}):vr.createElement(e);return"select"===e&&s&&null!=s.multiple&&o.setAttribute("multiple",s.multiple),o},createText:e=>vr.createTextNode(e),createComment:e=>vr.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>vr.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,s,o,r){const i=n?n.previousSibling:t.lastChild;if(o&&(o===r||o.nextSibling))for(;t.insertBefore(o.cloneNode(!0),n),o!==r&&(o=o.nextSibling););else{wr.innerHTML="svg"===s?`${e}`:"mathml"===s?`${e}`:e;const o=wr.content;if("svg"===s||"mathml"===s){const e=o.firstChild;for(;e.firstChild;)o.appendChild(e.firstChild);o.removeChild(e)}t.insertBefore(o,n)}return[i?i.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},Sr="transition",Tr="animation",xr=Symbol("_vtc"),Cr=(e,{slots:t})=>function(e,t,n){const s=arguments.length;return 2===s?A(t)&&!T(t)?$o(t)?qo(e,null,[t]):qo(e,t):qo(e,null,t):(s>3?n=Array.prototype.slice.call(arguments,2):3===s&&$o(n)&&(n=[n]),qo(e,t,n))}(Vn,function(e){const t={};for(const n in e)n in kr||(t[n]=e[n]);if(!1===e.css)return t;const{name:n="v",type:s,duration:o,enterFromClass:r=`${n}-enter-from`,enterActiveClass:i=`${n}-enter-active`,enterToClass:c=`${n}-enter-to`,appearFromClass:a=r,appearActiveClass:l=i,appearToClass:u=c,leaveFromClass:d=`${n}-leave-from`,leaveActiveClass:h=`${n}-leave-active`,leaveToClass:p=`${n}-leave-to`}=e,f=function(e){if(null==e)return null;if(A(e))return[Ar(e.enter),Ar(e.leave)];{const t=Ar(e);return[t,t]}}(o),_=f&&f[0],m=f&&f[1],{onBeforeEnter:g,onEnter:b,onEnterCancelled:w,onLeave:y,onLeaveCancelled:S,onBeforeAppear:T=g,onAppear:x=b,onAppearCancelled:C=w}=t,k=(e,t,n)=>{Or(e,t?u:c),Or(e,t?l:i),n&&n()},E=(e,t)=>{e._isLeaving=!1,Or(e,d),Or(e,p),Or(e,h),t&&t()},P=e=>(t,n)=>{const o=e?x:b,i=()=>k(t,e,n);Er(o,[t,i]),Rr((()=>{Or(t,e?a:r),Lr(t,e?u:c),Pr(o)||Ir(t,s,_,i)}))};return v(t,{onBeforeEnter(e){Er(g,[e]),Lr(e,r),Lr(e,i)},onBeforeAppear(e){Er(T,[e]),Lr(e,a),Lr(e,l)},onEnter:P(!1),onAppear:P(!0),onLeave(e,t){e._isLeaving=!0;const n=()=>E(e,t);Lr(e,d),Lr(e,h),document.body.offsetHeight,Rr((()=>{e._isLeaving&&(Or(e,d),Lr(e,p),Pr(y)||Ir(e,s,m,n))})),Er(y,[e,n])},onEnterCancelled(e){k(e,!1),Er(w,[e])},onAppearCancelled(e){k(e,!0),Er(C,[e])},onLeaveCancelled(e){E(e),Er(S,[e])}})}(e),t);Cr.displayName="Transition";const kr={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},Er=(Cr.props=v({},$n,kr),(e,t=[])=>{T(e)?e.forEach((e=>e(...t))):e&&e(...t)}),Pr=e=>!!e&&(T(e)?e.some((e=>e.length>1)):e.length>1);function Ar(e){return J(e)}function Lr(e,t){t.split(/\s+/).forEach((t=>t&&e.classList.add(t))),(e[xr]||(e[xr]=new Set)).add(t)}function Or(e,t){t.split(/\s+/).forEach((t=>t&&e.classList.remove(t)));const n=e[xr];n&&(n.delete(t),n.size||(e[xr]=void 0))}function Rr(e){requestAnimationFrame((()=>{requestAnimationFrame(e)}))}let jr=0;function Ir(e,t,n,s){const o=e._endId=++jr,r=()=>{o===e._endId&&s()};if(n)return setTimeout(r,n);const{type:i,timeout:c,propCount:a}=function(e,t){const n=window.getComputedStyle(e),s=e=>(n[e]||"").split(", "),o=s(`${Sr}Delay`),r=s(`${Sr}Duration`),i=zr(o,r),c=s(`${Tr}Delay`),a=s(`${Tr}Duration`),l=zr(c,a);let u=null,d=0,h=0;return t===Sr?i>0&&(u=Sr,d=i,h=r.length):t===Tr?l>0&&(u=Tr,d=l,h=a.length):(d=Math.max(i,l),u=d>0?i>l?Sr:Tr:null,h=u?u===Sr?r.length:a.length:0),{type:u,timeout:d,propCount:h,hasTransform:u===Sr&&/\b(transform|all)(,|$)/.test(s(`${Sr}Property`).toString())}}(e,t);if(!i)return s();const l=i+"end";let u=0;const d=()=>{e.removeEventListener(l,h),r()},h=t=>{t.target===e&&++u>=a&&d()};setTimeout((()=>{uMr(t)+Mr(e[n]))))}function Mr(e){return"auto"===e?0:1e3*Number(e.slice(0,-1).replace(",","."))}const Fr=Symbol("_vod"),Dr=Symbol("_vsh"),Ur=Symbol("");function Qr(e){const t=or();if(!t)return;const n=t.ut=(n=e(t.proxy))=>{Array.from(document.querySelectorAll(`[data-v-owner="${t.uid}"]`)).forEach((e=>$r(e,n)))},s=()=>{const s=e(t.proxy);Nr(t.subTree,s),n(s)};cs((()=>{bo(s,null,{flush:"post"});const e=new MutationObserver(s);e.observe(t.subTree.el.parentNode,{childList:!0}),ds((()=>e.disconnect()))}))}function Nr(e,t){if(128&e.shapeFlag){const n=e.suspense;e=n.activeBranch,n.pendingBranch&&!n.isHydrating&&n.effects.push((()=>{Nr(n.activeBranch,t)}))}for(;e.component;)e=e.component.subTree;if(1&e.shapeFlag&&e.el)$r(e.el,t);else if(e.type===Lo)e.children.forEach((e=>Nr(e,t)));else if(e.type===jo){let{el:n,anchor:s}=e;for(;n&&($r(n,t),n!==s);)n=n.nextSibling}}function $r(e,t){if(1===e.nodeType){const n=e.style;let s="";for(const e in t)n.setProperty(`--${e}`,t[e]),s+=`--${e}: ${t[e]};`;n[Ur]=s}}const Br=/(^|;)\s*display\s*:/,Wr=/\s*!important$/;function Vr(e,t,n){if(T(n))n.forEach((n=>Vr(e,t,n)));else if(null==n&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const s=function(e,t){const n=qr[t];if(n)return n;let s=U(t);if("filter"!==s&&s in e)return qr[t]=s;s=$(s);for(let n=0;nYr||(Xr.then((()=>Yr=0)),Yr=Date.now()),ti=e=>111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123;"undefined"!=typeof HTMLElement&&HTMLElement,Symbol("_moveCb"),Symbol("_enterCb"),Symbol("_assign");const ni=v({patchProp:(e,t,n,s,o,r)=>{const i="svg"===o;"class"===t?function(e,t,n){const s=e[xr];s&&(t=(t?[t,...s]:[...s]).join(" ")),null==t?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}(e,s,i):"style"===t?function(e,t,n){const s=e.style,o=E(n);let r=!1;if(n&&!o){if(t)if(E(t))for(const e of t.split(";")){const t=e.slice(0,e.indexOf(":")).trim();null==n[t]&&Vr(s,t,"")}else for(const e in t)null==n[e]&&Vr(s,e,"");for(const e in n)"display"===e&&(r=!0),Vr(s,e,n[e])}else if(o){if(t!==n){const e=s[Ur];e&&(n+=";"+e),s.cssText=n,r=Br.test(n)}}else t&&e.removeAttribute("style");Fr in e&&(e[Fr]=r?s.display:"",e[Dr]&&(s.display="none"))}(e,n,s):g(t)?b(t)||function(e,t,n,s,o=null){const r=e[Kr]||(e[Kr]={}),i=r[t];if(s&&i)i.value=s;else{const[n,c]=function(e){let t;if(Zr.test(e)){let n;for(t={};n=e.match(Zr);)e=e.slice(0,e.length-n[0].length),t[n[0].toLowerCase()]=!0}return[":"===e[2]?e.slice(3):N(e.slice(2)),t]}(t);if(s){const i=r[t]=function(e,t){const n=e=>{if(e._vts){if(e._vts<=n.attached)return}else e._vts=Date.now();fn(function(e,t){if(T(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map((e=>t=>!t._stopped&&e&&e(t)))}return t}(e,n.value),t,5,[e])};return n.value=e,n.attached=ei(),n}(s,o);!function(e,t,n,s){e.addEventListener(t,n,s)}(e,n,i,c)}else i&&(function(e,t,n,s){e.removeEventListener(t,n,s)}(e,n,i,c),r[t]=void 0)}}(e,t,0,s,r):("."===t[0]?(t=t.slice(1),1):"^"===t[0]?(t=t.slice(1),0):function(e,t,n,s){if(s)return"innerHTML"===t||"textContent"===t||!!(t in e&&ti(t)&&k(n));if("spellcheck"===t||"draggable"===t||"translate"===t)return!1;if("form"===t)return!1;if("list"===t&&"INPUT"===e.tagName)return!1;if("type"===t&&"TEXTAREA"===e.tagName)return!1;if("width"===t||"height"===t){const t=e.tagName;if("IMG"===t||"VIDEO"===t||"CANVAS"===t||"SOURCE"===t)return!1}return(!ti(t)||!E(n))&&t in e}(e,t,s,i))?(function(e,t,n){if("innerHTML"===t||"textContent"===t){if(null==n)return;return void(e[t]=n)}const s=e.tagName;if("value"===t&&"PROGRESS"!==s&&!s.includes("-")){const o="OPTION"===s?e.getAttribute("value")||"":e.value,r=null==n?"":String(n);return o===r&&"_value"in e||(e.value=r),null==n&&e.removeAttribute(t),void(e._value=n)}let o=!1;if(""===n||null==n){const s=typeof e[t];"boolean"===s?n=oe(n):null==n&&"string"===s?(n="",o=!0):"number"===s&&(n=0,o=!0)}try{e[t]=n}catch(e){}o&&e.removeAttribute(t)}(e,t,s),e.tagName.includes("-")||"value"!==t&&"checked"!==t&&"selected"!==t||Gr(e,t,s,i,0,"value"!==t)):("true-value"===t?e._trueValue=s:"false-value"===t&&(e._falseValue=s),Gr(e,t,s,i))}},yr);let si;const oi=(e=>(Mn("data-v-3a168de6"),e=e(),Fn(),e))((()=>Ho("div",{class:"wg-loader"},null,-1))),ri={__name:"Loader",setup:e=>(Qr((e=>({ac1a6266:Ot(hn).style.colors.midnight,d5b65788:Ot(hn).style.colors.lightGray}))),(e,t)=>t[0]||(Do(-1),(t[0]=Ho("div",{class:"wg-loader-p"},[oi])).cacheIndex=0,Do(1),t[0]))};var ii=n(72),ci=n.n(ii),ai=n(825),li=n.n(ai),ui=n(659),di=n.n(ui),hi=n(56),pi=n.n(hi),fi=n(540),_i=n.n(fi),mi=n(113),gi=n.n(mi),bi=n(236),vi={};vi.styleTagTransform=gi(),vi.setAttributes=pi(),vi.insert=di().bind(null,"head"),vi.domAPI=li(),vi.insertStyleElement=_i(),ci()(bi.A,vi),bi.A&&bi.A.locals&&bi.A.locals;var wi=n(374);const yi=(0,wi.A)(ri,[["__scopeId","data-v-3a168de6"]]),Si={class:"wg-widget-title"},Ti={__name:"TitleInfo",props:{match:{type:Object,required:!0}},setup:e=>(Qr((e=>({"66e33070":Ot(hn).style.colors.primary_black,"5b7fdb8b":Ot(hn).style.fonts.medium,"1d2a5646":Ot(hn).style.fonts.regular}))),(t,n)=>(Mo(),Qo(Lo,null,[Ko(" prettier-ignore "),Ho("div",Si,[Ho("span",null,ie(`${e.match?.date} ${e.match?.time}`),1),Go(" | "),Ho("span",null,ie(e.match?.league?.country),1),Go(" | "),Ho("span",null,ie(e.match?.league?.name),1)])],2112)))};var xi=n(449),Ci={};Ci.styleTagTransform=gi(),Ci.setAttributes=pi(),Ci.insert=di().bind(null,"head"),Ci.domAPI=li(),Ci.insertStyleElement=_i(),ci()(xi.A,Ci),xi.A&&xi.A.locals&&xi.A.locals;const ki=(0,wi.A)(Ti,[["__scopeId","data-v-559a7950"]]),Ei={class:"wg-widget-command"},Pi=["src","alt"],Ai={class:"wg-widget-command__name"},Li={__name:"Command",props:{img:{type:String,required:!0},name:{type:String,required:!0}},setup:e=>(Qr((e=>({"48c6238d":Ot(hn).style.colors.primary_black,"6a023ba8":Ot(hn).style.fonts.medium,"59dd104d":Ot(hn).style.fonts.medium500}))),(t,n)=>(Mo(),Qo("div",Ei,[e.img?(Mo(),Qo("img",{key:0,src:e.img,alt:e.name,class:"wg-widget-command__icon",width:"20",height:"20"},null,8,Pi)):Ko("v-if",!0),Ho("div",Ai,ie(e.name),1)])))};var Oi=n(21),Ri={};Ri.styleTagTransform=gi(),Ri.setAttributes=pi(),Ri.insert=di().bind(null,"head"),Ri.domAPI=li(),Ri.insertStyleElement=_i(),ci()(Oi.A,Ri),Oi.A&&Oi.A.locals&&Oi.A.locals;const ji=(0,wi.A)(Li,[["__scopeId","data-v-d0329ce8"]]);function Ii(e,t,n){const s=hn.debug;let o=-1;return go(e,((r,i)=>{const c=r-i;var a;t.value=0===(a=c)?"":0{t.value=""}),0{t.value=0{let n=e??-1;return n<0?Fi[5]:(t&&90({"462d4044":Ot(hn).style.colors.primary_grey,"7361240c":Ot(hn).style.fonts.large32,"6643421c":Ot(hn).style.fonts.bold700,cb42d28a:Ot(hn).style.colors.green,"323e0e49":Ot(hn).style.colors.red,"7f31873a":Ot(hn).style.colors.primary_black,"98b34ad4":Ot(hn).style.colors.white_secondary,"108e9c55":Ot(hn).style.fonts.medium,"09f3aebc":Ot(hn).style.fonts.regular,e3d9fbdc:Ot(hn).style.colors.secondary_grey})));const t=e,n=gr((()=>function(e){const t=()=>Ft===e.stage,n=()=>e.home.score-e.away.score,s={home:{val:gr((()=>t()?Mi:e.home.score??Mi)),win:At(0t()?Mi:e.away.score??Mi)),win:At(0<-1*n()),way:At("")}};return Ii(Mt(e.home,"score"),s.home.way,`REACTIVE updated home score (${e.time}, ${e.slug})`),Ii(Mt(e.away,"score"),s.away.way,`REACTIVE updated away score (${e.time}, ${e.slug})`),zi(n,s.home.win,`REACTIVE updated home win (${e.time}, ${e.slug})`),zi((()=>-1*n()),s.away.win,`REACTIVE updated away win (${e.time}, ${e.slug})`),s}(t.match))),s=gr((()=>function(e){const t=hn.debug,n=gr((()=>{const t=(n=e.stage,{[Ft]:"",[Dt]:Di,[Jt]:Di,[Gt]:Di,[Ht]:Ui[1],[qt]:Ui[11],[Xt]:Ui[12],[en]:Ui[9],[tn]:Ui[10],[Ut]:Ui[4],[$t]:Ui[0],[Bt]:Ui[6],[Wt]:Ui[7],[Vt]:Ui[8],[Qt]:Ui[3],[Nt]:Ui[2]}[n]??"?");var n;return"function"==typeof t?t(e.matchTime):t}));return t&&go(n,(()=>{console.log(`REACTIVE updated status (${e.time}, ${e.slug})`,n.value,e.live)})),n}(t.match))),o=gr((()=>t.match?.live));return(t,r)=>(Mo(),Qo("div",Qi,[Ho("div",Ni,[(Mo(!0),Qo(Lo,null,gs(e.teams,((e,t)=>(Mo(),Qo(Lo,{key:e},[Ho("span",{class:ne(["wg-score__count",{[`wg-${n.value[e].way.value}-score`]:n.value[e].way.value,"wg-green":n.value[e].win.value}])},ie(n.value[e].val.value),3),t?Ko("v-if",!0):(Mo(),Qo("span",$i,":"))],64)))),128))]),Ko(" prettier-ignore "),Ho("div",{class:ne(["wg-status",{"wg-live":o.value}])},[Ko(" remove live class to see other styles like for finished condition "),Go(" "+ie(s.value),1)],2)]))}};var Wi=n(783),Vi={};Vi.styleTagTransform=gi(),Vi.setAttributes=pi(),Vi.insert=di().bind(null,"head"),Vi.domAPI=li(),Vi.insertStyleElement=_i(),ci()(Wi.A,Vi),Wi.A&&Wi.A.locals&&Wi.A.locals;const Hi=(0,wi.A)(Bi,[["__scopeId","data-v-1780b0c2"]]),qi={class:"wg-widget-placeholder"},Ji=(e=>(Mn("data-v-ab37b148"),e=e(),Fn(),e))((()=>Ho("img",{class:"wg-widget-placeholder__icon",src:"https://widgetlogic.org/v2/img/placeholder-blue.svg",alt:"wg-placeholder-icon"},null,-1))),Gi={__name:"Placeholder",props:{match:{type:[Object,null],required:!0}},setup(e){Qr((e=>({"7125f0f9":Ot(hn).style.colors.white_secondary,f53d7b10:Ot(hn).style.fonts.medium,"2f75ccf9":Ot(hn).style.fonts.regular,"6ae5934f":Ot(hn).style.colors.secondary_grey})));const t=e,n=gr((()=>t.match?hn.widgetMes[1]+` ${t.match?.date} ${t.match?.time} ${t.match?.home?.name} - ${t.match?.away?.name}.`:hn.widgetMes[0]));return(e,t)=>(Mo(),Qo("div",qi,[Ji,Ho("span",null,ie(n.value),1)]))}};var Ki=n(465),Zi={};Zi.styleTagTransform=gi(),Zi.setAttributes=pi(),Zi.insert=di().bind(null,"head"),Zi.domAPI=li(),Zi.insertStyleElement=_i(),ci()(Ki.A,Zi),Ki.A&&Ki.A.locals&&Ki.A.locals;const Yi=(0,wi.A)(Gi,[["__scopeId","data-v-ab37b148"]]),Xi={class:"wg-widget-container"},ec={class:"wgwidget-game__info"},tc=Object.assign({inheritAttrs:!1},{__name:"Widget",props:{match:{type:[Object,null],required:!0}},setup(e){const t=e,n=gr((()=>t.match?.live)),s=gr((()=>!t.match)),o=["home","away"];return(t,r)=>(Mo(),Qo("div",Xi,[n.value?Ko("v-if",!0):(Mo(),No(Yi,{key:0,match:e.match},null,8,["match"])),s.value?Ko("v-if",!0):(Mo(),Qo(Lo,{key:1},[qo(ki,{match:e.match},null,8,["match"]),Ho("div",ec,[(Mo(),Qo(Lo,null,gs(o,((t,n)=>(Mo(),Qo(Lo,{key:t},[qo(ji,{img:e.match[t].img,name:e.match[t].name},null,8,["img","name"]),n?Ko("v-if",!0):(Mo(),No(Hi,{key:0,teams:o,match:e.match},null,8,["match"]))],64)))),64))])],64))]))}});var nc=n(437),sc={};sc.styleTagTransform=gi(),sc.setAttributes=pi(),sc.insert=di().bind(null,"head"),sc.domAPI=li(),sc.insertStyleElement=_i(),ci()(nc.A,sc),nc.A&&nc.A.locals&&nc.A.locals;const oc=(0,wi.A)(tc,[["__scopeId","data-v-71ede5d7"]]),rc={class:"wg-wrapper"},ic={key:0,style:{font:"normal 11px sans-serif"}},cc={key:1},ac={__name:"App",setup(e){Qr((e=>({"027a15d2":Ot(hn).style.fonts.main_font})));const t=hn.debug,{empty:n}=hn,s=gr((()=>!Object.values(ln.matches).length)),o=gr((()=>{const e=(e=>{const n=[...sn],s=[...n,Ut,Ft];let o=null,r=null;const i=localStorage,c=!!i,a=c?i.getItem("matchSlug"):null,l=t=>{for(let n in e)if(t.includes(ln.matches[n].stage))return e[n];return null};if(t&&console.log("selectedMatch",a),a)if(o=e[a],o&&s.includes(o.stage)){if(o&&!n.includes(o.stage)&&(r=l(n),r&&i.removeItem("matchSlug")),!r)return t&&console.log("stored match",o),o}else o&&!s.includes(o.stage)&&un(),i.removeItem("matchSlug");return r||(r=l(n)),o=r||l(s),o&&c&&i.setItem("matchSlug",o.slug),t&&console.log("match",o),o})(ln.matches);return hn.matchSlug=e?e.slug:null,hn.resetAutoUpdate(),e}));return(e,t)=>(Mo(),Qo("div",rc,[Ot(ln).loading?(Mo(),Qo("div",ic,[qo(yi)])):(Mo(),Qo("div",cc,[s.value?(Mo(),Qo(Lo,{key:0},[Go(ie(Ot(n)),1)],64)):(Mo(),No(oc,{key:1,match:o.value},null,8,["match"]))]))]))}};var lc=n(607),uc={};uc.styleTagTransform=gi(),uc.setAttributes=pi(),uc.insert=di().bind(null,"head"),uc.domAPI=li(),uc.insertStyleElement=_i(),ci()(lc.A,uc),lc.A&&lc.A.locals&&lc.A.locals;const dc=(0,wi.A)(ac,[["__scopeId","data-v-1715325d"]]),hc=e=>{console.log("start mounting...");const t=document.createElement("div");t.id=hn.mainId,e.after(t),e.remove(),((...e)=>{const t=(si||(si=function(e){return co(e)}(ni))).createApp(...e),{mount:n}=t;return t.mount=e=>{const s=function(e){return E(e)?document.querySelector(e):e}(e);if(!s)return;const o=t._component;k(o)||o.render||o.template||(o.template=s.innerHTML),s.innerHTML="";const r=n(s,!1,function(e){return e instanceof SVGElement?"svg":"function"==typeof MathMLElement&&e instanceof MathMLElement?"mathml":void 0}(s));return s instanceof Element&&(s.removeAttribute("v-cloak"),s.setAttribute("data-v-app","")),r},t})(dc).mount(`#${hn.mainId}`),hn.debug=!1};function pc(e,t,n,s){return new(n||(n=Promise))((function(o,r){function i(e){try{a(s.next(e))}catch(e){r(e)}}function c(e){try{a(s.throw(e))}catch(e){r(e)}}function a(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,c)}a((s=s.apply(e,t||[])).next())}))}function fc(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}"function"==typeof SuppressedError&&SuppressedError;var _c,mc={exports:{}},gc="object"==typeof Reflect?Reflect:null,bc=gc&&"function"==typeof gc.apply?gc.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};_c=gc&&"function"==typeof gc.ownKeys?gc.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var vc=Number.isNaN||function(e){return e!=e};function wc(){wc.init.call(this)}mc.exports=wc,mc.exports.once=function(e,t){return new Promise((function(n,s){function o(n){e.removeListener(t,r),s(n)}function r(){"function"==typeof e.removeListener&&e.removeListener("error",o),n([].slice.call(arguments))}Lc(e,t,r,{once:!0}),"error"!==t&&function(e,t){"function"==typeof e.on&&Lc(e,"error",t,{once:!0})}(e,o)}))},wc.EventEmitter=wc,wc.prototype._events=void 0,wc.prototype._eventsCount=0,wc.prototype._maxListeners=void 0;var yc=10;function Sc(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function Tc(e){return void 0===e._maxListeners?wc.defaultMaxListeners:e._maxListeners}function xc(e,t,n,s){var o,r,i,c;if(Sc(n),void 0===(r=e._events)?(r=e._events=Object.create(null),e._eventsCount=0):(void 0!==r.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),r=e._events),i=r[t]),void 0===i)i=r[t]=n,++e._eventsCount;else if("function"==typeof i?i=r[t]=s?[n,i]:[i,n]:s?i.unshift(n):i.push(n),(o=Tc(e))>0&&i.length>o&&!i.warned){i.warned=!0;var a=new Error("Possible EventEmitter memory leak detected. "+i.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");a.name="MaxListenersExceededWarning",a.emitter=e,a.type=t,a.count=i.length,c=a,console&&console.warn&&console.warn(c)}return e}function Cc(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function kc(e,t,n){var s={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},o=Cc.bind(s);return o.listener=n,s.wrapFn=o,o}function Ec(e,t,n){var s=e._events;if(void 0===s)return[];var o=s[t];return void 0===o?[]:"function"==typeof o?n?[o.listener||o]:[o]:n?function(e){for(var t=new Array(e.length),n=0;n0&&(r=t[0]),r instanceof Error)throw r;var i=new Error("Unhandled error."+(r?" ("+r.message+")":""));throw i.context=r,i}var c=o[e];if(void 0===c)return!1;if("function"==typeof c)bc(c,this,t);else{var a=c.length,l=Ac(c,a);for(n=0;n=0;r--)if(n[r]===t||n[r].listener===t){i=n[r].listener,o=r;break}if(o<0)return this;0===o?n.shift():function(e,t){for(;t+1=0;s--)this.removeListener(e,t[s]);return this},wc.prototype.listeners=function(e){return Ec(this,e,!0)},wc.prototype.rawListeners=function(e){return Ec(this,e,!1)},wc.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):Pc.call(e,t)},wc.prototype.listenerCount=Pc,wc.prototype.eventNames=function(){return this._eventsCount>0?_c(this._events):[]};var Oc,Rc,jc,Ic,zc,Mc,Fc,Dc=fc(mc.exports);function Uc(e){return null!=e&&"function"==typeof e}function Qc(e,t,n){e>31&&(e=31);const s=function(e,t){return Math.floor(Math.random()*(t-0+1)+0)}(0,Math.min(n,t*Math.pow(2,e)));return Math.min(n,t+s)}function Nc(e){return Math.min(1e3*e,2147483647)}!function(e){e[e.timeout=1]="timeout",e[e.transportClosed=2]="transportClosed",e[e.clientDisconnected=3]="clientDisconnected",e[e.clientClosed=4]="clientClosed",e[e.clientConnectToken=5]="clientConnectToken",e[e.clientRefreshToken=6]="clientRefreshToken",e[e.subscriptionUnsubscribed=7]="subscriptionUnsubscribed",e[e.subscriptionSubscribeToken=8]="subscriptionSubscribeToken",e[e.subscriptionRefreshToken=9]="subscriptionRefreshToken",e[e.transportWriteError=10]="transportWriteError",e[e.connectionClosed=11]="connectionClosed",e[e.badConfiguration=12]="badConfiguration"}(Oc||(Oc={})),function(e){e[e.connectCalled=0]="connectCalled",e[e.transportClosed=1]="transportClosed",e[e.noPing=2]="noPing",e[e.subscribeTimeout=3]="subscribeTimeout",e[e.unsubscribeError=4]="unsubscribeError"}(Rc||(Rc={})),function(e){e[e.disconnectCalled=0]="disconnectCalled",e[e.unauthorized=1]="unauthorized",e[e.badProtocol=2]="badProtocol",e[e.messageSizeLimit=3]="messageSizeLimit"}(jc||(jc={})),function(e){e[e.subscribeCalled=0]="subscribeCalled",e[e.transportClosed=1]="transportClosed"}(Ic||(Ic={})),function(e){e[e.unsubscribeCalled=0]="unsubscribeCalled",e[e.unauthorized=1]="unauthorized",e[e.clientClosed=2]="clientClosed"}(zc||(zc={})),function(e){e.Disconnected="disconnected",e.Connecting="connecting",e.Connected="connected"}(Mc||(Mc={})),function(e){e.Unsubscribed="unsubscribed",e.Subscribing="subscribing",e.Subscribed="subscribed"}(Fc||(Fc={}));class $c extends Dc{constructor(e,t,n){super(),this._resubscribeTimeout=null,this._refreshTimeout=null,this.channel=t,this.state=Fc.Unsubscribed,this._centrifuge=e,this._token="",this._getToken=null,this._data=null,this._getData=null,this._recover=!1,this._offset=null,this._epoch=null,this._recoverable=!1,this._positioned=!1,this._joinLeave=!1,this._minResubscribeDelay=500,this._maxResubscribeDelay=2e4,this._resubscribeTimeout=null,this._resubscribeAttempts=0,this._promises={},this._promiseId=0,this._inflight=!1,this._refreshTimeout=null,this._delta="",this._delta_negotiated=!1,this._prevValue=null,this._unsubPromise=Promise.resolve(),this._setOptions(n),this._centrifuge._debugEnabled?(this.on("state",(e=>{this._centrifuge._debug("subscription state",t,e.oldState,"->",e.newState)})),this.on("error",(e=>{this._centrifuge._debug("subscription error",t,e)}))):this.on("error",(function(){Function.prototype()}))}ready(e){return this.state===Fc.Unsubscribed?Promise.reject({code:Oc.subscriptionUnsubscribed,message:this.state}):this.state===Fc.Subscribed?Promise.resolve():new Promise(((t,n)=>{const s={resolve:t,reject:n};e&&(s.timeout=setTimeout((function(){n({code:Oc.timeout,message:"timeout"})}),e)),this._promises[this._nextPromiseId()]=s}))}subscribe(){this._isSubscribed()||(this._resubscribeAttempts=0,this._setSubscribing(Ic.subscribeCalled,"subscribe called"))}unsubscribe(){this._unsubPromise=this._setUnsubscribed(zc.unsubscribeCalled,"unsubscribe called",!0)}publish(e){const t=this;return this._methodCall().then((function(){return t._centrifuge.publish(t.channel,e)}))}presence(){const e=this;return this._methodCall().then((function(){return e._centrifuge.presence(e.channel)}))}presenceStats(){const e=this;return this._methodCall().then((function(){return e._centrifuge.presenceStats(e.channel)}))}history(e){const t=this;return this._methodCall().then((function(){return t._centrifuge.history(t.channel,e)}))}_methodCall(){return this._isSubscribed()?Promise.resolve():this._isUnsubscribed()?Promise.reject({code:Oc.subscriptionUnsubscribed,message:this.state}):new Promise(((e,t)=>{const n=setTimeout((function(){t({code:Oc.timeout,message:"timeout"})}),this._centrifuge._config.timeout);this._promises[this._nextPromiseId()]={timeout:n,resolve:e,reject:t}}))}_nextPromiseId(){return++this._promiseId}_needRecover(){return!0===this._recover}_isUnsubscribed(){return this.state===Fc.Unsubscribed}_isSubscribing(){return this.state===Fc.Subscribing}_isSubscribed(){return this.state===Fc.Subscribed}_setState(e){if(this.state!==e){const t=this.state;return this.state=e,this.emit("state",{newState:e,oldState:t,channel:this.channel}),!0}return!1}_usesToken(){return""!==this._token||null!==this._getToken}_clearSubscribingState(){this._resubscribeAttempts=0,this._clearResubscribeTimeout()}_clearSubscribedState(){this._clearRefreshTimeout()}_setSubscribed(e){if(!this._isSubscribing())return;this._clearSubscribingState(),e.recoverable&&(this._recover=!0,this._offset=e.offset||0,this._epoch=e.epoch||""),e.delta?this._delta_negotiated=!0:this._delta_negotiated=!1,this._setState(Fc.Subscribed);const t=this._centrifuge._getSubscribeContext(this.channel,e);this.emit("subscribed",t),this._resolvePromises();const n=e.publications;if(n&&n.length>0)for(const e in n)n.hasOwnProperty(e)&&this._handlePublication(n[e]);!0===e.expires&&(this._refreshTimeout=setTimeout((()=>this._refresh()),Nc(e.ttl)))}_setSubscribing(e,t){return pc(this,void 0,void 0,(function*(){this._isSubscribing()||(this._isSubscribed()&&this._clearSubscribedState(),this._setState(Fc.Subscribing)&&this.emit("subscribing",{channel:this.channel,code:e,reason:t}),this._centrifuge._transport&&this._centrifuge._transport.emulation()&&(yield this._unsubPromise),this._isSubscribing()&&this._subscribe())}))}_subscribe(){if(this._centrifuge._debug("subscribing on",this.channel),!this._centrifuge._transportIsOpen)return this._centrifuge._debug("delay subscribe on",this.channel,"till connected"),null;const e=this,t={channel:e.channel};return!this._usesToken()||this._token?e._getData?(e._getData(t).then((function(t){e._isSubscribing()&&(e._data=t,e._sendSubscribe(e._token))})),null):e._sendSubscribe(e._token):(this._getSubscriptionToken().then((function(n){e._isSubscribing()&&(n?(e._token=n,e._getData?e._getData(t).then((function(t){e._isSubscribing()&&(e._data=t,e._sendSubscribe(n))})):e._sendSubscribe(n)):e._failUnauthorized())})).catch((function(t){e._isSubscribing()&&(t instanceof ea?e._failUnauthorized():(e.emit("error",{type:"subscribeToken",channel:e.channel,error:{code:Oc.subscriptionSubscribeToken,message:void 0!==t?t.toString():""}}),e._scheduleResubscribe()))})),null)}_sendSubscribe(e){if(!this._centrifuge._transportIsOpen)return null;const t={channel:this.channel};if(e&&(t.token=e),this._data&&(t.data=this._data),this._positioned&&(t.positioned=!0),this._recoverable&&(t.recoverable=!0),this._joinLeave&&(t.join_leave=!0),this._needRecover()){t.recover=!0;const e=this._getOffset();e&&(t.offset=e);const n=this._getEpoch();n&&(t.epoch=n)}this._delta&&(t.delta=this._delta);const n={subscribe:t};return this._inflight=!0,this._centrifuge._call(n).then((e=>{this._inflight=!1;const t=e.reply.subscribe;this._handleSubscribeResponse(t),e.next&&e.next()}),(e=>{this._inflight=!1,this._handleSubscribeError(e.error),e.next&&e.next()})),n}_handleSubscribeError(e){this._isSubscribing()&&(e.code!==Oc.timeout?this._subscribeError(e):this._centrifuge._disconnect(Rc.subscribeTimeout,"subscribe timeout",!0))}_handleSubscribeResponse(e){this._isSubscribing()&&this._setSubscribed(e)}_setUnsubscribed(e,t,n){if(this._isUnsubscribed())return Promise.resolve();let s=Promise.resolve();return this._isSubscribed()?(n&&(s=this._centrifuge._unsubscribe(this)),this._clearSubscribedState()):this._isSubscribing()&&(this._inflight&&n&&(s=this._centrifuge._unsubscribe(this)),this._clearSubscribingState()),this._setState(Fc.Unsubscribed)&&this.emit("unsubscribed",{channel:this.channel,code:e,reason:t}),this._rejectPromises({code:Oc.subscriptionUnsubscribed,message:this.state}),s}_handlePublication(e){if(this._delta&&this._delta_negotiated){const{newData:t,newPrevValue:n}=this._centrifuge._codec.applyDeltaIfNeeded(e,this._prevValue);e.data=t,this._prevValue=n}const t=this._centrifuge._getPublicationContext(this.channel,e);this.emit("publication",t),e.offset&&(this._offset=e.offset)}_handleJoin(e){const t=this._centrifuge._getJoinLeaveContext(e.info);this.emit("join",{channel:this.channel,info:t})}_handleLeave(e){const t=this._centrifuge._getJoinLeaveContext(e.info);this.emit("leave",{channel:this.channel,info:t})}_resolvePromises(){for(const e in this._promises)this._promises.hasOwnProperty(e)&&(this._promises[e].timeout&&clearTimeout(this._promises[e].timeout),this._promises[e].resolve(),delete this._promises[e])}_rejectPromises(e){for(const t in this._promises)this._promises.hasOwnProperty(t)&&(this._promises[t].timeout&&clearTimeout(this._promises[t].timeout),this._promises[t].reject(e),delete this._promises[t])}_scheduleResubscribe(){const e=this,t=this._getResubscribeDelay();this._resubscribeTimeout=setTimeout((function(){e._isSubscribing()&&e._subscribe()}),t)}_subscribeError(e){if(this._isSubscribing())if(e.code<100||109===e.code||!0===e.temporary){109===e.code&&(this._token="");const t={channel:this.channel,type:"subscribe",error:e};this._centrifuge.state===Mc.Connected&&this.emit("error",t),this._scheduleResubscribe()}else this._setUnsubscribed(e.code,e.message,!1)}_getResubscribeDelay(){const e=Qc(this._resubscribeAttempts,this._minResubscribeDelay,this._maxResubscribeDelay);return this._resubscribeAttempts++,e}_setOptions(e){if(e&&(e.since&&(this._offset=e.since.offset,this._epoch=e.since.epoch,this._recover=!0),e.data&&(this._data=e.data),e.getData&&(this._getData=e.getData),void 0!==e.minResubscribeDelay&&(this._minResubscribeDelay=e.minResubscribeDelay),void 0!==e.maxResubscribeDelay&&(this._maxResubscribeDelay=e.maxResubscribeDelay),e.token&&(this._token=e.token),e.getToken&&(this._getToken=e.getToken),!0===e.positioned&&(this._positioned=!0),!0===e.recoverable&&(this._recoverable=!0),!0===e.joinLeave&&(this._joinLeave=!0),e.delta)){if("fossil"!==e.delta)throw new Error("unsupported delta format");this._delta=e.delta}}_getOffset(){const e=this._offset;return null!==e?e:0}_getEpoch(){const e=this._epoch;return null!==e?e:""}_clearRefreshTimeout(){null!==this._refreshTimeout&&(clearTimeout(this._refreshTimeout),this._refreshTimeout=null)}_clearResubscribeTimeout(){null!==this._resubscribeTimeout&&(clearTimeout(this._resubscribeTimeout),this._resubscribeTimeout=null)}_getSubscriptionToken(){this._centrifuge._debug("get subscription token for channel",this.channel);const e={channel:this.channel},t=this._getToken;if(null===t)throw this.emit("error",{type:"configuration",channel:this.channel,error:{code:Oc.badConfiguration,message:"provide a function to get channel subscription token"}}),new ea("");return t(e)}_refresh(){this._clearRefreshTimeout();const e=this;this._getSubscriptionToken().then((function(t){if(!e._isSubscribed())return;if(!t)return void e._failUnauthorized();e._token=t;const n={sub_refresh:{channel:e.channel,token:t}};e._centrifuge._call(n).then((t=>{const n=t.reply.sub_refresh;e._refreshResponse(n),t.next&&t.next()}),(t=>{e._refreshError(t.error),t.next&&t.next()}))})).catch((function(t){t instanceof ea?e._failUnauthorized():(e.emit("error",{type:"refreshToken",channel:e.channel,error:{code:Oc.subscriptionRefreshToken,message:void 0!==t?t.toString():""}}),e._refreshTimeout=setTimeout((()=>e._refresh()),e._getRefreshRetryDelay()))}))}_refreshResponse(e){this._isSubscribed()&&(this._centrifuge._debug("subscription token refreshed, channel",this.channel),this._clearRefreshTimeout(),!0===e.expires&&(this._refreshTimeout=setTimeout((()=>this._refresh()),Nc(e.ttl))))}_refreshError(e){this._isSubscribed()&&(e.code<100||!0===e.temporary?(this.emit("error",{type:"refresh",channel:this.channel,error:e}),this._refreshTimeout=setTimeout((()=>this._refresh()),this._getRefreshRetryDelay())):this._setUnsubscribed(e.code,e.message,!0))}_getRefreshRetryDelay(){return Qc(0,1e4,2e4)}_failUnauthorized(){this._setUnsubscribed(zc.unauthorized,"unauthorized",!0)}}class Bc{constructor(e,t){this.endpoint=e,this.options=t,this._transport=null}name(){return"sockjs"}subName(){return"sockjs-"+this._transport.transport}emulation(){return!1}supported(){return null!==this.options.sockjs}initialize(e,t){this._transport=new this.options.sockjs(this.endpoint,null,this.options.sockjsOptions),this._transport.onopen=()=>{t.onOpen()},this._transport.onerror=e=>{t.onError(e)},this._transport.onclose=e=>{t.onClose(e)},this._transport.onmessage=e=>{t.onMessage(e.data)}}close(){this._transport.close()}send(e){this._transport.send(e)}}class Wc{constructor(e,t){this.endpoint=e,this.options=t,this._transport=null}name(){return"websocket"}subName(){return"websocket"}emulation(){return!1}supported(){return void 0!==this.options.websocket&&null!==this.options.websocket}initialize(e,t){let n="";"protobuf"===e&&(n="centrifuge-protobuf"),this._transport=""!==n?new this.options.websocket(this.endpoint,n):new this.options.websocket(this.endpoint),"protobuf"===e&&(this._transport.binaryType="arraybuffer"),this._transport.onopen=()=>{t.onOpen()},this._transport.onerror=e=>{t.onError(e)},this._transport.onclose=e=>{t.onClose(e)},this._transport.onmessage=e=>{t.onMessage(e.data)}}close(){this._transport.close()}send(e){this._transport.send(e)}}class Vc{constructor(e,t){this.endpoint=e,this.options=t,this._abortController=null,this._utf8decoder=new TextDecoder,this._protocol="json"}name(){return"http_stream"}subName(){return"http_stream"}emulation(){return!0}_handleErrors(e){if(!e.ok)throw new Error(e.status);return e}_fetchEventTarget(e,t,n){const s=new EventTarget;return(0,e.options.fetch)(t,n).then(e._handleErrors).then((t=>{s.dispatchEvent(new Event("open"));let n="",o=0,r=new Uint8Array;const i=t.body.getReader();return new e.options.readableStream({start:t=>function c(){return i.read().then((({done:i,value:a})=>{if(i)return s.dispatchEvent(new Event("close")),void t.close();try{if("json"===e._protocol)for(n+=e._utf8decoder.decode(a);o{s.dispatchEvent(new Event("error",{detail:e})),s.dispatchEvent(new Event("close"))})),s}supported(){return null!==this.options.fetch&&null!==this.options.readableStream&&"undefined"!=typeof TextDecoder&&"undefined"!=typeof AbortController&&"undefined"!=typeof EventTarget&&"undefined"!=typeof Event&&"undefined"!=typeof MessageEvent&&"undefined"!=typeof Error}initialize(e,t,n){let s,o;this._protocol=e,this._abortController=new AbortController,"json"===e?(s={Accept:"application/json","Content-Type":"application/json"},o=n):(s={Accept:"application/octet-stream","Content-Type":"application/octet-stream"},o=n);const r={method:"POST",headers:s,body:o,mode:"cors",credentials:"same-origin",cache:"no-cache",signal:this._abortController.signal},i=this._fetchEventTarget(this,this.endpoint,r);i.addEventListener("open",(()=>{t.onOpen()})),i.addEventListener("error",(e=>{this._abortController.abort(),t.onError(e)})),i.addEventListener("close",(()=>{this._abortController.abort(),t.onClose({code:4,reason:"connection closed"})})),i.addEventListener("message",(e=>{t.onMessage(e.data)}))}close(){this._abortController.abort()}send(e,t,n){let s,o;const r={session:t,node:n,data:e};"json"===this._protocol?(s={"Content-Type":"application/json"},o=JSON.stringify(r)):(s={"Content-Type":"application/octet-stream"},o=this.options.encoder.encodeEmulationRequest(r));const i={method:"POST",headers:s,body:o,mode:"cors",credentials:"same-origin",cache:"no-cache"};(0,this.options.fetch)(this.options.emulationEndpoint,i)}}class Hc{constructor(e,t){this.endpoint=e,this.options=t,this._protocol="json",this._transport=null,this._onClose=null}name(){return"sse"}subName(){return"sse"}emulation(){return!0}supported(){return null!==this.options.eventsource&&null!==this.options.fetch}initialize(e,t,n){let s;s=globalThis&&globalThis.document&&globalThis.document.baseURI?new URL(this.endpoint,globalThis.document.baseURI):new URL(this.endpoint),s.searchParams.append("cf_connect",n);const o=new this.options.eventsource(s.toString(),{});this._transport=o,o.onopen=function(){t.onOpen()},o.onerror=function(e){o.close(),t.onError(e),t.onClose({code:4,reason:"connection closed"})},o.onmessage=function(e){t.onMessage(e.data)},this._onClose=function(){t.onClose({code:4,reason:"connection closed"})}}close(){this._transport.close(),null!==this._onClose&&this._onClose()}send(e,t,n){const s={session:t,node:n,data:e},o={method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(s),mode:"cors",credentials:"same-origin",cache:"no-cache"};(0,this.options.fetch)(this.options.emulationEndpoint,o)}}class qc{constructor(e,t){this.endpoint=e,this.options=t,this._transport=null,this._stream=null,this._writer=null,this._utf8decoder=new TextDecoder,this._protocol="json"}name(){return"webtransport"}subName(){return"webtransport"}emulation(){return!1}supported(){return void 0!==this.options.webtransport&&null!==this.options.webtransport}initialize(e,t){return pc(this,void 0,void 0,(function*(){let n;n=globalThis&&globalThis.document&&globalThis.document.baseURI?new URL(this.endpoint,globalThis.document.baseURI):new URL(this.endpoint),"protobuf"===e&&n.searchParams.append("cf_protocol","protobuf"),this._protocol=e;const s=new EventTarget;this._transport=new this.options.webtransport(n.toString()),this._transport.closed.then((()=>{t.onClose({code:4,reason:"connection closed"})})).catch((()=>{t.onClose({code:4,reason:"connection closed"})}));try{yield this._transport.ready}catch(e){return void this.close()}let o;try{o=yield this._transport.createBidirectionalStream()}catch(e){return void this.close()}this._stream=o,this._writer=this._stream.writable.getWriter(),s.addEventListener("close",(()=>{t.onClose({code:4,reason:"connection closed"})})),s.addEventListener("message",(e=>{t.onMessage(e.data)})),this._startReading(s),t.onOpen()}))}_startReading(e){return pc(this,void 0,void 0,(function*(){const t=this._stream.readable.getReader();let n="",s=0,o=new Uint8Array;try{for(;;){const{done:r,value:i}=yield t.read();if(i.length>0)if("json"===this._protocol)for(n+=this._utf8decoder.decode(i);sthis.a.length)throw new RangeError("out of bounds");return e}getChar(){return String.fromCharCode(this.getByte())}getInt(){let e,t=0;for(;this.haveBytes()&&(e=Jc[127&this.getByte()])>=0;)t=(t<<6)+e;return this.pos--,t>>>0}}class Kc{constructor(){this.a=[]}toByteArray(e){return Array.isArray(e)?this.a:new Uint8Array(this.a)}putArray(e,t,n){for(let s=t;s=16;)t=t+e[r+0]|0,n=n+e[r+1]|0,s=s+e[r+2]|0,o=o+e[r+3]|0,t=t+e[r+4]|0,n=n+e[r+5]|0,s=s+e[r+6]|0,o=o+e[r+7]|0,t=t+e[r+8]|0,n=n+e[r+9]|0,s=s+e[r+10]|0,o=o+e[r+11]|0,t=t+e[r+12]|0,n=n+e[r+13]|0,s=s+e[r+14]|0,o=o+e[r+15]|0,r+=16,i-=16;for(;i>=4;)t=t+e[r+0]|0,n=n+e[r+1]|0,s=s+e[r+2]|0,o=o+e[r+3]|0,r+=4,i-=4;switch(o=((o+(s<<8)|0)+(n<<16)|0)+(t<<24)|0,i){case 3:o=o+(e[r+2]<<8)|0;case 2:o=o+(e[r+1]<<16)|0;case 1:o=o+(e[r+0]<<24)|0}return o>>>0}class Yc{name(){return"json"}encodeCommands(e){return e.map((e=>JSON.stringify(e))).join("\n")}decodeReplies(e){return e.trim().split("\n").map((e=>JSON.parse(e)))}applyDeltaIfNeeded(e,t){let n,s;if(e.delta){const o=function(e,t){let n=0;const s=new Gc(t),o=e.length,r=t.length,i=s.getInt();if("\n"!==s.getChar())throw new Error("size integer not terminated by '\\n'");const c=new Kc;for(;s.haveBytes();){const t=s.getInt();let a;switch(s.getChar()){case"@":if(a=s.getInt(),s.haveBytes()&&","!==s.getChar())throw new Error("copy command not terminated by ','");if(n+=t,n>i)throw new Error("copy exceeds output file size");if(a+t>o)throw new Error("copy extends past end of input");c.putArray(e,a,a+t);break;case":":if(n+=t,n>i)throw new Error("insert command gives an output larger than predicted");if(t>r)throw new Error("insert count exceeds size of delta");c.putArray(s.a,s.pos,s.pos+t),s.pos+=t;break;case";":{const s=c.toByteArray(e);if(t!==Zc(s))throw new Error("bad checksum");if(n!==i)throw new Error("generated size does not match predicted size");return s}default:throw new Error("unknown delta operator")}}throw new Error("unterminated delta")}(t,(new TextEncoder).encode(e.data));n=JSON.parse((new TextDecoder).decode(o)),s=o}else n=JSON.parse(e.data),s=(new TextEncoder).encode(e.data);return{newData:n,newPrevValue:s}}}const Xc={token:"",getToken:null,data:null,getData:null,debug:!1,name:"js",version:"",fetch:null,readableStream:null,websocket:null,eventsource:null,sockjs:null,sockjsOptions:{},emulationEndpoint:"/emulation",minReconnectDelay:500,maxReconnectDelay:2e4,timeout:5e3,maxServerPingDelay:1e4,networkEventTarget:null};class ea extends Error{constructor(e){super(e),this.name=this.constructor.name}}class ta extends Dc{constructor(e,t){super(),this._reconnectTimeout=null,this._refreshTimeout=null,this._serverPingTimeout=null,this.state=Mc.Disconnected,this._transportIsOpen=!1,this._endpoint=e,this._emulation=!1,this._transports=[],this._currentTransportIndex=0,this._triedAllTransports=!1,this._transportWasOpen=!1,this._transport=null,this._transportId=0,this._deviceWentOffline=!1,this._transportClosed=!0,this._codec=new Yc,this._reconnecting=!1,this._reconnectTimeout=null,this._reconnectAttempts=0,this._client=null,this._session="",this._node="",this._subs={},this._serverSubs={},this._commandId=0,this._commands=[],this._batching=!1,this._refreshRequired=!1,this._refreshTimeout=null,this._callbacks={},this._token="",this._data=null,this._dispatchPromise=Promise.resolve(),this._serverPing=0,this._serverPingTimeout=null,this._sendPong=!1,this._promises={},this._promiseId=0,this._debugEnabled=!1,this._networkEventsSet=!1,this._config=Object.assign(Object.assign({},Xc),t),this._configure(),this._debugEnabled?(this.on("state",(e=>{this._debug("client state",e.oldState,"->",e.newState)})),this.on("error",(e=>{this._debug("client error",e)}))):this.on("error",(function(){Function.prototype()}))}newSubscription(e,t){if(null!==this.getSubscription(e))throw new Error("Subscription to the channel "+e+" already exists");const n=new $c(this,e,t);return this._subs[e]=n,n}getSubscription(e){return this._getSub(e)}removeSubscription(e){e&&(e.state!==Fc.Unsubscribed&&e.unsubscribe(),this._removeSubscription(e))}subscriptions(){return this._subs}ready(e){return this.state===Mc.Disconnected?Promise.reject({code:Oc.clientDisconnected,message:"client disconnected"}):this.state===Mc.Connected?Promise.resolve():new Promise(((t,n)=>{const s={resolve:t,reject:n};e&&(s.timeout=setTimeout((function(){n({code:Oc.timeout,message:"timeout"})}),e)),this._promises[this._nextPromiseId()]=s}))}connect(){this._isConnected()?this._debug("connect called when already connected"):this._isConnecting()?this._debug("connect called when already connecting"):(this._debug("connect called"),this._reconnectAttempts=0,this._startConnecting())}disconnect(){this._disconnect(jc.disconnectCalled,"disconnect called",!1)}setToken(e){this._token=e}send(e){const t={send:{data:e}},n=this;return this._methodCall().then((function(){return n._transportSendCommands([t])?Promise.resolve():Promise.reject(n._createErrorObject(Oc.transportWriteError,"transport write error"))}))}rpc(e,t){const n={rpc:{method:e,data:t}},s=this;return this._methodCall().then((function(){return s._callPromise(n,(function(e){return{data:e.rpc.data}}))}))}publish(e,t){const n={publish:{channel:e,data:t}},s=this;return this._methodCall().then((function(){return s._callPromise(n,(function(){return{}}))}))}history(e,t){const n={history:this._getHistoryRequest(e,t)},s=this;return this._methodCall().then((function(){return s._callPromise(n,(function(t){const n=t.history,o=[];if(n.publications)for(let t=0;t{this._debug("offline event triggered"),this.state!==Mc.Connected&&this.state!==Mc.Connecting||(this._disconnect(Rc.transportClosed,"transport closed",!0),this._deviceWentOffline=!0)})),e.addEventListener("online",(()=>{this._debug("online event triggered"),this.state===Mc.Connecting&&(this._deviceWentOffline&&!this._transportClosed&&(this._deviceWentOffline=!1,this._transportClosed=!0),this._clearReconnectTimeout(),this._startReconnecting())})),this._networkEventsSet=!0)}_getReconnectDelay(){const e=Qc(this._reconnectAttempts,this._config.minReconnectDelay,this._config.maxReconnectDelay);return this._reconnectAttempts+=1,e}_clearOutgoingRequests(){for(const e in this._callbacks)if(this._callbacks.hasOwnProperty(e)){const t=this._callbacks[e];clearTimeout(t.timeout);const n=t.errback;if(!n)continue;n({error:this._createErrorObject(Oc.connectionClosed,"connection closed")})}this._callbacks={}}_clearConnectedState(){this._client=null,this._clearServerPingTimeout(),this._clearRefreshTimeout();for(const e in this._subs){if(!this._subs.hasOwnProperty(e))continue;const t=this._subs[e];t.state===Fc.Subscribed&&t._setSubscribing(Ic.transportClosed,"transport closed")}for(const e in this._serverSubs)this._serverSubs.hasOwnProperty(e)&&this.emit("subscribing",{channel:e})}_handleWriteError(e){for(const t of e){const e=t.id;if(!(e in this._callbacks))continue;const n=this._callbacks[e];clearTimeout(this._callbacks[e].timeout),delete this._callbacks[e],(0,n.errback)({error:this._createErrorObject(Oc.transportWriteError,"transport write error")})}}_transportSendCommands(e){if(!e.length)return!0;if(!this._transport)return!1;try{this._transport.send(this._codec.encodeCommands(e),this._session,this._node)}catch(t){return this._debug("error writing commands",t),this._handleWriteError(e),!1}return!0}_initializeTransport(){let e;null!==this._config.websocket?e=this._config.websocket:"function"!=typeof globalThis.WebSocket&&"object"!=typeof globalThis.WebSocket||(e=globalThis.WebSocket);let t=null;null!==this._config.sockjs?t=this._config.sockjs:void 0!==globalThis.SockJS&&(t=globalThis.SockJS);let n=null;null!==this._config.eventsource?n=this._config.eventsource:void 0!==globalThis.EventSource&&(n=globalThis.EventSource);let s=null;null!==this._config.fetch?s=this._config.fetch:void 0!==globalThis.fetch&&(s=globalThis.fetch);let o=null;if(null!==this._config.readableStream?o=this._config.readableStream:void 0!==globalThis.ReadableStream&&(o=globalThis.ReadableStream),this._emulation){this._currentTransportIndex>=this._transports.length&&(this._triedAllTransports=!0,this._currentTransportIndex=0);let r=0;for(;;){if(r>=this._transports.length)throw new Error("no supported transport found");const i=this._transports[this._currentTransportIndex],c=i.transport,a=i.endpoint;if("websocket"===c){if(this._debug("trying websocket transport"),this._transport=new Wc(a,{websocket:e}),!this._transport.supported()){this._debug("websocket transport not available"),this._currentTransportIndex++,r++;continue}}else if("webtransport"===c){if(this._debug("trying webtransport transport"),this._transport=new qc(a,{webtransport:globalThis.WebTransport,decoder:this._codec,encoder:this._codec}),!this._transport.supported()){this._debug("webtransport transport not available"),this._currentTransportIndex++,r++;continue}}else if("http_stream"===c){if(this._debug("trying http_stream transport"),this._transport=new Vc(a,{fetch:s,readableStream:o,emulationEndpoint:this._config.emulationEndpoint,decoder:this._codec,encoder:this._codec}),!this._transport.supported()){this._debug("http_stream transport not available"),this._currentTransportIndex++,r++;continue}}else if("sse"===c){if(this._debug("trying sse transport"),this._transport=new Hc(a,{eventsource:n,fetch:s,emulationEndpoint:this._config.emulationEndpoint}),!this._transport.supported()){this._debug("sse transport not available"),this._currentTransportIndex++,r++;continue}}else{if("sockjs"!==c)throw new Error("unknown transport "+c);if(this._debug("trying sockjs"),this._transport=new Bc(a,{sockjs:t,sockjsOptions:this._config.sockjsOptions}),!this._transport.supported()){this._debug("sockjs transport not available"),this._currentTransportIndex++,r++;continue}}break}}else{if(0===this._endpoint.lastIndexOf("http",0))throw new Error("Provide explicit transport endpoints configuration in case of using HTTP (i.e. using array of TransportEndpoint instead of a single string), or use ws(s):// scheme in an endpoint if you aimed using WebSocket transport");if(this._debug("client will use websocket"),this._transport=new Wc(this._endpoint,{websocket:e}),!this._transport.supported())throw new Error("WebSocket not available")}const r=this,i=this._transport,c=this._nextTransportId();r._debug("id of transport",c);let a=!1;const l=[];if(this._transport.emulation()){const e=r._sendConnect(!0);l.push(e)}this._setNetworkEvents();const u=this._codec.encodeCommands(l);let d;this._transportClosed=!1,d=setTimeout((function(){i.close()}),this._config.timeout),this._transport.initialize(this._codec.name(),{onOpen:function(){if(d&&(clearTimeout(d),d=null),r._transportId!=c)return r._debug("open callback from non-actual transport"),void i.close();a=!0,r._debug(i.subName(),"transport open"),i.emulation()||(r._transportIsOpen=!0,r._transportWasOpen=!0,r.startBatching(),r._sendConnect(!1),r._sendSubscribeCommands(),r.stopBatching(),r.emit("__centrifuge_debug:connect_frame_sent",{}))},onError:function(e){r._transportId==c?r._debug("transport level error",e):r._debug("error callback from non-actual transport")},onClose:function(e){if(d&&(clearTimeout(d),d=null),r._transportId!=c)return void r._debug("close callback from non-actual transport");r._debug(i.subName(),"transport closed"),r._transportClosed=!0,r._transportIsOpen=!1;let t="connection closed",n=!0,s=0;if(e&&"code"in e&&e.code&&(s=e.code),e&&e.reason)try{const s=JSON.parse(e.reason);t=s.reason,n=s.reconnect}catch(o){t=e.reason,(s>=3500&&s<4e3||s>=4500&&s<5e3)&&(n=!1)}s<3e3?(1009===s?(s=jc.messageSizeLimit,t="message size limit exceeded",n=!1):(s=Rc.transportClosed,t="transport closed"),r._emulation&&!r._transportWasOpen&&(r._currentTransportIndex++,r._currentTransportIndex>=r._transports.length&&(r._triedAllTransports=!0,r._currentTransportIndex=0))):r._transportWasOpen=!0,r._isConnecting()&&!a&&r.emit("error",{type:"transport",error:{code:Oc.transportClosed,message:"transport closed"},transport:i.name()}),r._reconnecting=!1,r._disconnect(s,t,n)},onMessage:function(e){r._dataReceived(e)}},u),r.emit("__centrifuge_debug:transport_initialized",{})}_sendConnect(e){const t=this._constructConnectCommand(),n=this;return this._call(t,e).then((e=>{const t=e.reply.connect;n._connectResponse(t),e.next&&e.next()}),(e=>{n._connectError(e.error),e.next&&e.next()})),t}_startReconnecting(){if(this._debug("start reconnecting"),!this._isConnecting())return void this._debug("stop reconnecting: client not in connecting state");if(this._reconnecting)return void this._debug("reconnect already in progress, return from reconnect routine");if(!1===this._transportClosed)return void this._debug("waiting for transport close");this._reconnecting=!0;const e=this,t=""===this._token;this._refreshRequired||t&&null!==this._config.getToken?this._getToken().then((function(t){e._isConnecting()&&(null!=t&&null!=t?(e._token=t,e._debug("connection token refreshed"),e._config.getData?e._config.getData().then((function(t){e._isConnecting()&&(e._data=t,e._initializeTransport())})):e._initializeTransport()):e._failUnauthorized())})).catch((function(t){if(!e._isConnecting())return;if(t instanceof ea)return void e._failUnauthorized();e.emit("error",{type:"connectToken",error:{code:Oc.clientConnectToken,message:void 0!==t?t.toString():""}});const n=e._getReconnectDelay();e._debug("error on connection token refresh, reconnect after "+n+" milliseconds",t),e._reconnecting=!1,e._reconnectTimeout=setTimeout((()=>{e._startReconnecting()}),n)})):this._config.getData?this._config.getData().then((function(t){e._isConnecting()&&(e._data=t,e._initializeTransport())})):this._initializeTransport()}_connectError(e){this.state===Mc.Connecting&&(109===e.code&&(this._refreshRequired=!0),e.code<100||!0===e.temporary||109===e.code?(this.emit("error",{type:"connect",error:e}),this._debug("closing transport due to connect error"),this._disconnect(e.code,e.message,!0)):this._disconnect(e.code,e.message,!1))}_scheduleReconnect(){if(!this._isConnecting())return;let e=!1;!this._emulation||this._transportWasOpen||this._triedAllTransports||(e=!0);let t=this._getReconnectDelay();e&&(t=0),this._debug("reconnect after "+t+" milliseconds"),this._clearReconnectTimeout(),this._reconnectTimeout=setTimeout((()=>{this._startReconnecting()}),t)}_constructConnectCommand(){const e={};this._token&&(e.token=this._token),this._data&&(e.data=this._data),this._config.name&&(e.name=this._config.name),this._config.version&&(e.version=this._config.version);const t={};let n=!1;for(const e in this._serverSubs)if(this._serverSubs.hasOwnProperty(e)&&this._serverSubs[e].recoverable){n=!0;const s={recover:!0};this._serverSubs[e].offset&&(s.offset=this._serverSubs[e].offset),this._serverSubs[e].epoch&&(s.epoch=this._serverSubs[e].epoch),t[e]=s}return n&&(e.subs=t),{connect:e}}_getHistoryRequest(e,t){const n={channel:e};return void 0!==t&&(t.since&&(n.since={offset:t.since.offset},t.since.epoch&&(n.since.epoch=t.since.epoch)),void 0!==t.limit&&(n.limit=t.limit),!0===t.reverse&&(n.reverse=!0)),n}_methodCall(){return this._isConnected()?Promise.resolve():new Promise(((e,t)=>{const n=setTimeout((function(){t({code:Oc.timeout,message:"timeout"})}),this._config.timeout);this._promises[this._nextPromiseId()]={timeout:n,resolve:e,reject:t}}))}_callPromise(e,t){return new Promise(((n,s)=>{this._call(e,!1).then((e=>{n(t(e.reply)),e.next&&e.next()}),(e=>{s(e.error),e.next&&e.next()}))}))}_dataReceived(e){this._serverPing>0&&this._waitServerPing();const t=this._codec.decodeReplies(e);this._dispatchPromise=this._dispatchPromise.then((()=>{let e;this._dispatchPromise=new Promise((t=>{e=t})),this._dispatchSynchronized(t,e)}))}_dispatchSynchronized(e,t){let n=Promise.resolve();for(const t in e)e.hasOwnProperty(t)&&(n=n.then((()=>this._dispatchReply(e[t]))));n=n.then((()=>{t()}))}_dispatchReply(e){let t;const n=new Promise((e=>{t=e}));if(null==e)return this._debug("dispatch: got undefined or null reply"),t(),n;const s=e.id;return s&&s>0?this._handleReply(e,t):e.push?this._handlePush(e.push,t):this._handleServerPing(t),n}_call(e,t){return new Promise(((n,s)=>{e.id=this._nextCommandId(),this._registerCall(e.id,n,s),t||this._addCommand(e)}))}_startConnecting(){this._debug("start connecting"),this._setState(Mc.Connecting)&&this.emit("connecting",{code:Rc.connectCalled,reason:"connect called"}),this._client=null,this._startReconnecting()}_disconnect(e,t,n){if(this._isDisconnected())return;this._transportIsOpen=!1;const s=this.state;this._reconnecting=!1;const o={code:e,reason:t};let r=!1;if(n?r=this._setState(Mc.Connecting):(r=this._setState(Mc.Disconnected),this._rejectPromises({code:Oc.clientDisconnected,message:"disconnected"})),this._clearOutgoingRequests(),s===Mc.Connecting&&this._clearReconnectTimeout(),s===Mc.Connected&&this._clearConnectedState(),r&&(this._isConnecting()?this.emit("connecting",o):this.emit("disconnected",o)),this._transport){this._debug("closing existing transport");const e=this._transport;this._transport=null,e.close(),this._transportClosed=!0,this._nextTransportId()}else this._debug("no transport to close");this._scheduleReconnect()}_failUnauthorized(){this._disconnect(jc.unauthorized,"unauthorized",!1)}_getToken(){if(this._debug("get connection token"),!this._config.getToken)throw this.emit("error",{type:"configuration",error:{code:Oc.badConfiguration,message:"token expired but no getToken function set in the configuration"}}),new ea("");return this._config.getToken({})}_refresh(){const e=this._client,t=this;this._getToken().then((function(n){if(e!==t._client)return;if(!n)return void t._failUnauthorized();if(t._token=n,t._debug("connection token refreshed"),!t._isConnected())return;const s={refresh:{token:t._token}};t._call(s,!1).then((e=>{const n=e.reply.refresh;t._refreshResponse(n),e.next&&e.next()}),(e=>{t._refreshError(e.error),e.next&&e.next()}))})).catch((function(e){t._isConnected()&&(e instanceof ea?t._failUnauthorized():(t.emit("error",{type:"refreshToken",error:{code:Oc.clientRefreshToken,message:void 0!==e?e.toString():""}}),t._refreshTimeout=setTimeout((()=>t._refresh()),t._getRefreshRetryDelay())))}))}_refreshError(e){e.code<100||!0===e.temporary?(this.emit("error",{type:"refresh",error:e}),this._refreshTimeout=setTimeout((()=>this._refresh()),this._getRefreshRetryDelay())):this._disconnect(e.code,e.message,!1)}_getRefreshRetryDelay(){return Qc(0,5e3,1e4)}_refreshResponse(e){this._refreshTimeout&&(clearTimeout(this._refreshTimeout),this._refreshTimeout=null),e.expires&&(this._client=e.client,this._refreshTimeout=setTimeout((()=>this._refresh()),Nc(e.ttl)))}_removeSubscription(e){null!==e&&delete this._subs[e.channel]}_unsubscribe(e){if(!this._transportIsOpen)return Promise.resolve();const t={unsubscribe:{channel:e.channel}},n=this;return new Promise(((e,s)=>{this._call(t,!1).then((t=>{e(),t.next&&t.next()}),(t=>{e(),t.next&&t.next(),n._disconnect(Rc.unsubscribeError,"unsubscribe error",!0)}))}))}_getSub(e){return this._subs[e]||null}_isServerSub(e){return void 0!==this._serverSubs[e]}_sendSubscribeCommands(){const e=[];for(const t in this._subs){if(!this._subs.hasOwnProperty(t))continue;const n=this._subs[t];if(!0!==n._inflight&&n.state===Fc.Subscribing){const t=n._subscribe();t&&e.push(t)}}return e}_connectResponse(e){if(this._transportIsOpen=!0,this._transportWasOpen=!0,this._reconnectAttempts=0,this._refreshRequired=!1,this._isConnected())return;this._client=e.client,this._setState(Mc.Connected),this._refreshTimeout&&clearTimeout(this._refreshTimeout),e.expires&&(this._refreshTimeout=setTimeout((()=>this._refresh()),Nc(e.ttl))),this._session=e.session,this._node=e.node,this.startBatching(),this._sendSubscribeCommands(),this.stopBatching();const t={client:e.client,transport:this._transport.subName()};e.data&&(t.data=e.data),this.emit("connected",t),this._resolvePromises(),this._processServerSubs(e.subs||{}),e.ping&&e.ping>0?(this._serverPing=1e3*e.ping,this._sendPong=!0===e.pong,this._waitServerPing()):this._serverPing=0}_processServerSubs(e){for(const t in e){if(!e.hasOwnProperty(t))continue;const n=e[t];this._serverSubs[t]={offset:n.offset,epoch:n.epoch,recoverable:n.recoverable||!1};const s=this._getSubscribeContext(t,n);this.emit("subscribed",s)}for(const t in e){if(!e.hasOwnProperty(t))continue;const n=e[t];if(n.recovered){const e=n.publications;if(e&&e.length>0)for(const n in e)e.hasOwnProperty(n)&&this._handlePublication(t,e[n])}}for(const t in this._serverSubs)this._serverSubs.hasOwnProperty(t)&&(e[t]||(this.emit("unsubscribed",{channel:t}),delete this._serverSubs[t]))}_clearRefreshTimeout(){null!==this._refreshTimeout&&(clearTimeout(this._refreshTimeout),this._refreshTimeout=null)}_clearReconnectTimeout(){null!==this._reconnectTimeout&&(clearTimeout(this._reconnectTimeout),this._reconnectTimeout=null)}_clearServerPingTimeout(){null!==this._serverPingTimeout&&(clearTimeout(this._serverPingTimeout),this._serverPingTimeout=null)}_waitServerPing(){0!==this._config.maxServerPingDelay&&this._isConnected()&&(this._clearServerPingTimeout(),this._serverPingTimeout=setTimeout((()=>{this._isConnected()&&this._disconnect(Rc.noPing,"no ping",!0)}),this._serverPing+this._config.maxServerPingDelay))}_getSubscribeContext(e,t){const n={channel:e,positioned:!1,recoverable:!1,wasRecovering:!1,recovered:!1};t.recovered&&(n.recovered=!0),t.positioned&&(n.positioned=!0),t.recoverable&&(n.recoverable=!0),t.was_recovering&&(n.wasRecovering=!0);let s="";"epoch"in t&&(s=t.epoch);let o=0;return"offset"in t&&(o=t.offset),(n.positioned||n.recoverable)&&(n.streamPosition={offset:o,epoch:s}),t.data&&(n.data=t.data),n}_handleReply(e,t){const n=e.id;if(!(n in this._callbacks))return void t();const s=this._callbacks[n];if(clearTimeout(this._callbacks[n].timeout),delete this._callbacks[n],"error"in(o=e)&&null!==o.error){const n=s.errback;if(!n)return void t();n({error:e.error,next:t})}else{const n=s.callback;if(!n)return;n({reply:e,next:t})}var o}_handleJoin(e,t){const n=this._getSub(e);if(n)n._handleJoin(t);else if(this._isServerSub(e)){const n={channel:e,info:this._getJoinLeaveContext(t.info)};this.emit("join",n)}}_handleLeave(e,t){const n=this._getSub(e);if(n)n._handleLeave(t);else if(this._isServerSub(e)){const n={channel:e,info:this._getJoinLeaveContext(t.info)};this.emit("leave",n)}}_handleUnsubscribe(e,t){const n=this._getSub(e);n?t.code<2500?n._setUnsubscribed(t.code,t.reason,!1):n._setSubscribing(t.code,t.reason):this._isServerSub(e)&&(delete this._serverSubs[e],this.emit("unsubscribed",{channel:e}))}_handleSubscribe(e,t){this._serverSubs[e]={offset:t.offset,epoch:t.epoch,recoverable:t.recoverable||!1},this.emit("subscribed",this._getSubscribeContext(e,t))}_handleDisconnect(e){const t=e.code;let n=!0;(t>=3500&&t<4e3||t>=4500&&t<5e3)&&(n=!1),this._disconnect(t,e.reason,n)}_getPublicationContext(e,t){const n={channel:e,data:t.data};return t.offset&&(n.offset=t.offset),t.info&&(n.info=this._getJoinLeaveContext(t.info)),t.tags&&(n.tags=t.tags),n}_getJoinLeaveContext(e){const t={client:e.client,user:e.user};return e.conn_info&&(t.connInfo=e.conn_info),e.chan_info&&(t.chanInfo=e.chan_info),t}_handlePublication(e,t){const n=this._getSub(e);if(n)n._handlePublication(t);else if(this._isServerSub(e)){const n=this._getPublicationContext(e,t);this.emit("publication",n),void 0!==t.offset&&(this._serverSubs[e].offset=t.offset)}}_handleMessage(e){this.emit("message",{data:e.data})}_handleServerPing(e){if(this._sendPong){const e={};this._transportSendCommands([e])}e()}_handlePush(e,t){const n=e.channel;e.pub?this._handlePublication(n,e.pub):e.message?this._handleMessage(e.message):e.join?this._handleJoin(n,e.join):e.leave?this._handleLeave(n,e.leave):e.unsubscribe?this._handleUnsubscribe(n,e.unsubscribe):e.subscribe?this._handleSubscribe(n,e.subscribe):e.disconnect&&this._handleDisconnect(e.disconnect),t()}_flush(){const e=this._commands.slice(0);this._commands=[],this._transportSendCommands(e)}_createErrorObject(e,t,n){const s={code:e,message:t};return n&&(s.temporary=!0),s}_registerCall(e,t,n){this._callbacks[e]={callback:t,errback:n,timeout:null},this._callbacks[e].timeout=setTimeout((()=>{delete this._callbacks[e],Uc(n)&&n({error:this._createErrorObject(Oc.timeout,"timeout")})}),this._config.timeout)}_addCommand(e){this._batching?this._commands.push(e):this._transportSendCommands([e])}_nextPromiseId(){return++this._promiseId}_nextTransportId(){return++this._transportId}_resolvePromises(){for(const e in this._promises)this._promises.hasOwnProperty(e)&&(this._promises[e].timeout&&clearTimeout(this._promises[e].timeout),this._promises[e].resolve(),delete this._promises[e])}_rejectPromises(e){for(const t in this._promises)this._promises.hasOwnProperty(t)&&(this._promises[t].timeout&&clearTimeout(this._promises[t].timeout),this._promises[t].reject(e),delete this._promises[t])}}ta.SubscriptionState=Fc,ta.State=Mc,ta.UnauthorizedError=ea;const na=e=>{"complete"===document.readyState?e():window.addEventListener("load",e)};na((()=>{let e=document.querySelector('div[data-place="widget-live-match"]');e?.getAttribute("data-place")&&(()=>{let e=document.querySelector('div[data-place="widget-live-match"]');hn.lang="en";const t=e.dataset?.lang??null;t&&(hn.lang=["nl","ro","ka","hy","az","el","pl","uz"].includes(t)?t:hn.lang),hn.sport=o,hn.rpcSport=r,hn.rpcSportDetail=hn.rpcSport+"Detail",hn.empty=c[hn.lang],hn.widgetMes=a[hn.lang],hc(e),(async()=>{console.log("connecting..."),hn.socket=new ta("wss://widgetlogic.org/ws",{timeout:6e4}),hn.sub=hn.socket.newSubscription(hn.rpcSport),hn.debug&&(hn.sub.on("subscribing",(function(e){hn.debug&&console.log(`subscribing: ${e.code}, ${e.reason}`)})).on("subscribed",(function(e){hn.debug&&console.log("subscribed",e)})).on("unsubscribed",(function(e){hn.debug&&console.log(`unsubscribed: ${e.code}, ${e.reason}`)})),hn.socket.on("connecting",(function(e){hn.debug&&console.log(`connecting: ${e.code}, ${e.reason}`)})).on("connected",(function(e){hn.debug&&console.log(`connected over ${e.transport}`)})).on("disconnected",(function(e){hn.debug&&console.log(`disconnected: ${e.code}, ${e.reason}`)})).on("publish",(function(e){hn.debug&&console.log(e)}))),hn.sub.on("publication",(function(e){hn.debug&&console.log("Update",e.data),(e=>{if(!e)return void console.log("Update is empty...");const{slug:t,matchTime:n=null,home:s={score:null,periods:null},away:o={score:null,periods:null}}=e,r=ln.matches[t];if(t===hn.matchSlug&&(hn.resetAutoUpdate(),console.log("Selected Match updated",e)),sn.includes(ln.matches[hn.matchSlug]?.stage)||!n&&!sn.includes(e?.stage)||(console.log("Update match full match",e),hn.getFullMatch()),!r)return void console.log("Match is absent",e);const i=e.stage?on.includes(e.stage)?e.stage:console.log("unknown stages for update data:",e)??e.stage:null,c=(e,t)=>{const n="object"==typeof e.periods?e.periods:{};return Object.assign(e,{...t.periods?{periods:Object.assign(n,t.periods)}:{},score:t.score})};Object.assign(ln.matches[t],{...i?{stage:i,live:nn.includes(i)}:{},...n?{matchTime:n}:{},...s.score?{home:c(ln.matches[t].home,s)}:{},...o.score?{away:c(ln.matches[t].away,o)}:{}})})(e.data)})),hn.sub.subscribe(),hn.socket.connect(),await un()})()})()})),na((()=>{window.widgetLogic="present"}))})()