@golstats/gsc-game-data 1.1.24 → 1.1.25

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -14,7 +14,7 @@
14
14
  * Vue 3 Carousel 0.3.4
15
15
  * (c) 2024
16
16
  * @license MIT
17
- */const xd={itemsToShow:1,itemsToScroll:1,modelValue:0,transition:300,autoplay:0,snapAlign:"center",wrapAround:!1,throttle:16,pauseAutoplayOnHover:!1,mouseDrag:!0,touchDrag:!0,dir:"ltr",breakpoints:void 0,i18n:{ariaNextSlide:"Navigate to next slide",ariaPreviousSlide:"Navigate to previous slide",ariaNavigateToSlide:"Navigate to slide {slideNumber}",ariaGallery:"Gallery",itemXofY:"Item {currentSlide} of {slidesCount}",iconArrowUp:"Arrow pointing upwards",iconArrowDown:"Arrow pointing downwards",iconArrowRight:"Arrow pointing to the right",iconArrowLeft:"Arrow pointing to the left"}},_E={itemsToShow:{default:xd.itemsToShow,type:Number},itemsToScroll:{default:xd.itemsToScroll,type:Number},wrapAround:{default:xd.wrapAround,type:Boolean},throttle:{default:xd.throttle,type:Number},snapAlign:{default:xd.snapAlign,validator(e){return["start","end","center","center-even","center-odd"].includes(e)}},transition:{default:xd.transition,type:Number},breakpoints:{default:xd.breakpoints,type:Object},autoplay:{default:xd.autoplay,type:Number},pauseAutoplayOnHover:{default:xd.pauseAutoplayOnHover,type:Boolean},modelValue:{default:void 0,type:Number},mouseDrag:{default:xd.mouseDrag,type:Boolean},touchDrag:{default:xd.touchDrag,type:Boolean},dir:{default:xd.dir,validator(e){return["rtl","ltr"].includes(e)}},i18n:{default:xd.i18n,type:Object},settings:{default(){return{}},type:Object}};function TX({config:e,slidesCount:o}){const{snapAlign:s,wrapAround:B,itemsToShow:U=1}=e;if(B)return Math.max(o-1,0);let m;switch(s){case"start":m=o-U;break;case"end":m=o-1;break;case"center":case"center-odd":m=o-Math.ceil((U-.5)/2);break;case"center-even":m=o-Math.ceil(U/2);break;default:m=0;break}return Math.max(m,0)}function AX({config:e,slidesCount:o}){const{wrapAround:s,snapAlign:B,itemsToShow:U=1}=e;let m=0;if(s||U>o)return m;switch(B){case"start":m=0;break;case"end":m=U-1;break;case"center":case"center-odd":m=Math.floor((U-1)/2);break;case"center-even":m=Math.floor((U-2)/2);break;default:m=0;break}return m}function f6({val:e,max:o,min:s}){return o<s?e:Math.min(Math.max(e,s),o)}function EX({config:e,currentSlide:o,slidesCount:s}){const{snapAlign:B,wrapAround:U,itemsToShow:m=1}=e;let y=o;switch(B){case"center":case"center-odd":y-=(m-1)/2;break;case"center-even":y-=(m-2)/2;break;case"end":y-=m-1;break}return U?y:f6({val:y,max:s-m,min:0})}function xE(e){return e?e.reduce((o,s)=>{var B;return s.type===t.Fragment?[...o,...xE(s.children)]:((B=s.type)===null||B===void 0?void 0:B.name)==="CarouselSlide"?[...o,s]:o},[]):[]}function m6({val:e,max:o,min:s=0}){return e>o?m6({val:e-(o+1),max:o,min:s}):e<s?m6({val:e+(o+1),max:o,min:s}):e}function MX(e,o){let s;return o?function(...B){const U=this;s||(e.apply(U,B),s=!0,setTimeout(()=>s=!1,o))}:e}function IX(e,o){let s;return function(...B){s&&clearTimeout(s),s=setTimeout(()=>{e(...B),s=null},o)}}function PX(e="",o={}){return Object.entries(o).reduce((s,[B,U])=>s.replace(`{${B}}`,String(U)),e)}var LX=t.defineComponent({name:"ARIA",setup(){const e=t.inject("config",t.reactive(Object.assign({},xd))),o=t.inject("currentSlide",t.ref(0)),s=t.inject("slidesCount",t.ref(0));return()=>t.h("div",{class:["carousel__liveregion","carousel__sr-only"],"aria-live":"polite","aria-atomic":"true"},PX(e.i18n.itemXofY,{currentSlide:o.value+1,slidesCount:s.value}))}}),BX=t.defineComponent({name:"Carousel",props:_E,setup(e,{slots:o,emit:s,expose:B}){var U;const m=t.ref(null),y=t.ref([]),a=t.ref(0),v=t.ref(0),p=t.reactive(Object.assign({},xd));let r=Object.assign({},xd),_;const b=t.ref((U=e.modelValue)!==null&&U!==void 0?U:0),x=t.ref(0),h=t.ref(0),n=t.ref(0),i=t.ref(0);let c,l;t.provide("config",p),t.provide("slidesCount",v),t.provide("currentSlide",b),t.provide("maxSlide",n),t.provide("minSlide",i),t.provide("slideWidth",a);function d(){_=Object.assign({},e.breakpoints),r=Object.assign(Object.assign(Object.assign({},r),e),{i18n:Object.assign(Object.assign({},r.i18n),e.i18n),breakpoints:void 0}),w(r)}function g(){if(!_||!Object.keys(_).length)return;const re=Object.keys(_).map(ie=>Number(ie)).sort((ie,me)=>+me-+ie);let se=Object.assign({},r);re.some(ie=>{const me=window.matchMedia(`(min-width: ${ie}px)`).matches;return me&&(se=Object.assign(Object.assign({},se),_[ie])),me}),w(se)}function w(re){Object.entries(re).forEach(([se,ie])=>p[se]=ie)}const C=IX(()=>{g(),A(),E()},16);function E(){if(!m.value)return;const re=m.value.getBoundingClientRect();a.value=re.width/p.itemsToShow}function A(){v.value<=0||(h.value=Math.ceil((v.value-1)/2),n.value=TX({config:p,slidesCount:v.value}),i.value=AX({config:p,slidesCount:v.value}),p.wrapAround||(b.value=f6({val:b.value,max:n.value,min:i.value})))}t.onMounted(()=>{t.nextTick(()=>E()),setTimeout(()=>E(),1e3),g(),G(),window.addEventListener("resize",C,{passive:!0}),s("init")}),t.onUnmounted(()=>{l&&clearTimeout(l),c&&clearInterval(c),window.removeEventListener("resize",C,{passive:!0})});let P=!1;const L={x:0,y:0},T={x:0,y:0},I=t.reactive({x:0,y:0}),M=t.ref(!1),S=t.ref(!1),z=()=>{M.value=!0},k=()=>{M.value=!1};function O(re){["INPUT","TEXTAREA","SELECT"].includes(re.target.tagName)||(P=re.type==="touchstart",P||re.preventDefault(),!(!P&&re.button!==0||Z.value)&&(L.x=P?re.touches[0].clientX:re.clientX,L.y=P?re.touches[0].clientY:re.clientY,document.addEventListener(P?"touchmove":"mousemove",N,!0),document.addEventListener(P?"touchend":"mouseup",j,!0)))}const N=MX(re=>{S.value=!0,T.x=P?re.touches[0].clientX:re.clientX,T.y=P?re.touches[0].clientY:re.clientY;const se=T.x-L.x,ie=T.y-L.y;I.y=ie,I.x=se},p.throttle);function j(){const re=p.dir==="rtl"?-1:1,se=Math.sign(I.x)*.4,ie=Math.round(I.x/a.value+se)*re;if(ie&&!P){const me=ye=>{window.removeEventListener("click",me,!0)};window.addEventListener("click",me,!0)}$(b.value-ie),I.x=0,I.y=0,S.value=!1,document.removeEventListener(P?"touchmove":"mousemove",N,!0),document.removeEventListener(P?"touchend":"mouseup",j,!0)}function G(){!p.autoplay||p.autoplay<=0||(c=setInterval(()=>{p.pauseAutoplayOnHover&&M.value||ne()},p.autoplay))}function H(){c&&(clearInterval(c),c=null),G()}const Z=t.ref(!1);function $(re){const se=p.wrapAround?re:f6({val:re,max:n.value,min:i.value});b.value===se||Z.value||(s("slide-start",{slidingToIndex:re,currentSlideIndex:b.value,prevSlideIndex:x.value,slidesCount:v.value}),Z.value=!0,x.value=b.value,b.value=se,l=setTimeout(()=>{if(p.wrapAround){const ie=m6({val:se,max:n.value,min:0});ie!==b.value&&(b.value=ie,s("loop",{currentSlideIndex:b.value,slidingToIndex:re}))}s("update:modelValue",b.value),s("slide-end",{currentSlideIndex:b.value,prevSlideIndex:x.value,slidesCount:v.value}),Z.value=!1,H()},p.transition))}function ne(){$(b.value+p.itemsToScroll)}function q(){$(b.value-p.itemsToScroll)}const K={slideTo:$,next:ne,prev:q};t.provide("nav",K),t.provide("isSliding",Z);const ee=t.computed(()=>EX({config:p,currentSlide:b.value,slidesCount:v.value}));t.provide("slidesToScroll",ee);const X=t.computed(()=>{const re=p.dir==="rtl"?-1:1,se=ee.value*a.value*re;return{transform:`translateX(${I.x-se}px)`,transition:`${Z.value?p.transition:0}ms`,margin:p.wrapAround?`0 -${v.value*a.value}px`:"",width:"100%"}});function Q(){d(),g(),A(),E(),H()}Object.keys(_E).forEach(re=>{["modelValue"].includes(re)||t.watch(()=>e[re],Q)}),t.watch(()=>e.modelValue,re=>{re!==b.value&&$(Number(re))}),t.watch(v,A),s("before-init"),d();const ce={config:p,slidesCount:v,slideWidth:a,next:ne,prev:q,slideTo:$,currentSlide:b,maxSlide:n,minSlide:i,middleSlide:h};B({updateBreakpointsConfigs:g,updateSlidesData:A,updateSlideWidth:E,initDefaultConfigs:d,restartCarousel:Q,slideTo:$,next:ne,prev:q,nav:K,data:ce});const de=o.default||o.slides,he=o.addons,pe=t.reactive(ce);return()=>{const re=xE(de==null?void 0:de(pe)),se=(he==null?void 0:he(pe))||[];re.forEach((ve,we)=>ve.props.index=we);let ie=re;if(p.wrapAround){const ve=re.map((Se,Ce)=>t.cloneVNode(Se,{index:-re.length+Ce,isClone:!0,key:`clone-before-${Ce}`})),we=re.map((Se,Ce)=>t.cloneVNode(Se,{index:re.length+Ce,isClone:!0,key:`clone-after-${Ce}`}));ie=[...ve,...re,...we]}y.value=re,v.value=Math.max(re.length,1);const me=t.h("ol",{class:"carousel__track",style:X.value,onMousedownCapture:p.mouseDrag?O:null,onTouchstartPassiveCapture:p.touchDrag?O:null},ie),ye=t.h("div",{class:"carousel__viewport"},me);return t.h("section",{ref:m,class:{carousel:!0,"is-sliding":Z.value,"is-dragging":S.value,"is-hover":M.value,"carousel--rtl":p.dir==="rtl"},dir:p.dir,"aria-label":p.i18n.ariaGallery,tabindex:"0",onMouseenter:z,onMouseleave:k},[ye,se,t.h(LX)])}}}),g6;(function(e){e.arrowUp="arrowUp",e.arrowDown="arrowDown",e.arrowRight="arrowRight",e.arrowLeft="arrowLeft"})(g6||(g6={}));const zX={arrowUp:"M7.41 15.41L12 10.83l4.59 4.58L18 14l-6-6-6 6z",arrowDown:"M7.41 8.59L12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z",arrowRight:"M8.59 16.59L13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z",arrowLeft:"M15.41 16.59L10.83 12l4.58-4.59L14 6l-6 6 6 6 1.41-1.41z"};function OX(e){return e in g6}const y6=e=>{const o=t.inject("config",t.reactive(Object.assign({},xd))),s=String(e.name),B=`icon${s.charAt(0).toUpperCase()+s.slice(1)}`;if(!s||typeof s!="string"||!OX(s))return;const U=zX[s],m=t.h("path",{d:U}),y=o.i18n[B]||e.title||s,a=t.h("title",y);return t.h("svg",{class:"carousel__icon",viewBox:"0 0 24 24",role:"img","aria-label":y},[a,m])};y6.props={name:String,title:String};const DX=(e,{slots:o,attrs:s})=>{const{next:B,prev:U}=o||{},m=t.inject("config",t.reactive(Object.assign({},xd))),y=t.inject("maxSlide",t.ref(1)),a=t.inject("minSlide",t.ref(1)),v=t.inject("currentSlide",t.ref(1)),p=t.inject("nav",{}),{dir:r,wrapAround:_,i18n:b}=m,x=r==="rtl",h=t.h("button",{type:"button",class:["carousel__prev",!_&&v.value<=a.value&&"carousel__prev--disabled",s==null?void 0:s.class],"aria-label":b.ariaPreviousSlide,onClick:p.prev},(U==null?void 0:U())||t.h(y6,{name:x?"arrowRight":"arrowLeft"})),n=t.h("button",{type:"button",class:["carousel__next",!_&&v.value>=y.value&&"carousel__next--disabled",s==null?void 0:s.class],"aria-label":b.ariaNextSlide,onClick:p.next},(B==null?void 0:B())||t.h(y6,{name:x?"arrowLeft":"arrowRight"}));return[h,n]};var NX=t.defineComponent({name:"CarouselSlide",props:{index:{type:Number,default:1},isClone:{type:Boolean,default:!1}},setup(e,{slots:o}){const s=t.inject("config",t.reactive(Object.assign({},xd))),B=t.inject("currentSlide",t.ref(0)),U=t.inject("slidesToScroll",t.ref(0)),m=t.inject("isSliding",t.ref(!1)),y=t.computed(()=>e.index===B.value),a=t.computed(()=>e.index===B.value-1),v=t.computed(()=>e.index===B.value+1),p=t.computed(()=>{const r=Math.floor(U.value),_=Math.ceil(U.value+s.itemsToShow-1);return e.index>=r&&e.index<=_});return()=>{var r;return t.h("li",{style:{width:`${100/s.itemsToShow}%`},class:{carousel__slide:!0,"carousel__slide--clone":e.isClone,"carousel__slide--visible":p.value,"carousel__slide--active":y.value,"carousel__slide--prev":a.value,"carousel__slide--next":v.value,"carousel__slide--sliding":m.value},"aria-hidden":!p.value},(r=o.default)===null||r===void 0?void 0:r.call(o,{isActive:y.value,isClone:e.isClone,isPrev:a.value,isNext:v.value,isSliding:m.value,isVisible:p.value}))}}});const Sf=(e,o)=>{const s=e.__vccOpts||e;for(const[B,U]of o)s[B]=U;return s},wE=e=>(t.pushScopeId("data-v-15f082dd"),e=e(),t.popScopeId(),e),FX={key:1,class:"match-day__live"},RX=wE(()=>t.createElementVNode("div",{class:"match-day__live__bullet"},null,-1)),VX=wE(()=>t.createElementVNode("div",{class:"match-day__live__text"},"LIVE",-1)),jX=[RX,VX],UX={__name:"MatchDay",props:{isLandingMode:{type:Boolean,default:!1},backgroundColor:{type:String,default:"#183143"},numberColor:{type:String,default:"white"},numberFontFamily:{type:String,default:"sans-serif"},numberFontSize:{type:String,default:"14px"},textColor:{type:String,default:"rgba(255, 255, 255, 0.5)"},textFontFamily:{type:String,default:"'Poppins-Regular', sans-serif"},textFontSize:{type:String,default:"8px"},bottomLineColor:{type:String,default:"#cbee6b"},selectedMatchDayBackgroundColor:{type:String,default:"#243b4c"},height:{type:String,default:"fit-content"},matchDay:{type:Object,default:()=>{}},matchDaySelected:{type:Object,default:()=>{}},componentWidth:{type:Number,default:0}},emits:["change-match-day"],setup(e,{emit:o}){const s=e,B=t.computed(()=>{const a={"background-color":s.backgroundColor,height:s.height};return s.matchDay.key===s.matchDaySelected.key&&(a["border-bottom"]=`solid 1px ${s.bottomLineColor}`,a["background-color"]=s.selectedMatchDayBackgroundColor),s.isLandingMode||(a["border-right"]="solid 1px rgba(255, 255, 255, 0.1)"),a}),U=t.computed(()=>({color:s.numberColor,"font-family":s.numberFontFamily,"font-size":s.numberFontSize})),m=t.computed(()=>({color:s.textColor,"font-family":s.textFontFamily,"font-size":s.textFontSize}));function y(a){o("click-match-day",a)}return(a,v)=>(t.openBlock(),t.createElementBlock("div",{class:"match-day",style:t.normalizeStyle({...B.value}),onClick:v[0]||(v[0]=p=>y(e.matchDay))},[t.createElementVNode("div",{class:"match-day__value",style:t.normalizeStyle(U.value)},t.toDisplayString(e.matchDay.valueText),5),!Number.isNaN(e.matchDay.value)&&!e.matchDay.liveGamesIds.size?(t.openBlock(),t.createElementBlock("div",{key:0,class:"match-day__text",style:t.normalizeStyle([e.isLandingMode?"margin-top:3px":"margin-top:4px",m.value])},t.toDisplayString(e.isLandingMode||e.componentWidth<=425?"JOR":"JORNADA"),5)):e.matchDay.liveGamesIds.size?(t.openBlock(),t.createElementBlock("div",FX,jX)):t.createCommentVNode("",!0)],4))}},GX=Sf(UX,[["__scopeId","data-v-15f082dd"]]),HX={__name:"MatchDayPicker",props:{matchDays:{type:Array,default:()=>[]},isLandingMode:{type:Boolean,default:!1},backgroundColor:{type:String,default:"#183143"},numberColor:{type:String,default:"white"},numberFontFamily:{type:String,default:"sans-serif"},numberFontSize:{type:String,default:"14px"},textColor:{type:String,default:"rgba(255, 255, 255, 0.5)"},textFontFamily:{type:String,default:"sans-serif"},textFontSize:{type:String,default:"8px"},bottomLineColor:{type:String,default:"#cbee6b"},selectedMatchDayBackgroundColor:{type:String,default:"#243b4c"},height:{type:String,default:"fit-content"},itemsToShow:{type:Number,default:9},itemsToScroll:{type:Number,default:9},defaultMatchDayKey:{type:[String,null],default:""},componentWidth:{type:Number,default:0},closestMatchDay:{type:[Number,String],default:0}},emits:["change-match-day"],setup(e,{emit:o}){const s=e;t.useCssVars(p=>({"6930a853":m.value,"692f9113":y.value}));const B=t.ref(null),U=t.computed(()=>({itemsToShow:s.itemsToShow,itemsToScroll:s.itemsToScroll,snapAlign:"start"})),m=t.computed(()=>B.value.data.currentSlide.value==0?"none":"inline"),y=t.computed(()=>B.value.data.currentSlide.value==B.value.data.maxSlide.value?"none":"inline"),a=t.ref({});t.watch(()=>s.closestMatchDay,p=>{if(p){const r=s.matchDays.find(_=>_.key===p);v(r||s.matchDays[0],!0)}}),t.watch(()=>s.matchDays,p=>{if(!s.closestMatchDay&&p&&p.length){const r=p.find(_=>_.key===s.defaultMatchDayKey);a.value=r||p[0],o("change-match-day",a.value)}else s.closestMatchDay&&(a.value=p.find(r=>r.key===s.closestMatchDay)||{})},{immediate:!0});function v(p,r=!1){r&&B.value&&B.value.slideTo(p.index),a.value=p,o("change-match-day",a.value)}return(p,r)=>(t.openBlock(),t.createElementBlock("div",{class:"match-day-picker",style:t.normalizeStyle(e.isLandingMode?"border-top-left-radius: 9px; border-top-right-radius: 9px;":"margin-bottom:12px")},[(t.openBlock(),t.createBlock(t.unref(BX),t.mergeProps(U.value,{modelValue:a.value.index,ref_key:"matchDayPickerCarousel",ref:B,key:a.value.index}),{addons:t.withCtx(()=>[t.createVNode(t.unref(DX))]),default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.matchDays,_=>(t.openBlock(),t.createBlock(t.unref(NX),{key:_.key},{default:t.withCtx(()=>[t.createVNode(GX,t.mergeProps(s,{"match-day":_,"match-day-selected":a.value,"is-landing-mode":e.isLandingMode,"component-width":e.componentWidth,onClickMatchDay:v}),null,16,["match-day","match-day-selected","is-landing-mode","component-width"])]),_:2},1024))),128))]),_:1},16,["modelValue"]))],4))}},ZX=Sf(HX,[["__scopeId","data-v-7bfcb74c"]]),WX=(e,o)=>{const s=e.__vccOpts||e;for(const[B,U]of o)s[B]=U;return s},qX={key:1},JX={width:"10",height:"8",viewBox:"0 0 10 8",fill:"none",xmlns:"http://www.w3.org/2000/svg"},YX=["fill"],XX={key:0,class:"checkbox__teams"},$X={class:"checkbox__teams__logo"},KX=["src"],QX={class:"checkbox__teams__logo"},e$=["src"],t$={__name:"GSC-Checkbox",props:{width:{type:String,default:"fit-content"},height:{type:String,default:"fit-content"},label:{type:String,default:""},labelWhiteSpace:{type:String,default:"normal"},labelColor:{type:String,default:"white"},fontFamily:{type:String,default:"sans-serif"},labelFontSize:{type:String,default:"12px"},modelValue:{type:Boolean,default:!1},justifyContent:{type:String,default:"flex-start"},alignItems:{type:String,default:"center"},boxBackgroundColor:{type:String,default:"#CBEE6B"},boxValueColor:{type:String,default:"#0d1d29"},boxValue:{type:[String,Number],default:""},boxPosition:{type:String,default:"left",validator(e){return["left","right","top","bottom"].includes(e)}},boxMarginTop:{type:String,default:"0.2em"},boxWidthAndHeight:{type:String,default:"16px"},boxBorderColor:{type:String,default:"#969da2"},boxBorderWidth:{type:String,default:"2px"},boxBorderRadius:{type:String,default:"4px"},boxValueFontSize:{type:String,default:"10px"},boxValueFontFamily:{type:String,default:"sans-serif"},avoidInteraction:{type:Boolean,default:!1},avoidToCheck:{type:Boolean,default:!1},isBoxOnly:{type:Boolean,default:!1},teamsIds:{type:Array,default:()=>null}},emits:["update:modelValue"],setup(e,{emit:o}){const s=e;t.useCssVars(p=>({"7bd9d47b":e.width,"34dc7ddc":e.height}));const B=t.ref(!1),U=t.computed(()=>{const p={color:s.boxValueColor,"font-family":s.fontFamily,height:s.boxWidthAndHeight,width:s.boxWidthAndHeight,minWidth:s.boxWidthAndHeight,"border-radius":s.boxBorderRadius,"margin-top":s.boxMarginTop};return B.value?(p["background-color"]=s.boxBackgroundColor,p.border=`solid ${s.boxBorderWidth} ${s.boxBackgroundColor}`):p.border=`solid ${s.boxBorderWidth} ${s.boxBorderColor}`,p}),m=t.computed(()=>({"font-family":s.boxValueFontFamily,"font-size":s.boxValueFontSize,color:s.boxValueColor,"line-height":1})),y=t.computed(()=>{const p={color:s.labelColor,"font-family":s.fontFamily,"font-size":s.labelFontSize,"white-space":s.labelWhiteSpace,"text-align":s.boxPosition==="top"||s.boxPosition==="bottom"?"center":s.boxPosition};return(s.boxPosition==="left"||s.boxPosition==="right")&&(p[`margin-${s.boxPosition}`]=s.isBoxOnly?"0":s.teamsIds?"8px":"10px"),p});t.watch(()=>s.modelValue,p=>{p!==B.value&&(B.value=p)},{immediate:!0});function a(){s.avoidInteraction||!B.value&&s.avoidToCheck||(B.value=!B.value,o("update:modelValue",B.value))}function v(p){return`${{}.TEAM_LOGOS_URL||"https://golstatsimages.blob.core.windows.net/teams-80/"}${p}.png`}return(p,r)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["checkbox",`box-${e.boxPosition}`]),onClick:a},[t.createElementVNode("div",{class:"checkbox__box",style:t.normalizeStyle(U.value)},[B.value?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[s.boxValue?(t.openBlock(),t.createElementBlock("div",{key:0,class:"checkbox__box__value",style:t.normalizeStyle(m.value)},t.toDisplayString(e.boxValue),5)):(t.openBlock(),t.createElementBlock("div",qX,[(t.openBlock(),t.createElementBlock("svg",JX,[t.createElementVNode("path",{d:"M9.77994 1.70133L4.10994 7.37133C3.96994 7.51133 3.77994 7.59133 3.57994 7.59133C3.37994 7.59133 3.18994 7.51133 3.04994 7.37133L0.219941 4.54133C-0.0700586 4.25133 -0.0700586 3.77133 0.219941 3.48133C0.509941 3.19133 0.989941 3.19133 1.27994 3.48133L3.57994 5.78133L8.71994 0.641328C9.00994 0.351328 9.48994 0.351328 9.77994 0.641328C10.0699 0.931328 10.0699 1.40133 9.77994 1.70133Z",fill:e.boxValueColor},null,8,YX)]))]))],64)):t.createCommentVNode("",!0)],4),e.teamsIds&&e.teamsIds.length?(t.openBlock(),t.createElementBlock("div",XX,[t.createElementVNode("div",$X,[t.createElementVNode("img",{src:v(e.teamsIds[0]),alt:""},null,8,KX)]),t.createElementVNode("div",QX,[t.createElementVNode("img",{src:v(e.teamsIds[1]),alt:""},null,8,e$)])])):t.createCommentVNode("",!0),t.createElementVNode("div",{class:"checkbox__label",style:t.normalizeStyle(y.value)},t.toDisplayString(e.label),5)],2))}},a$=WX(t$,[["__scopeId","data-v-b6f124d8"]]);function r$(e,o){if(!o||o<=1)return e;const s=new URL(e),B=s.pathname.split("/").filter(a=>a!=="");if(B.length===0)return e;const[U,...m]=B,y=[U,o,...m].join("/");return`${s.origin}/${y}${s.search}`}function W0(e,o=80,s=1){const B={}.TEAM_LOGOS_URL||"https://golstatsimages.blob.core.windows.net/teams-";return r$(`${B}${o}/${e}.png`,s)}function kE(e){if(typeof e=="string"){let o=e.replace("M","J ");return o=o.replace("PO1","CFI"),o=o.replace("PO2","CFV"),o=o.replace("PO3","SFI"),o=o.replace("PO4","SFV"),o=o.replace("PO5","FI"),o=o.replace("PO6","FV"),o}}function n$(e){let o="";return e.game_status!=4&&(o+="Finalizado"),(e.penalties_score_home_team!=0||e.penalties_score_visiting_team!=0)&&(o+=" - Penales "+e.penalties_score_home_team+" - "+e.penalties_score_visiting_team),o}const i$={class:"game-info__teams"},o$={class:"game-info__teams__team__logo"},s$=["src"],l$={class:"game-info__teams__detail"},c$={key:0,class:"game-info__teams__detail__pre-game"},u$={class:"game-info__teams__team__logo away"},d$=["src"],h$={key:0},p$={key:0},f$={key:1},m$={__name:"GameInfo",props:{isLandingMode:{type:Boolean,default:!1},isAcronymVisible:{type:Boolean,default:!1},isTelevisionVisible:{type:Boolean,default:!0},game:{type:Object,required:!0},providerId:{type:Number,default:0},isDevApis:{type:Boolean,default:!1},colorPrimary:{type:String,default:"white"},colorSecondary:{type:String,default:"grey"},namesFontSize:{type:String,default:"12px"},timeFontSize:{type:String,default:"12px"},timeZoneFontSize:{type:String,default:"8px"},scoreFontSize:{type:String,default:"13px"},namesFontFamily:{type:String,default:"sans-serif"},scoreFontFamily:{type:String,default:"sans-serif"},additionalInfoFontFamily:{type:String,default:"sans-serif"},additionalInfoFontSize:{type:String,default:"9px"}},setup(e){const o=e,s=t.computed(()=>{let p=o.game.schedule.split(":");return p.pop(),p=p.join(":"),p}),B=t.computed(()=>{let p="120px";return(o.isLandingMode||o.isAcronymVisible)&&(p="70px"),{"min-width":p}}),U=t.computed(()=>({"font-size":o.namesFontSize,"font-family":o.namesFontFamily,color:o.colorPrimary})),m=t.computed(()=>({"font-size":o.additionalInfoFontSize,"font-family":o.additionalInfoFontFamily,color:o.colorSecondary})),y=t.computed(()=>({"font-size":o.scoreFontSize,"font-family":o.scoreFontFamily,color:o.colorPrimary})),a=t.computed(()=>({"font-size":o.timeZoneFontSize,"font-family":o.namesFontFamily,color:o.colorPrimary})),v=t.computed(()=>({"font-size":o.timeFontSize,"font-family":o.namesFontFamily,color:o.colorPrimary}));return(p,r)=>(t.openBlock(),t.createElementBlock("div",{class:"game-info",style:t.normalizeStyle(e.isLandingMode?"gap:5px":"")},[t.createElementVNode("div",i$,[t.createElementVNode("div",{class:"game-info__teams__team",style:t.normalizeStyle(B.value)},[t.createElementVNode("div",{class:"game-info__teams__team__name",style:t.normalizeStyle(U.value)},t.toDisplayString(e.isLandingMode||e.isAcronymVisible?e.game.home_team.acronym:e.game.home_team.colloquial_name),5),t.createElementVNode("div",o$,[t.createElementVNode("img",{src:t.unref(W0)(e.game.home_team.team_id,80,e.providerId),alt:""},null,8,s$)])],4),t.createElementVNode("div",l$,[e.game.game_status===4&&!e.game.is_live?(t.openBlock(),t.createElementBlock("div",c$,[t.createElementVNode("div",null,[t.createElementVNode("span",{style:t.normalizeStyle(v.value)},t.toDisplayString(s.value),5),t.createTextVNode(),t.createElementVNode("span",{style:t.normalizeStyle(a.value)},"CST",4)])])):(t.openBlock(),t.createElementBlock("div",{key:1,class:"game-info__teams__detail__score",style:t.normalizeStyle(y.value)},[t.createElementVNode("span",null,t.toDisplayString(e.game.score[0])+" - "+t.toDisplayString(e.game.score[1]),1)],4))]),t.createElementVNode("div",{class:"game-info__teams__team away",style:t.normalizeStyle(B.value)},[t.createElementVNode("div",u$,[t.createElementVNode("img",{src:t.unref(W0)(e.game.visiting_team.team_id,80,e.providerId),alt:""},null,8,d$)]),t.createElementVNode("div",{class:"game-info__teams__team__name",style:t.normalizeStyle(U.value)},t.toDisplayString(e.isLandingMode||e.isAcronymVisible?e.game.visiting_team.acronym:e.game.visiting_team.colloquial_name),5)],4)]),t.createElementVNode("div",{class:"game-info__status",style:t.normalizeStyle([m.value,e.isLandingMode?"line-height: normal":""])},[e.game.game_status===4&&!e.game.is_live?(t.openBlock(),t.createElementBlock("span",h$,[e.isTelevisionVisible?(t.openBlock(),t.createElementBlock("span",p$,t.toDisplayString(e.game.tv_stations.join(", ")),1)):t.createCommentVNode("",!0)])):(t.openBlock(),t.createElementBlock("span",f$,t.toDisplayString(t.unref(n$)(e.game)),1))],4)],4))}},SE=Sf(m$,[["__scopeId","data-v-4190335c"]]),CE=e=>(t.pushScopeId("data-v-e2fc9ed0"),e=e(),t.popScopeId(),e),g$={class:"game-status"},y$={key:0,class:"game-status__day__live"},v$=CE(()=>t.createElementVNode("span",null,"LIVE",-1)),b$=CE(()=>t.createElementVNode("span",{class:"dot"},null,-1)),_$=[v$,b$],x$={key:0,class:"game-status__round"},w$={__name:"GameStatus",props:{isLandingMode:{type:Boolean,default:!1},isRoundMode:{type:Boolean,default:!1},status:{type:Number,default:4},isLive:{type:Boolean,default:!1},dateTimeMillis:{type:Number,default:0},roundAbbreviation:{type:String,default:""},fontSize:{type:String,default:"10px"}},setup(e){const o=e,s=["Ene","Feb","Mar","Abr","May","Jun","Jul","Ago","Sep","Oct","Nov","Dic"],B=t.computed(()=>{let y="";if(o.dateTimeMillis){const a=new Date(o.dateTimeMillis);y=`${a.getDate()} ${s[a.getMonth()]}`}return y}),U=t.computed(()=>({"font-size":o.fontSize})),m=t.computed(()=>{let y=[];return o.isLive?y.push("live"):o.status!==1&&y.push("pre-match"),y});return(y,a)=>(t.openBlock(),t.createElementBlock("div",g$,[t.createElementVNode("div",{class:t.normalizeClass(["game-status__day",m.value]),style:t.normalizeStyle(U.value)},[e.isLive?(t.openBlock(),t.createElementBlock("div",y$,_$)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createTextVNode(t.toDisplayString(B.value),1)],64))],6),e.isRoundMode?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",x$,t.toDisplayString(e.roundAbbreviation),1))]))}},TE=Sf(w$,[["__scopeId","data-v-e2fc9ed0"]]),zf={SHOW_GAME_EVENTS:"SHOW_GAME_EVENTS",PLAY_GOALS:"PLAY_GOALS",PLAY_RESUME:"PLAY_RESUME",NOTIFICATION:"NOTIFICATION",STATISTICS:"STATISTICS"},k$=e=>(t.pushScopeId("data-v-5711c5a6"),e=e(),t.popScopeId(),e),S$={class:"actions"},C$={class:"actions__row"},T$=k$(()=>t.createElementVNode("svg",{width:"10",height:"12",viewBox:"0 0 10 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[t.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M8.87471 3.35132C9.31653 3.35132 9.67471 3.70949 9.67471 4.15132V10.4531C9.67471 10.8949 9.31653 11.2531 8.87471 11.2531C8.43288 11.2531 8.07471 10.8949 8.07471 10.4531V4.15132C8.07471 3.70949 8.43288 3.35132 8.87471 3.35132Z",fill:"#EEEC6B"}),t.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M4.67549 0.199951C5.11732 0.199951 5.47549 0.558123 5.47549 0.999951V10.4526C5.47549 10.8944 5.11732 11.2526 4.67549 11.2526C4.23366 11.2526 3.87549 10.8944 3.87549 10.4526V0.999951C3.87549 0.558123 4.23366 0.199951 4.67549 0.199951Z",fill:"#EEEC6B"}),t.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M1.0002 5.45154C1.44202 5.45154 1.8002 5.80971 1.8002 6.25154V10.4527C1.8002 10.8945 1.44202 11.2527 1.0002 11.2527C0.558368 11.2527 0.200195 10.8945 0.200195 10.4527V6.25154C0.200195 5.80971 0.558368 5.45154 1.0002 5.45154Z",fill:"#EEEC6B"})],-1)),A$=[T$],E$={width:"6",height:"8",viewBox:"0 0 6 8",fill:"none",xmlns:"http://www.w3.org/2000/svg"},M$=["fill"],I$={width:"13",height:"16",viewBox:"0 0 13 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},P$=["fill"],L$={__name:"GameActionsLanding",props:{gameStatus:{type:Number,default:4},isLive:{type:Boolean,default:!1},hasVideo:{type:Boolean,default:!1},iconColor:{type:String,default:"#CBEE6B"},iconBackgroundColor:{type:String,default:"rgba(255, 255, 255, 0.2)"},iconBorderColor:{type:String,default:"rgba(255, 255, 255, 0.1)"},showPlayButton:{type:Boolean,default:!1}},emits:["action"],setup(e,{emit:o}){const s=e,B=t.computed(()=>({backgroundColor:s.iconBackgroundColor,borderColor:s.iconBorderColor}));function U(m){o("action",m)}return(m,y)=>(t.openBlock(),t.createElementBlock("div",S$,[t.createElementVNode("div",C$,[t.createElementVNode("div",{class:"actions__button rounded",style:t.normalizeStyle(B.value),onClick:y[0]||(y[0]=a=>U(t.unref(zf).STATISTICS))},A$,4),e.showPlayButton&&e.hasVideo?(t.openBlock(),t.createElementBlock("div",{key:0,class:"actions__button rounded",style:t.normalizeStyle(B.value),onClick:y[1]||(y[1]=a=>U(t.unref(zf).PLAY_RESUME))},[(t.openBlock(),t.createElementBlock("svg",E$,[t.createElementVNode("path",{d:"M0.442694 7.9474C0.385489 7.90953 0.337676 7.85295 0.304408 7.78375C0.27114 7.71456 0.25368 7.63538 0.253908 7.55475V0.444134C0.253987 0.363779 0.271562 0.284951 0.304765 0.216032C0.337968 0.147113 0.385557 0.090677 0.442475 0.0527243C0.499393 0.0147716 0.563511 -0.00327964 0.628014 0.000489552C0.692517 0.00425874 0.754994 0.0297075 0.808803 0.0741304L5.09491 3.62986C5.14387 3.67036 5.18401 3.7253 5.21178 3.78978C5.23955 3.85426 5.25409 3.92628 5.25409 3.99944C5.25409 4.0726 5.23955 4.14462 5.21178 4.2091C5.18401 4.27358 5.14387 4.32852 5.09491 4.36902L0.808803 7.92559C0.755077 7.97011 0.692648 7.99565 0.628173 7.99949C0.563698 8.00333 0.499593 7.98533 0.442694 7.9474Z",fill:s.iconColor},null,8,M$)]))],4)):t.createCommentVNode("",!0),e.gameStatus===4444&&!e.isLive?(t.openBlock(),t.createElementBlock("div",{key:1,class:"actions__button",onClick:y[2]||(y[2]=a=>U(t.unref(zf).NOTIFICATION))},[(t.openBlock(),t.createElementBlock("svg",I$,[t.createElementVNode("path",{d:"M5.056 14.476h2.888c0 .838-.65 1.524-1.444 1.524-.794 0-1.444-.686-1.444-1.524zM13 12.952v.762H0v-.762l1.444-1.523V6.857c0-2.362 1.445-4.419 3.612-5.105v-.228C5.056.686 5.706 0 6.5 0c.794 0 1.444.686 1.444 1.524v.228c2.167.686 3.612 2.743 3.612 5.105v4.572L13 12.952zm-2.889-6.095c0-2.133-1.589-3.81-3.611-3.81-2.022 0-3.611 1.677-3.611 3.81v5.333h7.222V6.857z",fill:s.iconColor},null,8,P$)]))])):t.createCommentVNode("",!0)])]))}},B$=Sf(L$,[["__scopeId","data-v-5711c5a6"]]),v6=e=>(t.pushScopeId("data-v-d64f8667"),e=e(),t.popScopeId(),e),z$={class:"actions"},O$={width:"13",height:"16",viewBox:"0 0 13 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},D$=["fill"],N$={width:"6",height:"8",viewBox:"0 0 6 8",fill:"none",xmlns:"http://www.w3.org/2000/svg"},F$=["fill"],R$=v6(()=>t.createElementVNode("svg",{width:"10",height:"12",viewBox:"0 0 10 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[t.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M8.87471 3.35132C9.31653 3.35132 9.67471 3.70949 9.67471 4.15132V10.4531C9.67471 10.8949 9.31653 11.2531 8.87471 11.2531C8.43288 11.2531 8.07471 10.8949 8.07471 10.4531V4.15132C8.07471 3.70949 8.43288 3.35132 8.87471 3.35132Z",fill:"#EEEC6B"}),t.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M4.67549 0.199951C5.11732 0.199951 5.47549 0.558123 5.47549 0.999951V10.4526C5.47549 10.8944 5.11732 11.2526 4.67549 11.2526C4.23366 11.2526 3.87549 10.8944 3.87549 10.4526V0.999951C3.87549 0.558123 4.23366 0.199951 4.67549 0.199951Z",fill:"#EEEC6B"}),t.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M1.0002 5.45154C1.44202 5.45154 1.8002 5.80971 1.8002 6.25154V10.4527C1.8002 10.8945 1.44202 11.2527 1.0002 11.2527C0.558368 11.2527 0.200195 10.8945 0.200195 10.4527V6.25154C0.200195 5.80971 0.558368 5.45154 1.0002 5.45154Z",fill:"#EEEC6B"})],-1)),V$=[R$],j$={key:0,class:"actions__videos"},U$={width:"13",height:"16",viewBox:"0 0 13 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},G$=["fill"],H$={key:1,class:"actions__videos__thumbnails"},Z$=v6(()=>t.createElementVNode("div",{class:"actions__videos__thumbnails__thumbnail__goals"},null,-1)),W$=v6(()=>t.createElementVNode("div",{class:"actions__videos__thumbnails__thumbnail__summary"},null,-1)),q$={height:24,width:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},J$=["stroke"],Y$={__name:"GameActionsFull",props:{gameStatus:{type:Number,default:4},isLive:{type:Boolean,default:!1},hasVideo:{type:Boolean,default:!1},hasActions:{type:Boolean,default:!0},hasGoals:{type:Boolean,default:!0},areEventsVisible:{type:Boolean,default:!1},iconColor:{type:String,default:"#CBEE6B"},iconBackgroundColor:{type:String,default:"rgba(255, 255, 255, 0.2)"},iconBorderColor:{type:String,default:"rgba(255, 255, 255, 0.1)"},showPlayButton:{type:Boolean,default:!1},arrowColor:{type:String,default:"white"},thumbnailFontFamily:{type:String,default:"sans-serif"},thumbnailFontSize:{type:String,default:"8px"},thumbnailColor:{type:String,default:"rgba(255, 255, 255, 0.5)"},componentWidth:{type:Number,default:400,validator(e){return e>0}}},emits:["action"],setup(e,{emit:o}){const s=e,B=t.computed(()=>({backgroundColor:s.iconBackgroundColor,borderColor:s.iconBorderColor})),U=t.computed(()=>{const v=[];return s.componentWidth<540&&v.push("mobile"),v}),m=t.computed(()=>s.componentWidth>730),y=t.computed(()=>({color:s.thumbnailColor,fontFamily:s.thumbnailFontFamily,fontSize:s.thumbnailFontSize}));function a(v){o("action",v)}return(v,p)=>(t.openBlock(),t.createElementBlock("div",z$,[t.createElementVNode("div",{class:t.normalizeClass(["actions__buttons",U.value])},[e.gameStatus===4444&&!e.isLive&&!m.value?(t.openBlock(),t.createElementBlock("div",{key:0,class:"actions__button",onClick:p[0]||(p[0]=r=>a(t.unref(zf).NOTIFICATION))},[(t.openBlock(),t.createElementBlock("svg",O$,[t.createElementVNode("path",{d:"M5.056 14.476h2.888c0 .838-.65 1.524-1.444 1.524-.794 0-1.444-.686-1.444-1.524zM13 12.952v.762H0v-.762l1.444-1.523V6.857c0-2.362 1.445-4.419 3.612-5.105v-.228C5.056.686 5.706 0 6.5 0c.794 0 1.444.686 1.444 1.524v.228c2.167.686 3.612 2.743 3.612 5.105v4.572L13 12.952zm-2.889-6.095c0-2.133-1.589-3.81-3.611-3.81-2.022 0-3.611 1.677-3.611 3.81v5.333h7.222V6.857z",fill:s.iconColor},null,8,D$)]))])):t.createCommentVNode("",!0),e.showPlayButton&&e.hasVideo&&!m.value?(t.openBlock(),t.createElementBlock("div",{key:1,class:"actions__button rounded",style:t.normalizeStyle(B.value),onClick:p[1]||(p[1]=r=>a(t.unref(zf).PLAY_RESUME))},[(t.openBlock(),t.createElementBlock("svg",N$,[t.createElementVNode("path",{d:"M0.442694 7.9474C0.385489 7.90953 0.337676 7.85295 0.304408 7.78375C0.27114 7.71456 0.25368 7.63538 0.253908 7.55475V0.444134C0.253987 0.363779 0.271562 0.284951 0.304765 0.216032C0.337968 0.147113 0.385557 0.090677 0.442475 0.0527243C0.499393 0.0147716 0.563511 -0.00327964 0.628014 0.000489552C0.692517 0.00425874 0.754994 0.0297075 0.808803 0.0741304L5.09491 3.62986C5.14387 3.67036 5.18401 3.7253 5.21178 3.78978C5.23955 3.85426 5.25409 3.92628 5.25409 3.99944C5.25409 4.0726 5.23955 4.14462 5.21178 4.2091C5.18401 4.27358 5.14387 4.32852 5.09491 4.36902L0.808803 7.92559C0.755077 7.97011 0.692648 7.99565 0.628173 7.99949C0.563698 8.00333 0.499593 7.98533 0.442694 7.9474Z",fill:s.iconColor},null,8,F$)]))],4)):t.createCommentVNode("",!0),t.createElementVNode("div",{class:"actions__button rounded",style:t.normalizeStyle(B.value),onClick:p[2]||(p[2]=r=>a(t.unref(zf).STATISTICS))},V$,4)],2),m.value?(t.openBlock(),t.createElementBlock("div",j$,[e.gameStatus===4444&&!e.isLive?(t.openBlock(),t.createElementBlock("div",{key:0,class:"actions__button",onClick:p[3]||(p[3]=r=>a(t.unref(zf).NOTIFICATION))},[(t.openBlock(),t.createElementBlock("svg",U$,[t.createElementVNode("path",{d:"M5.056 14.476h2.888c0 .838-.65 1.524-1.444 1.524-.794 0-1.444-.686-1.444-1.524zM13 12.952v.762H0v-.762l1.444-1.523V6.857c0-2.362 1.445-4.419 3.612-5.105v-.228C5.056.686 5.706 0 6.5 0c.794 0 1.444.686 1.444 1.524v.228c2.167.686 3.612 2.743 3.612 5.105v4.572L13 12.952zm-2.889-6.095c0-2.133-1.589-3.81-3.611-3.81-2.022 0-3.611 1.677-3.611 3.81v5.333h7.222V6.857z",fill:s.iconColor},null,8,G$)]))])):t.createCommentVNode("",!0),e.showPlayButton&&e.hasVideo?(t.openBlock(),t.createElementBlock("div",H$,[e.hasGoals?(t.openBlock(),t.createElementBlock("div",{key:0,class:"actions__videos__thumbnails__thumbnail",onClick:p[4]||(p[4]=r=>a(t.unref(zf).PLAY_GOALS))},[Z$,t.createElementVNode("div",{class:"actions__videos__thumbnails__thumbnail__text",style:t.normalizeStyle(y.value)}," Goles ",4)])):t.createCommentVNode("",!0),t.createElementVNode("div",{class:"actions__videos__thumbnails__thumbnail",onClick:p[5]||(p[5]=r=>a(t.unref(zf).PLAY_RESUME))},[W$,t.createElementVNode("div",{class:"actions__videos__thumbnails__thumbnail__text",style:t.normalizeStyle(y.value)}," Resumen ",4)])])):t.createCommentVNode("",!0)])):t.createCommentVNode("",!0),(e.gameStatus!==4||e.isLive)&&e.hasActions?(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(["actions__button expand",{"rotated-180":e.areEventsVisible,mobile:e.componentWidth<540}]),onClick:p[6]||(p[6]=r=>a(t.unref(zf).SHOW_GAME_EVENTS))},[(t.openBlock(),t.createElementBlock("svg",q$,[t.createElementVNode("path",{d:"M18.394 9.13501L13.1302 14.3988C12.5086 15.0204 11.4914 15.0204 10.8697 14.3988L5.60596 9.13501",stroke:e.arrowColor},null,8,J$)]))],2)):(t.openBlock(),t.createElementBlock("div",{key:2,class:t.normalizeClass(["actions__button expand",{"rotated-180":!1,mobile:e.componentWidth<540}])},null,2))]))}},X$=Sf(Y$,[["__scopeId","data-v-d64f8667"]]),ex=e=>(t.pushScopeId("data-v-e0fd9956"),e=e(),t.popScopeId(),e),$$={class:"row-landing__game-status"},K$={class:"row-landing__game-actions"},Q$={class:"row-full__game-status"},eK={class:"row-full__game-info"},tK={key:0,class:"row-full__video-privilege"},aK={class:"row-full__game-actions"},rK={class:"game-events-container"},nK=ex(()=>t.createElementVNode("div",{class:"separator"},null,-1)),iK=ex(()=>t.createElementVNode("div",null,null,-1)),oK={class:"game-events__data"},sK={class:"game-events__data__team"},lK=["src"],cK={class:"game-events__data__team__event__text"},uK={class:"game-events__data__team away"},dK={class:"game-events__data__team__event__text"},hK=["src"],pK=ex(()=>t.createElementVNode("div",null,null,-1)),fK=ex(()=>t.createElementVNode("div",null,null,-1)),mK={__name:"CalendarRow",props:{teamId:{type:Number,default:0},providerId:{type:Number,default:0},isDevApis:{type:Boolean,default:!1},showVideos:{type:Number,default:0},isLandingMode:{type:Boolean,default:!1},isRoundMode:{type:Boolean,default:!1},game:{type:Object,required:!0},height:{type:String,default:"fit-content"},backgroundColor:{type:String,default:"#172531"},showPlayButton:{type:Boolean,default:!1},componentWidth:{type:Number,default:400,validator(e){return e>0}},televisionFontSize:{type:String,default:"12px"},televisionFontFamily:{type:String,default:"sans-serif"},televisionColor:{type:String,default:"rgba(255, 255, 255, 0.5)"},videoPrivilegesUserId:{type:Number,default:0}},emits:["action","change-video-privilege"],setup(e,{emit:o}){const s=e,B={GOAL:{}.GAME_EVENTS_ICONS_GOAL||"/icn-gol.svg",RED_CARD:{}.GAME_EVENTS_ICONS_RED_CARD||"/icn-expulsion.svg",YELLOW_CARD:{}.GAME_EVENTS_ICONS_YELLOW_CARD||"/icn-amarilla.svg"},U=t.ref(!1),m=t.ref(!1),y=t.computed(()=>{const i={homeTeam:[],awayTeam:[]};return s.game&&s.game.game_status!==4&&!s.game.is_live&&s.game.minutes&&(i.homeTeam.push(...x(s.game.minutes.home_goals_minutes,B.GOAL)),i.homeTeam.push(...x(s.game.minutes.home_red_cards_minutes,B.RED_CARD)),i.homeTeam.push(...x(s.game.minutes.home_yellow_cards_minutes,B.YELLOW_CARD)),i.awayTeam.push(...x(s.game.minutes.visiting_goals_minutes,B.GOAL)),i.awayTeam.push(...x(s.game.minutes.away_red_cards_minutes,B.RED_CARD)),i.awayTeam.push(...x(s.game.minutes.away_yellow_cards_minutes,B.YELLOW_CARD))),i}),a=t.computed(()=>{const i=y.value.homeTeam.length,c=y.value.awayTeam.length;return i+c>0}),v=t.computed(()=>{const i=s.game.score[0],c=s.game.score[1];return i>0||c>0}),p=t.computed(()=>({"background-color":s.backgroundColor})),r=t.computed(()=>({height:s.height})),_=t.computed(()=>{const i={game:[],events:[]};return s.componentWidth<500?(i.events.push("break-point-3"),i.game.push("break-point-2")):s.componentWidth<730?(i.game.push("break-point-2"),i.events.push("break-point-2")):s.componentWidth<910&&(i.game.push("break-point-1"),i.events.push("break-point-1")),i}),b=t.computed(()=>({isLandingMode:s.isLandingMode,game:s.game,colorPrimary:"#fff",colorSecondary:"#fff",namesFontSize:"12px",timeFontSize:"12px",timeZoneFontSize:"8px",scoreFontSize:"13px",namesFontFamily:"sans-serif",scoreFontFamily:"sans-serif",additionalInfoFontFamily:"sans-serif",additionalInfoFontSize:"9px"}));t.computed(()=>({"font-size":s.televisionFontSize,"font-family":s.televisionFontFamily,color:s.televisionColor})),t.watch(()=>s.componentWidth,i=>{m.value=i<910});function x(i,c){return i.map(l=>({iconUrl:c,text:l}))}function h(i){o("change-video-privilege",i)}function n(i){i===zf.SHOW_GAME_EVENTS?U.value=!U.value:o("action",{action:i,game:s.game})}return(i,c)=>e.isLandingMode?(t.openBlock(),t.createElementBlock("div",{key:0,class:"row-landing",style:t.normalizeStyle(p.value)},[t.createVNode(SE,{game:e.game,"is-landing-mode":e.isLandingMode,"provider-id":e.providerId,"is-dev-apis":e.isDevApis},null,8,["game","is-landing-mode","provider-id","is-dev-apis"]),t.createElementVNode("div",$$,[t.createVNode(TE,{status:e.game.game_status,"is-live":!!e.game.is_live,"date-time-millis":e.game.dateTimeMillis,"round-abbreviation":t.unref(kE)(e.game.matchday_abbreviation),"is-landing-mode":e.isLandingMode,"is-round-mode":e.isRoundMode,"font-size":"10px"},null,8,["status","is-live","date-time-millis","round-abbreviation","is-landing-mode","is-round-mode"])]),t.createElementVNode("div",K$,[e.game.home_team?(t.openBlock(),t.createBlock(B$,{key:0,"is-live":!!e.game.is_live,"has-video":e.showVideos==0||e.showVideos==1&&e.teamId==e.game.home_team.team_id?!!e.game.has_video:!1,"game-status":e.game.game_status,"show-play-button":!0,onAction:n},null,8,["is-live","has-video","game-status"])):t.createCommentVNode("",!0)])],4)):(t.openBlock(),t.createElementBlock("div",{key:1,class:"row-full-container",style:t.normalizeStyle(p.value)},[t.createElementVNode("div",{class:t.normalizeClass(["row-full",_.value.game]),style:t.normalizeStyle(r.value)},[t.createElementVNode("div",Q$,[t.createVNode(TE,{status:e.game.game_status,"is-live":!!e.game.is_live,"date-time-millis":e.game.dateTimeMillis,"round-abbreviation":t.unref(kE)(e.game.matchday_abbreviation),"is-landing-mode":e.isLandingMode,"is-round-mode":e.isRoundMode,"font-size":"10px"},null,8,["status","is-live","date-time-millis","round-abbreviation","is-landing-mode","is-round-mode"])]),t.createElementVNode("div",eK,[t.createVNode(SE,t.mergeProps(b.value,{"is-television-visible":m.value,game:e.game,"provider-id":e.providerId,"is-dev-apis":e.isDevApis,"is-landing-mode":e.isLandingMode,"is-acronym-visible":e.componentWidth<540}),null,16,["is-television-visible","game","provider-id","is-dev-apis","is-landing-mode","is-acronym-visible"])]),e.componentWidth>=910?(t.openBlock(),t.createElementBlock("div",tK,[e.videoPrivilegesUserId&&e.showVideos==0?(t.openBlock(),t.createElementBlock("div",{key:0,onClick:c[0]||(c[0]=l=>h(e.game))},[t.createVNode(t.unref(a$),{label:"Privilegios",fontFamily:"Poppins-Regular",labelFontSize:"11px","label-color":"#FFF","model-value":e.game.hasVideoPrivilege,"avoid-interaction":""},null,8,["model-value"])])):t.createCommentVNode("",!0)])):t.createCommentVNode("",!0),t.createElementVNode("div",aK,[e.game.home_team?(t.openBlock(),t.createBlock(X$,{key:0,"is-live":!!e.game.is_live,"has-video":e.showVideos==0||e.showVideos==1&&e.teamId==e.game.home_team.team_id?!!e.game.has_video:!1,"has-actions":a.value,"has-goals":e.showVideos==0||e.showVideos==1&&e.teamId==e.game.home_team.team_id?v.value:!1,"game-status":e.game.game_status,"show-play-button":!0,"are-events-visible":U.value,"component-width":e.componentWidth,onAction:n},null,8,["is-live","has-video","has-actions","has-goals","game-status","are-events-visible","component-width"])):t.createCommentVNode("",!0)])],6),t.createVNode(t.Transition,null,{default:t.withCtx(()=>[t.withDirectives(t.createElementVNode("div",rK,[nK,t.createElementVNode("div",{class:t.normalizeClass(["game-events",_.value.events])},[iK,t.createElementVNode("div",oK,[t.createElementVNode("div",sK,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(y.value.homeTeam,(l,d)=>(t.openBlock(),t.createElementBlock("div",{key:`h${d}`,class:"game-events__data__team__event"},[t.createElementVNode("img",{src:l.iconUrl},null,8,lK),t.createElementVNode("div",cK,t.toDisplayString(l.text),1)]))),128))]),t.createElementVNode("div",uK,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(y.value.awayTeam,(l,d)=>(t.openBlock(),t.createElementBlock("div",{key:`a${d}`,class:"game-events__data__team__event"},[t.createElementVNode("div",dK,t.toDisplayString(l.text),1),t.createElementVNode("img",{src:l.iconUrl},null,8,hK)]))),128))])]),pK,fK],2)],512),[[t.vShow,U.value]])]),_:1})],4))}},AE=Sf(mK,[["__scopeId","data-v-e0fd9956"]]),EE=e=>(t.pushScopeId("data-v-673c112d"),e=e(),t.popScopeId(),e),gK={class:"modal-content"},yK={class:"modal-header"},vK=EE(()=>t.createElementVNode("div",{class:"separator"},null,-1)),bK={class:"modal-message"},_K=EE(()=>t.createElementVNode("div",{class:"separator"},null,-1)),xK={__name:"ModalActionConfirm",emits:["confirm-action"],setup(e,{expose:o,emit:s}){const B=t.ref(!1),U=t.ref({}),m=()=>{B.value=!1};function y(){s("confirm-action",{action:!0,data:U.value}),m()}function a({data:v}){U.value=v,B.value=!0}return o({showModal:a}),(v,p)=>(t.openBlock(),t.createBlock(t.Teleport,{to:"body"},[t.createVNode(t.Transition,{name:"modal"},{default:t.withCtx(()=>[B.value?(t.openBlock(),t.createElementBlock("div",{key:0,class:"modal-overlay",onClick:m},[t.createElementVNode("div",{class:"modal-container",onClick:p[0]||(p[0]=t.withModifiers(()=>{},["stop"]))},[t.createElementVNode("div",gK,[t.createElementVNode("div",yK,[t.renderSlot(v.$slots,"header",{},void 0,!0)]),vK,t.createElementVNode("p",bK,[t.renderSlot(v.$slots,"message",{},void 0,!0)]),_K,t.createElementVNode("div",{class:"modal-actions"},[t.createElementVNode("button",{class:"btn-cancel",onClick:m},"Cancelar"),t.createElementVNode("button",{class:"btn-delete",onClick:y},"Aceptar")])])])])):t.createCommentVNode("",!0)]),_:3})]))}},wK=Sf(xK,[["__scopeId","data-v-673c112d"]]),kK={class:"calendar-table"},SK={__name:"CalendarTable",props:{teamId:{type:Number,default:0},showVideos:{type:Number,default:0},isLandingMode:{type:Boolean,default:!1},isRoundMode:{type:Boolean,default:!1},gamesPerPage:{type:Array,default:()=>[]},rowHeight:{type:String,default:"fit-content"},oddRowColor:{type:String,default:"#172531"},evenRowColor:{type:String,default:"#0D1D29"},componentWidth:{type:Number,default:400,validator(e){return e>0}},videoPrivilegesUserId:{type:Number,default:0},token:{type:String,default:""},providerId:{type:Number,default:0},isDevApis:{type:Boolean,default:!1}},emits:["action"],setup(e,{emit:o}){const s=e,B=t.ref(null),U=t.ref("");function m(r){return r%2===0?s.evenRowColor:s.oddRowColor}function y(r){o("action",r)}function a({action:r,data:_}){r&&p(_)}function v(r){if(B.value){const _=r.hasVideoPrivilege?"desactivar":"activar";U.value=`¿Estás seguro de ${_} el privilegio del partido ${r.home_team.colloquial_name} vs ${r.visiting_team.colloquial_name}?`,B.value.showModal({data:r})}}async function p(r){try{const _=!!r.hasVideoPrivilege,b={};s.token&&(b.Authorization=s.token);const x=Py("https://u6845vutog.execute-api.us-east-2.amazonaws.com/prod/api/v1/privileges/games",s.providerId,s.isDevApis),h=await Iy.post(x,{game_id:r.game_id,status:_?0:1},{headers:b});r.hasVideoPrivilege=!_}catch(_){console.error(_)}}return(r,_)=>(t.openBlock(),t.createElementBlock(t.Fragment,null,[t.createVNode(wK,{ref_key:"modalActionConfirm",ref:B,onConfirmAction:a},{header:t.withCtx(()=>[t.createTextVNode(" Cambio de privilegio ")]),message:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(U.value),1)]),_:1},512),t.createElementVNode("div",kK,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.gamesPerPage,(b,x)=>(t.openBlock(),t.createBlock(AE,{key:b.game_id,game:b,"team-id":e.teamId,"show-videos":e.showVideos,"is-landing-mode":e.isLandingMode,height:e.rowHeight,"background-color":m(x),"component-width":e.componentWidth,"is-round-mode":e.isRoundMode,"video-privileges-user-id":e.videoPrivilegesUserId,"provider-id":e.providerId,"is-dev-apis":e.isDevApis,onAction:y,onChangeVideoPrivilege:v},null,8,["game","team-id","show-videos","is-landing-mode","height","background-color","component-width","is-round-mode","video-privileges-user-id","provider-id","is-dev-apis"]))),128))])],64))}},CK=Sf(SK,[["__scopeId","data-v-12308628"]]),TK={class:"calendar-by-team"},AK={class:"playing-as-picker"},EK={class:"calendar-by-team__page"},MK={__name:"CalendarTableByTeam",props:{showVideos:{type:Number,default:0},teamId:{type:Number,default:0},providerId:{type:Number,default:0},isDevApis:{type:Boolean,default:!1},isPaginationVisible:{type:Boolean,default:!0},gamesPages:{type:Map,default:()=>new Map},isLandingMode:{type:Boolean,default:!1},isRoundMode:{type:Boolean,default:!1},rowHeight:{type:String,default:"fit-content"},nameRowColor:{type:String,default:"#172531"},gameRowColor:{type:String,default:"#0D1D29"},componentWidth:{type:Number,default:400,validator(e){return e>0}}},emits:["action"],setup(e,{emit:o}){const s=e,B=t.ref(0),U=t.computed(()=>{let v=[];if(s.gamesPages.size>0){const p=Array.from(s.gamesPages.entries()).reduce((r,[_,b])=>{const x=Number(_),h=Number.isNaN(x)?_:`Jornada ${x<10?"0":""}${x}`,n=b.reduce((i,c)=>(i.push(...c),i),[]).filter(i=>B.value===0||B.value===1&&i.visiting_team.team_id===s.teamId?!0:B.value===2&&i.home_team.team_id===s.teamId);return n.length>0&&r.push({roundName:h,games:n}),r},[]);v.push(p)}return v});function m(v){o("action",v)}function y(v){document.querySelector("#opc0").classList.remove("selected"),document.querySelector("#opc1").classList.remove("selected"),document.querySelector("#opc2").classList.remove("selected"),B.value=v,document.querySelector("#opc"+v).classList.add("selected")}function a(v){let p=v;switch(v){case"PI1":p="Play In 1";break;case"PI2":p="Play In 2";break;case"R1":p="Repechaje";break;case"CFI":p="Cuartos de final - Ida";break;case"CFV":p="Cuartos de final - Vuelta";break;case"SFI":p="Semifinal - Ida";break;case"SFV":p="Semifinal - Vuelta";break;case"FI":p="Final - Ida";break;case"FV":p="Final - Vuelta";break}return p}return(v,p)=>(t.openBlock(),t.createElementBlock("div",TK,[t.createElementVNode("div",AK,[t.createElementVNode("div",{class:"playing-as-picker__type selected",id:"opc0",onClick:p[0]||(p[0]=r=>y(0))}," Todas "),t.createElementVNode("div",{class:"playing-as-picker__type",id:"opc1",onClick:p[1]||(p[1]=r=>y(1))},"Visitante"),t.createElementVNode("div",{class:"playing-as-picker__type",id:"opc2",onClick:p[2]||(p[2]=r=>y(2))},"Local")]),t.createVNode(t.unref(bE),{"is-pagination-visible":e.isPaginationVisible,items:U.value},{default:t.withCtx(({item:r})=>[t.createElementVNode("div",EK,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(r,(_,b)=>(t.openBlock(),t.createElementBlock("div",{key:b,class:"calendar-by-team__page__round"},[t.createElementVNode("div",{class:"calendar-by-team__page__round__round-name",style:t.normalizeStyle([{color:"white"},e.componentWidth<=425?"padding: 5px 10px":""])},t.toDisplayString(a(_.roundName)),5),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(_.games,x=>(t.openBlock(),t.createBlock(AE,{key:x.game_id,game:x,"team-id":e.teamId,"show-videos":e.showVideos,"is-landing-mode":e.isLandingMode,height:e.rowHeight,"background-color":e.gameRowColor,"component-width":e.componentWidth,"is-round-mode":e.isRoundMode,"provider-id":e.providerId,"is-dev-apis":e.isDevApis,onAction:m},null,8,["game","team-id","show-videos","is-landing-mode","height","background-color","component-width","is-round-mode","provider-id","is-dev-apis"]))),128))]))),128))])]),_:1},8,["is-pagination-visible","items"])]))}},IK=Sf(MK,[["__scopeId","data-v-cc8eed3a"]]),PK="_pccard_95chy_2",LK="_pcmobile_95chy_10",BK="_headerinfomobile_95chy_15",zK="_liveMinutes_95chy_19",OK="_viewButtomEvent_95chy_24",DK="_viewButtomEventMobile_95chy_40",NK="_containerEvents_95chy_56",FK="_sepEvents_95chy_63",RK="_goalsContainer_95chy_74",VK="_yellowContainer_95chy_83",jK="_redContainer_95chy_92",UK="_containerEventsGameHometeam_95chy_101",GK="_containerEventsGameAwayteam_95chy_115",HK="_image62Icon_95chy_129",ZK="_imgChivasIcon_95chy_139",WK="_nameDesktop_95chy_147",qK="_nameMobile_95chy_161",JK="_homeTeam_95chy_174",YK="_sbado16De_95chy_186",XK="_gameDate_95chy_195",$K="_sab16092023_95chy_199",KK="_div_95chy_213",QK="_divscore_95chy_222",eQ="_cst_95chy_232",tQ="_hour_95chy_242",aQ="_score_95chy_243",rQ="_chivasTvCanal_95chy_254",nQ="_gameStatus_95chy_266",iQ="_matchInfo_95chy_277",oQ="_image62Icon1_95chy_292",sQ="_name_95chy_147",lQ="_imgAtlasIcon_95chy_316",cQ="_name1_95chy_324",uQ="_awayTeam_95chy_337",dQ="_matchCard_95chy_349",hQ="_headereventsmobile_95chy_535",pQ="_headereventsmobilecont_95chy_545",fQ="_headereventsmobilecontlocal_95chy_553",mQ="_icongoalheader_95chy_560",gQ="_conttarjetasmobile_95chy_566",yQ="_conttarjetasmobileyellow_95chy_572",vQ="_iconmobileyellow_95chy_579",bQ="_txtmobileyellow_95chy_588",_Q="_iconmobilered_95chy_603",xQ="_txtmobilered_95chy_612",wQ="_conttarjetasmobilered_95chy_628",kQ="_itemmobilgoal_95chy_635",SQ="_goalscontainermobile_95chy_650",CQ="_headereventsmobileconttitle_95chy_666",TQ="_headereventsmobilecontaway_95chy_691",AQ={pccard:PK,pcmobile:LK,headerinfomobile:BK,liveMinutes:zK,viewButtomEvent:OK,viewButtomEventMobile:DK,containerEvents:NK,sepEvents:FK,goalsContainer:RK,yellowContainer:VK,redContainer:jK,containerEventsGameHometeam:UK,containerEventsGameAwayteam:GK,image62Icon:HK,imgChivasIcon:ZK,nameDesktop:WK,nameMobile:qK,homeTeam:JK,sbado16De:YK,gameDate:XK,sab16092023:$K,div:KK,divscore:QK,cst:eQ,hour:tQ,score:aQ,chivasTvCanal:rQ,gameStatus:nQ,matchInfo:iQ,image62Icon1:oQ,name:sQ,imgAtlasIcon:lQ,name1:cQ,awayTeam:uQ,matchCard:dQ,headereventsmobile:hQ,headereventsmobilecont:pQ,headereventsmobilecontlocal:fQ,icongoalheader:mQ,conttarjetasmobile:gQ,conttarjetasmobileyellow:yQ,iconmobileyellow:vQ,txtmobileyellow:bQ,iconmobilered:_Q,txtmobilered:xQ,conttarjetasmobilered:wQ,itemmobilgoal:kQ,goalscontainermobile:SQ,headereventsmobileconttitle:CQ,headereventsmobilecontaway:TQ},EQ=["src"],MQ=["src"],IQ=t.createElementVNode("img",{width:"10",src:"https://golstatsimages.blob.core.windows.net/todoelfut/players-goals-con-goles.png"},null,-1),PQ=t.createElementVNode("img",{width:"10",src:"https://golstatsimages.blob.core.windows.net/todoelfut/red_card.png"},null,-1),LQ=t.createElementVNode("img",{width:"10",src:"https://golstatsimages.blob.core.windows.net/todoelfut/yellow_card.png"},null,-1),BQ=t.createElementVNode("img",{width:"10",src:"https://golstatsimages.blob.core.windows.net/todoelfut/players-goals-con-goles.png"},null,-1),zQ=t.createElementVNode("img",{width:"10",src:"https://golstatsimages.blob.core.windows.net/todoelfut/red_card.png"},null,-1),OQ=t.createElementVNode("img",{width:"10",src:"https://golstatsimages.blob.core.windows.net/todoelfut/yellow_card.png"},null,-1),DQ=t.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/todoelfut/point-indicador-live.png"},null,-1),NQ={key:0},FQ=t.createElementVNode("div",null,"ver desglose",-1),RQ=t.createElementVNode("img",{width:"13",style:{"margin-top":"1px"},src:"https://golstatsimages.blob.core.windows.net/todoelfut/arrow-live-down.png"},null,-1),VQ=["src"],jQ=["src"],UQ={key:0,width:"10",src:"https://golstatsimages.blob.core.windows.net/todoelfut/players-goals-con-goles.png"},GQ={key:0,width:"10",src:"https://golstatsimages.blob.core.windows.net/todoelfut/red_card.png"},HQ={key:0,width:"10",src:"https://golstatsimages.blob.core.windows.net/todoelfut/yellow_card.png"},ZQ=t.createElementVNode("img",{width:"10",src:"https://golstatsimages.blob.core.windows.net/todoelfut/players-goals-con-goles.png"},null,-1),WQ=t.createElementVNode("img",{width:"10",src:"https://golstatsimages.blob.core.windows.net/todoelfut/red_card.png"},null,-1),qQ=t.createElementVNode("img",{width:"10",src:"https://golstatsimages.blob.core.windows.net/todoelfut/yellow_card.png"},null,-1),JQ=["src"],YQ=["src"],XQ=t.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/todoelfut/point-indicador-live.png"},null,-1),$Q={key:0},KQ=["src"],QQ=["src"],eee=t.createElementVNode("img",{width:"12",style:{position:"absolute"},src:"https://golstatsimages.blob.core.windows.net/playlist-icons/icn-soccer-ball@2x.png"},null,-1),tee=[eee],aee=t.createElementVNode("img",{width:"12",style:{position:"absolute"},src:"https://golstatsimages.blob.core.windows.net/playlist-icons/icn-soccer-ball@2x.png"},null,-1),ree=[aee],nee=t.createElementVNode("img",{style:{position:"absolute","margin-top":"1px"},width:"7",src:"https://golstatsimages.blob.core.windows.net/playlist-icons/icn-yellow-card@2x.png"},null,-1),iee=[nee],oee=t.createElementVNode("img",{style:{position:"absolute","margin-top":"1px"},width:"7",src:"https://golstatsimages.blob.core.windows.net/playlist-icons/icn-red-card@2x.png"},null,-1),see=[oee],lee=t.createElementVNode("img",{style:{position:"absolute","margin-top":"1px"},width:"7",src:"https://golstatsimages.blob.core.windows.net/playlist-icons/icn-yellow-card@2x.png"},null,-1),cee=[lee],uee=t.createElementVNode("img",{style:{position:"absolute","margin-top":"1px"},width:"7",src:"https://golstatsimages.blob.core.windows.net/playlist-icons/icn-red-card@2x.png"},null,-1),dee=[uee],hee=t.createElementVNode("img",{style:{"margin-left":"6px"},src:"https://golstatsimages.blob.core.windows.net/playlist-icons/icn-down.png"},null,-1),pee=t.createElementVNode("img",{style:{position:"absolute","margin-top":"1px"},width:"7",src:"https://golstatsimages.blob.core.windows.net/playlist-icons/icn-yellow-card@2x.png"},null,-1),fee=[pee],mee=t.createElementVNode("img",{style:{position:"absolute","margin-top":"1px"},width:"7",src:"https://golstatsimages.blob.core.windows.net/playlist-icons/icn-red-card@2x.png"},null,-1),gee=[mee],yee=t.createElementVNode("img",{style:{position:"absolute","margin-top":"1px"},width:"7",src:"https://golstatsimages.blob.core.windows.net/playlist-icons/icn-yellow-card@2x.png"},null,-1),vee=[yee],bee=t.createElementVNode("img",{style:{position:"absolute","margin-top":"1px"},width:"7",src:"https://golstatsimages.blob.core.windows.net/playlist-icons/icn-red-card@2x.png"},null,-1),_ee=[bee],xee=t.createElementVNode("img",{width:"12",style:{position:"absolute"},src:"https://golstatsimages.blob.core.windows.net/playlist-icons/icn-soccer-ball@2x.png"},null,-1),wee=[xee],kee=t.createElementVNode("img",{width:"12",style:{position:"absolute"},src:"https://golstatsimages.blob.core.windows.net/playlist-icons/icn-soccer-ball@2x.png"},null,-1),See=[kee],Cee={__name:"CardPreMatch",props:{game:{type:Object,default:()=>{}},playsLive:{type:Object,default:()=>{}},is_captured:{type:Number,default:1},infoLive:{type:Object,default:()=>{}},providerId:{type:Number,default:0},isDevApis:{type:Boolean,default:!1}},emits:["open-modal-event"],setup(e,{emit:o}){const s=e,B=new Map([[1,45],[2,90],[3,105],[4,120]]),U=t.computed(()=>{if(s.game.isMT)return"MT";const r=B.get(s.infoLive.recent_lapse);return r&&r<s.infoLive.minute?`${r}' + ${s.infoLive.minute-r}'`:`${s.infoLive.minute}'`}),m=t.computed(()=>{let r=0,_=0,b=!1;var x=!1;return Object.keys(s.infoLive).includes("score")&&(s.infoLive.score["own_"+s.game.home_team.team_id]!=null&&s.infoLive.score["own_"+s.game.home_team.team_id]!=0&&(x=!0),s.infoLive.score["own_"+s.game.visiting_team.team_id]!=null&&s.infoLive.score["own_"+s.game.visiting_team.team_id]!=0&&(b=!0),b?s.infoLive.score[s.game.home_team.team_id]!=null&&(r=parseInt(s.infoLive.score[s.game.home_team.team_id])+parseInt(s.infoLive.score["own_"+s.game.visiting_team.team_id])):s.infoLive.score[s.game.home_team.team_id]!=null&&(r=parseInt(s.infoLive.score[s.game.home_team.team_id])),x?s.infoLive.score[s.game.visiting_team.team_id]!=null&&(_=parseInt(s.infoLive.score[s.game.visiting_team.team_id])+parseInt(s.infoLive.score["own_"+s.game.home_team.team_id])):s.infoLive.score[s.game.visiting_team.team_id]!=null&&(_=parseInt(s.infoLive.score[s.game.visiting_team.team_id]))),r+" - "+_}),y=t.computed(()=>{const r={...s.game};return r.gameSchedule=s.game.schedule.split(":"),r.gameSchedule.pop(),r.gameSchedule=r.gameSchedule.join(":"),r});function a(r){let _=r.split(" "),b=_[_.length-2];return b.includes("+")?_[_.length-3]+"+"+_[_.length-1]:(b=_[_.length-1],b)}function v(r){o("open-modal-event",r)}function p(r,_){const b=new Date(r);if(_==1){const x=["Domingo","Lunes","Martes","Miércoles","Jueves","Viernes","Sábado"],h=["Enero","Febrero","Marzo","Abril","Mayo","Junio","Julio","Agosto","Septiembre","Octubre","Noviembre","Diciembre"];return`${x[b.getDay()]} ${b.getDate()} de ${h[b.getMonth()]}`}else return`${b.getDate()}-${b.getMonth()+1}-${b.getFullYear()}`}return(r,_)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(r.$style.matchCard)},[t.createElementVNode("div",{class:t.normalizeClass(r.$style.pccard)},[t.createElementVNode("div",{class:t.normalizeClass(r.$style.homeTeam),id:"container-home-team"},[t.createElementVNode("img",{class:t.normalizeClass(r.$style.image62Icon),alt:"",src:t.unref(W0)(y.value.home_team.team_id,150,e.providerId)},null,10,EQ),t.createElementVNode("img",{class:t.normalizeClass(r.$style.imgChivasIcon),alt:"",src:t.unref(W0)(y.value.home_team.team_id,80,e.providerId)},null,10,MQ),t.createElementVNode("h3",{class:t.normalizeClass(r.$style.nameDesktop),id:"team-name"},t.toDisplayString(y.value.home_team.colloquial_name),3),t.createElementVNode("h3",{class:t.normalizeClass(r.$style.nameMobile),id:"team-name"},t.toDisplayString(y.value.home_team.acronym),3),y.value.game_status==1?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[y.value.is_live==0&&y.value.game_status==1||Object.keys(y.value.minutes).length>0?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(r.$style.containerEventsGameHometeam)},[t.createElementVNode("div",{class:t.normalizeClass(r.$style.containerEvents)},[y.value.minutes.home_goals_minutes.length>0?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(r.$style.goalsContainer)},[IQ,(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(y.value.minutes.home_goals_minutes,(b,x)=>(t.openBlock(),t.createElementBlock("div",{key:x},[t.createTextVNode(t.toDisplayString(a(b).replace("(AG)",""))+" ",1),x!=y.value.minutes.home_goals_minutes.length-1?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createTextVNode(",  ")],64)):t.createCommentVNode("",!0)]))),128))],2)):t.createCommentVNode("",!0),y.value.minutes.home_red_cards_minutes.length>0&&y.value.minutes.home_goals_minutes.length>0?(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(r.$style.sepEvents)}," | ",2)):t.createCommentVNode("",!0),y.value.minutes.home_red_cards_minutes.length>0?(t.openBlock(),t.createElementBlock("div",{key:2,class:t.normalizeClass(r.$style.yellowContainer)},[PQ,(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(y.value.minutes.home_red_cards_minutes,(b,x)=>(t.openBlock(),t.createElementBlock("div",{key:x},[t.createTextVNode(t.toDisplayString(a(b))+" ",1),x!=y.value.minutes.home_red_cards_minutes.length-1?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createTextVNode(",  ")],64)):t.createCommentVNode("",!0)]))),128))],2)):t.createCommentVNode("",!0),y.value.minutes.home_red_cards_minutes.length>0||y.value.minutes.home_goals_minutes.length>0?(t.openBlock(),t.createElementBlock("div",{key:3,class:t.normalizeClass(r.$style.sepEvents)}," | ",2)):t.createCommentVNode("",!0),y.value.minutes.home_yellow_cards_minutes.length>0?(t.openBlock(),t.createElementBlock("div",{key:4,class:t.normalizeClass(r.$style.redContainer)},[LQ,(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(y.value.minutes.home_yellow_cards_minutes,(b,x)=>(t.openBlock(),t.createElementBlock("div",{key:x},[t.createTextVNode(t.toDisplayString(a(b))+" ",1),x!=y.value.minutes.home_yellow_cards_minutes.length-1?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createTextVNode(",  ")],64)):t.createCommentVNode("",!0)]))),128))],2)):t.createCommentVNode("",!0)],2)],2)):t.createCommentVNode("",!0)],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[y.value.is_live==1&&y.value.game_status!=1||y.value.game_status==0?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(r.$style.containerEventsGameHometeam)},[t.createElementVNode("div",{class:t.normalizeClass(r.$style.containerEvents)},[Object.keys(e.playsLive).length>0?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[e.playsLive[e.game.home_team.team_id]&&"goals"in e.playsLive[e.game.home_team.team_id]?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[Object.keys(e.playsLive[e.game.home_team.team_id].goals).length>0?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(r.$style.goalsContainer)},[BQ,(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(Object.keys(e.playsLive[e.game.home_team.team_id].goals),(b,x)=>(t.openBlock(),t.createElementBlock("div",{key:x},[t.createTextVNode(t.toDisplayString(e.playsLive[e.game.home_team.team_id].goals[b].event.map(h=>`${h}`).join(", ").replace("(AG)",""))+"' ",1),x!=Object.keys(e.playsLive[e.game.home_team.team_id].goals).length-1?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createTextVNode(",  ")],64)):t.createCommentVNode("",!0)]))),128))],2)):t.createCommentVNode("",!0)],64)):t.createCommentVNode("",!0),e.playsLive[e.game.home_team.team_id]&&"red"in e.playsLive[e.game.home_team.team_id]?(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[Object.keys(e.playsLive[e.game.home_team.team_id].red).length>0&&Object.keys(e.playsLive[e.game.home_team.team_id].goals).length>0?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(r.$style.sepEvents)}," | ",2)):t.createCommentVNode("",!0),Object.keys(e.playsLive[e.game.home_team.team_id].red).length>0?(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(r.$style.yellowContainer)},[zQ,(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(Object.keys(e.playsLive[e.game.home_team.team_id].red),(b,x)=>(t.openBlock(),t.createElementBlock("div",{key:x},[t.createTextVNode(t.toDisplayString(e.playsLive[e.game.home_team.team_id].red[b].event.map(h=>`${h}`).join(", "))+"' ",1),x!=Object.keys(e.playsLive[e.game.home_team.team_id].red).length-1?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createTextVNode(",  ")],64)):t.createCommentVNode("",!0)]))),128))],2)):t.createCommentVNode("",!0)],64)):t.createCommentVNode("",!0),e.playsLive[e.game.home_team.team_id]&&"yellow"in e.playsLive[e.game.home_team.team_id]?(t.openBlock(),t.createElementBlock(t.Fragment,{key:2},[Object.keys(e.playsLive[e.game.home_team.team_id].red).length>0||Object.keys(e.playsLive[e.game.home_team.team_id].goals).length>0?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(r.$style.sepEvents)}," | ",2)):t.createCommentVNode("",!0),Object.keys(e.playsLive[e.game.home_team.team_id].yellow).length>0?(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(r.$style.redContainer)},[OQ,(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(Object.keys(e.playsLive[e.game.home_team.team_id].yellow),(b,x)=>(t.openBlock(),t.createElementBlock("div",{key:x},[t.createTextVNode(t.toDisplayString(e.playsLive[e.game.home_team.team_id].yellow[b].event.map(h=>`${h}`).join(", "))+"' ",1),x!=Object.keys(e.playsLive[e.game.home_team.team_id].yellow).length-1?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createTextVNode(",  ")],64)):t.createCommentVNode("",!0)]))),128))],2)):t.createCommentVNode("",!0)],64)):t.createCommentVNode("",!0)],64)):t.createCommentVNode("",!0)],2)],2)):t.createCommentVNode("",!0)],64))],2),y.value.game_status==4&&y.value.is_live==0?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(r.$style.matchInfo),id:"container-match-info"},[t.createElementVNode("div",{class:t.normalizeClass(r.$style.sbado16De)},t.toDisplayString(p(y.value.date_time_utc,1)),3),t.createElementVNode("div",{class:t.normalizeClass(r.$style.sab16092023)},t.toDisplayString(p(y.value.date_time_utc,0)),3),t.createElementVNode("div",{class:t.normalizeClass(r.$style.hour)},[t.createElementVNode("div",{class:t.normalizeClass(r.$style.div)},t.toDisplayString(y.value.gameSchedule),3),t.createElementVNode("div",{class:t.normalizeClass(r.$style.cst)},"CST",2)],2),t.createElementVNode("div",{class:t.normalizeClass(r.$style.chivasTvCanal)},t.toDisplayString(y.value.tv_stations.join(", ")),3)],2)):(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(r.$style.matchInfo),id:"container-match-info"},[y.value.is_live?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createTextVNode(t.toDisplayString(p(y.value.date_time_utc,1)),1)],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createElementVNode("div",{class:t.normalizeClass([r.$style.sbado16De,r.$style.gameDate])},t.toDisplayString(p(y.value.date_time_utc,1)),3),t.createElementVNode("div",{class:t.normalizeClass([r.$style.sab16092023,r.$style.gameDate])},t.toDisplayString(p(y.value.date_time_utc,0)),3)],64)),y.value.is_live||y.value.game_status!=1&&y.value.game_status!=4?(t.openBlock(),t.createElementBlock("div",{key:2,class:t.normalizeClass(r.$style.score)},[t.createElementVNode("div",{class:t.normalizeClass(r.$style.divscore)},t.toDisplayString(m.value),3)],2)):(t.openBlock(),t.createElementBlock("div",{key:3,class:t.normalizeClass(r.$style.score)},[t.createElementVNode("div",{class:t.normalizeClass(r.$style.divscore)},t.toDisplayString(y.value.score.join(" - ")),3)],2)),t.createElementVNode("div",{class:t.normalizeClass(r.$style.gameStatus)},[y.value.is_live?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(r.$style.liveMinutes)},[DQ,t.createTextVNode(" LIVE - "+t.toDisplayString(U.value),1)],2)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createTextVNode(" Finalizado "),y.value.penalties_score_home_team!=0||y.value.penalties_score_visiting_team!=0?(t.openBlock(),t.createElementBlock("span",NQ," - Penales "+t.toDisplayString(y.value.penalties_score_home_team)+" - "+t.toDisplayString(y.value.penalties_score_visiting_team),1)):t.createCommentVNode("",!0)],64))],2),e.is_captured==1?(t.openBlock(),t.createElementBlock(t.Fragment,{key:4},[y.value.is_live==1||y.value.game_status==1||Object.keys(y.value.minutes).length>0?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(r.$style.viewButtomEvent),onClick:_[0]||(_[0]=b=>v(y.value))},[FQ,t.createTextVNode("  "),RQ],2)):t.createCommentVNode("",!0)],64)):t.createCommentVNode("",!0)],2)),t.createElementVNode("div",{class:t.normalizeClass(r.$style.awayTeam),id:"container-away-team"},[t.createElementVNode("img",{class:t.normalizeClass(r.$style.image62Icon1),alt:"",src:t.unref(W0)(y.value.visiting_team.team_id,150,e.providerId)},null,10,VQ),t.createElementVNode("h3",{class:t.normalizeClass(r.$style.name),id:"team-name"},t.toDisplayString(y.value.visiting_team.colloquial_name),3),t.createElementVNode("img",{class:t.normalizeClass(r.$style.imgAtlasIcon),alt:"",src:t.unref(W0)(y.value.visiting_team.team_id,80,e.providerId)},null,10,jQ),t.createElementVNode("h3",{class:t.normalizeClass(r.$style.name1),id:"team-name"},t.toDisplayString(y.value.visiting_team.acronym),3),y.value.game_status==1?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[y.value.is_live==0&&y.value.game_status==1||Object.keys(y.value.minutes).length>0?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(r.$style.containerEventsGameAwayteam)},[t.createElementVNode("div",{class:t.normalizeClass(r.$style.containerEvents)},[y.value.minutes.visiting_goals_minutes.length>0?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(r.$style.goalsContainer)},[y.value.minutes.visiting_goals_minutes.length>0?(t.openBlock(),t.createElementBlock("img",UQ)):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(y.value.minutes.visiting_goals_minutes,(b,x)=>(t.openBlock(),t.createElementBlock("div",{key:x},[t.createTextVNode(t.toDisplayString(a(b).replace("(AG)",""))+" ",1),x!=y.value.minutes.visiting_goals_minutes.length-1?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createTextVNode(",  ")],64)):t.createCommentVNode("",!0)]))),128))],2)):t.createCommentVNode("",!0),y.value.minutes.away_red_cards_minutes.length>0&&y.value.minutes.visiting_goals_minutes.length>0?(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(r.$style.sepEvents)}," | ",2)):t.createCommentVNode("",!0),y.value.minutes.away_red_cards_minutes.length>0?(t.openBlock(),t.createElementBlock("div",{key:2,class:t.normalizeClass(r.$style.yellowContainer)},[y.value.minutes.away_red_cards_minutes.length>0?(t.openBlock(),t.createElementBlock("img",GQ)):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(y.value.minutes.away_red_cards_minutes,(b,x)=>(t.openBlock(),t.createElementBlock("div",{key:x},[t.createTextVNode(t.toDisplayString(a(b))+" ",1),x!=y.value.minutes.away_red_cards_minutes.length-1?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createTextVNode(",  ")],64)):t.createCommentVNode("",!0)]))),128))],2)):t.createCommentVNode("",!0),y.value.minutes.away_red_cards_minutes.length>0||y.value.minutes.visiting_goals_minutes.length>0?(t.openBlock(),t.createElementBlock("div",{key:3,class:t.normalizeClass(r.$style.sepEvents)}," | ",2)):t.createCommentVNode("",!0),y.value.minutes.away_yellow_cards_minutes.length>0?(t.openBlock(),t.createElementBlock("div",{key:4,class:t.normalizeClass(r.$style.redContainer)},[y.value.minutes.away_yellow_cards_minutes.length>0?(t.openBlock(),t.createElementBlock("img",HQ)):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(y.value.minutes.away_yellow_cards_minutes,(b,x)=>(t.openBlock(),t.createElementBlock("div",{key:x},[t.createTextVNode(t.toDisplayString(a(b))+" ",1),x!=y.value.minutes.away_yellow_cards_minutes.length-1?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createTextVNode(",  ")],64)):t.createCommentVNode("",!0)]))),128))],2)):t.createCommentVNode("",!0)],2)],2)):t.createCommentVNode("",!0)],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[y.value.is_live==1&&y.value.game_status!=1||y.value.game_status==0?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(r.$style.containerEventsGameAwayteam)},[t.createElementVNode("div",{class:t.normalizeClass(r.$style.containerEvents)},[Object.keys(e.playsLive).length>0?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[e.playsLive[e.game.visiting_team.team_id]&&"goals"in e.playsLive[e.game.visiting_team.team_id]?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[Object.keys(e.playsLive[e.game.visiting_team.team_id].goals).length?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(r.$style.goalsContainer)},[ZQ,(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(Object.keys(e.playsLive[e.game.visiting_team.team_id].goals),(b,x)=>(t.openBlock(),t.createElementBlock("div",{key:x},[t.createTextVNode(t.toDisplayString(e.playsLive[e.game.visiting_team.team_id].goals[b].event.map(h=>`${h}`).join(", ").replace("(AG)",""))+"' ",1),x!=Object.keys(e.playsLive[e.game.visiting_team.team_id].goals).length-1?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createTextVNode(",  ")],64)):t.createCommentVNode("",!0)]))),128))],2)):t.createCommentVNode("",!0)],64)):t.createCommentVNode("",!0),e.playsLive[e.game.visiting_team.team_id]&&"red"in e.playsLive[e.game.visiting_team.team_id]?(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[Object.keys(e.playsLive[e.game.visiting_team.team_id].red).length>0&&Object.keys(e.playsLive[e.game.visiting_team.team_id].goals).length>0?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(r.$style.sepEvents)}," | ",2)):t.createCommentVNode("",!0),Object.keys(e.playsLive[e.game.visiting_team.team_id].red).length>0?(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(r.$style.yellowContainer)},[WQ,(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(Object.keys(e.playsLive[e.game.visiting_team.team_id].red),(b,x)=>(t.openBlock(),t.createElementBlock("div",{key:x},[t.createTextVNode(t.toDisplayString(e.playsLive[e.game.visiting_team.team_id].red[b].event.map(h=>`${h}`).join(", "))+"' ",1),x!=Object.keys(e.playsLive[e.game.visiting_team.team_id].red).length-1?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createTextVNode(",  ")],64)):t.createCommentVNode("",!0)]))),128))],2)):t.createCommentVNode("",!0)],64)):t.createCommentVNode("",!0),e.playsLive[e.game.visiting_team.team_id]&&"yellow"in e.playsLive[e.game.visiting_team.team_id]?(t.openBlock(),t.createElementBlock(t.Fragment,{key:2},[Object.keys(e.playsLive[e.game.visiting_team.team_id].red).length>0||Object.keys(e.playsLive[e.game.visiting_team.team_id].goals).length>0?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(r.$style.sepEvents)}," | ",2)):t.createCommentVNode("",!0),Object.keys(e.playsLive[e.game.visiting_team.team_id].yellow).length>0?(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(r.$style.redContainer)},[qQ,(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(Object.keys(e.playsLive[e.game.visiting_team.team_id].yellow),(b,x)=>(t.openBlock(),t.createElementBlock("div",{key:x},[t.createTextVNode(t.toDisplayString(e.playsLive[e.game.visiting_team.team_id].yellow[b].event.map(h=>`${h}`).join(", "))+"' ",1),x!=Object.keys(e.playsLive[e.game.visiting_team.team_id].yellow).length-1?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createTextVNode(",  ")],64)):t.createCommentVNode("",!0)]))),128))],2)):t.createCommentVNode("",!0)],64)):t.createCommentVNode("",!0)],64)):t.createCommentVNode("",!0)],2)],2)):t.createCommentVNode("",!0)],64))],2)],2),t.createElementVNode("div",{class:t.normalizeClass(r.$style.pcmobile)},[t.createElementVNode("div",{class:t.normalizeClass(r.$style.headerinfomobile)},[t.createElementVNode("div",{class:t.normalizeClass(r.$style.homeTeam),id:"container-home-team"},[t.createElementVNode("img",{class:t.normalizeClass(r.$style.image62Icon),alt:"",src:t.unref(W0)(y.value.home_team.team_id,150,e.providerId)},null,10,JQ),t.createElementVNode("img",{class:t.normalizeClass(r.$style.imgChivasIcon),alt:"",src:t.unref(W0)(y.value.home_team.team_id,80,e.providerId)},null,10,YQ),t.createElementVNode("h3",{class:t.normalizeClass(r.$style.nameDesktop),id:"team-name"},t.toDisplayString(y.value.home_team.colloquial_name),3),t.createElementVNode("h3",{class:t.normalizeClass(r.$style.nameMobile),id:"team-name"},t.toDisplayString(y.value.home_team.acronym),3)],2),y.value.game_status==4&&y.value.is_live==0?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(r.$style.matchInfo),id:"container-match-info"},[t.createElementVNode("div",{class:t.normalizeClass(r.$style.sbado16De)},t.toDisplayString(p(y.value.date_time_utc,1)),3),t.createElementVNode("div",{class:t.normalizeClass(r.$style.sab16092023)},t.toDisplayString(p(y.value.date_time_utc,0)),3),t.createElementVNode("div",{class:t.normalizeClass(r.$style.hour)},[t.createElementVNode("div",{class:t.normalizeClass(r.$style.div)},t.toDisplayString(y.value.gameSchedule),3),t.createElementVNode("div",{class:t.normalizeClass(r.$style.cst)},"CST",2)],2),t.createElementVNode("div",{class:t.normalizeClass(r.$style.chivasTvCanal)},t.toDisplayString(y.value.tv_stations.join(", ")),3)],2)):(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(r.$style.matchInfo),id:"container-match-info"},[y.value.is_live?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createTextVNode(t.toDisplayString(p(y.value.date_time_utc,1)),1)],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createElementVNode("div",{class:t.normalizeClass([r.$style.sbado16De,r.$style.gameDate])},t.toDisplayString(p(y.value.date_time_utc,1)),3),t.createElementVNode("div",{class:t.normalizeClass([r.$style.sab16092023,r.$style.gameDate])},t.toDisplayString(p(y.value.date_time_utc,0)),3)],64)),y.value.is_live||y.value.game_status!=1&&y.value.game_status!=4?(t.openBlock(),t.createElementBlock("div",{key:2,class:t.normalizeClass(r.$style.score)},[t.createElementVNode("div",{class:t.normalizeClass(r.$style.divscore)},t.toDisplayString(m.value),3)],2)):(t.openBlock(),t.createElementBlock("div",{key:3,class:t.normalizeClass(r.$style.score)},[t.createElementVNode("div",{class:t.normalizeClass(r.$style.divscore)},t.toDisplayString(y.value.score.join(" - ")),3)],2)),t.createElementVNode("div",{class:t.normalizeClass(r.$style.gameStatus)},[y.value.is_live?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(r.$style.liveMinutes)},[XQ,t.createTextVNode(" LIVE - "+t.toDisplayString(U.value)+"' ",1)],2)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createTextVNode(" Finalizado "),y.value.penalties_score_home_team!=0||y.value.penalties_score_visiting_team!=0?(t.openBlock(),t.createElementBlock("span",$Q," - Penales "+t.toDisplayString(y.value.penalties_score_home_team)+" - "+t.toDisplayString(y.value.penalties_score_visiting_team),1)):t.createCommentVNode("",!0)],64))],2)],2)),t.createElementVNode("div",{class:t.normalizeClass(r.$style.awayTeam),id:"container-away-team"},[t.createElementVNode("img",{class:t.normalizeClass(r.$style.image62Icon1),alt:"",src:t.unref(W0)(y.value.visiting_team.team_id,150,e.providerId)},null,10,KQ),t.createElementVNode("h3",{class:t.normalizeClass(r.$style.name),id:"team-name"},t.toDisplayString(y.value.visiting_team.colloquial_name),3),t.createElementVNode("img",{class:t.normalizeClass(r.$style.imgAtlasIcon),alt:"",src:t.unref(W0)(y.value.visiting_team.team_id,80,e.providerId)},null,10,QQ),t.createElementVNode("h3",{class:t.normalizeClass(r.$style.name1),id:"team-name"},t.toDisplayString(y.value.visiting_team.acronym),3)],2)],2),y.value.game_status!=4||y.value.is_live==1?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(r.$style.headereventsmobile)},[t.createElementVNode("div",{class:t.normalizeClass(r.$style.headereventsmobilecont)},[t.createElementVNode("div",{class:t.normalizeClass(r.$style.headereventsmobilecontlocal)},[y.value.game_status==1?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[y.value.minutes.home_goals_minutes.length>0?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(r.$style.icongoalheader)},tee,2)):t.createCommentVNode("",!0)],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[y.value.is_live==1&&y.value.game_status!=1||y.value.game_status==0?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[e.playsLive[e.game.home_team.team_id]&&"goals"in e.playsLive[e.game.home_team.team_id]?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[Object.keys(e.playsLive[e.game.home_team.team_id].goals).length>0?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(r.$style.icongoalheader)},ree,2)):t.createCommentVNode("",!0)],64)):t.createCommentVNode("",!0)],64)):t.createCommentVNode("",!0)],64)),t.createElementVNode("div",{class:t.normalizeClass(r.$style.goalscontainermobile),style:{"justify-content":"left !important"}},[y.value.game_status==1?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:0},t.renderList(y.value.minutes.home_goals_minutes,(b,x)=>(t.openBlock(),t.createElementBlock("div",{key:x,class:t.normalizeClass(r.$style.itemmobilgoal)},t.toDisplayString(a(b).replace("(AG)","")),3))),128)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[y.value.is_live==1&&y.value.game_status!=1||y.value.game_status==0?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[e.playsLive[e.game.visiting_team.team_id]&&"goals"in e.playsLive[e.game.visiting_team.team_id]?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:0},t.renderList(Object.keys(e.playsLive[e.game.home_team.team_id].goals),(b,x)=>(t.openBlock(),t.createElementBlock("div",{key:x,class:t.normalizeClass(r.$style.itemmobilgoal)},t.toDisplayString(e.playsLive[e.game.home_team.team_id].goals[b].event.map(h=>`${h}`).join(", ").replace("(AG)",""))+"' ",3))),128)):t.createCommentVNode("",!0)],64)):t.createCommentVNode("",!0)],64))],2),t.createElementVNode("div",{class:t.normalizeClass(r.$style.conttarjetasmobile)},[y.value.game_status==1?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createElementVNode("div",{class:t.normalizeClass(r.$style.conttarjetasmobileyellow)},[t.createElementVNode("div",{class:t.normalizeClass(r.$style.iconmobileyellow)},iee,2),t.createElementVNode("div",{class:t.normalizeClass(r.$style.txtmobileyellow)},t.toDisplayString(y.value.minutes.home_yellow_cards_minutes.length),3)],2),t.createElementVNode("div",{class:t.normalizeClass(r.$style.conttarjetasmobilered)},[t.createElementVNode("div",{class:t.normalizeClass(r.$style.iconmobilered)},see,2),t.createElementVNode("div",{class:t.normalizeClass(r.$style.txtmobilered)},t.toDisplayString(y.value.minutes.home_red_cards_minutes.length),3)],2)],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[y.value.is_live==1&&y.value.game_status!=1||y.value.game_status==0?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[Object.keys(e.playsLive).length>0?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createElementVNode("div",{class:t.normalizeClass(r.$style.conttarjetasmobileyellow)},[t.createElementVNode("div",{class:t.normalizeClass(r.$style.iconmobileyellow)},cee,2),e.playsLive[e.game.home_team.team_id]&&"yellow"in e.playsLive[e.game.home_team.team_id]?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(r.$style.txtmobileyellow)},t.toDisplayString(Object.keys(e.playsLive[e.game.home_team.team_id].yellow).length),3)):(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(r.$style.txtmobileyellow)},"0",2))],2),t.createElementVNode("div",{class:t.normalizeClass(r.$style.conttarjetasmobilered)},[t.createElementVNode("div",{class:t.normalizeClass(r.$style.iconmobilered)},dee,2),e.playsLive[e.game.home_team.team_id]&&"red"in e.playsLive[e.game.home_team.team_id]?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(r.$style.txtmobilered)},t.toDisplayString(Object.keys(e.playsLive[e.game.home_team.team_id].red).length),3)):(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(r.$style.txtmobilered)},"0",2))],2)],64)):t.createCommentVNode("",!0)],64)):t.createCommentVNode("",!0)],64))],2)],2),t.createElementVNode("div",{class:t.normalizeClass(r.$style.headereventsmobileconttitle)},[e.is_captured==1?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[y.value.is_live==1||y.value.game_status==1||Object.keys(y.value.minutes).length>0?(t.openBlock(),t.createElementBlock("span",{key:0,class:t.normalizeClass(r.$style.viewButtomEventMobile),onClick:_[1]||(_[1]=b=>v(y.value))},[t.createTextVNode(" ver desglose "),hee],2)):t.createCommentVNode("",!0)],64)):t.createCommentVNode("",!0)],2),t.createElementVNode("div",{class:t.normalizeClass(r.$style.headereventsmobilecontaway)},[t.createElementVNode("div",{class:t.normalizeClass(r.$style.conttarjetasmobile)},[y.value.game_status==1?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createElementVNode("div",{class:t.normalizeClass(r.$style.conttarjetasmobileyellow)},[t.createElementVNode("div",{class:t.normalizeClass(r.$style.txtmobileyellow)},t.toDisplayString(y.value.minutes.away_yellow_cards_minutes.length),3),t.createElementVNode("div",{class:t.normalizeClass(r.$style.iconmobileyellow)},fee,2)],2),t.createElementVNode("div",{class:t.normalizeClass(r.$style.conttarjetasmobilered)},[t.createElementVNode("div",{class:t.normalizeClass(r.$style.txtmobilered)},t.toDisplayString(y.value.minutes.away_red_cards_minutes.length),3),t.createElementVNode("div",{class:t.normalizeClass(r.$style.iconmobilered)},gee,2)],2)],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[y.value.is_live==1&&y.value.game_status!=1||y.value.game_status==0?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[Object.keys(e.playsLive).length>0?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createElementVNode("div",{class:t.normalizeClass(r.$style.conttarjetasmobileyellow)},[e.playsLive[e.game.visiting_team.team_id]&&"yellow"in e.playsLive[e.game.visiting_team.team_id]?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(r.$style.txtmobileyellow)},t.toDisplayString(Object.keys(e.playsLive[e.game.visiting_team.team_id].yellow).length),3)):(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(r.$style.txtmobileyellow)},"0",2)),t.createElementVNode("div",{class:t.normalizeClass(r.$style.iconmobileyellow)},vee,2)],2),t.createElementVNode("div",{class:t.normalizeClass(r.$style.conttarjetasmobilered)},[e.playsLive[e.game.visiting_team.team_id]&&"red"in e.playsLive[e.game.visiting_team.team_id]?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(r.$style.txtmobilered)},t.toDisplayString(Object.keys(e.playsLive[e.game.visiting_team.team_id].red).length),3)):(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(r.$style.txtmobilered)},"0",2)),t.createElementVNode("div",{class:t.normalizeClass(r.$style.iconmobilered)},_ee,2)],2)],64)):t.createCommentVNode("",!0)],64)):t.createCommentVNode("",!0)],64))],2),t.createElementVNode("div",{class:t.normalizeClass(r.$style.goalscontainermobile),style:{"justify-content":"right !important"}},[y.value.game_status==1?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:0},t.renderList(y.value.minutes.visiting_goals_minutes,(b,x)=>(t.openBlock(),t.createElementBlock("div",{key:x,class:t.normalizeClass(r.$style.itemmobilgoal)},t.toDisplayString(a(b).replace("(AG)","")),3))),128)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[y.value.is_live==1&&y.value.game_status!=1||y.value.game_status==0?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[e.playsLive[e.game.visiting_team.team_id]&&"goals"in e.playsLive[e.game.visiting_team.team_id]?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:0},t.renderList(Object.keys(e.playsLive[e.game.visiting_team.team_id].goals),(b,x)=>(t.openBlock(),t.createElementBlock("div",{key:x,class:t.normalizeClass(r.$style.itemmobilgoal)},t.toDisplayString(e.playsLive[e.game.visiting_team.team_id].goals[b].event.map(h=>`${h}`).join(", ").replace("(AG)",""))+"' ",3))),128)):t.createCommentVNode("",!0)],64)):t.createCommentVNode("",!0)],64))],2),y.value.game_status==1?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[y.value.minutes.visiting_goals_minutes.length>0?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(r.$style.icongoalheader)},wee,2)):t.createCommentVNode("",!0)],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[y.value.is_live==1&&y.value.game_status!=1||y.value.game_status==0?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[e.playsLive[e.game.visiting_team.team_id]&&"goals"in e.playsLive[e.game.visiting_team.team_id]?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[Object.keys(e.playsLive[e.game.visiting_team.team_id].goals).length>0?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(r.$style.icongoalheader)},See,2)):t.createCommentVNode("",!0)],64)):t.createCommentVNode("",!0)],64)):t.createCommentVNode("",!0)],64))],2)],2)],2)):t.createCommentVNode("",!0)],2)],2))}},Tee={$style:AQ},Aee=Sf(Cee,[["__cssModules",Tee]]),Eee={class:"calendar-by-game__carousel"},Mee="https://al2nv2dmkc.execute-api.us-west-2.amazonaws.com/prod/mxm/",Iee={__name:"GSC-CalendarByGame",props:{showVideos:{type:Number,default:0},playsLive:{type:Object,default:()=>{}},infoLive:{type:Object,default:()=>{}},height:{type:String,default:"fit-content"},width:{type:String,default:"100%"},rowHeight:{type:String,default:"fit-content"},oddRowColor:{type:String,default:"#172531"},evenRowColor:{type:String,default:"#0D1D29"},isLandingMode:{type:Boolean,default:!1},isRoundMode:{type:Boolean,default:!1},isRoundPickerVisible:{type:Boolean,default:!0},isPaginationVisible:{type:Boolean,default:!0},awaitForSeasons:{type:Boolean,default:!1},seasons:{type:Array,default:()=>[]},isCup:{type:Boolean,default:!1},isCupLegacy:{type:Boolean,default:!1},token:{type:String,default:""},pagesWithGames:{type:Array,default:()=>[]},maxGamesToShow:{type:Number,default:0,validator(e){return!Number.isNaN(e)&&e>=0}},areRoundsVisible:{type:Boolean,default:!0},is_captured:{type:Number,default:1},gamesPerMatchDay:{type:Number,default:0,validator(e){return!Number.isNaN(e)&&e>=0}},itemsToShow:{type:Number,default:9},itemsToScroll:{type:Number,default:9},games:{type:Array,default:()=>null},teamId:{type:Number,default:0,validator(e){return!Number.isNaN(e)&&e>=0}},avoidTeamIdFilter:{type:Boolean,default:!1},areGamesCarouselType:{type:Boolean,default:!1},defaultGameId:{type:Number,default:0,validator(e){return!Number.isNaN(e)&&e>=0}},userTeamId:{type:Number,default:0,validator(e){return!Number.isNaN(e)&&e>=0}},sortCalendar:{type:Boolean,default:!0},isTeamGamePerPage:{type:Boolean,default:!1},onlyGamesTeamId:{type:Number,default:0,validator(e){return!Number.isNaN(e)&&e>=0}},tournamentType:{type:Number,default:0},checkLiveGamesIntervalMinutes:{type:Number,default:2},gamesEventsIntervalMinutes:{type:Number,default:2},checkStartedLiveGamesMinutes:{type:Number,default:5},videoPrivilegesUserId:{type:Number,default:0},providerId:{type:Number,default:0},isDevApis:{type:Boolean,default:!1}},emits:["tournament-selected","change-teams","change-round","change-game-carousel","action","change-games-by-client-privileges","open-modal-event"],setup(e,{emit:o}){const s=e;let B=null,U=null,m=null;const y=new Set,a=new Set,v=t.ref([]),p=t.ref({}),r=t.ref(0),_=t.ref(null),b=t.ref({}),x=t.ref(new Map),h=t.ref(!1),n=t.ref(null),i=t.ref(null),c=t.ref(null),l=t.ref([]),d=t.ref(new Map),g=t.ref(new Set),w=t.ref(Q_(p6));let C=Promise.resolve();t.watch(()=>s.providerId,He=>{C=xX(He).then(Pe=>{w.value=Pe})},{immediate:!0});const E=t.computed(()=>s.isCup),A=t.computed(()=>s.isCupLegacy),P=t.computed(()=>({height:s.height,width:s.width})),L=t.computed(()=>{if(s.games)return me(s.games,s.isTeamGamePerPage);{const He=x.value.get(b.value.key);return He&&s.isTeamGamePerPage&&s.onlyGamesTeamId?[He[0].filter(Pe=>Pe.home_team.team_id===s.onlyGamesTeamId||Pe.visiting_team.team_id===s.onlyGamesTeamId)]:He||[]}}),T=t.computed(()=>{const He=s.areGamesCarouselType?L.value[0]:L.value;return console.log("aux: ",He),He}),I=t.ref([]),M=t.ref(new Map),S=t.ref([]),z=t.ref(0),k=t.ref(0),O=t.computed(()=>{const He=j(p.value),Pe=I.value.find(Ve=>Ve.key===He);return Pe&&h.value&&(N(!1),we(Pe)),He});t.watch(()=>s.seasons,He=>{He&&He.length&&(N(!0),v.value=He.map(Pe=>Pe.id),ne(He,!0))},{immediate:!0,deep:!0}),t.watch(x,He=>{if(s.onlyGamesTeamId&&He.size){const Pe=Array.from(He.values()).reduce((Ve,Ie)=>(Ie.forEach(ge=>{const Ae=ge.find(ke=>ke.home_team.team_id===s.onlyGamesTeamId||ke.visiting_team.team_id===s.onlyGamesTeamId);Ae&&Ve.push(Ae)}),Ve),[]);o("change-games-by-client-privileges",Pe)}},{immediate:!0});function N(He){h.value=He}function j(He){const Pe=new Date().valueOf(),Ve=Object.entries(Object.entries(He).reduce((ge,[Ae,ke])=>(ge[Ae]=null,ke.forEach(je=>{je.games.forEach(De=>{if([1,0].includes(De.game_status)||De.is_live){const Ne=Pe-De.dateTimeMillis;(ge[Ae]===null||Ne<ge[Ae])&&(ge[Ae]=Ne)}})}),ge),{}));if(!Ve.length)return"1";const Ie=Ve.reduce((ge,[Ae,ke])=>{if(ke!==null){const je=M.value.get(Ae);(ge.shortestMillisToNow===null||ke<ge.shortestMillisToNow&&je.index>=ge.scheduleKey.index)&&(ge.shortestMillisToNow=ke,ge.round=Ae,ge.scheduleKey=je)}return ge},{round:"",shortestMillisToNow:null,scheduleKey:null});return Ie.shortestMillisToNow!==null?Ie.round:Ve[0][0]}t.watch(()=>s.teamId,()=>{ie()},{immediate:!0});async function G(He){try{const Pe=Py("https://u6845vutog.execute-api.us-east-2.amazonaws.com/prod/api/v1/privileges/games?",s.providerId,s.isDevApis),Ve=He.reduce((Ie,ge,Ae)=>(Ie+=`${Ae===0?"":"&"}season=${ge}`,Ie),Pe);return(await Iy.get(Ve)).data}catch(Pe){throw new Error(Pe)}}async function H(He,Pe,Ve=""){let Ie=Ve;try{const ge={};s.token&&(ge.Authorization=s.token),Ie||(Ie=Py("https://qyyibs1w0d.execute-api.us-west-2.amazonaws.com/prod/calendar/gamesBySeason?",s.providerId,s.isDevApis),He.forEach((je,De)=>{Ie+=`${De===0?"":"&"}seasons=${je}`}));const{data:{data:Ae,teams:ke}}=await Iy.get(Ie,{headers:ge});return{seasonsAndGames:Ae,seasonsAndTeams:ke}}catch(ge){if(Pe>0)return H(He,Pe-1,Ie);throw new Error(ge)}}function Z(He){for(const Pe of He)if(!v.value.includes(Pe.season_id))return!0;return!1}let $=0;async function ne(He,Pe){try{p.value={},k.value=0,z.value=0;const Ve=new Set,Ie=He.map(Ne=>Ne.id),ge=[H(Ie,3)];s.videoPrivilegesUserId&&ge.push(G(Ie));const[{seasonsAndGames:Ae,seasonsAndTeams:ke},je]=await Promise.all(ge);if(je&&je.forEach(Ne=>{Ne.status&&Ve.add(Ne.game_id)}),Pe&&Z(Ae))return;$=0,Ae.forEach(Ne=>{const{type:qe}=He.find(Ze=>Ze.id===Ne.season_id);Ne.type=qe,Ne.games.forEach(Ze=>{qe===0&&($=Ne.season_id),k.value++,([1,0].includes(Ze.game_status)||Ze.is_live)&&z.value++,Ze.season_id=Ne.season_id,Ze.hasVideoPrivilege=Ve.has(Ze.game_id)})}),n.value={seasonsGames:Ae};const{teams:De}=ke.find(Ne=>Ne.season_id===$);i.value=De,o("change-teams",De),await C,ie(),g.value.size?ee():await q()}catch(Ve){throw new Error(Ve)}}async function q(){try{const He=await se();a.clear(),l.value=He.data.reduce((Ve,Ie)=>(Ie.games.forEach(ge=>{y.add(ge.game_id),a.add(ge.game_id),Ve.push(ge)}),Ve),[]);const Pe=[];if(y.forEach(Ve=>{a.has(Ve)||(Pe.push(Ve),pe(Ve))}),Pe.forEach(Ve=>{y.delete(Ve)}),l.value.length){U||await K();const Ve=[];g.value.forEach(Ie=>{const ge=d.value.get(Ie);ge&&new Date().valueOf()>ge.dateTimeMillis&&Ve.push(Ie)}),Ve.length&&Ve.every(Ie=>d.value.get(Ie).isLiveTracked)&&ce()}}catch(He){throw new Error(He)}}async function K(){try{const He=[];for(const Ve of l.value){const Ie=d.value.get(Ve.game_id);Ie&&(Ie.is_live=1,Ie.game_status=4,Ie.live_stats=1,Ie.scheduleKey&&Ie.scheduleKey.liveGamesIds.add(Ve.game_id)),Ie.isLiveTracked=!0,He.push(re(Ve.game_id))}const Pe=await Promise.all(He);for(const Ve of Pe){const Ie=d.value.get(Ve.game_id);if(Ie){let ge=!1,Ae=!1;for(const Ne of Ve.plays){if(Ne.category_id===0&&Ne.game_status_id===18){Ae=!0;break}Ne.category_id===0&&Ne.game_status_id===17&&(ge=!0)}Ie.isMT=ge&&!Ae;const ke=[Number(Ve.score[Ie.home_team.team_id.toString()])+Number(Ve.score[`own_${Ie.visiting_team.team_id.toString()}`]),Number(Ve.score[Ie.visiting_team.team_id.toString()])+Number(Ve.score[`own_${Ie.home_team.team_id.toString()}`])],je=ke[0],De=ke[1];Ie.score=[Number.isNaN(je)?0:je,Number.isNaN(De)?0:De],he(Ie,Ve.plays)}}U||Q()}catch(He){throw new Error(He)}}function ee(){g.value.size&&g.value.forEach(He=>{const Pe=d.value.get(He);if(Pe){const Ve=new Date().valueOf();if(60*1e3*30+Pe.dateTimeMillis-Ve>0){const Ie=Pe.dateTimeMillis-Ve-3e5;setTimeout(()=>{X()},Ie>0?Ie:0)}}})}function X(){ce(),m||(m=setInterval(()=>{q()},s.checkLiveGamesIntervalMinutes*60*1e3))}function Q(){de(),U=setInterval(()=>{K()},s.gamesEventsIntervalMinutes*60*1e3)}function ce(){clearInterval(m),m=null}function de(){clearInterval(U),U=null}function he(He,Pe){for(const Ve of Pe)if(Ve.category_id===0&&Ve.game_status_id===13){const Ie=d.value.get(Ve.game_id);l.value=l.value.filter(ge=>ge.game_id!==He.game_id),Ie.is_live=0,Ie.game_status=0,Ie.scheduleKey&&Ie.scheduleKey.liveGamesIds.delete(He.game_id)}}function pe(He){const Pe=d.value.get(He);Pe&&(l.value=l.value.filter(Ve=>Ve.game_id!==He),Pe.is_live=0,Pe.game_status=0,Pe.scheduleKey&&Pe.scheduleKey.liveGamesIds.delete(He))}async function re(He){try{const Pe=Py(Mee,s.providerId,s.isDevApis);return(await Iy.get(`${Pe}${He}`,{headers:{Authorization:`${s.token}`}})).data}catch(Pe){throw new Error(Pe)}}async function se(){try{if(s.seasons.length===0)return[];const He=s.seasons.reduce((ge,Ae)=>`${ge}seasons=${Ae.id}&`,""),Pe=Iy.create({headers:{Authorization:`${s.token}`}}),Ve=Py(`https://qyyibs1w0d.execute-api.us-west-2.amazonaws.com/prod/calendar/gamesBySeason/lives?${He}`,s.providerId,s.isDevApis),{data:Ie}=await Pe.get(Ve);return Ie}catch(He){throw new Error(He)}}function ie(){if(ce(),!i.value)return;d.value.clear(),g.value.clear(),S.value=[];const He=n.value&&n.value.seasonsGames?n.value.seasonsGames.map(Pe=>{const Ve=Pe.games.reduce((Ie,ge)=>{if(s.onlyGamesTeamId&&s.onlyGamesTeamId!==ge.home_team&&s.onlyGamesTeamId!==ge.visiting_team)return Ie;const Ae={...ge,regularSeasonId:$},ke=new Date,[je,De,Ne]=Ae.date.split("-"),[qe,Ze,_e]=Ae.schedule.split(":"),Be=new Date(Number(je),Number(De)-1,Number(Ne),Number(qe),Number(Ze),Number(_e));return Ae.dateTimeMillis=Be.valueOf(),Ae.home_team=i.value.find(Re=>Re.team_id===ge.home_team),Ae.visiting_team=i.value.find(Re=>Re.team_id===ge.visiting_team),Ae.game_status===4&&!Ae.is_live&&ke.getFullYear()===Be.getFullYear()&&ke.getMonth()===Be.getMonth()&&ke.getDate()===Be.getDate()&&g.value.add(Ae.game_id),d.value.set(Ae.game_id,Ae),s.teamId&&Ae.home_team.team_id!==s.teamId&&Ae.visiting_team.team_id!==s.teamId||(Ie[ge.matchday_abbreviation]?Ie[ge.matchday_abbreviation][ge.game_status===3?"canceled":ge.date]?Ie[ge.matchday_abbreviation][ge.game_status===3?"canceled":ge.date].push(Ae):Ie[ge.matchday_abbreviation][ge.game_status===3?"canceled":ge.date]=[Ae]:Ie[ge.matchday_abbreviation]={[ge.game_status===3?"canceled":ge.date]:[Ae]},s.userTeamId&&([1,0].includes(Ae.game_status)||Ae.is_live)&&(Ae.home_team.team_id===s.userTeamId||Ae.visiting_team.team_id===s.userTeamId)&&S.value.push(Ae)),Ie},{});for(let[Ie,ge]of Object.entries(Ve))Ve[Ie]=Object.entries(ge).map(([Ae,ke])=>({date:Ae,games:ke.sort((je,De)=>je.dateTimeMillis-De.dateTimeMillis)})),Ve[Ie].sort((Ae,ke)=>Ae.date<ke.date?-1:Ae.date>ke.date?1:0);return{type:Pe.type,weight:Pe.type===0?0:Pe.type===2?1:2,schedule:Ve}}):[];He.sort((Pe,Ve)=>Pe.weight-Ve.weight),p.value=He.reduce((Pe,Ve)=>{for(const[Ie,ge]of Object.entries(Ve.schedule))if(Ve.type===0)if([1,2].includes(s.tournamentType)){const Ae=w.value.namesAndAbbByTournamentTypeAndMatchDayAbb.get(s.tournamentType);if(Ae){const ke=Ae.get(Ie);ke&&(Pe[ke.matchDayAbbreviation]=ge)}}else if(E.value){const Ae=Ie.replace("M",""),ke=Ae;A.value?Pe[w.value.cupLegacy[Ae]||ke]=ge:Pe[w.value.cup[Ie]||ke]=ge}else Pe[Number(Ie.replace("M","")).toString()]=ge;else Ve.type===2?Ie.charAt(1)=="I"?Pe[`PI${Number(Ie.replace("PI",""))}`]=ge:Pe[`R${Number(Ie.replace("PO",""))}`]=ge:Ve.type===1&&(Pe[w.value.regularLeague[Ie]]=ge);return Pe},{}),x.value=new Map,M.value.clear(),I.value=Array.from(Object.entries(p.value).reduce((Pe,[Ve,Ie],ge)=>{const Ae=Number(Ve);let ke="";Number.isNaN(Ae)?ke=Ve:ke=Ae<10?`0${Ae}`:Ve;const je={key:Ve,value:Ae,valueText:ke,index:ge,liveGamesIds:new Set};M.value.set(Ve,je),Pe.set(Ve,je);const De=Ie.reduce((qe,Ze)=>(Ze.games.forEach(_e=>{_e.game_id===s.defaultGameId&&(c.value=Ve),_e.roundAbbreviation=Number.isNaN(Ae)?Ae:`J ${Ae}`,_e.scheduleKey=je,_e.is_live&&je.liveGamesIds.add(_e.game_id)}),qe=qe.concat(Ze.games),qe),[]),Ne=me(De);return x.value.set(Ve,Ne),Pe},new Map).values())}function me(He,Pe=!1){const Ve=[];if(s.gamesPerMatchDay>0){let Ie=[];He.forEach((ge,Ae)=>{Ie.push(ge),(Ae+1)%s.gamesPerMatchDay===0&&(Ve.push([...Ie]),Ie=[])}),Ie.length&&Ve.push([...Ie])}else Ve.push(He);return Pe&&s.isTeamGamePerPage&&s.defaultGameId?Ve.filter(Ie=>Ie.game_id===s.defaultGameId||Ie.gameId===s.defaultGameId):Ve}async function ye(He){try{const Pe=Py("https://kefloixzy1.execute-api.us-west-2.amazonaws.com/prod/tournaments",s.providerId,s.isDevApis),{data:Ve}=await Iy.get(Pe);return Ve}catch(Pe){if(He>0)return ye(He-1);throw new Error(Pe)}}function ve(){if(window.ResizeObserver)B=new ResizeObserver(()=>{r.value=_.value.clientWidth}),B.observe(_.value);else throw new Error("Resize observer not supported!")}function we(He){b.value.value!==He.value&&(b.value=He,o("change-round",He))}function Se(He){s.areGamesCarouselType&&o("change-game-carousel",He.selectedItem)}function Ce(He){o("action",He),Le(He)}function Me(He){o("open-modal-event",He)}function Le(He){const Pe="PLAY_RESUME",Ve="PLAY_GOALS",Ie=[607,608,12,55,54,35,14,52,15,53,466,477],ge=[12,55,"35_r","54_r"],{game_id:Ae,season_id:ke}=He.game;let je={seasonId:ke,tournaments:[],isFeaturedPlayers:!1,mainSectionType:1,playListType:1,gameIdsToFilter:[Ae],playerIds:[],goalkeeperIds:[],categoryIds:[],teamId:0,matchResult:[],categorySingleName:"",avoidCategorySingleName:!1,currentPlayIndex:0,playData:null,lastClashedGameId:null,tournamentsLastClashes:null,advancedFilter:{playListTitle:""},objectPlaySync:null};He.action===Pe?(je.categoryIds=Ie,je.advancedFilter.playListTitle="Resumen",o("openmedia",je)):He.action===Ve&&(je.categoryIds=ge,je.advancedFilter.playListTitle="Goles",o("openmedia",je))}async function ze(){try{if(!s.awaitForSeasons&&!s.games){const He=(await ye(3)).find(Ie=>Ie._id===1),Pe=He.seasons[0],Ve=[{id:Pe.id,type:Pe.type}];He&&He.tournament&&o("tournament-selected",He.tournament),Pe.related_seasons&&Pe.related_seasons.length&&Ve.push(...Pe.related_seasons.map(Ie=>({id:Ie.id,type:Ie.type}))),await ne(Ve,!1)}}catch(He){throw new Error(He)}}return t.onMounted(()=>{ve()}),ze(),(He,Pe)=>(t.openBlock(),t.createElementBlock("div",{ref_key:"calendarByGame",ref:_,class:"calendar-by-game",style:t.normalizeStyle(P.value)},[e.teamId&&!e.avoidTeamIdFilter?(t.openBlock(),t.createBlock(IK,{key:0,"full-tournament-schedule":p.value,"team-id":e.teamId,"show-videos":e.showVideos,"is-landing-mode":!1,"row-height":e.rowHeight,"component-width":r.value,"games-pages":x.value,"is-pagination-visible":e.isPaginationVisible,"is-round-mode":e.isRoundMode,"provider-id":e.providerId,"is-dev-apis":e.isDevApis,onAction:Ce},null,8,["full-tournament-schedule","team-id","show-videos","row-height","component-width","games-pages","is-pagination-visible","is-round-mode","provider-id","is-dev-apis"])):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[e.areRoundsVisible&&I.value?(t.openBlock(),t.createBlock(ZX,{key:0,"match-days":I.value,"is-landing-mode":e.isLandingMode,height:"48px","items-to-show":e.itemsToShow,"items-to-scroll":e.itemsToScroll,"component-width":r.value,"default-match-day-key":c.value,"closest-match-day":e.sortCalendar?O.value:"",onChangeMatchDay:we},null,8,["match-days","is-landing-mode","items-to-show","items-to-scroll","component-width","default-match-day-key","closest-match-day"])):t.createCommentVNode("",!0),t.createElementVNode("div",Eee,[L.value?(t.openBlock(),t.createBlock(t.unref(bE),{key:0,"is-pagination-visible":e.isPaginationVisible&&!e.areGamesCarouselType,items:T.value,"are-navigation-arrows-visible":e.areGamesCarouselType?!e.areGamesCarouselType:e.isPaginationVisible,"wrap-around":e.areGamesCarouselType&&!e.isTeamGamePerPage,"items-to-show":e.areGamesCarouselType&&!e.isTeamGamePerPage?1.2:1,"is-main-slide-priority":e.areGamesCarouselType,"are-slides-arrows-visible":e.areGamesCarouselType&&!e.isTeamGamePerPage,"slides-arrows-left-and-right":e.areGamesCarouselType?"30px":"0px","default-item-by-prop":e.areGamesCarouselType?{propName:"game_id",value:e.defaultGameId}:{},onInput:Se},{default:t.withCtx(({item:Ve})=>[e.areGamesCarouselType?(t.openBlock(),t.createBlock(Aee,{key:0,is_captured:e.is_captured,game:Ve,onOpenModalEvent:Me,"plays-live":e.playsLive,"info-live":e.infoLive,"provider-id":e.providerId,"is-dev-apis":e.isDevApis},null,8,["is_captured","game","plays-live","info-live","provider-id","is-dev-apis"])):(t.openBlock(),t.createBlock(CK,{key:1,"team-id":e.teamId,"show-videos":e.showVideos,"games-per-page":Ve,"is-landing-mode":e.isLandingMode,"row-height":e.rowHeight,"component-width":r.value,"is-round-mode":e.isRoundMode,"video-privileges-user-id":e.videoPrivilegesUserId,token:e.token,"provider-id":e.providerId,"is-dev-apis":e.isDevApis,onAction:Ce},null,8,["team-id","show-videos","games-per-page","is-landing-mode","row-height","component-width","is-round-mode","video-privileges-user-id","token","provider-id","is-dev-apis"]))]),_:1},8,["is-pagination-visible","items","are-navigation-arrows-visible","wrap-around","items-to-show","is-main-slide-priority","are-slides-arrows-visible","slides-arrows-left-and-right","default-item-by-prop"])):t.createCommentVNode("",!0)])],64))],4))}},Pee=Sf(Iee,[["__scopeId","data-v-dba5d04d"]]);function Lee(){return ME().__VUE_DEVTOOLS_GLOBAL_HOOK__}function ME(){return typeof navigator<"u"&&typeof window<"u"?window:typeof globalThis<"u"?globalThis:{}}const Bee=typeof Proxy=="function",zee="devtools-plugin:setup",Oee="plugin:settings:set";let Ly,b6;function Dee(){var e;return Ly!==void 0||(typeof window<"u"&&window.performance?(Ly=!0,b6=window.performance):typeof globalThis<"u"&&(!((e=globalThis.perf_hooks)===null||e===void 0)&&e.performance)?(Ly=!0,b6=globalThis.perf_hooks.performance):Ly=!1),Ly}function Nee(){return Dee()?b6.now():Date.now()}class Fee{constructor(o,s){this.target=null,this.targetQueue=[],this.onQueue=[],this.plugin=o,this.hook=s;const B={};if(o.settings)for(const y in o.settings){const a=o.settings[y];B[y]=a.defaultValue}const U=`__vue-devtools-plugin-settings__${o.id}`;let m=Object.assign({},B);try{const y=localStorage.getItem(U),a=JSON.parse(y);Object.assign(m,a)}catch{}this.fallbacks={getSettings(){return m},setSettings(y){try{localStorage.setItem(U,JSON.stringify(y))}catch{}m=y},now(){return Nee()}},s&&s.on(Oee,(y,a)=>{y===this.plugin.id&&this.fallbacks.setSettings(a)}),this.proxiedOn=new Proxy({},{get:(y,a)=>this.target?this.target.on[a]:(...v)=>{this.onQueue.push({method:a,args:v})}}),this.proxiedTarget=new Proxy({},{get:(y,a)=>this.target?this.target[a]:a==="on"?this.proxiedOn:Object.keys(this.fallbacks).includes(a)?(...v)=>(this.targetQueue.push({method:a,args:v,resolve:()=>{}}),this.fallbacks[a](...v)):(...v)=>new Promise(p=>{this.targetQueue.push({method:a,args:v,resolve:p})})})}async setRealTarget(o){this.target=o;for(const s of this.onQueue)this.target.on[s.method](...s.args);for(const s of this.targetQueue)s.resolve(await this.target[s.method](...s.args))}}function Ree(e,o){const s=e,B=ME(),U=Lee(),m=Bee&&s.enableEarlyProxy;if(U&&(B.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__||!m))U.emit(zee,e,o);else{const y=m?new Fee(s,U):null;(B.__VUE_DEVTOOLS_PLUGINS__=B.__VUE_DEVTOOLS_PLUGINS__||[]).push({pluginDescriptor:s,setupFn:o,proxy:y}),y&&o(y.proxiedTarget)}}/*!
17
+ */const xd={itemsToShow:1,itemsToScroll:1,modelValue:0,transition:300,autoplay:0,snapAlign:"center",wrapAround:!1,throttle:16,pauseAutoplayOnHover:!1,mouseDrag:!0,touchDrag:!0,dir:"ltr",breakpoints:void 0,i18n:{ariaNextSlide:"Navigate to next slide",ariaPreviousSlide:"Navigate to previous slide",ariaNavigateToSlide:"Navigate to slide {slideNumber}",ariaGallery:"Gallery",itemXofY:"Item {currentSlide} of {slidesCount}",iconArrowUp:"Arrow pointing upwards",iconArrowDown:"Arrow pointing downwards",iconArrowRight:"Arrow pointing to the right",iconArrowLeft:"Arrow pointing to the left"}},_E={itemsToShow:{default:xd.itemsToShow,type:Number},itemsToScroll:{default:xd.itemsToScroll,type:Number},wrapAround:{default:xd.wrapAround,type:Boolean},throttle:{default:xd.throttle,type:Number},snapAlign:{default:xd.snapAlign,validator(e){return["start","end","center","center-even","center-odd"].includes(e)}},transition:{default:xd.transition,type:Number},breakpoints:{default:xd.breakpoints,type:Object},autoplay:{default:xd.autoplay,type:Number},pauseAutoplayOnHover:{default:xd.pauseAutoplayOnHover,type:Boolean},modelValue:{default:void 0,type:Number},mouseDrag:{default:xd.mouseDrag,type:Boolean},touchDrag:{default:xd.touchDrag,type:Boolean},dir:{default:xd.dir,validator(e){return["rtl","ltr"].includes(e)}},i18n:{default:xd.i18n,type:Object},settings:{default(){return{}},type:Object}};function TX({config:e,slidesCount:o}){const{snapAlign:s,wrapAround:B,itemsToShow:U=1}=e;if(B)return Math.max(o-1,0);let m;switch(s){case"start":m=o-U;break;case"end":m=o-1;break;case"center":case"center-odd":m=o-Math.ceil((U-.5)/2);break;case"center-even":m=o-Math.ceil(U/2);break;default:m=0;break}return Math.max(m,0)}function AX({config:e,slidesCount:o}){const{wrapAround:s,snapAlign:B,itemsToShow:U=1}=e;let m=0;if(s||U>o)return m;switch(B){case"start":m=0;break;case"end":m=U-1;break;case"center":case"center-odd":m=Math.floor((U-1)/2);break;case"center-even":m=Math.floor((U-2)/2);break;default:m=0;break}return m}function f6({val:e,max:o,min:s}){return o<s?e:Math.min(Math.max(e,s),o)}function EX({config:e,currentSlide:o,slidesCount:s}){const{snapAlign:B,wrapAround:U,itemsToShow:m=1}=e;let y=o;switch(B){case"center":case"center-odd":y-=(m-1)/2;break;case"center-even":y-=(m-2)/2;break;case"end":y-=m-1;break}return U?y:f6({val:y,max:s-m,min:0})}function xE(e){return e?e.reduce((o,s)=>{var B;return s.type===t.Fragment?[...o,...xE(s.children)]:((B=s.type)===null||B===void 0?void 0:B.name)==="CarouselSlide"?[...o,s]:o},[]):[]}function m6({val:e,max:o,min:s=0}){return e>o?m6({val:e-(o+1),max:o,min:s}):e<s?m6({val:e+(o+1),max:o,min:s}):e}function MX(e,o){let s;return o?function(...B){const U=this;s||(e.apply(U,B),s=!0,setTimeout(()=>s=!1,o))}:e}function IX(e,o){let s;return function(...B){s&&clearTimeout(s),s=setTimeout(()=>{e(...B),s=null},o)}}function PX(e="",o={}){return Object.entries(o).reduce((s,[B,U])=>s.replace(`{${B}}`,String(U)),e)}var LX=t.defineComponent({name:"ARIA",setup(){const e=t.inject("config",t.reactive(Object.assign({},xd))),o=t.inject("currentSlide",t.ref(0)),s=t.inject("slidesCount",t.ref(0));return()=>t.h("div",{class:["carousel__liveregion","carousel__sr-only"],"aria-live":"polite","aria-atomic":"true"},PX(e.i18n.itemXofY,{currentSlide:o.value+1,slidesCount:s.value}))}}),BX=t.defineComponent({name:"Carousel",props:_E,setup(e,{slots:o,emit:s,expose:B}){var U;const m=t.ref(null),y=t.ref([]),a=t.ref(0),v=t.ref(0),p=t.reactive(Object.assign({},xd));let r=Object.assign({},xd),_;const b=t.ref((U=e.modelValue)!==null&&U!==void 0?U:0),x=t.ref(0),h=t.ref(0),n=t.ref(0),i=t.ref(0);let c,l;t.provide("config",p),t.provide("slidesCount",v),t.provide("currentSlide",b),t.provide("maxSlide",n),t.provide("minSlide",i),t.provide("slideWidth",a);function d(){_=Object.assign({},e.breakpoints),r=Object.assign(Object.assign(Object.assign({},r),e),{i18n:Object.assign(Object.assign({},r.i18n),e.i18n),breakpoints:void 0}),w(r)}function g(){if(!_||!Object.keys(_).length)return;const re=Object.keys(_).map(ie=>Number(ie)).sort((ie,me)=>+me-+ie);let se=Object.assign({},r);re.some(ie=>{const me=window.matchMedia(`(min-width: ${ie}px)`).matches;return me&&(se=Object.assign(Object.assign({},se),_[ie])),me}),w(se)}function w(re){Object.entries(re).forEach(([se,ie])=>p[se]=ie)}const C=IX(()=>{g(),A(),E()},16);function E(){if(!m.value)return;const re=m.value.getBoundingClientRect();a.value=re.width/p.itemsToShow}function A(){v.value<=0||(h.value=Math.ceil((v.value-1)/2),n.value=TX({config:p,slidesCount:v.value}),i.value=AX({config:p,slidesCount:v.value}),p.wrapAround||(b.value=f6({val:b.value,max:n.value,min:i.value})))}t.onMounted(()=>{t.nextTick(()=>E()),setTimeout(()=>E(),1e3),g(),G(),window.addEventListener("resize",C,{passive:!0}),s("init")}),t.onUnmounted(()=>{l&&clearTimeout(l),c&&clearInterval(c),window.removeEventListener("resize",C,{passive:!0})});let P=!1;const L={x:0,y:0},T={x:0,y:0},I=t.reactive({x:0,y:0}),M=t.ref(!1),S=t.ref(!1),z=()=>{M.value=!0},k=()=>{M.value=!1};function O(re){["INPUT","TEXTAREA","SELECT"].includes(re.target.tagName)||(P=re.type==="touchstart",P||re.preventDefault(),!(!P&&re.button!==0||Z.value)&&(L.x=P?re.touches[0].clientX:re.clientX,L.y=P?re.touches[0].clientY:re.clientY,document.addEventListener(P?"touchmove":"mousemove",N,!0),document.addEventListener(P?"touchend":"mouseup",j,!0)))}const N=MX(re=>{S.value=!0,T.x=P?re.touches[0].clientX:re.clientX,T.y=P?re.touches[0].clientY:re.clientY;const se=T.x-L.x,ie=T.y-L.y;I.y=ie,I.x=se},p.throttle);function j(){const re=p.dir==="rtl"?-1:1,se=Math.sign(I.x)*.4,ie=Math.round(I.x/a.value+se)*re;if(ie&&!P){const me=ye=>{window.removeEventListener("click",me,!0)};window.addEventListener("click",me,!0)}$(b.value-ie),I.x=0,I.y=0,S.value=!1,document.removeEventListener(P?"touchmove":"mousemove",N,!0),document.removeEventListener(P?"touchend":"mouseup",j,!0)}function G(){!p.autoplay||p.autoplay<=0||(c=setInterval(()=>{p.pauseAutoplayOnHover&&M.value||ne()},p.autoplay))}function H(){c&&(clearInterval(c),c=null),G()}const Z=t.ref(!1);function $(re){const se=p.wrapAround?re:f6({val:re,max:n.value,min:i.value});b.value===se||Z.value||(s("slide-start",{slidingToIndex:re,currentSlideIndex:b.value,prevSlideIndex:x.value,slidesCount:v.value}),Z.value=!0,x.value=b.value,b.value=se,l=setTimeout(()=>{if(p.wrapAround){const ie=m6({val:se,max:n.value,min:0});ie!==b.value&&(b.value=ie,s("loop",{currentSlideIndex:b.value,slidingToIndex:re}))}s("update:modelValue",b.value),s("slide-end",{currentSlideIndex:b.value,prevSlideIndex:x.value,slidesCount:v.value}),Z.value=!1,H()},p.transition))}function ne(){$(b.value+p.itemsToScroll)}function q(){$(b.value-p.itemsToScroll)}const K={slideTo:$,next:ne,prev:q};t.provide("nav",K),t.provide("isSliding",Z);const ee=t.computed(()=>EX({config:p,currentSlide:b.value,slidesCount:v.value}));t.provide("slidesToScroll",ee);const X=t.computed(()=>{const re=p.dir==="rtl"?-1:1,se=ee.value*a.value*re;return{transform:`translateX(${I.x-se}px)`,transition:`${Z.value?p.transition:0}ms`,margin:p.wrapAround?`0 -${v.value*a.value}px`:"",width:"100%"}});function Q(){d(),g(),A(),E(),H()}Object.keys(_E).forEach(re=>{["modelValue"].includes(re)||t.watch(()=>e[re],Q)}),t.watch(()=>e.modelValue,re=>{re!==b.value&&$(Number(re))}),t.watch(v,A),s("before-init"),d();const ce={config:p,slidesCount:v,slideWidth:a,next:ne,prev:q,slideTo:$,currentSlide:b,maxSlide:n,minSlide:i,middleSlide:h};B({updateBreakpointsConfigs:g,updateSlidesData:A,updateSlideWidth:E,initDefaultConfigs:d,restartCarousel:Q,slideTo:$,next:ne,prev:q,nav:K,data:ce});const de=o.default||o.slides,he=o.addons,pe=t.reactive(ce);return()=>{const re=xE(de==null?void 0:de(pe)),se=(he==null?void 0:he(pe))||[];re.forEach((ve,we)=>ve.props.index=we);let ie=re;if(p.wrapAround){const ve=re.map((Se,Ce)=>t.cloneVNode(Se,{index:-re.length+Ce,isClone:!0,key:`clone-before-${Ce}`})),we=re.map((Se,Ce)=>t.cloneVNode(Se,{index:re.length+Ce,isClone:!0,key:`clone-after-${Ce}`}));ie=[...ve,...re,...we]}y.value=re,v.value=Math.max(re.length,1);const me=t.h("ol",{class:"carousel__track",style:X.value,onMousedownCapture:p.mouseDrag?O:null,onTouchstartPassiveCapture:p.touchDrag?O:null},ie),ye=t.h("div",{class:"carousel__viewport"},me);return t.h("section",{ref:m,class:{carousel:!0,"is-sliding":Z.value,"is-dragging":S.value,"is-hover":M.value,"carousel--rtl":p.dir==="rtl"},dir:p.dir,"aria-label":p.i18n.ariaGallery,tabindex:"0",onMouseenter:z,onMouseleave:k},[ye,se,t.h(LX)])}}}),g6;(function(e){e.arrowUp="arrowUp",e.arrowDown="arrowDown",e.arrowRight="arrowRight",e.arrowLeft="arrowLeft"})(g6||(g6={}));const zX={arrowUp:"M7.41 15.41L12 10.83l4.59 4.58L18 14l-6-6-6 6z",arrowDown:"M7.41 8.59L12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z",arrowRight:"M8.59 16.59L13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z",arrowLeft:"M15.41 16.59L10.83 12l4.58-4.59L14 6l-6 6 6 6 1.41-1.41z"};function OX(e){return e in g6}const y6=e=>{const o=t.inject("config",t.reactive(Object.assign({},xd))),s=String(e.name),B=`icon${s.charAt(0).toUpperCase()+s.slice(1)}`;if(!s||typeof s!="string"||!OX(s))return;const U=zX[s],m=t.h("path",{d:U}),y=o.i18n[B]||e.title||s,a=t.h("title",y);return t.h("svg",{class:"carousel__icon",viewBox:"0 0 24 24",role:"img","aria-label":y},[a,m])};y6.props={name:String,title:String};const DX=(e,{slots:o,attrs:s})=>{const{next:B,prev:U}=o||{},m=t.inject("config",t.reactive(Object.assign({},xd))),y=t.inject("maxSlide",t.ref(1)),a=t.inject("minSlide",t.ref(1)),v=t.inject("currentSlide",t.ref(1)),p=t.inject("nav",{}),{dir:r,wrapAround:_,i18n:b}=m,x=r==="rtl",h=t.h("button",{type:"button",class:["carousel__prev",!_&&v.value<=a.value&&"carousel__prev--disabled",s==null?void 0:s.class],"aria-label":b.ariaPreviousSlide,onClick:p.prev},(U==null?void 0:U())||t.h(y6,{name:x?"arrowRight":"arrowLeft"})),n=t.h("button",{type:"button",class:["carousel__next",!_&&v.value>=y.value&&"carousel__next--disabled",s==null?void 0:s.class],"aria-label":b.ariaNextSlide,onClick:p.next},(B==null?void 0:B())||t.h(y6,{name:x?"arrowLeft":"arrowRight"}));return[h,n]};var NX=t.defineComponent({name:"CarouselSlide",props:{index:{type:Number,default:1},isClone:{type:Boolean,default:!1}},setup(e,{slots:o}){const s=t.inject("config",t.reactive(Object.assign({},xd))),B=t.inject("currentSlide",t.ref(0)),U=t.inject("slidesToScroll",t.ref(0)),m=t.inject("isSliding",t.ref(!1)),y=t.computed(()=>e.index===B.value),a=t.computed(()=>e.index===B.value-1),v=t.computed(()=>e.index===B.value+1),p=t.computed(()=>{const r=Math.floor(U.value),_=Math.ceil(U.value+s.itemsToShow-1);return e.index>=r&&e.index<=_});return()=>{var r;return t.h("li",{style:{width:`${100/s.itemsToShow}%`},class:{carousel__slide:!0,"carousel__slide--clone":e.isClone,"carousel__slide--visible":p.value,"carousel__slide--active":y.value,"carousel__slide--prev":a.value,"carousel__slide--next":v.value,"carousel__slide--sliding":m.value},"aria-hidden":!p.value},(r=o.default)===null||r===void 0?void 0:r.call(o,{isActive:y.value,isClone:e.isClone,isPrev:a.value,isNext:v.value,isSliding:m.value,isVisible:p.value}))}}});const Sf=(e,o)=>{const s=e.__vccOpts||e;for(const[B,U]of o)s[B]=U;return s},wE=e=>(t.pushScopeId("data-v-d88e6c89"),e=e(),t.popScopeId(),e),FX={key:1,class:"match-day__live"},RX=wE(()=>t.createElementVNode("div",{class:"match-day__live__bullet"},null,-1)),VX=wE(()=>t.createElementVNode("div",{class:"match-day__live__text"},"LIVE",-1)),jX=[RX,VX],UX={__name:"MatchDay",props:{isLandingMode:{type:Boolean,default:!1},backgroundColor:{type:String,default:"#183143"},numberColor:{type:String,default:"white"},numberFontFamily:{type:String,default:"sans-serif"},numberFontSize:{type:String,default:"14px"},textColor:{type:String,default:"rgba(255, 255, 255, 0.5)"},textFontFamily:{type:String,default:"'Poppins-Regular', sans-serif"},textFontSize:{type:String,default:"8px"},bottomLineColor:{type:String,default:"#cbee6b"},selectedMatchDayBackgroundColor:{type:String,default:"#243b4c"},height:{type:String,default:"fit-content"},matchDay:{type:Object,default:()=>{}},matchDaySelected:{type:Object,default:()=>{}},componentWidth:{type:Number,default:0}},emits:["change-match-day"],setup(e,{emit:o}){const s=e,B=t.computed(()=>{const a={"background-color":s.backgroundColor,height:s.height};return s.matchDay.key===s.matchDaySelected.key&&(a["border-bottom"]=`solid 1px ${s.bottomLineColor}`,a["background-color"]=s.selectedMatchDayBackgroundColor),s.isLandingMode||(a["border-right"]="solid 1px rgba(255, 255, 255, 0.1)"),a}),U=t.computed(()=>({color:s.numberColor,"font-family":s.numberFontFamily,"font-size":s.numberFontSize})),m=t.computed(()=>({color:s.textColor,"font-family":s.textFontFamily,"font-size":s.textFontSize}));function y(a){o("click-match-day",a)}return(a,v)=>(t.openBlock(),t.createElementBlock("div",{class:"match-day",style:t.normalizeStyle({...B.value}),onClick:v[0]||(v[0]=p=>y(e.matchDay))},[t.createElementVNode("div",{class:"match-day__value",style:t.normalizeStyle(U.value)},t.toDisplayString(e.matchDay.valueText),5),!Number.isNaN(e.matchDay.value)&&!e.matchDay.liveGamesIds.size?(t.openBlock(),t.createElementBlock("div",{key:0,class:"match-day__text",style:t.normalizeStyle([e.isLandingMode?"margin-top:3px":"margin-top:4px",m.value])},t.toDisplayString(e.isLandingMode||e.componentWidth<=425?"JOR":"JORNADA"),5)):e.matchDay.liveGamesIds.size?(t.openBlock(),t.createElementBlock("div",FX,jX)):t.createCommentVNode("",!0)],4))}},GX=Sf(UX,[["__scopeId","data-v-d88e6c89"]]),HX={__name:"MatchDayPicker",props:{matchDays:{type:Array,default:()=>[]},isLandingMode:{type:Boolean,default:!1},backgroundColor:{type:String,default:"#183143"},numberColor:{type:String,default:"white"},numberFontFamily:{type:String,default:"sans-serif"},numberFontSize:{type:String,default:"14px"},textColor:{type:String,default:"rgba(255, 255, 255, 0.5)"},textFontFamily:{type:String,default:"sans-serif"},textFontSize:{type:String,default:"8px"},bottomLineColor:{type:String,default:"#cbee6b"},selectedMatchDayBackgroundColor:{type:String,default:"#243b4c"},height:{type:String,default:"fit-content"},itemsToShow:{type:Number,default:9},itemsToScroll:{type:Number,default:9},defaultMatchDayKey:{type:[String,null],default:""},componentWidth:{type:Number,default:0},closestMatchDay:{type:[Number,String],default:0}},emits:["change-match-day"],setup(e,{emit:o}){const s=e;t.useCssVars(p=>({"59858af6":m.value,"5987b976":y.value}));const B=t.ref(null),U=t.computed(()=>({itemsToShow:s.itemsToShow,itemsToScroll:s.itemsToScroll,snapAlign:"start"})),m=t.computed(()=>B.value.data.currentSlide.value==0?"none":"inline"),y=t.computed(()=>B.value.data.currentSlide.value==B.value.data.maxSlide.value?"none":"inline"),a=t.ref({});t.watch(()=>s.closestMatchDay,p=>{if(p){const r=s.matchDays.find(_=>_.key===p);v(r||s.matchDays[0],!0)}}),t.watch(()=>s.matchDays,p=>{if(!s.closestMatchDay&&p&&p.length){const r=p.find(_=>_.key===s.defaultMatchDayKey);a.value=r||p[0],o("change-match-day",a.value)}else s.closestMatchDay&&(a.value=p.find(r=>r.key===s.closestMatchDay)||{})},{immediate:!0});function v(p,r=!1){r&&B.value&&B.value.slideTo(p.index),a.value=p,o("change-match-day",a.value)}return(p,r)=>(t.openBlock(),t.createElementBlock("div",{class:"match-day-picker",style:t.normalizeStyle(e.isLandingMode?"border-top-left-radius: 9px; border-top-right-radius: 9px;":"margin-bottom:12px")},[(t.openBlock(),t.createBlock(t.unref(BX),t.mergeProps(U.value,{modelValue:a.value.index,ref_key:"matchDayPickerCarousel",ref:B,key:a.value.index}),{addons:t.withCtx(()=>[t.createVNode(t.unref(DX))]),default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.matchDays,_=>(t.openBlock(),t.createBlock(t.unref(NX),{key:_.key},{default:t.withCtx(()=>[t.createVNode(GX,t.mergeProps(s,{"match-day":_,"match-day-selected":a.value,"is-landing-mode":e.isLandingMode,"component-width":e.componentWidth,onClickMatchDay:v}),null,16,["match-day","match-day-selected","is-landing-mode","component-width"])]),_:2},1024))),128))]),_:1},16,["modelValue"]))],4))}},ZX=Sf(HX,[["__scopeId","data-v-85216dc3"]]),WX=(e,o)=>{const s=e.__vccOpts||e;for(const[B,U]of o)s[B]=U;return s},qX={key:1},JX={width:"10",height:"8",viewBox:"0 0 10 8",fill:"none",xmlns:"http://www.w3.org/2000/svg"},YX=["fill"],XX={key:0,class:"checkbox__teams"},$X={class:"checkbox__teams__logo"},KX=["src"],QX={class:"checkbox__teams__logo"},e$=["src"],t$={__name:"GSC-Checkbox",props:{width:{type:String,default:"fit-content"},height:{type:String,default:"fit-content"},label:{type:String,default:""},labelWhiteSpace:{type:String,default:"normal"},labelColor:{type:String,default:"white"},fontFamily:{type:String,default:"sans-serif"},labelFontSize:{type:String,default:"12px"},modelValue:{type:Boolean,default:!1},justifyContent:{type:String,default:"flex-start"},alignItems:{type:String,default:"center"},boxBackgroundColor:{type:String,default:"#CBEE6B"},boxValueColor:{type:String,default:"#0d1d29"},boxValue:{type:[String,Number],default:""},boxPosition:{type:String,default:"left",validator(e){return["left","right","top","bottom"].includes(e)}},boxMarginTop:{type:String,default:"0.2em"},boxWidthAndHeight:{type:String,default:"16px"},boxBorderColor:{type:String,default:"#969da2"},boxBorderWidth:{type:String,default:"2px"},boxBorderRadius:{type:String,default:"4px"},boxValueFontSize:{type:String,default:"10px"},boxValueFontFamily:{type:String,default:"sans-serif"},avoidInteraction:{type:Boolean,default:!1},avoidToCheck:{type:Boolean,default:!1},isBoxOnly:{type:Boolean,default:!1},teamsIds:{type:Array,default:()=>null},provider:{type:Number,default:0}},emits:["update:modelValue"],setup(e,{emit:o}){const s=e;t.useCssVars(p=>({"70bd45d8":e.width,"12bb4b99":e.height}));const B=t.ref(!1),U=t.computed(()=>{const p={color:s.boxValueColor,"font-family":s.fontFamily,height:s.boxWidthAndHeight,width:s.boxWidthAndHeight,minWidth:s.boxWidthAndHeight,"border-radius":s.boxBorderRadius,"margin-top":s.boxMarginTop};return B.value?(p["background-color"]=s.boxBackgroundColor,p.border=`solid ${s.boxBorderWidth} ${s.boxBackgroundColor}`):p.border=`solid ${s.boxBorderWidth} ${s.boxBorderColor}`,p}),m=t.computed(()=>({"font-family":s.boxValueFontFamily,"font-size":s.boxValueFontSize,color:s.boxValueColor,"line-height":1})),y=t.computed(()=>{const p={color:s.labelColor,"font-family":s.fontFamily,"font-size":s.labelFontSize,"white-space":s.labelWhiteSpace,"text-align":s.boxPosition==="top"||s.boxPosition==="bottom"?"center":s.boxPosition};return(s.boxPosition==="left"||s.boxPosition==="right")&&(p[`margin-${s.boxPosition}`]=s.isBoxOnly?"0":s.teamsIds?"8px":"10px"),p});t.watch(()=>s.modelValue,p=>{p!==B.value&&(B.value=p)},{immediate:!0});function a(){s.avoidInteraction||!B.value&&s.avoidToCheck||(B.value=!B.value,o("update:modelValue",B.value))}function v(p){const r={}.TEAM_LOGOS_URL||"https://golstatsimages.blob.core.windows.net/teams-80/";return s.provider&&s.provider>=2?`${r}${s.provider}/${p}.png`:`${r}${p}.png`}return(p,r)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["checkbox",`box-${e.boxPosition}`]),onClick:a},[t.createElementVNode("div",{class:"checkbox__box",style:t.normalizeStyle(U.value)},[B.value?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[s.boxValue?(t.openBlock(),t.createElementBlock("div",{key:0,class:"checkbox__box__value",style:t.normalizeStyle(m.value)},t.toDisplayString(e.boxValue),5)):(t.openBlock(),t.createElementBlock("div",qX,[(t.openBlock(),t.createElementBlock("svg",JX,[t.createElementVNode("path",{d:"M9.77994 1.70133L4.10994 7.37133C3.96994 7.51133 3.77994 7.59133 3.57994 7.59133C3.37994 7.59133 3.18994 7.51133 3.04994 7.37133L0.219941 4.54133C-0.0700586 4.25133 -0.0700586 3.77133 0.219941 3.48133C0.509941 3.19133 0.989941 3.19133 1.27994 3.48133L3.57994 5.78133L8.71994 0.641328C9.00994 0.351328 9.48994 0.351328 9.77994 0.641328C10.0699 0.931328 10.0699 1.40133 9.77994 1.70133Z",fill:e.boxValueColor},null,8,YX)]))]))],64)):t.createCommentVNode("",!0)],4),e.teamsIds&&e.teamsIds.length?(t.openBlock(),t.createElementBlock("div",XX,[t.createElementVNode("div",$X,[t.createElementVNode("img",{src:v(e.teamsIds[0]),alt:""},null,8,KX)]),t.createElementVNode("div",QX,[t.createElementVNode("img",{src:v(e.teamsIds[1]),alt:""},null,8,e$)])])):t.createCommentVNode("",!0),t.createElementVNode("div",{class:"checkbox__label",style:t.normalizeStyle(y.value)},t.toDisplayString(e.label),5)],2))}},a$=WX(t$,[["__scopeId","data-v-4ea8394b"]]);function r$(e,o){if(!o||o<=1)return e;const s=new URL(e),B=s.pathname.split("/").filter(a=>a!=="");if(B.length===0)return e;const[U,...m]=B,y=[U,o,...m].join("/");return`${s.origin}/${y}${s.search}`}function W0(e,o=80,s=1){const B={}.TEAM_LOGOS_URL||"https://golstatsimages.blob.core.windows.net/teams-";return r$(`${B}${o}/${e}.png`,s)}function kE(e){if(typeof e=="string"){let o=e.replace("M","J ");return o=o.replace("PO1","CFI"),o=o.replace("PO2","CFV"),o=o.replace("PO3","SFI"),o=o.replace("PO4","SFV"),o=o.replace("PO5","FI"),o=o.replace("PO6","FV"),o}}function n$(e){let o="";return e.game_status!=4&&(o+="Finalizado"),(e.penalties_score_home_team!=0||e.penalties_score_visiting_team!=0)&&(o+=" - Penales "+e.penalties_score_home_team+" - "+e.penalties_score_visiting_team),o}const i$={class:"game-info__teams"},o$={class:"game-info__teams__team__logo"},s$=["src"],l$={class:"game-info__teams__detail"},c$={key:0,class:"game-info__teams__detail__pre-game"},u$={class:"game-info__teams__team__logo away"},d$=["src"],h$={key:0},p$={key:0},f$={key:1},m$={__name:"GameInfo",props:{isLandingMode:{type:Boolean,default:!1},isAcronymVisible:{type:Boolean,default:!1},isTelevisionVisible:{type:Boolean,default:!0},game:{type:Object,required:!0},providerId:{type:Number,default:0},isDevApis:{type:Boolean,default:!1},colorPrimary:{type:String,default:"white"},colorSecondary:{type:String,default:"grey"},namesFontSize:{type:String,default:"12px"},timeFontSize:{type:String,default:"12px"},timeZoneFontSize:{type:String,default:"8px"},scoreFontSize:{type:String,default:"13px"},namesFontFamily:{type:String,default:"sans-serif"},scoreFontFamily:{type:String,default:"sans-serif"},additionalInfoFontFamily:{type:String,default:"sans-serif"},additionalInfoFontSize:{type:String,default:"9px"}},setup(e){const o=e,s=t.computed(()=>{let p=o.game.schedule.split(":");return p.pop(),p=p.join(":"),p}),B=t.computed(()=>{let p="120px";return(o.isLandingMode||o.isAcronymVisible)&&(p="70px"),{"min-width":p}}),U=t.computed(()=>({"font-size":o.namesFontSize,"font-family":o.namesFontFamily,color:o.colorPrimary})),m=t.computed(()=>({"font-size":o.additionalInfoFontSize,"font-family":o.additionalInfoFontFamily,color:o.colorSecondary})),y=t.computed(()=>({"font-size":o.scoreFontSize,"font-family":o.scoreFontFamily,color:o.colorPrimary})),a=t.computed(()=>({"font-size":o.timeZoneFontSize,"font-family":o.namesFontFamily,color:o.colorPrimary})),v=t.computed(()=>({"font-size":o.timeFontSize,"font-family":o.namesFontFamily,color:o.colorPrimary}));return(p,r)=>(t.openBlock(),t.createElementBlock("div",{class:"game-info",style:t.normalizeStyle(e.isLandingMode?"gap:5px":"")},[t.createElementVNode("div",i$,[t.createElementVNode("div",{class:"game-info__teams__team",style:t.normalizeStyle(B.value)},[t.createElementVNode("div",{class:"game-info__teams__team__name",style:t.normalizeStyle(U.value)},t.toDisplayString(e.isLandingMode||e.isAcronymVisible?e.game.home_team.acronym:e.game.home_team.colloquial_name),5),t.createElementVNode("div",o$,[t.createElementVNode("img",{src:t.unref(W0)(e.game.home_team.team_id,80,e.providerId),alt:""},null,8,s$)])],4),t.createElementVNode("div",l$,[e.game.game_status===4&&!e.game.is_live?(t.openBlock(),t.createElementBlock("div",c$,[t.createElementVNode("div",null,[t.createElementVNode("span",{style:t.normalizeStyle(v.value)},t.toDisplayString(s.value),5),t.createTextVNode(),t.createElementVNode("span",{style:t.normalizeStyle(a.value)},"CST",4)])])):(t.openBlock(),t.createElementBlock("div",{key:1,class:"game-info__teams__detail__score",style:t.normalizeStyle(y.value)},[t.createElementVNode("span",null,t.toDisplayString(e.game.score[0])+" - "+t.toDisplayString(e.game.score[1]),1)],4))]),t.createElementVNode("div",{class:"game-info__teams__team away",style:t.normalizeStyle(B.value)},[t.createElementVNode("div",u$,[t.createElementVNode("img",{src:t.unref(W0)(e.game.visiting_team.team_id,80,e.providerId),alt:""},null,8,d$)]),t.createElementVNode("div",{class:"game-info__teams__team__name",style:t.normalizeStyle(U.value)},t.toDisplayString(e.isLandingMode||e.isAcronymVisible?e.game.visiting_team.acronym:e.game.visiting_team.colloquial_name),5)],4)]),t.createElementVNode("div",{class:"game-info__status",style:t.normalizeStyle([m.value,e.isLandingMode?"line-height: normal":""])},[e.game.game_status===4&&!e.game.is_live?(t.openBlock(),t.createElementBlock("span",h$,[e.isTelevisionVisible?(t.openBlock(),t.createElementBlock("span",p$,t.toDisplayString(e.game.tv_stations.join(", ")),1)):t.createCommentVNode("",!0)])):(t.openBlock(),t.createElementBlock("span",f$,t.toDisplayString(t.unref(n$)(e.game)),1))],4)],4))}},SE=Sf(m$,[["__scopeId","data-v-05c83028"]]),CE=e=>(t.pushScopeId("data-v-8839c56d"),e=e(),t.popScopeId(),e),g$={class:"game-status"},y$={key:0,class:"game-status__day__live"},v$=CE(()=>t.createElementVNode("span",null,"LIVE",-1)),b$=CE(()=>t.createElementVNode("span",{class:"dot"},null,-1)),_$=[v$,b$],x$={key:0,class:"game-status__round"},w$={__name:"GameStatus",props:{isLandingMode:{type:Boolean,default:!1},isRoundMode:{type:Boolean,default:!1},status:{type:Number,default:4},isLive:{type:Boolean,default:!1},dateTimeMillis:{type:Number,default:0},roundAbbreviation:{type:String,default:""},fontSize:{type:String,default:"10px"}},setup(e){const o=e,s=["Ene","Feb","Mar","Abr","May","Jun","Jul","Ago","Sep","Oct","Nov","Dic"],B=t.computed(()=>{let y="";if(o.dateTimeMillis){const a=new Date(o.dateTimeMillis);y=`${a.getDate()} ${s[a.getMonth()]}`}return y}),U=t.computed(()=>({"font-size":o.fontSize})),m=t.computed(()=>{let y=[];return o.isLive?y.push("live"):o.status!==1&&y.push("pre-match"),y});return(y,a)=>(t.openBlock(),t.createElementBlock("div",g$,[t.createElementVNode("div",{class:t.normalizeClass(["game-status__day",m.value]),style:t.normalizeStyle(U.value)},[e.isLive?(t.openBlock(),t.createElementBlock("div",y$,_$)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createTextVNode(t.toDisplayString(B.value),1)],64))],6),e.isRoundMode?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",x$,t.toDisplayString(e.roundAbbreviation),1))]))}},TE=Sf(w$,[["__scopeId","data-v-8839c56d"]]),zf={SHOW_GAME_EVENTS:"SHOW_GAME_EVENTS",PLAY_GOALS:"PLAY_GOALS",PLAY_RESUME:"PLAY_RESUME",NOTIFICATION:"NOTIFICATION",STATISTICS:"STATISTICS"},k$=e=>(t.pushScopeId("data-v-0d97b1a8"),e=e(),t.popScopeId(),e),S$={class:"actions"},C$={class:"actions__row"},T$=k$(()=>t.createElementVNode("svg",{width:"10",height:"12",viewBox:"0 0 10 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[t.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M8.87471 3.35132C9.31653 3.35132 9.67471 3.70949 9.67471 4.15132V10.4531C9.67471 10.8949 9.31653 11.2531 8.87471 11.2531C8.43288 11.2531 8.07471 10.8949 8.07471 10.4531V4.15132C8.07471 3.70949 8.43288 3.35132 8.87471 3.35132Z",fill:"#EEEC6B"}),t.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M4.67549 0.199951C5.11732 0.199951 5.47549 0.558123 5.47549 0.999951V10.4526C5.47549 10.8944 5.11732 11.2526 4.67549 11.2526C4.23366 11.2526 3.87549 10.8944 3.87549 10.4526V0.999951C3.87549 0.558123 4.23366 0.199951 4.67549 0.199951Z",fill:"#EEEC6B"}),t.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M1.0002 5.45154C1.44202 5.45154 1.8002 5.80971 1.8002 6.25154V10.4527C1.8002 10.8945 1.44202 11.2527 1.0002 11.2527C0.558368 11.2527 0.200195 10.8945 0.200195 10.4527V6.25154C0.200195 5.80971 0.558368 5.45154 1.0002 5.45154Z",fill:"#EEEC6B"})],-1)),A$=[T$],E$={width:"6",height:"8",viewBox:"0 0 6 8",fill:"none",xmlns:"http://www.w3.org/2000/svg"},M$=["fill"],I$={width:"13",height:"16",viewBox:"0 0 13 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},P$=["fill"],L$={__name:"GameActionsLanding",props:{gameStatus:{type:Number,default:4},isLive:{type:Boolean,default:!1},hasVideo:{type:Boolean,default:!1},iconColor:{type:String,default:"#CBEE6B"},iconBackgroundColor:{type:String,default:"rgba(255, 255, 255, 0.2)"},iconBorderColor:{type:String,default:"rgba(255, 255, 255, 0.1)"},showPlayButton:{type:Boolean,default:!1}},emits:["action"],setup(e,{emit:o}){const s=e,B=t.computed(()=>({backgroundColor:s.iconBackgroundColor,borderColor:s.iconBorderColor}));function U(m){o("action",m)}return(m,y)=>(t.openBlock(),t.createElementBlock("div",S$,[t.createElementVNode("div",C$,[t.createElementVNode("div",{class:"actions__button rounded",style:t.normalizeStyle(B.value),onClick:y[0]||(y[0]=a=>U(t.unref(zf).STATISTICS))},A$,4),e.showPlayButton&&e.hasVideo?(t.openBlock(),t.createElementBlock("div",{key:0,class:"actions__button rounded",style:t.normalizeStyle(B.value),onClick:y[1]||(y[1]=a=>U(t.unref(zf).PLAY_RESUME))},[(t.openBlock(),t.createElementBlock("svg",E$,[t.createElementVNode("path",{d:"M0.442694 7.9474C0.385489 7.90953 0.337676 7.85295 0.304408 7.78375C0.27114 7.71456 0.25368 7.63538 0.253908 7.55475V0.444134C0.253987 0.363779 0.271562 0.284951 0.304765 0.216032C0.337968 0.147113 0.385557 0.090677 0.442475 0.0527243C0.499393 0.0147716 0.563511 -0.00327964 0.628014 0.000489552C0.692517 0.00425874 0.754994 0.0297075 0.808803 0.0741304L5.09491 3.62986C5.14387 3.67036 5.18401 3.7253 5.21178 3.78978C5.23955 3.85426 5.25409 3.92628 5.25409 3.99944C5.25409 4.0726 5.23955 4.14462 5.21178 4.2091C5.18401 4.27358 5.14387 4.32852 5.09491 4.36902L0.808803 7.92559C0.755077 7.97011 0.692648 7.99565 0.628173 7.99949C0.563698 8.00333 0.499593 7.98533 0.442694 7.9474Z",fill:s.iconColor},null,8,M$)]))],4)):t.createCommentVNode("",!0),e.gameStatus===4444&&!e.isLive?(t.openBlock(),t.createElementBlock("div",{key:1,class:"actions__button",onClick:y[2]||(y[2]=a=>U(t.unref(zf).NOTIFICATION))},[(t.openBlock(),t.createElementBlock("svg",I$,[t.createElementVNode("path",{d:"M5.056 14.476h2.888c0 .838-.65 1.524-1.444 1.524-.794 0-1.444-.686-1.444-1.524zM13 12.952v.762H0v-.762l1.444-1.523V6.857c0-2.362 1.445-4.419 3.612-5.105v-.228C5.056.686 5.706 0 6.5 0c.794 0 1.444.686 1.444 1.524v.228c2.167.686 3.612 2.743 3.612 5.105v4.572L13 12.952zm-2.889-6.095c0-2.133-1.589-3.81-3.611-3.81-2.022 0-3.611 1.677-3.611 3.81v5.333h7.222V6.857z",fill:s.iconColor},null,8,P$)]))])):t.createCommentVNode("",!0)])]))}},B$=Sf(L$,[["__scopeId","data-v-0d97b1a8"]]),v6=e=>(t.pushScopeId("data-v-7ec0f118"),e=e(),t.popScopeId(),e),z$={class:"actions"},O$={width:"13",height:"16",viewBox:"0 0 13 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},D$=["fill"],N$={width:"6",height:"8",viewBox:"0 0 6 8",fill:"none",xmlns:"http://www.w3.org/2000/svg"},F$=["fill"],R$=v6(()=>t.createElementVNode("svg",{width:"10",height:"12",viewBox:"0 0 10 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[t.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M8.87471 3.35132C9.31653 3.35132 9.67471 3.70949 9.67471 4.15132V10.4531C9.67471 10.8949 9.31653 11.2531 8.87471 11.2531C8.43288 11.2531 8.07471 10.8949 8.07471 10.4531V4.15132C8.07471 3.70949 8.43288 3.35132 8.87471 3.35132Z",fill:"#EEEC6B"}),t.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M4.67549 0.199951C5.11732 0.199951 5.47549 0.558123 5.47549 0.999951V10.4526C5.47549 10.8944 5.11732 11.2526 4.67549 11.2526C4.23366 11.2526 3.87549 10.8944 3.87549 10.4526V0.999951C3.87549 0.558123 4.23366 0.199951 4.67549 0.199951Z",fill:"#EEEC6B"}),t.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M1.0002 5.45154C1.44202 5.45154 1.8002 5.80971 1.8002 6.25154V10.4527C1.8002 10.8945 1.44202 11.2527 1.0002 11.2527C0.558368 11.2527 0.200195 10.8945 0.200195 10.4527V6.25154C0.200195 5.80971 0.558368 5.45154 1.0002 5.45154Z",fill:"#EEEC6B"})],-1)),V$=[R$],j$={key:0,class:"actions__videos"},U$={width:"13",height:"16",viewBox:"0 0 13 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},G$=["fill"],H$={key:1,class:"actions__videos__thumbnails"},Z$=v6(()=>t.createElementVNode("div",{class:"actions__videos__thumbnails__thumbnail__goals"},null,-1)),W$=v6(()=>t.createElementVNode("div",{class:"actions__videos__thumbnails__thumbnail__summary"},null,-1)),q$={height:24,width:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},J$=["stroke"],Y$={__name:"GameActionsFull",props:{gameStatus:{type:Number,default:4},isLive:{type:Boolean,default:!1},hasVideo:{type:Boolean,default:!1},hasActions:{type:Boolean,default:!0},hasGoals:{type:Boolean,default:!0},areEventsVisible:{type:Boolean,default:!1},iconColor:{type:String,default:"#CBEE6B"},iconBackgroundColor:{type:String,default:"rgba(255, 255, 255, 0.2)"},iconBorderColor:{type:String,default:"rgba(255, 255, 255, 0.1)"},showPlayButton:{type:Boolean,default:!1},arrowColor:{type:String,default:"white"},thumbnailFontFamily:{type:String,default:"sans-serif"},thumbnailFontSize:{type:String,default:"8px"},thumbnailColor:{type:String,default:"rgba(255, 255, 255, 0.5)"},componentWidth:{type:Number,default:400,validator(e){return e>0}}},emits:["action"],setup(e,{emit:o}){const s=e,B=t.computed(()=>({backgroundColor:s.iconBackgroundColor,borderColor:s.iconBorderColor})),U=t.computed(()=>{const v=[];return s.componentWidth<540&&v.push("mobile"),v}),m=t.computed(()=>s.componentWidth>730),y=t.computed(()=>({color:s.thumbnailColor,fontFamily:s.thumbnailFontFamily,fontSize:s.thumbnailFontSize}));function a(v){o("action",v)}return(v,p)=>(t.openBlock(),t.createElementBlock("div",z$,[t.createElementVNode("div",{class:t.normalizeClass(["actions__buttons",U.value])},[e.gameStatus===4444&&!e.isLive&&!m.value?(t.openBlock(),t.createElementBlock("div",{key:0,class:"actions__button",onClick:p[0]||(p[0]=r=>a(t.unref(zf).NOTIFICATION))},[(t.openBlock(),t.createElementBlock("svg",O$,[t.createElementVNode("path",{d:"M5.056 14.476h2.888c0 .838-.65 1.524-1.444 1.524-.794 0-1.444-.686-1.444-1.524zM13 12.952v.762H0v-.762l1.444-1.523V6.857c0-2.362 1.445-4.419 3.612-5.105v-.228C5.056.686 5.706 0 6.5 0c.794 0 1.444.686 1.444 1.524v.228c2.167.686 3.612 2.743 3.612 5.105v4.572L13 12.952zm-2.889-6.095c0-2.133-1.589-3.81-3.611-3.81-2.022 0-3.611 1.677-3.611 3.81v5.333h7.222V6.857z",fill:s.iconColor},null,8,D$)]))])):t.createCommentVNode("",!0),e.showPlayButton&&e.hasVideo&&!m.value?(t.openBlock(),t.createElementBlock("div",{key:1,class:"actions__button rounded",style:t.normalizeStyle(B.value),onClick:p[1]||(p[1]=r=>a(t.unref(zf).PLAY_RESUME))},[(t.openBlock(),t.createElementBlock("svg",N$,[t.createElementVNode("path",{d:"M0.442694 7.9474C0.385489 7.90953 0.337676 7.85295 0.304408 7.78375C0.27114 7.71456 0.25368 7.63538 0.253908 7.55475V0.444134C0.253987 0.363779 0.271562 0.284951 0.304765 0.216032C0.337968 0.147113 0.385557 0.090677 0.442475 0.0527243C0.499393 0.0147716 0.563511 -0.00327964 0.628014 0.000489552C0.692517 0.00425874 0.754994 0.0297075 0.808803 0.0741304L5.09491 3.62986C5.14387 3.67036 5.18401 3.7253 5.21178 3.78978C5.23955 3.85426 5.25409 3.92628 5.25409 3.99944C5.25409 4.0726 5.23955 4.14462 5.21178 4.2091C5.18401 4.27358 5.14387 4.32852 5.09491 4.36902L0.808803 7.92559C0.755077 7.97011 0.692648 7.99565 0.628173 7.99949C0.563698 8.00333 0.499593 7.98533 0.442694 7.9474Z",fill:s.iconColor},null,8,F$)]))],4)):t.createCommentVNode("",!0),t.createElementVNode("div",{class:"actions__button rounded",style:t.normalizeStyle(B.value),onClick:p[2]||(p[2]=r=>a(t.unref(zf).STATISTICS))},V$,4)],2),m.value?(t.openBlock(),t.createElementBlock("div",j$,[e.gameStatus===4444&&!e.isLive?(t.openBlock(),t.createElementBlock("div",{key:0,class:"actions__button",onClick:p[3]||(p[3]=r=>a(t.unref(zf).NOTIFICATION))},[(t.openBlock(),t.createElementBlock("svg",U$,[t.createElementVNode("path",{d:"M5.056 14.476h2.888c0 .838-.65 1.524-1.444 1.524-.794 0-1.444-.686-1.444-1.524zM13 12.952v.762H0v-.762l1.444-1.523V6.857c0-2.362 1.445-4.419 3.612-5.105v-.228C5.056.686 5.706 0 6.5 0c.794 0 1.444.686 1.444 1.524v.228c2.167.686 3.612 2.743 3.612 5.105v4.572L13 12.952zm-2.889-6.095c0-2.133-1.589-3.81-3.611-3.81-2.022 0-3.611 1.677-3.611 3.81v5.333h7.222V6.857z",fill:s.iconColor},null,8,G$)]))])):t.createCommentVNode("",!0),e.showPlayButton&&e.hasVideo?(t.openBlock(),t.createElementBlock("div",H$,[e.hasGoals?(t.openBlock(),t.createElementBlock("div",{key:0,class:"actions__videos__thumbnails__thumbnail",onClick:p[4]||(p[4]=r=>a(t.unref(zf).PLAY_GOALS))},[Z$,t.createElementVNode("div",{class:"actions__videos__thumbnails__thumbnail__text",style:t.normalizeStyle(y.value)}," Goles ",4)])):t.createCommentVNode("",!0),t.createElementVNode("div",{class:"actions__videos__thumbnails__thumbnail",onClick:p[5]||(p[5]=r=>a(t.unref(zf).PLAY_RESUME))},[W$,t.createElementVNode("div",{class:"actions__videos__thumbnails__thumbnail__text",style:t.normalizeStyle(y.value)}," Resumen ",4)])])):t.createCommentVNode("",!0)])):t.createCommentVNode("",!0),(e.gameStatus!==4||e.isLive)&&e.hasActions?(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(["actions__button expand",{"rotated-180":e.areEventsVisible,mobile:e.componentWidth<540}]),onClick:p[6]||(p[6]=r=>a(t.unref(zf).SHOW_GAME_EVENTS))},[(t.openBlock(),t.createElementBlock("svg",q$,[t.createElementVNode("path",{d:"M18.394 9.13501L13.1302 14.3988C12.5086 15.0204 11.4914 15.0204 10.8697 14.3988L5.60596 9.13501",stroke:e.arrowColor},null,8,J$)]))],2)):(t.openBlock(),t.createElementBlock("div",{key:2,class:t.normalizeClass(["actions__button expand",{"rotated-180":!1,mobile:e.componentWidth<540}])},null,2))]))}},X$=Sf(Y$,[["__scopeId","data-v-7ec0f118"]]),ex=e=>(t.pushScopeId("data-v-12f74326"),e=e(),t.popScopeId(),e),$$={class:"row-landing__game-status"},K$={class:"row-landing__game-actions"},Q$={class:"row-full__game-status"},eK={class:"row-full__game-info"},tK={key:0,class:"row-full__video-privilege"},aK={class:"row-full__game-actions"},rK={class:"game-events-container"},nK=ex(()=>t.createElementVNode("div",{class:"separator"},null,-1)),iK=ex(()=>t.createElementVNode("div",null,null,-1)),oK={class:"game-events__data"},sK={class:"game-events__data__team"},lK=["src"],cK={class:"game-events__data__team__event__text"},uK={class:"game-events__data__team away"},dK={class:"game-events__data__team__event__text"},hK=["src"],pK=ex(()=>t.createElementVNode("div",null,null,-1)),fK=ex(()=>t.createElementVNode("div",null,null,-1)),mK={__name:"CalendarRow",props:{teamId:{type:Number,default:0},providerId:{type:Number,default:0},isDevApis:{type:Boolean,default:!1},showVideos:{type:Number,default:0},isLandingMode:{type:Boolean,default:!1},isRoundMode:{type:Boolean,default:!1},game:{type:Object,required:!0},height:{type:String,default:"fit-content"},backgroundColor:{type:String,default:"#172531"},showPlayButton:{type:Boolean,default:!1},componentWidth:{type:Number,default:400,validator(e){return e>0}},televisionFontSize:{type:String,default:"12px"},televisionFontFamily:{type:String,default:"sans-serif"},televisionColor:{type:String,default:"rgba(255, 255, 255, 0.5)"},videoPrivilegesUserId:{type:Number,default:0}},emits:["action","change-video-privilege"],setup(e,{emit:o}){const s=e,B={GOAL:{}.GAME_EVENTS_ICONS_GOAL||"/icn-gol.svg",RED_CARD:{}.GAME_EVENTS_ICONS_RED_CARD||"/icn-expulsion.svg",YELLOW_CARD:{}.GAME_EVENTS_ICONS_YELLOW_CARD||"/icn-amarilla.svg"},U=t.ref(!1),m=t.ref(!1),y=t.computed(()=>{const i={homeTeam:[],awayTeam:[]};return s.game&&s.game.game_status!==4&&!s.game.is_live&&s.game.minutes&&(i.homeTeam.push(...x(s.game.minutes.home_goals_minutes,B.GOAL)),i.homeTeam.push(...x(s.game.minutes.home_red_cards_minutes,B.RED_CARD)),i.homeTeam.push(...x(s.game.minutes.home_yellow_cards_minutes,B.YELLOW_CARD)),i.awayTeam.push(...x(s.game.minutes.visiting_goals_minutes,B.GOAL)),i.awayTeam.push(...x(s.game.minutes.away_red_cards_minutes,B.RED_CARD)),i.awayTeam.push(...x(s.game.minutes.away_yellow_cards_minutes,B.YELLOW_CARD))),i}),a=t.computed(()=>{const i=y.value.homeTeam.length,c=y.value.awayTeam.length;return i+c>0}),v=t.computed(()=>{const i=s.game.score[0],c=s.game.score[1];return i>0||c>0}),p=t.computed(()=>({"background-color":s.backgroundColor})),r=t.computed(()=>({height:s.height})),_=t.computed(()=>{const i={game:[],events:[]};return s.componentWidth<500?(i.events.push("break-point-3"),i.game.push("break-point-2")):s.componentWidth<730?(i.game.push("break-point-2"),i.events.push("break-point-2")):s.componentWidth<910&&(i.game.push("break-point-1"),i.events.push("break-point-1")),i}),b=t.computed(()=>({isLandingMode:s.isLandingMode,game:s.game,colorPrimary:"#fff",colorSecondary:"#fff",namesFontSize:"12px",timeFontSize:"12px",timeZoneFontSize:"8px",scoreFontSize:"13px",namesFontFamily:"sans-serif",scoreFontFamily:"sans-serif",additionalInfoFontFamily:"sans-serif",additionalInfoFontSize:"9px"}));t.computed(()=>({"font-size":s.televisionFontSize,"font-family":s.televisionFontFamily,color:s.televisionColor})),t.watch(()=>s.componentWidth,i=>{m.value=i<910});function x(i,c){return i.map(l=>({iconUrl:c,text:l}))}function h(i){o("change-video-privilege",i)}function n(i){i===zf.SHOW_GAME_EVENTS?U.value=!U.value:o("action",{action:i,game:s.game})}return(i,c)=>e.isLandingMode?(t.openBlock(),t.createElementBlock("div",{key:0,class:"row-landing",style:t.normalizeStyle(p.value)},[t.createVNode(SE,{game:e.game,"is-landing-mode":e.isLandingMode,"provider-id":e.providerId,"is-dev-apis":e.isDevApis},null,8,["game","is-landing-mode","provider-id","is-dev-apis"]),t.createElementVNode("div",$$,[t.createVNode(TE,{status:e.game.game_status,"is-live":!!e.game.is_live,"date-time-millis":e.game.dateTimeMillis,"round-abbreviation":t.unref(kE)(e.game.matchday_abbreviation),"is-landing-mode":e.isLandingMode,"is-round-mode":e.isRoundMode,"font-size":"10px"},null,8,["status","is-live","date-time-millis","round-abbreviation","is-landing-mode","is-round-mode"])]),t.createElementVNode("div",K$,[e.game.home_team?(t.openBlock(),t.createBlock(B$,{key:0,"is-live":!!e.game.is_live,"has-video":e.showVideos==0||e.showVideos==1&&e.teamId==e.game.home_team.team_id?!!e.game.has_video:!1,"game-status":e.game.game_status,"show-play-button":!0,onAction:n},null,8,["is-live","has-video","game-status"])):t.createCommentVNode("",!0)])],4)):(t.openBlock(),t.createElementBlock("div",{key:1,class:"row-full-container",style:t.normalizeStyle(p.value)},[t.createElementVNode("div",{class:t.normalizeClass(["row-full",_.value.game]),style:t.normalizeStyle(r.value)},[t.createElementVNode("div",Q$,[t.createVNode(TE,{status:e.game.game_status,"is-live":!!e.game.is_live,"date-time-millis":e.game.dateTimeMillis,"round-abbreviation":t.unref(kE)(e.game.matchday_abbreviation),"is-landing-mode":e.isLandingMode,"is-round-mode":e.isRoundMode,"font-size":"10px"},null,8,["status","is-live","date-time-millis","round-abbreviation","is-landing-mode","is-round-mode"])]),t.createElementVNode("div",eK,[t.createVNode(SE,t.mergeProps(b.value,{"is-television-visible":m.value,game:e.game,"provider-id":e.providerId,"is-dev-apis":e.isDevApis,"is-landing-mode":e.isLandingMode,"is-acronym-visible":e.componentWidth<540}),null,16,["is-television-visible","game","provider-id","is-dev-apis","is-landing-mode","is-acronym-visible"])]),e.componentWidth>=910?(t.openBlock(),t.createElementBlock("div",tK,[e.videoPrivilegesUserId&&e.showVideos==0?(t.openBlock(),t.createElementBlock("div",{key:0,onClick:c[0]||(c[0]=l=>h(e.game))},[t.createVNode(t.unref(a$),{label:"Privilegios",fontFamily:"Poppins-Regular",labelFontSize:"11px","label-color":"#FFF","model-value":e.game.hasVideoPrivilege,"avoid-interaction":""},null,8,["model-value"])])):t.createCommentVNode("",!0)])):t.createCommentVNode("",!0),t.createElementVNode("div",aK,[e.game.home_team?(t.openBlock(),t.createBlock(X$,{key:0,"is-live":!!e.game.is_live,"has-video":e.showVideos==0||e.showVideos==1&&e.teamId==e.game.home_team.team_id?!!e.game.has_video:!1,"has-actions":a.value,"has-goals":e.showVideos==0||e.showVideos==1&&e.teamId==e.game.home_team.team_id?v.value:!1,"game-status":e.game.game_status,"show-play-button":!0,"are-events-visible":U.value,"component-width":e.componentWidth,onAction:n},null,8,["is-live","has-video","has-actions","has-goals","game-status","are-events-visible","component-width"])):t.createCommentVNode("",!0)])],6),t.createVNode(t.Transition,null,{default:t.withCtx(()=>[t.withDirectives(t.createElementVNode("div",rK,[nK,t.createElementVNode("div",{class:t.normalizeClass(["game-events",_.value.events])},[iK,t.createElementVNode("div",oK,[t.createElementVNode("div",sK,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(y.value.homeTeam,(l,d)=>(t.openBlock(),t.createElementBlock("div",{key:`h${d}`,class:"game-events__data__team__event"},[t.createElementVNode("img",{src:l.iconUrl},null,8,lK),t.createElementVNode("div",cK,t.toDisplayString(l.text),1)]))),128))]),t.createElementVNode("div",uK,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(y.value.awayTeam,(l,d)=>(t.openBlock(),t.createElementBlock("div",{key:`a${d}`,class:"game-events__data__team__event"},[t.createElementVNode("div",dK,t.toDisplayString(l.text),1),t.createElementVNode("img",{src:l.iconUrl},null,8,hK)]))),128))])]),pK,fK],2)],512),[[t.vShow,U.value]])]),_:1})],4))}},AE=Sf(mK,[["__scopeId","data-v-12f74326"]]),EE=e=>(t.pushScopeId("data-v-99439cb1"),e=e(),t.popScopeId(),e),gK={class:"modal-content"},yK={class:"modal-header"},vK=EE(()=>t.createElementVNode("div",{class:"separator"},null,-1)),bK={class:"modal-message"},_K=EE(()=>t.createElementVNode("div",{class:"separator"},null,-1)),xK={__name:"ModalActionConfirm",emits:["confirm-action"],setup(e,{expose:o,emit:s}){const B=t.ref(!1),U=t.ref({}),m=()=>{B.value=!1};function y(){s("confirm-action",{action:!0,data:U.value}),m()}function a({data:v}){U.value=v,B.value=!0}return o({showModal:a}),(v,p)=>(t.openBlock(),t.createBlock(t.Teleport,{to:"body"},[t.createVNode(t.Transition,{name:"modal"},{default:t.withCtx(()=>[B.value?(t.openBlock(),t.createElementBlock("div",{key:0,class:"modal-overlay",onClick:m},[t.createElementVNode("div",{class:"modal-container",onClick:p[0]||(p[0]=t.withModifiers(()=>{},["stop"]))},[t.createElementVNode("div",gK,[t.createElementVNode("div",yK,[t.renderSlot(v.$slots,"header",{},void 0,!0)]),vK,t.createElementVNode("p",bK,[t.renderSlot(v.$slots,"message",{},void 0,!0)]),_K,t.createElementVNode("div",{class:"modal-actions"},[t.createElementVNode("button",{class:"btn-cancel",onClick:m},"Cancelar"),t.createElementVNode("button",{class:"btn-delete",onClick:y},"Aceptar")])])])])):t.createCommentVNode("",!0)]),_:3})]))}},wK=Sf(xK,[["__scopeId","data-v-99439cb1"]]),kK={class:"calendar-table"},SK={__name:"CalendarTable",props:{teamId:{type:Number,default:0},showVideos:{type:Number,default:0},isLandingMode:{type:Boolean,default:!1},isRoundMode:{type:Boolean,default:!1},gamesPerPage:{type:Array,default:()=>[]},rowHeight:{type:String,default:"fit-content"},oddRowColor:{type:String,default:"#172531"},evenRowColor:{type:String,default:"#0D1D29"},componentWidth:{type:Number,default:400,validator(e){return e>0}},videoPrivilegesUserId:{type:Number,default:0},token:{type:String,default:""},providerId:{type:Number,default:0},isDevApis:{type:Boolean,default:!1}},emits:["action"],setup(e,{emit:o}){const s=e,B=t.ref(null),U=t.ref("");function m(r){return r%2===0?s.evenRowColor:s.oddRowColor}function y(r){o("action",r)}function a({action:r,data:_}){r&&p(_)}function v(r){if(B.value){const _=r.hasVideoPrivilege?"desactivar":"activar";U.value=`¿Estás seguro de ${_} el privilegio del partido ${r.home_team.colloquial_name} vs ${r.visiting_team.colloquial_name}?`,B.value.showModal({data:r})}}async function p(r){try{const _=!!r.hasVideoPrivilege,b={};s.token&&(b.Authorization=s.token);const x=Py("https://u6845vutog.execute-api.us-east-2.amazonaws.com/prod/api/v1/privileges/games",s.providerId,s.isDevApis),h=await Iy.post(x,{game_id:r.game_id,status:_?0:1},{headers:b});r.hasVideoPrivilege=!_}catch(_){console.error(_)}}return(r,_)=>(t.openBlock(),t.createElementBlock(t.Fragment,null,[t.createVNode(wK,{ref_key:"modalActionConfirm",ref:B,onConfirmAction:a},{header:t.withCtx(()=>[t.createTextVNode(" Cambio de privilegio ")]),message:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(U.value),1)]),_:1},512),t.createElementVNode("div",kK,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.gamesPerPage,(b,x)=>(t.openBlock(),t.createBlock(AE,{key:b.game_id,game:b,"team-id":e.teamId,"show-videos":e.showVideos,"is-landing-mode":e.isLandingMode,height:e.rowHeight,"background-color":m(x),"component-width":e.componentWidth,"is-round-mode":e.isRoundMode,"video-privileges-user-id":e.videoPrivilegesUserId,"provider-id":e.providerId,"is-dev-apis":e.isDevApis,onAction:y,onChangeVideoPrivilege:v},null,8,["game","team-id","show-videos","is-landing-mode","height","background-color","component-width","is-round-mode","video-privileges-user-id","provider-id","is-dev-apis"]))),128))])],64))}},CK=Sf(SK,[["__scopeId","data-v-7470ea1a"]]),TK={class:"calendar-by-team"},AK={class:"playing-as-picker"},EK={class:"calendar-by-team__page"},MK={__name:"CalendarTableByTeam",props:{showVideos:{type:Number,default:0},teamId:{type:Number,default:0},providerId:{type:Number,default:0},isDevApis:{type:Boolean,default:!1},isPaginationVisible:{type:Boolean,default:!0},gamesPages:{type:Map,default:()=>new Map},isLandingMode:{type:Boolean,default:!1},isRoundMode:{type:Boolean,default:!1},rowHeight:{type:String,default:"fit-content"},nameRowColor:{type:String,default:"#172531"},gameRowColor:{type:String,default:"#0D1D29"},componentWidth:{type:Number,default:400,validator(e){return e>0}}},emits:["action"],setup(e,{emit:o}){const s=e,B=t.ref(0),U=t.computed(()=>{let v=[];if(s.gamesPages.size>0){const p=Array.from(s.gamesPages.entries()).reduce((r,[_,b])=>{const x=Number(_),h=Number.isNaN(x)?_:`Jornada ${x<10?"0":""}${x}`,n=b.reduce((i,c)=>(i.push(...c),i),[]).filter(i=>B.value===0||B.value===1&&i.visiting_team.team_id===s.teamId?!0:B.value===2&&i.home_team.team_id===s.teamId);return n.length>0&&r.push({roundName:h,games:n}),r},[]);v.push(p)}return v});function m(v){o("action",v)}function y(v){document.querySelector("#opc0").classList.remove("selected"),document.querySelector("#opc1").classList.remove("selected"),document.querySelector("#opc2").classList.remove("selected"),B.value=v,document.querySelector("#opc"+v).classList.add("selected")}function a(v){let p=v;switch(v){case"PI1":p="Play In 1";break;case"PI2":p="Play In 2";break;case"R1":p="Repechaje";break;case"CFI":p="Cuartos de final - Ida";break;case"CFV":p="Cuartos de final - Vuelta";break;case"SFI":p="Semifinal - Ida";break;case"SFV":p="Semifinal - Vuelta";break;case"FI":p="Final - Ida";break;case"FV":p="Final - Vuelta";break}return p}return(v,p)=>(t.openBlock(),t.createElementBlock("div",TK,[t.createElementVNode("div",AK,[t.createElementVNode("div",{class:"playing-as-picker__type selected",id:"opc0",onClick:p[0]||(p[0]=r=>y(0))}," Todas "),t.createElementVNode("div",{class:"playing-as-picker__type",id:"opc1",onClick:p[1]||(p[1]=r=>y(1))},"Visitante"),t.createElementVNode("div",{class:"playing-as-picker__type",id:"opc2",onClick:p[2]||(p[2]=r=>y(2))},"Local")]),t.createVNode(t.unref(bE),{"is-pagination-visible":e.isPaginationVisible,items:U.value},{default:t.withCtx(({item:r})=>[t.createElementVNode("div",EK,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(r,(_,b)=>(t.openBlock(),t.createElementBlock("div",{key:b,class:"calendar-by-team__page__round"},[t.createElementVNode("div",{class:"calendar-by-team__page__round__round-name",style:t.normalizeStyle([{color:"white"},e.componentWidth<=425?"padding: 5px 10px":""])},t.toDisplayString(a(_.roundName)),5),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(_.games,x=>(t.openBlock(),t.createBlock(AE,{key:x.game_id,game:x,"team-id":e.teamId,"show-videos":e.showVideos,"is-landing-mode":e.isLandingMode,height:e.rowHeight,"background-color":e.gameRowColor,"component-width":e.componentWidth,"is-round-mode":e.isRoundMode,"provider-id":e.providerId,"is-dev-apis":e.isDevApis,onAction:m},null,8,["game","team-id","show-videos","is-landing-mode","height","background-color","component-width","is-round-mode","provider-id","is-dev-apis"]))),128))]))),128))])]),_:1},8,["is-pagination-visible","items"])]))}},IK=Sf(MK,[["__scopeId","data-v-79574004"]]),PK="_pccard_1ie6f_3",LK="_pcmobile_1ie6f_19",BK="_headerinfomobile_1ie6f_29",zK="_liveMinutes_1ie6f_37",OK="_viewButtomEvent_1ie6f_47",DK="_viewButtomEventMobile_1ie6f_79",NK="_containerEvents_1ie6f_111",FK="_sepEvents_1ie6f_125",RK="_goalsContainer_1ie6f_147",VK="_yellowContainer_1ie6f_165",jK="_redContainer_1ie6f_183",UK="_containerEventsGameHometeam_1ie6f_201",GK="_containerEventsGameAwayteam_1ie6f_229",HK="_image62Icon_1ie6f_257",ZK="_imgChivasIcon_1ie6f_277",WK="_nameDesktop_1ie6f_293",qK="_nameMobile_1ie6f_321",JK="_homeTeam_1ie6f_347",YK="_sbado16De_1ie6f_371",XK="_gameDate_1ie6f_389",$K="_sab16092023_1ie6f_397",KK="_div_1ie6f_425",QK="_divscore_1ie6f_443",eQ="_cst_1ie6f_463",tQ="_hour_1ie6f_483",aQ="_score_1ie6f_485",rQ="_chivasTvCanal_1ie6f_507",nQ="_gameStatus_1ie6f_531",iQ="_matchInfo_1ie6f_553",oQ="_image62Icon1_1ie6f_583",sQ="_name_1ie6f_293",lQ="_imgAtlasIcon_1ie6f_631",cQ="_name1_1ie6f_647",uQ="_awayTeam_1ie6f_673",dQ="_matchCard_1ie6f_697",hQ="_headereventsmobile_1ie6f_1069",pQ="_headereventsmobilecont_1ie6f_1089",fQ="_headereventsmobilecontlocal_1ie6f_1105",mQ="_icongoalheader_1ie6f_1119",gQ="_conttarjetasmobile_1ie6f_1131",yQ="_conttarjetasmobileyellow_1ie6f_1143",vQ="_iconmobileyellow_1ie6f_1157",bQ="_txtmobileyellow_1ie6f_1175",_Q="_iconmobilered_1ie6f_1205",xQ="_txtmobilered_1ie6f_1223",wQ="_conttarjetasmobilered_1ie6f_1255",kQ="_itemmobilgoal_1ie6f_1269",SQ="_goalscontainermobile_1ie6f_1299",CQ="_headereventsmobileconttitle_1ie6f_1331",TQ="_headereventsmobilecontaway_1ie6f_1381",AQ={pccard:PK,pcmobile:LK,headerinfomobile:BK,liveMinutes:zK,viewButtomEvent:OK,viewButtomEventMobile:DK,containerEvents:NK,sepEvents:FK,goalsContainer:RK,yellowContainer:VK,redContainer:jK,containerEventsGameHometeam:UK,containerEventsGameAwayteam:GK,image62Icon:HK,imgChivasIcon:ZK,nameDesktop:WK,nameMobile:qK,homeTeam:JK,sbado16De:YK,gameDate:XK,sab16092023:$K,div:KK,divscore:QK,cst:eQ,hour:tQ,score:aQ,chivasTvCanal:rQ,gameStatus:nQ,matchInfo:iQ,image62Icon1:oQ,name:sQ,imgAtlasIcon:lQ,name1:cQ,awayTeam:uQ,matchCard:dQ,headereventsmobile:hQ,headereventsmobilecont:pQ,headereventsmobilecontlocal:fQ,icongoalheader:mQ,conttarjetasmobile:gQ,conttarjetasmobileyellow:yQ,iconmobileyellow:vQ,txtmobileyellow:bQ,iconmobilered:_Q,txtmobilered:xQ,conttarjetasmobilered:wQ,itemmobilgoal:kQ,goalscontainermobile:SQ,headereventsmobileconttitle:CQ,headereventsmobilecontaway:TQ},EQ=["src"],MQ=["src"],IQ=t.createElementVNode("img",{width:"10",src:"https://golstatsimages.blob.core.windows.net/todoelfut/players-goals-con-goles.png"},null,-1),PQ=t.createElementVNode("img",{width:"10",src:"https://golstatsimages.blob.core.windows.net/todoelfut/red_card.png"},null,-1),LQ=t.createElementVNode("img",{width:"10",src:"https://golstatsimages.blob.core.windows.net/todoelfut/yellow_card.png"},null,-1),BQ=t.createElementVNode("img",{width:"10",src:"https://golstatsimages.blob.core.windows.net/todoelfut/players-goals-con-goles.png"},null,-1),zQ=t.createElementVNode("img",{width:"10",src:"https://golstatsimages.blob.core.windows.net/todoelfut/red_card.png"},null,-1),OQ=t.createElementVNode("img",{width:"10",src:"https://golstatsimages.blob.core.windows.net/todoelfut/yellow_card.png"},null,-1),DQ=t.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/todoelfut/point-indicador-live.png"},null,-1),NQ={key:0},FQ=t.createElementVNode("div",null,"ver desglose",-1),RQ=t.createElementVNode("img",{width:"13",style:{"margin-top":"1px"},src:"https://golstatsimages.blob.core.windows.net/todoelfut/arrow-live-down.png"},null,-1),VQ=["src"],jQ=["src"],UQ={key:0,width:"10",src:"https://golstatsimages.blob.core.windows.net/todoelfut/players-goals-con-goles.png"},GQ={key:0,width:"10",src:"https://golstatsimages.blob.core.windows.net/todoelfut/red_card.png"},HQ={key:0,width:"10",src:"https://golstatsimages.blob.core.windows.net/todoelfut/yellow_card.png"},ZQ=t.createElementVNode("img",{width:"10",src:"https://golstatsimages.blob.core.windows.net/todoelfut/players-goals-con-goles.png"},null,-1),WQ=t.createElementVNode("img",{width:"10",src:"https://golstatsimages.blob.core.windows.net/todoelfut/red_card.png"},null,-1),qQ=t.createElementVNode("img",{width:"10",src:"https://golstatsimages.blob.core.windows.net/todoelfut/yellow_card.png"},null,-1),JQ=["src"],YQ=["src"],XQ=t.createElementVNode("img",{src:"https://golstatsimages.blob.core.windows.net/todoelfut/point-indicador-live.png"},null,-1),$Q={key:0},KQ=["src"],QQ=["src"],eee=t.createElementVNode("img",{width:"12",style:{position:"absolute"},src:"https://golstatsimages.blob.core.windows.net/playlist-icons/icn-soccer-ball@2x.png"},null,-1),tee=[eee],aee=t.createElementVNode("img",{width:"12",style:{position:"absolute"},src:"https://golstatsimages.blob.core.windows.net/playlist-icons/icn-soccer-ball@2x.png"},null,-1),ree=[aee],nee=t.createElementVNode("img",{style:{position:"absolute","margin-top":"1px"},width:"7",src:"https://golstatsimages.blob.core.windows.net/playlist-icons/icn-yellow-card@2x.png"},null,-1),iee=[nee],oee=t.createElementVNode("img",{style:{position:"absolute","margin-top":"1px"},width:"7",src:"https://golstatsimages.blob.core.windows.net/playlist-icons/icn-red-card@2x.png"},null,-1),see=[oee],lee=t.createElementVNode("img",{style:{position:"absolute","margin-top":"1px"},width:"7",src:"https://golstatsimages.blob.core.windows.net/playlist-icons/icn-yellow-card@2x.png"},null,-1),cee=[lee],uee=t.createElementVNode("img",{style:{position:"absolute","margin-top":"1px"},width:"7",src:"https://golstatsimages.blob.core.windows.net/playlist-icons/icn-red-card@2x.png"},null,-1),dee=[uee],hee=t.createElementVNode("img",{style:{"margin-left":"6px"},src:"https://golstatsimages.blob.core.windows.net/playlist-icons/icn-down.png"},null,-1),pee=t.createElementVNode("img",{style:{position:"absolute","margin-top":"1px"},width:"7",src:"https://golstatsimages.blob.core.windows.net/playlist-icons/icn-yellow-card@2x.png"},null,-1),fee=[pee],mee=t.createElementVNode("img",{style:{position:"absolute","margin-top":"1px"},width:"7",src:"https://golstatsimages.blob.core.windows.net/playlist-icons/icn-red-card@2x.png"},null,-1),gee=[mee],yee=t.createElementVNode("img",{style:{position:"absolute","margin-top":"1px"},width:"7",src:"https://golstatsimages.blob.core.windows.net/playlist-icons/icn-yellow-card@2x.png"},null,-1),vee=[yee],bee=t.createElementVNode("img",{style:{position:"absolute","margin-top":"1px"},width:"7",src:"https://golstatsimages.blob.core.windows.net/playlist-icons/icn-red-card@2x.png"},null,-1),_ee=[bee],xee=t.createElementVNode("img",{width:"12",style:{position:"absolute"},src:"https://golstatsimages.blob.core.windows.net/playlist-icons/icn-soccer-ball@2x.png"},null,-1),wee=[xee],kee=t.createElementVNode("img",{width:"12",style:{position:"absolute"},src:"https://golstatsimages.blob.core.windows.net/playlist-icons/icn-soccer-ball@2x.png"},null,-1),See=[kee],Cee={__name:"CardPreMatch",props:{game:{type:Object,default:()=>{}},playsLive:{type:Object,default:()=>{}},is_captured:{type:Number,default:1},infoLive:{type:Object,default:()=>{}},providerId:{type:Number,default:0},isDevApis:{type:Boolean,default:!1}},emits:["open-modal-event"],setup(e,{emit:o}){const s=e,B=new Map([[1,45],[2,90],[3,105],[4,120]]),U=t.computed(()=>{if(s.game.isMT)return"MT";const r=B.get(s.infoLive.recent_lapse);return r&&r<s.infoLive.minute?`${r}' + ${s.infoLive.minute-r}'`:`${s.infoLive.minute}'`}),m=t.computed(()=>{let r=0,_=0,b=!1;var x=!1;return Object.keys(s.infoLive).includes("score")&&(s.infoLive.score["own_"+s.game.home_team.team_id]!=null&&s.infoLive.score["own_"+s.game.home_team.team_id]!=0&&(x=!0),s.infoLive.score["own_"+s.game.visiting_team.team_id]!=null&&s.infoLive.score["own_"+s.game.visiting_team.team_id]!=0&&(b=!0),b?s.infoLive.score[s.game.home_team.team_id]!=null&&(r=parseInt(s.infoLive.score[s.game.home_team.team_id])+parseInt(s.infoLive.score["own_"+s.game.visiting_team.team_id])):s.infoLive.score[s.game.home_team.team_id]!=null&&(r=parseInt(s.infoLive.score[s.game.home_team.team_id])),x?s.infoLive.score[s.game.visiting_team.team_id]!=null&&(_=parseInt(s.infoLive.score[s.game.visiting_team.team_id])+parseInt(s.infoLive.score["own_"+s.game.home_team.team_id])):s.infoLive.score[s.game.visiting_team.team_id]!=null&&(_=parseInt(s.infoLive.score[s.game.visiting_team.team_id]))),r+" - "+_}),y=t.computed(()=>{const r={...s.game};return r.gameSchedule=s.game.schedule.split(":"),r.gameSchedule.pop(),r.gameSchedule=r.gameSchedule.join(":"),r});function a(r){let _=r.split(" "),b=_[_.length-2];return b.includes("+")?_[_.length-3]+"+"+_[_.length-1]:(b=_[_.length-1],b)}function v(r){o("open-modal-event",r)}function p(r,_){const b=new Date(r);if(_==1){const x=["Domingo","Lunes","Martes","Miércoles","Jueves","Viernes","Sábado"],h=["Enero","Febrero","Marzo","Abril","Mayo","Junio","Julio","Agosto","Septiembre","Octubre","Noviembre","Diciembre"];return`${x[b.getDay()]} ${b.getDate()} de ${h[b.getMonth()]}`}else return`${b.getDate()}-${b.getMonth()+1}-${b.getFullYear()}`}return(r,_)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(r.$style.matchCard)},[t.createElementVNode("div",{class:t.normalizeClass(r.$style.pccard)},[t.createElementVNode("div",{class:t.normalizeClass(r.$style.homeTeam),id:"container-home-team"},[t.createElementVNode("img",{class:t.normalizeClass(r.$style.image62Icon),alt:"",src:t.unref(W0)(y.value.home_team.team_id,150,e.providerId)},null,10,EQ),t.createElementVNode("img",{class:t.normalizeClass(r.$style.imgChivasIcon),alt:"",src:t.unref(W0)(y.value.home_team.team_id,80,e.providerId)},null,10,MQ),t.createElementVNode("h3",{class:t.normalizeClass(r.$style.nameDesktop),id:"team-name"},t.toDisplayString(y.value.home_team.colloquial_name),3),t.createElementVNode("h3",{class:t.normalizeClass(r.$style.nameMobile),id:"team-name"},t.toDisplayString(y.value.home_team.acronym),3),y.value.game_status==1?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[y.value.is_live==0&&y.value.game_status==1||Object.keys(y.value.minutes).length>0?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(r.$style.containerEventsGameHometeam)},[t.createElementVNode("div",{class:t.normalizeClass(r.$style.containerEvents)},[y.value.minutes.home_goals_minutes.length>0?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(r.$style.goalsContainer)},[IQ,(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(y.value.minutes.home_goals_minutes,(b,x)=>(t.openBlock(),t.createElementBlock("div",{key:x},[t.createTextVNode(t.toDisplayString(a(b).replace("(AG)",""))+" ",1),x!=y.value.minutes.home_goals_minutes.length-1?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createTextVNode(",  ")],64)):t.createCommentVNode("",!0)]))),128))],2)):t.createCommentVNode("",!0),y.value.minutes.home_red_cards_minutes.length>0&&y.value.minutes.home_goals_minutes.length>0?(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(r.$style.sepEvents)}," | ",2)):t.createCommentVNode("",!0),y.value.minutes.home_red_cards_minutes.length>0?(t.openBlock(),t.createElementBlock("div",{key:2,class:t.normalizeClass(r.$style.yellowContainer)},[PQ,(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(y.value.minutes.home_red_cards_minutes,(b,x)=>(t.openBlock(),t.createElementBlock("div",{key:x},[t.createTextVNode(t.toDisplayString(a(b))+" ",1),x!=y.value.minutes.home_red_cards_minutes.length-1?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createTextVNode(",  ")],64)):t.createCommentVNode("",!0)]))),128))],2)):t.createCommentVNode("",!0),y.value.minutes.home_red_cards_minutes.length>0||y.value.minutes.home_goals_minutes.length>0?(t.openBlock(),t.createElementBlock("div",{key:3,class:t.normalizeClass(r.$style.sepEvents)}," | ",2)):t.createCommentVNode("",!0),y.value.minutes.home_yellow_cards_minutes.length>0?(t.openBlock(),t.createElementBlock("div",{key:4,class:t.normalizeClass(r.$style.redContainer)},[LQ,(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(y.value.minutes.home_yellow_cards_minutes,(b,x)=>(t.openBlock(),t.createElementBlock("div",{key:x},[t.createTextVNode(t.toDisplayString(a(b))+" ",1),x!=y.value.minutes.home_yellow_cards_minutes.length-1?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createTextVNode(",  ")],64)):t.createCommentVNode("",!0)]))),128))],2)):t.createCommentVNode("",!0)],2)],2)):t.createCommentVNode("",!0)],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[y.value.is_live==1&&y.value.game_status!=1||y.value.game_status==0?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(r.$style.containerEventsGameHometeam)},[t.createElementVNode("div",{class:t.normalizeClass(r.$style.containerEvents)},[Object.keys(e.playsLive).length>0?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[e.playsLive[e.game.home_team.team_id]&&"goals"in e.playsLive[e.game.home_team.team_id]?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[Object.keys(e.playsLive[e.game.home_team.team_id].goals).length>0?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(r.$style.goalsContainer)},[BQ,(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(Object.keys(e.playsLive[e.game.home_team.team_id].goals),(b,x)=>(t.openBlock(),t.createElementBlock("div",{key:x},[t.createTextVNode(t.toDisplayString(e.playsLive[e.game.home_team.team_id].goals[b].event.map(h=>`${h}`).join(", ").replace("(AG)",""))+"' ",1),x!=Object.keys(e.playsLive[e.game.home_team.team_id].goals).length-1?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createTextVNode(",  ")],64)):t.createCommentVNode("",!0)]))),128))],2)):t.createCommentVNode("",!0)],64)):t.createCommentVNode("",!0),e.playsLive[e.game.home_team.team_id]&&"red"in e.playsLive[e.game.home_team.team_id]?(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[Object.keys(e.playsLive[e.game.home_team.team_id].red).length>0&&Object.keys(e.playsLive[e.game.home_team.team_id].goals).length>0?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(r.$style.sepEvents)}," | ",2)):t.createCommentVNode("",!0),Object.keys(e.playsLive[e.game.home_team.team_id].red).length>0?(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(r.$style.yellowContainer)},[zQ,(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(Object.keys(e.playsLive[e.game.home_team.team_id].red),(b,x)=>(t.openBlock(),t.createElementBlock("div",{key:x},[t.createTextVNode(t.toDisplayString(e.playsLive[e.game.home_team.team_id].red[b].event.map(h=>`${h}`).join(", "))+"' ",1),x!=Object.keys(e.playsLive[e.game.home_team.team_id].red).length-1?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createTextVNode(",  ")],64)):t.createCommentVNode("",!0)]))),128))],2)):t.createCommentVNode("",!0)],64)):t.createCommentVNode("",!0),e.playsLive[e.game.home_team.team_id]&&"yellow"in e.playsLive[e.game.home_team.team_id]?(t.openBlock(),t.createElementBlock(t.Fragment,{key:2},[Object.keys(e.playsLive[e.game.home_team.team_id].red).length>0||Object.keys(e.playsLive[e.game.home_team.team_id].goals).length>0?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(r.$style.sepEvents)}," | ",2)):t.createCommentVNode("",!0),Object.keys(e.playsLive[e.game.home_team.team_id].yellow).length>0?(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(r.$style.redContainer)},[OQ,(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(Object.keys(e.playsLive[e.game.home_team.team_id].yellow),(b,x)=>(t.openBlock(),t.createElementBlock("div",{key:x},[t.createTextVNode(t.toDisplayString(e.playsLive[e.game.home_team.team_id].yellow[b].event.map(h=>`${h}`).join(", "))+"' ",1),x!=Object.keys(e.playsLive[e.game.home_team.team_id].yellow).length-1?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createTextVNode(",  ")],64)):t.createCommentVNode("",!0)]))),128))],2)):t.createCommentVNode("",!0)],64)):t.createCommentVNode("",!0)],64)):t.createCommentVNode("",!0)],2)],2)):t.createCommentVNode("",!0)],64))],2),y.value.game_status==4&&y.value.is_live==0?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(r.$style.matchInfo),id:"container-match-info"},[t.createElementVNode("div",{class:t.normalizeClass(r.$style.sbado16De)},t.toDisplayString(p(y.value.date_time_utc,1)),3),t.createElementVNode("div",{class:t.normalizeClass(r.$style.sab16092023)},t.toDisplayString(p(y.value.date_time_utc,0)),3),t.createElementVNode("div",{class:t.normalizeClass(r.$style.hour)},[t.createElementVNode("div",{class:t.normalizeClass(r.$style.div)},t.toDisplayString(y.value.gameSchedule),3),t.createElementVNode("div",{class:t.normalizeClass(r.$style.cst)},"CST",2)],2),t.createElementVNode("div",{class:t.normalizeClass(r.$style.chivasTvCanal)},t.toDisplayString(y.value.tv_stations.join(", ")),3)],2)):(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(r.$style.matchInfo),id:"container-match-info"},[y.value.is_live?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createTextVNode(t.toDisplayString(p(y.value.date_time_utc,1)),1)],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createElementVNode("div",{class:t.normalizeClass([r.$style.sbado16De,r.$style.gameDate])},t.toDisplayString(p(y.value.date_time_utc,1)),3),t.createElementVNode("div",{class:t.normalizeClass([r.$style.sab16092023,r.$style.gameDate])},t.toDisplayString(p(y.value.date_time_utc,0)),3)],64)),y.value.is_live||y.value.game_status!=1&&y.value.game_status!=4?(t.openBlock(),t.createElementBlock("div",{key:2,class:t.normalizeClass(r.$style.score)},[t.createElementVNode("div",{class:t.normalizeClass(r.$style.divscore)},t.toDisplayString(m.value),3)],2)):(t.openBlock(),t.createElementBlock("div",{key:3,class:t.normalizeClass(r.$style.score)},[t.createElementVNode("div",{class:t.normalizeClass(r.$style.divscore)},t.toDisplayString(y.value.score.join(" - ")),3)],2)),t.createElementVNode("div",{class:t.normalizeClass(r.$style.gameStatus)},[y.value.is_live?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(r.$style.liveMinutes)},[DQ,t.createTextVNode(" LIVE - "+t.toDisplayString(U.value),1)],2)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createTextVNode(" Finalizado "),y.value.penalties_score_home_team!=0||y.value.penalties_score_visiting_team!=0?(t.openBlock(),t.createElementBlock("span",NQ," - Penales "+t.toDisplayString(y.value.penalties_score_home_team)+" - "+t.toDisplayString(y.value.penalties_score_visiting_team),1)):t.createCommentVNode("",!0)],64))],2),e.is_captured==1?(t.openBlock(),t.createElementBlock(t.Fragment,{key:4},[y.value.is_live==1||y.value.game_status==1||Object.keys(y.value.minutes).length>0?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(r.$style.viewButtomEvent),onClick:_[0]||(_[0]=b=>v(y.value))},[FQ,t.createTextVNode("  "),RQ],2)):t.createCommentVNode("",!0)],64)):t.createCommentVNode("",!0)],2)),t.createElementVNode("div",{class:t.normalizeClass(r.$style.awayTeam),id:"container-away-team"},[t.createElementVNode("img",{class:t.normalizeClass(r.$style.image62Icon1),alt:"",src:t.unref(W0)(y.value.visiting_team.team_id,150,e.providerId)},null,10,VQ),t.createElementVNode("h3",{class:t.normalizeClass(r.$style.name),id:"team-name"},t.toDisplayString(y.value.visiting_team.colloquial_name),3),t.createElementVNode("img",{class:t.normalizeClass(r.$style.imgAtlasIcon),alt:"",src:t.unref(W0)(y.value.visiting_team.team_id,80,e.providerId)},null,10,jQ),t.createElementVNode("h3",{class:t.normalizeClass(r.$style.name1),id:"team-name"},t.toDisplayString(y.value.visiting_team.acronym),3),y.value.game_status==1?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[y.value.is_live==0&&y.value.game_status==1||Object.keys(y.value.minutes).length>0?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(r.$style.containerEventsGameAwayteam)},[t.createElementVNode("div",{class:t.normalizeClass(r.$style.containerEvents)},[y.value.minutes.visiting_goals_minutes.length>0?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(r.$style.goalsContainer)},[y.value.minutes.visiting_goals_minutes.length>0?(t.openBlock(),t.createElementBlock("img",UQ)):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(y.value.minutes.visiting_goals_minutes,(b,x)=>(t.openBlock(),t.createElementBlock("div",{key:x},[t.createTextVNode(t.toDisplayString(a(b).replace("(AG)",""))+" ",1),x!=y.value.minutes.visiting_goals_minutes.length-1?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createTextVNode(",  ")],64)):t.createCommentVNode("",!0)]))),128))],2)):t.createCommentVNode("",!0),y.value.minutes.away_red_cards_minutes.length>0&&y.value.minutes.visiting_goals_minutes.length>0?(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(r.$style.sepEvents)}," | ",2)):t.createCommentVNode("",!0),y.value.minutes.away_red_cards_minutes.length>0?(t.openBlock(),t.createElementBlock("div",{key:2,class:t.normalizeClass(r.$style.yellowContainer)},[y.value.minutes.away_red_cards_minutes.length>0?(t.openBlock(),t.createElementBlock("img",GQ)):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(y.value.minutes.away_red_cards_minutes,(b,x)=>(t.openBlock(),t.createElementBlock("div",{key:x},[t.createTextVNode(t.toDisplayString(a(b))+" ",1),x!=y.value.minutes.away_red_cards_minutes.length-1?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createTextVNode(",  ")],64)):t.createCommentVNode("",!0)]))),128))],2)):t.createCommentVNode("",!0),y.value.minutes.away_red_cards_minutes.length>0||y.value.minutes.visiting_goals_minutes.length>0?(t.openBlock(),t.createElementBlock("div",{key:3,class:t.normalizeClass(r.$style.sepEvents)}," | ",2)):t.createCommentVNode("",!0),y.value.minutes.away_yellow_cards_minutes.length>0?(t.openBlock(),t.createElementBlock("div",{key:4,class:t.normalizeClass(r.$style.redContainer)},[y.value.minutes.away_yellow_cards_minutes.length>0?(t.openBlock(),t.createElementBlock("img",HQ)):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(y.value.minutes.away_yellow_cards_minutes,(b,x)=>(t.openBlock(),t.createElementBlock("div",{key:x},[t.createTextVNode(t.toDisplayString(a(b))+" ",1),x!=y.value.minutes.away_yellow_cards_minutes.length-1?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createTextVNode(",  ")],64)):t.createCommentVNode("",!0)]))),128))],2)):t.createCommentVNode("",!0)],2)],2)):t.createCommentVNode("",!0)],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[y.value.is_live==1&&y.value.game_status!=1||y.value.game_status==0?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(r.$style.containerEventsGameAwayteam)},[t.createElementVNode("div",{class:t.normalizeClass(r.$style.containerEvents)},[Object.keys(e.playsLive).length>0?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[e.playsLive[e.game.visiting_team.team_id]&&"goals"in e.playsLive[e.game.visiting_team.team_id]?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[Object.keys(e.playsLive[e.game.visiting_team.team_id].goals).length?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(r.$style.goalsContainer)},[ZQ,(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(Object.keys(e.playsLive[e.game.visiting_team.team_id].goals),(b,x)=>(t.openBlock(),t.createElementBlock("div",{key:x},[t.createTextVNode(t.toDisplayString(e.playsLive[e.game.visiting_team.team_id].goals[b].event.map(h=>`${h}`).join(", ").replace("(AG)",""))+"' ",1),x!=Object.keys(e.playsLive[e.game.visiting_team.team_id].goals).length-1?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createTextVNode(",  ")],64)):t.createCommentVNode("",!0)]))),128))],2)):t.createCommentVNode("",!0)],64)):t.createCommentVNode("",!0),e.playsLive[e.game.visiting_team.team_id]&&"red"in e.playsLive[e.game.visiting_team.team_id]?(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[Object.keys(e.playsLive[e.game.visiting_team.team_id].red).length>0&&Object.keys(e.playsLive[e.game.visiting_team.team_id].goals).length>0?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(r.$style.sepEvents)}," | ",2)):t.createCommentVNode("",!0),Object.keys(e.playsLive[e.game.visiting_team.team_id].red).length>0?(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(r.$style.yellowContainer)},[WQ,(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(Object.keys(e.playsLive[e.game.visiting_team.team_id].red),(b,x)=>(t.openBlock(),t.createElementBlock("div",{key:x},[t.createTextVNode(t.toDisplayString(e.playsLive[e.game.visiting_team.team_id].red[b].event.map(h=>`${h}`).join(", "))+"' ",1),x!=Object.keys(e.playsLive[e.game.visiting_team.team_id].red).length-1?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createTextVNode(",  ")],64)):t.createCommentVNode("",!0)]))),128))],2)):t.createCommentVNode("",!0)],64)):t.createCommentVNode("",!0),e.playsLive[e.game.visiting_team.team_id]&&"yellow"in e.playsLive[e.game.visiting_team.team_id]?(t.openBlock(),t.createElementBlock(t.Fragment,{key:2},[Object.keys(e.playsLive[e.game.visiting_team.team_id].red).length>0||Object.keys(e.playsLive[e.game.visiting_team.team_id].goals).length>0?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(r.$style.sepEvents)}," | ",2)):t.createCommentVNode("",!0),Object.keys(e.playsLive[e.game.visiting_team.team_id].yellow).length>0?(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(r.$style.redContainer)},[qQ,(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(Object.keys(e.playsLive[e.game.visiting_team.team_id].yellow),(b,x)=>(t.openBlock(),t.createElementBlock("div",{key:x},[t.createTextVNode(t.toDisplayString(e.playsLive[e.game.visiting_team.team_id].yellow[b].event.map(h=>`${h}`).join(", "))+"' ",1),x!=Object.keys(e.playsLive[e.game.visiting_team.team_id].yellow).length-1?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createTextVNode(",  ")],64)):t.createCommentVNode("",!0)]))),128))],2)):t.createCommentVNode("",!0)],64)):t.createCommentVNode("",!0)],64)):t.createCommentVNode("",!0)],2)],2)):t.createCommentVNode("",!0)],64))],2)],2),t.createElementVNode("div",{class:t.normalizeClass(r.$style.pcmobile)},[t.createElementVNode("div",{class:t.normalizeClass(r.$style.headerinfomobile)},[t.createElementVNode("div",{class:t.normalizeClass(r.$style.homeTeam),id:"container-home-team"},[t.createElementVNode("img",{class:t.normalizeClass(r.$style.image62Icon),alt:"",src:t.unref(W0)(y.value.home_team.team_id,150,e.providerId)},null,10,JQ),t.createElementVNode("img",{class:t.normalizeClass(r.$style.imgChivasIcon),alt:"",src:t.unref(W0)(y.value.home_team.team_id,80,e.providerId)},null,10,YQ),t.createElementVNode("h3",{class:t.normalizeClass(r.$style.nameDesktop),id:"team-name"},t.toDisplayString(y.value.home_team.colloquial_name),3),t.createElementVNode("h3",{class:t.normalizeClass(r.$style.nameMobile),id:"team-name"},t.toDisplayString(y.value.home_team.acronym),3)],2),y.value.game_status==4&&y.value.is_live==0?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(r.$style.matchInfo),id:"container-match-info"},[t.createElementVNode("div",{class:t.normalizeClass(r.$style.sbado16De)},t.toDisplayString(p(y.value.date_time_utc,1)),3),t.createElementVNode("div",{class:t.normalizeClass(r.$style.sab16092023)},t.toDisplayString(p(y.value.date_time_utc,0)),3),t.createElementVNode("div",{class:t.normalizeClass(r.$style.hour)},[t.createElementVNode("div",{class:t.normalizeClass(r.$style.div)},t.toDisplayString(y.value.gameSchedule),3),t.createElementVNode("div",{class:t.normalizeClass(r.$style.cst)},"CST",2)],2),t.createElementVNode("div",{class:t.normalizeClass(r.$style.chivasTvCanal)},t.toDisplayString(y.value.tv_stations.join(", ")),3)],2)):(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(r.$style.matchInfo),id:"container-match-info"},[y.value.is_live?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createTextVNode(t.toDisplayString(p(y.value.date_time_utc,1)),1)],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createElementVNode("div",{class:t.normalizeClass([r.$style.sbado16De,r.$style.gameDate])},t.toDisplayString(p(y.value.date_time_utc,1)),3),t.createElementVNode("div",{class:t.normalizeClass([r.$style.sab16092023,r.$style.gameDate])},t.toDisplayString(p(y.value.date_time_utc,0)),3)],64)),y.value.is_live||y.value.game_status!=1&&y.value.game_status!=4?(t.openBlock(),t.createElementBlock("div",{key:2,class:t.normalizeClass(r.$style.score)},[t.createElementVNode("div",{class:t.normalizeClass(r.$style.divscore)},t.toDisplayString(m.value),3)],2)):(t.openBlock(),t.createElementBlock("div",{key:3,class:t.normalizeClass(r.$style.score)},[t.createElementVNode("div",{class:t.normalizeClass(r.$style.divscore)},t.toDisplayString(y.value.score.join(" - ")),3)],2)),t.createElementVNode("div",{class:t.normalizeClass(r.$style.gameStatus)},[y.value.is_live?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(r.$style.liveMinutes)},[XQ,t.createTextVNode(" LIVE - "+t.toDisplayString(U.value)+"' ",1)],2)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createTextVNode(" Finalizado "),y.value.penalties_score_home_team!=0||y.value.penalties_score_visiting_team!=0?(t.openBlock(),t.createElementBlock("span",$Q," - Penales "+t.toDisplayString(y.value.penalties_score_home_team)+" - "+t.toDisplayString(y.value.penalties_score_visiting_team),1)):t.createCommentVNode("",!0)],64))],2)],2)),t.createElementVNode("div",{class:t.normalizeClass(r.$style.awayTeam),id:"container-away-team"},[t.createElementVNode("img",{class:t.normalizeClass(r.$style.image62Icon1),alt:"",src:t.unref(W0)(y.value.visiting_team.team_id,150,e.providerId)},null,10,KQ),t.createElementVNode("h3",{class:t.normalizeClass(r.$style.name),id:"team-name"},t.toDisplayString(y.value.visiting_team.colloquial_name),3),t.createElementVNode("img",{class:t.normalizeClass(r.$style.imgAtlasIcon),alt:"",src:t.unref(W0)(y.value.visiting_team.team_id,80,e.providerId)},null,10,QQ),t.createElementVNode("h3",{class:t.normalizeClass(r.$style.name1),id:"team-name"},t.toDisplayString(y.value.visiting_team.acronym),3)],2)],2),y.value.game_status!=4||y.value.is_live==1?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(r.$style.headereventsmobile)},[t.createElementVNode("div",{class:t.normalizeClass(r.$style.headereventsmobilecont)},[t.createElementVNode("div",{class:t.normalizeClass(r.$style.headereventsmobilecontlocal)},[y.value.game_status==1?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[y.value.minutes.home_goals_minutes.length>0?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(r.$style.icongoalheader)},tee,2)):t.createCommentVNode("",!0)],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[y.value.is_live==1&&y.value.game_status!=1||y.value.game_status==0?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[e.playsLive[e.game.home_team.team_id]&&"goals"in e.playsLive[e.game.home_team.team_id]?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[Object.keys(e.playsLive[e.game.home_team.team_id].goals).length>0?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(r.$style.icongoalheader)},ree,2)):t.createCommentVNode("",!0)],64)):t.createCommentVNode("",!0)],64)):t.createCommentVNode("",!0)],64)),t.createElementVNode("div",{class:t.normalizeClass(r.$style.goalscontainermobile),style:{"justify-content":"left !important"}},[y.value.game_status==1?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:0},t.renderList(y.value.minutes.home_goals_minutes,(b,x)=>(t.openBlock(),t.createElementBlock("div",{key:x,class:t.normalizeClass(r.$style.itemmobilgoal)},t.toDisplayString(a(b).replace("(AG)","")),3))),128)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[y.value.is_live==1&&y.value.game_status!=1||y.value.game_status==0?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[e.playsLive[e.game.visiting_team.team_id]&&"goals"in e.playsLive[e.game.visiting_team.team_id]?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:0},t.renderList(Object.keys(e.playsLive[e.game.home_team.team_id].goals),(b,x)=>(t.openBlock(),t.createElementBlock("div",{key:x,class:t.normalizeClass(r.$style.itemmobilgoal)},t.toDisplayString(e.playsLive[e.game.home_team.team_id].goals[b].event.map(h=>`${h}`).join(", ").replace("(AG)",""))+"' ",3))),128)):t.createCommentVNode("",!0)],64)):t.createCommentVNode("",!0)],64))],2),t.createElementVNode("div",{class:t.normalizeClass(r.$style.conttarjetasmobile)},[y.value.game_status==1?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createElementVNode("div",{class:t.normalizeClass(r.$style.conttarjetasmobileyellow)},[t.createElementVNode("div",{class:t.normalizeClass(r.$style.iconmobileyellow)},iee,2),t.createElementVNode("div",{class:t.normalizeClass(r.$style.txtmobileyellow)},t.toDisplayString(y.value.minutes.home_yellow_cards_minutes.length),3)],2),t.createElementVNode("div",{class:t.normalizeClass(r.$style.conttarjetasmobilered)},[t.createElementVNode("div",{class:t.normalizeClass(r.$style.iconmobilered)},see,2),t.createElementVNode("div",{class:t.normalizeClass(r.$style.txtmobilered)},t.toDisplayString(y.value.minutes.home_red_cards_minutes.length),3)],2)],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[y.value.is_live==1&&y.value.game_status!=1||y.value.game_status==0?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[Object.keys(e.playsLive).length>0?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createElementVNode("div",{class:t.normalizeClass(r.$style.conttarjetasmobileyellow)},[t.createElementVNode("div",{class:t.normalizeClass(r.$style.iconmobileyellow)},cee,2),e.playsLive[e.game.home_team.team_id]&&"yellow"in e.playsLive[e.game.home_team.team_id]?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(r.$style.txtmobileyellow)},t.toDisplayString(Object.keys(e.playsLive[e.game.home_team.team_id].yellow).length),3)):(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(r.$style.txtmobileyellow)},"0",2))],2),t.createElementVNode("div",{class:t.normalizeClass(r.$style.conttarjetasmobilered)},[t.createElementVNode("div",{class:t.normalizeClass(r.$style.iconmobilered)},dee,2),e.playsLive[e.game.home_team.team_id]&&"red"in e.playsLive[e.game.home_team.team_id]?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(r.$style.txtmobilered)},t.toDisplayString(Object.keys(e.playsLive[e.game.home_team.team_id].red).length),3)):(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(r.$style.txtmobilered)},"0",2))],2)],64)):t.createCommentVNode("",!0)],64)):t.createCommentVNode("",!0)],64))],2)],2),t.createElementVNode("div",{class:t.normalizeClass(r.$style.headereventsmobileconttitle)},[e.is_captured==1?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[y.value.is_live==1||y.value.game_status==1||Object.keys(y.value.minutes).length>0?(t.openBlock(),t.createElementBlock("span",{key:0,class:t.normalizeClass(r.$style.viewButtomEventMobile),onClick:_[1]||(_[1]=b=>v(y.value))},[t.createTextVNode(" ver desglose "),hee],2)):t.createCommentVNode("",!0)],64)):t.createCommentVNode("",!0)],2),t.createElementVNode("div",{class:t.normalizeClass(r.$style.headereventsmobilecontaway)},[t.createElementVNode("div",{class:t.normalizeClass(r.$style.conttarjetasmobile)},[y.value.game_status==1?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createElementVNode("div",{class:t.normalizeClass(r.$style.conttarjetasmobileyellow)},[t.createElementVNode("div",{class:t.normalizeClass(r.$style.txtmobileyellow)},t.toDisplayString(y.value.minutes.away_yellow_cards_minutes.length),3),t.createElementVNode("div",{class:t.normalizeClass(r.$style.iconmobileyellow)},fee,2)],2),t.createElementVNode("div",{class:t.normalizeClass(r.$style.conttarjetasmobilered)},[t.createElementVNode("div",{class:t.normalizeClass(r.$style.txtmobilered)},t.toDisplayString(y.value.minutes.away_red_cards_minutes.length),3),t.createElementVNode("div",{class:t.normalizeClass(r.$style.iconmobilered)},gee,2)],2)],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[y.value.is_live==1&&y.value.game_status!=1||y.value.game_status==0?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[Object.keys(e.playsLive).length>0?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createElementVNode("div",{class:t.normalizeClass(r.$style.conttarjetasmobileyellow)},[e.playsLive[e.game.visiting_team.team_id]&&"yellow"in e.playsLive[e.game.visiting_team.team_id]?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(r.$style.txtmobileyellow)},t.toDisplayString(Object.keys(e.playsLive[e.game.visiting_team.team_id].yellow).length),3)):(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(r.$style.txtmobileyellow)},"0",2)),t.createElementVNode("div",{class:t.normalizeClass(r.$style.iconmobileyellow)},vee,2)],2),t.createElementVNode("div",{class:t.normalizeClass(r.$style.conttarjetasmobilered)},[e.playsLive[e.game.visiting_team.team_id]&&"red"in e.playsLive[e.game.visiting_team.team_id]?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(r.$style.txtmobilered)},t.toDisplayString(Object.keys(e.playsLive[e.game.visiting_team.team_id].red).length),3)):(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(r.$style.txtmobilered)},"0",2)),t.createElementVNode("div",{class:t.normalizeClass(r.$style.iconmobilered)},_ee,2)],2)],64)):t.createCommentVNode("",!0)],64)):t.createCommentVNode("",!0)],64))],2),t.createElementVNode("div",{class:t.normalizeClass(r.$style.goalscontainermobile),style:{"justify-content":"right !important"}},[y.value.game_status==1?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:0},t.renderList(y.value.minutes.visiting_goals_minutes,(b,x)=>(t.openBlock(),t.createElementBlock("div",{key:x,class:t.normalizeClass(r.$style.itemmobilgoal)},t.toDisplayString(a(b).replace("(AG)","")),3))),128)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[y.value.is_live==1&&y.value.game_status!=1||y.value.game_status==0?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[e.playsLive[e.game.visiting_team.team_id]&&"goals"in e.playsLive[e.game.visiting_team.team_id]?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:0},t.renderList(Object.keys(e.playsLive[e.game.visiting_team.team_id].goals),(b,x)=>(t.openBlock(),t.createElementBlock("div",{key:x,class:t.normalizeClass(r.$style.itemmobilgoal)},t.toDisplayString(e.playsLive[e.game.visiting_team.team_id].goals[b].event.map(h=>`${h}`).join(", ").replace("(AG)",""))+"' ",3))),128)):t.createCommentVNode("",!0)],64)):t.createCommentVNode("",!0)],64))],2),y.value.game_status==1?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[y.value.minutes.visiting_goals_minutes.length>0?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(r.$style.icongoalheader)},wee,2)):t.createCommentVNode("",!0)],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[y.value.is_live==1&&y.value.game_status!=1||y.value.game_status==0?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[e.playsLive[e.game.visiting_team.team_id]&&"goals"in e.playsLive[e.game.visiting_team.team_id]?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[Object.keys(e.playsLive[e.game.visiting_team.team_id].goals).length>0?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(r.$style.icongoalheader)},See,2)):t.createCommentVNode("",!0)],64)):t.createCommentVNode("",!0)],64)):t.createCommentVNode("",!0)],64))],2)],2)],2)):t.createCommentVNode("",!0)],2)],2))}},Tee={$style:AQ},Aee=Sf(Cee,[["__cssModules",Tee]]),Eee={class:"calendar-by-game__carousel"},Mee="https://al2nv2dmkc.execute-api.us-west-2.amazonaws.com/prod/mxm/",Iee={__name:"GSC-CalendarByGame",props:{showVideos:{type:Number,default:0},playsLive:{type:Object,default:()=>{}},infoLive:{type:Object,default:()=>{}},height:{type:String,default:"fit-content"},width:{type:String,default:"100%"},rowHeight:{type:String,default:"fit-content"},oddRowColor:{type:String,default:"#172531"},evenRowColor:{type:String,default:"#0D1D29"},isLandingMode:{type:Boolean,default:!1},isRoundMode:{type:Boolean,default:!1},isRoundPickerVisible:{type:Boolean,default:!0},isPaginationVisible:{type:Boolean,default:!0},awaitForSeasons:{type:Boolean,default:!1},seasons:{type:Array,default:()=>[]},isCup:{type:Boolean,default:!1},isCupLegacy:{type:Boolean,default:!1},token:{type:String,default:""},pagesWithGames:{type:Array,default:()=>[]},maxGamesToShow:{type:Number,default:0,validator(e){return!Number.isNaN(e)&&e>=0}},areRoundsVisible:{type:Boolean,default:!0},is_captured:{type:Number,default:1},gamesPerMatchDay:{type:Number,default:0,validator(e){return!Number.isNaN(e)&&e>=0}},itemsToShow:{type:Number,default:9},itemsToScroll:{type:Number,default:9},games:{type:Array,default:()=>null},teamId:{type:Number,default:0,validator(e){return!Number.isNaN(e)&&e>=0}},avoidTeamIdFilter:{type:Boolean,default:!1},areGamesCarouselType:{type:Boolean,default:!1},defaultGameId:{type:Number,default:0,validator(e){return!Number.isNaN(e)&&e>=0}},userTeamId:{type:Number,default:0,validator(e){return!Number.isNaN(e)&&e>=0}},sortCalendar:{type:Boolean,default:!0},isTeamGamePerPage:{type:Boolean,default:!1},onlyGamesTeamId:{type:Number,default:0,validator(e){return!Number.isNaN(e)&&e>=0}},tournamentType:{type:Number,default:0},checkLiveGamesIntervalMinutes:{type:Number,default:2},gamesEventsIntervalMinutes:{type:Number,default:2},checkStartedLiveGamesMinutes:{type:Number,default:5},videoPrivilegesUserId:{type:Number,default:0},providerId:{type:Number,default:0},isDevApis:{type:Boolean,default:!1}},emits:["tournament-selected","change-teams","change-round","change-game-carousel","action","change-games-by-client-privileges","open-modal-event"],setup(e,{emit:o}){const s=e;let B=null,U=null,m=null;const y=new Set,a=new Set,v=t.ref([]),p=t.ref({}),r=t.ref(0),_=t.ref(null),b=t.ref({}),x=t.ref(new Map),h=t.ref(!1),n=t.ref(null),i=t.ref(null),c=t.ref(null),l=t.ref([]),d=t.ref(new Map),g=t.ref(new Set),w=t.ref(Q_(p6));let C=Promise.resolve();t.watch(()=>s.providerId,He=>{C=xX(He).then(Pe=>{w.value=Pe})},{immediate:!0});const E=t.computed(()=>s.isCup),A=t.computed(()=>s.isCupLegacy),P=t.computed(()=>({height:s.height,width:s.width})),L=t.computed(()=>{if(s.games)return me(s.games,s.isTeamGamePerPage);{const He=x.value.get(b.value.key);return He&&s.isTeamGamePerPage&&s.onlyGamesTeamId?[He[0].filter(Pe=>Pe.home_team.team_id===s.onlyGamesTeamId||Pe.visiting_team.team_id===s.onlyGamesTeamId)]:He||[]}}),T=t.computed(()=>{const He=s.areGamesCarouselType?L.value[0]:L.value;return console.log("aux: ",He),He}),I=t.ref([]),M=t.ref(new Map),S=t.ref([]),z=t.ref(0),k=t.ref(0),O=t.computed(()=>{const He=j(p.value),Pe=I.value.find(Ve=>Ve.key===He);return Pe&&h.value&&(N(!1),we(Pe)),He});t.watch(()=>s.seasons,He=>{He&&He.length&&(N(!0),v.value=He.map(Pe=>Pe.id),ne(He,!0))},{immediate:!0,deep:!0}),t.watch(x,He=>{if(s.onlyGamesTeamId&&He.size){const Pe=Array.from(He.values()).reduce((Ve,Ie)=>(Ie.forEach(ge=>{const Ae=ge.find(ke=>ke.home_team.team_id===s.onlyGamesTeamId||ke.visiting_team.team_id===s.onlyGamesTeamId);Ae&&Ve.push(Ae)}),Ve),[]);o("change-games-by-client-privileges",Pe)}},{immediate:!0});function N(He){h.value=He}function j(He){const Pe=new Date().valueOf(),Ve=Object.entries(Object.entries(He).reduce((ge,[Ae,ke])=>(ge[Ae]=null,ke.forEach(je=>{je.games.forEach(De=>{if([1,0].includes(De.game_status)||De.is_live){const Ne=Pe-De.dateTimeMillis;(ge[Ae]===null||Ne<ge[Ae])&&(ge[Ae]=Ne)}})}),ge),{}));if(!Ve.length)return"1";const Ie=Ve.reduce((ge,[Ae,ke])=>{if(ke!==null){const je=M.value.get(Ae);(ge.shortestMillisToNow===null||ke<ge.shortestMillisToNow&&je.index>=ge.scheduleKey.index)&&(ge.shortestMillisToNow=ke,ge.round=Ae,ge.scheduleKey=je)}return ge},{round:"",shortestMillisToNow:null,scheduleKey:null});return Ie.shortestMillisToNow!==null?Ie.round:Ve[0][0]}t.watch(()=>s.teamId,()=>{ie()},{immediate:!0});async function G(He){try{const Pe=Py("https://u6845vutog.execute-api.us-east-2.amazonaws.com/prod/api/v1/privileges/games?",s.providerId,s.isDevApis),Ve=He.reduce((Ie,ge,Ae)=>(Ie+=`${Ae===0?"":"&"}season=${ge}`,Ie),Pe);return(await Iy.get(Ve)).data}catch(Pe){throw new Error(Pe)}}async function H(He,Pe,Ve=""){let Ie=Ve;try{const ge={};s.token&&(ge.Authorization=s.token),Ie||(Ie=Py("https://qyyibs1w0d.execute-api.us-west-2.amazonaws.com/prod/calendar/gamesBySeason?",s.providerId,s.isDevApis),He.forEach((je,De)=>{Ie+=`${De===0?"":"&"}seasons=${je}`}));const{data:{data:Ae,teams:ke}}=await Iy.get(Ie,{headers:ge});return{seasonsAndGames:Ae,seasonsAndTeams:ke}}catch(ge){if(Pe>0)return H(He,Pe-1,Ie);throw new Error(ge)}}function Z(He){for(const Pe of He)if(!v.value.includes(Pe.season_id))return!0;return!1}let $=0;async function ne(He,Pe){try{p.value={},k.value=0,z.value=0;const Ve=new Set,Ie=He.map(Ne=>Ne.id),ge=[H(Ie,3)];s.videoPrivilegesUserId&&ge.push(G(Ie));const[{seasonsAndGames:Ae,seasonsAndTeams:ke},je]=await Promise.all(ge);if(je&&je.forEach(Ne=>{Ne.status&&Ve.add(Ne.game_id)}),Pe&&Z(Ae))return;$=0,Ae.forEach(Ne=>{const{type:qe}=He.find(Ze=>Ze.id===Ne.season_id);Ne.type=qe,Ne.games.forEach(Ze=>{qe===0&&($=Ne.season_id),k.value++,([1,0].includes(Ze.game_status)||Ze.is_live)&&z.value++,Ze.season_id=Ne.season_id,Ze.hasVideoPrivilege=Ve.has(Ze.game_id)})}),n.value={seasonsGames:Ae};const{teams:De}=ke.find(Ne=>Ne.season_id===$);i.value=De,o("change-teams",De),await C,ie(),g.value.size?ee():await q()}catch(Ve){throw new Error(Ve)}}async function q(){try{const He=await se();a.clear(),l.value=He.data.reduce((Ve,Ie)=>(Ie.games.forEach(ge=>{y.add(ge.game_id),a.add(ge.game_id),Ve.push(ge)}),Ve),[]);const Pe=[];if(y.forEach(Ve=>{a.has(Ve)||(Pe.push(Ve),pe(Ve))}),Pe.forEach(Ve=>{y.delete(Ve)}),l.value.length){U||await K();const Ve=[];g.value.forEach(Ie=>{const ge=d.value.get(Ie);ge&&new Date().valueOf()>ge.dateTimeMillis&&Ve.push(Ie)}),Ve.length&&Ve.every(Ie=>d.value.get(Ie).isLiveTracked)&&ce()}}catch(He){throw new Error(He)}}async function K(){try{const He=[];for(const Ve of l.value){const Ie=d.value.get(Ve.game_id);Ie&&(Ie.is_live=1,Ie.game_status=4,Ie.live_stats=1,Ie.scheduleKey&&Ie.scheduleKey.liveGamesIds.add(Ve.game_id)),Ie.isLiveTracked=!0,He.push(re(Ve.game_id))}const Pe=await Promise.all(He);for(const Ve of Pe){const Ie=d.value.get(Ve.game_id);if(Ie){let ge=!1,Ae=!1;for(const Ne of Ve.plays){if(Ne.category_id===0&&Ne.game_status_id===18){Ae=!0;break}Ne.category_id===0&&Ne.game_status_id===17&&(ge=!0)}Ie.isMT=ge&&!Ae;const ke=[Number(Ve.score[Ie.home_team.team_id.toString()])+Number(Ve.score[`own_${Ie.visiting_team.team_id.toString()}`]),Number(Ve.score[Ie.visiting_team.team_id.toString()])+Number(Ve.score[`own_${Ie.home_team.team_id.toString()}`])],je=ke[0],De=ke[1];Ie.score=[Number.isNaN(je)?0:je,Number.isNaN(De)?0:De],he(Ie,Ve.plays)}}U||Q()}catch(He){throw new Error(He)}}function ee(){g.value.size&&g.value.forEach(He=>{const Pe=d.value.get(He);if(Pe){const Ve=new Date().valueOf();if(60*1e3*30+Pe.dateTimeMillis-Ve>0){const Ie=Pe.dateTimeMillis-Ve-3e5;setTimeout(()=>{X()},Ie>0?Ie:0)}}})}function X(){ce(),m||(m=setInterval(()=>{q()},s.checkLiveGamesIntervalMinutes*60*1e3))}function Q(){de(),U=setInterval(()=>{K()},s.gamesEventsIntervalMinutes*60*1e3)}function ce(){clearInterval(m),m=null}function de(){clearInterval(U),U=null}function he(He,Pe){for(const Ve of Pe)if(Ve.category_id===0&&Ve.game_status_id===13){const Ie=d.value.get(Ve.game_id);l.value=l.value.filter(ge=>ge.game_id!==He.game_id),Ie.is_live=0,Ie.game_status=0,Ie.scheduleKey&&Ie.scheduleKey.liveGamesIds.delete(He.game_id)}}function pe(He){const Pe=d.value.get(He);Pe&&(l.value=l.value.filter(Ve=>Ve.game_id!==He),Pe.is_live=0,Pe.game_status=0,Pe.scheduleKey&&Pe.scheduleKey.liveGamesIds.delete(He))}async function re(He){try{const Pe=Py(Mee,s.providerId,s.isDevApis);return(await Iy.get(`${Pe}${He}`,{headers:{Authorization:`${s.token}`}})).data}catch(Pe){throw new Error(Pe)}}async function se(){try{if(s.seasons.length===0)return[];const He=s.seasons.reduce((ge,Ae)=>`${ge}seasons=${Ae.id}&`,""),Pe=Iy.create({headers:{Authorization:`${s.token}`}}),Ve=Py(`https://qyyibs1w0d.execute-api.us-west-2.amazonaws.com/prod/calendar/gamesBySeason/lives?${He}`,s.providerId,s.isDevApis),{data:Ie}=await Pe.get(Ve);return Ie}catch(He){throw new Error(He)}}function ie(){if(ce(),!i.value)return;d.value.clear(),g.value.clear(),S.value=[];const He=n.value&&n.value.seasonsGames?n.value.seasonsGames.map(Pe=>{const Ve=Pe.games.reduce((Ie,ge)=>{if(s.onlyGamesTeamId&&s.onlyGamesTeamId!==ge.home_team&&s.onlyGamesTeamId!==ge.visiting_team)return Ie;const Ae={...ge,regularSeasonId:$},ke=new Date,[je,De,Ne]=Ae.date.split("-"),[qe,Ze,_e]=Ae.schedule.split(":"),Be=new Date(Number(je),Number(De)-1,Number(Ne),Number(qe),Number(Ze),Number(_e));return Ae.dateTimeMillis=Be.valueOf(),Ae.home_team=i.value.find(Re=>Re.team_id===ge.home_team),Ae.visiting_team=i.value.find(Re=>Re.team_id===ge.visiting_team),Ae.game_status===4&&!Ae.is_live&&ke.getFullYear()===Be.getFullYear()&&ke.getMonth()===Be.getMonth()&&ke.getDate()===Be.getDate()&&g.value.add(Ae.game_id),d.value.set(Ae.game_id,Ae),s.teamId&&Ae.home_team.team_id!==s.teamId&&Ae.visiting_team.team_id!==s.teamId||(Ie[ge.matchday_abbreviation]?Ie[ge.matchday_abbreviation][ge.game_status===3?"canceled":ge.date]?Ie[ge.matchday_abbreviation][ge.game_status===3?"canceled":ge.date].push(Ae):Ie[ge.matchday_abbreviation][ge.game_status===3?"canceled":ge.date]=[Ae]:Ie[ge.matchday_abbreviation]={[ge.game_status===3?"canceled":ge.date]:[Ae]},s.userTeamId&&([1,0].includes(Ae.game_status)||Ae.is_live)&&(Ae.home_team.team_id===s.userTeamId||Ae.visiting_team.team_id===s.userTeamId)&&S.value.push(Ae)),Ie},{});for(let[Ie,ge]of Object.entries(Ve))Ve[Ie]=Object.entries(ge).map(([Ae,ke])=>({date:Ae,games:ke.sort((je,De)=>je.dateTimeMillis-De.dateTimeMillis)})),Ve[Ie].sort((Ae,ke)=>Ae.date<ke.date?-1:Ae.date>ke.date?1:0);return{type:Pe.type,weight:Pe.type===0?0:Pe.type===2?1:2,schedule:Ve}}):[];He.sort((Pe,Ve)=>Pe.weight-Ve.weight),p.value=He.reduce((Pe,Ve)=>{for(const[Ie,ge]of Object.entries(Ve.schedule))if(Ve.type===0)if([1,2].includes(s.tournamentType)){const Ae=w.value.namesAndAbbByTournamentTypeAndMatchDayAbb.get(s.tournamentType);if(Ae){const ke=Ae.get(Ie);ke&&(Pe[ke.matchDayAbbreviation]=ge)}}else if(E.value){const Ae=Ie.replace("M",""),ke=Ae;A.value?Pe[w.value.cupLegacy[Ae]||ke]=ge:Pe[w.value.cup[Ie]||ke]=ge}else Pe[Number(Ie.replace("M","")).toString()]=ge;else Ve.type===2?Ie.charAt(1)=="I"?Pe[`PI${Number(Ie.replace("PI",""))}`]=ge:Pe[`R${Number(Ie.replace("PO",""))}`]=ge:Ve.type===1&&(Pe[w.value.regularLeague[Ie]]=ge);return Pe},{}),x.value=new Map,M.value.clear(),I.value=Array.from(Object.entries(p.value).reduce((Pe,[Ve,Ie],ge)=>{const Ae=Number(Ve);let ke="";Number.isNaN(Ae)?ke=Ve:ke=Ae<10?`0${Ae}`:Ve;const je={key:Ve,value:Ae,valueText:ke,index:ge,liveGamesIds:new Set};M.value.set(Ve,je),Pe.set(Ve,je);const De=Ie.reduce((qe,Ze)=>(Ze.games.forEach(_e=>{_e.game_id===s.defaultGameId&&(c.value=Ve),_e.roundAbbreviation=Number.isNaN(Ae)?Ae:`J ${Ae}`,_e.scheduleKey=je,_e.is_live&&je.liveGamesIds.add(_e.game_id)}),qe=qe.concat(Ze.games),qe),[]),Ne=me(De);return x.value.set(Ve,Ne),Pe},new Map).values())}function me(He,Pe=!1){const Ve=[];if(s.gamesPerMatchDay>0){let Ie=[];He.forEach((ge,Ae)=>{Ie.push(ge),(Ae+1)%s.gamesPerMatchDay===0&&(Ve.push([...Ie]),Ie=[])}),Ie.length&&Ve.push([...Ie])}else Ve.push(He);return Pe&&s.isTeamGamePerPage&&s.defaultGameId?Ve.filter(Ie=>Ie.game_id===s.defaultGameId||Ie.gameId===s.defaultGameId):Ve}async function ye(He){try{const Pe=Py("https://kefloixzy1.execute-api.us-west-2.amazonaws.com/prod/tournaments",s.providerId,s.isDevApis),{data:Ve}=await Iy.get(Pe);return Ve}catch(Pe){if(He>0)return ye(He-1);throw new Error(Pe)}}function ve(){if(window.ResizeObserver)B=new ResizeObserver(()=>{r.value=_.value.clientWidth}),B.observe(_.value);else throw new Error("Resize observer not supported!")}function we(He){b.value.value!==He.value&&(b.value=He,o("change-round",He))}function Se(He){s.areGamesCarouselType&&o("change-game-carousel",He.selectedItem)}function Ce(He){o("action",He),Le(He)}function Me(He){o("open-modal-event",He)}function Le(He){const Pe="PLAY_RESUME",Ve="PLAY_GOALS",Ie=s.providerId==1?[607,608,12,55,54,35,14,52,15,53,466,477]:[393,444,985,986,1035,1075,473,389],ge=s.providerId==1?[12,55,"35_r","54_r"]:[393,1415],{game_id:Ae,season_id:ke}=He.game;let je={seasonId:ke,tournaments:[],isFeaturedPlayers:!1,mainSectionType:1,playListType:1,gameIdsToFilter:[Ae],playerIds:[],goalkeeperIds:[],categoryIds:[],teamId:0,matchResult:[],categorySingleName:"",avoidCategorySingleName:!1,currentPlayIndex:0,playData:null,lastClashedGameId:null,tournamentsLastClashes:null,advancedFilter:{playListTitle:""},objectPlaySync:null};He.action===Pe?(je.categoryIds=Ie,je.advancedFilter.playListTitle="Resumen",o("openmedia",je)):He.action===Ve&&(je.categoryIds=ge,je.advancedFilter.playListTitle="Goles",o("openmedia",je))}async function ze(){try{if(!s.awaitForSeasons&&!s.games){const He=(await ye(3)).find(Ie=>Ie._id===1),Pe=He.seasons[0],Ve=[{id:Pe.id,type:Pe.type}];He&&He.tournament&&o("tournament-selected",He.tournament),Pe.related_seasons&&Pe.related_seasons.length&&Ve.push(...Pe.related_seasons.map(Ie=>({id:Ie.id,type:Ie.type}))),await ne(Ve,!1)}}catch(He){throw new Error(He)}}return t.onMounted(()=>{ve()}),ze(),(He,Pe)=>(t.openBlock(),t.createElementBlock("div",{ref_key:"calendarByGame",ref:_,class:"calendar-by-game",style:t.normalizeStyle(P.value)},[e.teamId&&!e.avoidTeamIdFilter?(t.openBlock(),t.createBlock(IK,{key:0,"full-tournament-schedule":p.value,"team-id":e.teamId,"show-videos":e.showVideos,"is-landing-mode":!1,"row-height":e.rowHeight,"component-width":r.value,"games-pages":x.value,"is-pagination-visible":e.isPaginationVisible,"is-round-mode":e.isRoundMode,"provider-id":e.providerId,"is-dev-apis":e.isDevApis,onAction:Ce},null,8,["full-tournament-schedule","team-id","show-videos","row-height","component-width","games-pages","is-pagination-visible","is-round-mode","provider-id","is-dev-apis"])):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[e.areRoundsVisible&&I.value?(t.openBlock(),t.createBlock(ZX,{key:0,"match-days":I.value,"is-landing-mode":e.isLandingMode,height:"48px","items-to-show":e.itemsToShow,"items-to-scroll":e.itemsToScroll,"component-width":r.value,"default-match-day-key":c.value,"closest-match-day":e.sortCalendar?O.value:"",onChangeMatchDay:we},null,8,["match-days","is-landing-mode","items-to-show","items-to-scroll","component-width","default-match-day-key","closest-match-day"])):t.createCommentVNode("",!0),t.createElementVNode("div",Eee,[L.value?(t.openBlock(),t.createBlock(t.unref(bE),{key:0,"is-pagination-visible":e.isPaginationVisible&&!e.areGamesCarouselType,items:T.value,"are-navigation-arrows-visible":e.areGamesCarouselType?!e.areGamesCarouselType:e.isPaginationVisible,"wrap-around":e.areGamesCarouselType&&!e.isTeamGamePerPage,"items-to-show":e.areGamesCarouselType&&!e.isTeamGamePerPage?1.2:1,"is-main-slide-priority":e.areGamesCarouselType,"are-slides-arrows-visible":e.areGamesCarouselType&&!e.isTeamGamePerPage,"slides-arrows-left-and-right":e.areGamesCarouselType?"30px":"0px","default-item-by-prop":e.areGamesCarouselType?{propName:"game_id",value:e.defaultGameId}:{},onInput:Se},{default:t.withCtx(({item:Ve})=>[e.areGamesCarouselType?(t.openBlock(),t.createBlock(Aee,{key:0,is_captured:e.is_captured,game:Ve,onOpenModalEvent:Me,"plays-live":e.playsLive,"info-live":e.infoLive,"provider-id":e.providerId,"is-dev-apis":e.isDevApis},null,8,["is_captured","game","plays-live","info-live","provider-id","is-dev-apis"])):(t.openBlock(),t.createBlock(CK,{key:1,"team-id":e.teamId,"show-videos":e.showVideos,"games-per-page":Ve,"is-landing-mode":e.isLandingMode,"row-height":e.rowHeight,"component-width":r.value,"is-round-mode":e.isRoundMode,"video-privileges-user-id":e.videoPrivilegesUserId,token:e.token,"provider-id":e.providerId,"is-dev-apis":e.isDevApis,onAction:Ce},null,8,["team-id","show-videos","games-per-page","is-landing-mode","row-height","component-width","is-round-mode","video-privileges-user-id","token","provider-id","is-dev-apis"]))]),_:1},8,["is-pagination-visible","items","are-navigation-arrows-visible","wrap-around","items-to-show","is-main-slide-priority","are-slides-arrows-visible","slides-arrows-left-and-right","default-item-by-prop"])):t.createCommentVNode("",!0)])],64))],4))}},Pee=Sf(Iee,[["__scopeId","data-v-510bfb7d"]]);function Lee(){return ME().__VUE_DEVTOOLS_GLOBAL_HOOK__}function ME(){return typeof navigator<"u"&&typeof window<"u"?window:typeof globalThis<"u"?globalThis:{}}const Bee=typeof Proxy=="function",zee="devtools-plugin:setup",Oee="plugin:settings:set";let Ly,b6;function Dee(){var e;return Ly!==void 0||(typeof window<"u"&&window.performance?(Ly=!0,b6=window.performance):typeof globalThis<"u"&&(!((e=globalThis.perf_hooks)===null||e===void 0)&&e.performance)?(Ly=!0,b6=globalThis.perf_hooks.performance):Ly=!1),Ly}function Nee(){return Dee()?b6.now():Date.now()}class Fee{constructor(o,s){this.target=null,this.targetQueue=[],this.onQueue=[],this.plugin=o,this.hook=s;const B={};if(o.settings)for(const y in o.settings){const a=o.settings[y];B[y]=a.defaultValue}const U=`__vue-devtools-plugin-settings__${o.id}`;let m=Object.assign({},B);try{const y=localStorage.getItem(U),a=JSON.parse(y);Object.assign(m,a)}catch{}this.fallbacks={getSettings(){return m},setSettings(y){try{localStorage.setItem(U,JSON.stringify(y))}catch{}m=y},now(){return Nee()}},s&&s.on(Oee,(y,a)=>{y===this.plugin.id&&this.fallbacks.setSettings(a)}),this.proxiedOn=new Proxy({},{get:(y,a)=>this.target?this.target.on[a]:(...v)=>{this.onQueue.push({method:a,args:v})}}),this.proxiedTarget=new Proxy({},{get:(y,a)=>this.target?this.target[a]:a==="on"?this.proxiedOn:Object.keys(this.fallbacks).includes(a)?(...v)=>(this.targetQueue.push({method:a,args:v,resolve:()=>{}}),this.fallbacks[a](...v)):(...v)=>new Promise(p=>{this.targetQueue.push({method:a,args:v,resolve:p})})})}async setRealTarget(o){this.target=o;for(const s of this.onQueue)this.target.on[s.method](...s.args);for(const s of this.targetQueue)s.resolve(await this.target[s.method](...s.args))}}function Ree(e,o){const s=e,B=ME(),U=Lee(),m=Bee&&s.enableEarlyProxy;if(U&&(B.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__||!m))U.emit(zee,e,o);else{const y=m?new Fee(s,U):null;(B.__VUE_DEVTOOLS_PLUGINS__=B.__VUE_DEVTOOLS_PLUGINS__||[]).push({pluginDescriptor:s,setupFn:o,proxy:y}),y&&o(y.proxiedTarget)}}/*!
18
18
  * vuex v4.0.2
19
19
  * (c) 2021 Evan You
20
20
  * @license MIT
@@ -4129,7 +4129,7 @@ uniform ${Fe} ${Ge} u_${rt};
4129
4129
  #endif
4130
4130
  `}),staticAttributes:D,staticUniforms:oe}}class Dr{constructor(){this.boundProgram=null,this.boundLayoutVertexBuffer=null,this.boundPaintVertexBuffers=[],this.boundIndexBuffer=null,this.boundVertexOffset=null,this.boundDynamicVertexBuffer=null,this.vao=null}bind(u,f,D,V,J,oe,fe,xe,Ee){this.context=u;let Fe=this.boundPaintVertexBuffers.length!==V.length;for(let Ge=0;!Fe&&Ge<V.length;Ge++)this.boundPaintVertexBuffers[Ge]!==V[Ge]&&(Fe=!0);!this.vao||this.boundProgram!==f||this.boundLayoutVertexBuffer!==D||Fe||this.boundIndexBuffer!==J||this.boundVertexOffset!==oe||this.boundDynamicVertexBuffer!==fe||this.boundDynamicVertexBuffer2!==xe||this.boundDynamicVertexBuffer3!==Ee?this.freshBind(f,D,V,J,oe,fe,xe,Ee):(u.bindVertexArray.set(this.vao),fe&&fe.bind(),J&&J.dynamicDraw&&J.bind(),xe&&xe.bind(),Ee&&Ee.bind())}freshBind(u,f,D,V,J,oe,fe,xe){const Ee=u.numAttributes,Fe=this.context,Ge=Fe.gl;this.vao&&this.destroy(),this.vao=Fe.createVertexArray(),Fe.bindVertexArray.set(this.vao),this.boundProgram=u,this.boundLayoutVertexBuffer=f,this.boundPaintVertexBuffers=D,this.boundIndexBuffer=V,this.boundVertexOffset=J,this.boundDynamicVertexBuffer=oe,this.boundDynamicVertexBuffer2=fe,this.boundDynamicVertexBuffer3=xe,f.enableAttributes(Ge,u);for(const rt of D)rt.enableAttributes(Ge,u);oe&&oe.enableAttributes(Ge,u),fe&&fe.enableAttributes(Ge,u),xe&&xe.enableAttributes(Ge,u),f.bind(),f.setVertexAttribPointers(Ge,u,J);for(const rt of D)rt.bind(),rt.setVertexAttribPointers(Ge,u,J);oe&&(oe.bind(),oe.setVertexAttribPointers(Ge,u,J)),V&&V.bind(),fe&&(fe.bind(),fe.setVertexAttribPointers(Ge,u,J)),xe&&(xe.bind(),xe.setVertexAttribPointers(Ge,u,J)),Fe.currentNumAttributes=Ee}destroy(){this.vao&&(this.context.deleteVertexArray(this.vao),this.vao=null)}}const va=(R,u,f,D,V)=>({u_matrix:R,u_texture:0,u_ele_delta:u,u_fog_matrix:f,u_fog_color:D?D.properties.get("fog-color"):r.aN.white,u_fog_ground_blend:D?D.properties.get("fog-ground-blend"):1,u_fog_ground_blend_opacity:D?D.calculateFogBlendOpacity(V):0,u_horizon_color:D?D.properties.get("horizon-color"):r.aN.white,u_horizon_fog_blend:D?D.properties.get("horizon-fog-blend"):1});function wa(R){const u=[];for(let f=0;f<R.length;f++){if(R[f]===null)continue;const D=R[f].split(" ");u.push(D.pop())}return u}class tr{constructor(u,f,D,V,J,oe){const fe=u.gl;this.program=fe.createProgram();const xe=wa(f.staticAttributes),Ee=D?D.getBinderAttributes():[],Fe=xe.concat(Ee),Ge=br.prelude.staticUniforms?wa(br.prelude.staticUniforms):[],rt=f.staticUniforms?wa(f.staticUniforms):[],ct=D?D.getBinderUniforms():[],pt=Ge.concat(rt).concat(ct),xt=[];for(const Yt of pt)xt.indexOf(Yt)<0&&xt.push(Yt);const Mt=D?D.defines():[];J&&Mt.push("#define OVERDRAW_INSPECTOR;"),oe&&Mt.push("#define TERRAIN3D;");const Tt=Mt.concat(br.prelude.fragmentSource,f.fragmentSource).join(`
4131
4131
  `),jt=Mt.concat(br.prelude.vertexSource,f.vertexSource).join(`
4132
- `),Et=fe.createShader(fe.FRAGMENT_SHADER);if(fe.isContextLost())return void(this.failedToCreate=!0);if(fe.shaderSource(Et,Tt),fe.compileShader(Et),!fe.getShaderParameter(Et,fe.COMPILE_STATUS))throw new Error(`Could not compile fragment shader: ${fe.getShaderInfoLog(Et)}`);fe.attachShader(this.program,Et);const Jt=fe.createShader(fe.VERTEX_SHADER);if(fe.isContextLost())return void(this.failedToCreate=!0);if(fe.shaderSource(Jt,jt),fe.compileShader(Jt),!fe.getShaderParameter(Jt,fe.COMPILE_STATUS))throw new Error(`Could not compile vertex shader: ${fe.getShaderInfoLog(Jt)}`);fe.attachShader(this.program,Jt),this.attributes={};const Kt={};this.numAttributes=Fe.length;for(let Yt=0;Yt<this.numAttributes;Yt++)Fe[Yt]&&(fe.bindAttribLocation(this.program,Yt,Fe[Yt]),this.attributes[Fe[Yt]]=Yt);if(fe.linkProgram(this.program),!fe.getProgramParameter(this.program,fe.LINK_STATUS))throw new Error(`Program failed to link: ${fe.getProgramInfoLog(this.program)}`);fe.deleteShader(Jt),fe.deleteShader(Et);for(let Yt=0;Yt<xt.length;Yt++){const da=xt[Yt];if(da&&!Kt[da]){const _a=fe.getUniformLocation(this.program,da);_a&&(Kt[da]=_a)}}this.fixedUniforms=V(u,Kt),this.terrainUniforms=((Yt,da)=>({u_depth:new r.aI(Yt,da.u_depth),u_terrain:new r.aI(Yt,da.u_terrain),u_terrain_dim:new r.aJ(Yt,da.u_terrain_dim),u_terrain_matrix:new r.aK(Yt,da.u_terrain_matrix),u_terrain_unpack:new r.aL(Yt,da.u_terrain_unpack),u_terrain_exaggeration:new r.aJ(Yt,da.u_terrain_exaggeration)}))(u,Kt),this.binderUniforms=D?D.getUniforms(u,Kt):[]}draw(u,f,D,V,J,oe,fe,xe,Ee,Fe,Ge,rt,ct,pt,xt,Mt,Tt,jt){const Et=u.gl;if(this.failedToCreate)return;if(u.program.set(this.program),u.setDepthMode(D),u.setStencilMode(V),u.setColorMode(J),u.setCullFace(oe),xe){u.activeTexture.set(Et.TEXTURE2),Et.bindTexture(Et.TEXTURE_2D,xe.depthTexture),u.activeTexture.set(Et.TEXTURE3),Et.bindTexture(Et.TEXTURE_2D,xe.texture);for(const Kt in this.terrainUniforms)this.terrainUniforms[Kt].set(xe[Kt])}for(const Kt in this.fixedUniforms)this.fixedUniforms[Kt].set(fe[Kt]);xt&&xt.setUniforms(u,this.binderUniforms,ct,{zoom:pt});let Jt=0;switch(f){case Et.LINES:Jt=2;break;case Et.TRIANGLES:Jt=3;break;case Et.LINE_STRIP:Jt=1}for(const Kt of rt.get()){const Yt=Kt.vaos||(Kt.vaos={});(Yt[Ee]||(Yt[Ee]=new Dr)).bind(u,this,Fe,xt?xt.getPaintVertexBuffers():[],Ge,Kt.vertexOffset,Mt,Tt,jt),Et.drawElements(f,Kt.primitiveLength*Jt,Et.UNSIGNED_SHORT,Kt.primitiveOffset*Jt*2)}}}function Va(R,u,f){const D=1/St(f,1,u.transform.tileZoom),V=Math.pow(2,f.tileID.overscaledZ),J=f.tileSize*Math.pow(2,u.transform.tileZoom)/V,oe=J*(f.tileID.canonical.x+f.tileID.wrap*V),fe=J*f.tileID.canonical.y;return{u_image:0,u_texsize:f.imageAtlasTexture.size,u_scale:[D,R.fromScale,R.toScale],u_fade:R.t,u_pixel_coord_upper:[oe>>16,fe>>16],u_pixel_coord_lower:[65535&oe,65535&fe]}}const ar=(R,u,f,D)=>{const V=u.style.light,J=V.properties.get("position"),oe=[J.x,J.y,J.z],fe=function(){var Ee=new r.A(9);return r.A!=Float32Array&&(Ee[1]=0,Ee[2]=0,Ee[3]=0,Ee[5]=0,Ee[6]=0,Ee[7]=0),Ee[0]=1,Ee[4]=1,Ee[8]=1,Ee}();V.properties.get("anchor")==="viewport"&&function(Ee,Fe){var Ge=Math.sin(Fe),rt=Math.cos(Fe);Ee[0]=rt,Ee[1]=Ge,Ee[2]=0,Ee[3]=-Ge,Ee[4]=rt,Ee[5]=0,Ee[6]=0,Ee[7]=0,Ee[8]=1}(fe,-u.transform.angle),function(Ee,Fe,Ge){var rt=Fe[0],ct=Fe[1],pt=Fe[2];Ee[0]=rt*Ge[0]+ct*Ge[3]+pt*Ge[6],Ee[1]=rt*Ge[1]+ct*Ge[4]+pt*Ge[7],Ee[2]=rt*Ge[2]+ct*Ge[5]+pt*Ge[8]}(oe,oe,fe);const xe=V.properties.get("color");return{u_matrix:R,u_lightpos:oe,u_lightintensity:V.properties.get("intensity"),u_lightcolor:[xe.r,xe.g,xe.b],u_vertical_gradient:+f,u_opacity:D}},vr=(R,u,f,D,V,J,oe)=>r.e(ar(R,u,f,D),Va(J,u,oe),{u_height_factor:-Math.pow(2,V.overscaledZ)/oe.tileSize/8}),mr=R=>({u_matrix:R}),Br=(R,u,f,D)=>r.e(mr(R),Va(f,u,D)),Ur=(R,u)=>({u_matrix:R,u_world:u}),ma=(R,u,f,D,V)=>r.e(Br(R,u,f,D),{u_world:V}),Ua=(R,u,f,D)=>{const V=R.transform;let J,oe;if(D.paint.get("circle-pitch-alignment")==="map"){const fe=St(f,1,V.zoom);J=!0,oe=[fe,fe]}else J=!1,oe=V.pixelsToGLUnits;return{u_camera_to_center_distance:V.cameraToCenterDistance,u_scale_with_map:+(D.paint.get("circle-pitch-scale")==="map"),u_matrix:R.translatePosMatrix(u.posMatrix,f,D.paint.get("circle-translate"),D.paint.get("circle-translate-anchor")),u_pitch_with_map:+J,u_device_pixel_ratio:R.pixelRatio,u_extrude_scale:oe}},ta=(R,u)=>({u_matrix:u,u_pixel_extrude_scale:[1/R.width,1/R.height]}),ca=(R,u,f)=>({u_matrix:R,u_inv_matrix:u,u_camera_to_center_distance:f.cameraToCenterDistance,u_viewport_size:[f.width,f.height]}),fa=(R,u,f=1)=>({u_matrix:R,u_color:u,u_overlay:0,u_overlay_scale:f}),Oa=R=>({u_matrix:R}),za=(R,u,f,D)=>({u_matrix:R,u_extrude_scale:St(u,1,f),u_intensity:D}),qa=(R,u,f,D)=>{const V=r.H();r.aQ(V,0,R.width,R.height,0,0,1);const J=R.context.gl;return{u_matrix:V,u_world:[J.drawingBufferWidth,J.drawingBufferHeight],u_image:f,u_color_ramp:D,u_opacity:u.paint.get("heatmap-opacity")}},Ra=(R,u,f,D)=>{const V=f.paint.get("hillshade-shadow-color"),J=f.paint.get("hillshade-highlight-color"),oe=f.paint.get("hillshade-accent-color");let fe=f.paint.get("hillshade-illumination-direction")*(Math.PI/180);f.paint.get("hillshade-illumination-anchor")==="viewport"&&(fe-=R.transform.angle);const xe=!R.options.moving;return{u_matrix:D?D.posMatrix:R.transform.calculatePosMatrix(u.tileID.toUnwrapped(),xe),u_image:0,u_latrange:la(0,u.tileID),u_light:[f.paint.get("hillshade-exaggeration"),fe],u_shadow:V,u_highlight:J,u_accent:oe}},Ia=(R,u)=>{const f=u.stride,D=r.H();return r.aQ(D,0,r.X,-r.X,0,0,1),r.J(D,D,[0,-r.X,0]),{u_matrix:D,u_image:1,u_dimension:[f,f],u_zoom:R.overscaledZ,u_unpack:u.getUnpackVector()}};function la(R,u){const f=Math.pow(2,u.canonical.z),D=u.canonical.y;return[new r.Z(0,D/f).toLngLat().lat,new r.Z(0,(D+1)/f).toLngLat().lat]}const oa=(R,u,f,D)=>{const V=R.transform;return{u_matrix:cr(R,u,f,D),u_ratio:1/St(u,1,V.zoom),u_device_pixel_ratio:R.pixelRatio,u_units_to_pixels:[1/V.pixelsToGLUnits[0],1/V.pixelsToGLUnits[1]]}},Sa=(R,u,f,D,V)=>r.e(oa(R,u,f,V),{u_image:0,u_image_height:D}),Ja=(R,u,f,D,V)=>{const J=R.transform,oe=sr(u,J);return{u_matrix:cr(R,u,f,V),u_texsize:u.imageAtlasTexture.size,u_ratio:1/St(u,1,J.zoom),u_device_pixel_ratio:R.pixelRatio,u_image:0,u_scale:[oe,D.fromScale,D.toScale],u_fade:D.t,u_units_to_pixels:[1/J.pixelsToGLUnits[0],1/J.pixelsToGLUnits[1]]}},lr=(R,u,f,D,V,J)=>{const oe=R.transform,fe=R.lineAtlas,xe=sr(u,oe),Ee=f.layout.get("line-cap")==="round",Fe=fe.getDash(D.from,Ee),Ge=fe.getDash(D.to,Ee),rt=Fe.width*V.fromScale,ct=Ge.width*V.toScale;return r.e(oa(R,u,f,J),{u_patternscale_a:[xe/rt,-Fe.height/2],u_patternscale_b:[xe/ct,-Ge.height/2],u_sdfgamma:fe.width/(256*Math.min(rt,ct)*R.pixelRatio)/2,u_image:0,u_tex_y_a:Fe.y,u_tex_y_b:Ge.y,u_mix:V.t})};function sr(R,u){return 1/St(R,1,u.tileZoom)}function cr(R,u,f,D){return R.translatePosMatrix(D?D.posMatrix:u.tileID.posMatrix,u,f.paint.get("line-translate"),f.paint.get("line-translate-anchor"))}const Ar=(R,u,f,D,V)=>{return{u_matrix:R,u_tl_parent:u,u_scale_parent:f,u_buffer_scale:1,u_fade_t:D.mix,u_opacity:D.opacity*V.paint.get("raster-opacity"),u_image0:0,u_image1:1,u_brightness_low:V.paint.get("raster-brightness-min"),u_brightness_high:V.paint.get("raster-brightness-max"),u_saturation_factor:(oe=V.paint.get("raster-saturation"),oe>0?1-1/(1.001-oe):-oe),u_contrast_factor:(J=V.paint.get("raster-contrast"),J>0?1/(1-J):1+J),u_spin_weights:wr(V.paint.get("raster-hue-rotate"))};var J,oe};function wr(R){R*=Math.PI/180;const u=Math.sin(R),f=Math.cos(R);return[(2*f+1)/3,(-Math.sqrt(3)*u-f+1)/3,(Math.sqrt(3)*u-f+1)/3]}const Pr=(R,u,f,D,V,J,oe,fe,xe,Ee,Fe,Ge,rt,ct)=>{const pt=oe.transform;return{u_is_size_zoom_constant:+(R==="constant"||R==="source"),u_is_size_feature_constant:+(R==="constant"||R==="camera"),u_size_t:u?u.uSizeT:0,u_size:u?u.uSize:0,u_camera_to_center_distance:pt.cameraToCenterDistance,u_pitch:pt.pitch/360*2*Math.PI,u_rotate_symbol:+f,u_aspect_ratio:pt.width/pt.height,u_fade_change:oe.options.fadeDuration?oe.symbolFadeChange:1,u_matrix:fe,u_label_plane_matrix:xe,u_coord_matrix:Ee,u_is_text:+Ge,u_pitch_with_map:+D,u_is_along_line:V,u_is_variable_anchor:J,u_texsize:rt,u_texture:0,u_translation:Fe,u_pitched_scale:ct}},_r=(R,u,f,D,V,J,oe,fe,xe,Ee,Fe,Ge,rt,ct,pt)=>{const xt=oe.transform;return r.e(Pr(R,u,f,D,V,J,oe,fe,xe,Ee,Fe,Ge,rt,pt),{u_gamma_scale:D?Math.cos(xt._pitch)*xt.cameraToCenterDistance:1,u_device_pixel_ratio:oe.pixelRatio,u_is_halo:+ct})},Cr=(R,u,f,D,V,J,oe,fe,xe,Ee,Fe,Ge,rt,ct)=>r.e(_r(R,u,f,D,V,J,oe,fe,xe,Ee,Fe,!0,Ge,!0,ct),{u_texsize_icon:rt,u_texture_icon:1}),Or=(R,u,f)=>({u_matrix:R,u_opacity:u,u_color:f}),Kr=(R,u,f,D,V,J)=>r.e(function(oe,fe,xe,Ee){const Fe=xe.imageManager.getPattern(oe.from.toString()),Ge=xe.imageManager.getPattern(oe.to.toString()),{width:rt,height:ct}=xe.imageManager.getPixelSize(),pt=Math.pow(2,Ee.tileID.overscaledZ),xt=Ee.tileSize*Math.pow(2,xe.transform.tileZoom)/pt,Mt=xt*(Ee.tileID.canonical.x+Ee.tileID.wrap*pt),Tt=xt*Ee.tileID.canonical.y;return{u_image:0,u_pattern_tl_a:Fe.tl,u_pattern_br_a:Fe.br,u_pattern_tl_b:Ge.tl,u_pattern_br_b:Ge.br,u_texsize:[rt,ct],u_mix:fe.t,u_pattern_size_a:Fe.displaySize,u_pattern_size_b:Ge.displaySize,u_scale_a:fe.fromScale,u_scale_b:fe.toScale,u_tile_units_to_pixels:1/St(Ee,1,xe.transform.tileZoom),u_pixel_coord_upper:[Mt>>16,Tt>>16],u_pixel_coord_lower:[65535&Mt,65535&Tt]}}(D,J,f,V),{u_matrix:R,u_opacity:u}),jr={fillExtrusion:(R,u)=>({u_matrix:new r.aK(R,u.u_matrix),u_lightpos:new r.aO(R,u.u_lightpos),u_lightintensity:new r.aJ(R,u.u_lightintensity),u_lightcolor:new r.aO(R,u.u_lightcolor),u_vertical_gradient:new r.aJ(R,u.u_vertical_gradient),u_opacity:new r.aJ(R,u.u_opacity)}),fillExtrusionPattern:(R,u)=>({u_matrix:new r.aK(R,u.u_matrix),u_lightpos:new r.aO(R,u.u_lightpos),u_lightintensity:new r.aJ(R,u.u_lightintensity),u_lightcolor:new r.aO(R,u.u_lightcolor),u_vertical_gradient:new r.aJ(R,u.u_vertical_gradient),u_height_factor:new r.aJ(R,u.u_height_factor),u_image:new r.aI(R,u.u_image),u_texsize:new r.aP(R,u.u_texsize),u_pixel_coord_upper:new r.aP(R,u.u_pixel_coord_upper),u_pixel_coord_lower:new r.aP(R,u.u_pixel_coord_lower),u_scale:new r.aO(R,u.u_scale),u_fade:new r.aJ(R,u.u_fade),u_opacity:new r.aJ(R,u.u_opacity)}),fill:(R,u)=>({u_matrix:new r.aK(R,u.u_matrix)}),fillPattern:(R,u)=>({u_matrix:new r.aK(R,u.u_matrix),u_image:new r.aI(R,u.u_image),u_texsize:new r.aP(R,u.u_texsize),u_pixel_coord_upper:new r.aP(R,u.u_pixel_coord_upper),u_pixel_coord_lower:new r.aP(R,u.u_pixel_coord_lower),u_scale:new r.aO(R,u.u_scale),u_fade:new r.aJ(R,u.u_fade)}),fillOutline:(R,u)=>({u_matrix:new r.aK(R,u.u_matrix),u_world:new r.aP(R,u.u_world)}),fillOutlinePattern:(R,u)=>({u_matrix:new r.aK(R,u.u_matrix),u_world:new r.aP(R,u.u_world),u_image:new r.aI(R,u.u_image),u_texsize:new r.aP(R,u.u_texsize),u_pixel_coord_upper:new r.aP(R,u.u_pixel_coord_upper),u_pixel_coord_lower:new r.aP(R,u.u_pixel_coord_lower),u_scale:new r.aO(R,u.u_scale),u_fade:new r.aJ(R,u.u_fade)}),circle:(R,u)=>({u_camera_to_center_distance:new r.aJ(R,u.u_camera_to_center_distance),u_scale_with_map:new r.aI(R,u.u_scale_with_map),u_pitch_with_map:new r.aI(R,u.u_pitch_with_map),u_extrude_scale:new r.aP(R,u.u_extrude_scale),u_device_pixel_ratio:new r.aJ(R,u.u_device_pixel_ratio),u_matrix:new r.aK(R,u.u_matrix)}),collisionBox:(R,u)=>({u_matrix:new r.aK(R,u.u_matrix),u_pixel_extrude_scale:new r.aP(R,u.u_pixel_extrude_scale)}),collisionCircle:(R,u)=>({u_matrix:new r.aK(R,u.u_matrix),u_inv_matrix:new r.aK(R,u.u_inv_matrix),u_camera_to_center_distance:new r.aJ(R,u.u_camera_to_center_distance),u_viewport_size:new r.aP(R,u.u_viewport_size)}),debug:(R,u)=>({u_color:new r.aM(R,u.u_color),u_matrix:new r.aK(R,u.u_matrix),u_overlay:new r.aI(R,u.u_overlay),u_overlay_scale:new r.aJ(R,u.u_overlay_scale)}),clippingMask:(R,u)=>({u_matrix:new r.aK(R,u.u_matrix)}),heatmap:(R,u)=>({u_extrude_scale:new r.aJ(R,u.u_extrude_scale),u_intensity:new r.aJ(R,u.u_intensity),u_matrix:new r.aK(R,u.u_matrix)}),heatmapTexture:(R,u)=>({u_matrix:new r.aK(R,u.u_matrix),u_world:new r.aP(R,u.u_world),u_image:new r.aI(R,u.u_image),u_color_ramp:new r.aI(R,u.u_color_ramp),u_opacity:new r.aJ(R,u.u_opacity)}),hillshade:(R,u)=>({u_matrix:new r.aK(R,u.u_matrix),u_image:new r.aI(R,u.u_image),u_latrange:new r.aP(R,u.u_latrange),u_light:new r.aP(R,u.u_light),u_shadow:new r.aM(R,u.u_shadow),u_highlight:new r.aM(R,u.u_highlight),u_accent:new r.aM(R,u.u_accent)}),hillshadePrepare:(R,u)=>({u_matrix:new r.aK(R,u.u_matrix),u_image:new r.aI(R,u.u_image),u_dimension:new r.aP(R,u.u_dimension),u_zoom:new r.aJ(R,u.u_zoom),u_unpack:new r.aL(R,u.u_unpack)}),line:(R,u)=>({u_matrix:new r.aK(R,u.u_matrix),u_ratio:new r.aJ(R,u.u_ratio),u_device_pixel_ratio:new r.aJ(R,u.u_device_pixel_ratio),u_units_to_pixels:new r.aP(R,u.u_units_to_pixels)}),lineGradient:(R,u)=>({u_matrix:new r.aK(R,u.u_matrix),u_ratio:new r.aJ(R,u.u_ratio),u_device_pixel_ratio:new r.aJ(R,u.u_device_pixel_ratio),u_units_to_pixels:new r.aP(R,u.u_units_to_pixels),u_image:new r.aI(R,u.u_image),u_image_height:new r.aJ(R,u.u_image_height)}),linePattern:(R,u)=>({u_matrix:new r.aK(R,u.u_matrix),u_texsize:new r.aP(R,u.u_texsize),u_ratio:new r.aJ(R,u.u_ratio),u_device_pixel_ratio:new r.aJ(R,u.u_device_pixel_ratio),u_image:new r.aI(R,u.u_image),u_units_to_pixels:new r.aP(R,u.u_units_to_pixels),u_scale:new r.aO(R,u.u_scale),u_fade:new r.aJ(R,u.u_fade)}),lineSDF:(R,u)=>({u_matrix:new r.aK(R,u.u_matrix),u_ratio:new r.aJ(R,u.u_ratio),u_device_pixel_ratio:new r.aJ(R,u.u_device_pixel_ratio),u_units_to_pixels:new r.aP(R,u.u_units_to_pixels),u_patternscale_a:new r.aP(R,u.u_patternscale_a),u_patternscale_b:new r.aP(R,u.u_patternscale_b),u_sdfgamma:new r.aJ(R,u.u_sdfgamma),u_image:new r.aI(R,u.u_image),u_tex_y_a:new r.aJ(R,u.u_tex_y_a),u_tex_y_b:new r.aJ(R,u.u_tex_y_b),u_mix:new r.aJ(R,u.u_mix)}),raster:(R,u)=>({u_matrix:new r.aK(R,u.u_matrix),u_tl_parent:new r.aP(R,u.u_tl_parent),u_scale_parent:new r.aJ(R,u.u_scale_parent),u_buffer_scale:new r.aJ(R,u.u_buffer_scale),u_fade_t:new r.aJ(R,u.u_fade_t),u_opacity:new r.aJ(R,u.u_opacity),u_image0:new r.aI(R,u.u_image0),u_image1:new r.aI(R,u.u_image1),u_brightness_low:new r.aJ(R,u.u_brightness_low),u_brightness_high:new r.aJ(R,u.u_brightness_high),u_saturation_factor:new r.aJ(R,u.u_saturation_factor),u_contrast_factor:new r.aJ(R,u.u_contrast_factor),u_spin_weights:new r.aO(R,u.u_spin_weights)}),symbolIcon:(R,u)=>({u_is_size_zoom_constant:new r.aI(R,u.u_is_size_zoom_constant),u_is_size_feature_constant:new r.aI(R,u.u_is_size_feature_constant),u_size_t:new r.aJ(R,u.u_size_t),u_size:new r.aJ(R,u.u_size),u_camera_to_center_distance:new r.aJ(R,u.u_camera_to_center_distance),u_pitch:new r.aJ(R,u.u_pitch),u_rotate_symbol:new r.aI(R,u.u_rotate_symbol),u_aspect_ratio:new r.aJ(R,u.u_aspect_ratio),u_fade_change:new r.aJ(R,u.u_fade_change),u_matrix:new r.aK(R,u.u_matrix),u_label_plane_matrix:new r.aK(R,u.u_label_plane_matrix),u_coord_matrix:new r.aK(R,u.u_coord_matrix),u_is_text:new r.aI(R,u.u_is_text),u_pitch_with_map:new r.aI(R,u.u_pitch_with_map),u_is_along_line:new r.aI(R,u.u_is_along_line),u_is_variable_anchor:new r.aI(R,u.u_is_variable_anchor),u_texsize:new r.aP(R,u.u_texsize),u_texture:new r.aI(R,u.u_texture),u_translation:new r.aP(R,u.u_translation),u_pitched_scale:new r.aJ(R,u.u_pitched_scale)}),symbolSDF:(R,u)=>({u_is_size_zoom_constant:new r.aI(R,u.u_is_size_zoom_constant),u_is_size_feature_constant:new r.aI(R,u.u_is_size_feature_constant),u_size_t:new r.aJ(R,u.u_size_t),u_size:new r.aJ(R,u.u_size),u_camera_to_center_distance:new r.aJ(R,u.u_camera_to_center_distance),u_pitch:new r.aJ(R,u.u_pitch),u_rotate_symbol:new r.aI(R,u.u_rotate_symbol),u_aspect_ratio:new r.aJ(R,u.u_aspect_ratio),u_fade_change:new r.aJ(R,u.u_fade_change),u_matrix:new r.aK(R,u.u_matrix),u_label_plane_matrix:new r.aK(R,u.u_label_plane_matrix),u_coord_matrix:new r.aK(R,u.u_coord_matrix),u_is_text:new r.aI(R,u.u_is_text),u_pitch_with_map:new r.aI(R,u.u_pitch_with_map),u_is_along_line:new r.aI(R,u.u_is_along_line),u_is_variable_anchor:new r.aI(R,u.u_is_variable_anchor),u_texsize:new r.aP(R,u.u_texsize),u_texture:new r.aI(R,u.u_texture),u_gamma_scale:new r.aJ(R,u.u_gamma_scale),u_device_pixel_ratio:new r.aJ(R,u.u_device_pixel_ratio),u_is_halo:new r.aI(R,u.u_is_halo),u_translation:new r.aP(R,u.u_translation),u_pitched_scale:new r.aJ(R,u.u_pitched_scale)}),symbolTextAndIcon:(R,u)=>({u_is_size_zoom_constant:new r.aI(R,u.u_is_size_zoom_constant),u_is_size_feature_constant:new r.aI(R,u.u_is_size_feature_constant),u_size_t:new r.aJ(R,u.u_size_t),u_size:new r.aJ(R,u.u_size),u_camera_to_center_distance:new r.aJ(R,u.u_camera_to_center_distance),u_pitch:new r.aJ(R,u.u_pitch),u_rotate_symbol:new r.aI(R,u.u_rotate_symbol),u_aspect_ratio:new r.aJ(R,u.u_aspect_ratio),u_fade_change:new r.aJ(R,u.u_fade_change),u_matrix:new r.aK(R,u.u_matrix),u_label_plane_matrix:new r.aK(R,u.u_label_plane_matrix),u_coord_matrix:new r.aK(R,u.u_coord_matrix),u_is_text:new r.aI(R,u.u_is_text),u_pitch_with_map:new r.aI(R,u.u_pitch_with_map),u_is_along_line:new r.aI(R,u.u_is_along_line),u_is_variable_anchor:new r.aI(R,u.u_is_variable_anchor),u_texsize:new r.aP(R,u.u_texsize),u_texsize_icon:new r.aP(R,u.u_texsize_icon),u_texture:new r.aI(R,u.u_texture),u_texture_icon:new r.aI(R,u.u_texture_icon),u_gamma_scale:new r.aJ(R,u.u_gamma_scale),u_device_pixel_ratio:new r.aJ(R,u.u_device_pixel_ratio),u_is_halo:new r.aI(R,u.u_is_halo),u_translation:new r.aP(R,u.u_translation),u_pitched_scale:new r.aJ(R,u.u_pitched_scale)}),background:(R,u)=>({u_matrix:new r.aK(R,u.u_matrix),u_opacity:new r.aJ(R,u.u_opacity),u_color:new r.aM(R,u.u_color)}),backgroundPattern:(R,u)=>({u_matrix:new r.aK(R,u.u_matrix),u_opacity:new r.aJ(R,u.u_opacity),u_image:new r.aI(R,u.u_image),u_pattern_tl_a:new r.aP(R,u.u_pattern_tl_a),u_pattern_br_a:new r.aP(R,u.u_pattern_br_a),u_pattern_tl_b:new r.aP(R,u.u_pattern_tl_b),u_pattern_br_b:new r.aP(R,u.u_pattern_br_b),u_texsize:new r.aP(R,u.u_texsize),u_mix:new r.aJ(R,u.u_mix),u_pattern_size_a:new r.aP(R,u.u_pattern_size_a),u_pattern_size_b:new r.aP(R,u.u_pattern_size_b),u_scale_a:new r.aJ(R,u.u_scale_a),u_scale_b:new r.aJ(R,u.u_scale_b),u_pixel_coord_upper:new r.aP(R,u.u_pixel_coord_upper),u_pixel_coord_lower:new r.aP(R,u.u_pixel_coord_lower),u_tile_units_to_pixels:new r.aJ(R,u.u_tile_units_to_pixels)}),terrain:(R,u)=>({u_matrix:new r.aK(R,u.u_matrix),u_texture:new r.aI(R,u.u_texture),u_ele_delta:new r.aJ(R,u.u_ele_delta),u_fog_matrix:new r.aK(R,u.u_fog_matrix),u_fog_color:new r.aM(R,u.u_fog_color),u_fog_ground_blend:new r.aJ(R,u.u_fog_ground_blend),u_fog_ground_blend_opacity:new r.aJ(R,u.u_fog_ground_blend_opacity),u_horizon_color:new r.aM(R,u.u_horizon_color),u_horizon_fog_blend:new r.aJ(R,u.u_horizon_fog_blend)}),terrainDepth:(R,u)=>({u_matrix:new r.aK(R,u.u_matrix),u_ele_delta:new r.aJ(R,u.u_ele_delta)}),terrainCoords:(R,u)=>({u_matrix:new r.aK(R,u.u_matrix),u_texture:new r.aI(R,u.u_texture),u_terrain_coords_id:new r.aJ(R,u.u_terrain_coords_id),u_ele_delta:new r.aJ(R,u.u_ele_delta)}),sky:(R,u)=>({u_sky_color:new r.aM(R,u.u_sky_color),u_horizon_color:new r.aM(R,u.u_horizon_color),u_horizon:new r.aJ(R,u.u_horizon),u_sky_horizon_blend:new r.aJ(R,u.u_sky_horizon_blend)})};class zr{constructor(u,f,D){this.context=u;const V=u.gl;this.buffer=V.createBuffer(),this.dynamicDraw=!!D,this.context.unbindVAO(),u.bindElementBuffer.set(this.buffer),V.bufferData(V.ELEMENT_ARRAY_BUFFER,f.arrayBuffer,this.dynamicDraw?V.DYNAMIC_DRAW:V.STATIC_DRAW),this.dynamicDraw||delete f.arrayBuffer}bind(){this.context.bindElementBuffer.set(this.buffer)}updateData(u){const f=this.context.gl;if(!this.dynamicDraw)throw new Error("Attempted to update data while not in dynamic mode.");this.context.unbindVAO(),this.bind(),f.bufferSubData(f.ELEMENT_ARRAY_BUFFER,0,u.arrayBuffer)}destroy(){const u=this.context.gl;this.buffer&&(u.deleteBuffer(this.buffer),delete this.buffer)}}const Hr={Int8:"BYTE",Uint8:"UNSIGNED_BYTE",Int16:"SHORT",Uint16:"UNSIGNED_SHORT",Int32:"INT",Uint32:"UNSIGNED_INT",Float32:"FLOAT"};class bn{constructor(u,f,D,V){this.length=f.length,this.attributes=D,this.itemSize=f.bytesPerElement,this.dynamicDraw=V,this.context=u;const J=u.gl;this.buffer=J.createBuffer(),u.bindVertexBuffer.set(this.buffer),J.bufferData(J.ARRAY_BUFFER,f.arrayBuffer,this.dynamicDraw?J.DYNAMIC_DRAW:J.STATIC_DRAW),this.dynamicDraw||delete f.arrayBuffer}bind(){this.context.bindVertexBuffer.set(this.buffer)}updateData(u){if(u.length!==this.length)throw new Error(`Length of new data is ${u.length}, which doesn't match current length of ${this.length}`);const f=this.context.gl;this.bind(),f.bufferSubData(f.ARRAY_BUFFER,0,u.arrayBuffer)}enableAttributes(u,f){for(let D=0;D<this.attributes.length;D++){const V=this.attributes[D],J=f.attributes[V.name];J!==void 0&&u.enableVertexAttribArray(J)}}setVertexAttribPointers(u,f,D){for(let V=0;V<this.attributes.length;V++){const J=this.attributes[V],oe=f.attributes[J.name];oe!==void 0&&u.vertexAttribPointer(oe,J.components,u[Hr[J.type]],!1,this.itemSize,J.offset+this.itemSize*(D||0))}}destroy(){const u=this.context.gl;this.buffer&&(u.deleteBuffer(this.buffer),delete this.buffer)}}const Bn=new WeakMap;function mi(R){var u;if(Bn.has(R))return Bn.get(R);{const f=(u=R.getParameter(R.VERSION))===null||u===void 0?void 0:u.startsWith("WebGL 2.0");return Bn.set(R,f),f}}class En{constructor(u){this.gl=u.gl,this.default=this.getDefault(),this.current=this.default,this.dirty=!1}get(){return this.current}set(u){}getDefault(){return this.default}setDefault(){this.set(this.default)}}class fo extends En{getDefault(){return r.aN.transparent}set(u){const f=this.current;(u.r!==f.r||u.g!==f.g||u.b!==f.b||u.a!==f.a||this.dirty)&&(this.gl.clearColor(u.r,u.g,u.b,u.a),this.current=u,this.dirty=!1)}}class ki extends En{getDefault(){return 1}set(u){(u!==this.current||this.dirty)&&(this.gl.clearDepth(u),this.current=u,this.dirty=!1)}}class Hi extends En{getDefault(){return 0}set(u){(u!==this.current||this.dirty)&&(this.gl.clearStencil(u),this.current=u,this.dirty=!1)}}class qo extends En{getDefault(){return[!0,!0,!0,!0]}set(u){const f=this.current;(u[0]!==f[0]||u[1]!==f[1]||u[2]!==f[2]||u[3]!==f[3]||this.dirty)&&(this.gl.colorMask(u[0],u[1],u[2],u[3]),this.current=u,this.dirty=!1)}}class ri extends En{getDefault(){return!0}set(u){(u!==this.current||this.dirty)&&(this.gl.depthMask(u),this.current=u,this.dirty=!1)}}class si extends En{getDefault(){return 255}set(u){(u!==this.current||this.dirty)&&(this.gl.stencilMask(u),this.current=u,this.dirty=!1)}}class os extends En{getDefault(){return{func:this.gl.ALWAYS,ref:0,mask:255}}set(u){const f=this.current;(u.func!==f.func||u.ref!==f.ref||u.mask!==f.mask||this.dirty)&&(this.gl.stencilFunc(u.func,u.ref,u.mask),this.current=u,this.dirty=!1)}}class xo extends En{getDefault(){const u=this.gl;return[u.KEEP,u.KEEP,u.KEEP]}set(u){const f=this.current;(u[0]!==f[0]||u[1]!==f[1]||u[2]!==f[2]||this.dirty)&&(this.gl.stencilOp(u[0],u[1],u[2]),this.current=u,this.dirty=!1)}}class Yo extends En{getDefault(){return!1}set(u){if(u===this.current&&!this.dirty)return;const f=this.gl;u?f.enable(f.STENCIL_TEST):f.disable(f.STENCIL_TEST),this.current=u,this.dirty=!1}}class ms extends En{getDefault(){return[0,1]}set(u){const f=this.current;(u[0]!==f[0]||u[1]!==f[1]||this.dirty)&&(this.gl.depthRange(u[0],u[1]),this.current=u,this.dirty=!1)}}class Fo extends En{getDefault(){return!1}set(u){if(u===this.current&&!this.dirty)return;const f=this.gl;u?f.enable(f.DEPTH_TEST):f.disable(f.DEPTH_TEST),this.current=u,this.dirty=!1}}class Tl extends En{getDefault(){return this.gl.LESS}set(u){(u!==this.current||this.dirty)&&(this.gl.depthFunc(u),this.current=u,this.dirty=!1)}}class Al extends En{getDefault(){return!1}set(u){if(u===this.current&&!this.dirty)return;const f=this.gl;u?f.enable(f.BLEND):f.disable(f.BLEND),this.current=u,this.dirty=!1}}class El extends En{getDefault(){const u=this.gl;return[u.ONE,u.ZERO]}set(u){const f=this.current;(u[0]!==f[0]||u[1]!==f[1]||this.dirty)&&(this.gl.blendFunc(u[0],u[1]),this.current=u,this.dirty=!1)}}class Jo extends En{getDefault(){return r.aN.transparent}set(u){const f=this.current;(u.r!==f.r||u.g!==f.g||u.b!==f.b||u.a!==f.a||this.dirty)&&(this.gl.blendColor(u.r,u.g,u.b,u.a),this.current=u,this.dirty=!1)}}class al extends En{getDefault(){return this.gl.FUNC_ADD}set(u){(u!==this.current||this.dirty)&&(this.gl.blendEquation(u),this.current=u,this.dirty=!1)}}class Ss extends En{getDefault(){return!1}set(u){if(u===this.current&&!this.dirty)return;const f=this.gl;u?f.enable(f.CULL_FACE):f.disable(f.CULL_FACE),this.current=u,this.dirty=!1}}class Si extends En{getDefault(){return this.gl.BACK}set(u){(u!==this.current||this.dirty)&&(this.gl.cullFace(u),this.current=u,this.dirty=!1)}}class $i extends En{getDefault(){return this.gl.CCW}set(u){(u!==this.current||this.dirty)&&(this.gl.frontFace(u),this.current=u,this.dirty=!1)}}class Ml extends En{getDefault(){return null}set(u){(u!==this.current||this.dirty)&&(this.gl.useProgram(u),this.current=u,this.dirty=!1)}}class rl extends En{getDefault(){return this.gl.TEXTURE0}set(u){(u!==this.current||this.dirty)&&(this.gl.activeTexture(u),this.current=u,this.dirty=!1)}}class Us extends En{getDefault(){const u=this.gl;return[0,0,u.drawingBufferWidth,u.drawingBufferHeight]}set(u){const f=this.current;(u[0]!==f[0]||u[1]!==f[1]||u[2]!==f[2]||u[3]!==f[3]||this.dirty)&&(this.gl.viewport(u[0],u[1],u[2],u[3]),this.current=u,this.dirty=!1)}}class Il extends En{getDefault(){return null}set(u){if(u===this.current&&!this.dirty)return;const f=this.gl;f.bindFramebuffer(f.FRAMEBUFFER,u),this.current=u,this.dirty=!1}}class Gs extends En{getDefault(){return null}set(u){if(u===this.current&&!this.dirty)return;const f=this.gl;f.bindRenderbuffer(f.RENDERBUFFER,u),this.current=u,this.dirty=!1}}class Pl extends En{getDefault(){return null}set(u){if(u===this.current&&!this.dirty)return;const f=this.gl;f.bindTexture(f.TEXTURE_2D,u),this.current=u,this.dirty=!1}}class Ll extends En{getDefault(){return null}set(u){if(u===this.current&&!this.dirty)return;const f=this.gl;f.bindBuffer(f.ARRAY_BUFFER,u),this.current=u,this.dirty=!1}}class nl extends En{getDefault(){return null}set(u){const f=this.gl;f.bindBuffer(f.ELEMENT_ARRAY_BUFFER,u),this.current=u,this.dirty=!1}}class Po extends En{getDefault(){return null}set(u){var f;if(u===this.current&&!this.dirty)return;const D=this.gl;mi(D)?D.bindVertexArray(u):(f=D.getExtension("OES_vertex_array_object"))===null||f===void 0||f.bindVertexArrayOES(u),this.current=u,this.dirty=!1}}class Hc extends En{getDefault(){return 4}set(u){if(u===this.current&&!this.dirty)return;const f=this.gl;f.pixelStorei(f.UNPACK_ALIGNMENT,u),this.current=u,this.dirty=!1}}class Lc extends En{getDefault(){return!1}set(u){if(u===this.current&&!this.dirty)return;const f=this.gl;f.pixelStorei(f.UNPACK_PREMULTIPLY_ALPHA_WEBGL,u),this.current=u,this.dirty=!1}}class ql extends En{getDefault(){return!1}set(u){if(u===this.current&&!this.dirty)return;const f=this.gl;f.pixelStorei(f.UNPACK_FLIP_Y_WEBGL,u),this.current=u,this.dirty=!1}}class Zc extends En{constructor(u,f){super(u),this.context=u,this.parent=f}getDefault(){return null}}class eu extends Zc{setDirty(){this.dirty=!0}set(u){if(u===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);const f=this.gl;f.framebufferTexture2D(f.FRAMEBUFFER,f.COLOR_ATTACHMENT0,f.TEXTURE_2D,u,0),this.current=u,this.dirty=!1}}class Cs extends Zc{set(u){if(u===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);const f=this.gl;f.framebufferRenderbuffer(f.FRAMEBUFFER,f.DEPTH_ATTACHMENT,f.RENDERBUFFER,u),this.current=u,this.dirty=!1}}class tu extends Zc{set(u){if(u===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);const f=this.gl;f.framebufferRenderbuffer(f.FRAMEBUFFER,f.DEPTH_STENCIL_ATTACHMENT,f.RENDERBUFFER,u),this.current=u,this.dirty=!1}}class Bu{constructor(u,f,D,V,J){this.context=u,this.width=f,this.height=D;const oe=u.gl,fe=this.framebuffer=oe.createFramebuffer();if(this.colorAttachment=new eu(u,fe),V)this.depthAttachment=J?new tu(u,fe):new Cs(u,fe);else if(J)throw new Error("Stencil cannot be set without depth");if(oe.checkFramebufferStatus(oe.FRAMEBUFFER)!==oe.FRAMEBUFFER_COMPLETE)throw new Error("Framebuffer is not complete")}destroy(){const u=this.context.gl,f=this.colorAttachment.get();if(f&&u.deleteTexture(f),this.depthAttachment){const D=this.depthAttachment.get();D&&u.deleteRenderbuffer(D)}u.deleteFramebuffer(this.framebuffer)}}class Qi{constructor(u,f,D){this.blendFunction=u,this.blendColor=f,this.mask=D}}Qi.Replace=[1,0],Qi.disabled=new Qi(Qi.Replace,r.aN.transparent,[!1,!1,!1,!1]),Qi.unblended=new Qi(Qi.Replace,r.aN.transparent,[!0,!0,!0,!0]),Qi.alphaBlended=new Qi([1,771],r.aN.transparent,[!0,!0,!0,!0]);class _c{constructor(u){var f,D;if(this.gl=u,this.clearColor=new fo(this),this.clearDepth=new ki(this),this.clearStencil=new Hi(this),this.colorMask=new qo(this),this.depthMask=new ri(this),this.stencilMask=new si(this),this.stencilFunc=new os(this),this.stencilOp=new xo(this),this.stencilTest=new Yo(this),this.depthRange=new ms(this),this.depthTest=new Fo(this),this.depthFunc=new Tl(this),this.blend=new Al(this),this.blendFunc=new El(this),this.blendColor=new Jo(this),this.blendEquation=new al(this),this.cullFace=new Ss(this),this.cullFaceSide=new Si(this),this.frontFace=new $i(this),this.program=new Ml(this),this.activeTexture=new rl(this),this.viewport=new Us(this),this.bindFramebuffer=new Il(this),this.bindRenderbuffer=new Gs(this),this.bindTexture=new Pl(this),this.bindVertexBuffer=new Ll(this),this.bindElementBuffer=new nl(this),this.bindVertexArray=new Po(this),this.pixelStoreUnpack=new Hc(this),this.pixelStoreUnpackPremultiplyAlpha=new Lc(this),this.pixelStoreUnpackFlipY=new ql(this),this.extTextureFilterAnisotropic=u.getExtension("EXT_texture_filter_anisotropic")||u.getExtension("MOZ_EXT_texture_filter_anisotropic")||u.getExtension("WEBKIT_EXT_texture_filter_anisotropic"),this.extTextureFilterAnisotropic&&(this.extTextureFilterAnisotropicMax=u.getParameter(this.extTextureFilterAnisotropic.MAX_TEXTURE_MAX_ANISOTROPY_EXT)),this.maxTextureSize=u.getParameter(u.MAX_TEXTURE_SIZE),mi(u)){this.HALF_FLOAT=u.HALF_FLOAT;const V=u.getExtension("EXT_color_buffer_half_float");this.RGBA16F=(f=u.RGBA16F)!==null&&f!==void 0?f:V==null?void 0:V.RGBA16F_EXT,this.RGB16F=(D=u.RGB16F)!==null&&D!==void 0?D:V==null?void 0:V.RGB16F_EXT,u.getExtension("EXT_color_buffer_float")}else{u.getExtension("EXT_color_buffer_half_float"),u.getExtension("OES_texture_half_float_linear");const V=u.getExtension("OES_texture_half_float");this.HALF_FLOAT=V==null?void 0:V.HALF_FLOAT_OES}}setDefault(){this.unbindVAO(),this.clearColor.setDefault(),this.clearDepth.setDefault(),this.clearStencil.setDefault(),this.colorMask.setDefault(),this.depthMask.setDefault(),this.stencilMask.setDefault(),this.stencilFunc.setDefault(),this.stencilOp.setDefault(),this.stencilTest.setDefault(),this.depthRange.setDefault(),this.depthTest.setDefault(),this.depthFunc.setDefault(),this.blend.setDefault(),this.blendFunc.setDefault(),this.blendColor.setDefault(),this.blendEquation.setDefault(),this.cullFace.setDefault(),this.cullFaceSide.setDefault(),this.frontFace.setDefault(),this.program.setDefault(),this.activeTexture.setDefault(),this.bindFramebuffer.setDefault(),this.pixelStoreUnpack.setDefault(),this.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.pixelStoreUnpackFlipY.setDefault()}setDirty(){this.clearColor.dirty=!0,this.clearDepth.dirty=!0,this.clearStencil.dirty=!0,this.colorMask.dirty=!0,this.depthMask.dirty=!0,this.stencilMask.dirty=!0,this.stencilFunc.dirty=!0,this.stencilOp.dirty=!0,this.stencilTest.dirty=!0,this.depthRange.dirty=!0,this.depthTest.dirty=!0,this.depthFunc.dirty=!0,this.blend.dirty=!0,this.blendFunc.dirty=!0,this.blendColor.dirty=!0,this.blendEquation.dirty=!0,this.cullFace.dirty=!0,this.cullFaceSide.dirty=!0,this.frontFace.dirty=!0,this.program.dirty=!0,this.activeTexture.dirty=!0,this.viewport.dirty=!0,this.bindFramebuffer.dirty=!0,this.bindRenderbuffer.dirty=!0,this.bindTexture.dirty=!0,this.bindVertexBuffer.dirty=!0,this.bindElementBuffer.dirty=!0,this.bindVertexArray.dirty=!0,this.pixelStoreUnpack.dirty=!0,this.pixelStoreUnpackPremultiplyAlpha.dirty=!0,this.pixelStoreUnpackFlipY.dirty=!0}createIndexBuffer(u,f){return new zr(this,u,f)}createVertexBuffer(u,f,D){return new bn(this,u,f,D)}createRenderbuffer(u,f,D){const V=this.gl,J=V.createRenderbuffer();return this.bindRenderbuffer.set(J),V.renderbufferStorage(V.RENDERBUFFER,u,f,D),this.bindRenderbuffer.set(null),J}createFramebuffer(u,f,D,V){return new Bu(this,u,f,D,V)}clear({color:u,depth:f,stencil:D}){const V=this.gl;let J=0;u&&(J|=V.COLOR_BUFFER_BIT,this.clearColor.set(u),this.colorMask.set([!0,!0,!0,!0])),f!==void 0&&(J|=V.DEPTH_BUFFER_BIT,this.depthRange.set([0,1]),this.clearDepth.set(f),this.depthMask.set(!0)),D!==void 0&&(J|=V.STENCIL_BUFFER_BIT,this.clearStencil.set(D),this.stencilMask.set(255)),V.clear(J)}setCullFace(u){u.enable===!1?this.cullFace.set(!1):(this.cullFace.set(!0),this.cullFaceSide.set(u.mode),this.frontFace.set(u.frontFace))}setDepthMode(u){u.func!==this.gl.ALWAYS||u.mask?(this.depthTest.set(!0),this.depthFunc.set(u.func),this.depthMask.set(u.mask),this.depthRange.set(u.range)):this.depthTest.set(!1)}setStencilMode(u){u.test.func!==this.gl.ALWAYS||u.mask?(this.stencilTest.set(!0),this.stencilMask.set(u.mask),this.stencilOp.set([u.fail,u.depthFail,u.pass]),this.stencilFunc.set({func:u.test.func,ref:u.ref,mask:u.test.mask})):this.stencilTest.set(!1)}setColorMode(u){r.aF(u.blendFunction,Qi.Replace)?this.blend.set(!1):(this.blend.set(!0),this.blendFunc.set(u.blendFunction),this.blendColor.set(u.blendColor)),this.colorMask.set(u.mask)}createVertexArray(){var u;return mi(this.gl)?this.gl.createVertexArray():(u=this.gl.getExtension("OES_vertex_array_object"))===null||u===void 0?void 0:u.createVertexArrayOES()}deleteVertexArray(u){var f;return mi(this.gl)?this.gl.deleteVertexArray(u):(f=this.gl.getExtension("OES_vertex_array_object"))===null||f===void 0?void 0:f.deleteVertexArrayOES(u)}unbindVAO(){this.bindVertexArray.set(null)}}class qn{constructor(u,f,D){this.func=u,this.mask=f,this.range=D}}qn.ReadOnly=!1,qn.ReadWrite=!0,qn.disabled=new qn(519,qn.ReadOnly,[0,1]);const Jl=7680;class _i{constructor(u,f,D,V,J,oe){this.test=u,this.ref=f,this.mask=D,this.fail=V,this.depthFail=J,this.pass=oe}}_i.disabled=new _i({func:519,mask:0},0,0,Jl,Jl,Jl);class xi{constructor(u,f,D){this.enable=u,this.mode=f,this.frontFace=D}}let Ts;function ss(R,u,f,D,V){const J=R.context,oe=J.gl,fe=R.useProgram("collisionBox"),xe=[];let Ee=0,Fe=0;for(let Mt=0;Mt<D.length;Mt++){const Tt=D[Mt],jt=u.getTile(Tt).getBucket(f);if(!jt)continue;const Et=V?jt.textCollisionBox:jt.iconCollisionBox,Jt=jt.collisionCircleArray;if(Jt.length>0){const Kt=r.H();r.aR(Kt,jt.placementInvProjMatrix,R.transform.glCoordMatrix),r.aR(Kt,Kt,jt.placementViewportMatrix),xe.push({circleArray:Jt,circleOffset:Fe,transform:Tt.posMatrix,invTransform:Kt,coord:Tt}),Ee+=Jt.length/4,Fe=Ee}Et&&fe.draw(J,oe.LINES,qn.disabled,_i.disabled,R.colorModeForRenderPass(),xi.disabled,ta(R.transform,Tt.posMatrix),R.style.map.terrain&&R.style.map.terrain.getTerrainData(Tt),f.id,Et.layoutVertexBuffer,Et.indexBuffer,Et.segments,null,R.transform.zoom,null,null,Et.collisionVertexBuffer)}if(!V||!xe.length)return;const Ge=R.useProgram("collisionCircle"),rt=new r.aS;rt.resize(4*Ee),rt._trim();let ct=0;for(const Mt of xe)for(let Tt=0;Tt<Mt.circleArray.length/4;Tt++){const jt=4*Tt,Et=Mt.circleArray[jt+0],Jt=Mt.circleArray[jt+1],Kt=Mt.circleArray[jt+2],Yt=Mt.circleArray[jt+3];rt.emplace(ct++,Et,Jt,Kt,Yt,0),rt.emplace(ct++,Et,Jt,Kt,Yt,1),rt.emplace(ct++,Et,Jt,Kt,Yt,2),rt.emplace(ct++,Et,Jt,Kt,Yt,3)}(!Ts||Ts.length<2*Ee)&&(Ts=function(Mt){const Tt=2*Mt,jt=new r.aU;jt.resize(Tt),jt._trim();for(let Et=0;Et<Tt;Et++){const Jt=6*Et;jt.uint16[Jt+0]=4*Et+0,jt.uint16[Jt+1]=4*Et+1,jt.uint16[Jt+2]=4*Et+2,jt.uint16[Jt+3]=4*Et+2,jt.uint16[Jt+4]=4*Et+3,jt.uint16[Jt+5]=4*Et+0}return jt}(Ee));const pt=J.createIndexBuffer(Ts,!0),xt=J.createVertexBuffer(rt,r.aT.members,!0);for(const Mt of xe){const Tt=ca(Mt.transform,Mt.invTransform,R.transform);Ge.draw(J,oe.TRIANGLES,qn.disabled,_i.disabled,R.colorModeForRenderPass(),xi.disabled,Tt,R.style.map.terrain&&R.style.map.terrain.getTerrainData(Mt.coord),f.id,xt,pt,r.a0.simpleSegment(0,2*Mt.circleOffset,Mt.circleArray.length,Mt.circleArray.length/2),null,R.transform.zoom,null,null,null)}xt.destroy(),pt.destroy()}xi.disabled=new xi(!1,1029,2305),xi.backCCW=new xi(!0,1029,2305);const xc=r.ao(new Float32Array(16));function Bl(R,u,f,D,V){if(R.renderPass!=="translucent")return;const J=_i.disabled,oe=R.colorModeForRenderPass();(f._unevaluatedLayout.hasValue("text-variable-anchor")||f._unevaluatedLayout.hasValue("text-variable-anchor-offset"))&&function(fe,xe,Ee,Fe,Ge,rt,ct,pt,xt){const Mt=xe.transform,Tt=Pa(),jt=Ge==="map",Et=rt==="map";for(const Jt of fe){const Kt=Fe.getTile(Jt),Yt=Kt.getBucket(Ee);if(!Yt||!Yt.text||!Yt.text.segments.get().length)continue;const da=Yt.textSizeData,_a=r.ah(da,Mt.zoom),Da=St(Kt,1,xe.transform.zoom),Na=It(Jt.posMatrix,Et,jt,xe.transform,Da),Ga=Ee.layout.get("icon-text-fit")!=="none"&&Yt.hasIconData();if(_a){const $a=Math.pow(2,Mt.zoom-Kt.tileID.overscaledZ),gr=xe.style.map.terrain?(xr,nr)=>xe.style.map.terrain.getElevation(Jt,xr,nr):null,Qa=Tt.translatePosition(Mt,Kt,ct,pt);wo(Yt,jt,Et,xt,Mt,Na,Jt.posMatrix,$a,_a,Ga,Tt,Qa,Jt.toUnwrapped(),gr)}}}(D,R,f,u,f.layout.get("text-rotation-alignment"),f.layout.get("text-pitch-alignment"),f.paint.get("text-translate"),f.paint.get("text-translate-anchor"),V),f.paint.get("icon-opacity").constantOr(1)!==0&&sc(R,u,f,D,!1,f.paint.get("icon-translate"),f.paint.get("icon-translate-anchor"),f.layout.get("icon-rotation-alignment"),f.layout.get("icon-pitch-alignment"),f.layout.get("icon-keep-upright"),J,oe),f.paint.get("text-opacity").constantOr(1)!==0&&sc(R,u,f,D,!0,f.paint.get("text-translate"),f.paint.get("text-translate-anchor"),f.layout.get("text-rotation-alignment"),f.layout.get("text-pitch-alignment"),f.layout.get("text-keep-upright"),J,oe),u.map.showCollisionBoxes&&(ss(R,u,f,D,!0),ss(R,u,f,D,!1))}function ls(R,u,f,D,V,J){const{horizontalAlign:oe,verticalAlign:fe}=r.av(R),xe=-(oe-.5)*u,Ee=-(fe-.5)*f;return new r.P((xe/V+D[0])*J,(Ee/V+D[1])*J)}function gs(R,u,f,D,V,J){const oe=u.tileAnchorPoint.add(new r.P(u.translation[0],u.translation[1]));if(u.pitchWithMap){let fe=D.mult(J);return f||(fe=fe.rotate(-V)),Gt(oe.add(fe),u.labelPlaneMatrix,u.getElevation).point}if(f){const fe=Ye(u.tileAnchorPoint.x+1,u.tileAnchorPoint.y,u).point.sub(R),xe=Math.atan(fe.y/fe.x)+(fe.x<0?Math.PI:0);return R.add(D.rotate(xe))}return R.add(D)}function wo(R,u,f,D,V,J,oe,fe,xe,Ee,Fe,Ge,rt,ct){const pt=R.text.placedSymbolArray,xt=R.text.dynamicLayoutVertexArray,Mt=R.icon.dynamicLayoutVertexArray,Tt={};xt.clear();for(let jt=0;jt<pt.length;jt++){const Et=pt.get(jt),Jt=R.allowVerticalPlacement&&!Et.placedOrientation,Kt=Et.hidden||!Et.crossTileID||Jt?null:D[Et.crossTileID];if(Kt){const Yt=new r.P(Et.anchorX,Et.anchorY),da={getElevation:ct,width:V.width,height:V.height,labelPlaneMatrix:J,lineVertexArray:null,pitchWithMap:f,projection:Fe,projectionCache:null,tileAnchorPoint:Yt,translation:Ge,unwrappedTileID:rt},_a=f?Gt(Yt,oe,ct):Ye(Yt.x,Yt.y,da),Da=ot(V.cameraToCenterDistance,_a.signedDistanceFromCamera);let Na=r.aj(R.textSizeData,xe,Et)*Da/r.aq;f&&(Na*=R.tilePixelRatio/fe);const{width:Ga,height:$a,anchor:gr,textOffset:Qa,textBoxScale:xr}=Kt,nr=ls(gr,Ga,$a,Qa,xr,Na),Sr=Fe.getPitchedTextCorrection(V,Yt.add(new r.P(Ge[0],Ge[1])),rt),pr=gs(_a.point,da,u,nr,V.angle,Sr),Mr=R.allowVerticalPlacement&&Et.placedOrientation===r.ai.vertical?Math.PI/2:0;for(let Wr=0;Wr<Et.numGlyphs;Wr++)r.ak(xt,pr,Mr);Ee&&Et.associatedIconIndex>=0&&(Tt[Et.associatedIconIndex]={shiftedAnchor:pr,angle:Mr})}else Vt(Et.numGlyphs,xt)}if(Ee){Mt.clear();const jt=R.icon.placedSymbolArray;for(let Et=0;Et<jt.length;Et++){const Jt=jt.get(Et);if(Jt.hidden)Vt(Jt.numGlyphs,Mt);else{const Kt=Tt[Et];if(Kt)for(let Yt=0;Yt<Jt.numGlyphs;Yt++)r.ak(Mt,Kt.shiftedAnchor,Kt.angle);else Vt(Jt.numGlyphs,Mt)}}R.icon.dynamicLayoutVertexBuffer.updateData(Mt)}R.text.dynamicLayoutVertexBuffer.updateData(xt)}function ei(R,u,f){return f.iconsInText&&u?"symbolTextAndIcon":R?"symbolSDF":"symbolIcon"}function sc(R,u,f,D,V,J,oe,fe,xe,Ee,Fe,Ge){const rt=R.context,ct=rt.gl,pt=R.transform,xt=Pa(),Mt=fe==="map",Tt=xe==="map",jt=fe!=="viewport"&&f.layout.get("symbol-placement")!=="point",Et=Mt&&!Tt&&!jt,Jt=!Tt&&jt,Kt=!f.layout.get("symbol-sort-key").isConstant();let Yt=!1;const da=R.depthModeForSublayer(0,qn.ReadOnly),_a=f._unevaluatedLayout.hasValue("text-variable-anchor")||f._unevaluatedLayout.hasValue("text-variable-anchor-offset"),Da=[],Na=xt.getCircleRadiusCorrection(pt);for(const Ga of D){const $a=u.getTile(Ga),gr=$a.getBucket(f);if(!gr)continue;const Qa=V?gr.text:gr.icon;if(!Qa||!Qa.segments.get().length||!Qa.hasVisibleVertices)continue;const xr=Qa.programConfigurations.get(f.id),nr=V||gr.sdfIcons,Sr=V?gr.textSizeData:gr.iconSizeData,pr=Tt||pt.pitch!==0,Mr=R.useProgram(ei(nr,V,gr),xr),Wr=r.ah(Sr,pt.zoom),Er=R.style.map.terrain&&R.style.map.terrain.getTerrainData(Ga);let Gr,rn,Dn,Sn,Gn=[0,0],jn=null;if(V){if(rn=$a.glyphAtlasTexture,Dn=ct.LINEAR,Gr=$a.glyphAtlasTexture.size,gr.iconsInText){Gn=$a.imageAtlasTexture.size,jn=$a.imageAtlasTexture;const Nn=Sr.kind==="composite"||Sr.kind==="camera";Sn=pr||R.options.rotating||R.options.zooming||Nn?ct.LINEAR:ct.NEAREST}}else{const Nn=f.layout.get("icon-size").constantOr(0)!==1||gr.iconsNeedLinear;rn=$a.imageAtlasTexture,Dn=nr||R.options.rotating||R.options.zooming||Nn||pr?ct.LINEAR:ct.NEAREST,Gr=$a.imageAtlasTexture.size}const Jn=St($a,1,R.transform.zoom),oi=Jt?Ga.posMatrix:xc,Vi=It(oi,Tt,Mt,R.transform,Jn),zi=Ot(oi,Tt,Mt,R.transform,Jn),ro=Ot(Ga.posMatrix,Tt,Mt,R.transform,Jn),ci=xt.translatePosition(R.transform,$a,J,oe),$n=_a&&gr.hasTextData(),Ai=f.layout.get("icon-text-fit")!=="none"&&$n&&gr.hasIconData();if(jt){const Nn=R.style.map.terrain?(Xi,bs)=>R.style.map.terrain.getElevation(Ga,Xi,bs):null,To=f.layout.get("text-rotation-alignment")==="map";dt(gr,Ga.posMatrix,R,V,Vi,ro,Tt,Ee,To,xt,Ga.toUnwrapped(),pt.width,pt.height,ci,Nn)}const pi=Ga.posMatrix,ai=V&&_a||Ai,ui=jt||ai?xc:Vi,bi=zi,Kn=nr&&f.paint.get(V?"text-halo-width":"icon-halo-width").constantOr(1)!==0;let Ns;Ns=nr?gr.iconsInText?Cr(Sr.kind,Wr,Et,Tt,jt,ai,R,pi,ui,bi,ci,Gr,Gn,Na):_r(Sr.kind,Wr,Et,Tt,jt,ai,R,pi,ui,bi,ci,V,Gr,!0,Na):Pr(Sr.kind,Wr,Et,Tt,jt,ai,R,pi,ui,bi,ci,V,Gr,Na);const Zi={program:Mr,buffers:Qa,uniformValues:Ns,atlasTexture:rn,atlasTextureIcon:jn,atlasInterpolation:Dn,atlasInterpolationIcon:Sn,isSDF:nr,hasHalo:Kn};if(Kt&&gr.canOverlap){Yt=!0;const Nn=Qa.segments.get();for(const To of Nn)Da.push({segments:new r.a0([To]),sortKey:To.sortKey,state:Zi,terrainData:Er})}else Da.push({segments:Qa.segments,sortKey:0,state:Zi,terrainData:Er})}Yt&&Da.sort((Ga,$a)=>Ga.sortKey-$a.sortKey);for(const Ga of Da){const $a=Ga.state;if(rt.activeTexture.set(ct.TEXTURE0),$a.atlasTexture.bind($a.atlasInterpolation,ct.CLAMP_TO_EDGE),$a.atlasTextureIcon&&(rt.activeTexture.set(ct.TEXTURE1),$a.atlasTextureIcon&&$a.atlasTextureIcon.bind($a.atlasInterpolationIcon,ct.CLAMP_TO_EDGE)),$a.isSDF){const gr=$a.uniformValues;$a.hasHalo&&(gr.u_is_halo=1,au($a.buffers,Ga.segments,f,R,$a.program,da,Fe,Ge,gr,Ga.terrainData)),gr.u_is_halo=0}au($a.buffers,Ga.segments,f,R,$a.program,da,Fe,Ge,$a.uniformValues,Ga.terrainData)}}function au(R,u,f,D,V,J,oe,fe,xe,Ee){const Fe=D.context,Ge=Fe.gl;V.draw(Fe,Ge.TRIANGLES,J,oe,fe,xi.disabled,xe,Ee,f.id,R.layoutVertexBuffer,R.indexBuffer,u,f.paint,D.transform.zoom,R.programConfigurations.get(f.id),R.dynamicLayoutVertexBuffer,R.opacityVertexBuffer)}function zl(R,u,f,D){if(f.paint.get("heatmap-opacity")!==0)if(R.renderPass==="offscreen"){const V=R.context,J=V.gl,oe=_i.disabled,fe=new Qi([J.ONE,J.ONE],r.aN.transparent,[!0,!0,!0,!0]);(function(xe,Ee,Fe){const Ge=xe.gl;xe.activeTexture.set(Ge.TEXTURE1),xe.viewport.set([0,0,Ee.width/4,Ee.height/4]);let rt=Fe.heatmapFbo;if(rt)Ge.bindTexture(Ge.TEXTURE_2D,rt.colorAttachment.get()),xe.bindFramebuffer.set(rt.framebuffer);else{const ct=Ge.createTexture();Ge.bindTexture(Ge.TEXTURE_2D,ct),Ge.texParameteri(Ge.TEXTURE_2D,Ge.TEXTURE_WRAP_S,Ge.CLAMP_TO_EDGE),Ge.texParameteri(Ge.TEXTURE_2D,Ge.TEXTURE_WRAP_T,Ge.CLAMP_TO_EDGE),Ge.texParameteri(Ge.TEXTURE_2D,Ge.TEXTURE_MIN_FILTER,Ge.LINEAR),Ge.texParameteri(Ge.TEXTURE_2D,Ge.TEXTURE_MAG_FILTER,Ge.LINEAR),rt=Fe.heatmapFbo=xe.createFramebuffer(Ee.width/4,Ee.height/4,!1,!1),function(pt,xt,Mt,Tt){var jt,Et;const Jt=pt.gl,Kt=(jt=pt.HALF_FLOAT)!==null&&jt!==void 0?jt:Jt.UNSIGNED_BYTE,Yt=(Et=pt.RGBA16F)!==null&&Et!==void 0?Et:Jt.RGBA;Jt.texImage2D(Jt.TEXTURE_2D,0,Yt,xt.width/4,xt.height/4,0,Jt.RGBA,Kt,null),Tt.colorAttachment.set(Mt)}(xe,Ee,ct,rt)}})(V,R,f),V.clear({color:r.aN.transparent});for(let xe=0;xe<D.length;xe++){const Ee=D[xe];if(u.hasRenderableParent(Ee))continue;const Fe=u.getTile(Ee),Ge=Fe.getBucket(f);if(!Ge)continue;const rt=Ge.programConfigurations.get(f.id),ct=R.useProgram("heatmap",rt),{zoom:pt}=R.transform;ct.draw(V,J.TRIANGLES,qn.disabled,oe,fe,xi.disabled,za(Ee.posMatrix,Fe,pt,f.paint.get("heatmap-intensity")),null,f.id,Ge.layoutVertexBuffer,Ge.indexBuffer,Ge.segments,f.paint,R.transform.zoom,rt)}V.viewport.set([0,0,R.width,R.height])}else R.renderPass==="translucent"&&(R.context.setColorMode(R.colorModeForRenderPass()),function(V,J){const oe=V.context,fe=oe.gl,xe=J.heatmapFbo;if(!xe)return;oe.activeTexture.set(fe.TEXTURE0),fe.bindTexture(fe.TEXTURE_2D,xe.colorAttachment.get()),oe.activeTexture.set(fe.TEXTURE1);let Ee=J.colorRampTexture;Ee||(Ee=J.colorRampTexture=new z(oe,J.colorRamp,fe.RGBA)),Ee.bind(fe.LINEAR,fe.CLAMP_TO_EDGE),V.useProgram("heatmapTexture").draw(oe,fe.TRIANGLES,qn.disabled,_i.disabled,V.colorModeForRenderPass(),xi.disabled,qa(V,J,0,1),null,J.id,V.viewportBuffer,V.quadTriangleIndexBuffer,V.viewportSegments,J.paint,V.transform.zoom)}(R,f))}function Ol(R,u,f,D,V){if(!f||!D||!D.imageAtlas)return;const J=D.imageAtlas.patternPositions;let oe=J[f.to.toString()],fe=J[f.from.toString()];if(!oe&&fe&&(oe=fe),!fe&&oe&&(fe=oe),!oe||!fe){const xe=V.getPaintProperty(u);oe=J[xe],fe=J[xe]}oe&&fe&&R.setConstantPatternPositions(oe,fe)}function Bc(R,u,f,D,V,J,oe){const fe=R.context.gl,xe="fill-pattern",Ee=f.paint.get(xe),Fe=Ee&&Ee.constantOr(1),Ge=f.getCrossfadeParameters();let rt,ct,pt,xt,Mt;oe?(ct=Fe&&!f.getPaintProperty("fill-outline-color")?"fillOutlinePattern":"fillOutline",rt=fe.LINES):(ct=Fe?"fillPattern":"fill",rt=fe.TRIANGLES);const Tt=Ee.constantOr(null);for(const jt of D){const Et=u.getTile(jt);if(Fe&&!Et.patternsLoaded())continue;const Jt=Et.getBucket(f);if(!Jt)continue;const Kt=Jt.programConfigurations.get(f.id),Yt=R.useProgram(ct,Kt),da=R.style.map.terrain&&R.style.map.terrain.getTerrainData(jt);Fe&&(R.context.activeTexture.set(fe.TEXTURE0),Et.imageAtlasTexture.bind(fe.LINEAR,fe.CLAMP_TO_EDGE),Kt.updatePaintBuffers(Ge)),Ol(Kt,xe,Tt,Et,f);const _a=da?jt:null,Da=_a?_a.posMatrix:jt.posMatrix,Na=R.translatePosMatrix(Da,Et,f.paint.get("fill-translate"),f.paint.get("fill-translate-anchor"));if(oe){xt=Jt.indexBuffer2,Mt=Jt.segments2;const Ga=[fe.drawingBufferWidth,fe.drawingBufferHeight];pt=ct==="fillOutlinePattern"&&Fe?ma(Na,R,Ge,Et,Ga):Ur(Na,Ga)}else xt=Jt.indexBuffer,Mt=Jt.segments,pt=Fe?Br(Na,R,Ge,Et):mr(Na);Yt.draw(R.context,rt,V,R.stencilModeForClipping(jt),J,xi.disabled,pt,da,f.id,Jt.layoutVertexBuffer,xt,Mt,f.paint,R.transform.zoom,Kt)}}function wc(R,u,f,D,V,J,oe){const fe=R.context,xe=fe.gl,Ee="fill-extrusion-pattern",Fe=f.paint.get(Ee),Ge=Fe.constantOr(1),rt=f.getCrossfadeParameters(),ct=f.paint.get("fill-extrusion-opacity"),pt=Fe.constantOr(null);for(const xt of D){const Mt=u.getTile(xt),Tt=Mt.getBucket(f);if(!Tt)continue;const jt=R.style.map.terrain&&R.style.map.terrain.getTerrainData(xt),Et=Tt.programConfigurations.get(f.id),Jt=R.useProgram(Ge?"fillExtrusionPattern":"fillExtrusion",Et);Ge&&(R.context.activeTexture.set(xe.TEXTURE0),Mt.imageAtlasTexture.bind(xe.LINEAR,xe.CLAMP_TO_EDGE),Et.updatePaintBuffers(rt)),Ol(Et,Ee,pt,Mt,f);const Kt=R.translatePosMatrix(xt.posMatrix,Mt,f.paint.get("fill-extrusion-translate"),f.paint.get("fill-extrusion-translate-anchor")),Yt=f.paint.get("fill-extrusion-vertical-gradient"),da=Ge?vr(Kt,R,Yt,ct,xt,rt,Mt):ar(Kt,R,Yt,ct);Jt.draw(fe,fe.gl.TRIANGLES,V,J,oe,xi.backCCW,da,jt,f.id,Tt.layoutVertexBuffer,Tt.indexBuffer,Tt.segments,f.paint,R.transform.zoom,Et,R.style.map.terrain&&Tt.centroidVertexBuffer)}}function kc(R,u,f,D,V,J,oe){const fe=R.context,xe=fe.gl,Ee=f.fbo;if(!Ee)return;const Fe=R.useProgram("hillshade"),Ge=R.style.map.terrain&&R.style.map.terrain.getTerrainData(u);fe.activeTexture.set(xe.TEXTURE0),xe.bindTexture(xe.TEXTURE_2D,Ee.colorAttachment.get());const rt=Ge?u:null;Fe.draw(fe,xe.TRIANGLES,V,J,oe,xi.disabled,Ra(R,f,D,rt),Ge,D.id,R.rasterBoundsBuffer,R.quadTriangleIndexBuffer,R.rasterBoundsSegments)}function gu(R,u,f,D,V,J){const oe=R.context,fe=oe.gl,xe=u.dem;if(xe&&xe.data){const Ee=xe.dim,Fe=xe.stride,Ge=xe.getPixels();if(oe.activeTexture.set(fe.TEXTURE1),oe.pixelStoreUnpackPremultiplyAlpha.set(!1),u.demTexture=u.demTexture||R.getTileTexture(Fe),u.demTexture){const ct=u.demTexture;ct.update(Ge,{premultiply:!1}),ct.bind(fe.NEAREST,fe.CLAMP_TO_EDGE)}else u.demTexture=new z(oe,Ge,fe.RGBA,{premultiply:!1}),u.demTexture.bind(fe.NEAREST,fe.CLAMP_TO_EDGE);oe.activeTexture.set(fe.TEXTURE0);let rt=u.fbo;if(!rt){const ct=new z(oe,{width:Ee,height:Ee,data:null},fe.RGBA);ct.bind(fe.LINEAR,fe.CLAMP_TO_EDGE),rt=u.fbo=oe.createFramebuffer(Ee,Ee,!0,!1),rt.colorAttachment.set(ct.texture)}oe.bindFramebuffer.set(rt.framebuffer),oe.viewport.set([0,0,Ee,Ee]),R.useProgram("hillshadePrepare").draw(oe,fe.TRIANGLES,D,V,J,xi.disabled,Ia(u.tileID,xe),null,f.id,R.rasterBoundsBuffer,R.quadTriangleIndexBuffer,R.rasterBoundsSegments),u.needsHillshadePrepare=!1}}function As(R,u,f,D,V,J){const oe=D.paint.get("raster-fade-duration");if(!J&&oe>0){const fe=h.now(),xe=(fe-R.timeAdded)/oe,Ee=u?(fe-u.timeAdded)/oe:-1,Fe=f.getSource(),Ge=V.coveringZoomLevel({tileSize:Fe.tileSize,roundZoom:Fe.roundZoom}),rt=!u||Math.abs(u.tileID.overscaledZ-Ge)>Math.abs(R.tileID.overscaledZ-Ge),ct=rt&&R.refreshedUponExpiration?1:r.ad(rt?xe:1-Ee,0,1);return R.refreshedUponExpiration&&xe>=1&&(R.refreshedUponExpiration=!1),u?{opacity:1,mix:1-ct}:{opacity:ct,mix:0}}return{opacity:1,mix:0}}const Hs=new r.aN(1,0,0,1),Dl=new r.aN(0,1,0,1),Es=new r.aN(0,0,1,1),ti=new r.aN(1,0,1,1),Wc=new r.aN(0,1,1,1);function qc(R){const u=R.transform.padding;zc(R,R.transform.height-(u.top||0),3,Hs),zc(R,u.bottom||0,3,Dl),Lo(R,u.left||0,3,Es),Lo(R,R.transform.width-(u.right||0),3,ti);const f=R.transform.centerPoint;(function(D,V,J,oe){Sc(D,V-1,J-10,2,20,oe),Sc(D,V-10,J-1,20,2,oe)})(R,f.x,R.transform.height-f.y,Wc)}function zc(R,u,f,D){Sc(R,0,u+f/2,R.transform.width,f,D)}function Lo(R,u,f,D){Sc(R,u-f/2,0,f,R.transform.height,D)}function Sc(R,u,f,D,V,J){const oe=R.context,fe=oe.gl;fe.enable(fe.SCISSOR_TEST),fe.scissor(u*R.pixelRatio,f*R.pixelRatio,D*R.pixelRatio,V*R.pixelRatio),oe.clear({color:J}),fe.disable(fe.SCISSOR_TEST)}function Su(R,u,f){const D=R.context,V=D.gl,J=f.posMatrix,oe=R.useProgram("debug"),fe=qn.disabled,xe=_i.disabled,Ee=R.colorModeForRenderPass(),Fe="$debug",Ge=R.style.map.terrain&&R.style.map.terrain.getTerrainData(f);D.activeTexture.set(V.TEXTURE0);const rt=u.getTileByID(f.key).latestRawTileData,ct=rt&&rt.byteLength||0,pt=Math.floor(ct/1024),xt=u.getTile(f).tileSize,Mt=512/Math.min(xt,512)*(f.overscaledZ/R.transform.zoom)*.5;let Tt=f.canonical.toString();f.overscaledZ!==f.canonical.z&&(Tt+=` => ${f.overscaledZ}`),function(jt,Et){jt.initDebugOverlayCanvas();const Jt=jt.debugOverlayCanvas,Kt=jt.context.gl,Yt=jt.debugOverlayCanvas.getContext("2d");Yt.clearRect(0,0,Jt.width,Jt.height),Yt.shadowColor="white",Yt.shadowBlur=2,Yt.lineWidth=1.5,Yt.strokeStyle="white",Yt.textBaseline="top",Yt.font="bold 36px Open Sans, sans-serif",Yt.fillText(Et,5,5),Yt.strokeText(Et,5,5),jt.debugOverlayTexture.update(Jt),jt.debugOverlayTexture.bind(Kt.LINEAR,Kt.CLAMP_TO_EDGE)}(R,`${Tt} ${pt}kB`),oe.draw(D,V.TRIANGLES,fe,xe,Qi.alphaBlended,xi.disabled,fa(J,r.aN.transparent,Mt),null,Fe,R.debugBuffer,R.quadTriangleIndexBuffer,R.debugSegments),oe.draw(D,V.LINE_STRIP,fe,xe,Ee,xi.disabled,fa(J,r.aN.red),Ge,Fe,R.debugBuffer,R.tileBorderIndexBuffer,R.debugSegments)}function lc(R,u,f){const D=R.context,V=D.gl,J=R.colorModeForRenderPass(),oe=new qn(V.LEQUAL,qn.ReadWrite,R.depthRangeFor3D),fe=R.useProgram("terrain"),xe=u.getTerrainMesh();D.bindFramebuffer.set(null),D.viewport.set([0,0,R.width,R.height]);for(const Ee of f){const Fe=R.renderToTexture.getTexture(Ee),Ge=u.getTerrainData(Ee.tileID);D.activeTexture.set(V.TEXTURE0),V.bindTexture(V.TEXTURE_2D,Fe.texture);const rt=R.transform.calculatePosMatrix(Ee.tileID.toUnwrapped()),ct=u.getMeshFrameDelta(R.transform.zoom),pt=R.transform.calculateFogMatrix(Ee.tileID.toUnwrapped()),xt=va(rt,ct,pt,R.style.sky,R.transform.pitch);fe.draw(D,V.TRIANGLES,oe,_i.disabled,J,xi.backCCW,xt,Ge,"terrain",xe.vertexBuffer,xe.indexBuffer,xe.segments)}}class cc{constructor(u,f,D){this.vertexBuffer=u,this.indexBuffer=f,this.segments=D}destroy(){this.vertexBuffer.destroy(),this.indexBuffer.destroy(),this.segments.destroy(),this.vertexBuffer=null,this.indexBuffer=null,this.segments=null}}class uc{constructor(u,f){this.context=new _c(u),this.transform=f,this._tileTextures={},this.terrainFacilitator={dirty:!0,matrix:r.ao(new Float64Array(16)),renderTime:0},this.setup(),this.numSublayers=We.maxUnderzooming+We.maxOverzooming+1,this.depthEpsilon=1/Math.pow(2,16),this.crossTileSymbolIndex=new er}resize(u,f,D){if(this.width=Math.floor(u*D),this.height=Math.floor(f*D),this.pixelRatio=D,this.context.viewport.set([0,0,this.width,this.height]),this.style)for(const V of this.style._order)this.style._layers[V].resize()}setup(){const u=this.context,f=new r.aX;f.emplaceBack(0,0),f.emplaceBack(r.X,0),f.emplaceBack(0,r.X),f.emplaceBack(r.X,r.X),this.tileExtentBuffer=u.createVertexBuffer(f,yr.members),this.tileExtentSegments=r.a0.simpleSegment(0,0,4,2);const D=new r.aX;D.emplaceBack(0,0),D.emplaceBack(r.X,0),D.emplaceBack(0,r.X),D.emplaceBack(r.X,r.X),this.debugBuffer=u.createVertexBuffer(D,yr.members),this.debugSegments=r.a0.simpleSegment(0,0,4,5);const V=new r.$;V.emplaceBack(0,0,0,0),V.emplaceBack(r.X,0,r.X,0),V.emplaceBack(0,r.X,0,r.X),V.emplaceBack(r.X,r.X,r.X,r.X),this.rasterBoundsBuffer=u.createVertexBuffer(V,Ve.members),this.rasterBoundsSegments=r.a0.simpleSegment(0,0,4,2);const J=new r.aX;J.emplaceBack(0,0),J.emplaceBack(1,0),J.emplaceBack(0,1),J.emplaceBack(1,1),this.viewportBuffer=u.createVertexBuffer(J,yr.members),this.viewportSegments=r.a0.simpleSegment(0,0,4,2);const oe=new r.aZ;oe.emplaceBack(0),oe.emplaceBack(1),oe.emplaceBack(3),oe.emplaceBack(2),oe.emplaceBack(0),this.tileBorderIndexBuffer=u.createIndexBuffer(oe);const fe=new r.aY;fe.emplaceBack(0,1,2),fe.emplaceBack(2,1,3),this.quadTriangleIndexBuffer=u.createIndexBuffer(fe);const xe=this.context.gl;this.stencilClearMode=new _i({func:xe.ALWAYS,mask:0},0,255,xe.ZERO,xe.ZERO,xe.ZERO)}clearStencil(){const u=this.context,f=u.gl;this.nextStencilID=1,this.currentStencilSource=void 0;const D=r.H();r.aQ(D,0,this.width,this.height,0,0,1),r.K(D,D,[f.drawingBufferWidth,f.drawingBufferHeight,0]),this.useProgram("clippingMask").draw(u,f.TRIANGLES,qn.disabled,this.stencilClearMode,Qi.disabled,xi.disabled,Oa(D),null,"$clipping",this.viewportBuffer,this.quadTriangleIndexBuffer,this.viewportSegments)}_renderTileClippingMasks(u,f){if(this.currentStencilSource===u.source||!u.isTileClipped()||!f||!f.length)return;this.currentStencilSource=u.source;const D=this.context,V=D.gl;this.nextStencilID+f.length>256&&this.clearStencil(),D.setColorMode(Qi.disabled),D.setDepthMode(qn.disabled);const J=this.useProgram("clippingMask");this._tileClippingMaskIDs={};for(const oe of f){const fe=this._tileClippingMaskIDs[oe.key]=this.nextStencilID++,xe=this.style.map.terrain&&this.style.map.terrain.getTerrainData(oe);J.draw(D,V.TRIANGLES,qn.disabled,new _i({func:V.ALWAYS,mask:0},fe,255,V.KEEP,V.KEEP,V.REPLACE),Qi.disabled,xi.disabled,Oa(oe.posMatrix),xe,"$clipping",this.tileExtentBuffer,this.quadTriangleIndexBuffer,this.tileExtentSegments)}}stencilModeFor3D(){this.currentStencilSource=void 0,this.nextStencilID+1>256&&this.clearStencil();const u=this.nextStencilID++,f=this.context.gl;return new _i({func:f.NOTEQUAL,mask:255},u,255,f.KEEP,f.KEEP,f.REPLACE)}stencilModeForClipping(u){const f=this.context.gl;return new _i({func:f.EQUAL,mask:255},this._tileClippingMaskIDs[u.key],0,f.KEEP,f.KEEP,f.REPLACE)}stencilConfigForOverlap(u){const f=this.context.gl,D=u.sort((oe,fe)=>fe.overscaledZ-oe.overscaledZ),V=D[D.length-1].overscaledZ,J=D[0].overscaledZ-V+1;if(J>1){this.currentStencilSource=void 0,this.nextStencilID+J>256&&this.clearStencil();const oe={};for(let fe=0;fe<J;fe++)oe[fe+V]=new _i({func:f.GEQUAL,mask:255},fe+this.nextStencilID,255,f.KEEP,f.KEEP,f.REPLACE);return this.nextStencilID+=J,[oe,D]}return[{[V]:_i.disabled},D]}colorModeForRenderPass(){const u=this.context.gl;return this._showOverdrawInspector?new Qi([u.CONSTANT_COLOR,u.ONE],new r.aN(.125,.125,.125,0),[!0,!0,!0,!0]):this.renderPass==="opaque"?Qi.unblended:Qi.alphaBlended}depthModeForSublayer(u,f,D){if(!this.opaquePassEnabledForLayer())return qn.disabled;const V=1-((1+this.currentLayer)*this.numSublayers+u)*this.depthEpsilon;return new qn(D||this.context.gl.LEQUAL,f,[V,V])}opaquePassEnabledForLayer(){return this.currentLayer<this.opaquePassCutoff}render(u,f){var D;this.style=u,this.options=f,this.lineAtlas=u.lineAtlas,this.imageManager=u.imageManager,this.glyphManager=u.glyphManager,this.symbolFadeChange=u.placement.symbolFadeChange(h.now()),this.imageManager.beginFrame();const V=this.style._order,J=this.style.sourceCaches,oe={},fe={},xe={};for(const Ee in J){const Fe=J[Ee];Fe.used&&Fe.prepare(this.context),oe[Ee]=Fe.getVisibleCoordinates(),fe[Ee]=oe[Ee].slice().reverse(),xe[Ee]=Fe.getVisibleCoordinates(!0).reverse()}this.opaquePassCutoff=1/0;for(let Ee=0;Ee<V.length;Ee++){const Fe=V[Ee];if(this.style._layers[Fe].is3D()){this.opaquePassCutoff=Ee;break}}this.maybeDrawDepthAndCoords(!1),this.renderToTexture&&(this.renderToTexture.prepareForRender(this.style,this.transform.zoom),this.opaquePassCutoff=0),this.renderPass="offscreen";for(const Ee of V){const Fe=this.style._layers[Ee];if(!Fe.hasOffscreenPass()||Fe.isHidden(this.transform.zoom))continue;const Ge=fe[Fe.source];(Fe.type==="custom"||Ge.length)&&this.renderLayer(this,J[Fe.source],Fe,Ge)}if(this.context.bindFramebuffer.set(null),this.context.clear({color:f.showOverdrawInspector?r.aN.black:r.aN.transparent,depth:1}),this.clearStencil(),!((D=this.style.stylesheet)===null||D===void 0)&&D.sky&&function(Ee,Fe){const Ge=Ee.context,rt=Ge.gl,ct=((jt,Et,Jt)=>({u_sky_color:jt.properties.get("sky-color"),u_horizon_color:jt.properties.get("horizon-color"),u_horizon:(Et.height/2+Et.getHorizon())*Jt,u_sky_horizon_blend:jt.properties.get("sky-horizon-blend")*Et.height/2*Jt}))(Fe,Ee.style.map.transform,Ee.pixelRatio),pt=new qn(rt.LEQUAL,qn.ReadWrite,[0,1]),xt=_i.disabled,Mt=Ee.colorModeForRenderPass(),Tt=Ee.useProgram("sky");if(!Fe.mesh){const jt=new r.aX;jt.emplaceBack(-1,-1),jt.emplaceBack(1,-1),jt.emplaceBack(1,1),jt.emplaceBack(-1,1);const Et=new r.aY;Et.emplaceBack(0,1,2),Et.emplaceBack(0,2,3),Fe.mesh=new cc(Ge.createVertexBuffer(jt,yr.members),Ge.createIndexBuffer(Et),r.a0.simpleSegment(0,0,jt.length,Et.length))}Tt.draw(Ge,rt.TRIANGLES,pt,xt,Mt,xi.disabled,ct,void 0,"sky",Fe.mesh.vertexBuffer,Fe.mesh.indexBuffer,Fe.mesh.segments)}(this,this.style.sky),this._showOverdrawInspector=f.showOverdrawInspector,this.depthRangeFor3D=[0,1-(u._order.length+2)*this.numSublayers*this.depthEpsilon],!this.renderToTexture)for(this.renderPass="opaque",this.currentLayer=V.length-1;this.currentLayer>=0;this.currentLayer--){const Ee=this.style._layers[V[this.currentLayer]],Fe=J[Ee.source],Ge=oe[Ee.source];this._renderTileClippingMasks(Ee,Ge),this.renderLayer(this,Fe,Ee,Ge)}for(this.renderPass="translucent",this.currentLayer=0;this.currentLayer<V.length;this.currentLayer++){const Ee=this.style._layers[V[this.currentLayer]],Fe=J[Ee.source];if(this.renderToTexture&&this.renderToTexture.renderLayer(Ee))continue;const Ge=(Ee.type==="symbol"?xe:fe)[Ee.source];this._renderTileClippingMasks(Ee,oe[Ee.source]),this.renderLayer(this,Fe,Ee,Ge)}if(this.options.showTileBoundaries){const Ee=function(Fe,Ge){let rt=null;const ct=Object.values(Fe._layers).flatMap(Tt=>Tt.source&&!Tt.isHidden(Ge)?[Fe.sourceCaches[Tt.source]]:[]),pt=ct.filter(Tt=>Tt.getSource().type==="vector"),xt=ct.filter(Tt=>Tt.getSource().type!=="vector"),Mt=Tt=>{(!rt||rt.getSource().maxzoom<Tt.getSource().maxzoom)&&(rt=Tt)};return pt.forEach(Tt=>Mt(Tt)),rt||xt.forEach(Tt=>Mt(Tt)),rt}(this.style,this.transform.zoom);Ee&&function(Fe,Ge,rt){for(let ct=0;ct<rt.length;ct++)Su(Fe,Ge,rt[ct])}(this,Ee,Ee.getVisibleCoordinates())}this.options.showPadding&&qc(this),this.context.setDefault()}maybeDrawDepthAndCoords(u){if(!this.style||!this.style.map||!this.style.map.terrain)return;const f=this.terrainFacilitator.matrix,D=this.transform.modelViewProjectionMatrix;let V=this.terrainFacilitator.dirty;V||(V=u?!r.a_(f,D):!r.a$(f,D)),V||(V=this.style.map.terrain.sourceCache.tilesAfterTime(this.terrainFacilitator.renderTime).length>0),V&&(r.b0(f,D),this.terrainFacilitator.renderTime=Date.now(),this.terrainFacilitator.dirty=!1,function(J,oe){const fe=J.context,xe=fe.gl,Ee=Qi.unblended,Fe=new qn(xe.LEQUAL,qn.ReadWrite,[0,1]),Ge=oe.getTerrainMesh(),rt=oe.sourceCache.getRenderableTiles(),ct=J.useProgram("terrainDepth");fe.bindFramebuffer.set(oe.getFramebuffer("depth").framebuffer),fe.viewport.set([0,0,J.width/devicePixelRatio,J.height/devicePixelRatio]),fe.clear({color:r.aN.transparent,depth:1});for(const pt of rt){const xt=oe.getTerrainData(pt.tileID),Mt={u_matrix:J.transform.calculatePosMatrix(pt.tileID.toUnwrapped()),u_ele_delta:oe.getMeshFrameDelta(J.transform.zoom)};ct.draw(fe,xe.TRIANGLES,Fe,_i.disabled,Ee,xi.backCCW,Mt,xt,"terrain",Ge.vertexBuffer,Ge.indexBuffer,Ge.segments)}fe.bindFramebuffer.set(null),fe.viewport.set([0,0,J.width,J.height])}(this,this.style.map.terrain),function(J,oe){const fe=J.context,xe=fe.gl,Ee=Qi.unblended,Fe=new qn(xe.LEQUAL,qn.ReadWrite,[0,1]),Ge=oe.getTerrainMesh(),rt=oe.getCoordsTexture(),ct=oe.sourceCache.getRenderableTiles(),pt=J.useProgram("terrainCoords");fe.bindFramebuffer.set(oe.getFramebuffer("coords").framebuffer),fe.viewport.set([0,0,J.width/devicePixelRatio,J.height/devicePixelRatio]),fe.clear({color:r.aN.transparent,depth:1}),oe.coordsIndex=[];for(const xt of ct){const Mt=oe.getTerrainData(xt.tileID);fe.activeTexture.set(xe.TEXTURE0),xe.bindTexture(xe.TEXTURE_2D,rt.texture);const Tt={u_matrix:J.transform.calculatePosMatrix(xt.tileID.toUnwrapped()),u_terrain_coords_id:(255-oe.coordsIndex.length)/255,u_texture:0,u_ele_delta:oe.getMeshFrameDelta(J.transform.zoom)};pt.draw(fe,xe.TRIANGLES,Fe,_i.disabled,Ee,xi.backCCW,Tt,Mt,"terrain",Ge.vertexBuffer,Ge.indexBuffer,Ge.segments),oe.coordsIndex.push(xt.tileID.key)}fe.bindFramebuffer.set(null),fe.viewport.set([0,0,J.width,J.height])}(this,this.style.map.terrain))}renderLayer(u,f,D,V){if(!D.isHidden(this.transform.zoom)&&(D.type==="background"||D.type==="custom"||(V||[]).length))switch(this.id=D.id,D.type){case"symbol":Bl(u,f,D,V,this.style.placement.variableOffsets);break;case"circle":(function(J,oe,fe,xe){if(J.renderPass!=="translucent")return;const Ee=fe.paint.get("circle-opacity"),Fe=fe.paint.get("circle-stroke-width"),Ge=fe.paint.get("circle-stroke-opacity"),rt=!fe.layout.get("circle-sort-key").isConstant();if(Ee.constantOr(1)===0&&(Fe.constantOr(1)===0||Ge.constantOr(1)===0))return;const ct=J.context,pt=ct.gl,xt=J.depthModeForSublayer(0,qn.ReadOnly),Mt=_i.disabled,Tt=J.colorModeForRenderPass(),jt=[];for(let Et=0;Et<xe.length;Et++){const Jt=xe[Et],Kt=oe.getTile(Jt),Yt=Kt.getBucket(fe);if(!Yt)continue;const da=Yt.programConfigurations.get(fe.id),_a=J.useProgram("circle",da),Da=Yt.layoutVertexBuffer,Na=Yt.indexBuffer,Ga=J.style.map.terrain&&J.style.map.terrain.getTerrainData(Jt),$a={programConfiguration:da,program:_a,layoutVertexBuffer:Da,indexBuffer:Na,uniformValues:Ua(J,Jt,Kt,fe),terrainData:Ga};if(rt){const gr=Yt.segments.get();for(const Qa of gr)jt.push({segments:new r.a0([Qa]),sortKey:Qa.sortKey,state:$a})}else jt.push({segments:Yt.segments,sortKey:0,state:$a})}rt&&jt.sort((Et,Jt)=>Et.sortKey-Jt.sortKey);for(const Et of jt){const{programConfiguration:Jt,program:Kt,layoutVertexBuffer:Yt,indexBuffer:da,uniformValues:_a,terrainData:Da}=Et.state,Na=Et.segments;Kt.draw(ct,pt.TRIANGLES,xt,Mt,Tt,xi.disabled,_a,Da,fe.id,Yt,da,Na,fe.paint,J.transform.zoom,Jt)}})(u,f,D,V);break;case"heatmap":zl(u,f,D,V);break;case"line":(function(J,oe,fe,xe){if(J.renderPass!=="translucent")return;const Ee=fe.paint.get("line-opacity"),Fe=fe.paint.get("line-width");if(Ee.constantOr(1)===0||Fe.constantOr(1)===0)return;const Ge=J.depthModeForSublayer(0,qn.ReadOnly),rt=J.colorModeForRenderPass(),ct=fe.paint.get("line-dasharray"),pt=fe.paint.get("line-pattern"),xt=pt.constantOr(1),Mt=fe.paint.get("line-gradient"),Tt=fe.getCrossfadeParameters(),jt=xt?"linePattern":ct?"lineSDF":Mt?"lineGradient":"line",Et=J.context,Jt=Et.gl;let Kt=!0;for(const Yt of xe){const da=oe.getTile(Yt);if(xt&&!da.patternsLoaded())continue;const _a=da.getBucket(fe);if(!_a)continue;const Da=_a.programConfigurations.get(fe.id),Na=J.context.program.get(),Ga=J.useProgram(jt,Da),$a=Kt||Ga.program!==Na,gr=J.style.map.terrain&&J.style.map.terrain.getTerrainData(Yt),Qa=pt.constantOr(null);if(Qa&&da.imageAtlas){const Sr=da.imageAtlas,pr=Sr.patternPositions[Qa.to.toString()],Mr=Sr.patternPositions[Qa.from.toString()];pr&&Mr&&Da.setConstantPatternPositions(pr,Mr)}const xr=gr?Yt:null,nr=xt?Ja(J,da,fe,Tt,xr):ct?lr(J,da,fe,ct,Tt,xr):Mt?Sa(J,da,fe,_a.lineClipsArray.length,xr):oa(J,da,fe,xr);if(xt)Et.activeTexture.set(Jt.TEXTURE0),da.imageAtlasTexture.bind(Jt.LINEAR,Jt.CLAMP_TO_EDGE),Da.updatePaintBuffers(Tt);else if(ct&&($a||J.lineAtlas.dirty))Et.activeTexture.set(Jt.TEXTURE0),J.lineAtlas.bind(Et);else if(Mt){const Sr=_a.gradients[fe.id];let pr=Sr.texture;if(fe.gradientVersion!==Sr.version){let Mr=256;if(fe.stepInterpolant){const Wr=oe.getSource().maxzoom,Er=Yt.canonical.z===Wr?Math.ceil(1<<J.transform.maxZoom-Yt.canonical.z):1,Gr=_a.maxLineLength/r.X*1024*Er;Mr=r.ad(r.aV(Gr),256,Et.maxTextureSize)}Sr.gradient=r.aW({expression:fe.gradientExpression(),evaluationKey:"lineProgress",resolution:Mr,image:Sr.gradient||void 0,clips:_a.lineClipsArray}),Sr.texture?Sr.texture.update(Sr.gradient):Sr.texture=new z(Et,Sr.gradient,Jt.RGBA),Sr.version=fe.gradientVersion,pr=Sr.texture}Et.activeTexture.set(Jt.TEXTURE0),pr.bind(fe.stepInterpolant?Jt.NEAREST:Jt.LINEAR,Jt.CLAMP_TO_EDGE)}Ga.draw(Et,Jt.TRIANGLES,Ge,J.stencilModeForClipping(Yt),rt,xi.disabled,nr,gr,fe.id,_a.layoutVertexBuffer,_a.indexBuffer,_a.segments,fe.paint,J.transform.zoom,Da,_a.layoutVertexBuffer2),Kt=!1}})(u,f,D,V);break;case"fill":(function(J,oe,fe,xe){const Ee=fe.paint.get("fill-color"),Fe=fe.paint.get("fill-opacity");if(Fe.constantOr(1)===0)return;const Ge=J.colorModeForRenderPass(),rt=fe.paint.get("fill-pattern"),ct=J.opaquePassEnabledForLayer()&&!rt.constantOr(1)&&Ee.constantOr(r.aN.transparent).a===1&&Fe.constantOr(0)===1?"opaque":"translucent";if(J.renderPass===ct){const pt=J.depthModeForSublayer(1,J.renderPass==="opaque"?qn.ReadWrite:qn.ReadOnly);Bc(J,oe,fe,xe,pt,Ge,!1)}if(J.renderPass==="translucent"&&fe.paint.get("fill-antialias")){const pt=J.depthModeForSublayer(fe.getPaintProperty("fill-outline-color")?2:0,qn.ReadOnly);Bc(J,oe,fe,xe,pt,Ge,!0)}})(u,f,D,V);break;case"fill-extrusion":(function(J,oe,fe,xe){const Ee=fe.paint.get("fill-extrusion-opacity");if(Ee!==0&&J.renderPass==="translucent"){const Fe=new qn(J.context.gl.LEQUAL,qn.ReadWrite,J.depthRangeFor3D);if(Ee!==1||fe.paint.get("fill-extrusion-pattern").constantOr(1))wc(J,oe,fe,xe,Fe,_i.disabled,Qi.disabled),wc(J,oe,fe,xe,Fe,J.stencilModeFor3D(),J.colorModeForRenderPass());else{const Ge=J.colorModeForRenderPass();wc(J,oe,fe,xe,Fe,_i.disabled,Ge)}}})(u,f,D,V);break;case"hillshade":(function(J,oe,fe,xe){if(J.renderPass!=="offscreen"&&J.renderPass!=="translucent")return;const Ee=J.context,Fe=J.depthModeForSublayer(0,qn.ReadOnly),Ge=J.colorModeForRenderPass(),[rt,ct]=J.renderPass==="translucent"?J.stencilConfigForOverlap(xe):[{},xe];for(const pt of ct){const xt=oe.getTile(pt);xt.needsHillshadePrepare!==void 0&&xt.needsHillshadePrepare&&J.renderPass==="offscreen"?gu(J,xt,fe,Fe,_i.disabled,Ge):J.renderPass==="translucent"&&kc(J,pt,xt,fe,Fe,rt[pt.overscaledZ],Ge)}Ee.viewport.set([0,0,J.width,J.height])})(u,f,D,V);break;case"raster":(function(J,oe,fe,xe){if(J.renderPass!=="translucent"||fe.paint.get("raster-opacity")===0||!xe.length)return;const Ee=J.context,Fe=Ee.gl,Ge=oe.getSource(),rt=J.useProgram("raster"),ct=J.colorModeForRenderPass(),[pt,xt]=Ge instanceof Ie?[{},xe]:J.stencilConfigForOverlap(xe),Mt=xt[xt.length-1].overscaledZ,Tt=!J.options.moving;for(const jt of xt){const Et=J.depthModeForSublayer(jt.overscaledZ-Mt,fe.paint.get("raster-opacity")===1?qn.ReadWrite:qn.ReadOnly,Fe.LESS),Jt=oe.getTile(jt);Jt.registerFadeDuration(fe.paint.get("raster-fade-duration"));const Kt=oe.findLoadedParent(jt,0),Yt=oe.findLoadedSibling(jt),da=As(Jt,Kt||Yt||null,oe,fe,J.transform,J.style.map.terrain);let _a,Da;const Na=fe.paint.get("raster-resampling")==="nearest"?Fe.NEAREST:Fe.LINEAR;Ee.activeTexture.set(Fe.TEXTURE0),Jt.texture.bind(Na,Fe.CLAMP_TO_EDGE,Fe.LINEAR_MIPMAP_NEAREST),Ee.activeTexture.set(Fe.TEXTURE1),Kt?(Kt.texture.bind(Na,Fe.CLAMP_TO_EDGE,Fe.LINEAR_MIPMAP_NEAREST),_a=Math.pow(2,Kt.tileID.overscaledZ-Jt.tileID.overscaledZ),Da=[Jt.tileID.canonical.x*_a%1,Jt.tileID.canonical.y*_a%1]):Jt.texture.bind(Na,Fe.CLAMP_TO_EDGE,Fe.LINEAR_MIPMAP_NEAREST),Jt.texture.useMipmap&&Ee.extTextureFilterAnisotropic&&J.transform.pitch>20&&Fe.texParameterf(Fe.TEXTURE_2D,Ee.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,Ee.extTextureFilterAnisotropicMax);const Ga=J.style.map.terrain&&J.style.map.terrain.getTerrainData(jt),$a=Ga?jt:null,gr=$a?$a.posMatrix:J.transform.calculatePosMatrix(jt.toUnwrapped(),Tt),Qa=Ar(gr,Da||[0,0],_a||1,da,fe);Ge instanceof Ie?rt.draw(Ee,Fe.TRIANGLES,Et,_i.disabled,ct,xi.disabled,Qa,Ga,fe.id,Ge.boundsBuffer,J.quadTriangleIndexBuffer,Ge.boundsSegments):rt.draw(Ee,Fe.TRIANGLES,Et,pt[jt.overscaledZ],ct,xi.disabled,Qa,Ga,fe.id,J.rasterBoundsBuffer,J.quadTriangleIndexBuffer,J.rasterBoundsSegments)}})(u,f,D,V);break;case"background":(function(J,oe,fe,xe){const Ee=fe.paint.get("background-color"),Fe=fe.paint.get("background-opacity");if(Fe===0)return;const Ge=J.context,rt=Ge.gl,ct=J.transform,pt=ct.tileSize,xt=fe.paint.get("background-pattern");if(J.isPatternMissing(xt))return;const Mt=!xt&&Ee.a===1&&Fe===1&&J.opaquePassEnabledForLayer()?"opaque":"translucent";if(J.renderPass!==Mt)return;const Tt=_i.disabled,jt=J.depthModeForSublayer(0,Mt==="opaque"?qn.ReadWrite:qn.ReadOnly),Et=J.colorModeForRenderPass(),Jt=J.useProgram(xt?"backgroundPattern":"background"),Kt=xe||ct.coveringTiles({tileSize:pt,terrain:J.style.map.terrain});xt&&(Ge.activeTexture.set(rt.TEXTURE0),J.imageManager.bind(J.context));const Yt=fe.getCrossfadeParameters();for(const da of Kt){const _a=xe?da.posMatrix:J.transform.calculatePosMatrix(da.toUnwrapped()),Da=xt?Kr(_a,Fe,J,xt,{tileID:da,tileSize:pt},Yt):Or(_a,Fe,Ee),Na=J.style.map.terrain&&J.style.map.terrain.getTerrainData(da);Jt.draw(Ge,rt.TRIANGLES,jt,Tt,Et,xi.disabled,Da,Na,fe.id,J.tileExtentBuffer,J.quadTriangleIndexBuffer,J.tileExtentSegments)}})(u,0,D,V);break;case"custom":(function(J,oe,fe){const xe=J.context,Ee=fe.implementation;if(J.renderPass==="offscreen"){const Fe=Ee.prerender;Fe&&(J.setCustomLayerDefaults(),xe.setColorMode(J.colorModeForRenderPass()),Fe.call(Ee,xe.gl,J.transform.customLayerMatrix()),xe.setDirty(),J.setBaseState())}else if(J.renderPass==="translucent"){J.setCustomLayerDefaults(),xe.setColorMode(J.colorModeForRenderPass()),xe.setStencilMode(_i.disabled);const Fe=Ee.renderingMode==="3d"?new qn(J.context.gl.LEQUAL,qn.ReadWrite,J.depthRangeFor3D):J.depthModeForSublayer(0,qn.ReadOnly);xe.setDepthMode(Fe),Ee.render(xe.gl,J.transform.customLayerMatrix(),{farZ:J.transform.farZ,nearZ:J.transform.nearZ,fov:J.transform._fov,modelViewProjectionMatrix:J.transform.modelViewProjectionMatrix,projectionMatrix:J.transform.projectionMatrix}),xe.setDirty(),J.setBaseState(),xe.bindFramebuffer.set(null)}})(u,0,D)}}translatePosMatrix(u,f,D,V,J){if(!D[0]&&!D[1])return u;const oe=J?V==="map"?this.transform.angle:0:V==="viewport"?-this.transform.angle:0;if(oe){const Ee=Math.sin(oe),Fe=Math.cos(oe);D=[D[0]*Fe-D[1]*Ee,D[0]*Ee+D[1]*Fe]}const fe=[J?D[0]:St(f,D[0],this.transform.zoom),J?D[1]:St(f,D[1],this.transform.zoom),0],xe=new Float32Array(16);return r.J(xe,u,fe),xe}saveTileTexture(u){const f=this._tileTextures[u.size[0]];f?f.push(u):this._tileTextures[u.size[0]]=[u]}getTileTexture(u){const f=this._tileTextures[u];return f&&f.length>0?f.pop():null}isPatternMissing(u){if(!u)return!1;if(!u.from||!u.to)return!0;const f=this.imageManager.getPattern(u.from.toString()),D=this.imageManager.getPattern(u.to.toString());return!f||!D}useProgram(u,f){this.cache=this.cache||{};const D=u+(f?f.cacheKey:"")+(this._showOverdrawInspector?"/overdraw":"")+(this.style.map.terrain?"/terrain":"");return this.cache[D]||(this.cache[D]=new tr(this.context,br[u],f,jr[u],this._showOverdrawInspector,this.style.map.terrain)),this.cache[D]}setCustomLayerDefaults(){this.context.unbindVAO(),this.context.cullFace.setDefault(),this.context.activeTexture.setDefault(),this.context.pixelStoreUnpack.setDefault(),this.context.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.context.pixelStoreUnpackFlipY.setDefault()}setBaseState(){const u=this.context.gl;this.context.cullFace.set(!1),this.context.viewport.set([0,0,this.width,this.height]),this.context.blendEquation.set(u.FUNC_ADD)}initDebugOverlayCanvas(){if(this.debugOverlayCanvas==null){this.debugOverlayCanvas=document.createElement("canvas"),this.debugOverlayCanvas.width=512,this.debugOverlayCanvas.height=512;const u=this.context.gl;this.debugOverlayTexture=new z(this.context,this.debugOverlayCanvas,u.RGBA)}}destroy(){this.debugOverlayTexture&&this.debugOverlayTexture.destroy()}overLimit(){const{drawingBufferWidth:u,drawingBufferHeight:f}=this.context.gl;return this.width!==u||this.height!==f}}class Zs{constructor(u,f){this.points=u,this.planes=f}static fromInvProjectionMatrix(u,f,D){const V=Math.pow(2,D),J=[[-1,1,-1,1],[1,1,-1,1],[1,-1,-1,1],[-1,-1,-1,1],[-1,1,1,1],[1,1,1,1],[1,-1,1,1],[-1,-1,1,1]].map(fe=>{const xe=1/(fe=r.ag([],fe,u))[3]/f*V;return r.b1(fe,fe,[xe,xe,1/fe[3],xe])}),oe=[[0,1,2],[6,5,4],[0,3,7],[2,1,5],[3,2,6],[0,4,5]].map(fe=>{const xe=function(rt,ct){var pt=ct[0],xt=ct[1],Mt=ct[2],Tt=pt*pt+xt*xt+Mt*Mt;return Tt>0&&(Tt=1/Math.sqrt(Tt)),rt[0]=ct[0]*Tt,rt[1]=ct[1]*Tt,rt[2]=ct[2]*Tt,rt}([],function(rt,ct,pt){var xt=ct[0],Mt=ct[1],Tt=ct[2],jt=pt[0],Et=pt[1],Jt=pt[2];return rt[0]=Mt*Jt-Tt*Et,rt[1]=Tt*jt-xt*Jt,rt[2]=xt*Et-Mt*jt,rt}([],L([],J[fe[0]],J[fe[1]]),L([],J[fe[2]],J[fe[1]]))),Ee=(Fe=xe,Ge=J[fe[1]],-(Fe[0]*Ge[0]+Fe[1]*Ge[1]+Fe[2]*Ge[2]));var Fe,Ge;return xe.concat(Ee)});return new Zs(J,oe)}}class Ms{constructor(u,f){this.min=u,this.max=f,this.center=function(D,V,J){return D[0]=V[0]*J,D[1]=V[1]*J,D[2]=V[2]*J,D}([],function(D,V,J){return D[0]=V[0]+J[0],D[1]=V[1]+J[1],D[2]=V[2]+J[2],D}([],this.min,this.max),.5)}quadrant(u){const f=[u%2==0,u<2],D=A(this.min),V=A(this.max);for(let J=0;J<f.length;J++)D[J]=f[J]?this.min[J]:this.center[J],V[J]=f[J]?this.center[J]:this.max[J];return V[2]=this.max[2],new Ms(D,V)}distanceX(u){return Math.max(Math.min(this.max[0],u[0]),this.min[0])-u[0]}distanceY(u){return Math.max(Math.min(this.max[1],u[1]),this.min[1])-u[1]}intersects(u){const f=[[this.min[0],this.min[1],this.min[2],1],[this.max[0],this.min[1],this.min[2],1],[this.max[0],this.max[1],this.min[2],1],[this.min[0],this.max[1],this.min[2],1],[this.min[0],this.min[1],this.max[2],1],[this.max[0],this.min[1],this.max[2],1],[this.max[0],this.max[1],this.max[2],1],[this.min[0],this.max[1],this.max[2],1]];let D=!0;for(let V=0;V<u.planes.length;V++){const J=u.planes[V];let oe=0;for(let fe=0;fe<f.length;fe++)r.b2(J,f[fe])>=0&&oe++;if(oe===0)return 0;oe!==f.length&&(D=!1)}if(D)return 2;for(let V=0;V<3;V++){let J=Number.MAX_VALUE,oe=-Number.MAX_VALUE;for(let fe=0;fe<u.points.length;fe++){const xe=u.points[fe][V]-this.min[V];J=Math.min(J,xe),oe=Math.max(oe,xe)}if(oe<0||J>this.max[V]-this.min[V])return 0}return 1}}class Nl{constructor(u=0,f=0,D=0,V=0){if(isNaN(u)||u<0||isNaN(f)||f<0||isNaN(D)||D<0||isNaN(V)||V<0)throw new Error("Invalid value for edge-insets, top, bottom, left and right must all be numbers");this.top=u,this.bottom=f,this.left=D,this.right=V}interpolate(u,f,D){return f.top!=null&&u.top!=null&&(this.top=r.z.number(u.top,f.top,D)),f.bottom!=null&&u.bottom!=null&&(this.bottom=r.z.number(u.bottom,f.bottom,D)),f.left!=null&&u.left!=null&&(this.left=r.z.number(u.left,f.left,D)),f.right!=null&&u.right!=null&&(this.right=r.z.number(u.right,f.right,D)),this}getCenter(u,f){const D=r.ad((this.left+u-this.right)/2,0,u),V=r.ad((this.top+f-this.bottom)/2,0,f);return new r.P(D,V)}equals(u){return this.top===u.top&&this.bottom===u.bottom&&this.left===u.left&&this.right===u.right}clone(){return new Nl(this.top,this.bottom,this.left,this.right)}toJSON(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}}}const Cc=85.051129;class di{constructor(u,f,D,V,J){this.tileSize=512,this._renderWorldCopies=J===void 0||!!J,this._minZoom=u||0,this._maxZoom=f||22,this._minPitch=D??0,this._maxPitch=V??60,this.setMaxBounds(),this.width=0,this.height=0,this._center=new r.N(0,0),this._elevation=0,this.zoom=0,this.angle=0,this._fov=.6435011087932844,this._pitch=0,this._unmodified=!0,this._edgeInsets=new Nl,this._posMatrixCache={},this._alignedPosMatrixCache={},this._fogMatrixCache={},this.minElevationForCurrentTile=0}clone(){const u=new di(this._minZoom,this._maxZoom,this._minPitch,this.maxPitch,this._renderWorldCopies);return u.apply(this),u}apply(u){this.tileSize=u.tileSize,this.latRange=u.latRange,this.width=u.width,this.height=u.height,this._center=u._center,this._elevation=u._elevation,this.minElevationForCurrentTile=u.minElevationForCurrentTile,this.zoom=u.zoom,this.angle=u.angle,this._fov=u._fov,this._pitch=u._pitch,this._unmodified=u._unmodified,this._edgeInsets=u._edgeInsets.clone(),this._calcMatrices()}get minZoom(){return this._minZoom}set minZoom(u){this._minZoom!==u&&(this._minZoom=u,this.zoom=Math.max(this.zoom,u))}get maxZoom(){return this._maxZoom}set maxZoom(u){this._maxZoom!==u&&(this._maxZoom=u,this.zoom=Math.min(this.zoom,u))}get minPitch(){return this._minPitch}set minPitch(u){this._minPitch!==u&&(this._minPitch=u,this.pitch=Math.max(this.pitch,u))}get maxPitch(){return this._maxPitch}set maxPitch(u){this._maxPitch!==u&&(this._maxPitch=u,this.pitch=Math.min(this.pitch,u))}get renderWorldCopies(){return this._renderWorldCopies}set renderWorldCopies(u){u===void 0?u=!0:u===null&&(u=!1),this._renderWorldCopies=u}get worldSize(){return this.tileSize*this.scale}get centerOffset(){return this.centerPoint._sub(this.size._div(2))}get size(){return new r.P(this.width,this.height)}get bearing(){return-this.angle/Math.PI*180}set bearing(u){const f=-r.b3(u,-180,180)*Math.PI/180;this.angle!==f&&(this._unmodified=!1,this.angle=f,this._calcMatrices(),this.rotationMatrix=function(){var D=new r.A(4);return r.A!=Float32Array&&(D[1]=0,D[2]=0),D[0]=1,D[3]=1,D}(),function(D,V,J){var oe=V[0],fe=V[1],xe=V[2],Ee=V[3],Fe=Math.sin(J),Ge=Math.cos(J);D[0]=oe*Ge+xe*Fe,D[1]=fe*Ge+Ee*Fe,D[2]=oe*-Fe+xe*Ge,D[3]=fe*-Fe+Ee*Ge}(this.rotationMatrix,this.rotationMatrix,this.angle))}get pitch(){return this._pitch/Math.PI*180}set pitch(u){const f=r.ad(u,this.minPitch,this.maxPitch)/180*Math.PI;this._pitch!==f&&(this._unmodified=!1,this._pitch=f,this._calcMatrices())}get fov(){return this._fov/Math.PI*180}set fov(u){u=Math.max(.01,Math.min(60,u)),this._fov!==u&&(this._unmodified=!1,this._fov=u/180*Math.PI,this._calcMatrices())}get zoom(){return this._zoom}set zoom(u){const f=Math.min(Math.max(u,this.minZoom),this.maxZoom);this._zoom!==f&&(this._unmodified=!1,this._zoom=f,this.tileZoom=Math.max(0,Math.floor(f)),this.scale=this.zoomScale(f),this._constrain(),this._calcMatrices())}get center(){return this._center}set center(u){u.lat===this._center.lat&&u.lng===this._center.lng||(this._unmodified=!1,this._center=u,this._constrain(),this._calcMatrices())}get elevation(){return this._elevation}set elevation(u){u!==this._elevation&&(this._elevation=u,this._constrain(),this._calcMatrices())}get padding(){return this._edgeInsets.toJSON()}set padding(u){this._edgeInsets.equals(u)||(this._unmodified=!1,this._edgeInsets.interpolate(this._edgeInsets,u,1),this._calcMatrices())}get centerPoint(){return this._edgeInsets.getCenter(this.width,this.height)}isPaddingEqual(u){return this._edgeInsets.equals(u)}interpolatePadding(u,f,D){this._unmodified=!1,this._edgeInsets.interpolate(u,f,D),this._constrain(),this._calcMatrices()}coveringZoomLevel(u){const f=(u.roundZoom?Math.round:Math.floor)(this.zoom+this.scaleZoom(this.tileSize/u.tileSize));return Math.max(0,f)}getVisibleUnwrappedCoordinates(u){const f=[new r.b4(0,u)];if(this._renderWorldCopies){const D=this.pointCoordinate(new r.P(0,0)),V=this.pointCoordinate(new r.P(this.width,0)),J=this.pointCoordinate(new r.P(this.width,this.height)),oe=this.pointCoordinate(new r.P(0,this.height)),fe=Math.floor(Math.min(D.x,V.x,J.x,oe.x)),xe=Math.floor(Math.max(D.x,V.x,J.x,oe.x)),Ee=1;for(let Fe=fe-Ee;Fe<=xe+Ee;Fe++)Fe!==0&&f.push(new r.b4(Fe,u))}return f}coveringTiles(u){var f,D;let V=this.coveringZoomLevel(u);const J=V;if(u.minzoom!==void 0&&V<u.minzoom)return[];u.maxzoom!==void 0&&V>u.maxzoom&&(V=u.maxzoom);const oe=this.pointCoordinate(this.getCameraPoint()),fe=r.Z.fromLngLat(this.center),xe=Math.pow(2,V),Ee=[xe*oe.x,xe*oe.y,0],Fe=[xe*fe.x,xe*fe.y,0],Ge=Zs.fromInvProjectionMatrix(this.invModelViewProjectionMatrix,this.worldSize,V);let rt=u.minzoom||0;!u.terrain&&this.pitch<=60&&this._edgeInsets.top<.1&&(rt=V);const ct=u.terrain?2/Math.min(this.tileSize,u.tileSize)*this.tileSize:3,pt=Et=>({aabb:new Ms([Et*xe,0,0],[(Et+1)*xe,xe,0]),zoom:0,x:0,y:0,wrap:Et,fullyVisible:!1}),xt=[],Mt=[],Tt=V,jt=u.reparseOverscaled?J:V;if(this._renderWorldCopies)for(let Et=1;Et<=3;Et++)xt.push(pt(-Et)),xt.push(pt(Et));for(xt.push(pt(0));xt.length>0;){const Et=xt.pop(),Jt=Et.x,Kt=Et.y;let Yt=Et.fullyVisible;if(!Yt){const $a=Et.aabb.intersects(Ge);if($a===0)continue;Yt=$a===2}const da=u.terrain?Ee:Fe,_a=Et.aabb.distanceX(da),Da=Et.aabb.distanceY(da),Na=Math.max(Math.abs(_a),Math.abs(Da)),Ga=ct+(1<<Tt-Et.zoom)-2;if(Et.zoom===Tt||Na>Ga&&Et.zoom>=rt){const $a=Tt-Et.zoom,gr=Ee[0]-.5-(Jt<<$a),Qa=Ee[1]-.5-(Kt<<$a);Mt.push({tileID:new r.S(Et.zoom===Tt?jt:Et.zoom,Et.wrap,Et.zoom,Jt,Kt),distanceSq:T([Fe[0]-.5-Jt,Fe[1]-.5-Kt]),tileDistanceToCamera:Math.sqrt(gr*gr+Qa*Qa)})}else for(let $a=0;$a<4;$a++){const gr=(Jt<<1)+$a%2,Qa=(Kt<<1)+($a>>1),xr=Et.zoom+1;let nr=Et.aabb.quadrant($a);if(u.terrain){const Sr=new r.S(xr,Et.wrap,xr,gr,Qa),pr=u.terrain.getMinMaxElevation(Sr),Mr=(f=pr.minElevation)!==null&&f!==void 0?f:this.elevation,Wr=(D=pr.maxElevation)!==null&&D!==void 0?D:this.elevation;nr=new Ms([nr.min[0],nr.min[1],Mr],[nr.max[0],nr.max[1],Wr])}xt.push({aabb:nr,zoom:xr,x:gr,y:Qa,wrap:Et.wrap,fullyVisible:Yt})}}return Mt.sort((Et,Jt)=>Et.distanceSq-Jt.distanceSq).map(Et=>Et.tileID)}resize(u,f){this.width=u,this.height=f,this.pixelsToGLUnits=[2/u,-2/f],this._constrain(),this._calcMatrices()}get unmodified(){return this._unmodified}zoomScale(u){return Math.pow(2,u)}scaleZoom(u){return Math.log(u)/Math.LN2}project(u){const f=r.ad(u.lat,-85.051129,Cc);return new r.P(r.O(u.lng)*this.worldSize,r.Q(f)*this.worldSize)}unproject(u){return new r.Z(u.x/this.worldSize,u.y/this.worldSize).toLngLat()}get point(){return this.project(this.center)}getCameraPosition(){return{lngLat:this.pointLocation(this.getCameraPoint()),altitude:Math.cos(this._pitch)*this.cameraToCenterDistance/this._pixelPerMeter+this.elevation}}recalculateZoom(u){const f=this.elevation,D=Math.cos(this._pitch)*this.cameraToCenterDistance/this._pixelPerMeter,V=this.pointLocation(this.centerPoint,u),J=u.getElevationForLngLatZoom(V,this.tileZoom);if(!(this.elevation-J))return;const oe=D+f-J,fe=Math.cos(this._pitch)*this.cameraToCenterDistance/oe/r.b5(1,V.lat)/this.tileSize,xe=this.scaleZoom(fe);this._elevation=J,this._center=V,this.zoom=xe}setLocationAtPoint(u,f){const D=this.pointCoordinate(f),V=this.pointCoordinate(this.centerPoint),J=this.locationCoordinate(u),oe=new r.Z(J.x-(D.x-V.x),J.y-(D.y-V.y));this.center=this.coordinateLocation(oe),this._renderWorldCopies&&(this.center=this.center.wrap())}locationPoint(u,f){return f?this.coordinatePoint(this.locationCoordinate(u),f.getElevationForLngLatZoom(u,this.tileZoom),this.pixelMatrix3D):this.coordinatePoint(this.locationCoordinate(u))}pointLocation(u,f){return this.coordinateLocation(this.pointCoordinate(u,f))}locationCoordinate(u){return r.Z.fromLngLat(u)}coordinateLocation(u){return u&&u.toLngLat()}pointCoordinate(u,f){if(f){const pt=f.pointCoordinate(u);if(pt!=null)return pt}const D=[u.x,u.y,0,1],V=[u.x,u.y,1,1];r.ag(D,D,this.pixelMatrixInverse),r.ag(V,V,this.pixelMatrixInverse);const J=D[3],oe=V[3],fe=D[0]/J,xe=V[0]/oe,Ee=D[1]/J,Fe=V[1]/oe,Ge=D[2]/J,rt=V[2]/oe,ct=Ge===rt?0:(0-Ge)/(rt-Ge);return new r.Z(r.z.number(fe,xe,ct)/this.worldSize,r.z.number(Ee,Fe,ct)/this.worldSize)}coordinatePoint(u,f=0,D=this.pixelMatrix){const V=[u.x*this.worldSize,u.y*this.worldSize,f,1];return r.ag(V,V,D),new r.P(V[0]/V[3],V[1]/V[3])}getBounds(){const u=Math.max(0,this.height/2-this.getHorizon());return new Ce().extend(this.pointLocation(new r.P(0,u))).extend(this.pointLocation(new r.P(this.width,u))).extend(this.pointLocation(new r.P(this.width,this.height))).extend(this.pointLocation(new r.P(0,this.height)))}getMaxBounds(){return this.latRange&&this.latRange.length===2&&this.lngRange&&this.lngRange.length===2?new Ce([this.lngRange[0],this.latRange[0]],[this.lngRange[1],this.latRange[1]]):null}getHorizon(){return Math.tan(Math.PI/2-this._pitch)*this.cameraToCenterDistance*.85}setMaxBounds(u){u?(this.lngRange=[u.getWest(),u.getEast()],this.latRange=[u.getSouth(),u.getNorth()],this._constrain()):(this.lngRange=null,this.latRange=[-85.051129,Cc])}calculateTileMatrix(u){const f=u.canonical,D=this.worldSize/this.zoomScale(f.z),V=f.x+Math.pow(2,f.z)*u.wrap,J=r.ao(new Float64Array(16));return r.J(J,J,[V*D,f.y*D,0]),r.K(J,J,[D/r.X,D/r.X,1]),J}calculatePosMatrix(u,f=!1){const D=u.key,V=f?this._alignedPosMatrixCache:this._posMatrixCache;if(V[D])return V[D];const J=this.calculateTileMatrix(u);return r.L(J,f?this.alignedModelViewProjectionMatrix:this.modelViewProjectionMatrix,J),V[D]=new Float32Array(J),V[D]}calculateFogMatrix(u){const f=u.key,D=this._fogMatrixCache;if(D[f])return D[f];const V=this.calculateTileMatrix(u);return r.L(V,this.fogMatrix,V),D[f]=new Float32Array(V),D[f]}customLayerMatrix(){return this.mercatorMatrix.slice()}getConstrained(u,f){f=r.ad(+f,this.minZoom,this.maxZoom);const D={center:new r.N(u.lng,u.lat),zoom:f};let V=this.lngRange;if(!this._renderWorldCopies&&V===null){const Et=179.9999999999;V=[-Et,Et]}const J=this.tileSize*this.zoomScale(D.zoom);let oe=0,fe=J,xe=0,Ee=J,Fe=0,Ge=0;const{x:rt,y:ct}=this.size;if(this.latRange){const Et=this.latRange;oe=r.Q(Et[1])*J,fe=r.Q(Et[0])*J,fe-oe<ct&&(Fe=ct/(fe-oe))}V&&(xe=r.b3(r.O(V[0])*J,0,J),Ee=r.b3(r.O(V[1])*J,0,J),Ee<xe&&(Ee+=J),Ee-xe<rt&&(Ge=rt/(Ee-xe)));const{x:pt,y:xt}=this.project.call({worldSize:J},u);let Mt,Tt;const jt=Math.max(Ge||0,Fe||0);if(jt){const Et=new r.P(Ge?(Ee+xe)/2:pt,Fe?(fe+oe)/2:xt);return D.center=this.unproject.call({worldSize:J},Et).wrap(),D.zoom+=this.scaleZoom(jt),D}if(this.latRange){const Et=ct/2;xt-Et<oe&&(Tt=oe+Et),xt+Et>fe&&(Tt=fe-Et)}if(V){const Et=(xe+Ee)/2;let Jt=pt;this._renderWorldCopies&&(Jt=r.b3(pt,Et-J/2,Et+J/2));const Kt=rt/2;Jt-Kt<xe&&(Mt=xe+Kt),Jt+Kt>Ee&&(Mt=Ee-Kt)}if(Mt!==void 0||Tt!==void 0){const Et=new r.P(Mt??pt,Tt??xt);D.center=this.unproject.call({worldSize:J},Et).wrap()}return D}_constrain(){if(!this.center||!this.width||!this.height||this._constraining)return;this._constraining=!0;const u=this._unmodified,{center:f,zoom:D}=this.getConstrained(this.center,this.zoom);this.center=f,this.zoom=D,this._unmodified=u,this._constraining=!1}_calcMatrices(){if(!this.height)return;const u=this._fov/2,f=this.centerOffset,D=this.point.x,V=this.point.y;this.cameraToCenterDistance=.5/Math.tan(u)*this.height,this._pixelPerMeter=r.b5(1,this.center.lat)*this.worldSize;let J=r.ao(new Float64Array(16));r.K(J,J,[this.width/2,-this.height/2,1]),r.J(J,J,[1,-1,0]),this.labelPlaneMatrix=J,J=r.ao(new Float64Array(16)),r.K(J,J,[1,-1,1]),r.J(J,J,[-1,-1,0]),r.K(J,J,[2/this.width,2/this.height,1]),this.glCoordMatrix=J;const oe=this.cameraToCenterDistance+this._elevation*this._pixelPerMeter/Math.cos(this._pitch),fe=Math.min(this.elevation,this.minElevationForCurrentTile),xe=oe-fe*this._pixelPerMeter/Math.cos(this._pitch),Ee=fe<0?xe:oe,Fe=Math.PI/2+this._pitch,Ge=this._fov*(.5+f.y/this.height),rt=Math.sin(Ge)*Ee/Math.sin(r.ad(Math.PI-Fe-Ge,.01,Math.PI-.01)),ct=this.getHorizon(),pt=2*Math.atan(ct/this.cameraToCenterDistance)*(.5+f.y/(2*ct)),xt=Math.sin(pt)*Ee/Math.sin(r.ad(Math.PI-Fe-pt,.01,Math.PI-.01)),Mt=Math.min(rt,xt);this.farZ=1.01*(Math.cos(Math.PI/2-this._pitch)*Mt+Ee),this.nearZ=this.height/50,J=new Float64Array(16),r.b6(J,this._fov,this.width/this.height,this.nearZ,this.farZ),J[8]=2*-f.x/this.width,J[9]=2*f.y/this.height,this.projectionMatrix=r.af(J),r.K(J,J,[1,-1,1]),r.J(J,J,[0,0,-this.cameraToCenterDistance]),r.b7(J,J,this._pitch),r.ae(J,J,this.angle),r.J(J,J,[-D,-V,0]),this.mercatorMatrix=r.K([],J,[this.worldSize,this.worldSize,this.worldSize]),r.K(J,J,[1,1,this._pixelPerMeter]),this.pixelMatrix=r.L(new Float64Array(16),this.labelPlaneMatrix,J),r.J(J,J,[0,0,-this.elevation]),this.modelViewProjectionMatrix=J,this.invModelViewProjectionMatrix=r.at([],J),this.fogMatrix=new Float64Array(16),r.b6(this.fogMatrix,this._fov,this.width/this.height,oe,this.farZ),this.fogMatrix[8]=2*-f.x/this.width,this.fogMatrix[9]=2*f.y/this.height,r.K(this.fogMatrix,this.fogMatrix,[1,-1,1]),r.J(this.fogMatrix,this.fogMatrix,[0,0,-this.cameraToCenterDistance]),r.b7(this.fogMatrix,this.fogMatrix,this._pitch),r.ae(this.fogMatrix,this.fogMatrix,this.angle),r.J(this.fogMatrix,this.fogMatrix,[-D,-V,0]),r.K(this.fogMatrix,this.fogMatrix,[1,1,this._pixelPerMeter]),r.J(this.fogMatrix,this.fogMatrix,[0,0,-this.elevation]),this.pixelMatrix3D=r.L(new Float64Array(16),this.labelPlaneMatrix,J);const Tt=this.width%2/2,jt=this.height%2/2,Et=Math.cos(this.angle),Jt=Math.sin(this.angle),Kt=D-Math.round(D)+Et*Tt+Jt*jt,Yt=V-Math.round(V)+Et*jt+Jt*Tt,da=new Float64Array(J);if(r.J(da,da,[Kt>.5?Kt-1:Kt,Yt>.5?Yt-1:Yt,0]),this.alignedModelViewProjectionMatrix=da,J=r.at(new Float64Array(16),this.pixelMatrix),!J)throw new Error("failed to invert matrix");this.pixelMatrixInverse=J,this._posMatrixCache={},this._alignedPosMatrixCache={},this._fogMatrixCache={}}maxPitchScaleFactor(){if(!this.pixelMatrixInverse)return 1;const u=this.pointCoordinate(new r.P(0,0)),f=[u.x*this.worldSize,u.y*this.worldSize,0,1];return r.ag(f,f,this.pixelMatrix)[3]/this.cameraToCenterDistance}getCameraPoint(){const u=this._pitch,f=Math.tan(u)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new r.P(0,f))}getCameraQueryGeometry(u){const f=this.getCameraPoint();if(u.length===1)return[u[0],f];{let D=f.x,V=f.y,J=f.x,oe=f.y;for(const fe of u)D=Math.min(D,fe.x),V=Math.min(V,fe.y),J=Math.max(J,fe.x),oe=Math.max(oe,fe.y);return[new r.P(D,V),new r.P(J,V),new r.P(J,oe),new r.P(D,oe),new r.P(D,V)]}}lngLatToCameraDepth(u,f){const D=this.locationCoordinate(u),V=[D.x*this.worldSize,D.y*this.worldSize,f,1];return r.ag(V,V,this.modelViewProjectionMatrix),V[2]/V[3]}}function Ws(R,u){let f,D=!1,V=null,J=null;const oe=()=>{V=null,D&&(R.apply(J,f),V=setTimeout(oe,u),D=!1)};return(...fe)=>(D=!0,J=this,f=fe,V||oe(),V)}class eo{constructor(u){this._getCurrentHash=()=>{const f=window.location.hash.replace("#","");if(this._hashName){let D;return f.split("&").map(V=>V.split("=")).forEach(V=>{V[0]===this._hashName&&(D=V)}),(D&&D[1]||"").split("/")}return f.split("/")},this._onHashChange=()=>{const f=this._getCurrentHash();if(f.length>=3&&!f.some(D=>isNaN(D))){const D=this._map.dragRotate.isEnabled()&&this._map.touchZoomRotate.isEnabled()?+(f[3]||0):this._map.getBearing();return this._map.jumpTo({center:[+f[2],+f[1]],zoom:+f[0],bearing:D,pitch:+(f[4]||0)}),!0}return!1},this._updateHashUnthrottled=()=>{const f=window.location.href.replace(/(#.+)?$/,this.getHashString());window.history.replaceState(window.history.state,null,f)},this._removeHash=()=>{const f=this._getCurrentHash();if(f.length===0)return;const D=f.join("/");let V=D;V.split("&").length>0&&(V=V.split("&")[0]),this._hashName&&(V=`${this._hashName}=${D}`);let J=window.location.hash.replace(V,"");J.startsWith("#&")?J=J.slice(0,1)+J.slice(2):J==="#"&&(J="");let oe=window.location.href.replace(/(#.+)?$/,J);oe=oe.replace("&&","&"),window.history.replaceState(window.history.state,null,oe)},this._updateHash=Ws(this._updateHashUnthrottled,300),this._hashName=u&&encodeURIComponent(u)}addTo(u){return this._map=u,addEventListener("hashchange",this._onHashChange,!1),this._map.on("moveend",this._updateHash),this}remove(){return removeEventListener("hashchange",this._onHashChange,!1),this._map.off("moveend",this._updateHash),clearTimeout(this._updateHash()),this._removeHash(),delete this._map,this}getHashString(u){const f=this._map.getCenter(),D=Math.round(100*this._map.getZoom())/100,V=Math.ceil((D*Math.LN2+Math.log(512/360/.5))/Math.LN10),J=Math.pow(10,V),oe=Math.round(f.lng*J)/J,fe=Math.round(f.lat*J)/J,xe=this._map.getBearing(),Ee=this._map.getPitch();let Fe="";if(Fe+=u?`/${oe}/${fe}/${D}`:`${D}/${fe}/${oe}`,(xe||Ee)&&(Fe+="/"+Math.round(10*xe)/10),Ee&&(Fe+=`/${Math.round(Ee)}`),this._hashName){const Ge=this._hashName;let rt=!1;const ct=window.location.hash.slice(1).split("&").map(pt=>{const xt=pt.split("=")[0];return xt===Ge?(rt=!0,`${xt}=${Fe}`):pt}).filter(pt=>pt);return rt||ct.push(`${Ge}=${Fe}`),`#${ct.join("&")}`}return`#${Fe}`}}const Xo={linearity:.3,easing:r.b8(0,0,.3,1)},li=r.e({deceleration:2500,maxSpeed:1400},Xo),hi=r.e({deceleration:20,maxSpeed:1400},Xo),Is=r.e({deceleration:1e3,maxSpeed:360},Xo),Tc=r.e({deceleration:1e3,maxSpeed:90},Xo);class dc{constructor(u){this._map=u,this.clear()}clear(){this._inertiaBuffer=[]}record(u){this._drainInertiaBuffer(),this._inertiaBuffer.push({time:h.now(),settings:u})}_drainInertiaBuffer(){const u=this._inertiaBuffer,f=h.now();for(;u.length>0&&f-u[0].time>160;)u.shift()}_onMoveEnd(u){if(this._drainInertiaBuffer(),this._inertiaBuffer.length<2)return;const f={zoom:0,bearing:0,pitch:0,pan:new r.P(0,0),pinchAround:void 0,around:void 0};for(const{settings:J}of this._inertiaBuffer)f.zoom+=J.zoomDelta||0,f.bearing+=J.bearingDelta||0,f.pitch+=J.pitchDelta||0,J.panDelta&&f.pan._add(J.panDelta),J.around&&(f.around=J.around),J.pinchAround&&(f.pinchAround=J.pinchAround);const D=this._inertiaBuffer[this._inertiaBuffer.length-1].time-this._inertiaBuffer[0].time,V={};if(f.pan.mag()){const J=Xl(f.pan.mag(),D,r.e({},li,u||{}));V.offset=f.pan.mult(J.amount/f.pan.mag()),V.center=this._map.transform.center,Yl(V,J)}if(f.zoom){const J=Xl(f.zoom,D,hi);V.zoom=this._map.transform.zoom+J.amount,Yl(V,J)}if(f.bearing){const J=Xl(f.bearing,D,Is);V.bearing=this._map.transform.bearing+r.ad(J.amount,-179,179),Yl(V,J)}if(f.pitch){const J=Xl(f.pitch,D,Tc);V.pitch=this._map.transform.pitch+J.amount,Yl(V,J)}if(V.zoom||V.bearing){const J=f.pinchAround===void 0?f.around:f.pinchAround;V.around=J?this._map.unproject(J):this._map.getCenter()}return this.clear(),r.e(V,{noMoveStart:!0})}}function Yl(R,u){(!R.duration||R.duration<u.duration)&&(R.duration=u.duration,R.easing=u.easing)}function Xl(R,u,f){const{maxSpeed:D,linearity:V,deceleration:J}=f,oe=r.ad(R*V/(u/1e3),-D,D),fe=Math.abs(oe)/(J*V);return{easing:f.easing,duration:1e3*fe,amount:oe*(fe/2)}}class Bo extends r.k{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(u,f,D,V={}){const J=n.mousePos(f.getCanvas(),D),oe=f.unproject(J);super(u,r.e({point:J,lngLat:oe,originalEvent:D},V)),this._defaultPrevented=!1,this.target=f}}class ko extends r.k{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(u,f,D){const V=u==="touchend"?D.changedTouches:D.touches,J=n.touchPos(f.getCanvasContainer(),V),oe=J.map(xe=>f.unproject(xe)),fe=J.reduce((xe,Ee,Fe,Ge)=>xe.add(Ee.div(Ge.length)),new r.P(0,0));super(u,{points:J,point:fe,lngLats:oe,lngLat:f.unproject(fe),originalEvent:D}),this._defaultPrevented=!1}}class il extends r.k{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(u,f,D){super(u,{originalEvent:D}),this._defaultPrevented=!1}}class hc{constructor(u,f){this._map=u,this._clickTolerance=f.clickTolerance}reset(){delete this._mousedownPos}wheel(u){return this._firePreventable(new il(u.type,this._map,u))}mousedown(u,f){return this._mousedownPos=f,this._firePreventable(new Bo(u.type,this._map,u))}mouseup(u){this._map.fire(new Bo(u.type,this._map,u))}click(u,f){this._mousedownPos&&this._mousedownPos.dist(f)>=this._clickTolerance||this._map.fire(new Bo(u.type,this._map,u))}dblclick(u){return this._firePreventable(new Bo(u.type,this._map,u))}mouseover(u){this._map.fire(new Bo(u.type,this._map,u))}mouseout(u){this._map.fire(new Bo(u.type,this._map,u))}touchstart(u){return this._firePreventable(new ko(u.type,this._map,u))}touchmove(u){this._map.fire(new ko(u.type,this._map,u))}touchend(u){this._map.fire(new ko(u.type,this._map,u))}touchcancel(u){this._map.fire(new ko(u.type,this._map,u))}_firePreventable(u){if(this._map.fire(u),u.defaultPrevented)return{}}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class Ro{constructor(u){this._map=u}reset(){this._delayContextMenu=!1,this._ignoreContextMenu=!0,delete this._contextMenuEvent}mousemove(u){this._map.fire(new Bo(u.type,this._map,u))}mousedown(){this._delayContextMenu=!0,this._ignoreContextMenu=!1}mouseup(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new Bo("contextmenu",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)}contextmenu(u){this._delayContextMenu?this._contextMenuEvent=u:this._ignoreContextMenu||this._map.fire(new Bo(u.type,this._map,u)),this._map.listens("contextmenu")&&u.preventDefault()}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class Ci{constructor(u){this._map=u}get transform(){return this._map._requestedCameraState||this._map.transform}get center(){return{lng:this.transform.center.lng,lat:this.transform.center.lat}}get zoom(){return this.transform.zoom}get pitch(){return this.transform.pitch}get bearing(){return this.transform.bearing}unproject(u){return this.transform.pointLocation(r.P.convert(u),this._map.terrain)}}class So{constructor(u,f){this._map=u,this._tr=new Ci(u),this._el=u.getCanvasContainer(),this._container=u.getContainer(),this._clickTolerance=f.clickTolerance||1}isEnabled(){return!!this._enabled}isActive(){return!!this._active}enable(){this.isEnabled()||(this._enabled=!0)}disable(){this.isEnabled()&&(this._enabled=!1)}mousedown(u,f){this.isEnabled()&&u.shiftKey&&u.button===0&&(n.disableDrag(),this._startPos=this._lastPos=f,this._active=!0)}mousemoveWindow(u,f){if(!this._active)return;const D=f;if(this._lastPos.equals(D)||!this._box&&D.dist(this._startPos)<this._clickTolerance)return;const V=this._startPos;this._lastPos=D,this._box||(this._box=n.create("div","maplibregl-boxzoom",this._container),this._container.classList.add("maplibregl-crosshair"),this._fireEvent("boxzoomstart",u));const J=Math.min(V.x,D.x),oe=Math.max(V.x,D.x),fe=Math.min(V.y,D.y),xe=Math.max(V.y,D.y);n.setTransform(this._box,`translate(${J}px,${fe}px)`),this._box.style.width=oe-J+"px",this._box.style.height=xe-fe+"px"}mouseupWindow(u,f){if(!this._active||u.button!==0)return;const D=this._startPos,V=f;if(this.reset(),n.suppressClick(),D.x!==V.x||D.y!==V.y)return this._map.fire(new r.k("boxzoomend",{originalEvent:u})),{cameraAnimation:J=>J.fitScreenCoordinates(D,V,this._tr.bearing,{linear:!0})};this._fireEvent("boxzoomcancel",u)}keydown(u){this._active&&u.keyCode===27&&(this.reset(),this._fireEvent("boxzoomcancel",u))}reset(){this._active=!1,this._container.classList.remove("maplibregl-crosshair"),this._box&&(n.remove(this._box),this._box=null),n.enableDrag(),delete this._startPos,delete this._lastPos}_fireEvent(u,f){return this._map.fire(new r.k(u,{originalEvent:f}))}}function gi(R,u){if(R.length!==u.length)throw new Error(`The number of touches and points are not equal - touches ${R.length}, points ${u.length}`);const f={};for(let D=0;D<R.length;D++)f[R[D].identifier]=u[D];return f}class to{constructor(u){this.reset(),this.numTouches=u.numTouches}reset(){delete this.centroid,delete this.startTime,delete this.touches,this.aborted=!1}touchstart(u,f,D){(this.centroid||D.length>this.numTouches)&&(this.aborted=!0),this.aborted||(this.startTime===void 0&&(this.startTime=u.timeStamp),D.length===this.numTouches&&(this.centroid=function(V){const J=new r.P(0,0);for(const oe of V)J._add(oe);return J.div(V.length)}(f),this.touches=gi(D,f)))}touchmove(u,f,D){if(this.aborted||!this.centroid)return;const V=gi(D,f);for(const J in this.touches){const oe=this.touches[J],fe=V[J];(!fe||fe.dist(oe)>30)&&(this.aborted=!0)}}touchend(u,f,D){if((!this.centroid||u.timeStamp-this.startTime>500)&&(this.aborted=!0),D.length===0){const V=!this.aborted&&this.centroid;if(this.reset(),V)return V}}}class yi{constructor(u){this.singleTap=new to(u),this.numTaps=u.numTaps,this.reset()}reset(){this.lastTime=1/0,delete this.lastTap,this.count=0,this.singleTap.reset()}touchstart(u,f,D){this.singleTap.touchstart(u,f,D)}touchmove(u,f,D){this.singleTap.touchmove(u,f,D)}touchend(u,f,D){const V=this.singleTap.touchend(u,f,D);if(V){const J=u.timeStamp-this.lastTime<500,oe=!this.lastTap||this.lastTap.dist(V)<30;if(J&&oe||this.reset(),this.count++,this.lastTime=u.timeStamp,this.lastTap=V,this.count===this.numTaps)return this.reset(),V}}}class mo{constructor(u){this._tr=new Ci(u),this._zoomIn=new yi({numTouches:1,numTaps:2}),this._zoomOut=new yi({numTouches:2,numTaps:1}),this.reset()}reset(){this._active=!1,this._zoomIn.reset(),this._zoomOut.reset()}touchstart(u,f,D){this._zoomIn.touchstart(u,f,D),this._zoomOut.touchstart(u,f,D)}touchmove(u,f,D){this._zoomIn.touchmove(u,f,D),this._zoomOut.touchmove(u,f,D)}touchend(u,f,D){const V=this._zoomIn.touchend(u,f,D),J=this._zoomOut.touchend(u,f,D),oe=this._tr;return V?(this._active=!0,u.preventDefault(),setTimeout(()=>this.reset(),0),{cameraAnimation:fe=>fe.easeTo({duration:300,zoom:oe.zoom+1,around:oe.unproject(V)},{originalEvent:u})}):J?(this._active=!0,u.preventDefault(),setTimeout(()=>this.reset(),0),{cameraAnimation:fe=>fe.easeTo({duration:300,zoom:oe.zoom-1,around:oe.unproject(J)},{originalEvent:u})}):void 0}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class Co{constructor(u){this._enabled=!!u.enable,this._moveStateManager=u.moveStateManager,this._clickTolerance=u.clickTolerance||1,this._moveFunction=u.move,this._activateOnStart=!!u.activateOnStart,u.assignEvents(this),this.reset()}reset(u){this._active=!1,this._moved=!1,delete this._lastPoint,this._moveStateManager.endMove(u)}_move(...u){const f=this._moveFunction(...u);if(f.bearingDelta||f.pitchDelta||f.around||f.panDelta)return this._active=!0,f}dragStart(u,f){this.isEnabled()&&!this._lastPoint&&this._moveStateManager.isValidStartEvent(u)&&(this._moveStateManager.startMove(u),this._lastPoint=f.length?f[0]:f,this._activateOnStart&&this._lastPoint&&(this._active=!0))}dragMove(u,f){if(!this.isEnabled())return;const D=this._lastPoint;if(!D)return;if(u.preventDefault(),!this._moveStateManager.isValidMoveEvent(u))return void this.reset(u);const V=f.length?f[0]:f;return!this._moved&&V.dist(D)<this._clickTolerance?void 0:(this._moved=!0,this._lastPoint=V,this._move(D,V))}dragEnd(u){this.isEnabled()&&this._lastPoint&&this._moveStateManager.isValidEndEvent(u)&&(this._moved&&n.suppressClick(),this.reset(u))}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}getClickTolerance(){return this._clickTolerance}}const ol={0:1,2:2};class cs{constructor(u){this._correctEvent=u.checkCorrectEvent}startMove(u){const f=n.mouseButton(u);this._eventButton=f}endMove(u){delete this._eventButton}isValidStartEvent(u){return this._correctEvent(u)}isValidMoveEvent(u){return!function(f,D){const V=ol[D];return f.buttons===void 0||(f.buttons&V)!==V}(u,this._eventButton)}isValidEndEvent(u){return n.mouseButton(u)===this._eventButton}}class Fl{constructor(){this._firstTouch=void 0}_isOneFingerTouch(u){return u.targetTouches.length===1}_isSameTouchEvent(u){return u.targetTouches[0].identifier===this._firstTouch}startMove(u){const f=u.targetTouches[0].identifier;this._firstTouch=f}endMove(u){delete this._firstTouch}isValidStartEvent(u){return this._isOneFingerTouch(u)}isValidMoveEvent(u){return this._isOneFingerTouch(u)&&this._isSameTouchEvent(u)}isValidEndEvent(u){return this._isOneFingerTouch(u)&&this._isSameTouchEvent(u)}}const zo=R=>{R.mousedown=R.dragStart,R.mousemoveWindow=R.dragMove,R.mouseup=R.dragEnd,R.contextmenu=u=>{u.preventDefault()}},$l=({enable:R,clickTolerance:u,bearingDegreesPerPixelMoved:f=.8})=>{const D=new cs({checkCorrectEvent:V=>n.mouseButton(V)===0&&V.ctrlKey||n.mouseButton(V)===2});return new Co({clickTolerance:u,move:(V,J)=>({bearingDelta:(J.x-V.x)*f}),moveStateManager:D,enable:R,assignEvents:zo})},sl=({enable:R,clickTolerance:u,pitchDegreesPerPixelMoved:f=-.5})=>{const D=new cs({checkCorrectEvent:V=>n.mouseButton(V)===0&&V.ctrlKey||n.mouseButton(V)===2});return new Co({clickTolerance:u,move:(V,J)=>({pitchDelta:(J.y-V.y)*f}),moveStateManager:D,enable:R,assignEvents:zo})};class Ps{constructor(u,f){this._clickTolerance=u.clickTolerance||1,this._map=f,this.reset()}reset(){this._active=!1,this._touches={},this._sum=new r.P(0,0)}_shouldBePrevented(u){return u<(this._map.cooperativeGestures.isEnabled()?2:1)}touchstart(u,f,D){return this._calculateTransform(u,f,D)}touchmove(u,f,D){if(this._active){if(!this._shouldBePrevented(D.length))return u.preventDefault(),this._calculateTransform(u,f,D);this._map.cooperativeGestures.notifyGestureBlocked("touch_pan",u)}}touchend(u,f,D){this._calculateTransform(u,f,D),this._active&&this._shouldBePrevented(D.length)&&this.reset()}touchcancel(){this.reset()}_calculateTransform(u,f,D){D.length>0&&(this._active=!0);const V=gi(D,f),J=new r.P(0,0),oe=new r.P(0,0);let fe=0;for(const Ee in V){const Fe=V[Ee],Ge=this._touches[Ee];Ge&&(J._add(Fe),oe._add(Fe.sub(Ge)),fe++,V[Ee]=Fe)}if(this._touches=V,this._shouldBePrevented(fe)||!oe.mag())return;const xe=oe.div(fe);return this._sum._add(xe),this._sum.mag()<this._clickTolerance?void 0:{around:J.div(fe),panDelta:xe}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class go{constructor(){this.reset()}reset(){this._active=!1,delete this._firstTwoTouches}touchstart(u,f,D){this._firstTwoTouches||D.length<2||(this._firstTwoTouches=[D[0].identifier,D[1].identifier],this._start([f[0],f[1]]))}touchmove(u,f,D){if(!this._firstTwoTouches)return;u.preventDefault();const[V,J]=this._firstTwoTouches,oe=vi(D,f,V),fe=vi(D,f,J);if(!oe||!fe)return;const xe=this._aroundCenter?null:oe.add(fe).div(2);return this._move([oe,fe],xe,u)}touchend(u,f,D){if(!this._firstTwoTouches)return;const[V,J]=this._firstTwoTouches,oe=vi(D,f,V),fe=vi(D,f,J);oe&&fe||(this._active&&n.suppressClick(),this.reset())}touchcancel(){this.reset()}enable(u){this._enabled=!0,this._aroundCenter=!!u&&u.around==="center"}disable(){this._enabled=!1,this.reset()}isEnabled(){return!!this._enabled}isActive(){return!!this._active}}function vi(R,u,f){for(let D=0;D<R.length;D++)if(R[D].identifier===f)return u[D]}function Ls(R,u){return Math.log(R/u)/Math.LN2}class gn extends go{reset(){super.reset(),delete this._distance,delete this._startDistance}_start(u){this._startDistance=this._distance=u[0].dist(u[1])}_move(u,f){const D=this._distance;if(this._distance=u[0].dist(u[1]),this._active||!(Math.abs(Ls(this._distance,this._startDistance))<.1))return this._active=!0,{zoomDelta:Ls(this._distance,D),pinchAround:f}}}function Ac(R,u){return 180*R.angleWith(u)/Math.PI}class Jc extends go{reset(){super.reset(),delete this._minDiameter,delete this._startVector,delete this._vector}_start(u){this._startVector=this._vector=u[0].sub(u[1]),this._minDiameter=u[0].dist(u[1])}_move(u,f,D){const V=this._vector;if(this._vector=u[0].sub(u[1]),this._active||!this._isBelowThreshold(this._vector))return this._active=!0,{bearingDelta:Ac(this._vector,V),pinchAround:f}}_isBelowThreshold(u){this._minDiameter=Math.min(this._minDiameter,u.mag());const f=25/(Math.PI*this._minDiameter)*360,D=Ac(u,this._startVector);return Math.abs(D)<f}}function ll(R){return Math.abs(R.y)>Math.abs(R.x)}class Rl extends go{constructor(u){super(),this._currentTouchCount=0,this._map=u}reset(){super.reset(),this._valid=void 0,delete this._firstMove,delete this._lastPoints}touchstart(u,f,D){super.touchstart(u,f,D),this._currentTouchCount=D.length}_start(u){this._lastPoints=u,ll(u[0].sub(u[1]))&&(this._valid=!1)}_move(u,f,D){if(this._map.cooperativeGestures.isEnabled()&&this._currentTouchCount<3)return;const V=u[0].sub(this._lastPoints[0]),J=u[1].sub(this._lastPoints[1]);return this._valid=this.gestureBeginsVertically(V,J,D.timeStamp),this._valid?(this._lastPoints=u,this._active=!0,{pitchDelta:(V.y+J.y)/2*-.5}):void 0}gestureBeginsVertically(u,f,D){if(this._valid!==void 0)return this._valid;const V=u.mag()>=2,J=f.mag()>=2;if(!V&&!J)return;if(!V||!J)return this._firstMove===void 0&&(this._firstMove=D),D-this._firstMove<100&&void 0;const oe=u.y>0==f.y>0;return ll(u)&&ll(f)&&oe}}const Cl={panStep:100,bearingStep:15,pitchStep:10};class pc{constructor(u){this._tr=new Ci(u);const f=Cl;this._panStep=f.panStep,this._bearingStep=f.bearingStep,this._pitchStep=f.pitchStep,this._rotationDisabled=!1}reset(){this._active=!1}keydown(u){if(u.altKey||u.ctrlKey||u.metaKey)return;let f=0,D=0,V=0,J=0,oe=0;switch(u.keyCode){case 61:case 107:case 171:case 187:f=1;break;case 189:case 109:case 173:f=-1;break;case 37:u.shiftKey?D=-1:(u.preventDefault(),J=-1);break;case 39:u.shiftKey?D=1:(u.preventDefault(),J=1);break;case 38:u.shiftKey?V=1:(u.preventDefault(),oe=-1);break;case 40:u.shiftKey?V=-1:(u.preventDefault(),oe=1);break;default:return}return this._rotationDisabled&&(D=0,V=0),{cameraAnimation:fe=>{const xe=this._tr;fe.easeTo({duration:300,easeId:"keyboardHandler",easing:Zr,zoom:f?Math.round(xe.zoom)+f*(u.shiftKey?2:1):xe.zoom,bearing:xe.bearing+D*this._bearingStep,pitch:xe.pitch+V*this._pitchStep,offset:[-J*this._panStep,-oe*this._panStep],center:xe.center},{originalEvent:u})}}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}disableRotation(){this._rotationDisabled=!0}enableRotation(){this._rotationDisabled=!1}}function Zr(R){return R*(2-R)}const us=4.000244140625;class cl{constructor(u,f){this._onTimeout=D=>{this._type="wheel",this._delta-=this._lastValue,this._active||this._start(D)},this._map=u,this._tr=new Ci(u),this._triggerRenderFrame=f,this._delta=0,this._defaultZoomRate=.01,this._wheelZoomRate=.0022222222222222222}setZoomRate(u){this._defaultZoomRate=u}setWheelZoomRate(u){this._wheelZoomRate=u}isEnabled(){return!!this._enabled}isActive(){return!!this._active||this._finishTimeout!==void 0}isZooming(){return!!this._zooming}enable(u){this.isEnabled()||(this._enabled=!0,this._aroundCenter=!!u&&u.around==="center")}disable(){this.isEnabled()&&(this._enabled=!1)}_shouldBePrevented(u){return!!this._map.cooperativeGestures.isEnabled()&&!(u.ctrlKey||this._map.cooperativeGestures.isBypassed(u))}wheel(u){if(!this.isEnabled())return;if(this._shouldBePrevented(u))return void this._map.cooperativeGestures.notifyGestureBlocked("wheel_zoom",u);let f=u.deltaMode===WheelEvent.DOM_DELTA_LINE?40*u.deltaY:u.deltaY;const D=h.now(),V=D-(this._lastWheelEventTime||0);this._lastWheelEventTime=D,f!==0&&f%us==0?this._type="wheel":f!==0&&Math.abs(f)<4?this._type="trackpad":V>400?(this._type=null,this._lastValue=f,this._timeout=setTimeout(this._onTimeout,40,u)):this._type||(this._type=Math.abs(V*f)<200?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,f+=this._lastValue)),u.shiftKey&&f&&(f/=4),this._type&&(this._lastWheelEvent=u,this._delta-=f,this._active||this._start(u)),u.preventDefault()}_start(u){if(!this._delta)return;this._frameId&&(this._frameId=null),this._active=!0,this.isZooming()||(this._zooming=!0),this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout);const f=n.mousePos(this._map.getCanvas(),u),D=this._tr;f.y>D.transform.height/2-D.transform.getHorizon()?this._around=r.N.convert(this._aroundCenter?D.center:D.unproject(f)):this._around=r.N.convert(D.center),this._aroundPoint=D.transform.locationPoint(this._around),this._frameId||(this._frameId=!0,this._triggerRenderFrame())}renderFrame(){if(!this._frameId||(this._frameId=null,!this.isActive()))return;const u=this._tr.transform;if(this._delta!==0){const xe=this._type==="wheel"&&Math.abs(this._delta)>us?this._wheelZoomRate:this._defaultZoomRate;let Ee=2/(1+Math.exp(-Math.abs(this._delta*xe)));this._delta<0&&Ee!==0&&(Ee=1/Ee);const Fe=typeof this._targetZoom=="number"?u.zoomScale(this._targetZoom):u.scale;this._targetZoom=Math.min(u.maxZoom,Math.max(u.minZoom,u.scaleZoom(Fe*Ee))),this._type==="wheel"&&(this._startZoom=u.zoom,this._easing=this._smoothOutEasing(200)),this._delta=0}const f=typeof this._targetZoom=="number"?this._targetZoom:u.zoom,D=this._startZoom,V=this._easing;let J,oe=!1;const fe=h.now()-this._lastWheelEventTime;if(this._type==="wheel"&&D&&V&&fe){const xe=Math.min(fe/200,1),Ee=V(xe);J=r.z.number(D,f,Ee),xe<1?this._frameId||(this._frameId=!0):oe=!0}else J=f,oe=!0;return this._active=!0,oe&&(this._active=!1,this._finishTimeout=setTimeout(()=>{this._zooming=!1,this._triggerRenderFrame(),delete this._targetZoom,delete this._finishTimeout},200)),{noInertia:!0,needsRenderFrame:!oe,zoomDelta:J-u.zoom,around:this._aroundPoint,originalEvent:this._lastWheelEvent}}_smoothOutEasing(u){let f=r.b9;if(this._prevEase){const D=this._prevEase,V=(h.now()-D.start)/D.duration,J=D.easing(V+.01)-D.easing(V),oe=.27/Math.sqrt(J*J+1e-4)*.01,fe=Math.sqrt(.0729-oe*oe);f=r.b8(oe,fe,.25,1)}return this._prevEase={start:h.now(),duration:u,easing:f},f}reset(){this._active=!1,this._zooming=!1,delete this._targetZoom,this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout)}}class Ti{constructor(u,f){this._clickZoom=u,this._tapZoom=f}enable(){this._clickZoom.enable(),this._tapZoom.enable()}disable(){this._clickZoom.disable(),this._tapZoom.disable()}isEnabled(){return this._clickZoom.isEnabled()&&this._tapZoom.isEnabled()}isActive(){return this._clickZoom.isActive()||this._tapZoom.isActive()}}class $o{constructor(u){this._tr=new Ci(u),this.reset()}reset(){this._active=!1}dblclick(u,f){return u.preventDefault(),{cameraAnimation:D=>{D.easeTo({duration:300,zoom:this._tr.zoom+(u.shiftKey?-1:1),around:this._tr.unproject(f)},{originalEvent:u})}}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class ul{constructor(){this._tap=new yi({numTouches:1,numTaps:1}),this.reset()}reset(){this._active=!1,delete this._swipePoint,delete this._swipeTouch,delete this._tapTime,delete this._tapPoint,this._tap.reset()}touchstart(u,f,D){if(!this._swipePoint)if(this._tapTime){const V=f[0],J=u.timeStamp-this._tapTime<500,oe=this._tapPoint.dist(V)<30;J&&oe?D.length>0&&(this._swipePoint=V,this._swipeTouch=D[0].identifier):this.reset()}else this._tap.touchstart(u,f,D)}touchmove(u,f,D){if(this._tapTime){if(this._swipePoint){if(D[0].identifier!==this._swipeTouch)return;const V=f[0],J=V.y-this._swipePoint.y;return this._swipePoint=V,u.preventDefault(),this._active=!0,{zoomDelta:J/128}}}else this._tap.touchmove(u,f,D)}touchend(u,f,D){if(this._tapTime)this._swipePoint&&D.length===0&&this.reset();else{const V=this._tap.touchend(u,f,D);V&&(this._tapTime=u.timeStamp,this._tapPoint=V)}}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class Bs{constructor(u,f,D){this._el=u,this._mousePan=f,this._touchPan=D}enable(u){this._inertiaOptions=u||{},this._mousePan.enable(),this._touchPan.enable(),this._el.classList.add("maplibregl-touch-drag-pan")}disable(){this._mousePan.disable(),this._touchPan.disable(),this._el.classList.remove("maplibregl-touch-drag-pan")}isEnabled(){return this._mousePan.isEnabled()&&this._touchPan.isEnabled()}isActive(){return this._mousePan.isActive()||this._touchPan.isActive()}}class Vo{constructor(u,f,D){this._pitchWithRotate=u.pitchWithRotate,this._mouseRotate=f,this._mousePitch=D}enable(){this._mouseRotate.enable(),this._pitchWithRotate&&this._mousePitch.enable()}disable(){this._mouseRotate.disable(),this._mousePitch.disable()}isEnabled(){return this._mouseRotate.isEnabled()&&(!this._pitchWithRotate||this._mousePitch.isEnabled())}isActive(){return this._mouseRotate.isActive()||this._mousePitch.isActive()}}class dl{constructor(u,f,D,V){this._el=u,this._touchZoom=f,this._touchRotate=D,this._tapDragZoom=V,this._rotationDisabled=!1,this._enabled=!0}enable(u){this._touchZoom.enable(u),this._rotationDisabled||this._touchRotate.enable(u),this._tapDragZoom.enable(),this._el.classList.add("maplibregl-touch-zoom-rotate")}disable(){this._touchZoom.disable(),this._touchRotate.disable(),this._tapDragZoom.disable(),this._el.classList.remove("maplibregl-touch-zoom-rotate")}isEnabled(){return this._touchZoom.isEnabled()&&(this._rotationDisabled||this._touchRotate.isEnabled())&&this._tapDragZoom.isEnabled()}isActive(){return this._touchZoom.isActive()||this._touchRotate.isActive()||this._tapDragZoom.isActive()}disableRotation(){this._rotationDisabled=!0,this._touchRotate.disable()}enableRotation(){this._rotationDisabled=!1,this._touchZoom.isEnabled()&&this._touchRotate.enable()}}class ys{constructor(u,f){this._bypassKey=navigator.userAgent.indexOf("Mac")!==-1?"metaKey":"ctrlKey",this._map=u,this._options=f,this._enabled=!1}isActive(){return!1}reset(){}_setupUI(){if(this._container)return;const u=this._map.getCanvasContainer();u.classList.add("maplibregl-cooperative-gestures"),this._container=n.create("div","maplibregl-cooperative-gesture-screen",u);let f=this._map._getUIString("CooperativeGesturesHandler.WindowsHelpText");this._bypassKey==="metaKey"&&(f=this._map._getUIString("CooperativeGesturesHandler.MacHelpText"));const D=this._map._getUIString("CooperativeGesturesHandler.MobileHelpText"),V=document.createElement("div");V.className="maplibregl-desktop-message",V.textContent=f,this._container.appendChild(V);const J=document.createElement("div");J.className="maplibregl-mobile-message",J.textContent=D,this._container.appendChild(J),this._container.setAttribute("aria-hidden","true")}_destroyUI(){this._container&&(n.remove(this._container),this._map.getCanvasContainer().classList.remove("maplibregl-cooperative-gestures")),delete this._container}enable(){this._setupUI(),this._enabled=!0}disable(){this._enabled=!1,this._destroyUI()}isEnabled(){return this._enabled}isBypassed(u){return u[this._bypassKey]}notifyGestureBlocked(u,f){this._enabled&&(this._map.fire(new r.k("cooperativegestureprevented",{gestureType:u,originalEvent:f})),this._container.classList.add("maplibregl-show"),setTimeout(()=>{this._container.classList.remove("maplibregl-show")},100))}}const Ko=R=>R.zoom||R.drag||R.pitch||R.rotate;class zs extends r.k{}function hn(R){return R.panDelta&&R.panDelta.mag()||R.zoomDelta||R.bearingDelta||R.pitchDelta}class ni{constructor(u,f){this.handleWindowEvent=V=>{this.handleEvent(V,`${V.type}Window`)},this.handleEvent=(V,J)=>{if(V.type==="blur")return void this.stop(!0);this._updatingCamera=!0;const oe=V.type==="renderFrame"?void 0:V,fe={needsRenderFrame:!1},xe={},Ee={},Fe=V.touches,Ge=Fe?this._getMapTouches(Fe):void 0,rt=Ge?n.touchPos(this._map.getCanvas(),Ge):n.mousePos(this._map.getCanvas(),V);for(const{handlerName:xt,handler:Mt,allowed:Tt}of this._handlers){if(!Mt.isEnabled())continue;let jt;this._blockedByActive(Ee,Tt,xt)?Mt.reset():Mt[J||V.type]&&(jt=Mt[J||V.type](V,rt,Ge),this.mergeHandlerResult(fe,xe,jt,xt,oe),jt&&jt.needsRenderFrame&&this._triggerRenderFrame()),(jt||Mt.isActive())&&(Ee[xt]=Mt)}const ct={};for(const xt in this._previousActiveHandlers)Ee[xt]||(ct[xt]=oe);this._previousActiveHandlers=Ee,(Object.keys(ct).length||hn(fe))&&(this._changes.push([fe,xe,ct]),this._triggerRenderFrame()),(Object.keys(Ee).length||hn(fe))&&this._map._stop(!0),this._updatingCamera=!1;const{cameraAnimation:pt}=fe;pt&&(this._inertia.clear(),this._fireEvents({},{},!0),this._changes=[],pt(this._map))},this._map=u,this._el=this._map.getCanvasContainer(),this._handlers=[],this._handlersById={},this._changes=[],this._inertia=new dc(u),this._bearingSnap=f.bearingSnap,this._previousActiveHandlers={},this._eventsInProgress={},this._addDefaultHandlers(f);const D=this._el;this._listeners=[[D,"touchstart",{passive:!0}],[D,"touchmove",{passive:!1}],[D,"touchend",void 0],[D,"touchcancel",void 0],[D,"mousedown",void 0],[D,"mousemove",void 0],[D,"mouseup",void 0],[document,"mousemove",{capture:!0}],[document,"mouseup",void 0],[D,"mouseover",void 0],[D,"mouseout",void 0],[D,"dblclick",void 0],[D,"click",void 0],[D,"keydown",{capture:!1}],[D,"keyup",void 0],[D,"wheel",{passive:!1}],[D,"contextmenu",void 0],[window,"blur",void 0]];for(const[V,J,oe]of this._listeners)n.addEventListener(V,J,V===document?this.handleWindowEvent:this.handleEvent,oe)}destroy(){for(const[u,f,D]of this._listeners)n.removeEventListener(u,f,u===document?this.handleWindowEvent:this.handleEvent,D)}_addDefaultHandlers(u){const f=this._map,D=f.getCanvasContainer();this._add("mapEvent",new hc(f,u));const V=f.boxZoom=new So(f,u);this._add("boxZoom",V),u.interactive&&u.boxZoom&&V.enable();const J=f.cooperativeGestures=new ys(f,u.cooperativeGestures);this._add("cooperativeGestures",J),u.cooperativeGestures&&J.enable();const oe=new mo(f),fe=new $o(f);f.doubleClickZoom=new Ti(fe,oe),this._add("tapZoom",oe),this._add("clickZoom",fe),u.interactive&&u.doubleClickZoom&&f.doubleClickZoom.enable();const xe=new ul;this._add("tapDragZoom",xe);const Ee=f.touchPitch=new Rl(f);this._add("touchPitch",Ee),u.interactive&&u.touchPitch&&f.touchPitch.enable(u.touchPitch);const Fe=$l(u),Ge=sl(u);f.dragRotate=new Vo(u,Fe,Ge),this._add("mouseRotate",Fe,["mousePitch"]),this._add("mousePitch",Ge,["mouseRotate"]),u.interactive&&u.dragRotate&&f.dragRotate.enable();const rt=(({enable:jt,clickTolerance:Et})=>{const Jt=new cs({checkCorrectEvent:Kt=>n.mouseButton(Kt)===0&&!Kt.ctrlKey});return new Co({clickTolerance:Et,move:(Kt,Yt)=>({around:Yt,panDelta:Yt.sub(Kt)}),activateOnStart:!0,moveStateManager:Jt,enable:jt,assignEvents:zo})})(u),ct=new Ps(u,f);f.dragPan=new Bs(D,rt,ct),this._add("mousePan",rt),this._add("touchPan",ct,["touchZoom","touchRotate"]),u.interactive&&u.dragPan&&f.dragPan.enable(u.dragPan);const pt=new Jc,xt=new gn;f.touchZoomRotate=new dl(D,xt,pt,xe),this._add("touchRotate",pt,["touchPan","touchZoom"]),this._add("touchZoom",xt,["touchPan","touchRotate"]),u.interactive&&u.touchZoomRotate&&f.touchZoomRotate.enable(u.touchZoomRotate);const Mt=f.scrollZoom=new cl(f,()=>this._triggerRenderFrame());this._add("scrollZoom",Mt,["mousePan"]),u.interactive&&u.scrollZoom&&f.scrollZoom.enable(u.scrollZoom);const Tt=f.keyboard=new pc(f);this._add("keyboard",Tt),u.interactive&&u.keyboard&&f.keyboard.enable(),this._add("blockableMapEvent",new Ro(f))}_add(u,f,D){this._handlers.push({handlerName:u,handler:f,allowed:D}),this._handlersById[u]=f}stop(u){if(!this._updatingCamera){for(const{handler:f}of this._handlers)f.reset();this._inertia.clear(),this._fireEvents({},{},u),this._changes=[]}}isActive(){for(const{handler:u}of this._handlers)if(u.isActive())return!0;return!1}isZooming(){return!!this._eventsInProgress.zoom||this._map.scrollZoom.isZooming()}isRotating(){return!!this._eventsInProgress.rotate}isMoving(){return!!Ko(this._eventsInProgress)||this.isZooming()}_blockedByActive(u,f,D){for(const V in u)if(V!==D&&(!f||f.indexOf(V)<0))return!0;return!1}_getMapTouches(u){const f=[];for(const D of u){const V=D.target;this._el.contains(V)&&f.push(D)}return f}mergeHandlerResult(u,f,D,V,J){if(!D)return;r.e(u,D);const oe={handlerName:V,originalEvent:D.originalEvent||J};D.zoomDelta!==void 0&&(f.zoom=oe),D.panDelta!==void 0&&(f.drag=oe),D.pitchDelta!==void 0&&(f.pitch=oe),D.bearingDelta!==void 0&&(f.rotate=oe)}_applyChanges(){const u={},f={},D={};for(const[V,J,oe]of this._changes)V.panDelta&&(u.panDelta=(u.panDelta||new r.P(0,0))._add(V.panDelta)),V.zoomDelta&&(u.zoomDelta=(u.zoomDelta||0)+V.zoomDelta),V.bearingDelta&&(u.bearingDelta=(u.bearingDelta||0)+V.bearingDelta),V.pitchDelta&&(u.pitchDelta=(u.pitchDelta||0)+V.pitchDelta),V.around!==void 0&&(u.around=V.around),V.pinchAround!==void 0&&(u.pinchAround=V.pinchAround),V.noInertia&&(u.noInertia=V.noInertia),r.e(f,J),r.e(D,oe);this._updateMapTransform(u,f,D),this._changes=[]}_updateMapTransform(u,f,D){const V=this._map,J=V._getTransformForUpdate(),oe=V.terrain;if(!(hn(u)||oe&&this._terrainMovement))return this._fireEvents(f,D,!0);let{panDelta:fe,zoomDelta:xe,bearingDelta:Ee,pitchDelta:Fe,around:Ge,pinchAround:rt}=u;rt!==void 0&&(Ge=rt),V._stop(!0),Ge=Ge||V.transform.centerPoint;const ct=J.pointLocation(fe?Ge.sub(fe):Ge);Ee&&(J.bearing+=Ee),Fe&&(J.pitch+=Fe),xe&&(J.zoom+=xe),oe?this._terrainMovement||!f.drag&&!f.zoom?f.drag&&this._terrainMovement?J.center=J.pointLocation(J.centerPoint.sub(fe)):J.setLocationAtPoint(ct,Ge):(this._terrainMovement=!0,this._map._elevationFreeze=!0,J.setLocationAtPoint(ct,Ge)):J.setLocationAtPoint(ct,Ge),V._applyUpdatedTransform(J),this._map._update(),u.noInertia||this._inertia.record(u),this._fireEvents(f,D,!0)}_fireEvents(u,f,D){const V=Ko(this._eventsInProgress),J=Ko(u),oe={};for(const Ge in u){const{originalEvent:rt}=u[Ge];this._eventsInProgress[Ge]||(oe[`${Ge}start`]=rt),this._eventsInProgress[Ge]=u[Ge]}!V&&J&&this._fireEvent("movestart",J.originalEvent);for(const Ge in oe)this._fireEvent(Ge,oe[Ge]);J&&this._fireEvent("move",J.originalEvent);for(const Ge in u){const{originalEvent:rt}=u[Ge];this._fireEvent(Ge,rt)}const fe={};let xe;for(const Ge in this._eventsInProgress){const{handlerName:rt,originalEvent:ct}=this._eventsInProgress[Ge];this._handlersById[rt].isActive()||(delete this._eventsInProgress[Ge],xe=f[rt]||ct,fe[`${Ge}end`]=xe)}for(const Ge in fe)this._fireEvent(Ge,fe[Ge]);const Ee=Ko(this._eventsInProgress),Fe=(V||J)&&!Ee;if(Fe&&this._terrainMovement){this._map._elevationFreeze=!1,this._terrainMovement=!1;const Ge=this._map._getTransformForUpdate();Ge.recalculateZoom(this._map.terrain),this._map._applyUpdatedTransform(Ge)}if(D&&Fe){this._updatingCamera=!0;const Ge=this._inertia._onMoveEnd(this._map.dragPan._inertiaOptions),rt=ct=>ct!==0&&-this._bearingSnap<ct&&ct<this._bearingSnap;!Ge||!Ge.essential&&h.prefersReducedMotion?(this._map.fire(new r.k("moveend",{originalEvent:xe})),rt(this._map.getBearing())&&this._map.resetNorth()):(rt(Ge.bearing||this._map.getBearing())&&(Ge.bearing=0),Ge.freezeElevation=!0,this._map.easeTo(Ge,{originalEvent:xe})),this._updatingCamera=!1}}_fireEvent(u,f){this._map.fire(new r.k(u,f?{originalEvent:f}:{}))}_requestFrame(){return this._map.triggerRepaint(),this._map._renderTaskQueue.add(u=>{delete this._frameId,this.handleEvent(new zs("renderFrame",{timeStamp:u})),this._applyChanges()})}_triggerRenderFrame(){this._frameId===void 0&&(this._frameId=this._requestFrame())}}class ao extends r.E{constructor(u,f){super(),this._renderFrameCallback=()=>{const D=Math.min((h.now()-this._easeStart)/this._easeOptions.duration,1);this._onEaseFrame(this._easeOptions.easing(D)),D<1&&this._easeFrameId?this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback):this.stop()},this._moving=!1,this._zooming=!1,this.transform=u,this._bearingSnap=f.bearingSnap,this.on("moveend",()=>{delete this._requestedCameraState})}getCenter(){return new r.N(this.transform.center.lng,this.transform.center.lat)}setCenter(u,f){return this.jumpTo({center:u},f)}panBy(u,f,D){return u=r.P.convert(u).mult(-1),this.panTo(this.transform.center,r.e({offset:u},f),D)}panTo(u,f,D){return this.easeTo(r.e({center:u},f),D)}getZoom(){return this.transform.zoom}setZoom(u,f){return this.jumpTo({zoom:u},f),this}zoomTo(u,f,D){return this.easeTo(r.e({zoom:u},f),D)}zoomIn(u,f){return this.zoomTo(this.getZoom()+1,u,f),this}zoomOut(u,f){return this.zoomTo(this.getZoom()-1,u,f),this}getBearing(){return this.transform.bearing}setBearing(u,f){return this.jumpTo({bearing:u},f),this}getPadding(){return this.transform.padding}setPadding(u,f){return this.jumpTo({padding:u},f),this}rotateTo(u,f,D){return this.easeTo(r.e({bearing:u},f),D)}resetNorth(u,f){return this.rotateTo(0,r.e({duration:1e3},u),f),this}resetNorthPitch(u,f){return this.easeTo(r.e({bearing:0,pitch:0,duration:1e3},u),f),this}snapToNorth(u,f){return Math.abs(this.getBearing())<this._bearingSnap?this.resetNorth(u,f):this}getPitch(){return this.transform.pitch}setPitch(u,f){return this.jumpTo({pitch:u},f),this}cameraForBounds(u,f){u=Ce.convert(u);const D=f&&f.bearing||0;return this._cameraForBoxAndBearing(u.getNorthWest(),u.getSouthEast(),D,f)}_cameraForBoxAndBearing(u,f,D,V){const J={top:0,bottom:0,right:0,left:0};if(typeof(V=r.e({padding:J,offset:[0,0],maxZoom:this.transform.maxZoom},V)).padding=="number"){const gr=V.padding;V.padding={top:gr,bottom:gr,right:gr,left:gr}}V.padding=r.e(J,V.padding);const oe=this.transform,fe=oe.padding,xe=new Ce(u,f),Ee=oe.project(xe.getNorthWest()),Fe=oe.project(xe.getNorthEast()),Ge=oe.project(xe.getSouthEast()),rt=oe.project(xe.getSouthWest()),ct=r.ba(-D),pt=Ee.rotate(ct),xt=Fe.rotate(ct),Mt=Ge.rotate(ct),Tt=rt.rotate(ct),jt=new r.P(Math.max(pt.x,xt.x,Tt.x,Mt.x),Math.max(pt.y,xt.y,Tt.y,Mt.y)),Et=new r.P(Math.min(pt.x,xt.x,Tt.x,Mt.x),Math.min(pt.y,xt.y,Tt.y,Mt.y)),Jt=jt.sub(Et),Kt=(oe.width-(fe.left+fe.right+V.padding.left+V.padding.right))/Jt.x,Yt=(oe.height-(fe.top+fe.bottom+V.padding.top+V.padding.bottom))/Jt.y;if(Yt<0||Kt<0)return void r.w("Map cannot fit within canvas with the given bounds, padding, and/or offset.");const da=Math.min(oe.scaleZoom(oe.scale*Math.min(Kt,Yt)),V.maxZoom),_a=r.P.convert(V.offset),Da=(V.padding.left-V.padding.right)/2,Na=(V.padding.top-V.padding.bottom)/2,Ga=new r.P(Da,Na).rotate(r.ba(D)),$a=_a.add(Ga).mult(oe.scale/oe.zoomScale(da));return{center:oe.unproject(Ee.add(Ge).div(2).sub($a)),zoom:da,bearing:D}}fitBounds(u,f,D){return this._fitInternal(this.cameraForBounds(u,f),f,D)}fitScreenCoordinates(u,f,D,V,J){return this._fitInternal(this._cameraForBoxAndBearing(this.transform.pointLocation(r.P.convert(u)),this.transform.pointLocation(r.P.convert(f)),D,V),V,J)}_fitInternal(u,f,D){return u?(delete(f=r.e(u,f)).padding,f.linear?this.easeTo(f,D):this.flyTo(f,D)):this}jumpTo(u,f){this.stop();const D=this._getTransformForUpdate();let V=!1,J=!1,oe=!1;return"zoom"in u&&D.zoom!==+u.zoom&&(V=!0,D.zoom=+u.zoom),u.center!==void 0&&(D.center=r.N.convert(u.center)),"bearing"in u&&D.bearing!==+u.bearing&&(J=!0,D.bearing=+u.bearing),"pitch"in u&&D.pitch!==+u.pitch&&(oe=!0,D.pitch=+u.pitch),u.padding==null||D.isPaddingEqual(u.padding)||(D.padding=u.padding),this._applyUpdatedTransform(D),this.fire(new r.k("movestart",f)).fire(new r.k("move",f)),V&&this.fire(new r.k("zoomstart",f)).fire(new r.k("zoom",f)).fire(new r.k("zoomend",f)),J&&this.fire(new r.k("rotatestart",f)).fire(new r.k("rotate",f)).fire(new r.k("rotateend",f)),oe&&this.fire(new r.k("pitchstart",f)).fire(new r.k("pitch",f)).fire(new r.k("pitchend",f)),this.fire(new r.k("moveend",f))}calculateCameraOptionsFromTo(u,f,D,V=0){const J=r.Z.fromLngLat(u,f),oe=r.Z.fromLngLat(D,V),fe=oe.x-J.x,xe=oe.y-J.y,Ee=oe.z-J.z,Fe=Math.hypot(fe,xe,Ee);if(Fe===0)throw new Error("Can't calculate camera options with same From and To");const Ge=Math.hypot(fe,xe),rt=this.transform.scaleZoom(this.transform.cameraToCenterDistance/Fe/this.transform.tileSize),ct=180*Math.atan2(fe,-xe)/Math.PI;let pt=180*Math.acos(Ge/Fe)/Math.PI;return pt=Ee<0?90-pt:90+pt,{center:oe.toLngLat(),zoom:rt,pitch:pt,bearing:ct}}easeTo(u,f){var D;this._stop(!1,u.easeId),((u=r.e({offset:[0,0],duration:500,easing:r.b9},u)).animate===!1||!u.essential&&h.prefersReducedMotion)&&(u.duration=0);const V=this._getTransformForUpdate(),J=V.zoom,oe=V.bearing,fe=V.pitch,xe=V.padding,Ee="bearing"in u?this._normalizeBearing(u.bearing,oe):oe,Fe="pitch"in u?+u.pitch:fe,Ge="padding"in u?u.padding:V.padding,rt=r.P.convert(u.offset);let ct=V.centerPoint.add(rt);const pt=V.pointLocation(ct),{center:xt,zoom:Mt}=V.getConstrained(r.N.convert(u.center||pt),(D=u.zoom)!==null&&D!==void 0?D:J);this._normalizeCenter(xt,V);const Tt=V.project(pt),jt=V.project(xt).sub(Tt),Et=V.zoomScale(Mt-J);let Jt,Kt;u.around&&(Jt=r.N.convert(u.around),Kt=V.locationPoint(Jt));const Yt={moving:this._moving,zooming:this._zooming,rotating:this._rotating,pitching:this._pitching};return this._zooming=this._zooming||Mt!==J,this._rotating=this._rotating||oe!==Ee,this._pitching=this._pitching||Fe!==fe,this._padding=!V.isPaddingEqual(Ge),this._easeId=u.easeId,this._prepareEase(f,u.noMoveStart,Yt),this.terrain&&this._prepareElevation(xt),this._ease(da=>{if(this._zooming&&(V.zoom=r.z.number(J,Mt,da)),this._rotating&&(V.bearing=r.z.number(oe,Ee,da)),this._pitching&&(V.pitch=r.z.number(fe,Fe,da)),this._padding&&(V.interpolatePadding(xe,Ge,da),ct=V.centerPoint.add(rt)),this.terrain&&!u.freezeElevation&&this._updateElevation(da),Jt)V.setLocationAtPoint(Jt,Kt);else{const _a=V.zoomScale(V.zoom-J),Da=Mt>J?Math.min(2,Et):Math.max(.5,Et),Na=Math.pow(Da,1-da),Ga=V.unproject(Tt.add(jt.mult(da*Na)).mult(_a));V.setLocationAtPoint(V.renderWorldCopies?Ga.wrap():Ga,ct)}this._applyUpdatedTransform(V),this._fireMoveEvents(f)},da=>{this.terrain&&u.freezeElevation&&this._finalizeElevation(),this._afterEase(f,da)},u),this}_prepareEase(u,f,D={}){this._moving=!0,f||D.moving||this.fire(new r.k("movestart",u)),this._zooming&&!D.zooming&&this.fire(new r.k("zoomstart",u)),this._rotating&&!D.rotating&&this.fire(new r.k("rotatestart",u)),this._pitching&&!D.pitching&&this.fire(new r.k("pitchstart",u))}_prepareElevation(u){this._elevationCenter=u,this._elevationStart=this.transform.elevation,this._elevationTarget=this.terrain.getElevationForLngLatZoom(u,this.transform.tileZoom),this._elevationFreeze=!0}_updateElevation(u){this.transform.minElevationForCurrentTile=this.terrain.getMinTileElevationForLngLatZoom(this._elevationCenter,this.transform.tileZoom);const f=this.terrain.getElevationForLngLatZoom(this._elevationCenter,this.transform.tileZoom);if(u<1&&f!==this._elevationTarget){const D=this._elevationTarget-this._elevationStart,V=(f-(D*u+this._elevationStart))/(1-u);this._elevationStart+=u*(D-V),this._elevationTarget=f}this.transform.elevation=r.z.number(this._elevationStart,this._elevationTarget,u)}_finalizeElevation(){this._elevationFreeze=!1,this.transform.recalculateZoom(this.terrain)}_getTransformForUpdate(){return this.transformCameraUpdate||this.terrain?(this._requestedCameraState||(this._requestedCameraState=this.transform.clone()),this._requestedCameraState):this.transform}_elevateCameraIfInsideTerrain(u){const f=u.getCameraPosition(),D=this.terrain.getElevationForLngLatZoom(f.lngLat,u.zoom);if(f.altitude<D){const V=this.calculateCameraOptionsFromTo(f.lngLat,D,u.center,u.elevation);return{pitch:V.pitch,zoom:V.zoom}}return{}}_applyUpdatedTransform(u){const f=[];if(this.terrain&&f.push(V=>this._elevateCameraIfInsideTerrain(V)),this.transformCameraUpdate&&f.push(V=>this.transformCameraUpdate(V)),!f.length)return;const D=u.clone();for(const V of f){const J=D.clone(),{center:oe,zoom:fe,pitch:xe,bearing:Ee,elevation:Fe}=V(J);oe&&(J.center=oe),fe!==void 0&&(J.zoom=fe),xe!==void 0&&(J.pitch=xe),Ee!==void 0&&(J.bearing=Ee),Fe!==void 0&&(J.elevation=Fe),D.apply(J)}this.transform.apply(D)}_fireMoveEvents(u){this.fire(new r.k("move",u)),this._zooming&&this.fire(new r.k("zoom",u)),this._rotating&&this.fire(new r.k("rotate",u)),this._pitching&&this.fire(new r.k("pitch",u))}_afterEase(u,f){if(this._easeId&&f&&this._easeId===f)return;delete this._easeId;const D=this._zooming,V=this._rotating,J=this._pitching;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,this._padding=!1,D&&this.fire(new r.k("zoomend",u)),V&&this.fire(new r.k("rotateend",u)),J&&this.fire(new r.k("pitchend",u)),this.fire(new r.k("moveend",u))}flyTo(u,f){var D;if(!u.essential&&h.prefersReducedMotion){const nr=r.M(u,["center","zoom","bearing","pitch","around"]);return this.jumpTo(nr,f)}this.stop(),u=r.e({offset:[0,0],speed:1.2,curve:1.42,easing:r.b9},u);const V=this._getTransformForUpdate(),J=V.zoom,oe=V.bearing,fe=V.pitch,xe=V.padding,Ee="bearing"in u?this._normalizeBearing(u.bearing,oe):oe,Fe="pitch"in u?+u.pitch:fe,Ge="padding"in u?u.padding:V.padding,rt=r.P.convert(u.offset);let ct=V.centerPoint.add(rt);const pt=V.pointLocation(ct),{center:xt,zoom:Mt}=V.getConstrained(r.N.convert(u.center||pt),(D=u.zoom)!==null&&D!==void 0?D:J);this._normalizeCenter(xt,V);const Tt=V.zoomScale(Mt-J),jt=V.project(pt),Et=V.project(xt).sub(jt);let Jt=u.curve;const Kt=Math.max(V.width,V.height),Yt=Kt/Tt,da=Et.mag();if("minZoom"in u){const nr=r.ad(Math.min(u.minZoom,J,Mt),V.minZoom,V.maxZoom),Sr=Kt/V.zoomScale(nr-J);Jt=Math.sqrt(Sr/da*2)}const _a=Jt*Jt;function Da(nr){const Sr=(Yt*Yt-Kt*Kt+(nr?-1:1)*_a*_a*da*da)/(2*(nr?Yt:Kt)*_a*da);return Math.log(Math.sqrt(Sr*Sr+1)-Sr)}function Na(nr){return(Math.exp(nr)-Math.exp(-nr))/2}function Ga(nr){return(Math.exp(nr)+Math.exp(-nr))/2}const $a=Da(!1);let gr=function(nr){return Ga($a)/Ga($a+Jt*nr)},Qa=function(nr){return Kt*((Ga($a)*(Na(Sr=$a+Jt*nr)/Ga(Sr))-Na($a))/_a)/da;var Sr},xr=(Da(!0)-$a)/Jt;if(Math.abs(da)<1e-6||!isFinite(xr)){if(Math.abs(Kt-Yt)<1e-6)return this.easeTo(u,f);const nr=Yt<Kt?-1:1;xr=Math.abs(Math.log(Yt/Kt))/Jt,Qa=()=>0,gr=Sr=>Math.exp(nr*Jt*Sr)}if("duration"in u)u.duration=+u.duration;else{const nr="screenSpeed"in u?+u.screenSpeed/Jt:+u.speed;u.duration=1e3*xr/nr}return u.maxDuration&&u.duration>u.maxDuration&&(u.duration=0),this._zooming=!0,this._rotating=oe!==Ee,this._pitching=Fe!==fe,this._padding=!V.isPaddingEqual(Ge),this._prepareEase(f,!1),this.terrain&&this._prepareElevation(xt),this._ease(nr=>{const Sr=nr*xr,pr=1/gr(Sr);V.zoom=nr===1?Mt:J+V.scaleZoom(pr),this._rotating&&(V.bearing=r.z.number(oe,Ee,nr)),this._pitching&&(V.pitch=r.z.number(fe,Fe,nr)),this._padding&&(V.interpolatePadding(xe,Ge,nr),ct=V.centerPoint.add(rt)),this.terrain&&!u.freezeElevation&&this._updateElevation(nr);const Mr=nr===1?xt:V.unproject(jt.add(Et.mult(Qa(Sr))).mult(pr));V.setLocationAtPoint(V.renderWorldCopies?Mr.wrap():Mr,ct),this._applyUpdatedTransform(V),this._fireMoveEvents(f)},()=>{this.terrain&&u.freezeElevation&&this._finalizeElevation(),this._afterEase(f)},u),this}isEasing(){return!!this._easeFrameId}stop(){return this._stop()}_stop(u,f){var D;if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd){const V=this._onEaseEnd;delete this._onEaseEnd,V.call(this,f)}return u||(D=this.handlers)===null||D===void 0||D.stop(!1),this}_ease(u,f,D){D.animate===!1||D.duration===0?(u(1),f()):(this._easeStart=h.now(),this._easeOptions=D,this._onEaseFrame=u,this._onEaseEnd=f,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))}_normalizeBearing(u,f){u=r.b3(u,-180,180);const D=Math.abs(u-f);return Math.abs(u-360-f)<D&&(u-=360),Math.abs(u+360-f)<D&&(u+=360),u}_normalizeCenter(u,f){if(!f.renderWorldCopies||f.lngRange)return;const D=u.lng-f.center.lng;u.lng+=D>180?-360:D<-180?360:0}queryTerrainElevation(u){return this.terrain?this.terrain.getElevationForLngLatZoom(r.N.convert(u),this.transform.tileZoom)-this.transform.elevation:null}}const jo={compact:!0,customAttribution:'<a href="https://maplibre.org/" target="_blank">MapLibre</a>'};class ds{constructor(u=jo){this._toggleAttribution=()=>{this._container.classList.contains("maplibregl-compact")&&(this._container.classList.contains("maplibregl-compact-show")?(this._container.setAttribute("open",""),this._container.classList.remove("maplibregl-compact-show")):(this._container.classList.add("maplibregl-compact-show"),this._container.removeAttribute("open")))},this._updateData=f=>{!f||f.sourceDataType!=="metadata"&&f.sourceDataType!=="visibility"&&f.dataType!=="style"&&f.type!=="terrain"||this._updateAttributions()},this._updateCompact=()=>{this._map.getCanvasContainer().offsetWidth<=640||this._compact?this._compact===!1?this._container.setAttribute("open",""):this._container.classList.contains("maplibregl-compact")||this._container.classList.contains("maplibregl-attrib-empty")||(this._container.setAttribute("open",""),this._container.classList.add("maplibregl-compact","maplibregl-compact-show")):(this._container.setAttribute("open",""),this._container.classList.contains("maplibregl-compact")&&this._container.classList.remove("maplibregl-compact","maplibregl-compact-show"))},this._updateCompactMinimize=()=>{this._container.classList.contains("maplibregl-compact")&&this._container.classList.contains("maplibregl-compact-show")&&this._container.classList.remove("maplibregl-compact-show")},this.options=u}getDefaultPosition(){return"bottom-right"}onAdd(u){return this._map=u,this._compact=this.options.compact,this._container=n.create("details","maplibregl-ctrl maplibregl-ctrl-attrib"),this._compactButton=n.create("summary","maplibregl-ctrl-attrib-button",this._container),this._compactButton.addEventListener("click",this._toggleAttribution),this._setElementTitle(this._compactButton,"ToggleAttribution"),this._innerContainer=n.create("div","maplibregl-ctrl-attrib-inner",this._container),this._updateAttributions(),this._updateCompact(),this._map.on("styledata",this._updateData),this._map.on("sourcedata",this._updateData),this._map.on("terrain",this._updateData),this._map.on("resize",this._updateCompact),this._map.on("drag",this._updateCompactMinimize),this._container}onRemove(){n.remove(this._container),this._map.off("styledata",this._updateData),this._map.off("sourcedata",this._updateData),this._map.off("terrain",this._updateData),this._map.off("resize",this._updateCompact),this._map.off("drag",this._updateCompactMinimize),this._map=void 0,this._compact=void 0,this._attribHTML=void 0}_setElementTitle(u,f){const D=this._map._getUIString(`AttributionControl.${f}`);u.title=D,u.setAttribute("aria-label",D)}_updateAttributions(){if(!this._map.style)return;let u=[];if(this.options.customAttribution&&(Array.isArray(this.options.customAttribution)?u=u.concat(this.options.customAttribution.map(V=>typeof V!="string"?"":V)):typeof this.options.customAttribution=="string"&&u.push(this.options.customAttribution)),this._map.style.stylesheet){const V=this._map.style.stylesheet;this.styleOwner=V.owner,this.styleId=V.id}const f=this._map.style.sourceCaches;for(const V in f){const J=f[V];if(J.used||J.usedForTerrain){const oe=J.getSource();oe.attribution&&u.indexOf(oe.attribution)<0&&u.push(oe.attribution)}}u=u.filter(V=>String(V).trim()),u.sort((V,J)=>V.length-J.length),u=u.filter((V,J)=>{for(let oe=J+1;oe<u.length;oe++)if(u[oe].indexOf(V)>=0)return!1;return!0});const D=u.join(" | ");D!==this._attribHTML&&(this._attribHTML=D,u.length?(this._innerContainer.innerHTML=D,this._container.classList.remove("maplibregl-attrib-empty")):this._container.classList.add("maplibregl-attrib-empty"),this._updateCompact(),this._editLink=null)}}class yo{constructor(u={}){this._updateCompact=()=>{const f=this._container.children;if(f.length){const D=f[0];this._map.getCanvasContainer().offsetWidth<=640||this._compact?this._compact!==!1&&D.classList.add("maplibregl-compact"):D.classList.remove("maplibregl-compact")}},this.options=u}getDefaultPosition(){return"bottom-left"}onAdd(u){this._map=u,this._compact=this.options&&this.options.compact,this._container=n.create("div","maplibregl-ctrl");const f=n.create("a","maplibregl-ctrl-logo");return f.target="_blank",f.rel="noopener nofollow",f.href="https://maplibre.org/",f.setAttribute("aria-label",this._map._getUIString("LogoControl.Title")),f.setAttribute("rel","noopener nofollow"),this._container.appendChild(f),this._container.style.display="block",this._map.on("resize",this._updateCompact),this._updateCompact(),this._container}onRemove(){n.remove(this._container),this._map.off("resize",this._updateCompact),this._map=void 0,this._compact=void 0}}class Ec{constructor(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1}add(u){const f=++this._id;return this._queue.push({callback:u,id:f,cancelled:!1}),f}remove(u){const f=this._currentlyRunning,D=f?this._queue.concat(f):this._queue;for(const V of D)if(V.id===u)return void(V.cancelled=!0)}run(u=0){if(this._currentlyRunning)throw new Error("Attempting to run(), but is already running.");const f=this._currentlyRunning=this._queue;this._queue=[];for(const D of f)if(!D.cancelled&&(D.callback(u),this._cleared))break;this._cleared=!1,this._currentlyRunning=!1}clear(){this._currentlyRunning&&(this._cleared=!0),this._queue=[]}}var tn=r.Y([{name:"a_pos3d",type:"Int16",components:3}]);class Uo extends r.E{constructor(u){super(),this.sourceCache=u,this._tiles={},this._renderableTilesKeys=[],this._sourceTileCache={},this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.deltaZoom=1,u.usedForTerrain=!0,u.tileSize=this.tileSize*2**this.deltaZoom}destruct(){this.sourceCache.usedForTerrain=!1,this.sourceCache.tileSize=null}update(u,f){this.sourceCache.update(u,f),this._renderableTilesKeys=[];const D={};for(const V of u.coveringTiles({tileSize:this.tileSize,minzoom:this.minzoom,maxzoom:this.maxzoom,reparseOverscaled:!1,terrain:f}))D[V.key]=!0,this._renderableTilesKeys.push(V.key),this._tiles[V.key]||(V.posMatrix=new Float64Array(16),r.aQ(V.posMatrix,0,r.X,0,r.X,0,1),this._tiles[V.key]=new _e(V,this.tileSize));for(const V in this._tiles)D[V]||delete this._tiles[V]}freeRtt(u){for(const f in this._tiles){const D=this._tiles[f];(!u||D.tileID.equals(u)||D.tileID.isChildOf(u)||u.isChildOf(D.tileID))&&(D.rtt=[])}}getRenderableTiles(){return this._renderableTilesKeys.map(u=>this.getTileByID(u))}getTileByID(u){return this._tiles[u]}getTerrainCoords(u){const f={};for(const D of this._renderableTilesKeys){const V=this._tiles[D].tileID;if(V.canonical.equals(u.canonical)){const J=u.clone();J.posMatrix=new Float64Array(16),r.aQ(J.posMatrix,0,r.X,0,r.X,0,1),f[D]=J}else if(V.canonical.isChildOf(u.canonical)){const J=u.clone();J.posMatrix=new Float64Array(16);const oe=V.canonical.z-u.canonical.z,fe=V.canonical.x-(V.canonical.x>>oe<<oe),xe=V.canonical.y-(V.canonical.y>>oe<<oe),Ee=r.X>>oe;r.aQ(J.posMatrix,0,Ee,0,Ee,0,1),r.J(J.posMatrix,J.posMatrix,[-fe*Ee,-xe*Ee,0]),f[D]=J}else if(u.canonical.isChildOf(V.canonical)){const J=u.clone();J.posMatrix=new Float64Array(16);const oe=u.canonical.z-V.canonical.z,fe=u.canonical.x-(u.canonical.x>>oe<<oe),xe=u.canonical.y-(u.canonical.y>>oe<<oe),Ee=r.X>>oe;r.aQ(J.posMatrix,0,r.X,0,r.X,0,1),r.J(J.posMatrix,J.posMatrix,[fe*Ee,xe*Ee,0]),r.K(J.posMatrix,J.posMatrix,[1/2**oe,1/2**oe,0]),f[D]=J}}return f}getSourceTile(u,f){const D=this.sourceCache._source;let V=u.overscaledZ-this.deltaZoom;if(V>D.maxzoom&&(V=D.maxzoom),V<D.minzoom)return null;this._sourceTileCache[u.key]||(this._sourceTileCache[u.key]=u.scaledTo(V).key);let J=this.sourceCache.getTileByID(this._sourceTileCache[u.key]);if((!J||!J.dem)&&f)for(;V>=D.minzoom&&(!J||!J.dem);)J=this.sourceCache.getTileByID(u.scaledTo(V--).key);return J}tilesAfterTime(u=Date.now()){return Object.values(this._tiles).filter(f=>f.timeAdded>=u)}}class ii{constructor(u,f,D){this.painter=u,this.sourceCache=new Uo(f),this.options=D,this.exaggeration=typeof D.exaggeration=="number"?D.exaggeration:1,this.qualityFactor=2,this.meshSize=128,this._demMatrixCache={},this.coordsIndex=[],this._coordsTextureSize=1024}getDEMElevation(u,f,D,V=r.X){var J;if(!(f>=0&&f<V&&D>=0&&D<V))return 0;const oe=this.getTerrainData(u),fe=(J=oe.tile)===null||J===void 0?void 0:J.dem;if(!fe)return 0;const xe=function(pt,xt,Mt){var Tt=xt[0],jt=xt[1];return pt[0]=Mt[0]*Tt+Mt[4]*jt+Mt[12],pt[1]=Mt[1]*Tt+Mt[5]*jt+Mt[13],pt}([],[f/V*r.X,D/V*r.X],oe.u_terrain_matrix),Ee=[xe[0]*fe.dim,xe[1]*fe.dim],Fe=Math.floor(Ee[0]),Ge=Math.floor(Ee[1]),rt=Ee[0]-Fe,ct=Ee[1]-Ge;return fe.get(Fe,Ge)*(1-rt)*(1-ct)+fe.get(Fe+1,Ge)*rt*(1-ct)+fe.get(Fe,Ge+1)*(1-rt)*ct+fe.get(Fe+1,Ge+1)*rt*ct}getElevationForLngLatZoom(u,f){const{tileID:D,mercatorX:V,mercatorY:J}=this._getOverscaledTileIDFromLngLatZoom(u,f);return this.getElevation(D,V%r.X,J%r.X,r.X)}getElevation(u,f,D,V=r.X){return this.getDEMElevation(u,f,D,V)*this.exaggeration}getTerrainData(u){if(!this._emptyDemTexture){const V=this.painter.context,J=new r.R({width:1,height:1},new Uint8Array(4));this._emptyDepthTexture=new z(V,J,V.gl.RGBA,{premultiply:!1}),this._emptyDemUnpack=[0,0,0,0],this._emptyDemTexture=new z(V,new r.R({width:1,height:1}),V.gl.RGBA,{premultiply:!1}),this._emptyDemTexture.bind(V.gl.NEAREST,V.gl.CLAMP_TO_EDGE),this._emptyDemMatrix=r.ao([])}const f=this.sourceCache.getSourceTile(u,!0);if(f&&f.dem&&(!f.demTexture||f.needsTerrainPrepare)){const V=this.painter.context;f.demTexture=this.painter.getTileTexture(f.dem.stride),f.demTexture?f.demTexture.update(f.dem.getPixels(),{premultiply:!1}):f.demTexture=new z(V,f.dem.getPixels(),V.gl.RGBA,{premultiply:!1}),f.demTexture.bind(V.gl.NEAREST,V.gl.CLAMP_TO_EDGE),f.needsTerrainPrepare=!1}const D=f&&f+f.tileID.key+u.key;if(D&&!this._demMatrixCache[D]){const V=this.sourceCache.sourceCache._source.maxzoom;let J=u.canonical.z-f.tileID.canonical.z;u.overscaledZ>u.canonical.z&&(u.canonical.z>=V?J=u.canonical.z-V:r.w("cannot calculate elevation if elevation maxzoom > source.maxzoom"));const oe=u.canonical.x-(u.canonical.x>>J<<J),fe=u.canonical.y-(u.canonical.y>>J<<J),xe=r.bb(new Float64Array(16),[1/(r.X<<J),1/(r.X<<J),0]);r.J(xe,xe,[oe*r.X,fe*r.X,0]),this._demMatrixCache[u.key]={matrix:xe,coord:u}}return{u_depth:2,u_terrain:3,u_terrain_dim:f&&f.dem&&f.dem.dim||1,u_terrain_matrix:D?this._demMatrixCache[u.key].matrix:this._emptyDemMatrix,u_terrain_unpack:f&&f.dem&&f.dem.getUnpackVector()||this._emptyDemUnpack,u_terrain_exaggeration:this.exaggeration,texture:(f&&f.demTexture||this._emptyDemTexture).texture,depthTexture:(this._fboDepthTexture||this._emptyDepthTexture).texture,tile:f}}getFramebuffer(u){const f=this.painter,D=f.width/devicePixelRatio,V=f.height/devicePixelRatio;return!this._fbo||this._fbo.width===D&&this._fbo.height===V||(this._fbo.destroy(),this._fboCoordsTexture.destroy(),this._fboDepthTexture.destroy(),delete this._fbo,delete this._fboDepthTexture,delete this._fboCoordsTexture),this._fboCoordsTexture||(this._fboCoordsTexture=new z(f.context,{width:D,height:V,data:null},f.context.gl.RGBA,{premultiply:!1}),this._fboCoordsTexture.bind(f.context.gl.NEAREST,f.context.gl.CLAMP_TO_EDGE)),this._fboDepthTexture||(this._fboDepthTexture=new z(f.context,{width:D,height:V,data:null},f.context.gl.RGBA,{premultiply:!1}),this._fboDepthTexture.bind(f.context.gl.NEAREST,f.context.gl.CLAMP_TO_EDGE)),this._fbo||(this._fbo=f.context.createFramebuffer(D,V,!0,!1),this._fbo.depthAttachment.set(f.context.createRenderbuffer(f.context.gl.DEPTH_COMPONENT16,D,V))),this._fbo.colorAttachment.set(u==="coords"?this._fboCoordsTexture.texture:this._fboDepthTexture.texture),this._fbo}getCoordsTexture(){const u=this.painter.context;if(this._coordsTexture)return this._coordsTexture;const f=new Uint8Array(this._coordsTextureSize*this._coordsTextureSize*4);for(let J=0,oe=0;J<this._coordsTextureSize;J++)for(let fe=0;fe<this._coordsTextureSize;fe++,oe+=4)f[oe+0]=255&fe,f[oe+1]=255&J,f[oe+2]=fe>>8<<4|J>>8,f[oe+3]=0;const D=new r.R({width:this._coordsTextureSize,height:this._coordsTextureSize},new Uint8Array(f.buffer)),V=new z(u,D,u.gl.RGBA,{premultiply:!1});return V.bind(u.gl.NEAREST,u.gl.CLAMP_TO_EDGE),this._coordsTexture=V,V}pointCoordinate(u){this.painter.maybeDrawDepthAndCoords(!0);const f=new Uint8Array(4),D=this.painter.context,V=D.gl,J=Math.round(u.x*this.painter.pixelRatio/devicePixelRatio),oe=Math.round(u.y*this.painter.pixelRatio/devicePixelRatio),fe=Math.round(this.painter.height/devicePixelRatio);D.bindFramebuffer.set(this.getFramebuffer("coords").framebuffer),V.readPixels(J,fe-oe-1,1,1,V.RGBA,V.UNSIGNED_BYTE,f),D.bindFramebuffer.set(null);const xe=f[0]+(f[2]>>4<<8),Ee=f[1]+((15&f[2])<<8),Fe=this.coordsIndex[255-f[3]],Ge=Fe&&this.sourceCache.getTileByID(Fe);if(!Ge)return null;const rt=this._coordsTextureSize,ct=(1<<Ge.tileID.canonical.z)*rt;return new r.Z((Ge.tileID.canonical.x*rt+xe)/ct+Ge.tileID.wrap,(Ge.tileID.canonical.y*rt+Ee)/ct,this.getElevation(Ge.tileID,xe,Ee,rt))}depthAtPoint(u){const f=new Uint8Array(4),D=this.painter.context,V=D.gl;return D.bindFramebuffer.set(this.getFramebuffer("depth").framebuffer),V.readPixels(u.x,this.painter.height/devicePixelRatio-u.y-1,1,1,V.RGBA,V.UNSIGNED_BYTE,f),D.bindFramebuffer.set(null),(f[0]/16777216+f[1]/65536+f[2]/256+f[3])/256}getTerrainMesh(){if(this._mesh)return this._mesh;const u=this.painter.context,f=new r.bc,D=new r.aY,V=this.meshSize,J=r.X/V,oe=V*V;for(let Ge=0;Ge<=V;Ge++)for(let rt=0;rt<=V;rt++)f.emplaceBack(rt*J,Ge*J,0);for(let Ge=0;Ge<oe;Ge+=V+1)for(let rt=0;rt<V;rt++)D.emplaceBack(rt+Ge,V+rt+Ge+1,V+rt+Ge+2),D.emplaceBack(rt+Ge,V+rt+Ge+2,rt+Ge+1);const fe=f.length,xe=fe+2*(V+1);for(const Ge of[0,1])for(let rt=0;rt<=V;rt++)for(const ct of[0,1])f.emplaceBack(rt*J,Ge*r.X,ct);for(let Ge=0;Ge<2*V;Ge+=2)D.emplaceBack(xe+Ge,xe+Ge+1,xe+Ge+3),D.emplaceBack(xe+Ge,xe+Ge+3,xe+Ge+2),D.emplaceBack(fe+Ge,fe+Ge+3,fe+Ge+1),D.emplaceBack(fe+Ge,fe+Ge+2,fe+Ge+3);const Ee=f.length,Fe=Ee+2*(V+1);for(const Ge of[0,1])for(let rt=0;rt<=V;rt++)for(const ct of[0,1])f.emplaceBack(Ge*r.X,rt*J,ct);for(let Ge=0;Ge<2*V;Ge+=2)D.emplaceBack(Ee+Ge,Ee+Ge+1,Ee+Ge+3),D.emplaceBack(Ee+Ge,Ee+Ge+3,Ee+Ge+2),D.emplaceBack(Fe+Ge,Fe+Ge+3,Fe+Ge+1),D.emplaceBack(Fe+Ge,Fe+Ge+2,Fe+Ge+3);return this._mesh=new cc(u.createVertexBuffer(f,tn.members),u.createIndexBuffer(D),r.a0.simpleSegment(0,0,f.length,D.length)),this._mesh}getMeshFrameDelta(u){return 2*Math.PI*r.bd/Math.pow(2,u)/5}getMinTileElevationForLngLatZoom(u,f){var D;const{tileID:V}=this._getOverscaledTileIDFromLngLatZoom(u,f);return(D=this.getMinMaxElevation(V).minElevation)!==null&&D!==void 0?D:0}getMinMaxElevation(u){const f=this.getTerrainData(u).tile,D={minElevation:null,maxElevation:null};return f&&f.dem&&(D.minElevation=f.dem.min*this.exaggeration,D.maxElevation=f.dem.max*this.exaggeration),D}_getOverscaledTileIDFromLngLatZoom(u,f){const D=r.Z.fromLngLat(u.wrap()),V=(1<<f)*r.X,J=D.x*V,oe=D.y*V,fe=Math.floor(J/r.X),xe=Math.floor(oe/r.X);return{tileID:new r.S(f,0,f,fe,xe),mercatorX:J,mercatorY:oe}}}class Vl{constructor(u,f,D){this._context=u,this._size=f,this._tileSize=D,this._objects=[],this._recentlyUsed=[],this._stamp=0}destruct(){for(const u of this._objects)u.texture.destroy(),u.fbo.destroy()}_createObject(u){const f=this._context.createFramebuffer(this._tileSize,this._tileSize,!0,!0),D=new z(this._context,{width:this._tileSize,height:this._tileSize,data:null},this._context.gl.RGBA);return D.bind(this._context.gl.LINEAR,this._context.gl.CLAMP_TO_EDGE),f.depthAttachment.set(this._context.createRenderbuffer(this._context.gl.DEPTH_STENCIL,this._tileSize,this._tileSize)),f.colorAttachment.set(D.texture),{id:u,fbo:f,texture:D,stamp:-1,inUse:!1}}getObjectForId(u){return this._objects[u]}useObject(u){u.inUse=!0,this._recentlyUsed=this._recentlyUsed.filter(f=>u.id!==f),this._recentlyUsed.push(u.id)}stampObject(u){u.stamp=++this._stamp}getOrCreateFreeObject(){for(const f of this._recentlyUsed)if(!this._objects[f].inUse)return this._objects[f];if(this._objects.length>=this._size)throw new Error("No free RenderPool available, call freeAllObjects() required!");const u=this._createObject(this._objects.length);return this._objects.push(u),u}freeObject(u){u.inUse=!1}freeAllObjects(){for(const u of this._objects)this.freeObject(u)}isFull(){return!(this._objects.length<this._size)&&this._objects.some(u=>!u.inUse)===!1}}const vs={background:!0,fill:!0,line:!0,raster:!0,hillshade:!0};class qs{constructor(u,f){this.painter=u,this.terrain=f,this.pool=new Vl(u.context,30,f.sourceCache.tileSize*f.qualityFactor)}destruct(){this.pool.destruct()}getTexture(u){return this.pool.getObjectForId(u.rtt[this._stacks.length-1].id).texture}prepareForRender(u,f){this._stacks=[],this._prevType=null,this._rttTiles=[],this._renderableTiles=this.terrain.sourceCache.getRenderableTiles(),this._renderableLayerIds=u._order.filter(D=>!u._layers[D].isHidden(f)),this._coordsDescendingInv={};for(const D in u.sourceCaches){this._coordsDescendingInv[D]={};const V=u.sourceCaches[D].getVisibleCoordinates();for(const J of V){const oe=this.terrain.sourceCache.getTerrainCoords(J);for(const fe in oe)this._coordsDescendingInv[D][fe]||(this._coordsDescendingInv[D][fe]=[]),this._coordsDescendingInv[D][fe].push(oe[fe])}}this._coordsDescendingInvStr={};for(const D of u._order){const V=u._layers[D],J=V.source;if(vs[V.type]&&!this._coordsDescendingInvStr[J]){this._coordsDescendingInvStr[J]={};for(const oe in this._coordsDescendingInv[J])this._coordsDescendingInvStr[J][oe]=this._coordsDescendingInv[J][oe].map(fe=>fe.key).sort().join()}}for(const D of this._renderableTiles)for(const V in this._coordsDescendingInvStr){const J=this._coordsDescendingInvStr[V][D.tileID.key];J&&J!==D.rttCoords[V]&&(D.rtt=[])}}renderLayer(u){if(u.isHidden(this.painter.transform.zoom))return!1;const f=u.type,D=this.painter,V=this._renderableLayerIds[this._renderableLayerIds.length-1]===u.id;if(vs[f]&&(this._prevType&&vs[this._prevType]||this._stacks.push([]),this._prevType=f,this._stacks[this._stacks.length-1].push(u.id),!V))return!0;if(vs[this._prevType]||vs[f]&&V){this._prevType=f;const J=this._stacks.length-1,oe=this._stacks[J]||[];for(const fe of this._renderableTiles){if(this.pool.isFull()&&(lc(this.painter,this.terrain,this._rttTiles),this._rttTiles=[],this.pool.freeAllObjects()),this._rttTiles.push(fe),fe.rtt[J]){const Ee=this.pool.getObjectForId(fe.rtt[J].id);if(Ee.stamp===fe.rtt[J].stamp){this.pool.useObject(Ee);continue}}const xe=this.pool.getOrCreateFreeObject();this.pool.useObject(xe),this.pool.stampObject(xe),fe.rtt[J]={id:xe.id,stamp:xe.stamp},D.context.bindFramebuffer.set(xe.fbo.framebuffer),D.context.clear({color:r.aN.transparent,stencil:0}),D.currentStencilSource=void 0;for(let Ee=0;Ee<oe.length;Ee++){const Fe=D.style._layers[oe[Ee]],Ge=Fe.source?this._coordsDescendingInv[Fe.source][fe.tileID.key]:[fe.tileID];D.context.viewport.set([0,0,xe.fbo.width,xe.fbo.height]),D._renderTileClippingMasks(Fe,Ge),D.renderLayer(D,D.style.sourceCaches[Fe.source],Fe,Ge),Fe.source&&(fe.rttCoords[Fe.source]=this._coordsDescendingInvStr[Fe.source][fe.tileID.key])}}return lc(this.painter,this.terrain,this._rttTiles),this._rttTiles=[],this.pool.freeAllObjects(),vs[f]}return!1}}const Oc={"AttributionControl.ToggleAttribution":"Toggle attribution","AttributionControl.MapFeedback":"Map feedback","FullscreenControl.Enter":"Enter fullscreen","FullscreenControl.Exit":"Exit fullscreen","GeolocateControl.FindMyLocation":"Find my location","GeolocateControl.LocationNotAvailable":"Location not available","LogoControl.Title":"MapLibre logo","Map.Title":"Map","Marker.Title":"Map marker","NavigationControl.ResetBearing":"Reset bearing to north","NavigationControl.ZoomIn":"Zoom in","NavigationControl.ZoomOut":"Zoom out","Popup.Close":"Close popup","ScaleControl.Feet":"ft","ScaleControl.Meters":"m","ScaleControl.Kilometers":"km","ScaleControl.Miles":"mi","ScaleControl.NauticalMiles":"nm","TerrainControl.Enable":"Enable terrain","TerrainControl.Disable":"Disable terrain","CooperativeGesturesHandler.WindowsHelpText":"Use Ctrl + scroll to zoom the map","CooperativeGesturesHandler.MacHelpText":"Use ⌘ + scroll to zoom the map","CooperativeGesturesHandler.MobileHelpText":"Use two fingers to move the map"},Mc=_,hl={hash:!1,interactive:!0,bearingSnap:7,attributionControl:jo,maplibreLogo:!1,failIfMajorPerformanceCaveat:!1,preserveDrawingBuffer:!1,refreshExpiredTiles:!0,scrollZoom:!0,minZoom:-2,maxZoom:22,minPitch:0,maxPitch:60,boxZoom:!0,dragRotate:!0,dragPan:!0,keyboard:!0,doubleClickZoom:!0,touchZoomRotate:!0,touchPitch:!0,cooperativeGestures:!1,trackResize:!0,center:[0,0],zoom:0,bearing:0,pitch:0,renderWorldCopies:!0,maxTileCacheSize:null,maxTileCacheZoomLevels:r.a.MAX_TILE_CACHE_ZOOM_LEVELS,transformRequest:null,transformCameraUpdate:null,fadeDuration:300,crossSourceCollisions:!0,clickTolerance:3,localIdeographFontFamily:"sans-serif",pitchWithRotate:!0,validateStyle:!0,maxCanvasSize:[4096,4096],cancelPendingTileRequestsWhileZooming:!0},Ei=R=>{R.touchstart=R.dragStart,R.touchmoveWindow=R.dragMove,R.touchend=R.dragEnd},Os={showCompass:!0,showZoom:!0,visualizePitch:!1};class qr{constructor(u,f,D=!1){this.mousedown=oe=>{this.startMouse(r.e({},oe,{ctrlKey:!0,preventDefault:()=>oe.preventDefault()}),n.mousePos(this.element,oe)),n.addEventListener(window,"mousemove",this.mousemove),n.addEventListener(window,"mouseup",this.mouseup)},this.mousemove=oe=>{this.moveMouse(oe,n.mousePos(this.element,oe))},this.mouseup=oe=>{this.mouseRotate.dragEnd(oe),this.mousePitch&&this.mousePitch.dragEnd(oe),this.offTemp()},this.touchstart=oe=>{oe.targetTouches.length!==1?this.reset():(this._startPos=this._lastPos=n.touchPos(this.element,oe.targetTouches)[0],this.startTouch(oe,this._startPos),n.addEventListener(window,"touchmove",this.touchmove,{passive:!1}),n.addEventListener(window,"touchend",this.touchend))},this.touchmove=oe=>{oe.targetTouches.length!==1?this.reset():(this._lastPos=n.touchPos(this.element,oe.targetTouches)[0],this.moveTouch(oe,this._lastPos))},this.touchend=oe=>{oe.targetTouches.length===0&&this._startPos&&this._lastPos&&this._startPos.dist(this._lastPos)<this._clickTolerance&&this.element.click(),delete this._startPos,delete this._lastPos,this.offTemp()},this.reset=()=>{this.mouseRotate.reset(),this.mousePitch&&this.mousePitch.reset(),this.touchRotate.reset(),this.touchPitch&&this.touchPitch.reset(),delete this._startPos,delete this._lastPos,this.offTemp()},this._clickTolerance=10;const V=u.dragRotate._mouseRotate.getClickTolerance(),J=u.dragRotate._mousePitch.getClickTolerance();this.element=f,this.mouseRotate=$l({clickTolerance:V,enable:!0}),this.touchRotate=(({enable:oe,clickTolerance:fe,bearingDegreesPerPixelMoved:xe=.8})=>{const Ee=new Fl;return new Co({clickTolerance:fe,move:(Fe,Ge)=>({bearingDelta:(Ge.x-Fe.x)*xe}),moveStateManager:Ee,enable:oe,assignEvents:Ei})})({clickTolerance:V,enable:!0}),this.map=u,D&&(this.mousePitch=sl({clickTolerance:J,enable:!0}),this.touchPitch=(({enable:oe,clickTolerance:fe,pitchDegreesPerPixelMoved:xe=-.5})=>{const Ee=new Fl;return new Co({clickTolerance:fe,move:(Fe,Ge)=>({pitchDelta:(Ge.y-Fe.y)*xe}),moveStateManager:Ee,enable:oe,assignEvents:Ei})})({clickTolerance:J,enable:!0})),n.addEventListener(f,"mousedown",this.mousedown),n.addEventListener(f,"touchstart",this.touchstart,{passive:!1}),n.addEventListener(f,"touchcancel",this.reset)}startMouse(u,f){this.mouseRotate.dragStart(u,f),this.mousePitch&&this.mousePitch.dragStart(u,f),n.disableDrag()}startTouch(u,f){this.touchRotate.dragStart(u,f),this.touchPitch&&this.touchPitch.dragStart(u,f),n.disableDrag()}moveMouse(u,f){const D=this.map,{bearingDelta:V}=this.mouseRotate.dragMove(u,f)||{};if(V&&D.setBearing(D.getBearing()+V),this.mousePitch){const{pitchDelta:J}=this.mousePitch.dragMove(u,f)||{};J&&D.setPitch(D.getPitch()+J)}}moveTouch(u,f){const D=this.map,{bearingDelta:V}=this.touchRotate.dragMove(u,f)||{};if(V&&D.setBearing(D.getBearing()+V),this.touchPitch){const{pitchDelta:J}=this.touchPitch.dragMove(u,f)||{};J&&D.setPitch(D.getPitch()+J)}}off(){const u=this.element;n.removeEventListener(u,"mousedown",this.mousedown),n.removeEventListener(u,"touchstart",this.touchstart,{passive:!1}),n.removeEventListener(window,"touchmove",this.touchmove,{passive:!1}),n.removeEventListener(window,"touchend",this.touchend),n.removeEventListener(u,"touchcancel",this.reset),this.offTemp()}offTemp(){n.enableDrag(),n.removeEventListener(window,"mousemove",this.mousemove),n.removeEventListener(window,"mouseup",this.mouseup),n.removeEventListener(window,"touchmove",this.touchmove,{passive:!1}),n.removeEventListener(window,"touchend",this.touchend)}}let kn;function Qo(R,u,f){const D=new r.N(R.lng,R.lat);if(R=new r.N(R.lng,R.lat),u){const V=new r.N(R.lng-360,R.lat),J=new r.N(R.lng+360,R.lat),oe=f.locationPoint(R).distSqr(u);f.locationPoint(V).distSqr(u)<oe?R=V:f.locationPoint(J).distSqr(u)<oe&&(R=J)}for(;Math.abs(R.lng-f.center.lng)>180;){const V=f.locationPoint(R);if(V.x>=0&&V.y>=0&&V.x<=f.width&&V.y<=f.height)break;R.lng>f.center.lng?R.lng-=360:R.lng+=360}return R.lng!==D.lng&&f.locationPoint(R).y>f.height/2-f.getHorizon()?R:D}const Ds={center:"translate(-50%,-50%)",top:"translate(-50%,0)","top-left":"translate(0,0)","top-right":"translate(-100%,0)",bottom:"translate(-50%,-100%)","bottom-left":"translate(0,-100%)","bottom-right":"translate(-100%,-100%)",left:"translate(0,-50%)",right:"translate(-100%,-50%)"};function pl(R,u,f){const D=R.classList;for(const V in Ds)D.remove(`maplibregl-${f}-anchor-${V}`);D.add(`maplibregl-${f}-anchor-${u}`)}class Oi extends r.E{constructor(u){if(super(),this._onKeyPress=f=>{const D=f.code,V=f.charCode||f.keyCode;D!=="Space"&&D!=="Enter"&&V!==32&&V!==13||this.togglePopup()},this._onMapClick=f=>{const D=f.originalEvent.target,V=this._element;this._popup&&(D===V||V.contains(D))&&this.togglePopup()},this._update=f=>{var D;if(!this._map)return;const V=this._map.loaded()&&!this._map.isMoving();((f==null?void 0:f.type)==="terrain"||(f==null?void 0:f.type)==="render"&&!V)&&this._map.once("render",this._update),this._map.transform.renderWorldCopies?this._lngLat=Qo(this._lngLat,this._flatPos,this._map.transform):this._lngLat=(D=this._lngLat)===null||D===void 0?void 0:D.wrap(),this._flatPos=this._pos=this._map.project(this._lngLat)._add(this._offset),this._map.terrain&&(this._flatPos=this._map.transform.locationPoint(this._lngLat)._add(this._offset));let J="";this._rotationAlignment==="viewport"||this._rotationAlignment==="auto"?J=`rotateZ(${this._rotation}deg)`:this._rotationAlignment==="map"&&(J=`rotateZ(${this._rotation-this._map.getBearing()}deg)`);let oe="";this._pitchAlignment==="viewport"||this._pitchAlignment==="auto"?oe="rotateX(0deg)":this._pitchAlignment==="map"&&(oe=`rotateX(${this._map.getPitch()}deg)`),this._subpixelPositioning||f&&f.type!=="moveend"||(this._pos=this._pos.round()),n.setTransform(this._element,`${Ds[this._anchor]} translate(${this._pos.x}px, ${this._pos.y}px) ${oe} ${J}`),h.frameAsync(new AbortController).then(()=>{this._updateOpacity(f&&f.type==="moveend")}).catch(()=>{})},this._onMove=f=>{if(!this._isDragging){const D=this._clickTolerance||this._map._clickTolerance;this._isDragging=f.point.dist(this._pointerdownPos)>=D}this._isDragging&&(this._pos=f.point.sub(this._positionDelta),this._lngLat=this._map.unproject(this._pos),this.setLngLat(this._lngLat),this._element.style.pointerEvents="none",this._state==="pending"&&(this._state="active",this.fire(new r.k("dragstart"))),this.fire(new r.k("drag")))},this._onUp=()=>{this._element.style.pointerEvents="auto",this._positionDelta=null,this._pointerdownPos=null,this._isDragging=!1,this._map.off("mousemove",this._onMove),this._map.off("touchmove",this._onMove),this._state==="active"&&this.fire(new r.k("dragend")),this._state="inactive"},this._addDragHandler=f=>{this._element.contains(f.originalEvent.target)&&(f.preventDefault(),this._positionDelta=f.point.sub(this._pos).add(this._offset),this._pointerdownPos=f.point,this._state="pending",this._map.on("mousemove",this._onMove),this._map.on("touchmove",this._onMove),this._map.once("mouseup",this._onUp),this._map.once("touchend",this._onUp))},this._anchor=u&&u.anchor||"center",this._color=u&&u.color||"#3FB1CE",this._scale=u&&u.scale||1,this._draggable=u&&u.draggable||!1,this._clickTolerance=u&&u.clickTolerance||0,this._subpixelPositioning=u&&u.subpixelPositioning||!1,this._isDragging=!1,this._state="inactive",this._rotation=u&&u.rotation||0,this._rotationAlignment=u&&u.rotationAlignment||"auto",this._pitchAlignment=u&&u.pitchAlignment&&u.pitchAlignment!=="auto"?u.pitchAlignment:this._rotationAlignment,this.setOpacity(),this.setOpacity(u==null?void 0:u.opacity,u==null?void 0:u.opacityWhenCovered),u&&u.element)this._element=u.element,this._offset=r.P.convert(u&&u.offset||[0,0]);else{this._defaultMarker=!0,this._element=n.create("div");const f=n.createNS("http://www.w3.org/2000/svg","svg"),D=41,V=27;f.setAttributeNS(null,"display","block"),f.setAttributeNS(null,"height",`${D}px`),f.setAttributeNS(null,"width",`${V}px`),f.setAttributeNS(null,"viewBox",`0 0 ${V} ${D}`);const J=n.createNS("http://www.w3.org/2000/svg","g");J.setAttributeNS(null,"stroke","none"),J.setAttributeNS(null,"stroke-width","1"),J.setAttributeNS(null,"fill","none"),J.setAttributeNS(null,"fill-rule","evenodd");const oe=n.createNS("http://www.w3.org/2000/svg","g");oe.setAttributeNS(null,"fill-rule","nonzero");const fe=n.createNS("http://www.w3.org/2000/svg","g");fe.setAttributeNS(null,"transform","translate(3.0, 29.0)"),fe.setAttributeNS(null,"fill","#000000");const xe=[{rx:"10.5",ry:"5.25002273"},{rx:"10.5",ry:"5.25002273"},{rx:"9.5",ry:"4.77275007"},{rx:"8.5",ry:"4.29549936"},{rx:"7.5",ry:"3.81822308"},{rx:"6.5",ry:"3.34094679"},{rx:"5.5",ry:"2.86367051"},{rx:"4.5",ry:"2.38636864"}];for(const Tt of xe){const jt=n.createNS("http://www.w3.org/2000/svg","ellipse");jt.setAttributeNS(null,"opacity","0.04"),jt.setAttributeNS(null,"cx","10.5"),jt.setAttributeNS(null,"cy","5.80029008"),jt.setAttributeNS(null,"rx",Tt.rx),jt.setAttributeNS(null,"ry",Tt.ry),fe.appendChild(jt)}const Ee=n.createNS("http://www.w3.org/2000/svg","g");Ee.setAttributeNS(null,"fill",this._color);const Fe=n.createNS("http://www.w3.org/2000/svg","path");Fe.setAttributeNS(null,"d","M27,13.5 C27,19.074644 20.250001,27.000002 14.75,34.500002 C14.016665,35.500004 12.983335,35.500004 12.25,34.500002 C6.7499993,27.000002 0,19.222562 0,13.5 C0,6.0441559 6.0441559,0 13.5,0 C20.955844,0 27,6.0441559 27,13.5 Z"),Ee.appendChild(Fe);const Ge=n.createNS("http://www.w3.org/2000/svg","g");Ge.setAttributeNS(null,"opacity","0.25"),Ge.setAttributeNS(null,"fill","#000000");const rt=n.createNS("http://www.w3.org/2000/svg","path");rt.setAttributeNS(null,"d","M13.5,0 C6.0441559,0 0,6.0441559 0,13.5 C0,19.222562 6.7499993,27 12.25,34.5 C13,35.522727 14.016664,35.500004 14.75,34.5 C20.250001,27 27,19.074644 27,13.5 C27,6.0441559 20.955844,0 13.5,0 Z M13.5,1 C20.415404,1 26,6.584596 26,13.5 C26,15.898657 24.495584,19.181431 22.220703,22.738281 C19.945823,26.295132 16.705119,30.142167 13.943359,33.908203 C13.743445,34.180814 13.612715,34.322738 13.5,34.441406 C13.387285,34.322738 13.256555,34.180814 13.056641,33.908203 C10.284481,30.127985 7.4148684,26.314159 5.015625,22.773438 C2.6163816,19.232715 1,15.953538 1,13.5 C1,6.584596 6.584596,1 13.5,1 Z"),Ge.appendChild(rt);const ct=n.createNS("http://www.w3.org/2000/svg","g");ct.setAttributeNS(null,"transform","translate(6.0, 7.0)"),ct.setAttributeNS(null,"fill","#FFFFFF");const pt=n.createNS("http://www.w3.org/2000/svg","g");pt.setAttributeNS(null,"transform","translate(8.0, 8.0)");const xt=n.createNS("http://www.w3.org/2000/svg","circle");xt.setAttributeNS(null,"fill","#000000"),xt.setAttributeNS(null,"opacity","0.25"),xt.setAttributeNS(null,"cx","5.5"),xt.setAttributeNS(null,"cy","5.5"),xt.setAttributeNS(null,"r","5.4999962");const Mt=n.createNS("http://www.w3.org/2000/svg","circle");Mt.setAttributeNS(null,"fill","#FFFFFF"),Mt.setAttributeNS(null,"cx","5.5"),Mt.setAttributeNS(null,"cy","5.5"),Mt.setAttributeNS(null,"r","5.4999962"),pt.appendChild(xt),pt.appendChild(Mt),oe.appendChild(fe),oe.appendChild(Ee),oe.appendChild(Ge),oe.appendChild(ct),oe.appendChild(pt),f.appendChild(oe),f.setAttributeNS(null,"height",D*this._scale+"px"),f.setAttributeNS(null,"width",V*this._scale+"px"),this._element.appendChild(f),this._offset=r.P.convert(u&&u.offset||[0,-14])}if(this._element.classList.add("maplibregl-marker"),this._element.addEventListener("dragstart",f=>{f.preventDefault()}),this._element.addEventListener("mousedown",f=>{f.preventDefault()}),pl(this._element,this._anchor,"marker"),u&&u.className)for(const f of u.className.split(" "))this._element.classList.add(f);this._popup=null}addTo(u){return this.remove(),this._map=u,this._element.setAttribute("aria-label",u._getUIString("Marker.Title")),u.getCanvasContainer().appendChild(this._element),u.on("move",this._update),u.on("moveend",this._update),u.on("terrain",this._update),this.setDraggable(this._draggable),this._update(),this._map.on("click",this._onMapClick),this}remove(){return this._opacityTimeout&&(clearTimeout(this._opacityTimeout),delete this._opacityTimeout),this._map&&(this._map.off("click",this._onMapClick),this._map.off("move",this._update),this._map.off("moveend",this._update),this._map.off("terrain",this._update),this._map.off("mousedown",this._addDragHandler),this._map.off("touchstart",this._addDragHandler),this._map.off("mouseup",this._onUp),this._map.off("touchend",this._onUp),this._map.off("mousemove",this._onMove),this._map.off("touchmove",this._onMove),delete this._map),n.remove(this._element),this._popup&&this._popup.remove(),this}getLngLat(){return this._lngLat}setLngLat(u){return this._lngLat=r.N.convert(u),this._pos=null,this._popup&&this._popup.setLngLat(this._lngLat),this._update(),this}getElement(){return this._element}setPopup(u){if(this._popup&&(this._popup.remove(),this._popup=null,this._element.removeEventListener("keypress",this._onKeyPress),this._originalTabIndex||this._element.removeAttribute("tabindex")),u){if(!("offset"in u.options)){const V=Math.abs(13.5)/Math.SQRT2;u.options.offset=this._defaultMarker?{top:[0,0],"top-left":[0,0],"top-right":[0,0],bottom:[0,-38.1],"bottom-left":[V,-1*(24.6+V)],"bottom-right":[-V,-1*(24.6+V)],left:[13.5,-24.6],right:[-13.5,-24.6]}:this._offset}this._popup=u,this._originalTabIndex=this._element.getAttribute("tabindex"),this._originalTabIndex||this._element.setAttribute("tabindex","0"),this._element.addEventListener("keypress",this._onKeyPress)}return this}setSubpixelPositioning(u){return this._subpixelPositioning=u,this}getPopup(){return this._popup}togglePopup(){const u=this._popup;return this._element.style.opacity===this._opacityWhenCovered?this:u?(u.isOpen()?u.remove():(u.setLngLat(this._lngLat),u.addTo(this._map)),this):this}_updateOpacity(u=!1){var f,D;if(!(!((f=this._map)===null||f===void 0)&&f.terrain))return void(this._element.style.opacity!==this._opacity&&(this._element.style.opacity=this._opacity));if(u)this._opacityTimeout=null;else{if(this._opacityTimeout)return;this._opacityTimeout=setTimeout(()=>{this._opacityTimeout=null},100)}const V=this._map,J=V.terrain.depthAtPoint(this._pos),oe=V.terrain.getElevationForLngLatZoom(this._lngLat,V.transform.tileZoom);if(V.transform.lngLatToCameraDepth(this._lngLat,oe)-J<.006)return void(this._element.style.opacity=this._opacity);const fe=-this._offset.y/V.transform._pixelPerMeter,xe=Math.sin(V.getPitch()*Math.PI/180)*fe,Ee=V.terrain.depthAtPoint(new r.P(this._pos.x,this._pos.y-this._offset.y)),Fe=V.transform.lngLatToCameraDepth(this._lngLat,oe+xe)-Ee>.006;!((D=this._popup)===null||D===void 0)&&D.isOpen()&&Fe&&this._popup.remove(),this._element.style.opacity=Fe?this._opacityWhenCovered:this._opacity}getOffset(){return this._offset}setOffset(u){return this._offset=r.P.convert(u),this._update(),this}addClassName(u){this._element.classList.add(u)}removeClassName(u){this._element.classList.remove(u)}toggleClassName(u){return this._element.classList.toggle(u)}setDraggable(u){return this._draggable=!!u,this._map&&(u?(this._map.on("mousedown",this._addDragHandler),this._map.on("touchstart",this._addDragHandler)):(this._map.off("mousedown",this._addDragHandler),this._map.off("touchstart",this._addDragHandler))),this}isDraggable(){return this._draggable}setRotation(u){return this._rotation=u||0,this._update(),this}getRotation(){return this._rotation}setRotationAlignment(u){return this._rotationAlignment=u||"auto",this._update(),this}getRotationAlignment(){return this._rotationAlignment}setPitchAlignment(u){return this._pitchAlignment=u&&u!=="auto"?u:this._rotationAlignment,this._update(),this}getPitchAlignment(){return this._pitchAlignment}setOpacity(u,f){return u===void 0&&f===void 0&&(this._opacity="1",this._opacityWhenCovered="0.2"),u!==void 0&&(this._opacity=u),f!==void 0&&(this._opacityWhenCovered=f),this._map&&this._updateOpacity(!0),this}}const jl={positionOptions:{enableHighAccuracy:!1,maximumAge:0,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showAccuracyCircle:!0,showUserLocation:!0};let Xn=0,Kl=!1;class fn extends r.E{constructor(u){super(),this._onSuccess=f=>{if(this._map){if(this._isOutOfMapMaxBounds(f))return this._setErrorState(),this.fire(new r.k("outofmaxbounds",f)),this._updateMarker(),void this._finish();if(this.options.trackUserLocation)switch(this._lastKnownPosition=f,this._watchState){case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active");break;case"BACKGROUND":case"BACKGROUND_ERROR":this._watchState="BACKGROUND",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background");break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}this.options.showUserLocation&&this._watchState!=="OFF"&&this._updateMarker(f),this.options.trackUserLocation&&this._watchState!=="ACTIVE_LOCK"||this._updateCamera(f),this.options.showUserLocation&&this._dotElement.classList.remove("maplibregl-user-location-dot-stale"),this.fire(new r.k("geolocate",f)),this._finish()}},this._updateCamera=f=>{const D=new r.N(f.coords.longitude,f.coords.latitude),V=f.coords.accuracy,J=this._map.getBearing(),oe=r.e({bearing:J},this.options.fitBoundsOptions),fe=Ce.fromLngLat(D,V);this._map.fitBounds(fe,oe,{geolocateSource:!0})},this._updateMarker=f=>{if(f){const D=new r.N(f.coords.longitude,f.coords.latitude);this._accuracyCircleMarker.setLngLat(D).addTo(this._map),this._userLocationDotMarker.setLngLat(D).addTo(this._map),this._accuracy=f.coords.accuracy,this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()}else this._userLocationDotMarker.remove(),this._accuracyCircleMarker.remove()},this._onZoom=()=>{this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()},this._onError=f=>{if(this._map){if(this.options.trackUserLocation)if(f.code===1){this._watchState="OFF",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background-error"),this._geolocateButton.disabled=!0;const D=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.title=D,this._geolocateButton.setAttribute("aria-label",D),this._geolocationWatchID!==void 0&&this._clearWatch()}else{if(f.code===3&&Kl)return;this._setErrorState()}this._watchState!=="OFF"&&this.options.showUserLocation&&this._dotElement.classList.add("maplibregl-user-location-dot-stale"),this.fire(new r.k("error",f)),this._finish()}},this._finish=()=>{this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0},this._setupUI=()=>{this._map&&(this._container.addEventListener("contextmenu",f=>f.preventDefault()),this._geolocateButton=n.create("button","maplibregl-ctrl-geolocate",this._container),n.create("span","maplibregl-ctrl-icon",this._geolocateButton).setAttribute("aria-hidden","true"),this._geolocateButton.type="button",this._geolocateButton.disabled=!0)},this._finishSetupUI=f=>{if(this._map){if(f===!1){r.w("Geolocation support is not available so the GeolocateControl will be disabled.");const D=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.disabled=!0,this._geolocateButton.title=D,this._geolocateButton.setAttribute("aria-label",D)}else{const D=this._map._getUIString("GeolocateControl.FindMyLocation");this._geolocateButton.disabled=!1,this._geolocateButton.title=D,this._geolocateButton.setAttribute("aria-label",D)}this.options.trackUserLocation&&(this._geolocateButton.setAttribute("aria-pressed","false"),this._watchState="OFF"),this.options.showUserLocation&&(this._dotElement=n.create("div","maplibregl-user-location-dot"),this._userLocationDotMarker=new Oi({element:this._dotElement}),this._circleElement=n.create("div","maplibregl-user-location-accuracy-circle"),this._accuracyCircleMarker=new Oi({element:this._circleElement,pitchAlignment:"map"}),this.options.trackUserLocation&&(this._watchState="OFF"),this._map.on("zoom",this._onZoom)),this._geolocateButton.addEventListener("click",()=>this.trigger()),this._setup=!0,this.options.trackUserLocation&&this._map.on("movestart",D=>{const V=D.originalEvent&&D.originalEvent.type==="resize";D.geolocateSource||this._watchState!=="ACTIVE_LOCK"||V||(this._watchState="BACKGROUND",this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this.fire(new r.k("trackuserlocationend")),this.fire(new r.k("userlocationlostfocus")))})}},this.options=r.e({},jl,u)}onAdd(u){return this._map=u,this._container=n.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._setupUI(),function(){return r._(this,arguments,void 0,function*(f=!1){if(kn!==void 0&&!f)return kn;if(window.navigator.permissions===void 0)return kn=!!window.navigator.geolocation,kn;try{kn=(yield window.navigator.permissions.query({name:"geolocation"})).state!=="denied"}catch{kn=!!window.navigator.geolocation}return kn})}().then(f=>this._finishSetupUI(f)),this._container}onRemove(){this._geolocationWatchID!==void 0&&(window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0),this.options.showUserLocation&&this._userLocationDotMarker&&this._userLocationDotMarker.remove(),this.options.showAccuracyCircle&&this._accuracyCircleMarker&&this._accuracyCircleMarker.remove(),n.remove(this._container),this._map.off("zoom",this._onZoom),this._map=void 0,Xn=0,Kl=!1}_isOutOfMapMaxBounds(u){const f=this._map.getMaxBounds(),D=u.coords;return f&&(D.longitude<f.getWest()||D.longitude>f.getEast()||D.latitude<f.getSouth()||D.latitude>f.getNorth())}_setErrorState(){switch(this._watchState){case"WAITING_ACTIVE":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active-error");break;case"ACTIVE_LOCK":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting");break;case"BACKGROUND":this._watchState="BACKGROUND_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting");break;case"ACTIVE_ERROR":break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}}_updateCircleRadius(){const u=this._map.getBounds(),f=u.getSouthEast(),D=u.getNorthEast(),V=f.distanceTo(D),J=this._map._container.clientHeight,oe=Math.ceil(this._accuracy/(V/J)*2);this._circleElement.style.width=`${oe}px`,this._circleElement.style.height=`${oe}px`}trigger(){if(!this._setup)return r.w("Geolocate control triggered before added to a map"),!1;if(this.options.trackUserLocation){switch(this._watchState){case"OFF":this._watchState="WAITING_ACTIVE",this.fire(new r.k("trackuserlocationstart"));break;case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":case"BACKGROUND_ERROR":Xn--,Kl=!1,this._watchState="OFF",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background-error"),this.fire(new r.k("trackuserlocationend"));break;case"BACKGROUND":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._lastKnownPosition&&this._updateCamera(this._lastKnownPosition),this.fire(new r.k("trackuserlocationstart")),this.fire(new r.k("userlocationfocus"));break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}switch(this._watchState){case"WAITING_ACTIVE":this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active");break;case"ACTIVE_LOCK":this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active");break;case"OFF":break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}if(this._watchState==="OFF"&&this._geolocationWatchID!==void 0)this._clearWatch();else if(this._geolocationWatchID===void 0){let u;this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","true"),Xn++,Xn>1?(u={maximumAge:6e5,timeout:0},Kl=!0):(u=this.options.positionOptions,Kl=!1),this._geolocationWatchID=window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,u)}}else window.navigator.geolocation.getCurrentPosition(this._onSuccess,this._onError,this.options.positionOptions),this._timeoutId=setTimeout(this._finish,1e4);return!0}_clearWatch(){window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0,this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","false"),this.options.showUserLocation&&this._updateMarker(null)}}const an={maxWidth:100,unit:"metric"};function wi(R,u,f){const D=f&&f.maxWidth||100,V=R._container.clientHeight/2,J=R.unproject([0,V]),oe=R.unproject([D,V]),fe=J.distanceTo(oe);if(f&&f.unit==="imperial"){const xe=3.2808*fe;xe>5280?vo(u,D,xe/5280,R._getUIString("ScaleControl.Miles")):vo(u,D,xe,R._getUIString("ScaleControl.Feet"))}else f&&f.unit==="nautical"?vo(u,D,fe/1852,R._getUIString("ScaleControl.NauticalMiles")):fe>=1e3?vo(u,D,fe/1e3,R._getUIString("ScaleControl.Kilometers")):vo(u,D,fe,R._getUIString("ScaleControl.Meters"))}function vo(R,u,f,D){const V=function(oe){const fe=Math.pow(10,`${Math.floor(oe)}`.length-1);let xe=oe/fe;return xe=xe>=10?10:xe>=5?5:xe>=3?3:xe>=2?2:xe>=1?1:function(Ee){const Fe=Math.pow(10,Math.ceil(-Math.log(Ee)/Math.LN10));return Math.round(Ee*Fe)/Fe}(xe),fe*xe}(f),J=V/f;R.style.width=u*J+"px",R.innerHTML=`${V}&nbsp;${D}`}class Ul extends r.E{constructor(u={}){super(),this._onFullscreenChange=()=>{var f;let D=window.document.fullscreenElement||window.document.mozFullScreenElement||window.document.webkitFullscreenElement||window.document.msFullscreenElement;for(;!((f=D==null?void 0:D.shadowRoot)===null||f===void 0)&&f.fullscreenElement;)D=D.shadowRoot.fullscreenElement;D===this._container!==this._fullscreen&&this._handleFullscreenChange()},this._onClickFullscreen=()=>{this._isFullscreen()?this._exitFullscreen():this._requestFullscreen()},this._fullscreen=!1,u&&u.container&&(u.container instanceof HTMLElement?this._container=u.container:r.w("Full screen control 'container' must be a DOM element.")),"onfullscreenchange"in document?this._fullscreenchange="fullscreenchange":"onmozfullscreenchange"in document?this._fullscreenchange="mozfullscreenchange":"onwebkitfullscreenchange"in document?this._fullscreenchange="webkitfullscreenchange":"onmsfullscreenchange"in document&&(this._fullscreenchange="MSFullscreenChange")}onAdd(u){return this._map=u,this._container||(this._container=this._map.getContainer()),this._controlContainer=n.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._setupUI(),this._controlContainer}onRemove(){n.remove(this._controlContainer),this._map=null,window.document.removeEventListener(this._fullscreenchange,this._onFullscreenChange)}_setupUI(){const u=this._fullscreenButton=n.create("button","maplibregl-ctrl-fullscreen",this._controlContainer);n.create("span","maplibregl-ctrl-icon",u).setAttribute("aria-hidden","true"),u.type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),window.document.addEventListener(this._fullscreenchange,this._onFullscreenChange)}_updateTitle(){const u=this._getTitle();this._fullscreenButton.setAttribute("aria-label",u),this._fullscreenButton.title=u}_getTitle(){return this._map._getUIString(this._isFullscreen()?"FullscreenControl.Exit":"FullscreenControl.Enter")}_isFullscreen(){return this._fullscreen}_handleFullscreenChange(){this._fullscreen=!this._fullscreen,this._fullscreenButton.classList.toggle("maplibregl-ctrl-shrink"),this._fullscreenButton.classList.toggle("maplibregl-ctrl-fullscreen"),this._updateTitle(),this._fullscreen?(this.fire(new r.k("fullscreenstart")),this._prevCooperativeGesturesEnabled=this._map.cooperativeGestures.isEnabled(),this._map.cooperativeGestures.disable()):(this.fire(new r.k("fullscreenend")),this._prevCooperativeGesturesEnabled&&this._map.cooperativeGestures.enable())}_exitFullscreen(){window.document.exitFullscreen?window.document.exitFullscreen():window.document.mozCancelFullScreen?window.document.mozCancelFullScreen():window.document.msExitFullscreen?window.document.msExitFullscreen():window.document.webkitCancelFullScreen?window.document.webkitCancelFullScreen():this._togglePseudoFullScreen()}_requestFullscreen(){this._container.requestFullscreen?this._container.requestFullscreen():this._container.mozRequestFullScreen?this._container.mozRequestFullScreen():this._container.msRequestFullscreen?this._container.msRequestFullscreen():this._container.webkitRequestFullscreen?this._container.webkitRequestFullscreen():this._togglePseudoFullScreen()}_togglePseudoFullScreen(){this._container.classList.toggle("maplibregl-pseudo-fullscreen"),this._handleFullscreenChange(),this._map.resize()}}const es={closeButton:!0,closeOnClick:!0,focusAfterOpen:!0,className:"",maxWidth:"240px",subpixelPositioning:!1},vt=["a[href]","[tabindex]:not([tabindex='-1'])","[contenteditable]:not([contenteditable='false'])","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].join(", ");class kt extends r.E{constructor(u){super(),this.remove=()=>(this._content&&n.remove(this._content),this._container&&(n.remove(this._container),delete this._container),this._map&&(this._map.off("move",this._update),this._map.off("move",this._onClose),this._map.off("click",this._onClose),this._map.off("remove",this.remove),this._map.off("mousemove",this._onMouseMove),this._map.off("mouseup",this._onMouseUp),this._map.off("drag",this._onDrag),this._map._canvasContainer.classList.remove("maplibregl-track-pointer"),delete this._map,this.fire(new r.k("close"))),this),this._onMouseUp=f=>{this._update(f.point)},this._onMouseMove=f=>{this._update(f.point)},this._onDrag=f=>{this._update(f.point)},this._update=f=>{var D;const V=this._lngLat||this._trackPointer;if(!this._map||!V||!this._content)return;if(!this._container){if(this._container=n.create("div","maplibregl-popup",this._map.getContainer()),this._tip=n.create("div","maplibregl-popup-tip",this._container),this._container.appendChild(this._content),this.options.className)for(const Ee of this.options.className.split(" "))this._container.classList.add(Ee);this._closeButton&&this._closeButton.setAttribute("aria-label",this._map._getUIString("Popup.Close")),this._trackPointer&&this._container.classList.add("maplibregl-popup-track-pointer")}if(this.options.maxWidth&&this._container.style.maxWidth!==this.options.maxWidth&&(this._container.style.maxWidth=this.options.maxWidth),this._map.transform.renderWorldCopies&&!this._trackPointer?this._lngLat=Qo(this._lngLat,this._flatPos,this._map.transform):this._lngLat=(D=this._lngLat)===null||D===void 0?void 0:D.wrap(),this._trackPointer&&!f)return;const J=this._flatPos=this._pos=this._trackPointer&&f?f:this._map.project(this._lngLat);this._map.terrain&&(this._flatPos=this._trackPointer&&f?f:this._map.transform.locationPoint(this._lngLat));let oe=this.options.anchor;const fe=zt(this.options.offset);if(!oe){const Ee=this._container.offsetWidth,Fe=this._container.offsetHeight;let Ge;Ge=J.y+fe.bottom.y<Fe?["top"]:J.y>this._map.transform.height-Fe?["bottom"]:[],J.x<Ee/2?Ge.push("left"):J.x>this._map.transform.width-Ee/2&&Ge.push("right"),oe=Ge.length===0?"bottom":Ge.join("-")}let xe=J.add(fe[oe]);this.options.subpixelPositioning||(xe=xe.round()),n.setTransform(this._container,`${Ds[oe]} translate(${xe.x}px,${xe.y}px)`),pl(this._container,oe,"popup")},this._onClose=()=>{this.remove()},this.options=r.e(Object.create(es),u)}addTo(u){return this._map&&this.remove(),this._map=u,this.options.closeOnClick&&this._map.on("click",this._onClose),this.options.closeOnMove&&this._map.on("move",this._onClose),this._map.on("remove",this.remove),this._update(),this._focusFirstElement(),this._trackPointer?(this._map.on("mousemove",this._onMouseMove),this._map.on("mouseup",this._onMouseUp),this._container&&this._container.classList.add("maplibregl-popup-track-pointer"),this._map._canvasContainer.classList.add("maplibregl-track-pointer")):this._map.on("move",this._update),this.fire(new r.k("open")),this}isOpen(){return!!this._map}getLngLat(){return this._lngLat}setLngLat(u){return this._lngLat=r.N.convert(u),this._pos=null,this._flatPos=null,this._trackPointer=!1,this._update(),this._map&&(this._map.on("move",this._update),this._map.off("mousemove",this._onMouseMove),this._container&&this._container.classList.remove("maplibregl-popup-track-pointer"),this._map._canvasContainer.classList.remove("maplibregl-track-pointer")),this}trackPointer(){return this._trackPointer=!0,this._pos=null,this._flatPos=null,this._update(),this._map&&(this._map.off("move",this._update),this._map.on("mousemove",this._onMouseMove),this._map.on("drag",this._onDrag),this._container&&this._container.classList.add("maplibregl-popup-track-pointer"),this._map._canvasContainer.classList.add("maplibregl-track-pointer")),this}getElement(){return this._container}setText(u){return this.setDOMContent(document.createTextNode(u))}setHTML(u){const f=document.createDocumentFragment(),D=document.createElement("body");let V;for(D.innerHTML=u;V=D.firstChild,V;)f.appendChild(V);return this.setDOMContent(f)}getMaxWidth(){var u;return(u=this._container)===null||u===void 0?void 0:u.style.maxWidth}setMaxWidth(u){return this.options.maxWidth=u,this._update(),this}setDOMContent(u){if(this._content)for(;this._content.hasChildNodes();)this._content.firstChild&&this._content.removeChild(this._content.firstChild);else this._content=n.create("div","maplibregl-popup-content",this._container);return this._content.appendChild(u),this._createCloseButton(),this._update(),this._focusFirstElement(),this}addClassName(u){return this._container&&this._container.classList.add(u),this}removeClassName(u){return this._container&&this._container.classList.remove(u),this}setOffset(u){return this.options.offset=u,this._update(),this}toggleClassName(u){if(this._container)return this._container.classList.toggle(u)}setSubpixelPositioning(u){this.options.subpixelPositioning=u}_createCloseButton(){this.options.closeButton&&(this._closeButton=n.create("button","maplibregl-popup-close-button",this._content),this._closeButton.type="button",this._closeButton.innerHTML="&#215;",this._closeButton.addEventListener("click",this._onClose))}_focusFirstElement(){if(!this.options.focusAfterOpen||!this._container)return;const u=this._container.querySelector(vt);u&&u.focus()}}function zt(R){if(R){if(typeof R=="number"){const u=Math.round(Math.abs(R)/Math.SQRT2);return{center:new r.P(0,0),top:new r.P(0,R),"top-left":new r.P(u,u),"top-right":new r.P(-u,u),bottom:new r.P(0,-R),"bottom-left":new r.P(u,-u),"bottom-right":new r.P(-u,-u),left:new r.P(R,0),right:new r.P(-R,0)}}if(R instanceof r.P||Array.isArray(R)){const u=r.P.convert(R);return{center:u,top:u,"top-left":u,"top-right":u,bottom:u,"bottom-left":u,"bottom-right":u,left:u,right:u}}return{center:r.P.convert(R.center||[0,0]),top:r.P.convert(R.top||[0,0]),"top-left":r.P.convert(R["top-left"]||[0,0]),"top-right":r.P.convert(R["top-right"]||[0,0]),bottom:r.P.convert(R.bottom||[0,0]),"bottom-left":r.P.convert(R["bottom-left"]||[0,0]),"bottom-right":r.P.convert(R["bottom-right"]||[0,0]),left:r.P.convert(R.left||[0,0]),right:r.P.convert(R.right||[0,0])}}return zt(new r.P(0,0))}const ae=_;p.AJAXError=r.bg,p.Evented=r.E,p.LngLat=r.N,p.MercatorCoordinate=r.Z,p.Point=r.P,p.addProtocol=r.bh,p.config=r.a,p.removeProtocol=r.bi,p.AttributionControl=ds,p.BoxZoomHandler=So,p.CanvasSource=Ae,p.CooperativeGesturesHandler=ys,p.DoubleClickZoomHandler=Ti,p.DragPanHandler=Bs,p.DragRotateHandler=Vo,p.EdgeInsets=Nl,p.FullscreenControl=Ul,p.GeoJSONSource=Pe,p.GeolocateControl=fn,p.Hash=eo,p.ImageSource=Ie,p.KeyboardHandler=pc,p.LngLatBounds=Ce,p.LogoControl=yo,p.Map=class extends ao{constructor(R){r.be.mark(r.bf.create);const u=Object.assign(Object.assign({},hl),R);if(u.minZoom!=null&&u.maxZoom!=null&&u.minZoom>u.maxZoom)throw new Error("maxZoom must be greater than or equal to minZoom");if(u.minPitch!=null&&u.maxPitch!=null&&u.minPitch>u.maxPitch)throw new Error("maxPitch must be greater than or equal to minPitch");if(u.minPitch!=null&&u.minPitch<0)throw new Error("minPitch must be greater than or equal to 0");if(u.maxPitch!=null&&u.maxPitch>85)throw new Error("maxPitch must be less than or equal to 85");if(super(new di(u.minZoom,u.maxZoom,u.minPitch,u.maxPitch,u.renderWorldCopies),{bearingSnap:u.bearingSnap}),this._idleTriggered=!1,this._crossFadingFactor=1,this._renderTaskQueue=new Ec,this._controls=[],this._mapId=r.a4(),this._contextLost=D=>{D.preventDefault(),this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this.fire(new r.k("webglcontextlost",{originalEvent:D}))},this._contextRestored=D=>{this._setupPainter(),this.resize(),this._update(),this.fire(new r.k("webglcontextrestored",{originalEvent:D}))},this._onMapScroll=D=>{if(D.target===this._container)return this._container.scrollTop=0,this._container.scrollLeft=0,!1},this._onWindowOnline=()=>{this._update()},this._interactive=u.interactive,this._maxTileCacheSize=u.maxTileCacheSize,this._maxTileCacheZoomLevels=u.maxTileCacheZoomLevels,this._failIfMajorPerformanceCaveat=u.failIfMajorPerformanceCaveat===!0,this._preserveDrawingBuffer=u.preserveDrawingBuffer===!0,this._antialias=u.antialias===!0,this._trackResize=u.trackResize===!0,this._bearingSnap=u.bearingSnap,this._refreshExpiredTiles=u.refreshExpiredTiles===!0,this._fadeDuration=u.fadeDuration,this._crossSourceCollisions=u.crossSourceCollisions===!0,this._collectResourceTiming=u.collectResourceTiming===!0,this._locale=Object.assign(Object.assign({},Oc),u.locale),this._clickTolerance=u.clickTolerance,this._overridePixelRatio=u.pixelRatio,this._maxCanvasSize=u.maxCanvasSize,this.transformCameraUpdate=u.transformCameraUpdate,this.cancelPendingTileRequestsWhileZooming=u.cancelPendingTileRequestsWhileZooming===!0,this._imageQueueHandle=C.addThrottleControl(()=>this.isMoving()),this._requestManager=new E(u.transformRequest),typeof u.container=="string"){if(this._container=document.getElementById(u.container),!this._container)throw new Error(`Container '${u.container}' not found.`)}else{if(!(u.container instanceof HTMLElement))throw new Error("Invalid type: 'container' must be a String or HTMLElement.");this._container=u.container}if(u.maxBounds&&this.setMaxBounds(u.maxBounds),this._setupContainer(),this._setupPainter(),this.on("move",()=>this._update(!1)).on("moveend",()=>this._update(!1)).on("zoom",()=>this._update(!0)).on("terrain",()=>{this.painter.terrainFacilitator.dirty=!0,this._update(!0)}).once("idle",()=>{this._idleTriggered=!0}),typeof window<"u"){addEventListener("online",this._onWindowOnline,!1);let D=!1;const V=Ws(J=>{this._trackResize&&!this._removed&&this.resize(J)._update()},50);this._resizeObserver=new ResizeObserver(J=>{D?V(J):D=!0}),this._resizeObserver.observe(this._container)}this.handlers=new ni(this,u);const f=typeof u.hash=="string"&&u.hash||void 0;this._hash=u.hash&&new eo(f).addTo(this),this._hash&&this._hash._onHashChange()||(this.jumpTo({center:u.center,zoom:u.zoom,bearing:u.bearing,pitch:u.pitch}),u.bounds&&(this.resize(),this.fitBounds(u.bounds,r.e({},u.fitBoundsOptions,{duration:0})))),this.resize(),this._localIdeographFontFamily=u.localIdeographFontFamily,this._validateStyle=u.validateStyle,u.style&&this.setStyle(u.style,{localIdeographFontFamily:u.localIdeographFontFamily}),u.attributionControl&&this.addControl(new ds(typeof u.attributionControl=="boolean"?void 0:u.attributionControl)),u.maplibreLogo&&this.addControl(new yo,u.logoPosition),this.on("style.load",()=>{this.transform.unmodified&&this.jumpTo(this.style.stylesheet)}),this.on("data",D=>{this._update(D.dataType==="style"),this.fire(new r.k(`${D.dataType}data`,D))}),this.on("dataloading",D=>{this.fire(new r.k(`${D.dataType}dataloading`,D))}),this.on("dataabort",D=>{this.fire(new r.k("sourcedataabort",D))})}_getMapId(){return this._mapId}addControl(R,u){if(u===void 0&&(u=R.getDefaultPosition?R.getDefaultPosition():"top-right"),!R||!R.onAdd)return this.fire(new r.j(new Error("Invalid argument to map.addControl(). Argument must be a control with onAdd and onRemove methods.")));const f=R.onAdd(this);this._controls.push(R);const D=this._controlPositions[u];return u.indexOf("bottom")!==-1?D.insertBefore(f,D.firstChild):D.appendChild(f),this}removeControl(R){if(!R||!R.onRemove)return this.fire(new r.j(new Error("Invalid argument to map.removeControl(). Argument must be a control with onAdd and onRemove methods.")));const u=this._controls.indexOf(R);return u>-1&&this._controls.splice(u,1),R.onRemove(this),this}hasControl(R){return this._controls.indexOf(R)>-1}calculateCameraOptionsFromTo(R,u,f,D){return D==null&&this.terrain&&(D=this.terrain.getElevationForLngLatZoom(f,this.transform.tileZoom)),super.calculateCameraOptionsFromTo(R,u,f,D)}resize(R){var u;const f=this._containerDimensions(),D=f[0],V=f[1],J=this._getClampedPixelRatio(D,V);if(this._resizeCanvas(D,V,J),this.painter.resize(D,V,J),this.painter.overLimit()){const fe=this.painter.context.gl;this._maxCanvasSize=[fe.drawingBufferWidth,fe.drawingBufferHeight];const xe=this._getClampedPixelRatio(D,V);this._resizeCanvas(D,V,xe),this.painter.resize(D,V,xe)}this.transform.resize(D,V),(u=this._requestedCameraState)===null||u===void 0||u.resize(D,V);const oe=!this._moving;return oe&&(this.stop(),this.fire(new r.k("movestart",R)).fire(new r.k("move",R))),this.fire(new r.k("resize",R)),oe&&this.fire(new r.k("moveend",R)),this}_getClampedPixelRatio(R,u){const{0:f,1:D}=this._maxCanvasSize,V=this.getPixelRatio(),J=R*V,oe=u*V,fe=J>f?f/J:1,xe=oe>D?D/oe:1;return Math.min(fe,xe)*V}getPixelRatio(){var R;return(R=this._overridePixelRatio)!==null&&R!==void 0?R:devicePixelRatio}setPixelRatio(R){this._overridePixelRatio=R,this.resize()}getBounds(){return this.transform.getBounds()}getMaxBounds(){return this.transform.getMaxBounds()}setMaxBounds(R){return this.transform.setMaxBounds(Ce.convert(R)),this._update()}setMinZoom(R){if((R=R??-2)>=-2&&R<=this.transform.maxZoom)return this.transform.minZoom=R,this._update(),this.getZoom()<R&&this.setZoom(R),this;throw new Error("minZoom must be between -2 and the current maxZoom, inclusive")}getMinZoom(){return this.transform.minZoom}setMaxZoom(R){if((R=R??22)>=this.transform.minZoom)return this.transform.maxZoom=R,this._update(),this.getZoom()>R&&this.setZoom(R),this;throw new Error("maxZoom must be greater than the current minZoom")}getMaxZoom(){return this.transform.maxZoom}setMinPitch(R){if((R=R??0)<0)throw new Error("minPitch must be greater than or equal to 0");if(R>=0&&R<=this.transform.maxPitch)return this.transform.minPitch=R,this._update(),this.getPitch()<R&&this.setPitch(R),this;throw new Error("minPitch must be between 0 and the current maxPitch, inclusive")}getMinPitch(){return this.transform.minPitch}setMaxPitch(R){if((R=R??60)>85)throw new Error("maxPitch must be less than or equal to 85");if(R>=this.transform.minPitch)return this.transform.maxPitch=R,this._update(),this.getPitch()>R&&this.setPitch(R),this;throw new Error("maxPitch must be greater than the current minPitch")}getMaxPitch(){return this.transform.maxPitch}getRenderWorldCopies(){return this.transform.renderWorldCopies}setRenderWorldCopies(R){return this.transform.renderWorldCopies=R,this._update()}project(R){return this.transform.locationPoint(r.N.convert(R),this.style&&this.terrain)}unproject(R){return this.transform.pointLocation(r.P.convert(R),this.terrain)}isMoving(){var R;return this._moving||((R=this.handlers)===null||R===void 0?void 0:R.isMoving())}isZooming(){var R;return this._zooming||((R=this.handlers)===null||R===void 0?void 0:R.isZooming())}isRotating(){var R;return this._rotating||((R=this.handlers)===null||R===void 0?void 0:R.isRotating())}_createDelegatedListener(R,u,f){if(R==="mouseenter"||R==="mouseover"){let D=!1;return{layer:u,listener:f,delegates:{mousemove:J=>{const oe=this.getLayer(u)?this.queryRenderedFeatures(J.point,{layers:[u]}):[];oe.length?D||(D=!0,f.call(this,new Bo(R,this,J.originalEvent,{features:oe}))):D=!1},mouseout:()=>{D=!1}}}}if(R==="mouseleave"||R==="mouseout"){let D=!1;return{layer:u,listener:f,delegates:{mousemove:oe=>{(this.getLayer(u)?this.queryRenderedFeatures(oe.point,{layers:[u]}):[]).length?D=!0:D&&(D=!1,f.call(this,new Bo(R,this,oe.originalEvent)))},mouseout:oe=>{D&&(D=!1,f.call(this,new Bo(R,this,oe.originalEvent)))}}}}{const D=V=>{const J=this.getLayer(u)?this.queryRenderedFeatures(V.point,{layers:[u]}):[];J.length&&(V.features=J,f.call(this,V),delete V.features)};return{layer:u,listener:f,delegates:{[R]:D}}}}on(R,u,f){if(f===void 0)return super.on(R,u);const D=this._createDelegatedListener(R,u,f);this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[R]=this._delegatedListeners[R]||[],this._delegatedListeners[R].push(D);for(const V in D.delegates)this.on(V,D.delegates[V]);return this}once(R,u,f){if(f===void 0)return super.once(R,u);const D=this._createDelegatedListener(R,u,f);for(const V in D.delegates)this.once(V,D.delegates[V]);return this}off(R,u,f){return f===void 0?super.off(R,u):(this._delegatedListeners&&this._delegatedListeners[R]&&(D=>{const V=D[R];for(let J=0;J<V.length;J++){const oe=V[J];if(oe.layer===u&&oe.listener===f){for(const fe in oe.delegates)this.off(fe,oe.delegates[fe]);return V.splice(J,1),this}}})(this._delegatedListeners),this)}queryRenderedFeatures(R,u){if(!this.style)return[];let f;const D=R instanceof r.P||Array.isArray(R),V=D?R:[[0,0],[this.transform.width,this.transform.height]];if(u=u||(D?{}:R)||{},V instanceof r.P||typeof V[0]=="number")f=[r.P.convert(V)];else{const J=r.P.convert(V[0]),oe=r.P.convert(V[1]);f=[J,new r.P(oe.x,J.y),oe,new r.P(J.x,oe.y),J]}return this.style.queryRenderedFeatures(f,u,this.transform)}querySourceFeatures(R,u){return this.style.querySourceFeatures(R,u)}setStyle(R,u){return(u=r.e({},{localIdeographFontFamily:this._localIdeographFontFamily,validate:this._validateStyle},u)).diff!==!1&&u.localIdeographFontFamily===this._localIdeographFontFamily&&this.style&&R?(this._diffStyle(R,u),this):(this._localIdeographFontFamily=u.localIdeographFontFamily,this._updateStyle(R,u))}setTransformRequest(R){return this._requestManager.setTransformRequest(R),this}_getUIString(R){const u=this._locale[R];if(u==null)throw new Error(`Missing UI string '${R}'`);return u}_updateStyle(R,u){if(u.transformStyle&&this.style&&!this.style._loaded)return void this.style.once("style.load",()=>this._updateStyle(R,u));const f=this.style&&u.transformStyle?this.style.serialize():void 0;return this.style&&(this.style.setEventedParent(null),this.style._remove(!R)),R?(this.style=new Vr(this,u||{}),this.style.setEventedParent(this,{style:this.style}),typeof R=="string"?this.style.loadURL(R,u,f):this.style.loadJSON(R,u,f),this):(delete this.style,this)}_lazyInitEmptyStyle(){this.style||(this.style=new Vr(this,{}),this.style.setEventedParent(this,{style:this.style}),this.style.loadEmpty())}_diffStyle(R,u){if(typeof R=="string"){const f=R,D=this._requestManager.transformRequest(f,"Style");r.h(D,new AbortController).then(V=>{this._updateDiff(V.data,u)}).catch(V=>{V&&this.fire(new r.j(V))})}else typeof R=="object"&&this._updateDiff(R,u)}_updateDiff(R,u){try{this.style.setState(R,u)&&this._update(!0)}catch(f){r.w(`Unable to perform style diff: ${f.message||f.error||f}. Rebuilding the style from scratch.`),this._updateStyle(R,u)}}getStyle(){if(this.style)return this.style.serialize()}isStyleLoaded(){return this.style?this.style.loaded():r.w("There is no style added to the map.")}addSource(R,u){return this._lazyInitEmptyStyle(),this.style.addSource(R,u),this._update(!0)}isSourceLoaded(R){const u=this.style&&this.style.sourceCaches[R];if(u!==void 0)return u.loaded();this.fire(new r.j(new Error(`There is no source with ID '${R}'`)))}setTerrain(R){if(this.style._checkLoaded(),this._terrainDataCallback&&this.style.off("data",this._terrainDataCallback),R){const u=this.style.sourceCaches[R.source];if(!u)throw new Error(`cannot load terrain, because there exists no source with ID: ${R.source}`);this.terrain===null&&u.reload();for(const f in this.style._layers){const D=this.style._layers[f];D.type==="hillshade"&&D.source===R.source&&r.w("You are using the same source for a hillshade layer and for 3D terrain. Please consider using two separate sources to improve rendering quality.")}this.terrain=new ii(this.painter,u,R),this.painter.renderToTexture=new qs(this.painter,this.terrain),this.transform.minElevationForCurrentTile=this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom),this.transform.elevation=this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom),this._terrainDataCallback=f=>{f.dataType==="style"?this.terrain.sourceCache.freeRtt():f.dataType==="source"&&f.tile&&(f.sourceId!==R.source||this._elevationFreeze||(this.transform.minElevationForCurrentTile=this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom),this.transform.elevation=this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom)),this.terrain.sourceCache.freeRtt(f.tile.tileID))},this.style.on("data",this._terrainDataCallback)}else this.terrain&&this.terrain.sourceCache.destruct(),this.terrain=null,this.painter.renderToTexture&&this.painter.renderToTexture.destruct(),this.painter.renderToTexture=null,this.transform.minElevationForCurrentTile=0,this.transform.elevation=0;return this.fire(new r.k("terrain",{terrain:R})),this}getTerrain(){var R,u;return(u=(R=this.terrain)===null||R===void 0?void 0:R.options)!==null&&u!==void 0?u:null}areTilesLoaded(){const R=this.style&&this.style.sourceCaches;for(const u in R){const f=R[u]._tiles;for(const D in f){const V=f[D];if(V.state!=="loaded"&&V.state!=="errored")return!1}}return!0}removeSource(R){return this.style.removeSource(R),this._update(!0)}getSource(R){return this.style.getSource(R)}addImage(R,u,f={}){const{pixelRatio:D=1,sdf:V=!1,stretchX:J,stretchY:oe,content:fe,textFitWidth:xe,textFitHeight:Ee}=f;if(this._lazyInitEmptyStyle(),!(u instanceof HTMLImageElement||r.b(u))){if(u.width===void 0||u.height===void 0)return this.fire(new r.j(new Error("Invalid arguments to map.addImage(). The second argument must be an `HTMLImageElement`, `ImageData`, `ImageBitmap`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`")));{const{width:Fe,height:Ge,data:rt}=u,ct=u;return this.style.addImage(R,{data:new r.R({width:Fe,height:Ge},new Uint8Array(rt)),pixelRatio:D,stretchX:J,stretchY:oe,content:fe,textFitWidth:xe,textFitHeight:Ee,sdf:V,version:0,userImage:ct}),ct.onAdd&&ct.onAdd(this,R),this}}{const{width:Fe,height:Ge,data:rt}=h.getImageData(u);this.style.addImage(R,{data:new r.R({width:Fe,height:Ge},rt),pixelRatio:D,stretchX:J,stretchY:oe,content:fe,textFitWidth:xe,textFitHeight:Ee,sdf:V,version:0})}}updateImage(R,u){const f=this.style.getImage(R);if(!f)return this.fire(new r.j(new Error("The map has no image with that id. If you are adding a new image use `map.addImage(...)` instead.")));const D=u instanceof HTMLImageElement||r.b(u)?h.getImageData(u):u,{width:V,height:J,data:oe}=D;if(V===void 0||J===void 0)return this.fire(new r.j(new Error("Invalid arguments to map.updateImage(). The second argument must be an `HTMLImageElement`, `ImageData`, `ImageBitmap`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`")));if(V!==f.data.width||J!==f.data.height)return this.fire(new r.j(new Error("The width and height of the updated image must be that same as the previous version of the image")));const fe=!(u instanceof HTMLImageElement||r.b(u));return f.data.replace(oe,fe),this.style.updateImage(R,f),this}getImage(R){return this.style.getImage(R)}hasImage(R){return R?!!this.style.getImage(R):(this.fire(new r.j(new Error("Missing required image id"))),!1)}removeImage(R){this.style.removeImage(R)}loadImage(R){return C.getImage(this._requestManager.transformRequest(R,"Image"),new AbortController)}listImages(){return this.style.listImages()}addLayer(R,u){return this._lazyInitEmptyStyle(),this.style.addLayer(R,u),this._update(!0)}moveLayer(R,u){return this.style.moveLayer(R,u),this._update(!0)}removeLayer(R){return this.style.removeLayer(R),this._update(!0)}getLayer(R){return this.style.getLayer(R)}getLayersOrder(){return this.style.getLayersOrder()}setLayerZoomRange(R,u,f){return this.style.setLayerZoomRange(R,u,f),this._update(!0)}setFilter(R,u,f={}){return this.style.setFilter(R,u,f),this._update(!0)}getFilter(R){return this.style.getFilter(R)}setPaintProperty(R,u,f,D={}){return this.style.setPaintProperty(R,u,f,D),this._update(!0)}getPaintProperty(R,u){return this.style.getPaintProperty(R,u)}setLayoutProperty(R,u,f,D={}){return this.style.setLayoutProperty(R,u,f,D),this._update(!0)}getLayoutProperty(R,u){return this.style.getLayoutProperty(R,u)}setGlyphs(R,u={}){return this._lazyInitEmptyStyle(),this.style.setGlyphs(R,u),this._update(!0)}getGlyphs(){return this.style.getGlyphsUrl()}addSprite(R,u,f={}){return this._lazyInitEmptyStyle(),this.style.addSprite(R,u,f,D=>{D||this._update(!0)}),this}removeSprite(R){return this._lazyInitEmptyStyle(),this.style.removeSprite(R),this._update(!0)}getSprite(){return this.style.getSprite()}setSprite(R,u={}){return this._lazyInitEmptyStyle(),this.style.setSprite(R,u,f=>{f||this._update(!0)}),this}setLight(R,u={}){return this._lazyInitEmptyStyle(),this.style.setLight(R,u),this._update(!0)}getLight(){return this.style.getLight()}setSky(R){return this._lazyInitEmptyStyle(),this.style.setSky(R),this._update(!0)}getSky(){return this.style.getSky()}setFeatureState(R,u){return this.style.setFeatureState(R,u),this._update()}removeFeatureState(R,u){return this.style.removeFeatureState(R,u),this._update()}getFeatureState(R){return this.style.getFeatureState(R)}getContainer(){return this._container}getCanvasContainer(){return this._canvasContainer}getCanvas(){return this._canvas}_containerDimensions(){let R=0,u=0;return this._container&&(R=this._container.clientWidth||400,u=this._container.clientHeight||300),[R,u]}_setupContainer(){const R=this._container;R.classList.add("maplibregl-map");const u=this._canvasContainer=n.create("div","maplibregl-canvas-container",R);this._interactive&&u.classList.add("maplibregl-interactive"),this._canvas=n.create("canvas","maplibregl-canvas",u),this._canvas.addEventListener("webglcontextlost",this._contextLost,!1),this._canvas.addEventListener("webglcontextrestored",this._contextRestored,!1),this._canvas.setAttribute("tabindex",this._interactive?"0":"-1"),this._canvas.setAttribute("aria-label",this._getUIString("Map.Title")),this._canvas.setAttribute("role","region");const f=this._containerDimensions(),D=this._getClampedPixelRatio(f[0],f[1]);this._resizeCanvas(f[0],f[1],D);const V=this._controlContainer=n.create("div","maplibregl-control-container",R),J=this._controlPositions={};["top-left","top-right","bottom-left","bottom-right"].forEach(oe=>{J[oe]=n.create("div",`maplibregl-ctrl-${oe} `,V)}),this._container.addEventListener("scroll",this._onMapScroll,!1)}_resizeCanvas(R,u,f){this._canvas.width=Math.floor(f*R),this._canvas.height=Math.floor(f*u),this._canvas.style.width=`${R}px`,this._canvas.style.height=`${u}px`}_setupPainter(){const R={alpha:!0,stencil:!0,depth:!0,failIfMajorPerformanceCaveat:this._failIfMajorPerformanceCaveat,preserveDrawingBuffer:this._preserveDrawingBuffer,antialias:this._antialias||!1};let u=null;this._canvas.addEventListener("webglcontextcreationerror",D=>{u={requestedAttributes:R},D&&(u.statusMessage=D.statusMessage,u.type=D.type)},{once:!0});const f=this._canvas.getContext("webgl2",R)||this._canvas.getContext("webgl",R);if(!f){const D="Failed to initialize WebGL";throw u?(u.message=D,new Error(JSON.stringify(u))):new Error(D)}this.painter=new uc(f,this.transform),i.testSupport(f)}loaded(){return!this._styleDirty&&!this._sourcesDirty&&!!this.style&&this.style.loaded()}_update(R){return this.style&&this.style._loaded?(this._styleDirty=this._styleDirty||R,this._sourcesDirty=!0,this.triggerRepaint(),this):this}_requestRenderFrame(R){return this._update(),this._renderTaskQueue.add(R)}_cancelRenderFrame(R){this._renderTaskQueue.remove(R)}_render(R){const u=this._idleTriggered?this._fadeDuration:0;if(this.painter.context.setDirty(),this.painter.setBaseState(),this._renderTaskQueue.run(R),this._removed)return;let f=!1;if(this.style&&this._styleDirty){this._styleDirty=!1;const V=this.transform.zoom,J=h.now();this.style.zoomHistory.update(V,J);const oe=new r.a9(V,{now:J,fadeDuration:u,zoomHistory:this.style.zoomHistory,transition:this.style.getTransition()}),fe=oe.crossFadingFactor();fe===1&&fe===this._crossFadingFactor||(f=!0,this._crossFadingFactor=fe),this.style.update(oe)}this.style&&this._sourcesDirty&&(this._sourcesDirty=!1,this.style._updateSources(this.transform)),this.terrain?(this.terrain.sourceCache.update(this.transform,this.terrain),this.transform.minElevationForCurrentTile=this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom),this._elevationFreeze||(this.transform.elevation=this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom))):(this.transform.minElevationForCurrentTile=0,this.transform.elevation=0),this._placementDirty=this.style&&this.style._updatePlacement(this.painter.transform,this.showCollisionBoxes,u,this._crossSourceCollisions),this.painter.render(this.style,{showTileBoundaries:this.showTileBoundaries,showOverdrawInspector:this._showOverdrawInspector,rotating:this.isRotating(),zooming:this.isZooming(),moving:this.isMoving(),fadeDuration:u,showPadding:this.showPadding}),this.fire(new r.k("render")),this.loaded()&&!this._loaded&&(this._loaded=!0,r.be.mark(r.bf.load),this.fire(new r.k("load"))),this.style&&(this.style.hasTransitions()||f)&&(this._styleDirty=!0),this.style&&!this._placementDirty&&this.style._releaseSymbolFadeTiles();const D=this._sourcesDirty||this._styleDirty||this._placementDirty;return D||this._repaint?this.triggerRepaint():!this.isMoving()&&this.loaded()&&this.fire(new r.k("idle")),!this._loaded||this._fullyLoaded||D||(this._fullyLoaded=!0,r.be.mark(r.bf.fullLoad)),this}redraw(){return this.style&&(this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this._render(0)),this}remove(){var R;this._hash&&this._hash.remove();for(const f of this._controls)f.onRemove(this);this._controls=[],this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this._renderTaskQueue.clear(),this.painter.destroy(),this.handlers.destroy(),delete this.handlers,this.setStyle(null),typeof window<"u"&&removeEventListener("online",this._onWindowOnline,!1),C.removeThrottleControl(this._imageQueueHandle),(R=this._resizeObserver)===null||R===void 0||R.disconnect();const u=this.painter.context.gl.getExtension("WEBGL_lose_context");u!=null&&u.loseContext&&u.loseContext(),this._canvas.removeEventListener("webglcontextrestored",this._contextRestored,!1),this._canvas.removeEventListener("webglcontextlost",this._contextLost,!1),n.remove(this._canvasContainer),n.remove(this._controlContainer),this._container.classList.remove("maplibregl-map"),r.be.clearMetrics(),this._removed=!0,this.fire(new r.k("remove"))}triggerRepaint(){this.style&&!this._frameRequest&&(this._frameRequest=new AbortController,h.frameAsync(this._frameRequest).then(R=>{r.be.frame(R),this._frameRequest=null,this._render(R)}).catch(()=>{}))}get showTileBoundaries(){return!!this._showTileBoundaries}set showTileBoundaries(R){this._showTileBoundaries!==R&&(this._showTileBoundaries=R,this._update())}get showPadding(){return!!this._showPadding}set showPadding(R){this._showPadding!==R&&(this._showPadding=R,this._update())}get showCollisionBoxes(){return!!this._showCollisionBoxes}set showCollisionBoxes(R){this._showCollisionBoxes!==R&&(this._showCollisionBoxes=R,R?this.style._generateCollisionBoxes():this._update())}get showOverdrawInspector(){return!!this._showOverdrawInspector}set showOverdrawInspector(R){this._showOverdrawInspector!==R&&(this._showOverdrawInspector=R,this._update())}get repaint(){return!!this._repaint}set repaint(R){this._repaint!==R&&(this._repaint=R,this.triggerRepaint())}get vertices(){return!!this._vertices}set vertices(R){this._vertices=R,this._update()}get version(){return Mc}getCameraTargetElevation(){return this.transform.elevation}},p.MapMouseEvent=Bo,p.MapTouchEvent=ko,p.MapWheelEvent=il,p.Marker=Oi,p.NavigationControl=class{constructor(R){this._updateZoomButtons=()=>{const u=this._map.getZoom(),f=u===this._map.getMaxZoom(),D=u===this._map.getMinZoom();this._zoomInButton.disabled=f,this._zoomOutButton.disabled=D,this._zoomInButton.setAttribute("aria-disabled",f.toString()),this._zoomOutButton.setAttribute("aria-disabled",D.toString())},this._rotateCompassArrow=()=>{const u=this.options.visualizePitch?`scale(${1/Math.pow(Math.cos(this._map.transform.pitch*(Math.PI/180)),.5)}) rotateX(${this._map.transform.pitch}deg) rotateZ(${this._map.transform.angle*(180/Math.PI)}deg)`:`rotate(${this._map.transform.angle*(180/Math.PI)}deg)`;this._compassIcon.style.transform=u},this._setButtonTitle=(u,f)=>{const D=this._map._getUIString(`NavigationControl.${f}`);u.title=D,u.setAttribute("aria-label",D)},this.options=r.e({},Os,R),this._container=n.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._container.addEventListener("contextmenu",u=>u.preventDefault()),this.options.showZoom&&(this._zoomInButton=this._createButton("maplibregl-ctrl-zoom-in",u=>this._map.zoomIn({},{originalEvent:u})),n.create("span","maplibregl-ctrl-icon",this._zoomInButton).setAttribute("aria-hidden","true"),this._zoomOutButton=this._createButton("maplibregl-ctrl-zoom-out",u=>this._map.zoomOut({},{originalEvent:u})),n.create("span","maplibregl-ctrl-icon",this._zoomOutButton).setAttribute("aria-hidden","true")),this.options.showCompass&&(this._compass=this._createButton("maplibregl-ctrl-compass",u=>{this.options.visualizePitch?this._map.resetNorthPitch({},{originalEvent:u}):this._map.resetNorth({},{originalEvent:u})}),this._compassIcon=n.create("span","maplibregl-ctrl-icon",this._compass),this._compassIcon.setAttribute("aria-hidden","true"))}onAdd(R){return this._map=R,this.options.showZoom&&(this._setButtonTitle(this._zoomInButton,"ZoomIn"),this._setButtonTitle(this._zoomOutButton,"ZoomOut"),this._map.on("zoom",this._updateZoomButtons),this._updateZoomButtons()),this.options.showCompass&&(this._setButtonTitle(this._compass,"ResetBearing"),this.options.visualizePitch&&this._map.on("pitch",this._rotateCompassArrow),this._map.on("rotate",this._rotateCompassArrow),this._rotateCompassArrow(),this._handler=new qr(this._map,this._compass,this.options.visualizePitch)),this._container}onRemove(){n.remove(this._container),this.options.showZoom&&this._map.off("zoom",this._updateZoomButtons),this.options.showCompass&&(this.options.visualizePitch&&this._map.off("pitch",this._rotateCompassArrow),this._map.off("rotate",this._rotateCompassArrow),this._handler.off(),delete this._handler),delete this._map}_createButton(R,u){const f=n.create("button",R,this._container);return f.type="button",f.addEventListener("click",u),f}},p.Popup=kt,p.RasterDEMTileSource=He,p.RasterTileSource=ze,p.ScaleControl=class{constructor(R){this._onMove=()=>{wi(this._map,this._container,this.options)},this.setUnit=u=>{this.options.unit=u,wi(this._map,this._container,this.options)},this.options=Object.assign(Object.assign({},an),R)}getDefaultPosition(){return"bottom-left"}onAdd(R){return this._map=R,this._container=n.create("div","maplibregl-ctrl maplibregl-ctrl-scale",R.getContainer()),this._map.on("move",this._onMove),this._onMove(),this._container}onRemove(){n.remove(this._container),this._map.off("move",this._onMove),this._map=void 0}},p.ScrollZoomHandler=cl,p.Style=Vr,p.TerrainControl=class{constructor(R){this._toggleTerrain=()=>{this._map.getTerrain()?this._map.setTerrain(null):this._map.setTerrain(this.options),this._updateTerrainIcon()},this._updateTerrainIcon=()=>{this._terrainButton.classList.remove("maplibregl-ctrl-terrain"),this._terrainButton.classList.remove("maplibregl-ctrl-terrain-enabled"),this._map.terrain?(this._terrainButton.classList.add("maplibregl-ctrl-terrain-enabled"),this._terrainButton.title=this._map._getUIString("TerrainControl.Disable")):(this._terrainButton.classList.add("maplibregl-ctrl-terrain"),this._terrainButton.title=this._map._getUIString("TerrainControl.Enable"))},this.options=R}onAdd(R){return this._map=R,this._container=n.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._terrainButton=n.create("button","maplibregl-ctrl-terrain",this._container),n.create("span","maplibregl-ctrl-icon",this._terrainButton).setAttribute("aria-hidden","true"),this._terrainButton.type="button",this._terrainButton.addEventListener("click",this._toggleTerrain),this._updateTerrainIcon(),this._map.on("terrain",this._updateTerrainIcon),this._container}onRemove(){n.remove(this._container),this._map.off("terrain",this._updateTerrainIcon),this._map=void 0}},p.TwoFingersTouchPitchHandler=Rl,p.TwoFingersTouchRotateHandler=Jc,p.TwoFingersTouchZoomHandler=gn,p.TwoFingersTouchZoomRotateHandler=dl,p.VectorTileSource=Le,p.VideoSource=ge,p.addSourceType=(R,u)=>r._(void 0,void 0,void 0,function*(){if(je(R))throw new Error(`A source type called "${R}" already exists.`);((f,D)=>{ke[f]=D})(R,u)}),p.clearPrewarmedResources=function(){const R=pe;R&&(R.isPreloaded()&&R.numActive()===1?(R.release(ce),pe=null):console.warn("Could not clear WebWorkers since there are active Map instances that still reference it. The pre-warmed WebWorker pool can only be cleared when all map instances have been removed with map.remove()"))},p.getMaxParallelImageRequests=function(){return r.a.MAX_PARALLEL_IMAGE_REQUESTS},p.getRTLTextPluginStatus=function(){return Ze().getRTLTextPluginStatus()},p.getVersion=function(){return ae},p.getWorkerCount=function(){return de.workerCount},p.getWorkerUrl=function(){return r.a.WORKER_URL},p.importScriptInWorkers=function(R){return me().broadcast("IS",R)},p.prewarm=function(){se().acquire(ce)},p.setMaxParallelImageRequests=function(R){r.a.MAX_PARALLEL_IMAGE_REQUESTS=R},p.setRTLTextPlugin=function(R,u){return Ze().setRTLTextPlugin(R,u)},p.setWorkerCount=function(R){de.workerCount=R},p.setWorkerUrl=function(R){r.a.WORKER_URL=R}}),y}()},88640:function(m,y,a){function v(we,Se,Ce){we.prototype=Se.prototype=Ce,Ce.constructor=we}function p(we,Se){var Ce=Object.create(we.prototype);for(var Me in Se)Ce[Me]=Se[Me];return Ce}function r(){}a.d(y,{GW:function(){return ve},Dj:function(){return de}});var _=.7,b=1/_,x="\\s*([+-]?\\d+)\\s*",h="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",n="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",i=/^#([0-9a-f]{3,8})$/,c=new RegExp("^rgb\\(".concat(x,",").concat(x,",").concat(x,"\\)$")),l=new RegExp("^rgb\\(".concat(n,",").concat(n,",").concat(n,"\\)$")),d=new RegExp("^rgba\\(".concat(x,",").concat(x,",").concat(x,",").concat(h,"\\)$")),g=new RegExp("^rgba\\(".concat(n,",").concat(n,",").concat(n,",").concat(h,"\\)$")),w=new RegExp("^hsl\\(".concat(h,",").concat(n,",").concat(n,"\\)$")),C=new RegExp("^hsla\\(".concat(h,",").concat(n,",").concat(n,",").concat(h,"\\)$")),E={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function A(){return this.rgb().formatHex()}function P(){return this.rgb().formatRgb()}function L(we){var Se,Ce;return we=(we+"").trim().toLowerCase(),(Se=i.exec(we))?(Ce=Se[1].length,Se=parseInt(Se[1],16),Ce===6?T(Se):Ce===3?new S(Se>>8&15|Se>>4&240,Se>>4&15|240&Se,(15&Se)<<4|15&Se,1):Ce===8?I(Se>>24&255,Se>>16&255,Se>>8&255,(255&Se)/255):Ce===4?I(Se>>12&15|Se>>8&240,Se>>8&15|Se>>4&240,Se>>4&15|240&Se,((15&Se)<<4|15&Se)/255):null):(Se=c.exec(we))?new S(Se[1],Se[2],Se[3],1):(Se=l.exec(we))?new S(255*Se[1]/100,255*Se[2]/100,255*Se[3]/100,1):(Se=d.exec(we))?I(Se[1],Se[2],Se[3],Se[4]):(Se=g.exec(we))?I(255*Se[1]/100,255*Se[2]/100,255*Se[3]/100,Se[4]):(Se=w.exec(we))?G(Se[1],Se[2]/100,Se[3]/100,1):(Se=C.exec(we))?G(Se[1],Se[2]/100,Se[3]/100,Se[4]):E.hasOwnProperty(we)?T(E[we]):we==="transparent"?new S(NaN,NaN,NaN,0):null}function T(we){return new S(we>>16&255,we>>8&255,255&we,1)}function I(we,Se,Ce,Me){return Me<=0&&(we=Se=Ce=NaN),new S(we,Se,Ce,Me)}function M(we,Se,Ce,Me){return arguments.length===1?((Le=we)instanceof r||(Le=L(Le)),Le?new S((Le=Le.rgb()).r,Le.g,Le.b,Le.opacity):new S):new S(we,Se,Ce,Me??1);var Le}function S(we,Se,Ce,Me){this.r=+we,this.g=+Se,this.b=+Ce,this.opacity=+Me}function z(){return"#".concat(j(this.r)).concat(j(this.g)).concat(j(this.b))}function k(){var we=O(this.opacity);return"".concat(we===1?"rgb(":"rgba(").concat(N(this.r),", ").concat(N(this.g),", ").concat(N(this.b)).concat(we===1?")":", ".concat(we,")"))}function O(we){return isNaN(we)?1:Math.max(0,Math.min(1,we))}function N(we){return Math.max(0,Math.min(255,Math.round(we)||0))}function j(we){return((we=N(we))<16?"0":"")+we.toString(16)}function G(we,Se,Ce,Me){return Me<=0?we=Se=Ce=NaN:Ce<=0||Ce>=1?we=Se=NaN:Se<=0&&(we=NaN),new Z(we,Se,Ce,Me)}function H(we){if(we instanceof Z)return new Z(we.h,we.s,we.l,we.opacity);if(we instanceof r||(we=L(we)),!we)return new Z;if(we instanceof Z)return we;var Se=(we=we.rgb()).r/255,Ce=we.g/255,Me=we.b/255,Le=Math.min(Se,Ce,Me),ze=Math.max(Se,Ce,Me),He=NaN,Pe=ze-Le,Ve=(ze+Le)/2;return Pe?(He=Se===ze?(Ce-Me)/Pe+6*(Ce<Me):Ce===ze?(Me-Se)/Pe+2:(Se-Ce)/Pe+4,Pe/=Ve<.5?ze+Le:2-ze-Le,He*=60):Pe=Ve>0&&Ve<1?0:He,new Z(He,Pe,Ve,we.opacity)}function Z(we,Se,Ce,Me){this.h=+we,this.s=+Se,this.l=+Ce,this.opacity=+Me}function $(we){return(we=(we||0)%360)<0?we+360:we}function ne(we){return Math.max(0,Math.min(1,we||0))}function q(we,Se,Ce){return 255*(we<60?Se+(Ce-Se)*we/60:we<180?Ce:we<240?Se+(Ce-Se)*(240-we)/60:Se)}v(r,L,{copy:function(we){return Object.assign(new this.constructor,this,we)},displayable:function(){return this.rgb().displayable()},hex:A,formatHex:A,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return H(this).formatHsl()},formatRgb:P,toString:P}),v(S,M,p(r,{brighter:function(we){return we=we==null?b:Math.pow(b,we),new S(this.r*we,this.g*we,this.b*we,this.opacity)},darker:function(we){return we=we==null?_:Math.pow(_,we),new S(this.r*we,this.g*we,this.b*we,this.opacity)},rgb:function(){return this},clamp:function(){return new S(N(this.r),N(this.g),N(this.b),O(this.opacity))},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:z,formatHex:z,formatHex8:function(){return"#".concat(j(this.r)).concat(j(this.g)).concat(j(this.b)).concat(j(255*(isNaN(this.opacity)?1:this.opacity)))},formatRgb:k,toString:k})),v(Z,function(we,Se,Ce,Me){return arguments.length===1?H(we):new Z(we,Se,Ce,Me??1)},p(r,{brighter:function(we){return we=we==null?b:Math.pow(b,we),new Z(this.h,this.s,this.l*we,this.opacity)},darker:function(we){return we=we==null?_:Math.pow(_,we),new Z(this.h,this.s,this.l*we,this.opacity)},rgb:function(){var we=this.h%360+360*(this.h<0),Se=isNaN(we)||isNaN(this.s)?0:this.s,Ce=this.l,Me=Ce+(Ce<.5?Ce:1-Ce)*Se,Le=2*Ce-Me;return new S(q(we>=240?we-240:we+120,Le,Me),q(we,Le,Me),q(we<120?we+240:we-120,Le,Me),this.opacity)},clamp:function(){return new Z($(this.h),ne(this.s),ne(this.l),O(this.opacity))},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var we=O(this.opacity);return"".concat(we===1?"hsl(":"hsla(").concat($(this.h),", ").concat(100*ne(this.s),"%, ").concat(100*ne(this.l),"%").concat(we===1?")":", ".concat(we,")"))}}));var K=function(we){return function(){return we}};function ee(we,Se){var Ce=Se-we;return Ce?function(Me,Le){return function(ze){return Me+ze*Le}}(we,Ce):K(isNaN(we)?Se:we)}var X=function we(Se){var Ce=function(Le){return(Le=+Le)==1?ee:function(ze,He){return He-ze?function(Pe,Ve,Ie){return Pe=Math.pow(Pe,Ie),Ve=Math.pow(Ve,Ie)-Pe,Ie=1/Ie,function(ge){return Math.pow(Pe+ge*Ve,Ie)}}(ze,He,Le):K(isNaN(ze)?He:ze)}}(Se);function Me(Le,ze){var He=Ce((Le=M(Le)).r,(ze=M(ze)).r),Pe=Ce(Le.g,ze.g),Ve=Ce(Le.b,ze.b),Ie=ee(Le.opacity,ze.opacity);return function(ge){return Le.r=He(ge),Le.g=Pe(ge),Le.b=Ve(ge),Le.opacity=Ie(ge),Le+""}}return Me.gamma=we,Me}(1);function Q(we,Se){var Ce,Me=Se?Se.length:0,Le=we?Math.min(Me,we.length):0,ze=new Array(Le),He=new Array(Me);for(Ce=0;Ce<Le;++Ce)ze[Ce]=ve(we[Ce],Se[Ce]);for(;Ce<Me;++Ce)He[Ce]=Se[Ce];return function(Pe){for(Ce=0;Ce<Le;++Ce)He[Ce]=ze[Ce](Pe);return He}}function ce(we,Se){var Ce=new Date;return we=+we,Se=+Se,function(Me){return Ce.setTime(we*(1-Me)+Se*Me),Ce}}function de(we,Se){return we=+we,Se=+Se,function(Ce){return we*(1-Ce)+Se*Ce}}function he(we){return he=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(Se){return typeof Se}:function(Se){return Se&&typeof Symbol=="function"&&Se.constructor===Symbol&&Se!==Symbol.prototype?"symbol":typeof Se},he(we)}function pe(we,Se){var Ce,Me={},Le={};for(Ce in we!==null&&he(we)==="object"||(we={}),Se!==null&&he(Se)==="object"||(Se={}),Se)Ce in we?Me[Ce]=ve(we[Ce],Se[Ce]):Le[Ce]=Se[Ce];return function(ze){for(Ce in Me)Le[Ce]=Me[Ce](ze);return Le}}var re=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,se=new RegExp(re.source,"g");function ie(we,Se){var Ce,Me,Le,ze=re.lastIndex=se.lastIndex=0,He=-1,Pe=[],Ve=[];for(we+="",Se+="";(Ce=re.exec(we))&&(Me=se.exec(Se));)(Le=Me.index)>ze&&(Le=Se.slice(ze,Le),Pe[He]?Pe[He]+=Le:Pe[++He]=Le),(Ce=Ce[0])===(Me=Me[0])?Pe[He]?Pe[He]+=Me:Pe[++He]=Me:(Pe[++He]=null,Ve.push({i:He,x:de(Ce,Me)})),ze=se.lastIndex;return ze<Se.length&&(Le=Se.slice(ze),Pe[He]?Pe[He]+=Le:Pe[++He]=Le),Pe.length<2?Ve[0]?function(Ie){return function(ge){return Ie(ge)+""}}(Ve[0].x):function(Ie){return function(){return Ie}}(Se):(Se=Ve.length,function(Ie){for(var ge,Ae=0;Ae<Se;++Ae)Pe[(ge=Ve[Ae]).i]=ge.x(Ie);return Pe.join("")})}function me(we,Se){Se||(Se=[]);var Ce,Me=we?Math.min(Se.length,we.length):0,Le=Se.slice();return function(ze){for(Ce=0;Ce<Me;++Ce)Le[Ce]=we[Ce]*(1-ze)+Se[Ce]*ze;return Le}}function ye(we){return ye=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(Se){return typeof Se}:function(Se){return Se&&typeof Symbol=="function"&&Se.constructor===Symbol&&Se!==Symbol.prototype?"symbol":typeof Se},ye(we)}function ve(we,Se){var Ce,Me,Le=ye(Se);return Se==null||Le==="boolean"?K(Se):(Le==="number"?de:Le==="string"?(Ce=L(Se))?(Se=Ce,X):ie:Se instanceof L?X:Se instanceof Date?ce:(Me=Se,!ArrayBuffer.isView(Me)||Me instanceof DataView?Array.isArray(Se)?Q:typeof Se.valueOf!="function"&&typeof Se.toString!="function"||isNaN(Se)?pe:de:me))(we,Se)}},23648:function(m){m.exports=JSON.parse('["xx-small","x-small","small","medium","large","x-large","xx-large","larger","smaller"]')},2362:function(m){m.exports=JSON.parse('["normal","condensed","semi-condensed","extra-condensed","ultra-condensed","expanded","semi-expanded","extra-expanded","ultra-expanded"]')},87486:function(m){m.exports=JSON.parse('["normal","italic","oblique"]')},99803:function(m){m.exports=JSON.parse('["normal","bold","bolder","lighter","100","200","300","400","500","600","700","800","900"]')},54324:function(m){m.exports=JSON.parse('["inherit","initial","unset"]')},94316:function(m){m.exports=JSON.parse('["caption","icon","menu","message-box","small-caption","status-bar"]')},37071:function(m){m.exports=JSON.parse(`{"version":8,"name":"orto","metadata":{"maputnik:renderer":"mlgljs"},"center":[1.537786,41.837539],"zoom":12,"bearing":0,"pitch":0,"light":{"anchor":"viewport","color":"white","intensity":0.4,"position":[1.15,45,30]},"sources":{"ortoEsri":{"type":"raster","tiles":["https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}"],"tileSize":256,"maxzoom":18,"attribution":"ESRI &copy; <a href='http://www.esri.com'>ESRI</a>"},"ortoInstaMaps":{"type":"raster","tiles":["https://tilemaps.icgc.cat/mapfactory/wmts/orto_8_12/CAT3857/{z}/{x}/{y}.png"],"tileSize":256,"maxzoom":13},"ortoICGC":{"type":"raster","tiles":["https://geoserveis.icgc.cat/icc_mapesmultibase/noutm/wmts/orto/GRID3857/{z}/{x}/{y}.jpeg"],"tileSize":256,"minzoom":13.1,"maxzoom":20},"openmaptiles":{"type":"vector","url":"https://geoserveis.icgc.cat/contextmaps/basemap.json"}},"sprite":"https://geoserveis.icgc.cat/contextmaps/sprites/sprite@1","glyphs":"https://geoserveis.icgc.cat/contextmaps/glyphs/{fontstack}/{range}.pbf","layers":[{"id":"background","type":"background","paint":{"background-color":"#F4F9F4"}},{"id":"ortoEsri","type":"raster","source":"ortoEsri","maxzoom":16,"layout":{"visibility":"visible"}},{"id":"ortoICGC","type":"raster","source":"ortoICGC","minzoom":13.1,"maxzoom":19,"layout":{"visibility":"visible"}},{"id":"ortoInstaMaps","type":"raster","source":"ortoInstaMaps","maxzoom":13,"layout":{"visibility":"visible"}},{"id":"waterway_tunnel","type":"line","source":"openmaptiles","source-layer":"waterway","minzoom":14,"filter":["all",["in","class","river","stream","canal"],["==","brunnel","tunnel"]],"layout":{"line-cap":"round"},"paint":{"line-color":"#a0c8f0","line-width":{"base":1.3,"stops":[[13,0.5],[20,6]]},"line-dasharray":[2,4]}},{"id":"waterway-other","type":"line","metadata":{"mapbox:group":"1444849382550.77"},"source":"openmaptiles","source-layer":"waterway","filter":["!in","class","canal","river","stream"],"layout":{"line-cap":"round"},"paint":{"line-color":"#a0c8f0","line-width":{"base":1.3,"stops":[[13,0.5],[20,2]]}}},{"id":"waterway-stream-canal","type":"line","metadata":{"mapbox:group":"1444849382550.77"},"source":"openmaptiles","source-layer":"waterway","filter":["all",["in","class","canal","stream"],["!=","brunnel","tunnel"]],"layout":{"line-cap":"round"},"paint":{"line-color":"#a0c8f0","line-width":{"base":1.3,"stops":[[13,0.5],[20,6]]}}},{"id":"waterway-river","type":"line","metadata":{"mapbox:group":"1444849382550.77"},"source":"openmaptiles","source-layer":"waterway","filter":["all",["==","class","river"],["!=","brunnel","tunnel"]],"layout":{"line-cap":"round"},"paint":{"line-color":"#a0c8f0","line-width":{"base":1.2,"stops":[[10,0.8],[20,4]]},"line-opacity":0.5}},{"id":"water-offset","type":"fill","metadata":{"mapbox:group":"1444849382550.77"},"source":"openmaptiles","source-layer":"water","maxzoom":8,"filter":["==","$type","Polygon"],"layout":{"visibility":"visible"},"paint":{"fill-opacity":0,"fill-color":"#a0c8f0","fill-translate":{"base":1,"stops":[[6,[2,0]],[8,[0,0]]]}}},{"id":"water","type":"fill","metadata":{"mapbox:group":"1444849382550.77"},"source":"openmaptiles","source-layer":"water","layout":{"visibility":"visible"},"paint":{"fill-color":"hsl(210, 67%, 85%)","fill-opacity":0}},{"id":"water-pattern","type":"fill","metadata":{"mapbox:group":"1444849382550.77"},"source":"openmaptiles","source-layer":"water","layout":{"visibility":"visible"},"paint":{"fill-translate":[0,2.5],"fill-pattern":"wave","fill-opacity":1}},{"id":"landcover-ice-shelf","type":"fill","metadata":{"mapbox:group":"1444849382550.77"},"source":"openmaptiles","source-layer":"landcover","filter":["==","subclass","ice_shelf"],"layout":{"visibility":"visible"},"paint":{"fill-color":"#fff","fill-opacity":{"base":1,"stops":[[0,0.9],[10,0.3]]}}},{"id":"tunnel-service-track-casing","type":"line","metadata":{"mapbox:group":"1444849354174.1904"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","tunnel"],["in","class","service","track"]],"layout":{"line-join":"round"},"paint":{"line-color":"#cfcdca","line-dasharray":[0.5,0.25],"line-width":{"base":1.2,"stops":[[15,1],[16,4],[20,11]]}}},{"id":"tunnel-minor-casing","type":"line","metadata":{"mapbox:group":"1444849354174.1904"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","tunnel"],["==","class","minor"]],"layout":{"line-join":"round"},"paint":{"line-color":"#cfcdca","line-opacity":{"stops":[[12,0],[12.5,1]]},"line-width":{"base":1.2,"stops":[[12,0.5],[13,1],[14,4],[20,15]]}}},{"id":"tunnel-secondary-tertiary-casing","type":"line","metadata":{"mapbox:group":"1444849354174.1904"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","tunnel"],["in","class","secondary","tertiary"]],"layout":{"line-join":"round"},"paint":{"line-color":"#e9ac77","line-opacity":1,"line-width":{"base":1.2,"stops":[[8,1.5],[20,17]]}}},{"id":"tunnel-trunk-primary-casing","type":"line","metadata":{"mapbox:group":"1444849354174.1904"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","tunnel"],["in","class","primary","trunk"]],"layout":{"line-join":"round"},"paint":{"line-color":"#e9ac77","line-width":{"base":1.2,"stops":[[5,0.4],[6,0.6],[7,1.5],[20,22]]},"line-opacity":0.7}},{"id":"tunnel-motorway-casing","type":"line","metadata":{"mapbox:group":"1444849354174.1904"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","tunnel"],["==","class","motorway"]],"layout":{"line-join":"round","visibility":"visible"},"paint":{"line-color":"#e9ac77","line-dasharray":[0.5,0.25],"line-width":{"base":1.2,"stops":[[5,0.4],[6,0.6],[7,1.5],[20,22]]},"line-opacity":0.5}},{"id":"tunnel-path","type":"line","metadata":{"mapbox:group":"1444849354174.1904"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","$type","LineString"],["all",["==","brunnel","tunnel"],["==","class","path"]]],"paint":{"line-color":"#cba","line-dasharray":[1.5,0.75],"line-width":{"base":1.2,"stops":[[15,1.2],[20,4]]}}},{"id":"tunnel-service-track","type":"line","metadata":{"mapbox:group":"1444849354174.1904"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","tunnel"],["in","class","service","track"]],"layout":{"line-join":"round"},"paint":{"line-color":"#fff","line-width":{"base":1.2,"stops":[[15.5,0],[16,2],[20,7.5]]}}},{"id":"tunnel-minor","type":"line","metadata":{"mapbox:group":"1444849354174.1904"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","tunnel"],["==","class","minor_road"]],"layout":{"line-join":"round"},"paint":{"line-color":"#fff","line-opacity":1,"line-width":{"base":1.2,"stops":[[13.5,0],[14,2.5],[20,11.5]]}}},{"id":"tunnel-secondary-tertiary","type":"line","metadata":{"mapbox:group":"1444849354174.1904"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","tunnel"],["in","class","secondary","tertiary"]],"layout":{"line-join":"round"},"paint":{"line-color":"#fff4c6","line-width":{"base":1.2,"stops":[[6.5,0],[7,0.5],[20,10]]}}},{"id":"tunnel-trunk-primary","type":"line","metadata":{"mapbox:group":"1444849354174.1904"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","tunnel"],["in","class","primary","trunk"]],"layout":{"line-join":"round"},"paint":{"line-color":"#fff4c6","line-width":{"base":1.2,"stops":[[6.5,0],[7,0.5],[20,18]]},"line-opacity":0.5}},{"id":"tunnel-motorway","type":"line","metadata":{"mapbox:group":"1444849354174.1904"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","tunnel"],["==","class","motorway"]],"layout":{"line-join":"round","visibility":"visible"},"paint":{"line-color":"#ffdaa6","line-width":{"base":1.2,"stops":[[6.5,0],[7,0.5],[20,18]]},"line-opacity":0.5}},{"id":"tunnel-railway","type":"line","metadata":{"mapbox:group":"1444849354174.1904"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","tunnel"],["==","class","rail"]],"paint":{"line-color":"#bbb","line-width":{"base":1.4,"stops":[[14,0.4],[15,0.75],[20,2]]},"line-dasharray":[2,2]}},{"id":"ferry","type":"line","source":"openmaptiles","source-layer":"transportation","filter":["all",["in","class","ferry"]],"layout":{"line-join":"round","visibility":"visible"},"paint":{"line-color":"rgba(108, 159, 182, 1)","line-width":1.1,"line-dasharray":[2,2]}},{"id":"aeroway-taxiway-casing","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"aeroway","minzoom":12,"filter":["all",["in","class","taxiway"]],"layout":{"line-cap":"round","line-join":"round","visibility":"visible"},"paint":{"line-color":"rgba(153, 153, 153, 1)","line-width":{"base":1.5,"stops":[[11,2],[17,12]]},"line-opacity":1}},{"id":"aeroway-runway-casing","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"aeroway","minzoom":12,"filter":["all",["in","class","runway"]],"layout":{"line-cap":"round","line-join":"round","visibility":"visible"},"paint":{"line-color":"rgba(153, 153, 153, 1)","line-width":{"base":1.5,"stops":[[11,5],[17,55]]},"line-opacity":1}},{"id":"aeroway-taxiway","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"aeroway","minzoom":4,"filter":["all",["in","class","taxiway"],["==","$type","LineString"]],"layout":{"line-cap":"round","line-join":"round","visibility":"visible"},"paint":{"line-color":"rgba(255, 255, 255, 1)","line-width":{"base":1.5,"stops":[[11,1],[17,10]]},"line-opacity":{"base":1,"stops":[[11,0],[12,1]]}}},{"id":"aeroway-runway","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"aeroway","minzoom":4,"filter":["all",["in","class","runway"],["==","$type","LineString"]],"layout":{"line-cap":"round","line-join":"round","visibility":"visible"},"paint":{"line-color":"rgba(255, 255, 255, 1)","line-width":{"base":1.5,"stops":[[11,4],[17,50]]},"line-opacity":{"base":1,"stops":[[11,0],[12,1]]}}},{"id":"highway-motorway-link-casing","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","minzoom":12,"filter":["all",["!in","brunnel","bridge","tunnel"],["==","class","motorway_link"]],"layout":{"line-cap":"round","line-join":"round"},"paint":{"line-color":"#e9ac77","line-opacity":1,"line-width":{"base":1.2,"stops":[[12,1],[13,3],[14,4],[20,15]]}}},{"id":"highway-link-casing","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","minzoom":13,"filter":["all",["!in","brunnel","bridge","tunnel"],["in","class","primary_link","secondary_link","tertiary_link","trunk_link"]],"layout":{"line-cap":"round","line-join":"round","visibility":"visible"},"paint":{"line-color":"#e9ac77","line-opacity":1,"line-width":{"base":1.2,"stops":[[12,1],[13,3],[14,4],[20,15]]}}},{"id":"highway-minor-casing","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","$type","LineString"],["all",["!=","brunnel","tunnel"],["in","class","minor","service","track"]]],"layout":{"line-cap":"round","line-join":"round"},"paint":{"line-color":"#cfcdca","line-opacity":{"stops":[[12,0],[12.5,0]]},"line-width":{"base":1.2,"stops":[[12,0.5],[13,1],[14,4],[20,15]]}}},{"id":"highway-secondary-tertiary-casing","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["!in","brunnel","bridge","tunnel"],["in","class","secondary","tertiary"]],"layout":{"line-cap":"butt","line-join":"round","visibility":"visible"},"paint":{"line-color":"#e9ac77","line-opacity":0.5,"line-width":{"base":1.2,"stops":[[8,1.5],[20,17]]}}},{"id":"highway-primary-casing","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","minzoom":5,"filter":["all",["!in","brunnel","bridge","tunnel"],["in","class","primary"]],"layout":{"line-cap":"butt","line-join":"round","visibility":"visible"},"paint":{"line-color":"#e9ac77","line-opacity":{"stops":[[7,0],[8,0.6]]},"line-width":{"base":1.2,"stops":[[7,0],[8,0.6],[9,1.5],[20,22]]}}},{"id":"highway-trunk-casing","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","minzoom":5,"filter":["all",["!in","brunnel","bridge","tunnel"],["in","class","trunk"]],"layout":{"line-cap":"butt","line-join":"round","visibility":"visible"},"paint":{"line-color":"#e9ac77","line-opacity":{"stops":[[5,0],[6,0.5]]},"line-width":{"base":1.2,"stops":[[5,0],[6,0.6],[7,1.5],[20,22]]}}},{"id":"highway-motorway-casing","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","minzoom":4,"filter":["all",["!in","brunnel","bridge","tunnel"],["==","class","motorway"]],"layout":{"line-cap":"butt","line-join":"round","visibility":"visible"},"paint":{"line-color":"#e9ac77","line-width":{"base":1.2,"stops":[[4,0],[5,0.4],[6,0.6],[7,1.5],[20,22]]},"line-opacity":{"stops":[[4,0],[5,0.5]]}}},{"id":"highway-path","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","$type","LineString"],["all",["!in","brunnel","bridge","tunnel"],["==","class","path"]]],"paint":{"line-color":"#cba","line-dasharray":[1.5,0.75],"line-width":{"base":1.2,"stops":[[15,1.2],[20,4]]}}},{"id":"highway-motorway-link","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","minzoom":12,"filter":["all",["!in","brunnel","bridge","tunnel"],["==","class","motorway_link"]],"layout":{"line-cap":"round","line-join":"round"},"paint":{"line-color":"#fc8","line-width":{"base":1.2,"stops":[[12.5,0],[13,1.5],[14,2.5],[20,11.5]]}}},{"id":"highway-link","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","minzoom":13,"filter":["all",["!in","brunnel","bridge","tunnel"],["in","class","primary_link","secondary_link","tertiary_link","trunk_link"]],"layout":{"line-cap":"round","line-join":"round","visibility":"visible"},"paint":{"line-color":"#fea","line-width":{"base":1.2,"stops":[[12.5,0],[13,1.5],[14,2.5],[20,11.5]]}}},{"id":"highway-minor","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","$type","LineString"],["all",["!=","brunnel","tunnel"],["in","class","minor","service","track"]]],"layout":{"line-cap":"round","line-join":"round"},"paint":{"line-color":"#fff","line-opacity":0.5,"line-width":{"base":1.2,"stops":[[13.5,0],[14,2.5],[20,11.5]]}}},{"id":"highway-secondary-tertiary","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["!in","brunnel","bridge","tunnel"],["in","class","secondary","tertiary"]],"layout":{"line-cap":"round","line-join":"round","visibility":"visible"},"paint":{"line-color":"#fea","line-width":{"base":1.2,"stops":[[6.5,0],[8,0.5],[20,13]]},"line-opacity":0.5}},{"id":"highway-primary","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","$type","LineString"],["all",["!in","brunnel","bridge","tunnel"],["in","class","primary"]]],"layout":{"line-cap":"round","line-join":"round","visibility":"visible"},"paint":{"line-color":"#fea","line-width":{"base":1.2,"stops":[[8.5,0],[9,0.5],[20,18]]},"line-opacity":0}},{"id":"highway-trunk","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","$type","LineString"],["all",["!in","brunnel","bridge","tunnel"],["in","class","trunk"]]],"layout":{"line-cap":"round","line-join":"round","visibility":"visible"},"paint":{"line-color":"#fea","line-width":{"base":1.2,"stops":[[6.5,0],[7,0.5],[20,18]]},"line-opacity":0.5}},{"id":"highway-motorway","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","minzoom":5,"filter":["all",["==","$type","LineString"],["all",["!in","brunnel","bridge","tunnel"],["==","class","motorway"]]],"layout":{"line-cap":"round","line-join":"round","visibility":"visible"},"paint":{"line-color":"#fc8","line-width":{"base":1.2,"stops":[[6.5,0],[7,0.5],[20,18]]},"line-opacity":0.5}},{"id":"railway-transit","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","$type","LineString"],["all",["==","class","transit"],["!in","brunnel","tunnel"]]],"layout":{"visibility":"visible"},"paint":{"line-color":"hsla(0, 0%, 73%, 0.77)","line-width":{"base":1.4,"stops":[[14,0.4],[20,1]]}}},{"id":"railway-transit-hatching","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","$type","LineString"],["all",["==","class","transit"],["!in","brunnel","tunnel"]]],"layout":{"visibility":"visible"},"paint":{"line-color":"hsla(0, 0%, 73%, 0.68)","line-dasharray":[0.2,8],"line-width":{"base":1.4,"stops":[[14.5,0],[15,2],[20,6]]}}},{"id":"railway-service","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","$type","LineString"],["all",["==","class","rail"],["has","service"]]],"paint":{"line-color":"hsla(0, 0%, 73%, 0.77)","line-width":{"base":1.4,"stops":[[14,0.4],[20,1]]}}},{"id":"railway-service-hatching","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","$type","LineString"],["all",["==","class","rail"],["has","service"]]],"layout":{"visibility":"visible"},"paint":{"line-color":"hsla(0, 0%, 73%, 0.68)","line-dasharray":[0.2,8],"line-width":{"base":1.4,"stops":[[14.5,0],[15,2],[20,6]]}}},{"id":"railway","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","$type","LineString"],["all",["!has","service"],["!in","brunnel","bridge","tunnel"],["==","class","rail"]]],"paint":{"line-color":"#bbb","line-width":{"base":1.4,"stops":[[14,0.4],[15,0.75],[20,2]]}}},{"id":"railway-hatching","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","$type","LineString"],["all",["!has","service"],["!in","brunnel","bridge","tunnel"],["==","class","rail"]]],"paint":{"line-color":"#bbb","line-dasharray":[0.2,8],"line-width":{"base":1.4,"stops":[[14.5,0],[15,3],[20,8]]}}},{"id":"bridge-motorway-link-casing","type":"line","metadata":{"mapbox:group":"1444849334699.1902"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","bridge"],["==","class","motorway_link"]],"layout":{"line-join":"round"},"paint":{"line-color":"#e9ac77","line-opacity":1,"line-width":{"base":1.2,"stops":[[12,1],[13,3],[14,4],[20,15]]}}},{"id":"bridge-link-casing","type":"line","metadata":{"mapbox:group":"1444849334699.1902"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","bridge"],["in","class","primary_link","secondary_link","tertiary_link","trunk_link"]],"layout":{"line-join":"round"},"paint":{"line-color":"#e9ac77","line-opacity":1,"line-width":{"base":1.2,"stops":[[12,1],[13,3],[14,4],[20,15]]}}},{"id":"bridge-secondary-tertiary-casing","type":"line","metadata":{"mapbox:group":"1444849334699.1902"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","bridge"],["in","class","secondary","tertiary"]],"layout":{"line-join":"round"},"paint":{"line-color":"#e9ac77","line-opacity":1,"line-width":{"base":1.2,"stops":[[8,1.5],[20,28]]}}},{"id":"bridge-trunk-primary-casing","type":"line","metadata":{"mapbox:group":"1444849334699.1902"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","bridge"],["in","class","primary","trunk"]],"layout":{"line-join":"round"},"paint":{"line-color":"hsl(28, 76%, 67%)","line-width":{"base":1.2,"stops":[[5,0.4],[6,0.6],[7,1.5],[20,26]]}}},{"id":"bridge-motorway-casing","type":"line","metadata":{"mapbox:group":"1444849334699.1902"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","bridge"],["==","class","motorway"]],"layout":{"line-join":"round"},"paint":{"line-color":"#e9ac77","line-width":{"base":1.2,"stops":[[5,0.4],[6,0.6],[7,1.5],[20,22]]},"line-opacity":0.5}},{"id":"bridge-path-casing","type":"line","metadata":{"mapbox:group":"1444849334699.1902"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","$type","LineString"],["all",["==","brunnel","bridge"],["==","class","path"]]],"paint":{"line-color":"#f8f4f0","line-width":{"base":1.2,"stops":[[15,1.2],[20,18]]}}},{"id":"bridge-path","type":"line","metadata":{"mapbox:group":"1444849334699.1902"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","$type","LineString"],["all",["==","brunnel","bridge"],["==","class","path"]]],"paint":{"line-color":"#cba","line-width":{"base":1.2,"stops":[[15,1.2],[20,4]]},"line-dasharray":[1.5,0.75]}},{"id":"bridge-motorway-link","type":"line","metadata":{"mapbox:group":"1444849334699.1902"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","bridge"],["==","class","motorway_link"]],"layout":{"line-join":"round"},"paint":{"line-color":"#fc8","line-width":{"base":1.2,"stops":[[12.5,0],[13,1.5],[14,2.5],[20,11.5]]}}},{"id":"bridge-link","type":"line","metadata":{"mapbox:group":"1444849334699.1902"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","bridge"],["in","class","primary_link","secondary_link","tertiary_link","trunk_link"]],"layout":{"line-join":"round"},"paint":{"line-color":"#fea","line-width":{"base":1.2,"stops":[[12.5,0],[13,1.5],[14,2.5],[20,11.5]]}}},{"id":"bridge-secondary-tertiary","type":"line","metadata":{"mapbox:group":"1444849334699.1902"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","bridge"],["in","class","secondary","tertiary"]],"layout":{"line-join":"round"},"paint":{"line-color":"#fea","line-width":{"base":1.2,"stops":[[6.5,0],[7,0.5],[20,20]]}}},{"id":"bridge-trunk-primary","type":"line","metadata":{"mapbox:group":"1444849334699.1902"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","bridge"],["in","class","primary","trunk"]],"layout":{"line-join":"round"},"paint":{"line-color":"#fea","line-width":{"base":1.2,"stops":[[6.5,0],[7,0.5],[20,18]]}}},{"id":"bridge-motorway","type":"line","metadata":{"mapbox:group":"1444849334699.1902"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","bridge"],["==","class","motorway"]],"layout":{"line-join":"round"},"paint":{"line-color":"#fc8","line-width":{"base":1.2,"stops":[[6.5,0],[7,0.5],[20,18]]},"line-opacity":0.5}},{"id":"bridge-railway","type":"line","metadata":{"mapbox:group":"1444849334699.1902"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","bridge"],["==","class","rail"]],"paint":{"line-color":"#bbb","line-width":{"base":1.4,"stops":[[14,0.4],[15,0.75],[20,2]]}}},{"id":"bridge-railway-hatching","type":"line","metadata":{"mapbox:group":"1444849334699.1902"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","bridge"],["==","class","rail"]],"paint":{"line-color":"#bbb","line-dasharray":[0.2,8],"line-width":{"base":1.4,"stops":[[14.5,0],[15,3],[20,8]]}}},{"id":"cablecar","type":"line","source":"openmaptiles","source-layer":"transportation","minzoom":13,"filter":["==","class","cable_car"],"layout":{"visibility":"visible","line-cap":"round"},"paint":{"line-color":"hsl(0, 0%, 70%)","line-width":{"base":1,"stops":[[11,1],[19,2.5]]}}},{"id":"cablecar-dash","type":"line","source":"openmaptiles","source-layer":"transportation","minzoom":13,"filter":["==","class","cable_car"],"layout":{"visibility":"visible","line-cap":"round"},"paint":{"line-color":"hsl(0, 0%, 70%)","line-width":{"base":1,"stops":[[11,3],[19,5.5]]},"line-dasharray":[2,3]}},{"id":"boundary-land-level-4","type":"line","source":"openmaptiles","source-layer":"boundary","filter":["all",[">=","admin_level",4],["<=","admin_level",8],["!=","maritime",1]],"layout":{"line-join":"round"},"paint":{"line-color":"#9e9cab","line-dasharray":[3,1,1,1],"line-width":{"base":1.4,"stops":[[4,0.4],[5,1],[12,3]]},"line-opacity":0.6}},{"id":"boundary-land-level-2","type":"line","source":"openmaptiles","source-layer":"boundary","filter":["all",["==","admin_level",2],["!=","maritime",1],["!=","disputed",1]],"layout":{"line-cap":"round","line-join":"round"},"paint":{"line-color":"hsl(248, 7%, 66%)","line-width":{"base":1,"stops":[[0,0.6],[4,1.4],[5,2],[12,2]]}}},{"id":"boundary-land-disputed","type":"line","source":"openmaptiles","source-layer":"boundary","filter":["all",["!=","maritime",1],["==","disputed",1]],"layout":{"line-cap":"round","line-join":"round"},"paint":{"line-color":"hsl(248, 7%, 70%)","line-dasharray":[1,3],"line-width":{"base":1,"stops":[[0,0.6],[4,1.4],[5,2],[12,8]]}}},{"id":"boundary-water","type":"line","source":"openmaptiles","source-layer":"boundary","filter":["all",["in","admin_level",2,4],["==","maritime",1]],"layout":{"line-cap":"round","line-join":"round"},"paint":{"line-color":"rgba(154, 189, 214, 1)","line-width":{"base":1,"stops":[[0,0.6],[4,1],[5,1],[12,1]]},"line-opacity":{"stops":[[6,0],[10,0]]}}},{"id":"waterway-name","type":"symbol","source":"openmaptiles","source-layer":"waterway","minzoom":13,"filter":["all",["==","$type","LineString"],["has","name"]],"layout":{"text-font":["Noto Sans Italic"],"text-size":14,"text-field":"{name:latin} {name:nonlatin}","text-max-width":5,"text-rotation-alignment":"map","symbol-placement":"line","text-letter-spacing":0.2,"symbol-spacing":350},"paint":{"text-color":"#74aee9","text-halo-width":1.5,"text-halo-color":"rgba(255,255,255,0.7)"}},{"id":"water-name-lakeline","type":"symbol","source":"openmaptiles","source-layer":"water_name","filter":["==","$type","LineString"],"layout":{"text-font":["Noto Sans Italic"],"text-size":14,"text-field":"{name:latin}\\n{name:nonlatin}","text-max-width":5,"text-rotation-alignment":"map","symbol-placement":"line","symbol-spacing":350,"text-letter-spacing":0.2},"paint":{"text-color":"#74aee9","text-halo-width":1.5,"text-halo-color":"rgba(255,255,255,0.7)"}},{"id":"water-name-ocean","type":"symbol","source":"openmaptiles","source-layer":"water_name","filter":["all",["==","$type","Point"],["==","class","ocean"]],"layout":{"text-font":["Noto Sans Italic"],"text-size":14,"text-field":"{name:latin}","text-max-width":5,"text-rotation-alignment":"map","symbol-placement":"point","symbol-spacing":350,"text-letter-spacing":0.2},"paint":{"text-color":"#74aee9","text-halo-width":1.5,"text-halo-color":"rgba(255,255,255,0.7)"}},{"id":"water-name-other","type":"symbol","source":"openmaptiles","source-layer":"water_name","filter":["all",["==","$type","Point"],["!in","class","ocean"]],"layout":{"text-font":["Noto Sans Italic"],"text-size":{"stops":[[0,10],[6,14]]},"text-field":"{name:latin}\\n{name:nonlatin}","text-max-width":5,"text-rotation-alignment":"map","symbol-placement":"point","symbol-spacing":350,"text-letter-spacing":0.2,"visibility":"visible"},"paint":{"text-color":"#74aee9","text-halo-width":1.5,"text-halo-color":"rgba(255,255,255,0.7)"}},{"id":"poi-level-3","type":"symbol","source":"openmaptiles","source-layer":"poi","minzoom":16,"filter":["all",["==","$type","Point"],[">=","rank",25]],"layout":{"text-padding":2,"text-font":["Noto Sans Regular"],"text-anchor":"top","icon-image":"{class}_11","text-field":"{name:latin}\\n{name:nonlatin}","text-offset":[0,0.6],"text-size":12,"text-max-width":9},"paint":{"text-halo-blur":0.5,"text-color":"#666","text-halo-width":1,"text-halo-color":"#ffffff"}},{"id":"poi-level-2","type":"symbol","source":"openmaptiles","source-layer":"poi","minzoom":15,"filter":["all",["==","$type","Point"],["<=","rank",24],[">=","rank",15]],"layout":{"text-padding":2,"text-font":["Noto Sans Regular"],"text-anchor":"top","icon-image":"{class}_11","text-field":"{name:latin}\\n{name:nonlatin}","text-offset":[0,0.6],"text-size":12,"text-max-width":9},"paint":{"text-halo-blur":0.5,"text-color":"#666","text-halo-width":1,"text-halo-color":"#ffffff"}},{"id":"poi-level-1","type":"symbol","source":"openmaptiles","source-layer":"poi","minzoom":14,"filter":["all",["==","$type","Point"],["<=","rank",14],["has","name"]],"layout":{"text-padding":2,"text-font":["Noto Sans Regular"],"text-anchor":"top","icon-image":"{class}_11","text-field":"{name:latin}\\n{name:nonlatin}","text-offset":[0,0.6],"text-size":11,"text-max-width":9},"paint":{"text-halo-blur":0.5,"text-color":"rgba(191, 228, 172, 1)","text-halo-width":1,"text-halo-color":"rgba(30, 29, 29, 1)"}},{"id":"poi-railway","type":"symbol","source":"openmaptiles","source-layer":"poi","minzoom":13,"filter":["all",["==","$type","Point"],["has","name"],["==","class","railway"],["==","subclass","station"]],"layout":{"text-padding":2,"text-font":["Noto Sans Regular"],"text-anchor":"top","icon-image":"{class}_11","text-field":"{name:latin}\\n{name:nonlatin}","text-offset":[0,0.6],"text-size":12,"text-max-width":9,"icon-optional":false,"icon-ignore-placement":false,"icon-allow-overlap":false,"text-ignore-placement":false,"text-allow-overlap":false,"text-optional":true},"paint":{"text-halo-blur":0.5,"text-color":"#666","text-halo-width":1,"text-halo-color":"#ffffff"}},{"id":"road_oneway","type":"symbol","source":"openmaptiles","source-layer":"transportation","minzoom":15,"filter":["all",["==","oneway",1],["in","class","motorway","trunk","primary","secondary","tertiary","minor","service"]],"layout":{"symbol-placement":"line","icon-image":"oneway","symbol-spacing":75,"icon-padding":2,"icon-rotation-alignment":"map","icon-rotate":90,"icon-size":{"stops":[[15,0.5],[19,1]]}},"paint":{"icon-opacity":0.5}},{"id":"road_oneway_opposite","type":"symbol","source":"openmaptiles","source-layer":"transportation","minzoom":15,"filter":["all",["==","oneway",-1],["in","class","motorway","trunk","primary","secondary","tertiary","minor","service"]],"layout":{"symbol-placement":"line","icon-image":"oneway","symbol-spacing":75,"icon-padding":2,"icon-rotation-alignment":"map","icon-rotate":-90,"icon-size":{"stops":[[15,0.5],[19,1]]}},"paint":{"icon-opacity":0.5}},{"id":"highway-name-path","type":"symbol","source":"openmaptiles","source-layer":"transportation_name","minzoom":15.5,"filter":["==","class","path"],"layout":{"text-size":{"base":1,"stops":[[13,12],[14,13]]},"text-font":["Noto Sans Regular"],"text-field":"{name:latin} {name:nonlatin}","symbol-placement":"line","text-rotation-alignment":"map"},"paint":{"text-halo-color":"#f8f4f0","text-color":"hsl(30, 23%, 62%)","text-halo-width":0.5}},{"id":"highway-name-minor","type":"symbol","source":"openmaptiles","source-layer":"transportation_name","minzoom":15,"filter":["all",["==","$type","LineString"],["in","class","minor","service","track"]],"layout":{"text-size":{"base":1,"stops":[[13,12],[14,13]]},"text-font":["Noto Sans Regular"],"text-field":"{name:latin} {name:nonlatin}","symbol-placement":"line","text-rotation-alignment":"map"},"paint":{"text-halo-blur":0.5,"text-color":"#765","text-halo-width":1}},{"id":"highway-name-major","type":"symbol","source":"openmaptiles","source-layer":"transportation_name","minzoom":12.2,"filter":["in","class","primary","secondary","tertiary","trunk"],"layout":{"text-size":{"base":1,"stops":[[13,12],[14,13]]},"text-font":["Noto Sans Regular"],"text-field":"{name:latin} {name:nonlatin}","symbol-placement":"line","text-rotation-alignment":"map"},"paint":{"text-halo-blur":0.5,"text-color":"#765","text-halo-width":1}},{"id":"highway-shield","type":"symbol","source":"openmaptiles","source-layer":"transportation_name","minzoom":8,"filter":["all",["<=","ref_length",6],["==","$type","LineString"],["!in","network","us-interstate","us-highway","us-state"]],"layout":{"text-size":10,"icon-image":"road_{ref_length}","icon-rotation-alignment":"viewport","symbol-spacing":200,"text-font":["Noto Sans Regular"],"symbol-placement":{"base":1,"stops":[[10,"point"],[11,"line"]]},"text-rotation-alignment":"viewport","icon-size":1,"text-field":"{ref}"},"paint":{"text-opacity":1,"text-color":"rgba(20, 19, 19, 1)","text-halo-color":"rgba(230, 221, 221, 0)","text-halo-width":2,"icon-color":"rgba(183, 18, 18, 1)","icon-opacity":0.3,"icon-halo-color":"rgba(183, 55, 55, 0)"}},{"id":"highway-shield-us-interstate","type":"symbol","source":"openmaptiles","source-layer":"transportation_name","minzoom":7,"filter":["all",["<=","ref_length",6],["==","$type","LineString"],["in","network","us-interstate"]],"layout":{"text-size":10,"icon-image":"{network}_{ref_length}","icon-rotation-alignment":"viewport","symbol-spacing":200,"text-font":["Noto Sans Regular"],"symbol-placement":{"base":1,"stops":[[7,"point"],[7,"line"],[8,"line"]]},"text-rotation-alignment":"viewport","icon-size":1,"text-field":"{ref}"},"paint":{"text-color":"rgba(0, 0, 0, 1)"}},{"id":"highway-shield-us-other","type":"symbol","source":"openmaptiles","source-layer":"transportation_name","minzoom":9,"filter":["all",["<=","ref_length",6],["==","$type","LineString"],["in","network","us-highway","us-state"]],"layout":{"text-size":10,"icon-image":"{network}_{ref_length}","icon-rotation-alignment":"viewport","symbol-spacing":200,"text-font":["Noto Sans Regular"],"symbol-placement":{"base":1,"stops":[[10,"point"],[11,"line"]]},"text-rotation-alignment":"viewport","icon-size":1,"text-field":"{ref}"},"paint":{"text-color":"rgba(0, 0, 0, 1)"}},{"id":"place-other","type":"symbol","metadata":{"mapbox:group":"1444849242106.713"},"source":"openmaptiles","source-layer":"place","minzoom":12,"filter":["!in","class","city","town","village","country","continent"],"layout":{"text-letter-spacing":0.1,"text-size":{"base":1.2,"stops":[[12,10],[15,14]]},"text-font":["Noto Sans Bold"],"text-field":"{name:latin}\\n{name:nonlatin}","text-transform":"uppercase","text-max-width":9,"visibility":"visible"},"paint":{"text-color":"rgba(255,255,255,1)","text-halo-width":1.2,"text-halo-color":"rgba(57, 28, 28, 1)"}},{"id":"place-village","type":"symbol","metadata":{"mapbox:group":"1444849242106.713"},"source":"openmaptiles","source-layer":"place","minzoom":10,"filter":["==","class","village"],"layout":{"text-font":["Noto Sans Regular"],"text-size":{"base":1.2,"stops":[[10,12],[15,16]]},"text-field":"{name:latin}\\n{name:nonlatin}","text-max-width":8,"visibility":"visible"},"paint":{"text-color":"rgba(255, 255, 255, 1)","text-halo-width":1.2,"text-halo-color":"rgba(10, 9, 9, 0.8)"}},{"id":"place-town","type":"symbol","metadata":{"mapbox:group":"1444849242106.713"},"source":"openmaptiles","source-layer":"place","filter":["==","class","town"],"layout":{"text-font":["Noto Sans Regular"],"text-size":{"base":1.2,"stops":[[10,14],[15,24]]},"text-field":"{name:latin}\\n{name:nonlatin}","text-max-width":8,"visibility":"visible"},"paint":{"text-color":"rgba(255, 255, 255, 1)","text-halo-width":1.2,"text-halo-color":"rgba(22, 22, 22, 0.8)"}},{"id":"place-city","type":"symbol","metadata":{"mapbox:group":"1444849242106.713"},"source":"openmaptiles","source-layer":"place","filter":["all",["!=","capital",2],["==","class","city"]],"layout":{"text-font":["Noto Sans Regular"],"text-size":{"base":1.2,"stops":[[7,14],[11,24]]},"text-field":"{name:latin}\\n{name:nonlatin}","text-max-width":8,"visibility":"visible"},"paint":{"text-color":"rgba(0, 0, 0, 1)","text-halo-width":1.2,"text-halo-color":"rgba(255,255,255,0.8)"}},{"id":"place-city-capital","type":"symbol","metadata":{"mapbox:group":"1444849242106.713"},"source":"openmaptiles","source-layer":"place","filter":["all",["==","capital",2],["==","class","city"]],"layout":{"text-font":["Noto Sans Regular"],"text-size":{"base":1.2,"stops":[[7,14],[11,24]]},"text-field":"{name:latin}\\n{name:nonlatin}","text-max-width":8,"icon-image":"star_11","text-offset":[0.4,0],"icon-size":0.8,"text-anchor":"left","visibility":"visible"},"paint":{"text-color":"#333","text-halo-width":1.2,"text-halo-color":"rgba(255,255,255,0.8)"}},{"id":"place-country-other","type":"symbol","metadata":{"mapbox:group":"1444849242106.713"},"source":"openmaptiles","source-layer":"place","filter":["all",["==","class","country"],[">=","rank",3],["!has","iso_a2"]],"layout":{"text-font":["Noto Sans Italic"],"text-field":"{name:latin}","text-size":{"stops":[[3,11],[7,17]]},"text-transform":"uppercase","text-max-width":6.25,"visibility":"visible"},"paint":{"text-halo-blur":1,"text-color":"#334","text-halo-width":2,"text-halo-color":"rgba(255,255,255,0.8)"}},{"id":"place-country-3","type":"symbol","metadata":{"mapbox:group":"1444849242106.713"},"source":"openmaptiles","source-layer":"place","filter":["all",["==","class","country"],[">=","rank",3],["has","iso_a2"]],"layout":{"text-font":["Noto Sans Bold"],"text-field":"{name:latin}","text-size":{"stops":[[3,11],[7,17]]},"text-transform":"uppercase","text-max-width":6.25,"visibility":"visible"},"paint":{"text-halo-blur":1,"text-color":"#334","text-halo-width":2,"text-halo-color":"rgba(255,255,255,0.8)"}},{"id":"place-country-2","type":"symbol","metadata":{"mapbox:group":"1444849242106.713"},"source":"openmaptiles","source-layer":"place","filter":["all",["==","class","country"],["==","rank",2],["has","iso_a2"]],"layout":{"text-font":["Noto Sans Bold"],"text-field":"{name:latin}","text-size":{"stops":[[2,11],[5,17]]},"text-transform":"uppercase","text-max-width":6.25,"visibility":"visible"},"paint":{"text-halo-blur":1,"text-color":"#334","text-halo-width":2,"text-halo-color":"rgba(255,255,255,0.8)"}},{"id":"place-country-1","type":"symbol","metadata":{"mapbox:group":"1444849242106.713"},"source":"openmaptiles","source-layer":"place","filter":["all",["==","class","country"],["==","rank",1],["has","iso_a2"]],"layout":{"text-font":["Noto Sans Bold"],"text-field":"{name:latin}","text-size":{"stops":[[1,11],[4,17]]},"text-transform":"uppercase","text-max-width":6.25,"visibility":"visible"},"paint":{"text-halo-blur":1,"text-color":"#334","text-halo-width":2,"text-halo-color":"rgba(255,255,255,0.8)"}},{"id":"place-continent","type":"symbol","metadata":{"mapbox:group":"1444849242106.713"},"source":"openmaptiles","source-layer":"place","maxzoom":1,"filter":["==","class","continent"],"layout":{"text-font":["Noto Sans Bold"],"text-field":"{name:latin}","text-size":14,"text-max-width":6.25,"text-transform":"uppercase","visibility":"visible"},"paint":{"text-halo-blur":1,"text-color":"#334","text-halo-width":2,"text-halo-color":"rgba(255,255,255,0.8)"}}],"id":"qebnlkra6"}`)},51962:function(m){m.exports=JSON.parse(`{"version":8,"name":"orto","metadata":{},"center":[1.537786,41.837539],"zoom":12,"bearing":0,"pitch":0,"light":{"anchor":"viewport","color":"white","intensity":0.4,"position":[1.15,45,30]},"sources":{"ortoEsri":{"type":"raster","tiles":["https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}"],"tileSize":256,"maxzoom":18,"attribution":"ESRI &copy; <a href='http://www.esri.com'>ESRI</a>"},"ortoInstaMaps":{"type":"raster","tiles":["https://tilemaps.icgc.cat/mapfactory/wmts/orto_8_12/CAT3857/{z}/{x}/{y}.png"],"tileSize":256,"maxzoom":13},"ortoICGC":{"type":"raster","tiles":["https://geoserveis.icgc.cat/icc_mapesmultibase/noutm/wmts/orto/GRID3857/{z}/{x}/{y}.jpeg"],"tileSize":256,"minzoom":13.1,"maxzoom":20},"openmaptiles":{"type":"vector","url":"https://geoserveis.icgc.cat/contextmaps/basemap.json"}},"sprite":"https://geoserveis.icgc.cat/contextmaps/sprites/sprite@1","glyphs":"https://geoserveis.icgc.cat/contextmaps/glyphs/{fontstack}/{range}.pbf","layers":[{"id":"background","type":"background","paint":{"background-color":"#F4F9F4"}},{"id":"ortoEsri","type":"raster","source":"ortoEsri","maxzoom":16,"layout":{"visibility":"visible"}},{"id":"ortoICGC","type":"raster","source":"ortoICGC","minzoom":13.1,"maxzoom":19,"layout":{"visibility":"visible"}},{"id":"ortoInstaMaps","type":"raster","source":"ortoInstaMaps","maxzoom":13,"layout":{"visibility":"visible"}}]}`)}},B={};function U(m){var y=B[m];if(y!==void 0)return y.exports;var a=B[m]={id:m,exports:{}};return s[m].call(a.exports,a,a.exports,U),a.exports}return U.m=s,U.n=function(m){var y=m&&m.__esModule?function(){return m.default}:function(){return m};return U.d(y,{a:y}),y},U.d=function(m,y){for(var a in y)U.o(y,a)&&!U.o(m,a)&&Object.defineProperty(m,a,{enumerable:!0,get:y[a]})},U.g=function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch{if(typeof window=="object")return window}}(),U.o=function(m,y){return Object.prototype.hasOwnProperty.call(m,y)},U.r=function(m){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(m,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(m,"__esModule",{value:!0})},U.b=document.baseURI||self.location.href,U.nc=void 0,U(20260)}()})})(HR);var lct=HR.exports;const ZR=C6(lct),Mqt="",Iqt="",cct={ref:"card",class:"card-volumetric-field"},WR=1,uct=800,qR=300,dct=-46,JR=100,YR=-14,hct=Ki({__name:"VolumetricField",props:{passesPlays:{type:Array,default:()=>[]},playIndexes:{type:Object,default:()=>{}},successfulPassesCategoryIds:{type:Array,default:()=>[2,20,308,310]}},setup(e){const o=[[0,"rgb(12,31,82)"],[.2,"rgb(115,248,253)"],[.4,"rgb(117,251,98)"],[.6,"rgb(255,255,84)"],[.8,"rgb(242,168,59)"],[1,"rgb(234,55,36)"]];let s=null;const B=e,U=t.computed(()=>new Set(B.successfulPassesCategoryIds)),m=t.ref(null),y=t.ref(null),a=t.ref(0),v=t.ref(null);t.watch(()=>B.passesPlays,d=>{const g=d.reduce((w,C)=>(U.value.has(C[B.playIndexes.categoryId])&&w.push({x1:C[B.playIndexes.coordinate1X],y1:C[B.playIndexes.coordinate1Y],x2:C[B.playIndexes.coordinate2X],y2:C[B.playIndexes.coordinate2Y],x3:C[B.playIndexes.coordinate3X],y3:C[B.playIndexes.coordinate3Y]}),w),[]);l(g)}),t.watch(()=>a.value,(d,g)=>{v.value&&(n(d),y.value.style.height=`${i(d)}px`,v.value.style.top=`${c(i(d))}px`)});function p(){s=new ResizeObserver(d=>{for(const g of d)a.value=g.contentRect.width}),s.observe(m.value)}function r(d){return Array.from({length:d},()=>0)}function _(d,g){let w=.01351,C=.02439,E=0,A=0,P=[];const L=g.length,T=Math.floor(L/10);for(;E<74;)A=g.filter(I=>1-I.y3>=E*w&&1-I.y3<=(E+1)*w&&1-I.x3>=d*C&&1-I.x3<=(d+1)*C).map(I=>I.y3).length,P.push(parseFloat((A/T).toFixed(4))),E++;return P.reverse()}function b(d){let g=[r(74),r(74)],w=[],C=39;for(;C>0&&C<=39;)w=_(C,d),g.push(w),C--;return g.push(r(74),r(74)),g}function x(d,g,w){const C=[];let P=0,L=0;C.push(d[0]);for(let T=1;T<w-1;T++){const I=[];I.push(d[T][0]);for(let M=1;M<g-1;M++)P=d[T][M-1],L=d[T][M+1],I.push(P+.5*(d[T][M]+L-P));I.push(d[T][g-1]),C.push(I)}C.push(d[w-1]);for(let T=1;T<g-1;T++)for(let I=1;I<w-1;I++)P=C[I-1][T],L=C[I+1][T],C[I][T]=P+.5*(C[I][T]+L-P);return C}function h(d){let g=0,w=0;for(let C=0;C<d.length;C++){w=w+d[C].reduce(function(A,P){return A+P});const E=Math.max.apply(null,d[C]);E>g&&(g=E)}return g}function n(d){ZR.relayout(m.value,{width:d,height:i(d)})}function i(d){return Math.round(qR/uct*d,0)}function c(d){return YR+(d-JR)/(qR-JR)*(dct-YR)}function l(d){let g=b(d),w=g.length,C=g[0].length;g=x(x(g,C,w),C,w),C=g[0].length,w=g.length;const E=h(g),A=[{z:g,type:"surface",connectgaps:!0,opacity:.25,colorscale:o,autoscale:!1,showscale:!1}],P=[0,C],L=[0,w],T=[0,E*5],I={scene:{xaxis:{title:"",showgrid:!1,showline:!1,zeroline:!1,showticklabels:!1,showbackground:!1,backgroundcolor:"transparent",range:P},yaxis:{title:"",showgrid:!1,showline:!1,zeroline:!1,showticklabels:!1,showbackground:!1,backgroundcolor:"transparent",range:L},zaxis:{title:"",showgrid:!1,showline:!1,zeroline:!1,showticklabels:!1,showbackground:!1,backgroundcolor:"transparent",range:T},aspectratio:{x:1,y:.419,z:1},camera:{eye:{x:-.006743829259037479,y:.33535167247712533,z:-.0014332540873207011},center:{x:-.00679220694254041,y:.10728256468650094,z:-.30848979628595363}}},showlegend:!1,width:a.value,height:i(a.value),paper_bgcolor:"rgba(0,0,0,0)",margin:{l:0,r:0,b:0,t:0}};y.value&&(y.value.style.height=`${i(a.value)}px`);const M=[];for(let S=0;S<C;S++){const z=[],k=[],O=[];for(let N=0;N<w;N++)z.push(S),k.push(N),O.push(A[0].z[N][S]);M.push({x:z,y:k,z:O,type:"scatter3d",mode:"lines",line:{cmin:-.1,cmax:E,width:WR,color:O,colorscale:o,shape:"spline",smoothing:.6,dash:"dotline"}})}for(let S=0;S<w;S++){const z=[],k=[],O=[];for(let N=0;N<C;N++)z.push(N),k.push(S),O.push(A[0].z[S][N]);M.push({x:z,y:k,z:O,type:"scatter3d",mode:"lines",line:{cmin:-.1,cmax:E,width:WR,color:O,colorscale:o,shape:"spline",smoothing:.6,dash:"dotline"}})}ZR.newPlot("surface-plot",A.concat(M),I,{displayModeBar:!1},{responsive:!0}),v.value=document.getElementsByClassName("plot-container")[0],v.value&&(v.value.style.top=`${c(i(a.value))}px`)}return t.onMounted(()=>{m.value&&(m.value.style.pointerEvents="none"),p()}),(d,g)=>(t.openBlock(),t.createElementBlock("div",cct,[t.createElementVNode("div",{ref_key:"volumetricField",ref:y,class:"card-volumetric-field__volumetric-field"},[t.createElementVNode("div",{ref_key:"surfacePlot",ref:m,id:"surface-plot"},null,512)],512)],512))}},[["__scopeId","data-v-6a070f92"]]),Lqt="",pct=Ki({__name:"AttackDirection",props:{team:{type:Object,required:!0}},setup(e){const o=e,s=t.computed(()=>({"--flex-direction-info":o.team.isHomeTeam?"flex":"row-reverse","--justify-content-info":o.team.isHomeTeam?"flex-start":"flex-end","--arrow-color":o.team.isHomeTeam?"#336dff":"#7ed321"}));return(B,U)=>(t.openBlock(),t.createElementBlock("div",{class:"attack-direction",style:t.normalizeStyle(s.value)},[U[0]||(U[0]=t.createElementVNode("div",{class:"attack-direction__line"},null,-1)),t.createElementVNode("div",{class:t.normalizeClass(`attack-direction__triangle-${e.team.isHomeTeam?"right":"left"}`)},null,2),U[1]||(U[1]=t.createElementVNode("div",{class:"attack-direction__text"},"Ataca",-1))],4))}},[["__scopeId","data-v-dd911c44"]]),fct=["playId","gameId","teamId","playerId","momentOfPlay","categoryId","categoryType","matchLapse","section","matchResult","playingAs","total","coordinate1X","coordinate1Y","coordinate2X","coordinate2Y","coordinate3X","coordinate3Y","xGi","xGf","distance","fieldArea"];let DS=null;function mct(){return DS||(DS=Yy(fct)),DS}const zqt="",gct={class:"volumetric-section-container"},yct={key:0,class:"volumetric-section-container__switch"},vct={class:"volumetric-section-container__attack-direction"},bct={class:"volumetric-section-container__field"},_ct=Ki({__name:"VolumetricSectionContainer",props:{game:{type:Object,default:()=>({})},seasonSelected:{type:Object,default:()=>({})},token:{type:String,default:""},isGamePreMatch:{type:Boolean,default:!1},teamSelectedPreMatch:{type:Object,default:()=>({})},volumetricFieldIntervalMinutes:{type:Number,default:2}},setup(e){const o=mct(),s=t.ref(new Set([2,20,308,310])),B=t.ref(new Set([3,21,309])),U=t.ref(new Set([...s.value,...B.value]));let m=null;const y=e,a=fp();let v=null;function p(){if(!v){const C=a.getters.getProviderId;v=Qne(C).then(E=>{var L,T;const A=((L=E==null?void 0:E.successfulPasses)==null?void 0:L.categoriesIds)??[],P=((T=E==null?void 0:E.unsuccessfulPasses)==null?void 0:T.categoriesIds)??[];s.value=new Set(A),B.value=new Set(P),U.value=new Set([...A,...P])})}return v}const r=t.ref(0),_=t.ref(new Map),b=t.ref({teamId:0}),x=t.computed(()=>[{teamId:y.game.homeTeam.team_id,text:y.game.homeTeam.colloquial_name,img:y.game.homeTeam.logo,isHomeTeam:!0},{teamId:y.game.awayTeam.team_id,text:y.game.awayTeam.colloquial_name,img:y.game.awayTeam.logo,isHomeTeam:!1}]),h=t.computed(()=>_.value.get(y.isGamePreMatch?y.teamSelectedPreMatch.teamId:b.value.teamId)||[]);t.watch(()=>x.value,()=>{r.value=0,b.value=x.value[r.value]},{immediate:!0}),t.watch(()=>y.game.gameId,C=>{C&&(w(),i(y.game.is_live&&y.game.game_status===4))},{immediate:!0});function n(){m=setInterval(()=>{i()},1e3*60*y.volumetricFieldIntervalMinutes)}async function i(C=!1){try{await p();const E=await l();_.value.set(y.game.homeTeam.team_id,E.homeTeam),_.value.set(y.game.awayTeam.team_id,E.awayTeam),C&&n()}catch(E){throw new Error(E)}}function c(C){return y.game.game_status===4&&!y.game.is_live?C[o.gameId]!==y.game.gameId:C[o.gameId]===y.game.gameId}async function l(C=0){var E,A,P,L;try{let T={homeTeam:[],awayTeam:[]};const I=a.getters.getProviderId,M=a.getters.getIsDevApis;if(y.game.is_live||y.game.game_status===0){const S=await pu.get(uu(`https://2uj7ojhmt5.execute-api.us-west-2.amazonaws.com/prod/V2/statisticsLive/${y.game.gameId}`,I,M)),z=S.data?S.data.data||[]:[],k=new Set;z.forEach(O=>{k.add(O[o.categoryId]),O[o.teamId]===y.game.homeTeam.team_id&&U.value.has(O[o.categoryId])&&c(O)?(d(O),T.homeTeam.push(O)):O[o.teamId]===y.game.awayTeam.team_id&&U.value.has(O[o.categoryId])&&c(O)&&(O[o.coordinate1Y]=1-O[o.coordinate1Y],O[o.coordinate2Y]=1-O[o.coordinate2Y],O[o.coordinate3Y]=1-O[o.coordinate3Y],O[o.coordinate1X]=1-O[o.coordinate1X],O[o.coordinate2X]=1-O[o.coordinate2X],O[o.coordinate3X]=1-O[o.coordinate3X],d(O),T.awayTeam.push(O))})}else{const[S,z]=await Promise.all([pu.get(qy(`https://golstats-microservices.s3-us-west-2.amazonaws.com/statsTeamBySeason-${C||y.game.seasonId}-${y.game.homeTeam.team_id}.json`,I),{headers:{Authorization:""}}),pu.get(qy(`https://golstats-microservices.s3-us-west-2.amazonaws.com/statsTeamBySeason-${C||y.game.seasonId}-${y.game.awayTeam.team_id}.json`,I),{headers:{Authorization:""}})]),k=((A=(E=S.data)==null?void 0:E.data)==null?void 0:A.posession)||[],O=((L=(P=z.data)==null?void 0:P.data)==null?void 0:L.posession)||[];if(!k.length&&!O.length&&!C)return l(y.game.regularSeasonId);T={homeTeam:k.filter(N=>N[o.teamId]===y.game.homeTeam.team_id&&U.value.has(N[o.categoryId])&&c(N)),awayTeam:O.filter(N=>N[o.teamId]===y.game.awayTeam.team_id&&U.value.has(N[o.categoryId])&&c(N)?(N[o.coordinate1Y]=1-N[o.coordinate1Y],N[o.coordinate2Y]=1-N[o.coordinate2Y],N[o.coordinate3Y]=1-N[o.coordinate3Y],N[o.coordinate1X]=1-N[o.coordinate1X],N[o.coordinate2X]=1-N[o.coordinate2X],N[o.coordinate3X]=1-N[o.coordinate3X],!0):!1)}}return T}catch(T){throw new Error(T)}}function d(C){const E=C[o.coordinate1X],A=C[o.coordinate2X],P=C[o.coordinate3X];return C[o.coordinate1X]=C[o.coordinate1Y],C[o.coordinate2X]=C[o.coordinate2Y],C[o.coordinate3X]=C[o.coordinate3Y],C[o.coordinate1Y]=E,C[o.coordinate2Y]=A,C[o.coordinate3Y]=P,C}function g(C){r.value=C.index,b.value=C.button}function w(){m&&clearInterval(m)}return t.onUnmounted(()=>{w()}),(C,E)=>(t.openBlock(),t.createElementBlock("div",gct,[E[0]||(E[0]=t.createElementVNode("div",{class:"volumetric-section-container__title"},"Volumétrica",-1)),e.isGamePreMatch?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",yct,[t.createVNode(j5,{"selected-button-index":r.value,buttons:x.value,width:"320px","border-radius":"16px",onChange:g},null,8,["selected-button-index","buttons"])])),t.createElementVNode("div",vct,[t.createVNode(pct,{team:e.isGamePreMatch?e.teamSelectedPreMatch:b.value},null,8,["team"])]),t.createElementVNode("div",bct,[t.createVNode(hct,{"passes-plays":h.value,"play-indexes":t.unref(o),"successful-passes-category-ids":[...s.value]},null,8,["passes-plays","play-indexes","successful-passes-category-ids"])])]))}},[["__scopeId","data-v-5904f4a9"]]),Dqt="";let XR=null;const xct={components:{GSCHighlights:kHe,ToggleButtons:j5,VolumetricSectionContainer:_ct,DataProminentGame:OHe,HighlightsProminentGameLive:OZe,HighlightsProminentGame:kZe,GSCRadioToggle:dF,FieldPosesion:oZe,EventsLine:kWe,ChalkboardSectionContainer:sct},props:{timeLiveProminentData:{type:Number,default:6e4},timeLiveHighlightsProminentAndVideo:{type:Number,default:6e4},timeLivePossesion:{type:Number,default:6e4},game:{type:Object,default:()=>({})},token:{type:String,default:"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MCwibmFtZSI6IlVzdWFyaW8gRnJlZSIsInVzZXJuYW1lIjoiZnJlZUBnb2xzdGF0cy5jb20iLCJlbWFpbCI6ImZyZWVAZ29sc3RhdHMuY29tIiwiaWF0IjoxNjA2NzU4Nzk1LCJleHAiOjE2MzgyOTQ3OTV9.kPNmP7yDtk38cAXrUyc7OHRh6J25VFqy-XUNzbK-4YE"},seasonSelected:{type:Object,default:()=>({})},isWidget:{type:Boolean,default:!1},teamWidget:{type:Number,default:0},tournamentSelected:{type:Object,default:()=>({})},canPlayVideos:{type:Boolean,default:!1},is_captured:{type:Number,default:1},videoPrivilegesPlayingAs:{type:Set,default:()=>new Set([1,2])},playVideosPrivileges:{type:Object,default:null},volumetricFieldIntervalMinutes:{type:Number,default:2},chalkboardIntervalMinutes:{type:Number,default:2},gameEventsIntervalMinutes:{type:Number,default:1}},data(){return{isDataProminentGameLoading:!0,areHighlightsLoading:!0,widthSection:0,showleyendliveData:!1,showgoalsliveData:!1,showsummaryliveData:!1,viewVolumtrica:!0,teamButtonSelectedIndex:0,switchTypeViewFiled:"Porcentajes",teamSelected:{teamId:0},isFirstDataLoaded:!1}},computed:{toggleButtons(){return[{teamId:this.game.homeTeam.team_id,text:this.game.homeTeam.colloquial_name,img:this.game.homeTeam.logo,isHomeTeam:!0},{teamId:this.game.awayTeam.team_id,text:this.game.awayTeam.colloquial_name,img:this.game.awayTeam.logo,isHomeTeam:!1}]},isGamePreMatch(){return this.game&&this.game.game_status===4&&!this.game.is_live}},watch:{widthSection(){this.viewVolumtrica=this.widthSection>=760},toggleButtons:{handler(){this.teamButtonSelectedIndex=0,this.teamSelected=this.toggleButtons[0]},deep:!0,immediate:!0},"seasonSelected.incomplete_season":{handler(){this.seasonSelected.incomplete_season==1&&this.game.game_status==4&&this.onDataProminentGameLoading(!1)},immediate:!0},"game.game_status":{handler(){this.seasonSelected.incomplete_season==1&&this.game.game_status==4&&this.onDataProminentGameLoading(!1)},immediate:!0}},methods:{onDataProminentGameLoading(e){this.isFirstDataLoaded||(this.isDataProminentGameLoading=e,this.areHighlightsLoading=!0,e||setTimeout(()=>{this.areHighlightsLoading=!1,this.isFirstDataLoaded=!0},500))},intervalidhighlive(e){this.$emit("intervalidhighlive",e)},intervalidpossesion(e){this.$emit("intervalidpossesion",e)},onChangeToggle(e){this.teamButtonSelectedIndex=e.index,this.teamSelected=e.button},setUpResizeObserver(){if(window.ResizeObserver)XR=new ResizeObserver(()=>{this.widthSection=this.$refs.prominent.clientWidth}),XR.observe(this.$refs.prominent);else throw new Error("Resize observer not supported!")},async ChangeRadio(e){typeof e=="string"&&(this.switchTypeViewFiled=e)},openmedia(e){this.$emit("openmedia",e)},onClickSection(){Vd.emit("mouse-click-time-event",0)},onClickPlayEvent(e){const o={seasonId:this.game.is_live===1||this.game.game_status===0?this.game.seasonId:this.seasonSelected.id,isFeaturedPlayers:!1,mainSectionType:1,playListType:1,playerIds:[],categoryIds:[e.categoryId],matchResult:[1,2,3],currentPlayIndex:0,playsIds:[e.playId]};this.$emit("openmedia",o)},showleyendlive(e){this.showleyendliveData=e},showgoalslive(e){this.showgoalsliveData=e},showsummarylive(e){this.showsummaryliveData=e},onOpenMediaPlayer(e){this.canPlayVideos&&this.$emit("open-media-player",e)},getContainerClass(){return this.widthSection>830?"highlights-container-desktop":"highlights-container-mobile"}},async mounted(){setTimeout(()=>{this.setUpResizeObserver()},1e3)}},wct={key:0,class:"container-prominent-data"},kct={class:"container-prominent-section"},Sct={key:0,class:"highlights-containers"},Cct={class:"highlights-content"},Tct={key:1,class:"highlights-containers"},Act={key:0,class:"container-leyend-prematch"},Ect={key:1,class:"container-leyend-prematch-movil"},Mct={key:2,class:"container-leyend-prematch-movil"},Ict={class:"container-switch-toggle"},Pct={class:"container-prominent-section__chalkboard"};function Lct(e,o,s,B,U,m){const y=t.resolveComponent("DataProminentGame"),a=t.resolveComponent("HighlightsProminentGameLive"),v=t.resolveComponent("HighlightsProminentGame"),p=t.resolveComponent("GSCHighlights"),r=t.resolveComponent("EventsLine"),_=t.resolveComponent("ToggleButtons"),b=t.resolveComponent("GSCRadioToggle"),x=t.resolveComponent("FieldPosesion"),h=t.resolveComponent("VolumetricSectionContainer"),n=t.resolveComponent("ChalkboardSectionContainer");return t.openBlock(),t.createElementBlock("div",{class:"container-prominent",ref:"prominent",onClick:o[0]||(o[0]=(...i)=>m.onClickSection&&m.onClickSection(...i))},[s.seasonSelected.incomplete_season==1&&s.game.game_status==4&&s.game.is_live===0?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",wct,[t.createVNode(y,{"is-widget":s.isWidget,"team-widget":s.teamWidget,"time-live-prominent-data":s.timeLiveProminentData,game:s.game,"can-play-videos":s.canPlayVideos,onOpenmedia:m.openmedia,onLoading:m.onDataProminentGameLoading},null,8,["is-widget","team-widget","time-live-prominent-data","game","can-play-videos","onOpenmedia","onLoading"])])),t.createElementVNode("div",kct,[s.game.is_live===1||s.game.game_status===0||s.game.game_status===1?(t.openBlock(),t.createElementBlock("div",Sct,[t.createElementVNode("div",{class:t.normalizeClass(m.getContainerClass())},[U.showleyendliveData?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(U.widthSection>830?"highlights-header":"highlights-header-mobile")},[Object.keys(s.game).length>0&&Object.keys(s.tournamentSelected).length>0?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(U.widthSection>830?"semifinal-tag":"semifinal-tag-mobile")},t.toDisplayString(s.tournamentSelected.id!=41?s.game.matchday_name.replace("Matchday","Jornada").replace("de Final","").replace("Playoffs 1","Cuartos de Final Ida").replace("Playoffs 2","Cuartos de Final Vuelta").replace("Playoffs 3","Semifinal Ida").replace("Playoffs 4","Semifinal Vuelta").replace("Playoffs 5","Final Ida").replace("Playoffs 6","Final Vuelta"):s.game.matchday_name=="Matchday 10"?"Final":s.game.matchday_name.replace("Matchday 1","16vos Ida").replace("Matchday 2","16vos Vuelta").replace("Matchday 3","8vos Ida").replace("Matchday 4","8vos Vuelta").replace("Matchday 5","4tos Ida").replace("Matchday 6","4tos Vuelta").replace("Matchday 7","Semifinal Ida").replace("Matchday 8","Semifinal Vuelta").replace("Matchday 9","Final").replace("Matchday 10","Final")),3)):t.createCommentVNode("",!0),t.createElementVNode("h2",{class:t.normalizeClass(U.widthSection>830?"highlights-title":"highlights-title-mobile")}," HIGHLIGHTS DEL PARTIDO ",2)],2)):t.createCommentVNode("",!0),t.createElementVNode("div",Cct,[t.createElementVNode("div",{class:"highlight-card",style:t.normalizeStyle(U.showgoalsliveData?U.widthSection>830?"width: 49%;":"width: 100%;":"")},[(s.game.is_live===1||s.game.game_status===0)&&s.canPlayVideos?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[s.game.is_live===1||s.game.game_status===0?(t.openBlock(),t.createBlock(a,{key:0,"time-live-highlights-prominent-and-video":s.timeLiveHighlightsProminentAndVideo,"can-play-videos":s.canPlayVideos,game:s.game,"title-card":"GOLES",onShowgoalslive:m.showgoalslive,onShowsummarylive:m.showsummarylive,onShowleyendlive:m.showleyendlive,onIntervalidhighlive:m.intervalidhighlive,onOpenmedia:m.openmedia},null,8,["time-live-highlights-prominent-and-video","can-play-videos","game","onShowgoalslive","onShowsummarylive","onShowleyendlive","onIntervalidhighlive","onOpenmedia"])):t.createCommentVNode("",!0)],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[s.game.status===1&&s.canPlayVideos?(t.openBlock(),t.createBlock(v,{key:0,onShowsummarylive:m.showsummarylive,onShowleyendlive:m.showleyendlive,onShowgoalslive:m.showgoalslive,onIntervalidhighlive:m.intervalidhighlive,"title-card":"GOLES","can-play-videos":s.canPlayVideos,game:s.game,onOpenmedia:m.openmedia},null,8,["onShowsummarylive","onShowleyendlive","onShowgoalslive","onIntervalidhighlive","can-play-videos","game","onOpenmedia"])):t.createCommentVNode("",!0)],64))],4),t.createElementVNode("div",{class:"highlight-card",style:t.normalizeStyle(U.showsummaryliveData?U.widthSection>830?"width: 49%;":"width: 100%;":"")},[(s.game.is_live===1||s.game.game_status===0)&&s.canPlayVideos?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[s.game.is_live===1||s.game.game_status===0?(t.openBlock(),t.createBlock(a,{key:0,"time-live-highlights-prominent-and-video":s.timeLiveHighlightsProminentAndVideo,"can-play-videos":s.canPlayVideos,game:s.game,onShowleyendlive:m.showleyendlive,onShowgoalslive:m.showgoalslive,onShowsummarylive:m.showsummarylive,onIntervalidhighlive:m.intervalidhighlive,onOpenmedia:m.openmedia},null,8,["time-live-highlights-prominent-and-video","can-play-videos","game","onShowleyendlive","onShowgoalslive","onShowsummarylive","onIntervalidhighlive","onOpenmedia"])):t.createCommentVNode("",!0)],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[s.game.status===1&&s.canPlayVideos?(t.openBlock(),t.createBlock(v,{key:0,onShowsummarylive:m.showsummarylive,onShowleyendlive:m.showleyendlive,onShowgoalslive:m.showgoalslive,onIntervalidhighlive:m.intervalidhighlive,"can-play-videos":s.canPlayVideos,game:s.game,onOpenmedia:m.openmedia},null,8,["onShowsummarylive","onShowleyendlive","onShowgoalslive","onIntervalidhighlive","can-play-videos","game","onOpenmedia"])):t.createCommentVNode("",!0)],64))],4)])],2)])):(t.openBlock(),t.createElementBlock("div",Tct,[!U.isDataProminentGameLoading&&(s.game.is_live===1||s.game.game_status===0)&&s.canPlayVideos?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[s.game.status===1&&s.canPlayVideos?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[s.canPlayVideos?(t.openBlock(),t.createBlock(p,{key:0,data:{game:s.game.gameId,season:s.game.seasonId,type:"historic"},"can-play-videos":s.canPlayVideos,"video-privileges-playing-as":s.videoPrivilegesPlayingAs,"privileges-team-id":s.playVideosPrivileges?s.playVideosPrivileges.seasonAndPrivileges.teamId:0,"provider-id":e.$store.getters.getProviderId,"is-dev-apis":e.$store.getters.getIsDevApis,onOpenmedia:m.openmedia},null,8,["data","can-play-videos","video-privileges-playing-as","privileges-team-id","provider-id","is-dev-apis","onOpenmedia"])):t.createCommentVNode("",!0)],64))],64))])),m.isGamePreMatch?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",{key:2,class:t.normalizeClass(U.widthSection>920?"container-prominent-section__events-line":"container-prominent-section__events-line-mobile")},[U.areHighlightsLoading?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(r,{key:0,token:s.token,game:s.game,widthScreen:U.widthSection,"can-play-videos":s.canPlayVideos,"game-events-interval-minutes":s.gameEventsIntervalMinutes,onPlayVideo:m.onClickPlayEvent},null,8,["token","game","widthScreen","can-play-videos","game-events-interval-minutes","onPlayVideo"]))],2)),U.areHighlightsLoading?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",{key:3,class:t.normalizeClass(U.widthSection>760?"fields-section-container":"fields-section-container-movil")},[o[4]||(o[4]=t.createElementVNode("div",{class:"fields-section-title"},"Posesión",-1)),s.game.game_status===4&&s.game.is_live!=1?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[U.widthSection>590?(t.openBlock(),t.createElementBlock("div",Act,o[1]||(o[1]=[t.createElementVNode("span",{class:"leyend-bold"},"IMPORTANTE:",-1),t.createTextVNode("  Con base en las estadisticas de los partidos ya jugados en el torneo. ")]))):t.createCommentVNode("",!0),U.widthSection>340&&U.widthSection<=590?(t.openBlock(),t.createElementBlock("div",Ect,o[2]||(o[2]=[t.createElementVNode("span",{class:"leyend-bold"},"IMPORTANTE:",-1),t.createTextVNode("  "),t.createElementVNode("br",null,null,-1),t.createTextVNode("Con base en las estadisticas de los partidos ya "),t.createElementVNode("br",null,null,-1),t.createTextVNode(" jugados en el torneo. ")]))):t.createCommentVNode("",!0),U.widthSection<=340?(t.openBlock(),t.createElementBlock("div",Mct,o[3]||(o[3]=[t.createElementVNode("span",{class:"leyend-bold"},"IMPORTANTE:",-1),t.createTextVNode("  "),t.createElementVNode("br",null,null,-1),t.createTextVNode("Con base en las estadisticas de los "),t.createElementVNode("br",null,null,-1),t.createTextVNode("partidos ya jugados en el torneo. ")]))):t.createCommentVNode("",!0),t.createElementVNode("div",{class:t.normalizeClass(U.widthSection>420?"container-switch-prematch-teams":"container-switch-prematch-teams-movil")},[t.createVNode(_,{"selected-button-index":U.teamButtonSelectedIndex,buttons:m.toggleButtons,width:"320px","border-radius":"16px",onChange:m.onChangeToggle},null,8,["selected-button-index","buttons","onChange"])],2)],64)):t.createCommentVNode("",!0),t.withDirectives(t.createElementVNode("div",Ict,[t.createVNode(b,{height:"20px",width:"41px","background-color":"none","width-circle":"15px","height-circle":"15px","circle-color-switch":"#CBEE6B","font-color":"#ffffff","value-default":"Porcentajes",textOptionLeft:"Porcentajes",textOptionRight:"Volumétrico",onChange:m.ChangeRadio},null,8,["onChange"])],512),[[t.vShow,U.widthSection<=760]]),t.createElementVNode("div",{class:t.normalizeClass(U.widthSection>760?"fields-container":"fields-container-movil")},[t.withDirectives(t.createElementVNode("div",{class:t.normalizeClass(U.widthSection>760?"field-possesion-container":"field-possesion-container-movil")},[t.createVNode(x,{"width-Section":U.widthSection,game:s.game,"time-live-possesion":s.timeLivePossesion,onIntervalidpossesion:m.intervalidpossesion,"team-selected":U.teamSelected.teamId===0?m.toggleButtons[0]:U.teamSelected},null,8,["width-Section","game","time-live-possesion","onIntervalidpossesion","team-selected"])],2),[[t.vShow,U.switchTypeViewFiled==="Porcentajes"||U.widthSection>760]]),t.withDirectives(t.createElementVNode("div",{class:t.normalizeClass(U.widthSection>760?"field-volumetrica-container":"field-volumetrica-container-movil")},[t.createVNode(h,{game:s.game,"season-selected":s.seasonSelected,token:s.token,"is-game-pre-match":m.isGamePreMatch,"team-selected-pre-match":U.teamSelected,"volumetric-field-interval-minutes":s.volumetricFieldIntervalMinutes},null,8,["game","season-selected","token","is-game-pre-match","team-selected-pre-match","volumetric-field-interval-minutes"])],2),[[t.vShow,U.viewVolumtrica&&U.widthSection>760||U.switchTypeViewFiled==="Volumétrico"]])],2),t.createCommentVNode("",!0)],2)),t.createElementVNode("div",Pct,[o[5]||(o[5]=t.createElementVNode("div",{class:"fields-section-title"},"Pizarra",-1)),U.areHighlightsLoading?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(n,{key:0,"is-female":s.tournamentSelected.is_female===1,game:s.game,"season-selected":s.seasonSelected,"tournament-selected":s.tournamentSelected,token:s.token,"width-section":U.widthSection,"can-play-videos":s.canPlayVideos,"is-game-pre-match":m.isGamePreMatch,"play-videos-privileges":s.playVideosPrivileges,"volumetric-field-interval-minutes":s.volumetricFieldIntervalMinutes,"chalkboard-interval-minutes":s.chalkboardIntervalMinutes,"game-events-interval-minutes":s.gameEventsIntervalMinutes,onOpenMediaPlayer:m.onOpenMediaPlayer},null,8,["is-female","game","season-selected","tournament-selected","token","width-section","can-play-videos","is-game-pre-match","play-videos-privileges","volumetric-field-interval-minutes","chalkboard-interval-minutes","game-events-interval-minutes","onOpenMediaPlayer"]))])])],512)}const Bct=Ki(xct,[["render",Lct],["__scopeId","data-v-641ff310"]]),Nqt="",zct={class:"datagame-container"},Oct=Ki({__name:"GSCProminentMain",props:{timeLiveProminentData:{type:Number,default:6e4},timeLiveHighlightsProminentAndVideo:{type:Number,default:6e4},timeLivePossesion:{type:Number,default:6e4},game:{type:Object,default:()=>({})},seasonSelected:{type:Object,default:()=>({})},tournamentSelected:{type:Object,default:()=>({})},isWidget:{type:Boolean,default:!1},teamWidget:{type:Number,default:0},canPlayVideos:{type:Boolean,default:!1},is_captured:{type:Number,default:1},videoPrivilegesPlayingAs:{type:Set,default:()=>new Set([1,2])},playVideosPrivileges:{type:Object,default:null},volumetricFieldIntervalMinutes:{type:Number,default:2},chalkboardIntervalMinutes:{type:Number,default:2},gameEventsIntervalMinutes:{type:Number,default:1}},emits:["click-play-event","openmedia","intervalidpossesion","intervalidhighlive"],setup(e,{emit:o}){const s=o;function B(a){s("intervalidhighlive",a)}function U(a){s("intervalidpossesion",a)}function m(a){s("openmedia",a)}function y(a){s("openmedia",a)}return(a,v)=>(t.openBlock(),t.createElementBlock("div",zct,[t.createVNode(Bct,{game:e.game,is_captured:e.is_captured,"is-widget":e.isWidget,"team-widget":e.teamWidget,"time-live-prominent-data":e.timeLiveProminentData,"time-live-highlights-prominent-and-video":e.timeLiveHighlightsProminentAndVideo,"time-live-possesion":e.timeLivePossesion,"season-selected":e.seasonSelected,"tournament-selected":e.tournamentSelected,"can-play-videos":e.canPlayVideos,"video-privileges-playing-as":e.videoPrivilegesPlayingAs,"play-videos-privileges":e.playVideosPrivileges,"volumetric-field-interval-minutes":e.volumetricFieldIntervalMinutes,"chalkboard-interval-minutes":e.chalkboardIntervalMinutes,"game-events-interval-minutes":e.gameEventsIntervalMinutes,onIntervalidpossesion:U,onIntervalidhighlive:B,onOpenmedia:m,onOpenMediaPlayer:y},null,8,["game","is_captured","is-widget","team-widget","time-live-prominent-data","time-live-highlights-prominent-and-video","time-live-possesion","season-selected","tournament-selected","can-play-videos","video-privileges-playing-as","play-videos-privileges","volumetric-field-interval-minutes","chalkboard-interval-minutes","game-events-interval-minutes"])]))}},[["__scopeId","data-v-9010e64a"]]),Dct={class:"datagame-container"},Nct={__name:"GSCDatosGSMainAvanced",props:{isWidget:{type:Boolean,default:!1},teamWidget:{type:Number,default:0},game:{type:Object,default:()=>({gameId:79623,seasonId:1772,status:1,dateTimeUTC:"2023-10-01T22:20:00Z",homeTeam:{logo:"https://golstatsimages.blob.core.windows.net/teams-80/18.png",team_id:10,provisional_logo:"https://golstatsimages.blob.core.windows.net/teams-provisional/18.png",colloquial_name:"Toluca",acronym:"TOL",team_name:"Toluca"},awayTeam:{logo:"https://golstatsimages.blob.core.windows.net/teams-80/1.png",team_id:1,provisional_logo:"https://golstatsimages.blob.core.windows.net/teams-provisional/1.png",colloquial_name:"Chivas",acronym:"CHI",team_name:"Guadalajara"}})},tournamentSelected:{type:Object,default:()=>({})},playVideosPrivileges:{type:Object,default:null}},emits:["openmedia","intervalidgs"],setup(e,{emit:o}){const s=fp(),B=t.ref(0),U=e;t.watch(()=>U.game,v=>{B.value=v.gameId},{deep:!0,immediate:!0});const m=o;function y(v){m("openmedia",v)}function a(v){m("intervalidgs",v)}return(v,p)=>(t.openBlock(),t.createElementBlock("div",Dct,[e.game.is_live===1||e.game.game_status===0?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[Object.keys(e.game).length>0?(t.openBlock(),t.createBlock(t.unref(fb),{key:B.value,type:3,"is-widget":e.isWidget,"team-widget":e.teamWidget,data:{season:e.game.seasonId,game:e.game.gameId,game_status:e.game.game_status,home_team_id:e.game.homeTeam.team_id,away_team_id:e.game.awayTeam.team_id,team_view:2},"tournament-selected":e.tournamentSelected,onIntervalidgs:a,"play-videos-privileges":e.playVideosPrivileges,"provider-id":t.unref(s).getters.getProviderId,"is-dev-apis":t.unref(s).getters.getIsDevApis,onOpenmedia:y},null,8,["is-widget","team-widget","data","tournament-selected","play-videos-privileges","provider-id","is-dev-apis"])):t.createCommentVNode("",!0)],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[e.game.game_status==4?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[Object.keys(e.game).length>0?(t.openBlock(),t.createBlock(t.unref(fb),{key:B.value,type:0,"is-widget":e.isWidget,"team-widget":e.teamWidget,data:{season:e.game.seasonId,game:e.game.gameId,game_status:e.game.game_status,home_team_id:e.game.homeTeam.team_id,away_team_id:e.game.awayTeam.team_id,team_view:1},"tournament-selected":e.tournamentSelected,"play-videos-privileges":e.playVideosPrivileges,"provider-id":t.unref(s).getters.getProviderId,"is-dev-apis":t.unref(s).getters.getIsDevApis,onOpenmedia:y},null,8,["is-widget","team-widget","data","tournament-selected","play-videos-privileges","provider-id","is-dev-apis"])):t.createCommentVNode("",!0)],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[Object.keys(e.game).length>0?(t.openBlock(),t.createBlock(t.unref(fb),{key:B.value,type:1,"is-widget":e.isWidget,"team-widget":e.teamWidget,data:{season:e.game.seasonId,game:e.game.gameId,game_status:e.game.game_status,home_team_id:e.game.homeTeam.team_id,away_team_id:e.game.awayTeam.team_id,team_view:2},"tournament-selected":e.tournamentSelected,"play-videos-privileges":e.playVideosPrivileges,"provider-id":t.unref(s).getters.getProviderId,"is-dev-apis":t.unref(s).getters.getIsDevApis,onOpenmedia:y},null,8,["is-widget","team-widget","data","tournament-selected","play-videos-privileges","provider-id","is-dev-apis"])):t.createCommentVNode("",!0)],64))],64))]))}},Fct={computed:{sizeTabsFontMP(){const e=this.elementSize.width;return e<=380?"12px":e<=768?"14px":"16px"},sizeTabsFontMS(){const e=this.elementSize.width;return e<=600?"12px":e<=768?"13px":"14px"},sizeTabsMS(){const e=this.elementSize.width;return e<=480?"145px":e<=600?"153px":e<=620?"163px":e<=640?"170px":e<=660?"175px":e<=680?"180px":e<=700?"185px":e<=720?"195px":"200px"},sizeTabsMP(){const e=this.elementSize.width;return e<=319?"68px":e<=330?"73px":e<=340?"78px":e<=350?"82px":e<=360||e<=370?"90px":e<=390?"95px":e<=410?"105px":e<=430?"110px":e<=450?"117px":e<=470?"122px":e<=500?"130px":e<=530?"138px":e<=560?"155px":e<=590?"163px":e<=620?"175px":e<=650?"180px":e<=680?"195px":e<=730?"210px":e<=768?"100px":"110px"},comextleyemdmultipleleaguesClass(){return this.elementSize.width<=380?this.$style.comtextleyemdmultipleleagues380:this.$style.comtextleyemdmultipleleagues},comdropdownParentClass(){return this.elementSize.width<=730?this.$style.comdropdownParent730:this.$style.comdropdownParent},comdescubreVideosClass(){const e=this.elementSize.width;return e<=960?this.$style.comdescubreVideos960:e<=1232?this.$style.comdescubreVideos1232:this.$style.comdescubreVideos},comquitarFiltrosClass(){const e=this.elementSize.width;return e<=380?this.$style.comquitarFiltros380:e<=480?this.$style.comquitarFiltros480:e<=730?this.$style.comquitarFiltros730:this.$style.comquitarFiltros},commejoresJugadoresClass(){const e=this.elementSize.width;return e<=480?this.$style.commejoresJugadores480:e<=730?this.$style.commejoresJugadores730:this.$style.commejoresJugadores},menuSectionClass(){return this.elementSize.width<=960?this.$style.commenuSection960:this.$style.commenuSection},topFiltersClass(){const e=this.elementSize.width;return e<=420?this.$style.comtopFilters420:e<=460?this.$style.comtopFilters460:e<=1232?this.$style.comtopFilters1232:this.$style.comtopFilters},toniKroosWrapperClass(){const e=this.elementSize.width;return e<=319?this.$style.comtoniKroosWrapper320:e<=420?this.$style.comtoniKroosWrapper420:e<=916?this.$style.comtoniKroosWrapper760:e<=975?this.$style.comtoniKroosWrapper975:e<=1079?this.$style.comtoniKroosWrapper1080:this.$style.comtoniKroosWrapper},containerTablesClass(){const e=this.elementSize.width;return e<=319?this.$style.comcontainerTables320:e<=916?this.$style.comcontainerTables760:e<=1079?this.$style.comcontainerTables960:this.$style.comcontainerTables},containerTheBestClass(){const e=this.elementSize.width;return e<=319?this.$style.comcontainerTheBest320:e<=960?this.$style.comcontainerTheBest960:e<=1232?this.$style.comcontainerTheBest1232:this.$style.comcontainerTheBest},menuSectionHeaderClass(){const e=this.elementSize.width;return e<=730?this.$style.commenuSectionHeader730:e<=960?this.$style.commenuSectionHeader960:e<=1232?this.$style.commenuSectionHeader1232:this.$style.commenuSectionHeader},losMejoresClass(){const e=this.elementSize.width;return e<=380?this.$style.comlosMejores380:e<=530?this.$style.comlosMejores530:e<=730?this.$style.comlosMejores730:this.$style.comlosMejores},dropdownClass(){return this.elementSize.width<=730?this.$style.comdropdown730:this.$style.comdropdown},dropdown1Class(){return this.elementSize.width<=730?this.$style.comdropdown1730:this.$style.comdropdown1},menuSectionParentHeaderClass(){const e=this.elementSize.width;return e<=430?this.$style.commenuSectionParentHeader430:e<=730?this.$style.commenuSectionParentHeader730:e<=960?this.$style.commenuSectionParentHeader960:e<=1232?this.$style.commenuSectionParentHeader1232:this.$style.commenuSectionParentHeader},templateLosMejoresClass(){const e=this.elementSize.width;return e<=319?this.$style.comtemplateLosMejores1320:e<=350?this.$style.comtemplateLosMejores1350:e<=420?this.$style.comtemplateLosMejores1420:e<=540?this.$style.comtemplateLosMejores1540:e<=960?this.$style.comtemplateLosMejores1960:e<=1232?this.$style.comtemplateLosMejores11232:this.$style.comtemplateLosMejores1},containerMenuClass(){return this.elementSize.width<=760?this.$style.comcontainerMenu760:this.$style.comcontainerMenu},titleSectionClass(){return this.elementSize.width<=540?this.$style.comtitleSection540:this.$style.comtitleSection},containerSectionClass(){const e=this.elementSize.width;return e<=319?this.$style.comcontainerSection320:e<=350?this.$style.comcontainerSection350:e<=960?this.$style.comcontainerSection960:e<=1232?this.$style.comcontainerSection1232:this.$style.comcontainerSection},filtersContainerClass(){const e=this.elementSize.width;return e<=420?this.$style.comfiltersContainer420:e<=760?this.$style.comfiltersContainer760:e<=1232?this.$style.comfiltersContainer1232:this.$style.comfiltersContainer},topFiltersParentClass(){const e=this.elementSize.width;return e<=420?this.$style.comtopFiltersParent420:e<=460?this.$style.comtopFiltersParent460:e<=1232?this.$style.comtopFiltersParent1232:this.$style.comtopFiltersParent}}};function jb(e){const o=t.ref({width:0,height:0});function s(){const B=e.value.getBoundingClientRect();o.value.width=B.width,o.value.height=B.height}return t.onMounted(()=>{s(),window.addEventListener("resize",s)}),t.onUnmounted(()=>{window.removeEventListener("resize",s)}),{elementSize:o}}const Rct={containerLeftTitles:"_containerLeftTitles_10kz4_60",containerLeftTitles420:"_containerLeftTitles420_10kz4_68",containerLeftTitles620:"_containerLeftTitles620_10kz4_76",containerLeftTitlesTeam:"_containerLeftTitlesTeam_10kz4_85",containerLeftTitlesTeam1180:"_containerLeftTitlesTeam1180_10kz4_93",containerLeftTitlesTeam1090:"_containerLeftTitlesTeam1090_10kz4_101",containerLeftTitlesTeam960:"_containerLeftTitlesTeam960_10kz4_109",containerLeftTitlesTeam860:"_containerLeftTitlesTeam860_10kz4_117",containerLeftTitlesTeam768:"_containerLeftTitlesTeam768_10kz4_125",containerLeftTitlesTeam680:"_containerLeftTitlesTeam680_10kz4_133",containerLeftTitlesTeam620:"_containerLeftTitlesTeam620_10kz4_141",containerLeftTitlesTeam420:"_containerLeftTitlesTeam420_10kz4_149",headTitlesAvanced:"_headTitlesAvanced_10kz4_158",headTitlesAvanced960:"_headTitlesAvanced960_10kz4_173",headTitlesAvanced420:"_headTitlesAvanced420_10kz4_188",headTitlesAvanced540:"_headTitlesAvanced540_10kz4_208",headTitlesAvanced460:"_headTitlesAvanced460_10kz4_223",headTitlesAvanced620:"_headTitlesAvanced620_10kz4_238",position:"_position_10kz4_253",position420:"_position420_10kz4_262",player:"_player_10kz4_265",player420:"_player420_10kz4_276",containerRightTypeAvanced1:"_containerRightTypeAvanced1_10kz4_280",containerRightTitlesAdvanced:"_containerRightTitlesAdvanced_10kz4_287",containerRightTitlesAdvanced960:"_containerRightTitlesAdvanced960_10kz4_296",block02Titles:"_block02Titles_10kz4_305",block02Titles620:"_block02Titles620_10kz4_313",mon1Scouting:"_mon1Scouting_10kz4_317",mon1Scouting960:"_mon1Scouting960_10kz4_327",mon1:"_mon1_10kz4_317",mon1420:"_mon1420_10kz4_345",mon1620:"_mon1620_10kz4_355",icnIcon:"_icnIcon_10kz4_365",icnIcon960:"_icnIcon960_10kz4_370",icnIcon420:"_icnIcon420_10kz4_376",teamTitle:"_teamTitle_10kz4_380",positionTitle:"_positionTitle_10kz4_390",ageTitle:"_ageTitle_10kz4_398",partidos:"_partidos_10kz4_406",playedGamesTitle:"_playedGamesTitle_10kz4_410",playedMinutesTitle:"_playedMinutesTitle_10kz4_420",block01Titles:"_block01Titles_10kz4_429",mon:"_mon_10kz4_317",containesOptionsTitles:"_containesOptionsTitles_10kz4_445",templateTablaProductividadType1:"_templateTablaProductividadType1_10kz4_452",templateTablaProductividadType1400:"_templateTablaProductividadType1400_10kz4_464",headTitlesType1:"_headTitlesType1_10kz4_478",headTitlesType1420:"_headTitlesType1420_10kz4_491",headTitlesType1400:"_headTitlesType1400_10kz4_507",headTitlesType1540:"_headTitlesType1540_10kz4_523",headTitlesType1460:"_headTitlesType1460_10kz4_537",headTitlesType1680:"_headTitlesType1680_10kz4_551",headTitlesType1350:"_headTitlesType1350_10kz4_564",positionType1:"_positionType1_10kz4_579",positionType1400:"_positionType1400_10kz4_588",teamType1:"_teamType1_10kz4_598",teamType1400:"_teamType1400_10kz4_607",frecuenciaType1:"_frecuenciaType1_10kz4_617",frecuenciaType1540:"_frecuenciaType1540_10kz4_625",containerLeftTitlesType1:"_containerLeftTitlesType1_10kz4_634",frecuenciaWrapperType1:"_frecuenciaWrapperType1_10kz4_642",frecuenciaWrapperType1680:"_frecuenciaWrapperType1680_10kz4_651",promedioPartidoType1:"_promedioPartidoType1_10kz4_659",promedioEstePartidoType1:"_promedioEstePartidoType1_10kz4_663",promedioEstePartidoType1960:"_promedioEstePartidoType1960_10kz4_671",promedioEstePartidoWrapperType1:"_promedioEstePartidoWrapperType1_10kz4_675",promedioEstePartidoWrapperType11200:"_promedioEstePartidoWrapperType11200_10kz4_683",promedioEstePartidoWrapperType11090:"_promedioEstePartidoWrapperType11090_10kz4_692",promedioEstePartidoWrapperType11086:"_promedioEstePartidoWrapperType11086_10kz4_702",promedioPartidosType1:"_promedioPartidosType1_10kz4_711",promedioPartidosWrapperType1:"_promedioPartidosWrapperType1_10kz4_718",promedioPartidosWrapperType1960:"_promedioPartidosWrapperType1960_10kz4_726",promedioPartidosWrapperType11086:"_promedioPartidosWrapperType11086_10kz4_729",partidosJugadosType1:"_partidosJugadosType1_10kz4_732",partidosJugadosType1960:"_partidosJugadosType1960_10kz4_738",partidosJugadosWrapperType1:"_partidosJugadosWrapperType1_10kz4_745",partidosJugadosWrapperType11200:"_partidosJugadosWrapperType11200_10kz4_753",partidosJugadosWrapperType11180:"_partidosJugadosWrapperType11180_10kz4_761",partidosJugadosWrapperType11170:"_partidosJugadosWrapperType11170_10kz4_769",partidosJugadosWrapperType11140:"_partidosJugadosWrapperType11140_10kz4_777",partidosJugadosWrapperType11086:"_partidosJugadosWrapperType11086_10kz4_785",partidosJugadosWrapperType1960:"_partidosJugadosWrapperType1960_10kz4_793",partidosJugadosWrapperType1880:"_partidosJugadosWrapperType1880_10kz4_801",partidosJugadosWrapperType1860:"_partidosJugadosWrapperType1860_10kz4_809",partidosJugadosWrapperType1830:"_partidosJugadosWrapperType1830_10kz4_817",partidosJugadosWrapperType1790:"_partidosJugadosWrapperType1790_10kz4_825",partidosJugadosWrapperType1930:"_partidosJugadosWrapperType1930_10kz4_833",partidosJugadosWrapperType1770:"_partidosJugadosWrapperType1770_10kz4_841",block01TitlesType1:"_block01TitlesType1_10kz4_844",monType1:"_monType1_10kz4_852",monType1960:"_monType1960_10kz4_861",monType1680:"_monType1680_10kz4_871",videosType1:"_videosType1_10kz4_874",videosType1680:"_videosType1680_10kz4_884",videosType1600:"_videosType1600_10kz4_893",videosType1540:"_videosType1540_10kz4_902",videosType1420:"_videosType1420_10kz4_911",videosType1400:"_videosType1400_10kz4_920",containesOptionsTitlesType1:"_containesOptionsTitlesType1_10kz4_932",containesOptionsTitlesType1768:"_containesOptionsTitlesType1768_10kz4_940",containesOptionsTitlesType1730:"_containesOptionsTitlesType1730_10kz4_947",containesOptionsTitlesType1690:"_containesOptionsTitlesType1690_10kz4_954",icnIconType1:"_icnIconType1_10kz4_961",icnIconType1420:"_icnIconType1420_10kz4_967",icnIconType1400:"_icnIconType1400_10kz4_974",block02TitlesType1:"_block02TitlesType1_10kz4_978",block02TitlesType1680:"_block02TitlesType1680_10kz4_985",block02TitlesType1350:"_block02TitlesType1350_10kz4_992",containerRightTitlesType1:"_containerRightTitlesType1_10kz4_999",containerRightTitlesType1420:"_containerRightTitlesType1420_10kz4_1008"},NS={components:{},computed:{icnIconType1Class(){const e=this.elementSize.width;return e<=400?this.$style.icnIconType1400:e<=420?this.$style.icnIconType1420:this.$style.icnIconType1},videosType1Class(){const e=this.elementSize.width;return e<=400?this.$style.videosType1400:e<=420?this.$style.videosType1420:e<=540?this.$style.videosType1540:e<=600?this.$style.videosType1600:e<=680?this.$style.videosType1680:this.$style.videosType1},monType1Class(){const e=this.elementSize.width;return e<=680?this.$style.monType1680:e<=960?this.$style.monType1960:this.$style.monType1},block02TitlesType1Class(){const e=this.elementSize.width;return e<=350?this.$style.block02TitlesType1350:e<=680?this.$style.block02TitlesType1680:this.$style.block02TitlesType1},containesOptionsTitlesType1Class(){const e=this.elementSize.width;return e<=400?this.$style.containesOptionsTitlesType1400:e<=690?this.$style.containesOptionsTitlesType1690:e<=730?this.$style.containesOptionsTitlesType1730:e<=768?this.$style.containesOptionsTitlesType1768:this.$style.containesOptionsTitlesType1},partidosJugadosWrapperType1Class(){const e=this.elementSize.width;return e<=770?this.$style.promedioPartidosWrapperType1770:e<=790?this.$style.partidosJugadosWrapperType1790:e<=830?this.$style.partidosJugadosWrapperType1830:e<=860?this.$style.partidosJugadosWrapperType1860:e<=880?this.$style.partidosJugadosWrapperType1880:e<=930?this.$style.partidosJugadosWrapperType1930:e<=960?this.$style.partidosJugadosWrapperType1960:e<=1086?this.$style.partidosJugadosWrapperType11086:e<=1140?this.$style.partidosJugadosWrapperType11140:e<=1170?this.$style.partidosJugadosWrapperType11170:e<=1180?this.$style.partidosJugadosWrapperType11180:e<=1200?this.$style.partidosJugadosWrapperType11200:this.$style.partidosJugadosWrapperType1},promedioPartidosWrapperType1Class(){const e=this.elementSize.width;return e<=960?this.$style.promedioPartidosWrapperType1960:e<=1086?this.$style.promedioPartidosWrapperType11086:this.$style.promedioPartidosWrapperType1},partidosJugadosType1Class(){return this.elementSize.width<=960?this.$style.partidosJugadosType1960:this.$style.partidosJugadosType1},templateTablaProductividadType1Class(){return this.elementSize.width<=400?this.$style.templateTablaProductividadType1400:this.$style.templateTablaProductividadType1},promedioEstePartidoType1Class(){return this.elementSize.width<=960?this.$style.promedioEstePartidoType1960:this.$style.promedioEstePartidoType1},headTitlesType1Class(){const e=this.elementSize.width;return e<=350?this.$style.headTitlesType1350:e<=400?this.$style.headTitlesType1400:e<=420?this.$style.headTitlesType1420:e<=460?this.$style.headTitlesType1460:e<=540?this.$style.headTitlesType1540:e<=680?this.$style.headTitlesType1680:this.$style.headTitlesType1},headTitlesClassAvanced(){const e=this.elementSize.width;return e<=420?this.$style.headTitlesAvanced420:e<=460?this.$style.headTitlesAvanced460:e<=540?this.$style.headTitlesAvanced540:e<=620?this.$style.headTitlesAvanced620:e<=960?this.$style.headTitlesAvanced960:this.$style.headTitlesAvanced},containerLeftTitlesClass(){const e=this.elementSize.width;return e<=420?this.$style.containerLeftTitles420:e<=620?this.$style.containerLeftTitles620:this.$style.containerLeftTitles},containerLeftTitlesClassTeam(){const e=this.elementSize.width;return e<=420?this.$style.containerLeftTitlesTeam420:e<=620?this.$style.containerLeftTitlesTeam620:e<=680?this.$style.containerLeftTitlesTeam680:e<=768?this.$style.containerLeftTitlesTeam768:e<=860?this.$style.containerLeftTitlesTeam860:e<=960?this.$style.containerLeftTitlesTeam960:e<=1090?this.$style.containerLeftTitlesTeam1090:e<=1180?this.$style.containerLeftTitlesTeam1180:this.$style.containerLeftTitlesTeam},icnIconClass(){const e=this.elementSize.width;return e<=420?this.$style.icnIcon420:e<=960?this.$style.icnIcon960:this.$style.icnIcon},mon1Class(){const e=this.elementSize.width;return e<=420?this.$style.mon1420:e<=620?this.$style.mon1620:this.$style.mon1},mon1ScoutingClass(){const e=this.elementSize.width;return e<=420?this.$style.mon1420:e<=960?this.$style.mon1Scouting960:this.$style.mon1Scouting},promedioEstePartidoWrapperType1Class(){const e=this.elementSize.width;return e<=1086?this.$style.promedioEstePartidoWrapperType11086:e<=1090?this.$style.promedioEstePartidoWrapperType11090:e<=1200?this.$style.promedioEstePartidoWrapperType11200:this.$style.promedioEstePartidoWrapperType1},frecuenciaWrapperType1Class(){return this.elementSize.width<=680?this.$style.frecuenciaWrapperType1680:this.$style.frecuenciaWrapperType1},frecuenciaType1Class(){return this.elementSize.width<=540?this.$style.frecuenciaType1540:this.$style.frecuenciaType1},positionType1Class(){return this.elementSize.width<=400?this.$style.positionType1400:this.$style.positionType1},containerRightType1ClassAvanced(){return this.elementSize.width<=420?this.$style.containerRightTypeAvanced1420:this.$style.containerRightTypeAvanced1},containerRightTitlesType1Class(){return this.elementSize.width<=420?this.$style.containerRightTitlesType1420:this.$style.containerRightTitlesType1},teamType1Class(){return this.elementSize.width<=400?this.$style.teamType1400:this.$style.teamType1},playerClass(){return this.elementSize.width<=420?this.$style.player420:this.$style.player},positionClass(){return this.elementSize.width<=420?this.$style.position420:this.$style.position},containerRightTitlesClassAdvanced(){return this.elementSize.width<=960?this.$style.containerRightTitlesAdvanced960:this.$style.containerRightTitlesAdvanced},block02TitlesClass(){return this.elementSize.width<=620?this.$style.block02Titles960:this.$style.block02Titles}},setup(){const e=t.ref("myDivRef"),{elementSize:o}=jb(e);return{myDivRef:e,elementSize:o}},props:{type:{type:Number,default:0},background:{type:String,default:"#172531"},height:{type:String,default:"71px"},heightTeam:{type:String,default:"65px"},fontColor:{type:String,default:"#FFFFFF"},fontSize:{type:String,default:"12px"},fontFamily:{type:String,default:"Poppins-Regular"}},watch:{},data:()=>({}),async created(){},methods:{}},$R=()=>{t.useCssVars(e=>({"833b0df6":e.background,"1c64387e":e.height,"42ac62f2":e.fontSize,"149ddcc6":e.fontColor,"766a7f2c":e.fontFamily,"669f7ffb":e.heightTeam}))},KR=NS.setup;NS.setup=KR?(e,o)=>($R(),KR(e,o)):$R;const Vct={ref:"myDivRef"};function jct(e,o,s,B,U,m){return t.openBlock(),t.createElementBlock("div",Vct,[s.type==0?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(m.headTitlesClassAvanced),id:"container-titles"},[t.createElementVNode("div",{class:t.normalizeClass(m.containerLeftTitlesClass),id:"container-left-titles"},[t.createElementVNode("div",{class:t.normalizeClass(m.positionClass)},"Pos.",2),t.createElementVNode("div",{class:t.normalizeClass(m.playerClass)},"Jugador",2)],2),t.createElementVNode("div",{class:t.normalizeClass(m.containerRightTitlesClassAdvanced),id:"container-right-titles"},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.block01Titles)},[B.elementSize.width>540?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(e.$style.teamTitle)},"Equipo",2)):t.createCommentVNode("",!0),B.elementSize.width>730?(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(e.$style.positionTitle)},"Posición",2)):t.createCommentVNode("",!0),B.elementSize.width>960?(t.openBlock(),t.createElementBlock("div",{key:2,class:t.normalizeClass(e.$style.ageTitle)},"edad",2)):t.createCommentVNode("",!0),B.elementSize.width>960?(t.openBlock(),t.createElementBlock("div",{key:3,class:t.normalizeClass(e.$style.ageTitle)},"País",2)):t.createCommentVNode("",!0),B.elementSize.width>540?(t.openBlock(),t.createElementBlock("div",{key:4,class:t.normalizeClass(e.$style.playedGamesTitle)},[t.createElementVNode("p",{class:t.normalizeClass(e.$style.partidos)},"Partidos",2),t.createElementVNode("p",{class:t.normalizeClass(e.$style.partidos)},"Jugados",2)],2)):t.createCommentVNode("",!0),B.elementSize.width>635?(t.openBlock(),t.createElementBlock("div",{key:5,class:t.normalizeClass(e.$style.playedMinutesTitle)},[t.createElementVNode("p",{class:t.normalizeClass(e.$style.partidos)},"Minutos",2),t.createElementVNode("p",{class:t.normalizeClass(e.$style.partidos)},"Jugados",2)],2)):t.createCommentVNode("",!0)],2),t.createElementVNode("div",{class:t.normalizeClass(m.block02TitlesClass)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.containesOptionsTitles)},[B.elementSize.width>960?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(e.$style.mon)},"Total",2)):t.createCommentVNode("",!0),t.createElementVNode("div",{class:t.normalizeClass(m.mon1Class)},"Videos",2)],2)],2)],2)],2)):t.createCommentVNode("",!0),s.type==1?(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(m.templateTablaProductividadType1Class)},[t.createElementVNode("div",{class:t.normalizeClass(m.headTitlesType1Class),id:"container-titles"},[t.createElementVNode("div",{class:t.normalizeClass(m.containerLeftTitlesClassTeam),id:"container-left-titles"},[t.createElementVNode("div",{class:t.normalizeClass(m.positionType1Class)},"Pos.",2),t.createElementVNode("div",{class:t.normalizeClass(m.teamType1Class)},"Equipo",2)],2),t.createElementVNode("div",{class:t.normalizeClass(m.containerRightType1ClassAvanced)},[t.createElementVNode("div",{class:t.normalizeClass(m.frecuenciaWrapperType1Class)},[B.elementSize.width>540?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(m.frecuenciaType1Class)},"Frecuencia",2)):t.createCommentVNode("",!0)],2),B.elementSize.width>960?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(m.promedioEstePartidoWrapperType1Class)},[t.createElementVNode("div",{class:t.normalizeClass(m.promedioEstePartidoType1Class)},[t.createElementVNode("p",{class:t.normalizeClass(e.$style.promedioPartidoType1)},"Promedio partido",2),t.createElementVNode("p",{class:t.normalizeClass(e.$style.promedioPartidoType1)},"este Torneo",2)],2)],2)):t.createCommentVNode("",!0),B.elementSize.width>1086?(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(m.promedioPartidosWrapperType1Class)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.promedioPartidosType1)},[t.createElementVNode("p",{class:t.normalizeClass(e.$style.promedioPartidoType1)},o[0]||(o[0]=[t.createTextVNode("Promedio partido"),t.createElementVNode("br",null,null,-1),t.createTextVNode("Torneo anterior")]),2)],2)],2)):t.createCommentVNode("",!0),B.elementSize.width>770?(t.openBlock(),t.createElementBlock("div",{key:2,class:t.normalizeClass(m.partidosJugadosWrapperType1Class)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.partidosJugadosType1)},[t.createElementVNode("p",{class:t.normalizeClass(e.$style.promedioPartidoType1)},o[1]||(o[1]=[t.createTextVNode("Partidos "),t.createElementVNode("br",null,null,-1),t.createTextVNode("Jugados")]),2)],2)],2)):t.createCommentVNode("",!0)],2),t.createElementVNode("div",{class:t.normalizeClass(m.containesOptionsTitlesType1Class)},[B.elementSize.width>680?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(m.monType1Class)},"total",2)):t.createCommentVNode("",!0),t.createElementVNode("div",{class:t.normalizeClass(m.videosType1Class)},"Videos",2)],2)],2)],2)):t.createCommentVNode("",!0),s.type==2?(t.openBlock(),t.createElementBlock("div",{key:2,class:t.normalizeClass(m.headTitlesClassAvanced),id:"container-titles"},[t.createElementVNode("div",{class:t.normalizeClass(m.containerLeftTitlesClass),id:"container-left-titles"},[t.createElementVNode("div",{class:t.normalizeClass(m.positionClass)},"Pos.",2),t.createElementVNode("div",{class:t.normalizeClass(m.playerClass)},"Jugador",2)],2),t.createElementVNode("div",{class:t.normalizeClass(m.containerRightTitlesClassAdvanced),id:"container-right-titles"},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.block01Titles)},[B.elementSize.width>540?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(e.$style.teamTitle)},"Equipo",2)):t.createCommentVNode("",!0),B.elementSize.width>730?(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(e.$style.positionTitle)},"Posición",2)):t.createCommentVNode("",!0),B.elementSize.width>960?(t.openBlock(),t.createElementBlock("div",{key:2,class:t.normalizeClass(e.$style.ageTitle)},"edad",2)):t.createCommentVNode("",!0),B.elementSize.width>960?(t.openBlock(),t.createElementBlock("div",{key:3,class:t.normalizeClass(e.$style.ageTitle)},"País",2)):t.createCommentVNode("",!0),B.elementSize.width>540?(t.openBlock(),t.createElementBlock("div",{key:4,class:t.normalizeClass(e.$style.playedGamesTitle)},[t.createElementVNode("p",{class:t.normalizeClass(e.$style.partidos)},"Partidos",2),t.createElementVNode("p",{class:t.normalizeClass(e.$style.partidos)},"Jugados",2)],2)):t.createCommentVNode("",!0),B.elementSize.width>635?(t.openBlock(),t.createElementBlock("div",{key:5,class:t.normalizeClass(e.$style.playedMinutesTitle)},[t.createElementVNode("p",{class:t.normalizeClass(e.$style.partidos)},"Minutos",2),t.createElementVNode("p",{class:t.normalizeClass(e.$style.partidos)},"Jugados",2)],2)):t.createCommentVNode("",!0),B.elementSize.width>635?(t.openBlock(),t.createElementBlock("div",{key:6,class:t.normalizeClass(e.$style.playedMinutesTitle)},[t.createElementVNode("p",{class:t.normalizeClass(e.$style.partidos)},"Liga",2)],2)):t.createCommentVNode("",!0)],2),t.createElementVNode("div",{class:t.normalizeClass(m.block02TitlesClass)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.containesOptionsTitles)},[t.createElementVNode("div",{class:t.normalizeClass(m.mon1ScoutingClass)},"Videos",2)],2)],2)],2)],2)):t.createCommentVNode("",!0)],512)}const QR=Ki(NS,[["render",jct],["__cssModules",{$style:Rct}]]),UYt="",FS={props:{type:{type:Number,default:0},value:{type:Boolean,default:!1},textValue:String,icon:{type:String,default:"https://golstatsimages.blob.core.windows.net/images-library/arrow-btn.png"},iconPosition:{type:String,default:"left"},iconSize:String,mini:{type:Boolean,default:!1},fontColor:{type:String,default:"#FFFFFF"},textDecoration:String,fontSize:{type:String,default:"16px"},fontSizeStat:{type:String,default:"16px"},fontStyle:String,fontFamily:{type:String,default:"Poppins-Regular"},height:{type:String,default:"fit-content"},width:{type:String,default:"fit-content"},buttonMaxWidth:{type:String,default:"auto"},borderRadius:{type:String,default:"0px"},borderType:{type:String,default:"solid"},borderWidth:{type:Number,default:0},borderWidthBtn:{type:String,default:"2px"},borderColor:String,backgroundColor:{type:String,default:"none"},activeBackgroundColor:{type:String,default:"#000000"},activeBorderWidth:{type:Number,default:2},activeBorderType:{type:String,default:"solid"},activeBorderColor:{type:String,default:"#cbee6b"},activeColorText:{type:String,default:"#FFFFFF"},cursorType:{type:String,default:"default"},typeOnOff:{type:Boolean,default:!1},textCategory:String,textStat:String,marginLeftStat:{type:String,default:"15%"}},watch:{value:{deep:!0,immediate:!0,handler(e){this.status=e}}},data(){return{status:!1}},computed:{customStyle(){return{height:this.height,width:this.width,maxWidth:this.buttonMaxWidth,backgroundColor:this.backgroundColor,borderRadius:this.borderRadius,border:`${this.borderType} ${this.borderWidth}px ${this.borderColor}`,color:this.fontColor,textDecoration:this.textDecoration,cursor:this.cursorType,fontSize:this.fontSize,fontStyle:this.fontStyle,fontFamily:`${this.fontFamily} !important`}},customActive(){return{backgroundColor:this.activeBackgroundColor,color:this.activeColorText,border:`${this.activeBorderType} ${this.activeBorderWidth}px ${this.activeBorderColor}`}}},methods:{btnClick(e){this.$emit("click",e),this.typeOnOff&&(this.status=!this.status,this.$emit("status",this.status))}}},eV=()=>{t.useCssVars(e=>({"3ae4172d":e.height,f5b071f0:e.borderWidthBtn,f8d8d6e8:e.borderType,"242a575e":e.borderColor,"2f813538":e.borderRadius,"9fb26200":e.width,"374850e2":e.backgroundColor,"1c058eb6":e.cursorType,"5cacbd76":e.fontSize,"38efeedc":e.fontStyle,"6464a0ce":e.fontFamily,"26623acf":e.marginLeftStat,d6a6e62c:e.fontSizeStat}))},tV=FS.setup;FS.setup=tV?(e,o)=>(eV(),tV(e,o)):eV;const Uct=["src"],Gct={key:1,class:"text"},Hct=["src"],Zct={class:"stats"},Wct={class:"numstats"},qct={class:"leyend"};function Jct(e,o,s,B,U,m){return t.openBlock(),t.createElementBlock("div",null,[s.type==0?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(["button",U.status&&s.typeOnOff&&"button-active"]),style:t.normalizeStyle([m.customStyle,U.status&&s.typeOnOff&&m.customActive]),onClick:o[0]||(o[0]=(...y)=>m.btnClick&&m.btnClick(...y))},[s.icon&&s.iconPosition.toLowerCase()==="left"?(t.openBlock(),t.createElementBlock("img",{key:0,class:t.normalizeClass(s.mini?"icon-txt":"icon"),style:t.normalizeStyle({width:s.iconSize}),src:s.icon},null,14,Uct)):t.createCommentVNode("",!0),s.textValue?(t.openBlock(),t.createElementBlock("div",Gct,t.toDisplayString(s.textValue),1)):t.createCommentVNode("",!0),s.icon&&s.iconPosition.toLowerCase()==="right"?(t.openBlock(),t.createElementBlock("img",{key:2,class:"icon",style:t.normalizeStyle({width:s.iconSize}),src:s.icon},null,12,Hct)):t.createCommentVNode("",!0)],6)):t.createCommentVNode("",!0),s.type==1?(t.openBlock(),t.createElementBlock("div",{key:1,class:"button-target",onClick:o[1]||(o[1]=(...y)=>m.btnClick&&m.btnClick(...y))},[t.createElementVNode("div",Zct,[o[2]||(o[2]=t.createElementVNode("img",{class:"iconstats",src:"https://golstatsimages.blob.core.windows.net/todoelfut/playdes.png"},null,-1)),t.createElementVNode("div",Wct,t.toDisplayString(s.textStat),1)]),t.createElementVNode("div",qct,t.toDisplayString(s.textCategory),1)])):t.createCommentVNode("",!0)])}const aV=Ki(FS,[["render",Jct],["__scopeId","data-v-cbde52b5"]]),Yct={rotate:"_rotate_z2pk6_3",positionContainer:"_positionContainer_z2pk6_50",positionContainer620:"_positionContainer620_z2pk6_57",rowwPlayerGames:"_rowwPlayerGames_z2pk6_64",rowwPlayer960Games:"_rowwPlayer960Games_z2pk6_80",rowwPlayer420Games:"_rowwPlayer420Games_z2pk6_95",rowwPlayer460Games:"_rowwPlayer460Games_z2pk6_111",containerLeftGames:"_containerLeftGames_z2pk6_128",containerLeft420Games:"_containerLeft420Games_z2pk6_136",containerLeft620Games:"_containerLeft620Games_z2pk6_144",iconFavoritesType1:"_iconFavoritesType1_z2pk6_151",iconFavoritesType1320:"_iconFavoritesType1320_z2pk6_159",iconFavorites:"_iconFavorites_z2pk6_151",iconFavorites420:"_iconFavorites420_z2pk6_175",playerContainerGames:"_playerContainerGames_z2pk6_183",playerContainer420Games:"_playerContainer420Games_z2pk6_195",playerContainer460Games:"_playerContainer460Games_z2pk6_207",playerContainerType1Games:"_playerContainerType1Games_z2pk6_219",playerContainerType1320Games:"_playerContainerType1320Games_z2pk6_229",playerContainerType1460Games:"_playerContainerType1460Games_z2pk6_239",imgPlayerIcon:"_imgPlayerIcon_z2pk6_249",imgPlayerIcon460:"_imgPlayerIcon460_z2pk6_259",imgPlayerIcon420:"_imgPlayerIcon420_z2pk6_269",manchesterUnitedGames:"_manchesterUnitedGames_z2pk6_279",manchesterUnited360Games:"_manchesterUnited360Games_z2pk6_290",manchesterUnited420Games:"_manchesterUnited420Games_z2pk6_301",manchesterUnited460Games:"_manchesterUnited460Games_z2pk6_312",containerRightGames:"_containerRightGames_z2pk6_323",containerRight960Games:"_containerRight960Games_z2pk6_332",containerRight420Games:"_containerRight420Games_z2pk6_342",numberOfVideos:"_numberOfVideos_z2pk6_353",numberOfVideos620:"_numberOfVideos620_z2pk6_359",block02Games:"_block02Games_z2pk6_365",block02960Games:"_block02960Games_z2pk6_375",block02620Games:"_block02620Games_z2pk6_384",block02420Games:"_block02420Games_z2pk6_391",verVideos:"_verVideos_z2pk6_399",verVideos620:"_verVideos620_z2pk6_405",numberPosition:"_numberPosition_z2pk6_408",shapeIcon:"_shapeIcon_z2pk6_414",chivasIcon:"_chivasIcon_z2pk6_419",imgTeamIcon:"_imgTeamIcon_z2pk6_430",teamName:"_teamName_z2pk6_435",nameTeamGames:"_nameTeamGames_z2pk6_441",dfC:"_dfC_z2pk6_450",position:"_position_z2pk6_50",age:"_age_z2pk6_460",manchesterUnitedIcon:"_manchesterUnitedIcon_z2pk6_468",country:"_country_z2pk6_475",playedGames:"_playedGames_z2pk6_482",playedMinutes:"_playedMinutes_z2pk6_489",block01:"_block01_z2pk6_496",leagueName:"_leagueName_z2pk6_503",roleCharacterIcon:"_roleCharacterIcon_z2pk6_509",btnVideosGames:"_btnVideosGames_z2pk6_517",containerBtnVideosGames:"_containerBtnVideosGames_z2pk6_532",containerBtnVideos620Games:"_containerBtnVideos620Games_z2pk6_542",containesOptions:"_containesOptions_z2pk6_551",arrowExpandIcon:"_arrowExpandIcon_z2pk6_558",rowTeam:"_rowTeam_z2pk6_567",rowTeam420:"_rowTeam420_z2pk6_585",rowTeam320:"_rowTeam320_z2pk6_603",rowTeam460:"_rowTeam460_z2pk6_622",rowTeam350:"_rowTeam350_z2pk6_641",containerLeftType1:"_containerLeftType1_z2pk6_659",containerLeftType1680:"_containerLeftType1680_z2pk6_665",containerLeftType1320:"_containerLeftType1320_z2pk6_672",containerLeftType1350:"_containerLeftType1350_z2pk6_680",positionContainertype1:"_positionContainertype1_z2pk6_687",positionContainertype1380:"_positionContainertype1380_z2pk6_695",positionContainertype1680:"_positionContainertype1680_z2pk6_703",positionContainertype1420:"_positionContainertype1420_z2pk6_711",manchesterUnitedType1:"_manchesterUnitedType1_z2pk6_719",manchesterUnitedType1460:"_manchesterUnitedType1460_z2pk6_725",manchesterUnitedType1320:"_manchesterUnitedType1320_z2pk6_732",containerRightType1Games:"_containerRightType1Games_z2pk6_739",containerRightType1420Games:"_containerRightType1420Games_z2pk6_750",containerRightType1320Games:"_containerRightType1320Games_z2pk6_761",teamNameWrapperType1:"_teamNameWrapperType1_z2pk6_772",teamNameWrapperType1960:"_teamNameWrapperType1960_z2pk6_779",teamNameWrapperType11086:"_teamNameWrapperType11086_z2pk6_786",ageWrapperType1:"_ageWrapperType1_z2pk6_793",ageWrapperType1680:"_ageWrapperType1680_z2pk6_800",ageWrapperType11086:"_ageWrapperType11086_z2pk6_808",ageType1:"_ageType1_z2pk6_816",ageType1960:"_ageType1960_z2pk6_824",playedGamesWrapperType1:"_playedGamesWrapperType1_z2pk6_827",playedGamesWrapperType1680:"_playedGamesWrapperType1680_z2pk6_834",playedGamesWrapperType1960:"_playedGamesWrapperType1960_z2pk6_837",playedGamesType1:"_playedGamesType1_z2pk6_840",playedGamesType1540:"_playedGamesType1540_z2pk6_847",playedGamesType1960:"_playedGamesType1960_z2pk6_851",playedGamesType11086:"_playedGamesType11086_z2pk6_854",playedMinutesWrapperType1:"_playedMinutesWrapperType1_z2pk6_857",playedMinutesWrapperType11086:"_playedMinutesWrapperType11086_z2pk6_864",playedMinutesType1:"_playedMinutesType1_z2pk6_871",playedMinutesType1680:"_playedMinutesType1680_z2pk6_878",block02Type1Games:"_block02Type1Games_z2pk6_881",block02Type1680Games:"_block02Type1680Games_z2pk6_889",block02Type1320Games:"_block02Type1320Games_z2pk6_897",block02Type1350Games:"_block02Type1350Games_z2pk6_906",leagueNameWrapperType1:"_leagueNameWrapperType1_z2pk6_914",leagueNameWrapperType1680:"_leagueNameWrapperType1680_z2pk6_922",leagueNameWrapperType1960:"_leagueNameWrapperType1960_z2pk6_925",leagueNameType1:"_leagueNameType1_z2pk6_933",leagueNameType1960:"_leagueNameType1960_z2pk6_943",numberOfVideosType1:"_numberOfVideosType1_z2pk6_953",numberOfVideosType1680:"_numberOfVideosType1680_z2pk6_960",numberOfVideosType11232:"_numberOfVideosType11232_z2pk6_967",vectorIconType1:"_vectorIconType1_z2pk6_974",block01TitlesType1:"_block01TitlesType1_z2pk6_991",numberPositionType1:"_numberPositionType1_z2pk6_998",shapeIconType1:"_shapeIconType1_z2pk6_1004",tijuanaIconType1:"_tijuanaIconType1_z2pk6_1010",tijuanaWrapperType1:"_tijuanaWrapperType1_z2pk6_1016",tijuanaWrapperType1NoBg:"_tijuanaWrapperType1NoBg_z2pk6_1027",teamNameType1:"_teamNameType1_z2pk6_1035",roleCharacterIconType1:"_roleCharacterIconType1_z2pk6_1042",verVideosType1:"_verVideosType1_z2pk6_1049",btnVideosType1Games:"_btnVideosType1Games_z2pk6_1055",containerBtnVideosType1Games:"_containerBtnVideosType1Games_z2pk6_1070",containesOptionsType1Games:"_containesOptionsType1Games_z2pk6_1081",arrowExpandIconType1:"_arrowExpandIconType1_z2pk6_1089",templateTablaProductividadType1:"_templateTablaProductividadType1_z2pk6_1095",verVideosType11232:"_verVideosType11232_z2pk6_1107",templateTablaProductividadType1320:"_templateTablaProductividadType1320_z2pk6_1111",verVideosType1680:"_verVideosType1680_z2pk6_1115"},RS={components:{GSCButton:aV},computed:{manchesterUnitedType1Class(){const e=this.elementSize.width;return e<=320?this.$style.manchesterUnitedType1320:e<=460?this.$style.manchesterUnitedType1460:this.$style.manchesterUnitedType1},containerRightType1Class(){const e=this.elementSize.width;return e<=320?this.$style.containerRightType1320Games:e<=420?this.$style.containerRightType1420Games:this.$style.containerRightType1Games},teamNameWrapperType1Class(){const e=this.elementSize.width;return e<=960?this.$style.teamNameWrapperType1960:e<=1086?this.$style.teamNameWrapperType11086:this.$style.teamNameWrapperType1},ageWrapperType1Class(){const e=this.elementSize.width;return e<=680?this.$style.ageWrapperType1680:e<=1086?this.$style.ageWrapperType11086:this.$style.ageWrapperType1},ageType1Class(){return this.elementSize.width<=960?this.$style.ageType1960:this.$style.ageType1},playedGamesWrapperType1Class(){const e=this.elementSize.width;return e<=680?this.$style.playedGamesWrapperType1680:e<=960?this.$style.playedGamesWrapperType1960:this.$style.playedGamesWrapperType1},playedGamesType1Class(){const e=this.elementSize.width;return e<=540?this.$style.playedGamesType1540:e<=960?this.$style.playedGamesType1960:e<=1086?this.$style.playedGamesType11086:this.$style.playedGamesType1},playedMinutesWrapperType1Class(){return this.elementSize.width<=1086?this.$style.playedMinutesWrapperType11086:this.$style.playedMinutesWrapperType1},playedMinutesType1Class(){return this.elementSize.width<=680?this.$style.playedMinutesType1680:this.$style.playedMinutesType1},block02Type1Class(){const e=this.elementSize.width;return e<=320?this.$style.block02Type1320Games:e<=350?this.$style.block02Type1350Games:e<=680?this.$style.block02Type1680Games:this.$style.block02Type1Games},leagueNameWrapperType1Class(){const e=this.elementSize.width;return e<=680?this.$style.leagueNameWrapperType1680:e<=960?this.$style.leagueNameWrapperType1960:this.$style.leagueNameWrapperType1},leagueNameType1Class(){return this.elementSize.width<=960?this.$style.leagueNameType1960:this.$style.leagueNameType1},numberOfVideosType1Class(){const e=this.elementSize.width;return e<=680?this.$style.numberOfVideosType1680:e<=1232?this.$style.numberOfVideosType11232:this.$style.numberOfVideosType1},containerLeftType1Class(){const e=this.elementSize.width;return e<=320?this.$style.containerLeftType1320:e<=350?this.$style.containerLeftType1350:e<=680?this.$style.containerLeftType1680:this.$style.containerLeftType1},positionContainertype1Class(){const e=this.elementSize.width;return e<=380?this.$style.positionContainertype1380:e<=420?this.$style.positionContainertype1420:e<=680?this.$style.positionContainertype1680:this.$style.positionContainertype1},rowTeamClass(){const e=this.elementSize.width;return e<=320?this.$style.rowTeam320:e<=350?this.$style.rowTeam350:e<=420?this.$style.rowTeam420:e<=460?this.$style.rowTeam460:this.$style.rowTeam},containerBtnVideosClass(){return this.$style.containerBtnVideosGames},numberOfVideosClass(){return this.elementSize.width<=620?this.$style.numberOfVideos620:this.$style.numberOfVideos},block02Class(){const e=this.elementSize.width;return e<=420?this.$style.block02420Games:e<=620?this.$style.block02620Games:e<=960?this.$style.block02960Games:this.$style.block02Games},imgPlayerIconClass(){const e=this.elementSize.width;return e<=420?this.$style.imgPlayerIcon420:e<=460?this.$style.imgPlayerIcon460:this.$style.imgPlayerIcon},manchesterUnitedClass(){const e=this.elementSize.width;return e<=360?this.$style.manchesterUnited360Games:e<=420?this.$style.manchesterUnited420Games:e<=460?this.$style.manchesterUnited460Games:this.$style.manchesterUnitedGames},containerRightClass(){const e=this.elementSize.width;return e<=420?this.$style.containerRight420Games:e<=960?this.$style.containerRight960Games:this.$style.containerRightGames},playerContainerType1Class(){const e=this.elementSize.width;return e<=320?this.$style.playerContainerType1320Games:e<=460?this.$style.playerContainerType1460Games:this.$style.playerContainerType1Games},playerContainerClass(){const e=this.elementSize.width;return e<=420?this.$style.playerContainer420Games:e<=460?this.$style.playerContainer460Games:this.$style.playerContainerGames},iconFavoritesClass(){return this.elementSize.width<=420?this.$style.iconFavorites420:this.$style.iconFavorites},iconFavoritesType1Class(){return this.elementSize.width<=320?this.$style.iconFavoritesType1320:this.$style.iconFavoritesType1},containerLeftClass(){const e=this.elementSize.width;return e<=420?this.$style.containerLeft420Games:e<=620?this.$style.containerLeft620Games:this.$style.containerLeftGames},positionContainerClass(){return this.elementSize.width<=620?this.$style.positionContainer620:this.$style.positionContainer},rowwPlayerClass(){const e=this.elementSize.width;return e<=420?this.$style.rowwPlayer420Games:e<=460?this.$style.rowwPlayer460Games:e<=960?this.$style.rowwPlayer960Games:this.$style.rowwPlayerGames}},setup(){const e=t.ref("myDivRef2"),{elementSize:o}=jb(e);return{myDivRef2:e,elementSize:o}},props:{typeData:{type:Number,default:1},canPlayVideos:{type:Boolean,default:!1},teamWidget:{type:Number,default:0},type:{type:Number,default:0},typeView:{type:Number,default:0},isExpanded:{type:Boolean,default:!1},background:{type:String,default:"#172531"},height:{type:String,default:"35px"},fontColor:{type:String,default:"#F4F4F4"},fontSize:{type:String,default:"12px"},fontFamily:{type:String,default:"Poppins-Regular"},data:{type:Object,default:()=>{}},game:{type:Object,default:()=>{}},colorArrow:{type:String,default:"#D9D9D9"},buttonTextValue:{type:String,default:"Ver videos"},iconVideos:{type:String,default:"https://golstatsimages.blob.core.windows.net/images-library/arrow-btn.png"},iconSize:{type:String,default:"13px"},iconSizeMini:{type:String,default:"13px"},iconPosition:{type:String,default:"left"},buttonWidth:{type:String,default:"93px"},buttonWidthMini:{type:String,default:"24px"},buttonHeightMini:{type:String,default:"24px"},buttonHeight:{type:String,default:"30px"},buttonRadius:{type:String,default:"30px"},buttonBorderWidth:{type:Number,default:1},buttonBackground:{type:String,default:"#ffffff1a"},buttonfontFamily:{type:String,default:"Poppins-Regular"},buttonBorderColor:{type:String,default:"#55636e"},buttonFontSize:{type:String,default:"10px"}},data:()=>({expand:!1}),methods:{clickExpand(e){this.$emit("expand",{expand:!this.isExpanded,id:e})},emitEventMedia(e){this.$emit("mediadata",e)}}},rV=()=>{t.useCssVars(e=>({d0a618bc:e.height,ba5dfbae:e.background,aa9f5eaa:e.fontSize,ab0a580e:e.fontColor,ad8d6ce4:e.fontFamily}))},nV=RS.setup;RS.setup=nV?(e,o)=>(rV(),nV(e,o)):rV;const Xct={ref:"myDivRef2",style:{"border-left":"rgba(13,29,41,0.7) 1px solid","border-right":"rgba(13,29,41,0.7) 1px solid"}},$ct=["src"],Kct=["src"],Qct=["src"],eut=["src"],tut=["fill"],aut=["fill"],rut=["src"],nut=["src"],iut=["fill"],out=["fill"],sut=["src"],lut=["src"],cut=["src"],uut=["src"],dut=["fill"],hut=["fill"];function put(e,o,s,B,U,m){const y=t.resolveComponent("GSCButton");return t.openBlock(),t.createElementBlock("div",Xct,[s.type==0?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(m.rowwPlayerClass),id:"container-row-player"},[t.createElementVNode("div",{class:t.normalizeClass(m.containerLeftClass),id:"container-left"},[t.createElementVNode("div",{class:t.normalizeClass(m.positionContainerClass)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.numberPosition)},t.toDisplayString(s.data.position),3)],2),t.createElementVNode("div",{class:t.normalizeClass(m.playerContainerClass)},[t.createElementVNode("img",{class:t.normalizeClass(m.imgPlayerIconClass),src:s.data.player_photo},null,10,$ct),t.createElementVNode("div",{class:t.normalizeClass(m.manchesterUnitedClass)},[B.elementSize.width<=420?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createTextVNode(t.toDisplayString(s.data.player_short),1)],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createTextVNode(t.toDisplayString(s.data.player_name),1)],64))],2),B.elementSize.width<=420?(t.openBlock(),t.createElementBlock("img",{key:0,class:t.normalizeClass(e.$style.chivasIcon),alt:"",src:s.data.team_logo},null,10,Kct)):t.createCommentVNode("",!0)],2)],2),t.createElementVNode("div",{class:t.normalizeClass(m.containerRightClass),id:"container-right"},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.block01)},[B.elementSize.width>420?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(e.$style.nameTeamGames)},[t.createElementVNode("img",{class:t.normalizeClass(e.$style.imgTeamIcon),alt:"",src:s.data.team_logo},null,10,Qct),B.elementSize.width>540?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(e.$style.teamName)},t.toDisplayString(s.data.team_abrev),3)):t.createCommentVNode("",!0)],2)):t.createCommentVNode("",!0),B.elementSize.width>730?(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(e.$style.position)},[t.createElementVNode("span",{class:t.normalizeClass(e.$style.dfC)},t.toDisplayString(s.data.player_position),3)],2)):t.createCommentVNode("",!0),B.elementSize.width>960?(t.openBlock(),t.createElementBlock("div",{key:2,class:t.normalizeClass(e.$style.age)},t.toDisplayString(s.data.player_age),3)):t.createCommentVNode("",!0),B.elementSize.width>960?(t.openBlock(),t.createElementBlock("div",{key:3,class:t.normalizeClass(e.$style.country)},[t.createElementVNode("img",{class:t.normalizeClass(e.$style.manchesterUnitedIcon),alt:"",src:s.data.player_country_flag},null,10,eut)],2)):t.createCommentVNode("",!0),B.elementSize.width>540?(t.openBlock(),t.createElementBlock("div",{key:4,class:t.normalizeClass(e.$style.playedGames)},t.toDisplayString(s.data.player_games),3)):t.createCommentVNode("",!0),B.elementSize.width>635?(t.openBlock(),t.createElementBlock("div",{key:5,class:t.normalizeClass(e.$style.playedMinutes)},t.toDisplayString(s.data.player_min),3)):t.createCommentVNode("",!0)],2),t.createElementVNode("div",{class:t.normalizeClass(m.block02Class)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.containesOptions)},[B.elementSize.width>960?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(e.$style.leagueName)},t.toDisplayString(s.data.total),3)):t.createCommentVNode("",!0),t.createElementVNode("div",{class:t.normalizeClass(m.containerBtnVideosClass)},[s.canPlayVideos||s.game.awayTeam.team_id==s.teamWidget&&s.typeData!=1?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[B.elementSize.width>635?(t.openBlock(),t.createBlock(y,{key:0,icon:s.iconVideos,"icon-size":s.iconSize,"icon-position":s.iconPosition,width:s.buttonWidth,height:s.buttonHeight,"border-radius":s.buttonRadius,"border-width":s.buttonBorderWidth,"background-color":s.buttonBackground,"font-family":s.buttonfontFamily,"border-color":s.buttonBorderColor,"text-value":s.buttonTextValue,"font-size":s.buttonFontSize,onClick:o[0]||(o[0]=a=>m.emitEventMedia(s.data))},null,8,["icon","icon-size","icon-position","width","height","border-radius","border-width","background-color","font-family","border-color","text-value","font-size"])):(t.openBlock(),t.createBlock(y,{key:1,mini:!0,icon:s.iconVideos,"icon-size":s.iconSizeMini,"icon-position":s.iconPosition,width:s.buttonWidthMini,height:s.buttonHeightMini,"border-radius":s.buttonRadius,"border-width":s.buttonBorderWidth,"background-color":s.buttonBackground,"font-family":s.buttonfontFamily,"border-color":s.buttonBorderColor,"font-size":s.buttonFontSize,onClick:o[1]||(o[1]=a=>m.emitEventMedia(s.data))},null,8,["icon","icon-size","icon-position","width","height","border-radius","border-width","background-color","font-family","border-color","font-size"]))],64)):t.createCommentVNode("",!0),B.elementSize.width<=635?(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(m.numberOfVideosClass)},t.toDisplayString(s.data.total),3)):t.createCommentVNode("",!0)],2)],2),(t.openBlock(),t.createElementBlock("svg",{class:t.normalizeClass([e.$style.arrowExpandIcon,s.isExpanded?e.$style.rotate:""]),width:"12",height:"8",viewBox:"0 0 12 8",fill:s.colorArrow,xmlns:"http://www.w3.org/2000/svg",onClick:o[2]||(o[2]=a=>m.clickExpand(s.data.id))},[t.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M6 4.93631L10.2929 1.23496C10.6834 0.898244 11.3166 0.898244 11.7071 1.23496C12.0976 1.57167 12.0976 2.11759 11.7071 2.4543L6.70711 6.76532C6.31658 7.10203 5.68342 7.10203 5.29289 6.76532L0.292893 2.4543C-0.0976311 2.11759 -0.0976311 1.57167 0.292893 1.23496C0.683418 0.898244 1.31658 0.898244 1.70711 1.23496L6 4.93631Z",fill:s.colorArrow},null,8,aut)],10,tut))],2)],2)],2)):t.createCommentVNode("",!0),s.type==1?(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(m.rowTeamClass),style:t.normalizeStyle(B.elementSize.width>540?"border-bottom: 1px solid rgba(255, 255, 255, 0.1)":""),id:"container-row-player"},[t.createElementVNode("div",{class:t.normalizeClass(m.containerLeftType1Class),id:"container-left"},[t.createElementVNode("div",{class:t.normalizeClass(m.positionContainertype1Class)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.numberPositionType1)},t.toDisplayString(s.data.position),3),t.createElementVNode("div",{class:t.normalizeClass(m.iconFavoritesType1Class)},[t.createElementVNode("img",{class:t.normalizeClass(e.$style.shapeIconType1),alt:"",src:s.data.team_logo},null,10,rut)],2)],2),t.createElementVNode("div",{class:t.normalizeClass(m.playerContainerType1Class)},[t.createElementVNode("div",{class:t.normalizeClass(s.typeView==0?e.$style.tijuanaWrapperType1:e.$style.tijuanaWrapperType1NoBg)},[t.createElementVNode("img",{class:t.normalizeClass(e.$style.tijuanaIconType1),alt:"",src:s.data.team_logo},null,10,nut)],2),t.createElementVNode("div",{class:t.normalizeClass(m.manchesterUnitedType1Class)},t.toDisplayString(s.data.team_abrev),3)],2)],2),t.createElementVNode("div",{class:t.normalizeClass(m.containerRightType1Class),id:"container-right"},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.block01TitlesType1)},[B.elementSize.width>540?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(m.teamNameWrapperType1Class)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.teamNameType1)},[t.createTextVNode(" C/"+t.toDisplayString(s.data.frequency)+" ",1),s.data.category!=2?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createTextVNode("min")],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createTextVNode("segs")],64))],2)],2)):t.createCommentVNode("",!0),B.elementSize.width>960?(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(m.ageWrapperType1Class)},[t.createElementVNode("div",{class:t.normalizeClass(m.ageType1Class)},t.toDisplayString(s.data.promthistournament),3)],2)):t.createCommentVNode("",!0),B.elementSize.width>1086?(t.openBlock(),t.createElementBlock("div",{key:2,class:t.normalizeClass(m.playedGamesWrapperType1Class)},[t.createElementVNode("div",{class:t.normalizeClass(m.playedGamesType1Class)},t.toDisplayString(s.data.promlasttournament),3)],2)):t.createCommentVNode("",!0),B.elementSize.width>770?(t.openBlock(),t.createElementBlock("div",{key:3,class:t.normalizeClass(m.playedMinutesWrapperType1Class)},[t.createElementVNode("div",{class:t.normalizeClass(m.playedMinutesType1Class)},t.toDisplayString(s.data.team_games),3)],2)):t.createCommentVNode("",!0)],2),t.createElementVNode("div",{class:t.normalizeClass(m.block02Type1Class)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.containesOptionsType1Games)},[t.createElementVNode("div",{class:t.normalizeClass(m.leagueNameWrapperType1Class)},[t.createElementVNode("div",{class:t.normalizeClass(m.leagueNameType1Class)},t.toDisplayString(s.data.total),3)],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.containerBtnVideosType1Games)},[B.elementSize.width>679&&s.canPlayVideos?(t.openBlock(),t.createBlock(y,{key:0,icon:s.iconVideos,"icon-size":s.iconSize,"icon-position":s.iconPosition,width:s.buttonWidth,height:s.buttonHeight,"border-radius":s.buttonRadius,"border-width":s.buttonBorderWidth,"background-color":s.buttonBackground,"font-family":s.buttonfontFamily,"border-color":s.buttonBorderColor,"text-value":s.buttonTextValue,"font-size":s.buttonFontSize,onClick:o[3]||(o[3]=a=>m.emitEventMedia(s.data))},null,8,["icon","icon-size","icon-position","width","height","border-radius","border-width","background-color","font-family","border-color","text-value","font-size"])):(t.openBlock(),t.createBlock(y,{key:1,mini:!0,icon:s.iconVideos,"icon-size":s.iconSizeMini,"icon-position":s.iconPosition,width:s.buttonWidthMini,height:s.buttonHeightMini,"border-radius":s.buttonRadius,"border-width":s.buttonBorderWidth,"background-color":s.buttonBackground,"font-family":s.buttonfontFamily,"border-color":s.buttonBorderColor,"font-size":s.buttonFontSize,onClick:o[4]||(o[4]=a=>m.emitEventMedia(s.data))},null,8,["icon","icon-size","icon-position","width","height","border-radius","border-width","background-color","font-family","border-color","font-size"])),t.createElementVNode("div",{class:t.normalizeClass(m.numberOfVideosType1Class)},t.toDisplayString(s.data.total),3)],2)],2),(t.openBlock(),t.createElementBlock("svg",{class:t.normalizeClass([e.$style.arrowExpandIcon,s.isExpanded?e.$style.rotate:""]),width:"12",height:"8",viewBox:"0 0 12 8",fill:s.colorArrow,xmlns:"http://www.w3.org/2000/svg",onClick:o[5]||(o[5]=a=>m.clickExpand(s.data.id))},[t.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M6 4.93631L10.2929 1.23496C10.6834 0.898244 11.3166 0.898244 11.7071 1.23496C12.0976 1.57167 12.0976 2.11759 11.7071 2.4543L6.70711 6.76532C6.31658 7.10203 5.68342 7.10203 5.29289 6.76532L0.292893 2.4543C-0.0976311 2.11759 -0.0976311 1.57167 0.292893 1.23496C0.683418 0.898244 1.31658 0.898244 1.70711 1.23496L6 4.93631Z",fill:s.colorArrow},null,8,out)],10,iut))],2)],2)],6)):t.createCommentVNode("",!0),s.type==2?(t.openBlock(),t.createElementBlock("div",{key:2,class:t.normalizeClass(m.rowwPlayerClass),id:"container-row-player"},[t.createElementVNode("div",{class:t.normalizeClass(m.containerLeftClass),id:"container-left"},[t.createElementVNode("div",{class:t.normalizeClass(m.positionContainerClass)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.numberPosition)},t.toDisplayString(s.data.position),3)],2),t.createElementVNode("div",{class:t.normalizeClass(m.playerContainerClass)},[t.createElementVNode("img",{class:t.normalizeClass(m.imgPlayerIconClass),src:s.data.player_photo},null,10,sut),t.createElementVNode("div",{class:t.normalizeClass(m.manchesterUnitedClass)},t.toDisplayString(s.data.player_name),3),B.elementSize.width<=420?(t.openBlock(),t.createElementBlock("img",{key:0,class:t.normalizeClass(e.$style.chivasIcon),alt:"",src:s.data.team_logo},null,10,lut)):t.createCommentVNode("",!0)],2)],2),t.createElementVNode("div",{class:t.normalizeClass(m.containerRightClass),id:"container-right"},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.block01)},[B.elementSize.width>420?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(e.$style.nameTeamGames)},[t.createElementVNode("img",{class:t.normalizeClass(e.$style.imgTeamIcon),alt:"",src:s.data.team_logo},null,10,cut),B.elementSize.width>540?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(e.$style.teamName)},t.toDisplayString(s.data.team_abrev),3)):t.createCommentVNode("",!0)],2)):t.createCommentVNode("",!0),B.elementSize.width>730?(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(e.$style.position)},[t.createElementVNode("span",{class:t.normalizeClass(e.$style.dfC)},t.toDisplayString(s.data.player_position),3)],2)):t.createCommentVNode("",!0),B.elementSize.width>960?(t.openBlock(),t.createElementBlock("div",{key:2,class:t.normalizeClass(e.$style.age)},t.toDisplayString(s.data.player_age),3)):t.createCommentVNode("",!0),B.elementSize.width>960?(t.openBlock(),t.createElementBlock("div",{key:3,class:t.normalizeClass(e.$style.country)},[t.createElementVNode("img",{class:t.normalizeClass(e.$style.manchesterUnitedIcon),alt:"",src:s.data.player_country_flag},null,10,uut)],2)):t.createCommentVNode("",!0),B.elementSize.width>540?(t.openBlock(),t.createElementBlock("div",{key:4,class:t.normalizeClass(e.$style.playedGames)},t.toDisplayString(s.data.player_games),3)):t.createCommentVNode("",!0),B.elementSize.width>635?(t.openBlock(),t.createElementBlock("div",{key:5,class:t.normalizeClass(e.$style.playedMinutes)},t.toDisplayString(s.data.player_min),3)):t.createCommentVNode("",!0),B.elementSize.width>635?(t.openBlock(),t.createElementBlock("div",{key:6,class:t.normalizeClass(e.$style.playedMinutes)},t.toDisplayString(s.data.league_name),3)):t.createCommentVNode("",!0)],2),t.createElementVNode("div",{class:t.normalizeClass(m.block02Class)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.containesOptions)},[t.createElementVNode("div",{class:t.normalizeClass(m.containerBtnVideosClass)},[s.canPlayVideos?(t.openBlock(),t.createBlock(y,{key:0,icon:s.iconVideos,"icon-size":s.iconSize,"icon-position":s.iconPosition,width:B.elementSize.width<=680?"83px":s.buttonWidth,height:s.buttonHeight,"border-radius":s.buttonRadius,"border-width":s.buttonBorderWidth,"background-color":s.buttonBackground,"font-family":s.buttonfontFamily,"border-color":s.buttonBorderColor,"text-value":s.buttonTextValue,"font-size":s.buttonFontSize,onClick:o[6]||(o[6]=a=>m.emitEventMedia(s.data)),style:t.normalizeStyle(B.elementSize.width<=680?B.elementSize.width<=420?"margin-right: 35px;":"margin-right: 0px;":"")},null,8,["icon","icon-size","icon-position","width","height","border-radius","border-width","background-color","font-family","border-color","text-value","font-size","style"])):t.createCommentVNode("",!0)],2)],2),(t.openBlock(),t.createElementBlock("svg",{class:t.normalizeClass([e.$style.arrowExpandIcon,s.isExpanded?e.$style.rotate:""]),width:"12",height:"8",viewBox:"0 0 12 8",fill:s.colorArrow,xmlns:"http://www.w3.org/2000/svg",onClick:o[7]||(o[7]=a=>m.clickExpand(s.data.id))},[t.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M6 4.93631L10.2929 1.23496C10.6834 0.898244 11.3166 0.898244 11.7071 1.23496C12.0976 1.57167 12.0976 2.11759 11.7071 2.4543L6.70711 6.76532C6.31658 7.10203 5.68342 7.10203 5.29289 6.76532L0.292893 2.4543C-0.0976311 2.11759 -0.0976311 1.57167 0.292893 1.23496C0.683418 0.898244 1.31658 0.898244 1.70711 1.23496L6 4.93631Z",fill:s.colorArrow},null,8,hut)],10,dut))],2)],2)],2)):t.createCommentVNode("",!0)],512)}const iV=Ki(RS,[["render",put],["__cssModules",{$style:Yct}]]),fut=(e,o)=>{const s=e.__vccOpts||e;for(const[B,U]of o)s[B]=U;return s},VS={props:{type:{type:Number,default:0},value:{type:Boolean,default:!1},textValue:String,icon:String,iconPosition:{type:String,default:"left"},iconSize:String,fontColor:{type:String,default:"#FFFFFF"},textDecoration:String,fontSize:{type:String,default:"16px"},fontSizeStat:{type:String,default:"16px"},fontStyle:String,fontFamily:{type:String,default:"Poppins-Regular"},height:{type:String,default:"fit-content"},width:{type:String,default:"fit-content"},borderRadius:{type:String,default:"0px"},borderType:{type:String,default:"solid"},borderWidth:{type:Number,default:0},borderWidthBtn:{type:String,default:"2px"},borderColor:String,backgroundColor:{type:String,default:"none"},activeBackgroundColor:{type:String,default:"#000000"},activeBorderWidth:{type:Number,default:2},activeBorderType:{type:String,default:"solid"},activeBorderColor:{type:String,default:"#cbee6b"},activeColorText:{type:String,default:"#FFFFFF"},cursorType:{type:String,default:"default"},typeOnOff:{type:Boolean,default:!1},textCategory:String,textStat:String,marginLeftStat:{type:String,default:"15%"}},watch:{value:{deep:!0,immediate:!0,handler(e){this.status=e}}},data(){return{status:!1}},computed:{customStyle(){return{height:this.height,width:this.width,backgroundColor:this.backgroundColor,borderRadius:this.borderRadius,border:`${this.borderType} ${this.borderWidth}px ${this.borderColor}`,color:this.fontColor,textDecoration:this.textDecoration,cursor:this.cursorType,fontSize:this.fontSize,fontStyle:this.fontStyle,fontFamily:`${this.fontFamily} !important`}},customActive(){return{backgroundColor:this.activeBackgroundColor,color:this.activeColorText,border:`${this.activeBorderType} ${this.activeBorderWidth}px ${this.activeBorderColor}`}}},methods:{btnClick(e){this.$emit("click",e),this.typeOnOff&&(this.status=!this.status,this.$emit("status",this.status))}}},oV=()=>{t.useCssVars(e=>({"9d01acb4":e.height,"14e95081":e.borderWidthBtn,"38fec285":e.borderType,34353510:e.borderColor,"20d20dc6":e.borderRadius,17130967:e.width,"4ccb7d36":e.backgroundColor,"5d1e86a2":e.cursorType,ce65d4a2:e.fontSize,fe4ac47a:e.fontStyle,f98e44dc:e.fontFamily,"93b87770":e.marginLeftStat,c7f7beba:e.fontSizeStat}))},sV=VS.setup;VS.setup=sV?(e,o)=>(oV(),sV(e,o)):oV;const mut=e=>(t.pushScopeId("data-v-f3ee6b2b"),e=e(),t.popScopeId(),e),gut=["src"],yut={key:1,class:"text"},vut=["src"],but={class:"stats"},_ut=mut(()=>t.createElementVNode("img",{class:"iconstats",src:"https://golstatsimages.blob.core.windows.net/todoelfut/playdes.png"},null,-1)),xut={class:"numstats"},wut={class:"leyend"};function kut(e,o,s,B,U,m){return t.openBlock(),t.createElementBlock("div",null,[s.type==0?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(["button",U.status&&s.typeOnOff&&"button-active"]),style:t.normalizeStyle([m.customStyle,U.status&&s.typeOnOff&&m.customActive]),onClick:o[0]||(o[0]=(...y)=>m.btnClick&&m.btnClick(...y))},[s.icon&&s.iconPosition.toLowerCase()==="left"?(t.openBlock(),t.createElementBlock("img",{key:0,class:"icon",style:t.normalizeStyle({width:s.iconSize}),src:s.icon},null,12,gut)):t.createCommentVNode("",!0),s.textValue?(t.openBlock(),t.createElementBlock("div",yut,t.toDisplayString(s.textValue),1)):t.createCommentVNode("",!0),s.icon&&s.iconPosition.toLowerCase()==="right"?(t.openBlock(),t.createElementBlock("img",{key:2,class:"icon",style:t.normalizeStyle({width:s.iconSize}),src:s.icon},null,12,vut)):t.createCommentVNode("",!0)],6)):t.createCommentVNode("",!0),s.type==1?(t.openBlock(),t.createElementBlock("div",{key:1,class:"button-target",onClick:o[1]||(o[1]=(...y)=>m.btnClick&&m.btnClick(...y))},[t.createElementVNode("div",but,[_ut,t.createElementVNode("div",xut,t.toDisplayString(s.textStat),1)]),t.createElementVNode("div",wut,t.toDisplayString(s.textCategory),1)])):t.createCommentVNode("",!0)])}const Sut=fut(VS,[["render",kut],["__scopeId","data-v-f3ee6b2b"]]),Cut=(e,o)=>{const s=e.__vccOpts||e;for(const[B,U]of o)s[B]=U;return s},jS={components:{GSCButton:Sut},props:{hiddenButtonAll:{type:Boolean,default:!1},teamId:{type:Number,default:0},height:{type:String,default:"71px"},backgroundColor:{type:String,default:"#0d1d29"},containBorderType:{type:String,default:"solid"},containBorderWidth:{type:Number,default:0},containBorderColor:{type:String,default:""},componentontainBorderRadius:{type:String,default:"0px"},teamBorderType:{type:String,default:"solid"},teamBorderWidth:{type:Number,default:1},teamBorderColor:{type:String,default:"#566068"},teamBorderRadius:{type:String,default:"43px"},teamHeight:{type:String,default:"43px"},teamWidth:{type:String,default:"43px"},data:{type:Array,default:()=>[]}},data(){return{teamselect:this.teamId,scrollBar:!1}},watch:{teamId:{handler:function(e){this.teamselect=e},immediate:!0}},computed:{centerTextCustom(){return this.hiddenButtonAll&&!this.scrollBar?"center":"left"},marginCustom(){return this.hiddenButtonAll?"0px":"12px"},customStyleContain(){return{height:this.height,backgroundColor:this.backgroundColor,borderRadius:this.containBorderRadius,border:`${this.containBorderType} ${this.containBorderWidth}px ${this.containBorderColor}`}},customStyleTeam(){return{height:this.teamHeight,width:this.teamWidth,backgroundColor:this.backgroundColor,borderRadius:this.borderRadius,border:`${this.teamBorderType} ${this.teamBorderWidth}px ${this.teamBorderColor}`}}},methods:{checkIfElementHasScroll(){const e=this.$refs.container.querySelector("#panelteams");e.scrollWidth>e.clientWidth?this.scrollBar=!0:this.scrollBar=!1},btnTeamClick(e){this.$emit("clickTeam",e),this.teamselect=e},click(){this.$emit("clickAll",0),this.teamselect=0}},mounted(){this.checkIfElementHasScroll(),window.addEventListener("resize",this.checkIfElementHasScroll)},beforeUnmount(){window.removeEventListener("resize",this.checkIfElementHasScroll)}},lV=()=>{t.useCssVars(e=>({dd2e645c:e.centerTextCustom,"57c1e244":e.marginCustom}))},cV=jS.setup;jS.setup=cV?(e,o)=>(lV(),cV(e,o)):lV;const Tut={id:"panelteams",class:"gsc-filterperteam__panel-teams",ref:"panel"},Aut={class:"gsc-filterperteam__panel-teams__cont-teams"},Eut=["onClick"],Mut=["src","alt","title"];function Iut(e,o,s,B,U,m){const y=t.resolveComponent("GSCButton");return t.openBlock(),t.createElementBlock("div",{class:"gsc-filterperteam",ref:"container",style:t.normalizeStyle(m.customStyleContain)},[t.createElementVNode("div",Tut,[t.createElementVNode("div",Aut,[s.hiddenButtonAll?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",{key:0,style:t.normalizeStyle(m.customStyleTeam),class:t.normalizeClass(["gsc-filterperteam__panel-teams__cont-teams__button-all",this.teamselect!==0?"--disabled":""])},[t.createVNode(y,{"text-value":"Todos",width:"76px",height:"28px","font-family":"Poppins-Light","font-size":"13px","border-color":"#cbee6b","border-type":"solid","border-width":"1","background-color":"#2A3641","border-radius":"64px",onClick:m.click},null,8,["onClick"])],6)),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(s.data,(a,v)=>(t.openBlock(),t.createElementBlock("div",{key:v,style:t.normalizeStyle(m.customStyleTeam),class:t.normalizeClass([a.id==U.teamselect?"colorselect":"","gsc-filterperteam__panel-teams__cont-teams__btn-team hover-team"]),onClick:p=>m.btnTeamClick(a.id)},[t.createElementVNode("img",{src:a.logo,alt:a.name,title:a.name},null,8,Mut)],14,Eut))),128))])],512)],4)}const Put=Cut(jS,[["render",Iut],["__scopeId","data-v-b39cba3b"]]),Lut={tablePositionGames:"_tablePositionGames_16xzc_46",tablePositionWrapperGames:"_tablePositionWrapperGames_16xzc_62",imgHenrryIcon:"_imgHenrryIcon_16xzc_71",americaIcon:"_americaIcon_16xzc_79",playerPhotoGames:"_playerPhotoGames_16xzc_91",toniKroosGames:"_toniKroosGames_16xzc_100",shapeIcon:"_shapeIcon_16xzc_111",menuiconsTeams:"_menuiconsTeams_16xzc_117",component31:"_component31_16xzc_126",playerNameGames:"_playerNameGames_16xzc_137",icnPlayIcon:"_icnPlayIcon_16xzc_145",goles:"_goles_16xzc_153",americaIcon1:"_americaIcon1_16xzc_160",teamsAmerica:"_teamsAmerica_16xzc_174",containerData:"_containerData_16xzc_180",shapeIcon1:"_shapeIcon1_16xzc_188",icnExpand1:"_icnExpand1_16xzc_194",icnExpand:"_icnExpand_16xzc_194",playerDataGames:"_playerDataGames_16xzc_214",playerInfoGames:"_playerInfoGames_16xzc_225",headerTopGame:"_headerTopGame_16xzc_240",playerRow:"_playerRow_16xzc_254",groupsLeague:"_groupsLeague_16xzc_265",text:"_text_16xzc_274",btnViewFullList:"_btnViewFullList_16xzc_282",headerTopsGames:"_headerTopsGames_16xzc_299",btnVideosOptions:"_btnVideosOptions_16xzc_371",position:"_position_16xzc_548",positionWrapper:"_positionWrapper_16xzc_560",imgNecaxaIcon:"_imgNecaxaIcon_16xzc_568",teamLogo:"_teamLogo_16xzc_574",teamPhoto:"_teamPhoto_16xzc_582",name:"_name_16xzc_590",icnPlayIconType1:"_icnPlayIconType1_16xzc_598",verVideosType1:"_verVideosType1_16xzc_605",btnVideosOptionsType1:"_btnVideosOptionsType1_16xzc_611",btnVideosOptions1Games:"_btnVideosOptions1Games_16xzc_623",leftContainer:"_leftContainer_16xzc_635",shapeIconType1:"_shapeIconType1_16xzc_644",icnExpandType1:"_icnExpandType1_16xzc_649",arrowExpand:"_arrowExpand_16xzc_659",containerInfoGames:"_containerInfoGames_16xzc_667",headerTopTeam:"_headerTopTeam_16xzc_679",containerHeader:"_containerHeader_16xzc_693",goles1:"_goles1_16xzc_702",golesType1:"_golesType1_16xzc_705",golesWrapper:"_golesWrapper_16xzc_710",btnViewAll:"_btnViewAll_16xzc_719",headerTopsTeams:"_headerTopsTeams_16xzc_736",arrowExpandIcon:"_arrowExpandIcon_16xzc_853",rotate:"_rotate_16xzc_858"},US={components:{GSCButton:aV},props:{typeData:{type:Number,default:1},teamWidget:{type:Number,default:0},game:{type:Object,default:()=>{}},type:{type:Number,default:0},isExpanded:{type:Boolean,default:!1},canPlayVideos:{type:Boolean,default:!1},categoryName:{type:String,default:""},categoryId:{type:String,default:""},data:{type:Object,default:()=>{}},backgroundColor:{type:String,default:"#0d1d29"},backgroundColorHeader:{type:String,default:"#183143"},fontColorName:{type:String,default:"#F4F4F4"},fontSizeName:{type:String,default:"14px"},fontFamilyName:{type:String,default:"Poppins-Regular"},fontColorTopNum:{type:String,default:"#FFFFFF"},fontSizeTopNum:{type:String,default:"96px"},fontFamilyTopNum:{type:String,default:"Oswald-Bold"},fontColorCategory:{type:String,default:"#FFFFFF"},fontSizeCategory:{type:String,default:"12px"},fontFamilyCategory:{type:String,default:"Poppins-Regular"},opacityColorTopNum:{type:Number,default:.09},borderColorCategory:{type:String,default:"#cbee6b"},iconVideos:{type:String,default:"https://golstatsimages.blob.core.windows.net/images-library/arrow-btn.png"},iconSize:{type:String,default:"18px"},iconPosition:{type:String,default:"left"},colorArrow:{type:String,default:"#D9D9D9"},buttonWidth:{type:String,default:"fit-content"},buttonMaxWidth:{type:String,default:"180px"},buttonHeight:{type:String,default:"24px"},buttonRadius:{type:String,default:"30px"},buttonBorderWidth:{type:Number,default:1},buttonBackground:{type:String,default:"#ffffff1a"},buttonfontFamily:{type:String,default:"Poppins-Regular"},buttonBorderColor:{type:String,default:"#cbee6b"},buttonFontSize:{type:String,default:"12px"}},data:()=>({expand:!1}),methods:{viewProfile(e){this.$emit("play",e)},clickMore(e){this.$emit("more",e)},clickExpand(e){this.$emit("expand",{expand:!this.isExpanded,id:e})},clickFav(e){this.$emit("fav",e)},clickEventMedia(e){this.$emit("mediadata",e)}}},uV=()=>{t.useCssVars(e=>({"55f05f36":e.fontSizeTopNum,"19a29b59":e.fontFamilyTopNum,"6900d460":e.fontColorTopNum,c8fa9844:e.opacityColorTopNum,d4b5f3ac:e.fontColorName,"02add9f3":e.fontFamilyName,"5f361de0":e.fontSizeName,"53c60bed":e.backgroundColorHeader,"78ef2866":e.fontFamilyCategory,"4e492dfa":e.fontSizeCategory,"2777611d":e.fontColorCategory,"337e29a0":e.borderColorCategory}))},dV=US.setup;US.setup=dV?(e,o)=>(uV(),dV(e,o)):uV;const But=["src"],zut=["src"],Out=["src"],Dut=["src"],Nut=["fill"],Fut=["fill"],Rut=["src"],Vut=["fill"],jut=["fill"];function Uut(e,o,s,B,U,m){const y=t.resolveComponent("GSCButton");return t.openBlock(),t.createElementBlock("div",null,[s.type==0?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(e.$style.headerTopsGames)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.playerRow),id:"player-row"},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.headerTopGame)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.playerPhotoGames),id:"container-player-photp"},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.tablePositionWrapperGames)},[t.createElementVNode("b",{class:t.normalizeClass(e.$style.tablePositionGames)},t.toDisplayString(s.data.top),3)],2),t.createElementVNode("img",{class:t.normalizeClass(e.$style.imgHenrryIcon),alt:"",src:s.data.photo},null,10,But),t.createElementVNode("img",{class:t.normalizeClass(e.$style.americaIcon),alt:"",src:s.data.logo},null,10,zut)],2),t.createElementVNode("main",{class:t.normalizeClass(e.$style.playerInfoGames),id:"container-player-info"},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.playerNameGames)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.toniKroosGames)},t.toDisplayString(s.data.name),3)],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.playerDataGames)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.containerData)},[s.canPlayVideos||s.game.awayTeam.team_id==s.teamWidget&&s.typeData!=1?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createVNode(y,{"icon-size":s.iconSize,"icon-position":s.iconPosition,width:s.buttonWidth,"button-max-width":s.buttonMaxWidth,height:s.buttonHeight,"border-radius":s.buttonRadius,"border-width":s.buttonBorderWidth,"background-color":s.buttonBackground,"font-family":s.buttonfontFamily,"border-color":s.buttonBorderColor,"text-value":s.data.total+" "+s.categoryName.toLowerCase(),"font-size":s.buttonFontSize,onClick:o[0]||(o[0]=a=>m.clickEventMedia(s.data))},null,8,["icon-size","icon-position","width","button-max-width","height","border-radius","border-width","background-color","font-family","border-color","text-value","font-size"]),t.createElementVNode("div",{class:t.normalizeClass(e.$style.teamsAmerica)},[t.createElementVNode("img",{class:t.normalizeClass(e.$style.americaIcon1),alt:"",src:s.data.logo},null,10,Out)],2)],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createVNode(y,{icon:"","icon-size":s.iconSize,"icon-position":s.iconPosition,width:s.buttonWidth,"button-max-width":s.buttonMaxWidth,height:s.buttonHeight,"border-radius":s.buttonRadius,"border-width":s.buttonBorderWidth,"background-color":s.buttonBackground,"font-family":s.buttonfontFamily,"border-color":s.buttonBorderColor,"text-value":s.data.total+" "+s.categoryName.toLowerCase(),"font-size":s.buttonFontSize},null,8,["icon-size","icon-position","width","button-max-width","height","border-radius","border-width","background-color","font-family","border-color","text-value","font-size"]),t.createElementVNode("div",{class:t.normalizeClass(e.$style.teamsAmerica)},[t.createElementVNode("img",{class:t.normalizeClass(e.$style.americaIcon1),alt:"",src:s.data.logo},null,10,Dut)],2)],64))],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.icnExpand),onClick:o[1]||(o[1]=a=>m.clickExpand(s.data.player_id))},[(t.openBlock(),t.createElementBlock("svg",{class:t.normalizeClass([e.$style.arrowExpandIcon,s.isExpanded?e.$style.rotate:""]),width:"12",height:"8",viewBox:"0 0 12 8",fill:s.colorArrow,xmlns:"http://www.w3.org/2000/svg"},[t.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M6 4.93631L10.2929 1.23496C10.6834 0.898244 11.3166 0.898244 11.7071 1.23496C12.0976 1.57167 12.0976 2.11759 11.7071 2.4543L6.70711 6.76532C6.31658 7.10203 5.68342 7.10203 5.29289 6.76532L0.292893 2.4543C-0.0976311 2.11759 -0.0976311 1.57167 0.292893 1.23496C0.683418 0.898244 1.31658 0.898244 1.70711 1.23496L6 4.93631Z",fill:s.colorArrow},null,8,Fut)],10,Nut))],2)],2)],2)],2)],2)],2)):t.createCommentVNode("",!0),s.type==1?(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(e.$style.headerTopsTeams)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.containerHeader),id:"header-container"},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.headerTopTeam)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.teamPhoto),id:"container-team"},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.positionWrapper)},[t.createElementVNode("b",{class:t.normalizeClass(e.$style.position)},t.toDisplayString(s.data.top),3)],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.teamLogo)},[t.createElementVNode("img",{class:t.normalizeClass(e.$style.imgNecaxaIcon),alt:"",src:s.data.logo},null,10,Rut)],2)],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.containerInfoGames)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.leftContainer)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.name)},t.toDisplayString(s.data.name_team),3),t.createVNode(y,{"icon-size":s.iconSize,"icon-position":s.iconPosition,width:s.buttonWidth,"button-max-width":s.buttonMaxWidth,height:s.buttonHeight,"border-radius":s.buttonRadius,"border-width":s.buttonBorderWidth,"background-color":s.buttonBackground,"font-family":s.buttonfontFamily,"border-color":s.buttonBorderColor,"text-value":s.data.total+" "+s.categoryName.toLowerCase(),"font-size":s.buttonFontSize,onClick:o[2]||(o[2]=a=>m.clickEventMedia(s.data))},null,8,["icon-size","icon-position","width","button-max-width","height","border-radius","border-width","background-color","font-family","border-color","text-value","font-size"]),t.createElementVNode("div",{class:t.normalizeClass(e.$style.btnVideosOptions1Games)},[t.createVNode(y,{"icon-size":s.iconSize,"icon-position":s.iconPosition,width:s.buttonWidth,"button-max-width":s.buttonMaxWidth,height:s.buttonHeight,"border-radius":s.buttonRadius,"border-width":s.buttonBorderWidth,"background-color":s.buttonBackground,"font-family":s.buttonfontFamily,"border-color":s.buttonBorderColor,"text-value":s.data.total+" "+s.categoryName.toLowerCase(),"font-size":s.buttonFontSize,onClick:o[3]||(o[3]=a=>m.clickEventMedia(s.data))},null,8,["icon-size","icon-position","width","button-max-width","height","border-radius","border-width","background-color","font-family","border-color","text-value","font-size"]),t.createElementVNode("div",{class:t.normalizeClass(e.$style.verVideosType1)},t.toDisplayString(s.data.total),3)],2)],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.arrowExpand),onClick:o[4]||(o[4]=a=>m.clickExpand(s.data.player_id))},[(t.openBlock(),t.createElementBlock("svg",{class:t.normalizeClass([e.$style.arrowExpandIcon,s.isExpanded?e.$style.rotate:""]),width:"12",height:"8",viewBox:"0 0 12 8",fill:s.colorArrow,xmlns:"http://www.w3.org/2000/svg"},[t.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M6 4.93631L10.2929 1.23496C10.6834 0.898244 11.3166 0.898244 11.7071 1.23496C12.0976 1.57167 12.0976 2.11759 11.7071 2.4543L6.70711 6.76532C6.31658 7.10203 5.68342 7.10203 5.29289 6.76532L0.292893 2.4543C-0.0976311 2.11759 -0.0976311 1.57167 0.292893 1.23496C0.683418 0.898244 1.31658 0.898244 1.70711 1.23496L6 4.93631Z",fill:s.colorArrow},null,8,jut)],10,Vut))],2)],2)],2)],2)],2)):t.createCommentVNode("",!0)])}const Gut=Ki(US,[["render",Uut],["__cssModules",{$style:Lut}]]),Hut=(e,o)=>{const s=e.__vccOpts||e;for(const[B,U]of o)s[B]=U;return s},GS={props:{type:{type:Number,default:0},value:{type:Boolean,default:!1},textValue:String,icon:String,iconPosition:{type:String,default:"left"},iconSize:String,fontColor:{type:String,default:"#FFFFFF"},textDecoration:String,fontSize:{type:String,default:"16px"},fontSizeStat:{type:String,default:"16px"},fontStyle:String,fontFamily:{type:String,default:"Poppins-Regular"},height:{type:String,default:"fit-content"},width:{type:String,default:"fit-content"},borderRadius:{type:String,default:"0px"},borderType:{type:String,default:"solid"},borderWidth:{type:Number,default:0},borderWidthBtn:{type:String,default:"2px"},borderColor:String,backgroundColor:{type:String,default:"none"},activeBackgroundColor:{type:String,default:"#000000"},activeBorderWidth:{type:Number,default:2},activeBorderType:{type:String,default:"solid"},activeBorderColor:{type:String,default:"#cbee6b"},activeColorText:{type:String,default:"#FFFFFF"},cursorType:{type:String,default:"default"},typeOnOff:{type:Boolean,default:!1},textCategory:String,textStat:String,marginLeftStat:{type:String,default:"15%"}},watch:{value:{deep:!0,immediate:!0,handler(e){this.status=e}}},data(){return{status:!1}},computed:{customStyle(){return{height:this.height,width:this.width,backgroundColor:this.backgroundColor,borderRadius:this.borderRadius,border:`${this.borderType} ${this.borderWidth}px ${this.borderColor}`,color:this.fontColor,textDecoration:this.textDecoration,cursor:this.cursorType,fontSize:this.fontSize,fontStyle:this.fontStyle,fontFamily:`${this.fontFamily} !important`}},customActive(){return{backgroundColor:this.activeBackgroundColor,color:this.activeColorText,border:`${this.activeBorderType} ${this.activeBorderWidth}px ${this.activeBorderColor}`}}},methods:{btnClick(e){this.$emit("click",e),this.typeOnOff&&(this.status=!this.status,this.$emit("status",this.status))}}},hV=()=>{t.useCssVars(e=>({"9d01acb4":e.height,"14e95081":e.borderWidthBtn,"38fec285":e.borderType,34353510:e.borderColor,"20d20dc6":e.borderRadius,17130967:e.width,"4ccb7d36":e.backgroundColor,"5d1e86a2":e.cursorType,ce65d4a2:e.fontSize,fe4ac47a:e.fontStyle,f98e44dc:e.fontFamily,"93b87770":e.marginLeftStat,c7f7beba:e.fontSizeStat}))},pV=GS.setup;GS.setup=pV?(e,o)=>(hV(),pV(e,o)):hV;const Zut=e=>(t.pushScopeId("data-v-f3ee6b2b"),e=e(),t.popScopeId(),e),Wut=["src"],qut={key:1,class:"text"},Jut=["src"],Yut={class:"stats"},Xut=Zut(()=>t.createElementVNode("img",{class:"iconstats",src:"https://golstatsimages.blob.core.windows.net/todoelfut/playdes.png"},null,-1)),$ut={class:"numstats"},Kut={class:"leyend"};function Qut(e,o,s,B,U,m){return t.openBlock(),t.createElementBlock("div",null,[s.type==0?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(["button",U.status&&s.typeOnOff&&"button-active"]),style:t.normalizeStyle([m.customStyle,U.status&&s.typeOnOff&&m.customActive]),onClick:o[0]||(o[0]=(...y)=>m.btnClick&&m.btnClick(...y))},[s.icon&&s.iconPosition.toLowerCase()==="left"?(t.openBlock(),t.createElementBlock("img",{key:0,class:"icon",style:t.normalizeStyle({width:s.iconSize}),src:s.icon},null,12,Wut)):t.createCommentVNode("",!0),s.textValue?(t.openBlock(),t.createElementBlock("div",qut,t.toDisplayString(s.textValue),1)):t.createCommentVNode("",!0),s.icon&&s.iconPosition.toLowerCase()==="right"?(t.openBlock(),t.createElementBlock("img",{key:2,class:"icon",style:t.normalizeStyle({width:s.iconSize}),src:s.icon},null,12,Jut)):t.createCommentVNode("",!0)],6)):t.createCommentVNode("",!0),s.type==1?(t.openBlock(),t.createElementBlock("div",{key:1,class:"button-target",onClick:o[1]||(o[1]=(...y)=>m.btnClick&&m.btnClick(...y))},[t.createElementVNode("div",Yut,[Xut,t.createElementVNode("div",$ut,t.toDisplayString(s.textStat),1)]),t.createElementVNode("div",Kut,t.toDisplayString(s.textCategory),1)])):t.createCommentVNode("",!0)])}const edt=Hut(GS,[["render",Qut],["__scopeId","data-v-f3ee6b2b"]]),sQt="",lQt="",tdt={equipoGames:"_equipoGames_19uzf_38",atlasSeleccinGames:"_atlasSeleccinGames_19uzf_43",equipoAtlasSeleccinMexiGames:"_equipoAtlasSeleccinMexiGames_19uzf_47",aosGames:"_aosGames_19uzf_51",span12:"_span12_19uzf_55",nacionalidadMex:"_nacionalidadMex_19uzf_58",manchesterUnited:"_manchesterUnited_19uzf_61",manchesterUnited12:"_manchesterUnited12_19uzf_68",containerInfoGames:"_containerInfoGames_19uzf_78",verPerfil12:"_verPerfil12_19uzf_87",btnProfile:"_btnProfile_19uzf_96",containerButton:"_containerButton_19uzf_112",dataContainer:"_dataContainer_19uzf_119",expandedInfoPlayerGames:"_expandedInfoPlayerGames_19uzf_129",containerDataBg:"_containerDataBg_19uzf_219",containerDataSm:"_containerDataSm_19uzf_230",span:"_span_19uzf_55",manchesterUnited14:"_manchesterUnited14_19uzf_241",filter:"_filter_19uzf_246",verPerfil:"_verPerfil_19uzf_87",manchesterUnited8:"_manchesterUnited8_19uzf_267",manchesterUnitedParent1:"_manchesterUnitedParent1_19uzf_273",manchesterUnited1:"_manchesterUnited1_19uzf_68",manchesterUnitedParent:"_manchesterUnitedParent_19uzf_273",frameDiv:"_frameDiv_19uzf_295",infoExpanded:"_infoExpanded_19uzf_303",countryFlag:"_countryFlag_19uzf_456"},HS={components:{GSCButton:edt},props:{isLive:{type:Boolean,default:!1},background:{type:String,default:"#172531"},type:{type:Number,default:1},viewButton:{type:Boolean,default:!0},viewTeam:{type:Boolean,default:!0},viewAge:{type:Boolean,default:!0},viewNationality:{type:Boolean,default:!0},viewPosition:{type:Boolean,default:!0},viewGames:{type:Boolean,default:!0},viewMin:{type:Boolean,default:!0},viewGoals:{type:Boolean,default:!0},viewEffectiveness:{type:Boolean,default:!0},height:{type:String,default:"134px"},fontColor:{type:String,default:"#ffffffb3"},fontColorValue:{type:String,default:"#ffffff"},fontFamily:{type:String,default:"Poppins-Regular"},fontSize:{type:String,default:"10px"},additionalClass:{type:String,default:""},data:{type:Object,default:()=>{}}},setup(){const e=t.ref("myDivRef"),{elementSize:o}=jb(e);return{myDivRef:e,elementSize:o}},data(){return{}},computed:{},methods:{viewProfile(e){this.$emit("viewprofile",e)}}},fV=()=>{t.useCssVars(e=>({b76aa8fe:e.fontFamily,dce830b4:e.fontColor,"060add2a":e.fontColorValue,"3e87935e":e.fontSize,c43b37c8:e.background}))},mV=HS.setup;HS.setup=mV?(e,o)=>(fV(),mV(e,o)):fV;const adt={ref:"myDivRef"},rdt=["src"];function ndt(e,o,s,B,U,m){const y=t.resolveComponent("GSCButton");return t.openBlock(),t.createElementBlock("div",adt,[s.type==0?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(e.$style.expandedInfoPlayerGames)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.dataContainer),id:"data-container"},[t.createElementVNode("div",{class:t.normalizeClass([e.$style.containerInfoGames,s.additionalClass]),id:"container-info"},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnited)},[s.viewTeam?(t.openBlock(),t.createElementBlock("p",{key:0,class:t.normalizeClass(e.$style.equipoAtlasSeleccinMexiGames)},[t.createElementVNode("span",{class:t.normalizeClass(e.$style.equipoGames)},"Equipo: ",2),t.createElementVNode("span",{class:t.normalizeClass(e.$style.atlasSeleccinGames)},t.toDisplayString(s.data.teams),3)],2)):t.createCommentVNode("",!0),s.viewAge?(t.openBlock(),t.createElementBlock("p",{key:1,class:t.normalizeClass(e.$style.nacionalidadMex)},[t.createElementVNode("span",{class:t.normalizeClass(e.$style.equipoGames)},"Edad: ",2),t.createElementVNode("span",{class:t.normalizeClass(e.$style.aosGames)},t.toDisplayString(s.data.age)+" años",3),t.createElementVNode("span",{class:t.normalizeClass(e.$style.span12)}," ("+t.toDisplayString(s.data.dataofbirth)+")",3)],2)):t.createCommentVNode("",!0),s.viewNationality?(t.openBlock(),t.createElementBlock("p",{key:2,class:t.normalizeClass(e.$style.nacionalidadMex)},[t.createElementVNode("span",{class:t.normalizeClass(e.$style.span12)},"Nacionalidad: ",2),t.createElementVNode("span",{class:t.normalizeClass(e.$style.aosGames)},[t.createTextVNode(t.toDisplayString(s.data.nationality.substring(0,3).toUpperCase())+" ",1),t.createElementVNode("div",{class:t.normalizeClass(e.$style.countryFlag)},[t.createElementVNode("img",{src:s.data.countryFlag},null,8,rdt)],2)],2)],2)):t.createCommentVNode("",!0),s.viewPosition?(t.openBlock(),t.createElementBlock("p",{key:3,class:t.normalizeClass(e.$style.nacionalidadMex)},[t.createElementVNode("span",{class:t.normalizeClass(e.$style.span12)},"Posición: ",2),t.createElementVNode("span",{class:t.normalizeClass(e.$style.aosGames)},t.toDisplayString(s.data.position),3)],2)):t.createCommentVNode("",!0)],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnited12)},[s.viewGames&&!s.isLive?(t.openBlock(),t.createElementBlock("p",{key:0,class:t.normalizeClass(e.$style.nacionalidadMex)},[t.createElementVNode("span",{class:t.normalizeClass(e.$style.span12)},"partidos Jugados: ",2),t.createElementVNode("span",{class:t.normalizeClass(e.$style.aosGames)},t.toDisplayString(s.data.games),3)],2)):t.createCommentVNode("",!0),s.viewMin&&!s.isLive?(t.openBlock(),t.createElementBlock("p",{key:1,class:t.normalizeClass(e.$style.nacionalidadMex)},[t.createElementVNode("span",{class:t.normalizeClass(e.$style.span12)},"Minutos Jugados: ",2),t.createElementVNode("span",{class:t.normalizeClass(e.$style.aosGames)},t.toDisplayString(s.data.min),3)],2)):t.createCommentVNode("",!0),s.viewGoals?(t.openBlock(),t.createElementBlock("p",{key:2,class:t.normalizeClass(e.$style.nacionalidadMex)},[t.createElementVNode("span",{class:t.normalizeClass(e.$style.span12)},t.toDisplayString(s.data.category)+": ",3),t.createElementVNode("span",{class:t.normalizeClass(e.$style.aosGames)},t.toDisplayString(s.data.goals),3)],2)):t.createCommentVNode("",!0),s.viewEffectiveness?(t.openBlock(),t.createElementBlock("p",{key:3,class:t.normalizeClass(e.$style.nacionalidadMex)},[t.createElementVNode("span",{class:t.normalizeClass(e.$style.span12)},"Efectividad de pases: ",2),t.createElementVNode("span",{class:t.normalizeClass(e.$style.aosGames)},t.toDisplayString(s.data.effectiveness.toFixed(0))+"%",3)],2)):t.createCommentVNode("",!0)],2)],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.containerButton),id:"btn-container"},[s.viewButton?(t.openBlock(),t.createBlock(y,{key:0,style:t.normalizeStyle(s.additionalClass!=""&&B.elementSize.width>540?"margin-right: 50px":""),width:"88px",height:"30px","border-radius":"30px","border-width":1,"background-color":"#ffffff1a","font-family":"Poppins-Semibold","border-color":"#cbee6b","text-value":"Ver perfil","font-size":"10px",onClick:o[0]||(o[0]=a=>m.viewProfile(s.data.id))},null,8,["style"])):t.createCommentVNode("",!0)],2)],2)],2)):t.createCommentVNode("",!0),s.type==1?(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(e.$style.infoExpanded)},[t.createElementVNode("div",{class:t.normalizeClass([e.$style.containerDataBg,s.additionalClass])},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnitedParent)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnited1)},[o[2]||(o[2]=t.createElementVNode("span",null,"Posición en la tabla: ",-1)),t.createElementVNode("span",{class:t.normalizeClass(e.$style.spanGames)},t.toDisplayString(s.data.position),3)],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnited1)},[o[3]||(o[3]=t.createElementVNode("span",null,"Goles anotados: ",-1)),t.createElementVNode("span",{class:t.normalizeClass(e.$style.spanGames)},t.toDisplayString(s.data.goals),3)],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnited1)},[o[4]||(o[4]=t.createElementVNode("span",null,"Goles recibidos: ",-1)),t.createElementVNode("span",{class:t.normalizeClass(e.$style.spanGames)},t.toDisplayString(s.data.goals_received),3)],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnited1)},[o[5]||(o[5]=t.createElementVNode("span",null,"Partidos jugados:",-1)),t.createElementVNode("span",{class:t.normalizeClass(e.$style.spanGames)},t.toDisplayString(s.data.games_played),3)],2)],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnitedParent)},[s.viewEffectiveness?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(e.$style.manchesterUnited1)},[o[6]||(o[6]=t.createElementVNode("span",null,"Efectividad de pases: ",-1)),t.createElementVNode("span",{class:t.normalizeClass(e.$style.spanGames)},t.toDisplayString(s.data.effectiveness.toFixed(0))+"%",3)],2)):t.createCommentVNode("",!0),t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnited1)},[o[7]||(o[7]=t.createElementVNode("span",null,"xG: ",-1)),t.createElementVNode("span",{class:t.normalizeClass(e.$style.spanGames)},t.toDisplayString(s.data.xg),3)],2)],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnitedParent)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnited1)},[t.createElementVNode("span",null,t.toDisplayString(s.data.category)+": ",1),t.createElementVNode("span",{class:t.normalizeClass(e.$style.spanGames)},t.toDisplayString(s.data.total),3)],2),s.viewEffectiveness?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(e.$style.manchesterUnited8)},[o[8]||(o[8]=t.createElementVNode("span",null,"Efectividad de pases: ",-1)),t.createElementVNode("span",{class:t.normalizeClass(e.$style.spanGames)},t.toDisplayString(s.data.effectiveness)+"%",3)],2)):t.createCommentVNode("",!0),t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnited8)},[o[9]||(o[9]=t.createElementVNode("span",null,"xG: ",-1)),t.createElementVNode("span",{class:t.normalizeClass(e.$style.spanGames)},t.toDisplayString(s.data.xg),3)],2)],2)],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.containerDataSm)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.frameDiv)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnited1)},[o[10]||(o[10]=t.createElementVNode("span",null,"Posición en la tabla: ",-1)),t.createElementVNode("span",{class:t.normalizeClass(e.$style.spanGames)},t.toDisplayString(s.data.position),3)],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnited1)},[o[11]||(o[11]=t.createElementVNode("span",null,"Goles anotados: ",-1)),t.createElementVNode("span",{class:t.normalizeClass(e.$style.spanGames)},t.toDisplayString(s.data.goals),3)],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnited1)},[o[12]||(o[12]=t.createElementVNode("span",null,"Goles recibidos: ",-1)),t.createElementVNode("span",{class:t.normalizeClass(e.$style.spanGames)},t.toDisplayString(s.data.goals_received),3)],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnited1)},[o[13]||(o[13]=t.createElementVNode("span",null,"Partidos jugados: ",-1)),t.createElementVNode("span",{class:t.normalizeClass(e.$style.spanGames)},t.toDisplayString(s.data.games_played),3)],2)],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnitedParent1)},[s.viewEffectiveness?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(e.$style.manchesterUnited14)},[o[14]||(o[14]=t.createElementVNode("span",null,"Efectividad de pases: ",-1)),t.createElementVNode("span",{class:t.normalizeClass(e.$style.spanGames)},t.toDisplayString(s.data.effectiveness.toFixed(0))+"%",3)],2)):t.createCommentVNode("",!0),t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnited1)},[o[15]||(o[15]=t.createElementVNode("span",null,"xG: ",-1)),t.createElementVNode("span",{class:t.normalizeClass(e.$style.spanGames)},t.toDisplayString(s.data.xg),3)],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnited1)},[t.createElementVNode("span",null,t.toDisplayString(s.data.category)+": ",1),t.createElementVNode("span",{class:t.normalizeClass(e.$style.spanGames)},t.toDisplayString(s.data.total),3)],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnited8)},[t.createElementVNode("span",null,t.toDisplayString(s.data.category)+": ",1),t.createElementVNode("span",{class:t.normalizeClass(e.$style.spanGames)},t.toDisplayString(s.data.total),3)],2)],2)],2),s.viewButton?(t.openBlock(),t.createBlock(y,{key:0,style:t.normalizeStyle(s.additionalClass!=""&&B.elementSize.width>540?"margin-right: 42px":""),width:"88px",height:"30px","border-radius":"30px","border-width":1,"background-color":"#ffffff1a","font-family":"Poppins-Semibold","border-color":"#cbee6b","text-value":"Ver perfil","font-size":"10px",onClick:o[1]||(o[1]=a=>m.viewProfile(s.data.id))},null,8,["style"])):t.createCommentVNode("",!0)],2)):t.createCommentVNode("",!0)],512)}const gV=Ki(HS,[["render",ndt],["__cssModules",{$style:tdt}],["__scopeId","data-v-0bb9c2ff"]]);/**
4132
+ `),Et=fe.createShader(fe.FRAGMENT_SHADER);if(fe.isContextLost())return void(this.failedToCreate=!0);if(fe.shaderSource(Et,Tt),fe.compileShader(Et),!fe.getShaderParameter(Et,fe.COMPILE_STATUS))throw new Error(`Could not compile fragment shader: ${fe.getShaderInfoLog(Et)}`);fe.attachShader(this.program,Et);const Jt=fe.createShader(fe.VERTEX_SHADER);if(fe.isContextLost())return void(this.failedToCreate=!0);if(fe.shaderSource(Jt,jt),fe.compileShader(Jt),!fe.getShaderParameter(Jt,fe.COMPILE_STATUS))throw new Error(`Could not compile vertex shader: ${fe.getShaderInfoLog(Jt)}`);fe.attachShader(this.program,Jt),this.attributes={};const Kt={};this.numAttributes=Fe.length;for(let Yt=0;Yt<this.numAttributes;Yt++)Fe[Yt]&&(fe.bindAttribLocation(this.program,Yt,Fe[Yt]),this.attributes[Fe[Yt]]=Yt);if(fe.linkProgram(this.program),!fe.getProgramParameter(this.program,fe.LINK_STATUS))throw new Error(`Program failed to link: ${fe.getProgramInfoLog(this.program)}`);fe.deleteShader(Jt),fe.deleteShader(Et);for(let Yt=0;Yt<xt.length;Yt++){const da=xt[Yt];if(da&&!Kt[da]){const _a=fe.getUniformLocation(this.program,da);_a&&(Kt[da]=_a)}}this.fixedUniforms=V(u,Kt),this.terrainUniforms=((Yt,da)=>({u_depth:new r.aI(Yt,da.u_depth),u_terrain:new r.aI(Yt,da.u_terrain),u_terrain_dim:new r.aJ(Yt,da.u_terrain_dim),u_terrain_matrix:new r.aK(Yt,da.u_terrain_matrix),u_terrain_unpack:new r.aL(Yt,da.u_terrain_unpack),u_terrain_exaggeration:new r.aJ(Yt,da.u_terrain_exaggeration)}))(u,Kt),this.binderUniforms=D?D.getUniforms(u,Kt):[]}draw(u,f,D,V,J,oe,fe,xe,Ee,Fe,Ge,rt,ct,pt,xt,Mt,Tt,jt){const Et=u.gl;if(this.failedToCreate)return;if(u.program.set(this.program),u.setDepthMode(D),u.setStencilMode(V),u.setColorMode(J),u.setCullFace(oe),xe){u.activeTexture.set(Et.TEXTURE2),Et.bindTexture(Et.TEXTURE_2D,xe.depthTexture),u.activeTexture.set(Et.TEXTURE3),Et.bindTexture(Et.TEXTURE_2D,xe.texture);for(const Kt in this.terrainUniforms)this.terrainUniforms[Kt].set(xe[Kt])}for(const Kt in this.fixedUniforms)this.fixedUniforms[Kt].set(fe[Kt]);xt&&xt.setUniforms(u,this.binderUniforms,ct,{zoom:pt});let Jt=0;switch(f){case Et.LINES:Jt=2;break;case Et.TRIANGLES:Jt=3;break;case Et.LINE_STRIP:Jt=1}for(const Kt of rt.get()){const Yt=Kt.vaos||(Kt.vaos={});(Yt[Ee]||(Yt[Ee]=new Dr)).bind(u,this,Fe,xt?xt.getPaintVertexBuffers():[],Ge,Kt.vertexOffset,Mt,Tt,jt),Et.drawElements(f,Kt.primitiveLength*Jt,Et.UNSIGNED_SHORT,Kt.primitiveOffset*Jt*2)}}}function Va(R,u,f){const D=1/St(f,1,u.transform.tileZoom),V=Math.pow(2,f.tileID.overscaledZ),J=f.tileSize*Math.pow(2,u.transform.tileZoom)/V,oe=J*(f.tileID.canonical.x+f.tileID.wrap*V),fe=J*f.tileID.canonical.y;return{u_image:0,u_texsize:f.imageAtlasTexture.size,u_scale:[D,R.fromScale,R.toScale],u_fade:R.t,u_pixel_coord_upper:[oe>>16,fe>>16],u_pixel_coord_lower:[65535&oe,65535&fe]}}const ar=(R,u,f,D)=>{const V=u.style.light,J=V.properties.get("position"),oe=[J.x,J.y,J.z],fe=function(){var Ee=new r.A(9);return r.A!=Float32Array&&(Ee[1]=0,Ee[2]=0,Ee[3]=0,Ee[5]=0,Ee[6]=0,Ee[7]=0),Ee[0]=1,Ee[4]=1,Ee[8]=1,Ee}();V.properties.get("anchor")==="viewport"&&function(Ee,Fe){var Ge=Math.sin(Fe),rt=Math.cos(Fe);Ee[0]=rt,Ee[1]=Ge,Ee[2]=0,Ee[3]=-Ge,Ee[4]=rt,Ee[5]=0,Ee[6]=0,Ee[7]=0,Ee[8]=1}(fe,-u.transform.angle),function(Ee,Fe,Ge){var rt=Fe[0],ct=Fe[1],pt=Fe[2];Ee[0]=rt*Ge[0]+ct*Ge[3]+pt*Ge[6],Ee[1]=rt*Ge[1]+ct*Ge[4]+pt*Ge[7],Ee[2]=rt*Ge[2]+ct*Ge[5]+pt*Ge[8]}(oe,oe,fe);const xe=V.properties.get("color");return{u_matrix:R,u_lightpos:oe,u_lightintensity:V.properties.get("intensity"),u_lightcolor:[xe.r,xe.g,xe.b],u_vertical_gradient:+f,u_opacity:D}},vr=(R,u,f,D,V,J,oe)=>r.e(ar(R,u,f,D),Va(J,u,oe),{u_height_factor:-Math.pow(2,V.overscaledZ)/oe.tileSize/8}),mr=R=>({u_matrix:R}),Br=(R,u,f,D)=>r.e(mr(R),Va(f,u,D)),Ur=(R,u)=>({u_matrix:R,u_world:u}),ma=(R,u,f,D,V)=>r.e(Br(R,u,f,D),{u_world:V}),Ua=(R,u,f,D)=>{const V=R.transform;let J,oe;if(D.paint.get("circle-pitch-alignment")==="map"){const fe=St(f,1,V.zoom);J=!0,oe=[fe,fe]}else J=!1,oe=V.pixelsToGLUnits;return{u_camera_to_center_distance:V.cameraToCenterDistance,u_scale_with_map:+(D.paint.get("circle-pitch-scale")==="map"),u_matrix:R.translatePosMatrix(u.posMatrix,f,D.paint.get("circle-translate"),D.paint.get("circle-translate-anchor")),u_pitch_with_map:+J,u_device_pixel_ratio:R.pixelRatio,u_extrude_scale:oe}},ta=(R,u)=>({u_matrix:u,u_pixel_extrude_scale:[1/R.width,1/R.height]}),ca=(R,u,f)=>({u_matrix:R,u_inv_matrix:u,u_camera_to_center_distance:f.cameraToCenterDistance,u_viewport_size:[f.width,f.height]}),fa=(R,u,f=1)=>({u_matrix:R,u_color:u,u_overlay:0,u_overlay_scale:f}),Oa=R=>({u_matrix:R}),za=(R,u,f,D)=>({u_matrix:R,u_extrude_scale:St(u,1,f),u_intensity:D}),qa=(R,u,f,D)=>{const V=r.H();r.aQ(V,0,R.width,R.height,0,0,1);const J=R.context.gl;return{u_matrix:V,u_world:[J.drawingBufferWidth,J.drawingBufferHeight],u_image:f,u_color_ramp:D,u_opacity:u.paint.get("heatmap-opacity")}},Ra=(R,u,f,D)=>{const V=f.paint.get("hillshade-shadow-color"),J=f.paint.get("hillshade-highlight-color"),oe=f.paint.get("hillshade-accent-color");let fe=f.paint.get("hillshade-illumination-direction")*(Math.PI/180);f.paint.get("hillshade-illumination-anchor")==="viewport"&&(fe-=R.transform.angle);const xe=!R.options.moving;return{u_matrix:D?D.posMatrix:R.transform.calculatePosMatrix(u.tileID.toUnwrapped(),xe),u_image:0,u_latrange:la(0,u.tileID),u_light:[f.paint.get("hillshade-exaggeration"),fe],u_shadow:V,u_highlight:J,u_accent:oe}},Ia=(R,u)=>{const f=u.stride,D=r.H();return r.aQ(D,0,r.X,-r.X,0,0,1),r.J(D,D,[0,-r.X,0]),{u_matrix:D,u_image:1,u_dimension:[f,f],u_zoom:R.overscaledZ,u_unpack:u.getUnpackVector()}};function la(R,u){const f=Math.pow(2,u.canonical.z),D=u.canonical.y;return[new r.Z(0,D/f).toLngLat().lat,new r.Z(0,(D+1)/f).toLngLat().lat]}const oa=(R,u,f,D)=>{const V=R.transform;return{u_matrix:cr(R,u,f,D),u_ratio:1/St(u,1,V.zoom),u_device_pixel_ratio:R.pixelRatio,u_units_to_pixels:[1/V.pixelsToGLUnits[0],1/V.pixelsToGLUnits[1]]}},Sa=(R,u,f,D,V)=>r.e(oa(R,u,f,V),{u_image:0,u_image_height:D}),Ja=(R,u,f,D,V)=>{const J=R.transform,oe=sr(u,J);return{u_matrix:cr(R,u,f,V),u_texsize:u.imageAtlasTexture.size,u_ratio:1/St(u,1,J.zoom),u_device_pixel_ratio:R.pixelRatio,u_image:0,u_scale:[oe,D.fromScale,D.toScale],u_fade:D.t,u_units_to_pixels:[1/J.pixelsToGLUnits[0],1/J.pixelsToGLUnits[1]]}},lr=(R,u,f,D,V,J)=>{const oe=R.transform,fe=R.lineAtlas,xe=sr(u,oe),Ee=f.layout.get("line-cap")==="round",Fe=fe.getDash(D.from,Ee),Ge=fe.getDash(D.to,Ee),rt=Fe.width*V.fromScale,ct=Ge.width*V.toScale;return r.e(oa(R,u,f,J),{u_patternscale_a:[xe/rt,-Fe.height/2],u_patternscale_b:[xe/ct,-Ge.height/2],u_sdfgamma:fe.width/(256*Math.min(rt,ct)*R.pixelRatio)/2,u_image:0,u_tex_y_a:Fe.y,u_tex_y_b:Ge.y,u_mix:V.t})};function sr(R,u){return 1/St(R,1,u.tileZoom)}function cr(R,u,f,D){return R.translatePosMatrix(D?D.posMatrix:u.tileID.posMatrix,u,f.paint.get("line-translate"),f.paint.get("line-translate-anchor"))}const Ar=(R,u,f,D,V)=>{return{u_matrix:R,u_tl_parent:u,u_scale_parent:f,u_buffer_scale:1,u_fade_t:D.mix,u_opacity:D.opacity*V.paint.get("raster-opacity"),u_image0:0,u_image1:1,u_brightness_low:V.paint.get("raster-brightness-min"),u_brightness_high:V.paint.get("raster-brightness-max"),u_saturation_factor:(oe=V.paint.get("raster-saturation"),oe>0?1-1/(1.001-oe):-oe),u_contrast_factor:(J=V.paint.get("raster-contrast"),J>0?1/(1-J):1+J),u_spin_weights:wr(V.paint.get("raster-hue-rotate"))};var J,oe};function wr(R){R*=Math.PI/180;const u=Math.sin(R),f=Math.cos(R);return[(2*f+1)/3,(-Math.sqrt(3)*u-f+1)/3,(Math.sqrt(3)*u-f+1)/3]}const Pr=(R,u,f,D,V,J,oe,fe,xe,Ee,Fe,Ge,rt,ct)=>{const pt=oe.transform;return{u_is_size_zoom_constant:+(R==="constant"||R==="source"),u_is_size_feature_constant:+(R==="constant"||R==="camera"),u_size_t:u?u.uSizeT:0,u_size:u?u.uSize:0,u_camera_to_center_distance:pt.cameraToCenterDistance,u_pitch:pt.pitch/360*2*Math.PI,u_rotate_symbol:+f,u_aspect_ratio:pt.width/pt.height,u_fade_change:oe.options.fadeDuration?oe.symbolFadeChange:1,u_matrix:fe,u_label_plane_matrix:xe,u_coord_matrix:Ee,u_is_text:+Ge,u_pitch_with_map:+D,u_is_along_line:V,u_is_variable_anchor:J,u_texsize:rt,u_texture:0,u_translation:Fe,u_pitched_scale:ct}},_r=(R,u,f,D,V,J,oe,fe,xe,Ee,Fe,Ge,rt,ct,pt)=>{const xt=oe.transform;return r.e(Pr(R,u,f,D,V,J,oe,fe,xe,Ee,Fe,Ge,rt,pt),{u_gamma_scale:D?Math.cos(xt._pitch)*xt.cameraToCenterDistance:1,u_device_pixel_ratio:oe.pixelRatio,u_is_halo:+ct})},Cr=(R,u,f,D,V,J,oe,fe,xe,Ee,Fe,Ge,rt,ct)=>r.e(_r(R,u,f,D,V,J,oe,fe,xe,Ee,Fe,!0,Ge,!0,ct),{u_texsize_icon:rt,u_texture_icon:1}),Or=(R,u,f)=>({u_matrix:R,u_opacity:u,u_color:f}),Kr=(R,u,f,D,V,J)=>r.e(function(oe,fe,xe,Ee){const Fe=xe.imageManager.getPattern(oe.from.toString()),Ge=xe.imageManager.getPattern(oe.to.toString()),{width:rt,height:ct}=xe.imageManager.getPixelSize(),pt=Math.pow(2,Ee.tileID.overscaledZ),xt=Ee.tileSize*Math.pow(2,xe.transform.tileZoom)/pt,Mt=xt*(Ee.tileID.canonical.x+Ee.tileID.wrap*pt),Tt=xt*Ee.tileID.canonical.y;return{u_image:0,u_pattern_tl_a:Fe.tl,u_pattern_br_a:Fe.br,u_pattern_tl_b:Ge.tl,u_pattern_br_b:Ge.br,u_texsize:[rt,ct],u_mix:fe.t,u_pattern_size_a:Fe.displaySize,u_pattern_size_b:Ge.displaySize,u_scale_a:fe.fromScale,u_scale_b:fe.toScale,u_tile_units_to_pixels:1/St(Ee,1,xe.transform.tileZoom),u_pixel_coord_upper:[Mt>>16,Tt>>16],u_pixel_coord_lower:[65535&Mt,65535&Tt]}}(D,J,f,V),{u_matrix:R,u_opacity:u}),jr={fillExtrusion:(R,u)=>({u_matrix:new r.aK(R,u.u_matrix),u_lightpos:new r.aO(R,u.u_lightpos),u_lightintensity:new r.aJ(R,u.u_lightintensity),u_lightcolor:new r.aO(R,u.u_lightcolor),u_vertical_gradient:new r.aJ(R,u.u_vertical_gradient),u_opacity:new r.aJ(R,u.u_opacity)}),fillExtrusionPattern:(R,u)=>({u_matrix:new r.aK(R,u.u_matrix),u_lightpos:new r.aO(R,u.u_lightpos),u_lightintensity:new r.aJ(R,u.u_lightintensity),u_lightcolor:new r.aO(R,u.u_lightcolor),u_vertical_gradient:new r.aJ(R,u.u_vertical_gradient),u_height_factor:new r.aJ(R,u.u_height_factor),u_image:new r.aI(R,u.u_image),u_texsize:new r.aP(R,u.u_texsize),u_pixel_coord_upper:new r.aP(R,u.u_pixel_coord_upper),u_pixel_coord_lower:new r.aP(R,u.u_pixel_coord_lower),u_scale:new r.aO(R,u.u_scale),u_fade:new r.aJ(R,u.u_fade),u_opacity:new r.aJ(R,u.u_opacity)}),fill:(R,u)=>({u_matrix:new r.aK(R,u.u_matrix)}),fillPattern:(R,u)=>({u_matrix:new r.aK(R,u.u_matrix),u_image:new r.aI(R,u.u_image),u_texsize:new r.aP(R,u.u_texsize),u_pixel_coord_upper:new r.aP(R,u.u_pixel_coord_upper),u_pixel_coord_lower:new r.aP(R,u.u_pixel_coord_lower),u_scale:new r.aO(R,u.u_scale),u_fade:new r.aJ(R,u.u_fade)}),fillOutline:(R,u)=>({u_matrix:new r.aK(R,u.u_matrix),u_world:new r.aP(R,u.u_world)}),fillOutlinePattern:(R,u)=>({u_matrix:new r.aK(R,u.u_matrix),u_world:new r.aP(R,u.u_world),u_image:new r.aI(R,u.u_image),u_texsize:new r.aP(R,u.u_texsize),u_pixel_coord_upper:new r.aP(R,u.u_pixel_coord_upper),u_pixel_coord_lower:new r.aP(R,u.u_pixel_coord_lower),u_scale:new r.aO(R,u.u_scale),u_fade:new r.aJ(R,u.u_fade)}),circle:(R,u)=>({u_camera_to_center_distance:new r.aJ(R,u.u_camera_to_center_distance),u_scale_with_map:new r.aI(R,u.u_scale_with_map),u_pitch_with_map:new r.aI(R,u.u_pitch_with_map),u_extrude_scale:new r.aP(R,u.u_extrude_scale),u_device_pixel_ratio:new r.aJ(R,u.u_device_pixel_ratio),u_matrix:new r.aK(R,u.u_matrix)}),collisionBox:(R,u)=>({u_matrix:new r.aK(R,u.u_matrix),u_pixel_extrude_scale:new r.aP(R,u.u_pixel_extrude_scale)}),collisionCircle:(R,u)=>({u_matrix:new r.aK(R,u.u_matrix),u_inv_matrix:new r.aK(R,u.u_inv_matrix),u_camera_to_center_distance:new r.aJ(R,u.u_camera_to_center_distance),u_viewport_size:new r.aP(R,u.u_viewport_size)}),debug:(R,u)=>({u_color:new r.aM(R,u.u_color),u_matrix:new r.aK(R,u.u_matrix),u_overlay:new r.aI(R,u.u_overlay),u_overlay_scale:new r.aJ(R,u.u_overlay_scale)}),clippingMask:(R,u)=>({u_matrix:new r.aK(R,u.u_matrix)}),heatmap:(R,u)=>({u_extrude_scale:new r.aJ(R,u.u_extrude_scale),u_intensity:new r.aJ(R,u.u_intensity),u_matrix:new r.aK(R,u.u_matrix)}),heatmapTexture:(R,u)=>({u_matrix:new r.aK(R,u.u_matrix),u_world:new r.aP(R,u.u_world),u_image:new r.aI(R,u.u_image),u_color_ramp:new r.aI(R,u.u_color_ramp),u_opacity:new r.aJ(R,u.u_opacity)}),hillshade:(R,u)=>({u_matrix:new r.aK(R,u.u_matrix),u_image:new r.aI(R,u.u_image),u_latrange:new r.aP(R,u.u_latrange),u_light:new r.aP(R,u.u_light),u_shadow:new r.aM(R,u.u_shadow),u_highlight:new r.aM(R,u.u_highlight),u_accent:new r.aM(R,u.u_accent)}),hillshadePrepare:(R,u)=>({u_matrix:new r.aK(R,u.u_matrix),u_image:new r.aI(R,u.u_image),u_dimension:new r.aP(R,u.u_dimension),u_zoom:new r.aJ(R,u.u_zoom),u_unpack:new r.aL(R,u.u_unpack)}),line:(R,u)=>({u_matrix:new r.aK(R,u.u_matrix),u_ratio:new r.aJ(R,u.u_ratio),u_device_pixel_ratio:new r.aJ(R,u.u_device_pixel_ratio),u_units_to_pixels:new r.aP(R,u.u_units_to_pixels)}),lineGradient:(R,u)=>({u_matrix:new r.aK(R,u.u_matrix),u_ratio:new r.aJ(R,u.u_ratio),u_device_pixel_ratio:new r.aJ(R,u.u_device_pixel_ratio),u_units_to_pixels:new r.aP(R,u.u_units_to_pixels),u_image:new r.aI(R,u.u_image),u_image_height:new r.aJ(R,u.u_image_height)}),linePattern:(R,u)=>({u_matrix:new r.aK(R,u.u_matrix),u_texsize:new r.aP(R,u.u_texsize),u_ratio:new r.aJ(R,u.u_ratio),u_device_pixel_ratio:new r.aJ(R,u.u_device_pixel_ratio),u_image:new r.aI(R,u.u_image),u_units_to_pixels:new r.aP(R,u.u_units_to_pixels),u_scale:new r.aO(R,u.u_scale),u_fade:new r.aJ(R,u.u_fade)}),lineSDF:(R,u)=>({u_matrix:new r.aK(R,u.u_matrix),u_ratio:new r.aJ(R,u.u_ratio),u_device_pixel_ratio:new r.aJ(R,u.u_device_pixel_ratio),u_units_to_pixels:new r.aP(R,u.u_units_to_pixels),u_patternscale_a:new r.aP(R,u.u_patternscale_a),u_patternscale_b:new r.aP(R,u.u_patternscale_b),u_sdfgamma:new r.aJ(R,u.u_sdfgamma),u_image:new r.aI(R,u.u_image),u_tex_y_a:new r.aJ(R,u.u_tex_y_a),u_tex_y_b:new r.aJ(R,u.u_tex_y_b),u_mix:new r.aJ(R,u.u_mix)}),raster:(R,u)=>({u_matrix:new r.aK(R,u.u_matrix),u_tl_parent:new r.aP(R,u.u_tl_parent),u_scale_parent:new r.aJ(R,u.u_scale_parent),u_buffer_scale:new r.aJ(R,u.u_buffer_scale),u_fade_t:new r.aJ(R,u.u_fade_t),u_opacity:new r.aJ(R,u.u_opacity),u_image0:new r.aI(R,u.u_image0),u_image1:new r.aI(R,u.u_image1),u_brightness_low:new r.aJ(R,u.u_brightness_low),u_brightness_high:new r.aJ(R,u.u_brightness_high),u_saturation_factor:new r.aJ(R,u.u_saturation_factor),u_contrast_factor:new r.aJ(R,u.u_contrast_factor),u_spin_weights:new r.aO(R,u.u_spin_weights)}),symbolIcon:(R,u)=>({u_is_size_zoom_constant:new r.aI(R,u.u_is_size_zoom_constant),u_is_size_feature_constant:new r.aI(R,u.u_is_size_feature_constant),u_size_t:new r.aJ(R,u.u_size_t),u_size:new r.aJ(R,u.u_size),u_camera_to_center_distance:new r.aJ(R,u.u_camera_to_center_distance),u_pitch:new r.aJ(R,u.u_pitch),u_rotate_symbol:new r.aI(R,u.u_rotate_symbol),u_aspect_ratio:new r.aJ(R,u.u_aspect_ratio),u_fade_change:new r.aJ(R,u.u_fade_change),u_matrix:new r.aK(R,u.u_matrix),u_label_plane_matrix:new r.aK(R,u.u_label_plane_matrix),u_coord_matrix:new r.aK(R,u.u_coord_matrix),u_is_text:new r.aI(R,u.u_is_text),u_pitch_with_map:new r.aI(R,u.u_pitch_with_map),u_is_along_line:new r.aI(R,u.u_is_along_line),u_is_variable_anchor:new r.aI(R,u.u_is_variable_anchor),u_texsize:new r.aP(R,u.u_texsize),u_texture:new r.aI(R,u.u_texture),u_translation:new r.aP(R,u.u_translation),u_pitched_scale:new r.aJ(R,u.u_pitched_scale)}),symbolSDF:(R,u)=>({u_is_size_zoom_constant:new r.aI(R,u.u_is_size_zoom_constant),u_is_size_feature_constant:new r.aI(R,u.u_is_size_feature_constant),u_size_t:new r.aJ(R,u.u_size_t),u_size:new r.aJ(R,u.u_size),u_camera_to_center_distance:new r.aJ(R,u.u_camera_to_center_distance),u_pitch:new r.aJ(R,u.u_pitch),u_rotate_symbol:new r.aI(R,u.u_rotate_symbol),u_aspect_ratio:new r.aJ(R,u.u_aspect_ratio),u_fade_change:new r.aJ(R,u.u_fade_change),u_matrix:new r.aK(R,u.u_matrix),u_label_plane_matrix:new r.aK(R,u.u_label_plane_matrix),u_coord_matrix:new r.aK(R,u.u_coord_matrix),u_is_text:new r.aI(R,u.u_is_text),u_pitch_with_map:new r.aI(R,u.u_pitch_with_map),u_is_along_line:new r.aI(R,u.u_is_along_line),u_is_variable_anchor:new r.aI(R,u.u_is_variable_anchor),u_texsize:new r.aP(R,u.u_texsize),u_texture:new r.aI(R,u.u_texture),u_gamma_scale:new r.aJ(R,u.u_gamma_scale),u_device_pixel_ratio:new r.aJ(R,u.u_device_pixel_ratio),u_is_halo:new r.aI(R,u.u_is_halo),u_translation:new r.aP(R,u.u_translation),u_pitched_scale:new r.aJ(R,u.u_pitched_scale)}),symbolTextAndIcon:(R,u)=>({u_is_size_zoom_constant:new r.aI(R,u.u_is_size_zoom_constant),u_is_size_feature_constant:new r.aI(R,u.u_is_size_feature_constant),u_size_t:new r.aJ(R,u.u_size_t),u_size:new r.aJ(R,u.u_size),u_camera_to_center_distance:new r.aJ(R,u.u_camera_to_center_distance),u_pitch:new r.aJ(R,u.u_pitch),u_rotate_symbol:new r.aI(R,u.u_rotate_symbol),u_aspect_ratio:new r.aJ(R,u.u_aspect_ratio),u_fade_change:new r.aJ(R,u.u_fade_change),u_matrix:new r.aK(R,u.u_matrix),u_label_plane_matrix:new r.aK(R,u.u_label_plane_matrix),u_coord_matrix:new r.aK(R,u.u_coord_matrix),u_is_text:new r.aI(R,u.u_is_text),u_pitch_with_map:new r.aI(R,u.u_pitch_with_map),u_is_along_line:new r.aI(R,u.u_is_along_line),u_is_variable_anchor:new r.aI(R,u.u_is_variable_anchor),u_texsize:new r.aP(R,u.u_texsize),u_texsize_icon:new r.aP(R,u.u_texsize_icon),u_texture:new r.aI(R,u.u_texture),u_texture_icon:new r.aI(R,u.u_texture_icon),u_gamma_scale:new r.aJ(R,u.u_gamma_scale),u_device_pixel_ratio:new r.aJ(R,u.u_device_pixel_ratio),u_is_halo:new r.aI(R,u.u_is_halo),u_translation:new r.aP(R,u.u_translation),u_pitched_scale:new r.aJ(R,u.u_pitched_scale)}),background:(R,u)=>({u_matrix:new r.aK(R,u.u_matrix),u_opacity:new r.aJ(R,u.u_opacity),u_color:new r.aM(R,u.u_color)}),backgroundPattern:(R,u)=>({u_matrix:new r.aK(R,u.u_matrix),u_opacity:new r.aJ(R,u.u_opacity),u_image:new r.aI(R,u.u_image),u_pattern_tl_a:new r.aP(R,u.u_pattern_tl_a),u_pattern_br_a:new r.aP(R,u.u_pattern_br_a),u_pattern_tl_b:new r.aP(R,u.u_pattern_tl_b),u_pattern_br_b:new r.aP(R,u.u_pattern_br_b),u_texsize:new r.aP(R,u.u_texsize),u_mix:new r.aJ(R,u.u_mix),u_pattern_size_a:new r.aP(R,u.u_pattern_size_a),u_pattern_size_b:new r.aP(R,u.u_pattern_size_b),u_scale_a:new r.aJ(R,u.u_scale_a),u_scale_b:new r.aJ(R,u.u_scale_b),u_pixel_coord_upper:new r.aP(R,u.u_pixel_coord_upper),u_pixel_coord_lower:new r.aP(R,u.u_pixel_coord_lower),u_tile_units_to_pixels:new r.aJ(R,u.u_tile_units_to_pixels)}),terrain:(R,u)=>({u_matrix:new r.aK(R,u.u_matrix),u_texture:new r.aI(R,u.u_texture),u_ele_delta:new r.aJ(R,u.u_ele_delta),u_fog_matrix:new r.aK(R,u.u_fog_matrix),u_fog_color:new r.aM(R,u.u_fog_color),u_fog_ground_blend:new r.aJ(R,u.u_fog_ground_blend),u_fog_ground_blend_opacity:new r.aJ(R,u.u_fog_ground_blend_opacity),u_horizon_color:new r.aM(R,u.u_horizon_color),u_horizon_fog_blend:new r.aJ(R,u.u_horizon_fog_blend)}),terrainDepth:(R,u)=>({u_matrix:new r.aK(R,u.u_matrix),u_ele_delta:new r.aJ(R,u.u_ele_delta)}),terrainCoords:(R,u)=>({u_matrix:new r.aK(R,u.u_matrix),u_texture:new r.aI(R,u.u_texture),u_terrain_coords_id:new r.aJ(R,u.u_terrain_coords_id),u_ele_delta:new r.aJ(R,u.u_ele_delta)}),sky:(R,u)=>({u_sky_color:new r.aM(R,u.u_sky_color),u_horizon_color:new r.aM(R,u.u_horizon_color),u_horizon:new r.aJ(R,u.u_horizon),u_sky_horizon_blend:new r.aJ(R,u.u_sky_horizon_blend)})};class zr{constructor(u,f,D){this.context=u;const V=u.gl;this.buffer=V.createBuffer(),this.dynamicDraw=!!D,this.context.unbindVAO(),u.bindElementBuffer.set(this.buffer),V.bufferData(V.ELEMENT_ARRAY_BUFFER,f.arrayBuffer,this.dynamicDraw?V.DYNAMIC_DRAW:V.STATIC_DRAW),this.dynamicDraw||delete f.arrayBuffer}bind(){this.context.bindElementBuffer.set(this.buffer)}updateData(u){const f=this.context.gl;if(!this.dynamicDraw)throw new Error("Attempted to update data while not in dynamic mode.");this.context.unbindVAO(),this.bind(),f.bufferSubData(f.ELEMENT_ARRAY_BUFFER,0,u.arrayBuffer)}destroy(){const u=this.context.gl;this.buffer&&(u.deleteBuffer(this.buffer),delete this.buffer)}}const Hr={Int8:"BYTE",Uint8:"UNSIGNED_BYTE",Int16:"SHORT",Uint16:"UNSIGNED_SHORT",Int32:"INT",Uint32:"UNSIGNED_INT",Float32:"FLOAT"};class bn{constructor(u,f,D,V){this.length=f.length,this.attributes=D,this.itemSize=f.bytesPerElement,this.dynamicDraw=V,this.context=u;const J=u.gl;this.buffer=J.createBuffer(),u.bindVertexBuffer.set(this.buffer),J.bufferData(J.ARRAY_BUFFER,f.arrayBuffer,this.dynamicDraw?J.DYNAMIC_DRAW:J.STATIC_DRAW),this.dynamicDraw||delete f.arrayBuffer}bind(){this.context.bindVertexBuffer.set(this.buffer)}updateData(u){if(u.length!==this.length)throw new Error(`Length of new data is ${u.length}, which doesn't match current length of ${this.length}`);const f=this.context.gl;this.bind(),f.bufferSubData(f.ARRAY_BUFFER,0,u.arrayBuffer)}enableAttributes(u,f){for(let D=0;D<this.attributes.length;D++){const V=this.attributes[D],J=f.attributes[V.name];J!==void 0&&u.enableVertexAttribArray(J)}}setVertexAttribPointers(u,f,D){for(let V=0;V<this.attributes.length;V++){const J=this.attributes[V],oe=f.attributes[J.name];oe!==void 0&&u.vertexAttribPointer(oe,J.components,u[Hr[J.type]],!1,this.itemSize,J.offset+this.itemSize*(D||0))}}destroy(){const u=this.context.gl;this.buffer&&(u.deleteBuffer(this.buffer),delete this.buffer)}}const Bn=new WeakMap;function mi(R){var u;if(Bn.has(R))return Bn.get(R);{const f=(u=R.getParameter(R.VERSION))===null||u===void 0?void 0:u.startsWith("WebGL 2.0");return Bn.set(R,f),f}}class En{constructor(u){this.gl=u.gl,this.default=this.getDefault(),this.current=this.default,this.dirty=!1}get(){return this.current}set(u){}getDefault(){return this.default}setDefault(){this.set(this.default)}}class fo extends En{getDefault(){return r.aN.transparent}set(u){const f=this.current;(u.r!==f.r||u.g!==f.g||u.b!==f.b||u.a!==f.a||this.dirty)&&(this.gl.clearColor(u.r,u.g,u.b,u.a),this.current=u,this.dirty=!1)}}class ki extends En{getDefault(){return 1}set(u){(u!==this.current||this.dirty)&&(this.gl.clearDepth(u),this.current=u,this.dirty=!1)}}class Hi extends En{getDefault(){return 0}set(u){(u!==this.current||this.dirty)&&(this.gl.clearStencil(u),this.current=u,this.dirty=!1)}}class qo extends En{getDefault(){return[!0,!0,!0,!0]}set(u){const f=this.current;(u[0]!==f[0]||u[1]!==f[1]||u[2]!==f[2]||u[3]!==f[3]||this.dirty)&&(this.gl.colorMask(u[0],u[1],u[2],u[3]),this.current=u,this.dirty=!1)}}class ri extends En{getDefault(){return!0}set(u){(u!==this.current||this.dirty)&&(this.gl.depthMask(u),this.current=u,this.dirty=!1)}}class si extends En{getDefault(){return 255}set(u){(u!==this.current||this.dirty)&&(this.gl.stencilMask(u),this.current=u,this.dirty=!1)}}class os extends En{getDefault(){return{func:this.gl.ALWAYS,ref:0,mask:255}}set(u){const f=this.current;(u.func!==f.func||u.ref!==f.ref||u.mask!==f.mask||this.dirty)&&(this.gl.stencilFunc(u.func,u.ref,u.mask),this.current=u,this.dirty=!1)}}class xo extends En{getDefault(){const u=this.gl;return[u.KEEP,u.KEEP,u.KEEP]}set(u){const f=this.current;(u[0]!==f[0]||u[1]!==f[1]||u[2]!==f[2]||this.dirty)&&(this.gl.stencilOp(u[0],u[1],u[2]),this.current=u,this.dirty=!1)}}class Yo extends En{getDefault(){return!1}set(u){if(u===this.current&&!this.dirty)return;const f=this.gl;u?f.enable(f.STENCIL_TEST):f.disable(f.STENCIL_TEST),this.current=u,this.dirty=!1}}class ms extends En{getDefault(){return[0,1]}set(u){const f=this.current;(u[0]!==f[0]||u[1]!==f[1]||this.dirty)&&(this.gl.depthRange(u[0],u[1]),this.current=u,this.dirty=!1)}}class Fo extends En{getDefault(){return!1}set(u){if(u===this.current&&!this.dirty)return;const f=this.gl;u?f.enable(f.DEPTH_TEST):f.disable(f.DEPTH_TEST),this.current=u,this.dirty=!1}}class Tl extends En{getDefault(){return this.gl.LESS}set(u){(u!==this.current||this.dirty)&&(this.gl.depthFunc(u),this.current=u,this.dirty=!1)}}class Al extends En{getDefault(){return!1}set(u){if(u===this.current&&!this.dirty)return;const f=this.gl;u?f.enable(f.BLEND):f.disable(f.BLEND),this.current=u,this.dirty=!1}}class El extends En{getDefault(){const u=this.gl;return[u.ONE,u.ZERO]}set(u){const f=this.current;(u[0]!==f[0]||u[1]!==f[1]||this.dirty)&&(this.gl.blendFunc(u[0],u[1]),this.current=u,this.dirty=!1)}}class Jo extends En{getDefault(){return r.aN.transparent}set(u){const f=this.current;(u.r!==f.r||u.g!==f.g||u.b!==f.b||u.a!==f.a||this.dirty)&&(this.gl.blendColor(u.r,u.g,u.b,u.a),this.current=u,this.dirty=!1)}}class al extends En{getDefault(){return this.gl.FUNC_ADD}set(u){(u!==this.current||this.dirty)&&(this.gl.blendEquation(u),this.current=u,this.dirty=!1)}}class Ss extends En{getDefault(){return!1}set(u){if(u===this.current&&!this.dirty)return;const f=this.gl;u?f.enable(f.CULL_FACE):f.disable(f.CULL_FACE),this.current=u,this.dirty=!1}}class Si extends En{getDefault(){return this.gl.BACK}set(u){(u!==this.current||this.dirty)&&(this.gl.cullFace(u),this.current=u,this.dirty=!1)}}class $i extends En{getDefault(){return this.gl.CCW}set(u){(u!==this.current||this.dirty)&&(this.gl.frontFace(u),this.current=u,this.dirty=!1)}}class Ml extends En{getDefault(){return null}set(u){(u!==this.current||this.dirty)&&(this.gl.useProgram(u),this.current=u,this.dirty=!1)}}class rl extends En{getDefault(){return this.gl.TEXTURE0}set(u){(u!==this.current||this.dirty)&&(this.gl.activeTexture(u),this.current=u,this.dirty=!1)}}class Us extends En{getDefault(){const u=this.gl;return[0,0,u.drawingBufferWidth,u.drawingBufferHeight]}set(u){const f=this.current;(u[0]!==f[0]||u[1]!==f[1]||u[2]!==f[2]||u[3]!==f[3]||this.dirty)&&(this.gl.viewport(u[0],u[1],u[2],u[3]),this.current=u,this.dirty=!1)}}class Il extends En{getDefault(){return null}set(u){if(u===this.current&&!this.dirty)return;const f=this.gl;f.bindFramebuffer(f.FRAMEBUFFER,u),this.current=u,this.dirty=!1}}class Gs extends En{getDefault(){return null}set(u){if(u===this.current&&!this.dirty)return;const f=this.gl;f.bindRenderbuffer(f.RENDERBUFFER,u),this.current=u,this.dirty=!1}}class Pl extends En{getDefault(){return null}set(u){if(u===this.current&&!this.dirty)return;const f=this.gl;f.bindTexture(f.TEXTURE_2D,u),this.current=u,this.dirty=!1}}class Ll extends En{getDefault(){return null}set(u){if(u===this.current&&!this.dirty)return;const f=this.gl;f.bindBuffer(f.ARRAY_BUFFER,u),this.current=u,this.dirty=!1}}class nl extends En{getDefault(){return null}set(u){const f=this.gl;f.bindBuffer(f.ELEMENT_ARRAY_BUFFER,u),this.current=u,this.dirty=!1}}class Po extends En{getDefault(){return null}set(u){var f;if(u===this.current&&!this.dirty)return;const D=this.gl;mi(D)?D.bindVertexArray(u):(f=D.getExtension("OES_vertex_array_object"))===null||f===void 0||f.bindVertexArrayOES(u),this.current=u,this.dirty=!1}}class Hc extends En{getDefault(){return 4}set(u){if(u===this.current&&!this.dirty)return;const f=this.gl;f.pixelStorei(f.UNPACK_ALIGNMENT,u),this.current=u,this.dirty=!1}}class Lc extends En{getDefault(){return!1}set(u){if(u===this.current&&!this.dirty)return;const f=this.gl;f.pixelStorei(f.UNPACK_PREMULTIPLY_ALPHA_WEBGL,u),this.current=u,this.dirty=!1}}class ql extends En{getDefault(){return!1}set(u){if(u===this.current&&!this.dirty)return;const f=this.gl;f.pixelStorei(f.UNPACK_FLIP_Y_WEBGL,u),this.current=u,this.dirty=!1}}class Zc extends En{constructor(u,f){super(u),this.context=u,this.parent=f}getDefault(){return null}}class eu extends Zc{setDirty(){this.dirty=!0}set(u){if(u===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);const f=this.gl;f.framebufferTexture2D(f.FRAMEBUFFER,f.COLOR_ATTACHMENT0,f.TEXTURE_2D,u,0),this.current=u,this.dirty=!1}}class Cs extends Zc{set(u){if(u===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);const f=this.gl;f.framebufferRenderbuffer(f.FRAMEBUFFER,f.DEPTH_ATTACHMENT,f.RENDERBUFFER,u),this.current=u,this.dirty=!1}}class tu extends Zc{set(u){if(u===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);const f=this.gl;f.framebufferRenderbuffer(f.FRAMEBUFFER,f.DEPTH_STENCIL_ATTACHMENT,f.RENDERBUFFER,u),this.current=u,this.dirty=!1}}class Bu{constructor(u,f,D,V,J){this.context=u,this.width=f,this.height=D;const oe=u.gl,fe=this.framebuffer=oe.createFramebuffer();if(this.colorAttachment=new eu(u,fe),V)this.depthAttachment=J?new tu(u,fe):new Cs(u,fe);else if(J)throw new Error("Stencil cannot be set without depth");if(oe.checkFramebufferStatus(oe.FRAMEBUFFER)!==oe.FRAMEBUFFER_COMPLETE)throw new Error("Framebuffer is not complete")}destroy(){const u=this.context.gl,f=this.colorAttachment.get();if(f&&u.deleteTexture(f),this.depthAttachment){const D=this.depthAttachment.get();D&&u.deleteRenderbuffer(D)}u.deleteFramebuffer(this.framebuffer)}}class Qi{constructor(u,f,D){this.blendFunction=u,this.blendColor=f,this.mask=D}}Qi.Replace=[1,0],Qi.disabled=new Qi(Qi.Replace,r.aN.transparent,[!1,!1,!1,!1]),Qi.unblended=new Qi(Qi.Replace,r.aN.transparent,[!0,!0,!0,!0]),Qi.alphaBlended=new Qi([1,771],r.aN.transparent,[!0,!0,!0,!0]);class _c{constructor(u){var f,D;if(this.gl=u,this.clearColor=new fo(this),this.clearDepth=new ki(this),this.clearStencil=new Hi(this),this.colorMask=new qo(this),this.depthMask=new ri(this),this.stencilMask=new si(this),this.stencilFunc=new os(this),this.stencilOp=new xo(this),this.stencilTest=new Yo(this),this.depthRange=new ms(this),this.depthTest=new Fo(this),this.depthFunc=new Tl(this),this.blend=new Al(this),this.blendFunc=new El(this),this.blendColor=new Jo(this),this.blendEquation=new al(this),this.cullFace=new Ss(this),this.cullFaceSide=new Si(this),this.frontFace=new $i(this),this.program=new Ml(this),this.activeTexture=new rl(this),this.viewport=new Us(this),this.bindFramebuffer=new Il(this),this.bindRenderbuffer=new Gs(this),this.bindTexture=new Pl(this),this.bindVertexBuffer=new Ll(this),this.bindElementBuffer=new nl(this),this.bindVertexArray=new Po(this),this.pixelStoreUnpack=new Hc(this),this.pixelStoreUnpackPremultiplyAlpha=new Lc(this),this.pixelStoreUnpackFlipY=new ql(this),this.extTextureFilterAnisotropic=u.getExtension("EXT_texture_filter_anisotropic")||u.getExtension("MOZ_EXT_texture_filter_anisotropic")||u.getExtension("WEBKIT_EXT_texture_filter_anisotropic"),this.extTextureFilterAnisotropic&&(this.extTextureFilterAnisotropicMax=u.getParameter(this.extTextureFilterAnisotropic.MAX_TEXTURE_MAX_ANISOTROPY_EXT)),this.maxTextureSize=u.getParameter(u.MAX_TEXTURE_SIZE),mi(u)){this.HALF_FLOAT=u.HALF_FLOAT;const V=u.getExtension("EXT_color_buffer_half_float");this.RGBA16F=(f=u.RGBA16F)!==null&&f!==void 0?f:V==null?void 0:V.RGBA16F_EXT,this.RGB16F=(D=u.RGB16F)!==null&&D!==void 0?D:V==null?void 0:V.RGB16F_EXT,u.getExtension("EXT_color_buffer_float")}else{u.getExtension("EXT_color_buffer_half_float"),u.getExtension("OES_texture_half_float_linear");const V=u.getExtension("OES_texture_half_float");this.HALF_FLOAT=V==null?void 0:V.HALF_FLOAT_OES}}setDefault(){this.unbindVAO(),this.clearColor.setDefault(),this.clearDepth.setDefault(),this.clearStencil.setDefault(),this.colorMask.setDefault(),this.depthMask.setDefault(),this.stencilMask.setDefault(),this.stencilFunc.setDefault(),this.stencilOp.setDefault(),this.stencilTest.setDefault(),this.depthRange.setDefault(),this.depthTest.setDefault(),this.depthFunc.setDefault(),this.blend.setDefault(),this.blendFunc.setDefault(),this.blendColor.setDefault(),this.blendEquation.setDefault(),this.cullFace.setDefault(),this.cullFaceSide.setDefault(),this.frontFace.setDefault(),this.program.setDefault(),this.activeTexture.setDefault(),this.bindFramebuffer.setDefault(),this.pixelStoreUnpack.setDefault(),this.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.pixelStoreUnpackFlipY.setDefault()}setDirty(){this.clearColor.dirty=!0,this.clearDepth.dirty=!0,this.clearStencil.dirty=!0,this.colorMask.dirty=!0,this.depthMask.dirty=!0,this.stencilMask.dirty=!0,this.stencilFunc.dirty=!0,this.stencilOp.dirty=!0,this.stencilTest.dirty=!0,this.depthRange.dirty=!0,this.depthTest.dirty=!0,this.depthFunc.dirty=!0,this.blend.dirty=!0,this.blendFunc.dirty=!0,this.blendColor.dirty=!0,this.blendEquation.dirty=!0,this.cullFace.dirty=!0,this.cullFaceSide.dirty=!0,this.frontFace.dirty=!0,this.program.dirty=!0,this.activeTexture.dirty=!0,this.viewport.dirty=!0,this.bindFramebuffer.dirty=!0,this.bindRenderbuffer.dirty=!0,this.bindTexture.dirty=!0,this.bindVertexBuffer.dirty=!0,this.bindElementBuffer.dirty=!0,this.bindVertexArray.dirty=!0,this.pixelStoreUnpack.dirty=!0,this.pixelStoreUnpackPremultiplyAlpha.dirty=!0,this.pixelStoreUnpackFlipY.dirty=!0}createIndexBuffer(u,f){return new zr(this,u,f)}createVertexBuffer(u,f,D){return new bn(this,u,f,D)}createRenderbuffer(u,f,D){const V=this.gl,J=V.createRenderbuffer();return this.bindRenderbuffer.set(J),V.renderbufferStorage(V.RENDERBUFFER,u,f,D),this.bindRenderbuffer.set(null),J}createFramebuffer(u,f,D,V){return new Bu(this,u,f,D,V)}clear({color:u,depth:f,stencil:D}){const V=this.gl;let J=0;u&&(J|=V.COLOR_BUFFER_BIT,this.clearColor.set(u),this.colorMask.set([!0,!0,!0,!0])),f!==void 0&&(J|=V.DEPTH_BUFFER_BIT,this.depthRange.set([0,1]),this.clearDepth.set(f),this.depthMask.set(!0)),D!==void 0&&(J|=V.STENCIL_BUFFER_BIT,this.clearStencil.set(D),this.stencilMask.set(255)),V.clear(J)}setCullFace(u){u.enable===!1?this.cullFace.set(!1):(this.cullFace.set(!0),this.cullFaceSide.set(u.mode),this.frontFace.set(u.frontFace))}setDepthMode(u){u.func!==this.gl.ALWAYS||u.mask?(this.depthTest.set(!0),this.depthFunc.set(u.func),this.depthMask.set(u.mask),this.depthRange.set(u.range)):this.depthTest.set(!1)}setStencilMode(u){u.test.func!==this.gl.ALWAYS||u.mask?(this.stencilTest.set(!0),this.stencilMask.set(u.mask),this.stencilOp.set([u.fail,u.depthFail,u.pass]),this.stencilFunc.set({func:u.test.func,ref:u.ref,mask:u.test.mask})):this.stencilTest.set(!1)}setColorMode(u){r.aF(u.blendFunction,Qi.Replace)?this.blend.set(!1):(this.blend.set(!0),this.blendFunc.set(u.blendFunction),this.blendColor.set(u.blendColor)),this.colorMask.set(u.mask)}createVertexArray(){var u;return mi(this.gl)?this.gl.createVertexArray():(u=this.gl.getExtension("OES_vertex_array_object"))===null||u===void 0?void 0:u.createVertexArrayOES()}deleteVertexArray(u){var f;return mi(this.gl)?this.gl.deleteVertexArray(u):(f=this.gl.getExtension("OES_vertex_array_object"))===null||f===void 0?void 0:f.deleteVertexArrayOES(u)}unbindVAO(){this.bindVertexArray.set(null)}}class qn{constructor(u,f,D){this.func=u,this.mask=f,this.range=D}}qn.ReadOnly=!1,qn.ReadWrite=!0,qn.disabled=new qn(519,qn.ReadOnly,[0,1]);const Jl=7680;class _i{constructor(u,f,D,V,J,oe){this.test=u,this.ref=f,this.mask=D,this.fail=V,this.depthFail=J,this.pass=oe}}_i.disabled=new _i({func:519,mask:0},0,0,Jl,Jl,Jl);class xi{constructor(u,f,D){this.enable=u,this.mode=f,this.frontFace=D}}let Ts;function ss(R,u,f,D,V){const J=R.context,oe=J.gl,fe=R.useProgram("collisionBox"),xe=[];let Ee=0,Fe=0;for(let Mt=0;Mt<D.length;Mt++){const Tt=D[Mt],jt=u.getTile(Tt).getBucket(f);if(!jt)continue;const Et=V?jt.textCollisionBox:jt.iconCollisionBox,Jt=jt.collisionCircleArray;if(Jt.length>0){const Kt=r.H();r.aR(Kt,jt.placementInvProjMatrix,R.transform.glCoordMatrix),r.aR(Kt,Kt,jt.placementViewportMatrix),xe.push({circleArray:Jt,circleOffset:Fe,transform:Tt.posMatrix,invTransform:Kt,coord:Tt}),Ee+=Jt.length/4,Fe=Ee}Et&&fe.draw(J,oe.LINES,qn.disabled,_i.disabled,R.colorModeForRenderPass(),xi.disabled,ta(R.transform,Tt.posMatrix),R.style.map.terrain&&R.style.map.terrain.getTerrainData(Tt),f.id,Et.layoutVertexBuffer,Et.indexBuffer,Et.segments,null,R.transform.zoom,null,null,Et.collisionVertexBuffer)}if(!V||!xe.length)return;const Ge=R.useProgram("collisionCircle"),rt=new r.aS;rt.resize(4*Ee),rt._trim();let ct=0;for(const Mt of xe)for(let Tt=0;Tt<Mt.circleArray.length/4;Tt++){const jt=4*Tt,Et=Mt.circleArray[jt+0],Jt=Mt.circleArray[jt+1],Kt=Mt.circleArray[jt+2],Yt=Mt.circleArray[jt+3];rt.emplace(ct++,Et,Jt,Kt,Yt,0),rt.emplace(ct++,Et,Jt,Kt,Yt,1),rt.emplace(ct++,Et,Jt,Kt,Yt,2),rt.emplace(ct++,Et,Jt,Kt,Yt,3)}(!Ts||Ts.length<2*Ee)&&(Ts=function(Mt){const Tt=2*Mt,jt=new r.aU;jt.resize(Tt),jt._trim();for(let Et=0;Et<Tt;Et++){const Jt=6*Et;jt.uint16[Jt+0]=4*Et+0,jt.uint16[Jt+1]=4*Et+1,jt.uint16[Jt+2]=4*Et+2,jt.uint16[Jt+3]=4*Et+2,jt.uint16[Jt+4]=4*Et+3,jt.uint16[Jt+5]=4*Et+0}return jt}(Ee));const pt=J.createIndexBuffer(Ts,!0),xt=J.createVertexBuffer(rt,r.aT.members,!0);for(const Mt of xe){const Tt=ca(Mt.transform,Mt.invTransform,R.transform);Ge.draw(J,oe.TRIANGLES,qn.disabled,_i.disabled,R.colorModeForRenderPass(),xi.disabled,Tt,R.style.map.terrain&&R.style.map.terrain.getTerrainData(Mt.coord),f.id,xt,pt,r.a0.simpleSegment(0,2*Mt.circleOffset,Mt.circleArray.length,Mt.circleArray.length/2),null,R.transform.zoom,null,null,null)}xt.destroy(),pt.destroy()}xi.disabled=new xi(!1,1029,2305),xi.backCCW=new xi(!0,1029,2305);const xc=r.ao(new Float32Array(16));function Bl(R,u,f,D,V){if(R.renderPass!=="translucent")return;const J=_i.disabled,oe=R.colorModeForRenderPass();(f._unevaluatedLayout.hasValue("text-variable-anchor")||f._unevaluatedLayout.hasValue("text-variable-anchor-offset"))&&function(fe,xe,Ee,Fe,Ge,rt,ct,pt,xt){const Mt=xe.transform,Tt=Pa(),jt=Ge==="map",Et=rt==="map";for(const Jt of fe){const Kt=Fe.getTile(Jt),Yt=Kt.getBucket(Ee);if(!Yt||!Yt.text||!Yt.text.segments.get().length)continue;const da=Yt.textSizeData,_a=r.ah(da,Mt.zoom),Da=St(Kt,1,xe.transform.zoom),Na=It(Jt.posMatrix,Et,jt,xe.transform,Da),Ga=Ee.layout.get("icon-text-fit")!=="none"&&Yt.hasIconData();if(_a){const $a=Math.pow(2,Mt.zoom-Kt.tileID.overscaledZ),gr=xe.style.map.terrain?(xr,nr)=>xe.style.map.terrain.getElevation(Jt,xr,nr):null,Qa=Tt.translatePosition(Mt,Kt,ct,pt);wo(Yt,jt,Et,xt,Mt,Na,Jt.posMatrix,$a,_a,Ga,Tt,Qa,Jt.toUnwrapped(),gr)}}}(D,R,f,u,f.layout.get("text-rotation-alignment"),f.layout.get("text-pitch-alignment"),f.paint.get("text-translate"),f.paint.get("text-translate-anchor"),V),f.paint.get("icon-opacity").constantOr(1)!==0&&sc(R,u,f,D,!1,f.paint.get("icon-translate"),f.paint.get("icon-translate-anchor"),f.layout.get("icon-rotation-alignment"),f.layout.get("icon-pitch-alignment"),f.layout.get("icon-keep-upright"),J,oe),f.paint.get("text-opacity").constantOr(1)!==0&&sc(R,u,f,D,!0,f.paint.get("text-translate"),f.paint.get("text-translate-anchor"),f.layout.get("text-rotation-alignment"),f.layout.get("text-pitch-alignment"),f.layout.get("text-keep-upright"),J,oe),u.map.showCollisionBoxes&&(ss(R,u,f,D,!0),ss(R,u,f,D,!1))}function ls(R,u,f,D,V,J){const{horizontalAlign:oe,verticalAlign:fe}=r.av(R),xe=-(oe-.5)*u,Ee=-(fe-.5)*f;return new r.P((xe/V+D[0])*J,(Ee/V+D[1])*J)}function gs(R,u,f,D,V,J){const oe=u.tileAnchorPoint.add(new r.P(u.translation[0],u.translation[1]));if(u.pitchWithMap){let fe=D.mult(J);return f||(fe=fe.rotate(-V)),Gt(oe.add(fe),u.labelPlaneMatrix,u.getElevation).point}if(f){const fe=Ye(u.tileAnchorPoint.x+1,u.tileAnchorPoint.y,u).point.sub(R),xe=Math.atan(fe.y/fe.x)+(fe.x<0?Math.PI:0);return R.add(D.rotate(xe))}return R.add(D)}function wo(R,u,f,D,V,J,oe,fe,xe,Ee,Fe,Ge,rt,ct){const pt=R.text.placedSymbolArray,xt=R.text.dynamicLayoutVertexArray,Mt=R.icon.dynamicLayoutVertexArray,Tt={};xt.clear();for(let jt=0;jt<pt.length;jt++){const Et=pt.get(jt),Jt=R.allowVerticalPlacement&&!Et.placedOrientation,Kt=Et.hidden||!Et.crossTileID||Jt?null:D[Et.crossTileID];if(Kt){const Yt=new r.P(Et.anchorX,Et.anchorY),da={getElevation:ct,width:V.width,height:V.height,labelPlaneMatrix:J,lineVertexArray:null,pitchWithMap:f,projection:Fe,projectionCache:null,tileAnchorPoint:Yt,translation:Ge,unwrappedTileID:rt},_a=f?Gt(Yt,oe,ct):Ye(Yt.x,Yt.y,da),Da=ot(V.cameraToCenterDistance,_a.signedDistanceFromCamera);let Na=r.aj(R.textSizeData,xe,Et)*Da/r.aq;f&&(Na*=R.tilePixelRatio/fe);const{width:Ga,height:$a,anchor:gr,textOffset:Qa,textBoxScale:xr}=Kt,nr=ls(gr,Ga,$a,Qa,xr,Na),Sr=Fe.getPitchedTextCorrection(V,Yt.add(new r.P(Ge[0],Ge[1])),rt),pr=gs(_a.point,da,u,nr,V.angle,Sr),Mr=R.allowVerticalPlacement&&Et.placedOrientation===r.ai.vertical?Math.PI/2:0;for(let Wr=0;Wr<Et.numGlyphs;Wr++)r.ak(xt,pr,Mr);Ee&&Et.associatedIconIndex>=0&&(Tt[Et.associatedIconIndex]={shiftedAnchor:pr,angle:Mr})}else Vt(Et.numGlyphs,xt)}if(Ee){Mt.clear();const jt=R.icon.placedSymbolArray;for(let Et=0;Et<jt.length;Et++){const Jt=jt.get(Et);if(Jt.hidden)Vt(Jt.numGlyphs,Mt);else{const Kt=Tt[Et];if(Kt)for(let Yt=0;Yt<Jt.numGlyphs;Yt++)r.ak(Mt,Kt.shiftedAnchor,Kt.angle);else Vt(Jt.numGlyphs,Mt)}}R.icon.dynamicLayoutVertexBuffer.updateData(Mt)}R.text.dynamicLayoutVertexBuffer.updateData(xt)}function ei(R,u,f){return f.iconsInText&&u?"symbolTextAndIcon":R?"symbolSDF":"symbolIcon"}function sc(R,u,f,D,V,J,oe,fe,xe,Ee,Fe,Ge){const rt=R.context,ct=rt.gl,pt=R.transform,xt=Pa(),Mt=fe==="map",Tt=xe==="map",jt=fe!=="viewport"&&f.layout.get("symbol-placement")!=="point",Et=Mt&&!Tt&&!jt,Jt=!Tt&&jt,Kt=!f.layout.get("symbol-sort-key").isConstant();let Yt=!1;const da=R.depthModeForSublayer(0,qn.ReadOnly),_a=f._unevaluatedLayout.hasValue("text-variable-anchor")||f._unevaluatedLayout.hasValue("text-variable-anchor-offset"),Da=[],Na=xt.getCircleRadiusCorrection(pt);for(const Ga of D){const $a=u.getTile(Ga),gr=$a.getBucket(f);if(!gr)continue;const Qa=V?gr.text:gr.icon;if(!Qa||!Qa.segments.get().length||!Qa.hasVisibleVertices)continue;const xr=Qa.programConfigurations.get(f.id),nr=V||gr.sdfIcons,Sr=V?gr.textSizeData:gr.iconSizeData,pr=Tt||pt.pitch!==0,Mr=R.useProgram(ei(nr,V,gr),xr),Wr=r.ah(Sr,pt.zoom),Er=R.style.map.terrain&&R.style.map.terrain.getTerrainData(Ga);let Gr,rn,Dn,Sn,Gn=[0,0],jn=null;if(V){if(rn=$a.glyphAtlasTexture,Dn=ct.LINEAR,Gr=$a.glyphAtlasTexture.size,gr.iconsInText){Gn=$a.imageAtlasTexture.size,jn=$a.imageAtlasTexture;const Nn=Sr.kind==="composite"||Sr.kind==="camera";Sn=pr||R.options.rotating||R.options.zooming||Nn?ct.LINEAR:ct.NEAREST}}else{const Nn=f.layout.get("icon-size").constantOr(0)!==1||gr.iconsNeedLinear;rn=$a.imageAtlasTexture,Dn=nr||R.options.rotating||R.options.zooming||Nn||pr?ct.LINEAR:ct.NEAREST,Gr=$a.imageAtlasTexture.size}const Jn=St($a,1,R.transform.zoom),oi=Jt?Ga.posMatrix:xc,Vi=It(oi,Tt,Mt,R.transform,Jn),zi=Ot(oi,Tt,Mt,R.transform,Jn),ro=Ot(Ga.posMatrix,Tt,Mt,R.transform,Jn),ci=xt.translatePosition(R.transform,$a,J,oe),$n=_a&&gr.hasTextData(),Ai=f.layout.get("icon-text-fit")!=="none"&&$n&&gr.hasIconData();if(jt){const Nn=R.style.map.terrain?(Xi,bs)=>R.style.map.terrain.getElevation(Ga,Xi,bs):null,To=f.layout.get("text-rotation-alignment")==="map";dt(gr,Ga.posMatrix,R,V,Vi,ro,Tt,Ee,To,xt,Ga.toUnwrapped(),pt.width,pt.height,ci,Nn)}const pi=Ga.posMatrix,ai=V&&_a||Ai,ui=jt||ai?xc:Vi,bi=zi,Kn=nr&&f.paint.get(V?"text-halo-width":"icon-halo-width").constantOr(1)!==0;let Ns;Ns=nr?gr.iconsInText?Cr(Sr.kind,Wr,Et,Tt,jt,ai,R,pi,ui,bi,ci,Gr,Gn,Na):_r(Sr.kind,Wr,Et,Tt,jt,ai,R,pi,ui,bi,ci,V,Gr,!0,Na):Pr(Sr.kind,Wr,Et,Tt,jt,ai,R,pi,ui,bi,ci,V,Gr,Na);const Zi={program:Mr,buffers:Qa,uniformValues:Ns,atlasTexture:rn,atlasTextureIcon:jn,atlasInterpolation:Dn,atlasInterpolationIcon:Sn,isSDF:nr,hasHalo:Kn};if(Kt&&gr.canOverlap){Yt=!0;const Nn=Qa.segments.get();for(const To of Nn)Da.push({segments:new r.a0([To]),sortKey:To.sortKey,state:Zi,terrainData:Er})}else Da.push({segments:Qa.segments,sortKey:0,state:Zi,terrainData:Er})}Yt&&Da.sort((Ga,$a)=>Ga.sortKey-$a.sortKey);for(const Ga of Da){const $a=Ga.state;if(rt.activeTexture.set(ct.TEXTURE0),$a.atlasTexture.bind($a.atlasInterpolation,ct.CLAMP_TO_EDGE),$a.atlasTextureIcon&&(rt.activeTexture.set(ct.TEXTURE1),$a.atlasTextureIcon&&$a.atlasTextureIcon.bind($a.atlasInterpolationIcon,ct.CLAMP_TO_EDGE)),$a.isSDF){const gr=$a.uniformValues;$a.hasHalo&&(gr.u_is_halo=1,au($a.buffers,Ga.segments,f,R,$a.program,da,Fe,Ge,gr,Ga.terrainData)),gr.u_is_halo=0}au($a.buffers,Ga.segments,f,R,$a.program,da,Fe,Ge,$a.uniformValues,Ga.terrainData)}}function au(R,u,f,D,V,J,oe,fe,xe,Ee){const Fe=D.context,Ge=Fe.gl;V.draw(Fe,Ge.TRIANGLES,J,oe,fe,xi.disabled,xe,Ee,f.id,R.layoutVertexBuffer,R.indexBuffer,u,f.paint,D.transform.zoom,R.programConfigurations.get(f.id),R.dynamicLayoutVertexBuffer,R.opacityVertexBuffer)}function zl(R,u,f,D){if(f.paint.get("heatmap-opacity")!==0)if(R.renderPass==="offscreen"){const V=R.context,J=V.gl,oe=_i.disabled,fe=new Qi([J.ONE,J.ONE],r.aN.transparent,[!0,!0,!0,!0]);(function(xe,Ee,Fe){const Ge=xe.gl;xe.activeTexture.set(Ge.TEXTURE1),xe.viewport.set([0,0,Ee.width/4,Ee.height/4]);let rt=Fe.heatmapFbo;if(rt)Ge.bindTexture(Ge.TEXTURE_2D,rt.colorAttachment.get()),xe.bindFramebuffer.set(rt.framebuffer);else{const ct=Ge.createTexture();Ge.bindTexture(Ge.TEXTURE_2D,ct),Ge.texParameteri(Ge.TEXTURE_2D,Ge.TEXTURE_WRAP_S,Ge.CLAMP_TO_EDGE),Ge.texParameteri(Ge.TEXTURE_2D,Ge.TEXTURE_WRAP_T,Ge.CLAMP_TO_EDGE),Ge.texParameteri(Ge.TEXTURE_2D,Ge.TEXTURE_MIN_FILTER,Ge.LINEAR),Ge.texParameteri(Ge.TEXTURE_2D,Ge.TEXTURE_MAG_FILTER,Ge.LINEAR),rt=Fe.heatmapFbo=xe.createFramebuffer(Ee.width/4,Ee.height/4,!1,!1),function(pt,xt,Mt,Tt){var jt,Et;const Jt=pt.gl,Kt=(jt=pt.HALF_FLOAT)!==null&&jt!==void 0?jt:Jt.UNSIGNED_BYTE,Yt=(Et=pt.RGBA16F)!==null&&Et!==void 0?Et:Jt.RGBA;Jt.texImage2D(Jt.TEXTURE_2D,0,Yt,xt.width/4,xt.height/4,0,Jt.RGBA,Kt,null),Tt.colorAttachment.set(Mt)}(xe,Ee,ct,rt)}})(V,R,f),V.clear({color:r.aN.transparent});for(let xe=0;xe<D.length;xe++){const Ee=D[xe];if(u.hasRenderableParent(Ee))continue;const Fe=u.getTile(Ee),Ge=Fe.getBucket(f);if(!Ge)continue;const rt=Ge.programConfigurations.get(f.id),ct=R.useProgram("heatmap",rt),{zoom:pt}=R.transform;ct.draw(V,J.TRIANGLES,qn.disabled,oe,fe,xi.disabled,za(Ee.posMatrix,Fe,pt,f.paint.get("heatmap-intensity")),null,f.id,Ge.layoutVertexBuffer,Ge.indexBuffer,Ge.segments,f.paint,R.transform.zoom,rt)}V.viewport.set([0,0,R.width,R.height])}else R.renderPass==="translucent"&&(R.context.setColorMode(R.colorModeForRenderPass()),function(V,J){const oe=V.context,fe=oe.gl,xe=J.heatmapFbo;if(!xe)return;oe.activeTexture.set(fe.TEXTURE0),fe.bindTexture(fe.TEXTURE_2D,xe.colorAttachment.get()),oe.activeTexture.set(fe.TEXTURE1);let Ee=J.colorRampTexture;Ee||(Ee=J.colorRampTexture=new z(oe,J.colorRamp,fe.RGBA)),Ee.bind(fe.LINEAR,fe.CLAMP_TO_EDGE),V.useProgram("heatmapTexture").draw(oe,fe.TRIANGLES,qn.disabled,_i.disabled,V.colorModeForRenderPass(),xi.disabled,qa(V,J,0,1),null,J.id,V.viewportBuffer,V.quadTriangleIndexBuffer,V.viewportSegments,J.paint,V.transform.zoom)}(R,f))}function Ol(R,u,f,D,V){if(!f||!D||!D.imageAtlas)return;const J=D.imageAtlas.patternPositions;let oe=J[f.to.toString()],fe=J[f.from.toString()];if(!oe&&fe&&(oe=fe),!fe&&oe&&(fe=oe),!oe||!fe){const xe=V.getPaintProperty(u);oe=J[xe],fe=J[xe]}oe&&fe&&R.setConstantPatternPositions(oe,fe)}function Bc(R,u,f,D,V,J,oe){const fe=R.context.gl,xe="fill-pattern",Ee=f.paint.get(xe),Fe=Ee&&Ee.constantOr(1),Ge=f.getCrossfadeParameters();let rt,ct,pt,xt,Mt;oe?(ct=Fe&&!f.getPaintProperty("fill-outline-color")?"fillOutlinePattern":"fillOutline",rt=fe.LINES):(ct=Fe?"fillPattern":"fill",rt=fe.TRIANGLES);const Tt=Ee.constantOr(null);for(const jt of D){const Et=u.getTile(jt);if(Fe&&!Et.patternsLoaded())continue;const Jt=Et.getBucket(f);if(!Jt)continue;const Kt=Jt.programConfigurations.get(f.id),Yt=R.useProgram(ct,Kt),da=R.style.map.terrain&&R.style.map.terrain.getTerrainData(jt);Fe&&(R.context.activeTexture.set(fe.TEXTURE0),Et.imageAtlasTexture.bind(fe.LINEAR,fe.CLAMP_TO_EDGE),Kt.updatePaintBuffers(Ge)),Ol(Kt,xe,Tt,Et,f);const _a=da?jt:null,Da=_a?_a.posMatrix:jt.posMatrix,Na=R.translatePosMatrix(Da,Et,f.paint.get("fill-translate"),f.paint.get("fill-translate-anchor"));if(oe){xt=Jt.indexBuffer2,Mt=Jt.segments2;const Ga=[fe.drawingBufferWidth,fe.drawingBufferHeight];pt=ct==="fillOutlinePattern"&&Fe?ma(Na,R,Ge,Et,Ga):Ur(Na,Ga)}else xt=Jt.indexBuffer,Mt=Jt.segments,pt=Fe?Br(Na,R,Ge,Et):mr(Na);Yt.draw(R.context,rt,V,R.stencilModeForClipping(jt),J,xi.disabled,pt,da,f.id,Jt.layoutVertexBuffer,xt,Mt,f.paint,R.transform.zoom,Kt)}}function wc(R,u,f,D,V,J,oe){const fe=R.context,xe=fe.gl,Ee="fill-extrusion-pattern",Fe=f.paint.get(Ee),Ge=Fe.constantOr(1),rt=f.getCrossfadeParameters(),ct=f.paint.get("fill-extrusion-opacity"),pt=Fe.constantOr(null);for(const xt of D){const Mt=u.getTile(xt),Tt=Mt.getBucket(f);if(!Tt)continue;const jt=R.style.map.terrain&&R.style.map.terrain.getTerrainData(xt),Et=Tt.programConfigurations.get(f.id),Jt=R.useProgram(Ge?"fillExtrusionPattern":"fillExtrusion",Et);Ge&&(R.context.activeTexture.set(xe.TEXTURE0),Mt.imageAtlasTexture.bind(xe.LINEAR,xe.CLAMP_TO_EDGE),Et.updatePaintBuffers(rt)),Ol(Et,Ee,pt,Mt,f);const Kt=R.translatePosMatrix(xt.posMatrix,Mt,f.paint.get("fill-extrusion-translate"),f.paint.get("fill-extrusion-translate-anchor")),Yt=f.paint.get("fill-extrusion-vertical-gradient"),da=Ge?vr(Kt,R,Yt,ct,xt,rt,Mt):ar(Kt,R,Yt,ct);Jt.draw(fe,fe.gl.TRIANGLES,V,J,oe,xi.backCCW,da,jt,f.id,Tt.layoutVertexBuffer,Tt.indexBuffer,Tt.segments,f.paint,R.transform.zoom,Et,R.style.map.terrain&&Tt.centroidVertexBuffer)}}function kc(R,u,f,D,V,J,oe){const fe=R.context,xe=fe.gl,Ee=f.fbo;if(!Ee)return;const Fe=R.useProgram("hillshade"),Ge=R.style.map.terrain&&R.style.map.terrain.getTerrainData(u);fe.activeTexture.set(xe.TEXTURE0),xe.bindTexture(xe.TEXTURE_2D,Ee.colorAttachment.get());const rt=Ge?u:null;Fe.draw(fe,xe.TRIANGLES,V,J,oe,xi.disabled,Ra(R,f,D,rt),Ge,D.id,R.rasterBoundsBuffer,R.quadTriangleIndexBuffer,R.rasterBoundsSegments)}function gu(R,u,f,D,V,J){const oe=R.context,fe=oe.gl,xe=u.dem;if(xe&&xe.data){const Ee=xe.dim,Fe=xe.stride,Ge=xe.getPixels();if(oe.activeTexture.set(fe.TEXTURE1),oe.pixelStoreUnpackPremultiplyAlpha.set(!1),u.demTexture=u.demTexture||R.getTileTexture(Fe),u.demTexture){const ct=u.demTexture;ct.update(Ge,{premultiply:!1}),ct.bind(fe.NEAREST,fe.CLAMP_TO_EDGE)}else u.demTexture=new z(oe,Ge,fe.RGBA,{premultiply:!1}),u.demTexture.bind(fe.NEAREST,fe.CLAMP_TO_EDGE);oe.activeTexture.set(fe.TEXTURE0);let rt=u.fbo;if(!rt){const ct=new z(oe,{width:Ee,height:Ee,data:null},fe.RGBA);ct.bind(fe.LINEAR,fe.CLAMP_TO_EDGE),rt=u.fbo=oe.createFramebuffer(Ee,Ee,!0,!1),rt.colorAttachment.set(ct.texture)}oe.bindFramebuffer.set(rt.framebuffer),oe.viewport.set([0,0,Ee,Ee]),R.useProgram("hillshadePrepare").draw(oe,fe.TRIANGLES,D,V,J,xi.disabled,Ia(u.tileID,xe),null,f.id,R.rasterBoundsBuffer,R.quadTriangleIndexBuffer,R.rasterBoundsSegments),u.needsHillshadePrepare=!1}}function As(R,u,f,D,V,J){const oe=D.paint.get("raster-fade-duration");if(!J&&oe>0){const fe=h.now(),xe=(fe-R.timeAdded)/oe,Ee=u?(fe-u.timeAdded)/oe:-1,Fe=f.getSource(),Ge=V.coveringZoomLevel({tileSize:Fe.tileSize,roundZoom:Fe.roundZoom}),rt=!u||Math.abs(u.tileID.overscaledZ-Ge)>Math.abs(R.tileID.overscaledZ-Ge),ct=rt&&R.refreshedUponExpiration?1:r.ad(rt?xe:1-Ee,0,1);return R.refreshedUponExpiration&&xe>=1&&(R.refreshedUponExpiration=!1),u?{opacity:1,mix:1-ct}:{opacity:ct,mix:0}}return{opacity:1,mix:0}}const Hs=new r.aN(1,0,0,1),Dl=new r.aN(0,1,0,1),Es=new r.aN(0,0,1,1),ti=new r.aN(1,0,1,1),Wc=new r.aN(0,1,1,1);function qc(R){const u=R.transform.padding;zc(R,R.transform.height-(u.top||0),3,Hs),zc(R,u.bottom||0,3,Dl),Lo(R,u.left||0,3,Es),Lo(R,R.transform.width-(u.right||0),3,ti);const f=R.transform.centerPoint;(function(D,V,J,oe){Sc(D,V-1,J-10,2,20,oe),Sc(D,V-10,J-1,20,2,oe)})(R,f.x,R.transform.height-f.y,Wc)}function zc(R,u,f,D){Sc(R,0,u+f/2,R.transform.width,f,D)}function Lo(R,u,f,D){Sc(R,u-f/2,0,f,R.transform.height,D)}function Sc(R,u,f,D,V,J){const oe=R.context,fe=oe.gl;fe.enable(fe.SCISSOR_TEST),fe.scissor(u*R.pixelRatio,f*R.pixelRatio,D*R.pixelRatio,V*R.pixelRatio),oe.clear({color:J}),fe.disable(fe.SCISSOR_TEST)}function Su(R,u,f){const D=R.context,V=D.gl,J=f.posMatrix,oe=R.useProgram("debug"),fe=qn.disabled,xe=_i.disabled,Ee=R.colorModeForRenderPass(),Fe="$debug",Ge=R.style.map.terrain&&R.style.map.terrain.getTerrainData(f);D.activeTexture.set(V.TEXTURE0);const rt=u.getTileByID(f.key).latestRawTileData,ct=rt&&rt.byteLength||0,pt=Math.floor(ct/1024),xt=u.getTile(f).tileSize,Mt=512/Math.min(xt,512)*(f.overscaledZ/R.transform.zoom)*.5;let Tt=f.canonical.toString();f.overscaledZ!==f.canonical.z&&(Tt+=` => ${f.overscaledZ}`),function(jt,Et){jt.initDebugOverlayCanvas();const Jt=jt.debugOverlayCanvas,Kt=jt.context.gl,Yt=jt.debugOverlayCanvas.getContext("2d");Yt.clearRect(0,0,Jt.width,Jt.height),Yt.shadowColor="white",Yt.shadowBlur=2,Yt.lineWidth=1.5,Yt.strokeStyle="white",Yt.textBaseline="top",Yt.font="bold 36px Open Sans, sans-serif",Yt.fillText(Et,5,5),Yt.strokeText(Et,5,5),jt.debugOverlayTexture.update(Jt),jt.debugOverlayTexture.bind(Kt.LINEAR,Kt.CLAMP_TO_EDGE)}(R,`${Tt} ${pt}kB`),oe.draw(D,V.TRIANGLES,fe,xe,Qi.alphaBlended,xi.disabled,fa(J,r.aN.transparent,Mt),null,Fe,R.debugBuffer,R.quadTriangleIndexBuffer,R.debugSegments),oe.draw(D,V.LINE_STRIP,fe,xe,Ee,xi.disabled,fa(J,r.aN.red),Ge,Fe,R.debugBuffer,R.tileBorderIndexBuffer,R.debugSegments)}function lc(R,u,f){const D=R.context,V=D.gl,J=R.colorModeForRenderPass(),oe=new qn(V.LEQUAL,qn.ReadWrite,R.depthRangeFor3D),fe=R.useProgram("terrain"),xe=u.getTerrainMesh();D.bindFramebuffer.set(null),D.viewport.set([0,0,R.width,R.height]);for(const Ee of f){const Fe=R.renderToTexture.getTexture(Ee),Ge=u.getTerrainData(Ee.tileID);D.activeTexture.set(V.TEXTURE0),V.bindTexture(V.TEXTURE_2D,Fe.texture);const rt=R.transform.calculatePosMatrix(Ee.tileID.toUnwrapped()),ct=u.getMeshFrameDelta(R.transform.zoom),pt=R.transform.calculateFogMatrix(Ee.tileID.toUnwrapped()),xt=va(rt,ct,pt,R.style.sky,R.transform.pitch);fe.draw(D,V.TRIANGLES,oe,_i.disabled,J,xi.backCCW,xt,Ge,"terrain",xe.vertexBuffer,xe.indexBuffer,xe.segments)}}class cc{constructor(u,f,D){this.vertexBuffer=u,this.indexBuffer=f,this.segments=D}destroy(){this.vertexBuffer.destroy(),this.indexBuffer.destroy(),this.segments.destroy(),this.vertexBuffer=null,this.indexBuffer=null,this.segments=null}}class uc{constructor(u,f){this.context=new _c(u),this.transform=f,this._tileTextures={},this.terrainFacilitator={dirty:!0,matrix:r.ao(new Float64Array(16)),renderTime:0},this.setup(),this.numSublayers=We.maxUnderzooming+We.maxOverzooming+1,this.depthEpsilon=1/Math.pow(2,16),this.crossTileSymbolIndex=new er}resize(u,f,D){if(this.width=Math.floor(u*D),this.height=Math.floor(f*D),this.pixelRatio=D,this.context.viewport.set([0,0,this.width,this.height]),this.style)for(const V of this.style._order)this.style._layers[V].resize()}setup(){const u=this.context,f=new r.aX;f.emplaceBack(0,0),f.emplaceBack(r.X,0),f.emplaceBack(0,r.X),f.emplaceBack(r.X,r.X),this.tileExtentBuffer=u.createVertexBuffer(f,yr.members),this.tileExtentSegments=r.a0.simpleSegment(0,0,4,2);const D=new r.aX;D.emplaceBack(0,0),D.emplaceBack(r.X,0),D.emplaceBack(0,r.X),D.emplaceBack(r.X,r.X),this.debugBuffer=u.createVertexBuffer(D,yr.members),this.debugSegments=r.a0.simpleSegment(0,0,4,5);const V=new r.$;V.emplaceBack(0,0,0,0),V.emplaceBack(r.X,0,r.X,0),V.emplaceBack(0,r.X,0,r.X),V.emplaceBack(r.X,r.X,r.X,r.X),this.rasterBoundsBuffer=u.createVertexBuffer(V,Ve.members),this.rasterBoundsSegments=r.a0.simpleSegment(0,0,4,2);const J=new r.aX;J.emplaceBack(0,0),J.emplaceBack(1,0),J.emplaceBack(0,1),J.emplaceBack(1,1),this.viewportBuffer=u.createVertexBuffer(J,yr.members),this.viewportSegments=r.a0.simpleSegment(0,0,4,2);const oe=new r.aZ;oe.emplaceBack(0),oe.emplaceBack(1),oe.emplaceBack(3),oe.emplaceBack(2),oe.emplaceBack(0),this.tileBorderIndexBuffer=u.createIndexBuffer(oe);const fe=new r.aY;fe.emplaceBack(0,1,2),fe.emplaceBack(2,1,3),this.quadTriangleIndexBuffer=u.createIndexBuffer(fe);const xe=this.context.gl;this.stencilClearMode=new _i({func:xe.ALWAYS,mask:0},0,255,xe.ZERO,xe.ZERO,xe.ZERO)}clearStencil(){const u=this.context,f=u.gl;this.nextStencilID=1,this.currentStencilSource=void 0;const D=r.H();r.aQ(D,0,this.width,this.height,0,0,1),r.K(D,D,[f.drawingBufferWidth,f.drawingBufferHeight,0]),this.useProgram("clippingMask").draw(u,f.TRIANGLES,qn.disabled,this.stencilClearMode,Qi.disabled,xi.disabled,Oa(D),null,"$clipping",this.viewportBuffer,this.quadTriangleIndexBuffer,this.viewportSegments)}_renderTileClippingMasks(u,f){if(this.currentStencilSource===u.source||!u.isTileClipped()||!f||!f.length)return;this.currentStencilSource=u.source;const D=this.context,V=D.gl;this.nextStencilID+f.length>256&&this.clearStencil(),D.setColorMode(Qi.disabled),D.setDepthMode(qn.disabled);const J=this.useProgram("clippingMask");this._tileClippingMaskIDs={};for(const oe of f){const fe=this._tileClippingMaskIDs[oe.key]=this.nextStencilID++,xe=this.style.map.terrain&&this.style.map.terrain.getTerrainData(oe);J.draw(D,V.TRIANGLES,qn.disabled,new _i({func:V.ALWAYS,mask:0},fe,255,V.KEEP,V.KEEP,V.REPLACE),Qi.disabled,xi.disabled,Oa(oe.posMatrix),xe,"$clipping",this.tileExtentBuffer,this.quadTriangleIndexBuffer,this.tileExtentSegments)}}stencilModeFor3D(){this.currentStencilSource=void 0,this.nextStencilID+1>256&&this.clearStencil();const u=this.nextStencilID++,f=this.context.gl;return new _i({func:f.NOTEQUAL,mask:255},u,255,f.KEEP,f.KEEP,f.REPLACE)}stencilModeForClipping(u){const f=this.context.gl;return new _i({func:f.EQUAL,mask:255},this._tileClippingMaskIDs[u.key],0,f.KEEP,f.KEEP,f.REPLACE)}stencilConfigForOverlap(u){const f=this.context.gl,D=u.sort((oe,fe)=>fe.overscaledZ-oe.overscaledZ),V=D[D.length-1].overscaledZ,J=D[0].overscaledZ-V+1;if(J>1){this.currentStencilSource=void 0,this.nextStencilID+J>256&&this.clearStencil();const oe={};for(let fe=0;fe<J;fe++)oe[fe+V]=new _i({func:f.GEQUAL,mask:255},fe+this.nextStencilID,255,f.KEEP,f.KEEP,f.REPLACE);return this.nextStencilID+=J,[oe,D]}return[{[V]:_i.disabled},D]}colorModeForRenderPass(){const u=this.context.gl;return this._showOverdrawInspector?new Qi([u.CONSTANT_COLOR,u.ONE],new r.aN(.125,.125,.125,0),[!0,!0,!0,!0]):this.renderPass==="opaque"?Qi.unblended:Qi.alphaBlended}depthModeForSublayer(u,f,D){if(!this.opaquePassEnabledForLayer())return qn.disabled;const V=1-((1+this.currentLayer)*this.numSublayers+u)*this.depthEpsilon;return new qn(D||this.context.gl.LEQUAL,f,[V,V])}opaquePassEnabledForLayer(){return this.currentLayer<this.opaquePassCutoff}render(u,f){var D;this.style=u,this.options=f,this.lineAtlas=u.lineAtlas,this.imageManager=u.imageManager,this.glyphManager=u.glyphManager,this.symbolFadeChange=u.placement.symbolFadeChange(h.now()),this.imageManager.beginFrame();const V=this.style._order,J=this.style.sourceCaches,oe={},fe={},xe={};for(const Ee in J){const Fe=J[Ee];Fe.used&&Fe.prepare(this.context),oe[Ee]=Fe.getVisibleCoordinates(),fe[Ee]=oe[Ee].slice().reverse(),xe[Ee]=Fe.getVisibleCoordinates(!0).reverse()}this.opaquePassCutoff=1/0;for(let Ee=0;Ee<V.length;Ee++){const Fe=V[Ee];if(this.style._layers[Fe].is3D()){this.opaquePassCutoff=Ee;break}}this.maybeDrawDepthAndCoords(!1),this.renderToTexture&&(this.renderToTexture.prepareForRender(this.style,this.transform.zoom),this.opaquePassCutoff=0),this.renderPass="offscreen";for(const Ee of V){const Fe=this.style._layers[Ee];if(!Fe.hasOffscreenPass()||Fe.isHidden(this.transform.zoom))continue;const Ge=fe[Fe.source];(Fe.type==="custom"||Ge.length)&&this.renderLayer(this,J[Fe.source],Fe,Ge)}if(this.context.bindFramebuffer.set(null),this.context.clear({color:f.showOverdrawInspector?r.aN.black:r.aN.transparent,depth:1}),this.clearStencil(),!((D=this.style.stylesheet)===null||D===void 0)&&D.sky&&function(Ee,Fe){const Ge=Ee.context,rt=Ge.gl,ct=((jt,Et,Jt)=>({u_sky_color:jt.properties.get("sky-color"),u_horizon_color:jt.properties.get("horizon-color"),u_horizon:(Et.height/2+Et.getHorizon())*Jt,u_sky_horizon_blend:jt.properties.get("sky-horizon-blend")*Et.height/2*Jt}))(Fe,Ee.style.map.transform,Ee.pixelRatio),pt=new qn(rt.LEQUAL,qn.ReadWrite,[0,1]),xt=_i.disabled,Mt=Ee.colorModeForRenderPass(),Tt=Ee.useProgram("sky");if(!Fe.mesh){const jt=new r.aX;jt.emplaceBack(-1,-1),jt.emplaceBack(1,-1),jt.emplaceBack(1,1),jt.emplaceBack(-1,1);const Et=new r.aY;Et.emplaceBack(0,1,2),Et.emplaceBack(0,2,3),Fe.mesh=new cc(Ge.createVertexBuffer(jt,yr.members),Ge.createIndexBuffer(Et),r.a0.simpleSegment(0,0,jt.length,Et.length))}Tt.draw(Ge,rt.TRIANGLES,pt,xt,Mt,xi.disabled,ct,void 0,"sky",Fe.mesh.vertexBuffer,Fe.mesh.indexBuffer,Fe.mesh.segments)}(this,this.style.sky),this._showOverdrawInspector=f.showOverdrawInspector,this.depthRangeFor3D=[0,1-(u._order.length+2)*this.numSublayers*this.depthEpsilon],!this.renderToTexture)for(this.renderPass="opaque",this.currentLayer=V.length-1;this.currentLayer>=0;this.currentLayer--){const Ee=this.style._layers[V[this.currentLayer]],Fe=J[Ee.source],Ge=oe[Ee.source];this._renderTileClippingMasks(Ee,Ge),this.renderLayer(this,Fe,Ee,Ge)}for(this.renderPass="translucent",this.currentLayer=0;this.currentLayer<V.length;this.currentLayer++){const Ee=this.style._layers[V[this.currentLayer]],Fe=J[Ee.source];if(this.renderToTexture&&this.renderToTexture.renderLayer(Ee))continue;const Ge=(Ee.type==="symbol"?xe:fe)[Ee.source];this._renderTileClippingMasks(Ee,oe[Ee.source]),this.renderLayer(this,Fe,Ee,Ge)}if(this.options.showTileBoundaries){const Ee=function(Fe,Ge){let rt=null;const ct=Object.values(Fe._layers).flatMap(Tt=>Tt.source&&!Tt.isHidden(Ge)?[Fe.sourceCaches[Tt.source]]:[]),pt=ct.filter(Tt=>Tt.getSource().type==="vector"),xt=ct.filter(Tt=>Tt.getSource().type!=="vector"),Mt=Tt=>{(!rt||rt.getSource().maxzoom<Tt.getSource().maxzoom)&&(rt=Tt)};return pt.forEach(Tt=>Mt(Tt)),rt||xt.forEach(Tt=>Mt(Tt)),rt}(this.style,this.transform.zoom);Ee&&function(Fe,Ge,rt){for(let ct=0;ct<rt.length;ct++)Su(Fe,Ge,rt[ct])}(this,Ee,Ee.getVisibleCoordinates())}this.options.showPadding&&qc(this),this.context.setDefault()}maybeDrawDepthAndCoords(u){if(!this.style||!this.style.map||!this.style.map.terrain)return;const f=this.terrainFacilitator.matrix,D=this.transform.modelViewProjectionMatrix;let V=this.terrainFacilitator.dirty;V||(V=u?!r.a_(f,D):!r.a$(f,D)),V||(V=this.style.map.terrain.sourceCache.tilesAfterTime(this.terrainFacilitator.renderTime).length>0),V&&(r.b0(f,D),this.terrainFacilitator.renderTime=Date.now(),this.terrainFacilitator.dirty=!1,function(J,oe){const fe=J.context,xe=fe.gl,Ee=Qi.unblended,Fe=new qn(xe.LEQUAL,qn.ReadWrite,[0,1]),Ge=oe.getTerrainMesh(),rt=oe.sourceCache.getRenderableTiles(),ct=J.useProgram("terrainDepth");fe.bindFramebuffer.set(oe.getFramebuffer("depth").framebuffer),fe.viewport.set([0,0,J.width/devicePixelRatio,J.height/devicePixelRatio]),fe.clear({color:r.aN.transparent,depth:1});for(const pt of rt){const xt=oe.getTerrainData(pt.tileID),Mt={u_matrix:J.transform.calculatePosMatrix(pt.tileID.toUnwrapped()),u_ele_delta:oe.getMeshFrameDelta(J.transform.zoom)};ct.draw(fe,xe.TRIANGLES,Fe,_i.disabled,Ee,xi.backCCW,Mt,xt,"terrain",Ge.vertexBuffer,Ge.indexBuffer,Ge.segments)}fe.bindFramebuffer.set(null),fe.viewport.set([0,0,J.width,J.height])}(this,this.style.map.terrain),function(J,oe){const fe=J.context,xe=fe.gl,Ee=Qi.unblended,Fe=new qn(xe.LEQUAL,qn.ReadWrite,[0,1]),Ge=oe.getTerrainMesh(),rt=oe.getCoordsTexture(),ct=oe.sourceCache.getRenderableTiles(),pt=J.useProgram("terrainCoords");fe.bindFramebuffer.set(oe.getFramebuffer("coords").framebuffer),fe.viewport.set([0,0,J.width/devicePixelRatio,J.height/devicePixelRatio]),fe.clear({color:r.aN.transparent,depth:1}),oe.coordsIndex=[];for(const xt of ct){const Mt=oe.getTerrainData(xt.tileID);fe.activeTexture.set(xe.TEXTURE0),xe.bindTexture(xe.TEXTURE_2D,rt.texture);const Tt={u_matrix:J.transform.calculatePosMatrix(xt.tileID.toUnwrapped()),u_terrain_coords_id:(255-oe.coordsIndex.length)/255,u_texture:0,u_ele_delta:oe.getMeshFrameDelta(J.transform.zoom)};pt.draw(fe,xe.TRIANGLES,Fe,_i.disabled,Ee,xi.backCCW,Tt,Mt,"terrain",Ge.vertexBuffer,Ge.indexBuffer,Ge.segments),oe.coordsIndex.push(xt.tileID.key)}fe.bindFramebuffer.set(null),fe.viewport.set([0,0,J.width,J.height])}(this,this.style.map.terrain))}renderLayer(u,f,D,V){if(!D.isHidden(this.transform.zoom)&&(D.type==="background"||D.type==="custom"||(V||[]).length))switch(this.id=D.id,D.type){case"symbol":Bl(u,f,D,V,this.style.placement.variableOffsets);break;case"circle":(function(J,oe,fe,xe){if(J.renderPass!=="translucent")return;const Ee=fe.paint.get("circle-opacity"),Fe=fe.paint.get("circle-stroke-width"),Ge=fe.paint.get("circle-stroke-opacity"),rt=!fe.layout.get("circle-sort-key").isConstant();if(Ee.constantOr(1)===0&&(Fe.constantOr(1)===0||Ge.constantOr(1)===0))return;const ct=J.context,pt=ct.gl,xt=J.depthModeForSublayer(0,qn.ReadOnly),Mt=_i.disabled,Tt=J.colorModeForRenderPass(),jt=[];for(let Et=0;Et<xe.length;Et++){const Jt=xe[Et],Kt=oe.getTile(Jt),Yt=Kt.getBucket(fe);if(!Yt)continue;const da=Yt.programConfigurations.get(fe.id),_a=J.useProgram("circle",da),Da=Yt.layoutVertexBuffer,Na=Yt.indexBuffer,Ga=J.style.map.terrain&&J.style.map.terrain.getTerrainData(Jt),$a={programConfiguration:da,program:_a,layoutVertexBuffer:Da,indexBuffer:Na,uniformValues:Ua(J,Jt,Kt,fe),terrainData:Ga};if(rt){const gr=Yt.segments.get();for(const Qa of gr)jt.push({segments:new r.a0([Qa]),sortKey:Qa.sortKey,state:$a})}else jt.push({segments:Yt.segments,sortKey:0,state:$a})}rt&&jt.sort((Et,Jt)=>Et.sortKey-Jt.sortKey);for(const Et of jt){const{programConfiguration:Jt,program:Kt,layoutVertexBuffer:Yt,indexBuffer:da,uniformValues:_a,terrainData:Da}=Et.state,Na=Et.segments;Kt.draw(ct,pt.TRIANGLES,xt,Mt,Tt,xi.disabled,_a,Da,fe.id,Yt,da,Na,fe.paint,J.transform.zoom,Jt)}})(u,f,D,V);break;case"heatmap":zl(u,f,D,V);break;case"line":(function(J,oe,fe,xe){if(J.renderPass!=="translucent")return;const Ee=fe.paint.get("line-opacity"),Fe=fe.paint.get("line-width");if(Ee.constantOr(1)===0||Fe.constantOr(1)===0)return;const Ge=J.depthModeForSublayer(0,qn.ReadOnly),rt=J.colorModeForRenderPass(),ct=fe.paint.get("line-dasharray"),pt=fe.paint.get("line-pattern"),xt=pt.constantOr(1),Mt=fe.paint.get("line-gradient"),Tt=fe.getCrossfadeParameters(),jt=xt?"linePattern":ct?"lineSDF":Mt?"lineGradient":"line",Et=J.context,Jt=Et.gl;let Kt=!0;for(const Yt of xe){const da=oe.getTile(Yt);if(xt&&!da.patternsLoaded())continue;const _a=da.getBucket(fe);if(!_a)continue;const Da=_a.programConfigurations.get(fe.id),Na=J.context.program.get(),Ga=J.useProgram(jt,Da),$a=Kt||Ga.program!==Na,gr=J.style.map.terrain&&J.style.map.terrain.getTerrainData(Yt),Qa=pt.constantOr(null);if(Qa&&da.imageAtlas){const Sr=da.imageAtlas,pr=Sr.patternPositions[Qa.to.toString()],Mr=Sr.patternPositions[Qa.from.toString()];pr&&Mr&&Da.setConstantPatternPositions(pr,Mr)}const xr=gr?Yt:null,nr=xt?Ja(J,da,fe,Tt,xr):ct?lr(J,da,fe,ct,Tt,xr):Mt?Sa(J,da,fe,_a.lineClipsArray.length,xr):oa(J,da,fe,xr);if(xt)Et.activeTexture.set(Jt.TEXTURE0),da.imageAtlasTexture.bind(Jt.LINEAR,Jt.CLAMP_TO_EDGE),Da.updatePaintBuffers(Tt);else if(ct&&($a||J.lineAtlas.dirty))Et.activeTexture.set(Jt.TEXTURE0),J.lineAtlas.bind(Et);else if(Mt){const Sr=_a.gradients[fe.id];let pr=Sr.texture;if(fe.gradientVersion!==Sr.version){let Mr=256;if(fe.stepInterpolant){const Wr=oe.getSource().maxzoom,Er=Yt.canonical.z===Wr?Math.ceil(1<<J.transform.maxZoom-Yt.canonical.z):1,Gr=_a.maxLineLength/r.X*1024*Er;Mr=r.ad(r.aV(Gr),256,Et.maxTextureSize)}Sr.gradient=r.aW({expression:fe.gradientExpression(),evaluationKey:"lineProgress",resolution:Mr,image:Sr.gradient||void 0,clips:_a.lineClipsArray}),Sr.texture?Sr.texture.update(Sr.gradient):Sr.texture=new z(Et,Sr.gradient,Jt.RGBA),Sr.version=fe.gradientVersion,pr=Sr.texture}Et.activeTexture.set(Jt.TEXTURE0),pr.bind(fe.stepInterpolant?Jt.NEAREST:Jt.LINEAR,Jt.CLAMP_TO_EDGE)}Ga.draw(Et,Jt.TRIANGLES,Ge,J.stencilModeForClipping(Yt),rt,xi.disabled,nr,gr,fe.id,_a.layoutVertexBuffer,_a.indexBuffer,_a.segments,fe.paint,J.transform.zoom,Da,_a.layoutVertexBuffer2),Kt=!1}})(u,f,D,V);break;case"fill":(function(J,oe,fe,xe){const Ee=fe.paint.get("fill-color"),Fe=fe.paint.get("fill-opacity");if(Fe.constantOr(1)===0)return;const Ge=J.colorModeForRenderPass(),rt=fe.paint.get("fill-pattern"),ct=J.opaquePassEnabledForLayer()&&!rt.constantOr(1)&&Ee.constantOr(r.aN.transparent).a===1&&Fe.constantOr(0)===1?"opaque":"translucent";if(J.renderPass===ct){const pt=J.depthModeForSublayer(1,J.renderPass==="opaque"?qn.ReadWrite:qn.ReadOnly);Bc(J,oe,fe,xe,pt,Ge,!1)}if(J.renderPass==="translucent"&&fe.paint.get("fill-antialias")){const pt=J.depthModeForSublayer(fe.getPaintProperty("fill-outline-color")?2:0,qn.ReadOnly);Bc(J,oe,fe,xe,pt,Ge,!0)}})(u,f,D,V);break;case"fill-extrusion":(function(J,oe,fe,xe){const Ee=fe.paint.get("fill-extrusion-opacity");if(Ee!==0&&J.renderPass==="translucent"){const Fe=new qn(J.context.gl.LEQUAL,qn.ReadWrite,J.depthRangeFor3D);if(Ee!==1||fe.paint.get("fill-extrusion-pattern").constantOr(1))wc(J,oe,fe,xe,Fe,_i.disabled,Qi.disabled),wc(J,oe,fe,xe,Fe,J.stencilModeFor3D(),J.colorModeForRenderPass());else{const Ge=J.colorModeForRenderPass();wc(J,oe,fe,xe,Fe,_i.disabled,Ge)}}})(u,f,D,V);break;case"hillshade":(function(J,oe,fe,xe){if(J.renderPass!=="offscreen"&&J.renderPass!=="translucent")return;const Ee=J.context,Fe=J.depthModeForSublayer(0,qn.ReadOnly),Ge=J.colorModeForRenderPass(),[rt,ct]=J.renderPass==="translucent"?J.stencilConfigForOverlap(xe):[{},xe];for(const pt of ct){const xt=oe.getTile(pt);xt.needsHillshadePrepare!==void 0&&xt.needsHillshadePrepare&&J.renderPass==="offscreen"?gu(J,xt,fe,Fe,_i.disabled,Ge):J.renderPass==="translucent"&&kc(J,pt,xt,fe,Fe,rt[pt.overscaledZ],Ge)}Ee.viewport.set([0,0,J.width,J.height])})(u,f,D,V);break;case"raster":(function(J,oe,fe,xe){if(J.renderPass!=="translucent"||fe.paint.get("raster-opacity")===0||!xe.length)return;const Ee=J.context,Fe=Ee.gl,Ge=oe.getSource(),rt=J.useProgram("raster"),ct=J.colorModeForRenderPass(),[pt,xt]=Ge instanceof Ie?[{},xe]:J.stencilConfigForOverlap(xe),Mt=xt[xt.length-1].overscaledZ,Tt=!J.options.moving;for(const jt of xt){const Et=J.depthModeForSublayer(jt.overscaledZ-Mt,fe.paint.get("raster-opacity")===1?qn.ReadWrite:qn.ReadOnly,Fe.LESS),Jt=oe.getTile(jt);Jt.registerFadeDuration(fe.paint.get("raster-fade-duration"));const Kt=oe.findLoadedParent(jt,0),Yt=oe.findLoadedSibling(jt),da=As(Jt,Kt||Yt||null,oe,fe,J.transform,J.style.map.terrain);let _a,Da;const Na=fe.paint.get("raster-resampling")==="nearest"?Fe.NEAREST:Fe.LINEAR;Ee.activeTexture.set(Fe.TEXTURE0),Jt.texture.bind(Na,Fe.CLAMP_TO_EDGE,Fe.LINEAR_MIPMAP_NEAREST),Ee.activeTexture.set(Fe.TEXTURE1),Kt?(Kt.texture.bind(Na,Fe.CLAMP_TO_EDGE,Fe.LINEAR_MIPMAP_NEAREST),_a=Math.pow(2,Kt.tileID.overscaledZ-Jt.tileID.overscaledZ),Da=[Jt.tileID.canonical.x*_a%1,Jt.tileID.canonical.y*_a%1]):Jt.texture.bind(Na,Fe.CLAMP_TO_EDGE,Fe.LINEAR_MIPMAP_NEAREST),Jt.texture.useMipmap&&Ee.extTextureFilterAnisotropic&&J.transform.pitch>20&&Fe.texParameterf(Fe.TEXTURE_2D,Ee.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,Ee.extTextureFilterAnisotropicMax);const Ga=J.style.map.terrain&&J.style.map.terrain.getTerrainData(jt),$a=Ga?jt:null,gr=$a?$a.posMatrix:J.transform.calculatePosMatrix(jt.toUnwrapped(),Tt),Qa=Ar(gr,Da||[0,0],_a||1,da,fe);Ge instanceof Ie?rt.draw(Ee,Fe.TRIANGLES,Et,_i.disabled,ct,xi.disabled,Qa,Ga,fe.id,Ge.boundsBuffer,J.quadTriangleIndexBuffer,Ge.boundsSegments):rt.draw(Ee,Fe.TRIANGLES,Et,pt[jt.overscaledZ],ct,xi.disabled,Qa,Ga,fe.id,J.rasterBoundsBuffer,J.quadTriangleIndexBuffer,J.rasterBoundsSegments)}})(u,f,D,V);break;case"background":(function(J,oe,fe,xe){const Ee=fe.paint.get("background-color"),Fe=fe.paint.get("background-opacity");if(Fe===0)return;const Ge=J.context,rt=Ge.gl,ct=J.transform,pt=ct.tileSize,xt=fe.paint.get("background-pattern");if(J.isPatternMissing(xt))return;const Mt=!xt&&Ee.a===1&&Fe===1&&J.opaquePassEnabledForLayer()?"opaque":"translucent";if(J.renderPass!==Mt)return;const Tt=_i.disabled,jt=J.depthModeForSublayer(0,Mt==="opaque"?qn.ReadWrite:qn.ReadOnly),Et=J.colorModeForRenderPass(),Jt=J.useProgram(xt?"backgroundPattern":"background"),Kt=xe||ct.coveringTiles({tileSize:pt,terrain:J.style.map.terrain});xt&&(Ge.activeTexture.set(rt.TEXTURE0),J.imageManager.bind(J.context));const Yt=fe.getCrossfadeParameters();for(const da of Kt){const _a=xe?da.posMatrix:J.transform.calculatePosMatrix(da.toUnwrapped()),Da=xt?Kr(_a,Fe,J,xt,{tileID:da,tileSize:pt},Yt):Or(_a,Fe,Ee),Na=J.style.map.terrain&&J.style.map.terrain.getTerrainData(da);Jt.draw(Ge,rt.TRIANGLES,jt,Tt,Et,xi.disabled,Da,Na,fe.id,J.tileExtentBuffer,J.quadTriangleIndexBuffer,J.tileExtentSegments)}})(u,0,D,V);break;case"custom":(function(J,oe,fe){const xe=J.context,Ee=fe.implementation;if(J.renderPass==="offscreen"){const Fe=Ee.prerender;Fe&&(J.setCustomLayerDefaults(),xe.setColorMode(J.colorModeForRenderPass()),Fe.call(Ee,xe.gl,J.transform.customLayerMatrix()),xe.setDirty(),J.setBaseState())}else if(J.renderPass==="translucent"){J.setCustomLayerDefaults(),xe.setColorMode(J.colorModeForRenderPass()),xe.setStencilMode(_i.disabled);const Fe=Ee.renderingMode==="3d"?new qn(J.context.gl.LEQUAL,qn.ReadWrite,J.depthRangeFor3D):J.depthModeForSublayer(0,qn.ReadOnly);xe.setDepthMode(Fe),Ee.render(xe.gl,J.transform.customLayerMatrix(),{farZ:J.transform.farZ,nearZ:J.transform.nearZ,fov:J.transform._fov,modelViewProjectionMatrix:J.transform.modelViewProjectionMatrix,projectionMatrix:J.transform.projectionMatrix}),xe.setDirty(),J.setBaseState(),xe.bindFramebuffer.set(null)}})(u,0,D)}}translatePosMatrix(u,f,D,V,J){if(!D[0]&&!D[1])return u;const oe=J?V==="map"?this.transform.angle:0:V==="viewport"?-this.transform.angle:0;if(oe){const Ee=Math.sin(oe),Fe=Math.cos(oe);D=[D[0]*Fe-D[1]*Ee,D[0]*Ee+D[1]*Fe]}const fe=[J?D[0]:St(f,D[0],this.transform.zoom),J?D[1]:St(f,D[1],this.transform.zoom),0],xe=new Float32Array(16);return r.J(xe,u,fe),xe}saveTileTexture(u){const f=this._tileTextures[u.size[0]];f?f.push(u):this._tileTextures[u.size[0]]=[u]}getTileTexture(u){const f=this._tileTextures[u];return f&&f.length>0?f.pop():null}isPatternMissing(u){if(!u)return!1;if(!u.from||!u.to)return!0;const f=this.imageManager.getPattern(u.from.toString()),D=this.imageManager.getPattern(u.to.toString());return!f||!D}useProgram(u,f){this.cache=this.cache||{};const D=u+(f?f.cacheKey:"")+(this._showOverdrawInspector?"/overdraw":"")+(this.style.map.terrain?"/terrain":"");return this.cache[D]||(this.cache[D]=new tr(this.context,br[u],f,jr[u],this._showOverdrawInspector,this.style.map.terrain)),this.cache[D]}setCustomLayerDefaults(){this.context.unbindVAO(),this.context.cullFace.setDefault(),this.context.activeTexture.setDefault(),this.context.pixelStoreUnpack.setDefault(),this.context.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.context.pixelStoreUnpackFlipY.setDefault()}setBaseState(){const u=this.context.gl;this.context.cullFace.set(!1),this.context.viewport.set([0,0,this.width,this.height]),this.context.blendEquation.set(u.FUNC_ADD)}initDebugOverlayCanvas(){if(this.debugOverlayCanvas==null){this.debugOverlayCanvas=document.createElement("canvas"),this.debugOverlayCanvas.width=512,this.debugOverlayCanvas.height=512;const u=this.context.gl;this.debugOverlayTexture=new z(this.context,this.debugOverlayCanvas,u.RGBA)}}destroy(){this.debugOverlayTexture&&this.debugOverlayTexture.destroy()}overLimit(){const{drawingBufferWidth:u,drawingBufferHeight:f}=this.context.gl;return this.width!==u||this.height!==f}}class Zs{constructor(u,f){this.points=u,this.planes=f}static fromInvProjectionMatrix(u,f,D){const V=Math.pow(2,D),J=[[-1,1,-1,1],[1,1,-1,1],[1,-1,-1,1],[-1,-1,-1,1],[-1,1,1,1],[1,1,1,1],[1,-1,1,1],[-1,-1,1,1]].map(fe=>{const xe=1/(fe=r.ag([],fe,u))[3]/f*V;return r.b1(fe,fe,[xe,xe,1/fe[3],xe])}),oe=[[0,1,2],[6,5,4],[0,3,7],[2,1,5],[3,2,6],[0,4,5]].map(fe=>{const xe=function(rt,ct){var pt=ct[0],xt=ct[1],Mt=ct[2],Tt=pt*pt+xt*xt+Mt*Mt;return Tt>0&&(Tt=1/Math.sqrt(Tt)),rt[0]=ct[0]*Tt,rt[1]=ct[1]*Tt,rt[2]=ct[2]*Tt,rt}([],function(rt,ct,pt){var xt=ct[0],Mt=ct[1],Tt=ct[2],jt=pt[0],Et=pt[1],Jt=pt[2];return rt[0]=Mt*Jt-Tt*Et,rt[1]=Tt*jt-xt*Jt,rt[2]=xt*Et-Mt*jt,rt}([],L([],J[fe[0]],J[fe[1]]),L([],J[fe[2]],J[fe[1]]))),Ee=(Fe=xe,Ge=J[fe[1]],-(Fe[0]*Ge[0]+Fe[1]*Ge[1]+Fe[2]*Ge[2]));var Fe,Ge;return xe.concat(Ee)});return new Zs(J,oe)}}class Ms{constructor(u,f){this.min=u,this.max=f,this.center=function(D,V,J){return D[0]=V[0]*J,D[1]=V[1]*J,D[2]=V[2]*J,D}([],function(D,V,J){return D[0]=V[0]+J[0],D[1]=V[1]+J[1],D[2]=V[2]+J[2],D}([],this.min,this.max),.5)}quadrant(u){const f=[u%2==0,u<2],D=A(this.min),V=A(this.max);for(let J=0;J<f.length;J++)D[J]=f[J]?this.min[J]:this.center[J],V[J]=f[J]?this.center[J]:this.max[J];return V[2]=this.max[2],new Ms(D,V)}distanceX(u){return Math.max(Math.min(this.max[0],u[0]),this.min[0])-u[0]}distanceY(u){return Math.max(Math.min(this.max[1],u[1]),this.min[1])-u[1]}intersects(u){const f=[[this.min[0],this.min[1],this.min[2],1],[this.max[0],this.min[1],this.min[2],1],[this.max[0],this.max[1],this.min[2],1],[this.min[0],this.max[1],this.min[2],1],[this.min[0],this.min[1],this.max[2],1],[this.max[0],this.min[1],this.max[2],1],[this.max[0],this.max[1],this.max[2],1],[this.min[0],this.max[1],this.max[2],1]];let D=!0;for(let V=0;V<u.planes.length;V++){const J=u.planes[V];let oe=0;for(let fe=0;fe<f.length;fe++)r.b2(J,f[fe])>=0&&oe++;if(oe===0)return 0;oe!==f.length&&(D=!1)}if(D)return 2;for(let V=0;V<3;V++){let J=Number.MAX_VALUE,oe=-Number.MAX_VALUE;for(let fe=0;fe<u.points.length;fe++){const xe=u.points[fe][V]-this.min[V];J=Math.min(J,xe),oe=Math.max(oe,xe)}if(oe<0||J>this.max[V]-this.min[V])return 0}return 1}}class Nl{constructor(u=0,f=0,D=0,V=0){if(isNaN(u)||u<0||isNaN(f)||f<0||isNaN(D)||D<0||isNaN(V)||V<0)throw new Error("Invalid value for edge-insets, top, bottom, left and right must all be numbers");this.top=u,this.bottom=f,this.left=D,this.right=V}interpolate(u,f,D){return f.top!=null&&u.top!=null&&(this.top=r.z.number(u.top,f.top,D)),f.bottom!=null&&u.bottom!=null&&(this.bottom=r.z.number(u.bottom,f.bottom,D)),f.left!=null&&u.left!=null&&(this.left=r.z.number(u.left,f.left,D)),f.right!=null&&u.right!=null&&(this.right=r.z.number(u.right,f.right,D)),this}getCenter(u,f){const D=r.ad((this.left+u-this.right)/2,0,u),V=r.ad((this.top+f-this.bottom)/2,0,f);return new r.P(D,V)}equals(u){return this.top===u.top&&this.bottom===u.bottom&&this.left===u.left&&this.right===u.right}clone(){return new Nl(this.top,this.bottom,this.left,this.right)}toJSON(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}}}const Cc=85.051129;class di{constructor(u,f,D,V,J){this.tileSize=512,this._renderWorldCopies=J===void 0||!!J,this._minZoom=u||0,this._maxZoom=f||22,this._minPitch=D??0,this._maxPitch=V??60,this.setMaxBounds(),this.width=0,this.height=0,this._center=new r.N(0,0),this._elevation=0,this.zoom=0,this.angle=0,this._fov=.6435011087932844,this._pitch=0,this._unmodified=!0,this._edgeInsets=new Nl,this._posMatrixCache={},this._alignedPosMatrixCache={},this._fogMatrixCache={},this.minElevationForCurrentTile=0}clone(){const u=new di(this._minZoom,this._maxZoom,this._minPitch,this.maxPitch,this._renderWorldCopies);return u.apply(this),u}apply(u){this.tileSize=u.tileSize,this.latRange=u.latRange,this.width=u.width,this.height=u.height,this._center=u._center,this._elevation=u._elevation,this.minElevationForCurrentTile=u.minElevationForCurrentTile,this.zoom=u.zoom,this.angle=u.angle,this._fov=u._fov,this._pitch=u._pitch,this._unmodified=u._unmodified,this._edgeInsets=u._edgeInsets.clone(),this._calcMatrices()}get minZoom(){return this._minZoom}set minZoom(u){this._minZoom!==u&&(this._minZoom=u,this.zoom=Math.max(this.zoom,u))}get maxZoom(){return this._maxZoom}set maxZoom(u){this._maxZoom!==u&&(this._maxZoom=u,this.zoom=Math.min(this.zoom,u))}get minPitch(){return this._minPitch}set minPitch(u){this._minPitch!==u&&(this._minPitch=u,this.pitch=Math.max(this.pitch,u))}get maxPitch(){return this._maxPitch}set maxPitch(u){this._maxPitch!==u&&(this._maxPitch=u,this.pitch=Math.min(this.pitch,u))}get renderWorldCopies(){return this._renderWorldCopies}set renderWorldCopies(u){u===void 0?u=!0:u===null&&(u=!1),this._renderWorldCopies=u}get worldSize(){return this.tileSize*this.scale}get centerOffset(){return this.centerPoint._sub(this.size._div(2))}get size(){return new r.P(this.width,this.height)}get bearing(){return-this.angle/Math.PI*180}set bearing(u){const f=-r.b3(u,-180,180)*Math.PI/180;this.angle!==f&&(this._unmodified=!1,this.angle=f,this._calcMatrices(),this.rotationMatrix=function(){var D=new r.A(4);return r.A!=Float32Array&&(D[1]=0,D[2]=0),D[0]=1,D[3]=1,D}(),function(D,V,J){var oe=V[0],fe=V[1],xe=V[2],Ee=V[3],Fe=Math.sin(J),Ge=Math.cos(J);D[0]=oe*Ge+xe*Fe,D[1]=fe*Ge+Ee*Fe,D[2]=oe*-Fe+xe*Ge,D[3]=fe*-Fe+Ee*Ge}(this.rotationMatrix,this.rotationMatrix,this.angle))}get pitch(){return this._pitch/Math.PI*180}set pitch(u){const f=r.ad(u,this.minPitch,this.maxPitch)/180*Math.PI;this._pitch!==f&&(this._unmodified=!1,this._pitch=f,this._calcMatrices())}get fov(){return this._fov/Math.PI*180}set fov(u){u=Math.max(.01,Math.min(60,u)),this._fov!==u&&(this._unmodified=!1,this._fov=u/180*Math.PI,this._calcMatrices())}get zoom(){return this._zoom}set zoom(u){const f=Math.min(Math.max(u,this.minZoom),this.maxZoom);this._zoom!==f&&(this._unmodified=!1,this._zoom=f,this.tileZoom=Math.max(0,Math.floor(f)),this.scale=this.zoomScale(f),this._constrain(),this._calcMatrices())}get center(){return this._center}set center(u){u.lat===this._center.lat&&u.lng===this._center.lng||(this._unmodified=!1,this._center=u,this._constrain(),this._calcMatrices())}get elevation(){return this._elevation}set elevation(u){u!==this._elevation&&(this._elevation=u,this._constrain(),this._calcMatrices())}get padding(){return this._edgeInsets.toJSON()}set padding(u){this._edgeInsets.equals(u)||(this._unmodified=!1,this._edgeInsets.interpolate(this._edgeInsets,u,1),this._calcMatrices())}get centerPoint(){return this._edgeInsets.getCenter(this.width,this.height)}isPaddingEqual(u){return this._edgeInsets.equals(u)}interpolatePadding(u,f,D){this._unmodified=!1,this._edgeInsets.interpolate(u,f,D),this._constrain(),this._calcMatrices()}coveringZoomLevel(u){const f=(u.roundZoom?Math.round:Math.floor)(this.zoom+this.scaleZoom(this.tileSize/u.tileSize));return Math.max(0,f)}getVisibleUnwrappedCoordinates(u){const f=[new r.b4(0,u)];if(this._renderWorldCopies){const D=this.pointCoordinate(new r.P(0,0)),V=this.pointCoordinate(new r.P(this.width,0)),J=this.pointCoordinate(new r.P(this.width,this.height)),oe=this.pointCoordinate(new r.P(0,this.height)),fe=Math.floor(Math.min(D.x,V.x,J.x,oe.x)),xe=Math.floor(Math.max(D.x,V.x,J.x,oe.x)),Ee=1;for(let Fe=fe-Ee;Fe<=xe+Ee;Fe++)Fe!==0&&f.push(new r.b4(Fe,u))}return f}coveringTiles(u){var f,D;let V=this.coveringZoomLevel(u);const J=V;if(u.minzoom!==void 0&&V<u.minzoom)return[];u.maxzoom!==void 0&&V>u.maxzoom&&(V=u.maxzoom);const oe=this.pointCoordinate(this.getCameraPoint()),fe=r.Z.fromLngLat(this.center),xe=Math.pow(2,V),Ee=[xe*oe.x,xe*oe.y,0],Fe=[xe*fe.x,xe*fe.y,0],Ge=Zs.fromInvProjectionMatrix(this.invModelViewProjectionMatrix,this.worldSize,V);let rt=u.minzoom||0;!u.terrain&&this.pitch<=60&&this._edgeInsets.top<.1&&(rt=V);const ct=u.terrain?2/Math.min(this.tileSize,u.tileSize)*this.tileSize:3,pt=Et=>({aabb:new Ms([Et*xe,0,0],[(Et+1)*xe,xe,0]),zoom:0,x:0,y:0,wrap:Et,fullyVisible:!1}),xt=[],Mt=[],Tt=V,jt=u.reparseOverscaled?J:V;if(this._renderWorldCopies)for(let Et=1;Et<=3;Et++)xt.push(pt(-Et)),xt.push(pt(Et));for(xt.push(pt(0));xt.length>0;){const Et=xt.pop(),Jt=Et.x,Kt=Et.y;let Yt=Et.fullyVisible;if(!Yt){const $a=Et.aabb.intersects(Ge);if($a===0)continue;Yt=$a===2}const da=u.terrain?Ee:Fe,_a=Et.aabb.distanceX(da),Da=Et.aabb.distanceY(da),Na=Math.max(Math.abs(_a),Math.abs(Da)),Ga=ct+(1<<Tt-Et.zoom)-2;if(Et.zoom===Tt||Na>Ga&&Et.zoom>=rt){const $a=Tt-Et.zoom,gr=Ee[0]-.5-(Jt<<$a),Qa=Ee[1]-.5-(Kt<<$a);Mt.push({tileID:new r.S(Et.zoom===Tt?jt:Et.zoom,Et.wrap,Et.zoom,Jt,Kt),distanceSq:T([Fe[0]-.5-Jt,Fe[1]-.5-Kt]),tileDistanceToCamera:Math.sqrt(gr*gr+Qa*Qa)})}else for(let $a=0;$a<4;$a++){const gr=(Jt<<1)+$a%2,Qa=(Kt<<1)+($a>>1),xr=Et.zoom+1;let nr=Et.aabb.quadrant($a);if(u.terrain){const Sr=new r.S(xr,Et.wrap,xr,gr,Qa),pr=u.terrain.getMinMaxElevation(Sr),Mr=(f=pr.minElevation)!==null&&f!==void 0?f:this.elevation,Wr=(D=pr.maxElevation)!==null&&D!==void 0?D:this.elevation;nr=new Ms([nr.min[0],nr.min[1],Mr],[nr.max[0],nr.max[1],Wr])}xt.push({aabb:nr,zoom:xr,x:gr,y:Qa,wrap:Et.wrap,fullyVisible:Yt})}}return Mt.sort((Et,Jt)=>Et.distanceSq-Jt.distanceSq).map(Et=>Et.tileID)}resize(u,f){this.width=u,this.height=f,this.pixelsToGLUnits=[2/u,-2/f],this._constrain(),this._calcMatrices()}get unmodified(){return this._unmodified}zoomScale(u){return Math.pow(2,u)}scaleZoom(u){return Math.log(u)/Math.LN2}project(u){const f=r.ad(u.lat,-85.051129,Cc);return new r.P(r.O(u.lng)*this.worldSize,r.Q(f)*this.worldSize)}unproject(u){return new r.Z(u.x/this.worldSize,u.y/this.worldSize).toLngLat()}get point(){return this.project(this.center)}getCameraPosition(){return{lngLat:this.pointLocation(this.getCameraPoint()),altitude:Math.cos(this._pitch)*this.cameraToCenterDistance/this._pixelPerMeter+this.elevation}}recalculateZoom(u){const f=this.elevation,D=Math.cos(this._pitch)*this.cameraToCenterDistance/this._pixelPerMeter,V=this.pointLocation(this.centerPoint,u),J=u.getElevationForLngLatZoom(V,this.tileZoom);if(!(this.elevation-J))return;const oe=D+f-J,fe=Math.cos(this._pitch)*this.cameraToCenterDistance/oe/r.b5(1,V.lat)/this.tileSize,xe=this.scaleZoom(fe);this._elevation=J,this._center=V,this.zoom=xe}setLocationAtPoint(u,f){const D=this.pointCoordinate(f),V=this.pointCoordinate(this.centerPoint),J=this.locationCoordinate(u),oe=new r.Z(J.x-(D.x-V.x),J.y-(D.y-V.y));this.center=this.coordinateLocation(oe),this._renderWorldCopies&&(this.center=this.center.wrap())}locationPoint(u,f){return f?this.coordinatePoint(this.locationCoordinate(u),f.getElevationForLngLatZoom(u,this.tileZoom),this.pixelMatrix3D):this.coordinatePoint(this.locationCoordinate(u))}pointLocation(u,f){return this.coordinateLocation(this.pointCoordinate(u,f))}locationCoordinate(u){return r.Z.fromLngLat(u)}coordinateLocation(u){return u&&u.toLngLat()}pointCoordinate(u,f){if(f){const pt=f.pointCoordinate(u);if(pt!=null)return pt}const D=[u.x,u.y,0,1],V=[u.x,u.y,1,1];r.ag(D,D,this.pixelMatrixInverse),r.ag(V,V,this.pixelMatrixInverse);const J=D[3],oe=V[3],fe=D[0]/J,xe=V[0]/oe,Ee=D[1]/J,Fe=V[1]/oe,Ge=D[2]/J,rt=V[2]/oe,ct=Ge===rt?0:(0-Ge)/(rt-Ge);return new r.Z(r.z.number(fe,xe,ct)/this.worldSize,r.z.number(Ee,Fe,ct)/this.worldSize)}coordinatePoint(u,f=0,D=this.pixelMatrix){const V=[u.x*this.worldSize,u.y*this.worldSize,f,1];return r.ag(V,V,D),new r.P(V[0]/V[3],V[1]/V[3])}getBounds(){const u=Math.max(0,this.height/2-this.getHorizon());return new Ce().extend(this.pointLocation(new r.P(0,u))).extend(this.pointLocation(new r.P(this.width,u))).extend(this.pointLocation(new r.P(this.width,this.height))).extend(this.pointLocation(new r.P(0,this.height)))}getMaxBounds(){return this.latRange&&this.latRange.length===2&&this.lngRange&&this.lngRange.length===2?new Ce([this.lngRange[0],this.latRange[0]],[this.lngRange[1],this.latRange[1]]):null}getHorizon(){return Math.tan(Math.PI/2-this._pitch)*this.cameraToCenterDistance*.85}setMaxBounds(u){u?(this.lngRange=[u.getWest(),u.getEast()],this.latRange=[u.getSouth(),u.getNorth()],this._constrain()):(this.lngRange=null,this.latRange=[-85.051129,Cc])}calculateTileMatrix(u){const f=u.canonical,D=this.worldSize/this.zoomScale(f.z),V=f.x+Math.pow(2,f.z)*u.wrap,J=r.ao(new Float64Array(16));return r.J(J,J,[V*D,f.y*D,0]),r.K(J,J,[D/r.X,D/r.X,1]),J}calculatePosMatrix(u,f=!1){const D=u.key,V=f?this._alignedPosMatrixCache:this._posMatrixCache;if(V[D])return V[D];const J=this.calculateTileMatrix(u);return r.L(J,f?this.alignedModelViewProjectionMatrix:this.modelViewProjectionMatrix,J),V[D]=new Float32Array(J),V[D]}calculateFogMatrix(u){const f=u.key,D=this._fogMatrixCache;if(D[f])return D[f];const V=this.calculateTileMatrix(u);return r.L(V,this.fogMatrix,V),D[f]=new Float32Array(V),D[f]}customLayerMatrix(){return this.mercatorMatrix.slice()}getConstrained(u,f){f=r.ad(+f,this.minZoom,this.maxZoom);const D={center:new r.N(u.lng,u.lat),zoom:f};let V=this.lngRange;if(!this._renderWorldCopies&&V===null){const Et=179.9999999999;V=[-Et,Et]}const J=this.tileSize*this.zoomScale(D.zoom);let oe=0,fe=J,xe=0,Ee=J,Fe=0,Ge=0;const{x:rt,y:ct}=this.size;if(this.latRange){const Et=this.latRange;oe=r.Q(Et[1])*J,fe=r.Q(Et[0])*J,fe-oe<ct&&(Fe=ct/(fe-oe))}V&&(xe=r.b3(r.O(V[0])*J,0,J),Ee=r.b3(r.O(V[1])*J,0,J),Ee<xe&&(Ee+=J),Ee-xe<rt&&(Ge=rt/(Ee-xe)));const{x:pt,y:xt}=this.project.call({worldSize:J},u);let Mt,Tt;const jt=Math.max(Ge||0,Fe||0);if(jt){const Et=new r.P(Ge?(Ee+xe)/2:pt,Fe?(fe+oe)/2:xt);return D.center=this.unproject.call({worldSize:J},Et).wrap(),D.zoom+=this.scaleZoom(jt),D}if(this.latRange){const Et=ct/2;xt-Et<oe&&(Tt=oe+Et),xt+Et>fe&&(Tt=fe-Et)}if(V){const Et=(xe+Ee)/2;let Jt=pt;this._renderWorldCopies&&(Jt=r.b3(pt,Et-J/2,Et+J/2));const Kt=rt/2;Jt-Kt<xe&&(Mt=xe+Kt),Jt+Kt>Ee&&(Mt=Ee-Kt)}if(Mt!==void 0||Tt!==void 0){const Et=new r.P(Mt??pt,Tt??xt);D.center=this.unproject.call({worldSize:J},Et).wrap()}return D}_constrain(){if(!this.center||!this.width||!this.height||this._constraining)return;this._constraining=!0;const u=this._unmodified,{center:f,zoom:D}=this.getConstrained(this.center,this.zoom);this.center=f,this.zoom=D,this._unmodified=u,this._constraining=!1}_calcMatrices(){if(!this.height)return;const u=this._fov/2,f=this.centerOffset,D=this.point.x,V=this.point.y;this.cameraToCenterDistance=.5/Math.tan(u)*this.height,this._pixelPerMeter=r.b5(1,this.center.lat)*this.worldSize;let J=r.ao(new Float64Array(16));r.K(J,J,[this.width/2,-this.height/2,1]),r.J(J,J,[1,-1,0]),this.labelPlaneMatrix=J,J=r.ao(new Float64Array(16)),r.K(J,J,[1,-1,1]),r.J(J,J,[-1,-1,0]),r.K(J,J,[2/this.width,2/this.height,1]),this.glCoordMatrix=J;const oe=this.cameraToCenterDistance+this._elevation*this._pixelPerMeter/Math.cos(this._pitch),fe=Math.min(this.elevation,this.minElevationForCurrentTile),xe=oe-fe*this._pixelPerMeter/Math.cos(this._pitch),Ee=fe<0?xe:oe,Fe=Math.PI/2+this._pitch,Ge=this._fov*(.5+f.y/this.height),rt=Math.sin(Ge)*Ee/Math.sin(r.ad(Math.PI-Fe-Ge,.01,Math.PI-.01)),ct=this.getHorizon(),pt=2*Math.atan(ct/this.cameraToCenterDistance)*(.5+f.y/(2*ct)),xt=Math.sin(pt)*Ee/Math.sin(r.ad(Math.PI-Fe-pt,.01,Math.PI-.01)),Mt=Math.min(rt,xt);this.farZ=1.01*(Math.cos(Math.PI/2-this._pitch)*Mt+Ee),this.nearZ=this.height/50,J=new Float64Array(16),r.b6(J,this._fov,this.width/this.height,this.nearZ,this.farZ),J[8]=2*-f.x/this.width,J[9]=2*f.y/this.height,this.projectionMatrix=r.af(J),r.K(J,J,[1,-1,1]),r.J(J,J,[0,0,-this.cameraToCenterDistance]),r.b7(J,J,this._pitch),r.ae(J,J,this.angle),r.J(J,J,[-D,-V,0]),this.mercatorMatrix=r.K([],J,[this.worldSize,this.worldSize,this.worldSize]),r.K(J,J,[1,1,this._pixelPerMeter]),this.pixelMatrix=r.L(new Float64Array(16),this.labelPlaneMatrix,J),r.J(J,J,[0,0,-this.elevation]),this.modelViewProjectionMatrix=J,this.invModelViewProjectionMatrix=r.at([],J),this.fogMatrix=new Float64Array(16),r.b6(this.fogMatrix,this._fov,this.width/this.height,oe,this.farZ),this.fogMatrix[8]=2*-f.x/this.width,this.fogMatrix[9]=2*f.y/this.height,r.K(this.fogMatrix,this.fogMatrix,[1,-1,1]),r.J(this.fogMatrix,this.fogMatrix,[0,0,-this.cameraToCenterDistance]),r.b7(this.fogMatrix,this.fogMatrix,this._pitch),r.ae(this.fogMatrix,this.fogMatrix,this.angle),r.J(this.fogMatrix,this.fogMatrix,[-D,-V,0]),r.K(this.fogMatrix,this.fogMatrix,[1,1,this._pixelPerMeter]),r.J(this.fogMatrix,this.fogMatrix,[0,0,-this.elevation]),this.pixelMatrix3D=r.L(new Float64Array(16),this.labelPlaneMatrix,J);const Tt=this.width%2/2,jt=this.height%2/2,Et=Math.cos(this.angle),Jt=Math.sin(this.angle),Kt=D-Math.round(D)+Et*Tt+Jt*jt,Yt=V-Math.round(V)+Et*jt+Jt*Tt,da=new Float64Array(J);if(r.J(da,da,[Kt>.5?Kt-1:Kt,Yt>.5?Yt-1:Yt,0]),this.alignedModelViewProjectionMatrix=da,J=r.at(new Float64Array(16),this.pixelMatrix),!J)throw new Error("failed to invert matrix");this.pixelMatrixInverse=J,this._posMatrixCache={},this._alignedPosMatrixCache={},this._fogMatrixCache={}}maxPitchScaleFactor(){if(!this.pixelMatrixInverse)return 1;const u=this.pointCoordinate(new r.P(0,0)),f=[u.x*this.worldSize,u.y*this.worldSize,0,1];return r.ag(f,f,this.pixelMatrix)[3]/this.cameraToCenterDistance}getCameraPoint(){const u=this._pitch,f=Math.tan(u)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new r.P(0,f))}getCameraQueryGeometry(u){const f=this.getCameraPoint();if(u.length===1)return[u[0],f];{let D=f.x,V=f.y,J=f.x,oe=f.y;for(const fe of u)D=Math.min(D,fe.x),V=Math.min(V,fe.y),J=Math.max(J,fe.x),oe=Math.max(oe,fe.y);return[new r.P(D,V),new r.P(J,V),new r.P(J,oe),new r.P(D,oe),new r.P(D,V)]}}lngLatToCameraDepth(u,f){const D=this.locationCoordinate(u),V=[D.x*this.worldSize,D.y*this.worldSize,f,1];return r.ag(V,V,this.modelViewProjectionMatrix),V[2]/V[3]}}function Ws(R,u){let f,D=!1,V=null,J=null;const oe=()=>{V=null,D&&(R.apply(J,f),V=setTimeout(oe,u),D=!1)};return(...fe)=>(D=!0,J=this,f=fe,V||oe(),V)}class eo{constructor(u){this._getCurrentHash=()=>{const f=window.location.hash.replace("#","");if(this._hashName){let D;return f.split("&").map(V=>V.split("=")).forEach(V=>{V[0]===this._hashName&&(D=V)}),(D&&D[1]||"").split("/")}return f.split("/")},this._onHashChange=()=>{const f=this._getCurrentHash();if(f.length>=3&&!f.some(D=>isNaN(D))){const D=this._map.dragRotate.isEnabled()&&this._map.touchZoomRotate.isEnabled()?+(f[3]||0):this._map.getBearing();return this._map.jumpTo({center:[+f[2],+f[1]],zoom:+f[0],bearing:D,pitch:+(f[4]||0)}),!0}return!1},this._updateHashUnthrottled=()=>{const f=window.location.href.replace(/(#.+)?$/,this.getHashString());window.history.replaceState(window.history.state,null,f)},this._removeHash=()=>{const f=this._getCurrentHash();if(f.length===0)return;const D=f.join("/");let V=D;V.split("&").length>0&&(V=V.split("&")[0]),this._hashName&&(V=`${this._hashName}=${D}`);let J=window.location.hash.replace(V,"");J.startsWith("#&")?J=J.slice(0,1)+J.slice(2):J==="#"&&(J="");let oe=window.location.href.replace(/(#.+)?$/,J);oe=oe.replace("&&","&"),window.history.replaceState(window.history.state,null,oe)},this._updateHash=Ws(this._updateHashUnthrottled,300),this._hashName=u&&encodeURIComponent(u)}addTo(u){return this._map=u,addEventListener("hashchange",this._onHashChange,!1),this._map.on("moveend",this._updateHash),this}remove(){return removeEventListener("hashchange",this._onHashChange,!1),this._map.off("moveend",this._updateHash),clearTimeout(this._updateHash()),this._removeHash(),delete this._map,this}getHashString(u){const f=this._map.getCenter(),D=Math.round(100*this._map.getZoom())/100,V=Math.ceil((D*Math.LN2+Math.log(512/360/.5))/Math.LN10),J=Math.pow(10,V),oe=Math.round(f.lng*J)/J,fe=Math.round(f.lat*J)/J,xe=this._map.getBearing(),Ee=this._map.getPitch();let Fe="";if(Fe+=u?`/${oe}/${fe}/${D}`:`${D}/${fe}/${oe}`,(xe||Ee)&&(Fe+="/"+Math.round(10*xe)/10),Ee&&(Fe+=`/${Math.round(Ee)}`),this._hashName){const Ge=this._hashName;let rt=!1;const ct=window.location.hash.slice(1).split("&").map(pt=>{const xt=pt.split("=")[0];return xt===Ge?(rt=!0,`${xt}=${Fe}`):pt}).filter(pt=>pt);return rt||ct.push(`${Ge}=${Fe}`),`#${ct.join("&")}`}return`#${Fe}`}}const Xo={linearity:.3,easing:r.b8(0,0,.3,1)},li=r.e({deceleration:2500,maxSpeed:1400},Xo),hi=r.e({deceleration:20,maxSpeed:1400},Xo),Is=r.e({deceleration:1e3,maxSpeed:360},Xo),Tc=r.e({deceleration:1e3,maxSpeed:90},Xo);class dc{constructor(u){this._map=u,this.clear()}clear(){this._inertiaBuffer=[]}record(u){this._drainInertiaBuffer(),this._inertiaBuffer.push({time:h.now(),settings:u})}_drainInertiaBuffer(){const u=this._inertiaBuffer,f=h.now();for(;u.length>0&&f-u[0].time>160;)u.shift()}_onMoveEnd(u){if(this._drainInertiaBuffer(),this._inertiaBuffer.length<2)return;const f={zoom:0,bearing:0,pitch:0,pan:new r.P(0,0),pinchAround:void 0,around:void 0};for(const{settings:J}of this._inertiaBuffer)f.zoom+=J.zoomDelta||0,f.bearing+=J.bearingDelta||0,f.pitch+=J.pitchDelta||0,J.panDelta&&f.pan._add(J.panDelta),J.around&&(f.around=J.around),J.pinchAround&&(f.pinchAround=J.pinchAround);const D=this._inertiaBuffer[this._inertiaBuffer.length-1].time-this._inertiaBuffer[0].time,V={};if(f.pan.mag()){const J=Xl(f.pan.mag(),D,r.e({},li,u||{}));V.offset=f.pan.mult(J.amount/f.pan.mag()),V.center=this._map.transform.center,Yl(V,J)}if(f.zoom){const J=Xl(f.zoom,D,hi);V.zoom=this._map.transform.zoom+J.amount,Yl(V,J)}if(f.bearing){const J=Xl(f.bearing,D,Is);V.bearing=this._map.transform.bearing+r.ad(J.amount,-179,179),Yl(V,J)}if(f.pitch){const J=Xl(f.pitch,D,Tc);V.pitch=this._map.transform.pitch+J.amount,Yl(V,J)}if(V.zoom||V.bearing){const J=f.pinchAround===void 0?f.around:f.pinchAround;V.around=J?this._map.unproject(J):this._map.getCenter()}return this.clear(),r.e(V,{noMoveStart:!0})}}function Yl(R,u){(!R.duration||R.duration<u.duration)&&(R.duration=u.duration,R.easing=u.easing)}function Xl(R,u,f){const{maxSpeed:D,linearity:V,deceleration:J}=f,oe=r.ad(R*V/(u/1e3),-D,D),fe=Math.abs(oe)/(J*V);return{easing:f.easing,duration:1e3*fe,amount:oe*(fe/2)}}class Bo extends r.k{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(u,f,D,V={}){const J=n.mousePos(f.getCanvas(),D),oe=f.unproject(J);super(u,r.e({point:J,lngLat:oe,originalEvent:D},V)),this._defaultPrevented=!1,this.target=f}}class ko extends r.k{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(u,f,D){const V=u==="touchend"?D.changedTouches:D.touches,J=n.touchPos(f.getCanvasContainer(),V),oe=J.map(xe=>f.unproject(xe)),fe=J.reduce((xe,Ee,Fe,Ge)=>xe.add(Ee.div(Ge.length)),new r.P(0,0));super(u,{points:J,point:fe,lngLats:oe,lngLat:f.unproject(fe),originalEvent:D}),this._defaultPrevented=!1}}class il extends r.k{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(u,f,D){super(u,{originalEvent:D}),this._defaultPrevented=!1}}class hc{constructor(u,f){this._map=u,this._clickTolerance=f.clickTolerance}reset(){delete this._mousedownPos}wheel(u){return this._firePreventable(new il(u.type,this._map,u))}mousedown(u,f){return this._mousedownPos=f,this._firePreventable(new Bo(u.type,this._map,u))}mouseup(u){this._map.fire(new Bo(u.type,this._map,u))}click(u,f){this._mousedownPos&&this._mousedownPos.dist(f)>=this._clickTolerance||this._map.fire(new Bo(u.type,this._map,u))}dblclick(u){return this._firePreventable(new Bo(u.type,this._map,u))}mouseover(u){this._map.fire(new Bo(u.type,this._map,u))}mouseout(u){this._map.fire(new Bo(u.type,this._map,u))}touchstart(u){return this._firePreventable(new ko(u.type,this._map,u))}touchmove(u){this._map.fire(new ko(u.type,this._map,u))}touchend(u){this._map.fire(new ko(u.type,this._map,u))}touchcancel(u){this._map.fire(new ko(u.type,this._map,u))}_firePreventable(u){if(this._map.fire(u),u.defaultPrevented)return{}}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class Ro{constructor(u){this._map=u}reset(){this._delayContextMenu=!1,this._ignoreContextMenu=!0,delete this._contextMenuEvent}mousemove(u){this._map.fire(new Bo(u.type,this._map,u))}mousedown(){this._delayContextMenu=!0,this._ignoreContextMenu=!1}mouseup(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new Bo("contextmenu",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)}contextmenu(u){this._delayContextMenu?this._contextMenuEvent=u:this._ignoreContextMenu||this._map.fire(new Bo(u.type,this._map,u)),this._map.listens("contextmenu")&&u.preventDefault()}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class Ci{constructor(u){this._map=u}get transform(){return this._map._requestedCameraState||this._map.transform}get center(){return{lng:this.transform.center.lng,lat:this.transform.center.lat}}get zoom(){return this.transform.zoom}get pitch(){return this.transform.pitch}get bearing(){return this.transform.bearing}unproject(u){return this.transform.pointLocation(r.P.convert(u),this._map.terrain)}}class So{constructor(u,f){this._map=u,this._tr=new Ci(u),this._el=u.getCanvasContainer(),this._container=u.getContainer(),this._clickTolerance=f.clickTolerance||1}isEnabled(){return!!this._enabled}isActive(){return!!this._active}enable(){this.isEnabled()||(this._enabled=!0)}disable(){this.isEnabled()&&(this._enabled=!1)}mousedown(u,f){this.isEnabled()&&u.shiftKey&&u.button===0&&(n.disableDrag(),this._startPos=this._lastPos=f,this._active=!0)}mousemoveWindow(u,f){if(!this._active)return;const D=f;if(this._lastPos.equals(D)||!this._box&&D.dist(this._startPos)<this._clickTolerance)return;const V=this._startPos;this._lastPos=D,this._box||(this._box=n.create("div","maplibregl-boxzoom",this._container),this._container.classList.add("maplibregl-crosshair"),this._fireEvent("boxzoomstart",u));const J=Math.min(V.x,D.x),oe=Math.max(V.x,D.x),fe=Math.min(V.y,D.y),xe=Math.max(V.y,D.y);n.setTransform(this._box,`translate(${J}px,${fe}px)`),this._box.style.width=oe-J+"px",this._box.style.height=xe-fe+"px"}mouseupWindow(u,f){if(!this._active||u.button!==0)return;const D=this._startPos,V=f;if(this.reset(),n.suppressClick(),D.x!==V.x||D.y!==V.y)return this._map.fire(new r.k("boxzoomend",{originalEvent:u})),{cameraAnimation:J=>J.fitScreenCoordinates(D,V,this._tr.bearing,{linear:!0})};this._fireEvent("boxzoomcancel",u)}keydown(u){this._active&&u.keyCode===27&&(this.reset(),this._fireEvent("boxzoomcancel",u))}reset(){this._active=!1,this._container.classList.remove("maplibregl-crosshair"),this._box&&(n.remove(this._box),this._box=null),n.enableDrag(),delete this._startPos,delete this._lastPos}_fireEvent(u,f){return this._map.fire(new r.k(u,{originalEvent:f}))}}function gi(R,u){if(R.length!==u.length)throw new Error(`The number of touches and points are not equal - touches ${R.length}, points ${u.length}`);const f={};for(let D=0;D<R.length;D++)f[R[D].identifier]=u[D];return f}class to{constructor(u){this.reset(),this.numTouches=u.numTouches}reset(){delete this.centroid,delete this.startTime,delete this.touches,this.aborted=!1}touchstart(u,f,D){(this.centroid||D.length>this.numTouches)&&(this.aborted=!0),this.aborted||(this.startTime===void 0&&(this.startTime=u.timeStamp),D.length===this.numTouches&&(this.centroid=function(V){const J=new r.P(0,0);for(const oe of V)J._add(oe);return J.div(V.length)}(f),this.touches=gi(D,f)))}touchmove(u,f,D){if(this.aborted||!this.centroid)return;const V=gi(D,f);for(const J in this.touches){const oe=this.touches[J],fe=V[J];(!fe||fe.dist(oe)>30)&&(this.aborted=!0)}}touchend(u,f,D){if((!this.centroid||u.timeStamp-this.startTime>500)&&(this.aborted=!0),D.length===0){const V=!this.aborted&&this.centroid;if(this.reset(),V)return V}}}class yi{constructor(u){this.singleTap=new to(u),this.numTaps=u.numTaps,this.reset()}reset(){this.lastTime=1/0,delete this.lastTap,this.count=0,this.singleTap.reset()}touchstart(u,f,D){this.singleTap.touchstart(u,f,D)}touchmove(u,f,D){this.singleTap.touchmove(u,f,D)}touchend(u,f,D){const V=this.singleTap.touchend(u,f,D);if(V){const J=u.timeStamp-this.lastTime<500,oe=!this.lastTap||this.lastTap.dist(V)<30;if(J&&oe||this.reset(),this.count++,this.lastTime=u.timeStamp,this.lastTap=V,this.count===this.numTaps)return this.reset(),V}}}class mo{constructor(u){this._tr=new Ci(u),this._zoomIn=new yi({numTouches:1,numTaps:2}),this._zoomOut=new yi({numTouches:2,numTaps:1}),this.reset()}reset(){this._active=!1,this._zoomIn.reset(),this._zoomOut.reset()}touchstart(u,f,D){this._zoomIn.touchstart(u,f,D),this._zoomOut.touchstart(u,f,D)}touchmove(u,f,D){this._zoomIn.touchmove(u,f,D),this._zoomOut.touchmove(u,f,D)}touchend(u,f,D){const V=this._zoomIn.touchend(u,f,D),J=this._zoomOut.touchend(u,f,D),oe=this._tr;return V?(this._active=!0,u.preventDefault(),setTimeout(()=>this.reset(),0),{cameraAnimation:fe=>fe.easeTo({duration:300,zoom:oe.zoom+1,around:oe.unproject(V)},{originalEvent:u})}):J?(this._active=!0,u.preventDefault(),setTimeout(()=>this.reset(),0),{cameraAnimation:fe=>fe.easeTo({duration:300,zoom:oe.zoom-1,around:oe.unproject(J)},{originalEvent:u})}):void 0}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class Co{constructor(u){this._enabled=!!u.enable,this._moveStateManager=u.moveStateManager,this._clickTolerance=u.clickTolerance||1,this._moveFunction=u.move,this._activateOnStart=!!u.activateOnStart,u.assignEvents(this),this.reset()}reset(u){this._active=!1,this._moved=!1,delete this._lastPoint,this._moveStateManager.endMove(u)}_move(...u){const f=this._moveFunction(...u);if(f.bearingDelta||f.pitchDelta||f.around||f.panDelta)return this._active=!0,f}dragStart(u,f){this.isEnabled()&&!this._lastPoint&&this._moveStateManager.isValidStartEvent(u)&&(this._moveStateManager.startMove(u),this._lastPoint=f.length?f[0]:f,this._activateOnStart&&this._lastPoint&&(this._active=!0))}dragMove(u,f){if(!this.isEnabled())return;const D=this._lastPoint;if(!D)return;if(u.preventDefault(),!this._moveStateManager.isValidMoveEvent(u))return void this.reset(u);const V=f.length?f[0]:f;return!this._moved&&V.dist(D)<this._clickTolerance?void 0:(this._moved=!0,this._lastPoint=V,this._move(D,V))}dragEnd(u){this.isEnabled()&&this._lastPoint&&this._moveStateManager.isValidEndEvent(u)&&(this._moved&&n.suppressClick(),this.reset(u))}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}getClickTolerance(){return this._clickTolerance}}const ol={0:1,2:2};class cs{constructor(u){this._correctEvent=u.checkCorrectEvent}startMove(u){const f=n.mouseButton(u);this._eventButton=f}endMove(u){delete this._eventButton}isValidStartEvent(u){return this._correctEvent(u)}isValidMoveEvent(u){return!function(f,D){const V=ol[D];return f.buttons===void 0||(f.buttons&V)!==V}(u,this._eventButton)}isValidEndEvent(u){return n.mouseButton(u)===this._eventButton}}class Fl{constructor(){this._firstTouch=void 0}_isOneFingerTouch(u){return u.targetTouches.length===1}_isSameTouchEvent(u){return u.targetTouches[0].identifier===this._firstTouch}startMove(u){const f=u.targetTouches[0].identifier;this._firstTouch=f}endMove(u){delete this._firstTouch}isValidStartEvent(u){return this._isOneFingerTouch(u)}isValidMoveEvent(u){return this._isOneFingerTouch(u)&&this._isSameTouchEvent(u)}isValidEndEvent(u){return this._isOneFingerTouch(u)&&this._isSameTouchEvent(u)}}const zo=R=>{R.mousedown=R.dragStart,R.mousemoveWindow=R.dragMove,R.mouseup=R.dragEnd,R.contextmenu=u=>{u.preventDefault()}},$l=({enable:R,clickTolerance:u,bearingDegreesPerPixelMoved:f=.8})=>{const D=new cs({checkCorrectEvent:V=>n.mouseButton(V)===0&&V.ctrlKey||n.mouseButton(V)===2});return new Co({clickTolerance:u,move:(V,J)=>({bearingDelta:(J.x-V.x)*f}),moveStateManager:D,enable:R,assignEvents:zo})},sl=({enable:R,clickTolerance:u,pitchDegreesPerPixelMoved:f=-.5})=>{const D=new cs({checkCorrectEvent:V=>n.mouseButton(V)===0&&V.ctrlKey||n.mouseButton(V)===2});return new Co({clickTolerance:u,move:(V,J)=>({pitchDelta:(J.y-V.y)*f}),moveStateManager:D,enable:R,assignEvents:zo})};class Ps{constructor(u,f){this._clickTolerance=u.clickTolerance||1,this._map=f,this.reset()}reset(){this._active=!1,this._touches={},this._sum=new r.P(0,0)}_shouldBePrevented(u){return u<(this._map.cooperativeGestures.isEnabled()?2:1)}touchstart(u,f,D){return this._calculateTransform(u,f,D)}touchmove(u,f,D){if(this._active){if(!this._shouldBePrevented(D.length))return u.preventDefault(),this._calculateTransform(u,f,D);this._map.cooperativeGestures.notifyGestureBlocked("touch_pan",u)}}touchend(u,f,D){this._calculateTransform(u,f,D),this._active&&this._shouldBePrevented(D.length)&&this.reset()}touchcancel(){this.reset()}_calculateTransform(u,f,D){D.length>0&&(this._active=!0);const V=gi(D,f),J=new r.P(0,0),oe=new r.P(0,0);let fe=0;for(const Ee in V){const Fe=V[Ee],Ge=this._touches[Ee];Ge&&(J._add(Fe),oe._add(Fe.sub(Ge)),fe++,V[Ee]=Fe)}if(this._touches=V,this._shouldBePrevented(fe)||!oe.mag())return;const xe=oe.div(fe);return this._sum._add(xe),this._sum.mag()<this._clickTolerance?void 0:{around:J.div(fe),panDelta:xe}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class go{constructor(){this.reset()}reset(){this._active=!1,delete this._firstTwoTouches}touchstart(u,f,D){this._firstTwoTouches||D.length<2||(this._firstTwoTouches=[D[0].identifier,D[1].identifier],this._start([f[0],f[1]]))}touchmove(u,f,D){if(!this._firstTwoTouches)return;u.preventDefault();const[V,J]=this._firstTwoTouches,oe=vi(D,f,V),fe=vi(D,f,J);if(!oe||!fe)return;const xe=this._aroundCenter?null:oe.add(fe).div(2);return this._move([oe,fe],xe,u)}touchend(u,f,D){if(!this._firstTwoTouches)return;const[V,J]=this._firstTwoTouches,oe=vi(D,f,V),fe=vi(D,f,J);oe&&fe||(this._active&&n.suppressClick(),this.reset())}touchcancel(){this.reset()}enable(u){this._enabled=!0,this._aroundCenter=!!u&&u.around==="center"}disable(){this._enabled=!1,this.reset()}isEnabled(){return!!this._enabled}isActive(){return!!this._active}}function vi(R,u,f){for(let D=0;D<R.length;D++)if(R[D].identifier===f)return u[D]}function Ls(R,u){return Math.log(R/u)/Math.LN2}class gn extends go{reset(){super.reset(),delete this._distance,delete this._startDistance}_start(u){this._startDistance=this._distance=u[0].dist(u[1])}_move(u,f){const D=this._distance;if(this._distance=u[0].dist(u[1]),this._active||!(Math.abs(Ls(this._distance,this._startDistance))<.1))return this._active=!0,{zoomDelta:Ls(this._distance,D),pinchAround:f}}}function Ac(R,u){return 180*R.angleWith(u)/Math.PI}class Jc extends go{reset(){super.reset(),delete this._minDiameter,delete this._startVector,delete this._vector}_start(u){this._startVector=this._vector=u[0].sub(u[1]),this._minDiameter=u[0].dist(u[1])}_move(u,f,D){const V=this._vector;if(this._vector=u[0].sub(u[1]),this._active||!this._isBelowThreshold(this._vector))return this._active=!0,{bearingDelta:Ac(this._vector,V),pinchAround:f}}_isBelowThreshold(u){this._minDiameter=Math.min(this._minDiameter,u.mag());const f=25/(Math.PI*this._minDiameter)*360,D=Ac(u,this._startVector);return Math.abs(D)<f}}function ll(R){return Math.abs(R.y)>Math.abs(R.x)}class Rl extends go{constructor(u){super(),this._currentTouchCount=0,this._map=u}reset(){super.reset(),this._valid=void 0,delete this._firstMove,delete this._lastPoints}touchstart(u,f,D){super.touchstart(u,f,D),this._currentTouchCount=D.length}_start(u){this._lastPoints=u,ll(u[0].sub(u[1]))&&(this._valid=!1)}_move(u,f,D){if(this._map.cooperativeGestures.isEnabled()&&this._currentTouchCount<3)return;const V=u[0].sub(this._lastPoints[0]),J=u[1].sub(this._lastPoints[1]);return this._valid=this.gestureBeginsVertically(V,J,D.timeStamp),this._valid?(this._lastPoints=u,this._active=!0,{pitchDelta:(V.y+J.y)/2*-.5}):void 0}gestureBeginsVertically(u,f,D){if(this._valid!==void 0)return this._valid;const V=u.mag()>=2,J=f.mag()>=2;if(!V&&!J)return;if(!V||!J)return this._firstMove===void 0&&(this._firstMove=D),D-this._firstMove<100&&void 0;const oe=u.y>0==f.y>0;return ll(u)&&ll(f)&&oe}}const Cl={panStep:100,bearingStep:15,pitchStep:10};class pc{constructor(u){this._tr=new Ci(u);const f=Cl;this._panStep=f.panStep,this._bearingStep=f.bearingStep,this._pitchStep=f.pitchStep,this._rotationDisabled=!1}reset(){this._active=!1}keydown(u){if(u.altKey||u.ctrlKey||u.metaKey)return;let f=0,D=0,V=0,J=0,oe=0;switch(u.keyCode){case 61:case 107:case 171:case 187:f=1;break;case 189:case 109:case 173:f=-1;break;case 37:u.shiftKey?D=-1:(u.preventDefault(),J=-1);break;case 39:u.shiftKey?D=1:(u.preventDefault(),J=1);break;case 38:u.shiftKey?V=1:(u.preventDefault(),oe=-1);break;case 40:u.shiftKey?V=-1:(u.preventDefault(),oe=1);break;default:return}return this._rotationDisabled&&(D=0,V=0),{cameraAnimation:fe=>{const xe=this._tr;fe.easeTo({duration:300,easeId:"keyboardHandler",easing:Zr,zoom:f?Math.round(xe.zoom)+f*(u.shiftKey?2:1):xe.zoom,bearing:xe.bearing+D*this._bearingStep,pitch:xe.pitch+V*this._pitchStep,offset:[-J*this._panStep,-oe*this._panStep],center:xe.center},{originalEvent:u})}}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}disableRotation(){this._rotationDisabled=!0}enableRotation(){this._rotationDisabled=!1}}function Zr(R){return R*(2-R)}const us=4.000244140625;class cl{constructor(u,f){this._onTimeout=D=>{this._type="wheel",this._delta-=this._lastValue,this._active||this._start(D)},this._map=u,this._tr=new Ci(u),this._triggerRenderFrame=f,this._delta=0,this._defaultZoomRate=.01,this._wheelZoomRate=.0022222222222222222}setZoomRate(u){this._defaultZoomRate=u}setWheelZoomRate(u){this._wheelZoomRate=u}isEnabled(){return!!this._enabled}isActive(){return!!this._active||this._finishTimeout!==void 0}isZooming(){return!!this._zooming}enable(u){this.isEnabled()||(this._enabled=!0,this._aroundCenter=!!u&&u.around==="center")}disable(){this.isEnabled()&&(this._enabled=!1)}_shouldBePrevented(u){return!!this._map.cooperativeGestures.isEnabled()&&!(u.ctrlKey||this._map.cooperativeGestures.isBypassed(u))}wheel(u){if(!this.isEnabled())return;if(this._shouldBePrevented(u))return void this._map.cooperativeGestures.notifyGestureBlocked("wheel_zoom",u);let f=u.deltaMode===WheelEvent.DOM_DELTA_LINE?40*u.deltaY:u.deltaY;const D=h.now(),V=D-(this._lastWheelEventTime||0);this._lastWheelEventTime=D,f!==0&&f%us==0?this._type="wheel":f!==0&&Math.abs(f)<4?this._type="trackpad":V>400?(this._type=null,this._lastValue=f,this._timeout=setTimeout(this._onTimeout,40,u)):this._type||(this._type=Math.abs(V*f)<200?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,f+=this._lastValue)),u.shiftKey&&f&&(f/=4),this._type&&(this._lastWheelEvent=u,this._delta-=f,this._active||this._start(u)),u.preventDefault()}_start(u){if(!this._delta)return;this._frameId&&(this._frameId=null),this._active=!0,this.isZooming()||(this._zooming=!0),this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout);const f=n.mousePos(this._map.getCanvas(),u),D=this._tr;f.y>D.transform.height/2-D.transform.getHorizon()?this._around=r.N.convert(this._aroundCenter?D.center:D.unproject(f)):this._around=r.N.convert(D.center),this._aroundPoint=D.transform.locationPoint(this._around),this._frameId||(this._frameId=!0,this._triggerRenderFrame())}renderFrame(){if(!this._frameId||(this._frameId=null,!this.isActive()))return;const u=this._tr.transform;if(this._delta!==0){const xe=this._type==="wheel"&&Math.abs(this._delta)>us?this._wheelZoomRate:this._defaultZoomRate;let Ee=2/(1+Math.exp(-Math.abs(this._delta*xe)));this._delta<0&&Ee!==0&&(Ee=1/Ee);const Fe=typeof this._targetZoom=="number"?u.zoomScale(this._targetZoom):u.scale;this._targetZoom=Math.min(u.maxZoom,Math.max(u.minZoom,u.scaleZoom(Fe*Ee))),this._type==="wheel"&&(this._startZoom=u.zoom,this._easing=this._smoothOutEasing(200)),this._delta=0}const f=typeof this._targetZoom=="number"?this._targetZoom:u.zoom,D=this._startZoom,V=this._easing;let J,oe=!1;const fe=h.now()-this._lastWheelEventTime;if(this._type==="wheel"&&D&&V&&fe){const xe=Math.min(fe/200,1),Ee=V(xe);J=r.z.number(D,f,Ee),xe<1?this._frameId||(this._frameId=!0):oe=!0}else J=f,oe=!0;return this._active=!0,oe&&(this._active=!1,this._finishTimeout=setTimeout(()=>{this._zooming=!1,this._triggerRenderFrame(),delete this._targetZoom,delete this._finishTimeout},200)),{noInertia:!0,needsRenderFrame:!oe,zoomDelta:J-u.zoom,around:this._aroundPoint,originalEvent:this._lastWheelEvent}}_smoothOutEasing(u){let f=r.b9;if(this._prevEase){const D=this._prevEase,V=(h.now()-D.start)/D.duration,J=D.easing(V+.01)-D.easing(V),oe=.27/Math.sqrt(J*J+1e-4)*.01,fe=Math.sqrt(.0729-oe*oe);f=r.b8(oe,fe,.25,1)}return this._prevEase={start:h.now(),duration:u,easing:f},f}reset(){this._active=!1,this._zooming=!1,delete this._targetZoom,this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout)}}class Ti{constructor(u,f){this._clickZoom=u,this._tapZoom=f}enable(){this._clickZoom.enable(),this._tapZoom.enable()}disable(){this._clickZoom.disable(),this._tapZoom.disable()}isEnabled(){return this._clickZoom.isEnabled()&&this._tapZoom.isEnabled()}isActive(){return this._clickZoom.isActive()||this._tapZoom.isActive()}}class $o{constructor(u){this._tr=new Ci(u),this.reset()}reset(){this._active=!1}dblclick(u,f){return u.preventDefault(),{cameraAnimation:D=>{D.easeTo({duration:300,zoom:this._tr.zoom+(u.shiftKey?-1:1),around:this._tr.unproject(f)},{originalEvent:u})}}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class ul{constructor(){this._tap=new yi({numTouches:1,numTaps:1}),this.reset()}reset(){this._active=!1,delete this._swipePoint,delete this._swipeTouch,delete this._tapTime,delete this._tapPoint,this._tap.reset()}touchstart(u,f,D){if(!this._swipePoint)if(this._tapTime){const V=f[0],J=u.timeStamp-this._tapTime<500,oe=this._tapPoint.dist(V)<30;J&&oe?D.length>0&&(this._swipePoint=V,this._swipeTouch=D[0].identifier):this.reset()}else this._tap.touchstart(u,f,D)}touchmove(u,f,D){if(this._tapTime){if(this._swipePoint){if(D[0].identifier!==this._swipeTouch)return;const V=f[0],J=V.y-this._swipePoint.y;return this._swipePoint=V,u.preventDefault(),this._active=!0,{zoomDelta:J/128}}}else this._tap.touchmove(u,f,D)}touchend(u,f,D){if(this._tapTime)this._swipePoint&&D.length===0&&this.reset();else{const V=this._tap.touchend(u,f,D);V&&(this._tapTime=u.timeStamp,this._tapPoint=V)}}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class Bs{constructor(u,f,D){this._el=u,this._mousePan=f,this._touchPan=D}enable(u){this._inertiaOptions=u||{},this._mousePan.enable(),this._touchPan.enable(),this._el.classList.add("maplibregl-touch-drag-pan")}disable(){this._mousePan.disable(),this._touchPan.disable(),this._el.classList.remove("maplibregl-touch-drag-pan")}isEnabled(){return this._mousePan.isEnabled()&&this._touchPan.isEnabled()}isActive(){return this._mousePan.isActive()||this._touchPan.isActive()}}class Vo{constructor(u,f,D){this._pitchWithRotate=u.pitchWithRotate,this._mouseRotate=f,this._mousePitch=D}enable(){this._mouseRotate.enable(),this._pitchWithRotate&&this._mousePitch.enable()}disable(){this._mouseRotate.disable(),this._mousePitch.disable()}isEnabled(){return this._mouseRotate.isEnabled()&&(!this._pitchWithRotate||this._mousePitch.isEnabled())}isActive(){return this._mouseRotate.isActive()||this._mousePitch.isActive()}}class dl{constructor(u,f,D,V){this._el=u,this._touchZoom=f,this._touchRotate=D,this._tapDragZoom=V,this._rotationDisabled=!1,this._enabled=!0}enable(u){this._touchZoom.enable(u),this._rotationDisabled||this._touchRotate.enable(u),this._tapDragZoom.enable(),this._el.classList.add("maplibregl-touch-zoom-rotate")}disable(){this._touchZoom.disable(),this._touchRotate.disable(),this._tapDragZoom.disable(),this._el.classList.remove("maplibregl-touch-zoom-rotate")}isEnabled(){return this._touchZoom.isEnabled()&&(this._rotationDisabled||this._touchRotate.isEnabled())&&this._tapDragZoom.isEnabled()}isActive(){return this._touchZoom.isActive()||this._touchRotate.isActive()||this._tapDragZoom.isActive()}disableRotation(){this._rotationDisabled=!0,this._touchRotate.disable()}enableRotation(){this._rotationDisabled=!1,this._touchZoom.isEnabled()&&this._touchRotate.enable()}}class ys{constructor(u,f){this._bypassKey=navigator.userAgent.indexOf("Mac")!==-1?"metaKey":"ctrlKey",this._map=u,this._options=f,this._enabled=!1}isActive(){return!1}reset(){}_setupUI(){if(this._container)return;const u=this._map.getCanvasContainer();u.classList.add("maplibregl-cooperative-gestures"),this._container=n.create("div","maplibregl-cooperative-gesture-screen",u);let f=this._map._getUIString("CooperativeGesturesHandler.WindowsHelpText");this._bypassKey==="metaKey"&&(f=this._map._getUIString("CooperativeGesturesHandler.MacHelpText"));const D=this._map._getUIString("CooperativeGesturesHandler.MobileHelpText"),V=document.createElement("div");V.className="maplibregl-desktop-message",V.textContent=f,this._container.appendChild(V);const J=document.createElement("div");J.className="maplibregl-mobile-message",J.textContent=D,this._container.appendChild(J),this._container.setAttribute("aria-hidden","true")}_destroyUI(){this._container&&(n.remove(this._container),this._map.getCanvasContainer().classList.remove("maplibregl-cooperative-gestures")),delete this._container}enable(){this._setupUI(),this._enabled=!0}disable(){this._enabled=!1,this._destroyUI()}isEnabled(){return this._enabled}isBypassed(u){return u[this._bypassKey]}notifyGestureBlocked(u,f){this._enabled&&(this._map.fire(new r.k("cooperativegestureprevented",{gestureType:u,originalEvent:f})),this._container.classList.add("maplibregl-show"),setTimeout(()=>{this._container.classList.remove("maplibregl-show")},100))}}const Ko=R=>R.zoom||R.drag||R.pitch||R.rotate;class zs extends r.k{}function hn(R){return R.panDelta&&R.panDelta.mag()||R.zoomDelta||R.bearingDelta||R.pitchDelta}class ni{constructor(u,f){this.handleWindowEvent=V=>{this.handleEvent(V,`${V.type}Window`)},this.handleEvent=(V,J)=>{if(V.type==="blur")return void this.stop(!0);this._updatingCamera=!0;const oe=V.type==="renderFrame"?void 0:V,fe={needsRenderFrame:!1},xe={},Ee={},Fe=V.touches,Ge=Fe?this._getMapTouches(Fe):void 0,rt=Ge?n.touchPos(this._map.getCanvas(),Ge):n.mousePos(this._map.getCanvas(),V);for(const{handlerName:xt,handler:Mt,allowed:Tt}of this._handlers){if(!Mt.isEnabled())continue;let jt;this._blockedByActive(Ee,Tt,xt)?Mt.reset():Mt[J||V.type]&&(jt=Mt[J||V.type](V,rt,Ge),this.mergeHandlerResult(fe,xe,jt,xt,oe),jt&&jt.needsRenderFrame&&this._triggerRenderFrame()),(jt||Mt.isActive())&&(Ee[xt]=Mt)}const ct={};for(const xt in this._previousActiveHandlers)Ee[xt]||(ct[xt]=oe);this._previousActiveHandlers=Ee,(Object.keys(ct).length||hn(fe))&&(this._changes.push([fe,xe,ct]),this._triggerRenderFrame()),(Object.keys(Ee).length||hn(fe))&&this._map._stop(!0),this._updatingCamera=!1;const{cameraAnimation:pt}=fe;pt&&(this._inertia.clear(),this._fireEvents({},{},!0),this._changes=[],pt(this._map))},this._map=u,this._el=this._map.getCanvasContainer(),this._handlers=[],this._handlersById={},this._changes=[],this._inertia=new dc(u),this._bearingSnap=f.bearingSnap,this._previousActiveHandlers={},this._eventsInProgress={},this._addDefaultHandlers(f);const D=this._el;this._listeners=[[D,"touchstart",{passive:!0}],[D,"touchmove",{passive:!1}],[D,"touchend",void 0],[D,"touchcancel",void 0],[D,"mousedown",void 0],[D,"mousemove",void 0],[D,"mouseup",void 0],[document,"mousemove",{capture:!0}],[document,"mouseup",void 0],[D,"mouseover",void 0],[D,"mouseout",void 0],[D,"dblclick",void 0],[D,"click",void 0],[D,"keydown",{capture:!1}],[D,"keyup",void 0],[D,"wheel",{passive:!1}],[D,"contextmenu",void 0],[window,"blur",void 0]];for(const[V,J,oe]of this._listeners)n.addEventListener(V,J,V===document?this.handleWindowEvent:this.handleEvent,oe)}destroy(){for(const[u,f,D]of this._listeners)n.removeEventListener(u,f,u===document?this.handleWindowEvent:this.handleEvent,D)}_addDefaultHandlers(u){const f=this._map,D=f.getCanvasContainer();this._add("mapEvent",new hc(f,u));const V=f.boxZoom=new So(f,u);this._add("boxZoom",V),u.interactive&&u.boxZoom&&V.enable();const J=f.cooperativeGestures=new ys(f,u.cooperativeGestures);this._add("cooperativeGestures",J),u.cooperativeGestures&&J.enable();const oe=new mo(f),fe=new $o(f);f.doubleClickZoom=new Ti(fe,oe),this._add("tapZoom",oe),this._add("clickZoom",fe),u.interactive&&u.doubleClickZoom&&f.doubleClickZoom.enable();const xe=new ul;this._add("tapDragZoom",xe);const Ee=f.touchPitch=new Rl(f);this._add("touchPitch",Ee),u.interactive&&u.touchPitch&&f.touchPitch.enable(u.touchPitch);const Fe=$l(u),Ge=sl(u);f.dragRotate=new Vo(u,Fe,Ge),this._add("mouseRotate",Fe,["mousePitch"]),this._add("mousePitch",Ge,["mouseRotate"]),u.interactive&&u.dragRotate&&f.dragRotate.enable();const rt=(({enable:jt,clickTolerance:Et})=>{const Jt=new cs({checkCorrectEvent:Kt=>n.mouseButton(Kt)===0&&!Kt.ctrlKey});return new Co({clickTolerance:Et,move:(Kt,Yt)=>({around:Yt,panDelta:Yt.sub(Kt)}),activateOnStart:!0,moveStateManager:Jt,enable:jt,assignEvents:zo})})(u),ct=new Ps(u,f);f.dragPan=new Bs(D,rt,ct),this._add("mousePan",rt),this._add("touchPan",ct,["touchZoom","touchRotate"]),u.interactive&&u.dragPan&&f.dragPan.enable(u.dragPan);const pt=new Jc,xt=new gn;f.touchZoomRotate=new dl(D,xt,pt,xe),this._add("touchRotate",pt,["touchPan","touchZoom"]),this._add("touchZoom",xt,["touchPan","touchRotate"]),u.interactive&&u.touchZoomRotate&&f.touchZoomRotate.enable(u.touchZoomRotate);const Mt=f.scrollZoom=new cl(f,()=>this._triggerRenderFrame());this._add("scrollZoom",Mt,["mousePan"]),u.interactive&&u.scrollZoom&&f.scrollZoom.enable(u.scrollZoom);const Tt=f.keyboard=new pc(f);this._add("keyboard",Tt),u.interactive&&u.keyboard&&f.keyboard.enable(),this._add("blockableMapEvent",new Ro(f))}_add(u,f,D){this._handlers.push({handlerName:u,handler:f,allowed:D}),this._handlersById[u]=f}stop(u){if(!this._updatingCamera){for(const{handler:f}of this._handlers)f.reset();this._inertia.clear(),this._fireEvents({},{},u),this._changes=[]}}isActive(){for(const{handler:u}of this._handlers)if(u.isActive())return!0;return!1}isZooming(){return!!this._eventsInProgress.zoom||this._map.scrollZoom.isZooming()}isRotating(){return!!this._eventsInProgress.rotate}isMoving(){return!!Ko(this._eventsInProgress)||this.isZooming()}_blockedByActive(u,f,D){for(const V in u)if(V!==D&&(!f||f.indexOf(V)<0))return!0;return!1}_getMapTouches(u){const f=[];for(const D of u){const V=D.target;this._el.contains(V)&&f.push(D)}return f}mergeHandlerResult(u,f,D,V,J){if(!D)return;r.e(u,D);const oe={handlerName:V,originalEvent:D.originalEvent||J};D.zoomDelta!==void 0&&(f.zoom=oe),D.panDelta!==void 0&&(f.drag=oe),D.pitchDelta!==void 0&&(f.pitch=oe),D.bearingDelta!==void 0&&(f.rotate=oe)}_applyChanges(){const u={},f={},D={};for(const[V,J,oe]of this._changes)V.panDelta&&(u.panDelta=(u.panDelta||new r.P(0,0))._add(V.panDelta)),V.zoomDelta&&(u.zoomDelta=(u.zoomDelta||0)+V.zoomDelta),V.bearingDelta&&(u.bearingDelta=(u.bearingDelta||0)+V.bearingDelta),V.pitchDelta&&(u.pitchDelta=(u.pitchDelta||0)+V.pitchDelta),V.around!==void 0&&(u.around=V.around),V.pinchAround!==void 0&&(u.pinchAround=V.pinchAround),V.noInertia&&(u.noInertia=V.noInertia),r.e(f,J),r.e(D,oe);this._updateMapTransform(u,f,D),this._changes=[]}_updateMapTransform(u,f,D){const V=this._map,J=V._getTransformForUpdate(),oe=V.terrain;if(!(hn(u)||oe&&this._terrainMovement))return this._fireEvents(f,D,!0);let{panDelta:fe,zoomDelta:xe,bearingDelta:Ee,pitchDelta:Fe,around:Ge,pinchAround:rt}=u;rt!==void 0&&(Ge=rt),V._stop(!0),Ge=Ge||V.transform.centerPoint;const ct=J.pointLocation(fe?Ge.sub(fe):Ge);Ee&&(J.bearing+=Ee),Fe&&(J.pitch+=Fe),xe&&(J.zoom+=xe),oe?this._terrainMovement||!f.drag&&!f.zoom?f.drag&&this._terrainMovement?J.center=J.pointLocation(J.centerPoint.sub(fe)):J.setLocationAtPoint(ct,Ge):(this._terrainMovement=!0,this._map._elevationFreeze=!0,J.setLocationAtPoint(ct,Ge)):J.setLocationAtPoint(ct,Ge),V._applyUpdatedTransform(J),this._map._update(),u.noInertia||this._inertia.record(u),this._fireEvents(f,D,!0)}_fireEvents(u,f,D){const V=Ko(this._eventsInProgress),J=Ko(u),oe={};for(const Ge in u){const{originalEvent:rt}=u[Ge];this._eventsInProgress[Ge]||(oe[`${Ge}start`]=rt),this._eventsInProgress[Ge]=u[Ge]}!V&&J&&this._fireEvent("movestart",J.originalEvent);for(const Ge in oe)this._fireEvent(Ge,oe[Ge]);J&&this._fireEvent("move",J.originalEvent);for(const Ge in u){const{originalEvent:rt}=u[Ge];this._fireEvent(Ge,rt)}const fe={};let xe;for(const Ge in this._eventsInProgress){const{handlerName:rt,originalEvent:ct}=this._eventsInProgress[Ge];this._handlersById[rt].isActive()||(delete this._eventsInProgress[Ge],xe=f[rt]||ct,fe[`${Ge}end`]=xe)}for(const Ge in fe)this._fireEvent(Ge,fe[Ge]);const Ee=Ko(this._eventsInProgress),Fe=(V||J)&&!Ee;if(Fe&&this._terrainMovement){this._map._elevationFreeze=!1,this._terrainMovement=!1;const Ge=this._map._getTransformForUpdate();Ge.recalculateZoom(this._map.terrain),this._map._applyUpdatedTransform(Ge)}if(D&&Fe){this._updatingCamera=!0;const Ge=this._inertia._onMoveEnd(this._map.dragPan._inertiaOptions),rt=ct=>ct!==0&&-this._bearingSnap<ct&&ct<this._bearingSnap;!Ge||!Ge.essential&&h.prefersReducedMotion?(this._map.fire(new r.k("moveend",{originalEvent:xe})),rt(this._map.getBearing())&&this._map.resetNorth()):(rt(Ge.bearing||this._map.getBearing())&&(Ge.bearing=0),Ge.freezeElevation=!0,this._map.easeTo(Ge,{originalEvent:xe})),this._updatingCamera=!1}}_fireEvent(u,f){this._map.fire(new r.k(u,f?{originalEvent:f}:{}))}_requestFrame(){return this._map.triggerRepaint(),this._map._renderTaskQueue.add(u=>{delete this._frameId,this.handleEvent(new zs("renderFrame",{timeStamp:u})),this._applyChanges()})}_triggerRenderFrame(){this._frameId===void 0&&(this._frameId=this._requestFrame())}}class ao extends r.E{constructor(u,f){super(),this._renderFrameCallback=()=>{const D=Math.min((h.now()-this._easeStart)/this._easeOptions.duration,1);this._onEaseFrame(this._easeOptions.easing(D)),D<1&&this._easeFrameId?this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback):this.stop()},this._moving=!1,this._zooming=!1,this.transform=u,this._bearingSnap=f.bearingSnap,this.on("moveend",()=>{delete this._requestedCameraState})}getCenter(){return new r.N(this.transform.center.lng,this.transform.center.lat)}setCenter(u,f){return this.jumpTo({center:u},f)}panBy(u,f,D){return u=r.P.convert(u).mult(-1),this.panTo(this.transform.center,r.e({offset:u},f),D)}panTo(u,f,D){return this.easeTo(r.e({center:u},f),D)}getZoom(){return this.transform.zoom}setZoom(u,f){return this.jumpTo({zoom:u},f),this}zoomTo(u,f,D){return this.easeTo(r.e({zoom:u},f),D)}zoomIn(u,f){return this.zoomTo(this.getZoom()+1,u,f),this}zoomOut(u,f){return this.zoomTo(this.getZoom()-1,u,f),this}getBearing(){return this.transform.bearing}setBearing(u,f){return this.jumpTo({bearing:u},f),this}getPadding(){return this.transform.padding}setPadding(u,f){return this.jumpTo({padding:u},f),this}rotateTo(u,f,D){return this.easeTo(r.e({bearing:u},f),D)}resetNorth(u,f){return this.rotateTo(0,r.e({duration:1e3},u),f),this}resetNorthPitch(u,f){return this.easeTo(r.e({bearing:0,pitch:0,duration:1e3},u),f),this}snapToNorth(u,f){return Math.abs(this.getBearing())<this._bearingSnap?this.resetNorth(u,f):this}getPitch(){return this.transform.pitch}setPitch(u,f){return this.jumpTo({pitch:u},f),this}cameraForBounds(u,f){u=Ce.convert(u);const D=f&&f.bearing||0;return this._cameraForBoxAndBearing(u.getNorthWest(),u.getSouthEast(),D,f)}_cameraForBoxAndBearing(u,f,D,V){const J={top:0,bottom:0,right:0,left:0};if(typeof(V=r.e({padding:J,offset:[0,0],maxZoom:this.transform.maxZoom},V)).padding=="number"){const gr=V.padding;V.padding={top:gr,bottom:gr,right:gr,left:gr}}V.padding=r.e(J,V.padding);const oe=this.transform,fe=oe.padding,xe=new Ce(u,f),Ee=oe.project(xe.getNorthWest()),Fe=oe.project(xe.getNorthEast()),Ge=oe.project(xe.getSouthEast()),rt=oe.project(xe.getSouthWest()),ct=r.ba(-D),pt=Ee.rotate(ct),xt=Fe.rotate(ct),Mt=Ge.rotate(ct),Tt=rt.rotate(ct),jt=new r.P(Math.max(pt.x,xt.x,Tt.x,Mt.x),Math.max(pt.y,xt.y,Tt.y,Mt.y)),Et=new r.P(Math.min(pt.x,xt.x,Tt.x,Mt.x),Math.min(pt.y,xt.y,Tt.y,Mt.y)),Jt=jt.sub(Et),Kt=(oe.width-(fe.left+fe.right+V.padding.left+V.padding.right))/Jt.x,Yt=(oe.height-(fe.top+fe.bottom+V.padding.top+V.padding.bottom))/Jt.y;if(Yt<0||Kt<0)return void r.w("Map cannot fit within canvas with the given bounds, padding, and/or offset.");const da=Math.min(oe.scaleZoom(oe.scale*Math.min(Kt,Yt)),V.maxZoom),_a=r.P.convert(V.offset),Da=(V.padding.left-V.padding.right)/2,Na=(V.padding.top-V.padding.bottom)/2,Ga=new r.P(Da,Na).rotate(r.ba(D)),$a=_a.add(Ga).mult(oe.scale/oe.zoomScale(da));return{center:oe.unproject(Ee.add(Ge).div(2).sub($a)),zoom:da,bearing:D}}fitBounds(u,f,D){return this._fitInternal(this.cameraForBounds(u,f),f,D)}fitScreenCoordinates(u,f,D,V,J){return this._fitInternal(this._cameraForBoxAndBearing(this.transform.pointLocation(r.P.convert(u)),this.transform.pointLocation(r.P.convert(f)),D,V),V,J)}_fitInternal(u,f,D){return u?(delete(f=r.e(u,f)).padding,f.linear?this.easeTo(f,D):this.flyTo(f,D)):this}jumpTo(u,f){this.stop();const D=this._getTransformForUpdate();let V=!1,J=!1,oe=!1;return"zoom"in u&&D.zoom!==+u.zoom&&(V=!0,D.zoom=+u.zoom),u.center!==void 0&&(D.center=r.N.convert(u.center)),"bearing"in u&&D.bearing!==+u.bearing&&(J=!0,D.bearing=+u.bearing),"pitch"in u&&D.pitch!==+u.pitch&&(oe=!0,D.pitch=+u.pitch),u.padding==null||D.isPaddingEqual(u.padding)||(D.padding=u.padding),this._applyUpdatedTransform(D),this.fire(new r.k("movestart",f)).fire(new r.k("move",f)),V&&this.fire(new r.k("zoomstart",f)).fire(new r.k("zoom",f)).fire(new r.k("zoomend",f)),J&&this.fire(new r.k("rotatestart",f)).fire(new r.k("rotate",f)).fire(new r.k("rotateend",f)),oe&&this.fire(new r.k("pitchstart",f)).fire(new r.k("pitch",f)).fire(new r.k("pitchend",f)),this.fire(new r.k("moveend",f))}calculateCameraOptionsFromTo(u,f,D,V=0){const J=r.Z.fromLngLat(u,f),oe=r.Z.fromLngLat(D,V),fe=oe.x-J.x,xe=oe.y-J.y,Ee=oe.z-J.z,Fe=Math.hypot(fe,xe,Ee);if(Fe===0)throw new Error("Can't calculate camera options with same From and To");const Ge=Math.hypot(fe,xe),rt=this.transform.scaleZoom(this.transform.cameraToCenterDistance/Fe/this.transform.tileSize),ct=180*Math.atan2(fe,-xe)/Math.PI;let pt=180*Math.acos(Ge/Fe)/Math.PI;return pt=Ee<0?90-pt:90+pt,{center:oe.toLngLat(),zoom:rt,pitch:pt,bearing:ct}}easeTo(u,f){var D;this._stop(!1,u.easeId),((u=r.e({offset:[0,0],duration:500,easing:r.b9},u)).animate===!1||!u.essential&&h.prefersReducedMotion)&&(u.duration=0);const V=this._getTransformForUpdate(),J=V.zoom,oe=V.bearing,fe=V.pitch,xe=V.padding,Ee="bearing"in u?this._normalizeBearing(u.bearing,oe):oe,Fe="pitch"in u?+u.pitch:fe,Ge="padding"in u?u.padding:V.padding,rt=r.P.convert(u.offset);let ct=V.centerPoint.add(rt);const pt=V.pointLocation(ct),{center:xt,zoom:Mt}=V.getConstrained(r.N.convert(u.center||pt),(D=u.zoom)!==null&&D!==void 0?D:J);this._normalizeCenter(xt,V);const Tt=V.project(pt),jt=V.project(xt).sub(Tt),Et=V.zoomScale(Mt-J);let Jt,Kt;u.around&&(Jt=r.N.convert(u.around),Kt=V.locationPoint(Jt));const Yt={moving:this._moving,zooming:this._zooming,rotating:this._rotating,pitching:this._pitching};return this._zooming=this._zooming||Mt!==J,this._rotating=this._rotating||oe!==Ee,this._pitching=this._pitching||Fe!==fe,this._padding=!V.isPaddingEqual(Ge),this._easeId=u.easeId,this._prepareEase(f,u.noMoveStart,Yt),this.terrain&&this._prepareElevation(xt),this._ease(da=>{if(this._zooming&&(V.zoom=r.z.number(J,Mt,da)),this._rotating&&(V.bearing=r.z.number(oe,Ee,da)),this._pitching&&(V.pitch=r.z.number(fe,Fe,da)),this._padding&&(V.interpolatePadding(xe,Ge,da),ct=V.centerPoint.add(rt)),this.terrain&&!u.freezeElevation&&this._updateElevation(da),Jt)V.setLocationAtPoint(Jt,Kt);else{const _a=V.zoomScale(V.zoom-J),Da=Mt>J?Math.min(2,Et):Math.max(.5,Et),Na=Math.pow(Da,1-da),Ga=V.unproject(Tt.add(jt.mult(da*Na)).mult(_a));V.setLocationAtPoint(V.renderWorldCopies?Ga.wrap():Ga,ct)}this._applyUpdatedTransform(V),this._fireMoveEvents(f)},da=>{this.terrain&&u.freezeElevation&&this._finalizeElevation(),this._afterEase(f,da)},u),this}_prepareEase(u,f,D={}){this._moving=!0,f||D.moving||this.fire(new r.k("movestart",u)),this._zooming&&!D.zooming&&this.fire(new r.k("zoomstart",u)),this._rotating&&!D.rotating&&this.fire(new r.k("rotatestart",u)),this._pitching&&!D.pitching&&this.fire(new r.k("pitchstart",u))}_prepareElevation(u){this._elevationCenter=u,this._elevationStart=this.transform.elevation,this._elevationTarget=this.terrain.getElevationForLngLatZoom(u,this.transform.tileZoom),this._elevationFreeze=!0}_updateElevation(u){this.transform.minElevationForCurrentTile=this.terrain.getMinTileElevationForLngLatZoom(this._elevationCenter,this.transform.tileZoom);const f=this.terrain.getElevationForLngLatZoom(this._elevationCenter,this.transform.tileZoom);if(u<1&&f!==this._elevationTarget){const D=this._elevationTarget-this._elevationStart,V=(f-(D*u+this._elevationStart))/(1-u);this._elevationStart+=u*(D-V),this._elevationTarget=f}this.transform.elevation=r.z.number(this._elevationStart,this._elevationTarget,u)}_finalizeElevation(){this._elevationFreeze=!1,this.transform.recalculateZoom(this.terrain)}_getTransformForUpdate(){return this.transformCameraUpdate||this.terrain?(this._requestedCameraState||(this._requestedCameraState=this.transform.clone()),this._requestedCameraState):this.transform}_elevateCameraIfInsideTerrain(u){const f=u.getCameraPosition(),D=this.terrain.getElevationForLngLatZoom(f.lngLat,u.zoom);if(f.altitude<D){const V=this.calculateCameraOptionsFromTo(f.lngLat,D,u.center,u.elevation);return{pitch:V.pitch,zoom:V.zoom}}return{}}_applyUpdatedTransform(u){const f=[];if(this.terrain&&f.push(V=>this._elevateCameraIfInsideTerrain(V)),this.transformCameraUpdate&&f.push(V=>this.transformCameraUpdate(V)),!f.length)return;const D=u.clone();for(const V of f){const J=D.clone(),{center:oe,zoom:fe,pitch:xe,bearing:Ee,elevation:Fe}=V(J);oe&&(J.center=oe),fe!==void 0&&(J.zoom=fe),xe!==void 0&&(J.pitch=xe),Ee!==void 0&&(J.bearing=Ee),Fe!==void 0&&(J.elevation=Fe),D.apply(J)}this.transform.apply(D)}_fireMoveEvents(u){this.fire(new r.k("move",u)),this._zooming&&this.fire(new r.k("zoom",u)),this._rotating&&this.fire(new r.k("rotate",u)),this._pitching&&this.fire(new r.k("pitch",u))}_afterEase(u,f){if(this._easeId&&f&&this._easeId===f)return;delete this._easeId;const D=this._zooming,V=this._rotating,J=this._pitching;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,this._padding=!1,D&&this.fire(new r.k("zoomend",u)),V&&this.fire(new r.k("rotateend",u)),J&&this.fire(new r.k("pitchend",u)),this.fire(new r.k("moveend",u))}flyTo(u,f){var D;if(!u.essential&&h.prefersReducedMotion){const nr=r.M(u,["center","zoom","bearing","pitch","around"]);return this.jumpTo(nr,f)}this.stop(),u=r.e({offset:[0,0],speed:1.2,curve:1.42,easing:r.b9},u);const V=this._getTransformForUpdate(),J=V.zoom,oe=V.bearing,fe=V.pitch,xe=V.padding,Ee="bearing"in u?this._normalizeBearing(u.bearing,oe):oe,Fe="pitch"in u?+u.pitch:fe,Ge="padding"in u?u.padding:V.padding,rt=r.P.convert(u.offset);let ct=V.centerPoint.add(rt);const pt=V.pointLocation(ct),{center:xt,zoom:Mt}=V.getConstrained(r.N.convert(u.center||pt),(D=u.zoom)!==null&&D!==void 0?D:J);this._normalizeCenter(xt,V);const Tt=V.zoomScale(Mt-J),jt=V.project(pt),Et=V.project(xt).sub(jt);let Jt=u.curve;const Kt=Math.max(V.width,V.height),Yt=Kt/Tt,da=Et.mag();if("minZoom"in u){const nr=r.ad(Math.min(u.minZoom,J,Mt),V.minZoom,V.maxZoom),Sr=Kt/V.zoomScale(nr-J);Jt=Math.sqrt(Sr/da*2)}const _a=Jt*Jt;function Da(nr){const Sr=(Yt*Yt-Kt*Kt+(nr?-1:1)*_a*_a*da*da)/(2*(nr?Yt:Kt)*_a*da);return Math.log(Math.sqrt(Sr*Sr+1)-Sr)}function Na(nr){return(Math.exp(nr)-Math.exp(-nr))/2}function Ga(nr){return(Math.exp(nr)+Math.exp(-nr))/2}const $a=Da(!1);let gr=function(nr){return Ga($a)/Ga($a+Jt*nr)},Qa=function(nr){return Kt*((Ga($a)*(Na(Sr=$a+Jt*nr)/Ga(Sr))-Na($a))/_a)/da;var Sr},xr=(Da(!0)-$a)/Jt;if(Math.abs(da)<1e-6||!isFinite(xr)){if(Math.abs(Kt-Yt)<1e-6)return this.easeTo(u,f);const nr=Yt<Kt?-1:1;xr=Math.abs(Math.log(Yt/Kt))/Jt,Qa=()=>0,gr=Sr=>Math.exp(nr*Jt*Sr)}if("duration"in u)u.duration=+u.duration;else{const nr="screenSpeed"in u?+u.screenSpeed/Jt:+u.speed;u.duration=1e3*xr/nr}return u.maxDuration&&u.duration>u.maxDuration&&(u.duration=0),this._zooming=!0,this._rotating=oe!==Ee,this._pitching=Fe!==fe,this._padding=!V.isPaddingEqual(Ge),this._prepareEase(f,!1),this.terrain&&this._prepareElevation(xt),this._ease(nr=>{const Sr=nr*xr,pr=1/gr(Sr);V.zoom=nr===1?Mt:J+V.scaleZoom(pr),this._rotating&&(V.bearing=r.z.number(oe,Ee,nr)),this._pitching&&(V.pitch=r.z.number(fe,Fe,nr)),this._padding&&(V.interpolatePadding(xe,Ge,nr),ct=V.centerPoint.add(rt)),this.terrain&&!u.freezeElevation&&this._updateElevation(nr);const Mr=nr===1?xt:V.unproject(jt.add(Et.mult(Qa(Sr))).mult(pr));V.setLocationAtPoint(V.renderWorldCopies?Mr.wrap():Mr,ct),this._applyUpdatedTransform(V),this._fireMoveEvents(f)},()=>{this.terrain&&u.freezeElevation&&this._finalizeElevation(),this._afterEase(f)},u),this}isEasing(){return!!this._easeFrameId}stop(){return this._stop()}_stop(u,f){var D;if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd){const V=this._onEaseEnd;delete this._onEaseEnd,V.call(this,f)}return u||(D=this.handlers)===null||D===void 0||D.stop(!1),this}_ease(u,f,D){D.animate===!1||D.duration===0?(u(1),f()):(this._easeStart=h.now(),this._easeOptions=D,this._onEaseFrame=u,this._onEaseEnd=f,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))}_normalizeBearing(u,f){u=r.b3(u,-180,180);const D=Math.abs(u-f);return Math.abs(u-360-f)<D&&(u-=360),Math.abs(u+360-f)<D&&(u+=360),u}_normalizeCenter(u,f){if(!f.renderWorldCopies||f.lngRange)return;const D=u.lng-f.center.lng;u.lng+=D>180?-360:D<-180?360:0}queryTerrainElevation(u){return this.terrain?this.terrain.getElevationForLngLatZoom(r.N.convert(u),this.transform.tileZoom)-this.transform.elevation:null}}const jo={compact:!0,customAttribution:'<a href="https://maplibre.org/" target="_blank">MapLibre</a>'};class ds{constructor(u=jo){this._toggleAttribution=()=>{this._container.classList.contains("maplibregl-compact")&&(this._container.classList.contains("maplibregl-compact-show")?(this._container.setAttribute("open",""),this._container.classList.remove("maplibregl-compact-show")):(this._container.classList.add("maplibregl-compact-show"),this._container.removeAttribute("open")))},this._updateData=f=>{!f||f.sourceDataType!=="metadata"&&f.sourceDataType!=="visibility"&&f.dataType!=="style"&&f.type!=="terrain"||this._updateAttributions()},this._updateCompact=()=>{this._map.getCanvasContainer().offsetWidth<=640||this._compact?this._compact===!1?this._container.setAttribute("open",""):this._container.classList.contains("maplibregl-compact")||this._container.classList.contains("maplibregl-attrib-empty")||(this._container.setAttribute("open",""),this._container.classList.add("maplibregl-compact","maplibregl-compact-show")):(this._container.setAttribute("open",""),this._container.classList.contains("maplibregl-compact")&&this._container.classList.remove("maplibregl-compact","maplibregl-compact-show"))},this._updateCompactMinimize=()=>{this._container.classList.contains("maplibregl-compact")&&this._container.classList.contains("maplibregl-compact-show")&&this._container.classList.remove("maplibregl-compact-show")},this.options=u}getDefaultPosition(){return"bottom-right"}onAdd(u){return this._map=u,this._compact=this.options.compact,this._container=n.create("details","maplibregl-ctrl maplibregl-ctrl-attrib"),this._compactButton=n.create("summary","maplibregl-ctrl-attrib-button",this._container),this._compactButton.addEventListener("click",this._toggleAttribution),this._setElementTitle(this._compactButton,"ToggleAttribution"),this._innerContainer=n.create("div","maplibregl-ctrl-attrib-inner",this._container),this._updateAttributions(),this._updateCompact(),this._map.on("styledata",this._updateData),this._map.on("sourcedata",this._updateData),this._map.on("terrain",this._updateData),this._map.on("resize",this._updateCompact),this._map.on("drag",this._updateCompactMinimize),this._container}onRemove(){n.remove(this._container),this._map.off("styledata",this._updateData),this._map.off("sourcedata",this._updateData),this._map.off("terrain",this._updateData),this._map.off("resize",this._updateCompact),this._map.off("drag",this._updateCompactMinimize),this._map=void 0,this._compact=void 0,this._attribHTML=void 0}_setElementTitle(u,f){const D=this._map._getUIString(`AttributionControl.${f}`);u.title=D,u.setAttribute("aria-label",D)}_updateAttributions(){if(!this._map.style)return;let u=[];if(this.options.customAttribution&&(Array.isArray(this.options.customAttribution)?u=u.concat(this.options.customAttribution.map(V=>typeof V!="string"?"":V)):typeof this.options.customAttribution=="string"&&u.push(this.options.customAttribution)),this._map.style.stylesheet){const V=this._map.style.stylesheet;this.styleOwner=V.owner,this.styleId=V.id}const f=this._map.style.sourceCaches;for(const V in f){const J=f[V];if(J.used||J.usedForTerrain){const oe=J.getSource();oe.attribution&&u.indexOf(oe.attribution)<0&&u.push(oe.attribution)}}u=u.filter(V=>String(V).trim()),u.sort((V,J)=>V.length-J.length),u=u.filter((V,J)=>{for(let oe=J+1;oe<u.length;oe++)if(u[oe].indexOf(V)>=0)return!1;return!0});const D=u.join(" | ");D!==this._attribHTML&&(this._attribHTML=D,u.length?(this._innerContainer.innerHTML=D,this._container.classList.remove("maplibregl-attrib-empty")):this._container.classList.add("maplibregl-attrib-empty"),this._updateCompact(),this._editLink=null)}}class yo{constructor(u={}){this._updateCompact=()=>{const f=this._container.children;if(f.length){const D=f[0];this._map.getCanvasContainer().offsetWidth<=640||this._compact?this._compact!==!1&&D.classList.add("maplibregl-compact"):D.classList.remove("maplibregl-compact")}},this.options=u}getDefaultPosition(){return"bottom-left"}onAdd(u){this._map=u,this._compact=this.options&&this.options.compact,this._container=n.create("div","maplibregl-ctrl");const f=n.create("a","maplibregl-ctrl-logo");return f.target="_blank",f.rel="noopener nofollow",f.href="https://maplibre.org/",f.setAttribute("aria-label",this._map._getUIString("LogoControl.Title")),f.setAttribute("rel","noopener nofollow"),this._container.appendChild(f),this._container.style.display="block",this._map.on("resize",this._updateCompact),this._updateCompact(),this._container}onRemove(){n.remove(this._container),this._map.off("resize",this._updateCompact),this._map=void 0,this._compact=void 0}}class Ec{constructor(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1}add(u){const f=++this._id;return this._queue.push({callback:u,id:f,cancelled:!1}),f}remove(u){const f=this._currentlyRunning,D=f?this._queue.concat(f):this._queue;for(const V of D)if(V.id===u)return void(V.cancelled=!0)}run(u=0){if(this._currentlyRunning)throw new Error("Attempting to run(), but is already running.");const f=this._currentlyRunning=this._queue;this._queue=[];for(const D of f)if(!D.cancelled&&(D.callback(u),this._cleared))break;this._cleared=!1,this._currentlyRunning=!1}clear(){this._currentlyRunning&&(this._cleared=!0),this._queue=[]}}var tn=r.Y([{name:"a_pos3d",type:"Int16",components:3}]);class Uo extends r.E{constructor(u){super(),this.sourceCache=u,this._tiles={},this._renderableTilesKeys=[],this._sourceTileCache={},this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.deltaZoom=1,u.usedForTerrain=!0,u.tileSize=this.tileSize*2**this.deltaZoom}destruct(){this.sourceCache.usedForTerrain=!1,this.sourceCache.tileSize=null}update(u,f){this.sourceCache.update(u,f),this._renderableTilesKeys=[];const D={};for(const V of u.coveringTiles({tileSize:this.tileSize,minzoom:this.minzoom,maxzoom:this.maxzoom,reparseOverscaled:!1,terrain:f}))D[V.key]=!0,this._renderableTilesKeys.push(V.key),this._tiles[V.key]||(V.posMatrix=new Float64Array(16),r.aQ(V.posMatrix,0,r.X,0,r.X,0,1),this._tiles[V.key]=new _e(V,this.tileSize));for(const V in this._tiles)D[V]||delete this._tiles[V]}freeRtt(u){for(const f in this._tiles){const D=this._tiles[f];(!u||D.tileID.equals(u)||D.tileID.isChildOf(u)||u.isChildOf(D.tileID))&&(D.rtt=[])}}getRenderableTiles(){return this._renderableTilesKeys.map(u=>this.getTileByID(u))}getTileByID(u){return this._tiles[u]}getTerrainCoords(u){const f={};for(const D of this._renderableTilesKeys){const V=this._tiles[D].tileID;if(V.canonical.equals(u.canonical)){const J=u.clone();J.posMatrix=new Float64Array(16),r.aQ(J.posMatrix,0,r.X,0,r.X,0,1),f[D]=J}else if(V.canonical.isChildOf(u.canonical)){const J=u.clone();J.posMatrix=new Float64Array(16);const oe=V.canonical.z-u.canonical.z,fe=V.canonical.x-(V.canonical.x>>oe<<oe),xe=V.canonical.y-(V.canonical.y>>oe<<oe),Ee=r.X>>oe;r.aQ(J.posMatrix,0,Ee,0,Ee,0,1),r.J(J.posMatrix,J.posMatrix,[-fe*Ee,-xe*Ee,0]),f[D]=J}else if(u.canonical.isChildOf(V.canonical)){const J=u.clone();J.posMatrix=new Float64Array(16);const oe=u.canonical.z-V.canonical.z,fe=u.canonical.x-(u.canonical.x>>oe<<oe),xe=u.canonical.y-(u.canonical.y>>oe<<oe),Ee=r.X>>oe;r.aQ(J.posMatrix,0,r.X,0,r.X,0,1),r.J(J.posMatrix,J.posMatrix,[fe*Ee,xe*Ee,0]),r.K(J.posMatrix,J.posMatrix,[1/2**oe,1/2**oe,0]),f[D]=J}}return f}getSourceTile(u,f){const D=this.sourceCache._source;let V=u.overscaledZ-this.deltaZoom;if(V>D.maxzoom&&(V=D.maxzoom),V<D.minzoom)return null;this._sourceTileCache[u.key]||(this._sourceTileCache[u.key]=u.scaledTo(V).key);let J=this.sourceCache.getTileByID(this._sourceTileCache[u.key]);if((!J||!J.dem)&&f)for(;V>=D.minzoom&&(!J||!J.dem);)J=this.sourceCache.getTileByID(u.scaledTo(V--).key);return J}tilesAfterTime(u=Date.now()){return Object.values(this._tiles).filter(f=>f.timeAdded>=u)}}class ii{constructor(u,f,D){this.painter=u,this.sourceCache=new Uo(f),this.options=D,this.exaggeration=typeof D.exaggeration=="number"?D.exaggeration:1,this.qualityFactor=2,this.meshSize=128,this._demMatrixCache={},this.coordsIndex=[],this._coordsTextureSize=1024}getDEMElevation(u,f,D,V=r.X){var J;if(!(f>=0&&f<V&&D>=0&&D<V))return 0;const oe=this.getTerrainData(u),fe=(J=oe.tile)===null||J===void 0?void 0:J.dem;if(!fe)return 0;const xe=function(pt,xt,Mt){var Tt=xt[0],jt=xt[1];return pt[0]=Mt[0]*Tt+Mt[4]*jt+Mt[12],pt[1]=Mt[1]*Tt+Mt[5]*jt+Mt[13],pt}([],[f/V*r.X,D/V*r.X],oe.u_terrain_matrix),Ee=[xe[0]*fe.dim,xe[1]*fe.dim],Fe=Math.floor(Ee[0]),Ge=Math.floor(Ee[1]),rt=Ee[0]-Fe,ct=Ee[1]-Ge;return fe.get(Fe,Ge)*(1-rt)*(1-ct)+fe.get(Fe+1,Ge)*rt*(1-ct)+fe.get(Fe,Ge+1)*(1-rt)*ct+fe.get(Fe+1,Ge+1)*rt*ct}getElevationForLngLatZoom(u,f){const{tileID:D,mercatorX:V,mercatorY:J}=this._getOverscaledTileIDFromLngLatZoom(u,f);return this.getElevation(D,V%r.X,J%r.X,r.X)}getElevation(u,f,D,V=r.X){return this.getDEMElevation(u,f,D,V)*this.exaggeration}getTerrainData(u){if(!this._emptyDemTexture){const V=this.painter.context,J=new r.R({width:1,height:1},new Uint8Array(4));this._emptyDepthTexture=new z(V,J,V.gl.RGBA,{premultiply:!1}),this._emptyDemUnpack=[0,0,0,0],this._emptyDemTexture=new z(V,new r.R({width:1,height:1}),V.gl.RGBA,{premultiply:!1}),this._emptyDemTexture.bind(V.gl.NEAREST,V.gl.CLAMP_TO_EDGE),this._emptyDemMatrix=r.ao([])}const f=this.sourceCache.getSourceTile(u,!0);if(f&&f.dem&&(!f.demTexture||f.needsTerrainPrepare)){const V=this.painter.context;f.demTexture=this.painter.getTileTexture(f.dem.stride),f.demTexture?f.demTexture.update(f.dem.getPixels(),{premultiply:!1}):f.demTexture=new z(V,f.dem.getPixels(),V.gl.RGBA,{premultiply:!1}),f.demTexture.bind(V.gl.NEAREST,V.gl.CLAMP_TO_EDGE),f.needsTerrainPrepare=!1}const D=f&&f+f.tileID.key+u.key;if(D&&!this._demMatrixCache[D]){const V=this.sourceCache.sourceCache._source.maxzoom;let J=u.canonical.z-f.tileID.canonical.z;u.overscaledZ>u.canonical.z&&(u.canonical.z>=V?J=u.canonical.z-V:r.w("cannot calculate elevation if elevation maxzoom > source.maxzoom"));const oe=u.canonical.x-(u.canonical.x>>J<<J),fe=u.canonical.y-(u.canonical.y>>J<<J),xe=r.bb(new Float64Array(16),[1/(r.X<<J),1/(r.X<<J),0]);r.J(xe,xe,[oe*r.X,fe*r.X,0]),this._demMatrixCache[u.key]={matrix:xe,coord:u}}return{u_depth:2,u_terrain:3,u_terrain_dim:f&&f.dem&&f.dem.dim||1,u_terrain_matrix:D?this._demMatrixCache[u.key].matrix:this._emptyDemMatrix,u_terrain_unpack:f&&f.dem&&f.dem.getUnpackVector()||this._emptyDemUnpack,u_terrain_exaggeration:this.exaggeration,texture:(f&&f.demTexture||this._emptyDemTexture).texture,depthTexture:(this._fboDepthTexture||this._emptyDepthTexture).texture,tile:f}}getFramebuffer(u){const f=this.painter,D=f.width/devicePixelRatio,V=f.height/devicePixelRatio;return!this._fbo||this._fbo.width===D&&this._fbo.height===V||(this._fbo.destroy(),this._fboCoordsTexture.destroy(),this._fboDepthTexture.destroy(),delete this._fbo,delete this._fboDepthTexture,delete this._fboCoordsTexture),this._fboCoordsTexture||(this._fboCoordsTexture=new z(f.context,{width:D,height:V,data:null},f.context.gl.RGBA,{premultiply:!1}),this._fboCoordsTexture.bind(f.context.gl.NEAREST,f.context.gl.CLAMP_TO_EDGE)),this._fboDepthTexture||(this._fboDepthTexture=new z(f.context,{width:D,height:V,data:null},f.context.gl.RGBA,{premultiply:!1}),this._fboDepthTexture.bind(f.context.gl.NEAREST,f.context.gl.CLAMP_TO_EDGE)),this._fbo||(this._fbo=f.context.createFramebuffer(D,V,!0,!1),this._fbo.depthAttachment.set(f.context.createRenderbuffer(f.context.gl.DEPTH_COMPONENT16,D,V))),this._fbo.colorAttachment.set(u==="coords"?this._fboCoordsTexture.texture:this._fboDepthTexture.texture),this._fbo}getCoordsTexture(){const u=this.painter.context;if(this._coordsTexture)return this._coordsTexture;const f=new Uint8Array(this._coordsTextureSize*this._coordsTextureSize*4);for(let J=0,oe=0;J<this._coordsTextureSize;J++)for(let fe=0;fe<this._coordsTextureSize;fe++,oe+=4)f[oe+0]=255&fe,f[oe+1]=255&J,f[oe+2]=fe>>8<<4|J>>8,f[oe+3]=0;const D=new r.R({width:this._coordsTextureSize,height:this._coordsTextureSize},new Uint8Array(f.buffer)),V=new z(u,D,u.gl.RGBA,{premultiply:!1});return V.bind(u.gl.NEAREST,u.gl.CLAMP_TO_EDGE),this._coordsTexture=V,V}pointCoordinate(u){this.painter.maybeDrawDepthAndCoords(!0);const f=new Uint8Array(4),D=this.painter.context,V=D.gl,J=Math.round(u.x*this.painter.pixelRatio/devicePixelRatio),oe=Math.round(u.y*this.painter.pixelRatio/devicePixelRatio),fe=Math.round(this.painter.height/devicePixelRatio);D.bindFramebuffer.set(this.getFramebuffer("coords").framebuffer),V.readPixels(J,fe-oe-1,1,1,V.RGBA,V.UNSIGNED_BYTE,f),D.bindFramebuffer.set(null);const xe=f[0]+(f[2]>>4<<8),Ee=f[1]+((15&f[2])<<8),Fe=this.coordsIndex[255-f[3]],Ge=Fe&&this.sourceCache.getTileByID(Fe);if(!Ge)return null;const rt=this._coordsTextureSize,ct=(1<<Ge.tileID.canonical.z)*rt;return new r.Z((Ge.tileID.canonical.x*rt+xe)/ct+Ge.tileID.wrap,(Ge.tileID.canonical.y*rt+Ee)/ct,this.getElevation(Ge.tileID,xe,Ee,rt))}depthAtPoint(u){const f=new Uint8Array(4),D=this.painter.context,V=D.gl;return D.bindFramebuffer.set(this.getFramebuffer("depth").framebuffer),V.readPixels(u.x,this.painter.height/devicePixelRatio-u.y-1,1,1,V.RGBA,V.UNSIGNED_BYTE,f),D.bindFramebuffer.set(null),(f[0]/16777216+f[1]/65536+f[2]/256+f[3])/256}getTerrainMesh(){if(this._mesh)return this._mesh;const u=this.painter.context,f=new r.bc,D=new r.aY,V=this.meshSize,J=r.X/V,oe=V*V;for(let Ge=0;Ge<=V;Ge++)for(let rt=0;rt<=V;rt++)f.emplaceBack(rt*J,Ge*J,0);for(let Ge=0;Ge<oe;Ge+=V+1)for(let rt=0;rt<V;rt++)D.emplaceBack(rt+Ge,V+rt+Ge+1,V+rt+Ge+2),D.emplaceBack(rt+Ge,V+rt+Ge+2,rt+Ge+1);const fe=f.length,xe=fe+2*(V+1);for(const Ge of[0,1])for(let rt=0;rt<=V;rt++)for(const ct of[0,1])f.emplaceBack(rt*J,Ge*r.X,ct);for(let Ge=0;Ge<2*V;Ge+=2)D.emplaceBack(xe+Ge,xe+Ge+1,xe+Ge+3),D.emplaceBack(xe+Ge,xe+Ge+3,xe+Ge+2),D.emplaceBack(fe+Ge,fe+Ge+3,fe+Ge+1),D.emplaceBack(fe+Ge,fe+Ge+2,fe+Ge+3);const Ee=f.length,Fe=Ee+2*(V+1);for(const Ge of[0,1])for(let rt=0;rt<=V;rt++)for(const ct of[0,1])f.emplaceBack(Ge*r.X,rt*J,ct);for(let Ge=0;Ge<2*V;Ge+=2)D.emplaceBack(Ee+Ge,Ee+Ge+1,Ee+Ge+3),D.emplaceBack(Ee+Ge,Ee+Ge+3,Ee+Ge+2),D.emplaceBack(Fe+Ge,Fe+Ge+3,Fe+Ge+1),D.emplaceBack(Fe+Ge,Fe+Ge+2,Fe+Ge+3);return this._mesh=new cc(u.createVertexBuffer(f,tn.members),u.createIndexBuffer(D),r.a0.simpleSegment(0,0,f.length,D.length)),this._mesh}getMeshFrameDelta(u){return 2*Math.PI*r.bd/Math.pow(2,u)/5}getMinTileElevationForLngLatZoom(u,f){var D;const{tileID:V}=this._getOverscaledTileIDFromLngLatZoom(u,f);return(D=this.getMinMaxElevation(V).minElevation)!==null&&D!==void 0?D:0}getMinMaxElevation(u){const f=this.getTerrainData(u).tile,D={minElevation:null,maxElevation:null};return f&&f.dem&&(D.minElevation=f.dem.min*this.exaggeration,D.maxElevation=f.dem.max*this.exaggeration),D}_getOverscaledTileIDFromLngLatZoom(u,f){const D=r.Z.fromLngLat(u.wrap()),V=(1<<f)*r.X,J=D.x*V,oe=D.y*V,fe=Math.floor(J/r.X),xe=Math.floor(oe/r.X);return{tileID:new r.S(f,0,f,fe,xe),mercatorX:J,mercatorY:oe}}}class Vl{constructor(u,f,D){this._context=u,this._size=f,this._tileSize=D,this._objects=[],this._recentlyUsed=[],this._stamp=0}destruct(){for(const u of this._objects)u.texture.destroy(),u.fbo.destroy()}_createObject(u){const f=this._context.createFramebuffer(this._tileSize,this._tileSize,!0,!0),D=new z(this._context,{width:this._tileSize,height:this._tileSize,data:null},this._context.gl.RGBA);return D.bind(this._context.gl.LINEAR,this._context.gl.CLAMP_TO_EDGE),f.depthAttachment.set(this._context.createRenderbuffer(this._context.gl.DEPTH_STENCIL,this._tileSize,this._tileSize)),f.colorAttachment.set(D.texture),{id:u,fbo:f,texture:D,stamp:-1,inUse:!1}}getObjectForId(u){return this._objects[u]}useObject(u){u.inUse=!0,this._recentlyUsed=this._recentlyUsed.filter(f=>u.id!==f),this._recentlyUsed.push(u.id)}stampObject(u){u.stamp=++this._stamp}getOrCreateFreeObject(){for(const f of this._recentlyUsed)if(!this._objects[f].inUse)return this._objects[f];if(this._objects.length>=this._size)throw new Error("No free RenderPool available, call freeAllObjects() required!");const u=this._createObject(this._objects.length);return this._objects.push(u),u}freeObject(u){u.inUse=!1}freeAllObjects(){for(const u of this._objects)this.freeObject(u)}isFull(){return!(this._objects.length<this._size)&&this._objects.some(u=>!u.inUse)===!1}}const vs={background:!0,fill:!0,line:!0,raster:!0,hillshade:!0};class qs{constructor(u,f){this.painter=u,this.terrain=f,this.pool=new Vl(u.context,30,f.sourceCache.tileSize*f.qualityFactor)}destruct(){this.pool.destruct()}getTexture(u){return this.pool.getObjectForId(u.rtt[this._stacks.length-1].id).texture}prepareForRender(u,f){this._stacks=[],this._prevType=null,this._rttTiles=[],this._renderableTiles=this.terrain.sourceCache.getRenderableTiles(),this._renderableLayerIds=u._order.filter(D=>!u._layers[D].isHidden(f)),this._coordsDescendingInv={};for(const D in u.sourceCaches){this._coordsDescendingInv[D]={};const V=u.sourceCaches[D].getVisibleCoordinates();for(const J of V){const oe=this.terrain.sourceCache.getTerrainCoords(J);for(const fe in oe)this._coordsDescendingInv[D][fe]||(this._coordsDescendingInv[D][fe]=[]),this._coordsDescendingInv[D][fe].push(oe[fe])}}this._coordsDescendingInvStr={};for(const D of u._order){const V=u._layers[D],J=V.source;if(vs[V.type]&&!this._coordsDescendingInvStr[J]){this._coordsDescendingInvStr[J]={};for(const oe in this._coordsDescendingInv[J])this._coordsDescendingInvStr[J][oe]=this._coordsDescendingInv[J][oe].map(fe=>fe.key).sort().join()}}for(const D of this._renderableTiles)for(const V in this._coordsDescendingInvStr){const J=this._coordsDescendingInvStr[V][D.tileID.key];J&&J!==D.rttCoords[V]&&(D.rtt=[])}}renderLayer(u){if(u.isHidden(this.painter.transform.zoom))return!1;const f=u.type,D=this.painter,V=this._renderableLayerIds[this._renderableLayerIds.length-1]===u.id;if(vs[f]&&(this._prevType&&vs[this._prevType]||this._stacks.push([]),this._prevType=f,this._stacks[this._stacks.length-1].push(u.id),!V))return!0;if(vs[this._prevType]||vs[f]&&V){this._prevType=f;const J=this._stacks.length-1,oe=this._stacks[J]||[];for(const fe of this._renderableTiles){if(this.pool.isFull()&&(lc(this.painter,this.terrain,this._rttTiles),this._rttTiles=[],this.pool.freeAllObjects()),this._rttTiles.push(fe),fe.rtt[J]){const Ee=this.pool.getObjectForId(fe.rtt[J].id);if(Ee.stamp===fe.rtt[J].stamp){this.pool.useObject(Ee);continue}}const xe=this.pool.getOrCreateFreeObject();this.pool.useObject(xe),this.pool.stampObject(xe),fe.rtt[J]={id:xe.id,stamp:xe.stamp},D.context.bindFramebuffer.set(xe.fbo.framebuffer),D.context.clear({color:r.aN.transparent,stencil:0}),D.currentStencilSource=void 0;for(let Ee=0;Ee<oe.length;Ee++){const Fe=D.style._layers[oe[Ee]],Ge=Fe.source?this._coordsDescendingInv[Fe.source][fe.tileID.key]:[fe.tileID];D.context.viewport.set([0,0,xe.fbo.width,xe.fbo.height]),D._renderTileClippingMasks(Fe,Ge),D.renderLayer(D,D.style.sourceCaches[Fe.source],Fe,Ge),Fe.source&&(fe.rttCoords[Fe.source]=this._coordsDescendingInvStr[Fe.source][fe.tileID.key])}}return lc(this.painter,this.terrain,this._rttTiles),this._rttTiles=[],this.pool.freeAllObjects(),vs[f]}return!1}}const Oc={"AttributionControl.ToggleAttribution":"Toggle attribution","AttributionControl.MapFeedback":"Map feedback","FullscreenControl.Enter":"Enter fullscreen","FullscreenControl.Exit":"Exit fullscreen","GeolocateControl.FindMyLocation":"Find my location","GeolocateControl.LocationNotAvailable":"Location not available","LogoControl.Title":"MapLibre logo","Map.Title":"Map","Marker.Title":"Map marker","NavigationControl.ResetBearing":"Reset bearing to north","NavigationControl.ZoomIn":"Zoom in","NavigationControl.ZoomOut":"Zoom out","Popup.Close":"Close popup","ScaleControl.Feet":"ft","ScaleControl.Meters":"m","ScaleControl.Kilometers":"km","ScaleControl.Miles":"mi","ScaleControl.NauticalMiles":"nm","TerrainControl.Enable":"Enable terrain","TerrainControl.Disable":"Disable terrain","CooperativeGesturesHandler.WindowsHelpText":"Use Ctrl + scroll to zoom the map","CooperativeGesturesHandler.MacHelpText":"Use ⌘ + scroll to zoom the map","CooperativeGesturesHandler.MobileHelpText":"Use two fingers to move the map"},Mc=_,hl={hash:!1,interactive:!0,bearingSnap:7,attributionControl:jo,maplibreLogo:!1,failIfMajorPerformanceCaveat:!1,preserveDrawingBuffer:!1,refreshExpiredTiles:!0,scrollZoom:!0,minZoom:-2,maxZoom:22,minPitch:0,maxPitch:60,boxZoom:!0,dragRotate:!0,dragPan:!0,keyboard:!0,doubleClickZoom:!0,touchZoomRotate:!0,touchPitch:!0,cooperativeGestures:!1,trackResize:!0,center:[0,0],zoom:0,bearing:0,pitch:0,renderWorldCopies:!0,maxTileCacheSize:null,maxTileCacheZoomLevels:r.a.MAX_TILE_CACHE_ZOOM_LEVELS,transformRequest:null,transformCameraUpdate:null,fadeDuration:300,crossSourceCollisions:!0,clickTolerance:3,localIdeographFontFamily:"sans-serif",pitchWithRotate:!0,validateStyle:!0,maxCanvasSize:[4096,4096],cancelPendingTileRequestsWhileZooming:!0},Ei=R=>{R.touchstart=R.dragStart,R.touchmoveWindow=R.dragMove,R.touchend=R.dragEnd},Os={showCompass:!0,showZoom:!0,visualizePitch:!1};class qr{constructor(u,f,D=!1){this.mousedown=oe=>{this.startMouse(r.e({},oe,{ctrlKey:!0,preventDefault:()=>oe.preventDefault()}),n.mousePos(this.element,oe)),n.addEventListener(window,"mousemove",this.mousemove),n.addEventListener(window,"mouseup",this.mouseup)},this.mousemove=oe=>{this.moveMouse(oe,n.mousePos(this.element,oe))},this.mouseup=oe=>{this.mouseRotate.dragEnd(oe),this.mousePitch&&this.mousePitch.dragEnd(oe),this.offTemp()},this.touchstart=oe=>{oe.targetTouches.length!==1?this.reset():(this._startPos=this._lastPos=n.touchPos(this.element,oe.targetTouches)[0],this.startTouch(oe,this._startPos),n.addEventListener(window,"touchmove",this.touchmove,{passive:!1}),n.addEventListener(window,"touchend",this.touchend))},this.touchmove=oe=>{oe.targetTouches.length!==1?this.reset():(this._lastPos=n.touchPos(this.element,oe.targetTouches)[0],this.moveTouch(oe,this._lastPos))},this.touchend=oe=>{oe.targetTouches.length===0&&this._startPos&&this._lastPos&&this._startPos.dist(this._lastPos)<this._clickTolerance&&this.element.click(),delete this._startPos,delete this._lastPos,this.offTemp()},this.reset=()=>{this.mouseRotate.reset(),this.mousePitch&&this.mousePitch.reset(),this.touchRotate.reset(),this.touchPitch&&this.touchPitch.reset(),delete this._startPos,delete this._lastPos,this.offTemp()},this._clickTolerance=10;const V=u.dragRotate._mouseRotate.getClickTolerance(),J=u.dragRotate._mousePitch.getClickTolerance();this.element=f,this.mouseRotate=$l({clickTolerance:V,enable:!0}),this.touchRotate=(({enable:oe,clickTolerance:fe,bearingDegreesPerPixelMoved:xe=.8})=>{const Ee=new Fl;return new Co({clickTolerance:fe,move:(Fe,Ge)=>({bearingDelta:(Ge.x-Fe.x)*xe}),moveStateManager:Ee,enable:oe,assignEvents:Ei})})({clickTolerance:V,enable:!0}),this.map=u,D&&(this.mousePitch=sl({clickTolerance:J,enable:!0}),this.touchPitch=(({enable:oe,clickTolerance:fe,pitchDegreesPerPixelMoved:xe=-.5})=>{const Ee=new Fl;return new Co({clickTolerance:fe,move:(Fe,Ge)=>({pitchDelta:(Ge.y-Fe.y)*xe}),moveStateManager:Ee,enable:oe,assignEvents:Ei})})({clickTolerance:J,enable:!0})),n.addEventListener(f,"mousedown",this.mousedown),n.addEventListener(f,"touchstart",this.touchstart,{passive:!1}),n.addEventListener(f,"touchcancel",this.reset)}startMouse(u,f){this.mouseRotate.dragStart(u,f),this.mousePitch&&this.mousePitch.dragStart(u,f),n.disableDrag()}startTouch(u,f){this.touchRotate.dragStart(u,f),this.touchPitch&&this.touchPitch.dragStart(u,f),n.disableDrag()}moveMouse(u,f){const D=this.map,{bearingDelta:V}=this.mouseRotate.dragMove(u,f)||{};if(V&&D.setBearing(D.getBearing()+V),this.mousePitch){const{pitchDelta:J}=this.mousePitch.dragMove(u,f)||{};J&&D.setPitch(D.getPitch()+J)}}moveTouch(u,f){const D=this.map,{bearingDelta:V}=this.touchRotate.dragMove(u,f)||{};if(V&&D.setBearing(D.getBearing()+V),this.touchPitch){const{pitchDelta:J}=this.touchPitch.dragMove(u,f)||{};J&&D.setPitch(D.getPitch()+J)}}off(){const u=this.element;n.removeEventListener(u,"mousedown",this.mousedown),n.removeEventListener(u,"touchstart",this.touchstart,{passive:!1}),n.removeEventListener(window,"touchmove",this.touchmove,{passive:!1}),n.removeEventListener(window,"touchend",this.touchend),n.removeEventListener(u,"touchcancel",this.reset),this.offTemp()}offTemp(){n.enableDrag(),n.removeEventListener(window,"mousemove",this.mousemove),n.removeEventListener(window,"mouseup",this.mouseup),n.removeEventListener(window,"touchmove",this.touchmove,{passive:!1}),n.removeEventListener(window,"touchend",this.touchend)}}let kn;function Qo(R,u,f){const D=new r.N(R.lng,R.lat);if(R=new r.N(R.lng,R.lat),u){const V=new r.N(R.lng-360,R.lat),J=new r.N(R.lng+360,R.lat),oe=f.locationPoint(R).distSqr(u);f.locationPoint(V).distSqr(u)<oe?R=V:f.locationPoint(J).distSqr(u)<oe&&(R=J)}for(;Math.abs(R.lng-f.center.lng)>180;){const V=f.locationPoint(R);if(V.x>=0&&V.y>=0&&V.x<=f.width&&V.y<=f.height)break;R.lng>f.center.lng?R.lng-=360:R.lng+=360}return R.lng!==D.lng&&f.locationPoint(R).y>f.height/2-f.getHorizon()?R:D}const Ds={center:"translate(-50%,-50%)",top:"translate(-50%,0)","top-left":"translate(0,0)","top-right":"translate(-100%,0)",bottom:"translate(-50%,-100%)","bottom-left":"translate(0,-100%)","bottom-right":"translate(-100%,-100%)",left:"translate(0,-50%)",right:"translate(-100%,-50%)"};function pl(R,u,f){const D=R.classList;for(const V in Ds)D.remove(`maplibregl-${f}-anchor-${V}`);D.add(`maplibregl-${f}-anchor-${u}`)}class Oi extends r.E{constructor(u){if(super(),this._onKeyPress=f=>{const D=f.code,V=f.charCode||f.keyCode;D!=="Space"&&D!=="Enter"&&V!==32&&V!==13||this.togglePopup()},this._onMapClick=f=>{const D=f.originalEvent.target,V=this._element;this._popup&&(D===V||V.contains(D))&&this.togglePopup()},this._update=f=>{var D;if(!this._map)return;const V=this._map.loaded()&&!this._map.isMoving();((f==null?void 0:f.type)==="terrain"||(f==null?void 0:f.type)==="render"&&!V)&&this._map.once("render",this._update),this._map.transform.renderWorldCopies?this._lngLat=Qo(this._lngLat,this._flatPos,this._map.transform):this._lngLat=(D=this._lngLat)===null||D===void 0?void 0:D.wrap(),this._flatPos=this._pos=this._map.project(this._lngLat)._add(this._offset),this._map.terrain&&(this._flatPos=this._map.transform.locationPoint(this._lngLat)._add(this._offset));let J="";this._rotationAlignment==="viewport"||this._rotationAlignment==="auto"?J=`rotateZ(${this._rotation}deg)`:this._rotationAlignment==="map"&&(J=`rotateZ(${this._rotation-this._map.getBearing()}deg)`);let oe="";this._pitchAlignment==="viewport"||this._pitchAlignment==="auto"?oe="rotateX(0deg)":this._pitchAlignment==="map"&&(oe=`rotateX(${this._map.getPitch()}deg)`),this._subpixelPositioning||f&&f.type!=="moveend"||(this._pos=this._pos.round()),n.setTransform(this._element,`${Ds[this._anchor]} translate(${this._pos.x}px, ${this._pos.y}px) ${oe} ${J}`),h.frameAsync(new AbortController).then(()=>{this._updateOpacity(f&&f.type==="moveend")}).catch(()=>{})},this._onMove=f=>{if(!this._isDragging){const D=this._clickTolerance||this._map._clickTolerance;this._isDragging=f.point.dist(this._pointerdownPos)>=D}this._isDragging&&(this._pos=f.point.sub(this._positionDelta),this._lngLat=this._map.unproject(this._pos),this.setLngLat(this._lngLat),this._element.style.pointerEvents="none",this._state==="pending"&&(this._state="active",this.fire(new r.k("dragstart"))),this.fire(new r.k("drag")))},this._onUp=()=>{this._element.style.pointerEvents="auto",this._positionDelta=null,this._pointerdownPos=null,this._isDragging=!1,this._map.off("mousemove",this._onMove),this._map.off("touchmove",this._onMove),this._state==="active"&&this.fire(new r.k("dragend")),this._state="inactive"},this._addDragHandler=f=>{this._element.contains(f.originalEvent.target)&&(f.preventDefault(),this._positionDelta=f.point.sub(this._pos).add(this._offset),this._pointerdownPos=f.point,this._state="pending",this._map.on("mousemove",this._onMove),this._map.on("touchmove",this._onMove),this._map.once("mouseup",this._onUp),this._map.once("touchend",this._onUp))},this._anchor=u&&u.anchor||"center",this._color=u&&u.color||"#3FB1CE",this._scale=u&&u.scale||1,this._draggable=u&&u.draggable||!1,this._clickTolerance=u&&u.clickTolerance||0,this._subpixelPositioning=u&&u.subpixelPositioning||!1,this._isDragging=!1,this._state="inactive",this._rotation=u&&u.rotation||0,this._rotationAlignment=u&&u.rotationAlignment||"auto",this._pitchAlignment=u&&u.pitchAlignment&&u.pitchAlignment!=="auto"?u.pitchAlignment:this._rotationAlignment,this.setOpacity(),this.setOpacity(u==null?void 0:u.opacity,u==null?void 0:u.opacityWhenCovered),u&&u.element)this._element=u.element,this._offset=r.P.convert(u&&u.offset||[0,0]);else{this._defaultMarker=!0,this._element=n.create("div");const f=n.createNS("http://www.w3.org/2000/svg","svg"),D=41,V=27;f.setAttributeNS(null,"display","block"),f.setAttributeNS(null,"height",`${D}px`),f.setAttributeNS(null,"width",`${V}px`),f.setAttributeNS(null,"viewBox",`0 0 ${V} ${D}`);const J=n.createNS("http://www.w3.org/2000/svg","g");J.setAttributeNS(null,"stroke","none"),J.setAttributeNS(null,"stroke-width","1"),J.setAttributeNS(null,"fill","none"),J.setAttributeNS(null,"fill-rule","evenodd");const oe=n.createNS("http://www.w3.org/2000/svg","g");oe.setAttributeNS(null,"fill-rule","nonzero");const fe=n.createNS("http://www.w3.org/2000/svg","g");fe.setAttributeNS(null,"transform","translate(3.0, 29.0)"),fe.setAttributeNS(null,"fill","#000000");const xe=[{rx:"10.5",ry:"5.25002273"},{rx:"10.5",ry:"5.25002273"},{rx:"9.5",ry:"4.77275007"},{rx:"8.5",ry:"4.29549936"},{rx:"7.5",ry:"3.81822308"},{rx:"6.5",ry:"3.34094679"},{rx:"5.5",ry:"2.86367051"},{rx:"4.5",ry:"2.38636864"}];for(const Tt of xe){const jt=n.createNS("http://www.w3.org/2000/svg","ellipse");jt.setAttributeNS(null,"opacity","0.04"),jt.setAttributeNS(null,"cx","10.5"),jt.setAttributeNS(null,"cy","5.80029008"),jt.setAttributeNS(null,"rx",Tt.rx),jt.setAttributeNS(null,"ry",Tt.ry),fe.appendChild(jt)}const Ee=n.createNS("http://www.w3.org/2000/svg","g");Ee.setAttributeNS(null,"fill",this._color);const Fe=n.createNS("http://www.w3.org/2000/svg","path");Fe.setAttributeNS(null,"d","M27,13.5 C27,19.074644 20.250001,27.000002 14.75,34.500002 C14.016665,35.500004 12.983335,35.500004 12.25,34.500002 C6.7499993,27.000002 0,19.222562 0,13.5 C0,6.0441559 6.0441559,0 13.5,0 C20.955844,0 27,6.0441559 27,13.5 Z"),Ee.appendChild(Fe);const Ge=n.createNS("http://www.w3.org/2000/svg","g");Ge.setAttributeNS(null,"opacity","0.25"),Ge.setAttributeNS(null,"fill","#000000");const rt=n.createNS("http://www.w3.org/2000/svg","path");rt.setAttributeNS(null,"d","M13.5,0 C6.0441559,0 0,6.0441559 0,13.5 C0,19.222562 6.7499993,27 12.25,34.5 C13,35.522727 14.016664,35.500004 14.75,34.5 C20.250001,27 27,19.074644 27,13.5 C27,6.0441559 20.955844,0 13.5,0 Z M13.5,1 C20.415404,1 26,6.584596 26,13.5 C26,15.898657 24.495584,19.181431 22.220703,22.738281 C19.945823,26.295132 16.705119,30.142167 13.943359,33.908203 C13.743445,34.180814 13.612715,34.322738 13.5,34.441406 C13.387285,34.322738 13.256555,34.180814 13.056641,33.908203 C10.284481,30.127985 7.4148684,26.314159 5.015625,22.773438 C2.6163816,19.232715 1,15.953538 1,13.5 C1,6.584596 6.584596,1 13.5,1 Z"),Ge.appendChild(rt);const ct=n.createNS("http://www.w3.org/2000/svg","g");ct.setAttributeNS(null,"transform","translate(6.0, 7.0)"),ct.setAttributeNS(null,"fill","#FFFFFF");const pt=n.createNS("http://www.w3.org/2000/svg","g");pt.setAttributeNS(null,"transform","translate(8.0, 8.0)");const xt=n.createNS("http://www.w3.org/2000/svg","circle");xt.setAttributeNS(null,"fill","#000000"),xt.setAttributeNS(null,"opacity","0.25"),xt.setAttributeNS(null,"cx","5.5"),xt.setAttributeNS(null,"cy","5.5"),xt.setAttributeNS(null,"r","5.4999962");const Mt=n.createNS("http://www.w3.org/2000/svg","circle");Mt.setAttributeNS(null,"fill","#FFFFFF"),Mt.setAttributeNS(null,"cx","5.5"),Mt.setAttributeNS(null,"cy","5.5"),Mt.setAttributeNS(null,"r","5.4999962"),pt.appendChild(xt),pt.appendChild(Mt),oe.appendChild(fe),oe.appendChild(Ee),oe.appendChild(Ge),oe.appendChild(ct),oe.appendChild(pt),f.appendChild(oe),f.setAttributeNS(null,"height",D*this._scale+"px"),f.setAttributeNS(null,"width",V*this._scale+"px"),this._element.appendChild(f),this._offset=r.P.convert(u&&u.offset||[0,-14])}if(this._element.classList.add("maplibregl-marker"),this._element.addEventListener("dragstart",f=>{f.preventDefault()}),this._element.addEventListener("mousedown",f=>{f.preventDefault()}),pl(this._element,this._anchor,"marker"),u&&u.className)for(const f of u.className.split(" "))this._element.classList.add(f);this._popup=null}addTo(u){return this.remove(),this._map=u,this._element.setAttribute("aria-label",u._getUIString("Marker.Title")),u.getCanvasContainer().appendChild(this._element),u.on("move",this._update),u.on("moveend",this._update),u.on("terrain",this._update),this.setDraggable(this._draggable),this._update(),this._map.on("click",this._onMapClick),this}remove(){return this._opacityTimeout&&(clearTimeout(this._opacityTimeout),delete this._opacityTimeout),this._map&&(this._map.off("click",this._onMapClick),this._map.off("move",this._update),this._map.off("moveend",this._update),this._map.off("terrain",this._update),this._map.off("mousedown",this._addDragHandler),this._map.off("touchstart",this._addDragHandler),this._map.off("mouseup",this._onUp),this._map.off("touchend",this._onUp),this._map.off("mousemove",this._onMove),this._map.off("touchmove",this._onMove),delete this._map),n.remove(this._element),this._popup&&this._popup.remove(),this}getLngLat(){return this._lngLat}setLngLat(u){return this._lngLat=r.N.convert(u),this._pos=null,this._popup&&this._popup.setLngLat(this._lngLat),this._update(),this}getElement(){return this._element}setPopup(u){if(this._popup&&(this._popup.remove(),this._popup=null,this._element.removeEventListener("keypress",this._onKeyPress),this._originalTabIndex||this._element.removeAttribute("tabindex")),u){if(!("offset"in u.options)){const V=Math.abs(13.5)/Math.SQRT2;u.options.offset=this._defaultMarker?{top:[0,0],"top-left":[0,0],"top-right":[0,0],bottom:[0,-38.1],"bottom-left":[V,-1*(24.6+V)],"bottom-right":[-V,-1*(24.6+V)],left:[13.5,-24.6],right:[-13.5,-24.6]}:this._offset}this._popup=u,this._originalTabIndex=this._element.getAttribute("tabindex"),this._originalTabIndex||this._element.setAttribute("tabindex","0"),this._element.addEventListener("keypress",this._onKeyPress)}return this}setSubpixelPositioning(u){return this._subpixelPositioning=u,this}getPopup(){return this._popup}togglePopup(){const u=this._popup;return this._element.style.opacity===this._opacityWhenCovered?this:u?(u.isOpen()?u.remove():(u.setLngLat(this._lngLat),u.addTo(this._map)),this):this}_updateOpacity(u=!1){var f,D;if(!(!((f=this._map)===null||f===void 0)&&f.terrain))return void(this._element.style.opacity!==this._opacity&&(this._element.style.opacity=this._opacity));if(u)this._opacityTimeout=null;else{if(this._opacityTimeout)return;this._opacityTimeout=setTimeout(()=>{this._opacityTimeout=null},100)}const V=this._map,J=V.terrain.depthAtPoint(this._pos),oe=V.terrain.getElevationForLngLatZoom(this._lngLat,V.transform.tileZoom);if(V.transform.lngLatToCameraDepth(this._lngLat,oe)-J<.006)return void(this._element.style.opacity=this._opacity);const fe=-this._offset.y/V.transform._pixelPerMeter,xe=Math.sin(V.getPitch()*Math.PI/180)*fe,Ee=V.terrain.depthAtPoint(new r.P(this._pos.x,this._pos.y-this._offset.y)),Fe=V.transform.lngLatToCameraDepth(this._lngLat,oe+xe)-Ee>.006;!((D=this._popup)===null||D===void 0)&&D.isOpen()&&Fe&&this._popup.remove(),this._element.style.opacity=Fe?this._opacityWhenCovered:this._opacity}getOffset(){return this._offset}setOffset(u){return this._offset=r.P.convert(u),this._update(),this}addClassName(u){this._element.classList.add(u)}removeClassName(u){this._element.classList.remove(u)}toggleClassName(u){return this._element.classList.toggle(u)}setDraggable(u){return this._draggable=!!u,this._map&&(u?(this._map.on("mousedown",this._addDragHandler),this._map.on("touchstart",this._addDragHandler)):(this._map.off("mousedown",this._addDragHandler),this._map.off("touchstart",this._addDragHandler))),this}isDraggable(){return this._draggable}setRotation(u){return this._rotation=u||0,this._update(),this}getRotation(){return this._rotation}setRotationAlignment(u){return this._rotationAlignment=u||"auto",this._update(),this}getRotationAlignment(){return this._rotationAlignment}setPitchAlignment(u){return this._pitchAlignment=u&&u!=="auto"?u:this._rotationAlignment,this._update(),this}getPitchAlignment(){return this._pitchAlignment}setOpacity(u,f){return u===void 0&&f===void 0&&(this._opacity="1",this._opacityWhenCovered="0.2"),u!==void 0&&(this._opacity=u),f!==void 0&&(this._opacityWhenCovered=f),this._map&&this._updateOpacity(!0),this}}const jl={positionOptions:{enableHighAccuracy:!1,maximumAge:0,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showAccuracyCircle:!0,showUserLocation:!0};let Xn=0,Kl=!1;class fn extends r.E{constructor(u){super(),this._onSuccess=f=>{if(this._map){if(this._isOutOfMapMaxBounds(f))return this._setErrorState(),this.fire(new r.k("outofmaxbounds",f)),this._updateMarker(),void this._finish();if(this.options.trackUserLocation)switch(this._lastKnownPosition=f,this._watchState){case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active");break;case"BACKGROUND":case"BACKGROUND_ERROR":this._watchState="BACKGROUND",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background");break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}this.options.showUserLocation&&this._watchState!=="OFF"&&this._updateMarker(f),this.options.trackUserLocation&&this._watchState!=="ACTIVE_LOCK"||this._updateCamera(f),this.options.showUserLocation&&this._dotElement.classList.remove("maplibregl-user-location-dot-stale"),this.fire(new r.k("geolocate",f)),this._finish()}},this._updateCamera=f=>{const D=new r.N(f.coords.longitude,f.coords.latitude),V=f.coords.accuracy,J=this._map.getBearing(),oe=r.e({bearing:J},this.options.fitBoundsOptions),fe=Ce.fromLngLat(D,V);this._map.fitBounds(fe,oe,{geolocateSource:!0})},this._updateMarker=f=>{if(f){const D=new r.N(f.coords.longitude,f.coords.latitude);this._accuracyCircleMarker.setLngLat(D).addTo(this._map),this._userLocationDotMarker.setLngLat(D).addTo(this._map),this._accuracy=f.coords.accuracy,this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()}else this._userLocationDotMarker.remove(),this._accuracyCircleMarker.remove()},this._onZoom=()=>{this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()},this._onError=f=>{if(this._map){if(this.options.trackUserLocation)if(f.code===1){this._watchState="OFF",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background-error"),this._geolocateButton.disabled=!0;const D=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.title=D,this._geolocateButton.setAttribute("aria-label",D),this._geolocationWatchID!==void 0&&this._clearWatch()}else{if(f.code===3&&Kl)return;this._setErrorState()}this._watchState!=="OFF"&&this.options.showUserLocation&&this._dotElement.classList.add("maplibregl-user-location-dot-stale"),this.fire(new r.k("error",f)),this._finish()}},this._finish=()=>{this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0},this._setupUI=()=>{this._map&&(this._container.addEventListener("contextmenu",f=>f.preventDefault()),this._geolocateButton=n.create("button","maplibregl-ctrl-geolocate",this._container),n.create("span","maplibregl-ctrl-icon",this._geolocateButton).setAttribute("aria-hidden","true"),this._geolocateButton.type="button",this._geolocateButton.disabled=!0)},this._finishSetupUI=f=>{if(this._map){if(f===!1){r.w("Geolocation support is not available so the GeolocateControl will be disabled.");const D=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.disabled=!0,this._geolocateButton.title=D,this._geolocateButton.setAttribute("aria-label",D)}else{const D=this._map._getUIString("GeolocateControl.FindMyLocation");this._geolocateButton.disabled=!1,this._geolocateButton.title=D,this._geolocateButton.setAttribute("aria-label",D)}this.options.trackUserLocation&&(this._geolocateButton.setAttribute("aria-pressed","false"),this._watchState="OFF"),this.options.showUserLocation&&(this._dotElement=n.create("div","maplibregl-user-location-dot"),this._userLocationDotMarker=new Oi({element:this._dotElement}),this._circleElement=n.create("div","maplibregl-user-location-accuracy-circle"),this._accuracyCircleMarker=new Oi({element:this._circleElement,pitchAlignment:"map"}),this.options.trackUserLocation&&(this._watchState="OFF"),this._map.on("zoom",this._onZoom)),this._geolocateButton.addEventListener("click",()=>this.trigger()),this._setup=!0,this.options.trackUserLocation&&this._map.on("movestart",D=>{const V=D.originalEvent&&D.originalEvent.type==="resize";D.geolocateSource||this._watchState!=="ACTIVE_LOCK"||V||(this._watchState="BACKGROUND",this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this.fire(new r.k("trackuserlocationend")),this.fire(new r.k("userlocationlostfocus")))})}},this.options=r.e({},jl,u)}onAdd(u){return this._map=u,this._container=n.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._setupUI(),function(){return r._(this,arguments,void 0,function*(f=!1){if(kn!==void 0&&!f)return kn;if(window.navigator.permissions===void 0)return kn=!!window.navigator.geolocation,kn;try{kn=(yield window.navigator.permissions.query({name:"geolocation"})).state!=="denied"}catch{kn=!!window.navigator.geolocation}return kn})}().then(f=>this._finishSetupUI(f)),this._container}onRemove(){this._geolocationWatchID!==void 0&&(window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0),this.options.showUserLocation&&this._userLocationDotMarker&&this._userLocationDotMarker.remove(),this.options.showAccuracyCircle&&this._accuracyCircleMarker&&this._accuracyCircleMarker.remove(),n.remove(this._container),this._map.off("zoom",this._onZoom),this._map=void 0,Xn=0,Kl=!1}_isOutOfMapMaxBounds(u){const f=this._map.getMaxBounds(),D=u.coords;return f&&(D.longitude<f.getWest()||D.longitude>f.getEast()||D.latitude<f.getSouth()||D.latitude>f.getNorth())}_setErrorState(){switch(this._watchState){case"WAITING_ACTIVE":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active-error");break;case"ACTIVE_LOCK":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting");break;case"BACKGROUND":this._watchState="BACKGROUND_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting");break;case"ACTIVE_ERROR":break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}}_updateCircleRadius(){const u=this._map.getBounds(),f=u.getSouthEast(),D=u.getNorthEast(),V=f.distanceTo(D),J=this._map._container.clientHeight,oe=Math.ceil(this._accuracy/(V/J)*2);this._circleElement.style.width=`${oe}px`,this._circleElement.style.height=`${oe}px`}trigger(){if(!this._setup)return r.w("Geolocate control triggered before added to a map"),!1;if(this.options.trackUserLocation){switch(this._watchState){case"OFF":this._watchState="WAITING_ACTIVE",this.fire(new r.k("trackuserlocationstart"));break;case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":case"BACKGROUND_ERROR":Xn--,Kl=!1,this._watchState="OFF",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background-error"),this.fire(new r.k("trackuserlocationend"));break;case"BACKGROUND":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._lastKnownPosition&&this._updateCamera(this._lastKnownPosition),this.fire(new r.k("trackuserlocationstart")),this.fire(new r.k("userlocationfocus"));break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}switch(this._watchState){case"WAITING_ACTIVE":this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active");break;case"ACTIVE_LOCK":this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active");break;case"OFF":break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}if(this._watchState==="OFF"&&this._geolocationWatchID!==void 0)this._clearWatch();else if(this._geolocationWatchID===void 0){let u;this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","true"),Xn++,Xn>1?(u={maximumAge:6e5,timeout:0},Kl=!0):(u=this.options.positionOptions,Kl=!1),this._geolocationWatchID=window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,u)}}else window.navigator.geolocation.getCurrentPosition(this._onSuccess,this._onError,this.options.positionOptions),this._timeoutId=setTimeout(this._finish,1e4);return!0}_clearWatch(){window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0,this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","false"),this.options.showUserLocation&&this._updateMarker(null)}}const an={maxWidth:100,unit:"metric"};function wi(R,u,f){const D=f&&f.maxWidth||100,V=R._container.clientHeight/2,J=R.unproject([0,V]),oe=R.unproject([D,V]),fe=J.distanceTo(oe);if(f&&f.unit==="imperial"){const xe=3.2808*fe;xe>5280?vo(u,D,xe/5280,R._getUIString("ScaleControl.Miles")):vo(u,D,xe,R._getUIString("ScaleControl.Feet"))}else f&&f.unit==="nautical"?vo(u,D,fe/1852,R._getUIString("ScaleControl.NauticalMiles")):fe>=1e3?vo(u,D,fe/1e3,R._getUIString("ScaleControl.Kilometers")):vo(u,D,fe,R._getUIString("ScaleControl.Meters"))}function vo(R,u,f,D){const V=function(oe){const fe=Math.pow(10,`${Math.floor(oe)}`.length-1);let xe=oe/fe;return xe=xe>=10?10:xe>=5?5:xe>=3?3:xe>=2?2:xe>=1?1:function(Ee){const Fe=Math.pow(10,Math.ceil(-Math.log(Ee)/Math.LN10));return Math.round(Ee*Fe)/Fe}(xe),fe*xe}(f),J=V/f;R.style.width=u*J+"px",R.innerHTML=`${V}&nbsp;${D}`}class Ul extends r.E{constructor(u={}){super(),this._onFullscreenChange=()=>{var f;let D=window.document.fullscreenElement||window.document.mozFullScreenElement||window.document.webkitFullscreenElement||window.document.msFullscreenElement;for(;!((f=D==null?void 0:D.shadowRoot)===null||f===void 0)&&f.fullscreenElement;)D=D.shadowRoot.fullscreenElement;D===this._container!==this._fullscreen&&this._handleFullscreenChange()},this._onClickFullscreen=()=>{this._isFullscreen()?this._exitFullscreen():this._requestFullscreen()},this._fullscreen=!1,u&&u.container&&(u.container instanceof HTMLElement?this._container=u.container:r.w("Full screen control 'container' must be a DOM element.")),"onfullscreenchange"in document?this._fullscreenchange="fullscreenchange":"onmozfullscreenchange"in document?this._fullscreenchange="mozfullscreenchange":"onwebkitfullscreenchange"in document?this._fullscreenchange="webkitfullscreenchange":"onmsfullscreenchange"in document&&(this._fullscreenchange="MSFullscreenChange")}onAdd(u){return this._map=u,this._container||(this._container=this._map.getContainer()),this._controlContainer=n.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._setupUI(),this._controlContainer}onRemove(){n.remove(this._controlContainer),this._map=null,window.document.removeEventListener(this._fullscreenchange,this._onFullscreenChange)}_setupUI(){const u=this._fullscreenButton=n.create("button","maplibregl-ctrl-fullscreen",this._controlContainer);n.create("span","maplibregl-ctrl-icon",u).setAttribute("aria-hidden","true"),u.type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),window.document.addEventListener(this._fullscreenchange,this._onFullscreenChange)}_updateTitle(){const u=this._getTitle();this._fullscreenButton.setAttribute("aria-label",u),this._fullscreenButton.title=u}_getTitle(){return this._map._getUIString(this._isFullscreen()?"FullscreenControl.Exit":"FullscreenControl.Enter")}_isFullscreen(){return this._fullscreen}_handleFullscreenChange(){this._fullscreen=!this._fullscreen,this._fullscreenButton.classList.toggle("maplibregl-ctrl-shrink"),this._fullscreenButton.classList.toggle("maplibregl-ctrl-fullscreen"),this._updateTitle(),this._fullscreen?(this.fire(new r.k("fullscreenstart")),this._prevCooperativeGesturesEnabled=this._map.cooperativeGestures.isEnabled(),this._map.cooperativeGestures.disable()):(this.fire(new r.k("fullscreenend")),this._prevCooperativeGesturesEnabled&&this._map.cooperativeGestures.enable())}_exitFullscreen(){window.document.exitFullscreen?window.document.exitFullscreen():window.document.mozCancelFullScreen?window.document.mozCancelFullScreen():window.document.msExitFullscreen?window.document.msExitFullscreen():window.document.webkitCancelFullScreen?window.document.webkitCancelFullScreen():this._togglePseudoFullScreen()}_requestFullscreen(){this._container.requestFullscreen?this._container.requestFullscreen():this._container.mozRequestFullScreen?this._container.mozRequestFullScreen():this._container.msRequestFullscreen?this._container.msRequestFullscreen():this._container.webkitRequestFullscreen?this._container.webkitRequestFullscreen():this._togglePseudoFullScreen()}_togglePseudoFullScreen(){this._container.classList.toggle("maplibregl-pseudo-fullscreen"),this._handleFullscreenChange(),this._map.resize()}}const es={closeButton:!0,closeOnClick:!0,focusAfterOpen:!0,className:"",maxWidth:"240px",subpixelPositioning:!1},vt=["a[href]","[tabindex]:not([tabindex='-1'])","[contenteditable]:not([contenteditable='false'])","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].join(", ");class kt extends r.E{constructor(u){super(),this.remove=()=>(this._content&&n.remove(this._content),this._container&&(n.remove(this._container),delete this._container),this._map&&(this._map.off("move",this._update),this._map.off("move",this._onClose),this._map.off("click",this._onClose),this._map.off("remove",this.remove),this._map.off("mousemove",this._onMouseMove),this._map.off("mouseup",this._onMouseUp),this._map.off("drag",this._onDrag),this._map._canvasContainer.classList.remove("maplibregl-track-pointer"),delete this._map,this.fire(new r.k("close"))),this),this._onMouseUp=f=>{this._update(f.point)},this._onMouseMove=f=>{this._update(f.point)},this._onDrag=f=>{this._update(f.point)},this._update=f=>{var D;const V=this._lngLat||this._trackPointer;if(!this._map||!V||!this._content)return;if(!this._container){if(this._container=n.create("div","maplibregl-popup",this._map.getContainer()),this._tip=n.create("div","maplibregl-popup-tip",this._container),this._container.appendChild(this._content),this.options.className)for(const Ee of this.options.className.split(" "))this._container.classList.add(Ee);this._closeButton&&this._closeButton.setAttribute("aria-label",this._map._getUIString("Popup.Close")),this._trackPointer&&this._container.classList.add("maplibregl-popup-track-pointer")}if(this.options.maxWidth&&this._container.style.maxWidth!==this.options.maxWidth&&(this._container.style.maxWidth=this.options.maxWidth),this._map.transform.renderWorldCopies&&!this._trackPointer?this._lngLat=Qo(this._lngLat,this._flatPos,this._map.transform):this._lngLat=(D=this._lngLat)===null||D===void 0?void 0:D.wrap(),this._trackPointer&&!f)return;const J=this._flatPos=this._pos=this._trackPointer&&f?f:this._map.project(this._lngLat);this._map.terrain&&(this._flatPos=this._trackPointer&&f?f:this._map.transform.locationPoint(this._lngLat));let oe=this.options.anchor;const fe=zt(this.options.offset);if(!oe){const Ee=this._container.offsetWidth,Fe=this._container.offsetHeight;let Ge;Ge=J.y+fe.bottom.y<Fe?["top"]:J.y>this._map.transform.height-Fe?["bottom"]:[],J.x<Ee/2?Ge.push("left"):J.x>this._map.transform.width-Ee/2&&Ge.push("right"),oe=Ge.length===0?"bottom":Ge.join("-")}let xe=J.add(fe[oe]);this.options.subpixelPositioning||(xe=xe.round()),n.setTransform(this._container,`${Ds[oe]} translate(${xe.x}px,${xe.y}px)`),pl(this._container,oe,"popup")},this._onClose=()=>{this.remove()},this.options=r.e(Object.create(es),u)}addTo(u){return this._map&&this.remove(),this._map=u,this.options.closeOnClick&&this._map.on("click",this._onClose),this.options.closeOnMove&&this._map.on("move",this._onClose),this._map.on("remove",this.remove),this._update(),this._focusFirstElement(),this._trackPointer?(this._map.on("mousemove",this._onMouseMove),this._map.on("mouseup",this._onMouseUp),this._container&&this._container.classList.add("maplibregl-popup-track-pointer"),this._map._canvasContainer.classList.add("maplibregl-track-pointer")):this._map.on("move",this._update),this.fire(new r.k("open")),this}isOpen(){return!!this._map}getLngLat(){return this._lngLat}setLngLat(u){return this._lngLat=r.N.convert(u),this._pos=null,this._flatPos=null,this._trackPointer=!1,this._update(),this._map&&(this._map.on("move",this._update),this._map.off("mousemove",this._onMouseMove),this._container&&this._container.classList.remove("maplibregl-popup-track-pointer"),this._map._canvasContainer.classList.remove("maplibregl-track-pointer")),this}trackPointer(){return this._trackPointer=!0,this._pos=null,this._flatPos=null,this._update(),this._map&&(this._map.off("move",this._update),this._map.on("mousemove",this._onMouseMove),this._map.on("drag",this._onDrag),this._container&&this._container.classList.add("maplibregl-popup-track-pointer"),this._map._canvasContainer.classList.add("maplibregl-track-pointer")),this}getElement(){return this._container}setText(u){return this.setDOMContent(document.createTextNode(u))}setHTML(u){const f=document.createDocumentFragment(),D=document.createElement("body");let V;for(D.innerHTML=u;V=D.firstChild,V;)f.appendChild(V);return this.setDOMContent(f)}getMaxWidth(){var u;return(u=this._container)===null||u===void 0?void 0:u.style.maxWidth}setMaxWidth(u){return this.options.maxWidth=u,this._update(),this}setDOMContent(u){if(this._content)for(;this._content.hasChildNodes();)this._content.firstChild&&this._content.removeChild(this._content.firstChild);else this._content=n.create("div","maplibregl-popup-content",this._container);return this._content.appendChild(u),this._createCloseButton(),this._update(),this._focusFirstElement(),this}addClassName(u){return this._container&&this._container.classList.add(u),this}removeClassName(u){return this._container&&this._container.classList.remove(u),this}setOffset(u){return this.options.offset=u,this._update(),this}toggleClassName(u){if(this._container)return this._container.classList.toggle(u)}setSubpixelPositioning(u){this.options.subpixelPositioning=u}_createCloseButton(){this.options.closeButton&&(this._closeButton=n.create("button","maplibregl-popup-close-button",this._content),this._closeButton.type="button",this._closeButton.innerHTML="&#215;",this._closeButton.addEventListener("click",this._onClose))}_focusFirstElement(){if(!this.options.focusAfterOpen||!this._container)return;const u=this._container.querySelector(vt);u&&u.focus()}}function zt(R){if(R){if(typeof R=="number"){const u=Math.round(Math.abs(R)/Math.SQRT2);return{center:new r.P(0,0),top:new r.P(0,R),"top-left":new r.P(u,u),"top-right":new r.P(-u,u),bottom:new r.P(0,-R),"bottom-left":new r.P(u,-u),"bottom-right":new r.P(-u,-u),left:new r.P(R,0),right:new r.P(-R,0)}}if(R instanceof r.P||Array.isArray(R)){const u=r.P.convert(R);return{center:u,top:u,"top-left":u,"top-right":u,bottom:u,"bottom-left":u,"bottom-right":u,left:u,right:u}}return{center:r.P.convert(R.center||[0,0]),top:r.P.convert(R.top||[0,0]),"top-left":r.P.convert(R["top-left"]||[0,0]),"top-right":r.P.convert(R["top-right"]||[0,0]),bottom:r.P.convert(R.bottom||[0,0]),"bottom-left":r.P.convert(R["bottom-left"]||[0,0]),"bottom-right":r.P.convert(R["bottom-right"]||[0,0]),left:r.P.convert(R.left||[0,0]),right:r.P.convert(R.right||[0,0])}}return zt(new r.P(0,0))}const ae=_;p.AJAXError=r.bg,p.Evented=r.E,p.LngLat=r.N,p.MercatorCoordinate=r.Z,p.Point=r.P,p.addProtocol=r.bh,p.config=r.a,p.removeProtocol=r.bi,p.AttributionControl=ds,p.BoxZoomHandler=So,p.CanvasSource=Ae,p.CooperativeGesturesHandler=ys,p.DoubleClickZoomHandler=Ti,p.DragPanHandler=Bs,p.DragRotateHandler=Vo,p.EdgeInsets=Nl,p.FullscreenControl=Ul,p.GeoJSONSource=Pe,p.GeolocateControl=fn,p.Hash=eo,p.ImageSource=Ie,p.KeyboardHandler=pc,p.LngLatBounds=Ce,p.LogoControl=yo,p.Map=class extends ao{constructor(R){r.be.mark(r.bf.create);const u=Object.assign(Object.assign({},hl),R);if(u.minZoom!=null&&u.maxZoom!=null&&u.minZoom>u.maxZoom)throw new Error("maxZoom must be greater than or equal to minZoom");if(u.minPitch!=null&&u.maxPitch!=null&&u.minPitch>u.maxPitch)throw new Error("maxPitch must be greater than or equal to minPitch");if(u.minPitch!=null&&u.minPitch<0)throw new Error("minPitch must be greater than or equal to 0");if(u.maxPitch!=null&&u.maxPitch>85)throw new Error("maxPitch must be less than or equal to 85");if(super(new di(u.minZoom,u.maxZoom,u.minPitch,u.maxPitch,u.renderWorldCopies),{bearingSnap:u.bearingSnap}),this._idleTriggered=!1,this._crossFadingFactor=1,this._renderTaskQueue=new Ec,this._controls=[],this._mapId=r.a4(),this._contextLost=D=>{D.preventDefault(),this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this.fire(new r.k("webglcontextlost",{originalEvent:D}))},this._contextRestored=D=>{this._setupPainter(),this.resize(),this._update(),this.fire(new r.k("webglcontextrestored",{originalEvent:D}))},this._onMapScroll=D=>{if(D.target===this._container)return this._container.scrollTop=0,this._container.scrollLeft=0,!1},this._onWindowOnline=()=>{this._update()},this._interactive=u.interactive,this._maxTileCacheSize=u.maxTileCacheSize,this._maxTileCacheZoomLevels=u.maxTileCacheZoomLevels,this._failIfMajorPerformanceCaveat=u.failIfMajorPerformanceCaveat===!0,this._preserveDrawingBuffer=u.preserveDrawingBuffer===!0,this._antialias=u.antialias===!0,this._trackResize=u.trackResize===!0,this._bearingSnap=u.bearingSnap,this._refreshExpiredTiles=u.refreshExpiredTiles===!0,this._fadeDuration=u.fadeDuration,this._crossSourceCollisions=u.crossSourceCollisions===!0,this._collectResourceTiming=u.collectResourceTiming===!0,this._locale=Object.assign(Object.assign({},Oc),u.locale),this._clickTolerance=u.clickTolerance,this._overridePixelRatio=u.pixelRatio,this._maxCanvasSize=u.maxCanvasSize,this.transformCameraUpdate=u.transformCameraUpdate,this.cancelPendingTileRequestsWhileZooming=u.cancelPendingTileRequestsWhileZooming===!0,this._imageQueueHandle=C.addThrottleControl(()=>this.isMoving()),this._requestManager=new E(u.transformRequest),typeof u.container=="string"){if(this._container=document.getElementById(u.container),!this._container)throw new Error(`Container '${u.container}' not found.`)}else{if(!(u.container instanceof HTMLElement))throw new Error("Invalid type: 'container' must be a String or HTMLElement.");this._container=u.container}if(u.maxBounds&&this.setMaxBounds(u.maxBounds),this._setupContainer(),this._setupPainter(),this.on("move",()=>this._update(!1)).on("moveend",()=>this._update(!1)).on("zoom",()=>this._update(!0)).on("terrain",()=>{this.painter.terrainFacilitator.dirty=!0,this._update(!0)}).once("idle",()=>{this._idleTriggered=!0}),typeof window<"u"){addEventListener("online",this._onWindowOnline,!1);let D=!1;const V=Ws(J=>{this._trackResize&&!this._removed&&this.resize(J)._update()},50);this._resizeObserver=new ResizeObserver(J=>{D?V(J):D=!0}),this._resizeObserver.observe(this._container)}this.handlers=new ni(this,u);const f=typeof u.hash=="string"&&u.hash||void 0;this._hash=u.hash&&new eo(f).addTo(this),this._hash&&this._hash._onHashChange()||(this.jumpTo({center:u.center,zoom:u.zoom,bearing:u.bearing,pitch:u.pitch}),u.bounds&&(this.resize(),this.fitBounds(u.bounds,r.e({},u.fitBoundsOptions,{duration:0})))),this.resize(),this._localIdeographFontFamily=u.localIdeographFontFamily,this._validateStyle=u.validateStyle,u.style&&this.setStyle(u.style,{localIdeographFontFamily:u.localIdeographFontFamily}),u.attributionControl&&this.addControl(new ds(typeof u.attributionControl=="boolean"?void 0:u.attributionControl)),u.maplibreLogo&&this.addControl(new yo,u.logoPosition),this.on("style.load",()=>{this.transform.unmodified&&this.jumpTo(this.style.stylesheet)}),this.on("data",D=>{this._update(D.dataType==="style"),this.fire(new r.k(`${D.dataType}data`,D))}),this.on("dataloading",D=>{this.fire(new r.k(`${D.dataType}dataloading`,D))}),this.on("dataabort",D=>{this.fire(new r.k("sourcedataabort",D))})}_getMapId(){return this._mapId}addControl(R,u){if(u===void 0&&(u=R.getDefaultPosition?R.getDefaultPosition():"top-right"),!R||!R.onAdd)return this.fire(new r.j(new Error("Invalid argument to map.addControl(). Argument must be a control with onAdd and onRemove methods.")));const f=R.onAdd(this);this._controls.push(R);const D=this._controlPositions[u];return u.indexOf("bottom")!==-1?D.insertBefore(f,D.firstChild):D.appendChild(f),this}removeControl(R){if(!R||!R.onRemove)return this.fire(new r.j(new Error("Invalid argument to map.removeControl(). Argument must be a control with onAdd and onRemove methods.")));const u=this._controls.indexOf(R);return u>-1&&this._controls.splice(u,1),R.onRemove(this),this}hasControl(R){return this._controls.indexOf(R)>-1}calculateCameraOptionsFromTo(R,u,f,D){return D==null&&this.terrain&&(D=this.terrain.getElevationForLngLatZoom(f,this.transform.tileZoom)),super.calculateCameraOptionsFromTo(R,u,f,D)}resize(R){var u;const f=this._containerDimensions(),D=f[0],V=f[1],J=this._getClampedPixelRatio(D,V);if(this._resizeCanvas(D,V,J),this.painter.resize(D,V,J),this.painter.overLimit()){const fe=this.painter.context.gl;this._maxCanvasSize=[fe.drawingBufferWidth,fe.drawingBufferHeight];const xe=this._getClampedPixelRatio(D,V);this._resizeCanvas(D,V,xe),this.painter.resize(D,V,xe)}this.transform.resize(D,V),(u=this._requestedCameraState)===null||u===void 0||u.resize(D,V);const oe=!this._moving;return oe&&(this.stop(),this.fire(new r.k("movestart",R)).fire(new r.k("move",R))),this.fire(new r.k("resize",R)),oe&&this.fire(new r.k("moveend",R)),this}_getClampedPixelRatio(R,u){const{0:f,1:D}=this._maxCanvasSize,V=this.getPixelRatio(),J=R*V,oe=u*V,fe=J>f?f/J:1,xe=oe>D?D/oe:1;return Math.min(fe,xe)*V}getPixelRatio(){var R;return(R=this._overridePixelRatio)!==null&&R!==void 0?R:devicePixelRatio}setPixelRatio(R){this._overridePixelRatio=R,this.resize()}getBounds(){return this.transform.getBounds()}getMaxBounds(){return this.transform.getMaxBounds()}setMaxBounds(R){return this.transform.setMaxBounds(Ce.convert(R)),this._update()}setMinZoom(R){if((R=R??-2)>=-2&&R<=this.transform.maxZoom)return this.transform.minZoom=R,this._update(),this.getZoom()<R&&this.setZoom(R),this;throw new Error("minZoom must be between -2 and the current maxZoom, inclusive")}getMinZoom(){return this.transform.minZoom}setMaxZoom(R){if((R=R??22)>=this.transform.minZoom)return this.transform.maxZoom=R,this._update(),this.getZoom()>R&&this.setZoom(R),this;throw new Error("maxZoom must be greater than the current minZoom")}getMaxZoom(){return this.transform.maxZoom}setMinPitch(R){if((R=R??0)<0)throw new Error("minPitch must be greater than or equal to 0");if(R>=0&&R<=this.transform.maxPitch)return this.transform.minPitch=R,this._update(),this.getPitch()<R&&this.setPitch(R),this;throw new Error("minPitch must be between 0 and the current maxPitch, inclusive")}getMinPitch(){return this.transform.minPitch}setMaxPitch(R){if((R=R??60)>85)throw new Error("maxPitch must be less than or equal to 85");if(R>=this.transform.minPitch)return this.transform.maxPitch=R,this._update(),this.getPitch()>R&&this.setPitch(R),this;throw new Error("maxPitch must be greater than the current minPitch")}getMaxPitch(){return this.transform.maxPitch}getRenderWorldCopies(){return this.transform.renderWorldCopies}setRenderWorldCopies(R){return this.transform.renderWorldCopies=R,this._update()}project(R){return this.transform.locationPoint(r.N.convert(R),this.style&&this.terrain)}unproject(R){return this.transform.pointLocation(r.P.convert(R),this.terrain)}isMoving(){var R;return this._moving||((R=this.handlers)===null||R===void 0?void 0:R.isMoving())}isZooming(){var R;return this._zooming||((R=this.handlers)===null||R===void 0?void 0:R.isZooming())}isRotating(){var R;return this._rotating||((R=this.handlers)===null||R===void 0?void 0:R.isRotating())}_createDelegatedListener(R,u,f){if(R==="mouseenter"||R==="mouseover"){let D=!1;return{layer:u,listener:f,delegates:{mousemove:J=>{const oe=this.getLayer(u)?this.queryRenderedFeatures(J.point,{layers:[u]}):[];oe.length?D||(D=!0,f.call(this,new Bo(R,this,J.originalEvent,{features:oe}))):D=!1},mouseout:()=>{D=!1}}}}if(R==="mouseleave"||R==="mouseout"){let D=!1;return{layer:u,listener:f,delegates:{mousemove:oe=>{(this.getLayer(u)?this.queryRenderedFeatures(oe.point,{layers:[u]}):[]).length?D=!0:D&&(D=!1,f.call(this,new Bo(R,this,oe.originalEvent)))},mouseout:oe=>{D&&(D=!1,f.call(this,new Bo(R,this,oe.originalEvent)))}}}}{const D=V=>{const J=this.getLayer(u)?this.queryRenderedFeatures(V.point,{layers:[u]}):[];J.length&&(V.features=J,f.call(this,V),delete V.features)};return{layer:u,listener:f,delegates:{[R]:D}}}}on(R,u,f){if(f===void 0)return super.on(R,u);const D=this._createDelegatedListener(R,u,f);this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[R]=this._delegatedListeners[R]||[],this._delegatedListeners[R].push(D);for(const V in D.delegates)this.on(V,D.delegates[V]);return this}once(R,u,f){if(f===void 0)return super.once(R,u);const D=this._createDelegatedListener(R,u,f);for(const V in D.delegates)this.once(V,D.delegates[V]);return this}off(R,u,f){return f===void 0?super.off(R,u):(this._delegatedListeners&&this._delegatedListeners[R]&&(D=>{const V=D[R];for(let J=0;J<V.length;J++){const oe=V[J];if(oe.layer===u&&oe.listener===f){for(const fe in oe.delegates)this.off(fe,oe.delegates[fe]);return V.splice(J,1),this}}})(this._delegatedListeners),this)}queryRenderedFeatures(R,u){if(!this.style)return[];let f;const D=R instanceof r.P||Array.isArray(R),V=D?R:[[0,0],[this.transform.width,this.transform.height]];if(u=u||(D?{}:R)||{},V instanceof r.P||typeof V[0]=="number")f=[r.P.convert(V)];else{const J=r.P.convert(V[0]),oe=r.P.convert(V[1]);f=[J,new r.P(oe.x,J.y),oe,new r.P(J.x,oe.y),J]}return this.style.queryRenderedFeatures(f,u,this.transform)}querySourceFeatures(R,u){return this.style.querySourceFeatures(R,u)}setStyle(R,u){return(u=r.e({},{localIdeographFontFamily:this._localIdeographFontFamily,validate:this._validateStyle},u)).diff!==!1&&u.localIdeographFontFamily===this._localIdeographFontFamily&&this.style&&R?(this._diffStyle(R,u),this):(this._localIdeographFontFamily=u.localIdeographFontFamily,this._updateStyle(R,u))}setTransformRequest(R){return this._requestManager.setTransformRequest(R),this}_getUIString(R){const u=this._locale[R];if(u==null)throw new Error(`Missing UI string '${R}'`);return u}_updateStyle(R,u){if(u.transformStyle&&this.style&&!this.style._loaded)return void this.style.once("style.load",()=>this._updateStyle(R,u));const f=this.style&&u.transformStyle?this.style.serialize():void 0;return this.style&&(this.style.setEventedParent(null),this.style._remove(!R)),R?(this.style=new Vr(this,u||{}),this.style.setEventedParent(this,{style:this.style}),typeof R=="string"?this.style.loadURL(R,u,f):this.style.loadJSON(R,u,f),this):(delete this.style,this)}_lazyInitEmptyStyle(){this.style||(this.style=new Vr(this,{}),this.style.setEventedParent(this,{style:this.style}),this.style.loadEmpty())}_diffStyle(R,u){if(typeof R=="string"){const f=R,D=this._requestManager.transformRequest(f,"Style");r.h(D,new AbortController).then(V=>{this._updateDiff(V.data,u)}).catch(V=>{V&&this.fire(new r.j(V))})}else typeof R=="object"&&this._updateDiff(R,u)}_updateDiff(R,u){try{this.style.setState(R,u)&&this._update(!0)}catch(f){r.w(`Unable to perform style diff: ${f.message||f.error||f}. Rebuilding the style from scratch.`),this._updateStyle(R,u)}}getStyle(){if(this.style)return this.style.serialize()}isStyleLoaded(){return this.style?this.style.loaded():r.w("There is no style added to the map.")}addSource(R,u){return this._lazyInitEmptyStyle(),this.style.addSource(R,u),this._update(!0)}isSourceLoaded(R){const u=this.style&&this.style.sourceCaches[R];if(u!==void 0)return u.loaded();this.fire(new r.j(new Error(`There is no source with ID '${R}'`)))}setTerrain(R){if(this.style._checkLoaded(),this._terrainDataCallback&&this.style.off("data",this._terrainDataCallback),R){const u=this.style.sourceCaches[R.source];if(!u)throw new Error(`cannot load terrain, because there exists no source with ID: ${R.source}`);this.terrain===null&&u.reload();for(const f in this.style._layers){const D=this.style._layers[f];D.type==="hillshade"&&D.source===R.source&&r.w("You are using the same source for a hillshade layer and for 3D terrain. Please consider using two separate sources to improve rendering quality.")}this.terrain=new ii(this.painter,u,R),this.painter.renderToTexture=new qs(this.painter,this.terrain),this.transform.minElevationForCurrentTile=this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom),this.transform.elevation=this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom),this._terrainDataCallback=f=>{f.dataType==="style"?this.terrain.sourceCache.freeRtt():f.dataType==="source"&&f.tile&&(f.sourceId!==R.source||this._elevationFreeze||(this.transform.minElevationForCurrentTile=this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom),this.transform.elevation=this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom)),this.terrain.sourceCache.freeRtt(f.tile.tileID))},this.style.on("data",this._terrainDataCallback)}else this.terrain&&this.terrain.sourceCache.destruct(),this.terrain=null,this.painter.renderToTexture&&this.painter.renderToTexture.destruct(),this.painter.renderToTexture=null,this.transform.minElevationForCurrentTile=0,this.transform.elevation=0;return this.fire(new r.k("terrain",{terrain:R})),this}getTerrain(){var R,u;return(u=(R=this.terrain)===null||R===void 0?void 0:R.options)!==null&&u!==void 0?u:null}areTilesLoaded(){const R=this.style&&this.style.sourceCaches;for(const u in R){const f=R[u]._tiles;for(const D in f){const V=f[D];if(V.state!=="loaded"&&V.state!=="errored")return!1}}return!0}removeSource(R){return this.style.removeSource(R),this._update(!0)}getSource(R){return this.style.getSource(R)}addImage(R,u,f={}){const{pixelRatio:D=1,sdf:V=!1,stretchX:J,stretchY:oe,content:fe,textFitWidth:xe,textFitHeight:Ee}=f;if(this._lazyInitEmptyStyle(),!(u instanceof HTMLImageElement||r.b(u))){if(u.width===void 0||u.height===void 0)return this.fire(new r.j(new Error("Invalid arguments to map.addImage(). The second argument must be an `HTMLImageElement`, `ImageData`, `ImageBitmap`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`")));{const{width:Fe,height:Ge,data:rt}=u,ct=u;return this.style.addImage(R,{data:new r.R({width:Fe,height:Ge},new Uint8Array(rt)),pixelRatio:D,stretchX:J,stretchY:oe,content:fe,textFitWidth:xe,textFitHeight:Ee,sdf:V,version:0,userImage:ct}),ct.onAdd&&ct.onAdd(this,R),this}}{const{width:Fe,height:Ge,data:rt}=h.getImageData(u);this.style.addImage(R,{data:new r.R({width:Fe,height:Ge},rt),pixelRatio:D,stretchX:J,stretchY:oe,content:fe,textFitWidth:xe,textFitHeight:Ee,sdf:V,version:0})}}updateImage(R,u){const f=this.style.getImage(R);if(!f)return this.fire(new r.j(new Error("The map has no image with that id. If you are adding a new image use `map.addImage(...)` instead.")));const D=u instanceof HTMLImageElement||r.b(u)?h.getImageData(u):u,{width:V,height:J,data:oe}=D;if(V===void 0||J===void 0)return this.fire(new r.j(new Error("Invalid arguments to map.updateImage(). The second argument must be an `HTMLImageElement`, `ImageData`, `ImageBitmap`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`")));if(V!==f.data.width||J!==f.data.height)return this.fire(new r.j(new Error("The width and height of the updated image must be that same as the previous version of the image")));const fe=!(u instanceof HTMLImageElement||r.b(u));return f.data.replace(oe,fe),this.style.updateImage(R,f),this}getImage(R){return this.style.getImage(R)}hasImage(R){return R?!!this.style.getImage(R):(this.fire(new r.j(new Error("Missing required image id"))),!1)}removeImage(R){this.style.removeImage(R)}loadImage(R){return C.getImage(this._requestManager.transformRequest(R,"Image"),new AbortController)}listImages(){return this.style.listImages()}addLayer(R,u){return this._lazyInitEmptyStyle(),this.style.addLayer(R,u),this._update(!0)}moveLayer(R,u){return this.style.moveLayer(R,u),this._update(!0)}removeLayer(R){return this.style.removeLayer(R),this._update(!0)}getLayer(R){return this.style.getLayer(R)}getLayersOrder(){return this.style.getLayersOrder()}setLayerZoomRange(R,u,f){return this.style.setLayerZoomRange(R,u,f),this._update(!0)}setFilter(R,u,f={}){return this.style.setFilter(R,u,f),this._update(!0)}getFilter(R){return this.style.getFilter(R)}setPaintProperty(R,u,f,D={}){return this.style.setPaintProperty(R,u,f,D),this._update(!0)}getPaintProperty(R,u){return this.style.getPaintProperty(R,u)}setLayoutProperty(R,u,f,D={}){return this.style.setLayoutProperty(R,u,f,D),this._update(!0)}getLayoutProperty(R,u){return this.style.getLayoutProperty(R,u)}setGlyphs(R,u={}){return this._lazyInitEmptyStyle(),this.style.setGlyphs(R,u),this._update(!0)}getGlyphs(){return this.style.getGlyphsUrl()}addSprite(R,u,f={}){return this._lazyInitEmptyStyle(),this.style.addSprite(R,u,f,D=>{D||this._update(!0)}),this}removeSprite(R){return this._lazyInitEmptyStyle(),this.style.removeSprite(R),this._update(!0)}getSprite(){return this.style.getSprite()}setSprite(R,u={}){return this._lazyInitEmptyStyle(),this.style.setSprite(R,u,f=>{f||this._update(!0)}),this}setLight(R,u={}){return this._lazyInitEmptyStyle(),this.style.setLight(R,u),this._update(!0)}getLight(){return this.style.getLight()}setSky(R){return this._lazyInitEmptyStyle(),this.style.setSky(R),this._update(!0)}getSky(){return this.style.getSky()}setFeatureState(R,u){return this.style.setFeatureState(R,u),this._update()}removeFeatureState(R,u){return this.style.removeFeatureState(R,u),this._update()}getFeatureState(R){return this.style.getFeatureState(R)}getContainer(){return this._container}getCanvasContainer(){return this._canvasContainer}getCanvas(){return this._canvas}_containerDimensions(){let R=0,u=0;return this._container&&(R=this._container.clientWidth||400,u=this._container.clientHeight||300),[R,u]}_setupContainer(){const R=this._container;R.classList.add("maplibregl-map");const u=this._canvasContainer=n.create("div","maplibregl-canvas-container",R);this._interactive&&u.classList.add("maplibregl-interactive"),this._canvas=n.create("canvas","maplibregl-canvas",u),this._canvas.addEventListener("webglcontextlost",this._contextLost,!1),this._canvas.addEventListener("webglcontextrestored",this._contextRestored,!1),this._canvas.setAttribute("tabindex",this._interactive?"0":"-1"),this._canvas.setAttribute("aria-label",this._getUIString("Map.Title")),this._canvas.setAttribute("role","region");const f=this._containerDimensions(),D=this._getClampedPixelRatio(f[0],f[1]);this._resizeCanvas(f[0],f[1],D);const V=this._controlContainer=n.create("div","maplibregl-control-container",R),J=this._controlPositions={};["top-left","top-right","bottom-left","bottom-right"].forEach(oe=>{J[oe]=n.create("div",`maplibregl-ctrl-${oe} `,V)}),this._container.addEventListener("scroll",this._onMapScroll,!1)}_resizeCanvas(R,u,f){this._canvas.width=Math.floor(f*R),this._canvas.height=Math.floor(f*u),this._canvas.style.width=`${R}px`,this._canvas.style.height=`${u}px`}_setupPainter(){const R={alpha:!0,stencil:!0,depth:!0,failIfMajorPerformanceCaveat:this._failIfMajorPerformanceCaveat,preserveDrawingBuffer:this._preserveDrawingBuffer,antialias:this._antialias||!1};let u=null;this._canvas.addEventListener("webglcontextcreationerror",D=>{u={requestedAttributes:R},D&&(u.statusMessage=D.statusMessage,u.type=D.type)},{once:!0});const f=this._canvas.getContext("webgl2",R)||this._canvas.getContext("webgl",R);if(!f){const D="Failed to initialize WebGL";throw u?(u.message=D,new Error(JSON.stringify(u))):new Error(D)}this.painter=new uc(f,this.transform),i.testSupport(f)}loaded(){return!this._styleDirty&&!this._sourcesDirty&&!!this.style&&this.style.loaded()}_update(R){return this.style&&this.style._loaded?(this._styleDirty=this._styleDirty||R,this._sourcesDirty=!0,this.triggerRepaint(),this):this}_requestRenderFrame(R){return this._update(),this._renderTaskQueue.add(R)}_cancelRenderFrame(R){this._renderTaskQueue.remove(R)}_render(R){const u=this._idleTriggered?this._fadeDuration:0;if(this.painter.context.setDirty(),this.painter.setBaseState(),this._renderTaskQueue.run(R),this._removed)return;let f=!1;if(this.style&&this._styleDirty){this._styleDirty=!1;const V=this.transform.zoom,J=h.now();this.style.zoomHistory.update(V,J);const oe=new r.a9(V,{now:J,fadeDuration:u,zoomHistory:this.style.zoomHistory,transition:this.style.getTransition()}),fe=oe.crossFadingFactor();fe===1&&fe===this._crossFadingFactor||(f=!0,this._crossFadingFactor=fe),this.style.update(oe)}this.style&&this._sourcesDirty&&(this._sourcesDirty=!1,this.style._updateSources(this.transform)),this.terrain?(this.terrain.sourceCache.update(this.transform,this.terrain),this.transform.minElevationForCurrentTile=this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom),this._elevationFreeze||(this.transform.elevation=this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom))):(this.transform.minElevationForCurrentTile=0,this.transform.elevation=0),this._placementDirty=this.style&&this.style._updatePlacement(this.painter.transform,this.showCollisionBoxes,u,this._crossSourceCollisions),this.painter.render(this.style,{showTileBoundaries:this.showTileBoundaries,showOverdrawInspector:this._showOverdrawInspector,rotating:this.isRotating(),zooming:this.isZooming(),moving:this.isMoving(),fadeDuration:u,showPadding:this.showPadding}),this.fire(new r.k("render")),this.loaded()&&!this._loaded&&(this._loaded=!0,r.be.mark(r.bf.load),this.fire(new r.k("load"))),this.style&&(this.style.hasTransitions()||f)&&(this._styleDirty=!0),this.style&&!this._placementDirty&&this.style._releaseSymbolFadeTiles();const D=this._sourcesDirty||this._styleDirty||this._placementDirty;return D||this._repaint?this.triggerRepaint():!this.isMoving()&&this.loaded()&&this.fire(new r.k("idle")),!this._loaded||this._fullyLoaded||D||(this._fullyLoaded=!0,r.be.mark(r.bf.fullLoad)),this}redraw(){return this.style&&(this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this._render(0)),this}remove(){var R;this._hash&&this._hash.remove();for(const f of this._controls)f.onRemove(this);this._controls=[],this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this._renderTaskQueue.clear(),this.painter.destroy(),this.handlers.destroy(),delete this.handlers,this.setStyle(null),typeof window<"u"&&removeEventListener("online",this._onWindowOnline,!1),C.removeThrottleControl(this._imageQueueHandle),(R=this._resizeObserver)===null||R===void 0||R.disconnect();const u=this.painter.context.gl.getExtension("WEBGL_lose_context");u!=null&&u.loseContext&&u.loseContext(),this._canvas.removeEventListener("webglcontextrestored",this._contextRestored,!1),this._canvas.removeEventListener("webglcontextlost",this._contextLost,!1),n.remove(this._canvasContainer),n.remove(this._controlContainer),this._container.classList.remove("maplibregl-map"),r.be.clearMetrics(),this._removed=!0,this.fire(new r.k("remove"))}triggerRepaint(){this.style&&!this._frameRequest&&(this._frameRequest=new AbortController,h.frameAsync(this._frameRequest).then(R=>{r.be.frame(R),this._frameRequest=null,this._render(R)}).catch(()=>{}))}get showTileBoundaries(){return!!this._showTileBoundaries}set showTileBoundaries(R){this._showTileBoundaries!==R&&(this._showTileBoundaries=R,this._update())}get showPadding(){return!!this._showPadding}set showPadding(R){this._showPadding!==R&&(this._showPadding=R,this._update())}get showCollisionBoxes(){return!!this._showCollisionBoxes}set showCollisionBoxes(R){this._showCollisionBoxes!==R&&(this._showCollisionBoxes=R,R?this.style._generateCollisionBoxes():this._update())}get showOverdrawInspector(){return!!this._showOverdrawInspector}set showOverdrawInspector(R){this._showOverdrawInspector!==R&&(this._showOverdrawInspector=R,this._update())}get repaint(){return!!this._repaint}set repaint(R){this._repaint!==R&&(this._repaint=R,this.triggerRepaint())}get vertices(){return!!this._vertices}set vertices(R){this._vertices=R,this._update()}get version(){return Mc}getCameraTargetElevation(){return this.transform.elevation}},p.MapMouseEvent=Bo,p.MapTouchEvent=ko,p.MapWheelEvent=il,p.Marker=Oi,p.NavigationControl=class{constructor(R){this._updateZoomButtons=()=>{const u=this._map.getZoom(),f=u===this._map.getMaxZoom(),D=u===this._map.getMinZoom();this._zoomInButton.disabled=f,this._zoomOutButton.disabled=D,this._zoomInButton.setAttribute("aria-disabled",f.toString()),this._zoomOutButton.setAttribute("aria-disabled",D.toString())},this._rotateCompassArrow=()=>{const u=this.options.visualizePitch?`scale(${1/Math.pow(Math.cos(this._map.transform.pitch*(Math.PI/180)),.5)}) rotateX(${this._map.transform.pitch}deg) rotateZ(${this._map.transform.angle*(180/Math.PI)}deg)`:`rotate(${this._map.transform.angle*(180/Math.PI)}deg)`;this._compassIcon.style.transform=u},this._setButtonTitle=(u,f)=>{const D=this._map._getUIString(`NavigationControl.${f}`);u.title=D,u.setAttribute("aria-label",D)},this.options=r.e({},Os,R),this._container=n.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._container.addEventListener("contextmenu",u=>u.preventDefault()),this.options.showZoom&&(this._zoomInButton=this._createButton("maplibregl-ctrl-zoom-in",u=>this._map.zoomIn({},{originalEvent:u})),n.create("span","maplibregl-ctrl-icon",this._zoomInButton).setAttribute("aria-hidden","true"),this._zoomOutButton=this._createButton("maplibregl-ctrl-zoom-out",u=>this._map.zoomOut({},{originalEvent:u})),n.create("span","maplibregl-ctrl-icon",this._zoomOutButton).setAttribute("aria-hidden","true")),this.options.showCompass&&(this._compass=this._createButton("maplibregl-ctrl-compass",u=>{this.options.visualizePitch?this._map.resetNorthPitch({},{originalEvent:u}):this._map.resetNorth({},{originalEvent:u})}),this._compassIcon=n.create("span","maplibregl-ctrl-icon",this._compass),this._compassIcon.setAttribute("aria-hidden","true"))}onAdd(R){return this._map=R,this.options.showZoom&&(this._setButtonTitle(this._zoomInButton,"ZoomIn"),this._setButtonTitle(this._zoomOutButton,"ZoomOut"),this._map.on("zoom",this._updateZoomButtons),this._updateZoomButtons()),this.options.showCompass&&(this._setButtonTitle(this._compass,"ResetBearing"),this.options.visualizePitch&&this._map.on("pitch",this._rotateCompassArrow),this._map.on("rotate",this._rotateCompassArrow),this._rotateCompassArrow(),this._handler=new qr(this._map,this._compass,this.options.visualizePitch)),this._container}onRemove(){n.remove(this._container),this.options.showZoom&&this._map.off("zoom",this._updateZoomButtons),this.options.showCompass&&(this.options.visualizePitch&&this._map.off("pitch",this._rotateCompassArrow),this._map.off("rotate",this._rotateCompassArrow),this._handler.off(),delete this._handler),delete this._map}_createButton(R,u){const f=n.create("button",R,this._container);return f.type="button",f.addEventListener("click",u),f}},p.Popup=kt,p.RasterDEMTileSource=He,p.RasterTileSource=ze,p.ScaleControl=class{constructor(R){this._onMove=()=>{wi(this._map,this._container,this.options)},this.setUnit=u=>{this.options.unit=u,wi(this._map,this._container,this.options)},this.options=Object.assign(Object.assign({},an),R)}getDefaultPosition(){return"bottom-left"}onAdd(R){return this._map=R,this._container=n.create("div","maplibregl-ctrl maplibregl-ctrl-scale",R.getContainer()),this._map.on("move",this._onMove),this._onMove(),this._container}onRemove(){n.remove(this._container),this._map.off("move",this._onMove),this._map=void 0}},p.ScrollZoomHandler=cl,p.Style=Vr,p.TerrainControl=class{constructor(R){this._toggleTerrain=()=>{this._map.getTerrain()?this._map.setTerrain(null):this._map.setTerrain(this.options),this._updateTerrainIcon()},this._updateTerrainIcon=()=>{this._terrainButton.classList.remove("maplibregl-ctrl-terrain"),this._terrainButton.classList.remove("maplibregl-ctrl-terrain-enabled"),this._map.terrain?(this._terrainButton.classList.add("maplibregl-ctrl-terrain-enabled"),this._terrainButton.title=this._map._getUIString("TerrainControl.Disable")):(this._terrainButton.classList.add("maplibregl-ctrl-terrain"),this._terrainButton.title=this._map._getUIString("TerrainControl.Enable"))},this.options=R}onAdd(R){return this._map=R,this._container=n.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._terrainButton=n.create("button","maplibregl-ctrl-terrain",this._container),n.create("span","maplibregl-ctrl-icon",this._terrainButton).setAttribute("aria-hidden","true"),this._terrainButton.type="button",this._terrainButton.addEventListener("click",this._toggleTerrain),this._updateTerrainIcon(),this._map.on("terrain",this._updateTerrainIcon),this._container}onRemove(){n.remove(this._container),this._map.off("terrain",this._updateTerrainIcon),this._map=void 0}},p.TwoFingersTouchPitchHandler=Rl,p.TwoFingersTouchRotateHandler=Jc,p.TwoFingersTouchZoomHandler=gn,p.TwoFingersTouchZoomRotateHandler=dl,p.VectorTileSource=Le,p.VideoSource=ge,p.addSourceType=(R,u)=>r._(void 0,void 0,void 0,function*(){if(je(R))throw new Error(`A source type called "${R}" already exists.`);((f,D)=>{ke[f]=D})(R,u)}),p.clearPrewarmedResources=function(){const R=pe;R&&(R.isPreloaded()&&R.numActive()===1?(R.release(ce),pe=null):console.warn("Could not clear WebWorkers since there are active Map instances that still reference it. The pre-warmed WebWorker pool can only be cleared when all map instances have been removed with map.remove()"))},p.getMaxParallelImageRequests=function(){return r.a.MAX_PARALLEL_IMAGE_REQUESTS},p.getRTLTextPluginStatus=function(){return Ze().getRTLTextPluginStatus()},p.getVersion=function(){return ae},p.getWorkerCount=function(){return de.workerCount},p.getWorkerUrl=function(){return r.a.WORKER_URL},p.importScriptInWorkers=function(R){return me().broadcast("IS",R)},p.prewarm=function(){se().acquire(ce)},p.setMaxParallelImageRequests=function(R){r.a.MAX_PARALLEL_IMAGE_REQUESTS=R},p.setRTLTextPlugin=function(R,u){return Ze().setRTLTextPlugin(R,u)},p.setWorkerCount=function(R){de.workerCount=R},p.setWorkerUrl=function(R){r.a.WORKER_URL=R}}),y}()},88640:function(m,y,a){function v(we,Se,Ce){we.prototype=Se.prototype=Ce,Ce.constructor=we}function p(we,Se){var Ce=Object.create(we.prototype);for(var Me in Se)Ce[Me]=Se[Me];return Ce}function r(){}a.d(y,{GW:function(){return ve},Dj:function(){return de}});var _=.7,b=1/_,x="\\s*([+-]?\\d+)\\s*",h="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",n="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",i=/^#([0-9a-f]{3,8})$/,c=new RegExp("^rgb\\(".concat(x,",").concat(x,",").concat(x,"\\)$")),l=new RegExp("^rgb\\(".concat(n,",").concat(n,",").concat(n,"\\)$")),d=new RegExp("^rgba\\(".concat(x,",").concat(x,",").concat(x,",").concat(h,"\\)$")),g=new RegExp("^rgba\\(".concat(n,",").concat(n,",").concat(n,",").concat(h,"\\)$")),w=new RegExp("^hsl\\(".concat(h,",").concat(n,",").concat(n,"\\)$")),C=new RegExp("^hsla\\(".concat(h,",").concat(n,",").concat(n,",").concat(h,"\\)$")),E={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function A(){return this.rgb().formatHex()}function P(){return this.rgb().formatRgb()}function L(we){var Se,Ce;return we=(we+"").trim().toLowerCase(),(Se=i.exec(we))?(Ce=Se[1].length,Se=parseInt(Se[1],16),Ce===6?T(Se):Ce===3?new S(Se>>8&15|Se>>4&240,Se>>4&15|240&Se,(15&Se)<<4|15&Se,1):Ce===8?I(Se>>24&255,Se>>16&255,Se>>8&255,(255&Se)/255):Ce===4?I(Se>>12&15|Se>>8&240,Se>>8&15|Se>>4&240,Se>>4&15|240&Se,((15&Se)<<4|15&Se)/255):null):(Se=c.exec(we))?new S(Se[1],Se[2],Se[3],1):(Se=l.exec(we))?new S(255*Se[1]/100,255*Se[2]/100,255*Se[3]/100,1):(Se=d.exec(we))?I(Se[1],Se[2],Se[3],Se[4]):(Se=g.exec(we))?I(255*Se[1]/100,255*Se[2]/100,255*Se[3]/100,Se[4]):(Se=w.exec(we))?G(Se[1],Se[2]/100,Se[3]/100,1):(Se=C.exec(we))?G(Se[1],Se[2]/100,Se[3]/100,Se[4]):E.hasOwnProperty(we)?T(E[we]):we==="transparent"?new S(NaN,NaN,NaN,0):null}function T(we){return new S(we>>16&255,we>>8&255,255&we,1)}function I(we,Se,Ce,Me){return Me<=0&&(we=Se=Ce=NaN),new S(we,Se,Ce,Me)}function M(we,Se,Ce,Me){return arguments.length===1?((Le=we)instanceof r||(Le=L(Le)),Le?new S((Le=Le.rgb()).r,Le.g,Le.b,Le.opacity):new S):new S(we,Se,Ce,Me??1);var Le}function S(we,Se,Ce,Me){this.r=+we,this.g=+Se,this.b=+Ce,this.opacity=+Me}function z(){return"#".concat(j(this.r)).concat(j(this.g)).concat(j(this.b))}function k(){var we=O(this.opacity);return"".concat(we===1?"rgb(":"rgba(").concat(N(this.r),", ").concat(N(this.g),", ").concat(N(this.b)).concat(we===1?")":", ".concat(we,")"))}function O(we){return isNaN(we)?1:Math.max(0,Math.min(1,we))}function N(we){return Math.max(0,Math.min(255,Math.round(we)||0))}function j(we){return((we=N(we))<16?"0":"")+we.toString(16)}function G(we,Se,Ce,Me){return Me<=0?we=Se=Ce=NaN:Ce<=0||Ce>=1?we=Se=NaN:Se<=0&&(we=NaN),new Z(we,Se,Ce,Me)}function H(we){if(we instanceof Z)return new Z(we.h,we.s,we.l,we.opacity);if(we instanceof r||(we=L(we)),!we)return new Z;if(we instanceof Z)return we;var Se=(we=we.rgb()).r/255,Ce=we.g/255,Me=we.b/255,Le=Math.min(Se,Ce,Me),ze=Math.max(Se,Ce,Me),He=NaN,Pe=ze-Le,Ve=(ze+Le)/2;return Pe?(He=Se===ze?(Ce-Me)/Pe+6*(Ce<Me):Ce===ze?(Me-Se)/Pe+2:(Se-Ce)/Pe+4,Pe/=Ve<.5?ze+Le:2-ze-Le,He*=60):Pe=Ve>0&&Ve<1?0:He,new Z(He,Pe,Ve,we.opacity)}function Z(we,Se,Ce,Me){this.h=+we,this.s=+Se,this.l=+Ce,this.opacity=+Me}function $(we){return(we=(we||0)%360)<0?we+360:we}function ne(we){return Math.max(0,Math.min(1,we||0))}function q(we,Se,Ce){return 255*(we<60?Se+(Ce-Se)*we/60:we<180?Ce:we<240?Se+(Ce-Se)*(240-we)/60:Se)}v(r,L,{copy:function(we){return Object.assign(new this.constructor,this,we)},displayable:function(){return this.rgb().displayable()},hex:A,formatHex:A,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return H(this).formatHsl()},formatRgb:P,toString:P}),v(S,M,p(r,{brighter:function(we){return we=we==null?b:Math.pow(b,we),new S(this.r*we,this.g*we,this.b*we,this.opacity)},darker:function(we){return we=we==null?_:Math.pow(_,we),new S(this.r*we,this.g*we,this.b*we,this.opacity)},rgb:function(){return this},clamp:function(){return new S(N(this.r),N(this.g),N(this.b),O(this.opacity))},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:z,formatHex:z,formatHex8:function(){return"#".concat(j(this.r)).concat(j(this.g)).concat(j(this.b)).concat(j(255*(isNaN(this.opacity)?1:this.opacity)))},formatRgb:k,toString:k})),v(Z,function(we,Se,Ce,Me){return arguments.length===1?H(we):new Z(we,Se,Ce,Me??1)},p(r,{brighter:function(we){return we=we==null?b:Math.pow(b,we),new Z(this.h,this.s,this.l*we,this.opacity)},darker:function(we){return we=we==null?_:Math.pow(_,we),new Z(this.h,this.s,this.l*we,this.opacity)},rgb:function(){var we=this.h%360+360*(this.h<0),Se=isNaN(we)||isNaN(this.s)?0:this.s,Ce=this.l,Me=Ce+(Ce<.5?Ce:1-Ce)*Se,Le=2*Ce-Me;return new S(q(we>=240?we-240:we+120,Le,Me),q(we,Le,Me),q(we<120?we+240:we-120,Le,Me),this.opacity)},clamp:function(){return new Z($(this.h),ne(this.s),ne(this.l),O(this.opacity))},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var we=O(this.opacity);return"".concat(we===1?"hsl(":"hsla(").concat($(this.h),", ").concat(100*ne(this.s),"%, ").concat(100*ne(this.l),"%").concat(we===1?")":", ".concat(we,")"))}}));var K=function(we){return function(){return we}};function ee(we,Se){var Ce=Se-we;return Ce?function(Me,Le){return function(ze){return Me+ze*Le}}(we,Ce):K(isNaN(we)?Se:we)}var X=function we(Se){var Ce=function(Le){return(Le=+Le)==1?ee:function(ze,He){return He-ze?function(Pe,Ve,Ie){return Pe=Math.pow(Pe,Ie),Ve=Math.pow(Ve,Ie)-Pe,Ie=1/Ie,function(ge){return Math.pow(Pe+ge*Ve,Ie)}}(ze,He,Le):K(isNaN(ze)?He:ze)}}(Se);function Me(Le,ze){var He=Ce((Le=M(Le)).r,(ze=M(ze)).r),Pe=Ce(Le.g,ze.g),Ve=Ce(Le.b,ze.b),Ie=ee(Le.opacity,ze.opacity);return function(ge){return Le.r=He(ge),Le.g=Pe(ge),Le.b=Ve(ge),Le.opacity=Ie(ge),Le+""}}return Me.gamma=we,Me}(1);function Q(we,Se){var Ce,Me=Se?Se.length:0,Le=we?Math.min(Me,we.length):0,ze=new Array(Le),He=new Array(Me);for(Ce=0;Ce<Le;++Ce)ze[Ce]=ve(we[Ce],Se[Ce]);for(;Ce<Me;++Ce)He[Ce]=Se[Ce];return function(Pe){for(Ce=0;Ce<Le;++Ce)He[Ce]=ze[Ce](Pe);return He}}function ce(we,Se){var Ce=new Date;return we=+we,Se=+Se,function(Me){return Ce.setTime(we*(1-Me)+Se*Me),Ce}}function de(we,Se){return we=+we,Se=+Se,function(Ce){return we*(1-Ce)+Se*Ce}}function he(we){return he=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(Se){return typeof Se}:function(Se){return Se&&typeof Symbol=="function"&&Se.constructor===Symbol&&Se!==Symbol.prototype?"symbol":typeof Se},he(we)}function pe(we,Se){var Ce,Me={},Le={};for(Ce in we!==null&&he(we)==="object"||(we={}),Se!==null&&he(Se)==="object"||(Se={}),Se)Ce in we?Me[Ce]=ve(we[Ce],Se[Ce]):Le[Ce]=Se[Ce];return function(ze){for(Ce in Me)Le[Ce]=Me[Ce](ze);return Le}}var re=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,se=new RegExp(re.source,"g");function ie(we,Se){var Ce,Me,Le,ze=re.lastIndex=se.lastIndex=0,He=-1,Pe=[],Ve=[];for(we+="",Se+="";(Ce=re.exec(we))&&(Me=se.exec(Se));)(Le=Me.index)>ze&&(Le=Se.slice(ze,Le),Pe[He]?Pe[He]+=Le:Pe[++He]=Le),(Ce=Ce[0])===(Me=Me[0])?Pe[He]?Pe[He]+=Me:Pe[++He]=Me:(Pe[++He]=null,Ve.push({i:He,x:de(Ce,Me)})),ze=se.lastIndex;return ze<Se.length&&(Le=Se.slice(ze),Pe[He]?Pe[He]+=Le:Pe[++He]=Le),Pe.length<2?Ve[0]?function(Ie){return function(ge){return Ie(ge)+""}}(Ve[0].x):function(Ie){return function(){return Ie}}(Se):(Se=Ve.length,function(Ie){for(var ge,Ae=0;Ae<Se;++Ae)Pe[(ge=Ve[Ae]).i]=ge.x(Ie);return Pe.join("")})}function me(we,Se){Se||(Se=[]);var Ce,Me=we?Math.min(Se.length,we.length):0,Le=Se.slice();return function(ze){for(Ce=0;Ce<Me;++Ce)Le[Ce]=we[Ce]*(1-ze)+Se[Ce]*ze;return Le}}function ye(we){return ye=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(Se){return typeof Se}:function(Se){return Se&&typeof Symbol=="function"&&Se.constructor===Symbol&&Se!==Symbol.prototype?"symbol":typeof Se},ye(we)}function ve(we,Se){var Ce,Me,Le=ye(Se);return Se==null||Le==="boolean"?K(Se):(Le==="number"?de:Le==="string"?(Ce=L(Se))?(Se=Ce,X):ie:Se instanceof L?X:Se instanceof Date?ce:(Me=Se,!ArrayBuffer.isView(Me)||Me instanceof DataView?Array.isArray(Se)?Q:typeof Se.valueOf!="function"&&typeof Se.toString!="function"||isNaN(Se)?pe:de:me))(we,Se)}},23648:function(m){m.exports=JSON.parse('["xx-small","x-small","small","medium","large","x-large","xx-large","larger","smaller"]')},2362:function(m){m.exports=JSON.parse('["normal","condensed","semi-condensed","extra-condensed","ultra-condensed","expanded","semi-expanded","extra-expanded","ultra-expanded"]')},87486:function(m){m.exports=JSON.parse('["normal","italic","oblique"]')},99803:function(m){m.exports=JSON.parse('["normal","bold","bolder","lighter","100","200","300","400","500","600","700","800","900"]')},54324:function(m){m.exports=JSON.parse('["inherit","initial","unset"]')},94316:function(m){m.exports=JSON.parse('["caption","icon","menu","message-box","small-caption","status-bar"]')},37071:function(m){m.exports=JSON.parse(`{"version":8,"name":"orto","metadata":{"maputnik:renderer":"mlgljs"},"center":[1.537786,41.837539],"zoom":12,"bearing":0,"pitch":0,"light":{"anchor":"viewport","color":"white","intensity":0.4,"position":[1.15,45,30]},"sources":{"ortoEsri":{"type":"raster","tiles":["https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}"],"tileSize":256,"maxzoom":18,"attribution":"ESRI &copy; <a href='http://www.esri.com'>ESRI</a>"},"ortoInstaMaps":{"type":"raster","tiles":["https://tilemaps.icgc.cat/mapfactory/wmts/orto_8_12/CAT3857/{z}/{x}/{y}.png"],"tileSize":256,"maxzoom":13},"ortoICGC":{"type":"raster","tiles":["https://geoserveis.icgc.cat/icc_mapesmultibase/noutm/wmts/orto/GRID3857/{z}/{x}/{y}.jpeg"],"tileSize":256,"minzoom":13.1,"maxzoom":20},"openmaptiles":{"type":"vector","url":"https://geoserveis.icgc.cat/contextmaps/basemap.json"}},"sprite":"https://geoserveis.icgc.cat/contextmaps/sprites/sprite@1","glyphs":"https://geoserveis.icgc.cat/contextmaps/glyphs/{fontstack}/{range}.pbf","layers":[{"id":"background","type":"background","paint":{"background-color":"#F4F9F4"}},{"id":"ortoEsri","type":"raster","source":"ortoEsri","maxzoom":16,"layout":{"visibility":"visible"}},{"id":"ortoICGC","type":"raster","source":"ortoICGC","minzoom":13.1,"maxzoom":19,"layout":{"visibility":"visible"}},{"id":"ortoInstaMaps","type":"raster","source":"ortoInstaMaps","maxzoom":13,"layout":{"visibility":"visible"}},{"id":"waterway_tunnel","type":"line","source":"openmaptiles","source-layer":"waterway","minzoom":14,"filter":["all",["in","class","river","stream","canal"],["==","brunnel","tunnel"]],"layout":{"line-cap":"round"},"paint":{"line-color":"#a0c8f0","line-width":{"base":1.3,"stops":[[13,0.5],[20,6]]},"line-dasharray":[2,4]}},{"id":"waterway-other","type":"line","metadata":{"mapbox:group":"1444849382550.77"},"source":"openmaptiles","source-layer":"waterway","filter":["!in","class","canal","river","stream"],"layout":{"line-cap":"round"},"paint":{"line-color":"#a0c8f0","line-width":{"base":1.3,"stops":[[13,0.5],[20,2]]}}},{"id":"waterway-stream-canal","type":"line","metadata":{"mapbox:group":"1444849382550.77"},"source":"openmaptiles","source-layer":"waterway","filter":["all",["in","class","canal","stream"],["!=","brunnel","tunnel"]],"layout":{"line-cap":"round"},"paint":{"line-color":"#a0c8f0","line-width":{"base":1.3,"stops":[[13,0.5],[20,6]]}}},{"id":"waterway-river","type":"line","metadata":{"mapbox:group":"1444849382550.77"},"source":"openmaptiles","source-layer":"waterway","filter":["all",["==","class","river"],["!=","brunnel","tunnel"]],"layout":{"line-cap":"round"},"paint":{"line-color":"#a0c8f0","line-width":{"base":1.2,"stops":[[10,0.8],[20,4]]},"line-opacity":0.5}},{"id":"water-offset","type":"fill","metadata":{"mapbox:group":"1444849382550.77"},"source":"openmaptiles","source-layer":"water","maxzoom":8,"filter":["==","$type","Polygon"],"layout":{"visibility":"visible"},"paint":{"fill-opacity":0,"fill-color":"#a0c8f0","fill-translate":{"base":1,"stops":[[6,[2,0]],[8,[0,0]]]}}},{"id":"water","type":"fill","metadata":{"mapbox:group":"1444849382550.77"},"source":"openmaptiles","source-layer":"water","layout":{"visibility":"visible"},"paint":{"fill-color":"hsl(210, 67%, 85%)","fill-opacity":0}},{"id":"water-pattern","type":"fill","metadata":{"mapbox:group":"1444849382550.77"},"source":"openmaptiles","source-layer":"water","layout":{"visibility":"visible"},"paint":{"fill-translate":[0,2.5],"fill-pattern":"wave","fill-opacity":1}},{"id":"landcover-ice-shelf","type":"fill","metadata":{"mapbox:group":"1444849382550.77"},"source":"openmaptiles","source-layer":"landcover","filter":["==","subclass","ice_shelf"],"layout":{"visibility":"visible"},"paint":{"fill-color":"#fff","fill-opacity":{"base":1,"stops":[[0,0.9],[10,0.3]]}}},{"id":"tunnel-service-track-casing","type":"line","metadata":{"mapbox:group":"1444849354174.1904"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","tunnel"],["in","class","service","track"]],"layout":{"line-join":"round"},"paint":{"line-color":"#cfcdca","line-dasharray":[0.5,0.25],"line-width":{"base":1.2,"stops":[[15,1],[16,4],[20,11]]}}},{"id":"tunnel-minor-casing","type":"line","metadata":{"mapbox:group":"1444849354174.1904"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","tunnel"],["==","class","minor"]],"layout":{"line-join":"round"},"paint":{"line-color":"#cfcdca","line-opacity":{"stops":[[12,0],[12.5,1]]},"line-width":{"base":1.2,"stops":[[12,0.5],[13,1],[14,4],[20,15]]}}},{"id":"tunnel-secondary-tertiary-casing","type":"line","metadata":{"mapbox:group":"1444849354174.1904"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","tunnel"],["in","class","secondary","tertiary"]],"layout":{"line-join":"round"},"paint":{"line-color":"#e9ac77","line-opacity":1,"line-width":{"base":1.2,"stops":[[8,1.5],[20,17]]}}},{"id":"tunnel-trunk-primary-casing","type":"line","metadata":{"mapbox:group":"1444849354174.1904"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","tunnel"],["in","class","primary","trunk"]],"layout":{"line-join":"round"},"paint":{"line-color":"#e9ac77","line-width":{"base":1.2,"stops":[[5,0.4],[6,0.6],[7,1.5],[20,22]]},"line-opacity":0.7}},{"id":"tunnel-motorway-casing","type":"line","metadata":{"mapbox:group":"1444849354174.1904"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","tunnel"],["==","class","motorway"]],"layout":{"line-join":"round","visibility":"visible"},"paint":{"line-color":"#e9ac77","line-dasharray":[0.5,0.25],"line-width":{"base":1.2,"stops":[[5,0.4],[6,0.6],[7,1.5],[20,22]]},"line-opacity":0.5}},{"id":"tunnel-path","type":"line","metadata":{"mapbox:group":"1444849354174.1904"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","$type","LineString"],["all",["==","brunnel","tunnel"],["==","class","path"]]],"paint":{"line-color":"#cba","line-dasharray":[1.5,0.75],"line-width":{"base":1.2,"stops":[[15,1.2],[20,4]]}}},{"id":"tunnel-service-track","type":"line","metadata":{"mapbox:group":"1444849354174.1904"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","tunnel"],["in","class","service","track"]],"layout":{"line-join":"round"},"paint":{"line-color":"#fff","line-width":{"base":1.2,"stops":[[15.5,0],[16,2],[20,7.5]]}}},{"id":"tunnel-minor","type":"line","metadata":{"mapbox:group":"1444849354174.1904"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","tunnel"],["==","class","minor_road"]],"layout":{"line-join":"round"},"paint":{"line-color":"#fff","line-opacity":1,"line-width":{"base":1.2,"stops":[[13.5,0],[14,2.5],[20,11.5]]}}},{"id":"tunnel-secondary-tertiary","type":"line","metadata":{"mapbox:group":"1444849354174.1904"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","tunnel"],["in","class","secondary","tertiary"]],"layout":{"line-join":"round"},"paint":{"line-color":"#fff4c6","line-width":{"base":1.2,"stops":[[6.5,0],[7,0.5],[20,10]]}}},{"id":"tunnel-trunk-primary","type":"line","metadata":{"mapbox:group":"1444849354174.1904"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","tunnel"],["in","class","primary","trunk"]],"layout":{"line-join":"round"},"paint":{"line-color":"#fff4c6","line-width":{"base":1.2,"stops":[[6.5,0],[7,0.5],[20,18]]},"line-opacity":0.5}},{"id":"tunnel-motorway","type":"line","metadata":{"mapbox:group":"1444849354174.1904"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","tunnel"],["==","class","motorway"]],"layout":{"line-join":"round","visibility":"visible"},"paint":{"line-color":"#ffdaa6","line-width":{"base":1.2,"stops":[[6.5,0],[7,0.5],[20,18]]},"line-opacity":0.5}},{"id":"tunnel-railway","type":"line","metadata":{"mapbox:group":"1444849354174.1904"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","tunnel"],["==","class","rail"]],"paint":{"line-color":"#bbb","line-width":{"base":1.4,"stops":[[14,0.4],[15,0.75],[20,2]]},"line-dasharray":[2,2]}},{"id":"ferry","type":"line","source":"openmaptiles","source-layer":"transportation","filter":["all",["in","class","ferry"]],"layout":{"line-join":"round","visibility":"visible"},"paint":{"line-color":"rgba(108, 159, 182, 1)","line-width":1.1,"line-dasharray":[2,2]}},{"id":"aeroway-taxiway-casing","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"aeroway","minzoom":12,"filter":["all",["in","class","taxiway"]],"layout":{"line-cap":"round","line-join":"round","visibility":"visible"},"paint":{"line-color":"rgba(153, 153, 153, 1)","line-width":{"base":1.5,"stops":[[11,2],[17,12]]},"line-opacity":1}},{"id":"aeroway-runway-casing","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"aeroway","minzoom":12,"filter":["all",["in","class","runway"]],"layout":{"line-cap":"round","line-join":"round","visibility":"visible"},"paint":{"line-color":"rgba(153, 153, 153, 1)","line-width":{"base":1.5,"stops":[[11,5],[17,55]]},"line-opacity":1}},{"id":"aeroway-taxiway","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"aeroway","minzoom":4,"filter":["all",["in","class","taxiway"],["==","$type","LineString"]],"layout":{"line-cap":"round","line-join":"round","visibility":"visible"},"paint":{"line-color":"rgba(255, 255, 255, 1)","line-width":{"base":1.5,"stops":[[11,1],[17,10]]},"line-opacity":{"base":1,"stops":[[11,0],[12,1]]}}},{"id":"aeroway-runway","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"aeroway","minzoom":4,"filter":["all",["in","class","runway"],["==","$type","LineString"]],"layout":{"line-cap":"round","line-join":"round","visibility":"visible"},"paint":{"line-color":"rgba(255, 255, 255, 1)","line-width":{"base":1.5,"stops":[[11,4],[17,50]]},"line-opacity":{"base":1,"stops":[[11,0],[12,1]]}}},{"id":"highway-motorway-link-casing","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","minzoom":12,"filter":["all",["!in","brunnel","bridge","tunnel"],["==","class","motorway_link"]],"layout":{"line-cap":"round","line-join":"round"},"paint":{"line-color":"#e9ac77","line-opacity":1,"line-width":{"base":1.2,"stops":[[12,1],[13,3],[14,4],[20,15]]}}},{"id":"highway-link-casing","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","minzoom":13,"filter":["all",["!in","brunnel","bridge","tunnel"],["in","class","primary_link","secondary_link","tertiary_link","trunk_link"]],"layout":{"line-cap":"round","line-join":"round","visibility":"visible"},"paint":{"line-color":"#e9ac77","line-opacity":1,"line-width":{"base":1.2,"stops":[[12,1],[13,3],[14,4],[20,15]]}}},{"id":"highway-minor-casing","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","$type","LineString"],["all",["!=","brunnel","tunnel"],["in","class","minor","service","track"]]],"layout":{"line-cap":"round","line-join":"round"},"paint":{"line-color":"#cfcdca","line-opacity":{"stops":[[12,0],[12.5,0]]},"line-width":{"base":1.2,"stops":[[12,0.5],[13,1],[14,4],[20,15]]}}},{"id":"highway-secondary-tertiary-casing","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["!in","brunnel","bridge","tunnel"],["in","class","secondary","tertiary"]],"layout":{"line-cap":"butt","line-join":"round","visibility":"visible"},"paint":{"line-color":"#e9ac77","line-opacity":0.5,"line-width":{"base":1.2,"stops":[[8,1.5],[20,17]]}}},{"id":"highway-primary-casing","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","minzoom":5,"filter":["all",["!in","brunnel","bridge","tunnel"],["in","class","primary"]],"layout":{"line-cap":"butt","line-join":"round","visibility":"visible"},"paint":{"line-color":"#e9ac77","line-opacity":{"stops":[[7,0],[8,0.6]]},"line-width":{"base":1.2,"stops":[[7,0],[8,0.6],[9,1.5],[20,22]]}}},{"id":"highway-trunk-casing","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","minzoom":5,"filter":["all",["!in","brunnel","bridge","tunnel"],["in","class","trunk"]],"layout":{"line-cap":"butt","line-join":"round","visibility":"visible"},"paint":{"line-color":"#e9ac77","line-opacity":{"stops":[[5,0],[6,0.5]]},"line-width":{"base":1.2,"stops":[[5,0],[6,0.6],[7,1.5],[20,22]]}}},{"id":"highway-motorway-casing","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","minzoom":4,"filter":["all",["!in","brunnel","bridge","tunnel"],["==","class","motorway"]],"layout":{"line-cap":"butt","line-join":"round","visibility":"visible"},"paint":{"line-color":"#e9ac77","line-width":{"base":1.2,"stops":[[4,0],[5,0.4],[6,0.6],[7,1.5],[20,22]]},"line-opacity":{"stops":[[4,0],[5,0.5]]}}},{"id":"highway-path","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","$type","LineString"],["all",["!in","brunnel","bridge","tunnel"],["==","class","path"]]],"paint":{"line-color":"#cba","line-dasharray":[1.5,0.75],"line-width":{"base":1.2,"stops":[[15,1.2],[20,4]]}}},{"id":"highway-motorway-link","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","minzoom":12,"filter":["all",["!in","brunnel","bridge","tunnel"],["==","class","motorway_link"]],"layout":{"line-cap":"round","line-join":"round"},"paint":{"line-color":"#fc8","line-width":{"base":1.2,"stops":[[12.5,0],[13,1.5],[14,2.5],[20,11.5]]}}},{"id":"highway-link","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","minzoom":13,"filter":["all",["!in","brunnel","bridge","tunnel"],["in","class","primary_link","secondary_link","tertiary_link","trunk_link"]],"layout":{"line-cap":"round","line-join":"round","visibility":"visible"},"paint":{"line-color":"#fea","line-width":{"base":1.2,"stops":[[12.5,0],[13,1.5],[14,2.5],[20,11.5]]}}},{"id":"highway-minor","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","$type","LineString"],["all",["!=","brunnel","tunnel"],["in","class","minor","service","track"]]],"layout":{"line-cap":"round","line-join":"round"},"paint":{"line-color":"#fff","line-opacity":0.5,"line-width":{"base":1.2,"stops":[[13.5,0],[14,2.5],[20,11.5]]}}},{"id":"highway-secondary-tertiary","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["!in","brunnel","bridge","tunnel"],["in","class","secondary","tertiary"]],"layout":{"line-cap":"round","line-join":"round","visibility":"visible"},"paint":{"line-color":"#fea","line-width":{"base":1.2,"stops":[[6.5,0],[8,0.5],[20,13]]},"line-opacity":0.5}},{"id":"highway-primary","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","$type","LineString"],["all",["!in","brunnel","bridge","tunnel"],["in","class","primary"]]],"layout":{"line-cap":"round","line-join":"round","visibility":"visible"},"paint":{"line-color":"#fea","line-width":{"base":1.2,"stops":[[8.5,0],[9,0.5],[20,18]]},"line-opacity":0}},{"id":"highway-trunk","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","$type","LineString"],["all",["!in","brunnel","bridge","tunnel"],["in","class","trunk"]]],"layout":{"line-cap":"round","line-join":"round","visibility":"visible"},"paint":{"line-color":"#fea","line-width":{"base":1.2,"stops":[[6.5,0],[7,0.5],[20,18]]},"line-opacity":0.5}},{"id":"highway-motorway","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","minzoom":5,"filter":["all",["==","$type","LineString"],["all",["!in","brunnel","bridge","tunnel"],["==","class","motorway"]]],"layout":{"line-cap":"round","line-join":"round","visibility":"visible"},"paint":{"line-color":"#fc8","line-width":{"base":1.2,"stops":[[6.5,0],[7,0.5],[20,18]]},"line-opacity":0.5}},{"id":"railway-transit","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","$type","LineString"],["all",["==","class","transit"],["!in","brunnel","tunnel"]]],"layout":{"visibility":"visible"},"paint":{"line-color":"hsla(0, 0%, 73%, 0.77)","line-width":{"base":1.4,"stops":[[14,0.4],[20,1]]}}},{"id":"railway-transit-hatching","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","$type","LineString"],["all",["==","class","transit"],["!in","brunnel","tunnel"]]],"layout":{"visibility":"visible"},"paint":{"line-color":"hsla(0, 0%, 73%, 0.68)","line-dasharray":[0.2,8],"line-width":{"base":1.4,"stops":[[14.5,0],[15,2],[20,6]]}}},{"id":"railway-service","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","$type","LineString"],["all",["==","class","rail"],["has","service"]]],"paint":{"line-color":"hsla(0, 0%, 73%, 0.77)","line-width":{"base":1.4,"stops":[[14,0.4],[20,1]]}}},{"id":"railway-service-hatching","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","$type","LineString"],["all",["==","class","rail"],["has","service"]]],"layout":{"visibility":"visible"},"paint":{"line-color":"hsla(0, 0%, 73%, 0.68)","line-dasharray":[0.2,8],"line-width":{"base":1.4,"stops":[[14.5,0],[15,2],[20,6]]}}},{"id":"railway","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","$type","LineString"],["all",["!has","service"],["!in","brunnel","bridge","tunnel"],["==","class","rail"]]],"paint":{"line-color":"#bbb","line-width":{"base":1.4,"stops":[[14,0.4],[15,0.75],[20,2]]}}},{"id":"railway-hatching","type":"line","metadata":{"mapbox:group":"1444849345966.4436"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","$type","LineString"],["all",["!has","service"],["!in","brunnel","bridge","tunnel"],["==","class","rail"]]],"paint":{"line-color":"#bbb","line-dasharray":[0.2,8],"line-width":{"base":1.4,"stops":[[14.5,0],[15,3],[20,8]]}}},{"id":"bridge-motorway-link-casing","type":"line","metadata":{"mapbox:group":"1444849334699.1902"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","bridge"],["==","class","motorway_link"]],"layout":{"line-join":"round"},"paint":{"line-color":"#e9ac77","line-opacity":1,"line-width":{"base":1.2,"stops":[[12,1],[13,3],[14,4],[20,15]]}}},{"id":"bridge-link-casing","type":"line","metadata":{"mapbox:group":"1444849334699.1902"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","bridge"],["in","class","primary_link","secondary_link","tertiary_link","trunk_link"]],"layout":{"line-join":"round"},"paint":{"line-color":"#e9ac77","line-opacity":1,"line-width":{"base":1.2,"stops":[[12,1],[13,3],[14,4],[20,15]]}}},{"id":"bridge-secondary-tertiary-casing","type":"line","metadata":{"mapbox:group":"1444849334699.1902"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","bridge"],["in","class","secondary","tertiary"]],"layout":{"line-join":"round"},"paint":{"line-color":"#e9ac77","line-opacity":1,"line-width":{"base":1.2,"stops":[[8,1.5],[20,28]]}}},{"id":"bridge-trunk-primary-casing","type":"line","metadata":{"mapbox:group":"1444849334699.1902"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","bridge"],["in","class","primary","trunk"]],"layout":{"line-join":"round"},"paint":{"line-color":"hsl(28, 76%, 67%)","line-width":{"base":1.2,"stops":[[5,0.4],[6,0.6],[7,1.5],[20,26]]}}},{"id":"bridge-motorway-casing","type":"line","metadata":{"mapbox:group":"1444849334699.1902"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","bridge"],["==","class","motorway"]],"layout":{"line-join":"round"},"paint":{"line-color":"#e9ac77","line-width":{"base":1.2,"stops":[[5,0.4],[6,0.6],[7,1.5],[20,22]]},"line-opacity":0.5}},{"id":"bridge-path-casing","type":"line","metadata":{"mapbox:group":"1444849334699.1902"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","$type","LineString"],["all",["==","brunnel","bridge"],["==","class","path"]]],"paint":{"line-color":"#f8f4f0","line-width":{"base":1.2,"stops":[[15,1.2],[20,18]]}}},{"id":"bridge-path","type":"line","metadata":{"mapbox:group":"1444849334699.1902"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","$type","LineString"],["all",["==","brunnel","bridge"],["==","class","path"]]],"paint":{"line-color":"#cba","line-width":{"base":1.2,"stops":[[15,1.2],[20,4]]},"line-dasharray":[1.5,0.75]}},{"id":"bridge-motorway-link","type":"line","metadata":{"mapbox:group":"1444849334699.1902"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","bridge"],["==","class","motorway_link"]],"layout":{"line-join":"round"},"paint":{"line-color":"#fc8","line-width":{"base":1.2,"stops":[[12.5,0],[13,1.5],[14,2.5],[20,11.5]]}}},{"id":"bridge-link","type":"line","metadata":{"mapbox:group":"1444849334699.1902"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","bridge"],["in","class","primary_link","secondary_link","tertiary_link","trunk_link"]],"layout":{"line-join":"round"},"paint":{"line-color":"#fea","line-width":{"base":1.2,"stops":[[12.5,0],[13,1.5],[14,2.5],[20,11.5]]}}},{"id":"bridge-secondary-tertiary","type":"line","metadata":{"mapbox:group":"1444849334699.1902"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","bridge"],["in","class","secondary","tertiary"]],"layout":{"line-join":"round"},"paint":{"line-color":"#fea","line-width":{"base":1.2,"stops":[[6.5,0],[7,0.5],[20,20]]}}},{"id":"bridge-trunk-primary","type":"line","metadata":{"mapbox:group":"1444849334699.1902"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","bridge"],["in","class","primary","trunk"]],"layout":{"line-join":"round"},"paint":{"line-color":"#fea","line-width":{"base":1.2,"stops":[[6.5,0],[7,0.5],[20,18]]}}},{"id":"bridge-motorway","type":"line","metadata":{"mapbox:group":"1444849334699.1902"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","bridge"],["==","class","motorway"]],"layout":{"line-join":"round"},"paint":{"line-color":"#fc8","line-width":{"base":1.2,"stops":[[6.5,0],[7,0.5],[20,18]]},"line-opacity":0.5}},{"id":"bridge-railway","type":"line","metadata":{"mapbox:group":"1444849334699.1902"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","bridge"],["==","class","rail"]],"paint":{"line-color":"#bbb","line-width":{"base":1.4,"stops":[[14,0.4],[15,0.75],[20,2]]}}},{"id":"bridge-railway-hatching","type":"line","metadata":{"mapbox:group":"1444849334699.1902"},"source":"openmaptiles","source-layer":"transportation","filter":["all",["==","brunnel","bridge"],["==","class","rail"]],"paint":{"line-color":"#bbb","line-dasharray":[0.2,8],"line-width":{"base":1.4,"stops":[[14.5,0],[15,3],[20,8]]}}},{"id":"cablecar","type":"line","source":"openmaptiles","source-layer":"transportation","minzoom":13,"filter":["==","class","cable_car"],"layout":{"visibility":"visible","line-cap":"round"},"paint":{"line-color":"hsl(0, 0%, 70%)","line-width":{"base":1,"stops":[[11,1],[19,2.5]]}}},{"id":"cablecar-dash","type":"line","source":"openmaptiles","source-layer":"transportation","minzoom":13,"filter":["==","class","cable_car"],"layout":{"visibility":"visible","line-cap":"round"},"paint":{"line-color":"hsl(0, 0%, 70%)","line-width":{"base":1,"stops":[[11,3],[19,5.5]]},"line-dasharray":[2,3]}},{"id":"boundary-land-level-4","type":"line","source":"openmaptiles","source-layer":"boundary","filter":["all",[">=","admin_level",4],["<=","admin_level",8],["!=","maritime",1]],"layout":{"line-join":"round"},"paint":{"line-color":"#9e9cab","line-dasharray":[3,1,1,1],"line-width":{"base":1.4,"stops":[[4,0.4],[5,1],[12,3]]},"line-opacity":0.6}},{"id":"boundary-land-level-2","type":"line","source":"openmaptiles","source-layer":"boundary","filter":["all",["==","admin_level",2],["!=","maritime",1],["!=","disputed",1]],"layout":{"line-cap":"round","line-join":"round"},"paint":{"line-color":"hsl(248, 7%, 66%)","line-width":{"base":1,"stops":[[0,0.6],[4,1.4],[5,2],[12,2]]}}},{"id":"boundary-land-disputed","type":"line","source":"openmaptiles","source-layer":"boundary","filter":["all",["!=","maritime",1],["==","disputed",1]],"layout":{"line-cap":"round","line-join":"round"},"paint":{"line-color":"hsl(248, 7%, 70%)","line-dasharray":[1,3],"line-width":{"base":1,"stops":[[0,0.6],[4,1.4],[5,2],[12,8]]}}},{"id":"boundary-water","type":"line","source":"openmaptiles","source-layer":"boundary","filter":["all",["in","admin_level",2,4],["==","maritime",1]],"layout":{"line-cap":"round","line-join":"round"},"paint":{"line-color":"rgba(154, 189, 214, 1)","line-width":{"base":1,"stops":[[0,0.6],[4,1],[5,1],[12,1]]},"line-opacity":{"stops":[[6,0],[10,0]]}}},{"id":"waterway-name","type":"symbol","source":"openmaptiles","source-layer":"waterway","minzoom":13,"filter":["all",["==","$type","LineString"],["has","name"]],"layout":{"text-font":["Noto Sans Italic"],"text-size":14,"text-field":"{name:latin} {name:nonlatin}","text-max-width":5,"text-rotation-alignment":"map","symbol-placement":"line","text-letter-spacing":0.2,"symbol-spacing":350},"paint":{"text-color":"#74aee9","text-halo-width":1.5,"text-halo-color":"rgba(255,255,255,0.7)"}},{"id":"water-name-lakeline","type":"symbol","source":"openmaptiles","source-layer":"water_name","filter":["==","$type","LineString"],"layout":{"text-font":["Noto Sans Italic"],"text-size":14,"text-field":"{name:latin}\\n{name:nonlatin}","text-max-width":5,"text-rotation-alignment":"map","symbol-placement":"line","symbol-spacing":350,"text-letter-spacing":0.2},"paint":{"text-color":"#74aee9","text-halo-width":1.5,"text-halo-color":"rgba(255,255,255,0.7)"}},{"id":"water-name-ocean","type":"symbol","source":"openmaptiles","source-layer":"water_name","filter":["all",["==","$type","Point"],["==","class","ocean"]],"layout":{"text-font":["Noto Sans Italic"],"text-size":14,"text-field":"{name:latin}","text-max-width":5,"text-rotation-alignment":"map","symbol-placement":"point","symbol-spacing":350,"text-letter-spacing":0.2},"paint":{"text-color":"#74aee9","text-halo-width":1.5,"text-halo-color":"rgba(255,255,255,0.7)"}},{"id":"water-name-other","type":"symbol","source":"openmaptiles","source-layer":"water_name","filter":["all",["==","$type","Point"],["!in","class","ocean"]],"layout":{"text-font":["Noto Sans Italic"],"text-size":{"stops":[[0,10],[6,14]]},"text-field":"{name:latin}\\n{name:nonlatin}","text-max-width":5,"text-rotation-alignment":"map","symbol-placement":"point","symbol-spacing":350,"text-letter-spacing":0.2,"visibility":"visible"},"paint":{"text-color":"#74aee9","text-halo-width":1.5,"text-halo-color":"rgba(255,255,255,0.7)"}},{"id":"poi-level-3","type":"symbol","source":"openmaptiles","source-layer":"poi","minzoom":16,"filter":["all",["==","$type","Point"],[">=","rank",25]],"layout":{"text-padding":2,"text-font":["Noto Sans Regular"],"text-anchor":"top","icon-image":"{class}_11","text-field":"{name:latin}\\n{name:nonlatin}","text-offset":[0,0.6],"text-size":12,"text-max-width":9},"paint":{"text-halo-blur":0.5,"text-color":"#666","text-halo-width":1,"text-halo-color":"#ffffff"}},{"id":"poi-level-2","type":"symbol","source":"openmaptiles","source-layer":"poi","minzoom":15,"filter":["all",["==","$type","Point"],["<=","rank",24],[">=","rank",15]],"layout":{"text-padding":2,"text-font":["Noto Sans Regular"],"text-anchor":"top","icon-image":"{class}_11","text-field":"{name:latin}\\n{name:nonlatin}","text-offset":[0,0.6],"text-size":12,"text-max-width":9},"paint":{"text-halo-blur":0.5,"text-color":"#666","text-halo-width":1,"text-halo-color":"#ffffff"}},{"id":"poi-level-1","type":"symbol","source":"openmaptiles","source-layer":"poi","minzoom":14,"filter":["all",["==","$type","Point"],["<=","rank",14],["has","name"]],"layout":{"text-padding":2,"text-font":["Noto Sans Regular"],"text-anchor":"top","icon-image":"{class}_11","text-field":"{name:latin}\\n{name:nonlatin}","text-offset":[0,0.6],"text-size":11,"text-max-width":9},"paint":{"text-halo-blur":0.5,"text-color":"rgba(191, 228, 172, 1)","text-halo-width":1,"text-halo-color":"rgba(30, 29, 29, 1)"}},{"id":"poi-railway","type":"symbol","source":"openmaptiles","source-layer":"poi","minzoom":13,"filter":["all",["==","$type","Point"],["has","name"],["==","class","railway"],["==","subclass","station"]],"layout":{"text-padding":2,"text-font":["Noto Sans Regular"],"text-anchor":"top","icon-image":"{class}_11","text-field":"{name:latin}\\n{name:nonlatin}","text-offset":[0,0.6],"text-size":12,"text-max-width":9,"icon-optional":false,"icon-ignore-placement":false,"icon-allow-overlap":false,"text-ignore-placement":false,"text-allow-overlap":false,"text-optional":true},"paint":{"text-halo-blur":0.5,"text-color":"#666","text-halo-width":1,"text-halo-color":"#ffffff"}},{"id":"road_oneway","type":"symbol","source":"openmaptiles","source-layer":"transportation","minzoom":15,"filter":["all",["==","oneway",1],["in","class","motorway","trunk","primary","secondary","tertiary","minor","service"]],"layout":{"symbol-placement":"line","icon-image":"oneway","symbol-spacing":75,"icon-padding":2,"icon-rotation-alignment":"map","icon-rotate":90,"icon-size":{"stops":[[15,0.5],[19,1]]}},"paint":{"icon-opacity":0.5}},{"id":"road_oneway_opposite","type":"symbol","source":"openmaptiles","source-layer":"transportation","minzoom":15,"filter":["all",["==","oneway",-1],["in","class","motorway","trunk","primary","secondary","tertiary","minor","service"]],"layout":{"symbol-placement":"line","icon-image":"oneway","symbol-spacing":75,"icon-padding":2,"icon-rotation-alignment":"map","icon-rotate":-90,"icon-size":{"stops":[[15,0.5],[19,1]]}},"paint":{"icon-opacity":0.5}},{"id":"highway-name-path","type":"symbol","source":"openmaptiles","source-layer":"transportation_name","minzoom":15.5,"filter":["==","class","path"],"layout":{"text-size":{"base":1,"stops":[[13,12],[14,13]]},"text-font":["Noto Sans Regular"],"text-field":"{name:latin} {name:nonlatin}","symbol-placement":"line","text-rotation-alignment":"map"},"paint":{"text-halo-color":"#f8f4f0","text-color":"hsl(30, 23%, 62%)","text-halo-width":0.5}},{"id":"highway-name-minor","type":"symbol","source":"openmaptiles","source-layer":"transportation_name","minzoom":15,"filter":["all",["==","$type","LineString"],["in","class","minor","service","track"]],"layout":{"text-size":{"base":1,"stops":[[13,12],[14,13]]},"text-font":["Noto Sans Regular"],"text-field":"{name:latin} {name:nonlatin}","symbol-placement":"line","text-rotation-alignment":"map"},"paint":{"text-halo-blur":0.5,"text-color":"#765","text-halo-width":1}},{"id":"highway-name-major","type":"symbol","source":"openmaptiles","source-layer":"transportation_name","minzoom":12.2,"filter":["in","class","primary","secondary","tertiary","trunk"],"layout":{"text-size":{"base":1,"stops":[[13,12],[14,13]]},"text-font":["Noto Sans Regular"],"text-field":"{name:latin} {name:nonlatin}","symbol-placement":"line","text-rotation-alignment":"map"},"paint":{"text-halo-blur":0.5,"text-color":"#765","text-halo-width":1}},{"id":"highway-shield","type":"symbol","source":"openmaptiles","source-layer":"transportation_name","minzoom":8,"filter":["all",["<=","ref_length",6],["==","$type","LineString"],["!in","network","us-interstate","us-highway","us-state"]],"layout":{"text-size":10,"icon-image":"road_{ref_length}","icon-rotation-alignment":"viewport","symbol-spacing":200,"text-font":["Noto Sans Regular"],"symbol-placement":{"base":1,"stops":[[10,"point"],[11,"line"]]},"text-rotation-alignment":"viewport","icon-size":1,"text-field":"{ref}"},"paint":{"text-opacity":1,"text-color":"rgba(20, 19, 19, 1)","text-halo-color":"rgba(230, 221, 221, 0)","text-halo-width":2,"icon-color":"rgba(183, 18, 18, 1)","icon-opacity":0.3,"icon-halo-color":"rgba(183, 55, 55, 0)"}},{"id":"highway-shield-us-interstate","type":"symbol","source":"openmaptiles","source-layer":"transportation_name","minzoom":7,"filter":["all",["<=","ref_length",6],["==","$type","LineString"],["in","network","us-interstate"]],"layout":{"text-size":10,"icon-image":"{network}_{ref_length}","icon-rotation-alignment":"viewport","symbol-spacing":200,"text-font":["Noto Sans Regular"],"symbol-placement":{"base":1,"stops":[[7,"point"],[7,"line"],[8,"line"]]},"text-rotation-alignment":"viewport","icon-size":1,"text-field":"{ref}"},"paint":{"text-color":"rgba(0, 0, 0, 1)"}},{"id":"highway-shield-us-other","type":"symbol","source":"openmaptiles","source-layer":"transportation_name","minzoom":9,"filter":["all",["<=","ref_length",6],["==","$type","LineString"],["in","network","us-highway","us-state"]],"layout":{"text-size":10,"icon-image":"{network}_{ref_length}","icon-rotation-alignment":"viewport","symbol-spacing":200,"text-font":["Noto Sans Regular"],"symbol-placement":{"base":1,"stops":[[10,"point"],[11,"line"]]},"text-rotation-alignment":"viewport","icon-size":1,"text-field":"{ref}"},"paint":{"text-color":"rgba(0, 0, 0, 1)"}},{"id":"place-other","type":"symbol","metadata":{"mapbox:group":"1444849242106.713"},"source":"openmaptiles","source-layer":"place","minzoom":12,"filter":["!in","class","city","town","village","country","continent"],"layout":{"text-letter-spacing":0.1,"text-size":{"base":1.2,"stops":[[12,10],[15,14]]},"text-font":["Noto Sans Bold"],"text-field":"{name:latin}\\n{name:nonlatin}","text-transform":"uppercase","text-max-width":9,"visibility":"visible"},"paint":{"text-color":"rgba(255,255,255,1)","text-halo-width":1.2,"text-halo-color":"rgba(57, 28, 28, 1)"}},{"id":"place-village","type":"symbol","metadata":{"mapbox:group":"1444849242106.713"},"source":"openmaptiles","source-layer":"place","minzoom":10,"filter":["==","class","village"],"layout":{"text-font":["Noto Sans Regular"],"text-size":{"base":1.2,"stops":[[10,12],[15,16]]},"text-field":"{name:latin}\\n{name:nonlatin}","text-max-width":8,"visibility":"visible"},"paint":{"text-color":"rgba(255, 255, 255, 1)","text-halo-width":1.2,"text-halo-color":"rgba(10, 9, 9, 0.8)"}},{"id":"place-town","type":"symbol","metadata":{"mapbox:group":"1444849242106.713"},"source":"openmaptiles","source-layer":"place","filter":["==","class","town"],"layout":{"text-font":["Noto Sans Regular"],"text-size":{"base":1.2,"stops":[[10,14],[15,24]]},"text-field":"{name:latin}\\n{name:nonlatin}","text-max-width":8,"visibility":"visible"},"paint":{"text-color":"rgba(255, 255, 255, 1)","text-halo-width":1.2,"text-halo-color":"rgba(22, 22, 22, 0.8)"}},{"id":"place-city","type":"symbol","metadata":{"mapbox:group":"1444849242106.713"},"source":"openmaptiles","source-layer":"place","filter":["all",["!=","capital",2],["==","class","city"]],"layout":{"text-font":["Noto Sans Regular"],"text-size":{"base":1.2,"stops":[[7,14],[11,24]]},"text-field":"{name:latin}\\n{name:nonlatin}","text-max-width":8,"visibility":"visible"},"paint":{"text-color":"rgba(0, 0, 0, 1)","text-halo-width":1.2,"text-halo-color":"rgba(255,255,255,0.8)"}},{"id":"place-city-capital","type":"symbol","metadata":{"mapbox:group":"1444849242106.713"},"source":"openmaptiles","source-layer":"place","filter":["all",["==","capital",2],["==","class","city"]],"layout":{"text-font":["Noto Sans Regular"],"text-size":{"base":1.2,"stops":[[7,14],[11,24]]},"text-field":"{name:latin}\\n{name:nonlatin}","text-max-width":8,"icon-image":"star_11","text-offset":[0.4,0],"icon-size":0.8,"text-anchor":"left","visibility":"visible"},"paint":{"text-color":"#333","text-halo-width":1.2,"text-halo-color":"rgba(255,255,255,0.8)"}},{"id":"place-country-other","type":"symbol","metadata":{"mapbox:group":"1444849242106.713"},"source":"openmaptiles","source-layer":"place","filter":["all",["==","class","country"],[">=","rank",3],["!has","iso_a2"]],"layout":{"text-font":["Noto Sans Italic"],"text-field":"{name:latin}","text-size":{"stops":[[3,11],[7,17]]},"text-transform":"uppercase","text-max-width":6.25,"visibility":"visible"},"paint":{"text-halo-blur":1,"text-color":"#334","text-halo-width":2,"text-halo-color":"rgba(255,255,255,0.8)"}},{"id":"place-country-3","type":"symbol","metadata":{"mapbox:group":"1444849242106.713"},"source":"openmaptiles","source-layer":"place","filter":["all",["==","class","country"],[">=","rank",3],["has","iso_a2"]],"layout":{"text-font":["Noto Sans Bold"],"text-field":"{name:latin}","text-size":{"stops":[[3,11],[7,17]]},"text-transform":"uppercase","text-max-width":6.25,"visibility":"visible"},"paint":{"text-halo-blur":1,"text-color":"#334","text-halo-width":2,"text-halo-color":"rgba(255,255,255,0.8)"}},{"id":"place-country-2","type":"symbol","metadata":{"mapbox:group":"1444849242106.713"},"source":"openmaptiles","source-layer":"place","filter":["all",["==","class","country"],["==","rank",2],["has","iso_a2"]],"layout":{"text-font":["Noto Sans Bold"],"text-field":"{name:latin}","text-size":{"stops":[[2,11],[5,17]]},"text-transform":"uppercase","text-max-width":6.25,"visibility":"visible"},"paint":{"text-halo-blur":1,"text-color":"#334","text-halo-width":2,"text-halo-color":"rgba(255,255,255,0.8)"}},{"id":"place-country-1","type":"symbol","metadata":{"mapbox:group":"1444849242106.713"},"source":"openmaptiles","source-layer":"place","filter":["all",["==","class","country"],["==","rank",1],["has","iso_a2"]],"layout":{"text-font":["Noto Sans Bold"],"text-field":"{name:latin}","text-size":{"stops":[[1,11],[4,17]]},"text-transform":"uppercase","text-max-width":6.25,"visibility":"visible"},"paint":{"text-halo-blur":1,"text-color":"#334","text-halo-width":2,"text-halo-color":"rgba(255,255,255,0.8)"}},{"id":"place-continent","type":"symbol","metadata":{"mapbox:group":"1444849242106.713"},"source":"openmaptiles","source-layer":"place","maxzoom":1,"filter":["==","class","continent"],"layout":{"text-font":["Noto Sans Bold"],"text-field":"{name:latin}","text-size":14,"text-max-width":6.25,"text-transform":"uppercase","visibility":"visible"},"paint":{"text-halo-blur":1,"text-color":"#334","text-halo-width":2,"text-halo-color":"rgba(255,255,255,0.8)"}}],"id":"qebnlkra6"}`)},51962:function(m){m.exports=JSON.parse(`{"version":8,"name":"orto","metadata":{},"center":[1.537786,41.837539],"zoom":12,"bearing":0,"pitch":0,"light":{"anchor":"viewport","color":"white","intensity":0.4,"position":[1.15,45,30]},"sources":{"ortoEsri":{"type":"raster","tiles":["https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}"],"tileSize":256,"maxzoom":18,"attribution":"ESRI &copy; <a href='http://www.esri.com'>ESRI</a>"},"ortoInstaMaps":{"type":"raster","tiles":["https://tilemaps.icgc.cat/mapfactory/wmts/orto_8_12/CAT3857/{z}/{x}/{y}.png"],"tileSize":256,"maxzoom":13},"ortoICGC":{"type":"raster","tiles":["https://geoserveis.icgc.cat/icc_mapesmultibase/noutm/wmts/orto/GRID3857/{z}/{x}/{y}.jpeg"],"tileSize":256,"minzoom":13.1,"maxzoom":20},"openmaptiles":{"type":"vector","url":"https://geoserveis.icgc.cat/contextmaps/basemap.json"}},"sprite":"https://geoserveis.icgc.cat/contextmaps/sprites/sprite@1","glyphs":"https://geoserveis.icgc.cat/contextmaps/glyphs/{fontstack}/{range}.pbf","layers":[{"id":"background","type":"background","paint":{"background-color":"#F4F9F4"}},{"id":"ortoEsri","type":"raster","source":"ortoEsri","maxzoom":16,"layout":{"visibility":"visible"}},{"id":"ortoICGC","type":"raster","source":"ortoICGC","minzoom":13.1,"maxzoom":19,"layout":{"visibility":"visible"}},{"id":"ortoInstaMaps","type":"raster","source":"ortoInstaMaps","maxzoom":13,"layout":{"visibility":"visible"}}]}`)}},B={};function U(m){var y=B[m];if(y!==void 0)return y.exports;var a=B[m]={id:m,exports:{}};return s[m].call(a.exports,a,a.exports,U),a.exports}return U.m=s,U.n=function(m){var y=m&&m.__esModule?function(){return m.default}:function(){return m};return U.d(y,{a:y}),y},U.d=function(m,y){for(var a in y)U.o(y,a)&&!U.o(m,a)&&Object.defineProperty(m,a,{enumerable:!0,get:y[a]})},U.g=function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch{if(typeof window=="object")return window}}(),U.o=function(m,y){return Object.prototype.hasOwnProperty.call(m,y)},U.r=function(m){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(m,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(m,"__esModule",{value:!0})},U.b=document.baseURI||self.location.href,U.nc=void 0,U(20260)}()})})(HR);var lct=HR.exports;const ZR=C6(lct),Mqt="",Iqt="",cct={ref:"card",class:"card-volumetric-field"},WR=1,uct=800,qR=300,dct=-46,JR=100,YR=-14,hct=Ki({__name:"VolumetricField",props:{passesPlays:{type:Array,default:()=>[]},playIndexes:{type:Object,default:()=>{}},successfulPassesCategoryIds:{type:Array,default:()=>[2,20,308,310]}},setup(e){const o=[[0,"rgb(12,31,82)"],[.2,"rgb(115,248,253)"],[.4,"rgb(117,251,98)"],[.6,"rgb(255,255,84)"],[.8,"rgb(242,168,59)"],[1,"rgb(234,55,36)"]];let s=null;const B=e,U=t.computed(()=>new Set(B.successfulPassesCategoryIds)),m=t.ref(null),y=t.ref(null),a=t.ref(0),v=t.ref(null);t.watch(()=>B.passesPlays,d=>{const g=d.reduce((w,C)=>(U.value.has(C[B.playIndexes.categoryId])&&w.push({x1:C[B.playIndexes.coordinate1X],y1:C[B.playIndexes.coordinate1Y],x2:C[B.playIndexes.coordinate2X],y2:C[B.playIndexes.coordinate2Y],x3:C[B.playIndexes.coordinate3X],y3:C[B.playIndexes.coordinate3Y]}),w),[]);l(g)}),t.watch(()=>a.value,(d,g)=>{v.value&&(n(d),y.value.style.height=`${i(d)}px`,v.value.style.top=`${c(i(d))}px`)});function p(){s=new ResizeObserver(d=>{for(const g of d)a.value=g.contentRect.width}),s.observe(m.value)}function r(d){return Array.from({length:d},()=>0)}function _(d,g){let w=.01351,C=.02439,E=0,A=0,P=[];const L=g.length,T=Math.floor(L/10);for(;E<74;)A=g.filter(I=>1-I.y3>=E*w&&1-I.y3<=(E+1)*w&&1-I.x3>=d*C&&1-I.x3<=(d+1)*C).map(I=>I.y3).length,P.push(parseFloat((A/T).toFixed(4))),E++;return P.reverse()}function b(d){let g=[r(74),r(74)],w=[],C=39;for(;C>0&&C<=39;)w=_(C,d),g.push(w),C--;return g.push(r(74),r(74)),g}function x(d,g,w){const C=[];let P=0,L=0;C.push(d[0]);for(let T=1;T<w-1;T++){const I=[];I.push(d[T][0]);for(let M=1;M<g-1;M++)P=d[T][M-1],L=d[T][M+1],I.push(P+.5*(d[T][M]+L-P));I.push(d[T][g-1]),C.push(I)}C.push(d[w-1]);for(let T=1;T<g-1;T++)for(let I=1;I<w-1;I++)P=C[I-1][T],L=C[I+1][T],C[I][T]=P+.5*(C[I][T]+L-P);return C}function h(d){let g=0,w=0;for(let C=0;C<d.length;C++){w=w+d[C].reduce(function(A,P){return A+P});const E=Math.max.apply(null,d[C]);E>g&&(g=E)}return g}function n(d){ZR.relayout(m.value,{width:d,height:i(d)})}function i(d){return Math.round(qR/uct*d,0)}function c(d){return YR+(d-JR)/(qR-JR)*(dct-YR)}function l(d){let g=b(d),w=g.length,C=g[0].length;g=x(x(g,C,w),C,w),C=g[0].length,w=g.length;const E=h(g),A=[{z:g,type:"surface",connectgaps:!0,opacity:.25,colorscale:o,autoscale:!1,showscale:!1}],P=[0,C],L=[0,w],T=[0,E*5],I={scene:{xaxis:{title:"",showgrid:!1,showline:!1,zeroline:!1,showticklabels:!1,showbackground:!1,backgroundcolor:"transparent",range:P},yaxis:{title:"",showgrid:!1,showline:!1,zeroline:!1,showticklabels:!1,showbackground:!1,backgroundcolor:"transparent",range:L},zaxis:{title:"",showgrid:!1,showline:!1,zeroline:!1,showticklabels:!1,showbackground:!1,backgroundcolor:"transparent",range:T},aspectratio:{x:1,y:.419,z:1},camera:{eye:{x:-.006743829259037479,y:.33535167247712533,z:-.0014332540873207011},center:{x:-.00679220694254041,y:.10728256468650094,z:-.30848979628595363}}},showlegend:!1,width:a.value,height:i(a.value),paper_bgcolor:"rgba(0,0,0,0)",margin:{l:0,r:0,b:0,t:0}};y.value&&(y.value.style.height=`${i(a.value)}px`);const M=[];for(let S=0;S<C;S++){const z=[],k=[],O=[];for(let N=0;N<w;N++)z.push(S),k.push(N),O.push(A[0].z[N][S]);M.push({x:z,y:k,z:O,type:"scatter3d",mode:"lines",line:{cmin:-.1,cmax:E,width:WR,color:O,colorscale:o,shape:"spline",smoothing:.6,dash:"dotline"}})}for(let S=0;S<w;S++){const z=[],k=[],O=[];for(let N=0;N<C;N++)z.push(N),k.push(S),O.push(A[0].z[S][N]);M.push({x:z,y:k,z:O,type:"scatter3d",mode:"lines",line:{cmin:-.1,cmax:E,width:WR,color:O,colorscale:o,shape:"spline",smoothing:.6,dash:"dotline"}})}ZR.newPlot("surface-plot",A.concat(M),I,{displayModeBar:!1},{responsive:!0}),v.value=document.getElementsByClassName("plot-container")[0],v.value&&(v.value.style.top=`${c(i(a.value))}px`)}return t.onMounted(()=>{m.value&&(m.value.style.pointerEvents="none"),p()}),(d,g)=>(t.openBlock(),t.createElementBlock("div",cct,[t.createElementVNode("div",{ref_key:"volumetricField",ref:y,class:"card-volumetric-field__volumetric-field"},[t.createElementVNode("div",{ref_key:"surfacePlot",ref:m,id:"surface-plot"},null,512)],512)],512))}},[["__scopeId","data-v-6a070f92"]]),Lqt="",pct=Ki({__name:"AttackDirection",props:{team:{type:Object,required:!0}},setup(e){const o=e,s=t.computed(()=>({"--flex-direction-info":o.team.isHomeTeam?"flex":"row-reverse","--justify-content-info":o.team.isHomeTeam?"flex-start":"flex-end","--arrow-color":o.team.isHomeTeam?"#336dff":"#7ed321"}));return(B,U)=>(t.openBlock(),t.createElementBlock("div",{class:"attack-direction",style:t.normalizeStyle(s.value)},[U[0]||(U[0]=t.createElementVNode("div",{class:"attack-direction__line"},null,-1)),t.createElementVNode("div",{class:t.normalizeClass(`attack-direction__triangle-${e.team.isHomeTeam?"right":"left"}`)},null,2),U[1]||(U[1]=t.createElementVNode("div",{class:"attack-direction__text"},"Ataca",-1))],4))}},[["__scopeId","data-v-dd911c44"]]),fct=["playId","gameId","teamId","playerId","momentOfPlay","categoryId","categoryType","matchLapse","section","matchResult","playingAs","total","coordinate1X","coordinate1Y","coordinate2X","coordinate2Y","coordinate3X","coordinate3Y","xGi","xGf","distance","fieldArea"];let DS=null;function mct(){return DS||(DS=Yy(fct)),DS}const zqt="",gct={class:"volumetric-section-container"},yct={key:0,class:"volumetric-section-container__switch"},vct={class:"volumetric-section-container__attack-direction"},bct={class:"volumetric-section-container__field"},_ct=Ki({__name:"VolumetricSectionContainer",props:{game:{type:Object,default:()=>({})},seasonSelected:{type:Object,default:()=>({})},token:{type:String,default:""},isGamePreMatch:{type:Boolean,default:!1},teamSelectedPreMatch:{type:Object,default:()=>({})},volumetricFieldIntervalMinutes:{type:Number,default:2}},setup(e){const o=mct(),s=t.ref(new Set([2,20,308,310])),B=t.ref(new Set([3,21,309])),U=t.ref(new Set([...s.value,...B.value]));let m=null;const y=e,a=fp();let v=null;function p(){if(!v){const C=a.getters.getProviderId;v=Qne(C).then(E=>{var L,T;const A=((L=E==null?void 0:E.successfulPasses)==null?void 0:L.categoriesIds)??[],P=((T=E==null?void 0:E.unsuccessfulPasses)==null?void 0:T.categoriesIds)??[];s.value=new Set(A),B.value=new Set(P),U.value=new Set([...A,...P])})}return v}const r=t.ref(0),_=t.ref(new Map),b=t.ref({teamId:0}),x=t.computed(()=>[{teamId:y.game.homeTeam.team_id,text:y.game.homeTeam.colloquial_name,img:y.game.homeTeam.logo,isHomeTeam:!0},{teamId:y.game.awayTeam.team_id,text:y.game.awayTeam.colloquial_name,img:y.game.awayTeam.logo,isHomeTeam:!1}]),h=t.computed(()=>_.value.get(y.isGamePreMatch?y.teamSelectedPreMatch.teamId:b.value.teamId)||[]);t.watch(()=>x.value,()=>{r.value=0,b.value=x.value[r.value]},{immediate:!0}),t.watch(()=>y.game.gameId,C=>{C&&(w(),i(y.game.is_live&&y.game.game_status===4))},{immediate:!0});function n(){m=setInterval(()=>{i()},1e3*60*y.volumetricFieldIntervalMinutes)}async function i(C=!1){try{await p();const E=await l();_.value.set(y.game.homeTeam.team_id,E.homeTeam),_.value.set(y.game.awayTeam.team_id,E.awayTeam),C&&n()}catch(E){throw new Error(E)}}function c(C){return y.game.game_status===4&&!y.game.is_live?C[o.gameId]!==y.game.gameId:C[o.gameId]===y.game.gameId}async function l(C=0){var E,A,P,L;try{let T={homeTeam:[],awayTeam:[]};const I=a.getters.getProviderId,M=a.getters.getIsDevApis;if(y.game.is_live||y.game.game_status===0){const S=await pu.get(uu(`https://2uj7ojhmt5.execute-api.us-west-2.amazonaws.com/prod/V2/statisticsLive/${y.game.gameId}`,I,M)),z=S.data?S.data.data||[]:[],k=new Set;z.forEach(O=>{k.add(O[o.categoryId]),O[o.teamId]===y.game.homeTeam.team_id&&U.value.has(O[o.categoryId])&&c(O)?(d(O),T.homeTeam.push(O)):O[o.teamId]===y.game.awayTeam.team_id&&U.value.has(O[o.categoryId])&&c(O)&&(O[o.coordinate1Y]=1-O[o.coordinate1Y],O[o.coordinate2Y]=1-O[o.coordinate2Y],O[o.coordinate3Y]=1-O[o.coordinate3Y],O[o.coordinate1X]=1-O[o.coordinate1X],O[o.coordinate2X]=1-O[o.coordinate2X],O[o.coordinate3X]=1-O[o.coordinate3X],d(O),T.awayTeam.push(O))})}else{const[S,z]=await Promise.all([pu.get(qy(`https://golstats-microservices.s3-us-west-2.amazonaws.com/statsTeamBySeason-${C||y.game.seasonId}-${y.game.homeTeam.team_id}.json`,I),{headers:{Authorization:""}}),pu.get(qy(`https://golstats-microservices.s3-us-west-2.amazonaws.com/statsTeamBySeason-${C||y.game.seasonId}-${y.game.awayTeam.team_id}.json`,I),{headers:{Authorization:""}})]),k=((A=(E=S.data)==null?void 0:E.data)==null?void 0:A.posession)||[],O=((L=(P=z.data)==null?void 0:P.data)==null?void 0:L.posession)||[];if(!k.length&&!O.length&&!C)return l(y.game.regularSeasonId);T={homeTeam:k.filter(N=>N[o.teamId]===y.game.homeTeam.team_id&&U.value.has(N[o.categoryId])&&c(N)),awayTeam:O.filter(N=>N[o.teamId]===y.game.awayTeam.team_id&&U.value.has(N[o.categoryId])&&c(N)?(N[o.coordinate1Y]=1-N[o.coordinate1Y],N[o.coordinate2Y]=1-N[o.coordinate2Y],N[o.coordinate3Y]=1-N[o.coordinate3Y],N[o.coordinate1X]=1-N[o.coordinate1X],N[o.coordinate2X]=1-N[o.coordinate2X],N[o.coordinate3X]=1-N[o.coordinate3X],!0):!1)}}return T}catch(T){throw new Error(T)}}function d(C){const E=C[o.coordinate1X],A=C[o.coordinate2X],P=C[o.coordinate3X];return C[o.coordinate1X]=C[o.coordinate1Y],C[o.coordinate2X]=C[o.coordinate2Y],C[o.coordinate3X]=C[o.coordinate3Y],C[o.coordinate1Y]=E,C[o.coordinate2Y]=A,C[o.coordinate3Y]=P,C}function g(C){r.value=C.index,b.value=C.button}function w(){m&&clearInterval(m)}return t.onUnmounted(()=>{w()}),(C,E)=>(t.openBlock(),t.createElementBlock("div",gct,[E[0]||(E[0]=t.createElementVNode("div",{class:"volumetric-section-container__title"},"Volumétrica",-1)),e.isGamePreMatch?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",yct,[t.createVNode(j5,{"selected-button-index":r.value,buttons:x.value,width:"320px","border-radius":"16px",onChange:g},null,8,["selected-button-index","buttons"])])),t.createElementVNode("div",vct,[t.createVNode(pct,{team:e.isGamePreMatch?e.teamSelectedPreMatch:b.value},null,8,["team"])]),t.createElementVNode("div",bct,[t.createVNode(hct,{"passes-plays":h.value,"play-indexes":t.unref(o),"successful-passes-category-ids":[...s.value]},null,8,["passes-plays","play-indexes","successful-passes-category-ids"])])]))}},[["__scopeId","data-v-5904f4a9"]]),Dqt="";let XR=null;const xct={components:{GSCHighlights:kHe,ToggleButtons:j5,VolumetricSectionContainer:_ct,DataProminentGame:OHe,HighlightsProminentGameLive:OZe,HighlightsProminentGame:kZe,GSCRadioToggle:dF,FieldPosesion:oZe,EventsLine:kWe,ChalkboardSectionContainer:sct},props:{timeLiveProminentData:{type:Number,default:6e4},timeLiveHighlightsProminentAndVideo:{type:Number,default:6e4},timeLivePossesion:{type:Number,default:6e4},game:{type:Object,default:()=>({})},token:{type:String,default:"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MCwibmFtZSI6IlVzdWFyaW8gRnJlZSIsInVzZXJuYW1lIjoiZnJlZUBnb2xzdGF0cy5jb20iLCJlbWFpbCI6ImZyZWVAZ29sc3RhdHMuY29tIiwiaWF0IjoxNjA2NzU4Nzk1LCJleHAiOjE2MzgyOTQ3OTV9.kPNmP7yDtk38cAXrUyc7OHRh6J25VFqy-XUNzbK-4YE"},seasonSelected:{type:Object,default:()=>({})},isWidget:{type:Boolean,default:!1},teamWidget:{type:Number,default:0},tournamentSelected:{type:Object,default:()=>({})},canPlayVideos:{type:Boolean,default:!1},is_captured:{type:Number,default:1},videoPrivilegesPlayingAs:{type:Set,default:()=>new Set([1,2])},playVideosPrivileges:{type:Object,default:null},volumetricFieldIntervalMinutes:{type:Number,default:2},chalkboardIntervalMinutes:{type:Number,default:2},gameEventsIntervalMinutes:{type:Number,default:1}},data(){return{isDataProminentGameLoading:!0,areHighlightsLoading:!0,widthSection:0,showleyendliveData:!1,showgoalsliveData:!1,showsummaryliveData:!1,viewVolumtrica:!0,teamButtonSelectedIndex:0,switchTypeViewFiled:"Porcentajes",teamSelected:{teamId:0},isFirstDataLoaded:!1}},computed:{toggleButtons(){return[{teamId:this.game.homeTeam.team_id,text:this.game.homeTeam.colloquial_name,img:this.game.homeTeam.logo,isHomeTeam:!0},{teamId:this.game.awayTeam.team_id,text:this.game.awayTeam.colloquial_name,img:this.game.awayTeam.logo,isHomeTeam:!1}]},isGamePreMatch(){return this.game&&this.game.game_status===4&&!this.game.is_live}},watch:{widthSection(){this.viewVolumtrica=this.widthSection>=760},toggleButtons:{handler(){this.teamButtonSelectedIndex=0,this.teamSelected=this.toggleButtons[0]},deep:!0,immediate:!0},"seasonSelected.incomplete_season":{handler(){this.seasonSelected.incomplete_season==1&&this.game.game_status==4&&this.onDataProminentGameLoading(!1)},immediate:!0},"game.game_status":{handler(){this.seasonSelected.incomplete_season==1&&this.game.game_status==4&&this.onDataProminentGameLoading(!1)},immediate:!0}},methods:{onDataProminentGameLoading(e){this.isFirstDataLoaded||(this.isDataProminentGameLoading=e,this.areHighlightsLoading=!0,e||setTimeout(()=>{this.areHighlightsLoading=!1,this.isFirstDataLoaded=!0},500))},intervalidhighlive(e){this.$emit("intervalidhighlive",e)},intervalidpossesion(e){this.$emit("intervalidpossesion",e)},onChangeToggle(e){this.teamButtonSelectedIndex=e.index,this.teamSelected=e.button},setUpResizeObserver(){if(window.ResizeObserver)XR=new ResizeObserver(()=>{this.widthSection=this.$refs.prominent.clientWidth}),XR.observe(this.$refs.prominent);else throw new Error("Resize observer not supported!")},async ChangeRadio(e){typeof e=="string"&&(this.switchTypeViewFiled=e)},openmedia(e){this.$emit("openmedia",e)},onClickSection(){Vd.emit("mouse-click-time-event",0)},onClickPlayEvent(e){const o={seasonId:this.game.is_live===1||this.game.game_status===0?this.game.seasonId:this.seasonSelected.id,isFeaturedPlayers:!1,mainSectionType:1,playListType:1,playerIds:[],categoryIds:[e.categoryId],matchResult:[1,2,3],currentPlayIndex:0,playsIds:[e.playId]};this.$emit("openmedia",o)},showleyendlive(e){this.showleyendliveData=e},showgoalslive(e){this.showgoalsliveData=e},showsummarylive(e){this.showsummaryliveData=e},onOpenMediaPlayer(e){this.canPlayVideos&&this.$emit("open-media-player",e)},getContainerClass(){return this.widthSection>830?"highlights-container-desktop":"highlights-container-mobile"}},async mounted(){setTimeout(()=>{this.setUpResizeObserver()},1e3)}},wct={key:0,class:"container-prominent-data"},kct={class:"container-prominent-section"},Sct={key:0,class:"highlights-containers"},Cct={class:"highlights-content"},Tct={key:1,class:"highlights-containers"},Act={key:0,class:"container-leyend-prematch"},Ect={key:1,class:"container-leyend-prematch-movil"},Mct={key:2,class:"container-leyend-prematch-movil"},Ict={class:"container-switch-toggle"},Pct={class:"container-prominent-section__chalkboard"};function Lct(e,o,s,B,U,m){const y=t.resolveComponent("DataProminentGame"),a=t.resolveComponent("HighlightsProminentGameLive"),v=t.resolveComponent("HighlightsProminentGame"),p=t.resolveComponent("GSCHighlights"),r=t.resolveComponent("EventsLine"),_=t.resolveComponent("ToggleButtons"),b=t.resolveComponent("GSCRadioToggle"),x=t.resolveComponent("FieldPosesion"),h=t.resolveComponent("VolumetricSectionContainer"),n=t.resolveComponent("ChalkboardSectionContainer");return t.openBlock(),t.createElementBlock("div",{class:"container-prominent",ref:"prominent",onClick:o[0]||(o[0]=(...i)=>m.onClickSection&&m.onClickSection(...i))},[s.seasonSelected.incomplete_season==1&&s.game.game_status==4&&s.game.is_live===0?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",wct,[t.createVNode(y,{"is-widget":s.isWidget,"team-widget":s.teamWidget,"time-live-prominent-data":s.timeLiveProminentData,game:s.game,"can-play-videos":s.canPlayVideos,onOpenmedia:m.openmedia,onLoading:m.onDataProminentGameLoading},null,8,["is-widget","team-widget","time-live-prominent-data","game","can-play-videos","onOpenmedia","onLoading"])])),t.createElementVNode("div",kct,[s.game.is_live===1||s.game.game_status===0||s.game.game_status===1?(t.openBlock(),t.createElementBlock("div",Sct,[t.createElementVNode("div",{class:t.normalizeClass(m.getContainerClass())},[U.showleyendliveData?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(U.widthSection>830?"highlights-header":"highlights-header-mobile")},[Object.keys(s.game).length>0&&Object.keys(s.tournamentSelected).length>0?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(U.widthSection>830?"semifinal-tag":"semifinal-tag-mobile")},t.toDisplayString(s.tournamentSelected.id!=41?s.game.matchday_name.replace("Matchday","Jornada").replace("de Final","").replace("Playoffs 1","Cuartos de Final Ida").replace("Playoffs 2","Cuartos de Final Vuelta").replace("Playoffs 3","Semifinal Ida").replace("Playoffs 4","Semifinal Vuelta").replace("Playoffs 5","Final Ida").replace("Playoffs 6","Final Vuelta"):s.game.matchday_name=="Matchday 10"?"Final":s.game.matchday_name.replace("Matchday 1","16vos Ida").replace("Matchday 2","16vos Vuelta").replace("Matchday 3","8vos Ida").replace("Matchday 4","8vos Vuelta").replace("Matchday 5","4tos Ida").replace("Matchday 6","4tos Vuelta").replace("Matchday 7","Semifinal Ida").replace("Matchday 8","Semifinal Vuelta").replace("Matchday 9","Final").replace("Matchday 10","Final")),3)):t.createCommentVNode("",!0),t.createElementVNode("h2",{class:t.normalizeClass(U.widthSection>830?"highlights-title":"highlights-title-mobile")}," HIGHLIGHTS DEL PARTIDO ",2)],2)):t.createCommentVNode("",!0),t.createElementVNode("div",Cct,[t.createElementVNode("div",{class:"highlight-card",style:t.normalizeStyle(U.showgoalsliveData?U.widthSection>830?"width: 49%;":"width: 100%;":"")},[(s.game.is_live===1||s.game.game_status===0)&&s.canPlayVideos?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[s.game.is_live===1||s.game.game_status===0?(t.openBlock(),t.createBlock(a,{key:0,"time-live-highlights-prominent-and-video":s.timeLiveHighlightsProminentAndVideo,"can-play-videos":s.canPlayVideos,game:s.game,"title-card":"GOLES",onShowgoalslive:m.showgoalslive,onShowsummarylive:m.showsummarylive,onShowleyendlive:m.showleyendlive,onIntervalidhighlive:m.intervalidhighlive,onOpenmedia:m.openmedia},null,8,["time-live-highlights-prominent-and-video","can-play-videos","game","onShowgoalslive","onShowsummarylive","onShowleyendlive","onIntervalidhighlive","onOpenmedia"])):t.createCommentVNode("",!0)],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[s.game.status===1&&s.canPlayVideos?(t.openBlock(),t.createBlock(v,{key:0,onShowsummarylive:m.showsummarylive,onShowleyendlive:m.showleyendlive,onShowgoalslive:m.showgoalslive,onIntervalidhighlive:m.intervalidhighlive,"title-card":"GOLES","can-play-videos":s.canPlayVideos,game:s.game,onOpenmedia:m.openmedia},null,8,["onShowsummarylive","onShowleyendlive","onShowgoalslive","onIntervalidhighlive","can-play-videos","game","onOpenmedia"])):t.createCommentVNode("",!0)],64))],4),t.createElementVNode("div",{class:"highlight-card",style:t.normalizeStyle(U.showsummaryliveData?U.widthSection>830?"width: 49%;":"width: 100%;":"")},[(s.game.is_live===1||s.game.game_status===0)&&s.canPlayVideos?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[s.game.is_live===1||s.game.game_status===0?(t.openBlock(),t.createBlock(a,{key:0,"time-live-highlights-prominent-and-video":s.timeLiveHighlightsProminentAndVideo,"can-play-videos":s.canPlayVideos,game:s.game,onShowleyendlive:m.showleyendlive,onShowgoalslive:m.showgoalslive,onShowsummarylive:m.showsummarylive,onIntervalidhighlive:m.intervalidhighlive,onOpenmedia:m.openmedia},null,8,["time-live-highlights-prominent-and-video","can-play-videos","game","onShowleyendlive","onShowgoalslive","onShowsummarylive","onIntervalidhighlive","onOpenmedia"])):t.createCommentVNode("",!0)],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[s.game.status===1&&s.canPlayVideos?(t.openBlock(),t.createBlock(v,{key:0,onShowsummarylive:m.showsummarylive,onShowleyendlive:m.showleyendlive,onShowgoalslive:m.showgoalslive,onIntervalidhighlive:m.intervalidhighlive,"can-play-videos":s.canPlayVideos,game:s.game,onOpenmedia:m.openmedia},null,8,["onShowsummarylive","onShowleyendlive","onShowgoalslive","onIntervalidhighlive","can-play-videos","game","onOpenmedia"])):t.createCommentVNode("",!0)],64))],4)])],2)])):(t.openBlock(),t.createElementBlock("div",Tct,[!U.isDataProminentGameLoading&&(s.game.is_live===1||s.game.game_status===0)&&s.canPlayVideos?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[s.game.status===1&&s.canPlayVideos?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[s.canPlayVideos?(t.openBlock(),t.createBlock(p,{key:0,data:{game:s.game.gameId,season:s.game.seasonId,type:"historic"},"can-play-videos":s.canPlayVideos,"video-privileges-playing-as":s.videoPrivilegesPlayingAs,"privileges-team-id":s.playVideosPrivileges?s.playVideosPrivileges.seasonAndPrivileges.teamId:0,provider:e.$store.getters.getProviderId,"is-dev-apis":e.$store.getters.getIsDevApis,onOpenmedia:m.openmedia},null,8,["data","can-play-videos","video-privileges-playing-as","privileges-team-id","provider","is-dev-apis","onOpenmedia"])):t.createCommentVNode("",!0)],64))],64))])),m.isGamePreMatch?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",{key:2,class:t.normalizeClass(U.widthSection>920?"container-prominent-section__events-line":"container-prominent-section__events-line-mobile")},[U.areHighlightsLoading?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(r,{key:0,token:s.token,game:s.game,widthScreen:U.widthSection,"can-play-videos":s.canPlayVideos,"game-events-interval-minutes":s.gameEventsIntervalMinutes,onPlayVideo:m.onClickPlayEvent},null,8,["token","game","widthScreen","can-play-videos","game-events-interval-minutes","onPlayVideo"]))],2)),U.areHighlightsLoading?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",{key:3,class:t.normalizeClass(U.widthSection>760?"fields-section-container":"fields-section-container-movil")},[o[4]||(o[4]=t.createElementVNode("div",{class:"fields-section-title"},"Posesión",-1)),s.game.game_status===4&&s.game.is_live!=1?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[U.widthSection>590?(t.openBlock(),t.createElementBlock("div",Act,o[1]||(o[1]=[t.createElementVNode("span",{class:"leyend-bold"},"IMPORTANTE:",-1),t.createTextVNode("  Con base en las estadisticas de los partidos ya jugados en el torneo. ")]))):t.createCommentVNode("",!0),U.widthSection>340&&U.widthSection<=590?(t.openBlock(),t.createElementBlock("div",Ect,o[2]||(o[2]=[t.createElementVNode("span",{class:"leyend-bold"},"IMPORTANTE:",-1),t.createTextVNode("  "),t.createElementVNode("br",null,null,-1),t.createTextVNode("Con base en las estadisticas de los partidos ya "),t.createElementVNode("br",null,null,-1),t.createTextVNode(" jugados en el torneo. ")]))):t.createCommentVNode("",!0),U.widthSection<=340?(t.openBlock(),t.createElementBlock("div",Mct,o[3]||(o[3]=[t.createElementVNode("span",{class:"leyend-bold"},"IMPORTANTE:",-1),t.createTextVNode("  "),t.createElementVNode("br",null,null,-1),t.createTextVNode("Con base en las estadisticas de los "),t.createElementVNode("br",null,null,-1),t.createTextVNode("partidos ya jugados en el torneo. ")]))):t.createCommentVNode("",!0),t.createElementVNode("div",{class:t.normalizeClass(U.widthSection>420?"container-switch-prematch-teams":"container-switch-prematch-teams-movil")},[t.createVNode(_,{"selected-button-index":U.teamButtonSelectedIndex,buttons:m.toggleButtons,width:"320px","border-radius":"16px",onChange:m.onChangeToggle},null,8,["selected-button-index","buttons","onChange"])],2)],64)):t.createCommentVNode("",!0),t.withDirectives(t.createElementVNode("div",Ict,[t.createVNode(b,{height:"20px",width:"41px","background-color":"none","width-circle":"15px","height-circle":"15px","circle-color-switch":"#CBEE6B","font-color":"#ffffff","value-default":"Porcentajes",textOptionLeft:"Porcentajes",textOptionRight:"Volumétrico",onChange:m.ChangeRadio},null,8,["onChange"])],512),[[t.vShow,U.widthSection<=760]]),t.createElementVNode("div",{class:t.normalizeClass(U.widthSection>760?"fields-container":"fields-container-movil")},[t.withDirectives(t.createElementVNode("div",{class:t.normalizeClass(U.widthSection>760?"field-possesion-container":"field-possesion-container-movil")},[t.createVNode(x,{"width-Section":U.widthSection,game:s.game,"time-live-possesion":s.timeLivePossesion,onIntervalidpossesion:m.intervalidpossesion,"team-selected":U.teamSelected.teamId===0?m.toggleButtons[0]:U.teamSelected},null,8,["width-Section","game","time-live-possesion","onIntervalidpossesion","team-selected"])],2),[[t.vShow,U.switchTypeViewFiled==="Porcentajes"||U.widthSection>760]]),t.withDirectives(t.createElementVNode("div",{class:t.normalizeClass(U.widthSection>760?"field-volumetrica-container":"field-volumetrica-container-movil")},[t.createVNode(h,{game:s.game,"season-selected":s.seasonSelected,token:s.token,"is-game-pre-match":m.isGamePreMatch,"team-selected-pre-match":U.teamSelected,"volumetric-field-interval-minutes":s.volumetricFieldIntervalMinutes},null,8,["game","season-selected","token","is-game-pre-match","team-selected-pre-match","volumetric-field-interval-minutes"])],2),[[t.vShow,U.viewVolumtrica&&U.widthSection>760||U.switchTypeViewFiled==="Volumétrico"]])],2),t.createCommentVNode("",!0)],2)),t.createElementVNode("div",Pct,[o[5]||(o[5]=t.createElementVNode("div",{class:"fields-section-title"},"Pizarra",-1)),U.areHighlightsLoading?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(n,{key:0,"is-female":s.tournamentSelected.is_female===1,game:s.game,"season-selected":s.seasonSelected,"tournament-selected":s.tournamentSelected,token:s.token,"width-section":U.widthSection,"can-play-videos":s.canPlayVideos,"is-game-pre-match":m.isGamePreMatch,"play-videos-privileges":s.playVideosPrivileges,"volumetric-field-interval-minutes":s.volumetricFieldIntervalMinutes,"chalkboard-interval-minutes":s.chalkboardIntervalMinutes,"game-events-interval-minutes":s.gameEventsIntervalMinutes,onOpenMediaPlayer:m.onOpenMediaPlayer},null,8,["is-female","game","season-selected","tournament-selected","token","width-section","can-play-videos","is-game-pre-match","play-videos-privileges","volumetric-field-interval-minutes","chalkboard-interval-minutes","game-events-interval-minutes","onOpenMediaPlayer"]))])])],512)}const Bct=Ki(xct,[["render",Lct],["__scopeId","data-v-0e1f5a6f"]]),Nqt="",zct={class:"datagame-container"},Oct=Ki({__name:"GSCProminentMain",props:{timeLiveProminentData:{type:Number,default:6e4},timeLiveHighlightsProminentAndVideo:{type:Number,default:6e4},timeLivePossesion:{type:Number,default:6e4},game:{type:Object,default:()=>({})},seasonSelected:{type:Object,default:()=>({})},tournamentSelected:{type:Object,default:()=>({})},isWidget:{type:Boolean,default:!1},teamWidget:{type:Number,default:0},canPlayVideos:{type:Boolean,default:!1},is_captured:{type:Number,default:1},videoPrivilegesPlayingAs:{type:Set,default:()=>new Set([1,2])},playVideosPrivileges:{type:Object,default:null},volumetricFieldIntervalMinutes:{type:Number,default:2},chalkboardIntervalMinutes:{type:Number,default:2},gameEventsIntervalMinutes:{type:Number,default:1}},emits:["click-play-event","openmedia","intervalidpossesion","intervalidhighlive"],setup(e,{emit:o}){const s=o;function B(a){s("intervalidhighlive",a)}function U(a){s("intervalidpossesion",a)}function m(a){s("openmedia",a)}function y(a){s("openmedia",a)}return(a,v)=>(t.openBlock(),t.createElementBlock("div",zct,[t.createVNode(Bct,{game:e.game,is_captured:e.is_captured,"is-widget":e.isWidget,"team-widget":e.teamWidget,"time-live-prominent-data":e.timeLiveProminentData,"time-live-highlights-prominent-and-video":e.timeLiveHighlightsProminentAndVideo,"time-live-possesion":e.timeLivePossesion,"season-selected":e.seasonSelected,"tournament-selected":e.tournamentSelected,"can-play-videos":e.canPlayVideos,"video-privileges-playing-as":e.videoPrivilegesPlayingAs,"play-videos-privileges":e.playVideosPrivileges,"volumetric-field-interval-minutes":e.volumetricFieldIntervalMinutes,"chalkboard-interval-minutes":e.chalkboardIntervalMinutes,"game-events-interval-minutes":e.gameEventsIntervalMinutes,onIntervalidpossesion:U,onIntervalidhighlive:B,onOpenmedia:m,onOpenMediaPlayer:y},null,8,["game","is_captured","is-widget","team-widget","time-live-prominent-data","time-live-highlights-prominent-and-video","time-live-possesion","season-selected","tournament-selected","can-play-videos","video-privileges-playing-as","play-videos-privileges","volumetric-field-interval-minutes","chalkboard-interval-minutes","game-events-interval-minutes"])]))}},[["__scopeId","data-v-9010e64a"]]),Dct={class:"datagame-container"},Nct={__name:"GSCDatosGSMainAvanced",props:{isWidget:{type:Boolean,default:!1},teamWidget:{type:Number,default:0},game:{type:Object,default:()=>({gameId:79623,seasonId:1772,status:1,dateTimeUTC:"2023-10-01T22:20:00Z",homeTeam:{logo:"https://golstatsimages.blob.core.windows.net/teams-80/18.png",team_id:10,provisional_logo:"https://golstatsimages.blob.core.windows.net/teams-provisional/18.png",colloquial_name:"Toluca",acronym:"TOL",team_name:"Toluca"},awayTeam:{logo:"https://golstatsimages.blob.core.windows.net/teams-80/1.png",team_id:1,provisional_logo:"https://golstatsimages.blob.core.windows.net/teams-provisional/1.png",colloquial_name:"Chivas",acronym:"CHI",team_name:"Guadalajara"}})},tournamentSelected:{type:Object,default:()=>({})},playVideosPrivileges:{type:Object,default:null}},emits:["openmedia","intervalidgs"],setup(e,{emit:o}){const s=fp(),B=t.ref(0),U=e;t.watch(()=>U.game,v=>{B.value=v.gameId},{deep:!0,immediate:!0});const m=o;function y(v){m("openmedia",v)}function a(v){m("intervalidgs",v)}return(v,p)=>(t.openBlock(),t.createElementBlock("div",Dct,[e.game.is_live===1||e.game.game_status===0?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[Object.keys(e.game).length>0?(t.openBlock(),t.createBlock(t.unref(fb),{key:B.value,type:3,"is-widget":e.isWidget,"team-widget":e.teamWidget,data:{season:e.game.seasonId,game:e.game.gameId,game_status:e.game.game_status,home_team_id:e.game.homeTeam.team_id,away_team_id:e.game.awayTeam.team_id,team_view:2},"tournament-selected":e.tournamentSelected,onIntervalidgs:a,"play-videos-privileges":e.playVideosPrivileges,"provider-id":t.unref(s).getters.getProviderId,"is-dev-apis":t.unref(s).getters.getIsDevApis,onOpenmedia:y},null,8,["is-widget","team-widget","data","tournament-selected","play-videos-privileges","provider-id","is-dev-apis"])):t.createCommentVNode("",!0)],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[e.game.game_status==4?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[Object.keys(e.game).length>0?(t.openBlock(),t.createBlock(t.unref(fb),{key:B.value,type:0,"is-widget":e.isWidget,"team-widget":e.teamWidget,data:{season:e.game.seasonId,game:e.game.gameId,game_status:e.game.game_status,home_team_id:e.game.homeTeam.team_id,away_team_id:e.game.awayTeam.team_id,team_view:1},"tournament-selected":e.tournamentSelected,"play-videos-privileges":e.playVideosPrivileges,"provider-id":t.unref(s).getters.getProviderId,"is-dev-apis":t.unref(s).getters.getIsDevApis,onOpenmedia:y},null,8,["is-widget","team-widget","data","tournament-selected","play-videos-privileges","provider-id","is-dev-apis"])):t.createCommentVNode("",!0)],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[Object.keys(e.game).length>0?(t.openBlock(),t.createBlock(t.unref(fb),{key:B.value,type:1,"is-widget":e.isWidget,"team-widget":e.teamWidget,data:{season:e.game.seasonId,game:e.game.gameId,game_status:e.game.game_status,home_team_id:e.game.homeTeam.team_id,away_team_id:e.game.awayTeam.team_id,team_view:2},"tournament-selected":e.tournamentSelected,"play-videos-privileges":e.playVideosPrivileges,"provider-id":t.unref(s).getters.getProviderId,"is-dev-apis":t.unref(s).getters.getIsDevApis,onOpenmedia:y},null,8,["is-widget","team-widget","data","tournament-selected","play-videos-privileges","provider-id","is-dev-apis"])):t.createCommentVNode("",!0)],64))],64))]))}},Fct={computed:{sizeTabsFontMP(){const e=this.elementSize.width;return e<=380?"12px":e<=768?"14px":"16px"},sizeTabsFontMS(){const e=this.elementSize.width;return e<=600?"12px":e<=768?"13px":"14px"},sizeTabsMS(){const e=this.elementSize.width;return e<=480?"145px":e<=600?"153px":e<=620?"163px":e<=640?"170px":e<=660?"175px":e<=680?"180px":e<=700?"185px":e<=720?"195px":"200px"},sizeTabsMP(){const e=this.elementSize.width;return e<=319?"68px":e<=330?"73px":e<=340?"78px":e<=350?"82px":e<=360||e<=370?"90px":e<=390?"95px":e<=410?"105px":e<=430?"110px":e<=450?"117px":e<=470?"122px":e<=500?"130px":e<=530?"138px":e<=560?"155px":e<=590?"163px":e<=620?"175px":e<=650?"180px":e<=680?"195px":e<=730?"210px":e<=768?"100px":"110px"},comextleyemdmultipleleaguesClass(){return this.elementSize.width<=380?this.$style.comtextleyemdmultipleleagues380:this.$style.comtextleyemdmultipleleagues},comdropdownParentClass(){return this.elementSize.width<=730?this.$style.comdropdownParent730:this.$style.comdropdownParent},comdescubreVideosClass(){const e=this.elementSize.width;return e<=960?this.$style.comdescubreVideos960:e<=1232?this.$style.comdescubreVideos1232:this.$style.comdescubreVideos},comquitarFiltrosClass(){const e=this.elementSize.width;return e<=380?this.$style.comquitarFiltros380:e<=480?this.$style.comquitarFiltros480:e<=730?this.$style.comquitarFiltros730:this.$style.comquitarFiltros},commejoresJugadoresClass(){const e=this.elementSize.width;return e<=480?this.$style.commejoresJugadores480:e<=730?this.$style.commejoresJugadores730:this.$style.commejoresJugadores},menuSectionClass(){return this.elementSize.width<=960?this.$style.commenuSection960:this.$style.commenuSection},topFiltersClass(){const e=this.elementSize.width;return e<=420?this.$style.comtopFilters420:e<=460?this.$style.comtopFilters460:e<=1232?this.$style.comtopFilters1232:this.$style.comtopFilters},toniKroosWrapperClass(){const e=this.elementSize.width;return e<=319?this.$style.comtoniKroosWrapper320:e<=420?this.$style.comtoniKroosWrapper420:e<=916?this.$style.comtoniKroosWrapper760:e<=975?this.$style.comtoniKroosWrapper975:e<=1079?this.$style.comtoniKroosWrapper1080:this.$style.comtoniKroosWrapper},containerTablesClass(){const e=this.elementSize.width;return e<=319?this.$style.comcontainerTables320:e<=916?this.$style.comcontainerTables760:e<=1079?this.$style.comcontainerTables960:this.$style.comcontainerTables},containerTheBestClass(){const e=this.elementSize.width;return e<=319?this.$style.comcontainerTheBest320:e<=960?this.$style.comcontainerTheBest960:e<=1232?this.$style.comcontainerTheBest1232:this.$style.comcontainerTheBest},menuSectionHeaderClass(){const e=this.elementSize.width;return e<=730?this.$style.commenuSectionHeader730:e<=960?this.$style.commenuSectionHeader960:e<=1232?this.$style.commenuSectionHeader1232:this.$style.commenuSectionHeader},losMejoresClass(){const e=this.elementSize.width;return e<=380?this.$style.comlosMejores380:e<=530?this.$style.comlosMejores530:e<=730?this.$style.comlosMejores730:this.$style.comlosMejores},dropdownClass(){return this.elementSize.width<=730?this.$style.comdropdown730:this.$style.comdropdown},dropdown1Class(){return this.elementSize.width<=730?this.$style.comdropdown1730:this.$style.comdropdown1},menuSectionParentHeaderClass(){const e=this.elementSize.width;return e<=430?this.$style.commenuSectionParentHeader430:e<=730?this.$style.commenuSectionParentHeader730:e<=960?this.$style.commenuSectionParentHeader960:e<=1232?this.$style.commenuSectionParentHeader1232:this.$style.commenuSectionParentHeader},templateLosMejoresClass(){const e=this.elementSize.width;return e<=319?this.$style.comtemplateLosMejores1320:e<=350?this.$style.comtemplateLosMejores1350:e<=420?this.$style.comtemplateLosMejores1420:e<=540?this.$style.comtemplateLosMejores1540:e<=960?this.$style.comtemplateLosMejores1960:e<=1232?this.$style.comtemplateLosMejores11232:this.$style.comtemplateLosMejores1},containerMenuClass(){return this.elementSize.width<=760?this.$style.comcontainerMenu760:this.$style.comcontainerMenu},titleSectionClass(){return this.elementSize.width<=540?this.$style.comtitleSection540:this.$style.comtitleSection},containerSectionClass(){const e=this.elementSize.width;return e<=319?this.$style.comcontainerSection320:e<=350?this.$style.comcontainerSection350:e<=960?this.$style.comcontainerSection960:e<=1232?this.$style.comcontainerSection1232:this.$style.comcontainerSection},filtersContainerClass(){const e=this.elementSize.width;return e<=420?this.$style.comfiltersContainer420:e<=760?this.$style.comfiltersContainer760:e<=1232?this.$style.comfiltersContainer1232:this.$style.comfiltersContainer},topFiltersParentClass(){const e=this.elementSize.width;return e<=420?this.$style.comtopFiltersParent420:e<=460?this.$style.comtopFiltersParent460:e<=1232?this.$style.comtopFiltersParent1232:this.$style.comtopFiltersParent}}};function jb(e){const o=t.ref({width:0,height:0});function s(){const B=e.value.getBoundingClientRect();o.value.width=B.width,o.value.height=B.height}return t.onMounted(()=>{s(),window.addEventListener("resize",s)}),t.onUnmounted(()=>{window.removeEventListener("resize",s)}),{elementSize:o}}const Rct={containerLeftTitles:"_containerLeftTitles_10kz4_60",containerLeftTitles420:"_containerLeftTitles420_10kz4_68",containerLeftTitles620:"_containerLeftTitles620_10kz4_76",containerLeftTitlesTeam:"_containerLeftTitlesTeam_10kz4_85",containerLeftTitlesTeam1180:"_containerLeftTitlesTeam1180_10kz4_93",containerLeftTitlesTeam1090:"_containerLeftTitlesTeam1090_10kz4_101",containerLeftTitlesTeam960:"_containerLeftTitlesTeam960_10kz4_109",containerLeftTitlesTeam860:"_containerLeftTitlesTeam860_10kz4_117",containerLeftTitlesTeam768:"_containerLeftTitlesTeam768_10kz4_125",containerLeftTitlesTeam680:"_containerLeftTitlesTeam680_10kz4_133",containerLeftTitlesTeam620:"_containerLeftTitlesTeam620_10kz4_141",containerLeftTitlesTeam420:"_containerLeftTitlesTeam420_10kz4_149",headTitlesAvanced:"_headTitlesAvanced_10kz4_158",headTitlesAvanced960:"_headTitlesAvanced960_10kz4_173",headTitlesAvanced420:"_headTitlesAvanced420_10kz4_188",headTitlesAvanced540:"_headTitlesAvanced540_10kz4_208",headTitlesAvanced460:"_headTitlesAvanced460_10kz4_223",headTitlesAvanced620:"_headTitlesAvanced620_10kz4_238",position:"_position_10kz4_253",position420:"_position420_10kz4_262",player:"_player_10kz4_265",player420:"_player420_10kz4_276",containerRightTypeAvanced1:"_containerRightTypeAvanced1_10kz4_280",containerRightTitlesAdvanced:"_containerRightTitlesAdvanced_10kz4_287",containerRightTitlesAdvanced960:"_containerRightTitlesAdvanced960_10kz4_296",block02Titles:"_block02Titles_10kz4_305",block02Titles620:"_block02Titles620_10kz4_313",mon1Scouting:"_mon1Scouting_10kz4_317",mon1Scouting960:"_mon1Scouting960_10kz4_327",mon1:"_mon1_10kz4_317",mon1420:"_mon1420_10kz4_345",mon1620:"_mon1620_10kz4_355",icnIcon:"_icnIcon_10kz4_365",icnIcon960:"_icnIcon960_10kz4_370",icnIcon420:"_icnIcon420_10kz4_376",teamTitle:"_teamTitle_10kz4_380",positionTitle:"_positionTitle_10kz4_390",ageTitle:"_ageTitle_10kz4_398",partidos:"_partidos_10kz4_406",playedGamesTitle:"_playedGamesTitle_10kz4_410",playedMinutesTitle:"_playedMinutesTitle_10kz4_420",block01Titles:"_block01Titles_10kz4_429",mon:"_mon_10kz4_317",containesOptionsTitles:"_containesOptionsTitles_10kz4_445",templateTablaProductividadType1:"_templateTablaProductividadType1_10kz4_452",templateTablaProductividadType1400:"_templateTablaProductividadType1400_10kz4_464",headTitlesType1:"_headTitlesType1_10kz4_478",headTitlesType1420:"_headTitlesType1420_10kz4_491",headTitlesType1400:"_headTitlesType1400_10kz4_507",headTitlesType1540:"_headTitlesType1540_10kz4_523",headTitlesType1460:"_headTitlesType1460_10kz4_537",headTitlesType1680:"_headTitlesType1680_10kz4_551",headTitlesType1350:"_headTitlesType1350_10kz4_564",positionType1:"_positionType1_10kz4_579",positionType1400:"_positionType1400_10kz4_588",teamType1:"_teamType1_10kz4_598",teamType1400:"_teamType1400_10kz4_607",frecuenciaType1:"_frecuenciaType1_10kz4_617",frecuenciaType1540:"_frecuenciaType1540_10kz4_625",containerLeftTitlesType1:"_containerLeftTitlesType1_10kz4_634",frecuenciaWrapperType1:"_frecuenciaWrapperType1_10kz4_642",frecuenciaWrapperType1680:"_frecuenciaWrapperType1680_10kz4_651",promedioPartidoType1:"_promedioPartidoType1_10kz4_659",promedioEstePartidoType1:"_promedioEstePartidoType1_10kz4_663",promedioEstePartidoType1960:"_promedioEstePartidoType1960_10kz4_671",promedioEstePartidoWrapperType1:"_promedioEstePartidoWrapperType1_10kz4_675",promedioEstePartidoWrapperType11200:"_promedioEstePartidoWrapperType11200_10kz4_683",promedioEstePartidoWrapperType11090:"_promedioEstePartidoWrapperType11090_10kz4_692",promedioEstePartidoWrapperType11086:"_promedioEstePartidoWrapperType11086_10kz4_702",promedioPartidosType1:"_promedioPartidosType1_10kz4_711",promedioPartidosWrapperType1:"_promedioPartidosWrapperType1_10kz4_718",promedioPartidosWrapperType1960:"_promedioPartidosWrapperType1960_10kz4_726",promedioPartidosWrapperType11086:"_promedioPartidosWrapperType11086_10kz4_729",partidosJugadosType1:"_partidosJugadosType1_10kz4_732",partidosJugadosType1960:"_partidosJugadosType1960_10kz4_738",partidosJugadosWrapperType1:"_partidosJugadosWrapperType1_10kz4_745",partidosJugadosWrapperType11200:"_partidosJugadosWrapperType11200_10kz4_753",partidosJugadosWrapperType11180:"_partidosJugadosWrapperType11180_10kz4_761",partidosJugadosWrapperType11170:"_partidosJugadosWrapperType11170_10kz4_769",partidosJugadosWrapperType11140:"_partidosJugadosWrapperType11140_10kz4_777",partidosJugadosWrapperType11086:"_partidosJugadosWrapperType11086_10kz4_785",partidosJugadosWrapperType1960:"_partidosJugadosWrapperType1960_10kz4_793",partidosJugadosWrapperType1880:"_partidosJugadosWrapperType1880_10kz4_801",partidosJugadosWrapperType1860:"_partidosJugadosWrapperType1860_10kz4_809",partidosJugadosWrapperType1830:"_partidosJugadosWrapperType1830_10kz4_817",partidosJugadosWrapperType1790:"_partidosJugadosWrapperType1790_10kz4_825",partidosJugadosWrapperType1930:"_partidosJugadosWrapperType1930_10kz4_833",partidosJugadosWrapperType1770:"_partidosJugadosWrapperType1770_10kz4_841",block01TitlesType1:"_block01TitlesType1_10kz4_844",monType1:"_monType1_10kz4_852",monType1960:"_monType1960_10kz4_861",monType1680:"_monType1680_10kz4_871",videosType1:"_videosType1_10kz4_874",videosType1680:"_videosType1680_10kz4_884",videosType1600:"_videosType1600_10kz4_893",videosType1540:"_videosType1540_10kz4_902",videosType1420:"_videosType1420_10kz4_911",videosType1400:"_videosType1400_10kz4_920",containesOptionsTitlesType1:"_containesOptionsTitlesType1_10kz4_932",containesOptionsTitlesType1768:"_containesOptionsTitlesType1768_10kz4_940",containesOptionsTitlesType1730:"_containesOptionsTitlesType1730_10kz4_947",containesOptionsTitlesType1690:"_containesOptionsTitlesType1690_10kz4_954",icnIconType1:"_icnIconType1_10kz4_961",icnIconType1420:"_icnIconType1420_10kz4_967",icnIconType1400:"_icnIconType1400_10kz4_974",block02TitlesType1:"_block02TitlesType1_10kz4_978",block02TitlesType1680:"_block02TitlesType1680_10kz4_985",block02TitlesType1350:"_block02TitlesType1350_10kz4_992",containerRightTitlesType1:"_containerRightTitlesType1_10kz4_999",containerRightTitlesType1420:"_containerRightTitlesType1420_10kz4_1008"},NS={components:{},computed:{icnIconType1Class(){const e=this.elementSize.width;return e<=400?this.$style.icnIconType1400:e<=420?this.$style.icnIconType1420:this.$style.icnIconType1},videosType1Class(){const e=this.elementSize.width;return e<=400?this.$style.videosType1400:e<=420?this.$style.videosType1420:e<=540?this.$style.videosType1540:e<=600?this.$style.videosType1600:e<=680?this.$style.videosType1680:this.$style.videosType1},monType1Class(){const e=this.elementSize.width;return e<=680?this.$style.monType1680:e<=960?this.$style.monType1960:this.$style.monType1},block02TitlesType1Class(){const e=this.elementSize.width;return e<=350?this.$style.block02TitlesType1350:e<=680?this.$style.block02TitlesType1680:this.$style.block02TitlesType1},containesOptionsTitlesType1Class(){const e=this.elementSize.width;return e<=400?this.$style.containesOptionsTitlesType1400:e<=690?this.$style.containesOptionsTitlesType1690:e<=730?this.$style.containesOptionsTitlesType1730:e<=768?this.$style.containesOptionsTitlesType1768:this.$style.containesOptionsTitlesType1},partidosJugadosWrapperType1Class(){const e=this.elementSize.width;return e<=770?this.$style.promedioPartidosWrapperType1770:e<=790?this.$style.partidosJugadosWrapperType1790:e<=830?this.$style.partidosJugadosWrapperType1830:e<=860?this.$style.partidosJugadosWrapperType1860:e<=880?this.$style.partidosJugadosWrapperType1880:e<=930?this.$style.partidosJugadosWrapperType1930:e<=960?this.$style.partidosJugadosWrapperType1960:e<=1086?this.$style.partidosJugadosWrapperType11086:e<=1140?this.$style.partidosJugadosWrapperType11140:e<=1170?this.$style.partidosJugadosWrapperType11170:e<=1180?this.$style.partidosJugadosWrapperType11180:e<=1200?this.$style.partidosJugadosWrapperType11200:this.$style.partidosJugadosWrapperType1},promedioPartidosWrapperType1Class(){const e=this.elementSize.width;return e<=960?this.$style.promedioPartidosWrapperType1960:e<=1086?this.$style.promedioPartidosWrapperType11086:this.$style.promedioPartidosWrapperType1},partidosJugadosType1Class(){return this.elementSize.width<=960?this.$style.partidosJugadosType1960:this.$style.partidosJugadosType1},templateTablaProductividadType1Class(){return this.elementSize.width<=400?this.$style.templateTablaProductividadType1400:this.$style.templateTablaProductividadType1},promedioEstePartidoType1Class(){return this.elementSize.width<=960?this.$style.promedioEstePartidoType1960:this.$style.promedioEstePartidoType1},headTitlesType1Class(){const e=this.elementSize.width;return e<=350?this.$style.headTitlesType1350:e<=400?this.$style.headTitlesType1400:e<=420?this.$style.headTitlesType1420:e<=460?this.$style.headTitlesType1460:e<=540?this.$style.headTitlesType1540:e<=680?this.$style.headTitlesType1680:this.$style.headTitlesType1},headTitlesClassAvanced(){const e=this.elementSize.width;return e<=420?this.$style.headTitlesAvanced420:e<=460?this.$style.headTitlesAvanced460:e<=540?this.$style.headTitlesAvanced540:e<=620?this.$style.headTitlesAvanced620:e<=960?this.$style.headTitlesAvanced960:this.$style.headTitlesAvanced},containerLeftTitlesClass(){const e=this.elementSize.width;return e<=420?this.$style.containerLeftTitles420:e<=620?this.$style.containerLeftTitles620:this.$style.containerLeftTitles},containerLeftTitlesClassTeam(){const e=this.elementSize.width;return e<=420?this.$style.containerLeftTitlesTeam420:e<=620?this.$style.containerLeftTitlesTeam620:e<=680?this.$style.containerLeftTitlesTeam680:e<=768?this.$style.containerLeftTitlesTeam768:e<=860?this.$style.containerLeftTitlesTeam860:e<=960?this.$style.containerLeftTitlesTeam960:e<=1090?this.$style.containerLeftTitlesTeam1090:e<=1180?this.$style.containerLeftTitlesTeam1180:this.$style.containerLeftTitlesTeam},icnIconClass(){const e=this.elementSize.width;return e<=420?this.$style.icnIcon420:e<=960?this.$style.icnIcon960:this.$style.icnIcon},mon1Class(){const e=this.elementSize.width;return e<=420?this.$style.mon1420:e<=620?this.$style.mon1620:this.$style.mon1},mon1ScoutingClass(){const e=this.elementSize.width;return e<=420?this.$style.mon1420:e<=960?this.$style.mon1Scouting960:this.$style.mon1Scouting},promedioEstePartidoWrapperType1Class(){const e=this.elementSize.width;return e<=1086?this.$style.promedioEstePartidoWrapperType11086:e<=1090?this.$style.promedioEstePartidoWrapperType11090:e<=1200?this.$style.promedioEstePartidoWrapperType11200:this.$style.promedioEstePartidoWrapperType1},frecuenciaWrapperType1Class(){return this.elementSize.width<=680?this.$style.frecuenciaWrapperType1680:this.$style.frecuenciaWrapperType1},frecuenciaType1Class(){return this.elementSize.width<=540?this.$style.frecuenciaType1540:this.$style.frecuenciaType1},positionType1Class(){return this.elementSize.width<=400?this.$style.positionType1400:this.$style.positionType1},containerRightType1ClassAvanced(){return this.elementSize.width<=420?this.$style.containerRightTypeAvanced1420:this.$style.containerRightTypeAvanced1},containerRightTitlesType1Class(){return this.elementSize.width<=420?this.$style.containerRightTitlesType1420:this.$style.containerRightTitlesType1},teamType1Class(){return this.elementSize.width<=400?this.$style.teamType1400:this.$style.teamType1},playerClass(){return this.elementSize.width<=420?this.$style.player420:this.$style.player},positionClass(){return this.elementSize.width<=420?this.$style.position420:this.$style.position},containerRightTitlesClassAdvanced(){return this.elementSize.width<=960?this.$style.containerRightTitlesAdvanced960:this.$style.containerRightTitlesAdvanced},block02TitlesClass(){return this.elementSize.width<=620?this.$style.block02Titles960:this.$style.block02Titles}},setup(){const e=t.ref("myDivRef"),{elementSize:o}=jb(e);return{myDivRef:e,elementSize:o}},props:{type:{type:Number,default:0},background:{type:String,default:"#172531"},height:{type:String,default:"71px"},heightTeam:{type:String,default:"65px"},fontColor:{type:String,default:"#FFFFFF"},fontSize:{type:String,default:"12px"},fontFamily:{type:String,default:"Poppins-Regular"}},watch:{},data:()=>({}),async created(){},methods:{}},$R=()=>{t.useCssVars(e=>({"833b0df6":e.background,"1c64387e":e.height,"42ac62f2":e.fontSize,"149ddcc6":e.fontColor,"766a7f2c":e.fontFamily,"669f7ffb":e.heightTeam}))},KR=NS.setup;NS.setup=KR?(e,o)=>($R(),KR(e,o)):$R;const Vct={ref:"myDivRef"};function jct(e,o,s,B,U,m){return t.openBlock(),t.createElementBlock("div",Vct,[s.type==0?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(m.headTitlesClassAvanced),id:"container-titles"},[t.createElementVNode("div",{class:t.normalizeClass(m.containerLeftTitlesClass),id:"container-left-titles"},[t.createElementVNode("div",{class:t.normalizeClass(m.positionClass)},"Pos.",2),t.createElementVNode("div",{class:t.normalizeClass(m.playerClass)},"Jugador",2)],2),t.createElementVNode("div",{class:t.normalizeClass(m.containerRightTitlesClassAdvanced),id:"container-right-titles"},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.block01Titles)},[B.elementSize.width>540?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(e.$style.teamTitle)},"Equipo",2)):t.createCommentVNode("",!0),B.elementSize.width>730?(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(e.$style.positionTitle)},"Posición",2)):t.createCommentVNode("",!0),B.elementSize.width>960?(t.openBlock(),t.createElementBlock("div",{key:2,class:t.normalizeClass(e.$style.ageTitle)},"edad",2)):t.createCommentVNode("",!0),B.elementSize.width>960?(t.openBlock(),t.createElementBlock("div",{key:3,class:t.normalizeClass(e.$style.ageTitle)},"País",2)):t.createCommentVNode("",!0),B.elementSize.width>540?(t.openBlock(),t.createElementBlock("div",{key:4,class:t.normalizeClass(e.$style.playedGamesTitle)},[t.createElementVNode("p",{class:t.normalizeClass(e.$style.partidos)},"Partidos",2),t.createElementVNode("p",{class:t.normalizeClass(e.$style.partidos)},"Jugados",2)],2)):t.createCommentVNode("",!0),B.elementSize.width>635?(t.openBlock(),t.createElementBlock("div",{key:5,class:t.normalizeClass(e.$style.playedMinutesTitle)},[t.createElementVNode("p",{class:t.normalizeClass(e.$style.partidos)},"Minutos",2),t.createElementVNode("p",{class:t.normalizeClass(e.$style.partidos)},"Jugados",2)],2)):t.createCommentVNode("",!0)],2),t.createElementVNode("div",{class:t.normalizeClass(m.block02TitlesClass)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.containesOptionsTitles)},[B.elementSize.width>960?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(e.$style.mon)},"Total",2)):t.createCommentVNode("",!0),t.createElementVNode("div",{class:t.normalizeClass(m.mon1Class)},"Videos",2)],2)],2)],2)],2)):t.createCommentVNode("",!0),s.type==1?(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(m.templateTablaProductividadType1Class)},[t.createElementVNode("div",{class:t.normalizeClass(m.headTitlesType1Class),id:"container-titles"},[t.createElementVNode("div",{class:t.normalizeClass(m.containerLeftTitlesClassTeam),id:"container-left-titles"},[t.createElementVNode("div",{class:t.normalizeClass(m.positionType1Class)},"Pos.",2),t.createElementVNode("div",{class:t.normalizeClass(m.teamType1Class)},"Equipo",2)],2),t.createElementVNode("div",{class:t.normalizeClass(m.containerRightType1ClassAvanced)},[t.createElementVNode("div",{class:t.normalizeClass(m.frecuenciaWrapperType1Class)},[B.elementSize.width>540?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(m.frecuenciaType1Class)},"Frecuencia",2)):t.createCommentVNode("",!0)],2),B.elementSize.width>960?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(m.promedioEstePartidoWrapperType1Class)},[t.createElementVNode("div",{class:t.normalizeClass(m.promedioEstePartidoType1Class)},[t.createElementVNode("p",{class:t.normalizeClass(e.$style.promedioPartidoType1)},"Promedio partido",2),t.createElementVNode("p",{class:t.normalizeClass(e.$style.promedioPartidoType1)},"este Torneo",2)],2)],2)):t.createCommentVNode("",!0),B.elementSize.width>1086?(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(m.promedioPartidosWrapperType1Class)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.promedioPartidosType1)},[t.createElementVNode("p",{class:t.normalizeClass(e.$style.promedioPartidoType1)},o[0]||(o[0]=[t.createTextVNode("Promedio partido"),t.createElementVNode("br",null,null,-1),t.createTextVNode("Torneo anterior")]),2)],2)],2)):t.createCommentVNode("",!0),B.elementSize.width>770?(t.openBlock(),t.createElementBlock("div",{key:2,class:t.normalizeClass(m.partidosJugadosWrapperType1Class)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.partidosJugadosType1)},[t.createElementVNode("p",{class:t.normalizeClass(e.$style.promedioPartidoType1)},o[1]||(o[1]=[t.createTextVNode("Partidos "),t.createElementVNode("br",null,null,-1),t.createTextVNode("Jugados")]),2)],2)],2)):t.createCommentVNode("",!0)],2),t.createElementVNode("div",{class:t.normalizeClass(m.containesOptionsTitlesType1Class)},[B.elementSize.width>680?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(m.monType1Class)},"total",2)):t.createCommentVNode("",!0),t.createElementVNode("div",{class:t.normalizeClass(m.videosType1Class)},"Videos",2)],2)],2)],2)):t.createCommentVNode("",!0),s.type==2?(t.openBlock(),t.createElementBlock("div",{key:2,class:t.normalizeClass(m.headTitlesClassAvanced),id:"container-titles"},[t.createElementVNode("div",{class:t.normalizeClass(m.containerLeftTitlesClass),id:"container-left-titles"},[t.createElementVNode("div",{class:t.normalizeClass(m.positionClass)},"Pos.",2),t.createElementVNode("div",{class:t.normalizeClass(m.playerClass)},"Jugador",2)],2),t.createElementVNode("div",{class:t.normalizeClass(m.containerRightTitlesClassAdvanced),id:"container-right-titles"},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.block01Titles)},[B.elementSize.width>540?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(e.$style.teamTitle)},"Equipo",2)):t.createCommentVNode("",!0),B.elementSize.width>730?(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(e.$style.positionTitle)},"Posición",2)):t.createCommentVNode("",!0),B.elementSize.width>960?(t.openBlock(),t.createElementBlock("div",{key:2,class:t.normalizeClass(e.$style.ageTitle)},"edad",2)):t.createCommentVNode("",!0),B.elementSize.width>960?(t.openBlock(),t.createElementBlock("div",{key:3,class:t.normalizeClass(e.$style.ageTitle)},"País",2)):t.createCommentVNode("",!0),B.elementSize.width>540?(t.openBlock(),t.createElementBlock("div",{key:4,class:t.normalizeClass(e.$style.playedGamesTitle)},[t.createElementVNode("p",{class:t.normalizeClass(e.$style.partidos)},"Partidos",2),t.createElementVNode("p",{class:t.normalizeClass(e.$style.partidos)},"Jugados",2)],2)):t.createCommentVNode("",!0),B.elementSize.width>635?(t.openBlock(),t.createElementBlock("div",{key:5,class:t.normalizeClass(e.$style.playedMinutesTitle)},[t.createElementVNode("p",{class:t.normalizeClass(e.$style.partidos)},"Minutos",2),t.createElementVNode("p",{class:t.normalizeClass(e.$style.partidos)},"Jugados",2)],2)):t.createCommentVNode("",!0),B.elementSize.width>635?(t.openBlock(),t.createElementBlock("div",{key:6,class:t.normalizeClass(e.$style.playedMinutesTitle)},[t.createElementVNode("p",{class:t.normalizeClass(e.$style.partidos)},"Liga",2)],2)):t.createCommentVNode("",!0)],2),t.createElementVNode("div",{class:t.normalizeClass(m.block02TitlesClass)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.containesOptionsTitles)},[t.createElementVNode("div",{class:t.normalizeClass(m.mon1ScoutingClass)},"Videos",2)],2)],2)],2)],2)):t.createCommentVNode("",!0)],512)}const QR=Ki(NS,[["render",jct],["__cssModules",{$style:Rct}]]),UYt="",FS={props:{type:{type:Number,default:0},value:{type:Boolean,default:!1},textValue:String,icon:{type:String,default:"https://golstatsimages.blob.core.windows.net/images-library/arrow-btn.png"},iconPosition:{type:String,default:"left"},iconSize:String,mini:{type:Boolean,default:!1},fontColor:{type:String,default:"#FFFFFF"},textDecoration:String,fontSize:{type:String,default:"16px"},fontSizeStat:{type:String,default:"16px"},fontStyle:String,fontFamily:{type:String,default:"Poppins-Regular"},height:{type:String,default:"fit-content"},width:{type:String,default:"fit-content"},buttonMaxWidth:{type:String,default:"auto"},borderRadius:{type:String,default:"0px"},borderType:{type:String,default:"solid"},borderWidth:{type:Number,default:0},borderWidthBtn:{type:String,default:"2px"},borderColor:String,backgroundColor:{type:String,default:"none"},activeBackgroundColor:{type:String,default:"#000000"},activeBorderWidth:{type:Number,default:2},activeBorderType:{type:String,default:"solid"},activeBorderColor:{type:String,default:"#cbee6b"},activeColorText:{type:String,default:"#FFFFFF"},cursorType:{type:String,default:"default"},typeOnOff:{type:Boolean,default:!1},textCategory:String,textStat:String,marginLeftStat:{type:String,default:"15%"}},watch:{value:{deep:!0,immediate:!0,handler(e){this.status=e}}},data(){return{status:!1}},computed:{customStyle(){return{height:this.height,width:this.width,maxWidth:this.buttonMaxWidth,backgroundColor:this.backgroundColor,borderRadius:this.borderRadius,border:`${this.borderType} ${this.borderWidth}px ${this.borderColor}`,color:this.fontColor,textDecoration:this.textDecoration,cursor:this.cursorType,fontSize:this.fontSize,fontStyle:this.fontStyle,fontFamily:`${this.fontFamily} !important`}},customActive(){return{backgroundColor:this.activeBackgroundColor,color:this.activeColorText,border:`${this.activeBorderType} ${this.activeBorderWidth}px ${this.activeBorderColor}`}}},methods:{btnClick(e){this.$emit("click",e),this.typeOnOff&&(this.status=!this.status,this.$emit("status",this.status))}}},eV=()=>{t.useCssVars(e=>({"3ae4172d":e.height,f5b071f0:e.borderWidthBtn,f8d8d6e8:e.borderType,"242a575e":e.borderColor,"2f813538":e.borderRadius,"9fb26200":e.width,"374850e2":e.backgroundColor,"1c058eb6":e.cursorType,"5cacbd76":e.fontSize,"38efeedc":e.fontStyle,"6464a0ce":e.fontFamily,"26623acf":e.marginLeftStat,d6a6e62c:e.fontSizeStat}))},tV=FS.setup;FS.setup=tV?(e,o)=>(eV(),tV(e,o)):eV;const Uct=["src"],Gct={key:1,class:"text"},Hct=["src"],Zct={class:"stats"},Wct={class:"numstats"},qct={class:"leyend"};function Jct(e,o,s,B,U,m){return t.openBlock(),t.createElementBlock("div",null,[s.type==0?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(["button",U.status&&s.typeOnOff&&"button-active"]),style:t.normalizeStyle([m.customStyle,U.status&&s.typeOnOff&&m.customActive]),onClick:o[0]||(o[0]=(...y)=>m.btnClick&&m.btnClick(...y))},[s.icon&&s.iconPosition.toLowerCase()==="left"?(t.openBlock(),t.createElementBlock("img",{key:0,class:t.normalizeClass(s.mini?"icon-txt":"icon"),style:t.normalizeStyle({width:s.iconSize}),src:s.icon},null,14,Uct)):t.createCommentVNode("",!0),s.textValue?(t.openBlock(),t.createElementBlock("div",Gct,t.toDisplayString(s.textValue),1)):t.createCommentVNode("",!0),s.icon&&s.iconPosition.toLowerCase()==="right"?(t.openBlock(),t.createElementBlock("img",{key:2,class:"icon",style:t.normalizeStyle({width:s.iconSize}),src:s.icon},null,12,Hct)):t.createCommentVNode("",!0)],6)):t.createCommentVNode("",!0),s.type==1?(t.openBlock(),t.createElementBlock("div",{key:1,class:"button-target",onClick:o[1]||(o[1]=(...y)=>m.btnClick&&m.btnClick(...y))},[t.createElementVNode("div",Zct,[o[2]||(o[2]=t.createElementVNode("img",{class:"iconstats",src:"https://golstatsimages.blob.core.windows.net/todoelfut/playdes.png"},null,-1)),t.createElementVNode("div",Wct,t.toDisplayString(s.textStat),1)]),t.createElementVNode("div",qct,t.toDisplayString(s.textCategory),1)])):t.createCommentVNode("",!0)])}const aV=Ki(FS,[["render",Jct],["__scopeId","data-v-cbde52b5"]]),Yct={rotate:"_rotate_z2pk6_3",positionContainer:"_positionContainer_z2pk6_50",positionContainer620:"_positionContainer620_z2pk6_57",rowwPlayerGames:"_rowwPlayerGames_z2pk6_64",rowwPlayer960Games:"_rowwPlayer960Games_z2pk6_80",rowwPlayer420Games:"_rowwPlayer420Games_z2pk6_95",rowwPlayer460Games:"_rowwPlayer460Games_z2pk6_111",containerLeftGames:"_containerLeftGames_z2pk6_128",containerLeft420Games:"_containerLeft420Games_z2pk6_136",containerLeft620Games:"_containerLeft620Games_z2pk6_144",iconFavoritesType1:"_iconFavoritesType1_z2pk6_151",iconFavoritesType1320:"_iconFavoritesType1320_z2pk6_159",iconFavorites:"_iconFavorites_z2pk6_151",iconFavorites420:"_iconFavorites420_z2pk6_175",playerContainerGames:"_playerContainerGames_z2pk6_183",playerContainer420Games:"_playerContainer420Games_z2pk6_195",playerContainer460Games:"_playerContainer460Games_z2pk6_207",playerContainerType1Games:"_playerContainerType1Games_z2pk6_219",playerContainerType1320Games:"_playerContainerType1320Games_z2pk6_229",playerContainerType1460Games:"_playerContainerType1460Games_z2pk6_239",imgPlayerIcon:"_imgPlayerIcon_z2pk6_249",imgPlayerIcon460:"_imgPlayerIcon460_z2pk6_259",imgPlayerIcon420:"_imgPlayerIcon420_z2pk6_269",manchesterUnitedGames:"_manchesterUnitedGames_z2pk6_279",manchesterUnited360Games:"_manchesterUnited360Games_z2pk6_290",manchesterUnited420Games:"_manchesterUnited420Games_z2pk6_301",manchesterUnited460Games:"_manchesterUnited460Games_z2pk6_312",containerRightGames:"_containerRightGames_z2pk6_323",containerRight960Games:"_containerRight960Games_z2pk6_332",containerRight420Games:"_containerRight420Games_z2pk6_342",numberOfVideos:"_numberOfVideos_z2pk6_353",numberOfVideos620:"_numberOfVideos620_z2pk6_359",block02Games:"_block02Games_z2pk6_365",block02960Games:"_block02960Games_z2pk6_375",block02620Games:"_block02620Games_z2pk6_384",block02420Games:"_block02420Games_z2pk6_391",verVideos:"_verVideos_z2pk6_399",verVideos620:"_verVideos620_z2pk6_405",numberPosition:"_numberPosition_z2pk6_408",shapeIcon:"_shapeIcon_z2pk6_414",chivasIcon:"_chivasIcon_z2pk6_419",imgTeamIcon:"_imgTeamIcon_z2pk6_430",teamName:"_teamName_z2pk6_435",nameTeamGames:"_nameTeamGames_z2pk6_441",dfC:"_dfC_z2pk6_450",position:"_position_z2pk6_50",age:"_age_z2pk6_460",manchesterUnitedIcon:"_manchesterUnitedIcon_z2pk6_468",country:"_country_z2pk6_475",playedGames:"_playedGames_z2pk6_482",playedMinutes:"_playedMinutes_z2pk6_489",block01:"_block01_z2pk6_496",leagueName:"_leagueName_z2pk6_503",roleCharacterIcon:"_roleCharacterIcon_z2pk6_509",btnVideosGames:"_btnVideosGames_z2pk6_517",containerBtnVideosGames:"_containerBtnVideosGames_z2pk6_532",containerBtnVideos620Games:"_containerBtnVideos620Games_z2pk6_542",containesOptions:"_containesOptions_z2pk6_551",arrowExpandIcon:"_arrowExpandIcon_z2pk6_558",rowTeam:"_rowTeam_z2pk6_567",rowTeam420:"_rowTeam420_z2pk6_585",rowTeam320:"_rowTeam320_z2pk6_603",rowTeam460:"_rowTeam460_z2pk6_622",rowTeam350:"_rowTeam350_z2pk6_641",containerLeftType1:"_containerLeftType1_z2pk6_659",containerLeftType1680:"_containerLeftType1680_z2pk6_665",containerLeftType1320:"_containerLeftType1320_z2pk6_672",containerLeftType1350:"_containerLeftType1350_z2pk6_680",positionContainertype1:"_positionContainertype1_z2pk6_687",positionContainertype1380:"_positionContainertype1380_z2pk6_695",positionContainertype1680:"_positionContainertype1680_z2pk6_703",positionContainertype1420:"_positionContainertype1420_z2pk6_711",manchesterUnitedType1:"_manchesterUnitedType1_z2pk6_719",manchesterUnitedType1460:"_manchesterUnitedType1460_z2pk6_725",manchesterUnitedType1320:"_manchesterUnitedType1320_z2pk6_732",containerRightType1Games:"_containerRightType1Games_z2pk6_739",containerRightType1420Games:"_containerRightType1420Games_z2pk6_750",containerRightType1320Games:"_containerRightType1320Games_z2pk6_761",teamNameWrapperType1:"_teamNameWrapperType1_z2pk6_772",teamNameWrapperType1960:"_teamNameWrapperType1960_z2pk6_779",teamNameWrapperType11086:"_teamNameWrapperType11086_z2pk6_786",ageWrapperType1:"_ageWrapperType1_z2pk6_793",ageWrapperType1680:"_ageWrapperType1680_z2pk6_800",ageWrapperType11086:"_ageWrapperType11086_z2pk6_808",ageType1:"_ageType1_z2pk6_816",ageType1960:"_ageType1960_z2pk6_824",playedGamesWrapperType1:"_playedGamesWrapperType1_z2pk6_827",playedGamesWrapperType1680:"_playedGamesWrapperType1680_z2pk6_834",playedGamesWrapperType1960:"_playedGamesWrapperType1960_z2pk6_837",playedGamesType1:"_playedGamesType1_z2pk6_840",playedGamesType1540:"_playedGamesType1540_z2pk6_847",playedGamesType1960:"_playedGamesType1960_z2pk6_851",playedGamesType11086:"_playedGamesType11086_z2pk6_854",playedMinutesWrapperType1:"_playedMinutesWrapperType1_z2pk6_857",playedMinutesWrapperType11086:"_playedMinutesWrapperType11086_z2pk6_864",playedMinutesType1:"_playedMinutesType1_z2pk6_871",playedMinutesType1680:"_playedMinutesType1680_z2pk6_878",block02Type1Games:"_block02Type1Games_z2pk6_881",block02Type1680Games:"_block02Type1680Games_z2pk6_889",block02Type1320Games:"_block02Type1320Games_z2pk6_897",block02Type1350Games:"_block02Type1350Games_z2pk6_906",leagueNameWrapperType1:"_leagueNameWrapperType1_z2pk6_914",leagueNameWrapperType1680:"_leagueNameWrapperType1680_z2pk6_922",leagueNameWrapperType1960:"_leagueNameWrapperType1960_z2pk6_925",leagueNameType1:"_leagueNameType1_z2pk6_933",leagueNameType1960:"_leagueNameType1960_z2pk6_943",numberOfVideosType1:"_numberOfVideosType1_z2pk6_953",numberOfVideosType1680:"_numberOfVideosType1680_z2pk6_960",numberOfVideosType11232:"_numberOfVideosType11232_z2pk6_967",vectorIconType1:"_vectorIconType1_z2pk6_974",block01TitlesType1:"_block01TitlesType1_z2pk6_991",numberPositionType1:"_numberPositionType1_z2pk6_998",shapeIconType1:"_shapeIconType1_z2pk6_1004",tijuanaIconType1:"_tijuanaIconType1_z2pk6_1010",tijuanaWrapperType1:"_tijuanaWrapperType1_z2pk6_1016",tijuanaWrapperType1NoBg:"_tijuanaWrapperType1NoBg_z2pk6_1027",teamNameType1:"_teamNameType1_z2pk6_1035",roleCharacterIconType1:"_roleCharacterIconType1_z2pk6_1042",verVideosType1:"_verVideosType1_z2pk6_1049",btnVideosType1Games:"_btnVideosType1Games_z2pk6_1055",containerBtnVideosType1Games:"_containerBtnVideosType1Games_z2pk6_1070",containesOptionsType1Games:"_containesOptionsType1Games_z2pk6_1081",arrowExpandIconType1:"_arrowExpandIconType1_z2pk6_1089",templateTablaProductividadType1:"_templateTablaProductividadType1_z2pk6_1095",verVideosType11232:"_verVideosType11232_z2pk6_1107",templateTablaProductividadType1320:"_templateTablaProductividadType1320_z2pk6_1111",verVideosType1680:"_verVideosType1680_z2pk6_1115"},RS={components:{GSCButton:aV},computed:{manchesterUnitedType1Class(){const e=this.elementSize.width;return e<=320?this.$style.manchesterUnitedType1320:e<=460?this.$style.manchesterUnitedType1460:this.$style.manchesterUnitedType1},containerRightType1Class(){const e=this.elementSize.width;return e<=320?this.$style.containerRightType1320Games:e<=420?this.$style.containerRightType1420Games:this.$style.containerRightType1Games},teamNameWrapperType1Class(){const e=this.elementSize.width;return e<=960?this.$style.teamNameWrapperType1960:e<=1086?this.$style.teamNameWrapperType11086:this.$style.teamNameWrapperType1},ageWrapperType1Class(){const e=this.elementSize.width;return e<=680?this.$style.ageWrapperType1680:e<=1086?this.$style.ageWrapperType11086:this.$style.ageWrapperType1},ageType1Class(){return this.elementSize.width<=960?this.$style.ageType1960:this.$style.ageType1},playedGamesWrapperType1Class(){const e=this.elementSize.width;return e<=680?this.$style.playedGamesWrapperType1680:e<=960?this.$style.playedGamesWrapperType1960:this.$style.playedGamesWrapperType1},playedGamesType1Class(){const e=this.elementSize.width;return e<=540?this.$style.playedGamesType1540:e<=960?this.$style.playedGamesType1960:e<=1086?this.$style.playedGamesType11086:this.$style.playedGamesType1},playedMinutesWrapperType1Class(){return this.elementSize.width<=1086?this.$style.playedMinutesWrapperType11086:this.$style.playedMinutesWrapperType1},playedMinutesType1Class(){return this.elementSize.width<=680?this.$style.playedMinutesType1680:this.$style.playedMinutesType1},block02Type1Class(){const e=this.elementSize.width;return e<=320?this.$style.block02Type1320Games:e<=350?this.$style.block02Type1350Games:e<=680?this.$style.block02Type1680Games:this.$style.block02Type1Games},leagueNameWrapperType1Class(){const e=this.elementSize.width;return e<=680?this.$style.leagueNameWrapperType1680:e<=960?this.$style.leagueNameWrapperType1960:this.$style.leagueNameWrapperType1},leagueNameType1Class(){return this.elementSize.width<=960?this.$style.leagueNameType1960:this.$style.leagueNameType1},numberOfVideosType1Class(){const e=this.elementSize.width;return e<=680?this.$style.numberOfVideosType1680:e<=1232?this.$style.numberOfVideosType11232:this.$style.numberOfVideosType1},containerLeftType1Class(){const e=this.elementSize.width;return e<=320?this.$style.containerLeftType1320:e<=350?this.$style.containerLeftType1350:e<=680?this.$style.containerLeftType1680:this.$style.containerLeftType1},positionContainertype1Class(){const e=this.elementSize.width;return e<=380?this.$style.positionContainertype1380:e<=420?this.$style.positionContainertype1420:e<=680?this.$style.positionContainertype1680:this.$style.positionContainertype1},rowTeamClass(){const e=this.elementSize.width;return e<=320?this.$style.rowTeam320:e<=350?this.$style.rowTeam350:e<=420?this.$style.rowTeam420:e<=460?this.$style.rowTeam460:this.$style.rowTeam},containerBtnVideosClass(){return this.$style.containerBtnVideosGames},numberOfVideosClass(){return this.elementSize.width<=620?this.$style.numberOfVideos620:this.$style.numberOfVideos},block02Class(){const e=this.elementSize.width;return e<=420?this.$style.block02420Games:e<=620?this.$style.block02620Games:e<=960?this.$style.block02960Games:this.$style.block02Games},imgPlayerIconClass(){const e=this.elementSize.width;return e<=420?this.$style.imgPlayerIcon420:e<=460?this.$style.imgPlayerIcon460:this.$style.imgPlayerIcon},manchesterUnitedClass(){const e=this.elementSize.width;return e<=360?this.$style.manchesterUnited360Games:e<=420?this.$style.manchesterUnited420Games:e<=460?this.$style.manchesterUnited460Games:this.$style.manchesterUnitedGames},containerRightClass(){const e=this.elementSize.width;return e<=420?this.$style.containerRight420Games:e<=960?this.$style.containerRight960Games:this.$style.containerRightGames},playerContainerType1Class(){const e=this.elementSize.width;return e<=320?this.$style.playerContainerType1320Games:e<=460?this.$style.playerContainerType1460Games:this.$style.playerContainerType1Games},playerContainerClass(){const e=this.elementSize.width;return e<=420?this.$style.playerContainer420Games:e<=460?this.$style.playerContainer460Games:this.$style.playerContainerGames},iconFavoritesClass(){return this.elementSize.width<=420?this.$style.iconFavorites420:this.$style.iconFavorites},iconFavoritesType1Class(){return this.elementSize.width<=320?this.$style.iconFavoritesType1320:this.$style.iconFavoritesType1},containerLeftClass(){const e=this.elementSize.width;return e<=420?this.$style.containerLeft420Games:e<=620?this.$style.containerLeft620Games:this.$style.containerLeftGames},positionContainerClass(){return this.elementSize.width<=620?this.$style.positionContainer620:this.$style.positionContainer},rowwPlayerClass(){const e=this.elementSize.width;return e<=420?this.$style.rowwPlayer420Games:e<=460?this.$style.rowwPlayer460Games:e<=960?this.$style.rowwPlayer960Games:this.$style.rowwPlayerGames}},setup(){const e=t.ref("myDivRef2"),{elementSize:o}=jb(e);return{myDivRef2:e,elementSize:o}},props:{typeData:{type:Number,default:1},canPlayVideos:{type:Boolean,default:!1},teamWidget:{type:Number,default:0},type:{type:Number,default:0},typeView:{type:Number,default:0},isExpanded:{type:Boolean,default:!1},background:{type:String,default:"#172531"},height:{type:String,default:"35px"},fontColor:{type:String,default:"#F4F4F4"},fontSize:{type:String,default:"12px"},fontFamily:{type:String,default:"Poppins-Regular"},data:{type:Object,default:()=>{}},game:{type:Object,default:()=>{}},colorArrow:{type:String,default:"#D9D9D9"},buttonTextValue:{type:String,default:"Ver videos"},iconVideos:{type:String,default:"https://golstatsimages.blob.core.windows.net/images-library/arrow-btn.png"},iconSize:{type:String,default:"13px"},iconSizeMini:{type:String,default:"13px"},iconPosition:{type:String,default:"left"},buttonWidth:{type:String,default:"93px"},buttonWidthMini:{type:String,default:"24px"},buttonHeightMini:{type:String,default:"24px"},buttonHeight:{type:String,default:"30px"},buttonRadius:{type:String,default:"30px"},buttonBorderWidth:{type:Number,default:1},buttonBackground:{type:String,default:"#ffffff1a"},buttonfontFamily:{type:String,default:"Poppins-Regular"},buttonBorderColor:{type:String,default:"#55636e"},buttonFontSize:{type:String,default:"10px"}},data:()=>({expand:!1}),methods:{clickExpand(e){this.$emit("expand",{expand:!this.isExpanded,id:e})},emitEventMedia(e){this.$emit("mediadata",e)}}},rV=()=>{t.useCssVars(e=>({d0a618bc:e.height,ba5dfbae:e.background,aa9f5eaa:e.fontSize,ab0a580e:e.fontColor,ad8d6ce4:e.fontFamily}))},nV=RS.setup;RS.setup=nV?(e,o)=>(rV(),nV(e,o)):rV;const Xct={ref:"myDivRef2",style:{"border-left":"rgba(13,29,41,0.7) 1px solid","border-right":"rgba(13,29,41,0.7) 1px solid"}},$ct=["src"],Kct=["src"],Qct=["src"],eut=["src"],tut=["fill"],aut=["fill"],rut=["src"],nut=["src"],iut=["fill"],out=["fill"],sut=["src"],lut=["src"],cut=["src"],uut=["src"],dut=["fill"],hut=["fill"];function put(e,o,s,B,U,m){const y=t.resolveComponent("GSCButton");return t.openBlock(),t.createElementBlock("div",Xct,[s.type==0?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(m.rowwPlayerClass),id:"container-row-player"},[t.createElementVNode("div",{class:t.normalizeClass(m.containerLeftClass),id:"container-left"},[t.createElementVNode("div",{class:t.normalizeClass(m.positionContainerClass)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.numberPosition)},t.toDisplayString(s.data.position),3)],2),t.createElementVNode("div",{class:t.normalizeClass(m.playerContainerClass)},[t.createElementVNode("img",{class:t.normalizeClass(m.imgPlayerIconClass),src:s.data.player_photo},null,10,$ct),t.createElementVNode("div",{class:t.normalizeClass(m.manchesterUnitedClass)},[B.elementSize.width<=420?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createTextVNode(t.toDisplayString(s.data.player_short),1)],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createTextVNode(t.toDisplayString(s.data.player_name),1)],64))],2),B.elementSize.width<=420?(t.openBlock(),t.createElementBlock("img",{key:0,class:t.normalizeClass(e.$style.chivasIcon),alt:"",src:s.data.team_logo},null,10,Kct)):t.createCommentVNode("",!0)],2)],2),t.createElementVNode("div",{class:t.normalizeClass(m.containerRightClass),id:"container-right"},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.block01)},[B.elementSize.width>420?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(e.$style.nameTeamGames)},[t.createElementVNode("img",{class:t.normalizeClass(e.$style.imgTeamIcon),alt:"",src:s.data.team_logo},null,10,Qct),B.elementSize.width>540?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(e.$style.teamName)},t.toDisplayString(s.data.team_abrev),3)):t.createCommentVNode("",!0)],2)):t.createCommentVNode("",!0),B.elementSize.width>730?(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(e.$style.position)},[t.createElementVNode("span",{class:t.normalizeClass(e.$style.dfC)},t.toDisplayString(s.data.player_position),3)],2)):t.createCommentVNode("",!0),B.elementSize.width>960?(t.openBlock(),t.createElementBlock("div",{key:2,class:t.normalizeClass(e.$style.age)},t.toDisplayString(s.data.player_age),3)):t.createCommentVNode("",!0),B.elementSize.width>960?(t.openBlock(),t.createElementBlock("div",{key:3,class:t.normalizeClass(e.$style.country)},[t.createElementVNode("img",{class:t.normalizeClass(e.$style.manchesterUnitedIcon),alt:"",src:s.data.player_country_flag},null,10,eut)],2)):t.createCommentVNode("",!0),B.elementSize.width>540?(t.openBlock(),t.createElementBlock("div",{key:4,class:t.normalizeClass(e.$style.playedGames)},t.toDisplayString(s.data.player_games),3)):t.createCommentVNode("",!0),B.elementSize.width>635?(t.openBlock(),t.createElementBlock("div",{key:5,class:t.normalizeClass(e.$style.playedMinutes)},t.toDisplayString(s.data.player_min),3)):t.createCommentVNode("",!0)],2),t.createElementVNode("div",{class:t.normalizeClass(m.block02Class)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.containesOptions)},[B.elementSize.width>960?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(e.$style.leagueName)},t.toDisplayString(s.data.total),3)):t.createCommentVNode("",!0),t.createElementVNode("div",{class:t.normalizeClass(m.containerBtnVideosClass)},[s.canPlayVideos||s.game.awayTeam.team_id==s.teamWidget&&s.typeData!=1?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[B.elementSize.width>635?(t.openBlock(),t.createBlock(y,{key:0,icon:s.iconVideos,"icon-size":s.iconSize,"icon-position":s.iconPosition,width:s.buttonWidth,height:s.buttonHeight,"border-radius":s.buttonRadius,"border-width":s.buttonBorderWidth,"background-color":s.buttonBackground,"font-family":s.buttonfontFamily,"border-color":s.buttonBorderColor,"text-value":s.buttonTextValue,"font-size":s.buttonFontSize,onClick:o[0]||(o[0]=a=>m.emitEventMedia(s.data))},null,8,["icon","icon-size","icon-position","width","height","border-radius","border-width","background-color","font-family","border-color","text-value","font-size"])):(t.openBlock(),t.createBlock(y,{key:1,mini:!0,icon:s.iconVideos,"icon-size":s.iconSizeMini,"icon-position":s.iconPosition,width:s.buttonWidthMini,height:s.buttonHeightMini,"border-radius":s.buttonRadius,"border-width":s.buttonBorderWidth,"background-color":s.buttonBackground,"font-family":s.buttonfontFamily,"border-color":s.buttonBorderColor,"font-size":s.buttonFontSize,onClick:o[1]||(o[1]=a=>m.emitEventMedia(s.data))},null,8,["icon","icon-size","icon-position","width","height","border-radius","border-width","background-color","font-family","border-color","font-size"]))],64)):t.createCommentVNode("",!0),B.elementSize.width<=635?(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(m.numberOfVideosClass)},t.toDisplayString(s.data.total),3)):t.createCommentVNode("",!0)],2)],2),(t.openBlock(),t.createElementBlock("svg",{class:t.normalizeClass([e.$style.arrowExpandIcon,s.isExpanded?e.$style.rotate:""]),width:"12",height:"8",viewBox:"0 0 12 8",fill:s.colorArrow,xmlns:"http://www.w3.org/2000/svg",onClick:o[2]||(o[2]=a=>m.clickExpand(s.data.id))},[t.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M6 4.93631L10.2929 1.23496C10.6834 0.898244 11.3166 0.898244 11.7071 1.23496C12.0976 1.57167 12.0976 2.11759 11.7071 2.4543L6.70711 6.76532C6.31658 7.10203 5.68342 7.10203 5.29289 6.76532L0.292893 2.4543C-0.0976311 2.11759 -0.0976311 1.57167 0.292893 1.23496C0.683418 0.898244 1.31658 0.898244 1.70711 1.23496L6 4.93631Z",fill:s.colorArrow},null,8,aut)],10,tut))],2)],2)],2)):t.createCommentVNode("",!0),s.type==1?(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(m.rowTeamClass),style:t.normalizeStyle(B.elementSize.width>540?"border-bottom: 1px solid rgba(255, 255, 255, 0.1)":""),id:"container-row-player"},[t.createElementVNode("div",{class:t.normalizeClass(m.containerLeftType1Class),id:"container-left"},[t.createElementVNode("div",{class:t.normalizeClass(m.positionContainertype1Class)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.numberPositionType1)},t.toDisplayString(s.data.position),3),t.createElementVNode("div",{class:t.normalizeClass(m.iconFavoritesType1Class)},[t.createElementVNode("img",{class:t.normalizeClass(e.$style.shapeIconType1),alt:"",src:s.data.team_logo},null,10,rut)],2)],2),t.createElementVNode("div",{class:t.normalizeClass(m.playerContainerType1Class)},[t.createElementVNode("div",{class:t.normalizeClass(s.typeView==0?e.$style.tijuanaWrapperType1:e.$style.tijuanaWrapperType1NoBg)},[t.createElementVNode("img",{class:t.normalizeClass(e.$style.tijuanaIconType1),alt:"",src:s.data.team_logo},null,10,nut)],2),t.createElementVNode("div",{class:t.normalizeClass(m.manchesterUnitedType1Class)},t.toDisplayString(s.data.team_abrev),3)],2)],2),t.createElementVNode("div",{class:t.normalizeClass(m.containerRightType1Class),id:"container-right"},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.block01TitlesType1)},[B.elementSize.width>540?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(m.teamNameWrapperType1Class)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.teamNameType1)},[t.createTextVNode(" C/"+t.toDisplayString(s.data.frequency)+" ",1),s.data.category!=2?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createTextVNode("min")],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createTextVNode("segs")],64))],2)],2)):t.createCommentVNode("",!0),B.elementSize.width>960?(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(m.ageWrapperType1Class)},[t.createElementVNode("div",{class:t.normalizeClass(m.ageType1Class)},t.toDisplayString(s.data.promthistournament),3)],2)):t.createCommentVNode("",!0),B.elementSize.width>1086?(t.openBlock(),t.createElementBlock("div",{key:2,class:t.normalizeClass(m.playedGamesWrapperType1Class)},[t.createElementVNode("div",{class:t.normalizeClass(m.playedGamesType1Class)},t.toDisplayString(s.data.promlasttournament),3)],2)):t.createCommentVNode("",!0),B.elementSize.width>770?(t.openBlock(),t.createElementBlock("div",{key:3,class:t.normalizeClass(m.playedMinutesWrapperType1Class)},[t.createElementVNode("div",{class:t.normalizeClass(m.playedMinutesType1Class)},t.toDisplayString(s.data.team_games),3)],2)):t.createCommentVNode("",!0)],2),t.createElementVNode("div",{class:t.normalizeClass(m.block02Type1Class)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.containesOptionsType1Games)},[t.createElementVNode("div",{class:t.normalizeClass(m.leagueNameWrapperType1Class)},[t.createElementVNode("div",{class:t.normalizeClass(m.leagueNameType1Class)},t.toDisplayString(s.data.total),3)],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.containerBtnVideosType1Games)},[B.elementSize.width>679&&s.canPlayVideos?(t.openBlock(),t.createBlock(y,{key:0,icon:s.iconVideos,"icon-size":s.iconSize,"icon-position":s.iconPosition,width:s.buttonWidth,height:s.buttonHeight,"border-radius":s.buttonRadius,"border-width":s.buttonBorderWidth,"background-color":s.buttonBackground,"font-family":s.buttonfontFamily,"border-color":s.buttonBorderColor,"text-value":s.buttonTextValue,"font-size":s.buttonFontSize,onClick:o[3]||(o[3]=a=>m.emitEventMedia(s.data))},null,8,["icon","icon-size","icon-position","width","height","border-radius","border-width","background-color","font-family","border-color","text-value","font-size"])):(t.openBlock(),t.createBlock(y,{key:1,mini:!0,icon:s.iconVideos,"icon-size":s.iconSizeMini,"icon-position":s.iconPosition,width:s.buttonWidthMini,height:s.buttonHeightMini,"border-radius":s.buttonRadius,"border-width":s.buttonBorderWidth,"background-color":s.buttonBackground,"font-family":s.buttonfontFamily,"border-color":s.buttonBorderColor,"font-size":s.buttonFontSize,onClick:o[4]||(o[4]=a=>m.emitEventMedia(s.data))},null,8,["icon","icon-size","icon-position","width","height","border-radius","border-width","background-color","font-family","border-color","font-size"])),t.createElementVNode("div",{class:t.normalizeClass(m.numberOfVideosType1Class)},t.toDisplayString(s.data.total),3)],2)],2),(t.openBlock(),t.createElementBlock("svg",{class:t.normalizeClass([e.$style.arrowExpandIcon,s.isExpanded?e.$style.rotate:""]),width:"12",height:"8",viewBox:"0 0 12 8",fill:s.colorArrow,xmlns:"http://www.w3.org/2000/svg",onClick:o[5]||(o[5]=a=>m.clickExpand(s.data.id))},[t.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M6 4.93631L10.2929 1.23496C10.6834 0.898244 11.3166 0.898244 11.7071 1.23496C12.0976 1.57167 12.0976 2.11759 11.7071 2.4543L6.70711 6.76532C6.31658 7.10203 5.68342 7.10203 5.29289 6.76532L0.292893 2.4543C-0.0976311 2.11759 -0.0976311 1.57167 0.292893 1.23496C0.683418 0.898244 1.31658 0.898244 1.70711 1.23496L6 4.93631Z",fill:s.colorArrow},null,8,out)],10,iut))],2)],2)],6)):t.createCommentVNode("",!0),s.type==2?(t.openBlock(),t.createElementBlock("div",{key:2,class:t.normalizeClass(m.rowwPlayerClass),id:"container-row-player"},[t.createElementVNode("div",{class:t.normalizeClass(m.containerLeftClass),id:"container-left"},[t.createElementVNode("div",{class:t.normalizeClass(m.positionContainerClass)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.numberPosition)},t.toDisplayString(s.data.position),3)],2),t.createElementVNode("div",{class:t.normalizeClass(m.playerContainerClass)},[t.createElementVNode("img",{class:t.normalizeClass(m.imgPlayerIconClass),src:s.data.player_photo},null,10,sut),t.createElementVNode("div",{class:t.normalizeClass(m.manchesterUnitedClass)},t.toDisplayString(s.data.player_name),3),B.elementSize.width<=420?(t.openBlock(),t.createElementBlock("img",{key:0,class:t.normalizeClass(e.$style.chivasIcon),alt:"",src:s.data.team_logo},null,10,lut)):t.createCommentVNode("",!0)],2)],2),t.createElementVNode("div",{class:t.normalizeClass(m.containerRightClass),id:"container-right"},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.block01)},[B.elementSize.width>420?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(e.$style.nameTeamGames)},[t.createElementVNode("img",{class:t.normalizeClass(e.$style.imgTeamIcon),alt:"",src:s.data.team_logo},null,10,cut),B.elementSize.width>540?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(e.$style.teamName)},t.toDisplayString(s.data.team_abrev),3)):t.createCommentVNode("",!0)],2)):t.createCommentVNode("",!0),B.elementSize.width>730?(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(e.$style.position)},[t.createElementVNode("span",{class:t.normalizeClass(e.$style.dfC)},t.toDisplayString(s.data.player_position),3)],2)):t.createCommentVNode("",!0),B.elementSize.width>960?(t.openBlock(),t.createElementBlock("div",{key:2,class:t.normalizeClass(e.$style.age)},t.toDisplayString(s.data.player_age),3)):t.createCommentVNode("",!0),B.elementSize.width>960?(t.openBlock(),t.createElementBlock("div",{key:3,class:t.normalizeClass(e.$style.country)},[t.createElementVNode("img",{class:t.normalizeClass(e.$style.manchesterUnitedIcon),alt:"",src:s.data.player_country_flag},null,10,uut)],2)):t.createCommentVNode("",!0),B.elementSize.width>540?(t.openBlock(),t.createElementBlock("div",{key:4,class:t.normalizeClass(e.$style.playedGames)},t.toDisplayString(s.data.player_games),3)):t.createCommentVNode("",!0),B.elementSize.width>635?(t.openBlock(),t.createElementBlock("div",{key:5,class:t.normalizeClass(e.$style.playedMinutes)},t.toDisplayString(s.data.player_min),3)):t.createCommentVNode("",!0),B.elementSize.width>635?(t.openBlock(),t.createElementBlock("div",{key:6,class:t.normalizeClass(e.$style.playedMinutes)},t.toDisplayString(s.data.league_name),3)):t.createCommentVNode("",!0)],2),t.createElementVNode("div",{class:t.normalizeClass(m.block02Class)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.containesOptions)},[t.createElementVNode("div",{class:t.normalizeClass(m.containerBtnVideosClass)},[s.canPlayVideos?(t.openBlock(),t.createBlock(y,{key:0,icon:s.iconVideos,"icon-size":s.iconSize,"icon-position":s.iconPosition,width:B.elementSize.width<=680?"83px":s.buttonWidth,height:s.buttonHeight,"border-radius":s.buttonRadius,"border-width":s.buttonBorderWidth,"background-color":s.buttonBackground,"font-family":s.buttonfontFamily,"border-color":s.buttonBorderColor,"text-value":s.buttonTextValue,"font-size":s.buttonFontSize,onClick:o[6]||(o[6]=a=>m.emitEventMedia(s.data)),style:t.normalizeStyle(B.elementSize.width<=680?B.elementSize.width<=420?"margin-right: 35px;":"margin-right: 0px;":"")},null,8,["icon","icon-size","icon-position","width","height","border-radius","border-width","background-color","font-family","border-color","text-value","font-size","style"])):t.createCommentVNode("",!0)],2)],2),(t.openBlock(),t.createElementBlock("svg",{class:t.normalizeClass([e.$style.arrowExpandIcon,s.isExpanded?e.$style.rotate:""]),width:"12",height:"8",viewBox:"0 0 12 8",fill:s.colorArrow,xmlns:"http://www.w3.org/2000/svg",onClick:o[7]||(o[7]=a=>m.clickExpand(s.data.id))},[t.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M6 4.93631L10.2929 1.23496C10.6834 0.898244 11.3166 0.898244 11.7071 1.23496C12.0976 1.57167 12.0976 2.11759 11.7071 2.4543L6.70711 6.76532C6.31658 7.10203 5.68342 7.10203 5.29289 6.76532L0.292893 2.4543C-0.0976311 2.11759 -0.0976311 1.57167 0.292893 1.23496C0.683418 0.898244 1.31658 0.898244 1.70711 1.23496L6 4.93631Z",fill:s.colorArrow},null,8,hut)],10,dut))],2)],2)],2)):t.createCommentVNode("",!0)],512)}const iV=Ki(RS,[["render",put],["__cssModules",{$style:Yct}]]),fut=(e,o)=>{const s=e.__vccOpts||e;for(const[B,U]of o)s[B]=U;return s},VS={props:{type:{type:Number,default:0},value:{type:Boolean,default:!1},textValue:String,icon:String,iconPosition:{type:String,default:"left"},iconSize:String,fontColor:{type:String,default:"#FFFFFF"},textDecoration:String,fontSize:{type:String,default:"16px"},fontSizeStat:{type:String,default:"16px"},fontStyle:String,fontFamily:{type:String,default:"Poppins-Regular"},height:{type:String,default:"fit-content"},width:{type:String,default:"fit-content"},borderRadius:{type:String,default:"0px"},borderType:{type:String,default:"solid"},borderWidth:{type:Number,default:0},borderWidthBtn:{type:String,default:"2px"},borderColor:String,backgroundColor:{type:String,default:"none"},activeBackgroundColor:{type:String,default:"#000000"},activeBorderWidth:{type:Number,default:2},activeBorderType:{type:String,default:"solid"},activeBorderColor:{type:String,default:"#cbee6b"},activeColorText:{type:String,default:"#FFFFFF"},cursorType:{type:String,default:"default"},typeOnOff:{type:Boolean,default:!1},textCategory:String,textStat:String,marginLeftStat:{type:String,default:"15%"}},watch:{value:{deep:!0,immediate:!0,handler(e){this.status=e}}},data(){return{status:!1}},computed:{customStyle(){return{height:this.height,width:this.width,backgroundColor:this.backgroundColor,borderRadius:this.borderRadius,border:`${this.borderType} ${this.borderWidth}px ${this.borderColor}`,color:this.fontColor,textDecoration:this.textDecoration,cursor:this.cursorType,fontSize:this.fontSize,fontStyle:this.fontStyle,fontFamily:`${this.fontFamily} !important`}},customActive(){return{backgroundColor:this.activeBackgroundColor,color:this.activeColorText,border:`${this.activeBorderType} ${this.activeBorderWidth}px ${this.activeBorderColor}`}}},methods:{btnClick(e){this.$emit("click",e),this.typeOnOff&&(this.status=!this.status,this.$emit("status",this.status))}}},oV=()=>{t.useCssVars(e=>({"9d01acb4":e.height,"14e95081":e.borderWidthBtn,"38fec285":e.borderType,34353510:e.borderColor,"20d20dc6":e.borderRadius,17130967:e.width,"4ccb7d36":e.backgroundColor,"5d1e86a2":e.cursorType,ce65d4a2:e.fontSize,fe4ac47a:e.fontStyle,f98e44dc:e.fontFamily,"93b87770":e.marginLeftStat,c7f7beba:e.fontSizeStat}))},sV=VS.setup;VS.setup=sV?(e,o)=>(oV(),sV(e,o)):oV;const mut=e=>(t.pushScopeId("data-v-f3ee6b2b"),e=e(),t.popScopeId(),e),gut=["src"],yut={key:1,class:"text"},vut=["src"],but={class:"stats"},_ut=mut(()=>t.createElementVNode("img",{class:"iconstats",src:"https://golstatsimages.blob.core.windows.net/todoelfut/playdes.png"},null,-1)),xut={class:"numstats"},wut={class:"leyend"};function kut(e,o,s,B,U,m){return t.openBlock(),t.createElementBlock("div",null,[s.type==0?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(["button",U.status&&s.typeOnOff&&"button-active"]),style:t.normalizeStyle([m.customStyle,U.status&&s.typeOnOff&&m.customActive]),onClick:o[0]||(o[0]=(...y)=>m.btnClick&&m.btnClick(...y))},[s.icon&&s.iconPosition.toLowerCase()==="left"?(t.openBlock(),t.createElementBlock("img",{key:0,class:"icon",style:t.normalizeStyle({width:s.iconSize}),src:s.icon},null,12,gut)):t.createCommentVNode("",!0),s.textValue?(t.openBlock(),t.createElementBlock("div",yut,t.toDisplayString(s.textValue),1)):t.createCommentVNode("",!0),s.icon&&s.iconPosition.toLowerCase()==="right"?(t.openBlock(),t.createElementBlock("img",{key:2,class:"icon",style:t.normalizeStyle({width:s.iconSize}),src:s.icon},null,12,vut)):t.createCommentVNode("",!0)],6)):t.createCommentVNode("",!0),s.type==1?(t.openBlock(),t.createElementBlock("div",{key:1,class:"button-target",onClick:o[1]||(o[1]=(...y)=>m.btnClick&&m.btnClick(...y))},[t.createElementVNode("div",but,[_ut,t.createElementVNode("div",xut,t.toDisplayString(s.textStat),1)]),t.createElementVNode("div",wut,t.toDisplayString(s.textCategory),1)])):t.createCommentVNode("",!0)])}const Sut=fut(VS,[["render",kut],["__scopeId","data-v-f3ee6b2b"]]),Cut=(e,o)=>{const s=e.__vccOpts||e;for(const[B,U]of o)s[B]=U;return s},jS={components:{GSCButton:Sut},props:{hiddenButtonAll:{type:Boolean,default:!1},teamId:{type:Number,default:0},height:{type:String,default:"71px"},backgroundColor:{type:String,default:"#0d1d29"},containBorderType:{type:String,default:"solid"},containBorderWidth:{type:Number,default:0},containBorderColor:{type:String,default:""},componentontainBorderRadius:{type:String,default:"0px"},teamBorderType:{type:String,default:"solid"},teamBorderWidth:{type:Number,default:1},teamBorderColor:{type:String,default:"#566068"},teamBorderRadius:{type:String,default:"43px"},teamHeight:{type:String,default:"43px"},teamWidth:{type:String,default:"43px"},data:{type:Array,default:()=>[]}},data(){return{teamselect:this.teamId,scrollBar:!1}},watch:{teamId:{handler:function(e){this.teamselect=e},immediate:!0}},computed:{centerTextCustom(){return this.hiddenButtonAll&&!this.scrollBar?"center":"left"},marginCustom(){return this.hiddenButtonAll?"0px":"12px"},customStyleContain(){return{height:this.height,backgroundColor:this.backgroundColor,borderRadius:this.containBorderRadius,border:`${this.containBorderType} ${this.containBorderWidth}px ${this.containBorderColor}`}},customStyleTeam(){return{height:this.teamHeight,width:this.teamWidth,backgroundColor:this.backgroundColor,borderRadius:this.borderRadius,border:`${this.teamBorderType} ${this.teamBorderWidth}px ${this.teamBorderColor}`}}},methods:{checkIfElementHasScroll(){const e=this.$refs.container.querySelector("#panelteams");e.scrollWidth>e.clientWidth?this.scrollBar=!0:this.scrollBar=!1},btnTeamClick(e){this.$emit("clickTeam",e),this.teamselect=e},click(){this.$emit("clickAll",0),this.teamselect=0}},mounted(){this.checkIfElementHasScroll(),window.addEventListener("resize",this.checkIfElementHasScroll)},beforeUnmount(){window.removeEventListener("resize",this.checkIfElementHasScroll)}},lV=()=>{t.useCssVars(e=>({dd2e645c:e.centerTextCustom,"57c1e244":e.marginCustom}))},cV=jS.setup;jS.setup=cV?(e,o)=>(lV(),cV(e,o)):lV;const Tut={id:"panelteams",class:"gsc-filterperteam__panel-teams",ref:"panel"},Aut={class:"gsc-filterperteam__panel-teams__cont-teams"},Eut=["onClick"],Mut=["src","alt","title"];function Iut(e,o,s,B,U,m){const y=t.resolveComponent("GSCButton");return t.openBlock(),t.createElementBlock("div",{class:"gsc-filterperteam",ref:"container",style:t.normalizeStyle(m.customStyleContain)},[t.createElementVNode("div",Tut,[t.createElementVNode("div",Aut,[s.hiddenButtonAll?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",{key:0,style:t.normalizeStyle(m.customStyleTeam),class:t.normalizeClass(["gsc-filterperteam__panel-teams__cont-teams__button-all",this.teamselect!==0?"--disabled":""])},[t.createVNode(y,{"text-value":"Todos",width:"76px",height:"28px","font-family":"Poppins-Light","font-size":"13px","border-color":"#cbee6b","border-type":"solid","border-width":"1","background-color":"#2A3641","border-radius":"64px",onClick:m.click},null,8,["onClick"])],6)),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(s.data,(a,v)=>(t.openBlock(),t.createElementBlock("div",{key:v,style:t.normalizeStyle(m.customStyleTeam),class:t.normalizeClass([a.id==U.teamselect?"colorselect":"","gsc-filterperteam__panel-teams__cont-teams__btn-team hover-team"]),onClick:p=>m.btnTeamClick(a.id)},[t.createElementVNode("img",{src:a.logo,alt:a.name,title:a.name},null,8,Mut)],14,Eut))),128))])],512)],4)}const Put=Cut(jS,[["render",Iut],["__scopeId","data-v-b39cba3b"]]),Lut={tablePositionGames:"_tablePositionGames_16xzc_46",tablePositionWrapperGames:"_tablePositionWrapperGames_16xzc_62",imgHenrryIcon:"_imgHenrryIcon_16xzc_71",americaIcon:"_americaIcon_16xzc_79",playerPhotoGames:"_playerPhotoGames_16xzc_91",toniKroosGames:"_toniKroosGames_16xzc_100",shapeIcon:"_shapeIcon_16xzc_111",menuiconsTeams:"_menuiconsTeams_16xzc_117",component31:"_component31_16xzc_126",playerNameGames:"_playerNameGames_16xzc_137",icnPlayIcon:"_icnPlayIcon_16xzc_145",goles:"_goles_16xzc_153",americaIcon1:"_americaIcon1_16xzc_160",teamsAmerica:"_teamsAmerica_16xzc_174",containerData:"_containerData_16xzc_180",shapeIcon1:"_shapeIcon1_16xzc_188",icnExpand1:"_icnExpand1_16xzc_194",icnExpand:"_icnExpand_16xzc_194",playerDataGames:"_playerDataGames_16xzc_214",playerInfoGames:"_playerInfoGames_16xzc_225",headerTopGame:"_headerTopGame_16xzc_240",playerRow:"_playerRow_16xzc_254",groupsLeague:"_groupsLeague_16xzc_265",text:"_text_16xzc_274",btnViewFullList:"_btnViewFullList_16xzc_282",headerTopsGames:"_headerTopsGames_16xzc_299",btnVideosOptions:"_btnVideosOptions_16xzc_371",position:"_position_16xzc_548",positionWrapper:"_positionWrapper_16xzc_560",imgNecaxaIcon:"_imgNecaxaIcon_16xzc_568",teamLogo:"_teamLogo_16xzc_574",teamPhoto:"_teamPhoto_16xzc_582",name:"_name_16xzc_590",icnPlayIconType1:"_icnPlayIconType1_16xzc_598",verVideosType1:"_verVideosType1_16xzc_605",btnVideosOptionsType1:"_btnVideosOptionsType1_16xzc_611",btnVideosOptions1Games:"_btnVideosOptions1Games_16xzc_623",leftContainer:"_leftContainer_16xzc_635",shapeIconType1:"_shapeIconType1_16xzc_644",icnExpandType1:"_icnExpandType1_16xzc_649",arrowExpand:"_arrowExpand_16xzc_659",containerInfoGames:"_containerInfoGames_16xzc_667",headerTopTeam:"_headerTopTeam_16xzc_679",containerHeader:"_containerHeader_16xzc_693",goles1:"_goles1_16xzc_702",golesType1:"_golesType1_16xzc_705",golesWrapper:"_golesWrapper_16xzc_710",btnViewAll:"_btnViewAll_16xzc_719",headerTopsTeams:"_headerTopsTeams_16xzc_736",arrowExpandIcon:"_arrowExpandIcon_16xzc_853",rotate:"_rotate_16xzc_858"},US={components:{GSCButton:aV},props:{typeData:{type:Number,default:1},teamWidget:{type:Number,default:0},game:{type:Object,default:()=>{}},type:{type:Number,default:0},isExpanded:{type:Boolean,default:!1},canPlayVideos:{type:Boolean,default:!1},categoryName:{type:String,default:""},categoryId:{type:String,default:""},data:{type:Object,default:()=>{}},backgroundColor:{type:String,default:"#0d1d29"},backgroundColorHeader:{type:String,default:"#183143"},fontColorName:{type:String,default:"#F4F4F4"},fontSizeName:{type:String,default:"14px"},fontFamilyName:{type:String,default:"Poppins-Regular"},fontColorTopNum:{type:String,default:"#FFFFFF"},fontSizeTopNum:{type:String,default:"96px"},fontFamilyTopNum:{type:String,default:"Oswald-Bold"},fontColorCategory:{type:String,default:"#FFFFFF"},fontSizeCategory:{type:String,default:"12px"},fontFamilyCategory:{type:String,default:"Poppins-Regular"},opacityColorTopNum:{type:Number,default:.09},borderColorCategory:{type:String,default:"#cbee6b"},iconVideos:{type:String,default:"https://golstatsimages.blob.core.windows.net/images-library/arrow-btn.png"},iconSize:{type:String,default:"18px"},iconPosition:{type:String,default:"left"},colorArrow:{type:String,default:"#D9D9D9"},buttonWidth:{type:String,default:"fit-content"},buttonMaxWidth:{type:String,default:"180px"},buttonHeight:{type:String,default:"24px"},buttonRadius:{type:String,default:"30px"},buttonBorderWidth:{type:Number,default:1},buttonBackground:{type:String,default:"#ffffff1a"},buttonfontFamily:{type:String,default:"Poppins-Regular"},buttonBorderColor:{type:String,default:"#cbee6b"},buttonFontSize:{type:String,default:"12px"}},data:()=>({expand:!1}),methods:{viewProfile(e){this.$emit("play",e)},clickMore(e){this.$emit("more",e)},clickExpand(e){this.$emit("expand",{expand:!this.isExpanded,id:e})},clickFav(e){this.$emit("fav",e)},clickEventMedia(e){this.$emit("mediadata",e)}}},uV=()=>{t.useCssVars(e=>({"55f05f36":e.fontSizeTopNum,"19a29b59":e.fontFamilyTopNum,"6900d460":e.fontColorTopNum,c8fa9844:e.opacityColorTopNum,d4b5f3ac:e.fontColorName,"02add9f3":e.fontFamilyName,"5f361de0":e.fontSizeName,"53c60bed":e.backgroundColorHeader,"78ef2866":e.fontFamilyCategory,"4e492dfa":e.fontSizeCategory,"2777611d":e.fontColorCategory,"337e29a0":e.borderColorCategory}))},dV=US.setup;US.setup=dV?(e,o)=>(uV(),dV(e,o)):uV;const But=["src"],zut=["src"],Out=["src"],Dut=["src"],Nut=["fill"],Fut=["fill"],Rut=["src"],Vut=["fill"],jut=["fill"];function Uut(e,o,s,B,U,m){const y=t.resolveComponent("GSCButton");return t.openBlock(),t.createElementBlock("div",null,[s.type==0?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(e.$style.headerTopsGames)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.playerRow),id:"player-row"},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.headerTopGame)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.playerPhotoGames),id:"container-player-photp"},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.tablePositionWrapperGames)},[t.createElementVNode("b",{class:t.normalizeClass(e.$style.tablePositionGames)},t.toDisplayString(s.data.top),3)],2),t.createElementVNode("img",{class:t.normalizeClass(e.$style.imgHenrryIcon),alt:"",src:s.data.photo},null,10,But),t.createElementVNode("img",{class:t.normalizeClass(e.$style.americaIcon),alt:"",src:s.data.logo},null,10,zut)],2),t.createElementVNode("main",{class:t.normalizeClass(e.$style.playerInfoGames),id:"container-player-info"},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.playerNameGames)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.toniKroosGames)},t.toDisplayString(s.data.name),3)],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.playerDataGames)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.containerData)},[s.canPlayVideos||s.game.awayTeam.team_id==s.teamWidget&&s.typeData!=1?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createVNode(y,{"icon-size":s.iconSize,"icon-position":s.iconPosition,width:s.buttonWidth,"button-max-width":s.buttonMaxWidth,height:s.buttonHeight,"border-radius":s.buttonRadius,"border-width":s.buttonBorderWidth,"background-color":s.buttonBackground,"font-family":s.buttonfontFamily,"border-color":s.buttonBorderColor,"text-value":s.data.total+" "+s.categoryName.toLowerCase(),"font-size":s.buttonFontSize,onClick:o[0]||(o[0]=a=>m.clickEventMedia(s.data))},null,8,["icon-size","icon-position","width","button-max-width","height","border-radius","border-width","background-color","font-family","border-color","text-value","font-size"]),t.createElementVNode("div",{class:t.normalizeClass(e.$style.teamsAmerica)},[t.createElementVNode("img",{class:t.normalizeClass(e.$style.americaIcon1),alt:"",src:s.data.logo},null,10,Out)],2)],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createVNode(y,{icon:"","icon-size":s.iconSize,"icon-position":s.iconPosition,width:s.buttonWidth,"button-max-width":s.buttonMaxWidth,height:s.buttonHeight,"border-radius":s.buttonRadius,"border-width":s.buttonBorderWidth,"background-color":s.buttonBackground,"font-family":s.buttonfontFamily,"border-color":s.buttonBorderColor,"text-value":s.data.total+" "+s.categoryName.toLowerCase(),"font-size":s.buttonFontSize},null,8,["icon-size","icon-position","width","button-max-width","height","border-radius","border-width","background-color","font-family","border-color","text-value","font-size"]),t.createElementVNode("div",{class:t.normalizeClass(e.$style.teamsAmerica)},[t.createElementVNode("img",{class:t.normalizeClass(e.$style.americaIcon1),alt:"",src:s.data.logo},null,10,Dut)],2)],64))],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.icnExpand),onClick:o[1]||(o[1]=a=>m.clickExpand(s.data.player_id))},[(t.openBlock(),t.createElementBlock("svg",{class:t.normalizeClass([e.$style.arrowExpandIcon,s.isExpanded?e.$style.rotate:""]),width:"12",height:"8",viewBox:"0 0 12 8",fill:s.colorArrow,xmlns:"http://www.w3.org/2000/svg"},[t.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M6 4.93631L10.2929 1.23496C10.6834 0.898244 11.3166 0.898244 11.7071 1.23496C12.0976 1.57167 12.0976 2.11759 11.7071 2.4543L6.70711 6.76532C6.31658 7.10203 5.68342 7.10203 5.29289 6.76532L0.292893 2.4543C-0.0976311 2.11759 -0.0976311 1.57167 0.292893 1.23496C0.683418 0.898244 1.31658 0.898244 1.70711 1.23496L6 4.93631Z",fill:s.colorArrow},null,8,Fut)],10,Nut))],2)],2)],2)],2)],2)],2)):t.createCommentVNode("",!0),s.type==1?(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(e.$style.headerTopsTeams)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.containerHeader),id:"header-container"},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.headerTopTeam)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.teamPhoto),id:"container-team"},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.positionWrapper)},[t.createElementVNode("b",{class:t.normalizeClass(e.$style.position)},t.toDisplayString(s.data.top),3)],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.teamLogo)},[t.createElementVNode("img",{class:t.normalizeClass(e.$style.imgNecaxaIcon),alt:"",src:s.data.logo},null,10,Rut)],2)],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.containerInfoGames)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.leftContainer)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.name)},t.toDisplayString(s.data.name_team),3),t.createVNode(y,{"icon-size":s.iconSize,"icon-position":s.iconPosition,width:s.buttonWidth,"button-max-width":s.buttonMaxWidth,height:s.buttonHeight,"border-radius":s.buttonRadius,"border-width":s.buttonBorderWidth,"background-color":s.buttonBackground,"font-family":s.buttonfontFamily,"border-color":s.buttonBorderColor,"text-value":s.data.total+" "+s.categoryName.toLowerCase(),"font-size":s.buttonFontSize,onClick:o[2]||(o[2]=a=>m.clickEventMedia(s.data))},null,8,["icon-size","icon-position","width","button-max-width","height","border-radius","border-width","background-color","font-family","border-color","text-value","font-size"]),t.createElementVNode("div",{class:t.normalizeClass(e.$style.btnVideosOptions1Games)},[t.createVNode(y,{"icon-size":s.iconSize,"icon-position":s.iconPosition,width:s.buttonWidth,"button-max-width":s.buttonMaxWidth,height:s.buttonHeight,"border-radius":s.buttonRadius,"border-width":s.buttonBorderWidth,"background-color":s.buttonBackground,"font-family":s.buttonfontFamily,"border-color":s.buttonBorderColor,"text-value":s.data.total+" "+s.categoryName.toLowerCase(),"font-size":s.buttonFontSize,onClick:o[3]||(o[3]=a=>m.clickEventMedia(s.data))},null,8,["icon-size","icon-position","width","button-max-width","height","border-radius","border-width","background-color","font-family","border-color","text-value","font-size"]),t.createElementVNode("div",{class:t.normalizeClass(e.$style.verVideosType1)},t.toDisplayString(s.data.total),3)],2)],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.arrowExpand),onClick:o[4]||(o[4]=a=>m.clickExpand(s.data.player_id))},[(t.openBlock(),t.createElementBlock("svg",{class:t.normalizeClass([e.$style.arrowExpandIcon,s.isExpanded?e.$style.rotate:""]),width:"12",height:"8",viewBox:"0 0 12 8",fill:s.colorArrow,xmlns:"http://www.w3.org/2000/svg"},[t.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M6 4.93631L10.2929 1.23496C10.6834 0.898244 11.3166 0.898244 11.7071 1.23496C12.0976 1.57167 12.0976 2.11759 11.7071 2.4543L6.70711 6.76532C6.31658 7.10203 5.68342 7.10203 5.29289 6.76532L0.292893 2.4543C-0.0976311 2.11759 -0.0976311 1.57167 0.292893 1.23496C0.683418 0.898244 1.31658 0.898244 1.70711 1.23496L6 4.93631Z",fill:s.colorArrow},null,8,jut)],10,Vut))],2)],2)],2)],2)],2)):t.createCommentVNode("",!0)])}const Gut=Ki(US,[["render",Uut],["__cssModules",{$style:Lut}]]),Hut=(e,o)=>{const s=e.__vccOpts||e;for(const[B,U]of o)s[B]=U;return s},GS={props:{type:{type:Number,default:0},value:{type:Boolean,default:!1},textValue:String,icon:String,iconPosition:{type:String,default:"left"},iconSize:String,fontColor:{type:String,default:"#FFFFFF"},textDecoration:String,fontSize:{type:String,default:"16px"},fontSizeStat:{type:String,default:"16px"},fontStyle:String,fontFamily:{type:String,default:"Poppins-Regular"},height:{type:String,default:"fit-content"},width:{type:String,default:"fit-content"},borderRadius:{type:String,default:"0px"},borderType:{type:String,default:"solid"},borderWidth:{type:Number,default:0},borderWidthBtn:{type:String,default:"2px"},borderColor:String,backgroundColor:{type:String,default:"none"},activeBackgroundColor:{type:String,default:"#000000"},activeBorderWidth:{type:Number,default:2},activeBorderType:{type:String,default:"solid"},activeBorderColor:{type:String,default:"#cbee6b"},activeColorText:{type:String,default:"#FFFFFF"},cursorType:{type:String,default:"default"},typeOnOff:{type:Boolean,default:!1},textCategory:String,textStat:String,marginLeftStat:{type:String,default:"15%"}},watch:{value:{deep:!0,immediate:!0,handler(e){this.status=e}}},data(){return{status:!1}},computed:{customStyle(){return{height:this.height,width:this.width,backgroundColor:this.backgroundColor,borderRadius:this.borderRadius,border:`${this.borderType} ${this.borderWidth}px ${this.borderColor}`,color:this.fontColor,textDecoration:this.textDecoration,cursor:this.cursorType,fontSize:this.fontSize,fontStyle:this.fontStyle,fontFamily:`${this.fontFamily} !important`}},customActive(){return{backgroundColor:this.activeBackgroundColor,color:this.activeColorText,border:`${this.activeBorderType} ${this.activeBorderWidth}px ${this.activeBorderColor}`}}},methods:{btnClick(e){this.$emit("click",e),this.typeOnOff&&(this.status=!this.status,this.$emit("status",this.status))}}},hV=()=>{t.useCssVars(e=>({"9d01acb4":e.height,"14e95081":e.borderWidthBtn,"38fec285":e.borderType,34353510:e.borderColor,"20d20dc6":e.borderRadius,17130967:e.width,"4ccb7d36":e.backgroundColor,"5d1e86a2":e.cursorType,ce65d4a2:e.fontSize,fe4ac47a:e.fontStyle,f98e44dc:e.fontFamily,"93b87770":e.marginLeftStat,c7f7beba:e.fontSizeStat}))},pV=GS.setup;GS.setup=pV?(e,o)=>(hV(),pV(e,o)):hV;const Zut=e=>(t.pushScopeId("data-v-f3ee6b2b"),e=e(),t.popScopeId(),e),Wut=["src"],qut={key:1,class:"text"},Jut=["src"],Yut={class:"stats"},Xut=Zut(()=>t.createElementVNode("img",{class:"iconstats",src:"https://golstatsimages.blob.core.windows.net/todoelfut/playdes.png"},null,-1)),$ut={class:"numstats"},Kut={class:"leyend"};function Qut(e,o,s,B,U,m){return t.openBlock(),t.createElementBlock("div",null,[s.type==0?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(["button",U.status&&s.typeOnOff&&"button-active"]),style:t.normalizeStyle([m.customStyle,U.status&&s.typeOnOff&&m.customActive]),onClick:o[0]||(o[0]=(...y)=>m.btnClick&&m.btnClick(...y))},[s.icon&&s.iconPosition.toLowerCase()==="left"?(t.openBlock(),t.createElementBlock("img",{key:0,class:"icon",style:t.normalizeStyle({width:s.iconSize}),src:s.icon},null,12,Wut)):t.createCommentVNode("",!0),s.textValue?(t.openBlock(),t.createElementBlock("div",qut,t.toDisplayString(s.textValue),1)):t.createCommentVNode("",!0),s.icon&&s.iconPosition.toLowerCase()==="right"?(t.openBlock(),t.createElementBlock("img",{key:2,class:"icon",style:t.normalizeStyle({width:s.iconSize}),src:s.icon},null,12,Jut)):t.createCommentVNode("",!0)],6)):t.createCommentVNode("",!0),s.type==1?(t.openBlock(),t.createElementBlock("div",{key:1,class:"button-target",onClick:o[1]||(o[1]=(...y)=>m.btnClick&&m.btnClick(...y))},[t.createElementVNode("div",Yut,[Xut,t.createElementVNode("div",$ut,t.toDisplayString(s.textStat),1)]),t.createElementVNode("div",Kut,t.toDisplayString(s.textCategory),1)])):t.createCommentVNode("",!0)])}const edt=Hut(GS,[["render",Qut],["__scopeId","data-v-f3ee6b2b"]]),sQt="",lQt="",tdt={equipoGames:"_equipoGames_19uzf_38",atlasSeleccinGames:"_atlasSeleccinGames_19uzf_43",equipoAtlasSeleccinMexiGames:"_equipoAtlasSeleccinMexiGames_19uzf_47",aosGames:"_aosGames_19uzf_51",span12:"_span12_19uzf_55",nacionalidadMex:"_nacionalidadMex_19uzf_58",manchesterUnited:"_manchesterUnited_19uzf_61",manchesterUnited12:"_manchesterUnited12_19uzf_68",containerInfoGames:"_containerInfoGames_19uzf_78",verPerfil12:"_verPerfil12_19uzf_87",btnProfile:"_btnProfile_19uzf_96",containerButton:"_containerButton_19uzf_112",dataContainer:"_dataContainer_19uzf_119",expandedInfoPlayerGames:"_expandedInfoPlayerGames_19uzf_129",containerDataBg:"_containerDataBg_19uzf_219",containerDataSm:"_containerDataSm_19uzf_230",span:"_span_19uzf_55",manchesterUnited14:"_manchesterUnited14_19uzf_241",filter:"_filter_19uzf_246",verPerfil:"_verPerfil_19uzf_87",manchesterUnited8:"_manchesterUnited8_19uzf_267",manchesterUnitedParent1:"_manchesterUnitedParent1_19uzf_273",manchesterUnited1:"_manchesterUnited1_19uzf_68",manchesterUnitedParent:"_manchesterUnitedParent_19uzf_273",frameDiv:"_frameDiv_19uzf_295",infoExpanded:"_infoExpanded_19uzf_303",countryFlag:"_countryFlag_19uzf_456"},HS={components:{GSCButton:edt},props:{isLive:{type:Boolean,default:!1},background:{type:String,default:"#172531"},type:{type:Number,default:1},viewButton:{type:Boolean,default:!0},viewTeam:{type:Boolean,default:!0},viewAge:{type:Boolean,default:!0},viewNationality:{type:Boolean,default:!0},viewPosition:{type:Boolean,default:!0},viewGames:{type:Boolean,default:!0},viewMin:{type:Boolean,default:!0},viewGoals:{type:Boolean,default:!0},viewEffectiveness:{type:Boolean,default:!0},height:{type:String,default:"134px"},fontColor:{type:String,default:"#ffffffb3"},fontColorValue:{type:String,default:"#ffffff"},fontFamily:{type:String,default:"Poppins-Regular"},fontSize:{type:String,default:"10px"},additionalClass:{type:String,default:""},data:{type:Object,default:()=>{}}},setup(){const e=t.ref("myDivRef"),{elementSize:o}=jb(e);return{myDivRef:e,elementSize:o}},data(){return{}},computed:{},methods:{viewProfile(e){this.$emit("viewprofile",e)}}},fV=()=>{t.useCssVars(e=>({b76aa8fe:e.fontFamily,dce830b4:e.fontColor,"060add2a":e.fontColorValue,"3e87935e":e.fontSize,c43b37c8:e.background}))},mV=HS.setup;HS.setup=mV?(e,o)=>(fV(),mV(e,o)):fV;const adt={ref:"myDivRef"},rdt=["src"];function ndt(e,o,s,B,U,m){const y=t.resolveComponent("GSCButton");return t.openBlock(),t.createElementBlock("div",adt,[s.type==0?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(e.$style.expandedInfoPlayerGames)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.dataContainer),id:"data-container"},[t.createElementVNode("div",{class:t.normalizeClass([e.$style.containerInfoGames,s.additionalClass]),id:"container-info"},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnited)},[s.viewTeam?(t.openBlock(),t.createElementBlock("p",{key:0,class:t.normalizeClass(e.$style.equipoAtlasSeleccinMexiGames)},[t.createElementVNode("span",{class:t.normalizeClass(e.$style.equipoGames)},"Equipo: ",2),t.createElementVNode("span",{class:t.normalizeClass(e.$style.atlasSeleccinGames)},t.toDisplayString(s.data.teams),3)],2)):t.createCommentVNode("",!0),s.viewAge?(t.openBlock(),t.createElementBlock("p",{key:1,class:t.normalizeClass(e.$style.nacionalidadMex)},[t.createElementVNode("span",{class:t.normalizeClass(e.$style.equipoGames)},"Edad: ",2),t.createElementVNode("span",{class:t.normalizeClass(e.$style.aosGames)},t.toDisplayString(s.data.age)+" años",3),t.createElementVNode("span",{class:t.normalizeClass(e.$style.span12)}," ("+t.toDisplayString(s.data.dataofbirth)+")",3)],2)):t.createCommentVNode("",!0),s.viewNationality?(t.openBlock(),t.createElementBlock("p",{key:2,class:t.normalizeClass(e.$style.nacionalidadMex)},[t.createElementVNode("span",{class:t.normalizeClass(e.$style.span12)},"Nacionalidad: ",2),t.createElementVNode("span",{class:t.normalizeClass(e.$style.aosGames)},[t.createTextVNode(t.toDisplayString(s.data.nationality.substring(0,3).toUpperCase())+" ",1),t.createElementVNode("div",{class:t.normalizeClass(e.$style.countryFlag)},[t.createElementVNode("img",{src:s.data.countryFlag},null,8,rdt)],2)],2)],2)):t.createCommentVNode("",!0),s.viewPosition?(t.openBlock(),t.createElementBlock("p",{key:3,class:t.normalizeClass(e.$style.nacionalidadMex)},[t.createElementVNode("span",{class:t.normalizeClass(e.$style.span12)},"Posición: ",2),t.createElementVNode("span",{class:t.normalizeClass(e.$style.aosGames)},t.toDisplayString(s.data.position),3)],2)):t.createCommentVNode("",!0)],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnited12)},[s.viewGames&&!s.isLive?(t.openBlock(),t.createElementBlock("p",{key:0,class:t.normalizeClass(e.$style.nacionalidadMex)},[t.createElementVNode("span",{class:t.normalizeClass(e.$style.span12)},"partidos Jugados: ",2),t.createElementVNode("span",{class:t.normalizeClass(e.$style.aosGames)},t.toDisplayString(s.data.games),3)],2)):t.createCommentVNode("",!0),s.viewMin&&!s.isLive?(t.openBlock(),t.createElementBlock("p",{key:1,class:t.normalizeClass(e.$style.nacionalidadMex)},[t.createElementVNode("span",{class:t.normalizeClass(e.$style.span12)},"Minutos Jugados: ",2),t.createElementVNode("span",{class:t.normalizeClass(e.$style.aosGames)},t.toDisplayString(s.data.min),3)],2)):t.createCommentVNode("",!0),s.viewGoals?(t.openBlock(),t.createElementBlock("p",{key:2,class:t.normalizeClass(e.$style.nacionalidadMex)},[t.createElementVNode("span",{class:t.normalizeClass(e.$style.span12)},t.toDisplayString(s.data.category)+": ",3),t.createElementVNode("span",{class:t.normalizeClass(e.$style.aosGames)},t.toDisplayString(s.data.goals),3)],2)):t.createCommentVNode("",!0),s.viewEffectiveness?(t.openBlock(),t.createElementBlock("p",{key:3,class:t.normalizeClass(e.$style.nacionalidadMex)},[t.createElementVNode("span",{class:t.normalizeClass(e.$style.span12)},"Efectividad de pases: ",2),t.createElementVNode("span",{class:t.normalizeClass(e.$style.aosGames)},t.toDisplayString(s.data.effectiveness.toFixed(0))+"%",3)],2)):t.createCommentVNode("",!0)],2)],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.containerButton),id:"btn-container"},[s.viewButton?(t.openBlock(),t.createBlock(y,{key:0,style:t.normalizeStyle(s.additionalClass!=""&&B.elementSize.width>540?"margin-right: 50px":""),width:"88px",height:"30px","border-radius":"30px","border-width":1,"background-color":"#ffffff1a","font-family":"Poppins-Semibold","border-color":"#cbee6b","text-value":"Ver perfil","font-size":"10px",onClick:o[0]||(o[0]=a=>m.viewProfile(s.data.id))},null,8,["style"])):t.createCommentVNode("",!0)],2)],2)],2)):t.createCommentVNode("",!0),s.type==1?(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(e.$style.infoExpanded)},[t.createElementVNode("div",{class:t.normalizeClass([e.$style.containerDataBg,s.additionalClass])},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnitedParent)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnited1)},[o[2]||(o[2]=t.createElementVNode("span",null,"Posición en la tabla: ",-1)),t.createElementVNode("span",{class:t.normalizeClass(e.$style.spanGames)},t.toDisplayString(s.data.position),3)],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnited1)},[o[3]||(o[3]=t.createElementVNode("span",null,"Goles anotados: ",-1)),t.createElementVNode("span",{class:t.normalizeClass(e.$style.spanGames)},t.toDisplayString(s.data.goals),3)],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnited1)},[o[4]||(o[4]=t.createElementVNode("span",null,"Goles recibidos: ",-1)),t.createElementVNode("span",{class:t.normalizeClass(e.$style.spanGames)},t.toDisplayString(s.data.goals_received),3)],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnited1)},[o[5]||(o[5]=t.createElementVNode("span",null,"Partidos jugados:",-1)),t.createElementVNode("span",{class:t.normalizeClass(e.$style.spanGames)},t.toDisplayString(s.data.games_played),3)],2)],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnitedParent)},[s.viewEffectiveness?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(e.$style.manchesterUnited1)},[o[6]||(o[6]=t.createElementVNode("span",null,"Efectividad de pases: ",-1)),t.createElementVNode("span",{class:t.normalizeClass(e.$style.spanGames)},t.toDisplayString(s.data.effectiveness.toFixed(0))+"%",3)],2)):t.createCommentVNode("",!0),t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnited1)},[o[7]||(o[7]=t.createElementVNode("span",null,"xG: ",-1)),t.createElementVNode("span",{class:t.normalizeClass(e.$style.spanGames)},t.toDisplayString(s.data.xg),3)],2)],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnitedParent)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnited1)},[t.createElementVNode("span",null,t.toDisplayString(s.data.category)+": ",1),t.createElementVNode("span",{class:t.normalizeClass(e.$style.spanGames)},t.toDisplayString(s.data.total),3)],2),s.viewEffectiveness?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(e.$style.manchesterUnited8)},[o[8]||(o[8]=t.createElementVNode("span",null,"Efectividad de pases: ",-1)),t.createElementVNode("span",{class:t.normalizeClass(e.$style.spanGames)},t.toDisplayString(s.data.effectiveness)+"%",3)],2)):t.createCommentVNode("",!0),t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnited8)},[o[9]||(o[9]=t.createElementVNode("span",null,"xG: ",-1)),t.createElementVNode("span",{class:t.normalizeClass(e.$style.spanGames)},t.toDisplayString(s.data.xg),3)],2)],2)],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.containerDataSm)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.frameDiv)},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnited1)},[o[10]||(o[10]=t.createElementVNode("span",null,"Posición en la tabla: ",-1)),t.createElementVNode("span",{class:t.normalizeClass(e.$style.spanGames)},t.toDisplayString(s.data.position),3)],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnited1)},[o[11]||(o[11]=t.createElementVNode("span",null,"Goles anotados: ",-1)),t.createElementVNode("span",{class:t.normalizeClass(e.$style.spanGames)},t.toDisplayString(s.data.goals),3)],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnited1)},[o[12]||(o[12]=t.createElementVNode("span",null,"Goles recibidos: ",-1)),t.createElementVNode("span",{class:t.normalizeClass(e.$style.spanGames)},t.toDisplayString(s.data.goals_received),3)],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnited1)},[o[13]||(o[13]=t.createElementVNode("span",null,"Partidos jugados: ",-1)),t.createElementVNode("span",{class:t.normalizeClass(e.$style.spanGames)},t.toDisplayString(s.data.games_played),3)],2)],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnitedParent1)},[s.viewEffectiveness?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(e.$style.manchesterUnited14)},[o[14]||(o[14]=t.createElementVNode("span",null,"Efectividad de pases: ",-1)),t.createElementVNode("span",{class:t.normalizeClass(e.$style.spanGames)},t.toDisplayString(s.data.effectiveness.toFixed(0))+"%",3)],2)):t.createCommentVNode("",!0),t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnited1)},[o[15]||(o[15]=t.createElementVNode("span",null,"xG: ",-1)),t.createElementVNode("span",{class:t.normalizeClass(e.$style.spanGames)},t.toDisplayString(s.data.xg),3)],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnited1)},[t.createElementVNode("span",null,t.toDisplayString(s.data.category)+": ",1),t.createElementVNode("span",{class:t.normalizeClass(e.$style.spanGames)},t.toDisplayString(s.data.total),3)],2),t.createElementVNode("div",{class:t.normalizeClass(e.$style.manchesterUnited8)},[t.createElementVNode("span",null,t.toDisplayString(s.data.category)+": ",1),t.createElementVNode("span",{class:t.normalizeClass(e.$style.spanGames)},t.toDisplayString(s.data.total),3)],2)],2)],2),s.viewButton?(t.openBlock(),t.createBlock(y,{key:0,style:t.normalizeStyle(s.additionalClass!=""&&B.elementSize.width>540?"margin-right: 42px":""),width:"88px",height:"30px","border-radius":"30px","border-width":1,"background-color":"#ffffff1a","font-family":"Poppins-Semibold","border-color":"#cbee6b","text-value":"Ver perfil","font-size":"10px",onClick:o[1]||(o[1]=a=>m.viewProfile(s.data.id))},null,8,["style"])):t.createCommentVNode("",!0)],2)):t.createCommentVNode("",!0)],512)}const gV=Ki(HS,[["render",ndt],["__cssModules",{$style:tdt}],["__scopeId","data-v-0bb9c2ff"]]);/**
4133
4133
  * Vue 3 Carousel 0.3.1
4134
4134
  * (c) 2023
4135
4135
  * @license MIT