diff --git a/pr-preview/pr-2/404.html b/pr-preview/pr-2/404.html deleted file mode 100644 index 3974d97..0000000 --- a/pr-preview/pr-2/404.html +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - 404 | eodash Pages Template - - - - - - - - - - -
Skip to content

404

PAGE NOT FOUND

But if you don't change your direction, and if you keep looking, you may end up where you are heading.
- - - - \ No newline at end of file diff --git a/pr-preview/pr-2/assets/app.m23sWn6F.js b/pr-preview/pr-2/assets/app.m23sWn6F.js deleted file mode 100644 index aaa7a2c..0000000 --- a/pr-preview/pr-2/assets/app.m23sWn6F.js +++ /dev/null @@ -1 +0,0 @@ -import{V as o,a4 as p,a5 as u,a6 as l,a7 as c,a8 as f,a9 as d,aa as m,ab as h,ac as g,ad as A,a3 as P,d as _,u as v,k as y,y as R,ae as w,af as C,ag as E,a2 as b}from"./chunks/framework.CCzXaKCO.js";import{R as T}from"./chunks/theme.DKbQiTk4.js";function i(e){if(e.extends){const a=i(e.extends);return{...a,...e,async enhanceApp(t){a.enhanceApp&&await a.enhanceApp(t),e.enhanceApp&&await e.enhanceApp(t)}}}return e}const s=i(T),S=_({name:"VitePressApp",setup(){const{site:e,lang:a,dir:t}=v();return y(()=>{R(()=>{document.documentElement.lang=a.value,document.documentElement.dir=t.value})}),e.value.router.prefetchLinks&&w(),C(),E(),s.setup&&s.setup(),()=>b(s.Layout)}});async function D(){globalThis.__VITEPRESS__=!0;const e=L(),a=V();a.provide(u,e);const t=l(e.route);return a.provide(c,t),a.component("Content",f),a.component("ClientOnly",d),Object.defineProperties(a.config.globalProperties,{$frontmatter:{get(){return t.frontmatter.value}},$params:{get(){return t.page.value.params}}}),s.enhanceApp&&await s.enhanceApp({app:a,router:e,siteData:m}),{app:a,router:e,data:t}}function V(){return h(S)}function L(){let e=o,a;return g(t=>{let n=A(t),r=null;return n&&(e&&(a=n),(e||a===n)&&(n=n.replace(/\.js$/,".lean.js")),r=P(()=>import(n),[])),o&&(e=!1),r},s.NotFound)}o&&D().then(({app:e,router:a,data:t})=>{a.go().then(()=>{p(a.route,t.site),e.mount("#app")})});export{D as createApp}; diff --git a/pr-preview/pr-2/assets/chunks/DashboardLayout-Dp8AnYD9.C8ccImxE.js b/pr-preview/pr-2/assets/chunks/DashboardLayout-Dp8AnYD9.C8ccImxE.js deleted file mode 100644 index 6102454..0000000 --- a/pr-preview/pr-2/assets/chunks/DashboardLayout-Dp8AnYD9.C8ccImxE.js +++ /dev/null @@ -1,29 +0,0 @@ -import{_ as k,a0 as v,a2 as c,f as _,an as A,t as r,O as l,aj as m,a5 as b,J as e,a9 as y,T as x,k as f,$,a4 as T,aa as C,b as E,ao as M}from"./eo-dash.Bz0AiLIy.js";import{e as H,W as L}from"./VBtn-Bz7ruRUg.DWwH2z8a.js";import{V as z}from"./VMain-BHfWJU2j.ByWWJTS2.js";import"./framework.CCzXaKCO.js";import"./color-DpYEub1f.C1TESEKr.js";import"./dimensions-CJaGeSrj.Ds6JJdiE.js";import"./ssrBoot-D-b4-M19.5KPN_o8O.js";class I extends HTMLElement{static get observedAttributes(){return["gap"]}constructor(){super(),this.attachShadow({mode:"open"}),this.render()}render(){this.shadowRoot.innerHTML=` - - - `}attributeChangedCallback(s,o,a){o!==a&&(this[s]=a),this.render()}}class O extends HTMLElement{static get observedAttributes(){return["x","y","w","h"]}constructor(){super(),this.attachShadow({mode:"open"}),this.render()}render(){this.shadowRoot.innerHTML=` - - - `}attributeChangedCallback(s,o,a){o!==a&&(this[s]=a),this.render()}}customElements.define("eox-layout",I);customElements.define("eox-layout-item",O);const S=["gap"],D={style:{"z-index":"0"},x:"0",y:"0",h:"12",w:"12"},R=["x","y","h","w"],G={__name:"DashboardLayout",setup(u){var h,g;const s=k(v),[o]=c([(h=s.template)==null?void 0:h.background]),a=(g=s.template)==null?void 0:g.widgets,d=c(a),p=_([]),{slideBtns:i,slideInOut:w}=A(p,a);return(V,j)=>(r(),l(z,null,{default:m(()=>[b("eox-layout",{gap:e(s).template.gap??2},[b("eox-layout-item",D,[(r(),l(y(e(o).component),x({id:"bg-widget"},e(o).props),null,16))]),(r(!0),f($,null,T(e(a),(n,t)=>(r(),f("eox-layout-item",{ref_for:!0,ref_key:"itemEls",ref:p,key:t,style:{position:"relative",overflow:"visible","z-index":"1","border-radius":"0px",background:"rgb(var(--v-theme-surface))"},x:n.layout.x,y:n.layout.y,h:n.layout.h,w:n.layout.w},[e(i)[t].enabled?(r(),l(H,{key:0,position:"absolute",variant:"tonal",style:C(e(i)[t].style),class:"slide-btn",onClick:B=>e(w)(t)},{default:m(()=>[E(L,{icon:e(i)[t].active?e(i)[t].icon.in:e(i)[t].icon.out},null,8,["icon"])]),_:2},1032,["style","onClick"])):M("v-if",!0),(r(),l(y(e(d)[t].value.component),x({key:e(d)[t].value.id},e(d)[t].value.props),null,16))],8,R))),128))],8,S)]),_:1}))}};export{G as default}; diff --git a/pr-preview/pr-2/assets/chunks/DynamicWebComponent-BrHVTesn.BNJLct30.js b/pr-preview/pr-2/assets/chunks/DynamicWebComponent-BrHVTesn.BNJLct30.js deleted file mode 100644 index f8fe2d9..0000000 --- a/pr-preview/pr-2/assets/chunks/DynamicWebComponent-BrHVTesn.BNJLct30.js +++ /dev/null @@ -1 +0,0 @@ -import{a3 as c}from"./framework.CCzXaKCO.js";import{ab as m,ac as p,f,v as d,ad as g,t as i,k as _,O as k,T as y,a9 as v}from"./eo-dash.Bz0AiLIy.js";const N={class:"d-flex flex-column fill-height overflow-auto"},w={__name:"DynamicWebComponent",props:{link:{type:[String,Function],required:!0},constructorProp:String,tagName:{type:String,required:!0},properties:{type:Object,default:()=>({})},onMounted:Function,onUnmounted:Function},async setup(a){let n,r;const t=a,l=async()=>typeof t.link=="string"?await c(()=>import(t.link),[]):await t.link(),u=customElements.get(t.tagName)?null:([n,r]=m(()=>l().catch(e=>{console.error(e)})),n=await n,r(),n);if(!customElements.get(t.tagName)&&t.constructorProp){const e=u[t.constructorProp];customElements.define(t.tagName,e)}const s=p(),o=f(null);return d(()=>{var e;(e=t.onMounted)==null||e.call(t,o.value,s)}),g(()=>{var e;(e=t.onUnmounted)==null||e.call(t,o.value,s)}),(e,E)=>(i(),_("span",N,[(i(),k(v(a.tagName),y(a.properties,{ref_key:"elementRef",ref:o}),null,16))]))}};export{w as default}; diff --git a/pr-preview/pr-2/assets/chunks/EodashDatePicker-D_udZ26j.DhyaqOc2.js b/pr-preview/pr-2/assets/chunks/EodashDatePicker-D_udZ26j.DhyaqOc2.js deleted file mode 100644 index 0984bb2..0000000 --- a/pr-preview/pr-2/assets/chunks/EodashDatePicker-D_udZ26j.DhyaqOc2.js +++ /dev/null @@ -1 +0,0 @@ -import{Y as O,X as f,L as Y,e as P,f as F,a as ae,w as ee,b as t,G as ta,j as E,R as we,v as ue,s as se,U,y as la,H as de,z as Ie,c as ce,d as ie,K as Ae,g as J,h as R,i as X,q as $e,W as ve,k as he,O as na,D as sa,l as ia,B as ra,T as W,M as pe,$ as Z,F as fe,C as Me,m as Pe,u as oa,n as ua,o as ge,p as da,I as ca,r as va,t as oe,Q as pa,Z as Be,x as L,A as fa,E as ma,_ as ya,J as ha,N as ga,P as le}from"./eo-dash.Bz0AiLIy.js";import{L as Oe,T as ka,E as ba}from"./index-DTkOfh2g.aV6WRR23.js";import{j as Fe,h as _a,I as me}from"./index-Sa2Vg_gx.CceVueR3.js";import{e as T,P as xa,O as Va,T as Sa,A as Ca,R as Da,z as wa,S as Ia,x as Aa,Q as $a,W as Ma}from"./VBtn-Bz7ruRUg.DWwH2z8a.js";import{N as re,k as Pa,y as Ba,S as Ye,x as Oa,h as Fa,B as Ne,$ as We}from"./color-DpYEub1f.C1TESEKr.js";import{b as te,S as Ya,v as Na}from"./dimensions-CJaGeSrj.Ds6JJdiE.js";import{x as Wa,v as Ha,w as za,R as Ea}from"./forwardRefs-Bxeu9Obx.D8TmPTZr.js";import"./framework.CCzXaKCO.js";function He(e){let l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"div",r=arguments.length>2?arguments[2]:void 0;return O()({name:r??sa(ia(e.replace(/__/g,"-"))),props:{tag:{type:String,default:l},...U()},setup(n,a){let{slots:s}=a;return()=>{var i;return ra(n.tag,{class:[e,n.class],style:n.style},(i=s.default)==null?void 0:i.call(s))}}})}const ja=He("v-spacer","div","VSpacer"),ze=P({active:{type:[String,Array],default:void 0},disabled:{type:[Boolean,String,Array],default:!1},nextIcon:{type:[String],default:"$next"},prevIcon:{type:[String],default:"$prev"},modeIcon:{type:[String],default:"$subgroup"},text:String,viewMode:{type:String,default:"month"}},"VDatePickerControls"),ke=O()({name:"VDatePickerControls",props:ze(),emits:{"click:year":()=>!0,"click:month":()=>!0,"click:prev":()=>!0,"click:next":()=>!0,"click:text":()=>!0},setup(e,l){let{emit:r}=l;const n=f(()=>Array.isArray(e.disabled)?e.disabled.includes("text"):!!e.disabled),a=f(()=>Array.isArray(e.disabled)?e.disabled.includes("mode"):!!e.disabled),s=f(()=>Array.isArray(e.disabled)?e.disabled.includes("prev"):!!e.disabled),i=f(()=>Array.isArray(e.disabled)?e.disabled.includes("next"):!!e.disabled);function d(){r("click:prev")}function c(){r("click:next")}function u(){r("click:year")}function v(){r("click:month")}return Y(()=>t("div",{class:["v-date-picker-controls"]},[t(T,{class:"v-date-picker-controls__month-btn",disabled:n.value,text:e.text,variant:"text",rounded:!0,onClick:v},null),t(T,{key:"mode-btn",class:"v-date-picker-controls__mode-btn",disabled:a.value,density:"comfortable",icon:e.modeIcon,variant:"text",onClick:u},null),t(ja,{key:"mode-spacer"},null),t("div",{key:"month-buttons",class:"v-date-picker-controls__month"},[t(T,{disabled:s.value,icon:e.prevIcon,variant:"text",onClick:d},null),t(T,{disabled:i.value,icon:e.nextIcon,variant:"text",onClick:c},null)])])),{}}}),Ta=P({appendIcon:String,color:String,header:String,transition:String,onClick:R()},"VDatePickerHeader"),be=O()({name:"VDatePickerHeader",props:Ta(),emits:{click:()=>!0,"click:append":()=>!0},setup(e,l){let{emit:r,slots:n}=l;const{backgroundColorClasses:a,backgroundColorStyles:s}=re(e,"color");function i(){r("click")}function d(){r("click:append")}return Y(()=>{const c=!!(n.default||e.header),u=!!(n.append||e.appendIcon);return t("div",{class:["v-date-picker-header",{"v-date-picker-header--clickable":!!e.onClick},a.value],style:s.value,onClick:i},[n.prepend&&t("div",{key:"prepend",class:"v-date-picker-header__prepend"},[n.prepend()]),c&&t(me,{key:"content",name:e.transition},{default:()=>{var v;return[t("div",{key:e.header,class:"v-date-picker-header__content"},[((v=n.default)==null?void 0:v.call(n))??e.header])]}}),u&&t("div",{class:"v-date-picker-header__append"},[n.append?t(te,{key:"append-defaults",disabled:!e.appendIcon,defaults:{VBtn:{icon:e.appendIcon,variant:"text"}}},{default:()=>{var v;return[(v=n.append)==null?void 0:v.call(n)]}}):t(T,{key:"append-btn",icon:e.appendIcon,variant:"text",onClick:d},null)])])}),{}}}),Ra=P({allowedDates:[Array,Function],disabled:Boolean,displayValue:null,modelValue:Array,month:[Number,String],max:null,min:null,showAdjacentMonths:Boolean,year:[Number,String],weekdays:{type:Array,default:()=>[0,1,2,3,4,5,6]}},"calendar");function La(e){const l=ae(),r=E(e,"modelValue",[],m=>L(m)),n=f(()=>e.displayValue?l.date(e.displayValue):r.value.length>0?l.date(r.value[0]):e.min?l.date(e.min):Array.isArray(e.allowedDates)?l.date(e.allowedDates[0]):l.date()),a=E(e,"year",void 0,m=>{const h=m!=null?Number(m):l.getYear(n.value);return l.startOfYear(l.setYear(l.date(),h))},m=>l.getYear(m)),s=E(e,"month",void 0,m=>{const h=m!=null?Number(m):l.getMonth(n.value),y=l.setYear(l.startOfMonth(l.date()),l.getYear(a.value));return l.setMonth(y,h)},m=>l.getMonth(m)),i=f(()=>{const m=l.getWeekArray(s.value),h=m.flat(),y=6*7;if(h.lengthe.weekdays.includes(l.toJsDate(y).getDay())).map((y,o)=>{const g=l.toISO(y),b=!l.isSameMonth(y,s.value),w=l.isSameDay(y,l.startOfMonth(s.value)),C=l.isSameDay(y,l.endOfMonth(s.value)),_=l.isSameDay(y,s.value);return{date:y,isoDate:g,formatted:l.format(y,"keyboardDate"),year:l.getYear(y),month:l.getMonth(y),isDisabled:k(y),isWeekStart:o%7===0,isWeekEnd:o%7===6,isToday:l.isSameDay(y,h),isAdjacent:b,isHidden:b&&!e.showAdjacentMonths,isStart:w,isSelected:r.value.some(D=>l.isSameDay(y,D)),isEnd:C,isSame:_,localized:l.format(y,"dayOfMonth")}})}const c=f(()=>{const m=l.startOfWeek(r.value),h=[];for(let g=0;g<=6;g++)h.push(l.addDays(m,g));const y=h,o=l.date();return d(y,o)}),u=f(()=>{const m=i.value.flat(),h=l.date();return d(m,h)}),v=f(()=>i.value.map(m=>m.length?pa(l,m[0]):null));function k(m){if(e.disabled)return!0;const h=l.date(m);return e.min&&l.isAfter(l.date(e.min),h)||e.max&&l.isAfter(h,l.date(e.max))?!0:Array.isArray(e.allowedDates)&&e.allowedDates.length>0?!e.allowedDates.some(y=>l.isSameDay(l.date(y),h)):typeof e.allowedDates=="function"?!e.allowedDates(h):!1}return{displayValue:n,daysInMonth:u,daysInWeek:c,genDays:d,model:r,weeksInMonth:i,weekNumbers:v}}const Ee=P({color:String,hideWeekdays:Boolean,multiple:[Boolean,Number,String],showWeek:Boolean,...Ra()},"VDatePickerMonth"),_e=O()({name:"VDatePickerMonth",props:Ee(),emits:{"update:modelValue":e=>!0,"update:month":e=>!0,"update:year":e=>!0},setup(e,l){let{emit:r,slots:n}=l;const a=F(),{daysInMonth:s,model:i,weekNumbers:d}=La(e),c=ae(),u=ee(),v=ee();e.multiple==="range"&&i.value.length>0&&(u.value=i.value[0],i.value.length>1&&(v.value=i.value[i.value.length-1]));const k=f(()=>{const o=["number","string"].includes(typeof e.multiple)?Number(e.multiple):1/0;return i.value.length>=o});function m(o){const g=c.startOfDay(o);if(!u.value)u.value=g,i.value=[u.value];else if(v.value)u.value=o,v.value=void 0,i.value=[u.value];else{if(c.isSameDay(g,u.value)){u.value=void 0,i.value=[];return}else c.isBefore(g,u.value)?(v.value=c.endOfDay(u.value),u.value=g):v.value=c.endOfDay(g);const b=c.getDiff(v.value,u.value,"days"),w=[u.value];for(let C=1;Cc.isSameDay(b,o));if(g===-1)i.value=[...i.value,o];else{const b=[...i.value];b.splice(g,1),i.value=b}}function y(o){e.multiple==="range"?m(o):e.multiple?h(o):i.value=[o]}return()=>t("div",{class:"v-date-picker-month"},[e.showWeek&&t("div",{key:"weeks",class:"v-date-picker-month__weeks"},[!e.hideWeekdays&&t("div",{key:"hide-week-days",class:"v-date-picker-month__day"},[ta(" ")]),d.value.map(o=>t("div",{class:["v-date-picker-month__day","v-date-picker-month__day--adjacent"]},[o]))]),t("div",{ref:a,class:"v-date-picker-month__days"},[!e.hideWeekdays&&c.getWeekdays().map(o=>t("div",{class:["v-date-picker-month__day","v-date-picker-month__weekday"]},[o])),s.value.map((o,g)=>{const b={props:{onClick:()=>y(o.date)},item:o,i:g};return k.value&&!o.isSelected&&(o.isDisabled=!0),t("div",{class:["v-date-picker-month__day",{"v-date-picker-month__day--adjacent":o.isAdjacent,"v-date-picker-month__day--hide-adjacent":o.isHidden,"v-date-picker-month__day--selected":o.isSelected,"v-date-picker-month__day--week-end":o.isWeekEnd,"v-date-picker-month__day--week-start":o.isWeekStart}],"data-v-date":o.isDisabled?void 0:o.isoDate},[(e.showAdjacentMonths||!o.isAdjacent)&&t(te,{defaults:{VBtn:{class:"v-date-picker-month__day-btn",color:(o.isSelected||o.isToday)&&!o.isDisabled?e.color:void 0,disabled:o.isDisabled,icon:!0,ripple:!1,text:o.localized,variant:o.isDisabled?o.isToday?"outlined":"text":o.isToday&&!o.isSelected?"outlined":"flat",onClick:()=>y(o.date)}}},{default:()=>{var w;return[((w=n.day)==null?void 0:w.call(n,b))??t(T,b.props,null)]}})])})])])}}),je=P({color:String,height:[String,Number],modelValue:Number},"VDatePickerMonths"),xe=O()({name:"VDatePickerMonths",props:je(),emits:{"update:modelValue":e=>!0},setup(e,l){let{emit:r,slots:n}=l;const a=ae(),s=E(e,"modelValue"),i=f(()=>{let d=a.startOfYear(a.date());return Be(12).map(c=>{const u=a.format(d,"monthShort");return d=a.getNextMonth(d),{text:u,value:c}})});return we(()=>{s.value=s.value??a.getMonth(a.date())}),Y(()=>t("div",{class:"v-date-picker-months",style:{height:pe(e.height)}},[t("div",{class:"v-date-picker-months__content"},[i.value.map((d,c)=>{var k;const u={active:s.value===c,color:s.value===c?e.color:void 0,rounded:!0,text:d.text,variant:s.value===d.value?"flat":"text",onClick:()=>v(c)};function v(m){if(s.value===m){r("update:modelValue",s.value);return}s.value=m}return((k=n.month)==null?void 0:k.call(n,{month:d,i:c,props:u}))??t(T,W({key:"month"},u),null)})])])),{}}}),Te=P({color:String,height:[String,Number],min:null,max:null,modelValue:Number},"VDatePickerYears"),Ve=O()({name:"VDatePickerYears",props:Te(),emits:{"update:modelValue":e=>!0},setup(e,l){let{emit:r,slots:n}=l;const a=ae(),s=E(e,"modelValue"),i=f(()=>{const c=a.getYear(a.date());let u=c-100,v=c+52;e.min&&(u=a.getYear(a.date(e.min))),e.max&&(v=a.getYear(a.date(e.max)));let k=a.startOfYear(a.date());return k=a.setYear(k,u),Be(v-u+1,u).map(m=>{const h=a.format(k,"year");return k=a.setYear(k,a.getYear(k)+1),{text:h,value:m}})});we(()=>{s.value=s.value??a.getYear(a.date())});const d=F();return ue(async()=>{var c;await se(),(c=d.value)==null||c.$el.scrollIntoView({block:"center"})}),Y(()=>t("div",{class:"v-date-picker-years",style:{height:pe(e.height)}},[t("div",{class:"v-date-picker-years__content"},[i.value.map((c,u)=>{var k;const v={ref:s.value===c.value?d:void 0,active:s.value===c.value,color:s.value===c.value?e.color:void 0,rounded:!0,text:c.text,variant:s.value===c.value?"flat":"text",onClick:()=>{if(s.value===c.value){r("update:modelValue",s.value);return}s.value=c.value}};return((k=n.year)==null?void 0:k.call(n,{year:c,i:u,props:v}))??t(T,W({key:"month"},v),null)})])])),{}}}),Ua=He("v-picker-title"),Re=P({color:String,...Pa(),...U(),...Ya(),...Ba(),...xa(),...Va(),...Ye(),...la(),...de()},"VSheet"),Se=O()({name:"VSheet",props:Re(),setup(e,l){let{slots:r}=l;const{themeClasses:n}=Ie(e),{backgroundColorClasses:a,backgroundColorStyles:s}=re(ce(e,"color")),{borderClasses:i}=Oa(e),{dimensionStyles:d}=Na(e),{elevationClasses:c}=Fa(e),{locationStyles:u}=Sa(e),{positionClasses:v}=Ca(e),{roundedClasses:k}=Ne(e);return Y(()=>t(e.tag,{class:["v-sheet",n.value,a.value,i.value,c.value,v.value,k.value,e.class],style:[s.value,d.value,u.value,e.style]},r)),{}}}),Le=P({bgColor:String,landscape:Boolean,title:String,hideHeader:Boolean,...Re()},"VPicker"),Ce=O()({name:"VPicker",props:Le(),setup(e,l){let{slots:r}=l;const{backgroundColorClasses:n,backgroundColorStyles:a}=re(ce(e,"color"));return Y(()=>{const s=Se.filterProps(e),i=!!(e.title||r.title);return t(Se,W(s,{color:e.bgColor,class:["v-picker",{"v-picker--landscape":e.landscape,"v-picker--with-actions":!!r.actions},e.class],style:e.style}),{default:()=>{var d;return[!e.hideHeader&&t("div",{key:"header",class:[n.value],style:[a.value]},[i&&t(Ua,{key:"picker-title"},{default:()=>{var c;return[((c=r.title)==null?void 0:c.call(r))??e.title]}}),r.header&&t("div",{class:"v-picker__header"},[r.header()])]),t("div",{class:"v-picker__body"},[(d=r.default)==null?void 0:d.call(r)]),r.actions&&t(te,{defaults:{VBtn:{slim:!0,variant:"text"}}},{default:()=>[t("div",{class:"v-picker__actions"},[r.actions()])]})]}})}),{}}}),qa=P({header:{type:String,default:"$vuetify.datePicker.header"},...ze(),...Ee(),...ie(je(),["modelValue"]),...ie(Te(),["modelValue"]),...Le({title:"$vuetify.datePicker.title"}),modelValue:null},"VDatePicker"),Ka=O()({name:"VDatePicker",props:qa(),emits:{"update:modelValue":e=>!0,"update:month":e=>!0,"update:year":e=>!0,"update:viewMode":e=>!0},setup(e,l){let{emit:r,slots:n}=l;const a=ae(),{t:s}=Ae(),i=E(e,"modelValue",void 0,p=>L(p),p=>e.multiple?p:p[0]),d=E(e,"viewMode"),c=f(()=>{var M;const p=a.date((M=i.value)==null?void 0:M[0]);return p&&a.isValid(p)?p:a.date()}),u=F(Number(e.month??a.getMonth(a.startOfMonth(c.value)))),v=F(Number(e.year??a.getYear(a.startOfYear(a.setMonth(c.value,u.value))))),k=ee(!1),m=f(()=>e.multiple&&i.value.length>1?s("$vuetify.datePicker.itemsSelected",i.value.length):i.value[0]&&a.isValid(i.value[0])?a.format(a.date(i.value[0]),"normalDateWithWeekday"):s(e.header)),h=f(()=>{let p=a.date();return p=a.setYear(p,v.value),p=a.setMonth(p,u.value),p=a.setDate(p,1),a.format(p,"monthAndYear")}),y=f(()=>`date-picker-header${k.value?"-reverse":""}-transition`),o=f(()=>{const p=a.date(e.min);return e.min&&a.isValid(p)?p:null}),g=f(()=>{const p=a.date(e.max);return e.max&&a.isValid(p)?p:null}),b=f(()=>{if(e.disabled)return!0;const p=[];if(d.value!=="month")p.push("prev","next");else{let M=a.date();if(M=a.setYear(M,v.value),M=a.setMonth(M,u.value),o.value){const B=a.addDays(a.startOfMonth(M),-1);a.isAfter(o.value,B)&&p.push("prev")}if(g.value){const B=a.addDays(a.endOfMonth(M),1);a.isAfter(B,g.value)&&p.push("next")}}return p});function w(){u.value<11?u.value++:(v.value++,u.value=0,I(v.value)),S(u.value)}function C(){u.value>0?u.value--:(v.value--,u.value=11,I(v.value)),S(u.value)}function _(){d.value="month"}function D(){d.value=d.value==="months"?"month":"months"}function x(){d.value=d.value==="year"?"month":"year"}function S(p){d.value==="months"&&D(),r("update:month",p)}function I(p){d.value==="year"&&x(),r("update:year",p)}return J(i,(p,M)=>{const B=a.date(L(p)[0]),z=a.date(L(M)[0]);k.value=a.isBefore(B,z)}),Y(()=>{const p=Ce.filterProps(e),M=ke.filterProps(e),B=be.filterProps(e),z=_e.filterProps(e),N=ie(xe.filterProps(e),["modelValue"]),A=ie(Ve.filterProps(e),["modelValue"]),$={header:m.value,transition:y.value};return t(Ce,W(p,{class:["v-date-picker",`v-date-picker--${d.value}`,{"v-date-picker--show-week":e.showWeek},e.class],style:e.style}),{title:()=>{var V;return((V=n.title)==null?void 0:V.call(n))??t("div",{class:"v-date-picker__title"},[s(e.title)])},header:()=>n.header?t(te,{defaults:{VDatePickerHeader:{...$}}},{default:()=>{var V;return[(V=n.header)==null?void 0:V.call(n,$)]}}):t(be,W({key:"header"},B,$,{onClick:d.value!=="month"?_:void 0}),{...n,default:void 0}),default:()=>t(Z,null,[t(ke,W(M,{disabled:b.value,text:h.value,"onClick:next":w,"onClick:prev":C,"onClick:month":D,"onClick:year":x}),null),t(ka,{hideOnLeave:!0},{default:()=>[d.value==="months"?t(xe,W({key:"date-picker-months"},N,{modelValue:u.value,"onUpdate:modelValue":[V=>u.value=V,S],min:o.value,max:g.value}),null):d.value==="year"?t(Ve,W({key:"date-picker-years"},A,{modelValue:v.value,"onUpdate:modelValue":[V=>v.value=V,I],min:o.value,max:g.value}),null):t(_e,W({key:"date-picker-month"},z,{modelValue:i.value,"onUpdate:modelValue":V=>i.value=V,month:u.value,"onUpdate:month":[V=>u.value=V,S],year:v.value,"onUpdate:year":[V=>v.value=V,I],min:o.value,max:g.value}),null)]})]),actions:n.actions})}),{}}}),Qa=P({active:Boolean,max:[Number,String],value:{type:[Number,String],default:0},...U(),...Fe({transition:{component:Oe}})},"VCounter"),Ga=O()({name:"VCounter",functional:!0,props:Qa(),setup(e,l){let{slots:r}=l;const n=f(()=>e.max?`${e.value} / ${e.max}`:String(e.value));return Y(()=>t(me,{transition:e.transition},{default:()=>[fe(t("div",{class:["v-counter",e.class],style:e.style},[r.default?r.default({counter:n.value,max:e.max,value:e.value}):n.value]),[[Me,e.active]])]})),{}}}),Ja=P({text:String,onClick:R(),...U(),...de()},"VLabel"),Xa=O()({name:"VLabel",props:Ja(),setup(e,l){let{slots:r}=l;return Y(()=>{var n;return t("label",{class:["v-label",{"v-label--clickable":!!e.onClick},e.class],style:e.style,onClick:e.onClick},[e.text,(n=r.default)==null?void 0:n.call(r)])}),{}}}),Za=P({floating:Boolean,...U()},"VFieldLabel"),ne=O()({name:"VFieldLabel",props:Za(),setup(e,l){let{slots:r}=l;return Y(()=>t(Xa,{class:["v-field-label",{"v-field-label--floating":e.floating},e.class],style:e.style,"aria-hidden":e.floating||void 0},r)),{}}});function Ue(e){const{t:l}=Ae();function r(n){let{name:a}=n;const s={prepend:"prependAction",prependInner:"prependAction",append:"appendAction",appendInner:"appendAction",clear:"clear"}[a],i=e[`onClick:${a}`],d=i&&s?l(`$vuetify.input.${s}`,e.label??""):void 0;return t(Ma,{icon:e[`${a}Icon`],"aria-label":d,onClick:i},null)}return{InputIcon:r}}const qe=P({focused:Boolean,"onUpdate:focused":R()},"focus");function Ke(e){let l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Pe();const r=E(e,"focused"),n=f(()=>({[`${l}--focused`]:r.value}));function a(){r.value=!0}function s(){r.value=!1}return{focusClasses:n,isFocused:r,focus:a,blur:s}}const et=["underlined","outlined","filled","solo","solo-inverted","solo-filled","plain"],Qe=P({appendInnerIcon:X,bgColor:String,clearable:Boolean,clearIcon:{type:X,default:"$clear"},active:Boolean,centerAffix:{type:Boolean,default:void 0},color:String,baseColor:String,dirty:Boolean,disabled:{type:Boolean,default:null},error:Boolean,flat:Boolean,label:String,persistentClear:Boolean,prependInnerIcon:X,reverse:Boolean,singleLine:Boolean,variant:{type:String,default:"filled",validator:e=>et.includes(e)},"onClick:clear":R(),"onClick:appendInner":R(),"onClick:prependInner":R(),...U(),...Da(),...Ye(),...de()},"VField"),Ge=O()({name:"VField",inheritAttrs:!1,props:{id:String,...qe(),...Qe()},emits:{"update:focused":e=>!0,"update:modelValue":e=>!0},setup(e,l){let{attrs:r,emit:n,slots:a}=l;const{themeClasses:s}=Ie(e),{loaderClasses:i}=wa(e),{focusClasses:d,isFocused:c,focus:u,blur:v}=Ke(e),{InputIcon:k}=Ue(e),{roundedClasses:m}=Ne(e),{rtlClasses:h}=$e(),y=f(()=>e.dirty||e.active),o=f(()=>!e.singleLine&&!!(e.label||a.label)),g=ve(),b=f(()=>e.id||`input-${g}`),w=f(()=>`${b.value}-messages`),C=F(),_=F(),D=F(),x=f(()=>["plain","underlined"].includes(e.variant)),{backgroundColorClasses:S,backgroundColorStyles:I}=re(ce(e,"bgColor")),{textColorClasses:p,textColorStyles:M}=We(f(()=>e.error||e.disabled?void 0:y.value&&c.value?e.color:e.baseColor));J(y,A=>{if(o.value){const $=C.value.$el,V=_.value.$el;requestAnimationFrame(()=>{const j=Ha($),H=V.getBoundingClientRect(),G=H.x-j.x,q=H.y-j.y-(j.height/2-H.height/2),K=H.width/.75,Q=Math.abs(K-j.width)>1?{maxWidth:pe(K)}:void 0,Xe=getComputedStyle($),ye=getComputedStyle(V),Ze=parseFloat(Xe.transitionDuration)*1e3||150,ea=parseFloat(ye.getPropertyValue("--v-field-label-scale")),aa=ye.getPropertyValue("color");$.style.visibility="visible",V.style.visibility="hidden",za($,{transform:`translate(${G}px, ${q}px) scale(${ea})`,color:aa,...Q},{duration:Ze,easing:Ea,direction:A?"normal":"reverse"}).finished.then(()=>{$.style.removeProperty("visibility"),V.style.removeProperty("visibility")})})}},{flush:"post"});const B=f(()=>({isActive:y,isFocused:c,controlRef:D,blur:v,focus:u}));function z(A){A.target!==document.activeElement&&A.preventDefault()}function N(A){var $;A.key!=="Enter"&&A.key!==" "||(A.preventDefault(),A.stopPropagation(),($=e["onClick:clear"])==null||$.call(e,new MouseEvent("click")))}return Y(()=>{var G,q,K;const A=e.variant==="outlined",$=!!(a["prepend-inner"]||e.prependInnerIcon),V=!!(e.clearable||a.clear),j=!!(a["append-inner"]||e.appendInnerIcon||V),H=()=>a.label?a.label({...B.value,label:e.label,props:{for:b.value}}):e.label;return t("div",W({class:["v-field",{"v-field--active":y.value,"v-field--appended":j,"v-field--center-affix":e.centerAffix??!x.value,"v-field--disabled":e.disabled,"v-field--dirty":e.dirty,"v-field--error":e.error,"v-field--flat":e.flat,"v-field--has-background":!!e.bgColor,"v-field--persistent-clear":e.persistentClear,"v-field--prepended":$,"v-field--reverse":e.reverse,"v-field--single-line":e.singleLine,"v-field--no-label":!H(),[`v-field--variant-${e.variant}`]:!0},s.value,S.value,d.value,i.value,m.value,h.value,e.class],style:[I.value,e.style],onClick:z},r),[t("div",{class:"v-field__overlay"},null),t($a,{name:"v-field",active:!!e.loading,color:e.error?"error":typeof e.loading=="string"?e.loading:e.color},{default:a.loader}),$&&t("div",{key:"prepend",class:"v-field__prepend-inner"},[e.prependInnerIcon&&t(k,{key:"prepend-icon",name:"prependInner"},null),(G=a["prepend-inner"])==null?void 0:G.call(a,B.value)]),t("div",{class:"v-field__field","data-no-activator":""},[["filled","solo","solo-inverted","solo-filled"].includes(e.variant)&&o.value&&t(ne,{key:"floating-label",ref:_,class:[p.value],floating:!0,for:b.value,style:M.value},{default:()=>[H()]}),t(ne,{ref:C,for:b.value},{default:()=>[H()]}),(q=a.default)==null?void 0:q.call(a,{...B.value,props:{id:b.value,class:"v-field__input","aria-describedby":w.value},focus:u,blur:v})]),V&&t(ba,{key:"clear"},{default:()=>[fe(t("div",{class:"v-field__clearable",onMousedown:Q=>{Q.preventDefault(),Q.stopPropagation()}},[t(te,{defaults:{VIcon:{icon:e.clearIcon}}},{default:()=>[a.clear?a.clear({...B.value,props:{onKeydown:N,onFocus:u,onBlur:v,onClick:e["onClick:clear"]}}):t(k,{name:"clear",onKeydown:N,onFocus:u,onBlur:v},null)]})]),[[Me,e.dirty]])]}),j&&t("div",{key:"append",class:"v-field__append-inner"},[(K=a["append-inner"])==null?void 0:K.call(a,B.value),e.appendInnerIcon&&t(k,{key:"append-icon",name:"appendInner"},null)]),t("div",{class:["v-field__outline",p.value],style:M.value},[A&&t(Z,null,[t("div",{class:"v-field__outline__start"},null),o.value&&t("div",{class:"v-field__outline__notch"},[t(ne,{ref:_,floating:!0,for:b.value},{default:()=>[H()]})]),t("div",{class:"v-field__outline__end"},null)]),x.value&&o.value&&t(ne,{ref:_,floating:!0,for:b.value},{default:()=>[H()]})])])}),{controlRef:D}}});function at(e){const l=Object.keys(Ge.props).filter(r=>!fa(r)&&r!=="class"&&r!=="style");return ma(e,l)}const tt=P({active:Boolean,color:String,messages:{type:[Array,String],default:()=>[]},...U(),...Fe({transition:{component:Oe,leaveAbsolute:!0,group:!0}})},"VMessages"),lt=O()({name:"VMessages",props:tt(),setup(e,l){let{slots:r}=l;const n=f(()=>L(e.messages)),{textColorClasses:a,textColorStyles:s}=We(f(()=>e.color));return Y(()=>t(me,{transition:e.transition,tag:"div",class:["v-messages",a.value,e.class],style:[s.value,e.style],role:"alert","aria-live":"polite"},{default:()=>[e.active&&n.value.map((i,d)=>t("div",{class:"v-messages__message",key:`${d}-${n.value}`},[r.message?r.message({message:i}):i]))]})),{}}}),nt=Symbol.for("vuetify:form");function st(){return ya(nt,null)}const it=P({disabled:{type:Boolean,default:null},error:Boolean,errorMessages:{type:[Array,String],default:()=>[]},maxErrors:{type:[Number,String],default:1},name:String,label:String,readonly:{type:Boolean,default:null},rules:{type:Array,default:()=>[]},modelValue:null,validateOn:String,validationValue:null,...qe()},"validation");function rt(e){let l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Pe(),r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:ve();const n=E(e,"modelValue"),a=f(()=>e.validationValue===void 0?n.value:e.validationValue),s=st(),i=F([]),d=ee(!0),c=f(()=>!!(L(n.value===""?null:n.value).length||L(a.value===""?null:a.value).length)),u=f(()=>!!(e.disabled??(s==null?void 0:s.isDisabled.value))),v=f(()=>!!(e.readonly??(s==null?void 0:s.isReadonly.value))),k=f(()=>{var _;return(_=e.errorMessages)!=null&&_.length?L(e.errorMessages).concat(i.value).slice(0,Math.max(0,+e.maxErrors)):i.value}),m=f(()=>{let _=(e.validateOn??(s==null?void 0:s.validateOn.value))||"input";_==="lazy"&&(_="input lazy");const D=new Set((_==null?void 0:_.split(" "))??[]);return{blur:D.has("blur")||D.has("input"),input:D.has("input"),submit:D.has("submit"),lazy:D.has("lazy")}}),h=f(()=>{var _;return e.error||(_=e.errorMessages)!=null&&_.length?!1:e.rules.length?d.value?i.value.length||m.value.lazy?null:!0:!i.value.length:!0}),y=ee(!1),o=f(()=>({[`${l}--error`]:h.value===!1,[`${l}--dirty`]:c.value,[`${l}--disabled`]:u.value,[`${l}--readonly`]:v.value})),g=f(()=>e.name??ha(r));oa(()=>{s==null||s.register({id:g.value,validate:C,reset:b,resetValidation:w})}),ua(()=>{s==null||s.unregister(g.value)}),ue(async()=>{m.value.lazy||await C(!0),s==null||s.update(g.value,h.value,k.value)}),ge(()=>m.value.input,()=>{J(a,()=>{if(a.value!=null)C();else if(e.focused){const _=J(()=>e.focused,D=>{D||C(),_()})}})}),ge(()=>m.value.blur,()=>{J(()=>e.focused,_=>{_||C()})}),J([h,k],()=>{s==null||s.update(g.value,h.value,k.value)});async function b(){n.value=null,await se(),await w()}async function w(){d.value=!0,m.value.lazy?i.value=[]:await C(!0)}async function C(){let _=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;const D=[];y.value=!0;for(const x of e.rules){if(D.length>=+(e.maxErrors??1))break;const S=await(typeof x=="function"?x:()=>x)(a.value);if(S!==!0){if(S!==!1&&typeof S!="string"){console.warn(`${S} is not a valid value. Rule functions must return boolean true or a string.`);continue}D.push(S||"")}}return i.value=D,y.value=!1,d.value=_,i.value}return{errorMessages:k,isDirty:c,isDisabled:u,isReadonly:v,isPristine:d,isValid:h,isValidating:y,reset:b,resetValidation:w,validate:C,validationClasses:o}}const Je=P({id:String,appendIcon:X,centerAffix:{type:Boolean,default:!0},prependIcon:X,hideDetails:[Boolean,String],hideSpinButtons:Boolean,hint:String,persistentHint:Boolean,messages:{type:[Array,String],default:()=>[]},direction:{type:String,default:"horizontal",validator:e=>["horizontal","vertical"].includes(e)},"onClick:prepend":R(),"onClick:append":R(),...U(),...Ia(),...it()},"VInput"),De=O()({name:"VInput",props:{...Je()},emits:{"update:modelValue":e=>!0},setup(e,l){let{attrs:r,slots:n,emit:a}=l;const{densityClasses:s}=Aa(e),{rtlClasses:i}=$e(),{InputIcon:d}=Ue(e),c=ve(),u=f(()=>e.id||`input-${c}`),v=f(()=>`${u.value}-messages`),{errorMessages:k,isDirty:m,isDisabled:h,isReadonly:y,isPristine:o,isValid:g,isValidating:b,reset:w,resetValidation:C,validate:_,validationClasses:D}=rt(e,"v-input",u),x=f(()=>({id:u,messagesId:v,isDirty:m,isDisabled:h,isReadonly:y,isPristine:o,isValid:g,isValidating:b,reset:w,resetValidation:C,validate:_})),S=f(()=>{var I;return(I=e.errorMessages)!=null&&I.length||!o.value&&k.value.length?k.value:e.hint&&(e.persistentHint||e.focused)?e.hint:e.messages});return Y(()=>{var z,N,A,$;const I=!!(n.prepend||e.prependIcon),p=!!(n.append||e.appendIcon),M=S.value.length>0,B=!e.hideDetails||e.hideDetails==="auto"&&(M||!!n.details);return t("div",{class:["v-input",`v-input--${e.direction}`,{"v-input--center-affix":e.centerAffix,"v-input--hide-spin-buttons":e.hideSpinButtons},s.value,i.value,D.value,e.class],style:e.style},[I&&t("div",{key:"prepend",class:"v-input__prepend"},[(z=n.prepend)==null?void 0:z.call(n,x.value),e.prependIcon&&t(d,{key:"prepend-icon",name:"prepend"},null)]),n.default&&t("div",{class:"v-input__control"},[(N=n.default)==null?void 0:N.call(n,x.value)]),p&&t("div",{key:"append",class:"v-input__append"},[e.appendIcon&&t(d,{key:"append-icon",name:"append"},null),(A=n.append)==null?void 0:A.call(n,x.value)]),B&&t("div",{class:"v-input__details"},[t(lt,{id:v.value,active:M,messages:S.value},{message:n.message}),($=n.details)==null?void 0:$.call(n,x.value)])])}),{reset:w,resetValidation:C,validate:_,isValid:g,errorMessages:k}}}),ot=["color","file","time","date","datetime-local","week","month"],ut=P({autofocus:Boolean,counter:[Boolean,Number,String],counterValue:[Number,Function],prefix:String,placeholder:String,persistentPlaceholder:Boolean,persistentCounter:Boolean,suffix:String,role:String,type:{type:String,default:"text"},modelModifiers:Object,...Je(),...Qe()},"VTextField"),dt=O()({name:"VTextField",directives:{Intersect:_a},inheritAttrs:!1,props:ut(),emits:{"click:control":e=>!0,"mousedown:control":e=>!0,"update:focused":e=>!0,"update:modelValue":e=>!0},setup(e,l){let{attrs:r,emit:n,slots:a}=l;const s=E(e,"modelValue"),{isFocused:i,focus:d,blur:c}=Ke(e),u=f(()=>typeof e.counterValue=="function"?e.counterValue(s.value):typeof e.counterValue=="number"?e.counterValue:(s.value??"").toString().length),v=f(()=>{if(r.maxlength)return r.maxlength;if(!(!e.counter||typeof e.counter!="number"&&typeof e.counter!="string"))return e.counter}),k=f(()=>["plain","underlined"].includes(e.variant));function m(x,S){var I,p;!e.autofocus||!x||((p=(I=S[0].target)==null?void 0:I.focus)==null||p.call(I))}const h=F(),y=F(),o=F(),g=f(()=>ot.includes(e.type)||e.persistentPlaceholder||i.value||e.active);function b(){var x;o.value!==document.activeElement&&((x=o.value)==null||x.focus()),i.value||d()}function w(x){n("mousedown:control",x),x.target!==o.value&&(b(),x.preventDefault())}function C(x){b(),n("click:control",x)}function _(x){x.stopPropagation(),b(),se(()=>{s.value=null,ga(e["onClick:clear"],x)})}function D(x){var I;const S=x.target;if(s.value=S.value,((I=e.modelModifiers)==null?void 0:I.trim)&&["text","search","password","tel","url"].includes(e.type)){const p=[S.selectionStart,S.selectionEnd];se(()=>{S.selectionStart=p[0],S.selectionEnd=p[1]})}}return Y(()=>{const x=!!(a.counter||e.counter!==!1&&e.counter!=null),S=!!(x||a.details),[I,p]=da(r),{modelValue:M,...B}=De.filterProps(e),z=at(e);return t(De,W({ref:h,modelValue:s.value,"onUpdate:modelValue":N=>s.value=N,class:["v-text-field",{"v-text-field--prefixed":e.prefix,"v-text-field--suffixed":e.suffix,"v-input--plain-underlined":k.value},e.class],style:e.style},I,B,{centerAffix:!k.value,focused:i.value}),{...a,default:N=>{let{id:A,isDisabled:$,isDirty:V,isReadonly:j,isValid:H}=N;return t(Ge,W({ref:y,onMousedown:w,onClick:C,"onClick:clear":_,"onClick:prependInner":e["onClick:prependInner"],"onClick:appendInner":e["onClick:appendInner"],role:e.role},z,{id:A.value,active:g.value||V.value,dirty:V.value||e.dirty,disabled:$.value,focused:i.value,error:H.value===!1}),{...a,default:G=>{let{props:{class:q,...K}}=G;const Q=fe(t("input",W({ref:o,value:s.value,onInput:D,autofocus:e.autofocus,readonly:j.value,disabled:$.value,name:e.name,placeholder:e.placeholder,size:1,type:e.type,onFocus:b,onBlur:c},K,p),null),[[ca("intersect"),{handler:m},null,{once:!0}]]);return t(Z,null,[e.prefix&&t("span",{class:"v-text-field__prefix"},[t("span",{class:"v-text-field__prefix__text"},[e.prefix])]),a.default?t("div",{class:q,"data-no-activator":""},[a.default(),Q]):va(Q,{class:q}),e.suffix&&t("span",{class:"v-text-field__suffix"},[t("span",{class:"v-text-field__suffix__text"},[e.suffix])])])}})},details:S?N=>{var A;return t(Z,null,[(A=a.details)==null?void 0:A.call(a,N),x&&t(Z,null,[t("span",null,null),t(Ga,{active:e.persistentCounter||i.value,value:u.value,max:v.value},a.counter)])])}:void 0})}),Wa({},h,y,o)}}),ct={class:"fill-height fill-width align-center justify-center"},vt={key:0,class:"fill-height fill-width"},_t={__name:"EodashDatePicker",props:{inline:{type:Boolean}},setup(e){const l=e,r=f({get(){return l.inline?le.value.split("T")[0]:new Date(le.value)??new Date},set(i){l.inline&&(i=new Date(i)),i instanceof Date&&!isNaN(i)?le.value=new Date(i.getTime()-i.getTimezoneOffset()*6e4).toISOString():le.value=new Date().toISOString()}}),n=F(null),a=F(),s=F();return ue(()=>{var d,c;const i=(c=(d=n.value)==null?void 0:d.$el.parentElement)==null?void 0:c.parentElement;a.value=i!=null&&i.clientWidth?i.clientWidth+"px":void 0,s.value=i!=null&&i.clientHeight?i.clientHeight+"px":void 0}),(i,d)=>(oe(),he("span",ct,[e.inline?(oe(),he("div",vt,[t(dt,{ref:"inlineDatePicker","base-color":"primary",class:"fill-height fill-width pa-2 align-center",type:"date","bg-color":"surface",color:"primary",density:"comfortable",label:"Select Date",modelValue:r.value,"onUpdate:modelValue":d[0]||(d[0]=c=>r.value=c),variant:"plain","hide-details":""},null,8,["modelValue"])])):(oe(),na(Ka,{key:1,ref_key:"datePicker",ref:n,width:a.value,height:s.value,"hide-header":"",modelValue:r.value,"onUpdate:modelValue":d[1]||(d[1]=c=>r.value=c),color:"primary","bg-color":"surface",location:"center",class:"overflow-auto fill-height fill-width",position:"relative","show-adjacent-months":""},null,8,["width","height","modelValue"]))]))}};export{_t as default}; diff --git a/pr-preview/pr-2/assets/chunks/EodashItemFilter-BLAGx2UD.DbZDU8Tg.js b/pr-preview/pr-2/assets/chunks/EodashItemFilter-BLAGx2UD.DbZDU8Tg.js deleted file mode 100644 index 6d9f98d..0000000 --- a/pr-preview/pr-2/assets/chunks/EodashItemFilter-BLAGx2UD.DbZDU8Tg.js +++ /dev/null @@ -1 +0,0 @@ -import{a3 as c}from"./framework.CCzXaKCO.js";import{O as d,t as p,S as r}from"./eo-dash.Bz0AiLIy.js";import f from"./DynamicWebComponent-BrHVTesn.BNJLct30.js";const y={__name:"EodashItemFilter",setup(u){const a=()=>c(()=>import("./eox-itemfilter-DcQkRD2l.4YphTp3_.js"),[]),s={config:{titleProperty:"title",filterProperties:[{keys:["title","themes"],title:"Search",type:"text",expanded:!0},{key:"themes",title:"Theme",type:"multiselect",featured:!0}],aggregateResults:"themes",enableHighlighting:!0}},m=(l,t)=>{var i,o;if(l.apply((i=t.stac)==null?void 0:i.filter(e=>e.rel==="child")),r&&r.value!==""){const e=(o=t.stac)==null?void 0:o.find(n=>n.id===r.value);e&&(l.selectedResult=e,t.loadSelectedSTAC(e.href))}l.config.onSelect=async e=>{console.log(e),await t.loadSelectedSTAC(e.href)}};return(l,t)=>(p(),d(f,{link:a,"tag-name":"eox-itemfilter",properties:s,"on-mounted":m}))}};export{y as default}; diff --git a/pr-preview/pr-2/assets/chunks/EodashMap-Bxl_aqY2.BFSWz631.js b/pr-preview/pr-2/assets/chunks/EodashMap-Bxl_aqY2.BFSWz631.js deleted file mode 100644 index 48568f1..0000000 --- a/pr-preview/pr-2/assets/chunks/EodashMap-Bxl_aqY2.BFSWz631.js +++ /dev/null @@ -1,690 +0,0 @@ -const __vite__fileDeps=["assets/chunks/raw-CcGKjn8q-DFOt-i8n.Bw407ngt.js","assets/chunks/basedecoder-Qm25PwVp-CHo5Pomv.CXiqZbVR.js","assets/chunks/lzw-BOMhmEDy-Dboc93VO.P5nsTiIb.js","assets/chunks/jpeg-DNfUpLwy-Fjan-04T.BxqdrV3-.js","assets/chunks/deflate-Be2Arps5-hDqMz3RA.CZq5SbJs.js","assets/chunks/pako.esm-C3kYPGGQ-BMki8cQY.CkDq0qTE.js","assets/chunks/packbits-DaUD6MLm-Bu1PoTGa.CJbViLSe.js","assets/chunks/lerc-C9VL9kri-cIdbW0sg.BItRODpc.js","assets/chunks/framework.CCzXaKCO.js","assets/chunks/eo-dash.Bz0AiLIy.js","assets/chunks/commonjsHelpers-DaMA6jEr.DwXtFsJ3.js","assets/chunks/DynamicWebComponent-BrHVTesn.BNJLct30.js","assets/chunks/webimage-D2c098k3-DLj1LQxB.7ggil7aE.js","assets/chunks/decoder-kAoyGIq9-BBR5CgzS.DzeLK-aU.js"],__vite__mapDeps=i=>i.map(i=>__vite__fileDeps[i]); -var ax=Object.defineProperty;var lx=(i,t,e)=>t in i?ax(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e;var ac=(i,t,e)=>(lx(i,typeof t!="symbol"?t+"":t,e),e),nf=(i,t,e)=>{if(!t.has(i))throw TypeError("Cannot "+e)};var bs=(i,t,e)=>(nf(i,t,"read from private field"),e?e.call(i):t.get(i)),lc=(i,t,e)=>{if(t.has(i))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(i):t.set(i,e)},Ha=(i,t,e,n)=>(nf(i,t,"write to private field"),n?n.call(i,e):t.set(i,e),e);import{a3 as jn}from"./framework.CCzXaKCO.js";import{_ as hx,V as Es,t as cx,O as ux,a0 as dx,a1 as gx,g as fx,P as px}from"./eo-dash.Bz0AiLIy.js";import{o as Os,l as mx}from"./commonjsHelpers-DaMA6jEr.DwXtFsJ3.js";import _x from"./DynamicWebComponent-BrHVTesn.BNJLct30.js";var Um={exports:{}},ml={exports:{}};/*! https://mths.be/punycode v1.4.0 by @mathias */ml.exports;var sf;function yx(){return sf||(sf=1,function(i,t){(function(e){var n=t&&!t.nodeType&&t,s=i&&!i.nodeType&&i,r=typeof Os=="object"&&Os;(r.global===r||r.window===r||r.self===r)&&(e=r);var o,a=2147483647,l=36,h=1,c=26,u=38,g=700,f=72,p=128,_="-",x=/^xn--/,v=/[^\x20-\x7E]/,w=/[\x2E\u3002\uFF0E\uFF61]/g,E={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},S=l-h,T=Math.floor,R=String.fromCharCode,C;function P(L){throw new RangeError(E[L])}function N(L,k){for(var W=L.length,K=[];W--;)K[W]=k(L[W]);return K}function U(L,k){var W=L.split("@"),K="";W.length>1&&(K=W[0]+"@",L=W[1]),L=L.replace(w,".");var G=L.split("."),H=N(G,k).join(".");return K+H}function j(L){for(var k=[],W=0,K=L.length,G,H;W=55296&&G<=56319&&W65535&&(k-=65536,W+=R(k>>>10&1023|55296),k=56320|k&1023),W+=R(k),W}).join("")}function d(L){return L-48<10?L-22:L-65<26?L-65:L-97<26?L-97:l}function m(L,k){return L+22+75*(L<26)-((k!=0)<<5)}function y(L,k,W){var K=0;for(L=W?T(L/g):L>>1,L+=T(L/k);L>S*c>>1;K+=l)L=T(L/S);return T(K+(S+1)*L/(L+u))}function b(L){var k=[],W=L.length,K,G=0,H=p,Q=f,nt,xt,dt,Tt,Et,kt,Yt,ue,Ht;for(nt=L.lastIndexOf(_),nt<0&&(nt=0),xt=0;xt=128&&P("not-basic"),k.push(L.charCodeAt(xt));for(dt=nt>0?nt+1:0;dt=W&&P("invalid-input"),Yt=d(L.charCodeAt(dt++)),(Yt>=l||Yt>T((a-G)/Et))&&P("overflow"),G+=Yt*Et,ue=kt<=Q?h:kt>=Q+c?c:kt-Q,!(YtT(a/Ht)&&P("overflow"),Et*=Ht;K=k.length+1,Q=y(G-Tt,K,Tt==0),T(G/K)>a-H&&P("overflow"),H+=T(G/K),G%=K,k.splice(G++,0,H)}return B(k)}function M(L){var k,W,K,G,H,Q,nt,xt,dt,Tt,Et,kt=[],Yt,ue,Ht,Ke;for(L=j(L),Yt=L.length,k=p,W=0,H=f,Q=0;Q=k&&EtT((a-W)/ue)&&P("overflow"),W+=(nt-k)*ue,k=nt,Q=0;Qa&&P("overflow"),Et==k){for(xt=W,dt=l;Tt=dt<=H?h:dt>=H+c?c:dt-H,!(xt1;f++)u.splice(0,1);a[g]=u.join("")}var p=-1,_=0,x=0,v=-1,w=!1;for(g=0;g_&&(p=v,_=x)):a[g]==="0"&&(w=!0,v=g,x=1);x>_&&(p=v,_=x),_>1&&a.splice(p,_,""),l=a.length;var E="";for(a[0]===""&&(E=":"),g=0;g=s.length-1)return!1;var o=s.lastIndexOf(".",r-1);if(o<=0||o>=r-1)return!1;var a=n.list[s.slice(r+1)];return a?a.indexOf(" "+s.slice(o+1,r)+" ")>=0:!1},is:function(s){var r=s.lastIndexOf(".");if(r<=0||r>=s.length-1)return!1;var o=s.lastIndexOf(".",r-1);if(o>=0)return!1;var a=n.list[s.slice(r+1)];return a?a.indexOf(" "+s.slice(0,r)+" ")>=0:!1},get:function(s){var r=s.lastIndexOf(".");if(r<=0||r>=s.length-1)return null;var o=s.lastIndexOf(".",r-1);if(o<=0||o>=r-1)return null;var a=n.list[s.slice(r+1)];return!a||a.indexOf(" "+s.slice(o+1,r)+" ")<0?null:s.slice(o+1)},noConflict:function(){return t.SecondLevelDomains===this&&(t.SecondLevelDomains=e),this}};return n})}(af)),af.exports}/*! - * URI.js - Mutating URLs - * - * Version: 1.19.11 - * - * Author: Rodney Rehm - * Web: http://medialize.github.io/URI.js/ - * - * Licensed under - * MIT License http://www.opensource.org/licenses/mit-license - * - */(function(i){(function(t,e){i.exports?i.exports=e(yx(),xx(),vx()):t.URI=e(t.punycode,t.IPv6,t.SecondLevelDomains,t)})(Os,function(t,e,n,s){var r=s&&s.URI;function o(d,m){var y=arguments.length>=1,b=arguments.length>=2;if(!(this instanceof o))return y?b?new o(d,m):new o(d):new o;if(d===void 0){if(y)throw new TypeError("undefined is not a valid argument for URI");typeof location<"u"?d=location.href+"":d=""}if(d===null&&y)throw new TypeError("null is not a valid argument for URI");return this.href(d),m!==void 0?this.absoluteTo(m):this}function a(d){return/^[0-9]+$/.test(d)}o.version="1.19.11";var l=o.prototype,h=Object.prototype.hasOwnProperty;function c(d){return d.replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")}function u(d){return d===void 0?"Undefined":String(Object.prototype.toString.call(d)).slice(8,-1)}function g(d){return u(d)==="Array"}function f(d,m){var y={},b,M;if(u(m)==="RegExp")y=null;else if(g(m))for(b=0,M=m.length;b]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?«»“”‘’]))/ig,o.findUri={start:/\b(?:([a-z][a-z0-9.+-]*:\/\/)|www\.)/gi,end:/[\s\r\n]|$/,trim:/[`!()\[\]{};:'".,<>?«»“”„‘’]+$/,parens:/(\([^\)]*\)|\[[^\]]*\]|\{[^}]*\}|<[^>]*>)/g},o.leading_whitespace_expression=/^[\x00-\x20\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/,o.ascii_tab_whitespace=/[\u0009\u000A\u000D]+/g,o.defaultPorts={http:"80",https:"443",ftp:"21",gopher:"70",ws:"80",wss:"443"},o.hostProtocols=["http","https"],o.invalid_hostname_characters=/[^a-zA-Z0-9\.\-:_]/,o.domAttributes={a:"href",blockquote:"cite",link:"href",base:"href",script:"src",form:"action",img:"src",area:"href",iframe:"src",embed:"src",source:"src",track:"src",input:"src",audio:"src",video:"src"},o.getDomAttribute=function(d){if(!(!d||!d.nodeName)){var m=d.nodeName.toLowerCase();if(!(m==="input"&&d.type!=="image"))return o.domAttributes[m]}};function v(d){return escape(d)}function w(d){return encodeURIComponent(d).replace(/[!'()*]/g,v).replace(/\*/g,"%2A")}o.encode=w,o.decode=decodeURIComponent,o.iso8859=function(){o.encode=escape,o.decode=unescape},o.unicode=function(){o.encode=w,o.decode=decodeURIComponent},o.characters={pathname:{encode:{expression:/%(24|26|2B|2C|3B|3D|3A|40)/ig,map:{"%24":"$","%26":"&","%2B":"+","%2C":",","%3B":";","%3D":"=","%3A":":","%40":"@"}},decode:{expression:/[\/\?#]/g,map:{"/":"%2F","?":"%3F","#":"%23"}}},reserved:{encode:{expression:/%(21|23|24|26|27|28|29|2A|2B|2C|2F|3A|3B|3D|3F|40|5B|5D)/ig,map:{"%3A":":","%2F":"/","%3F":"?","%23":"#","%5B":"[","%5D":"]","%40":"@","%21":"!","%24":"$","%26":"&","%27":"'","%28":"(","%29":")","%2A":"*","%2B":"+","%2C":",","%3B":";","%3D":"="}}},urnpath:{encode:{expression:/%(21|24|27|28|29|2A|2B|2C|3B|3D|40)/ig,map:{"%21":"!","%24":"$","%27":"'","%28":"(","%29":")","%2A":"*","%2B":"+","%2C":",","%3B":";","%3D":"=","%40":"@"}},decode:{expression:/[\/\?#:]/g,map:{"/":"%2F","?":"%3F","#":"%23",":":"%3A"}}}},o.encodeQuery=function(d,m){var y=o.encode(d+"");return m===void 0&&(m=o.escapeQuerySpace),m?y.replace(/%20/g,"+"):y},o.decodeQuery=function(d,m){d+="",m===void 0&&(m=o.escapeQuerySpace);try{return o.decode(m?d.replace(/\+/g,"%20"):d)}catch{return d}};var E={encode:"encode",decode:"decode"},S,T=function(d,m){return function(y){try{return o[m](y+"").replace(o.characters[d][m].expression,function(b){return o.characters[d][m].map[b]})}catch{return y}}};for(S in E)o[S+"PathSegment"]=T("pathname",E[S]),o[S+"UrnPathSegment"]=T("urnpath",E[S]);var R=function(d,m,y){return function(b){var M;y?M=function(k){return o[m](o[y](k))}:M=o[m];for(var I=(b+"").split(d),A=0,L=I.length;A-1&&(m.fragment=d.substring(y+1)||null,d=d.substring(0,y)),y=d.indexOf("?"),y>-1&&(m.query=d.substring(y+1)||null,d=d.substring(0,y)),d=d.replace(/^(https?|ftp|wss?)?:+[/\\]*/i,"$1://"),d=d.replace(/^[/\\]{2,}/i,"//"),d.substring(0,2)==="//"?(m.protocol=null,d=d.substring(2),d=o.parseAuthority(d,m)):(y=d.indexOf(":"),y>-1&&(m.protocol=d.substring(0,y)||null,m.protocol&&!m.protocol.match(o.protocol_expression)?m.protocol=void 0:d.substring(y+1,y+3).replace(/\\/g,"/")==="//"?(d=d.substring(y+3),d=o.parseAuthority(d,m)):(d=d.substring(y+1),m.urn=!0))),m.path=d,m},o.parseHost=function(d,m){d||(d=""),d=d.replace(/\\/g,"/");var y=d.indexOf("/"),b,M;if(y===-1&&(y=d.length),d.charAt(0)==="[")b=d.indexOf("]"),m.hostname=d.substring(1,b)||null,m.port=d.substring(b+2,y)||null,m.port==="/"&&(m.port=null);else{var I=d.indexOf(":"),A=d.indexOf("/"),L=d.indexOf(":",I+1);L!==-1&&(A===-1||L-1?M:d.length-1),A;return I>-1&&(M===-1||I-1?H=H.slice(0,Q)+H.slice(Q).replace(I,""):H=H.replace(I,""),!(H.length<=k[0].length)&&!(y.ignore&&y.ignore.test(H))){G=W+H.length;var dt=m(H,W,G,d);if(dt===void 0){b.lastIndex=G;continue}dt=String(dt),d=d.slice(0,W)+dt+d.slice(G),b.lastIndex=W+dt.length}}return b.lastIndex=0,d},o.ensureValidHostname=function(d,m){var y=!!d,b=!!m,M=!1;if(b&&(M=p(o.hostProtocols,m)),M&&!y)throw new TypeError("Hostname cannot be empty, if protocol is "+m);if(d&&d.match(o.invalid_hostname_characters)){if(!t)throw new TypeError('Hostname "'+d+'" contains characters other than [A-Z0-9.-:_] and Punycode.js is not available');if(t.toASCII(d).match(o.invalid_hostname_characters))throw new TypeError('Hostname "'+d+'" contains characters other than [A-Z0-9.-:_]')}},o.ensureValidPort=function(d){if(d){var m=Number(d);if(!(a(m)&&m>0&&m<65536))throw new TypeError('Port "'+d+'" is not a valid port')}},o.noConflict=function(d){if(d){var m={URI:this.noConflict()};return s.URITemplate&&typeof s.URITemplate.noConflict=="function"&&(m.URITemplate=s.URITemplate.noConflict()),s.IPv6&&typeof s.IPv6.noConflict=="function"&&(m.IPv6=s.IPv6.noConflict()),s.SecondLevelDomains&&typeof s.SecondLevelDomains.noConflict=="function"&&(m.SecondLevelDomains=s.SecondLevelDomains.noConflict()),m}else s.URI===this&&(s.URI=r);return this},l.build=function(d){return d===!0?this._deferred_build=!0:(d===void 0||this._deferred_build)&&(this._string=o.build(this._parts),this._deferred_build=!1),this},l.clone=function(){return new o(this)},l.valueOf=l.toString=function(){return this.build(!1)._string};function C(d){return function(m,y){return m===void 0?this._parts[d]||"":(this._parts[d]=m||null,this.build(!y),this)}}function P(d,m){return function(y,b){return y===void 0?this._parts[d]||"":(y!==null&&(y=y+"",y.charAt(0)===m&&(y=y.substring(1))),this._parts[d]=y,this.build(!b),this)}}l.protocol=C("protocol"),l.username=C("username"),l.password=C("password"),l.hostname=C("hostname"),l.port=C("port"),l.query=P("query","?"),l.fragment=P("fragment","#"),l.search=function(d,m){var y=this.query(d,m);return typeof y=="string"&&y.length?"?"+y:y},l.hash=function(d,m){var y=this.fragment(d,m);return typeof y=="string"&&y.length?"#"+y:y},l.pathname=function(d,m){if(d===void 0||d===!0){var y=this._parts.path||(this._parts.hostname?"/":"");return d?(this._parts.urn?o.decodeUrnPath:o.decodePath)(y):y}else return this._parts.urn?this._parts.path=d?o.recodeUrnPath(d):"":this._parts.path=d?o.recodePath(d):"/",this.build(!m),this},l.path=l.pathname,l.href=function(d,m){var y;if(d===void 0)return this.toString();this._string="",this._parts=o._parts();var b=d instanceof o,M=typeof d=="object"&&(d.hostname||d.path||d.pathname);if(d.nodeName){var I=o.getDomAttribute(d);d=d[I]||"",M=!1}if(!b&&M&&d.pathname!==void 0&&(d=d.toString()),typeof d=="string"||d instanceof String)this._parts=o.parse(String(d),this._parts);else if(b||M){var A=b?d._parts:d;for(y in A)y!=="query"&&h.call(this._parts,y)&&(this._parts[y]=A[y]);A.query&&this.query(A.query,!1)}else throw new TypeError("invalid input");return this.build(!m),this},l.is=function(d){var m=!1,y=!1,b=!1,M=!1,I=!1,A=!1,L=!1,k=!this._parts.urn;switch(this._parts.hostname&&(k=!1,y=o.ip4_expression.test(this._parts.hostname),b=o.ip6_expression.test(this._parts.hostname),m=y||b,M=!m,I=M&&n&&n.has(this._parts.hostname),A=M&&o.idn_expression.test(this._parts.hostname),L=M&&o.punycode_expression.test(this._parts.hostname)),d.toLowerCase()){case"relative":return k;case"absolute":return!k;case"domain":case"name":return M;case"sld":return I;case"ip":return m;case"ip4":case"ipv4":case"inet4":return y;case"ip6":case"ipv6":case"inet6":return b;case"idn":return A;case"url":return!this._parts.urn;case"urn":return!!this._parts.urn;case"punycode":return L}return null};var N=l.protocol,U=l.port,j=l.hostname;l.protocol=function(d,m){if(d&&(d=d.replace(/:(\/\/)?$/,""),!d.match(o.protocol_expression)))throw new TypeError('Protocol "'+d+`" contains characters other than [A-Z0-9.+-] or doesn't start with [A-Z]`);return N.call(this,d,m)},l.scheme=l.protocol,l.port=function(d,m){return this._parts.urn?d===void 0?"":this:(d!==void 0&&(d===0&&(d=null),d&&(d+="",d.charAt(0)===":"&&(d=d.substring(1)),o.ensureValidPort(d))),U.call(this,d,m))},l.hostname=function(d,m){if(this._parts.urn)return d===void 0?"":this;if(d!==void 0){var y={preventInvalidHostname:this._parts.preventInvalidHostname},b=o.parseHost(d,y);if(b!=="/")throw new TypeError('Hostname "'+d+'" contains characters other than [A-Z0-9.-]');d=y.hostname,this._parts.preventInvalidHostname&&o.ensureValidHostname(d,this._parts.protocol)}return j.call(this,d,m)},l.origin=function(d,m){if(this._parts.urn)return d===void 0?"":this;if(d===void 0){var y=this.protocol(),b=this.authority();return b?(y?y+"://":"")+this.authority():""}else{var M=o(d);return this.protocol(M.protocol()).authority(M.authority()).build(!m),this}},l.host=function(d,m){if(this._parts.urn)return d===void 0?"":this;if(d===void 0)return this._parts.hostname?o.buildHost(this._parts):"";var y=o.parseHost(d,this._parts);if(y!=="/")throw new TypeError('Hostname "'+d+'" contains characters other than [A-Z0-9.-]');return this.build(!m),this},l.authority=function(d,m){if(this._parts.urn)return d===void 0?"":this;if(d===void 0)return this._parts.hostname?o.buildAuthority(this._parts):"";var y=o.parseAuthority(d,this._parts);if(y!=="/")throw new TypeError('Hostname "'+d+'" contains characters other than [A-Z0-9.-]');return this.build(!m),this},l.userinfo=function(d,m){if(this._parts.urn)return d===void 0?"":this;if(d===void 0){var y=o.buildUserinfo(this._parts);return y&&y.substring(0,y.length-1)}else return d[d.length-1]!=="@"&&(d+="@"),o.parseUserinfo(d,this._parts),this.build(!m),this},l.resource=function(d,m){var y;return d===void 0?this.path()+this.search()+this.hash():(y=o.parse(d),this._parts.path=y.path,this._parts.query=y.query,this._parts.fragment=y.fragment,this.build(!m),this)},l.subdomain=function(d,m){if(this._parts.urn)return d===void 0?"":this;if(d===void 0){if(!this._parts.hostname||this.is("IP"))return"";var y=this._parts.hostname.length-this.domain().length-1;return this._parts.hostname.substring(0,y)||""}else{var b=this._parts.hostname.length-this.domain().length,M=this._parts.hostname.substring(0,b),I=new RegExp("^"+c(M));if(d&&d.charAt(d.length-1)!=="."&&(d+="."),d.indexOf(":")!==-1)throw new TypeError("Domains cannot contain colons");return d&&o.ensureValidHostname(d,this._parts.protocol),this._parts.hostname=this._parts.hostname.replace(I,d),this.build(!m),this}},l.domain=function(d,m){if(this._parts.urn)return d===void 0?"":this;if(typeof d=="boolean"&&(m=d,d=void 0),d===void 0){if(!this._parts.hostname||this.is("IP"))return"";var y=this._parts.hostname.match(/\./g);if(y&&y.length<2)return this._parts.hostname;var b=this._parts.hostname.length-this.tld(m).length-1;return b=this._parts.hostname.lastIndexOf(".",b-1)+1,this._parts.hostname.substring(b)||""}else{if(!d)throw new TypeError("cannot set domain empty");if(d.indexOf(":")!==-1)throw new TypeError("Domains cannot contain colons");if(o.ensureValidHostname(d,this._parts.protocol),!this._parts.hostname||this.is("IP"))this._parts.hostname=d;else{var M=new RegExp(c(this.domain())+"$");this._parts.hostname=this._parts.hostname.replace(M,d)}return this.build(!m),this}},l.tld=function(d,m){if(this._parts.urn)return d===void 0?"":this;if(typeof d=="boolean"&&(m=d,d=void 0),d===void 0){if(!this._parts.hostname||this.is("IP"))return"";var y=this._parts.hostname.lastIndexOf("."),b=this._parts.hostname.substring(y+1);return m!==!0&&n&&n.list[b.toLowerCase()]&&n.get(this._parts.hostname)||b}else{var M;if(d)if(d.match(/[^a-zA-Z0-9-]/))if(n&&n.is(d))M=new RegExp(c(this.tld())+"$"),this._parts.hostname=this._parts.hostname.replace(M,d);else throw new TypeError('TLD "'+d+'" contains characters other than [A-Z0-9]');else{if(!this._parts.hostname||this.is("IP"))throw new ReferenceError("cannot set TLD on non-domain host");M=new RegExp(c(this.tld())+"$"),this._parts.hostname=this._parts.hostname.replace(M,d)}else throw new TypeError("cannot set TLD empty");return this.build(!m),this}},l.directory=function(d,m){if(this._parts.urn)return d===void 0?"":this;if(d===void 0||d===!0){if(!this._parts.path&&!this._parts.hostname)return"";if(this._parts.path==="/")return"/";var y=this._parts.path.length-this.filename().length-1,b=this._parts.path.substring(0,y)||(this._parts.hostname?"/":"");return d?o.decodePath(b):b}else{var M=this._parts.path.length-this.filename().length,I=this._parts.path.substring(0,M),A=new RegExp("^"+c(I));return this.is("relative")||(d||(d="/"),d.charAt(0)!=="/"&&(d="/"+d)),d&&d.charAt(d.length-1)!=="/"&&(d+="/"),d=o.recodePath(d),this._parts.path=this._parts.path.replace(A,d),this.build(!m),this}},l.filename=function(d,m){if(this._parts.urn)return d===void 0?"":this;if(typeof d!="string"){if(!this._parts.path||this._parts.path==="/")return"";var y=this._parts.path.lastIndexOf("/"),b=this._parts.path.substring(y+1);return d?o.decodePathSegment(b):b}else{var M=!1;d.charAt(0)==="/"&&(d=d.substring(1)),d.match(/\.?\//)&&(M=!0);var I=new RegExp(c(this.filename())+"$");return d=o.recodePath(d),this._parts.path=this._parts.path.replace(I,d),M?this.normalizePath(m):this.build(!m),this}},l.suffix=function(d,m){if(this._parts.urn)return d===void 0?"":this;if(d===void 0||d===!0){if(!this._parts.path||this._parts.path==="/")return"";var y=this.filename(),b=y.lastIndexOf("."),M,I;return b===-1?"":(M=y.substring(b+1),I=/^[a-z0-9%]+$/i.test(M)?M:"",d?o.decodePathSegment(I):I)}else{d.charAt(0)==="."&&(d=d.substring(1));var A=this.suffix(),L;if(A)d?L=new RegExp(c(A)+"$"):L=new RegExp(c("."+A)+"$");else{if(!d)return this;this._parts.path+="."+o.recodePath(d)}return L&&(d=o.recodePath(d),this._parts.path=this._parts.path.replace(L,d)),this.build(!m),this}},l.segment=function(d,m,y){var b=this._parts.urn?":":"/",M=this.path(),I=M.substring(0,1)==="/",A=M.split(b);if(d!==void 0&&typeof d!="number"&&(y=m,m=d,d=void 0),d!==void 0&&typeof d!="number")throw new Error('Bad segment "'+d+'", must be 0-based integer');if(I&&A.shift(),d<0&&(d=Math.max(A.length+d,0)),m===void 0)return d===void 0?A:A[d];if(d===null||A[d]===void 0)if(g(m)){A=[];for(var L=0,k=m.length;Lv)return 1;if(v>x)return-1}var w=f[f.length-1],E=p[p.length-1];if(w&&E){var S=w.split(".").map(r),T=E.split(".").map(r);for(_=0;_T[_])return 1;if(T[_]>S[_])return-1}}else if(w||E)return w?-1:1;return 0}var l=[">",">=","=","<","<="],h={">":[1],">=":[0,1],"=":[0],"<=":[-1,0],"<":[-1]};function c(u){if(typeof u!="string")throw new TypeError("Invalid operator type, expected string but got "+typeof u);if(l.indexOf(u)===-1)throw new TypeError("Invalid operator, expected one of "+l.join("|"))}return a.validate=function(u){return typeof u=="string"&&e.test(u)},a.compare=function(u,g,f){c(f);var p=a(u,g);return h[f].indexOf(p)>-1},a})})(Sx);const Te={classification:"https://stac-extensions.github.io/classification/v1.1.0/schema.json",datacube:"https://stac-extensions.github.io/datacube/v2.1.0/schema.json",eo:"https://stac-extensions.github.io/eo/v1.0.0/schema.json",file:"https://stac-extensions.github.io/file/v1.0.0/schema.json","item-assets":"https://stac-extensions.github.io/item-assets/v1.0.0/schema.json",label:"https://stac-extensions.github.io/label/v1.0.1/schema.json",pointcloud:"https://stac-extensions.github.io/pointcloud/v1.0.0/schema.json",processing:"https://stac-extensions.github.io/processing/v1.1.0/schema.json",projection:"https://stac-extensions.github.io/projection/v1.0.0/schema.json",raster:"https://stac-extensions.github.io/raster/v1.1.0/schema.json",sar:"https://stac-extensions.github.io/sar/v1.0.0/schema.json",sat:"https://stac-extensions.github.io/sat/v1.0.0/schema.json",scientific:"https://stac-extensions.github.io/scientific/v1.0.0/schema.json",table:"https://stac-extensions.github.io/table/v1.2.0/schema.json",timestamps:"https://stac-extensions.github.io/timestamps/v1.0.0/schema.json",version:"https://stac-extensions.github.io/version/v1.0.0/schema.json",view:"https://stac-extensions.github.io/view/v1.0.0/schema.json"},Ir={itemAndCollection:{"cube:":Te.datacube,"eo:":Te.eo,"file:":Te.file,"label:":Te.label,"pc:":Te.pointcloud,"processing:":Te.processing,"proj:":Te.projection,"raster:":Te.raster,"sar:":Te.sar,"sat:":Te.sat,"sci:":Te.scientific,"view:":Te.view,version:Te.version,deprecated:Te.version,published:Te.timestamps,expires:Te.timestamps,unpublished:Te.timestamps},catalog:{},collection:{item_assets:Te["item-assets"]},item:{}};Ir.collection=Object.assign(Ir.collection,Ir.itemAndCollection);Ir.item=Object.assign(Ir.item,Ir.itemAndCollection);function ya(i){let t=i.length>=6,e=i[0],n=i[t?3:2],s=i[1],r=i[t?4:3],o={west:e,east:n,south:s,north:r};return t&&(o.base=i[2],o.height=i[5]),o}function hc(i){let{west:t,east:e,south:n,north:s}=ya(i);return[[[t,s],[t,n],[e,n],[e,s],[t,s]]]}function Tx(i){if(!In(i))return null;let t=ya(i),e=[];if(Bm(i)){let n=(t.west+360+t.east)/2;n>180&&(n-=360),e.push(n)}else e.push((t.west+t.east)/2);return e.push((t.south+t.north)/2),typeof t.base<"u"&&e.push((t.base+t.height)/2),e}function Mx(i){if(In(i)?i=[i]:Array.isArray(i)&&(i=i.filter(n=>In(n))),!Array.isArray(i)||i.length===0)return null;let t=i.reduce((n,s)=>{if(Bm(s)){let{west:r,east:o,south:a,north:l}=ya(s);n.push(hc([-180,a,o,l])),n.push(hc([r,a,180,l]))}else n.push(hc(s));return n},[]),e=null;if(t.length===1?e={type:"Polygon",coordinates:t[0]}:t.length>1&&(e={type:"MultiPolygon",coordinates:t}),e)return{type:"Feature",geometry:e,properties:{}}}function In(i){if(!Array.isArray(i)||![4,6].includes(i.length)||i.some(r=>typeof r!="number"))return!1;let{west:t,east:e,south:n,north:s}=ya(i);return n<=s&&t>=-180&&t<=180&&n>=-90&&e<=180&&e>=-180&&s<=90}function Bm(i){if(!In(i))return!1;let{west:t,east:e}=ya(i);return t>e}function ri(i){return typeof i=="string"&&i.length>0}function ti(i){return typeof i=="object"&&i===Object(i)&&!Array.isArray(i)}function Wm(...i){if(i=i.filter(t=>Array.isArray(t)),i.length>1){let t=Math.max(...i.map(n=>n.length)),e=[];for(let n=0;ns[n])));return e}else if(i.length===1)return i[0];return[]}function Rx(i){switch(i){case"int8":return-128;case"int16":return-32768;case"int32":return-2147483648}return i.startsWith("u")?0:null}function Cx(i){switch(i){case"int8":return 127;case"uint8":return 255;case"int16":return 32767;case"uint16":return 65535;case"int32":return 2147483647;case"uint32":return 4294967295}return null}class uh{constructor(t,e={},n=[]){if(!ti(t))throw new Error("Given data is not an object");if(t instanceof uh){for(let s of n)this[s]=t[s];t=t.toJSON()}this._keyMap=e,this._privateKeys=["_keyMap","_privateKeys"].concat(n);for(let s in t)typeof this[s]>"u"&&(s in e?this[s]=e[s](t[s],this):this[s]=t[s])}isItem(){return this.type==="Feature"}isCatalog(){return this.type==="Catalog"}isCatalogLike(){return this.isCatalog()||this.isCollection()}isCollection(){return this.type==="Collection"}isItemCollection(){return this.type==="FeatureCollection"}isCollectionCollection(){return!1}isAsset(){return!1}isLink(){return!1}getObjectType(){}getAbsoluteUrl(){return null}getMetadata(t){return this[t]}toGeoJSON(){return null}getBoundingBox(){return null}getCenter(){return Tx(this.getBoundingBox())}getBoundingBoxes(){return[]}toJSON(){let t={};return Object.keys(this).forEach(e=>{if(typeof this[e]=="function"||this._privateKeys.includes(e))return;let n=this[e];if(e in this._keyMap){let s=Array.isArray(n)?[]:{};for(let r in n)s[r]=n[r].toJSON();n=s}t[e]=n}),t}}const Ix="application/geo+json",Px=["application/json",Ix,"text/json"],cf=["image/gif","image/jpeg","image/apng","image/png","image/webp"],qm=["image/tiff; application=geotiff; profile=cloud-optimized","image/vnd.stac.geotiff; cloud-optimized=true"],Xm=["application/geotiff","image/tiff; application=geotiff","image/vnd.stac.geotiff"].concat(qm);function Du(i,t,e=!1){return Array.isArray(t)||(t=[t]),e&&typeof i>"u"?!0:typeof i!="string"?!1:(t=t.map(n=>n.toLowerCase()),t.includes(i.toLowerCase()))}function Ax(i,t=!1){return Du(i,Px,t)}class Zm extends uh{constructor(t,e=null,n={},s=[]){super(t,n,["_context"].concat(s)),this._context||(this._context=e)}getAbsoluteUrl(t=!0){return this._context?Ml(this.href,this._context.getAbsoluteUrl(),t):this.href.includes("://")?this.href:null}getContext(){return this._context}canBrowserDisplayImage(t=!1){if(typeof this.href!="string"||!t&&typeof this.type>"u")return!1;let e=new $c(this.href),n=e.protocol().toLowerCase(),s=e.suffix().toLowerCase();return ri(n)&&!hf.includes(n)?!1:ri(this.type)&&cf.includes(this.type.toLowerCase())?!0:!!(typeof this.type>"u"&&ri(s)&&(s==="jpg"||cf.includes("image/"+s)))}isType(t){return ri(this.type)&&Du(this.type,t)}isGeoTIFF(){return this.isType(Xm)}isCOG(){return this.isType(qm)}isHTTP(){let t=this.getAbsoluteUrl(!1).protocol().toLowerCase();return ri(t)&&hf.includes(t)}}class Gu extends Zm{constructor(t,e=null){super(t,e)}isLink(){return!0}getObjectType(){return"Link"}static fromLinks(t,e=null){return Array.isArray(t)?t.map(n=>ti(n)?new Gu(n,e):n):[]}}class Lx extends uh{constructor(t,e=null,n={},s=[]){if(super(t,Object.assign({links:Gu.fromLinks},n),["_url"].concat(s)),!this._url&&(this._url=e,!this._url)){let r=this.getSelfLink();r&&(this._url=r.href)}}getAbsoluteUrl(){return this._url}setAbsoluteUrl(t){this._url=t}getStacLinksWithRel(t,e=!0){return this.getLinksWithRels([t]).filter(n=>Ax(n.type,e))}getStacLinkWithRel(t,e=!0){const n=this.getStacLinksWithRel(t,e);return n.length>0?n[0]:null}getLinks(){return Array.isArray(this.links)?this.links.filter(t=>ti(t)&&ri(t.href)):[]}getLinkWithRel(t){return this.getLinks().find(e=>e.rel===t)||null}getLinksWithRels(t){return this.getLinks().filter(e=>t.includes(e.rel))}getLinksWithOtherRels(t){return this.getLinks().filter(e=>!t.includes(e.rel))}getSelfLink(){return this.getStacLinkWithRel("self")}getRootLink(){return this.getStacLinkWithRel("root")}getParentLink(){return this.getStacLinkWithRel("parent")}}class Vo extends Zm{constructor(t,e=null,n=null){super(t,n,{},["_key"]),this._key||(this._key=e)}getObjectType(){return"Asset"}isAsset(){return!0}getAbsoluteUrl(t=!0){return this.isDefinition()?null:super.getAbsoluteUrl(t)}getKey(){return this._key}getMetadata(t){if(typeof this[t]<"u")return this[t];if(this._context)return this._context.getMetadata(t)}getBands(){return Wm(this["eo:bands"],this["raster:bands"])}findVisualBands(){let t={red:null,green:null,blue:null},e=this.getBands();for(let n in e){let s=parseInt(n,10),r=e[s];ti(r)&&ri(r.common_name)&&r.common_name in t&&(t[r.common_name]={index:s,band:r})}return Object.values(t).every(n=>n!==null)?t:null}findBand(t,e="name",n=null){Array.isArray(t)||(t=[t]),ti(n)||(n=this.getBands());let s=n.findIndex(r=>ti(r)&&t.includes(r[e]));return s>=0?{index:s,band:n[s]}:null}getBand(t){return ti(t)||t===null?t:this.getBands()[t]||null}getMinMaxValues(t=null){t=this.getBand(t);const e={minimum:null,maximum:null},n=a=>a.minimum!==null&&a.maximum!==null;if(t&&(ti(t.statistics)&&(typeof t.statistics.minimum=="number"&&(e.minimum=t.statistics.minimum),typeof t.statistics.maximum=="number"&&(e.maximum=t.statistics.maximum),n(e))||ti(t.histogram)&&(typeof t.histogram.min=="number"&&(e.minimum=t.histogram.min),typeof t.histogram.max=="number"&&(e.maximum=t.histogram.max),n(e))))return e;let s=this.getMetadata("classification:classes");if(Array.isArray(s)&&(s.reduce((a,l)=>(a.minimum=Math.min(a.minimum,l.value),a.maximum=Math.max(a.maximum,l.value),a),e),n(e)))return e;let r=this.getMetadata("file:values");if(Array.isArray(r)&&(r.reduce((a,l)=>(a.minimum=Math.min(a.minimum,...l.values),a.maximum=Math.max(a.maximum,...l.values),a),e),n(e)))return e;let o=ti(t)&&t.data_type||this.getMetadata("file:data_type");return o&&(e.minimum=Rx(o),e.maximum=Cx(o)),e}getNoDataValues(t=null){t=this.getBand(t);let e=[];if(t&&typeof t.nodata<"u")e.push(t.nodata);else{let n=this.getMetadata("file:nodata");if(typeof n<"u")e=n;else{let s=this.getMetadata("classification:classes");Array.isArray(s)&&(e=s.filter(r=>!!r.nodata).map(r=>r.value))}}return e.map(n=>n==="nan"?NaN:n==="+inf"?1/0:n==="-inf"?-1/0:n)}isDefinition(){return!ri(this.href)}isHTTP(){return this.isDefinition()?null:super.isHTTP()}hasRole(t,e=!1){return Array.isArray(t)||(t=[t]),e&&t.includes(this.getKey())?!0:Array.isArray(this.roles)&&!!this.roles.find(n=>t.includes(n))}static fromAssets(t,e=null){let n={};if(ti(t))for(let s in t)n[s]=new Vo(t[s],s,e);return n}}class dh extends Lx{constructor(t,e=null,n={},s=[]){super(t,e,n,s)}getTemporalExtent(){return null}getTemporalExtents(){return[]}getIcons(t=!0){return this.getLinksWithRels(["icon"]).filter(e=>e.canBrowserDisplayImage(t))}getThumbnails(t=!0,e=null){let n=this.getAssetsWithRoles(["thumbnail","overview"],!0);if(n.length===0&&(n=this.getLinksWithRels(["preview"])),t&&(n=n.filter(s=>s.canBrowserDisplayImage())),e&&n.length>1){let s=r=>Array.isArray(r.roles)&&r.roles.includes(e)||r.getKey()===e;n=n.filter(s).concat(n.filter(r=>!s(r)))}return n}getDefaultGeoTIFF(t=!0,e=!1){var n;return(n=this.rankGeoTIFFs(t,e)[0])==null?void 0:n.asset}rankGeoTIFFs(t=!0,e=!1,n=null,s=null){ti(n)||(n={data:1,visual:2,thumbnail:2,overview:3});let r=[],o=this.getAssetsByTypes(Xm);t&&(o=o.filter(l=>l.isHTTP()&&(!e||l.isCOG())));let a=Object.entries(n);for(let l of o){let h=0;if(a.length>0){let c=a.filter(([u])=>l.hasRole(u,!0)).map(([,u])=>u);c.length>0&&(h+=Math.max(...c))}!e&&l.isCOG()&&(h+=2),l.findVisualBands()&&(h+=1),typeof s=="function"&&(h+=s(l)),r.push({asset:l,score:h})}return r.sort((l,h)=>h.score-l.score),r}findVisualAssets(){let t={red:null,green:null,blue:null},e=Object.keys(t),n=this.getAssets();for(let s of n){let r=s.getBands();if(r.length!==1)continue;let o=s.findBand(e,"common_name",r);o&&(t[o.band.common_name]=s)}return Object.values(t).every(s=>s!==null)?t:null}getAsset(t){return ti(this.assets)&&this.assets[t]||null}getAssets(){return ti(this.assets)?Object.values(this.assets):[]}getAssetsWithRoles(t,e=!1){return this.getAssets().filter(n=>n.hasRole(t,e))}getAssetWithRole(t,e=!1){return this.getAssetsWithRoles([t],e)[0]||null}getAssetsByTypes(t){return this.getAssets().filter(e=>Du(e.type,t))}equals(t){return this===t?!0:!(t instanceof dh)||this.getObjectType()!==t.getObjectType()?!1:!!(this.id&&this.id===t.id)}}class Ox extends dh{constructor(t,e=null,n={},s=[]){super(t,e,n,s)}getObjectType(){return this.type}getSearchLink(t=null){let e=this.getStacLinksWithRel("search");return t?e[0]||null:e.find(n=>n.method===t||!t&&!n.method)||null}getApiCollectionsLink(){return this.getStacLinkWithRel("data")}getApiItemsLink(){return this.getStacLinkWithRel("items")}getChildLinks(){return this.getStacLinksWithRel("child")}getItemLinks(){return this.getStacLinksWithRel("item")}}function So(i){if(ri(i)&&i.length>=10)try{let t=i.match(/^(-?\d{1,})-(\d\d)-(\d\d)[T ](\d\d):(\d\d):(\d\d)(?:\.(\d*))?(?:Z|[+-]00:00)?$/i).slice(1).map(e=>parseInt(e,10));return new Date(Date.UTC(t[0],t[1]-1,t[2],t[3],t[4],t[5],t[6]||0))}catch{return null}return null}function Fx(i,t){return new Date(i.valueOf()+(t-i)/2)}class uf extends Ox{constructor(t,e=null){const n={assets:Vo.fromAssets,item_assets:Vo.fromAssets};super(t,e,n)}toGeoJSON(){let t=Mx(this.getBoundingBoxes());return t&&(t.id=this.id),t}getBoundingBox(){let t=this.getRawBoundingBoxes();return t.length>0&&In(t[0])?t[0]:null}getBoundingBoxes(){let t=this.getRawBoundingBoxes();return t.length===1&&In(t[0])?t:t.length>1?t.filter((e,n)=>n>0&&In(e)):[]}getRawBoundingBoxes(){var e,n;let t=(n=(e=this.extent)==null?void 0:e.spatial)==null?void 0:n.bbox;return Array.isArray(t)&&t.length>0?t:[]}getTemporalExtent(){return this.getTemporalExtents()[0]||null}getTemporalExtents(){var e,n;let t=(n=(e=this.extent)==null?void 0:e.temporal)==null?void 0:n.interval;return Array.isArray(t)&&t.length>0?t.filter(s=>Array.isArray(s)&&(ri(s[0])||ri(s[1]))).map(s=>s.map(r=>So(r))):[]}getSummary(t){return this.summaries[t]}getBands(){let t=this.getSummary("eo:bands"),e=this.getSummary("raster:bands"),n=[t,e].filter(s=>Array.isArray(s));return n.length>=2?Wm(...n):n.length===1?n[0]:[]}}class Nx extends dh{constructor(t,e=null){super(t,e,{assets:Vo.fromAssets})}getObjectType(){return"Item"}toGeoJSON(){return this.toJSON()}getBoundingBox(){return In(this.bbox)?this.bbox:null}getBoundingBoxes(){return In(this.bbox)?[this.bbox]:[]}getDateTime(){let t=So(this.properties.datetime);if(!t){let e=So(this.properties.start_datetime),n=So(this.properties.end_datetime);return e&&n?Fx(e,n):e||n}return t}getTemporalExtent(){return this.getTemporalExtents()[0]||null}getTemporalExtents(){let t=[];return ri(this.properties.start_datetime)||ri(this.properties.end_datetime)?t=[[this.properties.start_datetime||null,this.properties.end_datetime||null]]:ri(this.properties.datetime)&&(t=[[this.properties.datetime,this.properties.datetime]]),t.map(e=>e.map(n=>So(n)))}getMetadata(t){return this.properties[t]}getBands(){let t=this.getMetadata("eo:bands");return Array.isArray(t)?t:[]}getCollectionLink(){return this.getStacLinkWithRel("collection")}}function kx(i){const t=[];return i.forEach(e=>{if(e.rel==="item"&&"latlng"in e){const[n,s]=e.latlng.split(",").map(r=>Number(r));t.push({type:"Feature",geometry:{type:"Point",coordinates:[s,n]}})}}),{type:"FeatureCollection",crs:{type:"name",properties:{name:"EPSG:4326"}},features:t}}var Ls,is;class Dx{constructor(t){lc(this,Ls,void 0);lc(this,is,void 0);ac(this,"selectedItem",null);ac(this,"createLayersJson",async(t=null)=>{let e,n,s=[{type:"Tile",properties:{id:"OSM"},source:{type:"OSM"}}];if(bs(this,is)||(n=await(await fetch(bs(this,Ls))).json(),Ha(this,is,new uf(n))),n&&n.endpointtype==="GeoDB"){const r=kx(n.links);return s.unshift({type:"Vector",properties:{id:n.id},source:{type:"Vector",url:"data:,"+encodeURIComponent(JSON.stringify(r)),format:"GeoJSON"},style:{"circle-radius":5,"circle-fill-color":"#00417077","circle-stroke-color":"#004170","fill-color":"#00417077","stroke-color":"#004170"}}),s}else if(t instanceof Date?(e=this.getItems().sort((r,o)=>{const a=Math.abs(new Date(r.datetime)-t),l=Math.abs(new Date(o.datetime)-t);return a-l})[0],this.selectedItem=e):e=t,n=await(await fetch(e?Ml(e.href,bs(this,Ls)):bs(this,Ls))).json(),e){const r=new Nx(n);return this.selectedItem=r,s.unshift(this.buildJson(r)),s}else{Ha(this,is,new uf(n));const r=this.getItems();return this.selectedItem=r[r.length-1],s=await this.createLayersJson(this.selectedItem),s}});Ha(this,Ls,t)}buildJson(t){let e;return t.links.find(n=>n.rel==="wms"||n.rel==="wmts"||n.rel==="xyz")?e={type:"STAC",displayWebMapLink:!0,displayFootprint:!1,data:t,properties:{id:t.id}}:e={type:"Vector",source:{type:"Vector",url:"data:,"+encodeURIComponent(JSON.stringify(t.geometry)),format:"GeoJSON"},properties:{id:t.id}},e}getItems(){var t;return((t=bs(this,is))==null?void 0:t.links).filter(e=>e.rel==="item").sort((e,n)=>e.datetimee.rel==="item").sort((e,n)=>e.datetimenew Date(e.datetime))}}Ls=new WeakMap,is=new WeakMap;var Gx=Object.defineProperty,jx=(i,t,e)=>t in i?Gx(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e,ju=(i,t,e)=>(jx(i,typeof t!="symbol"?t+"":t,e),e);class gn{constructor(t){this.propagationStopped,this.defaultPrevented,this.type=t,this.target=null}preventDefault(){this.defaultPrevented=!0}stopPropagation(){this.propagationStopped=!0}}const zu={PROPERTYCHANGE:"propertychange"};class Uu{constructor(){this.disposed=!1}dispose(){this.disposed||(this.disposed=!0,this.disposeInternal())}disposeInternal(){}}function zx(i,t,e){let n,s;e=e||on;let r=0,o=i.length,a=!1;for(;r>1),s=+e(i[n],t),s<0?r=n+1:(o=n,a=!s);return a?r:~r}function on(i,t){return i>t?1:it?-1:0}function gh(i,t,e){if(i[0]<=t)return 0;const n=i.length;if(t<=i[n-1])return n-1;if(typeof e=="function"){for(let s=1;s0?s-1:s}return n-1}if(e>0){for(let s=1;s0||e&&o===0)})}function qx(){return!0}function Yo(){}function $m(i){let t=!1,e,n,s;return function(){const r=Array.prototype.slice.call(arguments);return(!t||this!==s||!$s(r,n))&&(t=!0,s=this,n=r,e=i.apply(this,arguments)),e}}function Vm(i){function t(){let e;try{e=i()}catch(n){return Promise.reject(n)}return e instanceof Promise?e:Promise.resolve(e)}return t()}function Kr(i){for(const t in i)delete i[t]}function Fn(i){let t;for(t in i)return!1;return!t}class xa extends Uu{constructor(t){super(),this.eventTarget_=t,this.pendingRemovals_=null,this.dispatching_=null,this.listeners_=null}addEventListener(t,e){if(!t||!e)return;const n=this.listeners_||(this.listeners_={}),s=n[t]||(n[t]=[]);s.includes(e)||s.push(e)}dispatchEvent(t){const e=typeof t=="string",n=e?t:t.type,s=this.listeners_&&this.listeners_[n];if(!s)return;const r=e?new gn(t):t;r.target||(r.target=this.eventTarget_||this);const o=this.dispatching_||(this.dispatching_={}),a=this.pendingRemovals_||(this.pendingRemovals_={});n in o||(o[n]=0,a[n]=0),++o[n];let l;for(let h=0,c=s.length;h0:!1}removeEventListener(t,e){if(!this.listeners_)return;const n=this.listeners_[t];if(!n)return;const s=n.indexOf(e);s!==-1&&(this.pendingRemovals_&&t in this.pendingRemovals_?(n[s]=Yo,++this.pendingRemovals_[t]):(n.splice(s,1),n.length===0&&delete this.listeners_[t]))}}const Lt={CHANGE:"change",ERROR:"error",BLUR:"blur",CLEAR:"clear",CONTEXTMENU:"contextmenu",CLICK:"click",DBLCLICK:"dblclick",DRAGENTER:"dragenter",DRAGOVER:"dragover",DROP:"drop",FOCUS:"focus",KEYDOWN:"keydown",KEYPRESS:"keypress",LOAD:"load",RESIZE:"resize",TOUCHMOVE:"touchmove",WHEEL:"wheel"};function le(i,t,e,n,s){if(n&&n!==i&&(e=e.bind(n)),s){const o=e;e=function(){i.removeEventListener(t,e),o.apply(this,arguments)}}const r={target:i,type:t,listener:e};return i.addEventListener(t,e),r}function Ho(i,t,e,n){return le(i,t,e,n,!0)}function ve(i){i&&i.target&&(i.target.removeEventListener(i.type,i.listener),Kr(i))}class va extends xa{constructor(){super(),this.on=this.onInternal,this.once=this.onceInternal,this.un=this.unInternal,this.revision_=0}changed(){++this.revision_,this.dispatchEvent(Lt.CHANGE)}getRevision(){return this.revision_}onInternal(t,e){if(Array.isArray(t)){const n=t.length,s=new Array(n);for(let r=0;rMath.round(t*gf[e])/gf[e]).join(", ")+")"}const Me={UNKNOWN:0,INTERSECTING:1,ABOVE:2,RIGHT:4,BELOW:8,LEFT:16};function Dr(i){const t=ze();for(let e=0,n=i.length;es&&(l=l|Me.RIGHT),ar&&(l=l|Me.ABOVE),l===Me.UNKNOWN&&(l=Me.INTERSECTING),l}function ze(){return[1/0,1/0,-1/0,-1/0]}function Bi(i,t,e,n,s){return s?(s[0]=i,s[1]=t,s[2]=e,s[3]=n,s):[i,t,e,n]}function wa(i){return Bi(1/0,1/0,-1/0,-1/0,i)}function Zu(i,t){const e=i[0],n=i[1];return Bi(e,n,e,n,t)}function $u(i,t,e,n,s){const r=wa(s);return Hm(r,i,t,e,n)}function Nn(i,t){return i[0]==t[0]&&i[2]==t[2]&&i[1]==t[1]&&i[3]==t[3]}function Jx(i,t,e){return Math.abs(i[0]-t[0])i[2]&&(i[2]=t[2]),t[1]i[3]&&(i[3]=t[3]),i}function No(i,t){t[0]i[2]&&(i[2]=t[0]),t[1]i[3]&&(i[3]=t[1])}function Hm(i,t,e,n,s){for(;et[0]?n[0]=i[0]:n[0]=t[0],i[1]>t[1]?n[1]=i[1]:n[1]=t[1],i[2]=t[0]&&i[1]<=t[3]&&i[3]>=t[1]}function Un(i){return i[2]=o&&_<=l),!n&&r&Me.RIGHT&&!(s&Me.RIGHT)&&(x=f-(g-l)*p,n=x>=a&&x<=h),!n&&r&Me.BELOW&&!(s&Me.BELOW)&&(_=g-(f-a)/p,n=_>=o&&_<=l),!n&&r&Me.LEFT&&!(s&Me.LEFT)&&(x=f-(g-o)*p,n=x>=a&&x<=h)}return n}function Gr(i,t,e,n){if(Un(i))return wa(e);let s=[];if(n>1){const a=i[2]-i[0],l=i[3]-i[1];for(let h=0;h=e[2])){const s=yt(e),r=Math.floor((n[0]-e[0])/s)*s;i[0]-=r,i[2]-=r}return i}function sv(i,t){if(t.canWrapX()){const e=t.getExtent();if(!isFinite(i[0])||!isFinite(i[2]))return[[e[0],i[1],e[2],i[3]]];Yu(i,t);const n=yt(e);if(yt(i)>n)return[[e[0],i[1],e[2],i[3]]];if(i[0]e[2])return[[i[0],i[1],e[2],i[3]],[e[0],i[1],i[2]-n,i[3]]]}return[i]}const rv={9001:"m",9002:"ft",9003:"us-ft",9101:"radians",9102:"degrees"};function ff(i){return rv[i]}const Qo={radians:6370997/(2*Math.PI),degrees:2*Math.PI*6370997/360,ft:.3048,m:1,"us-ft":1200/3937};let jr=class{constructor(i){this.code_=i.code,this.units_=i.units,this.extent_=i.extent!==void 0?i.extent:null,this.worldExtent_=i.worldExtent!==void 0?i.worldExtent:null,this.axisOrientation_=i.axisOrientation!==void 0?i.axisOrientation:"enu",this.global_=i.global!==void 0?i.global:!1,this.canWrapX_=!!(this.global_&&this.extent_),this.getPointResolutionFunc_=i.getPointResolution,this.defaultTileGrid_=null,this.metersPerUnit_=i.metersPerUnit}canWrapX(){return this.canWrapX_}getCode(){return this.code_}getExtent(){return this.extent_}getUnits(){return this.units_}getMetersPerUnit(){return this.metersPerUnit_||Qo[this.units_]}getWorldExtent(){return this.worldExtent_}getAxisOrientation(){return this.axisOrientation_}isGlobal(){return this.global_}setGlobal(i){this.global_=i,this.canWrapX_=!!(i&&this.extent_)}getDefaultTileGrid(){return this.defaultTileGrid_}setDefaultTileGrid(i){this.defaultTileGrid_=i}setExtent(i){this.extent_=i,this.canWrapX_=!!(this.global_&&i)}setWorldExtent(i){this.worldExtent_=i}setGetPointResolution(i){this.getPointResolutionFunc_=i}getPointResolutionFunc(){return this.getPointResolutionFunc_}};const Sa=6378137,vr=Math.PI*Sa,ov=[-vr,-vr,vr,vr],av=[-180,-85,180,85],Ka=Sa*Math.log(Math.tan(Math.PI/2));class ir extends jr{constructor(t){super({code:t,units:"m",extent:ov,global:!0,worldExtent:av,getPointResolution:function(e,n){return e/Math.cosh(n[1]/Sa)}})}}const pf=[new ir("EPSG:3857"),new ir("EPSG:102100"),new ir("EPSG:102113"),new ir("EPSG:900913"),new ir("http://www.opengis.net/def/crs/EPSG/0/3857"),new ir("http://www.opengis.net/gml/srs/epsg.xml#3857")];function lv(i,t,e){const n=i.length;e=e>1?e:2,t===void 0&&(e>2?t=i.slice():t=new Array(n));for(let s=0;sKa?r=Ka:r<-Ka&&(r=-Ka),t[s+1]=r}return t}function hv(i,t,e){const n=i.length;e=e>1?e:2,t===void 0&&(e>2?t=i.slice():t=new Array(n));for(let s=0;s1?(e=s,n=r):l>0&&(e+=o*l,n+=a*l)}return Fs(i,t,e,n)}function Fs(i,t,e,n){const s=e-i,r=n-t;return s*s+r*r}function fv(i){const t=i.length;for(let n=0;nr&&(r=l,s=a)}if(r===0)return null;const o=i[s];i[s]=i[n],i[n]=o;for(let a=n+1;a=0;n--){e[n]=i[n][t]/i[n][n];for(let s=n-1;s>=0;s--)i[s][t]-=i[s][n]*e[n]}return e}function ko(i){return i*Math.PI/180}function an(i,t){const e=i%t;return e*t<0?e+t:e}function mi(i,t,e){return i+e*(t-i)}function Ta(i,t){const e=Math.pow(10,t);return Math.round(i*e)/e}function Rl(i,t){return Math.round(Ta(i,t))}function wr(i,t){return Math.floor(Ta(i,t))}function ns(i,t){return Math.ceil(Ta(i,t))}function Rs(i,t,e){const n=e!==void 0?i.toFixed(e):""+i;let s=n.indexOf(".");return s=s===-1?n.length:s,s>t?n:new Array(1+t-s).join("0")+n}function Hu(i,t){const e=(""+i).split("."),n=(""+t).split(".");for(let s=0;so)return 1;if(o>r)return-1}return 0}function e0(i,t){return i[0]+=+t[0],i[1]+=+t[1],i}function yf(i,t,e){const n=an(t+180,360)-180,s=Math.abs(3600*n),r=e||0;let o=Math.floor(s/3600),a=Math.floor((s-o*3600)/60),l=Ta(s-o*3600-a*60,r);l>=60&&(l=0,a+=1),a>=60&&(a=0,o+=1);let h=o+"°";return(a!==0||l!==0)&&(h+=" "+Rs(a,2)+"′"),l!==0&&(h+=" "+Rs(l,2,r)+"″"),n!==0&&(h+=" "+i.charAt(n<0?1:0)),h}function Cl(i,t){let e=!0;for(let n=i.length-1;n>=0;--n)if(i[n]!=t[n]){e=!1;break}return e}function pv(i,t){const e=Math.cos(t),n=Math.sin(t),s=i[0]*e-i[1]*n,r=i[1]*e+i[0]*n;return i[0]=s,i[1]=r,i}function mv(i,t){return i[0]*=t,i[1]*=t,i}function i0(i,t){if(t.canWrapX()){const e=yt(t.getExtent()),n=n0(i,t,e);n&&(i[0]-=n*e)}return i}function n0(i,t,e){const n=t.getExtent();let s=0;return t.canWrapX()&&(i[0]n[2])&&(e=e||yt(n),s=Math.floor((i[0]-n[0])/e)),s}const _v=63710088e-1;function xf(i,t,e){e=e||_v;const n=ko(i[1]),s=ko(t[1]),r=(s-n)/2,o=ko(t[0]-i[0])/2,a=Math.sin(r)*Math.sin(r)+Math.sin(o)*Math.sin(o)*Math.cos(n)*Math.cos(s);return 2*e*Math.atan2(Math.sqrt(a),Math.sqrt(1-a))}function yv(...i){console.warn(...i)}function Il(...i){console.error(...i)}let Qc=!0;function xv(i){Qc=!(i===void 0||i)}function Ku(i,t){if(t!==void 0){for(let e=0,n=i.length;e=a?t[r+l]:o[l]}return e}}function bv(i,t,e,n){const s=tt(i),r=tt(t);zr(s,r,wf(e)),zr(r,s,wf(n))}function bf(i,t){const e=_h(i,t!==void 0?t:"EPSG:3857","EPSG:4326"),n=e[0];return(n<-180||n>180)&&(e[0]=an(n+180,360)-180),e}function Ae(i,t){if(i===t)return!0;const e=i.getUnits()===t.getUnits();return(i.getCode()===t.getCode()||Hs(i,t)===Ku)&&e}function Hs(i,t){const e=i.getCode(),n=t.getCode();let s=Jm(e,n);return s||(s=s0),s}function hn(i,t){const e=tt(i),n=tt(t);return Hs(e,n)}function _h(i,t,e){return hn(t,e)(i,void 0,i.length)}function Ju(i,t,e,n){const s=hn(t,e);return Gr(i,s,void 0,n)}let Ev=null;function Sv(){return Ev}function tu(i,t){return i}function $n(i,t){return Qc&&!Cl(i,[0,0])&&i[0]>=-180&&i[0]<=180&&i[1]>=-90&&i[1]<=90&&(Qc=!1,yv("Call useGeographic() from ol/proj once to work with [longitude, latitude] coordinates.")),i}function yh(i,t){return i}function Gi(i,t){return i}function Ef(i,t,e){return function(n){let s,r;if(i.canWrapX()){const o=i.getExtent(),a=yt(o);n=n.slice(0),r=n0(n,i,a),r&&(n[0]=n[0]-r*a),n[0]=wt(n[0],o[0],o[2]),n[1]=wt(n[1],o[1],o[3]),s=e(n)}else s=e(n);return r&&t.canWrapX()&&(s[0]+=r*yt(t.getExtent())),s}}function Tv(){Jc(pf),Jc(_f),wv(_f,pf,lv,hv)}Tv();function hs(i,t,e,n,s,r){r=r||[];let o=0;for(let a=t;a{if(!n)return this.getSimplifiedGeometry(e);const s=this.clone();return s.applyTransform(n),s.getSimplifiedGeometry(e)})}simplifyTransformed(t,e){return this.simplifyTransformedInternal(this.getRevision(),t,e)}clone(){return ct()}closestPointXY(t,e,n,s){return ct()}containsXY(t,e){const n=this.getClosestPoint([t,e]);return n[0]===t&&n[1]===e}getClosestPoint(t,e){return e=e||[NaN,NaN],this.closestPointXY(t[0],t[1],e,1/0),e}intersectsCoordinate(t){return this.containsXY(t[0],t[1])}computeExtent(t){return ct()}getExtent(t){if(this.extentRevision_!=this.getRevision()){const e=this.computeExtent(this.extent_);(isNaN(e[0])||isNaN(e[1]))&&wa(e),this.extentRevision_=this.getRevision()}return iv(this.extent_,t)}rotate(t,e){ct()}scale(t,e,n){ct()}simplify(t){return this.getSimplifiedGeometry(t*t)}getSimplifiedGeometry(t){return ct()}getType(){return ct()}applyTransform(t){ct()}intersectsExtent(t){return ct()}translate(t,e){ct()}transform(t,e){const n=tt(t),s=n.getUnits()=="tile-pixels"?function(r,o,a){const l=n.getExtent(),h=n.getWorldExtent(),c=Vt(h)/Vt(l);return hi(Sf,h[0],h[3],c,-c,0,0,0),hs(r,0,r.length,a,Sf,o),hn(n,e)(r,o,a)}:hn(n,e);return this.applyTransform(s),this}}class Cv extends td{constructor(){super(),this.layout="XY",this.stride=2,this.flatCoordinates}computeExtent(t){return $u(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t)}getCoordinates(){return ct()}getFirstCoordinate(){return this.flatCoordinates.slice(0,this.stride)}getFlatCoordinates(){return this.flatCoordinates}getLastCoordinate(){return this.flatCoordinates.slice(this.flatCoordinates.length-this.stride)}getLayout(){return this.layout}getSimplifiedGeometry(t){if(this.simplifiedGeometryRevision!==this.getRevision()&&(this.simplifiedGeometryMaxMinSquaredTolerance=0,this.simplifiedGeometryRevision=this.getRevision()),t<0||this.simplifiedGeometryMaxMinSquaredTolerance!==0&&t<=this.simplifiedGeometryMaxMinSquaredTolerance)return this;const e=this.getSimplifiedGeometryInternal(t);return e.getFlatCoordinates().lengtht.clone())}const je=Pl;function Tf(i,t,e,n,s,r,o){const a=i[t],l=i[t+1],h=i[e]-a,c=i[e+1]-l;let u;if(h===0&&c===0)u=t;else{const g=((s-a)*h+(r-l)*c)/(h*h+c*c);if(g>1)u=e;else if(g>0){for(let f=0;fs&&(s=h),r=a,o=l}return s}function id(i,t,e,n,s){for(let r=0,o=e.length;r0;){const u=h.pop(),g=h.pop();let f=0;const p=i[g],_=i[g+1],x=i[u],v=i[u+1];for(let w=g+n;wf&&(c=w,f=T)}f>s&&(l[(c-t)/n]=1,g+n0&&_>f)&&(p<0&&x0&&x>p)){h=u,c=g;continue}r[o++]=h,r[o++]=c,a=h,l=c,h=u,c=g}return r[o++]=h,r[o++]=c,o}function rd(i,t,e,n,s,r,o,a){for(let l=0,h=e.length;l1?o:2,r=r||new Array(o);for(let c=0;c>1;sr&&(h-a)*(r-l)-(s-a)*(c-l)>0&&o++:c<=r&&(h-a)*(r-l)-(s-a)*(c-l)<0&&o--,a=h,l=c}return o!==0}function od(i,t,e,n,s,r){if(e.length===0||!Cs(i,t,e[0],n,s,r))return!1;for(let o=1,a=e.length;o=s[0]&&r[2]<=s[2]||r[1]>=s[1]&&r[3]<=s[3]?!0:u0(i,t,e,n,function(o,a){return nv(s,o,a)}):!1}function jv(i,t,e,n,s){for(let r=0,o=e.length;rv&&(h=(c+u)/2,od(i,t,e,n,h,p)&&(x=h,v=w)),c=u}return isNaN(x)&&(x=s[r]),o?(o.push(x,p,v),o):[x,p,v]}function m0(i,t,e,n,s){let r=[];for(let o=0,a=e.length;o0}function ld(i,t,e,n,s){s=s!==void 0?s:!1;for(let r=0,o=e.length;r{if(t===this.squaredTolerance_)return this.simplifiedGeometry_;this.simplifiedGeometry_=this.clone(),e&&this.simplifiedGeometry_.applyTransform(e);const n=this.simplifiedGeometry_.getFlatCoordinates();let s;switch(this.type_){case"LineString":n.length=xh(n,0,this.simplifiedGeometry_.flatCoordinates_.length,this.simplifiedGeometry_.stride_,t,n,0),s=[n.length];break;case"MultiLineString":s=[],n.length=l0(n,0,this.simplifiedGeometry_.ends_,this.simplifiedGeometry_.stride_,t,n,0,s);break;case"Polygon":s=[],n.length=rd(n,0,this.simplifiedGeometry_.ends_,this.simplifiedGeometry_.stride_,Math.sqrt(t),n,0,s);break}return s&&(this.simplifiedGeometry_=new Ge(this.type_,n,s,2,this.properties_,this.id_)),this.squaredTolerance_=t,this.simplifiedGeometry_}),this}}Ge.prototype.getFlatCoordinates=Ge.prototype.getOrientedFlatCoordinates;class Bv{constructor(){this.dataProjection=void 0,this.defaultFeatureProjection=void 0,this.featureClass=Ee,this.supportedMediaTypes=null}getReadOptions(t,e){if(e){let n=e.dataProjection?tt(e.dataProjection):this.readProjection(t);e.extent&&n&&n.getUnits()==="tile-pixels"&&(n=tt(n),n.setWorldExtent(e.extent)),e={dataProjection:n,featureProjection:e.featureProjection}}return this.adaptOptions(e)}adaptOptions(t){return Object.assign({dataProjection:this.dataProjection,featureProjection:this.defaultFeatureProjection,featureClass:this.featureClass},t)}getType(){return ct()}readFeature(t,e){return ct()}readFeatures(t,e){return ct()}readGeometry(t,e){return ct()}readProjection(t){return ct()}writeFeature(t,e){return ct()}writeFeatures(t,e){return ct()}writeGeometry(t,e){return ct()}}const Ca=Bv;function re(i,t,e){const n=e?tt(e.featureProjection):null,s=e?tt(e.dataProjection):null;let r=i;if(n&&s&&!Ae(n,s)){t&&(r=i.clone());const o=t?n:s,a=t?s:n;o.getUnits()==="tile-pixels"?r.transform(o,a):r.applyTransform(hn(o,a))}if(t&&e&&e.decimals!==void 0){const o=Math.pow(10,e.decimals),a=function(l){for(let h=0,c=l.length;hv0({...i,geometry:o})).flat();const s=n.type==="MultiPolygon"?"Polygon":n.type;if(s==="GeometryCollection"||s==="Circle")throw new Error("Unsupported geometry type: "+s);const r=n.layout.length;return re(new Ge(s,s==="Polygon"?qv(n.flatCoordinates,n.ends,r):n.flatCoordinates,(e=n.ends)==null?void 0:e.flat(),r,i.properties||{},i.id).enableSimplifyTransformed(),!1,t)}function cd(i,t){if(!i)return null;if(Array.isArray(i)){const n=i.map(s=>cd(s,t));return new je(n)}const e=Wv[i.type];return re(new e(i.flatCoordinates,i.layout,i.ends),!1,t)}class ud extends Ca{constructor(){super()}getType(){return"json"}readFeature(t,e){return this.readFeatureFromObject(Qa(t),this.getReadOptions(t,e))}readFeatures(t,e){return this.readFeaturesFromObject(Qa(t),this.getReadOptions(t,e))}readFeatureFromObject(t,e){return ct()}readFeaturesFromObject(t,e){return ct()}readGeometry(t,e){return this.readGeometryFromObject(Qa(t),this.getReadOptions(t,e))}readGeometryFromObject(t,e){return ct()}readProjection(t){return this.readProjectionFromObject(Qa(t))}readProjectionFromObject(t){return ct()}writeFeature(t,e){return JSON.stringify(this.writeFeatureObject(t,e))}writeFeatureObject(t,e){return ct()}writeFeatures(t,e){return JSON.stringify(this.writeFeaturesObject(t,e))}writeFeaturesObject(t,e){return ct()}writeGeometry(t,e){return JSON.stringify(this.writeGeometryObject(t,e))}writeGeometryObject(t,e){return ct()}}function Qa(i){return typeof i=="string"?JSON.parse(i)||null:i!==null?i:null}const Xv={Point:Yv,LineString:Hv,Polygon:tw,MultiPoint:Qv,MultiLineString:Kv,MultiPolygon:Jv},Zv={Point:ew,LineString:iw,Polygon:nw,MultiPoint:rw,MultiLineString:sw,MultiPolygon:ow};class $v extends ud{constructor(t){t=t||{},super(),this.geometryName_=t.geometryName}readFeatureFromObject(t,e,n){const s=t,r=Cf(s.geometry,e),o=new Ee;if(this.geometryName_&&o.setGeometryName(this.geometryName_),o.setGeometry(r),s.attributes){o.setProperties(s.attributes,!0);const a=s.attributes[n];a!==void 0&&o.setId(a)}return o}readFeaturesFromObject(t,e){if(e=e||{},t.features){const n=t,s=[],r=n.features;for(let o=0,a=r.length;o=0;r--){const h=n[r][0];if(Ze(new ds(h).getExtent(),new ds(a).getExtent())){n[r].push(a),l=!0;break}}l||n.push([a.reverse()])}return n}function Yv(i){let t;return i.m!==void 0&&i.z!==void 0?t=new Re([i.x,i.y,i.z,i.m],"XYZM"):i.z!==void 0?t=new Re([i.x,i.y,i.z],"XYZ"):i.m!==void 0?t=new Re([i.x,i.y,i.m],"XYM"):t=new Re([i.x,i.y]),t}function Hv(i){const t=Jr(i);return new ye(i.paths[0],t)}function Kv(i){const t=Jr(i);return new ci(i.paths,t)}function Jr(i){let t="XY";return i.hasZ===!0&&i.hasM===!0?t="XYZM":i.hasZ===!0?t="XYZ":i.hasM===!0&&(t="XYM"),t}function Qv(i){const t=Jr(i);return new Zi(i.points,t)}function Jv(i){const t=Jr(i);return new Pi(i.rings,t)}function tw(i){const t=Jr(i);return new Ue(i.rings,t)}function ew(i,t){const e=i.getCoordinates();let n;const s=i.getLayout();if(s==="XYZ")n={x:e[0],y:e[1],z:e[2]};else if(s==="XYM")n={x:e[0],y:e[1],m:e[2]};else if(s==="XYZM")n={x:e[0],y:e[1],z:e[2],m:e[3]};else if(s==="XY")n={x:e[0],y:e[1]};else throw new Error("Invalid geometry layout");return n}function Ia(i){const t=i.getLayout();return{hasZ:t==="XYZ"||t==="XYZM",hasM:t==="XYM"||t==="XYZM"}}function iw(i,t){const e=Ia(i);return{hasZ:e.hasZ,hasM:e.hasM,paths:[i.getCoordinates()]}}function nw(i,t){const e=Ia(i);return{hasZ:e.hasZ,hasM:e.hasM,rings:i.getCoordinates(!1)}}function sw(i,t){const e=Ia(i);return{hasZ:e.hasZ,hasM:e.hasM,paths:i.getCoordinates()}}function rw(i,t){const e=Ia(i);return{hasZ:e.hasZ,hasM:e.hasM,points:i.getCoordinates()}}function ow(i,t){const e=Ia(i),n=i.getCoordinates(!1),s=[];for(let r=0;r=0;o--)s.push(n[r][o]);return{hasZ:e.hasZ,hasM:e.hasM,rings:s}}function If(i,t){const e=Zv[i.getType()];return e(re(i,!0,t),t)}const aw=$v;class lw extends ud{constructor(t){t=t||{},super(),this.dataProjection=tt(t.dataProjection?t.dataProjection:"EPSG:4326"),t.featureProjection&&(this.defaultFeatureProjection=tt(t.featureProjection)),t.featureClass&&(this.featureClass=t.featureClass),this.geometryName_=t.geometryName,this.extractGeometryName_=t.extractGeometryName,this.supportedMediaTypes=["application/geo+json","application/vnd.geo+json"]}readFeatureFromObject(t,e){let n=null;t.type==="Feature"?n=t:n={type:"Feature",geometry:t,properties:null};const s=dd(n.geometry);if(this.featureClass===Ge)return v0({geometry:s,id:n.id,properties:n.properties},e);const r=new Ee;return this.geometryName_?r.setGeometryName(this.geometryName_):this.extractGeometryName_&&n.geometry_name&&r.setGeometryName(n.geometry_name),r.setGeometry(cd(s,e)),"id"in n&&r.setId(n.id),n.properties&&r.setProperties(n.properties,!0),r}readFeaturesFromObject(t,e){const n=t;let s=null;if(n.type==="FeatureCollection"){const r=t;s=[];const o=r.features;for(let a=0,l=o.length;a0?n[0]:null}readFeatureFromNode(t,e){return null}readFeatures(t,e){if(!t)return[];if(typeof t=="string"){const n=Ci(t);return this.readFeaturesFromDocument(n,e)}return Ri(t)?this.readFeaturesFromDocument(t,e):this.readFeaturesFromNode(t,e)}readFeaturesFromDocument(t,e){const n=[];for(let s=t.firstChild;s;s=s.nextSibling)s.nodeType==Node.ELEMENT_NODE&&Ot(n,this.readFeaturesFromNode(s,e));return n}readFeaturesFromNode(t,e){return ct()}readGeometry(t,e){if(!t)return null;if(typeof t=="string"){const n=Ci(t);return this.readGeometryFromDocument(n,e)}return Ri(t)?this.readGeometryFromDocument(t,e):this.readGeometryFromNode(t,e)}readGeometryFromDocument(t,e){return null}readGeometryFromNode(t,e){return null}readProjection(t){if(!t)return null;if(typeof t=="string"){const e=Ci(t);return this.readProjectionFromDocument(e)}return Ri(t)?this.readProjectionFromDocument(t):this.readProjectionFromNode(t)}readProjectionFromDocument(t){return this.dataProjection}readProjectionFromNode(t){return this.dataProjection}writeFeature(t,e){const n=this.writeFeatureNode(t,e);return this.xmlSerializer_.serializeToString(n)}writeFeatureNode(t,e){return null}writeFeatures(t,e){const n=this.writeFeaturesNode(t,e);return this.xmlSerializer_.serializeToString(n)}writeFeaturesNode(t,e){return null}writeGeometry(t,e){const n=this.writeGeometryNode(t,e);return this.xmlSerializer_.serializeToString(n)}writeGeometryNode(t,e){return null}}const Pn="http://www.opengis.net/gml",Mw=/^\s*$/;class rt extends Pa{constructor(t){super(),t=t||{},this.featureType=t.featureType,this.featureNS=t.featureNS,this.srsName=t.srsName,this.schemaLocation="",this.FEATURE_COLLECTION_PARSERS={},this.FEATURE_COLLECTION_PARSERS[this.namespace]={featureMember:ot(this.readFeaturesInternal),featureMembers:ht(this.readFeaturesInternal)},this.supportedMediaTypes=["application/gml+xml"]}readFeaturesInternal(t,e){const n=t.localName;let s=null;if(n=="FeatureCollection")s=Z([],this.FEATURE_COLLECTION_PARSERS,t,e,this);else if(n=="featureMembers"||n=="featureMember"||n=="member"){const r=e[0];let o=r.featureType,a=r.featureNS;const l="p",h="p0";if(!o&&t.childNodes){o=[],a={};for(let g=0,f=t.childNodes.length;g0&&!(h instanceof td)){h={_content_:h};for(let g=0;g1,n=e&&i.imageInfo.profile[1].supports?i.imageInfo.profile[1].supports:[],s=e&&i.imageInfo.profile[1].formats?i.imageInfo.profile[1].formats:[],r=e&&i.imageInfo.profile[1].qualities?i.imageInfo.profile[1].qualities:[];return{url:i.imageInfo["@id"].replace(/\/?(?:info\.json)?$/g,""),sizes:i.imageInfo.sizes===void 0?void 0:i.imageInfo.sizes.map(function(o){return[o.width,o.height]}),tileSize:i.imageInfo.tiles===void 0?void 0:[i.imageInfo.tiles.map(function(o){return o.width})[0],i.imageInfo.tiles.map(function(o){return o.height===void 0?o.width:o.height})[0]],resolutions:i.imageInfo.tiles===void 0?void 0:i.imageInfo.tiles.map(function(o){return o.scaleFactors})[0],supports:[...t.supports,...n],formats:[...t.formats,...s],qualities:[...t.qualities,...r]}}function Pb(i){const t=i.getComplianceLevelSupportedFeatures(),e=i.imageInfo.extraFormats===void 0?t.formats:[...t.formats,...i.imageInfo.extraFormats],n=i.imageInfo.preferredFormats!==void 0&&Array.isArray(i.imageInfo.preferredFormats)&&i.imageInfo.preferredFormats.length>0?i.imageInfo.preferredFormats.filter(function(s){return["jpg","png","gif"].includes(s)}).reduce(function(s,r){return s===void 0&&e.includes(r)?r:s},void 0):void 0;return{url:i.imageInfo.id,sizes:i.imageInfo.sizes===void 0?void 0:i.imageInfo.sizes.map(function(s){return[s.width,s.height]}),tileSize:i.imageInfo.tiles===void 0?void 0:[i.imageInfo.tiles.map(function(s){return s.width})[0],i.imageInfo.tiles.map(function(s){return s.height})[0]],resolutions:i.imageInfo.tiles===void 0?void 0:i.imageInfo.tiles.map(function(s){return s.scaleFactors})[0],supports:i.imageInfo.extraFeatures===void 0?t.supports:[...t.supports,...i.imageInfo.extraFeatures],formats:e,qualities:i.imageInfo.extraQualities===void 0?t.qualities:[...t.qualities,...i.imageInfo.extraQualities],preferredFormat:n}}const Sh={};Sh[_e.VERSION1]=Cb;Sh[_e.VERSION2]=Ib;Sh[_e.VERSION3]=Pb;class Ab{constructor(t){this.setImageInfo(t)}setImageInfo(t){typeof t=="string"?this.imageInfo=JSON.parse(t):this.imageInfo=t}getImageApiVersion(){if(this.imageInfo===void 0)return;let t=this.imageInfo["@context"]||"ol-no-context";typeof t=="string"&&(t=[t]);for(let e=0;e0&&typeof this.imageInfo.profile[0]=="string"&&Pf.test(this.imageInfo.profile[0]))return this.imageInfo.profile[0];break}}getComplianceLevelFromProfile(t){const e=this.getComplianceLevelEntryFromProfile(t);if(e===void 0)return;const n=e.match(/level[0-2](?:\.json)?$/g);return Array.isArray(n)?n[0].replace(".json",""):void 0}getComplianceLevelSupportedFeatures(){if(this.imageInfo===void 0)return;const t=this.getImageApiVersion(),e=this.getComplianceLevelFromProfile(t);return e===void 0?zs.none.none:zs[t][e]}getTileSourceOptions(t){const e=t||{},n=this.getImageApiVersion();if(n===void 0)return;const s=n===void 0?void 0:Sh[n](this);if(s!==void 0)return{url:s.url,version:n,size:[this.imageInfo.width,this.imageInfo.height],sizes:s.sizes,format:e.format!==void 0&&s.formats.includes(e.format)?e.format:s.preferredFormat!==void 0?s.preferredFormat:"jpg",supports:s.supports,quality:e.quality&&s.qualities.includes(e.quality)?e.quality:s.qualities.includes("native")?"native":"default",resolutions:Array.isArray(s.resolutions)?s.resolutions.sort(function(r,o){return o-r}):void 0,tileSize:s.tileSize}}}const Lb=Ab,et={IDLE:0,LOADING:1,LOADED:2,ERROR:3,EMPTY:4},ta={name:"rgb",min:[0,0,0],max:[255,255,255],channel:["red","green","blue"],alias:["RGB"]};var Le={name:"xyz",min:[0,0,0],channel:["X","Y","Z"],alias:["XYZ","ciexyz","cie1931"]};Le.whitepoint={2:{A:[109.85,100,35.585],C:[98.074,100,118.232],D50:[96.422,100,82.521],D55:[95.682,100,92.149],D65:[95.045592705167,100,108.9057750759878],D75:[94.972,100,122.638],F2:[99.187,100,67.395],F7:[95.044,100,108.755],F11:[100.966,100,64.37],E:[100,100,100]},10:{A:[111.144,100,35.2],C:[97.285,100,116.145],D50:[96.72,100,81.427],D55:[95.799,100,90.926],D65:[94.811,100,107.304],D75:[94.416,100,120.641],F2:[103.28,100,69.026],F7:[95.792,100,107.687],F11:[103.866,100,65.627],E:[100,100,100]}};Le.max=Le.whitepoint[2].D65;Le.rgb=function(i,t){t=t||Le.whitepoint[2].E;var e=i[0]/t[0],n=i[1]/t[1],s=i[2]/t[2],r,o,a;return r=e*3.240969941904521+n*-1.537383177570093+s*-.498610760293,o=e*-.96924363628087+n*1.87596750150772+s*.041555057407175,a=e*.055630079696993+n*-.20397695888897+s*1.056971514242878,r=r>.0031308?1.055*Math.pow(r,1/2.4)-.055:r=r*12.92,o=o>.0031308?1.055*Math.pow(o,1/2.4)-.055:o=o*12.92,a=a>.0031308?1.055*Math.pow(a,1/2.4)-.055:a=a*12.92,r=Math.min(Math.max(0,r),1),o=Math.min(Math.max(0,o),1),a=Math.min(Math.max(0,a),1),[r*255,o*255,a*255]};ta.xyz=function(i,t){var e=i[0]/255,n=i[1]/255,s=i[2]/255;e=e>.04045?Math.pow((e+.055)/1.055,2.4):e/12.92,n=n>.04045?Math.pow((n+.055)/1.055,2.4):n/12.92,s=s>.04045?Math.pow((s+.055)/1.055,2.4):s/12.92;var r=e*.41239079926595+n*.35758433938387+s*.18048078840183,o=e*.21263900587151+n*.71516867876775+s*.072192315360733,a=e*.019330818715591+n*.11919477979462+s*.95053215224966;return t=t||Le.whitepoint[2].E,[r*t[0],o*t[1],a*t[2]]};const xd={name:"luv",min:[0,-134,-140],max:[100,224,122],channel:["lightness","u","v"],alias:["LUV","cieluv","cie1976"],xyz:function(i,t,e){var n,s,r,o,a,l,h,c,u,g,f,p,_;if(r=i[0],o=i[1],a=i[2],r===0)return[0,0,0];var x=.0011070564598794539;return t=t||"D65",e=e||2,u=Le.whitepoint[e][t][0],g=Le.whitepoint[e][t][1],f=Le.whitepoint[e][t][2],p=4*u/(u+15*g+3*f),_=9*g/(u+15*g+3*f),n=o/(13*r)+p||0,s=a/(13*r)+_||0,h=r>8?g*Math.pow((r+16)/116,3):g*r*x,l=h*9*n/(4*s)||0,c=h*(12-3*n-20*s)/(4*s)||0,[l,h,c]}};Le.luv=function(i,t,e){var n,s,r,o,a,l,h,c,u,g,f,p,_,x=.008856451679035631,v=903.2962962962961;t=t||"D65",e=e||2,u=Le.whitepoint[e][t][0],g=Le.whitepoint[e][t][1],f=Le.whitepoint[e][t][2],p=4*u/(u+15*g+3*f),_=9*g/(u+15*g+3*f),l=i[0],h=i[1],c=i[2],n=4*l/(l+15*h+3*c)||0,s=9*h/(l+15*h+3*c)||0;var w=h/g;return r=w<=x?v*w:116*Math.pow(w,1/3)-16,o=13*r*(n-p),a=13*r*(s-_),[r,o,a]};var C0={name:"lchuv",channel:["lightness","chroma","hue"],alias:["LCHuv","cielchuv"],min:[0,0,0],max:[100,100,360],luv:function(i){var t=i[0],e=i[1],n=i[2],s,r,o;return o=n/360*2*Math.PI,s=e*Math.cos(o),r=e*Math.sin(o),[t,s,r]},xyz:function(i){return xd.xyz(C0.luv(i))}};xd.lchuv=function(i){var t=i[0],e=i[1],n=i[2],s=Math.sqrt(e*e+n*n),r=Math.atan2(n,e),o=r*360/2/Math.PI;return o<0&&(o+=360),[t,s,o]};Le.lchuv=function(i){return xd.lchuv(Le.luv(i))};var ks=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function eo(i){return i&&i.__esModule&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i}var Ob={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]};const Af=eo(Ob);var Lf={red:0,orange:60,yellow:120,green:180,blue:240,purple:300};function Fb(i){var t,e,n,s=[],r=1,o;if(typeof i=="number")return{space:"rgb",values:[i>>>16,(i&65280)>>>8,i&255],alpha:1};if(typeof i=="number")return{space:"rgb",values:[i>>>16,(i&65280)>>>8,i&255],alpha:1};if(i=String(i).toLowerCase(),Af[i])s=Af[i].slice(),o="rgb";else if(i==="transparent")r=0,o="rgb",s=[0,0,0];else if(i[0]==="#"){var a=i.slice(1),l=a.length,h=l<=4;r=1,h?(s=[parseInt(a[0]+a[0],16),parseInt(a[1]+a[1],16),parseInt(a[2]+a[2],16)],l===4&&(r=parseInt(a[3]+a[3],16)/255)):(s=[parseInt(a[0]+a[1],16),parseInt(a[2]+a[3],16),parseInt(a[4]+a[5],16)],l===8&&(r=parseInt(a[6]+a[7],16)/255)),s[0]||(s[0]=0),s[1]||(s[1]=0),s[2]||(s[2]=0),o="rgb"}else if(n=/^((?:rgba?|hs[lvb]a?|hwba?|cmyk?|xy[zy]|gray|lab|lchu?v?|[ly]uv|lms|oklch|oklab|color))\s*\(([^\)]*)\)/.exec(i)){var c=n[1];o=c.replace(/a$/,"");var u=o==="cmyk"?4:o==="gray"?1:3;s=n[2].trim().split(/\s*[,\/]\s*|\s+/),o==="color"&&(o=s.shift()),s=s.map(function(g,f){if(g[g.length-1]==="%")return g=parseFloat(g)/100,f===3?g:o==="rgb"?g*255:o[0]==="h"||o[0]==="l"&&!f?g*100:o==="lab"?g*125:o==="lch"?f<2?g*150:g*360:o[0]==="o"&&!f?g:o==="oklab"?g*.4:o==="oklch"?f<2?g*.4:g*360:g;if(o[f]==="h"||f===2&&o[o.length-1]==="h"){if(Lf[g]!==void 0)return Lf[g];if(g.endsWith("deg"))return parseFloat(g);if(g.endsWith("turn"))return parseFloat(g)*360;if(g.endsWith("grad"))return parseFloat(g)*360/400;if(g.endsWith("rad"))return parseFloat(g)*180/Math.PI}return g==="none"?0:parseFloat(g)}),r=s.length>u?s.pop():1}else/[0-9](?:\s|\/|,)/.test(i)&&(s=i.match(/([0-9]+)/g).map(function(g){return parseFloat(g)}),o=((e=(t=i.match(/([a-z])/ig))==null?void 0:t.join(""))==null?void 0:e.toLowerCase())||"rgb");return{space:o,values:s,alpha:r}}const gc={name:"hsl",min:[0,0,0],max:[360,100,100],channel:["hue","saturation","lightness"],alias:["HSL"],rgb:function(i){var t=i[0]/360,e=i[1]/100,n=i[2]/100,s,r,o,a,l,h=0;if(e===0)return l=n*255,[l,l,l];for(r=n<.5?n*(1+e):n+e-n*e,s=2*n-r,a=[0,0,0];h<3;)o=t+1/3*-(h-1),o<0?o++:o>1&&o--,l=6*o<1?s+(r-s)*6*o:2*o<1?r:3*o<2?s+(r-s)*(2/3-o)*6:s,a[h++]=l*255;return a}};ta.hsl=function(i){var t=i[0]/255,e=i[1]/255,n=i[2]/255,s=Math.min(t,e,n),r=Math.max(t,e,n),o=r-s,a,l,h;return r===s?a=0:t===r?a=(e-n)/o:e===r?a=2+(n-t)/o:n===r&&(a=4+(t-e)/o),a=Math.min(a*60,360),a<0&&(a+=360),h=(s+r)/2,r===s?l=0:h<=.5?l=o/(r+s):l=o/(2-r-s),[a,l*100,h*100]};function Nb(i){Array.isArray(i)&&i.raw&&(i=String.raw(...arguments)),i instanceof Number&&(i=+i);var t,e=Fb(i);if(!e.space)return[];const n=e.space[0]==="h"?gc.min:ta.min,s=e.space[0]==="h"?gc.max:ta.max;return t=Array(3),t[0]=Math.min(Math.max(e.values[0],n[0]),s[0]),t[1]=Math.min(Math.max(e.values[1],n[1]),s[1]),t[2]=Math.min(Math.max(e.values[2],n[2]),s[2]),e.space[0]==="h"&&(t=gc.rgb(t)),t.push(Math.min(Math.max(e.alpha,0),1)),t}function kb(i){return typeof i=="string"?i:wd(i)}const Db=1024,mo={};let fc=0;function Gb(i){if(i.length===4)return i;const t=i.slice();return t[3]=1,t}function Of(i){const t=Le.lchuv(ta.xyz(i));return t[3]=i[3],t}function jb(i){const t=Le.rgb(C0.xyz(i));return t[3]=i[3],t}function vd(i){if(mo.hasOwnProperty(i))return mo[i];if(fc>=Db){let e=0;for(const n in mo)e++&3||(delete mo[n],--fc)}const t=Nb(i);if(t.length!==4)throw new Error('Failed to parse "'+i+'" as color');for(const e of t)if(isNaN(e))throw new Error('Failed to parse "'+i+'" as color');return I0(t),mo[i]=t,++fc,t}function Wi(i){return Array.isArray(i)?i:vd(i)}function I0(i){return i[0]=wt(i[0]+.5|0,0,255),i[1]=wt(i[1]+.5|0,0,255),i[2]=wt(i[2]+.5|0,0,255),i[3]=wt(i[3],0,1),i}function wd(i){let t=i[0];t!=(t|0)&&(t=t+.5|0);let e=i[1];e!=(e|0)&&(e=e+.5|0);let n=i[2];n!=(n|0)&&(n=n+.5|0);const s=i[3]===void 0?1:Math.round(i[3]*1e3)/1e3;return"rgba("+t+","+e+","+n+","+s+")"}function zb(i){try{return vd(i),!0}catch{return!1}}const fs=typeof navigator<"u"&&typeof navigator.userAgent<"u"?navigator.userAgent.toLowerCase():"";fs.includes("firefox");const Ub=fs.includes("safari")&&!fs.includes("chrom"),Bb=Ub&&(fs.includes("version/15.4")||/cpu (os|iphone os) 15_4 like mac os x/.test(fs));fs.includes("webkit")&&fs.includes("edge");fs.includes("macintosh");const P0=typeof WorkerGlobalScope<"u"&&typeof OffscreenCanvas<"u"&&self instanceof WorkerGlobalScope,bd=typeof Image<"u"&&Image.prototype.decode,Wb=typeof createImageBitmap=="function";(function(){let i=!1;try{const t=Object.defineProperty({},"passive",{get:function(){i=!0}});window.addEventListener("_",null,t),window.removeEventListener("_",null,t)}catch{}return i})();function Jt(i,t,e,n){let s;return e&&e.length?s=e.shift():P0?s=new OffscreenCanvas(i||300,t||300):s=document.createElement("canvas"),i&&(s.width=i),t&&(s.height=t),s.getContext("2d",n)}let pc;function ou(){return pc||(pc=Jt(1,1)),pc}function Us(i){const t=i.canvas;t.width=1,t.height=1,i.clearRect(0,0,1,1)}class Th extends xa{constructor(t,e,n,s){super(),this.extent=t,this.pixelRatio_=n,this.resolution=e,this.state=typeof s=="function"?et.IDLE:s,this.image_=null,this.loader=typeof s=="function"?s:null}changed(){this.dispatchEvent(Lt.CHANGE)}getExtent(){return this.extent}getImage(){return this.image_}getPixelRatio(){return this.pixelRatio_}getResolution(){return this.resolution}getState(){return this.state}load(){if(this.state==et.IDLE&&this.loader){this.state=et.LOADING,this.changed();const t=this.getResolution(),e=Array.isArray(t)?t[0]:t;Vm(()=>this.loader(this.getExtent(),e,this.getPixelRatio())).then(n=>{"image"in n&&(this.image_=n.image),"extent"in n&&(this.extent=n.extent),"resolution"in n&&(this.resolution=n.resolution),"pixelRatio"in n&&(this.pixelRatio_=n.pixelRatio),(n instanceof HTMLImageElement||n instanceof ImageBitmap||n instanceof HTMLCanvasElement||n instanceof HTMLVideoElement)&&(this.image_=n),this.state=et.LOADED}).catch(n=>{this.state=et.ERROR,console.error(n)}).finally(()=>this.changed())}}setImage(t){this.image_=t}setResolution(t){this.resolution=t}}function qb(i,t,e){const n=i;let s=!0,r=!1,o=!1;const a=[Ho(n,Lt.LOAD,function(){o=!0,r||t()})];return n.src&&bd?(r=!0,n.decode().then(function(){s&&t()}).catch(function(l){s&&(o?t():e())})):a.push(Ho(n,Lt.ERROR,e)),function(){s=!1,a.forEach(ve)}}function Xb(i,t){return new Promise((e,n)=>{function s(){o(),e(i)}function r(){o(),n(new Error("Image load error"))}function o(){i.removeEventListener("load",s),i.removeEventListener("error",r)}i.addEventListener("load",s),i.addEventListener("error",r),t&&(i.src=t)})}function A0(i,t){return t&&(i.src=t),i.src&&bd?new Promise((e,n)=>i.decode().then(()=>e(i)).catch(s=>i.complete&&i.width?e(i):n(s))):Xb(i)}function _s(i,t){return t&&(i.src=t),i.src&&bd&&Wb?i.decode().then(()=>createImageBitmap(i)).catch(e=>{if(i.complete&&i.width)return i;throw e}):A0(i)}class Zb{constructor(){this.cache_={},this.patternCache_={},this.cacheSize_=0,this.maxCacheSize_=32}clear(){this.cache_={},this.patternCache_={},this.cacheSize_=0}canExpireCache(){return this.cacheSize_>this.maxCacheSize_}expire(){if(this.canExpireCache()){let t=0;for(const e in this.cache_){const n=this.cache_[e];!(t++&3)&&!n.hasListener()&&(delete this.cache_[e],delete this.patternCache_[e],--this.cacheSize_)}}}get(t,e,n){const s=mc(t,e,n);return s in this.cache_?this.cache_[s]:null}getPattern(t,e,n){const s=mc(t,e,n);return s in this.patternCache_?this.patternCache_[s]:null}set(t,e,n,s,r){const o=mc(t,e,n),a=o in this.cache_;this.cache_[o]=s,r&&(s.getImageState()===et.IDLE&&s.load(),s.getImageState()===et.LOADING?s.ready().then(()=>{this.patternCache_[o]=ou().createPattern(s.getImage(1),"repeat")}):this.patternCache_[o]=ou().createPattern(s.getImage(1),"repeat")),a||++this.cacheSize_}setSize(t){this.maxCacheSize_=t,this.expire()}}function mc(i,t,e){const n=e?Wi(e):"null";return t+":"+i+":"+n}const ss=new Zb;let _o=null;class $b extends xa{constructor(t,e,n,s,r){super(),this.hitDetectionImage_=null,this.image_=t,this.crossOrigin_=n,this.canvas_={},this.color_=r,this.imageState_=s===void 0?et.IDLE:s,this.size_=t&&t.width&&t.height?[t.width,t.height]:null,this.src_=e,this.tainted_,this.ready_=null}initializeImage_(){this.image_=new Image,this.crossOrigin_!==null&&(this.image_.crossOrigin=this.crossOrigin_)}isTainted_(){if(this.tainted_===void 0&&this.imageState_===et.LOADED){_o||(_o=Jt(1,1,void 0,{willReadFrequently:!0})),_o.drawImage(this.image_,0,0);try{_o.getImageData(0,0,1,1),this.tainted_=!1}catch{_o=null,this.tainted_=!0}}return this.tainted_===!0}dispatchChangeEvent_(){this.dispatchEvent(Lt.CHANGE)}handleImageError_(){this.imageState_=et.ERROR,this.dispatchChangeEvent_()}handleImageLoad_(){this.imageState_=et.LOADED,this.size_=[this.image_.width,this.image_.height],this.dispatchChangeEvent_()}getImage(t){return this.image_||this.initializeImage_(),this.replaceColor_(t),this.canvas_[t]?this.canvas_[t]:this.image_}getPixelRatio(t){return this.replaceColor_(t),this.canvas_[t]?t:1}getImageState(){return this.imageState_}getHitDetectionImage(){if(this.image_||this.initializeImage_(),!this.hitDetectionImage_)if(this.isTainted_()){const t=this.size_[0],e=this.size_[1],n=Jt(t,e);n.fillRect(0,0,t,e),this.hitDetectionImage_=n.canvas}else this.hitDetectionImage_=this.image_;return this.hitDetectionImage_}getSize(){return this.size_}getSrc(){return this.src_}load(){if(this.imageState_===et.IDLE){this.image_||this.initializeImage_(),this.imageState_=et.LOADING;try{this.src_!==void 0&&(this.image_.src=this.src_)}catch{this.handleImageError_()}this.image_ instanceof HTMLImageElement&&A0(this.image_,this.src_).then(t=>{this.image_=t,this.handleImageLoad_()}).catch(this.handleImageError_.bind(this))}}replaceColor_(t){if(!this.color_||this.canvas_[t]||this.imageState_!==et.LOADED)return;const e=this.image_,n=document.createElement("canvas");n.width=Math.ceil(e.width*t),n.height=Math.ceil(e.height*t);const s=n.getContext("2d");s.scale(t,t),s.drawImage(e,0,0),s.globalCompositeOperation="multiply",s.fillStyle=kb(this.color_),s.fillRect(0,0,n.width/t,n.height/t),s.globalCompositeOperation="destination-in",s.drawImage(e,0,0),this.canvas_[t]=n}ready(){return this.ready_||(this.ready_=new Promise(t=>{this.imageState_===et.LOADED||this.imageState_===et.ERROR?t():this.addEventListener(Lt.CHANGE,function e(){(this.imageState_===et.LOADED||this.imageState_===et.ERROR)&&(this.removeEventListener(Lt.CHANGE,e),t())})})),this.ready_}}function Ed(i,t,e,n,s,r){let o=t===void 0?void 0:ss.get(t,e,s);return o||(o=new $b(i,i instanceof HTMLImageElement?i.src||void 0:t,e,n,s),ss.set(t,e,s,o,r)),r&&o&&!ss.getPattern(t,e,s)&&ss.set(t,e,s,o,r),o}class qi{constructor(t){t=t||{},this.patternImage_=null,this.color_=null,t.color!==void 0&&this.setColor(t.color)}clone(){const t=this.getColor();return new qi({color:Array.isArray(t)?t.slice():t||void 0})}getColor(){return this.color_}setColor(t){if(t!==null&&typeof t=="object"&&"src"in t){const e=Ed(null,t.src,"anonymous",void 0,t.offset?null:t.color?t.color:null,!(t.offset&&t.size));e.ready().then(()=>{this.patternImage_=null}),e.getImageState()===et.IDLE&&e.load(),e.getImageState()===et.LOADING&&(this.patternImage_=e)}this.color_=t}loading(){return!!this.patternImage_}ready(){return this.patternImage_?this.patternImage_.ready():Promise.resolve()}}function L0(i,t,e){return e===void 0&&(e=[0,0]),e[0]=i[0]*t+.5|0,e[1]=i[1]*t+.5|0,e}function se(i,t){return Array.isArray(i)?i:(t===void 0?t=[i,i]:(t[0]=i,t[1]=i),t)}class Mh{constructor(t){this.opacity_=t.opacity,this.rotateWithView_=t.rotateWithView,this.rotation_=t.rotation,this.scale_=t.scale,this.scaleArray_=se(t.scale),this.displacement_=t.displacement,this.declutterMode_=t.declutterMode}clone(){const t=this.getScale();return new Mh({opacity:this.getOpacity(),scale:Array.isArray(t)?t.slice():t,rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),displacement:this.getDisplacement().slice(),declutterMode:this.getDeclutterMode()})}getOpacity(){return this.opacity_}getRotateWithView(){return this.rotateWithView_}getRotation(){return this.rotation_}getScale(){return this.scale_}getScaleArray(){return this.scaleArray_}getDisplacement(){return this.displacement_}getDeclutterMode(){return this.declutterMode_}getAnchor(){return ct()}getImage(t){return ct()}getHitDetectionImage(){return ct()}getPixelRatio(t){return 1}getImageState(){return ct()}getImageSize(){return ct()}getOrigin(){return ct()}getSize(){return ct()}setDisplacement(t){this.displacement_=t}setOpacity(t){this.opacity_=t}setRotateWithView(t){this.rotateWithView_=t}setRotation(t){this.rotation_=t}setScale(t){this.scale_=t,this.scaleArray_=se(t)}listenImageChange(t){ct()}load(){ct()}unlistenImageChange(t){ct()}ready(){return Promise.resolve()}}function Ff(i,t,e,n){return e!==void 0&&n!==void 0?[e/i,n/t]:e!==void 0?e/i:n!==void 0?n/t:1}class Sd extends Mh{constructor(t){t=t||{};const e=t.opacity!==void 0?t.opacity:1,n=t.rotation!==void 0?t.rotation:0,s=t.scale!==void 0?t.scale:1,r=t.rotateWithView!==void 0?t.rotateWithView:!1;super({opacity:e,rotation:n,scale:s,displacement:t.displacement!==void 0?t.displacement:[0,0],rotateWithView:r,declutterMode:t.declutterMode}),this.anchor_=t.anchor!==void 0?t.anchor:[.5,.5],this.normalizedAnchor_=null,this.anchorOrigin_=t.anchorOrigin!==void 0?t.anchorOrigin:"top-left",this.anchorXUnits_=t.anchorXUnits!==void 0?t.anchorXUnits:"fraction",this.anchorYUnits_=t.anchorYUnits!==void 0?t.anchorYUnits:"fraction",this.crossOrigin_=t.crossOrigin!==void 0?t.crossOrigin:null;const o=t.img!==void 0?t.img:null;let a=t.src;At(!(a!==void 0&&o),"`image` and `src` cannot be provided at the same time"),(a===void 0||a.length===0)&&o&&(a=o.src||st(o)),At(a!==void 0&&a.length>0,"A defined and non-empty `src` or `image` must be provided"),At(!((t.width!==void 0||t.height!==void 0)&&t.scale!==void 0),"`width` or `height` cannot be provided together with `scale`");let l;if(t.src!==void 0?l=et.IDLE:o!==void 0&&(o instanceof HTMLImageElement?o.complete?l=o.src?et.LOADED:et.IDLE:l=et.LOADING:l=et.LOADED),this.color_=t.color!==void 0?Wi(t.color):null,this.iconImage_=Ed(o,a,this.crossOrigin_,l,this.color_),this.offset_=t.offset!==void 0?t.offset:[0,0],this.offsetOrigin_=t.offsetOrigin!==void 0?t.offsetOrigin:"top-left",this.origin_=null,this.size_=t.size!==void 0?t.size:null,t.width!==void 0||t.height!==void 0){let h,c;if(t.size)[h,c]=t.size;else{const u=this.getImage(1);if(u.width&&u.height)h=u.width,c=u.height;else if(u instanceof HTMLImageElement){this.initialOptions_=t;const g=()=>{if(this.unlistenImageChange(g),!this.initialOptions_)return;const f=this.iconImage_.getSize();this.setScale(Ff(f[0],f[1],t.width,t.height))};this.listenImageChange(g);return}}h!==void 0&&this.setScale(Ff(h,c,t.width,t.height))}}clone(){let t,e,n;return this.initialOptions_?(e=this.initialOptions_.width,n=this.initialOptions_.height):(t=this.getScale(),t=Array.isArray(t)?t.slice():t),new Sd({anchor:this.anchor_.slice(),anchorOrigin:this.anchorOrigin_,anchorXUnits:this.anchorXUnits_,anchorYUnits:this.anchorYUnits_,color:this.color_&&this.color_.slice?this.color_.slice():this.color_||void 0,crossOrigin:this.crossOrigin_,offset:this.offset_.slice(),offsetOrigin:this.offsetOrigin_,opacity:this.getOpacity(),rotateWithView:this.getRotateWithView(),rotation:this.getRotation(),scale:t,width:e,height:n,size:this.size_!==null?this.size_.slice():void 0,src:this.getSrc(),displacement:this.getDisplacement().slice(),declutterMode:this.getDeclutterMode()})}getAnchor(){let t=this.normalizedAnchor_;if(!t){t=this.anchor_;const s=this.getSize();if(this.anchorXUnits_=="fraction"||this.anchorYUnits_=="fraction"){if(!s)return null;t=this.anchor_.slice(),this.anchorXUnits_=="fraction"&&(t[0]*=s[0]),this.anchorYUnits_=="fraction"&&(t[1]*=s[1])}if(this.anchorOrigin_!="top-left"){if(!s)return null;t===this.anchor_&&(t=this.anchor_.slice()),(this.anchorOrigin_=="top-right"||this.anchorOrigin_=="bottom-right")&&(t[0]=-t[0]+s[0]),(this.anchorOrigin_=="bottom-left"||this.anchorOrigin_=="bottom-right")&&(t[1]=-t[1]+s[1])}this.normalizedAnchor_=t}const e=this.getDisplacement(),n=this.getScaleArray();return[t[0]-e[0]/n[0],t[1]+e[1]/n[1]]}setAnchor(t){this.anchor_=t,this.normalizedAnchor_=null}getColor(){return this.color_}getImage(t){return this.iconImage_.getImage(t)}getPixelRatio(t){return this.iconImage_.getPixelRatio(t)}getImageSize(){return this.iconImage_.getSize()}getImageState(){return this.iconImage_.getImageState()}getHitDetectionImage(){return this.iconImage_.getHitDetectionImage()}getOrigin(){if(this.origin_)return this.origin_;let t=this.offset_;if(this.offsetOrigin_!="top-left"){const e=this.getSize(),n=this.iconImage_.getSize();if(!e||!n)return null;t=t.slice(),(this.offsetOrigin_=="top-right"||this.offsetOrigin_=="bottom-right")&&(t[0]=n[0]-e[0]-t[0]),(this.offsetOrigin_=="bottom-left"||this.offsetOrigin_=="bottom-right")&&(t[1]=n[1]-e[1]-t[1])}return this.origin_=t,this.origin_}getSrc(){return this.iconImage_.getSrc()}getSize(){return this.size_?this.size_:this.iconImage_.getSize()}getWidth(){const t=this.getScaleArray();if(this.size_)return this.size_[0]*t[0];if(this.iconImage_.getImageState()==et.LOADED)return this.iconImage_.getSize()[0]*t[0]}getHeight(){const t=this.getScaleArray();if(this.size_)return this.size_[1]*t[1];if(this.iconImage_.getImageState()==et.LOADED)return this.iconImage_.getSize()[1]*t[1]}setScale(t){delete this.initialOptions_,super.setScale(t)}listenImageChange(t){this.iconImage_.addEventListener(Lt.CHANGE,t)}load(){this.iconImage_.load()}unlistenImageChange(t){this.iconImage_.removeEventListener(Lt.CHANGE,t)}ready(){return this.iconImage_.ready()}}const Rh=Sd;class Td{constructor(t){t=t||{},this.color_=t.color!==void 0?t.color:null,this.lineCap_=t.lineCap,this.lineDash_=t.lineDash!==void 0?t.lineDash:null,this.lineDashOffset_=t.lineDashOffset,this.lineJoin_=t.lineJoin,this.miterLimit_=t.miterLimit,this.width_=t.width}clone(){const t=this.getColor();return new Td({color:Array.isArray(t)?t.slice():t||void 0,lineCap:this.getLineCap(),lineDash:this.getLineDash()?this.getLineDash().slice():void 0,lineDashOffset:this.getLineDashOffset(),lineJoin:this.getLineJoin(),miterLimit:this.getMiterLimit(),width:this.getWidth()})}getColor(){return this.color_}getLineCap(){return this.lineCap_}getLineDash(){return this.lineDash_}getLineDashOffset(){return this.lineDashOffset_}getLineJoin(){return this.lineJoin_}getMiterLimit(){return this.miterLimit_}getWidth(){return this.width_}setColor(t){this.color_=t}setLineCap(t){this.lineCap_=t}setLineDash(t){this.lineDash_=t}setLineDashOffset(t){this.lineDashOffset_=t}setLineJoin(t){this.lineJoin_=t}setMiterLimit(t){this.miterLimit_=t}setWidth(t){this.width_=t}}const cn=Td;function nn(i){return i?Array.isArray(i)?wd(i):typeof i=="object"&&"src"in i?Vb(i):i:null}function Vb(i){if(!i.offset||!i.size)return ss.getPattern(i.src,"anonymous",i.color);const t=i.src+":"+i.offset,e=ss.getPattern(t,void 0,i.color);if(e)return e;const n=ss.get(i.src,"anonymous",null);if(n.getImageState()!==et.LOADED)return null;const s=Jt(i.size[0],i.size[1]);return s.drawImage(n.getImage(1),i.offset[0],i.offset[1],i.size[0],i.size[1],0,0,i.size[0],i.size[1]),Ed(s.canvas,t,void 0,et.LOADED,i.color,!0),ss.getPattern(t,void 0,i.color)}const Yb=new RegExp(["^\\s*(?=(?:(?:[-a-z]+\\s*){0,2}(italic|oblique))?)","(?=(?:(?:[-a-z]+\\s*){0,2}(small-caps))?)","(?=(?:(?:[-a-z]+\\s*){0,2}(bold(?:er)?|lighter|[1-9]00 ))?)","(?:(?:normal|\\1|\\2|\\3)\\s*){0,3}((?:xx?-)?","(?:small|large)|medium|smaller|larger|[\\.\\d]+(?:\\%|in|[cem]m|ex|p[ctx]))","(?:\\s*\\/\\s*(normal|[\\.\\d]+(?:\\%|in|[cem]m|ex|p[ctx])?))",`?\\s*([-,\\"\\'\\sa-z]+?)\\s*$`].join(""),"i"),Nf=["style","variant","weight","size","lineHeight","family"],O0=function(i){const t=i.match(Yb);if(!t)return null;const e={lineHeight:"normal",size:"1.2em",style:"normal",weight:"normal",variant:"normal"};for(let n=0,s=Nf.length;nMath.max(s,kl(i,r)),0);return e[t]=n,n}function Qb(i,t){const e=[],n=[],s=[];let r=0,o=0,a=0,l=0;for(let h=0,c=t.length;h<=c;h+=2){const u=t[h];if(u===` -`||h===c){r=Math.max(r,o),s.push(o),o=0,a+=l;continue}const g=t[h+1]||i.font,f=kl(g,u);e.push(f),o+=f;const p=Kb(g);n.push(p),l=Math.max(l,p)}return{width:r,height:a,widths:e,heights:n,lineWidths:s}}function Jb(i,t,e,n,s,r,o,a,l,h,c){i.save(),e!==1&&(i.globalAlpha===void 0?i.globalAlpha=u=>u.globalAlpha*=e:i.globalAlpha*=e),t&&i.transform.apply(i,t),n.contextInstructions?(i.translate(l,h),i.scale(c[0],c[1]),tE(n,i)):c[0]<0||c[1]<0?(i.translate(l,h),i.scale(c[0],c[1]),i.drawImage(n,s,r,o,a,0,0,o,a)):i.drawImage(n,s,r,o,a,l,h,o*c[0],a*c[1]),i.restore()}function tE(i,t){const e=i.contextInstructions;for(let n=0,s=e.length;nthis.imageState_=et.LOADED),this.render()}clone(){const t=this.getScale(),e=new Ch({fill:this.getFill()?this.getFill().clone():void 0,points:this.getPoints(),radius:this.getRadius(),radius2:this.getRadius2(),angle:this.getAngle(),stroke:this.getStroke()?this.getStroke().clone():void 0,rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),scale:Array.isArray(t)?t.slice():t,displacement:this.getDisplacement().slice(),declutterMode:this.getDeclutterMode()});return e.setOpacity(this.getOpacity()),e}getAnchor(){const t=this.size_,e=this.getDisplacement(),n=this.getScaleArray();return[t[0]/2-e[0]/n[0],t[1]/2+e[1]/n[1]]}getAngle(){return this.angle_}getFill(){return this.fill_}setFill(t){this.fill_=t,this.render()}getHitDetectionImage(){return this.hitDetectionCanvas_||(this.hitDetectionCanvas_=this.createHitDetectionCanvas_(this.renderOptions_)),this.hitDetectionCanvas_}getImage(t){let e=this.canvases_[t];if(!e){const n=this.renderOptions_,s=Jt(n.size*t,n.size*t);this.draw_(n,s,t),e=s.canvas,this.canvases_[t]=e}return e}getPixelRatio(t){return t}getImageSize(){return this.size_}getImageState(){return this.imageState_}getOrigin(){return this.origin_}getPoints(){return this.points_}getRadius(){return this.radius_}getRadius2(){return this.radius2_}getSize(){return this.size_}getStroke(){return this.stroke_}setStroke(t){this.stroke_=t,this.render()}listenImageChange(t){}load(){}unlistenImageChange(t){}calculateLineJoinSize_(t,e,n){if(e===0||this.points_===1/0||t!=="bevel"&&t!=="miter")return e;let s=this.radius_,r=this.radius2_===void 0?s:this.radius2_;if(s1?o.Document=t:t.length==1&&(o.Placemark=t[0]);const a=hE[n.namespaceURI],l=ui(o,a);return pt(r,cE,Ie,l,[e],a,this),n}}function fE(i,t){const e=[0,0];let n="start";const s=i.getImage();if(s){const o=s.getSize();if(o&&o.length==2){const a=s.getScaleArray(),l=s.getAnchor();e[0]=a[0]*(o[0]-l[0]),e[1]=a[1]*(o[1]/2-l[1]),n="left"}}let r=i.getText();return r?(r=r.clone(),r.setFont(r.getFont()||Ps.getFont()),r.setScale(r.getScale()||Ps.getScale()),r.setFill(r.getFill()||Ps.getFill()),r.setStroke(r.getStroke()||du)):r=Ps.clone(),r.setText(t),r.setOffsetX(e[0]),r.setOffsetY(e[1]),r.setTextAlign(n),new Ve({image:s,text:r})}function pE(i,t,e,n,s){return function(r,o){let a=s,l="",h=[];if(a){const u=r.getGeometry();if(u)if(u instanceof je)h=u.getGeometriesArrayRecursive().filter(function(g){const f=g.getType();return f==="Point"||f==="MultiPoint"}),a=h.length>0;else{const g=u.getType();a=g==="Point"||g==="MultiPoint"}}a&&(l=r.get("name"),a=a&&!!l,a&&/&[^&]+;/.test(l)&&(tl||(tl=document.createElement("textarea")),tl.innerHTML=l,l=tl.value));let c=e;if(i?c=i:t&&(c=D0(t,e,n)),a){const u=fE(c[0],l);if(h.length>0){u.setGeometry(new je(h));const g=new Ve({geometry:c[0].getGeometry(),image:null,fill:c[0].getFill(),stroke:c[0].getStroke(),text:null});return[u,g].concat(c.slice(1))}return u}return c}}function D0(i,t,e){return Array.isArray(i)?i:typeof i=="string"?D0(e[i],t,e):t}function Ah(i){const t=Ye(i,!1),e=/^\s*#?\s*([0-9A-Fa-f]{8})\s*$/.exec(t);if(e){const n=e[1];return[parseInt(n.substr(6,2),16),parseInt(n.substr(4,2),16),parseInt(n.substr(2,2),16),parseInt(n.substr(0,2),16)/255]}}function G0(i){let t=Ye(i,!1);const e=[];t=t.replace(/\s*,\s*/g,",");const n=/^\s*([+\-]?\d*\.?\d+(?:e[+\-]?\d+)?),([+\-]?\d*\.?\d+(?:e[+\-]?\d+)?)(?:\s+|,|$)(?:([+\-]?\d*\.?\d+(?:e[+\-]?\d+)?)(?:\s+|$))?\s*/i;let s;for(;s=n.exec(t);){const r=parseFloat(s[1]),o=parseFloat(s[2]),a=s[3]?parseFloat(s[3]):0;e.push(r,o,a),t=t.substr(s[0].length)}if(t==="")return e}function j0(i){const t=Ye(i,!1).trim();let e=i.baseURI;return(!e||e=="about:blank")&&(e=window.location.href),e?new URL(t,e).href:t}function z0(i){const t=Ye(i,!1).trim().replace(/^(?!.*#)/,"#");let e=i.baseURI;return(!e||e=="about:blank")&&(e=window.location.href),e?new URL(t,e).href:t}function mE(i){const t=i.getAttribute("xunits"),e=i.getAttribute("yunits");let n;return t!=="insetPixels"?e!=="insetPixels"?n="bottom-left":n="top-left":e!=="insetPixels"?n="bottom-right":n="top-right",{x:parseFloat(i.getAttribute("x")),xunits:Gf[t],y:parseFloat(i.getAttribute("y")),yunits:Gf[e],origin:n}}function U0(i){return Pt(i)}const _E=X(lt,{Pair:UE});function B0(i,t){return Z(void 0,_E,i,t,this)}const yE=X(lt,{Icon:O(LE),color:O(Ah),heading:O(Pt),hotSpot:O(mE),scale:O(U0)});function xE(i,t){const e=Z({},yE,i,t);if(!e)return;const n=t[t.length-1],s="Icon"in e?e.Icon:{},r=!("Icon"in e)||Object.keys(s).length>0;let o;const a=s.href;a?o=a:r&&(o=Dl);let l,h,c,u="bottom-left";const g=e.hotSpot;g?(l=[g.x,g.y],h=g.xunits,c=g.yunits,u=g.origin):/^https?:\/\/maps\.(?:google|gstatic)\.com\//.test(o)&&(o.includes("pushpin")?(l=hu,h=Do,c=Go):o.includes("arrow-reverse")?(l=[54,42],h=Do,c=Go):o.includes("paddle")&&(l=[32,1],h=Do,c=Go));let f;const p=s.x,_=s.y;p!==void 0&&_!==void 0&&(f=[p,_]);let x;const v=s.w,w=s.h;v!==void 0&&w!==void 0&&(x=[v,w]);let E;const S=e.heading;S!==void 0&&(E=ko(S));const T=e.scale,R=e.color;if(r){o==Dl&&(x=jo);const C=new Rh({anchor:l,anchorOrigin:u,anchorXUnits:h,anchorYUnits:c,crossOrigin:this.crossOrigin_,offset:f,offsetOrigin:"bottom-left",rotation:E,scale:T,size:x,src:this.iconUrlFunction_(o),color:R}),P=C.getScaleArray()[0],N=C.getSize();if(N===null){const U=C.getImageState();if(U===et.IDLE||U===et.LOADING){const j=function(){const B=C.getImageState();if(!(B===et.IDLE||B===et.LOADING)){const d=C.getSize();if(d&&d.length==2){const m=Gl(d);C.setScale(P*m)}C.unlistenImageChange(j)}};C.listenImageChange(j),U===et.IDLE&&C.load()}}else if(N.length==2){const U=Gl(N);C.setScale(P*U)}n.imageStyle=C}else n.imageStyle=Md}const vE=X(lt,{color:O(Ah),scale:O(U0)});function wE(i,t){const e=Z({},vE,i,t);if(!e)return;const n=t[t.length-1],s=new Bs({fill:new qi({color:"color"in e?e.color:Ar}),scale:e.scale});n.textStyle=s}const bE=X(lt,{color:O(Ah),width:O(Pt)});function EE(i,t){const e=Z({},bE,i,t);if(!e)return;const n=t[t.length-1],s=new cn({color:"color"in e?e.color:Ar,width:"width"in e?e.width:1});n.strokeStyle=s}const SE=X(lt,{color:O(Ah),fill:O(gs),outline:O(gs)});function TE(i,t){const e=Z({},SE,i,t);if(!e)return;const n=t[t.length-1],s=new qi({color:"color"in e?e.color:Ar});n.fillStyle=s;const r=e.fill;r!==void 0&&(n.fill=r);const o=e.outline;o!==void 0&&(n.outline=o)}const ME=X(lt,{coordinates:ht(G0)});function W0(i,t){return Z(null,ME,i,t)}function RE(i,t){const e=t[t.length-1].coordinates,n=Ye(i,!1),s=/^\s*([+\-]?\d+(?:\.\d*)?(?:e[+\-]?\d*)?)\s+([+\-]?\d+(?:\.\d*)?(?:e[+\-]?\d*)?)\s+([+\-]?\d+(?:\.\d*)?(?:e[+\-]?\d*)?)\s*$/i.exec(n);if(s){const r=parseFloat(s[1]),o=parseFloat(s[2]),a=parseFloat(s[3]);e.push([r,o,a])}else e.push([])}const CE=X(Bn,{Track:ot(q0)});function IE(i,t){const e=Z([],CE,i,t);if(e)return new ci(e)}const PE=X(lt,{when:eS},X(Bn,{coord:RE}));function q0(i,t){const e=Z({coordinates:[],whens:[]},PE,i,t);if(!e)return;const n=[],s=e.coordinates,r=e.whens;for(let o=0,a=Math.min(s.length,r.length);o0&&t[t.length-1].push(...e)}const QE=X(lt,{LinearRing:ht(W0)});function JE(i,t){const e=Z(void 0,QE,i,t);if(e){const n=t[t.length-1];n[0]=e}}function tS(i,t){li(aE,i,t)}function eS(i,t){const e=t[t.length-1].whens,n=Ye(i,!1),s=Date.parse(n);e.push(isNaN(s)?0:s)}function Oh(i,t){const e=Wi(t),n=[(e.length==4?e[3]:1)*255,e[2],e[1],e[0]];for(let s=0;s<4;++s){const r=Math.floor(n[s]).toString(16);n[s]=r.length==1?"0"+r:r}ft(i,n.join(""))}function iS(i,t,e){const n=e[e.length-1],s=n.layout,r=n.stride;let o;if(s=="XY"||s=="XYM")o=2;else if(s=="XYZ"||s=="XYZM")o=3;else throw new Error("Invalid geometry layout");const a=t.length;let l="";if(a>0){l+=t[0];for(let h=1;h0){const f=ui(s,o);pt(n,xc,PS,[{names:o,values:f}],e)}const u=e[0];let g=t.getGeometry();g&&(g=re(g,!0,u)),pt(n,xc,Q0,[g],e)}const AS=X(lt,["extrude","tessellate","altitudeMode","coordinates"]),LS=X(lt,{extrude:F(Ur),tessellate:F(Ur),altitudeMode:F(ft),coordinates:F(iS)});function Lr(i,t,e){const n=t.getFlatCoordinates(),s={node:i};s.layout=t.getLayout(),s.stride=t.getStride();const r=t.getProperties();r.coordinates=n;const o=e[e.length-1].node,a=AS[o.namespaceURI],l=ui(r,a);pt(s,LS,Ie,l,e,a)}const OS=X(lt,["color","fill","outline"]),Wf=X(lt,{outerBoundaryIs:F(Bf),innerBoundaryIs:F(Bf)}),FS=ce("innerBoundaryIs"),NS=ce("outerBoundaryIs");function e_(i,t,e){const n=t.getLinearRings(),s=n.shift(),r={node:i};pt(r,Wf,FS,n,e),pt(r,Wf,NS,[s],e)}const kS=X(lt,{color:F(Oh),fill:F(Ur),outline:F(Ur)});function DS(i,t,e){const n={node:i},s=t.getFill(),r=t.getStroke(),o={color:s?s.getColor():void 0,fill:s?void 0:!1,outline:r?void 0:!1},a=e[e.length-1].node,l=OS[a.namespaceURI],h=ui(o,l);pt(n,kS,Ie,h,e,l)}function i_(i,t){ii(i,Math.round(t*1e6)/1e6)}const GS=X(lt,["IconStyle","LabelStyle","LineStyle","PolyStyle"]),jS=X(lt,{IconStyle:F(pS),LabelStyle:F(yS),LineStyle:F(wS),PolyStyle:F(DS)});function zS(i,t,e){const n={node:i},s={};if(t.pointStyles.length){const l=t.pointStyles[0].getText();l&&(s.LabelStyle=l);const h=t.pointStyles[0].getImage();h&&typeof h.getSrc=="function"&&(s.IconStyle=h)}if(t.lineStyles.length){const l=t.lineStyles[0].getStroke();l&&(s.LineStyle=l)}if(t.polyStyles.length){const l=t.polyStyles[0].getStroke();l&&!s.LineStyle&&(s.LineStyle=l),s.PolyStyle=t.polyStyles[0]}const r=e[e.length-1].node,o=GS[r.namespaceURI],a=ui(s,o);pt(n,jS,Ie,a,e,o)}function US(i,t){i.setAttribute("x",String(t.x)),i.setAttribute("y",String(t.y)),i.setAttribute("xunits",t.xunits),i.setAttribute("yunits",t.yunits)}const BS=gE;var Id={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */Id.read=function(i,t,e,n,s){var r,o,a=s*8-n-1,l=(1<>1,c=-7,u=e?s-1:0,g=e?-1:1,f=i[t+u];for(u+=g,r=f&(1<<-c)-1,f>>=-c,c+=a;c>0;r=r*256+i[t+u],u+=g,c-=8);for(o=r&(1<<-c)-1,r>>=-c,c+=n;c>0;o=o*256+i[t+u],u+=g,c-=8);if(r===0)r=1-h;else{if(r===l)return o?NaN:(f?-1:1)*(1/0);o=o+Math.pow(2,n),r=r-h}return(f?-1:1)*o*Math.pow(2,r-n)};Id.write=function(i,t,e,n,s,r){var o,a,l,h=r*8-s-1,c=(1<>1,g=s===23?Math.pow(2,-24)-Math.pow(2,-77):0,f=n?0:r-1,p=n?1:-1,_=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,o=c):(o=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-o))<1&&(o--,l*=2),o+u>=1?t+=g/l:t+=g*Math.pow(2,1-u),t*l>=2&&(o++,l/=2),o+u>=c?(a=0,o=c):o+u>=1?(a=(t*l-1)*Math.pow(2,s),o=o+u):(a=t*Math.pow(2,u-1)*Math.pow(2,s),o=0));s>=8;i[e+f]=a&255,f+=p,a/=256,s-=8);for(o=o<0;i[e+f]=o&255,f+=p,o/=256,h-=8);i[e+f-p]|=_*128};var WS=jt,el=Id;function jt(i){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(i)?i:new Uint8Array(i||0),this.pos=0,this.type=0,this.length=this.buf.length}jt.Varint=0;jt.Fixed64=1;jt.Bytes=2;jt.Fixed32=5;var fu=65536*65536,qf=1/fu,qS=12,n_=typeof TextDecoder>"u"?null:new TextDecoder("utf8");jt.prototype={destroy:function(){this.buf=null},readFields:function(i,t,e){for(e=e||this.length;this.pos>3,r=this.pos;this.type=n&7,i(s,t,this),this.pos===r&&this.skip(n)}return t},readMessage:function(i,t){return this.readFields(i,t,this.readVarint()+this.pos)},readFixed32:function(){var i=il(this.buf,this.pos);return this.pos+=4,i},readSFixed32:function(){var i=Zf(this.buf,this.pos);return this.pos+=4,i},readFixed64:function(){var i=il(this.buf,this.pos)+il(this.buf,this.pos+4)*fu;return this.pos+=8,i},readSFixed64:function(){var i=il(this.buf,this.pos)+Zf(this.buf,this.pos+4)*fu;return this.pos+=8,i},readFloat:function(){var i=el.read(this.buf,this.pos,!0,23,4);return this.pos+=4,i},readDouble:function(){var i=el.read(this.buf,this.pos,!0,52,8);return this.pos+=8,i},readVarint:function(i){var t=this.buf,e,n;return n=t[this.pos++],e=n&127,n<128||(n=t[this.pos++],e|=(n&127)<<7,n<128)||(n=t[this.pos++],e|=(n&127)<<14,n<128)||(n=t[this.pos++],e|=(n&127)<<21,n<128)?e:(n=t[this.pos],e|=(n&15)<<28,XS(e,i,this))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var i=this.readVarint();return i%2===1?(i+1)/-2:i/2},readBoolean:function(){return!!this.readVarint()},readString:function(){var i=this.readVarint()+this.pos,t=this.pos;return this.pos=i,i-t>=qS&&n_?o2(this.buf,t,i):r2(this.buf,t,i)},readBytes:function(){var i=this.readVarint()+this.pos,t=this.buf.subarray(this.pos,i);return this.pos=i,t},readPackedVarint:function(i,t){if(this.type!==jt.Bytes)return i.push(this.readVarint(t));var e=xn(this);for(i=i||[];this.pos127;);else if(t===jt.Bytes)this.pos=this.readVarint()+this.pos;else if(t===jt.Fixed32)this.pos+=4;else if(t===jt.Fixed64)this.pos+=8;else throw new Error("Unimplemented type: "+t)},writeTag:function(i,t){this.writeVarint(i<<3|t)},realloc:function(i){for(var t=this.length||16;t268435455||i<0){$S(i,this);return}this.realloc(4),this.buf[this.pos++]=i&127|(i>127?128:0),!(i<=127)&&(this.buf[this.pos++]=(i>>>=7)&127|(i>127?128:0),!(i<=127)&&(this.buf[this.pos++]=(i>>>=7)&127|(i>127?128:0),!(i<=127)&&(this.buf[this.pos++]=i>>>7&127)))},writeSVarint:function(i){this.writeVarint(i<0?-i*2-1:i*2)},writeBoolean:function(i){this.writeVarint(!!i)},writeString:function(i){i=String(i),this.realloc(i.length*4),this.pos++;var t=this.pos;this.pos=a2(this.buf,i,this.pos);var e=this.pos-t;e>=128&&Xf(t,e,this),this.pos=t-1,this.writeVarint(e),this.pos+=e},writeFloat:function(i){this.realloc(4),el.write(this.buf,i,this.pos,!0,23,4),this.pos+=4},writeDouble:function(i){this.realloc(8),el.write(this.buf,i,this.pos,!0,52,8),this.pos+=8},writeBytes:function(i){var t=i.length;this.writeVarint(t),this.realloc(t);for(var e=0;e=128&&Xf(e,n,this),this.pos=e-1,this.writeVarint(n),this.pos+=n},writeMessage:function(i,t,e){this.writeTag(i,jt.Bytes),this.writeRawMessage(t,e)},writePackedVarint:function(i,t){t.length&&this.writeMessage(i,HS,t)},writePackedSVarint:function(i,t){t.length&&this.writeMessage(i,KS,t)},writePackedBoolean:function(i,t){t.length&&this.writeMessage(i,t2,t)},writePackedFloat:function(i,t){t.length&&this.writeMessage(i,QS,t)},writePackedDouble:function(i,t){t.length&&this.writeMessage(i,JS,t)},writePackedFixed32:function(i,t){t.length&&this.writeMessage(i,e2,t)},writePackedSFixed32:function(i,t){t.length&&this.writeMessage(i,i2,t)},writePackedFixed64:function(i,t){t.length&&this.writeMessage(i,n2,t)},writePackedSFixed64:function(i,t){t.length&&this.writeMessage(i,s2,t)},writeBytesField:function(i,t){this.writeTag(i,jt.Bytes),this.writeBytes(t)},writeFixed32Field:function(i,t){this.writeTag(i,jt.Fixed32),this.writeFixed32(t)},writeSFixed32Field:function(i,t){this.writeTag(i,jt.Fixed32),this.writeSFixed32(t)},writeFixed64Field:function(i,t){this.writeTag(i,jt.Fixed64),this.writeFixed64(t)},writeSFixed64Field:function(i,t){this.writeTag(i,jt.Fixed64),this.writeSFixed64(t)},writeVarintField:function(i,t){this.writeTag(i,jt.Varint),this.writeVarint(t)},writeSVarintField:function(i,t){this.writeTag(i,jt.Varint),this.writeSVarint(t)},writeStringField:function(i,t){this.writeTag(i,jt.Bytes),this.writeString(t)},writeFloatField:function(i,t){this.writeTag(i,jt.Fixed32),this.writeFloat(t)},writeDoubleField:function(i,t){this.writeTag(i,jt.Fixed64),this.writeDouble(t)},writeBooleanField:function(i,t){this.writeVarintField(i,!!t)}};function XS(i,t,e){var n=e.buf,s,r;if(r=n[e.pos++],s=(r&112)>>4,r<128||(r=n[e.pos++],s|=(r&127)<<3,r<128)||(r=n[e.pos++],s|=(r&127)<<10,r<128)||(r=n[e.pos++],s|=(r&127)<<17,r<128)||(r=n[e.pos++],s|=(r&127)<<24,r<128)||(r=n[e.pos++],s|=(r&1)<<31,r<128))return ZS(i,s,t);throw new Error("Expected varint not more than 10 bytes")}function xn(i){return i.type===jt.Bytes?i.readVarint()+i.pos:i.pos+1}function ZS(i,t,e){return e?t*4294967296+(i>>>0):(t>>>0)*4294967296+(i>>>0)}function $S(i,t){var e,n;if(i>=0?(e=i%4294967296|0,n=i/4294967296|0):(e=~(-i%4294967296),n=~(-i/4294967296),e^4294967295?e=e+1|0:(e=0,n=n+1|0)),i>=18446744073709552e3||i<-18446744073709552e3)throw new Error("Given varint doesn't fit into 10 bytes");t.realloc(10),VS(e,n,t),YS(n,t)}function VS(i,t,e){e.buf[e.pos++]=i&127|128,i>>>=7,e.buf[e.pos++]=i&127|128,i>>>=7,e.buf[e.pos++]=i&127|128,i>>>=7,e.buf[e.pos++]=i&127|128,i>>>=7,e.buf[e.pos]=i&127}function YS(i,t){var e=(i&7)<<4;t.buf[t.pos++]|=e|((i>>>=3)?128:0),i&&(t.buf[t.pos++]=i&127|((i>>>=7)?128:0),i&&(t.buf[t.pos++]=i&127|((i>>>=7)?128:0),i&&(t.buf[t.pos++]=i&127|((i>>>=7)?128:0),i&&(t.buf[t.pos++]=i&127|((i>>>=7)?128:0),i&&(t.buf[t.pos++]=i&127)))))}function Xf(i,t,e){var n=t<=16383?1:t<=2097151?2:t<=268435455?3:Math.floor(Math.log(t)/(Math.LN2*7));e.realloc(n);for(var s=e.pos-1;s>=i;s--)e.buf[s+n]=e.buf[s]}function HS(i,t){for(var e=0;e>>8,i[e+2]=t>>>16,i[e+3]=t>>>24}function Zf(i,t){return(i[t]|i[t+1]<<8|i[t+2]<<16)+(i[t+3]<<24)}function r2(i,t,e){for(var n="",s=t;s239?4:r>223?3:r>191?2:1;if(s+a>e)break;var l,h,c;a===1?r<128&&(o=r):a===2?(l=i[s+1],(l&192)===128&&(o=(r&31)<<6|l&63,o<=127&&(o=null))):a===3?(l=i[s+1],h=i[s+2],(l&192)===128&&(h&192)===128&&(o=(r&15)<<12|(l&63)<<6|h&63,(o<=2047||o>=55296&&o<=57343)&&(o=null))):a===4&&(l=i[s+1],h=i[s+2],c=i[s+3],(l&192)===128&&(h&192)===128&&(c&192)===128&&(o=(r&15)<<18|(l&63)<<12|(h&63)<<6|c&63,(o<=65535||o>=1114112)&&(o=null))),o===null?(o=65533,a=1):o>65535&&(o-=65536,n+=String.fromCharCode(o>>>10&1023|55296),o=56320|o&1023),n+=String.fromCharCode(o),s+=a}return n}function o2(i,t,e){return n_.decode(i.subarray(t,e))}function a2(i,t,e){for(var n=0,s,r;n55295&&s<57344)if(r)if(s<56320){i[e++]=239,i[e++]=191,i[e++]=189,r=s;continue}else s=r-55296<<10|s-56320|65536,r=null;else{s>56319||n+1===t.length?(i[e++]=239,i[e++]=191,i[e++]=189):r=s;continue}else r&&(i[e++]=239,i[e++]=191,i[e++]=189,r=null);s<128?i[e++]=s:(s<2048?i[e++]=s>>6|192:(s<65536?i[e++]=s>>12|224:(i[e++]=s>>18|240,i[e++]=s>>12&63|128),i[e++]=s>>6&63|128),i[e++]=s&63|128)}return e}const l2=eo(WS);class h2 extends Ca{constructor(t){super(),t=t||{},this.dataProjection=new jr({code:"",units:"tile-pixels"}),this.featureClass_=t.featureClass?t.featureClass:Ge,this.geometryName_=t.geometryName,this.layerName_=t.layerName?t.layerName:"layer",this.layers_=t.layers?t.layers:null,this.idProperty_=t.idProperty,this.supportedMediaTypes=["application/vnd.mapbox-vector-tile","application/x-protobuf"]}readRawGeometry_(t,e,n,s){t.pos=e.geometry;const r=t.readVarint()+t.pos;let o=1,a=0,l=0,h=0,c=0,u=0;for(;t.pos>3}if(a--,o===1||o===2)l+=t.readSVarint(),h+=t.readSVarint(),o===1&&c>u&&(s.push(c),u=c),n.push(l,h),c+=2;else if(o===7)c>u&&(n.push(n[u],n[u+1]),c+=2);else throw new Error("Invalid command found in the PBF")}c>u&&(s.push(c),u=c)}createFeature_(t,e,n){const s=e.type;if(s===0)return null;let r;const o=e.properties;let a;this.idProperty_?(a=o[this.idProperty_],delete o[this.idProperty_]):a=e.id,o[this.layerName_]=e.layer.name;const l=[],h=[];this.readRawGeometry_(t,e,l,h);const c=f2(s,h.length);if(this.featureClass_===Ge)r=new this.featureClass_(c,l,h,2,o,a),r.transform(n.dataProjection);else{let u;if(c=="Polygon"){const p=y0(l,h);u=p.length>1?new Pi(l,"XY",p):new Ue(l,"XY",h)}else u=c==="Point"?new Re(l,"XY"):c==="LineString"?new ye(l,"XY"):c==="MultiPoint"?new Zi(l,"XY"):c==="MultiLineString"?new ci(l,"XY",h):null;const g=this.featureClass_;r=new g,this.geometryName_&&r.setGeometryName(this.geometryName_);const f=re(u,!1,n);r.setGeometry(f),a!==void 0&&r.setId(a),r.setProperties(o,!0)}return r}getType(){return"arraybuffer"}readFeatures(t,e){const n=this.layers_;e=this.adaptOptions(e);const s=tt(e.dataProjection);s.setWorldExtent(e.extent),e.dataProjection=s;const r=new l2(t),o=r.readFields(c2,{}),a=[];for(const l in o){if(n&&!n.includes(l))continue;const h=o[l],c=h?[0,0,h.extent,h.extent]:null;s.setExtent(c);for(let u=0,g=h.length;u>3,n=i===1?e.readString():i===2?e.readFloat():i===3?e.readDouble():i===4?e.readVarint64():i===5?e.readVarint():i===6?e.readSVarint():i===7?e.readBoolean():null;t.values.push(n)}}function d2(i,t,e){if(i==1)t.id=e.readVarint();else if(i==2){const n=e.readVarint()+e.pos;for(;e.pos>1):s>>1}return t}function Q2(i){let t="";for(let e=0,n=i.length;e=32;)t=(32|i&31)+63,e+=String.fromCharCode(t),i>>=5;return t=i+63,e+=String.fromCharCode(t),e}const eT=X2;class iT extends ud{constructor(t){super(),t=t||{},this.layerName_=t.layerName,this.layers_=t.layers?t.layers:null,this.dataProjection=tt(t.dataProjection?t.dataProjection:"EPSG:4326")}readFeaturesFromObject(t,e){if(t.type=="Topology"){const n=t;let s,r=null,o=null;n.transform&&(s=n.transform,r=s.scale,o=s.translate);const a=n.arcs;s&&uT(a,r,o);const l=[],h=n.objects,c=this.layerName_;let u;for(const g in h)this.layers_&&!this.layers_.includes(g)||(h[g].type==="GeometryCollection"?(u=h[g],l.push.apply(l,cT(u,a,r,o,c,g,e))):(u=h[g],l.push(o_(u,a,r,o,c,g,e))));return l}return[]}readProjectionFromObject(t){return this.dataProjection}}const nT={Point:sT,LineString:oT,Polygon:lT,MultiPoint:rT,MultiLineString:aT,MultiPolygon:hT};function Fh(i,t){const e=[];let n;for(let s=0,r=i.length;s0&&e.pop(),n>=0){const o=t[n];for(let a=0,l=o.length;a=0;--a)e.push(o[a].slice(0))}return e}function sT(i,t,e){const n=i.coordinates;return t&&e&&Ad(n,t,e),new Re(n)}function rT(i,t,e){const n=i.coordinates;if(t&&e)for(let s=0,r=n.length;s=2,"At least 2 conditions are required")}}class pT extends fT{constructor(t){super("And",Array.prototype.slice.call(arguments))}}const mT=pT;class _T extends a_{constructor(t,e,n){if(super("BBOX"),this.geometryName=t,this.extent=e,e.length!==4)throw new Error("Expected an extent with four values ([minX, minY, maxX, maxY])");this.srsName=n}}function yT(i){const t=[null].concat(Array.prototype.slice.call(arguments));return new(Function.prototype.bind.apply(mT,t))}function xT(i,t,e){return new _T(i,t,e)}const Vf={"http://www.opengis.net/gml":{boundedBy:O(rt.prototype.readExtentElement,"bounds")},"http://www.opengis.net/wfs/2.0":{member:ot(rt.prototype.readFeaturesInternal)}},vT={"http://www.opengis.net/wfs":{totalInserted:O(ge),totalUpdated:O(ge),totalDeleted:O(ge)},"http://www.opengis.net/wfs/2.0":{totalInserted:O(ge),totalUpdated:O(ge),totalDeleted:O(ge)}},wT={"http://www.opengis.net/wfs":{TransactionSummary:O(Hf,"transactionSummary"),InsertResults:O(Qf,"insertIds")},"http://www.opengis.net/wfs/2.0":{TransactionSummary:O(Hf,"transactionSummary"),InsertResults:O(Qf,"insertIds")}},bT={"http://www.opengis.net/wfs":{PropertyName:F(ft)},"http://www.opengis.net/wfs/2.0":{PropertyName:F(ft)}},l_={"http://www.opengis.net/wfs":{Insert:F(Jf),Update:F(ep),Delete:F(tp),Property:F(ip),Native:F(np)},"http://www.opengis.net/wfs/2.0":{Insert:F(Jf),Update:F(ep),Delete:F(tp),Property:F(ip),Native:F(np)}},h_="feature",Od="http://www.w3.org/2000/xmlns/",Fd={"2.0.0":"http://www.opengis.net/ogc/1.1","1.1.0":"http://www.opengis.net/ogc","1.0.0":"http://www.opengis.net/ogc"},pu={"2.0.0":"http://www.opengis.net/wfs/2.0","1.1.0":"http://www.opengis.net/wfs","1.0.0":"http://www.opengis.net/wfs"},Nd={"2.0.0":"http://www.opengis.net/fes/2.0","1.1.0":"http://www.opengis.net/fes","1.0.0":"http://www.opengis.net/fes"},Yf={"2.0.0":"http://www.opengis.net/wfs/2.0 http://schemas.opengis.net/wfs/2.0/wfs.xsd","1.1.0":"http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.1.0/wfs.xsd","1.0.0":"http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.0.0/wfs.xsd"},kd={"2.0.0":Ld,"1.1.0":Rt,"1.0.0":It},ET="1.1.0";class ST extends Pa{constructor(t){super(),t=t||{},this.version_=t.version?t.version:ET,this.featureType_=t.featureType,this.featureNS_=t.featureNS,this.gmlFormat_=t.gmlFormat?t.gmlFormat:new kd[this.version_],this.schemaLocation_=t.schemaLocation?t.schemaLocation:Yf[this.version_]}getFeatureType(){return this.featureType_}setFeatureType(t){this.featureType_=t}readFeaturesFromNode(t,e){const n={node:t};Object.assign(n,{featureType:this.featureType_,featureNS:this.featureNS_}),Object.assign(n,this.getReadOptions(t,e||{}));const s=[n];let r;this.version_==="2.0.0"?r=Vf:r=this.gmlFormat_.FEATURE_COLLECTION_PARSERS;let o=Z([],r,t,s,this.gmlFormat_);return o||(o=[]),o}readTransactionResponse(t){if(t){if(typeof t=="string"){const e=Ci(t);return this.readTransactionResponseFromDocument(e)}return Ri(t)?this.readTransactionResponseFromDocument(t):this.readTransactionResponseFromNode(t)}}readFeatureCollectionMetadata(t){if(t){if(typeof t=="string"){const e=Ci(t);return this.readFeatureCollectionMetadataFromDocument(e)}return Ri(t)?this.readFeatureCollectionMetadataFromDocument(t):this.readFeatureCollectionMetadataFromNode(t)}}readFeatureCollectionMetadataFromDocument(t){for(let e=t.firstChild;e;e=e.nextSibling)if(e.nodeType==Node.ELEMENT_NODE)return this.readFeatureCollectionMetadataFromNode(e)}readFeatureCollectionMetadataFromNode(t){const e={},n=Cn(t.getAttribute("numberOfFeatures"));return e.numberOfFeatures=n,Z(e,Vf,t,[],this.gmlFormat_)}readTransactionResponseFromDocument(t){for(let e=t.firstChild;e;e=e.nextSibling)if(e.nodeType==Node.ELEMENT_NODE)return this.readTransactionResponseFromNode(e)}readTransactionResponseFromNode(t){return Z({},wT,t,[])}writeGetFeature(t){const e=mt(pu[this.version_],"GetFeature");e.setAttribute("service","WFS"),e.setAttribute("version",this.version_),t.handle&&e.setAttribute("handle",t.handle),t.outputFormat&&e.setAttribute("outputFormat",t.outputFormat),t.maxFeatures!==void 0&&e.setAttribute("maxFeatures",String(t.maxFeatures)),t.resultType&&e.setAttribute("resultType",t.resultType),t.startIndex!==void 0&&e.setAttribute("startIndex",String(t.startIndex)),t.count!==void 0&&e.setAttribute("count",String(t.count)),t.viewParams!==void 0&&e.setAttribute("viewParams",t.viewParams),e.setAttributeNS(js,"xsi:schemaLocation",this.schemaLocation_);const n={node:e};if(Object.assign(n,{version:this.version_,srsName:t.srsName,featureNS:t.featureNS?t.featureNS:this.featureNS_,featurePrefix:t.featurePrefix,propertyNames:t.propertyNames?t.propertyNames:[]}),At(Array.isArray(t.featureTypes),"`options.featureTypes` must be an Array"),typeof t.featureTypes[0]=="string"){let s=t.filter;t.bbox&&(At(t.geometryName,"`options.geometryName` must also be provided when `options.bbox` is set"),s=this.combineBboxAndFilter(t.geometryName,t.bbox,t.srsName,s)),Object.assign(n,{geometryName:t.geometryName,filter:s}),gp(e,t.featureTypes,[n])}else t.featureTypes.forEach(s=>{const r=this.combineBboxAndFilter(s.geometryName,s.bbox,t.srsName,t.filter);Object.assign(n,{geometryName:s.geometryName,filter:r}),gp(e,[s.name],[n])});return e}combineBboxAndFilter(t,e,n,s){const r=xT(t,e,n);return s?yT(s,r):r}writeTransaction(t,e,n,s){const r=[],o=s.version?s.version:this.version_,a=mt(pu[o],"Transaction");a.setAttribute("service","WFS"),a.setAttribute("version",o);let l;s&&(l=s.gmlOptions?s.gmlOptions:{},s.handle&&a.setAttribute("handle",s.handle)),a.setAttributeNS(js,"xsi:schemaLocation",Yf[o]);const h=TT(a,l,o,s);return t&&nl("Insert",t,r,h),e&&nl("Update",e,r,h),n&&nl("Delete",n,r,h),s.nativeElements&&nl("Native",s.nativeElements,r,h),a}readProjectionFromDocument(t){for(let e=t.firstChild;e;e=e.nextSibling)if(e.nodeType==Node.ELEMENT_NODE)return this.readProjectionFromNode(e);return null}readProjectionFromNode(t){if(t.firstElementChild&&t.firstElementChild.firstElementChild){t=t.firstElementChild.firstElementChild;for(let e=t.firstElementChild;e;e=e.nextElementSibling)if(!(e.childNodes.length===0||e.childNodes.length===1&&e.firstChild.nodeType===3)){const n=[{}];return this.gmlFormat_.readGeometryElement(e,n),tt(n.pop().srsName)}}return null}}function TT(i,t,e,n){const s=n.featurePrefix?n.featurePrefix:h_;let r;return e==="1.0.0"?r=2:e==="1.1.0"?r=3:e==="2.0.0"&&(r=3.2),Object.assign({node:i},{version:e,featureNS:n.featureNS,featureType:n.featureType,featurePrefix:s,gmlVersion:r,hasZ:n.hasZ,srsName:n.srsName},t)}function nl(i,t,e,n){pt(n,l_,ce(i),t,e)}function Hf(i,t){return Z({},vT,i,t)}const MT={"http://www.opengis.net/ogc":{FeatureId:ot(function(i,t){return i.getAttribute("fid")})},"http://www.opengis.net/ogc/1.1":{FeatureId:ot(function(i,t){return i.getAttribute("fid")})}};function Kf(i,t){li(MT,i,t)}const RT={"http://www.opengis.net/wfs":{Feature:Kf},"http://www.opengis.net/wfs/2.0":{Feature:Kf}};function Qf(i,t){return Z([],RT,i,t)}function Jf(i,t,e){const n=e[e.length-1],s=n.featureType,r=n.featureNS,o=n.gmlVersion,a=mt(r,s);i.appendChild(a),o===2?It.prototype.writeFeatureElement(a,t,e):o===3?Rt.prototype.writeFeatureElement(a,t,e):Ld.prototype.writeFeatureElement(a,t,e)}function c_(i,t,e){const n=e[e.length-1].version,s=Fd[n],r=mt(s,"Filter"),o=mt(s,"FeatureId");r.appendChild(o),o.setAttribute("fid",t),i.appendChild(r)}function Dd(i,t){i=i||h_;const e=i+":";return t.startsWith(e)?t:e+t}function tp(i,t,e){const n=e[e.length-1];At(t.getId()!==void 0,"Features must have an id set");const s=n.featureType,r=n.featurePrefix,o=n.featureNS,a=Dd(r,s);i.setAttribute("typeName",a),i.setAttributeNS(Od,"xmlns:"+r,o);const l=t.getId();l!==void 0&&c_(i,l,e)}function ep(i,t,e){const n=e[e.length-1];At(t.getId()!==void 0,"Features must have an id set");const s=n.version,r=n.featureType,o=n.featurePrefix,a=n.featureNS,l=Dd(o,r),h=t.getGeometryName();i.setAttribute("typeName",l),i.setAttributeNS(Od,"xmlns:"+o,a);const c=t.getId();if(c!==void 0){const u=t.getKeys(),g=[];for(let f=0,p=u.length;f0,n=this.readUint32(e),s=Math.floor((n&268435455)/1e3),r=!!(n&2147483648)||s===1||s===3,o=!!(n&1073741824)||s===2||s===3,a=!!(n&536870912),l=(n&268435455)%1e3,h=["XY",r?"Z":"",o?"M":""].join(""),c=a?this.readUint32(e):null;if(t!==void 0&&t!==l)throw new Error("Unexpected WKB geometry type "+l);if(this.initialized_){if(this.isLittleEndian_!==e)throw new Error("Inconsistent endian");if(this.layout_!==h)throw new Error("Inconsistent geometry layout");if(c&&this.srid_!==c)throw new Error("Inconsistent coordinate system (SRID)")}else this.isLittleEndian_=e,this.hasZ_=r,this.hasM_=o,this.layout_=h,this.srid_=c,this.initialized_=!0;return l}readWkbPayload(t){switch(t){case Xt.POINT:return this.readPoint();case Xt.LINE_STRING:return this.readLineString();case Xt.POLYGON:case Xt.TRIANGLE:return this.readPolygon();case Xt.MULTI_POINT:return this.readMultiPoint();case Xt.MULTI_LINE_STRING:return this.readMultiLineString();case Xt.MULTI_POLYGON:case Xt.POLYHEDRAL_SURFACE:case Xt.TIN:return this.readMultiPolygon();case Xt.GEOMETRY_COLLECTION:return this.readGeometryCollection();default:throw new Error("Unsupported WKB geometry type "+t+" is found")}}readWkbBlock(t){return this.readWkbPayload(this.readWkbHeader(t))}readWkbCollection(t,e){const n=this.readUint32(),s=[];for(let r=0;r({[s]:t[r]})));for(const s of this.layout_)this.writeDouble(s in n?n[s]:this.nodata_[s])}writeLineString(t,e){this.writeUint32(t.length);for(let n=0;ns===r?s:s==="XYZM"?r:r==="XYZM"?s:"XY";if(t instanceof kn)return n(t.getLayout(),e);if(t instanceof je){const s=t.getGeometriesArray();for(let r=0;rr+o[0],0),e=new ArrayBuffer(t),n=new DataView(e);let s=0;return this.writeQueue_.forEach(r=>{switch(r[0]){case 1:n.setUint8(s,r[1]);break;case 4:n.setUint32(s,r[1],this.isLittleEndian_);break;case 8:n.setFloat64(s,r[1],this.isLittleEndian_);break}s+=r[0]}),e}}class LT extends Ca{constructor(t){super(),t=t||{},this.splitCollection=!!t.splitCollection,this.viewCache_=null,this.hex_=t.hex!==!1,this.littleEndian_=t.littleEndian!==!1,this.ewkb_=t.ewkb!==!1,this.layout_=t.geometryLayout,this.nodataZ_=t.nodataZ||0,this.nodataM_=t.nodataM||0,this.srid_=t.srid}getType(){return this.hex_?"text":"arraybuffer"}readFeature(t,e){return new Ee({geometry:this.readGeometry(t,e)})}readFeatures(t,e){let n=[];const s=this.readGeometry(t,e);return this.splitCollection&&s instanceof je?n=s.getGeometriesArray():n=[s],n.map(r=>new Ee({geometry:r}))}readGeometry(t,e){const n=pp(t);if(!n)return null;const s=new fp(n).readGeometry();return this.viewCache_=n,e=this.getReadOptions(t,e),this.viewCache_=null,re(s,!1,e)}readProjection(t){const e=this.viewCache_||pp(t);if(!e)return;const n=new fp(e);return n.readWkbHeader(),n.getSrid()&&tt("EPSG:"+n.getSrid())||void 0}writeFeature(t,e){return this.writeGeometry(t.getGeometry(),e)}writeFeatures(t,e){return this.writeGeometry(new je(t.map(n=>n.getGeometry())),e)}writeGeometry(t,e){e=this.adaptOptions(e);const n=new AT({layout:this.layout_,littleEndian:this.littleEndian_,ewkb:this.ewkb_,nodata:{Z:this.nodataZ_,M:this.nodataM_}});let s=Number.isInteger(this.srid_)?Number(this.srid_):null;if(this.srid_!==!1&&!Number.isInteger(this.srid_)){const o=e.dataProjection&&tt(e.dataProjection);if(o){const a=o.getCode();a.startsWith("EPSG:")&&(s=Number(a.substring(5)))}}n.writeGeometry(re(t,!0,e),s);const r=n.getBuffer();return this.hex_?OT(r):r}}function OT(i){const t=new Uint8Array(i);return Array.from(t.values()).map(e=>(e<16?"0":"")+Number(e).toString(16).toUpperCase()).join("")}function FT(i){const t=new Uint8Array(i.length/2);for(let e=0;e="a"&&t<="z"||t>="A"&&t<="Z"}isNumeric_(t,e){return e=e!==void 0?e:!1,t>="0"&&t<="9"||t=="."&&!e}isWhiteSpace_(t){return t==" "||t==" "||t=="\r"||t==` -`}nextChar_(){return this.wkt.charAt(++this.index_)}nextToken(){const t=this.nextChar_(),e=this.index_;let n=t,s;if(t=="(")s=zt.LEFT_PAREN;else if(t==",")s=zt.COMMA;else if(t==")")s=zt.RIGHT_PAREN;else if(this.isNumeric_(t)||t=="-")s=zt.NUMBER,n=this.readNumber_();else if(this.isAlpha_(t))s=zt.TEXT,n=this.readText_();else{if(this.isWhiteSpace_(t))return this.nextToken();if(t==="")s=zt.EOF;else throw new Error("Unexpected character: "+t)}return{position:e,value:n,type:s}}readNumber_(){let t;const e=this.index_;let n=!1,s=!1;do t=="."?n=!0:(t=="e"||t=="E")&&(s=!0),t=this.nextChar_();while(this.isNumeric_(t,n)||!s&&(t=="e"||t=="E")||s&&(t=="-"||t=="+"));return parseFloat(this.wkt.substring(e,this.index_--))}readText_(){let t;const e=this.index_;do t=this.nextChar_();while(this.isAlpha_(t));return this.wkt.substring(e,this.index_--).toUpperCase()}}let zT=class{constructor(i){this.lexer_=i,this.token_={position:0,type:zt.START},this.layout_="XY"}consume_(){this.token_=this.lexer_.nextToken()}isTokenType(i){return this.token_.type==i}match(i){const t=this.isTokenType(i);return t&&this.consume_(),t}parse(){return this.consume_(),this.parseGeometry_()}parseGeometryLayout_(){let i="XY";const t=this.token_;if(this.isTokenType(zt.TEXT)){const e=t.value;e===d_?i="XYZ":e===g_?i="XYM":e===DT&&(i="XYZM"),i!=="XY"&&this.consume_()}return i}parseGeometryCollectionText_(){if(this.match(zt.LEFT_PAREN)){const i=[];do i.push(this.parseGeometry_());while(this.match(zt.COMMA));if(this.match(zt.RIGHT_PAREN))return i}throw new Error(this.formatErrorMessage_())}parsePointText_(){if(this.match(zt.LEFT_PAREN)){const i=this.parsePoint_();if(this.match(zt.RIGHT_PAREN))return i}throw new Error(this.formatErrorMessage_())}parseLineStringText_(){if(this.match(zt.LEFT_PAREN)){const i=this.parsePointList_();if(this.match(zt.RIGHT_PAREN))return i}throw new Error(this.formatErrorMessage_())}parsePolygonText_(){if(this.match(zt.LEFT_PAREN)){const i=this.parseLineStringTextList_();if(this.match(zt.RIGHT_PAREN))return i}throw new Error(this.formatErrorMessage_())}parseMultiPointText_(){if(this.match(zt.LEFT_PAREN)){let i;if(this.token_.type==zt.LEFT_PAREN?i=this.parsePointTextList_():i=this.parsePointList_(),this.match(zt.RIGHT_PAREN))return i}throw new Error(this.formatErrorMessage_())}parseMultiLineStringText_(){if(this.match(zt.LEFT_PAREN)){const i=this.parseLineStringTextList_();if(this.match(zt.RIGHT_PAREN))return i}throw new Error(this.formatErrorMessage_())}parseMultiPolygonText_(){if(this.match(zt.LEFT_PAREN)){const i=this.parsePolygonTextList_();if(this.match(zt.RIGHT_PAREN))return i}throw new Error(this.formatErrorMessage_())}parsePoint_(){const i=[],t=this.layout_.length;for(let e=0;e0&&(s+=" "+r)}return n.length===0?s+" "+u_:s+"("+n+")"}const VT=UT,Oe=[null,"http://www.opengis.net/wms"],YT=X(Oe,{Service:O(mM),Capability:O(pM)}),HT=X(Oe,{Request:O(EM),Exception:O(vM),Layer:O(wM)});class KT extends Pd{constructor(){super(),this.version=void 0}readFromNode(t){return this.version=t.getAttribute("version").trim(),Z({version:this.version},YT,t,[])||null}}const QT=X(Oe,{Name:O($),Title:O($),Abstract:O($),KeywordList:O(v_),OnlineResource:O(io),ContactInformation:O(_M),Fees:O($),AccessConstraints:O($),LayerLimit:O(ge),MaxWidth:O(ge),MaxHeight:O(ge)}),JT=X(Oe,{ContactPersonPrimary:O(yM),ContactPosition:O($),ContactAddress:O(xM),ContactVoiceTelephone:O($),ContactFacsimileTelephone:O($),ContactElectronicMailAddress:O($)}),tM=X(Oe,{ContactPerson:O($),ContactOrganization:O($)}),eM=X(Oe,{AddressType:O($),Address:O($),City:O($),StateOrProvince:O($),PostCode:O($),Country:O($)}),iM=X(Oe,{Format:ot($)}),__=X(Oe,{Name:O($),Title:O($),Abstract:O($),KeywordList:O(v_),CRS:Kt($),EX_GeographicBoundingBox:O(fM),BoundingBox:Kt(gM),Dimension:Kt(bM),Attribution:O(dM),AuthorityURL:Kt(MM),Identifier:Kt($),MetadataURL:Kt(RM),DataURL:Kt(Dn),FeatureListURL:Kt(Dn),Style:Kt(CM),MinScaleDenominator:O(Pt),MaxScaleDenominator:O(Pt),Layer:Kt(y_)}),nM=X(Oe,{Title:O($),OnlineResource:O(io),LogoURL:O(x_)}),sM=X(Oe,{westBoundLongitude:O(Pt),eastBoundLongitude:O(Pt),southBoundLatitude:O(Pt),northBoundLatitude:O(Pt)}),rM=X(Oe,{GetCapabilities:O(vc),GetMap:O(vc),GetFeatureInfo:O(vc)}),oM=X(Oe,{Format:Kt($),DCPType:Kt(SM)}),aM=X(Oe,{HTTP:O(TM)}),lM=X(Oe,{Get:O(Dn),Post:O(Dn)}),hM=X(Oe,{Name:O($),Title:O($),Abstract:O($),LegendURL:Kt(x_),StyleSheetURL:O(Dn),StyleURL:O(Dn)}),cM=X(Oe,{Format:O($),OnlineResource:O(io)}),uM=X(Oe,{Keyword:ot($)});function dM(i,t){return Z({},nM,i,t)}function gM(i,t){const e=[Sn(i.getAttribute("minx")),Sn(i.getAttribute("miny")),Sn(i.getAttribute("maxx")),Sn(i.getAttribute("maxy"))],n=[Sn(i.getAttribute("resx")),Sn(i.getAttribute("resy"))];return{crs:i.getAttribute("CRS"),extent:e,res:n}}function fM(i,t){const e=Z({},sM,i,t);if(!e)return;const n=e.westBoundLongitude,s=e.southBoundLatitude,r=e.eastBoundLongitude,o=e.northBoundLatitude;if(!(n===void 0||s===void 0||r===void 0||o===void 0))return[n,s,r,o]}function pM(i,t){return Z({},HT,i,t)}function mM(i,t){return Z({},QT,i,t)}function _M(i,t){return Z({},JT,i,t)}function yM(i,t){return Z({},tM,i,t)}function xM(i,t){return Z({},eM,i,t)}function vM(i,t){return Z([],iM,i,t)}function wM(i,t){const e=Z({},__,i,t);return e.Layer===void 0?Object.assign(e,y_(i,t)):e}function y_(i,t){const e=t[t.length-1],n=Z({},__,i,t);if(!n)return;let s=Ns(i.getAttribute("queryable"));s===void 0&&(s=e.queryable),n.queryable=s!==void 0?s:!1;let r=Cn(i.getAttribute("cascaded"));r===void 0&&(r=e.cascaded),n.cascaded=r;let o=Ns(i.getAttribute("opaque"));o===void 0&&(o=e.opaque),n.opaque=o!==void 0?o:!1;let a=Ns(i.getAttribute("noSubsets"));a===void 0&&(a=e.noSubsets),n.noSubsets=a!==void 0?a:!1;let l=Sn(i.getAttribute("fixedWidth"));l||(l=e.fixedWidth),n.fixedWidth=l;let h=Sn(i.getAttribute("fixedHeight"));return h||(h=e.fixedHeight),n.fixedHeight=h,["Style","CRS","AuthorityURL"].forEach(function(c){if(c in e){const u=n[c]||[];n[c]=u.concat(e[c])}}),["EX_GeographicBoundingBox","BoundingBox","Dimension","Attribution","MinScaleDenominator","MaxScaleDenominator"].forEach(function(c){if(!(c in n)){const u=e[c];n[c]=u}}),n}function bM(i,t){return{name:i.getAttribute("name"),units:i.getAttribute("units"),unitSymbol:i.getAttribute("unitSymbol"),default:i.getAttribute("default"),multipleValues:Ns(i.getAttribute("multipleValues")),nearestValue:Ns(i.getAttribute("nearestValue")),current:Ns(i.getAttribute("current")),values:$(i)}}function Dn(i,t){return Z({},cM,i,t)}function EM(i,t){return Z({},rM,i,t)}function SM(i,t){return Z({},aM,i,t)}function TM(i,t){return Z({},lM,i,t)}function vc(i,t){return Z({},oM,i,t)}function x_(i,t){const e=Dn(i,t);if(e){const n=[Cn(i.getAttribute("width")),Cn(i.getAttribute("height"))];return e.size=n,e}}function MM(i,t){const e=Dn(i,t);if(e)return e.name=i.getAttribute("name"),e}function RM(i,t){const e=Dn(i,t);if(e)return e.type=i.getAttribute("type"),e}function CM(i,t){return Z({},hM,i,t)}function v_(i,t){return Z([],uM,i,t)}const IM=KT,PM="_feature",AM="_layer";class LM extends Pa{constructor(t){super(),t=t||{},this.featureNS_="http://mapserver.gis.umn.edu/mapserver",this.gmlFormat_=new It,this.layers_=t.layers?t.layers:null}getLayers(){return this.layers_}setLayers(t){this.layers_=t}readFeatures_(t,e){t.setAttribute("namespaceURI",this.featureNS_);const n=t.localName;let s=[];if(t.childNodes.length===0)return s;if(n=="msGMLOutput")for(let r=0,o=t.childNodes.length;r0;)this.pop()}extend(i){for(let t=0,e=i.length;tthis.getLength())throw new Error("Index out of bounds: "+i);this.unique_&&this.assertUnique_(t),this.array_.splice(i,0,t),this.updateLength_(),this.dispatchEvent(new rl(rs.ADD,t,i))}pop(){return this.removeAt(this.getLength()-1)}push(i){this.unique_&&this.assertUnique_(i);const t=this.getLength();return this.insertAt(t,i),this.getLength()}remove(i){const t=this.array_;for(let e=0,n=t.length;e=this.getLength())return;const t=this.array_[i];return this.array_.splice(i,1),this.updateLength_(),this.dispatchEvent(new rl(rs.REMOVE,t,i)),t}setAt(i,t){const e=this.getLength();if(i>=e){this.insertAt(i,t);return}if(i<0)throw new Error("Index out of bounds: "+i);this.unique_&&this.assertUnique_(t,i);const n=this.array_[i];this.array_[i]=t,this.dispatchEvent(new rl(rs.REMOVE,n,i)),this.dispatchEvent(new rl(rs.ADD,t,i))}updateLength_(){this.set(mp.LENGTH,this.array_.length)}assertUnique_(i,t){for(let e=0,n=this.array_.length;ef&&(g=(f+g)/2,f=g),p>_&&(p=(_+p)/2,_=p);let x=wt(n[0],g,f),v=wt(n[1],p,_);if(o&&e&&s){const w=30*s;x+=-w*Math.log(1+Math.max(0,g-n[0])/w)+w*Math.log(1+Math.max(0,n[0]-f)/w),v+=-w*Math.log(1+Math.max(0,p-n[1])/w)+w*Math.log(1+Math.max(0,n[1]-_)/w)}return[x,v]}}function sR(i){return i}function zd(i,t,e,n){const s=yt(t)/e[0],r=Vt(t)/e[1];return n?Math.min(i,Math.max(s,r)):Math.min(i,Math.min(s,r))}function Ud(i,t,e){let n=Math.min(i,t);const s=50;return n*=Math.log(1+s*Math.max(0,i/t-1))/s+1,e&&(n=Math.max(n,e),n/=Math.log(1+s*Math.max(0,e/i-1))/s+1),wt(n,e/2,t*2)}function rR(i,t,e,n){return t=t!==void 0?t:!0,function(s,r,o,a){if(s!==void 0){const l=i[0],h=i[i.length-1],c=e?zd(l,e,o,n):l;if(a)return t?Ud(s,c,h):wt(s,h,c);const u=Math.min(c,s),g=Math.floor(gh(i,u,r));return i[g]>c&&g1&&typeof arguments[e-1]=="function"&&(n=arguments[e-1],--e);let s=0;for(;s0}getInteracting(){return this.hints_[ee.INTERACTING]>0}cancelAnimations(){this.setHint(ee.ANIMATING,-this.hints_[ee.ANIMATING]);let t;for(let e=0,n=this.animations_.length;e=0;--n){const s=this.animations_[n];let r=!0;for(let o=0,a=s.length;o0?h/l.duration:1;c>=1?(l.complete=!0,c=1):r=!1;const u=l.easing(c);if(l.sourceCenter){const g=l.sourceCenter[0],f=l.sourceCenter[1],p=l.targetCenter[0],_=l.targetCenter[1];this.nextCenter_=l.targetCenter;const x=g+u*(p-g),v=f+u*(_-f);this.targetCenter_=[x,v]}if(l.sourceResolution&&l.targetResolution){const g=u===1?l.targetResolution:l.sourceResolution+u*(l.targetResolution-l.sourceResolution);if(l.anchor){const f=this.getViewportSize_(this.getRotation()),p=this.constraints_.resolution(g,0,f,!0);this.targetCenter_=this.calculateCenterZoom(p,l.anchor)}this.nextResolution_=l.targetResolution,this.targetResolution_=g,this.applyTargetState_(!0)}if(l.sourceRotation!==void 0&&l.targetRotation!==void 0){const g=u===1?an(l.targetRotation+Math.PI,2*Math.PI)-Math.PI:l.sourceRotation+u*(l.targetRotation-l.sourceRotation);if(l.anchor){const f=this.constraints_.rotation(g,!0);this.targetCenter_=this.calculateCenterRotate(f,l.anchor)}this.nextRotation_=l.targetRotation,this.targetRotation_=g}if(this.applyTargetState_(!0),e=!0,!l.complete)break}if(r){this.animations_[n]=null,this.setHint(ee.ANIMATING,-1),this.nextCenter_=null,this.nextResolution_=NaN,this.nextRotation_=NaN;const o=s[0].callback;o&&ol(o,!0)}}this.animations_=this.animations_.filter(Boolean),e&&this.updateAnimationKey_===void 0&&(this.updateAnimationKey_=requestAnimationFrame(this.updateAnimations_.bind(this)))}calculateCenterRotate(t,e){let n;const s=this.getCenterInternal();return s!==void 0&&(n=[s[0]-e[0],s[1]-e[1]],pv(n,t-this.getRotation()),e0(n,e)),n}calculateCenterZoom(t,e){let n;const s=this.getCenterInternal(),r=this.getResolution();if(s!==void 0&&r!==void 0){const o=e[0]-t*(e[0]-s[0])/r,a=e[1]-t*(e[1]-s[1])/r;n=[o,a]}return n}getViewportSize_(t){const e=this.viewportSize_;if(t){const n=e[0],s=e[1];return[Math.abs(n*Math.cos(t))+Math.abs(s*Math.sin(t)),Math.abs(n*Math.sin(t))+Math.abs(s*Math.cos(t))]}return e}setViewportSize(t){this.viewportSize_=Array.isArray(t)?t.slice():[100,100],this.getAnimating()||this.resolveConstraints(0)}getCenter(){const t=this.getCenterInternal();return t&&tu(t,this.getProjection())}getCenterInternal(){return this.get(Fi.CENTER)}getConstraints(){return this.constraints_}getConstrainResolution(){return this.get("constrainResolution")}getHints(t){return t!==void 0?(t[0]=this.hints_[0],t[1]=this.hints_[1],t):this.hints_.slice()}calculateExtent(t){const e=this.calculateExtentInternal(t);return yh(e,this.getProjection())}calculateExtentInternal(t){t=t||this.getViewportSizeMinusPadding_();const e=this.getCenterInternal();At(e,"The view center is not defined");const n=this.getResolution();At(n!==void 0,"The view resolution is not defined");const s=this.getRotation();return At(s!==void 0,"The view rotation is not defined"),Vu(e,n,s,t)}getMaxResolution(){return this.maxResolution_}getMinResolution(){return this.minResolution_}getMaxZoom(){return this.getZoomForResolution(this.minResolution_)}setMaxZoom(t){this.applyOptions_(this.getUpdatedOptions_({maxZoom:t}))}getMinZoom(){return this.getZoomForResolution(this.maxResolution_)}setMinZoom(t){this.applyOptions_(this.getUpdatedOptions_({minZoom:t}))}setConstrainResolution(t){this.applyOptions_(this.getUpdatedOptions_({constrainResolution:t}))}getProjection(){return this.projection_}getResolution(){return this.get(Fi.RESOLUTION)}getResolutions(){return this.resolutions_}getResolutionForExtent(t,e){return this.getResolutionForExtentInternal(Gi(t,this.getProjection()),e)}getResolutionForExtentInternal(t,e){e=e||this.getViewportSizeMinusPadding_();const n=yt(t)/e[0],s=Vt(t)/e[1];return Math.max(n,s)}getResolutionForValueFunction(t){t=t||2;const e=this.getConstrainedResolution(this.maxResolution_),n=this.minResolution_,s=Math.log(e/n)/Math.log(t);return function(r){return e/Math.pow(t,r*s)}}getRotation(){return this.get(Fi.ROTATION)}getValueForResolutionFunction(t){const e=Math.log(t||2),n=this.getConstrainedResolution(this.maxResolution_),s=this.minResolution_,r=Math.log(n/s)/e;return function(o){return Math.log(n/o)/e/r}}getViewportSizeMinusPadding_(t){let e=this.getViewportSize_(t);const n=this.padding_;return n&&(e=[e[0]-n[1]-n[3],e[1]-n[0]-n[2]]),e}getState(){const t=this.getProjection(),e=this.getResolution(),n=this.getRotation();let s=this.getCenterInternal();const r=this.padding_;if(r){const o=this.getViewportSizeMinusPadding_();s=bc(s,this.getViewportSize_(),[o[0]/2+r[3],o[1]/2+r[0]],e,n)}return{center:s.slice(0),projection:t!==void 0?t:null,resolution:e,nextCenter:this.nextCenter_,nextResolution:this.nextResolution_,nextRotation:this.nextRotation_,rotation:n,zoom:this.getZoom()}}getViewStateAndExtent(){return{viewState:this.getState(),extent:this.calculateExtent()}}getZoom(){let t;const e=this.getResolution();return e!==void 0&&(t=this.getZoomForResolution(e)),t}getZoomForResolution(t){let e=this.minZoom_||0,n,s;if(this.resolutions_){const r=gh(this.resolutions_,t,1);e=r,n=this.resolutions_[r],r==this.resolutions_.length-1?s=2:s=n/this.resolutions_[r+1]}else n=this.maxResolution_,s=this.zoomFactor_;return e+Math.log(n/t)/Math.log(s)}getResolutionForZoom(t){if(this.resolutions_){if(this.resolutions_.length<=1)return 0;const e=wt(Math.floor(t),0,this.resolutions_.length-2),n=this.resolutions_[e]/this.resolutions_[e+1];return this.resolutions_[e]/Math.pow(n,wt(t-e,0,1))}return this.maxResolution_/Math.pow(this.zoomFactor_,t-this.minZoom_)}fit(t,e){let n;if(At(Array.isArray(t)||typeof t.getSimplifiedGeometry=="function","Invalid extent or geometry provided as `geometry`"),Array.isArray(t)){At(!Un(t),"Cannot fit empty extent provided as `geometry`");const s=Gi(t,this.getProjection());n=Mf(s)}else if(t.getType()==="Circle"){const s=Gi(t.getExtent(),this.getProjection());n=Mf(s),n.rotate(this.getRotation(),Ce(s))}else n=t;this.fitInternal(n,e)}rotatedExtentForGeometry(t){const e=this.getRotation(),n=Math.cos(e),s=Math.sin(-e),r=t.getFlatCoordinates(),o=t.getStride();let a=1/0,l=1/0,h=-1/0,c=-1/0;for(let u=0,g=r.length;u{this.dispatchEvent("sourceready")},0))),this.changed()}getFeatures(t){return this.renderer_?this.renderer_.getFeatures(t):Promise.resolve([])}getData(t){return!this.renderer_||!this.rendered?null:this.renderer_.getData(t)}isVisible(t){let e;const n=this.getMapInternal();!t&&n&&(t=n.getView()),t instanceof vp?e={viewState:t.getState(),extent:t.calculateExtent()}:e=t,!e.layerStatesArray&&n&&(e.layerStatesArray=n.getLayerGroup().getLayerStatesArray());let s;e.layerStatesArray?s=e.layerStatesArray.find(o=>o.layer===this):s=this.getLayerState();const r=this.getExtent();return _R(s,e.viewState)&&(!r||Qt(r,e.extent))}getAttributions(t){if(!this.isVisible(t))return[];let e;const n=this.getSource();if(n&&(e=n.getAttributions()),!e)return[];const s=t instanceof vp?t.getViewStateAndExtent():t;let r=e(s);return Array.isArray(r)||(r=[r]),r}render(t,e){const n=this.getRenderer();return n.prepareFrame(t)?(this.rendered=!0,n.renderFrame(t,e)):null}unrender(){this.rendered=!1}getDeclutter(){}renderDeclutter(t,e){}renderDeferred(t){const e=this.getRenderer();e&&e.renderDeferred(t)}setMapInternal(t){t||this.unrender(),this.set(Ut.MAP,t)}getMapInternal(){return this.get(Ut.MAP)}setMap(t){this.mapPrecomposeKey_&&(ve(this.mapPrecomposeKey_),this.mapPrecomposeKey_=null),t||this.changed(),this.mapRenderKey_&&(ve(this.mapRenderKey_),this.mapRenderKey_=null),t&&(this.mapPrecomposeKey_=le(t,si.PRECOMPOSE,function(e){const n=e.frameState.layerStatesArray,s=this.getLayerState(!1);At(!n.some(function(r){return r.layer===s.layer}),"A layer can only be added to the map once. Use either `layer.setMap()` or `map.addLayer()`, not both."),n.push(s)},this),this.mapRenderKey_=le(this,Lt.CHANGE,t.render,t),this.changed())}setSource(t){this.set(Ut.SOURCE,t)}getRenderer(){return this.renderer_||(this.renderer_=this.createRenderer()),this.renderer_}hasRenderer(){return!!this.renderer_}createRenderer(){return null}disposeInternal(){this.renderer_&&(this.renderer_.dispose(),delete this.renderer_),this.setSource(null),super.disposeInternal()}}function _R(i,t){if(!i.visible)return!1;const e=t.resolution;if(e=i.maxResolution)return!1;const n=t.zoom;return n>i.minZoom&&n<=i.maxZoom}const La=mR;function yR(i,t,e,n,s){M_(i,t,e||0,n||i.length-1,s||xR)}function M_(i,t,e,n,s){for(;n>e;){if(n-e>600){var r=n-e+1,o=t-e+1,a=Math.log(r),l=.5*Math.exp(2*a/3),h=.5*Math.sqrt(a*l*(r-l)/r)*(o-r/2<0?-1:1),c=Math.max(e,Math.floor(t-o*l/r+h)),u=Math.min(n,Math.floor(t+(r-o)*l/r+h));M_(i,t,c,u,s)}var g=i[t],f=e,p=n;for(yo(i,e,t),s(i[n],g)>0&&yo(i,e,n);f0;)p--}s(i[e],g)===0?yo(i,e,p):(p++,yo(i,p,n)),p<=t&&(e=p+1),t<=p&&(n=p-1)}}function yo(i,t,e){var n=i[t];i[t]=i[e],i[e]=n}function xR(i,t){return it?1:0}let Bd=class{constructor(i=9){this._maxEntries=Math.max(4,i),this._minEntries=Math.max(2,Math.ceil(this._maxEntries*.4)),this.clear()}all(){return this._all(this.data,[])}search(i){let t=this.data;const e=[];if(!ll(i,t))return e;const n=this.toBBox,s=[];for(;t;){for(let r=0;r=0&&s[t].children.length>this._maxEntries;)this._split(s,t),t--;this._adjustParentBBoxes(n,s,t)}_split(i,t){const e=i[t],n=e.children.length,s=this._minEntries;this._chooseSplitAxis(e,s,n);const r=this._chooseSplitIndex(e,s,n),o=fr(e.children.splice(r,e.children.length-r));o.height=e.height,o.leaf=e.leaf,sr(e,this.toBBox),sr(o,this.toBBox),t?i[t-1].children.push(o):this._splitRoot(e,o)}_splitRoot(i,t){this.data=fr([i,t]),this.data.height=i.height+1,this.data.leaf=!1,sr(this.data,this.toBBox)}_chooseSplitIndex(i,t,e){let n,s=1/0,r=1/0;for(let o=t;o<=e-t;o++){const a=To(i,0,o,this.toBBox),l=To(i,o,e,this.toBBox),h=SR(a,l),c=Ec(a)+Ec(l);h=t;l--){const h=i.children[l];Mo(o,i.leaf?s(h):h),a+=al(o)}return a}_adjustParentBBoxes(i,t,e){for(let n=e;n>=0;n--)Mo(t[n],i)}_condense(i){for(let t=i.length-1,e;t>=0;t--)i[t].children.length===0?t>0?(e=i[t-1].children,e.splice(e.indexOf(i[t]),1)):this.clear():sr(i[t],this.toBBox)}};function vR(i,t,e){if(!e)return t.indexOf(i);for(let n=0;n=i.minX&&t.maxY>=i.minY}function fr(i){return{children:i,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function wp(i,t,e,n,s){const r=[t,e];for(;r.length;){if(e=r.pop(),t=r.pop(),e-t<=n)continue;const o=t+Math.ceil((e-t)/n/2)*n;yR(i,o,t,e,s),r.push(t,o,o,e)}}let ro=0;const Qs=0,te=1<",GreaterThanOrEqualTo:">=",LessThan:"<",LessThanOrEqualTo:"<=",Multiply:"*",Divide:"/",Add:"+",Subtract:"-",Clamp:"clamp",Mod:"%",Pow:"^",Abs:"abs",Floor:"floor",Ceil:"ceil",Round:"round",Sin:"sin",Cos:"cos",Atan:"atan",Sqrt:"sqrt",Match:"match",Between:"between",Interpolate:"interpolate",Coalesce:"coalesce",Case:"case",In:"in",Number:"number",String:"string",Array:"array",Color:"color",Id:"id",Band:"band",Palette:"palette",ToString:"to-string"},CR={[z.Get]:vt(([i,t])=>t!==void 0?RR(t.value):Ne,Ct(1,2),IR),[z.Var]:vt(([i])=>i.type,Ct(1,1),PR),[z.Id]:vt(Y|xe,xo,AR),[z.Concat]:vt(xe,Ct(2,1/0),Nt(Ne)),[z.GeometryType]:vt(xe,xo,LR),[z.Resolution]:vt(Y,xo),[z.Zoom]:vt(Y,xo),[z.Time]:vt(Y,xo),[z.Any]:vt(te,Ct(2,1/0),Nt(te)),[z.All]:vt(te,Ct(2,1/0),Nt(te)),[z.Not]:vt(te,Ct(1,1),Nt(te)),[z.Equal]:vt(te,Ct(2,2),Nt(Ne),Yn),[z.NotEqual]:vt(te,Ct(2,2),Nt(Ne),Yn),[z.GreaterThan]:vt(te,Ct(2,2),Nt(Ne),Yn),[z.GreaterThanOrEqualTo]:vt(te,Ct(2,2),Nt(Ne),Yn),[z.LessThan]:vt(te,Ct(2,2),Nt(Ne),Yn),[z.LessThanOrEqualTo]:vt(te,Ct(2,2),Nt(Ne),Yn),[z.Multiply]:vt(i=>{let t=Y|Wt;for(let e=0;e{let t=Ne;for(let e=1;e{let t=Ne;for(let e=2;e{let t=Wt|Y;for(let e=3;e{let t=Ne;for(let e=1;ei.length===3||i.length===4?me|Wt:me,Ct(1,1/0),Nt(Y)),[z.Color]:vt(Wt,Ct(1,4),Nt(Y)),[z.Band]:vt(Y,Ct(1,3),Nt(Y)),[z.Palette]:vt(Wt,Ct(2,2),GR),[z.ToString]:vt(xe,Ct(1,1),Nt(te|Y|xe|Wt))};function IR(i,t){const e=Bt(i[1],t);if(!(e instanceof os))throw new Error("Expected a literal argument for get operation");if(typeof e.value!="string")throw new Error("Expected a string argument for get operation");if(t.properties.add(e.value),i.length===3){const n=Bt(i[2],t);return[e,n]}return[e]}function PR(i,t,e,n){const s=i[1];if(typeof s!="string")throw new Error("Expected a string argument for var operation");if(t.variables.add(s),!("variables"in t.style)||t.style.variables[s]===void 0)return[new os(Ne,s)];const r=t.style.variables[s],o=Bt(r,t);if(o.value=s,n&&!ji(n,o.type))throw new Error(`The variable ${s} has type ${be(o.type)} but the following type was expected: ${be(n)}`);return[o]}function AR(i,t){t.featureId=!0}function LR(i,t){t.geometryType=!0}function xo(i,t){const e=i[0];if(i.length!==1)throw new Error(`Expected no arguments for ${e} operation`);return[]}function Ct(i,t){return function(e,n){const s=e[0],r=e.length-1;if(i===t){if(r!==i){const o=i===1?"":"s";throw new Error(`Expected ${i} argument${o} for ${s}, got ${r}`)}}else if(rt){const o=t===1/0?`${i} or more`:`${i} to ${t}`;throw new Error(`Expected ${o} arguments for ${s}, got ${r}`)}}}function Nt(i){return function(t,e){const n=t[0],s=t.length-1,r=new Array(s);for(let o=0;on.featureId;case z.GeometryType:return n=>n.geometryType;case z.Concat:{const n=i.args.map(s=>Xi(s));return s=>"".concat(...n.map(r=>r(s).toString()))}case z.Resolution:return n=>n.resolution;case z.Any:case z.All:case z.Between:case z.In:case z.Not:return WR(i);case z.Equal:case z.NotEqual:case z.LessThan:case z.LessThanOrEqualTo:case z.GreaterThan:case z.GreaterThanOrEqualTo:return BR(i);case z.Multiply:case z.Divide:case z.Add:case z.Subtract:case z.Clamp:case z.Mod:case z.Pow:case z.Abs:case z.Floor:case z.Ceil:case z.Round:case z.Sin:case z.Cos:case z.Atan:case z.Sqrt:return qR(i);case z.Case:return XR(i);case z.Match:return ZR(i);case z.Interpolate:return $R(i);case z.ToString:return VR(i);default:throw new Error(`Unsupported operator ${e}`)}}function zR(i,t){const e=i.operator,n=i.args.length,s=new Array(n);for(let r=0;r{for(let o=0;o{for(let o=0;on.properties[e];case z.Var:return n=>n.variables[e];default:throw new Error(`Unsupported accessor operator ${i.operator}`)}}function BR(i,t){const e=i.operator,n=Xi(i.args[0]),s=Xi(i.args[1]);switch(e){case z.Equal:return r=>n(r)===s(r);case z.NotEqual:return r=>n(r)!==s(r);case z.LessThan:return r=>n(r)n(r)<=s(r);case z.GreaterThan:return r=>n(r)>s(r);case z.GreaterThanOrEqualTo:return r=>n(r)>=s(r);default:throw new Error(`Unsupported comparison operator ${e}`)}}function WR(i,t){const e=i.operator,n=i.args.length,s=new Array(n);for(let r=0;r{for(let o=0;o{for(let o=0;o{const o=s[0](r),a=s[1](r),l=s[2](r);return o>=a&&o<=l};case z.In:return r=>{const o=s[0](r);for(let a=1;a!s[0](r);default:throw new Error(`Unsupported logical operator ${e}`)}}function qR(i,t){const e=i.operator,n=i.args.length,s=new Array(n);for(let r=0;r{let o=1;for(let a=0;as[0](r)/s[1](r);case z.Add:return r=>{let o=0;for(let a=0;as[0](r)-s[1](r);case z.Clamp:return r=>{const o=s[0](r),a=s[1](r);if(ol?l:o};case z.Mod:return r=>s[0](r)%s[1](r);case z.Pow:return r=>Math.pow(s[0](r),s[1](r));case z.Abs:return r=>Math.abs(s[0](r));case z.Floor:return r=>Math.floor(s[0](r));case z.Ceil:return r=>Math.ceil(s[0](r));case z.Round:return r=>Math.round(s[0](r));case z.Sin:return r=>Math.sin(s[0](r));case z.Cos:return r=>Math.cos(s[0](r));case z.Atan:return n===2?r=>Math.atan2(s[0](r),s[1](r)):r=>Math.atan(s[0](r));case z.Sqrt:return r=>Math.sqrt(s[0](r));default:throw new Error(`Unsupported numeric operator ${e}`)}}function XR(i,t){const e=i.args.length,n=new Array(e);for(let s=0;s{for(let r=0;r{const r=n[0](s);for(let o=1;o{const r=n[0](s),o=n[1](s);let a,l;for(let h=2;h=o)return h===2?u:g?YR(r,o,a,l,c,u):Ro(r,o,a,l,c,u);a=c,l=u}return l}}function VR(i,t){const e=i.operator,n=i.args.length,s=new Array(n);for(let r=0;r{const o=s[0](r);return i.args[0].type===Wt?wd(o):o.toString()};default:throw new Error(`Unsupported convert operator ${e}`)}}function Ro(i,t,e,n,s,r){const o=s-e;if(o===0)return n;const a=t-e,l=i===1?a/o:(Math.pow(i,a)-1)/(Math.pow(i,o)-1);return n+l*(r-n)}function YR(i,t,e,n,s,r){if(s-e===0)return n;const o=Of(n),a=Of(r);let l=a[2]-o[2];l>180?l-=360:l<-180&&(l+=360);const h=[Ro(i,t,e,o[0],s,a[0]),Ro(i,t,e,o[1],s,a[1]),o[2]+Ro(i,t,e,0,s,l),Ro(i,t,e,n[3],s,r[3])];return I0(jb(h))}function HR(i){return!0}function KR(i){const t=Wd(),e=QR(i,t),n=I_();return function(s,r){if(n.properties=s.getPropertiesInternal(),n.resolution=r,t.featureId){const o=s.getId();o!==void 0?n.featureId=o:n.featureId=null}return t.geometryType&&(n.geometryType=qd(s.getGeometry())),e(n)}}function Ep(i){const t=Wd(),e=i.length,n=new Array(e);for(let o=0;o4)throw new Error(`Expected a color with 3 or 4 values for ${t}`);return e}function O_(i,t){const e=Fa(i,t);if(e.length!==2)throw new Error(`Expected an array of two numbers for ${t}`);return e}function hC(i,t){return typeof i=="number"?i:O_(i,t)}const Rp={RENDER_ORDER:"renderOrder"};class Na extends La{constructor(t){t=t||{};const e=Object.assign({},t);delete e.style,delete e.renderBuffer,delete e.updateWhileAnimating,delete e.updateWhileInteracting,super(e),this.declutter_=t.declutter?String(t.declutter):void 0,this.renderBuffer_=t.renderBuffer!==void 0?t.renderBuffer:100,this.style_=null,this.styleFunction_=void 0,this.setStyle(t.style),this.updateWhileAnimating_=t.updateWhileAnimating!==void 0?t.updateWhileAnimating:!1,this.updateWhileInteracting_=t.updateWhileInteracting!==void 0?t.updateWhileInteracting:!1}getDeclutter(){return this.declutter_}getFeatures(t){return super.getFeatures(t)}getRenderBuffer(){return this.renderBuffer_}getRenderOrder(){return this.get(Rp.RENDER_ORDER)}getStyle(){return this.style_}getStyleFunction(){return this.styleFunction_}getUpdateWhileAnimating(){return this.updateWhileAnimating_}getUpdateWhileInteracting(){return this.updateWhileInteracting_}renderDeclutter(t,e){const n=this.getDeclutter();n in t.declutter||(t.declutter[n]=new Bd(9)),this.getRenderer().renderDeclutter(t,e)}setRenderOrder(t){this.set(Rp.RENDER_ORDER,t)}setStyle(t){this.style_=cC(t),this.styleFunction_=t===null?void 0:eE(this.style_),this.changed()}}function cC(i){if(i===void 0)return iE;if(!i)return null;if(typeof i=="function"||i instanceof Ve)return i;if(!Array.isArray(i))return Ep([i]);if(i.length===0)return[];const t=i.length,e=i[0];if(e instanceof Ve){const n=new Array(t);for(let s=0;sl&&(this.instructions.push([ut.CUSTOM,l,c,t,n,Rn,r]),this.hitDetectionInstructions.push([ut.CUSTOM,l,c,t,s||n,Rn,r]));break;case"Point":h=t.getFlatCoordinates(),this.coordinates.push(h[0],h[1]),c=this.coordinates.length,this.instructions.push([ut.CUSTOM,l,c,t,n,void 0,r]),this.hitDetectionInstructions.push([ut.CUSTOM,l,c,t,s||n,void 0,r]);break}this.endGeometry(e)}beginGeometry(t,e,n){this.beginGeometryInstruction1_=[ut.BEGIN_GEOMETRY,e,0,t,n],this.instructions.push(this.beginGeometryInstruction1_),this.beginGeometryInstruction2_=[ut.BEGIN_GEOMETRY,e,0,t,n],this.hitDetectionInstructions.push(this.beginGeometryInstruction2_)}finish(){return{instructions:this.instructions,hitDetectionInstructions:this.hitDetectionInstructions,coordinates:this.coordinates}}reverseHitDetectionInstructions(){const t=this.hitDetectionInstructions;t.reverse();let e;const n=t.length;let s,r,o=-1;for(e=0;ethis.maxLineWidth&&(this.maxLineWidth=n.lineWidth,this.bufferedMaxExtent_=null)}else n.strokeStyle=void 0,n.lineCap=void 0,n.lineDash=null,n.lineDashOffset=void 0,n.lineJoin=void 0,n.lineWidth=void 0,n.miterLimit=void 0}createFill(t){const e=t.fillStyle,n=[ut.SET_FILL_STYLE,e];return typeof e!="string"&&n.push(t.fillPatternScale),n}applyStroke(t){this.instructions.push(this.createStroke(t))}createStroke(t){return[ut.SET_STROKE_STYLE,t.strokeStyle,t.lineWidth*this.pixelRatio,t.lineCap,t.lineJoin,t.miterLimit,this.applyPixelRatio(t.lineDash),t.lineDashOffset*this.pixelRatio]}updateFillStyle(t,e){const n=t.fillStyle;(typeof n!="string"||t.currentFillStyle!=n)&&(n!==void 0&&this.instructions.push(e.call(this,t)),t.currentFillStyle=n)}updateStrokeStyle(t,e){const n=t.strokeStyle,s=t.lineCap,r=t.lineDash,o=t.lineDashOffset,a=t.lineJoin,l=t.lineWidth,h=t.miterLimit;(t.currentStrokeStyle!=n||t.currentLineCap!=s||r!=t.currentLineDash&&!$s(t.currentLineDash,r)||t.currentLineDashOffset!=o||t.currentLineJoin!=a||t.currentLineWidth!=l||t.currentMiterLimit!=h)&&(n!==void 0&&e.call(this,t),t.currentStrokeStyle=n,t.currentLineCap=s,t.currentLineDash=r,t.currentLineDashOffset=o,t.currentLineJoin=a,t.currentLineWidth=l,t.currentMiterLimit=h)}endGeometry(t){this.beginGeometryInstruction1_[2]=this.instructions.length,this.beginGeometryInstruction1_=null,this.beginGeometryInstruction2_[2]=this.hitDetectionInstructions.length,this.beginGeometryInstruction2_=null;const e=[ut.END_GEOMETRY,t];this.instructions.push(e),this.hitDetectionInstructions.push(e)}getBufferedMaxExtent(){if(!this.bufferedMaxExtent_&&(this.bufferedMaxExtent_=Qx(this.maxExtent),this.maxLineWidth>0)){const t=this.resolution*(this.maxLineWidth+1)/2;Ii(this.bufferedMaxExtent_,t,this.bufferedMaxExtent_)}return this.bufferedMaxExtent_}}class uC extends ka{constructor(t,e,n,s){super(t,e,n,s),this.hitDetectionImage_=null,this.image_=null,this.imagePixelRatio_=void 0,this.anchorX_=void 0,this.anchorY_=void 0,this.height_=void 0,this.opacity_=void 0,this.originX_=void 0,this.originY_=void 0,this.rotateWithView_=void 0,this.rotation_=void 0,this.scale_=void 0,this.width_=void 0,this.declutterMode_=void 0,this.declutterImageWithText_=void 0}drawPoint(t,e,n){if(!this.image_||this.maxExtent&&!xi(this.maxExtent,t.getFlatCoordinates()))return;this.beginGeometry(t,e,n);const s=t.getFlatCoordinates(),r=t.getStride(),o=this.coordinates.length,a=this.appendFlatPointCoordinates(s,r);this.instructions.push([ut.DRAW_IMAGE,o,a,this.image_,this.anchorX_*this.imagePixelRatio_,this.anchorY_*this.imagePixelRatio_,Math.ceil(this.height_*this.imagePixelRatio_),this.opacity_,this.originX_*this.imagePixelRatio_,this.originY_*this.imagePixelRatio_,this.rotateWithView_,this.rotation_,[this.scale_[0]*this.pixelRatio/this.imagePixelRatio_,this.scale_[1]*this.pixelRatio/this.imagePixelRatio_],Math.ceil(this.width_*this.imagePixelRatio_),this.declutterMode_,this.declutterImageWithText_]),this.hitDetectionInstructions.push([ut.DRAW_IMAGE,o,a,this.hitDetectionImage_,this.anchorX_,this.anchorY_,this.height_,1,this.originX_,this.originY_,this.rotateWithView_,this.rotation_,this.scale_,this.width_,this.declutterMode_,this.declutterImageWithText_]),this.endGeometry(e)}drawMultiPoint(t,e,n){if(!this.image_)return;this.beginGeometry(t,e,n);const s=t.getFlatCoordinates(),r=[];for(let l=0,h=s.length;l=i){const p=(i-a+f)/f,_=mi(h,u,p),x=mi(c,g,p);l.push(_,x),r.push(l),l=[_,x],a==i&&(o+=s),a=0}else if(a0&&r.push(l),r}function _C(i,t,e,n,s){let r=e,o=e,a=0,l=0,h=e,c,u,g,f,p,_,x,v,w,E;for(u=e;ui&&(l>a&&(a=l,r=h,o=u),l=0,h=u-s)),g=f,x=w,v=E),p=S,_=T}return l+=f,l>a?[h,u]:[r,o]}const ql={left:0,center:.5,right:1,top:0,middle:.5,hanging:.2,alphabetic:.8,ideographic:.8,bottom:1};class yC extends ka{constructor(t,e,n,s){super(t,e,n,s),this.labels_=null,this.text_="",this.textOffsetX_=0,this.textOffsetY_=0,this.textRotateWithView_=void 0,this.textRotation_=0,this.textFillState_=null,this.fillStates={},this.fillStates[ni]={fillStyle:ni},this.textStrokeState_=null,this.strokeStates={},this.textState_={},this.textStates={},this.textKey_="",this.fillKey_="",this.strokeKey_="",this.declutterMode_=void 0,this.declutterImageWithText_=void 0}finish(){const t=super.finish();return t.textStates=this.textStates,t.fillStates=this.fillStates,t.strokeStates=this.strokeStates,t}drawText(t,e,n){const s=this.textFillState_,r=this.textStrokeState_,o=this.textState_;if(this.text_===""||!o||!s&&!r)return;const a=this.coordinates;let l=a.length;const h=t.getType();let c=null,u=t.getStride();if(o.placement==="line"&&(h=="LineString"||h=="MultiLineString"||h=="Polygon"||h=="MultiPolygon")){if(!Qt(this.maxExtent,t.getExtent()))return;let g;if(c=t.getFlatCoordinates(),h=="LineString")g=[c.length];else if(h=="MultiLineString")g=t.getEnds();else if(h=="Polygon")g=t.getEnds().slice(0,1);else if(h=="MultiPolygon"){const x=t.getEndss();g=[];for(let v=0,w=x.length;v{const T=a[(w+S)*2]===c[S*u]&&a[(w+S)*2+1]===c[S*u+1];return T||--w,T})}this.saveTextStates_(),(o.backgroundFill||o.backgroundStroke)&&(this.setFillStrokeStyle(o.backgroundFill,o.backgroundStroke),o.backgroundFill&&this.updateFillStyle(this.state,this.createFill),o.backgroundStroke&&(this.updateStrokeStyle(this.state,this.applyStroke),this.hitDetectionInstructions.push(this.createStroke(this.state)))),this.beginGeometry(t,e,n);let p=o.padding;if(p!=Is&&(o.scale[0]<0||o.scale[1]<0)){let w=o.padding[0],E=o.padding[1],S=o.padding[2],T=o.padding[3];o.scale[0]<0&&(E=-E,T=-T),o.scale[1]<0&&(w=-w,S=-S),p=[w,E,S,T]}const _=this.pixelRatio;this.instructions.push([ut.DRAW_IMAGE,l,f,null,NaN,NaN,NaN,1,0,0,this.textRotateWithView_,this.textRotation_,[1,1],NaN,this.declutterMode_,this.declutterImageWithText_,p==Is?Is:p.map(function(w){return w*_}),!!o.backgroundFill,!!o.backgroundStroke,this.text_,this.textKey_,this.strokeKey_,this.fillKey_,this.textOffsetX_,this.textOffsetY_,g]);const x=1/_,v=this.state.fillStyle;o.backgroundFill&&(this.state.fillStyle=ni,this.hitDetectionInstructions.push(this.createFill(this.state))),this.hitDetectionInstructions.push([ut.DRAW_IMAGE,l,f,null,NaN,NaN,NaN,1,0,0,this.textRotateWithView_,this.textRotation_,[x,x],NaN,this.declutterMode_,this.declutterImageWithText_,p,!!o.backgroundFill,!!o.backgroundStroke,this.text_,this.textKey_,this.strokeKey_,this.fillKey_?ni:this.fillKey_,this.textOffsetX_,this.textOffsetY_,g]),o.backgroundFill&&(this.state.fillStyle=v,this.hitDetectionInstructions.push(this.createFill(this.state))),this.endGeometry(e)}}saveTextStates_(){const t=this.textStrokeState_,e=this.textState_,n=this.textFillState_,s=this.strokeKey_;t&&(s in this.strokeStates||(this.strokeStates[s]={strokeStyle:t.strokeStyle,lineCap:t.lineCap,lineDashOffset:t.lineDashOffset,lineWidth:t.lineWidth,lineJoin:t.lineJoin,miterLimit:t.miterLimit,lineDash:t.lineDash}));const r=this.textKey_;r in this.textStates||(this.textStates[r]={font:e.font,textAlign:e.textAlign||na,justify:e.justify,textBaseline:e.textBaseline||Nl,scale:e.scale});const o=this.fillKey_;n&&(o in this.fillStates||(this.fillStates[o]={fillStyle:n.fillStyle}))}drawChars_(t,e){const n=this.textStrokeState_,s=this.textState_,r=this.strokeKey_,o=this.textKey_,a=this.fillKey_;this.saveTextStates_();const l=this.pixelRatio,h=ql[s.textBaseline],c=this.textOffsetY_*l,u=this.text_,g=n?n.lineWidth*Math.abs(s.scale[0])/2:0;this.instructions.push([ut.DRAW_CHARS,t,e,h,s.overflow,a,s.maxAngle,l,c,r,g*l,u,o,1,this.declutterMode_]),this.hitDetectionInstructions.push([ut.DRAW_CHARS,t,e,h,s.overflow,a&&ni,s.maxAngle,l,c,r,g*l,u,o,1/l,this.declutterMode_])}setTextStyle(t,e){let n,s,r;if(!t)this.text_="";else{const o=t.getFill();o?(s=this.textFillState_,s||(s={},this.textFillState_=s),s.fillStyle=nn(o.getColor()||ni)):(s=null,this.textFillState_=s);const a=t.getStroke();if(!a)r=null,this.textStrokeState_=r;else{r=this.textStrokeState_,r||(r={},this.textStrokeState_=r);const p=a.getLineDash(),_=a.getLineDashOffset(),x=a.getWidth(),v=a.getMiterLimit();r.lineCap=a.getLineCap()||Br,r.lineDash=p?p.slice():An,r.lineDashOffset=_===void 0?Ln:_,r.lineJoin=a.getLineJoin()||Wr,r.lineWidth=x===void 0?sa:x,r.miterLimit=v===void 0?ea:v,r.strokeStyle=nn(a.getColor()||ia)}n=this.textState_;const l=t.getFont()||F0;Hb(l);const h=t.getScaleArray();n.overflow=t.getOverflow(),n.font=l,n.maxAngle=t.getMaxAngle(),n.placement=t.getPlacement(),n.textAlign=t.getTextAlign(),n.repeat=t.getRepeat(),n.justify=t.getJustify(),n.textBaseline=t.getTextBaseline()||Nl,n.backgroundFill=t.getBackgroundFill(),n.backgroundStroke=t.getBackgroundStroke(),n.padding=t.getPadding()||Is,n.scale=h===void 0?[1,1]:h;const c=t.getOffsetX(),u=t.getOffsetY(),g=t.getRotateWithView(),f=t.getRotation();this.text_=t.getText()||"",this.textOffsetX_=c===void 0?0:c,this.textOffsetY_=u===void 0?0:u,this.textRotateWithView_=g===void 0?!1:g,this.textRotation_=f===void 0?0:f,this.strokeKey_=r?(typeof r.strokeStyle=="string"?r.strokeStyle:st(r.strokeStyle))+r.lineCap+r.lineDashOffset+"|"+r.lineWidth+r.lineJoin+r.miterLimit+"["+r.lineDash.join()+"]":"",this.textKey_=n.font+n.scale+(n.textAlign||"?")+(n.repeat||"?")+(n.justify||"?")+(n.textBaseline||"?"),this.fillKey_=s&&s.fillStyle?typeof s.fillStyle=="string"?s.fillStyle:"|"+st(s.fillStyle):""}this.declutterMode_=t.getDeclutterMode(),this.declutterImageWithText_=e}}const xC={Circle:Ip,Default:ka,Image:dC,LineString:fC,Polygon:Ip,Text:yC};class N_{constructor(t,e,n,s){this.tolerance_=t,this.maxExtent_=e,this.pixelRatio_=s,this.resolution_=n,this.buildersByZIndex_={}}finish(){const t={};for(const e in this.buildersByZIndex_){t[e]=t[e]||{};const n=this.buildersByZIndex_[e];for(const s in n){const r=n[s].finish();t[e][s]=r}}return t}getBuilder(t,e){const n=t!==void 0?t.toString():"0";let s=this.buildersByZIndex_[n];s===void 0&&(s={},this.buildersByZIndex_[n]=s);let r=s[e];if(r===void 0){const o=xC[e];r=new o(this.tolerance_,this.maxExtent_,this.resolution_,this.pixelRatio_),s[e]=r}return r}}class k_ extends va{constructor(t){super(),this.ready=!0,this.boundHandleImageChange_=this.handleImageChange_.bind(this),this.layer_=t,this.declutterExecutorGroup=null}getFeatures(t){return ct()}getData(t){return null}prepareFrame(t){return ct()}renderFrame(t,e){return ct()}loadedTileCallback(t,e,n){t[e]||(t[e]={}),t[e][n.tileCoord.toString()]=n}createLoadedTileFinder(t,e,n){return(s,r)=>{const o=this.loadedTileCallback.bind(this,n,s);return t.forEachLoadedTile(e,s,r,o)}}forEachFeatureAtCoordinate(t,e,n,s,r){}getLayer(){return this.layer_}handleFontsChanged(){}handleImageChange_(t){const e=t.target;(e.getState()===et.LOADED||e.getState()===et.ERROR)&&this.renderIfReadyAndVisible()}loadImage(t){let e=t.getState();return e!=et.LOADED&&e!=et.ERROR&&t.addEventListener(Lt.CHANGE,this.boundHandleImageChange_),e==et.IDLE&&(t.load(),e=t.getState()),e==et.LOADED}renderIfReadyAndVisible(){const t=this.getLayer();t&&t.getVisible()&&t.getSourceState()==="ready"&&t.changed()}renderDeferred(t){}disposeInternal(){delete this.layer_,super.disposeInternal()}}class xl extends gn{constructor(t,e,n,s){super(t),this.inversePixelTransform=e,this.frameState=n,this.context=s}}class Zd{constructor(){ju(this,"pushMethodArgs_",(...t)=>(this.instructions_[this.zIndex+this.offset_].push(t),this)),this.instructions_=[],this.zIndex=0,this.offset_=0,this.context_=new Proxy(CanvasRenderingContext2D.prototype,{get:(t,e)=>{if(typeof ou()[e]=="function")return this.instructions_[this.zIndex+this.offset_]||(this.instructions_[this.zIndex+this.offset_]=[]),this.instructions_[this.zIndex+this.offset_].push(e),this.pushMethodArgs_},set:(t,e,n)=>(this.instructions_[this.zIndex+this.offset_]||(this.instructions_[this.zIndex+this.offset_]=[]),this.instructions_[this.zIndex+this.offset_].push(e,n),!0)})}getContext(){return this.context_}draw(t){this.instructions_.forEach(e=>{for(let n=0,s=e.length;nb[2]}else j=S>N;const B=Math.PI,d=[],m=R+n===t;t=R,x=0,v=C,g=i[t],f=i[t+1];let y;if(m){w(),y=Math.atan2(f-_,g-p),j&&(y+=y>0?-B:B);const b=(N+S)/2,M=(U+T)/2;return d[0]=[b,M,(P-r)/2,y,s],d}s=s.replace(/\n/g," ");for(let b=0,M=s.length;b0?-B:B),y!==void 0){let G=I-y;if(G+=G>B?-2*B:G<-B?2*B:0,Math.abs(G)>o)return null}y=I;const A=b;let L=0;for(;b0&&i.push(` -`,""),i.push(t,""),i}class EC{constructor(t,e,n,s,r){this.overlaps=n,this.pixelRatio=e,this.resolution=t,this.alignAndScaleFill_,this.instructions=s.instructions,this.coordinates=s.coordinates,this.coordinateCache_={},this.renderedTransform_=pe(),this.hitDetectionInstructions=s.hitDetectionInstructions,this.pixelCoordinates_=null,this.viewRotation_=0,this.fillStates=s.fillStates||{},this.strokeStates=s.strokeStates||{},this.textStates=s.textStates||{},this.widths_={},this.labels_={},this.zIndexContext_=r?new Zd:null}getZIndexContext(){return this.zIndexContext_}createLabel(t,e,n,s){const r=t+e+n+s;if(this.labels_[r])return this.labels_[r];const o=s?this.strokeStates[s]:null,a=n?this.fillStates[n]:null,l=this.textStates[e],h=this.pixelRatio,c=[l.scale[0]*h,l.scale[1]*h],u=Array.isArray(t),g=l.justify?ql[l.justify]:Tc(Array.isArray(t)?t[0]:t,l.textAlign||na),f=s&&o.lineWidth?o.lineWidth:0,p=u?t:t.split(` -`).reduce(bC,[]),{width:_,height:x,widths:v,heights:w,lineWidths:E}=Qb(l,p),S=_+f,T=[],R=(S+2)*c[0],C=(x+f)*c[1],P={width:R<0?Math.floor(R):Math.ceil(R),height:C<0?Math.floor(C):Math.ceil(C),contextInstructions:T};(c[0]!=1||c[1]!=1)&&T.push("scale",c),s&&(T.push("strokeStyle",o.strokeStyle),T.push("lineWidth",f),T.push("lineCap",o.lineCap),T.push("lineJoin",o.lineJoin),T.push("miterLimit",o.miterLimit),T.push("setLineDash",[o.lineDash]),T.push("lineDashOffset",o.lineDashOffset)),n&&T.push("fillStyle",a.fillStyle),T.push("textBaseline","middle"),T.push("textAlign","center");const N=.5-g;let U=g*S+N*f;const j=[],B=[];let d=0,m=0,y=0,b=0,M;for(let I=0,A=p.length;It?t-h:r,S=o+c>e?e-c:o,T=p[3]+E*g[0]+p[1],R=p[0]+S*g[1]+p[2],C=v-p[3],P=w-p[0];(_||u!==0)&&(Hn[0]=C,Kn[0]=C,Hn[1]=P,vn[1]=P,vn[0]=C+T,wn[0]=vn[0],wn[1]=P+R,Kn[1]=wn[1]);let N;return u!==0?(N=hi(pe(),n,s,1,1,u,-n,-s),ae(N,Hn),ae(N,vn),ae(N,wn),ae(N,Kn),Bi(Math.min(Hn[0],vn[0],wn[0],Kn[0]),Math.min(Hn[1],vn[1],wn[1],Kn[1]),Math.max(Hn[0],vn[0],wn[0],Kn[0]),Math.max(Hn[1],vn[1],wn[1],Kn[1]),rr)):Bi(Math.min(C,C+T),Math.min(P,P+R),Math.max(C,C+T),Math.max(P,P+R),rr),f&&(v=Math.round(v),w=Math.round(w)),{drawImageX:v,drawImageY:w,drawImageW:E,drawImageH:S,originX:h,originY:c,declutterBox:{minX:rr[0],minY:rr[1],maxX:rr[2],maxY:rr[3],value:x},canvasTransform:N,scale:g}}replayImageOrLabel_(t,e,n,s,r,o,a){const l=!!(o||a),h=s.declutterBox,c=a?a[2]*s.scale[0]/2:0;return h.minX-c<=e[0]&&h.maxX+c>=0&&h.minY-c<=e[1]&&h.maxY+c>=0&&(l&&this.replayTextBackground_(t,Hn,vn,wn,Kn,o,a),Jb(t,s.canvasTransform,r,n,s.originX,s.originY,s.drawImageW,s.drawImageH,s.drawImageX,s.drawImageY,s.scale)),!0}fill_(t){const e=this.alignAndScaleFill_;if(e){const n=ae(this.renderedTransform_,[0,0]),s=512*this.pixelRatio;t.save(),t.translate(n[0]%s,n[1]%s),e!==1&&t.scale(e,e),t.rotate(this.viewRotation_)}t.fill(),e&&t.restore()}setStrokeStyle_(t,e){t.strokeStyle=e[1],t.lineWidth=e[2],t.lineCap=e[3],t.lineJoin=e[4],t.miterLimit=e[5],t.lineDashOffset=e[7],t.setLineDash(e[6])}drawLabelWithPointPlacement_(t,e,n,s){const r=this.textStates[e],o=this.createLabel(t,e,s,n),a=this.strokeStates[n],l=this.pixelRatio,h=Tc(Array.isArray(t)?t[0]:t,r.textAlign||na),c=ql[r.textBaseline||Nl],u=a&&a.lineWidth?a.lineWidth:0,g=o.width/l-2*r.scale[0],f=h*g+2*(.5-h)*u,p=c*o.height/l+2*(.5-c)*u;return{label:o,anchorX:f,anchorY:p}}execute_(t,e,n,s,r,o,a,l){const h=this.zIndexContext_;let c;this.pixelCoordinates_&&$s(n,this.renderedTransform_)?c=this.pixelCoordinates_:(this.pixelCoordinates_||(this.pixelCoordinates_=[]),c=hs(this.coordinates,0,this.coordinates.length,2,n,this.pixelCoordinates_),Vx(this.renderedTransform_,n));let u=0;const g=s.length;let f=0,p,_,x,v,w,E,S,T,R,C,P,N,U,j=0,B=0,d=null,m=null;const y=this.coordinateCache_,b=this.viewRotation_,M=Math.round(Math.atan2(-n[1],n[0])*1e12)/1e12,I={context:t,pixelRatio:this.pixelRatio,resolution:this.resolution,rotation:b},A=this.instructions!=s||this.overlaps?0:200;let L,k,W,K;for(;uA&&(this.fill_(t),j=0),B>A&&(t.stroke(),B=0),!j&&!B&&(t.beginPath(),w=NaN,E=NaN),++u;break;case ut.CIRCLE:f=G[1];const H=c[f],Q=c[f+1],nt=c[f+2],xt=c[f+3],dt=nt-H,Tt=xt-Q,Et=Math.sqrt(dt*dt+Tt*Tt);t.moveTo(H+Et,Q),t.arc(H,Q,Et,0,2*Math.PI,!0),++u;break;case ut.CLOSE_PATH:t.closePath(),++u;break;case ut.CUSTOM:f=G[1],p=G[2];const kt=G[3],Yt=G[4],ue=G[5];I.geometry=kt,I.feature=L,u in y||(y[u]=[]);const Ht=y[u];ue?ue(c,f,p,2,Ht):(Ht[0]=c[f],Ht[1]=c[f+1],Ht.length=2),h&&(h.zIndex=G[6]),Yt(Ht,I),++u;break;case ut.DRAW_IMAGE:f=G[1],p=G[2],R=G[3],_=G[4],x=G[5];let Ke=G[6];const $a=G[7],ic=G[8],Va=G[9],Ya=G[10];let fi=G[11];const Li=G[12];let $i=G[13];v=G[14]||"declutter";const Oi=G[15];if(!R&&G.length>=20){C=G[19],P=G[20],N=G[21],U=G[22];const wi=this.drawLabelWithPointPlacement_(C,P,N,U);R=wi.label,G[3]=R;const ws=G[23];_=(wi.anchorX-ws)*this.pixelRatio,G[4]=_;const bi=G[24];x=(wi.anchorY-bi)*this.pixelRatio,G[5]=x,Ke=R.height,G[6]=Ke,$i=R.width,G[13]=$i}let tr;G.length>25&&(tr=G[25]);let er,Zn,pn;G.length>17?(er=G[16],Zn=G[17],pn=G[18]):(er=Is,Zn=!1,pn=!1),Ya&&M?fi+=b:!Ya&&!M&&(fi-=b);let nc=0;for(;f!Xl.includes(i));class D_{constructor(t,e,n,s,r,o,a){this.maxExtent_=t,this.overlaps_=s,this.pixelRatio_=n,this.resolution_=e,this.renderBuffer_=o,this.executorsByZIndex_={},this.hitDetectionContext_=null,this.hitDetectionTransform_=pe(),this.renderedContext_=null,this.deferredZIndexContexts_={},this.createExecutors_(r,a)}clip(t,e){const n=this.getClipCoords(e);t.beginPath(),t.moveTo(n[0],n[1]),t.lineTo(n[2],n[3]),t.lineTo(n[4],n[5]),t.lineTo(n[6],n[7]),t.clip()}createExecutors_(t,e){for(const n in t){let s=this.executorsByZIndex_[n];s===void 0&&(s={},this.executorsByZIndex_[n]=s);const r=t[n];for(const o in r){const a=r[o];s[o]=new EC(this.resolution_,this.pixelRatio_,this.overlaps_,a,e)}}}hasExecutors(t){for(const e in this.executorsByZIndex_){const n=this.executorsByZIndex_[e];for(let s=0,r=t.length;s0){if(!o||f!=="Image"&&f!=="Text"||o.includes(T)){const U=(g[P]-3)/4,j=s-U%a,B=s-(U/a|0),d=r(T,R,j*j+B*B);if(d)return d}c.clearRect(0,0,a,a);break}}const _=Object.keys(this.executorsByZIndex_).map(Number);_.sort(on);let x,v,w,E,S;for(x=_.length-1;x>=0;--x){const T=_[x].toString();for(w=this.executorsByZIndex_[T],v=zo.length-1;v>=0;--v)if(f=zo[v],E=w[f],E!==void 0&&(S=E.executeHitDetection(c,l,n,p,u),S))return S}}getClipCoords(t){const e=this.maxExtent_;if(!e)return null;const n=e[0],s=e[1],r=e[2],o=e[3],a=[n,s,n,o,r,o,r,s];return hs(a,0,8,2,t,a),a}isEmpty(){return Fn(this.executorsByZIndex_)}execute(t,e,n,s,r,o,a){const l=Object.keys(this.executorsByZIndex_).map(Number);l.sort(on),o=o||zo;let h,c,u,g,f,p;for(a&&l.reverse(),h=0,c=l.length;h{r.draw(this.renderedContext_),r.clear()})}}const Mc={};function TC(i){if(Mc[i]!==void 0)return Mc[i];const t=i*2+1,e=i*i,n=new Array(e+1);for(let r=0;r<=i;++r)for(let o=0;o<=i;++o){const a=r*r+o*o;if(a>e)break;let l=n[a];l||(l=[],n[a]=l),l.push(((i+r)*t+(i+o))*4+3),r>0&&l.push(((i-r)*t+(i+o))*4+3),o>0&&(l.push(((i+r)*t+(i-o))*4+3),r>0&&l.push(((i-r)*t+(i-o))*4+3))}const s=[];for(let r=0,o=n.length;ru*this.pixelRatio_),lineDashOffset:(o||Ln)*this.pixelRatio_,lineJoin:a!==void 0?a:Wr,lineWidth:(l!==void 0?l:sa)*this.pixelRatio_,miterLimit:h!==void 0?h:ea,strokeStyle:nn(n||ia)}}}setImageStyle(t){let e;if(!t||!(e=t.getSize())){this.image_=null;return}const n=t.getPixelRatio(this.pixelRatio_),s=t.getAnchor(),r=t.getOrigin();this.image_=t.getImage(this.pixelRatio_),this.imageAnchorX_=s[0]*n,this.imageAnchorY_=s[1]*n,this.imageHeight_=e[1]*n,this.imageOpacity_=t.getOpacity(),this.imageOriginX_=r[0],this.imageOriginY_=r[1],this.imageRotateWithView_=t.getRotateWithView(),this.imageRotation_=t.getRotation();const o=t.getScaleArray();this.imageScale_=[o[0]*this.pixelRatio_/n,o[1]*this.pixelRatio_/n],this.imageWidth_=e[0]*n}setTextStyle(t){if(!t)this.text_="";else{const e=t.getFill();if(!e)this.textFillState_=null;else{const f=e.getColor();this.textFillState_={fillStyle:nn(f||ni)}}const n=t.getStroke();if(!n)this.textStrokeState_=null;else{const f=n.getColor(),p=n.getLineCap(),_=n.getLineDash(),x=n.getLineDashOffset(),v=n.getLineJoin(),w=n.getWidth(),E=n.getMiterLimit();this.textStrokeState_={lineCap:p!==void 0?p:Br,lineDash:_||An,lineDashOffset:x||Ln,lineJoin:v!==void 0?v:Wr,lineWidth:w!==void 0?w:sa,miterLimit:E!==void 0?E:ea,strokeStyle:nn(f||ia)}}const s=t.getFont(),r=t.getOffsetX(),o=t.getOffsetY(),a=t.getRotateWithView(),l=t.getRotation(),h=t.getScaleArray(),c=t.getText(),u=t.getTextAlign(),g=t.getTextBaseline();this.textState_={font:s!==void 0?s:F0,textAlign:u!==void 0?u:na,textBaseline:g!==void 0?g:Nl},this.text_=c!==void 0?Array.isArray(c)?c.reduce((f,p,_)=>f+=_%2?" ":p,""):c:"",this.textOffsetX_=r!==void 0?this.pixelRatio_*r:0,this.textOffsetY_=o!==void 0?this.pixelRatio_*o:0,this.textRotateWithView_=a!==void 0?a:!1,this.textRotation_=l!==void 0?l:0,this.textScale_=[this.pixelRatio_*h[0],this.pixelRatio_*h[1]]}}}const G_=MC,_i=.5;function j_(i,t,e,n,s,r,o,a,l){const h=l?yh(s):s,c=i[0]*_i,u=i[1]*_i,g=Jt(c,u);g.imageSmoothingEnabled=!1;const f=g.canvas,p=new G_(g,_i,s,null,o,a,l?Hs(Sv(),l):null),_=e.length,x=Math.floor((256*256*256-1)/_),v={};for(let E=1;E<=_;++E){const S=e[E-1],T=S.getStyleFunction()||n;if(!T)continue;let R=T(S,r);if(!R)continue;Array.isArray(R)||(R=[R]);const C=(E*x).toString(16).padStart(7,"#00000");for(let P=0,N=R.length;P0;return u&&Promise.all(l).then(()=>s(null)),PC(i,t,e,n,r,o,a),u}function PC(i,t,e,n,s,r,o){const a=e.getGeometryFunction()(t);if(!a)return;const l=a.simplifyTransformed(n,s);if(e.getRenderer())W_(i,l,e,t,o);else{const h=U_[l.getType()];h(i,l,e,t,o,r)}}function W_(i,t,e,n,s){if(t.getType()=="GeometryCollection"){const r=t.getGeometries();for(let o=0,a=r.length;o{if(!this.hitDetectionImageData_&&!this.animatingOrInteracting_){const n=[this.context.canvas.width,this.context.canvas.height];ae(this.pixelTransform,n);const s=this.renderedCenter_,r=this.renderedResolution_,o=this.renderedRotation_,a=this.renderedProjection_,l=this.wrappedRenderedExtent_,h=this.getLayer(),c=[],u=n[0]*_i,g=n[1]*_i;c.push(this.getRenderTransform(s,r,o,_i,u,g,0).slice());const f=h.getSource(),p=a.getExtent();if(f.getWrapX()&&a.canWrapX()&&!Ze(p,l)){let _=l[0];const x=yt(p);let v=0,w;for(;_p[2];)++v,w=x*v,c.push(this.getRenderTransform(s,r,o,_i,u,g,w).slice()),_-=x}this.hitDetectionImageData_=j_(n,c,this.renderedFeatures_,h.getStyleFunction(),l,r,o,Zl(r,this.renderedPixelRatio_),null)}e(z_(t,this.renderedFeatures_,this.hitDetectionImageData_))})}forEachFeatureAtCoordinate(t,e,n,s,r){if(!this.replayGroup_)return;const o=e.viewState.resolution,a=e.viewState.rotation,l=this.getLayer(),h={},c=function(p,_,x){const v=st(p),w=h[v];if(w){if(w!==!0&&xu=p.forEachFeatureAtCoordinate(t,o,a,n,c,f&&e.declutter[f]?e.declutter[f].all().map(_=>_.value):null)),u}handleFontsChanged(){const t=this.getLayer();t.getVisible()&&this.replayGroup_&&t.changed()}handleStyleImageChange_(t){this.renderIfReadyAndVisible()}prepareFrame(t){const e=this.getLayer(),n=e.getSource();if(!n)return!1;const s=t.viewHints[ee.ANIMATING],r=t.viewHints[ee.INTERACTING],o=e.getUpdateWhileAnimating(),a=e.getUpdateWhileInteracting();if(this.ready&&!o&&s||!a&&r)return this.animatingOrInteracting_=!0,!0;this.animatingOrInteracting_=!1;const l=t.extent,h=t.viewState,c=h.projection,u=h.resolution,g=t.pixelRatio,f=e.getRevision(),p=e.getRenderBuffer();let _=e.getRenderOrder();_===void 0&&(_=CC);const x=h.center.slice(),v=Ii(l,p*u),w=v.slice(),E=[v.slice()],S=c.getExtent();if(n.getWrapX()&&c.canWrapX()&&!Ze(S,t.extent)){const m=yt(S),y=Math.max(yt(v)/2,m);v[0]=S[0]-y,v[2]=S[2]+y,i0(x,c);const b=Yu(E[0],c);b[0]S[0]&&b[2]>S[2]&&E.push([b[0]-m,b[1],b[2]-m,b[3]])}if(this.ready&&this.renderedResolution_==u&&this.renderedRevision_==f&&this.renderedRenderOrder_==_&&Ze(this.wrappedRenderedExtent_,v))return $s(this.renderedExtent_,w)||(this.hitDetectionImageData_=null,this.renderedExtent_=w),this.renderedCenter_=x,this.replayGroupChanged=!1,!0;this.replayGroup_=null;const T=new N_(B_(u,g),v,u,g);let R;for(let m=0,y=E.length;m{let b;const M=m.getStyleFunction()||e.getStyleFunction();if(M&&(b=M(m,u)),b){const I=this.renderFeature(m,C,b,T,R,this.getLayer().getDeclutter(),y);P=P&&!I}},U=yh(v),j=n.getFeaturesInExtent(U);_&&j.sort(_);for(let m=0,y=j.length;m=200&&a.status<300){const h=t.getType();let c;h=="json"?c=JSON.parse(a.responseText):h=="text"?c=a.responseText:h=="xml"?(c=a.responseXML,c||(c=new DOMParser().parseFromString(a.responseText,"application/xml"))):h=="arraybuffer"&&(c=a.response),c?r(t.readFeatures(c,{extent:e,featureProjection:s}),t.readProjection(c)):o()}else o()},a.onerror=o,a.send()}function Np(i,t){return function(e,n,s,r,o){const a=this;X_(i,t,e,n,s,function(l,h){a.addFeatures(l),r!==void 0&&r(l)},o||Yo)}}class Qn extends gn{constructor(t,e,n){super(t),this.feature=e,this.features=n}}class jh extends oo{constructor(t){t=t||{},super({attributions:t.attributions,interpolate:!0,projection:void 0,state:"ready",wrapX:t.wrapX!==void 0?t.wrapX:!0}),this.on,this.once,this.un,this.loader_=Yo,this.format_=t.format,this.overlaps_=t.overlaps===void 0?!0:t.overlaps,this.url_=t.url,t.loader!==void 0?this.loader_=t.loader:this.url_!==void 0&&(At(this.format_,"`format` must be set when `url` is set"),this.loader_=Np(this.url_,this.format_)),this.strategy_=t.strategy!==void 0?t.strategy:jC;const e=t.useSpatialIndex!==void 0?t.useSpatialIndex:!0;this.featuresRtree_=e?new Op:null,this.loadedExtentsRtree_=new Op,this.loadingExtentsCount_=0,this.nullGeometryFeatures_={},this.idIndex_={},this.uidIndex_={},this.featureChangeKeys_={},this.featuresCollection_=null;let n,s;Array.isArray(t.features)?s=t.features:t.features&&(n=t.features,s=n.getArray()),!e&&n===void 0&&(n=new Ul(s)),s!==void 0&&this.addFeaturesInternal(s),n!==void 0&&this.bindFeaturesCollection_(n)}addFeature(t){this.addFeatureInternal(t),this.changed()}addFeatureInternal(t){const e=st(t);if(!this.addToIndex_(e,t)){this.featuresCollection_&&this.featuresCollection_.remove(t);return}this.setupChangeEvents_(e,t);const n=t.getGeometry();if(n){const s=n.getExtent();this.featuresRtree_&&this.featuresRtree_.insert(s,t)}else this.nullGeometryFeatures_[e]=t;this.dispatchEvent(new Qn(ke.ADDFEATURE,t))}setupChangeEvents_(t,e){e instanceof Ge||(this.featureChangeKeys_[t]=[le(e,Lt.CHANGE,this.handleFeatureChange_,this),le(e,zu.PROPERTYCHANGE,this.handleFeatureChange_,this)])}addToIndex_(t,e){let n=!0;if(e.getId()!==void 0){const s=String(e.getId());if(!(s in this.idIndex_))this.idIndex_[s]=e;else if(e instanceof Ge){const r=this.idIndex_[s];r instanceof Ge?Array.isArray(r)?r.push(e):this.idIndex_[s]=[r,e]:n=!1}else n=!1}return n&&(At(!(t in this.uidIndex_),"The passed `feature` was already added to the source"),this.uidIndex_[t]=e),n}addFeatures(t){this.addFeaturesInternal(t),this.changed()}addFeaturesInternal(t){const e=[],n=[],s=[];for(let r=0,o=t.length;r{e||(e=!0,this.addFeature(n.element),e=!1)}),t.addEventListener(rs.REMOVE,n=>{e||(e=!0,this.removeFeature(n.element),e=!1)}),this.featuresCollection_=t}clear(t){if(t){for(const n in this.featureChangeKeys_)this.featureChangeKeys_[n].forEach(ve);this.featuresCollection_||(this.featureChangeKeys_={},this.idIndex_={},this.uidIndex_={})}else if(this.featuresRtree_){const n=s=>{this.removeFeatureInternal(s)};this.featuresRtree_.forEach(n);for(const s in this.nullGeometryFeatures_)this.removeFeatureInternal(this.nullGeometryFeatures_[s])}this.featuresCollection_&&this.featuresCollection_.clear(),this.featuresRtree_&&this.featuresRtree_.clear(),this.nullGeometryFeatures_={};const e=new Qn(ke.CLEAR);this.dispatchEvent(e),this.changed()}forEachFeature(t){if(this.featuresRtree_)return this.featuresRtree_.forEach(t);this.featuresCollection_&&this.featuresCollection_.forEach(t)}forEachFeatureAtCoordinateDirect(t,e){const n=[t[0],t[1],t[0],t[1]];return this.forEachFeatureInExtent(n,function(s){const r=s.getGeometry();if(r instanceof Ge||r.intersectsCoordinate(t))return e(s)})}forEachFeatureInExtent(t,e){if(this.featuresRtree_)return this.featuresRtree_.forEachInExtent(t,e);this.featuresCollection_&&this.featuresCollection_.forEach(e)}forEachFeatureIntersectingExtent(t,e){return this.forEachFeatureInExtent(t,function(n){const s=n.getGeometry();if(s instanceof Ge||s.intersectsExtent(t)){const r=e(n);if(r)return r}})}getFeaturesCollection(){return this.featuresCollection_}getFeatures(){let t;return this.featuresCollection_?t=this.featuresCollection_.getArray().slice(0):this.featuresRtree_&&(t=this.featuresRtree_.getAll(),Fn(this.nullGeometryFeatures_)||Ot(t,Object.values(this.nullGeometryFeatures_))),t}getFeaturesAtCoordinate(t){const e=[];return this.forEachFeatureAtCoordinateDirect(t,function(n){e.push(n)}),e}getFeaturesInExtent(t,e){if(this.featuresRtree_){if(!(e&&e.canWrapX()&&this.getWrapX()))return this.featuresRtree_.getInExtent(t);const n=sv(t,e);return[].concat(...n.map(s=>this.featuresRtree_.getInExtent(s)))}return this.featuresCollection_?this.featuresCollection_.getArray().slice(0):[]}getClosestFeatureToCoordinate(t,e){const n=t[0],s=t[1];let r=null;const o=[NaN,NaN];let a=1/0;const l=[-1/0,-1/0,1/0,1/0];return e=e||qx,this.featuresRtree_.forEachInExtent(l,function(h){if(e(h)){const c=h.getGeometry(),u=a;if(a=c instanceof Ge?0:c.closestPointXY(n,s,o,a),a{--this.loadingExtentsCount_,this.dispatchEvent(new Qn(ke.FEATURESLOADEND,void 0,h))},()=>{--this.loadingExtentsCount_,this.dispatchEvent(new Qn(ke.FEATURESLOADERROR))}),s.insert(l,{extent:l.slice()}))}this.loading=this.loader_.length<4?!1:this.loadingExtentsCount_>0}refresh(){this.clear(!0),this.loadedExtentsRtree_.clear(),super.refresh()}removeLoadedExtent(t){const e=this.loadedExtentsRtree_;let n;e.forEachInExtent(t,function(s){if(Nn(s.extent,t))return n=s,!0}),n&&e.remove(n)}removeFeatures(t){const e=[];for(let n=0,s=t.length;n0&&this.changed()}removeFeature(t){t&&this.removeFeatureInternal(t)&&this.changed()}removeFeatureInternal(t){const e=st(t);e in this.nullGeometryFeatures_?delete this.nullGeometryFeatures_[e]:this.featuresRtree_&&this.featuresRtree_.remove(t);const n=this.featureChangeKeys_[e];if(!n)return;n.forEach(ve),delete this.featureChangeKeys_[e];const s=t.getId();return s!==void 0&&delete this.idIndex_[s.toString()],delete this.uidIndex_[e],this.hasListener(ke.REMOVEFEATURE)&&this.dispatchEvent(new Qn(ke.REMOVEFEATURE,t)),t}removeFromIdIndex_(t){let e=!1;for(const n in this.idIndex_){const s=this.idIndex_[n];if(t instanceof Ge&&Array.isArray(s)&&s.includes(t))s.splice(s.indexOf(t),1);else if(this.idIndex_[n]===t){delete this.idIndex_[n],e=!0;break}}return e}setLoader(t){this.loader_=t}setUrl(t){At(this.format_,"`format` must be set when `url` is set"),this.url_=t,this.setLoader(Np(t,this.format_))}}function UC(i){if(!(i.context instanceof CanvasRenderingContext2D))throw new Error("Only works for render events from Canvas 2D layers");const t=i.inversePixelTransform[0],e=i.inversePixelTransform[1],n=Math.sqrt(t*t+e*e),s=i.frameState,r=Qr(i.inversePixelTransform.slice(),s.coordinateToPixelTransform),o=Zl(s.viewState.resolution,n);let a;return new G_(i.context,n,s.extent,r,s.viewState.rotation,o,a)}function Z_(i,t,e){const n=[];let s=i(0),r=i(1),o=t(s),a=t(r);const l=[r,s],h=[a,o],c=[1,0],u={};let g=1e5,f,p,_,x,v,w;for(;--g>0&&c.length>0;)_=c.pop(),s=l.pop(),o=h.pop(),w=_.toString(),w in u||(n.push(o[0],o[1]),u[w]=!0),x=c.pop(),r=l.pop(),a=h.pop(),v=(_+x)/2,f=i(v),p=t(f),t0(p[0],p[1],o[0],o[1],a[0],a[1]){const s=n.get("graticule_label");return this.lonLabelStyleBase_.getText().setText(s),this.lonLabelStyleBase_},this.latLabelStyleBase_=new Ve({text:t.latLabelStyle!==void 0?t.latLabelStyle.clone():new Bs({font:"12px Calibri,sans-serif",textAlign:"right",fill:new qi({color:"rgba(0,0,0,1)"}),stroke:new cn({color:"rgba(255,255,255,1)",width:3})})}),this.latLabelStyle_=n=>{const s=n.get("graticule_label");return this.latLabelStyleBase_.getText().setText(s),this.latLabelStyleBase_},this.meridiansLabels_=[],this.parallelsLabels_=[],this.addEventListener(si.POSTRENDER,this.drawLabels_.bind(this))),this.intervals_=t.intervals!==void 0?t.intervals:XC,this.setSource(new jh({loader:this.loaderFunction.bind(this),strategy:this.strategyFunction.bind(this),features:new Ul,overlaps:!1,useSpatialIndex:!1,wrapX:t.wrapX})),this.featurePool_=[],this.lineStyle_=new Ve({stroke:this.strokeStyle_}),this.loadedExtent_=null,this.renderedExtent_=null,this.renderedResolution_=null,this.setRenderOrder(null)}strategyFunction(t,e){let n=t.slice();return this.projection_&&this.getSource().getWrapX()&&Yu(n,this.projection_),this.loadedExtent_&&(Jx(this.loadedExtent_,n,e)?n=this.loadedExtent_.slice():this.getSource().removeLoadedExtent(this.loadedExtent_)),[n]}loaderFunction(t,e,n){this.loadedExtent_=t;const s=this.getSource(),r=this.getExtent()||[-1/0,-1/0,1/0,1/0],o=we(r,t);if(this.renderedExtent_&&Nn(this.renderedExtent_,o)&&this.renderedResolution_===e||(this.renderedExtent_=o,this.renderedResolution_=e,Un(o)))return;const a=Ce(o),l=e*e/4;(!this.projection_||!Ae(this.projection_,n))&&this.updateProjectionInfo_(n),this.createGraticule_(o,a,e,l);let h=this.meridians_.length+this.parallels_.length;this.meridiansLabels_&&(h+=this.meridians_.length),this.parallelsLabels_&&(h+=this.parallels_.length);let c;for(;h>this.featurePool_.length;)c=new Ee,this.featurePool_.push(c);const u=s.getFeaturesCollection();u.clear();let g=0,f,p;for(f=0,p=this.meridians_.length;fMath.PI/2;c=c!==p}const f=UC(t);for(let p=l;p<=h;++p){let _=this.meridians_.length+this.parallels_.length,x,v,w,E;if(this.meridiansLabels_)for(v=0,w=this.meridiansLabels_.length;v=l?(t[0]=a[0],t[2]=a[2]):o=!0);const h=[wt(e[0],this.minX_,this.maxX_),wt(e[1],this.minY_,this.maxY_)],c=this.toLonLatTransform_(h);isNaN(c[1])&&(c[1]=Math.abs(this.maxLat_)>=Math.abs(this.minLat_)?this.maxLat_:this.minLat_);let u=wt(c[0],this.minLon_,this.maxLon_),g=wt(c[1],this.minLat_,this.maxLat_);const f=this.maxLines_;let p,_,x,v,w=t;o||(w=[wt(t[0],this.minX_,this.maxX_),wt(t[1],this.minY_,this.maxY_),wt(t[2],this.minX_,this.maxX_),wt(t[3],this.minY_,this.maxY_)]);const E=Gr(w,this.toLonLatTransform_,void 0,8);let S=E[3],T=E[2],R=E[1],C=E[0];if(o||(xi(w,this.bottomLeft_)&&(C=this.minLon_,R=this.minLat_),xi(w,this.bottomRight_)&&(T=this.maxLon_,R=this.minLat_),xi(w,this.topLeft_)&&(C=this.minLon_,S=this.maxLat_),xi(w,this.topRight_)&&(T=this.maxLon_,S=this.maxLat_),S=wt(S,g,this.maxLat_),T=wt(T,u,this.maxLon_),R=wt(R,this.minLat_,g),C=wt(C,this.minLon_,u)),u=Math.floor(u/r)*r,v=wt(u,this.minLon_,this.maxLon_),_=this.addMeridian_(v,R,S,s,t,0),p=0,o)for(;(v-=r)>=C&&p++s[o]&&(r=o,o=1);const a=Math.max(e[1],s[r]),l=Math.min(e[3],s[o]),h=wt(e[1]+Math.abs(e[1]-e[3])*this.lonLabelPosition_,a,l),c=[s[r-1]+(s[o-1]-s[r-1])*(h-s[r])/(s[o]-s[r]),h],u=this.meridiansLabels_[n].geom;return u.setCoordinates(c),u}getMeridians(){return this.meridians_}getParallel_(t,e,n,s,r){const o=WC(t,e,n,this.projection_,s);let a=this.parallels_[r];return a?(a.setFlatCoordinates("XY",o),a.changed()):a=new ye(o,"XY"),a}getParallelPoint_(t,e,n){const s=t.getFlatCoordinates();let r=0,o=s.length-2;s[r]>s[o]&&(r=o,o=0);const a=Math.max(e[0],s[r]),l=Math.min(e[2],s[o]),h=wt(e[0]+Math.abs(e[0]-e[2])*this.latLabelPosition_,a,l),c=s[r+1]+(s[o+1]-s[r+1])*(h-s[r])/(s[o]-s[r]),u=[h,c],g=this.parallelsLabels_[n].geom;return g.setCoordinates(u),g}getParallels(){return this.parallels_}updateProjectionInfo_(t){const e=tt("EPSG:4326"),n=t.getWorldExtent();this.maxLat_=n[3],this.maxLon_=n[2],this.minLat_=n[1],this.minLon_=n[0];const s=hn(t,e);if(this.minLon_=Math.abs(this.minLat_)?this.maxLat_:this.minLat_),this.projection_=t}}const $C=ZC;class or extends gn{constructor(t,e){super(t),this.layer=e}}const Rc={LAYERS:"layers"};class zh extends E_{constructor(t){t=t||{};const e=Object.assign({},t);delete e.layers;let n=t.layers;super(e),this.on,this.once,this.un,this.layersListenerKeys_=[],this.listenerKeys_={},this.addChangeListener(Rc.LAYERS,this.handleLayersChanged_),n?Array.isArray(n)?n=new Ul(n.slice(),{unique:!0}):At(typeof n.getArray=="function","Expected `layers` to be an array or a `Collection`"):n=new Ul(void 0,{unique:!0}),this.setLayers(n)}handleLayerChange_(){this.changed()}handleLayersChanged_(){this.layersListenerKeys_.forEach(ve),this.layersListenerKeys_.length=0;const t=this.getLayers();this.layersListenerKeys_.push(le(t,rs.ADD,this.handleLayersAdd_,this),le(t,rs.REMOVE,this.handleLayersRemove_,this));for(const n in this.listenerKeys_)this.listenerKeys_[n].forEach(ve);Kr(this.listenerKeys_);const e=t.getArray();for(let n=0,s=e.length;n{this.uniforms_.push({value:t.uniforms[o],location:e.getUniformLocation(this.renderTargetProgram_,o)})})}getGL(){return this.gl_}init(t){const e=this.getGL(),n=[e.drawingBufferWidth*this.scaleRatio_,e.drawingBufferHeight*this.scaleRatio_];if(e.bindFramebuffer(e.FRAMEBUFFER,this.getFrameBuffer()),e.bindRenderbuffer(e.RENDERBUFFER,this.getDepthBuffer()),e.viewport(0,0,n[0],n[1]),!this.renderTargetTextureSize_||this.renderTargetTextureSize_[0]!==n[0]||this.renderTargetTextureSize_[1]!==n[1]){this.renderTargetTextureSize_=n;const s=0,r=e.RGBA,o=0,a=e.RGBA,l=e.UNSIGNED_BYTE;e.bindTexture(e.TEXTURE_2D,this.renderTargetTexture_),e.texImage2D(e.TEXTURE_2D,s,r,n[0],n[1],o,a,l,null),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),e.framebufferTexture2D(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,this.renderTargetTexture_,0),e.renderbufferStorage(e.RENDERBUFFER,e.DEPTH_COMPONENT16,n[0],n[1]),e.framebufferRenderbuffer(e.FRAMEBUFFER,e.DEPTH_ATTACHMENT,e.RENDERBUFFER,this.depthBuffer_)}}apply(t,e,n,s){const r=this.getGL(),o=t.size;if(r.bindFramebuffer(r.FRAMEBUFFER,e?e.getFrameBuffer():null),r.activeTexture(r.TEXTURE0),r.bindTexture(r.TEXTURE_2D,this.renderTargetTexture_),!e){const l=st(r.canvas);if(!t.renderTargets[l]){const h=r.getContextAttributes();h&&h.preserveDrawingBuffer&&(r.clearColor(0,0,0,0),r.clearDepth(1),r.clear(r.COLOR_BUFFER_BIT|r.DEPTH_BUFFER_BIT)),t.renderTargets[l]=!0}}r.disable(r.DEPTH_TEST),r.enable(r.BLEND),r.blendFunc(r.ONE,r.ONE_MINUS_SRC_ALPHA),r.viewport(0,0,r.drawingBufferWidth,r.drawingBufferHeight),r.bindBuffer(r.ARRAY_BUFFER,this.renderTargetVerticesBuffer_),r.useProgram(this.renderTargetProgram_),r.enableVertexAttribArray(this.renderTargetAttribLocation_),r.vertexAttribPointer(this.renderTargetAttribLocation_,2,r.FLOAT,!1,0,0),r.uniform2f(this.renderTargetUniformLocation_,o[0],o[1]),r.uniform1i(this.renderTargetTextureLocation_,0);const a=t.layerStatesArray[t.layerIndex].opacity;r.uniform1f(this.renderTargetOpacityLocation_,a),this.applyUniforms(t),n&&n(r,t),r.drawArrays(r.TRIANGLES,0,6),s&&s(r,t)}getFrameBuffer(){return this.frameBuffer_}getDepthBuffer(){return this.depthBuffer_}applyUniforms(t){const e=this.getGL();let n,s=1;this.uniforms_.forEach(function(r){if(n=typeof r.value=="function"?r.value(t):r.value,n instanceof HTMLCanvasElement||n instanceof ImageData)r.texture||(r.texture=e.createTexture()),e.activeTexture(e[`TEXTURE${s}`]),e.bindTexture(e.TEXTURE_2D,r.texture),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),n instanceof ImageData?e.texImage2D(e.TEXTURE_2D,0,e.RGBA,e.RGBA,n.width,n.height,0,e.UNSIGNED_BYTE,new Uint8Array(n.data)):e.texImage2D(e.TEXTURE_2D,0,e.RGBA,e.RGBA,e.UNSIGNED_BYTE,n),e.uniform1i(r.location,s++);else if(Array.isArray(n))switch(n.length){case 2:e.uniform2f(r.location,n[0],n[1]);return;case 3:e.uniform3f(r.location,n[0],n[1],n[2]);return;case 4:e.uniform4f(r.location,n[0],n[1],n[2],n[3]);return;default:return}else typeof n=="number"&&e.uniform1f(r.location,n)})}}function V_(){return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]}function Y_(i,t){return i[0]=t[0],i[1]=t[1],i[4]=t[2],i[5]=t[3],i[12]=t[4],i[13]=t[5],i}const En={PROJECTION_MATRIX:"u_projectionMatrix",SCREEN_TO_WORLD_MATRIX:"u_screenToWorldMatrix",TIME:"u_time",ZOOM:"u_zoom",RESOLUTION:"u_resolution",ROTATION:"u_rotation",VIEWPORT_SIZE_PX:"u_viewportSizePx",PIXEL_RATIO:"u_pixelRatio",HIT_DETECTION:"u_hitDetection"},tn={UNSIGNED_BYTE:YC,UNSIGNED_SHORT:HC,UNSIGNED_INT:KC,FLOAT:$_},Yl={};function Gp(i){return"shared/"+i}let jp=0;function iI(){const i="unique/"+jp;return jp+=1,i}function nI(i){let t=Yl[i];if(!t){const e=document.createElement("canvas");e.width=1,e.height=1,e.style.position="absolute",e.style.left="0",t={users:0,context:QC(e)},Yl[i]=t}return t.users+=1,t.context}function sI(i){const t=Yl[i];if(!t||(t.users-=1,t.users>0))return;const e=t.context,n=e.getExtension("WEBGL_lose_context");n&&n.loseContext();const s=e.canvas;s.width=1,s.height=1,delete Yl[i]}class rI extends Uu{constructor(t){super(),t=t||{},this.boundHandleWebGLContextLost_=this.handleWebGLContextLost.bind(this),this.boundHandleWebGLContextRestored_=this.handleWebGLContextRestored.bind(this),this.canvasCacheKey_=t.canvasCacheKey?Gp(t.canvasCacheKey):iI(),this.gl_=nI(this.canvasCacheKey_),this.bufferCache_={},this.extensionCache_={},this.currentProgram_=null,this.needsToBeRecreated_=!1;const e=this.gl_.canvas;e.addEventListener(cl.LOST,this.boundHandleWebGLContextLost_),e.addEventListener(cl.RESTORED,this.boundHandleWebGLContextRestored_),this.offsetRotateMatrix_=pe(),this.offsetScaleMatrix_=pe(),this.tmpMat4_=V_(),this.uniformLocationsByProgram_={},this.attribLocationsByProgram_={},this.uniforms_=[],t.uniforms&&this.setUniforms(t.uniforms),this.postProcessPasses_=t.postProcesses?t.postProcesses.map(n=>new Dp({webGlContext:this.gl_,scaleRatio:n.scaleRatio,vertexShader:n.vertexShader,fragmentShader:n.fragmentShader,uniforms:n.uniforms})):[new Dp({webGlContext:this.gl_})],this.shaderCompileErrors_=null,this.startTime_=Date.now()}setUniforms(t){this.uniforms_=[],this.addUniforms(t)}addUniforms(t){for(const e in t)this.uniforms_.push({name:e,value:t[e]})}canvasCacheKeyMatches(t){return this.canvasCacheKey_===Gp(t)}getExtension(t){if(t in this.extensionCache_)return this.extensionCache_[t];const e=this.gl_.getExtension(t);return this.extensionCache_[t]=e,e}bindBuffer(t){const e=this.gl_,n=st(t);let s=this.bufferCache_[n];if(!s){const r=e.createBuffer();s={buffer:t,webGlBuffer:r},this.bufferCache_[n]=s}e.bindBuffer(t.getType(),s.webGlBuffer)}flushBufferData(t){const e=this.gl_;this.bindBuffer(t),e.bufferData(t.getType(),t.getArray(),t.getUsage())}deleteBuffer(t){const e=this.gl_,n=st(t),s=this.bufferCache_[n];s&&!e.isContextLost()&&e.deleteBuffer(s.webGlBuffer),delete this.bufferCache_[n]}disposeInternal(){const t=this.gl_.canvas;t.removeEventListener(cl.LOST,this.boundHandleWebGLContextLost_),t.removeEventListener(cl.RESTORED,this.boundHandleWebGLContextRestored_),sI(this.canvasCacheKey_),delete this.gl_}prepareDraw(t,e,n){const s=this.gl_,r=this.getCanvas(),o=t.size,a=t.pixelRatio;(r.width!==o[0]*a||r.height!==o[1]*a)&&(r.width=o[0]*a,r.height=o[1]*a,r.style.width=o[0]+"px",r.style.height=o[1]+"px");for(let l=this.postProcessPasses_.length-1;l>=0;l--)this.postProcessPasses_[l].init(t);s.bindTexture(s.TEXTURE_2D,null),s.clearColor(0,0,0,0),s.depthRange(0,1),s.clearDepth(1),s.clear(s.COLOR_BUFFER_BIT|s.DEPTH_BUFFER_BIT),s.enable(s.BLEND),s.blendFunc(s.ONE,e?s.ZERO:s.ONE_MINUS_SRC_ALPHA),n?(s.enable(s.DEPTH_TEST),s.depthFunc(s.LEQUAL)):s.disable(s.DEPTH_TEST)}bindTexture(t,e,n){const s=this.gl_;s.activeTexture(s.TEXTURE0+e),s.bindTexture(s.TEXTURE_2D,t),s.uniform1i(this.getUniformLocation(n),e)}prepareDrawToRenderTarget(t,e,n,s){const r=this.gl_,o=e.getSize();r.bindFramebuffer(r.FRAMEBUFFER,e.getFramebuffer()),r.bindRenderbuffer(r.RENDERBUFFER,e.getDepthbuffer()),r.viewport(0,0,o[0],o[1]),r.bindTexture(r.TEXTURE_2D,e.getTexture()),r.clearColor(0,0,0,0),r.depthRange(0,1),r.clearDepth(1),r.clear(r.COLOR_BUFFER_BIT|r.DEPTH_BUFFER_BIT),r.enable(r.BLEND),r.blendFunc(r.ONE,n?r.ZERO:r.ONE_MINUS_SRC_ALPHA),s?(r.enable(r.DEPTH_TEST),r.depthFunc(r.LEQUAL)):r.disable(r.DEPTH_TEST)}drawElements(t,e){const n=this.gl_;this.getExtension("OES_element_index_uint");const s=n.UNSIGNED_INT,r=4,o=e-t,a=t*r;n.drawElements(n.TRIANGLES,o,s,a)}finalizeDraw(t,e,n){for(let s=0,r=this.postProcessPasses_.length;s{if(n=typeof r.value=="function"?r.value(t):r.value,n instanceof HTMLCanvasElement||n instanceof HTMLImageElement||n instanceof ImageData||n instanceof WebGLTexture){n instanceof WebGLTexture&&!r.texture?(r.prevValue=void 0,r.texture=n):r.texture||(r.prevValue=void 0,r.texture=e.createTexture()),this.bindTexture(r.texture,s,r.name),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE);const o=!(n instanceof HTMLImageElement)||n.complete;!(n instanceof WebGLTexture)&&o&&r.prevValue!==n&&(r.prevValue=n,e.texImage2D(e.TEXTURE_2D,0,e.RGBA,e.RGBA,e.UNSIGNED_BYTE,n)),s++}else if(Array.isArray(n)&&n.length===6)this.setUniformMatrixValue(r.name,Y_(this.tmpMat4_,n));else if(Array.isArray(n)&&n.length<=4)switch(n.length){case 2:e.uniform2f(this.getUniformLocation(r.name),n[0],n[1]);return;case 3:e.uniform3f(this.getUniformLocation(r.name),n[0],n[1],n[2]);return;case 4:e.uniform4f(this.getUniformLocation(r.name),n[0],n[1],n[2],n[3]);return;default:return}else typeof n=="number"&&e.uniform1f(this.getUniformLocation(r.name),n)})}useProgram(t,e){this.gl_.useProgram(t),this.currentProgram_=t,this.applyFrameState(e),this.applyUniforms(e)}compileShader(t,e){const n=this.gl_,s=n.createShader(e);return n.shaderSource(s,t),n.compileShader(s),s}getProgram(t,e){const n=this.gl_,s=this.compileShader(t,n.FRAGMENT_SHADER),r=this.compileShader(e,n.VERTEX_SHADER),o=n.createProgram();if(n.attachShader(o,s),n.attachShader(o,r),n.linkProgram(o),!n.getShaderParameter(s,n.COMPILE_STATUS)){const a=`Fragment shader compilation failed: ${n.getShaderInfoLog(s)}`;throw new Error(a)}if(n.deleteShader(s),!n.getShaderParameter(r,n.COMPILE_STATUS)){const a=`Vertex shader compilation failed: ${n.getShaderInfoLog(r)}`;throw new Error(a)}if(n.deleteShader(r),!n.getProgramParameter(o,n.LINK_STATUS)){const a=`GL program linking failed: ${n.getProgramInfoLog(o)}`;throw new Error(a)}return o}getUniformLocation(t){const e=st(this.currentProgram_);return this.uniformLocationsByProgram_[e]===void 0&&(this.uniformLocationsByProgram_[e]={}),this.uniformLocationsByProgram_[e][t]===void 0&&(this.uniformLocationsByProgram_[e][t]=this.gl_.getUniformLocation(this.currentProgram_,t)),this.uniformLocationsByProgram_[e][t]}getAttributeLocation(t){const e=st(this.currentProgram_);return this.attribLocationsByProgram_[e]===void 0&&(this.attribLocationsByProgram_[e]={}),this.attribLocationsByProgram_[e][t]===void 0&&(this.attribLocationsByProgram_[e][t]=this.gl_.getAttribLocation(this.currentProgram_,t)),this.attribLocationsByProgram_[e][t]}makeProjectionTransform(t,e){const n=t.size,s=t.viewState.rotation,r=t.viewState.resolution,o=t.viewState.center;return hi(e,0,0,2/(r*n[0]),2/(r*n[1]),-s,-o[0],-o[1]),e}setUniformFloatValue(t,e){this.gl_.uniform1f(this.getUniformLocation(t),e)}setUniformFloatVec2(t,e){this.gl_.uniform2fv(this.getUniformLocation(t),e)}setUniformFloatVec4(t,e){this.gl_.uniform4fv(this.getUniformLocation(t),e)}setUniformMatrixValue(t,e){this.gl_.uniformMatrix4fv(this.getUniformLocation(t),!1,e)}enableAttributeArray_(t,e,n,s,r){const o=this.getAttributeLocation(t);o<0||(this.gl_.enableVertexAttribArray(o),this.gl_.vertexAttribPointer(o,e,n,!1,s,r))}enableAttributes(t){const e=oI(t);let n=0;for(let s=0;sthis.size_[0]||e>=this.size_[1])return Yi[0]=0,Yi[1]=0,Yi[2]=0,Yi[3]=0,Yi;this.readAll();const n=Math.floor(t)+(this.size_[1]-Math.floor(e)-1)*this.size_[0];return Yi[0]=this.data_[n*4],Yi[1]=this.data_[n*4+1],Yi[2]=this.data_[n*4+2],Yi[3]=this.data_[n*4+3],Yi}getTexture(){return this.texture_}getFramebuffer(){return this.framebuffer_}getDepthbuffer(){return this.depthbuffer_}updateSize_(){const t=this.size_,e=this.helper_.getGL();this.texture_=this.helper_.createTexture(t,null,this.texture_),e.bindFramebuffer(e.FRAMEBUFFER,this.framebuffer_),e.viewport(0,0,t[0],t[1]),e.framebufferTexture2D(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,this.texture_,0),e.bindRenderbuffer(e.RENDERBUFFER,this.depthbuffer_),e.renderbufferStorage(e.RENDERBUFFER,e.DEPTH_COMPONENT16,t[0],t[1]),e.framebufferRenderbuffer(e.FRAMEBUFFER,e.DEPTH_ATTACHMENT,e.RENDERBUFFER,this.depthbuffer_),this.data_=new Uint8Array(t[0]*t[1]*4)}}const zp={GENERATE_POLYGON_BUFFERS:"GENERATE_POLYGON_BUFFERS",GENERATE_POINT_BUFFERS:"GENERATE_POINT_BUFFERS",GENERATE_LINE_STRING_BUFFERS:"GENERATE_LINE_STRING_BUFFERS"};var K_={exports:{}};K_.exports=qh;K_.exports.default=qh;function qh(i,t,e){e=e||2;var n=t&&t.length,s=n?t[0]*e:i.length,r=Q_(i,0,s,e,!0),o=[];if(!r||r.next===r.prev)return o;var a,l,h,c,u,g,f;if(n&&(r=dI(i,t,r,e)),i.length>80*e){a=h=i[0],l=c=i[1];for(var p=e;ph&&(h=u),g>c&&(c=g);f=Math.max(h-a,c-l),f=f!==0?32767/f:0}return la(r,o,e,a,l,f,0),o}function Q_(i,t,e,n,s){var r,o;if(s===bu(i,t,e,n)>0)for(r=t;r=t;r-=n)o=Up(r,i[r],i[r+1],o);return o&&Xh(o,o.next)&&(ca(o),o=o.next),o}function Ws(i,t){if(!i)return i;t||(t=i);var e=i,n;do if(n=!1,!e.steiner&&(Xh(e,e.next)||he(e.prev,e,e.next)===0)){if(ca(e),e=t=e.prev,e===e.next)break;n=!0}else e=e.next;while(n||e!==t);return t}function la(i,t,e,n,s,r,o){if(i){!o&&r&&_I(i,n,s,r);for(var a=i,l,h;i.prev!==i.next;){if(l=i.prev,h=i.next,r?hI(i,n,s,r):lI(i)){t.push(l.i/e|0),t.push(i.i/e|0),t.push(h.i/e|0),ca(i),i=h.next,a=h.next;continue}if(i=h,i===a){o?o===1?(i=cI(Ws(i),t,e),la(i,t,e,n,s,r,2)):o===2&&uI(i,t,e,n,s,r):la(Ws(i),t,e,n,s,r,1);break}}}}function lI(i){var t=i.prev,e=i,n=i.next;if(he(t,e,n)>=0)return!1;for(var s=t.x,r=e.x,o=n.x,a=t.y,l=e.y,h=n.y,c=sr?s>o?s:o:r>o?r:o,f=a>l?a>h?a:h:l>h?l:h,p=n.next;p!==t;){if(p.x>=c&&p.x<=g&&p.y>=u&&p.y<=f&&br(s,a,r,l,o,h,p.x,p.y)&&he(p.prev,p,p.next)>=0)return!1;p=p.next}return!0}function hI(i,t,e,n){var s=i.prev,r=i,o=i.next;if(he(s,r,o)>=0)return!1;for(var a=s.x,l=r.x,h=o.x,c=s.y,u=r.y,g=o.y,f=al?a>h?a:h:l>h?l:h,x=c>u?c>g?c:g:u>g?u:g,v=vu(f,p,t,e,n),w=vu(_,x,t,e,n),E=i.prevZ,S=i.nextZ;E&&E.z>=v&&S&&S.z<=w;){if(E.x>=f&&E.x<=_&&E.y>=p&&E.y<=x&&E!==s&&E!==o&&br(a,c,l,u,h,g,E.x,E.y)&&he(E.prev,E,E.next)>=0||(E=E.prevZ,S.x>=f&&S.x<=_&&S.y>=p&&S.y<=x&&S!==s&&S!==o&&br(a,c,l,u,h,g,S.x,S.y)&&he(S.prev,S,S.next)>=0))return!1;S=S.nextZ}for(;E&&E.z>=v;){if(E.x>=f&&E.x<=_&&E.y>=p&&E.y<=x&&E!==s&&E!==o&&br(a,c,l,u,h,g,E.x,E.y)&&he(E.prev,E,E.next)>=0)return!1;E=E.prevZ}for(;S&&S.z<=w;){if(S.x>=f&&S.x<=_&&S.y>=p&&S.y<=x&&S!==s&&S!==o&&br(a,c,l,u,h,g,S.x,S.y)&&he(S.prev,S,S.next)>=0)return!1;S=S.nextZ}return!0}function cI(i,t,e){var n=i;do{var s=n.prev,r=n.next.next;!Xh(s,r)&&J_(s,n,n.next,r)&&ha(s,r)&&ha(r,s)&&(t.push(s.i/e|0),t.push(n.i/e|0),t.push(r.i/e|0),ca(n),ca(n.next),n=i=r),n=n.next}while(n!==i);return Ws(n)}function uI(i,t,e,n,s,r){var o=i;do{for(var a=o.next.next;a!==o.prev;){if(o.i!==a.i&&vI(o,a)){var l=ty(o,a);o=Ws(o,o.next),l=Ws(l,l.next),la(o,t,e,n,s,r,0),la(l,t,e,n,s,r,0);return}a=a.next}o=o.next}while(o!==i)}function dI(i,t,e,n){var s=[],r,o,a,l,h;for(r=0,o=t.length;r=e.next.y&&e.next.y!==e.y){var a=e.x+(s-e.y)*(e.next.x-e.x)/(e.next.y-e.y);if(a<=n&&a>r&&(r=a,o=e.x=e.x&&e.x>=h&&n!==e.x&&br(so.x||e.x===o.x&&mI(o,e)))&&(o=e,u=g)),e=e.next;while(e!==l);return o}function mI(i,t){return he(i.prev,i,t.prev)<0&&he(t.next,i,i.next)<0}function _I(i,t,e,n){var s=i;do s.z===0&&(s.z=vu(s.x,s.y,t,e,n)),s.prevZ=s.prev,s.nextZ=s.next,s=s.next;while(s!==i);s.prevZ.nextZ=null,s.prevZ=null,yI(s)}function yI(i){var t,e,n,s,r,o,a,l,h=1;do{for(e=i,i=null,r=null,o=0;e;){for(o++,n=e,a=0,t=0;t0||l>0&&n;)a!==0&&(l===0||!n||e.z<=n.z)?(s=e,e=e.nextZ,a--):(s=n,n=n.nextZ,l--),r?r.nextZ=s:i=s,s.prevZ=r,r=s;e=n}r.nextZ=null,h*=2}while(o>1);return i}function vu(i,t,e,n,s){return i=(i-e)*s|0,t=(t-n)*s|0,i=(i|i<<8)&16711935,i=(i|i<<4)&252645135,i=(i|i<<2)&858993459,i=(i|i<<1)&1431655765,t=(t|t<<8)&16711935,t=(t|t<<4)&252645135,t=(t|t<<2)&858993459,t=(t|t<<1)&1431655765,i|t<<1}function xI(i){var t=i,e=i;do(t.x=(i-o)*(r-a)&&(i-o)*(n-a)>=(e-o)*(t-a)&&(e-o)*(r-a)>=(s-o)*(n-a)}function vI(i,t){return i.next.i!==t.i&&i.prev.i!==t.i&&!wI(i,t)&&(ha(i,t)&&ha(t,i)&&bI(i,t)&&(he(i.prev,i,t.prev)||he(i,t.prev,t))||Xh(i,t)&&he(i.prev,i,i.next)>0&&he(t.prev,t,t.next)>0)}function he(i,t,e){return(t.y-i.y)*(e.x-t.x)-(t.x-i.x)*(e.y-t.y)}function Xh(i,t){return i.x===t.x&&i.y===t.y}function J_(i,t,e,n){var s=dl(he(i,t,e)),r=dl(he(i,t,n)),o=dl(he(e,n,i)),a=dl(he(e,n,t));return!!(s!==r&&o!==a||s===0&&ul(i,e,t)||r===0&&ul(i,n,t)||o===0&&ul(e,i,n)||a===0&&ul(e,t,n))}function ul(i,t,e){return t.x<=Math.max(i.x,e.x)&&t.x>=Math.min(i.x,e.x)&&t.y<=Math.max(i.y,e.y)&&t.y>=Math.min(i.y,e.y)}function dl(i){return i>0?1:i<0?-1:0}function wI(i,t){var e=i;do{if(e.i!==i.i&&e.next.i!==i.i&&e.i!==t.i&&e.next.i!==t.i&&J_(e,e.next,i,t))return!0;e=e.next}while(e!==i);return!1}function ha(i,t){return he(i.prev,i,i.next)<0?he(i,t,i.next)>=0&&he(i,i.prev,t)>=0:he(i,t,i.prev)<0||he(i,i.next,t)<0}function bI(i,t){var e=i,n=!1,s=(i.x+t.x)/2,r=(i.y+t.y)/2;do e.y>r!=e.next.y>r&&e.next.y!==e.y&&s<(e.next.x-e.x)*(r-e.y)/(e.next.y-e.y)+e.x&&(n=!n),e=e.next;while(e!==i);return n}function ty(i,t){var e=new wu(i.i,i.x,i.y),n=new wu(t.i,t.x,t.y),s=i.next,r=t.prev;return i.next=t,t.prev=i,e.next=s,s.prev=e,n.next=e,e.prev=n,r.next=n,n.prev=r,n}function Up(i,t,e,n){var s=new wu(i,t,e);return n?(s.next=n.next,s.prev=n,n.next.prev=s,n.next=s):(s.prev=s,s.next=s),s}function ca(i){i.next.prev=i.prev,i.prev.next=i.next,i.prevZ&&(i.prevZ.nextZ=i.nextZ),i.nextZ&&(i.nextZ.prevZ=i.prevZ)}function wu(i,t,e){this.i=i,this.x=t,this.y=e,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}qh.deviation=function(i,t,e,n){var s=t&&t.length,r=s?t[0]*e:i.length,o=Math.abs(bu(i,0,r,e));if(s)for(var a=0,l=t.length;a0&&(n+=i[s-1].length,e.holes.push(n))}return e};const Bp=.985;function EI(i,t){t=t||[];const e=256,n=e-1;return t[0]=Math.floor(i/e/e/e)/n,t[1]=Math.floor(i/e/e)%e/n,t[2]=Math.floor(i/e)%e/n,t[3]=i%e/n,t}function SI(i){let t=0;const e=256,n=e-1;return t+=Math.round(i[0]*e*e*e*n),t+=Math.round(i[1]*e*e*n),t+=Math.round(i[2]*e*n),t+=Math.round(i[3]*n),t}function TI(){const i='const e="GENERATE_POLYGON_BUFFERS",t="GENERATE_POINT_BUFFERS",n="GENERATE_LINE_STRING_BUFFERS";function r(e,t){const n=t[0],r=t[1];return t[0]=e[0]*n+e[2]*r+e[4],t[1]=e[1]*n+e[3]*r+e[5],t}function x(e,t){const n=(r=t)[0]*r[3]-r[1]*r[2];var r;!function(e,t){if(!e)throw new Error(t)}(0!==n,"Transformation matrix cannot be inverted");const x=t[0],i=t[1],u=t[2],o=t[3],f=t[4],s=t[5];return e[0]=o/n,e[1]=-i/n,e[2]=-u/n,e[3]=x/n,e[4]=(u*s-o*f)/n,e[5]=-(x*s-i*f)/n,e}function i(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}new Array(6);var u={exports:{}};function o(e,t,n){n=n||2;var r,x,i,u,o,s,l,v=t&&t.length,h=v?t[0]*n:e.length,c=f(e,0,h,n,!0),g=[];if(!c||c.next===c.prev)return g;if(v&&(c=function(e,t,n,r){var x,i,u,o=[];for(x=0,i=t.length;x80*n){r=i=e[0],x=u=e[1];for(var b=n;bi&&(i=o),s>u&&(u=s);l=0!==(l=Math.max(i-r,u-x))?32767/l:0}return a(c,g,n,r,x,l,0),g}function f(e,t,n,r,x){var i,u;if(x===O(e,t,n,r)>0)for(i=t;i=t;i-=r)u=P(i,e[i],e[i+1],u);return u&&m(u,u.next)&&(B(u),u=u.next),u}function s(e,t){if(!e)return e;t||(t=e);var n,r=e;do{if(n=!1,r.steiner||!m(r,r.next)&&0!==w(r.prev,r,r.next))r=r.next;else{if(B(r),(r=t=r.prev)===r.next)break;n=!0}}while(n||r!==t);return t}function a(e,t,n,r,x,i,u){if(e){!u&&i&&function(e,t,n,r){var x=e;do{0===x.z&&(x.z=b(x.x,x.y,t,n,r)),x.prevZ=x.prev,x.nextZ=x.next,x=x.next}while(x!==e);x.prevZ.nextZ=null,x.prevZ=null,function(e){var t,n,r,x,i,u,o,f,s=1;do{for(n=e,e=null,i=null,u=0;n;){for(u++,r=n,o=0,t=0;t0||f>0&&r;)0!==o&&(0===f||!r||n.z<=r.z)?(x=n,n=n.nextZ,o--):(x=r,r=r.nextZ,f--),i?i.nextZ=x:e=x,x.prevZ=i,i=x;n=r}i.nextZ=null,s*=2}while(u>1)}(x)}(e,r,x,i);for(var o,f,p=e;e.prev!==e.next;)if(o=e.prev,f=e.next,i?v(e,r,x,i):l(e))t.push(o.i/n|0),t.push(e.i/n|0),t.push(f.i/n|0),B(e),e=f.next,p=f.next;else if((e=f)===p){u?1===u?a(e=h(s(e),t,n),t,n,r,x,i,2):2===u&&c(e,t,n,r,x,i):a(s(e),t,n,r,x,i,1);break}}}function l(e){var t=e.prev,n=e,r=e.next;if(w(t,n,r)>=0)return!1;for(var x=t.x,i=n.x,u=r.x,o=t.y,f=n.y,s=r.y,a=xi?x>u?x:u:i>u?i:u,h=o>f?o>s?o:s:f>s?f:s,c=r.next;c!==t;){if(c.x>=a&&c.x<=v&&c.y>=l&&c.y<=h&&M(x,o,i,f,u,s,c.x,c.y)&&w(c.prev,c,c.next)>=0)return!1;c=c.next}return!0}function v(e,t,n,r){var x=e.prev,i=e,u=e.next;if(w(x,i,u)>=0)return!1;for(var o=x.x,f=i.x,s=u.x,a=x.y,l=i.y,v=u.y,h=of?o>s?o:s:f>s?f:s,y=a>l?a>v?a:v:l>v?l:v,g=b(h,c,t,n,r),d=b(p,y,t,n,r),Z=e.prevZ,m=e.nextZ;Z&&Z.z>=g&&m&&m.z<=d;){if(Z.x>=h&&Z.x<=p&&Z.y>=c&&Z.y<=y&&Z!==x&&Z!==u&&M(o,a,f,l,s,v,Z.x,Z.y)&&w(Z.prev,Z,Z.next)>=0)return!1;if(Z=Z.prevZ,m.x>=h&&m.x<=p&&m.y>=c&&m.y<=y&&m!==x&&m!==u&&M(o,a,f,l,s,v,m.x,m.y)&&w(m.prev,m,m.next)>=0)return!1;m=m.nextZ}for(;Z&&Z.z>=g;){if(Z.x>=h&&Z.x<=p&&Z.y>=c&&Z.y<=y&&Z!==x&&Z!==u&&M(o,a,f,l,s,v,Z.x,Z.y)&&w(Z.prev,Z,Z.next)>=0)return!1;Z=Z.prevZ}for(;m&&m.z<=d;){if(m.x>=h&&m.x<=p&&m.y>=c&&m.y<=y&&m!==x&&m!==u&&M(o,a,f,l,s,v,m.x,m.y)&&w(m.prev,m,m.next)>=0)return!1;m=m.nextZ}return!0}function h(e,t,n){var r=e;do{var x=r.prev,i=r.next.next;!m(x,i)&&A(x,r,r.next,i)&&z(x,i)&&z(i,x)&&(t.push(x.i/n|0),t.push(r.i/n|0),t.push(i.i/n|0),B(r),B(r.next),r=e=i),r=r.next}while(r!==e);return s(r)}function c(e,t,n,r,x,i){var u=e;do{for(var o=u.next.next;o!==u.prev;){if(u.i!==o.i&&Z(u,o)){var f=F(u,o);return u=s(u,u.next),f=s(f,f.next),a(u,t,n,r,x,i,0),void a(f,t,n,r,x,i,0)}o=o.next}u=u.next}while(u!==e)}function p(e,t){return e.x-t.x}function y(e,t){var n=function(e,t){var n,r=t,x=e.x,i=e.y,u=-1/0;do{if(i<=r.y&&i>=r.next.y&&r.next.y!==r.y){var o=r.x+(i-r.y)*(r.next.x-r.x)/(r.next.y-r.y);if(o<=x&&o>u&&(u=o,n=r.x=r.x&&r.x>=a&&x!==r.x&&M(in.x||r.x===n.x&&g(n,r)))&&(n=r,v=f)),r=r.next}while(r!==s);return n}(e,t);if(!n)return t;var r=F(n,e);return s(r,r.next),s(n,n.next)}function g(e,t){return w(e.prev,e,t.prev)<0&&w(t.next,e,e.next)<0}function b(e,t,n,r,x){return(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=(e-n)*x|0)|e<<8))|e<<4))|e<<2))|e<<1))|(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=(t-r)*x|0)|t<<8))|t<<4))|t<<2))|t<<1))<<1}function d(e){var t=e,n=e;do{(t.x=(e-u)*(i-o)&&(e-u)*(r-o)>=(n-u)*(t-o)&&(n-u)*(i-o)>=(x-u)*(r-o)}function Z(e,t){return e.next.i!==t.i&&e.prev.i!==t.i&&!function(e,t){var n=e;do{if(n.i!==e.i&&n.next.i!==e.i&&n.i!==t.i&&n.next.i!==t.i&&A(n,n.next,e,t))return!0;n=n.next}while(n!==e);return!1}(e,t)&&(z(e,t)&&z(t,e)&&function(e,t){var n=e,r=!1,x=(e.x+t.x)/2,i=(e.y+t.y)/2;do{n.y>i!=n.next.y>i&&n.next.y!==n.y&&x<(n.next.x-n.x)*(i-n.y)/(n.next.y-n.y)+n.x&&(r=!r),n=n.next}while(n!==e);return r}(e,t)&&(w(e.prev,e,t.prev)||w(e,t.prev,t))||m(e,t)&&w(e.prev,e,e.next)>0&&w(t.prev,t,t.next)>0)}function w(e,t,n){return(t.y-e.y)*(n.x-t.x)-(t.x-e.x)*(n.y-t.y)}function m(e,t){return e.x===t.x&&e.y===t.y}function A(e,t,n,r){var x=I(w(e,t,n)),i=I(w(e,t,r)),u=I(w(n,r,e)),o=I(w(n,r,t));return x!==i&&u!==o||(!(0!==x||!E(e,n,t))||(!(0!==i||!E(e,r,t))||(!(0!==u||!E(n,e,r))||!(0!==o||!E(n,t,r)))))}function E(e,t,n){return t.x<=Math.max(e.x,n.x)&&t.x>=Math.min(e.x,n.x)&&t.y<=Math.max(e.y,n.y)&&t.y>=Math.min(e.y,n.y)}function I(e){return e>0?1:e<0?-1:0}function z(e,t){return w(e.prev,e,e.next)<0?w(e,t,e.next)>=0&&w(e,e.prev,t)>=0:w(e,t,e.prev)<0||w(e,e.next,t)<0}function F(e,t){var n=new _(e.i,e.x,e.y),r=new _(t.i,t.x,t.y),x=e.next,i=t.prev;return e.next=t,t.prev=e,n.next=x,x.prev=n,r.next=n,n.prev=r,i.next=r,r.prev=i,r}function P(e,t,n,r){var x=new _(e,t,n);return r?(x.next=r.next,x.prev=r,r.next.prev=x,r.next=x):(x.prev=x,x.next=x),x}function B(e){e.next.prev=e.prev,e.prev.next=e.next,e.prevZ&&(e.prevZ.nextZ=e.nextZ),e.nextZ&&(e.nextZ.prevZ=e.prevZ)}function _(e,t,n){this.i=e,this.x=t,this.y=n,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}function O(e,t,n,r){for(var x=0,i=t,u=n-r;i0&&(r+=e[x-1].length,n.holes.push(r))}return n};var N=i(u.exports);const R=[],S={vertexPosition:0,indexPosition:0};function T(e,t,n,r,x){e[t+0]=n,e[t+1]=r,e[t+2]=x}function U(e,t,n,r,x,i){const u=3+x,o=e[t+0],f=e[t+1],s=R;s.length=x;for(let n=0;n0?f:2*Math.PI-f}let d=-1,M=-1,Z=l;const w=null!==i;if(null!==x){d=b(y,g,r(s,[...[e[x],e[x+1]]])),Math.cos(d)<=.985&&(Z+=Math.tan((d-Math.PI)/2))}if(w){M=b(g,y,r(s,[...[e[i],e[i+1]]])),Math.cos(M)<=.985&&(Z+=Math.tan((Math.PI-M)/2))}function m(e,t){return 0===t?1e4*e:Math.sign(t)*(1e4*e+Math.abs(t))}return u.push(c[0],c[1],p[0],p[1],d,M,a,m(0,l)),u.push(...f),u.push(c[0],c[1],p[0],p[1],d,M,a,m(1,l)),u.push(...f),u.push(c[0],c[1],p[0],p[1],d,M,a,m(2,l)),u.push(...f),u.push(c[0],c[1],p[0],p[1],d,M,a,m(3,l)),u.push(...f),o.push(h,h+1,h+2,h+1,h+3,h+2),{length:a+Math.sqrt((g[0]-y[0])*(g[0]-y[0])+(g[1]-y[1])*(g[1]-y[1])),angle:Z}}function G(e,t,n,r,x){const i=2+x;let u=t;const o=e.slice(u,u+x);u+=x;const f=e[u++];let s=0;const a=new Array(f-1);for(let t=0;t{const i=r.data;switch(i.type){case t:{const e=3,t=2,n=i.customAttributesSize,r=t+n,x=new Float32Array(i.renderInstructions),u=x.length/r,o=4*u*(n+e),f=new Uint32Array(6*u),s=new Float32Array(o);let a;for(let e=0;e0?c=o+(n-1)*r:l&&(c=i-r);let p=null;n"u"?"data:application/javascript;base64,"+Buffer.from(i,"binary").toString("base64"):URL.createObjectURL(new Blob([i],{type:"application/javascript"})))}function MI(i,t){const e=i.viewState.projection,n=t.getSource().getWrapX()&&e.canWrapX(),s=e.getExtent(),r=i.extent,o=n?yt(s):null,a=n?Math.ceil((r[2]-s[2])/o)+1:1;return[n?Math.floor((r[0]-s[0])/o):0,a,o]}class ey extends Wh{constructor(t,e){const n=e.uniforms||{},s=pe();n[En.PROJECTION_MATRIX]=s,super(t,{uniforms:n,postProcesses:e.postProcesses}),this.sourceRevision_=-1,this.verticesBuffer_=new Vl(Uh,xu),this.indicesBuffer_=new Vl(Bh,xu),this.vertexShader_=e.vertexShader,this.fragmentShader_=e.fragmentShader,this.program_,this.hitDetectionEnabled_=e.hitDetectionEnabled??!0;const r=e.attributes?e.attributes.map(function(a){return{name:"a_prop_"+a.name,size:1,type:tn.FLOAT}}):[];this.attributes=[{name:"a_position",size:2,type:tn.FLOAT},{name:"a_index",size:1,type:tn.FLOAT}],this.hitDetectionEnabled_&&(this.attributes.push({name:"a_prop_hitColor",size:4,type:tn.FLOAT}),this.attributes.push({name:"a_featureUid",size:1,type:tn.FLOAT})),this.attributes.push(...r),this.customAttributes=e.attributes?e.attributes:[],this.previousExtent_=ze(),this.currentTransform_=s,this.renderTransform_=pe(),this.invertRenderTransform_=pe(),this.renderInstructions_=new Float32Array(0),this.hitRenderTarget_,this.lastSentId=0,this.worker_=TI(),this.worker_.addEventListener("message",a=>{const l=a.data;if(l.type===zp.GENERATE_POINT_BUFFERS){const h=l.projectionTransform;this.verticesBuffer_.fromArrayBuffer(l.vertexBuffer),this.helper.flushBufferData(this.verticesBuffer_),this.indicesBuffer_.fromArrayBuffer(l.indexBuffer),this.helper.flushBufferData(this.indicesBuffer_),this.renderTransform_=h,ph(this.invertRenderTransform_,this.renderTransform_),this.renderInstructions_=new Float32Array(a.data.renderInstructions),l.id===this.lastSentId&&(this.ready=!0),this.getLayer().changed()}}),this.featureCache_={},this.featureCount_=0;const o=this.getLayer().getSource();this.sourceListenKeys_=[le(o,ke.ADDFEATURE,this.handleSourceFeatureAdded_,this),le(o,ke.CHANGEFEATURE,this.handleSourceFeatureChanged_,this),le(o,ke.REMOVEFEATURE,this.handleSourceFeatureDelete_,this),le(o,ke.CLEAR,this.handleSourceFeatureClear_,this)],o.forEachFeature(a=>{this.featureCache_[st(a)]={feature:a,properties:a.getProperties(),geometry:a.getGeometry()},this.featureCount_++})}afterHelperCreated(){this.program_=this.helper.getProgram(this.fragmentShader_,this.vertexShader_),this.hitDetectionEnabled_&&(this.hitRenderTarget_=new aI(this.helper))}handleSourceFeatureAdded_(t){const e=t.feature;this.featureCache_[st(e)]={feature:e,properties:e.getProperties(),geometry:e.getGeometry()},this.featureCount_++}handleSourceFeatureChanged_(t){const e=t.feature;this.featureCache_[st(e)]={feature:e,properties:e.getProperties(),geometry:e.getGeometry()}}handleSourceFeatureDelete_(t){const e=t.feature;delete this.featureCache_[st(e)],this.featureCount_--}handleSourceFeatureClear_(){this.featureCache_={},this.featureCount_=0}renderFrame(t){const e=this.helper.getGL();this.preRender(e,t);const[n,s,r]=MI(t,this.getLayer());return this.renderWorlds(t,!1,n,s,r),this.helper.finalizeDraw(t,this.dispatchPreComposeEvent,this.dispatchPostComposeEvent),this.hitDetectionEnabled_&&(this.renderWorlds(t,!0,n,s,r),this.hitRenderTarget_.clearCachedData()),this.postRender(e,t),this.helper.getCanvas()}prepareFrameInternal(t){const e=this.getLayer(),n=e.getSource(),s=t.viewState,r=!t.viewHints[ee.ANIMATING]&&!t.viewHints[ee.INTERACTING],o=!Nn(this.previousExtent_,t.extent),a=this.sourceRevision_t)throw new Error("Tile load sequence violation");this.state=t,this.changed()}load(){ct()}getAlpha(t,e){if(!this.transition_)return 1;let n=this.transitionStarts_[t];if(!n)n=e,this.transitionStarts_[t]=n;else if(n===-1)return 1;const s=e-n+1e3/60;return s>=this.transition_?1:T_(s/this.transition_)}inTransition(t){return this.transition_?this.transitionStarts_[t]!==-1:!1}endTransition(t){this.transition_&&(this.transitionStarts_[t]=-1)}}function Hl(i){return i instanceof Image||i instanceof HTMLCanvasElement||i instanceof HTMLVideoElement||i instanceof ImageBitmap?i:null}function Eu(i){return i instanceof Uint8Array||i instanceof Uint8ClampedArray||i instanceof Float32Array||i instanceof DataView?i:null}let ar=null;function CI(i){ar||(ar=Jt(i.width,i.height,void 0,{willReadFrequently:!0}));const t=ar.canvas,e=i.width;t.width!==e&&(t.width=e);const n=i.height;return t.height!==n&&(t.height=n),ar.clearRect(0,0,e,n),ar.drawImage(i,0,0),ar.getImageData(0,0,e,n).data}const II=[256,256];class Kd extends ao{constructor(t){const e=q.IDLE;super(t.tileCoord,e,{transition:t.transition,interpolate:t.interpolate}),this.loader_=t.loader,this.data_=null,this.error_=null,this.size_=t.size||null}getSize(){if(this.size_)return this.size_;const t=Hl(this.data_);return t?[t.width,t.height]:II}getData(){return this.data_}getError(){return this.error_}load(){if(this.state!==q.IDLE&&this.state!==q.ERROR)return;this.state=q.LOADING,this.changed();const t=this;this.loader_().then(function(e){t.data_=e,t.state=q.LOADED,t.changed()}).catch(function(e){t.error_=e,t.state=q.ERROR,t.changed()})}}const PI=10,Wp=.25;class Qd{constructor(t,e,n,s,r,o){this.sourceProj_=t,this.targetProj_=e;let a={};const l=hn(this.targetProj_,this.sourceProj_);this.transformInv_=function(w){const E=w[0]+"/"+w[1];return a[E]||(a[E]=l(w)),a[E]},this.maxSourceExtent_=s,this.errorThresholdSquared_=r*r,this.triangles_=[],this.wrapsXInSource_=!1,this.canWrapXInSource_=this.sourceProj_.canWrapX()&&!!s&&!!this.sourceProj_.getExtent()&&yt(s)>=yt(this.sourceProj_.getExtent()),this.sourceWorldWidth_=this.sourceProj_.getExtent()?yt(this.sourceProj_.getExtent()):null,this.targetWorldWidth_=this.targetProj_.getExtent()?yt(this.targetProj_.getExtent()):null;const h=zn(n),c=Ea(n),u=mh(n),g=ba(n),f=this.transformInv_(h),p=this.transformInv_(c),_=this.transformInv_(u),x=this.transformInv_(g),v=PI+(o?Math.max(0,Math.ceil(Math.log2(Ko(n)/(o*o*256*256)))):0);if(this.addQuad_(h,c,u,g,f,p,_,x,v),this.wrapsXInSource_){let w=1/0;this.triangles_.forEach(function(E,S,T){w=Math.min(w,E.source[0][0],E.source[1][0],E.source[2][0])}),this.triangles_.forEach(E=>{if(Math.max(E.source[0][0],E.source[1][0],E.source[2][0])-w>this.sourceWorldWidth_/2){const S=[[E.source[0][0],E.source[0][1]],[E.source[1][0],E.source[1][1]],[E.source[2][0],E.source[2][1]]];S[0][0]-w>this.sourceWorldWidth_/2&&(S[0][0]-=this.sourceWorldWidth_),S[1][0]-w>this.sourceWorldWidth_/2&&(S[1][0]-=this.sourceWorldWidth_),S[2][0]-w>this.sourceWorldWidth_/2&&(S[2][0]-=this.sourceWorldWidth_);const T=Math.min(S[0][0],S[1][0],S[2][0]);Math.max(S[0][0],S[1][0],S[2][0])-T.5&&u<1;let p=!1;if(h>0){if(this.targetProj_.isGlobal()&&this.targetWorldWidth_){const x=Dr([t,e,n,s]);p=yt(x)/this.targetWorldWidth_>Wp||p}!f&&this.sourceProj_.isGlobal()&&u&&(p=u>Wp||p)}if(!p&&this.maxSourceExtent_&&isFinite(c[0])&&isFinite(c[1])&&isFinite(c[2])&&isFinite(c[3])&&!Qt(c,this.maxSourceExtent_))return;let _=0;if(!p&&(!isFinite(r[0])||!isFinite(r[1])||!isFinite(o[0])||!isFinite(o[1])||!isFinite(a[0])||!isFinite(a[1])||!isFinite(l[0])||!isFinite(l[1]))){if(h>0)p=!0;else if(_=(!isFinite(r[0])||!isFinite(r[1])?8:0)+(!isFinite(o[0])||!isFinite(o[1])?4:0)+(!isFinite(a[0])||!isFinite(a[1])?2:0)+(!isFinite(l[0])||!isFinite(l[1])?1:0),_!=1&&_!=2&&_!=4&&_!=8)return}if(h>0){if(!p){const x=[(t[0]+n[0])/2,(t[1]+n[1])/2],v=this.transformInv_(x);let w;f?w=(an(r[0],g)+an(a[0],g))/2-an(v[0],g):w=(r[0]+a[0])/2-v[0];const E=(r[1]+a[1])/2-v[1];p=w*w+E*E>this.errorThresholdSquared_}if(p){if(Math.abs(t[0]-n[0])<=Math.abs(t[1]-n[1])){const x=[(e[0]+n[0])/2,(e[1]+n[1])/2],v=this.transformInv_(x),w=[(s[0]+t[0])/2,(s[1]+t[1])/2],E=this.transformInv_(w);this.addQuad_(t,e,x,w,r,o,v,E,h-1),this.addQuad_(w,x,n,s,E,v,a,l,h-1)}else{const x=[(t[0]+e[0])/2,(t[1]+e[1])/2],v=this.transformInv_(x),w=[(n[0]+s[0])/2,(n[1]+s[1])/2],E=this.transformInv_(w);this.addQuad_(t,x,w,s,r,v,E,l,h-1),this.addQuad_(x,e,n,w,v,o,a,E,h-1)}return}}if(f){if(!this.canWrapXInSource_)return;this.wrapsXInSource_=!0}_&11||this.addTriangle_(t,n,s,r,a,l),_&14||this.addTriangle_(t,n,e,r,a,o),_&&(_&13||this.addTriangle_(e,s,t,o,l,r),_&7||this.addTriangle_(e,s,n,o,l,a))}calculateSourceExtent(){const t=ze();return this.triangles_.forEach(function(e,n,s){const r=e.source;No(t,r[0]),No(t,r[1]),No(t,r[2])}),t}getTriangles(){return this.triangles_}}let Ic;const On=[];function qp(i,t,e,n,s){i.beginPath(),i.moveTo(0,0),i.lineTo(t,e),i.lineTo(n,s),i.closePath(),i.save(),i.clip(),i.fillRect(0,0,Math.max(t,n)+1,Math.max(e,s)),i.restore()}function Pc(i,t){return Math.abs(i[t*4]-210)>2||Math.abs(i[t*4+3]-.75*255)>2}function AI(){if(Ic===void 0){const i=Jt(6,6,On);i.globalCompositeOperation="lighter",i.fillStyle="rgba(210, 0, 0, 0.75)",qp(i,4,5,4,0),qp(i,4,5,0,5);const t=i.getImageData(0,0,3,3).data;Ic=Pc(t,0)||Pc(t,4)||Pc(t,8),Us(i),On.push(i.canvas)}return Ic}function ua(i,t,e,n){const s=_h(e,t,i);let r=vf(t,n,e);const o=t.getMetersPerUnit();o!==void 0&&(r*=o);const a=i.getMetersPerUnit();a!==void 0&&(r/=a);const l=i.getExtent();if(!l||xi(l,s)){const h=vf(i,r,s)/r;isFinite(h)&&h>0&&(r/=h)}return r}function iy(i,t,e,n){const s=Ce(e);let r=ua(i,t,s,n);return(!isFinite(r)||r<=0)&&Km(e,function(o){return r=ua(i,t,o,n),isFinite(r)&&r>0}),r}function Jd(i,t,e,n,s,r,o,a,l,h,c,u,g,f){const p=Jt(Math.round(e*i),Math.round(e*t),On);if(u||(p.imageSmoothingEnabled=!1),l.length===0)return p.canvas;p.scale(e,e);function _(T){return Math.round(T*e)/e}p.globalCompositeOperation="lighter";const x=ze();l.forEach(function(T,R,C){Ym(x,T.extent)});let v;const w=e/n,E=(u?1:1+Math.pow(2,-24))/w;if(!g||l.length!==1||h!==0){if(v=Jt(Math.round(yt(x)*w),Math.round(Vt(x)*w),On),u||(v.imageSmoothingEnabled=!1),s&&f){const T=(s[0]-x[0])*w,R=-(s[3]-x[3])*w,C=yt(s)*w,P=Vt(s)*w;v.rect(T,R,C,P),v.clip()}l.forEach(function(T,R,C){const P=(T.extent[0]-x[0])*w,N=-(T.extent[3]-x[3])*w,U=yt(T.extent)*w,j=Vt(T.extent)*w;T.image.width>0&&T.image.height>0&&v.drawImage(T.image,h,h,T.image.width-2*h,T.image.height-2*h,u?P:Math.round(P),u?N:Math.round(N),u?U:Math.round(P+U)-Math.round(P),u?j:Math.round(N+j)-Math.round(N))})}const S=zn(o);return a.getTriangles().forEach(function(T,R,C){const P=T.source,N=T.target;let U=P[0][0],j=P[0][1],B=P[1][0],d=P[1][1],m=P[2][0],y=P[2][1];const b=_((N[0][0]-S[0])/r),M=_(-(N[0][1]-S[1])/r),I=_((N[1][0]-S[0])/r),A=_(-(N[1][1]-S[1])/r),L=_((N[2][0]-S[0])/r),k=_(-(N[2][1]-S[1])/r),W=U,K=j;U=0,j=0,B-=W,d-=K,m-=W,y-=K;const G=[[B,d,0,0,I-b],[m,y,0,0,L-b],[0,0,B,d,A-M],[0,0,m,y,k-M]],H=fv(G);if(!H)return;if(p.save(),p.beginPath(),AI()||!u){p.moveTo(I,A);const nt=4,xt=b-I,dt=M-A;for(let Tt=0;TtPromise.resolve(new Uint8Array(4)),interpolate:t.interpolate,transition:t.transition}),this.pixelRatio_=t.pixelRatio,this.gutter_=t.gutter,this.reprojData_=null,this.reprojError_=null,this.reprojSize_=void 0,this.sourceTileGrid_=t.sourceTileGrid,this.targetTileGrid_=t.targetTileGrid,this.wrappedTileCoord_=t.wrappedTileCoord||t.tileCoord,this.sourceTiles_=[],this.sourcesListenerKeys_=null,this.sourceZ_=0;const e=this.targetTileGrid_.getTileCoordExtent(this.wrappedTileCoord_),n=this.targetTileGrid_.getExtent();let s=this.sourceTileGrid_.getExtent();const r=n?we(e,n):e;if(Ko(r)===0){this.state=q.EMPTY;return}const o=t.sourceProj,a=o.getExtent();a&&(s?s=we(s,a):s=a);const l=this.targetTileGrid_.getResolution(this.wrappedTileCoord_[0]),h=t.targetProj,c=iy(o,h,r,l);if(!isFinite(c)||c<=0){this.state=q.EMPTY;return}const u=t.errorThreshold!==void 0?t.errorThreshold:Hd;if(this.triangulation_=new Qd(o,h,r,s,c*u,l),this.triangulation_.getTriangles().length===0){this.state=q.EMPTY;return}this.sourceZ_=this.sourceTileGrid_.getZForResolution(c);let g=this.triangulation_.calculateSourceExtent();if(s&&(o.canWrapX()?(g[1]=wt(g[1],s[1],s[3]),g[3]=wt(g[3],s[1],s[3])):g=we(g,s)),!Ko(g))this.state=q.EMPTY;else{const f=this.sourceTileGrid_.getTileRangeForExtentAndZ(g,this.sourceZ_),p=t.getTileFunction;for(let _=f.minX;_<=f.maxX;_++)for(let x=f.minY;x<=f.maxY;x++){const v=p(this.sourceZ_,_,x,this.pixelRatio_);v&&this.sourceTiles_.push(v)}this.sourceTiles_.length===0&&(this.state=q.EMPTY)}}getSize(){return this.reprojSize_}getData(){return this.reprojData_}getError(){return this.reprojError_}reproject_(){const t=[];if(this.sourceTiles_.forEach(e=>{if(!e||e.getState()!==q.LOADED)return;const n=e.getSize(),s=this.gutter_;let r;const o=Eu(e.getData());o?r=o:r=CI(Hl(e.getData()));const a=[n[0]+2*s,n[1]+2*s],l=r instanceof Float32Array,h=a[0]*a[1],c=l?Float32Array:Uint8Array,u=new c(r.buffer),g=c.BYTES_PER_ELEMENT,f=g*u.length/h,p=u.byteLength/a[1],_=Math.floor(p/g/a[0]),x=h*_;let v=u;if(u.length!==x){v=new c(x);let w=0,E=0;const S=a[0]*_;for(let T=0;T=0;--f){const p=[];for(let S=0,T=t.length;S{const n=e.getState();if(n!==q.IDLE&&n!==q.LOADING)return;t++;const s=le(e,Lt.CHANGE,function(){const r=e.getState();(r==q.LOADED||r==q.ERROR||r==q.EMPTY)&&(ve(s),t--,t===0&&(this.unlistenSources_(),this.reproject_()))},this);this.sourcesListenerKeys_.push(s)}),t===0?setTimeout(this.reproject_.bind(this),0):this.sourceTiles_.forEach(function(e){e.getState()==q.IDLE&&e.load()})}unlistenSources_(){this.sourcesListenerKeys_.forEach(ve),this.sourcesListenerKeys_=null}}class Xr extends ao{constructor(t,e,n,s,r,o,a,l,h,c,u,g){super(r,q.IDLE,g),this.renderEdges_=u!==void 0?u:!1,this.pixelRatio_=a,this.gutter_=l,this.canvas_=null,this.sourceTileGrid_=e,this.targetTileGrid_=s,this.wrappedTileCoord_=o||r,this.sourceTiles_=[],this.sourcesListenerKeys_=null,this.sourceZ_=0;const f=s.getTileCoordExtent(this.wrappedTileCoord_),p=this.targetTileGrid_.getExtent();let _=this.sourceTileGrid_.getExtent();const x=p?we(f,p):f;if(Ko(x)===0){this.state=q.EMPTY;return}const v=t.getExtent();v&&(_?_=we(_,v):_=v);const w=s.getResolution(this.wrappedTileCoord_[0]),E=iy(t,n,x,w);if(!isFinite(E)||E<=0){this.state=q.EMPTY;return}const S=c!==void 0?c:Hd;if(this.triangulation_=new Qd(t,n,x,_,E*S,w),this.triangulation_.getTriangles().length===0){this.state=q.EMPTY;return}this.sourceZ_=e.getZForResolution(E);let T=this.triangulation_.calculateSourceExtent();if(_&&(t.canWrapX()?(T[1]=wt(T[1],_[1],_[3]),T[3]=wt(T[3],_[1],_[3])):T=we(T,_)),!Ko(T))this.state=q.EMPTY;else{const R=e.getTileRangeForExtentAndZ(T,this.sourceZ_);for(let C=R.minX;C<=R.maxX;C++)for(let P=R.minY;P<=R.maxY;P++){const N=h(this.sourceZ_,C,P,a);N&&this.sourceTiles_.push(N)}this.sourceTiles_.length===0&&(this.state=q.EMPTY)}}getImage(){return this.canvas_}reproject_(){const t=[];if(this.sourceTiles_.forEach(e=>{e&&e.getState()==q.LOADED&&t.push({extent:this.sourceTileGrid_.getTileCoordExtent(e.tileCoord),image:e.getImage()})}),this.sourceTiles_.length=0,t.length===0)this.state=q.ERROR;else{const e=this.wrappedTileCoord_[0],n=this.targetTileGrid_.getTileSize(e),s=typeof n=="number"?n:n[0],r=typeof n=="number"?n:n[1],o=this.targetTileGrid_.getResolution(e),a=this.sourceTileGrid_.getResolution(this.sourceZ_),l=this.targetTileGrid_.getTileCoordExtent(this.wrappedTileCoord_);this.canvas_=Jd(s,r,this.pixelRatio_,a,this.sourceTileGrid_.getExtent(),o,l,this.triangulation_,t,this.gutter_,this.renderEdges_,this.interpolate),this.state=q.LOADED}this.changed()}load(){if(this.state==q.IDLE){this.state=q.LOADING,this.changed();let t=0;this.sourcesListenerKeys_=[],this.sourceTiles_.forEach(e=>{const n=e.getState();if(n==q.IDLE||n==q.LOADING){t++;const s=le(e,Lt.CHANGE,function(r){const o=e.getState();(o==q.LOADED||o==q.ERROR||o==q.EMPTY)&&(ve(s),t--,t===0&&(this.unlistenSources_(),this.reproject_()))},this);this.sourcesListenerKeys_.push(s)}}),t===0?setTimeout(this.reproject_.bind(this),0):this.sourceTiles_.forEach(function(e,n,s){e.getState()==q.IDLE&&e.load()})}}unlistenSources_(){this.sourcesListenerKeys_.forEach(ve),this.sourcesListenerKeys_=null}release(){this.canvas_&&(Us(this.canvas_.getContext("2d")),On.push(this.canvas_),this.canvas_=null),super.release()}}class Da extends ao{constructor(t,e,n,s,r,o){super(t,e,o),this.crossOrigin_=s,this.src_=n,this.key=n,this.image_=new Image,s!==null&&(this.image_.crossOrigin=s),this.unlisten_=null,this.tileLoadFunction_=r}getImage(){return this.image_}setImage(t){this.image_=t,this.state=q.LOADED,this.unlistenImage_(),this.changed()}handleImageError_(){this.state=q.ERROR,this.unlistenImage_(),this.image_=LI(),this.changed()}handleImageLoad_(){const t=this.image_;t.naturalWidth&&t.naturalHeight?this.state=q.LOADED:this.state=q.EMPTY,this.unlistenImage_(),this.changed()}load(){this.state==q.ERROR&&(this.state=q.IDLE,this.image_=new Image,this.crossOrigin_!==null&&(this.image_.crossOrigin=this.crossOrigin_)),this.state==q.IDLE&&(this.state=q.LOADING,this.changed(),this.tileLoadFunction_(this,this.src_),this.unlisten_=qb(this.image_,this.handleImageLoad_.bind(this),this.handleImageError_.bind(this)))}unlistenImage_(){this.unlisten_&&(this.unlisten_(),this.unlisten_=null)}}function LI(){const i=Jt(1,1);return i.fillStyle="rgba(0,0,0,0)",i.fillRect(0,0,1,1),i.canvas}class OI extends xa{constructor(t){super(),this.tile,this.handleTileChange_=this.handleTileChange_.bind(this),this.gutter_=t.gutter||0,this.helper_=t.helper,this.loaded=!1,this.ready=!1}setTile(t){if(t!==this.tile)if(this.tile&&this.tile.removeEventListener(Lt.CHANGE,this.handleTileChange_),this.tile=t,this.loaded=t.getState()===q.LOADED,this.loaded)this.uploadTile();else{if(t instanceof Da){const e=t.getImage();e instanceof Image&&!e.crossOrigin&&(e.crossOrigin="anonymous")}t.addEventListener(Lt.CHANGE,this.handleTileChange_)}}uploadTile(){ct()}setReady(){this.ready=!0,this.dispatchEvent(Lt.CHANGE)}handleTileChange_(){this.tile.getState()===q.LOADED&&(this.loaded=!0,this.uploadTile())}disposeInternal(){this.tile.removeEventListener(Lt.CHANGE,this.handleTileChange_)}}function ny(i,t,e){const n=e?i.LINEAR:i.NEAREST;i.bindTexture(i.TEXTURE_2D,t),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_WRAP_S,i.CLAMP_TO_EDGE),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_WRAP_T,i.CLAMP_TO_EDGE),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MIN_FILTER,n),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MAG_FILTER,n)}function FI(i,t,e,n){ny(i,t,n),i.texImage2D(i.TEXTURE_2D,0,i.RGBA,i.RGBA,i.UNSIGNED_BYTE,e)}function Xp(i,t,e,n,s,r){const o=i.getGL();let a,l;e instanceof Float32Array?(a=o.FLOAT,i.getExtension("OES_texture_float"),l=i.getExtension("OES_texture_float_linear")!==null):(a=o.UNSIGNED_BYTE,l=!0),ny(o,t,r&&l);const h=e.byteLength/n[1];let c=1;h%8===0?c=8:h%4===0?c=4:h%2===0&&(c=2);let u;switch(s){case 1:{u=o.LUMINANCE;break}case 2:{u=o.LUMINANCE_ALPHA;break}case 3:{u=o.RGB;break}case 4:{u=o.RGBA;break}default:throw new Error(`Unsupported number of bands: ${s}`)}const g=o.getParameter(o.UNPACK_ALIGNMENT);o.pixelStorei(o.UNPACK_ALIGNMENT,c),o.texImage2D(o.TEXTURE_2D,0,u,n[0],n[1],0,u,a,e),o.pixelStorei(o.UNPACK_ALIGNMENT,g)}let mr=null;function NI(){mr=Jt(1,1,void 0,{willReadFrequently:!0})}class kI extends OI{constructor(t){super(t),this.textures=[],this.renderSize_=se(t.grid.getTileSize(t.tile.tileCoord[0])),this.bandCount=NaN;const e=new Vl(Uh,Yd);e.fromArray([0,1,1,1,1,0,0,0]),this.helper_.flushBufferData(e),this.coords=e,this.setTile(t.tile)}uploadTile(){const t=this.helper_,e=t.getGL(),n=this.tile;this.textures.length=0;let s;n instanceof Da||n instanceof Xr?s=n.getImage():s=n.getData();const r=Hl(s);if(r){const w=e.createTexture();this.textures.push(w),this.bandCount=4,FI(e,w,r,n.interpolate),this.setReady();return}s=Eu(s);const o=n.getSize(),a=[o[0]+2*this.gutter_,o[1]+2*this.gutter_],l=s instanceof Float32Array,h=a[0]*a[1],c=l?Float32Array:Uint8Array,u=c.BYTES_PER_ELEMENT,g=s.byteLength/a[1];this.bandCount=Math.floor(g/u/a[0]);const f=Math.ceil(this.bandCount/4);if(f===1){const w=e.createTexture();this.textures.push(w),Xp(t,w,s,a,this.bandCount,n.interpolate),this.setReady();return}const p=new Array(f);for(let w=0;w0&&this.getCount()>this.highWaterMark}expireCache(t){for(;this.canExpireCache();)this.pop()}clear(){this.count_=0,this.entries_={},this.oldest_=null,this.newest_=null}containsKey(t){return this.entries_.hasOwnProperty(t)}forEach(t){let e=this.oldest_;for(;e;)t(e.value_,e.key_,this),e=e.newer}get(t,e){const n=this.entries_[t];return At(n!==void 0,"Tried to get a value for a key that does not exist in the cache"),n===this.newest_||(n===this.oldest_?(this.oldest_=this.oldest_.newer,this.oldest_.older=null):(n.newer.older=n.older,n.older.newer=n.newer),n.newer=null,n.older=this.newest_,this.newest_.newer=n,this.newest_=n),n.value_}remove(t){const e=this.entries_[t];return At(e!==void 0,"Tried to get a value for a key that does not exist in the cache"),e===this.newest_?(this.newest_=e.older,this.newest_&&(this.newest_.newer=null)):e===this.oldest_?(this.oldest_=e.newer,this.oldest_&&(this.oldest_.older=null)):(e.newer.older=e.older,e.older.newer=e.newer),delete this.entries_[t],--this.count_,e.value_}getCount(){return this.count_}getKeys(){const t=new Array(this.count_);let e=0,n;for(n=this.newest_;n;n=n.older)t[e++]=n.key_;return t}getValues(){const t=new Array(this.count_);let e=0,n;for(n=this.newest_;n;n=n.older)t[e++]=n.value_;return t}peekLast(){return this.oldest_.value_}peekLastKey(){return this.oldest_.key_}peekFirstKey(){return this.newest_.key_}peek(t){var e;return(e=this.entries_[t])==null?void 0:e.value_}pop(){const t=this.oldest_;return delete this.entries_[t.key_],t.newer&&(t.newer.older=null),this.oldest_=t.newer,this.oldest_||(this.newest_=null),--this.count_,t.value_}replace(t,e){this.get(t),this.entries_[t].value_=e}set(t,e){At(!(t in this.entries_),"Tried to set a value for a key that is used already");const n={key_:t,newer:null,older:this.newest_,value_:e};this.newest_?this.newest_.newer=n:this.oldest_=n,this.newest_=n,this.entries_[t]=n,++this.count_}setSize(t){this.highWaterMark=t}}class Zh{constructor(t,e,n,s){this.minX=t,this.maxX=e,this.minY=n,this.maxY=s}contains(t){return this.containsXY(t[1],t[2])}containsTileRange(t){return this.minX<=t.minX&&t.maxX<=this.maxX&&this.minY<=t.minY&&t.maxY<=this.maxY}containsXY(t,e){return this.minX<=t&&t<=this.maxX&&this.minY<=e&&e<=this.maxY}equals(t){return this.minX==t.minX&&this.minY==t.minY&&this.maxX==t.maxX&&this.maxY==t.maxY}extend(t){t.minXthis.maxX&&(this.maxX=t.maxX),t.minYthis.maxY&&(this.maxY=t.maxY)}getHeight(){return this.maxY-this.minY+1}getSize(){return[this.getWidth(),this.getHeight()]}getWidth(){return this.maxX-this.minX+1}intersects(t){return this.minX<=t.maxX&&this.maxX>=t.minX&&this.minY<=t.maxY&&this.maxY>=t.minY}}function lr(i,t,e,n,s){return s!==void 0?(s.minX=i,s.maxX=t,s.minY=e,s.maxY=n,s):new Zh(i,t,e,n)}function da(i,t,e,n){return n!==void 0?(n[0]=i,n[1]=t,n[2]=e,n):[i,t,e]}function un(i,t,e){return i+"/"+t+"/"+e}function es(i){return un(i[0],i[1],i[2])}function DI(i){const[t,e,n]=i.substring(i.lastIndexOf("/")+1,i.length).split(",").map(Number);return un(t,e,n)}function sy(i){return i.split("/").map(Number)}function ig(i){return(i[1]<e||e>t.getMaxZoom())return!1;const r=t.getFullTileRange(e);return r?r.containsXY(n,s):!0}const jI={TILE_TRANSFORM:"u_tileTransform",TRANSITION_ALPHA:"u_transitionAlpha",DEPTH:"u_depth",RENDER_EXTENT:"u_renderExtent",PATTERN_ORIGIN:"u_patternOrigin",RESOLUTION:"u_resolution",ZOOM:"u_zoom",GLOBAL_ALPHA:"u_globalAlpha",PROJECTION_MATRIX:"u_projectionMatrix",SCREEN_TO_WORLD_MATRIX:"u_screenToWorldMatrix"},zI={};function Zp(i){return 1/(i+2)}function UI(){return{tileIds:new Set,representationsByZ:{}}}function $p(i,t){return i.tileIds.has(st(t))}function Vp(i,t,e){const n=i.representationsByZ;e in n||(n[e]=new Set),n[e].add(t),i.tileIds.add(st(t.tile))}function Ac(i,t){const e=i.layerStatesArray[i.layerIndex];e.extent&&(t=we(t,Gi(e.extent,i.viewState.projection)));const n=e.layer.getRenderSource();if(!n.getWrapX()){const s=n.getTileGridForProjection(i.viewState.projection).getExtent();s&&(t=we(t,s))}return t}function Su(i,t){return`${i.getKey()},${es(t)}`}class BI extends Wh{constructor(t,e){super(t,{uniforms:e.uniforms,postProcesses:e.postProcesses}),this.renderComplete=!1,this.tileTransform_=pe(),this.tempMat4=V_(),this.tempTileRange_=new Zh(0,0,0,0),this.tempTileCoord_=da(0,0,0),this.tempSize_=[0,0];const n=e.cacheSize!==void 0?e.cacheSize:512;this.tileRepresentationCache=new eg(n),this.frameState=null,this.projection_=void 0}reset(t){super.reset({uniforms:t.uniforms})}isDrawableTile_(t){const e=this.getLayer(),n=t.getState(),s=e.getUseInterimTilesOnError();return n==q.LOADED||n==q.EMPTY||n==q.ERROR&&!s}prepareFrameInternal(t){this.projection_?t.viewState.projection!==this.projection_&&(this.clearCache(),this.projection_=t.viewState.projection):this.projection_=t.viewState.projection;const e=this.getLayer().getRenderSource();return!e||Un(Ac(t,t.extent))?!1:e.getState()==="ready"}createTileRepresentation(t){return ct()}enqueueTiles(t,e,n,s,r){const o=t.viewState,a=this.getLayer(),l=a.getRenderSource(),h=l.getTileGridForProjection(o.projection),c=l.getGutterForProjection(o.projection),u=st(l);u in t.wantedTiles||(t.wantedTiles[u]={});const g=t.wantedTiles[u],f=this.tileRepresentationCache,p=a.getMapInternal(),_=Math.max(n-r,h.getMinZoom(),h.getZForResolution(Math.min(a.getMaxResolution(),p?p.getView().getResolutionForZoom(Math.max(a.getMinZoom(),0)):h.getResolution(0)),l.zDirection));for(let x=n;x>=_;--x){const v=h.getTileRangeForExtentAndZ(e,x,this.tempTileRange_),w=h.getResolution(x);for(let E=v.minX;E<=v.maxX;++E)for(let S=v.minY;S<=v.maxY;++S){const T=da(x,E,S,this.tempTileCoord_),R=Su(l,T);let C,P;if(f.containsKey(R)&&(C=f.get(R),P=C.tile),(!C||C.tile.key!==l.getKey())&&(P=l.getTile(x,E,S,t.pixelRatio,o.projection)),$p(s,P))continue;if(!C)C=this.createTileRepresentation({tile:P,grid:h,helper:this.helper,gutter:c}),f.set(R,C);else if(this.isDrawableTile_(P))C.setTile(P);else{const U=P.getInterimTile();C.setTile(U)}Vp(s,C,x);const N=P.getKey();g[N]=!0,P.getState()===q.IDLE&&(t.tileQueue.isKeyQueued(N)||t.tileQueue.enqueue([P,u,h.getTileCoordCenter(T),w]))}}}beforeTilesRender(t,e){this.helper.prepareDraw(this.frameState,!e,!0)}beforeTilesMaskRender(t){return!1}renderTile(t,e,n,s,r,o,a,l,h,c,u){}renderTileMask(t,e,n,s){}drawTile_(t,e,n,s,r,o,a){if(!e.ready)return;const l=e.tile.tileCoord,h=es(l),c=h in o?o[h]:1,u=a.getResolution(n),g=se(a.getTileSize(n),this.tempSize_),f=a.getOrigin(n),p=a.getTileCoordExtent(l),_=c<1?-1:Zp(n);c<1&&(t.animate=!0);const x=t.viewState,v=x.center[0],w=x.center[1],E=g[0]+2*s,S=g[1]+2*s,T=E/S,R=(v-f[0])/(g[0]*u),C=(f[1]-w)/(g[1]*u),P=x.resolution/u,N=l[1],U=l[2];Vc(this.tileTransform_),Fo(this.tileTransform_,2/(t.size[0]*P/E),-2/(t.size[1]*P/E)),Yx(this.tileTransform_,x.rotation),Fo(this.tileTransform_,1,1/T),Wu(this.tileTransform_,(g[0]*(N-R)-s)/E,(g[1]*(U-C)-s)/S),this.renderTile(e,this.tileTransform_,t,r,u,g,f,p,_,s,c)}renderFrame(t){this.frameState=t,this.renderComplete=!0;const e=this.helper.getGL();this.preRender(e,t);const n=t.viewState,s=this.getLayer(),r=s.getRenderSource(),o=r.getTileGridForProjection(n.projection),a=r.getGutterForProjection(n.projection),l=Ac(t,t.extent),h=o.getZForResolution(n.resolution,r.zDirection),c=UI(),u=s.getPreload();if(t.nextExtent){const T=o.getZForResolution(n.nextResolution,r.zDirection),R=Ac(t,t.nextExtent);this.enqueueTiles(t,R,T,c,u)}this.enqueueTiles(t,l,h,c,0),u>0&&setTimeout(()=>{this.enqueueTiles(t,l,h-1,c,u-1)},0);const g={},f=st(this),p=t.time;let _=!1;for(const T of c.representationsByZ[h]){const R=T.tile;if((R instanceof Xr||R instanceof tg)&&R.getState()===q.EMPTY)continue;const C=R.tileCoord;if(T.ready){const N=R.getAlpha(f,p);if(N===1){R.endTransition(f);continue}_=!0;const U=es(C);g[U]=N}if(this.renderComplete=!1,this.findAltTiles_(o,C,h+1,c))continue;const P=o.getMinZoom();for(let N=h-1;N>=P&&!this.findAltTiles_(o,C,N,c);--N);}const x=c.representationsByZ,v=Object.keys(x).map(Number).sort(Ux);if(this.beforeTilesMaskRender(t))for(let T=0,R=v.length;Te.dispose()),t.clear()}removeHelper(){this.helper&&this.clearCache(),super.removeHelper()}disposeInternal(){super.disposeInternal(),delete this.frameState}}const St={...jI,TILE_TEXTURE_ARRAY:"u_tileTextures",TEXTURE_PIXEL_WIDTH:"u_texturePixelWidth",TEXTURE_PIXEL_HEIGHT:"u_texturePixelHeight",TEXTURE_RESOLUTION:"u_textureResolution",TEXTURE_ORIGIN_X:"u_textureOriginX",TEXTURE_ORIGIN_Y:"u_textureOriginY"},vl={TEXTURE_COORD:"a_textureCoord"},WI=[{name:vl.TEXTURE_COORD,size:2,type:tn.FLOAT}];class qI extends BI{constructor(t,e){super(t,e),this.program_,this.vertexShader_=e.vertexShader,this.fragmentShader_=e.fragmentShader,this.indices_=new Vl(Bh,Yd),this.indices_.fromArray([0,1,3,1,2,3]),this.paletteTextures_=e.paletteTextures||[]}reset(t){super.reset(t),this.vertexShader_=t.vertexShader,this.fragmentShader_=t.fragmentShader,this.paletteTextures_=t.paletteTextures||[],this.helper&&(this.program_=this.helper.getProgram(this.fragmentShader_,this.vertexShader_))}afterHelperCreated(){this.program_=this.helper.getProgram(this.fragmentShader_,this.vertexShader_),this.helper.flushBufferData(this.indices_)}createTileRepresentation(t){return new kI(t)}beforeTilesRender(t,e){super.beforeTilesRender(t,e),this.helper.useProgram(this.program_,t)}renderTile(t,e,n,s,r,o,a,l,h,c,u){const g=this.helper.getGL();this.helper.bindBuffer(t.coords),this.helper.bindBuffer(this.indices_),this.helper.enableAttributes(WI);let f=0;for(;f0&&(S=l,we(S,s,S)),this.helper.setUniformFloatVec4(St.RENDER_EXTENT,S),this.helper.setUniformFloatValue(St.RESOLUTION,p.resolution),this.helper.setUniformFloatValue(St.ZOOM,p.zoom),this.helper.setUniformFloatValue(St.TEXTURE_PIXEL_WIDTH,_),this.helper.setUniformFloatValue(St.TEXTURE_PIXEL_HEIGHT,x),this.helper.setUniformFloatValue(St.TEXTURE_RESOLUTION,r),this.helper.setUniformFloatValue(St.TEXTURE_ORIGIN_X,a[0]+w*o[0]*r-c*r),this.helper.setUniformFloatValue(St.TEXTURE_ORIGIN_Y,a[1]-E*o[1]*r+c*r),this.helper.drawElements(0,this.indices_.getSize())}getData(t){if(!this.helper.getGL())return null;const e=this.frameState;if(!e)return null;const n=this.getLayer(),s=ae(e.pixelToCoordinateTransform,t.slice()),r=e.viewState,o=n.getExtent();if(o&&!xi(Gi(o,r.projection),s))return null;const a=n.getSources(Dr([s]),r.resolution);let l,h,c;for(l=a.length-1;l>=0;--l)if(h=a[l],h.getState()==="ready"){if(c=h.getTileGridForProjection(r.projection),h.getWrapX())break;const g=c.getExtent();if(!g||xi(g,s))break}if(l<0)return null;const u=this.tileRepresentationCache;for(let g=c.getZForResolution(r.resolution);g>=c.getMinZoom();--g){const f=c.getTileCoordForCoordAndZ(s,g),p=Su(h,f);if(!u.containsKey(p))continue;const _=u.get(p),x=_.tile;if((x instanceof Xr||x instanceof tg)&&x.getState()===q.EMPTY)return null;if(!_.loaded)continue;const v=c.getOrigin(g),w=se(c.getTileSize(g)),E=c.getResolution(g),S=(s[0]-v[0])/E-f[1]*w[0],T=(v[1]-s[1])/E-f[2]*w[1];return _.getPixelData(S,T)}return null}disposeInternal(){const t=this.helper;t&&(t.getGL().deleteProgram(this.program_),delete this.program_,t.deleteBuffer(this.indices_)),super.disposeInternal(),delete this.indices_}}function XI(i,t){return`operator_${i}_${Object.keys(t.functions).length}`}function Ds(i){const t=i.toString();return t.includes(".")?t:t+".0"}function ng(i){if(i.length<2||i.length>4)throw new Error("`formatArray` can only output `vec2`, `vec3` or `vec4` arrays.");return`vec${i.length}(${i.map(Ds).join(", ")})`}function wl(i){const t=Wi(i),e=t.length>3?t[3]:1;return ng([t[0]/255*e,t[1]/255*e,t[2]/255*e,e])}const Lc={};let ZI=0;function Kl(i){return i in Lc||(Lc[i]=ZI++),Lc[i]}function Mn(i){return Ds(Kl(i))}function sg(i){return"u_var_"+i}function $I(){return{inFragmentShader:!1,variables:{},properties:{},functions:{},bandCount:0,style:{}}}const Oc="getBandValue",ry="u_paletteTextures";function VI(i,t,e,n){const s=Bt(i,e,t);if(Oa(s.type,Qs))throw new Error("No matching type was found");if(!ji(t,s.type)){const r=be(t),o=be(s.type);throw new Error(`Expected expression to be of type ${r}, got ${o}`)}return rg(s,t,n)}function Dt(i){return(t,e,n)=>{const s=e.args.length,r=new Array(s);for(let o=0;o{const e=t.args[0].value;return e in i.properties||(i.properties[e]={name:e,type:t.type}),(i.inFragmentShader?"v_prop_":"a_prop_")+e},[z.GeometryType]:(i,t,e)=>{const n="geometryType";return n in i.properties||(i.properties[n]={name:n,type:xe,evaluator:s=>qd(s.getGeometry())}),(i.inFragmentShader?"v_prop_":"a_prop_")+n},[z.Var]:(i,t)=>{const e=t.args[0].value;return e in i.variables||(i.variables[e]={name:e,type:t.type}),sg(e)},[z.Resolution]:()=>"u_resolution",[z.Zoom]:()=>"u_zoom",[z.Time]:()=>"u_time",[z.Any]:Dt(i=>`(${i.join(" || ")})`),[z.All]:Dt(i=>`(${i.join(" && ")})`),[z.Not]:Dt(([i])=>`(!${i})`),[z.Equal]:Dt(([i,t])=>`(${i} == ${t})`),[z.NotEqual]:Dt(([i,t])=>`(${i} != ${t})`),[z.GreaterThan]:Dt(([i,t])=>`(${i} > ${t})`),[z.GreaterThanOrEqualTo]:Dt(([i,t])=>`(${i} >= ${t})`),[z.LessThan]:Dt(([i,t])=>`(${i} < ${t})`),[z.LessThanOrEqualTo]:Dt(([i,t])=>`(${i} <= ${t})`),[z.Multiply]:Dt(i=>`(${i.join(" * ")})`),[z.Divide]:Dt(([i,t])=>`(${i} / ${t})`),[z.Add]:Dt(i=>`(${i.join(" + ")})`),[z.Subtract]:Dt(([i,t])=>`(${i} - ${t})`),[z.Clamp]:Dt(([i,t,e])=>`clamp(${i}, ${t}, ${e})`),[z.Mod]:Dt(([i,t])=>`mod(${i}, ${t})`),[z.Pow]:Dt(([i,t])=>`pow(${i}, ${t})`),[z.Abs]:Dt(([i])=>`abs(${i})`),[z.Floor]:Dt(([i])=>`floor(${i})`),[z.Ceil]:Dt(([i])=>`ceil(${i})`),[z.Round]:Dt(([i])=>`floor(${i} + 0.5)`),[z.Sin]:Dt(([i])=>`sin(${i})`),[z.Cos]:Dt(([i])=>`cos(${i})`),[z.Atan]:Dt(([i,t])=>t!==void 0?`atan(${i}, ${t})`:`atan(${i})`),[z.Sqrt]:Dt(([i])=>`sqrt(${i})`),[z.Match]:Dt(i=>{const t=i[0],e=i[i.length-1];let n=null;for(let s=i.length-3;s>=1;s-=2){const r=i[s],o=i[s+1];n=`(${t} == ${r} ? ${o} : ${n||e})`}return n}),[z.Between]:Dt(([i,t,e])=>`(${i} >= ${t} && ${i} <= ${e})`),[z.Interpolate]:Dt(([i,t,...e])=>{let n="";for(let s=0;s{const t=i[i.length-1];let e=null;for(let n=i.length-3;n>=0;n-=2){const s=i[n],r=i[n+1];e=`(${s} ? ${r} : ${e||t})`}return e}),[z.In]:Dt(([i,...t],e)=>{const n=XI("in",e),s=[];for(let r=0;r`vec${i.length}(${i.join(", ")})`),[z.Color]:Dt(i=>{if(i.length===1)return`vec4(vec3(${i[0]} / 255.0), 1.0)`;if(i.length===2)return`(${i[1]} * vec4(vec3(${i[0]} / 255.0), 1.0))`;const t=i.slice(0,3).map(e=>`${e} / 255.0`);return i.length===3?`vec4(${t.join(", ")}, 1.0)`:`(${i[3]} * vec4(${t.join(", ")}, 1.0))`}),[z.Band]:Dt(([i,t,e],n)=>{if(!(Oc in n.functions)){let s="";const r=n.bandCount||1;for(let o=0;o{const[e,...n]=t.args,s=n.length,r=new Uint8Array(s*4);for(let h=0;h0)return Ds(i.value);if((i.type&te)>0)return i.value.toString();if((i.type&xe)>0)return Mn(i.value.toString());if((i.type&Wt)>0)return wl(i.value);if((i.type&me)>0)return ng(i.value);throw new Error(`Unexpected expression ${i.value} (expected type ${be(t)})`)}function HI(){return{"fill-color":"rgba(255,255,255,0.4)","stroke-color":"#3399CC","stroke-width":1.25,"circle-radius":5,"circle-fill-color":"rgba(255,255,255,0.4)","circle-stroke-width":1.25,"circle-stroke-color":"#3399CC"}}const hr=`#ifdef GL_FRAGMENT_PRECISION_HIGH -precision highp float; -#else -precision mediump float; -#endif -uniform mat4 u_projectionMatrix; -uniform mat4 u_screenToWorldMatrix; -uniform vec2 u_viewportSizePx; -uniform float u_pixelRatio; -uniform float u_globalAlpha; -uniform float u_time; -uniform float u_zoom; -uniform float u_resolution; -uniform float u_rotation; -uniform vec4 u_renderExtent; -uniform vec2 u_patternOrigin; -uniform float u_depth; -uniform mediump int u_hitDetection; - -const float PI = 3.141592653589793238; -const float TWO_PI = 2.0 * PI; - -// this used to produce an alpha-premultiplied color from a texture -vec4 samplePremultiplied(sampler2D sampler, vec2 texCoord) { - vec4 color = texture2D(sampler, texCoord); - return vec4(color.rgb * color.a, color.a); -} -`,cr=HI();class oy{constructor(){this.uniforms_=[],this.attributes_=[],this.varyings_=[],this.hasSymbol_=!1,this.symbolSizeExpression_=`vec2(${Ds(cr["circle-radius"])} + ${Ds(cr["circle-stroke-width"]*.5)})`,this.symbolRotationExpression_="0.0",this.symbolOffsetExpression_="vec2(0.0)",this.symbolColorExpression_=wl(cr["circle-fill-color"]),this.texCoordExpression_="vec4(0.0, 0.0, 1.0, 1.0)",this.discardExpression_="false",this.symbolRotateWithView_=!1,this.hasStroke_=!1,this.strokeWidthExpression_=Ds(cr["stroke-width"]),this.strokeColorExpression_=wl(cr["stroke-color"]),this.strokeOffsetExpression_="0.",this.strokeCapExpression_=Mn("round"),this.strokeJoinExpression_=Mn("round"),this.strokeMiterLimitExpression_="10.",this.strokeDistanceFieldExpression_="-1000.",this.hasFill_=!1,this.fillColorExpression_=wl(cr["fill-color"]),this.vertexShaderFunctions_=[],this.fragmentShaderFunctions_=[]}addUniform(t){return this.uniforms_.push(t),this}addAttribute(t){return this.attributes_.push(t),this}addVarying(t,e,n){return this.varyings_.push({name:t,type:e,expression:n}),this}setSymbolSizeExpression(t){return this.hasSymbol_=!0,this.symbolSizeExpression_=t,this}getSymbolSizeExpression(){return this.symbolSizeExpression_}setSymbolRotationExpression(t){return this.symbolRotationExpression_=t,this}setSymbolOffsetExpression(t){return this.symbolOffsetExpression_=t,this}getSymbolOffsetExpression(){return this.symbolOffsetExpression_}setSymbolColorExpression(t){return this.hasSymbol_=!0,this.symbolColorExpression_=t,this}getSymbolColorExpression(){return this.symbolColorExpression_}setTextureCoordinateExpression(t){return this.texCoordExpression_=t,this}setFragmentDiscardExpression(t){return this.discardExpression_=t,this}getFragmentDiscardExpression(){return this.discardExpression_}setSymbolRotateWithView(t){return this.symbolRotateWithView_=t,this}setStrokeWidthExpression(t){return this.hasStroke_=!0,this.strokeWidthExpression_=t,this}setStrokeColorExpression(t){return this.hasStroke_=!0,this.strokeColorExpression_=t,this}getStrokeColorExpression(){return this.strokeColorExpression_}setStrokeOffsetExpression(t){return this.strokeOffsetExpression_=t,this}setStrokeCapExpression(t){return this.strokeCapExpression_=t,this}setStrokeJoinExpression(t){return this.strokeJoinExpression_=t,this}setStrokeMiterLimitExpression(t){return this.strokeMiterLimitExpression_=t,this}setStrokeDistanceFieldExpression(t){return this.strokeDistanceFieldExpression_=t,this}setFillColorExpression(t){return this.hasFill_=!0,this.fillColorExpression_=t,this}getFillColorExpression(){return this.fillColorExpression_}addVertexShaderFunction(t){this.vertexShaderFunctions_.includes(t)||this.vertexShaderFunctions_.push(t)}addFragmentShaderFunction(t){this.fragmentShaderFunctions_.includes(t)||this.fragmentShaderFunctions_.push(t)}getSymbolVertexShader(){return this.hasSymbol_?`${hr} -${this.uniforms_.map(function(t){return"uniform "+t+";"}).join(` -`)} -attribute vec2 a_position; -attribute float a_index; -attribute vec4 a_prop_hitColor; -${this.attributes_.map(function(t){return"attribute "+t+";"}).join(` -`)} -varying vec2 v_texCoord; -varying vec2 v_quadCoord; -varying vec4 v_prop_hitColor; -varying vec2 v_centerPx; -varying float v_angle; -varying vec2 v_quadSizePx; -${this.varyings_.map(function(t){return"varying "+t.type+" "+t.name+";"}).join(` -`)} -${this.vertexShaderFunctions_.join(` -`)} -vec2 pxToScreen(vec2 coordPx) { - vec2 scaled = coordPx / u_viewportSizePx / 0.5; - return scaled; -} - -vec2 screenToPx(vec2 coordScreen) { - return (coordScreen * 0.5 + 0.5) * u_viewportSizePx; -} - -void main(void) { - v_quadSizePx = ${this.symbolSizeExpression_}; - vec2 halfSizePx = v_quadSizePx * 0.5; - vec2 centerOffsetPx = ${this.symbolOffsetExpression_}; - vec2 offsetPx = centerOffsetPx; - if (a_index == 0.0) { - offsetPx -= halfSizePx; - } else if (a_index == 1.0) { - offsetPx += halfSizePx * vec2(1., -1.); - } else if (a_index == 2.0) { - offsetPx += halfSizePx; - } else { - offsetPx += halfSizePx * vec2(-1., 1.); - } - float angle = ${this.symbolRotationExpression_}; - ${this.symbolRotateWithView_?"angle += u_rotation;":""} - float c = cos(-angle); - float s = sin(-angle); - offsetPx = vec2(c * offsetPx.x - s * offsetPx.y, s * offsetPx.x + c * offsetPx.y); - vec4 center = u_projectionMatrix * vec4(a_position, 0.0, 1.0); - gl_Position = center + vec4(pxToScreen(offsetPx), u_depth, 0.); - vec4 texCoord = ${this.texCoordExpression_}; - float u = a_index == 0.0 || a_index == 3.0 ? texCoord.s : texCoord.p; - float v = a_index == 2.0 || a_index == 3.0 ? texCoord.t : texCoord.q; - v_texCoord = vec2(u, v); - v_prop_hitColor = a_prop_hitColor; - v_angle = angle; - c = cos(-v_angle); - s = sin(-v_angle); - centerOffsetPx = vec2(c * centerOffsetPx.x - s * centerOffsetPx.y, s * centerOffsetPx.x + c * centerOffsetPx.y); - v_centerPx = screenToPx(center.xy) + centerOffsetPx; -${this.varyings_.map(function(t){return" "+t.name+" = "+t.expression+";"}).join(` -`)} -}`:null}getSymbolFragmentShader(){return this.hasSymbol_?`${hr} -${this.uniforms_.map(function(t){return"uniform "+t+";"}).join(` -`)} -varying vec2 v_texCoord; -varying vec4 v_prop_hitColor; -varying vec2 v_centerPx; -varying float v_angle; -varying vec2 v_quadSizePx; -${this.varyings_.map(function(t){return"varying "+t.type+" "+t.name+";"}).join(` -`)} -${this.fragmentShaderFunctions_.join(` -`)} - -void main(void) { - if (${this.discardExpression_}) { discard; } - vec2 coordsPx = gl_FragCoord.xy / u_pixelRatio - v_centerPx; // relative to center - float c = cos(v_angle); - float s = sin(v_angle); - coordsPx = vec2(c * coordsPx.x - s * coordsPx.y, s * coordsPx.x + c * coordsPx.y); - gl_FragColor = ${this.symbolColorExpression_}; - if (u_hitDetection > 0) { - if (gl_FragColor.a < 0.05) { discard; }; - gl_FragColor = v_prop_hitColor; - } -}`:null}getStrokeVertexShader(){return this.hasStroke_?`${hr} -${this.uniforms_.map(function(t){return"uniform "+t+";"}).join(` -`)} -attribute vec2 a_position; -attribute float a_index; -attribute vec2 a_segmentStart; -attribute vec2 a_segmentEnd; -attribute float a_parameters; -attribute float a_distance; -attribute vec2 a_joinAngles; -attribute vec4 a_prop_hitColor; -${this.attributes_.map(function(t){return"attribute "+t+";"}).join(` -`)} -varying vec2 v_segmentStart; -varying vec2 v_segmentEnd; -varying float v_angleStart; -varying float v_angleEnd; -varying float v_width; -varying vec4 v_prop_hitColor; -varying float v_distanceOffsetPx; -${this.varyings_.map(function(t){return"varying "+t.type+" "+t.name+";"}).join(` -`)} -${this.vertexShaderFunctions_.join(` -`)} -vec2 worldToPx(vec2 worldPos) { - vec4 screenPos = u_projectionMatrix * vec4(worldPos, 0.0, 1.0); - return (0.5 * screenPos.xy + 0.5) * u_viewportSizePx; -} - -vec4 pxToScreen(vec2 pxPos) { - vec2 screenPos = 2.0 * pxPos / u_viewportSizePx - 1.0; - return vec4(screenPos, u_depth, 1.0); -} - -bool isCap(float joinAngle) { - return joinAngle < -0.1; -} - -vec2 getJoinOffsetDirection(vec2 normalPx, float joinAngle) { - float halfAngle = joinAngle / 2.0; - float c = cos(halfAngle); - float s = sin(halfAngle); - vec2 angleBisectorNormal = vec2(s * normalPx.x + c * normalPx.y, -c * normalPx.x + s * normalPx.y); - float length = 1.0 / s; - return angleBisectorNormal * length; -} - -vec2 getOffsetPoint(vec2 point, vec2 normal, float joinAngle, float offsetPx) { - // if on a cap or the join angle is too high, offset the line along the segment normal - if (cos(joinAngle) > 0.998 || isCap(joinAngle)) { - return point - normal * offsetPx; - } - // offset is applied along the inverted normal (positive offset goes "right" relative to line direction) - return point - getJoinOffsetDirection(normal, joinAngle) * offsetPx; -} - -void main(void) { - v_angleStart = a_joinAngles.x; - v_angleEnd = a_joinAngles.y; - float vertexNumber = floor(abs(a_parameters) / 10000. + 0.5); - // we're reading the fractional part while keeping the sign (so -4.12 gives -0.12, 3.45 gives 0.45) - float angleTangentSum = fract(abs(a_parameters) / 10000.) * 10000. * sign(a_parameters); - - float lineWidth = ${this.strokeWidthExpression_}; - float lineOffsetPx = ${this.strokeOffsetExpression_}; - - // compute segment start/end in px with offset - vec2 segmentStartPx = worldToPx(a_segmentStart); - vec2 segmentEndPx = worldToPx(a_segmentEnd); - vec2 tangentPx = normalize(segmentEndPx - segmentStartPx); - vec2 normalPx = vec2(-tangentPx.y, tangentPx.x); - segmentStartPx = getOffsetPoint(segmentStartPx, normalPx, v_angleStart, lineOffsetPx), - segmentEndPx = getOffsetPoint(segmentEndPx, normalPx, v_angleEnd, lineOffsetPx); - - // compute current vertex position - float normalDir = vertexNumber < 0.5 || (vertexNumber > 1.5 && vertexNumber < 2.5) ? 1.0 : -1.0; - float tangentDir = vertexNumber < 1.5 ? 1.0 : -1.0; - float angle = vertexNumber < 1.5 ? v_angleStart : v_angleEnd; - vec2 joinDirection; - vec2 positionPx = vertexNumber < 1.5 ? segmentStartPx : segmentEndPx; - // if angle is too high, do not make a proper join - if (cos(angle) > ${Bp} || isCap(angle)) { - joinDirection = normalPx * normalDir - tangentPx * tangentDir; - } else { - joinDirection = getJoinOffsetDirection(normalPx * normalDir, angle); - } - positionPx = positionPx + joinDirection * (lineWidth * 0.5 + 1.); // adding 1 pixel for antialiasing - gl_Position = pxToScreen(positionPx); - - v_segmentStart = segmentStartPx; - v_segmentEnd = segmentEndPx; - v_width = lineWidth; - v_prop_hitColor = a_prop_hitColor; - v_distanceOffsetPx = a_distance / u_resolution - (lineOffsetPx * angleTangentSum); -${this.varyings_.map(function(t){return" "+t.name+" = "+t.expression+";"}).join(` -`)} -}`:null}getStrokeFragmentShader(){return this.hasStroke_?`${hr} -${this.uniforms_.map(function(t){return"uniform "+t+";"}).join(` -`)} -varying vec2 v_segmentStart; -varying vec2 v_segmentEnd; -varying float v_angleStart; -varying float v_angleEnd; -varying float v_width; -varying vec4 v_prop_hitColor; -varying float v_distanceOffsetPx; -${this.varyings_.map(function(t){return"varying "+t.type+" "+t.name+";"}).join(` -`)} -${this.fragmentShaderFunctions_.join(` -`)} - -vec2 pxToWorld(vec2 pxPos) { - vec2 screenPos = 2.0 * pxPos / u_viewportSizePx - 1.0; - return (u_screenToWorldMatrix * vec4(screenPos, 0.0, 1.0)).xy; -} - -bool isCap(float joinAngle) { - return joinAngle < -0.1; -} - -float segmentDistanceField(vec2 point, vec2 start, vec2 end, float width) { - vec2 tangent = normalize(end - start); - vec2 normal = vec2(-tangent.y, tangent.x); - vec2 startToPoint = point - start; - return abs(dot(startToPoint, normal)) - width * 0.5; -} - -float buttCapDistanceField(vec2 point, vec2 start, vec2 end) { - vec2 startToPoint = point - start; - vec2 tangent = normalize(end - start); - return dot(startToPoint, -tangent); -} - -float squareCapDistanceField(vec2 point, vec2 start, vec2 end, float width) { - return buttCapDistanceField(point, start, end) - width * 0.5; -} - -float roundCapDistanceField(vec2 point, vec2 start, vec2 end, float width) { - float onSegment = max(0., 1000. * dot(point - start, end - start)); // this is very high when inside the segment - return length(point - start) - width * 0.5 - onSegment; -} - -float roundJoinDistanceField(vec2 point, vec2 start, vec2 end, float width) { - return roundCapDistanceField(point, start, end, width); -} - -float bevelJoinField(vec2 point, vec2 start, vec2 end, float width, float joinAngle) { - vec2 startToPoint = point - start; - vec2 tangent = normalize(end - start); - float c = cos(joinAngle * 0.5); - float s = sin(joinAngle * 0.5); - float direction = -sign(sin(joinAngle)); - vec2 bisector = vec2(c * tangent.x - s * tangent.y, s * tangent.x + c * tangent.y); - float radius = width * 0.5 * s; - return dot(startToPoint, bisector * direction) - radius; -} - -float miterJoinDistanceField(vec2 point, vec2 start, vec2 end, float width, float joinAngle) { - if (cos(joinAngle) > ${Bp}) { // avoid risking a division by zero - return bevelJoinField(point, start, end, width, joinAngle); - } - float miterLength = 1. / sin(joinAngle * 0.5); - float miterLimit = ${this.strokeMiterLimitExpression_}; - if (miterLength > miterLimit) { - return bevelJoinField(point, start, end, width, joinAngle); - } - return -1000.; -} - -float capDistanceField(vec2 point, vec2 start, vec2 end, float width, float capType) { - if (capType == ${Mn("butt")}) { - return buttCapDistanceField(point, start, end); - } else if (capType == ${Mn("square")}) { - return squareCapDistanceField(point, start, end, width); - } - return roundCapDistanceField(point, start, end, width); -} - -float joinDistanceField(vec2 point, vec2 start, vec2 end, float width, float joinAngle, float joinType) { - if (joinType == ${Mn("bevel")}) { - return bevelJoinField(point, start, end, width, joinAngle); - } else if (joinType == ${Mn("miter")}) { - return miterJoinDistanceField(point, start, end, width, joinAngle); - } - return roundJoinDistanceField(point, start, end, width); -} - -float computeSegmentPointDistance(vec2 point, vec2 start, vec2 end, float width, float joinAngle, float capType, float joinType) { - if (isCap(joinAngle)) { - return capDistanceField(point, start, end, width, capType); - } - return joinDistanceField(point, start, end, width, joinAngle, joinType); -} - -void main(void) { - vec2 currentPoint = gl_FragCoord.xy / u_pixelRatio; - #ifdef GL_FRAGMENT_PRECISION_HIGH - vec2 worldPos = pxToWorld(currentPoint); - if ( - abs(u_renderExtent[0] - u_renderExtent[2]) > 0.0 && ( - worldPos[0] < u_renderExtent[0] || - worldPos[1] < u_renderExtent[1] || - worldPos[0] > u_renderExtent[2] || - worldPos[1] > u_renderExtent[3] - ) - ) { - discard; - } - #endif - if (${this.discardExpression_}) { discard; } - - float segmentLength = length(v_segmentEnd - v_segmentStart); - vec2 segmentTangent = (v_segmentEnd - v_segmentStart) / segmentLength; - vec2 segmentNormal = vec2(-segmentTangent.y, segmentTangent.x); - vec2 startToPoint = currentPoint - v_segmentStart; - float currentLengthPx = max(0., min(dot(segmentTangent, startToPoint), segmentLength)) + v_distanceOffsetPx; - float currentRadiusPx = abs(dot(segmentNormal, startToPoint)); - float currentRadiusRatio = dot(segmentNormal, startToPoint) * 2. / v_width; - vec4 color = ${this.strokeColorExpression_} * u_globalAlpha; - float capType = ${this.strokeCapExpression_}; - float joinType = ${this.strokeJoinExpression_}; - float segmentStartDistance = computeSegmentPointDistance(currentPoint, v_segmentStart, v_segmentEnd, v_width, v_angleStart, capType, joinType); - float segmentEndDistance = computeSegmentPointDistance(currentPoint, v_segmentEnd, v_segmentStart, v_width, v_angleEnd, capType, joinType); - float distance = max( - segmentDistanceField(currentPoint, v_segmentStart, v_segmentEnd, v_width), - max(segmentStartDistance, segmentEndDistance) - ); - distance = max(distance, ${this.strokeDistanceFieldExpression_}); - gl_FragColor = color * smoothstep(0.5, -0.5, distance); - if (u_hitDetection > 0) { - if (gl_FragColor.a < 0.1) { discard; }; - gl_FragColor = v_prop_hitColor; - } -}`:null}getFillVertexShader(){return this.hasFill_?`${hr} -${this.uniforms_.map(function(t){return"uniform "+t+";"}).join(` -`)} -attribute vec2 a_position; -attribute vec4 a_prop_hitColor; -${this.attributes_.map(function(t){return"attribute "+t+";"}).join(` -`)} -varying vec4 v_prop_hitColor; -${this.varyings_.map(function(t){return"varying "+t.type+" "+t.name+";"}).join(` -`)} -${this.vertexShaderFunctions_.join(` -`)} -void main(void) { - gl_Position = u_projectionMatrix * vec4(a_position, u_depth, 1.0); - v_prop_hitColor = a_prop_hitColor; -${this.varyings_.map(function(t){return" "+t.name+" = "+t.expression+";"}).join(` -`)} -}`:null}getFillFragmentShader(){return this.hasFill_?`${hr} -${this.uniforms_.map(function(t){return"uniform "+t+";"}).join(` -`)} -varying vec4 v_prop_hitColor; -${this.varyings_.map(function(t){return"varying "+t.type+" "+t.name+";"}).join(` -`)} -${this.fragmentShaderFunctions_.join(` -`)} -vec2 pxToWorld(vec2 pxPos) { - vec2 screenPos = 2.0 * pxPos / u_viewportSizePx - 1.0; - return (u_screenToWorldMatrix * vec4(screenPos, 0.0, 1.0)).xy; -} - -vec2 worldToPx(vec2 worldPos) { - vec4 screenPos = u_projectionMatrix * vec4(worldPos, 0.0, 1.0); - return (0.5 * screenPos.xy + 0.5) * u_viewportSizePx; -} - -void main(void) { - vec2 pxPos = gl_FragCoord.xy / u_pixelRatio; - vec2 pxOrigin = worldToPx(u_patternOrigin); - #ifdef GL_FRAGMENT_PRECISION_HIGH - vec2 worldPos = pxToWorld(pxPos); - if ( - abs(u_renderExtent[0] - u_renderExtent[2]) > 0.0 && ( - worldPos[0] < u_renderExtent[0] || - worldPos[1] < u_renderExtent[1] || - worldPos[0] > u_renderExtent[2] || - worldPos[1] > u_renderExtent[3] - ) - ) { - discard; - } - #endif - if (${this.discardExpression_}) { discard; } - gl_FragColor = ${this.fillColorExpression_} * u_globalAlpha; - if (u_hitDetection > 0) { - if (gl_FragColor.a < 0.1) { discard; }; - gl_FragColor = v_prop_hitColor; - } -}`:null}}const Ni={BLUR:"blur",GRADIENT:"gradient",RADIUS:"radius"},KI=["#00f","#0ff","#0f0","#ff0","#f00"];class QI extends Na{constructor(t){t=t||{};const e=Object.assign({},t);delete e.gradient,delete e.radius,delete e.blur,delete e.weight,super(e),this.gradient_=null,this.addChangeListener(Ni.GRADIENT,this.handleGradientChanged_),this.setGradient(t.gradient?t.gradient:KI),this.setBlur(t.blur!==void 0?t.blur:15),this.setRadius(t.radius!==void 0?t.radius:8);const n=t.weight?t.weight:"weight";typeof n=="string"?this.weightFunction_=function(s){return s.get(n)}:this.weightFunction_=n,this.setRenderOrder(null)}getBlur(){return this.get(Ni.BLUR)}getGradient(){return this.get(Ni.GRADIENT)}getRadius(){return this.get(Ni.RADIUS)}handleGradientChanged_(){this.gradient_=JI(this.getGradient())}setBlur(t){this.set(Ni.BLUR,t)}setGradient(t){this.set(Ni.GRADIENT,t)}setRadius(t){this.set(Ni.RADIUS,t)}createRenderer(){const t=new oy().addAttribute("float a_prop_weight").addVarying("v_prop_weight","float","a_prop_weight").addUniform("float u_size").addUniform("float u_blurSlope").setSymbolSizeExpression("vec2(u_size)").setSymbolColorExpression("vec4(smoothstep(0., 1., (1. - length(coordsPx * 2. / v_quadSizePx)) * u_blurSlope) * v_prop_weight)");return new ey(this,{className:this.getClassName(),attributes:[{name:"weight",callback:e=>{const n=this.weightFunction_(e);return n!==void 0?wt(n,0,1):1}}],uniforms:{u_size:()=>(this.get(Ni.RADIUS)+this.get(Ni.BLUR))*2,u_blurSlope:()=>this.get(Ni.RADIUS)/Math.max(1,this.get(Ni.BLUR))},hitDetectionEnabled:!0,vertexShader:t.getSymbolVertexShader(),fragmentShader:t.getSymbolFragmentShader(),postProcesses:[{fragmentShader:` - precision mediump float; - - uniform sampler2D u_image; - uniform sampler2D u_gradientTexture; - uniform float u_opacity; - - varying vec2 v_texCoord; - - void main() { - vec4 color = texture2D(u_image, v_texCoord); - gl_FragColor.a = color.a * u_opacity; - gl_FragColor.rgb = texture2D(u_gradientTexture, vec2(0.5, color.a)).rgb; - gl_FragColor.rgb *= gl_FragColor.a; - }`,uniforms:{u_gradientTexture:()=>this.gradient_,u_opacity:()=>this.getOpacity()}}]})}renderDeclutter(){}}function JI(i){const t=Jt(1,256),e=t.createLinearGradient(0,0,1,256),n=1/(i.length-1);for(let s=0,r=i.length;s=a.width)return null;const c=Vt(o),u=Math.floor(a.height*((o[3]-s[1])/c));return u<0||u>=a.height?null:this.getImageData(a,h,u)}renderFrame(t,e){const n=this.image_,s=n.getExtent(),r=n.getResolution(),[o,a]=Array.isArray(r)?r:[r,r],l=n.getPixelRatio(),h=t.layerStatesArray[t.layerIndex],c=t.pixelRatio,u=t.viewState,g=u.center,f=u.resolution,p=c*o/(f*l),_=c*a/(f*l),x=t.extent,v=u.resolution,w=u.rotation,E=Math.round(yt(x)/v*c),S=Math.round(Vt(x)/v*c);hi(this.pixelTransform,t.size[0]/2,t.size[1]/2,1/c,1/c,w,-E/2,-S/2),ph(this.inversePixelTransform,this.pixelTransform);const T=qu(this.pixelTransform);this.useContainer(e,T,this.getBackground(t));const R=this.getRenderContext(t),C=this.context.canvas;C.width!=E||C.height!=S?(C.width=E,C.height=S):this.containerReused||R.clearRect(0,0,E,S);let P=!1,N=!0;if(h.extent){const m=Gi(h.extent,u.projection);N=Qt(m,t.extent),P=N&&!Ze(m,t.extent),P&&this.clipUnrotated(R,t,m)}const U=n.getImage(),j=hi(this.tempTransform,E/2,S/2,p,_,0,l*(s[0]-g[0])/o,l*(g[1]-s[3])/a);this.renderedResolution=a*c/l;const B=U.width*j[0],d=U.height*j[3];if(this.getLayer().getSource().getInterpolate()||(R.imageSmoothingEnabled=!1),this.preRender(R,t),N&&B>=.5&&d>=.5){const m=j[4],y=j[5],b=h.opacity;b!==1&&(R.save(),R.globalAlpha=b),R.drawImage(U,0,0,+U.width,+U.height,m,y,B,d),b!==1&&R.restore()}return this.postRender(this.context,t),P&&R.restore(),R.imageSmoothingEnabled=!0,T!==C.style.transform&&(C.style.transform=T),this.container}}class og extends eP{constructor(t){super(t)}createRenderer(){return new ay(this)}getData(t){return super.getData(t)}}const ls={PRELOAD:"preload",USE_INTERIM_TILES_ON_ERROR:"useInterimTilesOnError"};class ly extends La{constructor(t){t=t||{};const e=Object.assign({},t);delete e.preload,delete e.useInterimTilesOnError,super(e),this.on,this.once,this.un,this.setPreload(t.preload!==void 0?t.preload:0),this.setUseInterimTilesOnError(t.useInterimTilesOnError!==void 0?t.useInterimTilesOnError:!0)}getPreload(){return this.get(ls.PRELOAD)}setPreload(t){this.set(ls.PRELOAD,t)}getUseInterimTilesOnError(){return this.get(ls.USE_INTERIM_TILES_ON_ERROR)}setUseInterimTilesOnError(t){this.set(ls.USE_INTERIM_TILES_ON_ERROR,t)}getData(t){return super.getData(t)}}class hy extends $d{constructor(t){super(t),this.extentChanged=!0,this.renderedExtent_=null,this.renderedPixelRatio,this.renderedProjection=null,this.renderedRevision,this.renderedTiles=[],this.newTiles_=!1,this.tmpExtent=ze(),this.tmpTileRange_=new Zh(0,0,0,0)}isDrawableTile(t){const e=this.getLayer(),n=t.getState(),s=e.getUseInterimTilesOnError();return n==q.LOADED||n==q.EMPTY||n==q.ERROR&&!s}getTile(t,e,n,s){const r=s.pixelRatio,o=s.viewState.projection,a=this.getLayer();let l=a.getSource().getTile(t,e,n,r,o);return l.getState()==q.ERROR&&a.getUseInterimTilesOnError()&&a.getPreload()>0&&(this.newTiles_=!0),this.isDrawableTile(l)||(l=l.getInterimTile()),l}getData(t){const e=this.frameState;if(!e)return null;const n=this.getLayer(),s=ae(e.pixelToCoordinateTransform,t.slice()),r=n.getExtent();if(r&&!xi(r,s))return null;const o=e.pixelRatio,a=e.viewState.projection,l=e.viewState,h=n.getRenderSource(),c=h.getTileGridForProjection(l.projection),u=h.getTilePixelRatio(e.pixelRatio);for(let g=c.getZForResolution(l.resolution);g>=c.getMinZoom();--g){const f=c.getTileCoordForCoordAndZ(s,g),p=h.getTile(g,f[1],f[2],o,a);if(!(p instanceof Da||p instanceof Xr)||p instanceof Xr&&p.getState()===q.EMPTY)return null;if(p.getState()!==q.LOADED)continue;const _=c.getOrigin(g),x=se(c.getTileSize(g)),v=c.getResolution(g),w=Math.floor(u*((s[0]-_[0])/v-f[1]*x[0])),E=Math.floor(u*((_[1]-s[1])/v-f[2]*x[1])),S=Math.round(u*h.getGutterForProjection(l.projection));return this.getImageData(p.getImage(),w+S,E+S)}return null}loadedTileCallback(t,e,n){return this.isDrawableTile(n)?super.loadedTileCallback(t,e,n):!1}prepareFrame(t){return!!this.getLayer().getSource()}renderFrame(t,e){const n=t.layerStatesArray[t.layerIndex],s=t.viewState,r=s.projection,o=s.resolution,a=s.center,l=s.rotation,h=t.pixelRatio,c=this.getLayer(),u=c.getSource(),g=u.getRevision(),f=u.getTileGridForProjection(r),p=f.getZForResolution(o,u.zDirection),_=f.getResolution(p);let x=t.extent;const v=t.viewState.resolution,w=u.getTilePixelRatio(h),E=Math.round(yt(x)/v*h),S=Math.round(Vt(x)/v*h),T=n.extent&&Gi(n.extent);T&&(x=we(x,Gi(n.extent)));const R=_*E/2/w,C=_*S/2/w,P=[a[0]-R,a[1]-C,a[0]+R,a[1]+C],N=f.getTileRangeForExtentAndZ(x,p),U={};U[p]={};const j=this.createLoadedTileFinder(u,r,U),B=this.tmpExtent,d=this.tmpTileRange_;this.newTiles_=!1;const m=l?Hc(s.center,v,l,t.size):void 0;for(let K=N.minX;K<=N.maxX;++K)for(let G=N.minY;G<=N.maxY;++G){if(l&&!f.tileCoordIntersectsViewport([p,K,G],m))continue;const H=this.getTile(p,K,G,t);if(this.isDrawableTile(H)){const xt=st(this);if(H.getState()==q.LOADED){U[p][H.tileCoord.toString()]=H;let dt=H.inTransition(xt);dt&&n.opacity!==1&&(H.endTransition(xt),dt=!1),!this.newTiles_&&(dt||!this.renderedTiles.includes(H))&&(this.newTiles_=!0)}if(H.getAlpha(xt,t.time)===1)continue}const Q=f.getTileCoordChildTileRange(H.tileCoord,d,B);let nt=!1;Q&&(nt=j(p+1,Q)),nt||f.forEachTileCoordParentTileRange(H.tileCoord,j,d,B)}const y=_/o*h/w;hi(this.pixelTransform,t.size[0]/2,t.size[1]/2,1/h,1/h,l,-E/2,-S/2);const b=qu(this.pixelTransform);this.useContainer(e,b,this.getBackground(t));const M=this.getRenderContext(t),I=this.context.canvas;ph(this.inversePixelTransform,this.pixelTransform),hi(this.tempTransform,E/2,S/2,y,y,0,-E/2,-S/2),I.width!=E||I.height!=S?(I.width=E,I.height=S):this.containerReused||M.clearRect(0,0,E,S),T&&this.clipUnrotated(M,t,T),u.getInterpolate()||(M.imageSmoothingEnabled=!1),this.preRender(M,t),this.renderedTiles.length=0;let A=Object.keys(U).map(Number);A.sort(on);let L,k,W;n.opacity===1&&(!this.containerReused||u.getOpaque(t.viewState.projection))?A=A.reverse():(L=[],k=[]);for(let K=A.length-1;K>=0;--K){const G=A[K],H=u.getTilePixelSize(G,h,r),Q=f.getResolution(G)/_,nt=H[0]*Q*y,xt=H[1]*Q*y,dt=f.getTileCoordForCoordAndZ(zn(P),G),Tt=f.getTileCoordExtent(dt),Et=ae(this.tempTransform,[w*(Tt[0]-P[0])/_,w*(P[3]-Tt[3])/_]),kt=w*u.getGutterForProjection(r),Yt=U[G];for(const ue in Yt){const Ht=Yt[ue],Ke=Ht.tileCoord,$a=dt[1]-Ke[1],ic=Math.round(Et[0]-($a-1)*nt),Va=dt[2]-Ke[2],Ya=Math.round(Et[1]-(Va-1)*xt),fi=Math.round(Et[0]-$a*nt),Li=Math.round(Et[1]-Va*xt),$i=ic-fi,Oi=Ya-Li,tr=p===G,er=tr&&Ht.getAlpha(st(this),t.time)!==1;let Zn=!1;if(!er)if(L){W=[fi,Li,fi+$i,Li,fi+$i,Li+Oi,fi,Li+Oi];for(let pn=0,nc=L.length;pn{if(x.getState()!==et.LOADED)return;this.image_=_?null:x;const v=x.getPixelRatio(),w=Jl(x.getResolution())*e/v;this.renderedResolution=w,this.coordinateToVectorPixelTransform_=hi(this.coordinateToVectorPixelTransform_,l/2,h/2,1/w,-1/w,0,-n.center[0],-n.center[1])}),x.load()}return this.image_&&(this.renderedPixelToCoordinateTransform_=t.pixelToCoordinateTransform.slice()),!!this.image_}preRender(){}postRender(){}renderDeclutter(){}forEachFeatureAtCoordinate(t,e,n,s,r){return this.vectorRenderer_?this.vectorRenderer_.forEachFeatureAtCoordinate(t,e,n,s,r):super.forEachFeatureAtCoordinate(t,e,n,s,r)}}class nP extends Na{constructor(t){t=t||{};const e=Object.assign({},t);delete e.imageRatio,super(e),this.imageRatio_=t.imageRatio!==void 0?t.imageRatio:1}getImageRatio(){return this.imageRatio_}createRenderer(){return new iP(this)}}const sP=nP,rP={image:["Polygon","Circle","LineString","Image","Text"],hybrid:["Polygon","LineString"],vector:[]},Yp={hybrid:["Image","Text","Default"],vector:["Polygon","Circle","LineString","Image","Text","Default"]};class oP extends hy{constructor(t){super(t),this.boundHandleStyleImageChange_=this.handleStyleImageChange_.bind(this),this.renderedLayerRevision_,this.renderedPixelToCoordinateTransform_=null,this.renderedRotation_,this.renderedOpacity_=1,this.tmpTransform_=pe(),this.tileClipContexts_=null}prepareTile(t,e,n){let s;const r=t.getState();return(r===q.LOADED||r===q.ERROR)&&(this.updateExecutorGroup_(t,e,n),this.tileImageNeedsRender_(t)&&(s=!0)),s}getTile(t,e,n,s){const r=s.pixelRatio,o=s.viewState,a=o.resolution,l=o.projection,h=this.getLayer(),c=h.getSource().getTile(t,e,n,r,l),u=s.viewHints,g=!(u[ee.ANIMATING]||u[ee.INTERACTING]);return(g||!c.wantedResolution)&&(c.wantedResolution=a),this.prepareTile(c,r,l)&&(g||Date.now()-s.time<8)&&h.getRenderMode()!=="vector"&&this.renderTileImage_(c,s),super.getTile(t,e,n,s)}isDrawableTile(t){const e=this.getLayer();return super.isDrawableTile(t)&&(e.getRenderMode()==="vector"?st(e)in t.executorGroups:t.hasContext(e))}getTileImage(t){return t.getImage(this.getLayer())}prepareFrame(t){const e=this.getLayer().getRevision();return this.renderedLayerRevision_!==e&&(this.renderedLayerRevision_=e,this.renderedTiles.length=0),super.prepareFrame(t)}updateExecutorGroup_(t,e,n){var s;const r=this.getLayer(),o=r.getRevision(),a=r.getRenderOrder()||null,l=t.wantedResolution,h=t.getReplayState(r);if(!h.dirty&&h.renderedResolution===l&&h.renderedRevision==o&&h.renderedRenderOrder==a)return;const c=r.getSource(),u=!!r.getDeclutter(),g=c.getTileGrid(),f=c.getTileGridForProjection(n).getTileCoordExtent(t.wrappedTileCoord),p=c.getSourceTiles(e,n,t),_=st(r);delete t.hitDetectionImageData[_],t.executorGroups[_]=[],h.dirty=!1;for(let x=0,v=p.length;x{const C=T?e.declutter[T].all().map(P=>P.value):null;for(let P=0,N=R.length;P{const s=this.getLayer(),r=st(s),o=s.getSource(),a=this.renderedProjection,l=a.getExtent(),h=this.renderedResolution,c=o.getTileGridForProjection(a),u=ae(this.renderedPixelToCoordinateTransform_,t.slice()),g=c.getTileCoordForCoordAndResolution(u,h);let f;for(let E=0,S=this.renderedTiles.length;E0){e([]);return}const p=c.getTileCoordExtent(f.wrappedTileCoord),_=zn(p),x=[(u[0]-_[0])/h,(_[1]-u[1])/h],v=f.getSourceTiles().reduce(function(E,S){return E.concat(S.getFeatures())},[]);let w=f.hitDetectionImageData[r];if(!w){const E=se(c.getTileSize(c.getZForResolution(h,o.zDirection))),S=this.renderedRotation_,T=[this.getRenderTransform(c.getTileCoordCenter(f.wrappedTileCoord),h,0,_i,E[0]*_i,E[1]*_i,0)];w=j_(E,T,v,s.getStyleFunction(),c.getTileCoordExtent(f.wrappedTileCoord),f.getReplayState(s).renderedResolution,S),f.hitDetectionImageData[r]=w}e(z_(x,v,w))})}handleFontsChanged(){const t=this.getLayer();t.getVisible()&&this.renderedLayerRevision_!==void 0&&t.changed()}handleStyleImageChange_(t){this.renderIfReadyAndVisible()}renderDeclutter(t,e){const n=this.context,s=n.globalAlpha;n.globalAlpha=e.opacity;const r=t.viewHints,o=!(r[ee.ANIMATING]||r[ee.INTERACTING]),a=this.renderedTiles;for(let l=0,h=a.length;l=0;--f)u[f].execute(this.context,[this.context.canvas.width,this.context.canvas.height],this.getTileRenderTransform(c,t),t.viewState.rotation,o,Xl,g?t.declutter[g]:void 0)}n.globalAlpha=s}renderDeferredInternal(t){const e=this.renderedTiles.reduce((s,r,o)=>(r.executorGroups[st(this.getLayer())].forEach(a=>s.push({executorGroup:a,index:o})),s),[]),n=e.map(({executorGroup:s})=>s.getDeferredZIndexContexts());n.map(s=>Object.keys(s)).flat().sort(on).map(Number).forEach(s=>{n.forEach((r,o)=>{r[s]&&r[s].forEach(a=>{const{executorGroup:l,index:h}=e[o],c=l.getRenderedContext(),u=c.globalAlpha;c.globalAlpha=this.renderedOpacity_;const g=this.tileClipContexts_[h];g&&g.draw(c),a.draw(c),g&&c.restore(),c.globalAlpha=u,a.clear()})})})}getTileRenderTransform(t,e){const n=e.pixelRatio,s=e.viewState,r=s.center,o=s.resolution,a=s.rotation,l=e.size,h=Math.round(l[0]*n),c=Math.round(l[1]*n),u=this.getLayer().getSource().getTileGridForProjection(e.viewState.projection),g=t.tileCoord,f=u.getTileCoordExtent(t.wrappedTileCoord),p=u.getTileCoordExtent(g,this.tmpExtent)[0]-f[0];return Qr(Fo(this.inversePixelTransform.slice(),1/n,1/n),this.getRenderTransform(r,o,a,n,h,c,p))}postRender(t,e){const n=e.viewHints,s=!(n[ee.ANIMATING]||n[ee.INTERACTING]);this.renderedPixelToCoordinateTransform_=e.pixelToCoordinateTransform.slice(),this.renderedRotation_=e.viewState.rotation,this.renderedOpacity_=e.layerStatesArray[e.layerIndex].opacity;const r=this.getLayer(),o=r.getRenderMode(),a=t.globalAlpha;t.globalAlpha=this.renderedOpacity_;const l=r.getDeclutter(),h=l?Yp[o].filter(E=>!Xl.includes(E)):Yp[o],c=e.viewState,u=c.rotation,g=r.getSource(),f=g.getTileGridForProjection(c.projection).getZForResolution(c.resolution,g.zDirection),p=this.renderedTiles,_=[],x=[],v=[];let w=!0;for(let E=p.length-1;E>=0;--E){const S=p[E];w=w&&!S.getReplayState(r).dirty;const T=S.executorGroups[st(r)].filter(B=>B.hasExecutors(h));if(T.length===0)continue;const R=this.getTileRenderTransform(S,e),C=S.tileCoord[0];let P=!1;const N=T[0].getClipCoords(R);let U=t,j;if(N){l&&(j=new Zd,U=j.getContext());for(let B=0,d=_.length;B1?`vec${t}`:"float"}function th(i){return(JSON.stringify(i).split("").reduce((t,e)=>(t<<5)-t+e.charCodeAt(0),0)>>>0).toString()}function lg(i,t,e,n){if(`${n}radius`in i&&n!=="icon-"){let s=_t(e,i[`${n}radius`],Y);if(`${n}radius2`in i){const r=_t(e,i[`${n}radius2`],Y);s=`max(${s}, ${r})`}`${n}stroke-width`in i&&(s=`(${s} + ${_t(e,i[`${n}stroke-width`],Y)} * 0.5)`),t.setSymbolSizeExpression(`vec2(${s} * 2. + 0.5)`)}if(`${n}scale`in i){const s=_t(e,i[`${n}scale`],Y|me);t.setSymbolSizeExpression(`${t.getSymbolSizeExpression()} * ${s}`)}`${n}displacement`in i&&t.setSymbolOffsetExpression(_t(e,i[`${n}displacement`],me)),`${n}rotation`in i&&t.setSymbolRotationExpression(_t(e,i[`${n}rotation`],Y)),`${n}rotate-with-view`in i&&t.setSymbolRotateWithView(!!i[`${n}rotate-with-view`])}function dy(i,t,e,n,s){let r="vec4(0.)";if(t!==null&&(r=t),e!==null&&n!==null){const l=`smoothstep(-${n} + 0.63, -${n} - 0.58, ${i})`;r=`mix(${e}, ${r}, ${l})`}const o=`(1.0 - smoothstep(-0.63, 0.58, ${i}))`;let a=`${r} * ${o}`;return s!==null&&(a=`${a} * ${s}`),a}function hg(i,t,e,n,s){const r=new Image;let o;return r.crossOrigin=i[`${n}cross-origin`]===void 0?"anonymous":i[`${n}cross-origin`],r.src=i[`${n}src`],r.complete&&r.width&&r.height?o=ng([r.width,r.height]):(e[`u_texture${s}_size`]=()=>r.complete?[r.width,r.height]:[0,0],t.addUniform(`vec2 u_texture${s}_size`),o=`u_texture${s}_size`),e[`u_texture${s}`]=r,t.addUniform(`sampler2D u_texture${s}`),o}function cg(i,t,e,n,s){let r=_t(e,i[`${t}offset`],me);if(`${t}offset-origin`in i)switch(i[`${t}offset-origin`]){case"top-right":r=`vec2(${n}.x, 0.) + ${s} * vec2(-1., 0.) + ${r} * vec2(-1., 1.)`;break;case"bottom-left":r=`vec2(0., ${n}.y) + ${s} * vec2(0., -1.) + ${r} * vec2(1., -1.)`;break;case"bottom-right":r=`${n} - ${s} - ${r}`;break}return r}function lP(i,t,e,n,s){s.functions.circleDistanceField=`float circleDistanceField(vec2 point, float radius) { - return length(point) - radius; -}`,lg(i,t,n,"circle-");let r=null;"circle-opacity"in i&&(r=_t(s,i["circle-opacity"],Y));let o="coordsPx";"circle-scale"in i&&(o=`coordsPx / ${_t(s,i["circle-scale"],Y|me)}`);let a=null;"circle-fill-color"in i&&(a=_t(s,i["circle-fill-color"],Wt));let l=null;"circle-stroke-color"in i&&(l=_t(s,i["circle-stroke-color"],Wt));let h=_t(s,i["circle-radius"],Y),c=null;"circle-stroke-width"in i&&(c=_t(s,i["circle-stroke-width"],Y),h=`(${h} + ${c} * 0.5)`);const u=`circleDistanceField(${o}, ${h})`,g=dy(u,a,l,c,r);t.setSymbolColorExpression(g)}function hP(i,t,e,n,s){s.functions.round=`float round(float v) { - return sign(v) * floor(abs(v) + 0.5); -}`,s.functions.starDistanceField=`float starDistanceField(vec2 point, float numPoints, float radius, float radius2, float angle) { - float startAngle = -PI * 0.5 + angle; // tip starts upwards and rotates clockwise with angle - float c = cos(startAngle); - float s = sin(startAngle); - vec2 pointRotated = vec2(c * point.x - s * point.y, s * point.x + c * point.y); - float alpha = TWO_PI / numPoints; // the angle of one sector - float beta = atan(pointRotated.y, pointRotated.x); - float gamma = round(beta / alpha) * alpha; // angle in sector - c = cos(-gamma); - s = sin(-gamma); - vec2 inSector = vec2(c * pointRotated.x - s * pointRotated.y, abs(s * pointRotated.x + c * pointRotated.y)); - vec2 tipToPoint = inSector + vec2(-radius, 0.); - vec2 edgeNormal = vec2(radius2 * sin(alpha * 0.5), -radius2 * cos(alpha * 0.5) + radius); - return dot(normalize(edgeNormal), tipToPoint); -}`,s.functions.regularDistanceField=`float regularDistanceField(vec2 point, float numPoints, float radius, float angle) { - float startAngle = -PI * 0.5 + angle; // tip starts upwards and rotates clockwise with angle - float c = cos(startAngle); - float s = sin(startAngle); - vec2 pointRotated = vec2(c * point.x - s * point.y, s * point.x + c * point.y); - float alpha = TWO_PI / numPoints; // the angle of one sector - float radiusIn = radius * cos(PI / numPoints); - float beta = atan(pointRotated.y, pointRotated.x); - float gamma = round((beta - alpha * 0.5) / alpha) * alpha + alpha * 0.5; // angle in sector from mid - c = cos(-gamma); - s = sin(-gamma); - vec2 inSector = vec2(c * pointRotated.x - s * pointRotated.y, abs(s * pointRotated.x + c * pointRotated.y)); - return inSector.x - radiusIn; -}`,lg(i,t,n,"shape-");let r=null;"shape-opacity"in i&&(r=_t(s,i["shape-opacity"],Y));let o="coordsPx";"shape-scale"in i&&(o=`coordsPx / ${_t(s,i["shape-scale"],Y|me)}`);let a=null;"shape-fill-color"in i&&(a=_t(s,i["shape-fill-color"],Wt));let l=null;"shape-stroke-color"in i&&(l=_t(s,i["shape-stroke-color"],Wt));let h=null;"shape-stroke-width"in i&&(h=_t(s,i["shape-stroke-width"],Y));const c=_t(s,i["shape-points"],Y);let u="0.";"shape-angle"in i&&(u=_t(s,i["shape-angle"],Y));let g,f=_t(s,i["shape-radius"],Y);if(h!==null&&(f=`${f} + ${h} * 0.5`),"shape-radius2"in i){let _=_t(s,i["shape-radius2"],Y);h!==null&&(_=`${_} + ${h} * 0.5`),g=`starDistanceField(${o}, ${c}, ${f}, ${_}, ${u})`}else g=`regularDistanceField(${o}, ${c}, ${f}, ${u})`;const p=dy(g,a,l,h,r);t.setSymbolColorExpression(p)}function cP(i,t,e,n,s){let r="vec4(1.0)";"icon-color"in i&&(r=_t(s,i["icon-color"],Wt)),"icon-opacity"in i&&(r=`${r} * ${_t(s,i["icon-opacity"],Y)}`);const o=th(i["icon-src"]),a=hg(i,t,e,"icon-",o);if(t.setSymbolColorExpression(`${r} * samplePremultiplied(u_texture${o}, v_texCoord)`).setSymbolSizeExpression(a),"icon-width"in i&&"icon-height"in i&&t.setSymbolSizeExpression(`vec2(${_t(n,i["icon-width"],Y)}, ${_t(n,i["icon-height"],Y)})`),"icon-offset"in i&&"icon-size"in i){const l=_t(n,i["icon-size"],me),h=t.getSymbolSizeExpression();t.setSymbolSizeExpression(l);const c=cg(i,"icon-",n,"v_quadSizePx",l);t.setTextureCoordinateExpression(`(vec4((${c}).xyxy) + vec4(0., 0., ${l})) / (${h}).xyxy`)}if(lg(i,t,n,"icon-"),"icon-anchor"in i){const l=_t(n,i["icon-anchor"],me);let h="1.0";"icon-scale"in i&&(h=_t(n,i["icon-scale"],Y|me));let c;i["icon-anchor-x-units"]==="pixels"&&i["icon-anchor-y-units"]==="pixels"?c=`${l} * ${h}`:i["icon-anchor-x-units"]==="pixels"?c=`${l} * vec2(vec2(${h}).x, v_quadSizePx.y)`:i["icon-anchor-y-units"]==="pixels"?c=`${l} * vec2(v_quadSizePx.x, vec2(${h}).x)`:c=`${l} * v_quadSizePx`;let u=`v_quadSizePx * vec2(0.5, -0.5) + ${c} * vec2(-1., 1.)`;if("icon-anchor-origin"in i)switch(i["icon-anchor-origin"]){case"top-right":u=`v_quadSizePx * -0.5 + ${c}`;break;case"bottom-left":u=`v_quadSizePx * 0.5 - ${c}`;break;case"bottom-right":u=`v_quadSizePx * vec2(-0.5, 0.5) + ${c} * vec2(1., -1.)`;break}t.setSymbolOffsetExpression(`${t.getSymbolOffsetExpression()} + ${u}`)}}function uP(i,t,e,n,s){if("stroke-color"in i&&t.setStrokeColorExpression(_t(s,i["stroke-color"],Wt)),"stroke-pattern-src"in i){const r=th(i["stroke-pattern-src"]),o=hg(i,t,e,"stroke-pattern-",r);let a=o,l="vec2(0.)";"stroke-pattern-offset"in i&&"stroke-pattern-size"in i&&(a=_t(s,i["stroke-pattern-size"],me),l=cg(i,"stroke-pattern-",s,o,a));let h="0.";"stroke-pattern-spacing"in i&&(h=_t(s,i["stroke-pattern-spacing"],Y)),s.functions.sampleStrokePattern=`vec4 sampleStrokePattern(sampler2D texture, vec2 textureSize, vec2 textureOffset, vec2 sampleSize, float spacingPx, float currentLengthPx, float currentRadiusRatio, float lineWidth) { - float currentLengthScaled = currentLengthPx * sampleSize.y / lineWidth; - float spacingScaled = spacingPx * sampleSize.y / lineWidth; - float uCoordPx = mod(currentLengthScaled, (sampleSize.x + spacingScaled)); - // make sure that we're not sampling too close to the borders to avoid interpolation with outside pixels - uCoordPx = clamp(uCoordPx, 0.5, sampleSize.x - 0.5); - float vCoordPx = (-currentRadiusRatio * 0.5 + 0.5) * sampleSize.y; - vec2 texCoord = (vec2(uCoordPx, vCoordPx) + textureOffset) / textureSize; - return samplePremultiplied(texture, texCoord); -}`;const c=`u_texture${r}`;let u="1.";"stroke-color"in i&&(u=t.getStrokeColorExpression()),t.setStrokeColorExpression(`${u} * sampleStrokePattern(${c}, ${o}, ${l}, ${a}, ${h}, currentLengthPx, currentRadiusRatio, v_width)`)}if("stroke-width"in i&&t.setStrokeWidthExpression(_t(n,i["stroke-width"],Y)),"stroke-offset"in i&&t.setStrokeOffsetExpression(_t(n,i["stroke-offset"],Y)),"stroke-line-cap"in i&&t.setStrokeCapExpression(_t(n,i["stroke-line-cap"],xe)),"stroke-line-join"in i&&t.setStrokeJoinExpression(_t(n,i["stroke-line-join"],xe)),"stroke-miter-limit"in i&&t.setStrokeMiterLimitExpression(_t(n,i["stroke-miter-limit"],Y)),"stroke-line-dash"in i){s.functions.getSingleDashDistance=`float getSingleDashDistance(float distance, float radius, float dashOffset, float dashLength, float dashLengthTotal, float capType) { - float localDistance = mod(distance, dashLengthTotal); - float distanceSegment = abs(localDistance - dashOffset - dashLength * 0.5) - dashLength * 0.5; - distanceSegment = min(distanceSegment, dashLengthTotal - localDistance); - if (capType == ${Mn("square")}) { - distanceSegment -= v_width * 0.5; - } else if (capType == ${Mn("round")}) { - distanceSegment = min(distanceSegment, sqrt(distanceSegment * distanceSegment + radius * radius) - v_width * 0.5); - } - return distanceSegment; -}`;let r=i["stroke-line-dash"].map(g=>_t(s,g,Y));r.length%2===1&&(r=[...r,...r]);let o="0.";"stroke-line-dash-offset"in i&&(o=_t(n,i["stroke-line-dash-offset"],Y));const a=`dashDistanceField_${th(i["stroke-line-dash"])}`,l=r.map((g,f)=>`float dashLength${f} = ${g};`),h=r.map((g,f)=>`dashLength${f}`).join(" + ");let c="0.",u=`getSingleDashDistance(distance, radius, ${c}, dashLength0, totalDashLength, capType)`;for(let g=2;gKl(i.variables[a.name]):a.type===Wt?h=()=>Hp([...Wi(i.variables[a.name]||"#eee")]):a.type===te?h=()=>i.variables[a.name]?1:0:h=()=>i.variables[a.name],s[l]=h}),Object.keys(e.properties).forEach(function(o){const a=e.properties[o];t.properties[o]||(t.properties[o]=a);let l=Fc(a.type),h=`a_prop_${a.name}`;a.type===Wt&&(l="vec4",h=`unpackColor(${h})`,n.addVertexShaderFunction(aP)),n.addVarying(`v_prop_${a.name}`,l,h)}),Object.keys(t.properties).forEach(function(o){const a=t.properties[o];n.addAttribute(`${Fc(a.type)} a_prop_${a.name}`)});const r=Object.keys(t.properties).map(function(o){const a=t.properties[o];let l;return a.evaluator?l=a.evaluator:a.type===xe?l=h=>Kl(h.get(a.name)):a.type===Wt?l=h=>Hp([...Wi(h.get(a.name)||"#eee")]):a.type===te?l=h=>h.get(a.name)?1:0:l=h=>h.get(a.name),{name:a.name,size:uy(a.type),callback:l}});for(const o in t.functions)n.addVertexShaderFunction(t.functions[o]);for(const o in e.functions)n.addFragmentShaderFunction(e.functions[o]);return{builder:n,attributes:r.reduce((o,a)=>({...o,[a.name]:{callback:a.callback,size:a.size}}),{}),uniforms:s}}class fP extends La{constructor(t){const e=Object.assign({},t);super(e),this.parseResult_=gP(t.style),this.styleVariables_=t.style.variables||{},this.hitDetectionDisabled_=!!t.disableHitDetection}createRenderer(){const t=Object.keys(this.parseResult_.attributes).map(e=>({name:e,...this.parseResult_.attributes[e]}));return new ey(this,{vertexShader:this.parseResult_.builder.getSymbolVertexShader(),fragmentShader:this.parseResult_.builder.getSymbolFragmentShader(),hitDetectionEnabled:!this.hitDetectionDisabled_,uniforms:this.parseResult_.uniforms,attributes:t})}updateStyleVariables(t){Object.assign(this.styleVariables_,t),this.changed()}}const pP=fP;function Kp(i,t){const e=` - attribute vec2 ${vl.TEXTURE_COORD}; - uniform mat4 ${St.TILE_TRANSFORM}; - uniform float ${St.TEXTURE_PIXEL_WIDTH}; - uniform float ${St.TEXTURE_PIXEL_HEIGHT}; - uniform float ${St.TEXTURE_RESOLUTION}; - uniform float ${St.TEXTURE_ORIGIN_X}; - uniform float ${St.TEXTURE_ORIGIN_Y}; - uniform float ${St.DEPTH}; - - varying vec2 v_textureCoord; - varying vec2 v_mapCoord; - - void main() { - v_textureCoord = ${vl.TEXTURE_COORD}; - v_mapCoord = vec2( - ${St.TEXTURE_ORIGIN_X} + ${St.TEXTURE_RESOLUTION} * ${St.TEXTURE_PIXEL_WIDTH} * v_textureCoord[0], - ${St.TEXTURE_ORIGIN_Y} - ${St.TEXTURE_RESOLUTION} * ${St.TEXTURE_PIXEL_HEIGHT} * v_textureCoord[1] - ); - gl_Position = ${St.TILE_TRANSFORM} * vec4(${vl.TEXTURE_COORD}, ${St.DEPTH}, 1.0); - } - `,n={...$I(),inFragmentShader:!0,bandCount:t,style:i},s=[];if(i.color!==void 0){const u=_t(n,i.color,Wt);s.push(`color = ${u};`)}if(i.contrast!==void 0){const u=_t(n,i.contrast,Y);s.push(`color.rgb = clamp((${u} + 1.0) * color.rgb - (${u} / 2.0), vec3(0.0, 0.0, 0.0), vec3(1.0, 1.0, 1.0));`)}if(i.exposure!==void 0){const u=_t(n,i.exposure,Y);s.push(`color.rgb = clamp((${u} + 1.0) * color.rgb, vec3(0.0, 0.0, 0.0), vec3(1.0, 1.0, 1.0));`)}if(i.saturation!==void 0){const u=_t(n,i.saturation,Y);s.push(` - float saturation = ${u} + 1.0; - float sr = (1.0 - saturation) * 0.2126; - float sg = (1.0 - saturation) * 0.7152; - float sb = (1.0 - saturation) * 0.0722; - mat3 saturationMatrix = mat3( - sr + saturation, sr, sr, - sg, sg + saturation, sg, - sb, sb, sb + saturation - ); - color.rgb = clamp(saturationMatrix * color.rgb, vec3(0.0, 0.0, 0.0), vec3(1.0, 1.0, 1.0)); - `)}if(i.gamma!==void 0){const u=_t(n,i.gamma,Y);s.push(`color.rgb = pow(color.rgb, vec3(1.0 / ${u}));`)}if(i.brightness!==void 0){const u=_t(n,i.brightness,Y);s.push(`color.rgb = clamp(color.rgb + ${u}, vec3(0.0, 0.0, 0.0), vec3(1.0, 1.0, 1.0));`)}const r={},o=Object.keys(n.variables).length;if(o>1&&!i.variables)throw new Error(`Missing variables in style (expected ${n.variables})`);for(let u=0;u ${St.RENDER_EXTENT}[2] || - v_mapCoord[1] > ${St.RENDER_EXTENT}[3] - ) { - discard; - } - - vec4 color = texture2D(${St.TILE_TEXTURE_ARRAY}[0], v_textureCoord); - - ${s.join(` -`)} - - gl_FragColor = color; - gl_FragColor.rgb *= gl_FragColor.a; - gl_FragColor *= ${St.TRANSITION_ALPHA}; - }`;return{vertexShader:e,fragmentShader:c,uniforms:r,paletteTextures:n.paletteTextures}}class eh extends ly{constructor(t){t=t?Object.assign({},t):{};const e=t.style||{};delete t.style;const n=t.cacheSize;delete t.cacheSize,super(t),this.sources_=t.sources,this.renderedSource_=null,this.renderedResolution_=NaN,this.style_=e,this.cacheSize_=n,this.styleVariables_=this.style_.variables||{},this.addChangeListener(Ut.SOURCE,this.handleSourceUpdate_)}getSources(t,e){const n=this.getSource();return this.sources_?typeof this.sources_=="function"?this.sources_(t,e):this.sources_:n?[n]:[]}getRenderSource(){return this.renderedSource_||this.getSource()}getSourceState(){const t=this.getRenderSource();return t?t.getState():"undefined"}handleSourceUpdate_(){this.hasRenderer()&&this.getRenderer().clearCache(),this.getSource()&&this.setStyle(this.style_)}getSourceBandCount_(){const t=Number.MAX_SAFE_INTEGER,e=this.getSources([-t,-t,t,t],t);return e&&e.length&&"bandCount"in e[0]?e[0].bandCount:4}createRenderer(){const t=Kp(this.style_,this.getSourceBandCount_());return new qI(this,{vertexShader:t.vertexShader,fragmentShader:t.fragmentShader,uniforms:t.uniforms,cacheSize:this.cacheSize_,paletteTextures:t.paletteTextures})}renderSources(t,e){const n=this.getRenderer();let s;for(let r=0,o=e.length;r{h.getState()=="ready"&&(h.removeEventListener("change",u),this.changed())};h.addEventListener("change",u)}r=r&&c=="ready"}const o=this.renderSources(t,s);if(this.getRenderer().renderComplete&&r)return this.renderedResolution_=n.resolution,o;if(this.renderedResolution_>.5*n.resolution){const a=this.getSources(t.extent,this.renderedResolution_).filter(l=>!s.includes(l));if(a.length>0)return this.renderSources(t,a)}return o}setStyle(t){this.styleVariables_=t.variables||{},this.style_=t;const e=Kp(this.style_,this.getSourceBandCount_());this.getRenderer().reset({vertexShader:e.vertexShader,fragmentShader:e.fragmentShader,uniforms:e.uniforms,paletteTextures:e.paletteTextures}),this.changed()}updateStyleVariables(t){Object.assign(this.styleVariables_,t),this.changed()}}eh.prototype.dispose;const mP=Object.freeze(Object.defineProperty({__proto__:null,Graticule:$C,Group:zh,Heatmap:tP,Image:og,Layer:La,Tile:Ql,Vector:Vd,VectorImage:sP,VectorTile:cy,WebGLPoints:pP,WebGLTile:eh},Symbol.toStringTag,{value:"Module"}));var Xe=(i,t,e)=>new Promise((n,s)=>{var r=l=>{try{a(e.next(l))}catch(h){s(h)}},o=l=>{try{a(e.throw(l))}catch(h){s(h)}},a=l=>l.done?n(l.value):Promise.resolve(l.value).then(r,o);a((e=e.apply(i,t)).next())}),yi=Uint8Array,Er=Uint16Array,_P=Int32Array,gy=new yi([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),fy=new yi([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),yP=new yi([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),py=function(i,t){for(var e=new Er(31),n=0;n<31;++n)e[n]=t+=1<>1|(qt&21845)<<1,bn=(bn&52428)>>2|(bn&13107)<<2,bn=(bn&61680)>>4|(bn&3855)<<4,Tu[qt]=((bn&65280)>>8|(bn&255)<<8)>>1;var bn,qt,Uo=function(i,t,e){for(var n=i.length,s=0,r=new Er(t);s>l]=h}else for(a=new Er(n),s=0;s>15-i[s]);return a},Ga=new yi(288);for(qt=0;qt<144;++qt)Ga[qt]=8;var qt;for(qt=144;qt<256;++qt)Ga[qt]=9;var qt;for(qt=256;qt<280;++qt)Ga[qt]=7;var qt;for(qt=280;qt<288;++qt)Ga[qt]=8;var qt,yy=new yi(32);for(qt=0;qt<32;++qt)yy[qt]=5;var qt,bP=Uo(Ga,9,1),EP=Uo(yy,5,1),Nc=function(i){for(var t=i[0],e=1;et&&(t=i[e]);return t},ki=function(i,t,e){var n=t/8|0;return(i[n]|i[n+1]<<8)>>(t&7)&e},kc=function(i,t){var e=t/8|0;return(i[e]|i[e+1]<<8|i[e+2]<<16)>>(t&7)},SP=function(i){return(i+7)/8|0},TP=function(i,t,e){(t==null||t<0)&&(t=0),(e==null||e>i.length)&&(e=i.length);var n=new yi(e-t);return n.set(i.subarray(t,e)),n},MP=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],pi=function(i,t,e){var n=new Error(t||MP[i]);if(n.code=i,Error.captureStackTrace&&Error.captureStackTrace(n,pi),!e)throw n;return n},ug=function(i,t,e,n){var s=i.length,r=n?n.length:0;if(!s||t.f&&!t.l)return e||new yi(0);var o=!e||t.i!=2,a=t.i;e||(e=new yi(s*3));var l=function(Tt){var Et=e.length;if(Tt>Et){var kt=new yi(Math.max(Et*2,Tt));kt.set(e),e=kt}},h=t.f||0,c=t.p||0,u=t.b||0,g=t.l,f=t.d,p=t.m,_=t.n,x=s*8;do{if(!g){h=ki(i,c,1);var v=ki(i,c+1,3);if(c+=3,v)if(v==1)g=bP,f=EP,p=9,_=5;else if(v==2){var w=ki(i,c,31)+257,E=ki(i,c+10,15)+4,S=w+ki(i,c+5,31)+1;c+=14;for(var T=new yi(S),R=new yi(19),C=0;C>4;if(B<16)T[C++]=B;else{var d=0,m=0;for(B==16?(m=3+ki(i,c,3),c+=2,d=T[C-1]):B==17?(m=3+ki(i,c,7),c+=3):B==18&&(m=11+ki(i,c,127),c+=7);m--;)T[C++]=d}}var y=T.subarray(0,w),b=T.subarray(w);p=Nc(y),_=Nc(b),g=Uo(y,p,1),f=Uo(b,_,1)}else pi(1);else{var B=SP(c)+4,M=i[B-4]|i[B-3]<<8,I=B+M;if(I>s){a&&pi(0);break}o&&l(u+M),e.set(i.subarray(B,I),u),t.b=u+=M,t.p=c=I*8,t.f=h;continue}if(c>x){a&&pi(0);break}}o&&l(u+131072);for(var A=(1<>4;if(c+=d&15,c>x){a&&pi(0);break}if(d||pi(2),W<256)e[u++]=W;else if(W==256){k=c,g=null;break}else{var K=W-254;if(W>264){var C=W-257,G=gy[C];K=ki(i,c,(1<>4;H||pi(3),c+=H&15;var b=wP[Q];if(Q>3){var G=fy[Q];b+=kc(i,c)&(1<x){a&&pi(0);break}o&&l(u+131072);var nt=u+K;if(u>3&1)+(t>>4&1);n>0;n-=!i[e++]);return e+(t&2)},IP=function(i){var t=i.length;return(i[t-4]|i[t-3]<<8|i[t-2]<<16|i[t-1]<<24)>>>0},PP=function(i,t){return((i[0]&15)!=8||i[0]>>4>7||(i[0]<<8|i[1])%31)&&pi(6,"invalid zlib data"),(i[1]>>5&1)==+!t&&pi(6,"invalid zlib data: "+(i[1]&32?"need":"unexpected")+" dictionary"),(i[1]>>3&4)+2};function AP(i,t){return ug(i,{i:2},t&&t.out,t&&t.dictionary)}function LP(i,t){var e=CP(i);return e+8>i.length&&pi(6,"invalid gzip data"),ug(i.subarray(e,-8),{i:2},t&&t.out||new yi(IP(i)),t&&t.dictionary)}function OP(i,t){return ug(i.subarray(PP(i,t&&t.dictionary),-4),{i:2},t&&t.out,t&&t.dictionary)}function Mu(i,t){return i[0]==31&&i[1]==139&&i[2]==8?LP(i,t):(i[0]&15)!=8||i[0]>>4>7||(i[0]<<8|i[1])%31?AP(i,t):OP(i,t)}var FP=typeof TextDecoder<"u"&&new TextDecoder,NP=0;try{FP.decode(RP,{stream:!0}),NP=1}catch{}var xy=(i,t)=>i*Math.pow(2,t),vo=(i,t)=>Math.floor(i/Math.pow(2,t)),ih=(i,t)=>xy(i.getUint16(t+1,!0),8)+i.getUint8(t),vy=(i,t)=>xy(i.getUint32(t+2,!0),16)+i.getUint16(t,!0),kP=(i,t,e,n,s)=>{if(i!=n.getUint8(s))return i-n.getUint8(s);const r=ih(n,s+1);if(t!=r)return t-r;const o=ih(n,s+4);return e!=o?e-o:0},DP=(i,t,e,n)=>{const s=wy(i,t|128,e,n);return s?{z:t,x:e,y:n,offset:s[0],length:s[1],is_dir:!0}:null},Qp=(i,t,e,n)=>{const s=wy(i,t,e,n);return s?{z:t,x:e,y:n,offset:s[0],length:s[1],is_dir:!1}:null},wy=(i,t,e,n)=>{let s=0,r=i.byteLength/17-1;for(;s<=r;){const o=r+s>>1,a=kP(t,e,n,i,o*17);if(a>0)s=o+1;else if(a<0)r=o-1;else return[vy(i,o*17+7),i.getUint32(o*17+13,!0)]}return null},GP=(i,t)=>i.is_dir&&!t.is_dir?1:!i.is_dir&&t.is_dir?-1:i.z!==t.z?i.z-t.z:i.x!==t.x?i.x-t.x:i.y-t.y,by=(i,t)=>{const e=i.getUint8(t*17);return{z:e&127,x:ih(i,t*17+1),y:ih(i,t*17+4),offset:vy(i,t*17+7),length:i.getUint32(t*17+13,!0),is_dir:e>>7===1}},Jp=i=>{const t=[],e=new DataView(i);for(let n=0;n{i.sort(GP);const t=new ArrayBuffer(17*i.length),e=new Uint8Array(t);for(let n=0;n>8&255,e[n*17+3]=s.x>>16&255,e[n*17+4]=s.y&255,e[n*17+5]=s.y>>8&255,e[n*17+6]=s.y>>16&255,e[n*17+7]=s.offset&255,e[n*17+8]=vo(s.offset,8)&255,e[n*17+9]=vo(s.offset,16)&255,e[n*17+10]=vo(s.offset,24)&255,e[n*17+11]=vo(s.offset,32)&255,e[n*17+12]=vo(s.offset,48)&255,e[n*17+13]=s.length&255,e[n*17+14]=s.length>>8&255,e[n*17+15]=s.length>>16&255,e[n*17+16]=s.length>>24&255}return t},zP=(i,t)=>{if(i.byteLength<17)return null;const e=i.byteLength/17,n=by(i,e-1);if(n.is_dir){const s=n.z,r=t.z-s,o=Math.trunc(t.x/(1<>>0)*4294967296+(i>>>0)}function qP(i,t){const e=t.buf;let n,s;if(s=e[t.pos++],n=(s&112)>>4,s<128||(s=e[t.pos++],n|=(s&127)<<3,s<128)||(s=e[t.pos++],n|=(s&127)<<10,s<128)||(s=e[t.pos++],n|=(s&127)<<17,s<128)||(s=e[t.pos++],n|=(s&127)<<24,s<128)||(s=e[t.pos++],n|=(s&1)<<31,s<128))return WP(i,n);throw new Error("Expected varint not more than 10 bytes")}function wo(i){const t=i.buf;let e,n;return n=t[i.pos++],e=n&127,n<128||(n=t[i.pos++],e|=(n&127)<<7,n<128)||(n=t[i.pos++],e|=(n&127)<<14,n<128)||(n=t[i.pos++],e|=(n&127)<<21,n<128)?e:(n=t[i.pos],e|=(n&15)<<28,qP(e,i))}function XP(i,t,e,n){if(n==0){e==1&&(t[0]=i-1-t[0],t[1]=i-1-t[1]);const s=t[0];t[0]=t[1],t[1]=s}}var ZP=[0,1,5,21,85,341,1365,5461,21845,87381,349525,1398101,5592405,22369621,89478485,357913941,1431655765,5726623061,22906492245,91625968981,366503875925,1466015503701,5864062014805,23456248059221,93824992236885,375299968947541,0x5555555555555];function $P(i,t,e){if(i>26)throw Error("Tile zoom level exceeds max safe number limit (26)");if(t>Math.pow(2,i)-1||e>Math.pow(2,i)-1)throw Error("tile x/y outside zoom level bounds");const n=ZP[i],s=Math.pow(2,i);let r=0,o=0,a=0;const l=[t,e];let h=s/2;for(;h>0;)r=(l[0]&h)>0?1:0,o=(l[1]&h)>0?1:0,a+=h*h*(3*r^o),XP(h,l,r,o),h=h/2;return n+a}function Sy(i,t){return Xe(this,null,function*(){if(t===1||t===0)return i;if(t===2){if(typeof globalThis.DecompressionStream>"u")return Mu(new Uint8Array(i));{let e=new Response(i).body.pipeThrough(new globalThis.DecompressionStream("gzip"));return new Response(e).arrayBuffer()}}else throw Error("Compression method not supported")})}var _r=(i=>(i[i.Unknown=0]="Unknown",i[i.Mvt=1]="Mvt",i[i.Png=2]="Png",i[i.Jpeg=3]="Jpeg",i[i.Webp=4]="Webp",i[i.Avif=5]="Avif",i))(_r||{}),VP=127;function YP(i,t){let e=0,n=i.length-1;for(;e<=n;){const s=n+e>>1,r=t-i[s].tileId;if(r>0)e=s+1;else if(r<0)n=s-1;else return i[s]}return n>=0&&(i[n].runLength===0||t-i[n].tileId=300)throw Error("Bad response code: "+r.status);const o=r.headers.get("Content-Length");if(r.status===200&&(!o||+o>t))throw n&&n.abort(),Error("Server returned no content-length header or content-length exceeding request. Check that your storage backend supports HTTP Byte Serving.");return{data:yield r.arrayBuffer(),etag:r.headers.get("ETag")||void 0,cacheControl:r.headers.get("Cache-Control")||void 0,expires:r.headers.get("Expires")||void 0}})}};function Di(i,t){const e=i.getUint32(t+4,!0),n=i.getUint32(t+0,!0);return e*Math.pow(2,32)+n}function KP(i,t){const e=new DataView(i),n=e.getUint8(7);if(n>3)throw Error(`Archive is spec version ${n} but this library supports up to spec version 3`);return{specVersion:n,rootDirectoryOffset:Di(e,8),rootDirectoryLength:Di(e,16),jsonMetadataOffset:Di(e,24),jsonMetadataLength:Di(e,32),leafDirectoryOffset:Di(e,40),leafDirectoryLength:Di(e,48),tileDataOffset:Di(e,56),tileDataLength:Di(e,64),numAddressedTiles:Di(e,72),numTileEntries:Di(e,80),numTileContents:Di(e,88),clustered:e.getUint8(96)===1,internalCompression:e.getUint8(97),tileCompression:e.getUint8(98),tileType:e.getUint8(99),minZoom:e.getUint8(100),maxZoom:e.getUint8(101),minLon:e.getInt32(102,!0)/1e7,minLat:e.getInt32(106,!0)/1e7,maxLon:e.getInt32(110,!0)/1e7,maxLat:e.getInt32(114,!0)/1e7,centerZoom:e.getUint8(118),centerLon:e.getInt32(119,!0)/1e7,centerLat:e.getInt32(123,!0)/1e7,etag:t}}function Ty(i){const t={buf:new Uint8Array(i),pos:0},e=wo(t),n=[];let s=0;for(let r=0;r0?n[r].offset=n[r-1].offset+n[r-1].length:n[r].offset=o-1}return n}function QP(i){const t=new DataView(i);return t.getUint16(2,!0)===2?(console.warn("PMTiles spec version 2 has been deprecated; please see github.com/protomaps/PMTiles for tools to upgrade"),2):t.getUint16(2,!0)===1?(console.warn("PMTiles spec version 1 has been deprecated; please see github.com/protomaps/PMTiles for tools to upgrade"),1):3}var Sr=class extends Error{};function JP(i,t,e,n){return Xe(this,null,function*(){const s=yield i.getBytes(0,16384);if(new DataView(s.data).getUint16(0,!0)!==19792)throw new Error("Wrong magic number for PMTiles archive");if(QP(s.data)<3)return[yield Ey.getHeader(i)];const r=s.data.slice(0,VP);let o=s.etag;n&&s.etag!=n&&(console.warn("ETag conflict detected; your HTTP server might not support content-based ETag headers. ETags disabled for "+i.getKey()),o=void 0);const a=KP(r,o);if(e){const l=s.data.slice(a.rootDirectoryOffset,a.rootDirectoryOffset+a.rootDirectoryLength),h=i.getKey()+"|"+(a.etag||"")+"|"+a.rootDirectoryOffset+"|"+a.rootDirectoryLength,c=Ty(yield t(l,a.internalCompression));return[a,[h,c.length,c]]}return[a,void 0]})}function tA(i,t,e,n,s){return Xe(this,null,function*(){const r=yield i.getBytes(e,n);if(s.etag&&s.etag!==r.etag)throw new Sr(r.etag);const o=yield t(r.data,s.internalCompression),a=Ty(o);if(a.length===0)throw new Error("Empty directory is invalid");return a})}var eA=class{constructor(i=100,t=!0,e=Sy){this.cache=new Map,this.maxCacheEntries=i,this.counter=1,this.prefetch=t,this.decompress=e}getHeader(i,t){return Xe(this,null,function*(){const e=i.getKey();if(this.cache.has(e))return this.cache.get(e).lastUsed=this.counter++,yield this.cache.get(e).data;const n=new Promise((s,r)=>{JP(i,this.decompress,this.prefetch,t).then(o=>{o[1]&&this.cache.set(o[1][0],{lastUsed:this.counter++,data:Promise.resolve(o[1][2])}),s(o[0]),this.prune()}).catch(o=>{r(o)})});return this.cache.set(e,{lastUsed:this.counter++,data:n}),n})}getDirectory(i,t,e,n){return Xe(this,null,function*(){const s=i.getKey()+"|"+(n.etag||"")+"|"+t+"|"+e;if(this.cache.has(s))return this.cache.get(s).lastUsed=this.counter++,yield this.cache.get(s).data;const r=new Promise((o,a)=>{tA(i,this.decompress,t,e,n).then(l=>{o(l),this.prune()}).catch(l=>{a(l)})});return this.cache.set(s,{lastUsed:this.counter++,data:r}),r})}getArrayBuffer(i,t,e,n){return Xe(this,null,function*(){const s=i.getKey()+"|"+(n.etag||"")+"|"+t+"|"+e;if(this.cache.has(s))return this.cache.get(s).lastUsed=this.counter++,yield this.cache.get(s).data;const r=new Promise((o,a)=>{i.getBytes(t,e).then(l=>{if(n.etag&&n.etag!==l.etag)throw new Sr(l.etag);o(l.data),this.cache.has(s),this.prune()}).catch(l=>{a(l)})});return this.cache.set(s,{lastUsed:this.counter++,data:r}),r})}prune(){if(this.cache.size>=this.maxCacheEntries){let i=1/0,t;this.cache.forEach((e,n)=>{e.lastUsedr.maxZoom)return;let o=r.rootDirectoryOffset,a=r.rootDirectoryLength;for(let l=0;l<=3;l++){const h=yield this.cache.getDirectory(this.source,o,a,r),c=YP(h,s);if(c)if(c.runLength>0){const u=yield this.source.getBytes(r.tileDataOffset+c.offset,c.length,n);if(r.etag&&r.etag!==u.etag)throw new Sr(u.etag);return{data:yield this.decompress(u.data,r.tileCompression),cacheControl:u.cacheControl,expires:u.expires}}else o=r.leafDirectoryOffset+c.offset,a=c.length;else return}throw Error("Maximum directory depth exceeded")})}getZxy(i,t,e,n){return Xe(this,null,function*(){try{return yield this.getZxyAttempt(i,t,e,n)}catch(s){if(s instanceof Sr)return this.cache.invalidate(this.source,s.message),yield this.getZxyAttempt(i,t,e,n);throw s}})}getMetadataAttempt(){return Xe(this,null,function*(){const i=yield this.cache.getHeader(this.source),t=yield this.source.getBytes(i.jsonMetadataOffset,i.jsonMetadataLength);if(i.etag&&i.etag!==t.etag)throw new Sr(t.etag);const e=yield this.decompress(t.data,i.internalCompression),n=new TextDecoder("utf-8");return JSON.parse(n.decode(e))})}getMetadata(){return Xe(this,null,function*(){try{return yield this.getMetadataAttempt()}catch(i){if(i instanceof Sr)return this.cache.invalidate(this.source,i.message),yield this.getMetadataAttempt();throw i}})}};class iA extends gn{constructor(t){super(Lt.ERROR),this.error=t}}class $h extends eg{clear(){for(;this.getCount()>0;)this.pop().release();super.clear()}expireCache(t){for(;this.canExpireCache()&&!(this.peekLast().getKey()in t);)this.pop().release()}pruneExceptNewestZ(){if(this.getCount()===0)return;const t=this.peekFirstKey(),e=sy(t)[0];this.forEach(n=>{n.tileCoord[0]!==e&&(this.remove(es(n.tileCoord)),n.release())})}}const Or={TILELOADSTART:"tileloadstart",TILELOADEND:"tileloadend",TILELOADERROR:"tileloaderror"},ur=[0,0,0],Jn=5;class ys{constructor(t){this.minZoom=t.minZoom!==void 0?t.minZoom:0,this.resolutions_=t.resolutions,At(Wx(this.resolutions_,(s,r)=>r-s,!0),"`resolutions` must be sorted in descending order");let e;if(!t.origins){for(let s=0,r=this.resolutions_.length-1;s{const o=new Zh(Math.min(0,s[0]),Math.max(s[0]-1,-1),Math.min(0,s[1]),Math.max(s[1]-1,-1));if(n){const a=this.getTileRangeForExtentAndZ(n,r);o.minX=Math.max(a.minX,o.minX),o.maxX=Math.min(a.maxX,o.maxX),o.minY=Math.max(a.minY,o.minY),o.maxY=Math.min(a.maxY,o.maxY)}return o}):n&&this.calculateTileRanges_(n)}forEachTileCoord(t,e,n){const s=this.getTileRangeForExtentAndZ(t,e);for(let r=s.minX,o=s.maxX;r<=o;++r)for(let a=s.minY,l=s.maxY;a<=l;++a)n([e,r,a])}forEachTileCoordParentTileRange(t,e,n,s){let r,o,a,l=null,h=t[0]-1;for(this.zoomFactor_===2?(o=t[1],a=t[2]):l=this.getTileCoordExtent(t,s);h>=this.minZoom;){if(o!==void 0&&a!==void 0?(o=Math.floor(o/2),a=Math.floor(a/2),r=lr(o,o,a,a,n)):r=this.getTileRangeForExtentAndZ(l,h,n),e(h,r))return!0;--h}return!1}getExtent(){return this.extent_}getMaxZoom(){return this.maxZoom}getMinZoom(){return this.minZoom}getOrigin(t){return this.origin_?this.origin_:this.origins_[t]}getResolution(t){return this.resolutions_[t]}getResolutions(){return this.resolutions_}getTileCoordChildTileRange(t,e,n){if(t[0]this.maxZoom||e0?S=e.find(function(T){return E[c]==T[h]?!0:E[c].includes(":")?!1:i[c]+":"+E[c]===T[h]}):S=!0,S){s.push(E[c]);const T=E[u]*28e-5/v,R=E[f],C=E[p];w?r.push([E[g][1],E[g][0]]):r.push(E[g]),n.push(T),o.push(R==C?R:[R,C]),a.push([E.MatrixWidth,E.MatrixHeight])}}),new nA({extent:t,origins:r,resolutions:n,matrixIds:s,tileSizes:o,sizes:a})}function gg(i){let t=i.getDefaultTileGrid();return t||(t=aA(i),i.setDefaultTileGrid(t)),t}function rA(i,t,e){const n=t[0],s=i.getTileCoordCenter(t),r=qn(e);if(!xi(r,s)){const o=yt(r),a=Math.ceil((r[0]-s[0])/o);return s[0]+=o*a,i.getTileCoordForCoordAndZ(s,n)}return t}function oA(i,t,e,n){n=n!==void 0?n:"top-left";const s=My(i,t,e);return new ys({extent:i,origin:ev(i,n),resolutions:s,tileSize:e})}function Js(i){const t=i||{},e=t.extent||tt("EPSG:3857").getExtent(),n={extent:e,minZoom:t.minZoom,tileSize:t.tileSize,resolutions:My(e,t.maxZoom,t.tileSize,t.maxResolution)};return new ys(n)}function My(i,t,e,n){t=t!==void 0?t:S_,e=se(e!==void 0?e:qr);const s=Vt(i),r=yt(i);n=n>0?n:Math.max(r/e[0],s/e[1]);const o=t+1,a=new Array(o);for(let l=0;ln.highWaterMark&&(n.highWaterMark=t)}useTile(t,e,n,s){}}class Ry extends gn{constructor(t,e){super(t),this.tile=e}}const ja=lA;class fg extends ja{constructor(t){const e=t.projection===void 0?"EPSG:3857":t.projection;let n=t.tileGrid;n===void 0&&e&&(n=Js({extent:qn(e),maxResolution:t.maxResolution,maxZoom:t.maxZoom,minZoom:t.minZoom,tileSize:t.tileSize})),super({cacheSize:.1,attributions:t.attributions,attributionsCollapsible:t.attributionsCollapsible,projection:e,tileGrid:n,opaque:t.opaque,state:t.state,wrapX:t.wrapX,transition:t.transition,interpolate:t.interpolate}),this.gutter_=t.gutter!==void 0?t.gutter:0,this.tileSize_=t.tileSize?se(t.tileSize):null,this.tileSizes_=null,this.tileLoadingKeys_={},this.loader_=t.loader,this.handleTileChange_=this.handleTileChange_.bind(this),this.bandCount=t.bandCount===void 0?4:t.bandCount,this.tileGridForProjection_={},this.tileCacheForProjection_={}}setTileSizes(t){this.tileSizes_=t}getTileSize(t){if(this.tileSizes_)return this.tileSizes_[t];if(this.tileSize_)return this.tileSize_;const e=this.getTileGrid();return e?se(e.getTileSize(t)):[256,256]}getGutterForProjection(t){const e=this.getProjection();return!e||Ae(e,t)?this.gutter_:0}setLoader(t){this.loader_=t}getReprojTile_(t,e,n,s,r){const o=this.getTileCacheForProjection(s),a=un(t,e,n);if(o.containsKey(a)){const x=o.get(a);if(x&&x.key==this.getKey())return x}const l=this.getTileGrid(),h=Math.max.apply(null,l.getResolutions().map((x,v)=>{const w=se(l.getTileSize(v)),E=this.getTileSize(v);return Math.max(E[0]/w[0],E[1]/w[1])})),c=this.getTileGridForProjection(r),u=this.getTileGridForProjection(s),g=[t,e,n],f=this.getTileCoordForTileUrlFunction(g,s),p=Object.assign({sourceProj:r,sourceTileGrid:c,targetProj:s,targetTileGrid:u,tileCoord:g,wrappedTileCoord:f,pixelRatio:h,gutter:this.getGutterForProjection(r),getTileFunction:(x,v,w,E)=>this.getTile(x,v,w,E,r)},this.tileOptions),_=new tg(p);return _.key=this.getKey(),_}getTile(t,e,n,s,r){const o=this.getProjection();if(o&&r&&!Ae(o,r))return this.getReprojTile_(t,e,n,r,o);const a=this.getTileSize(t),l=un(t,e,n);if(this.tileCache.containsKey(l))return this.tileCache.get(l);const h=this.loader_;function c(){return Vm(function(){return h(t,e,n)})}const u=Object.assign({tileCoord:[t,e,n],loader:c,size:a},this.tileOptions),g=new Kd(u);return g.key=this.getKey(),g.addEventListener(Lt.CHANGE,this.handleTileChange_),this.tileCache.set(l,g),g}handleTileChange_(t){const e=t.target,n=st(e),s=e.getState();let r;s==q.LOADING?(this.tileLoadingKeys_[n]=!0,r=Or.TILELOADSTART):n in this.tileLoadingKeys_&&(delete this.tileLoadingKeys_[n],r=s==q.ERROR?Or.TILELOADERROR:s==q.LOADED?Or.TILELOADEND:void 0),r&&this.dispatchEvent(new Ry(r,e))}getTileGridForProjection(t){const e=this.getProjection();if(this.tileGrid&&(!e||Ae(e,t)))return this.tileGrid;const n=st(t);return n in this.tileGridForProjection_||(this.tileGridForProjection_[n]=gg(t)),this.tileGridForProjection_[n]}setTileGridForProjection(t,e){const n=tt(t);if(n){const s=st(n);s in this.tileGridForProjection_||(this.tileGridForProjection_[s]=e)}}getTileCacheForProjection(t){const e=this.getProjection();if(!e||Ae(e,t))return this.tileCache;const n=st(t);return n in this.tileCacheForProjection_||(this.tileCacheForProjection_[n]=new $h(.1)),this.tileCacheForProjection_[n]}expireCache(t,e){const n=this.getTileCacheForProjection(t);this.tileCache.expireCache(this.tileCache==n?e:{});for(const s in this.tileCacheForProjection_){const r=this.tileCacheForProjection_[s];r.expireCache(r==n?e:{})}}clear(){super.clear();for(const t in this.tileCacheForProjection_)this.tileCacheForProjection_[t].clear()}}function Fe(i){return(t,...e)=>hA(i,t,e)}function lo(i,t){return Fe(Cy(i,t).get)}const{apply:hA,construct:UD,defineProperty:BD,get:WD,getOwnPropertyDescriptor:Cy,getPrototypeOf:pg,has:qD,ownKeys:cA,set:XD,setPrototypeOf:ZD}=Reflect,{iterator:za,species:$D,toStringTag:uA,for:VD}=Symbol,dA=Object,{create:mg,defineProperty:gA,freeze:YD,is:HD}=dA,fA=Array,pA=fA.prototype,Iy=pA[za],mA=Fe(Iy),Py=ArrayBuffer,_A=Py.prototype;lo(_A,"byteLength");const tm=typeof SharedArrayBuffer<"u"?SharedArrayBuffer:null;tm&&lo(tm.prototype,"byteLength");const Ay=pg(Uint8Array);Ay.from;const He=Ay.prototype;He[za];Fe(He.keys);Fe(He.values);Fe(He.entries);Fe(He.set);Fe(He.reverse);Fe(He.fill);Fe(He.copyWithin);Fe(He.sort);Fe(He.slice);Fe(He.subarray);lo(He,"buffer");lo(He,"byteOffset");lo(He,"length");lo(He,uA);const yA=Uint8Array,Ly=Uint16Array,_g=Uint32Array,xA=Float32Array,ga=pg([][za]()),Oy=Fe(ga.next),vA=Fe(function*(){}().next),wA=pg(ga),bA=DataView.prototype,EA=Fe(bA.getUint16),yg=WeakMap,Fy=yg.prototype,Ny=Fe(Fy.get),SA=Fe(Fy.set),ky=new yg,TA=mg(null,{next:{value:function(){const i=Ny(ky,this);return Oy(i)}},[za]:{value:function(){return this}}});function MA(i){if(i[za]===Iy&&ga.next===Oy)return i;const t=mg(TA);return SA(ky,t,mA(i)),t}const RA=new yg,CA=mg(wA,{next:{value:function(){const i=Ny(RA,this);return vA(i)},writable:!0,configurable:!0}});for(const i of cA(ga))i!=="next"&&gA(CA,i,Cy(ga,i));const Dy=new Py(4),IA=new xA(Dy),PA=new _g(Dy),Hi=new Ly(512),Ki=new yA(512);for(let i=0;i<256;++i){const t=i-127;t<-27?(Hi[i]=0,Hi[i|256]=32768,Ki[i]=24,Ki[i|256]=24):t<-14?(Hi[i]=1024>>-t-14,Hi[i|256]=1024>>-t-14|32768,Ki[i]=-t-1,Ki[i|256]=-t-1):t<=15?(Hi[i]=t+15<<10,Hi[i|256]=t+15<<10|32768,Ki[i]=13,Ki[i|256]=13):t<128?(Hi[i]=31744,Hi[i|256]=64512,Ki[i]=24,Ki[i|256]=24):(Hi[i]=31744,Hi[i|256]=64512,Ki[i]=13,Ki[i|256]=13)}const xg=new _g(2048);for(let i=1;i<1024;++i){let t=i<<13,e=0;for(;!(t&8388608);)t<<=1,e-=8388608;t&=-8388609,e+=947912704,xg[i]=t|e}for(let i=1024;i<2048;++i)xg[i]=939524096+(i-1024<<13);const ho=new _g(64);for(let i=1;i<31;++i)ho[i]=i<<23;ho[31]=1199570944;ho[32]=2147483648;for(let i=33;i<63;++i)ho[i]=2147483648+(i-32<<23);ho[63]=3347054592;const Gy=new Ly(64);for(let i=1;i<64;++i)i!==32&&(Gy[i]=1024);function AA(i){const t=i>>10;return PA[0]=xg[Gy[t]+(i&1023)]+ho[t],IA[0]}function jy(i,t,...e){return AA(EA(i,t,...MA(e)))}var vg={exports:{}};function zy(i,t,e){const n=e&&e.debug||!1;n&&console.log("[xml-utils] getting "+t+" in "+i);const s=typeof i=="object"?i.outer:i,r=s.slice(0,s.indexOf(">")+1),o=['"',"'"];for(let a=0;a/]`,r);if(n&&console.log("[xml-utils] start:",o),o===-1)return;const a=i.slice(o+t.length);let l=Gc(a,"^[^<]*[ /]>",0);const h=l!==-1&&a[l-1]==="/";if(n&&console.log("[xml-utils] selfClosing:",h),h===!1)if(s){let f=0,p=1,_=0;for(;(l=Gc(a,"[ /]"+t+">",f))!==-1;){const x=a.substring(f,l+1);if(p+=em(x,"<"+t+`[ - >]`),_+=em(x,""),_>=p)break;f=l}}else l=Gc(a,"[ /]"+t+">",0);const c=o+t.length+l+1;if(n&&console.log("[xml-utils] end:",c),c===-1)return;const u=i.slice(o,c);let g;return h?g=null:g=u.slice(u.indexOf(">")+1,u.lastIndexOf("<")),{inner:g,outer:u,start:o,end:c}}bg.exports=qy;bg.exports.default=qy;var DA=bg.exports;const GA=DA;function Xy(i,t,e){const n=[],s=e&&e.debug||!1,r=e&&typeof e.nested=="boolean"?e.nested:!0;let o=e&&e.startIndex||0,a;for(;a=GA(i,t,{debug:s,startIndex:o});)r?o=a.start+1+t.length:o=a.end,n.push(a);return s&&console.log("findTagsByName found",n.length,"tags"),n}wg.exports=Xy;wg.exports.default=Xy;var jA=wg.exports;const zA=eo(jA),Bo={315:"Artist",258:"BitsPerSample",265:"CellLength",264:"CellWidth",320:"ColorMap",259:"Compression",33432:"Copyright",306:"DateTime",338:"ExtraSamples",266:"FillOrder",289:"FreeByteCounts",288:"FreeOffsets",291:"GrayResponseCurve",290:"GrayResponseUnit",316:"HostComputer",270:"ImageDescription",257:"ImageLength",256:"ImageWidth",271:"Make",281:"MaxSampleValue",280:"MinSampleValue",272:"Model",254:"NewSubfileType",274:"Orientation",262:"PhotometricInterpretation",284:"PlanarConfiguration",296:"ResolutionUnit",278:"RowsPerStrip",277:"SamplesPerPixel",305:"Software",279:"StripByteCounts",273:"StripOffsets",255:"SubfileType",263:"Threshholding",282:"XResolution",283:"YResolution",326:"BadFaxLines",327:"CleanFaxData",343:"ClipPath",328:"ConsecutiveBadFaxLines",433:"Decode",434:"DefaultImageColor",269:"DocumentName",336:"DotRange",321:"HalftoneHints",346:"Indexed",347:"JPEGTables",285:"PageName",297:"PageNumber",317:"Predictor",319:"PrimaryChromaticities",532:"ReferenceBlackWhite",339:"SampleFormat",340:"SMinSampleValue",341:"SMaxSampleValue",559:"StripRowCounts",330:"SubIFDs",292:"T4Options",293:"T6Options",325:"TileByteCounts",323:"TileLength",324:"TileOffsets",322:"TileWidth",301:"TransferFunction",318:"WhitePoint",344:"XClipPathUnits",286:"XPosition",529:"YCbCrCoefficients",531:"YCbCrPositioning",530:"YCbCrSubSampling",345:"YClipPathUnits",287:"YPosition",37378:"ApertureValue",40961:"ColorSpace",36868:"DateTimeDigitized",36867:"DateTimeOriginal",34665:"Exif IFD",36864:"ExifVersion",33434:"ExposureTime",41728:"FileSource",37385:"Flash",40960:"FlashpixVersion",33437:"FNumber",42016:"ImageUniqueID",37384:"LightSource",37500:"MakerNote",37377:"ShutterSpeedValue",37510:"UserComment",33723:"IPTC",34675:"ICC Profile",700:"XMP",42112:"GDAL_METADATA",42113:"GDAL_NODATA",34377:"Photoshop",33550:"ModelPixelScale",33922:"ModelTiepoint",34264:"ModelTransformation",34735:"GeoKeyDirectory",34736:"GeoDoubleParams",34737:"GeoAsciiParams",50674:"LercParameters"},Ji={};for(const i in Bo)Bo.hasOwnProperty(i)&&(Ji[Bo[i]]=parseInt(i,10));const UA=[Ji.BitsPerSample,Ji.ExtraSamples,Ji.SampleFormat,Ji.StripByteCounts,Ji.StripOffsets,Ji.StripRowCounts,Ji.TileByteCounts,Ji.TileOffsets,Ji.SubIFDs],jc={1:"BYTE",2:"ASCII",3:"SHORT",4:"LONG",5:"RATIONAL",6:"SBYTE",7:"UNDEFINED",8:"SSHORT",9:"SLONG",10:"SRATIONAL",11:"FLOAT",12:"DOUBLE",13:"IFD",16:"LONG8",17:"SLONG8",18:"IFD8"},Mt={};for(const i in jc)jc.hasOwnProperty(i)&&(Mt[jc[i]]=parseInt(i,10));const Qe={WhiteIsZero:0,BlackIsZero:1,RGB:2,Palette:3,TransparencyMask:4,CMYK:5,YCbCr:6,CIELab:8,ICCLab:9},BA={Unspecified:0,Assocalpha:1,Unassalpha:2},KD={Version:0,AddCompression:1},QD={None:0,Deflate:1,Zstandard:2},WA={1024:"GTModelTypeGeoKey",1025:"GTRasterTypeGeoKey",1026:"GTCitationGeoKey",2048:"GeographicTypeGeoKey",2049:"GeogCitationGeoKey",2050:"GeogGeodeticDatumGeoKey",2051:"GeogPrimeMeridianGeoKey",2052:"GeogLinearUnitsGeoKey",2053:"GeogLinearUnitSizeGeoKey",2054:"GeogAngularUnitsGeoKey",2055:"GeogAngularUnitSizeGeoKey",2056:"GeogEllipsoidGeoKey",2057:"GeogSemiMajorAxisGeoKey",2058:"GeogSemiMinorAxisGeoKey",2059:"GeogInvFlatteningGeoKey",2060:"GeogAzimuthUnitsGeoKey",2061:"GeogPrimeMeridianLongGeoKey",2062:"GeogTOWGS84GeoKey",3072:"ProjectedCSTypeGeoKey",3073:"PCSCitationGeoKey",3074:"ProjectionGeoKey",3075:"ProjCoordTransGeoKey",3076:"ProjLinearUnitsGeoKey",3077:"ProjLinearUnitSizeGeoKey",3078:"ProjStdParallel1GeoKey",3079:"ProjStdParallel2GeoKey",3080:"ProjNatOriginLongGeoKey",3081:"ProjNatOriginLatGeoKey",3082:"ProjFalseEastingGeoKey",3083:"ProjFalseNorthingGeoKey",3084:"ProjFalseOriginLongGeoKey",3085:"ProjFalseOriginLatGeoKey",3086:"ProjFalseOriginEastingGeoKey",3087:"ProjFalseOriginNorthingGeoKey",3088:"ProjCenterLongGeoKey",3089:"ProjCenterLatGeoKey",3090:"ProjCenterEastingGeoKey",3091:"ProjCenterNorthingGeoKey",3092:"ProjScaleAtNatOriginGeoKey",3093:"ProjScaleAtCenterGeoKey",3094:"ProjAzimuthAngleGeoKey",3095:"ProjStraightVertPoleLongGeoKey",3096:"ProjRectifiedGridAngleGeoKey",4096:"VerticalCSTypeGeoKey",4097:"VerticalCitationGeoKey",4098:"VerticalDatumGeoKey",4099:"VerticalUnitsGeoKey"};function qA(i,t){const{width:e,height:n}=i,s=new Uint8Array(e*n*3);let r;for(let o=0,a=0;o>24,l=i[s+2]<<24>>24;let h=(o+16)/116,c=a/500+h,u=h-l/200,g,f,p;c=YA*(c*c*c>.008856?c*c*c:(c-16/116)/7.787),h=HA*(h*h*h>.008856?h*h*h:(h-16/116)/7.787),u=KA*(u*u*u>.008856?u*u*u:(u-16/116)/7.787),g=c*3.2406+h*-1.5372+u*-.4986,f=c*-.9689+h*1.8758+u*.0415,p=c*.0557+h*-.204+u*1.057,g=g>.0031308?1.055*g**(1/2.4)-.055:12.92*g,f=f>.0031308?1.055*f**(1/2.4)-.055:12.92*f,p=p>.0031308?1.055*p**(1/2.4)-.055:12.92*p,n[r]=Math.max(0,Math.min(1,g))*255,n[r+1]=Math.max(0,Math.min(1,f))*255,n[r+2]=Math.max(0,Math.min(1,p))*255}return n}const Zy=new Map;function xs(i,t){Array.isArray(i)||(i=[i]),i.forEach(e=>Zy.set(e,t))}async function $y(i){const t=Zy.get(i.Compression);if(!t)throw new Error(`Unknown compression method identifier: ${i.Compression}`);const e=await t();return new e(i)}xs([void 0,1],()=>jn(()=>import("./raw-CcGKjn8q-DFOt-i8n.Bw407ngt.js"),__vite__mapDeps([0,1])).then(i=>i.default));xs(5,()=>jn(()=>import("./lzw-BOMhmEDy-Dboc93VO.P5nsTiIb.js"),__vite__mapDeps([2,1])).then(i=>i.default));xs(6,()=>{throw new Error("old style JPEG compression is not supported.")});xs(7,()=>jn(()=>import("./jpeg-DNfUpLwy-Fjan-04T.BxqdrV3-.js"),__vite__mapDeps([3,1])).then(i=>i.default));xs([8,32946],()=>jn(()=>import("./deflate-Be2Arps5-hDqMz3RA.CZq5SbJs.js"),__vite__mapDeps([4,5,1])).then(i=>i.default));xs(32773,()=>jn(()=>import("./packbits-DaUD6MLm-Bu1PoTGa.CJbViLSe.js"),__vite__mapDeps([6,1])).then(i=>i.default));xs(34887,()=>jn(()=>import("./lerc-C9VL9kri-cIdbW0sg.BItRODpc.js"),__vite__mapDeps([7,5,1,8,9,10,11])).then(async i=>(await i.zstd.init(),i)).then(i=>i.default));xs(50001,()=>jn(()=>import("./webimage-D2c098k3-DLj1LQxB.7ggil7aE.js"),__vite__mapDeps([12,1])).then(i=>i.default));function Vh(i,t,e,n=1){return new(Object.getPrototypeOf(i)).constructor(t*e*n)}function JA(i,t,e,n,s){const r=t/n,o=e/s;return i.map(a=>{const l=Vh(a,n,s);for(let h=0;h{const l=Vh(a,n,s);for(let h=0;h>8-s-R&u;else if(R+s<=16)c[S]=a.getUint16(T)>>16-s-R&u;else if(R+s<=24){const C=a.getUint16(T)<<8|a.getUint8(T+2);c[S]=C>>24-s-R&u}else c[S]=a.getUint32(T)>>32-s-R&u}}}}return c.buffer}class Vy{constructor(t,e,n,s,r,o){this.fileDirectory=t,this.geoKeys=e,this.dataView=n,this.littleEndian=s,this.tiles=r?{}:null,this.isTiled=!t.StripOffsets;const a=t.PlanarConfiguration;if(this.planarConfiguration=typeof a>"u"?1:a,this.planarConfiguration!==1&&this.planarConfiguration!==2)throw new Error("Invalid planar configuration.");this.source=o}getFileDirectory(){return this.fileDirectory}getGeoKeys(){return this.geoKeys}getWidth(){return this.fileDirectory.ImageWidth}getHeight(){return this.fileDirectory.ImageLength}getSamplesPerPixel(){return typeof this.fileDirectory.SamplesPerPixel<"u"?this.fileDirectory.SamplesPerPixel:1}getTileWidth(){return this.isTiled?this.fileDirectory.TileWidth:this.getWidth()}getTileHeight(){return this.isTiled?this.fileDirectory.TileLength:typeof this.fileDirectory.RowsPerStrip<"u"?Math.min(this.fileDirectory.RowsPerStrip,this.getHeight()):this.getHeight()}getBlockWidth(){return this.getTileWidth()}getBlockHeight(t){return this.isTiled||(t+1)*this.getTileHeight()<=this.getHeight()?this.getTileHeight():this.getHeight()-t*this.getTileHeight()}getBytesPerPixel(){let t=0;for(let e=0;e=this.fileDirectory.BitsPerSample.length)throw new RangeError(`Sample index ${t} is out of range.`);return Math.ceil(this.fileDirectory.BitsPerSample[t]/8)}getReaderForSample(t){const e=this.fileDirectory.SampleFormat?this.fileDirectory.SampleFormat[t]:1,n=this.fileDirectory.BitsPerSample[t];switch(e){case 1:if(n<=8)return DataView.prototype.getUint8;if(n<=16)return DataView.prototype.getUint16;if(n<=32)return DataView.prototype.getUint32;break;case 2:if(n<=8)return DataView.prototype.getInt8;if(n<=16)return DataView.prototype.getInt16;if(n<=32)return DataView.prototype.getInt32;break;case 3:switch(n){case 16:return function(s,r){return jy(this,s,r)};case 32:return DataView.prototype.getFloat32;case 64:return DataView.prototype.getFloat64}break}throw Error("Unsupported data format/bitsPerSample")}getSampleFormat(t=0){return this.fileDirectory.SampleFormat?this.fileDirectory.SampleFormat[t]:1}getBitsPerSample(t=0){return this.fileDirectory.BitsPerSample[t]}getArrayForSample(t,e){const n=this.getSampleFormat(t),s=this.getBitsPerSample(t);return Ru(n,s,e)}async getTileOrStrip(t,e,n,s,r){const o=Math.ceil(this.getWidth()/this.getTileWidth()),a=Math.ceil(this.getHeight()/this.getTileHeight());let l;const{tiles:h}=this;this.planarConfiguration===1?l=e*o+t:this.planarConfiguration===2&&(l=n*o*a+e*o+t);let c,u;this.isTiled?(c=this.fileDirectory.TileOffsets[l],u=this.fileDirectory.TileByteCounts[l]):(c=this.fileDirectory.StripOffsets[l],u=this.fileDirectory.StripByteCounts[l]);const g=(await this.source.fetch([{offset:c,length:u}],r))[0];let f;return h===null||!h[l]?(f=(async()=>{let p=await s.decode(this.fileDirectory,g);const _=this.getSampleFormat(),x=this.getBitsPerSample();return oL(_,x)&&(p=aL(p,_,this.planarConfiguration,this.getSamplesPerPixel(),x,this.getTileWidth(),this.getBlockHeight(e))),p})(),h!==null&&(h[l]=f)):f=h[l],{x:t,y:e,sample:n,data:await f}}async _readRaster(t,e,n,s,r,o,a,l,h){const c=this.getTileWidth(),u=this.getTileHeight(),g=this.getWidth(),f=this.getHeight(),p=Math.max(Math.floor(t[0]/c),0),_=Math.min(Math.ceil(t[2]/c),Math.ceil(g/c)),x=Math.max(Math.floor(t[1]/u),0),v=Math.min(Math.ceil(t[3]/u),Math.ceil(f/u)),w=t[2]-t[0];let E=this.getBytesPerPixel();const S=[],T=[];for(let P=0;P{const b=y.data,M=new DataView(b),I=this.getBlockHeight(y.y),A=y.y*u,L=y.x*c,k=A+I,W=(y.x+1)*c,K=T[B],G=Math.min(I,I-(k-t[3]),f-A),H=Math.min(c,c-(W-t[2]),g-L);for(let Q=Math.max(0,t[1]-A);Qc[2]||c[1]>c[3])throw new Error("Invalid subsets");const u=c[2]-c[0],g=c[3]-c[1],f=u*g,p=this.getSamplesPerPixel();if(!e||!e.length)for(let v=0;v=p)return Promise.reject(new RangeError(`Invalid sample index '${e[v]}'.`));let _;if(n){const v=this.fileDirectory.SampleFormat?Math.max.apply(null,this.fileDirectory.SampleFormat):1,w=Math.max.apply(null,this.fileDirectory.BitsPerSample);_=Ru(v,w,f*e.length),l&&_.fill(l)}else{_=[];for(let v=0;vh[2]||h[1]>h[3])throw new Error("Invalid subsets");const c=this.fileDirectory.PhotometricInterpretation;if(c===Qe.RGB){let v=[0,1,2];if(this.fileDirectory.ExtraSamples!==BA.Unspecified&&a){v=[];for(let w=0;wDc(r,"sample")===void 0):s=s.filter(r=>Number(Dc(r,"sample"))===t);for(let r=0;r[o+n*p+s*_,c+a*p+l*_]),g=u.map(p=>p[0]),f=u.map(p=>p[1]);return[Math.min(...g),Math.min(...f),Math.max(...g),Math.max(...f)]}else{const n=this.getOrigin(),s=this.getResolution(),r=n[0],o=n[1],a=r+s[0]*this.getWidth(),l=o+s[1]*this.getHeight();return[Math.min(r,a),Math.min(o,l),Math.max(r,a),Math.max(o,l)]}}}class lL{constructor(t){this._dataView=new DataView(t)}get buffer(){return this._dataView.buffer}getUint64(t,e){const n=this.getUint32(t,e),s=this.getUint32(t+4,e);let r;if(e){if(r=n+2**32*s,!Number.isSafeInteger(r))throw new Error(`${r} exceeds MAX_SAFE_INTEGER. Precision may be lost. Please report if you get this message to https://github.com/geotiffjs/geotiff.js/issues`);return r}if(r=2**32*n+s,!Number.isSafeInteger(r))throw new Error(`${r} exceeds MAX_SAFE_INTEGER. Precision may be lost. Please report if you get this message to https://github.com/geotiffjs/geotiff.js/issues`);return r}getInt64(t,e){let n=0;const s=(this._dataView.getUint8(t+(e?7:0))&128)>0;let r=!0;for(let o=0;o<8;o++){let a=this._dataView.getUint8(t+(e?o:7-o));s&&(r?a!==0&&(a=~(a-1)&255,r=!1):a=~a&255),n+=a*256**o}return s&&(n=-n),n}getUint8(t,e){return this._dataView.getUint8(t,e)}getInt8(t,e){return this._dataView.getInt8(t,e)}getUint16(t,e){return this._dataView.getUint16(t,e)}getInt16(t,e){return this._dataView.getInt16(t,e)}getUint32(t,e){return this._dataView.getUint32(t,e)}getInt32(t,e){return this._dataView.getInt32(t,e)}getFloat16(t,e){return jy(this._dataView,t,e)}getFloat32(t,e){return this._dataView.getFloat32(t,e)}getFloat64(t,e){return this._dataView.getFloat64(t,e)}}class hL{constructor(t,e,n,s){this._dataView=new DataView(t),this._sliceOffset=e,this._littleEndian=n,this._bigTiff=s}get sliceOffset(){return this._sliceOffset}get sliceTop(){return this._sliceOffset+this.buffer.byteLength}get littleEndian(){return this._littleEndian}get bigTiff(){return this._bigTiff}get buffer(){return this._dataView.buffer}covers(t,e){return this.sliceOffset<=t&&this.sliceTop>=t+e}readUint8(t){return this._dataView.getUint8(t-this._sliceOffset,this._littleEndian)}readInt8(t){return this._dataView.getInt8(t-this._sliceOffset,this._littleEndian)}readUint16(t){return this._dataView.getUint16(t-this._sliceOffset,this._littleEndian)}readInt16(t){return this._dataView.getInt16(t-this._sliceOffset,this._littleEndian)}readUint32(t){return this._dataView.getUint32(t-this._sliceOffset,this._littleEndian)}readInt32(t){return this._dataView.getInt32(t-this._sliceOffset,this._littleEndian)}readFloat32(t){return this._dataView.getFloat32(t-this._sliceOffset,this._littleEndian)}readFloat64(t){return this._dataView.getFloat64(t-this._sliceOffset,this._littleEndian)}readUint64(t){const e=this.readUint32(t),n=this.readUint32(t+4);let s;if(this._littleEndian){if(s=e+2**32*n,!Number.isSafeInteger(s))throw new Error(`${s} exceeds MAX_SAFE_INTEGER. Precision may be lost. Please report if you get this message to https://github.com/geotiffjs/geotiff.js/issues`);return s}if(s=2**32*e+n,!Number.isSafeInteger(s))throw new Error(`${s} exceeds MAX_SAFE_INTEGER. Precision may be lost. Please report if you get this message to https://github.com/geotiffjs/geotiff.js/issues`);return s}readInt64(t){let e=0;const n=(this._dataView.getUint8(t+(this._littleEndian?7:0))&128)>0;let s=!0;for(let r=0;r<8;r++){let o=this._dataView.getUint8(t+(this._littleEndian?r:7-r));n&&(s?o!==0&&(o=~(o-1)&255,s=!1):o=~o&255),e+=o*256**r}return n&&(e=-e),e}readOffset(t){return this._bigTiff?this.readUint64(t):this.readUint32(t)}}const cL=typeof navigator<"u"&&navigator.hardwareConcurrency||2;class uL{constructor(t=cL,e){this.workers=null,this._awaitingDecoder=null,this.size=t,this.messageId=0,t&&(this._awaitingDecoder=e?Promise.resolve(e):new Promise(n=>{jn(()=>import("./decoder-kAoyGIq9-BBR5CgzS.DzeLK-aU.js"),__vite__mapDeps([13,8,9,10,11])).then(s=>{n(s.create)})}),this._awaitingDecoder.then(n=>{this._awaitingDecoder=null,this.workers=[];for(let s=0;sn.decode(t,e)):new Promise(n=>{const s=this.workers.find(a=>a.idle)||this.workers[Math.floor(Math.random()*this.size)];s.idle=!1;const r=this.messageId++,o=a=>{a.data.id===r&&(s.idle=!0,n(a.data.decoded),s.worker.removeEventListener("message",o))};s.worker.addEventListener("message",o),s.worker.postMessage({fileDirectory:t,buffer:e,id:r},[e])})}destroy(){this.workers&&(this.workers.forEach(t=>{t.worker.terminate()}),this.workers=null)}}const im=`\r -\r -`;function Yy(i){if(typeof Object.fromEntries<"u")return Object.fromEntries(i);const t={};for(const[e,n]of i)t[e.toLowerCase()]=n;return t}function dL(i){const t=i.split(`\r -`).map(e=>{const n=e.split(":").map(s=>s.trim());return n[0]=n[0].toLowerCase(),n});return Yy(t)}function gL(i){const[t,...e]=i.split(";").map(s=>s.trim()),n=e.map(s=>s.split("="));return{type:t,params:Yy(n)}}function Cu(i){let t,e,n;return i&&([,t,e,n]=i.match(/bytes (\d+)-(\d+)\/(\d+)/),t=parseInt(t,10),e=parseInt(e,10),n=parseInt(n,10)),{start:t,end:e,total:n}}function fL(i,t){let e=null;const n=new TextDecoder("ascii"),s=[],r=`--${t}`,o=`${r}--`;for(let a=0;a<10;++a)n.decode(new Uint8Array(i,a,r.length))===r&&(e=a);if(e===null)throw new Error("Could not find initial boundary");for(;ethis.fetchSlice(n,e)))}async fetchSlice(t){throw new Error(`fetching of slice ${t} not possible, not implemented`)}get fileSize(){return null}async close(){}}class pL extends Map{constructor(t={}){if(super(),!(t.maxSize&&t.maxSize>0))throw new TypeError("`maxSize` must be a number greater than 0");if(typeof t.maxAge=="number"&&t.maxAge===0)throw new TypeError("`maxAge` must be a number greater than 0");this.maxSize=t.maxSize,this.maxAge=t.maxAge||Number.POSITIVE_INFINITY,this.onEviction=t.onEviction,this.cache=new Map,this.oldCache=new Map,this._size=0}_emitEvictions(t){if(typeof this.onEviction=="function")for(const[e,n]of t)this.onEviction(e,n.value)}_deleteIfExpired(t,e){return typeof e.expiry=="number"&&e.expiry<=Date.now()?(typeof this.onEviction=="function"&&this.onEviction(t,e.value),this.delete(t)):!1}_getOrDeleteIfExpired(t,e){if(this._deleteIfExpired(t,e)===!1)return e.value}_getItemValue(t,e){return e.expiry?this._getOrDeleteIfExpired(t,e):e.value}_peek(t,e){const n=e.get(t);return this._getItemValue(t,n)}_set(t,e){this.cache.set(t,e),this._size++,this._size>=this.maxSize&&(this._size=0,this._emitEvictions(this.oldCache),this.oldCache=this.cache,this.cache=new Map)}_moveToRecent(t,e){this.oldCache.delete(t),this._set(t,e)}*_entriesAscending(){for(const t of this.oldCache){const[e,n]=t;this.cache.has(e)||this._deleteIfExpired(e,n)===!1&&(yield t)}for(const t of this.cache){const[e,n]=t;this._deleteIfExpired(e,n)===!1&&(yield t)}}get(t){if(this.cache.has(t)){const e=this.cache.get(t);return this._getItemValue(t,e)}if(this.oldCache.has(t)){const e=this.oldCache.get(t);if(this._deleteIfExpired(t,e)===!1)return this._moveToRecent(t,e),e.value}}set(t,e,{maxAge:n=this.maxAge}={}){const s=typeof n=="number"&&n!==Number.POSITIVE_INFINITY?Date.now()+n:void 0;return this.cache.has(t)?this.cache.set(t,{value:e,expiry:s}):this._set(t,{value:e,expiry:s}),this}has(t){return this.cache.has(t)?!this._deleteIfExpired(t,this.cache.get(t)):this.oldCache.has(t)?!this._deleteIfExpired(t,this.oldCache.get(t)):!1}peek(t){if(this.cache.has(t))return this._peek(t,this.cache);if(this.oldCache.has(t))return this._peek(t,this.oldCache)}delete(t){const e=this.cache.delete(t);return e&&this._size--,this.oldCache.delete(t)||e}clear(){this.cache.clear(),this.oldCache.clear(),this._size=0}resize(t){if(!(t&&t>0))throw new TypeError("`maxSize` must be a number greater than 0");const e=[...this._entriesAscending()],n=e.length-t;n<0?(this.cache=new Map(e),this.oldCache=new Map,this._size=e.length):(n>0&&this._emitEvictions(e.slice(0,n)),this.oldCache=new Map(e.slice(n)),this.cache=new Map,this._size=0),this.maxSize=t}*keys(){for(const[t]of this)yield t}*values(){for(const[,t]of this)yield t}*[Symbol.iterator](){for(const t of this.cache){const[e,n]=t;this._deleteIfExpired(e,n)===!1&&(yield[e,n.value])}for(const t of this.oldCache){const[e,n]=t;this.cache.has(e)||this._deleteIfExpired(e,n)===!1&&(yield[e,n.value])}}*entriesDescending(){let t=[...this.cache];for(let e=t.length-1;e>=0;--e){const n=t[e],[s,r]=n;this._deleteIfExpired(s,r)===!1&&(yield[s,r.value])}t=[...this.oldCache];for(let e=t.length-1;e>=0;--e){const n=t[e],[s,r]=n;this.cache.has(s)||this._deleteIfExpired(s,r)===!1&&(yield[s,r.value])}}*entriesAscending(){for(const[t,e]of this._entriesAscending())yield[t,e.value]}get size(){if(!this._size)return this.oldCache.size;let t=0;for(const e of this.oldCache.keys())this.cache.has(e)||t++;return Math.min(this._size+t,this.maxSize)}entries(){return this.entriesAscending()}forEach(t,e=this){for(const[n,s]of this.entriesAscending())t.call(e,s,n,this)}get[Symbol.toStringTag](){return JSON.stringify([...this.entriesAscending()])}}async function mL(i){return new Promise(t=>setTimeout(t,i))}function _L(i,t){const e=Array.isArray(i)?i:Array.from(i),n=Array.isArray(t)?t:Array.from(t);return e.map((s,r)=>[s,n[r]])}class Zr extends Error{constructor(t){super(t),Error.captureStackTrace&&Error.captureStackTrace(this,Zr),this.name="AbortError"}}class yL extends Error{constructor(t,e){super(e),this.errors=t,this.message=e,this.name="AggregateError"}}const xL=yL;class vL{constructor(t,e,n=null){this.offset=t,this.length=e,this.data=n}get top(){return this.offset+this.length}}class nm{constructor(t,e,n){this.offset=t,this.length=e,this.blockIds=n}}class wL extends Mg{constructor(t,{blockSize:e=65536,cacheSize:n=100}={}){super(),this.source=t,this.blockSize=e,this.blockCache=new pL({maxSize:n,onEviction:(s,r)=>{this.evictedBlocks.set(s,r)}}),this.evictedBlocks=new Map,this.blockRequests=new Map,this.blockIdsToFetch=new Set,this.abortedBlockIds=new Set}get fileSize(){return this.source.fileSize}async fetch(t,e){const n=[],s=[],r=[];this.evictedBlocks.clear();for(const{offset:g,length:f}of t){let p=g+f;const{fileSize:_}=this;_!==null&&(p=Math.min(p,_));const x=Math.floor(g/this.blockSize)*this.blockSize;for(let v=x;vthis.abortedBlockIds.has(g)||!this.blockCache.has(g));if(l.forEach(g=>this.blockIdsToFetch.add(g)),l.length>0&&e&&!e.aborted){this.fetchBlocks(null);for(const g of l){const f=this.blockRequests.get(g);if(!f)throw new Error(`Block ${g} is not in the block requests`);a.push(f)}await Promise.allSettled(a)}if(e&&e.aborted)throw new Zr("Request was aborted");const h=r.map(g=>this.blockCache.get(g)||this.evictedBlocks.get(g)),c=h.filter(g=>!g);if(c.length)throw new xL(c,"Request failed");const u=new Map(_L(r,h));return this.readSliceData(t,u)}fetchBlocks(t){if(this.blockIdsToFetch.size>0){const e=this.groupBlocks(this.blockIdsToFetch),n=this.source.fetch(e,t);for(let s=0;s{try{const a=(await n)[s],l=o*this.blockSize,h=l-a.offset,c=Math.min(h+this.blockSize,a.data.byteLength),u=a.data.slice(h,c),g=new vL(l,u.byteLength,u,o);this.blockCache.set(o,g),this.abortedBlockIds.delete(o)}catch(a){if(a.name==="AbortError")a.signal=t,this.blockCache.delete(o),this.abortedBlockIds.add(o);else throw a}finally{this.blockRequests.delete(o)}})())}this.blockIdsToFetch.clear()}}groupBlocks(t){const e=Array.from(t).sort((o,a)=>o-a);if(e.length===0)return[];let n=[],s=null;const r=[];for(const o of e)s===null||s+1===o?(n.push(o),s=o):(r.push(new nm(n[0]*this.blockSize,n.length*this.blockSize,n)),n=[o],s=o);return r.push(new nm(n[0]*this.blockSize,n.length*this.blockSize,n)),r}readSliceData(t,e){return t.map(n=>{let s=n.offset+n.length;this.fileSize!==null&&(s=Math.min(this.fileSize,s));const r=Math.floor(n.offset/this.blockSize),o=Math.floor(s/this.blockSize),a=new ArrayBuffer(n.length),l=new Uint8Array(a);for(let h=r;h<=o;++h){const c=e.get(h),u=c.offset-n.offset,g=c.top-s;let f=0,p=0,_;u<0?f=-u:u>0&&(p=u),g<0?_=c.length-f:_=s-c.offset-f;const x=new Uint8Array(c.data,f,_);l.set(x,p)}return a})}}class Rg{get ok(){return this.status>=200&&this.status<=299}get status(){throw new Error("not implemented")}getHeader(t){throw new Error("not implemented")}async getData(){throw new Error("not implemented")}}class Cg{constructor(t){this.url=t}async request({headers:t,credentials:e,signal:n}={}){throw new Error("request is not implemented")}}class bL extends Rg{constructor(t){super(),this.response=t}get status(){return this.response.status}getHeader(t){return this.response.headers.get(t)}async getData(){return this.response.arrayBuffer?await this.response.arrayBuffer():(await this.response.buffer()).buffer}}class EL extends Cg{constructor(t,e){super(t),this.credentials=e}async request({headers:t,credentials:e,signal:n}={}){const s=await fetch(this.url,{headers:t,credentials:e,signal:n});return new bL(s)}}class SL extends Rg{constructor(t,e){super(),this.xhr=t,this.data=e}get status(){return this.xhr.status}getHeader(t){return this.xhr.getResponseHeader(t)}async getData(){return this.data}}class TL extends Cg{constructRequest(t,e){return new Promise((n,s)=>{const r=new XMLHttpRequest;r.open("GET",this.url),r.responseType="arraybuffer";for(const[o,a]of Object.entries(t))r.setRequestHeader(o,a);r.onload=()=>{const o=r.response;n(new SL(r,o))},r.onerror=s,r.onabort=()=>s(new Zr("Request aborted")),r.send(),e&&(e.aborted&&r.abort(),e.addEventListener("abort",()=>r.abort()))})}async request({headers:t,signal:e}={}){return await this.constructRequest(t,e)}}const sm={};class ML extends Rg{constructor(t,e){super(),this.response=t,this.dataPromise=e}get status(){return this.response.statusCode}getHeader(t){return this.response.headers[t]}async getData(){return await this.dataPromise}}class RL extends Cg{constructor(t){super(t),this.parsedUrl=sm.parse(this.url),this.httpApi=(this.parsedUrl.protocol,sm)}constructRequest(t,e){return new Promise((n,s)=>{const r=this.httpApi.get({...this.parsedUrl,headers:t},o=>{const a=new Promise(l=>{const h=[];o.on("data",c=>{h.push(c)}),o.on("end",()=>{const c=Buffer.concat(h).buffer;l(c)}),o.on("error",s)});n(new ML(o,a))});r.on("error",s),e&&(e.aborted&&r.destroy(new Zr("Request aborted")),e.addEventListener("abort",()=>r.destroy(new Zr("Request aborted"))))})}async request({headers:t,signal:e}={}){return await this.constructRequest(t,e)}}class Ig extends Mg{constructor(t,e,n,s){super(),this.client=t,this.headers=e,this.maxRanges=n,this.allowFullFile=s,this._fileSize=null}async fetch(t,e){return this.maxRanges>=t.length?this.fetchSlices(t,e):(this.maxRanges>0&&t.length>1,Promise.all(t.map(n=>this.fetchSlice(n,e))))}async fetchSlices(t,e){const n=await this.client.request({headers:{...this.headers,Range:`bytes=${t.map(({offset:s,length:r})=>`${s}-${s+r}`).join(",")}`},signal:e});if(n.ok)if(n.status===206){const{type:s,params:r}=gL(n.getHeader("content-type"));if(s==="multipart/byteranges"){const u=fL(await n.getData(),r.boundary);return this._fileSize=u[0].fileSize||null,u}const o=await n.getData(),{start:a,end:l,total:h}=Cu(n.getHeader("content-range"));this._fileSize=h||null;const c=[{data:o,offset:a,length:l-a}];if(t.length>1){const u=await Promise.all(t.slice(1).map(g=>this.fetchSlice(g,e)));return c.concat(u)}return c}else{if(!this.allowFullFile)throw new Error("Server responded with full file");const s=await n.getData();return this._fileSize=s.byteLength,[{data:s,offset:0,length:s.byteLength}]}else throw new Error("Error fetching data.")}async fetchSlice(t,e){const{offset:n,length:s}=t,r=await this.client.request({headers:{...this.headers,Range:`bytes=${n}-${n+s}`},signal:e});if(r.ok)if(r.status===206){const o=await r.getData(),{total:a}=Cu(r.getHeader("content-range"));return this._fileSize=a||null,{data:o,offset:n,length:s}}else{if(!this.allowFullFile)throw new Error("Server responded with full file");const o=await r.getData();return this._fileSize=o.byteLength,{data:o,offset:0,length:o.byteLength}}else throw new Error("Error fetching data.")}get fileSize(){return this._fileSize}}function Pg(i,{blockSize:t,cacheSize:e}){return t===null?i:new wL(i,{blockSize:t,cacheSize:e})}function CL(i,{headers:t={},credentials:e,maxRanges:n=0,allowFullFile:s=!1,...r}={}){const o=new EL(i,e),a=new Ig(o,t,n,s);return Pg(a,r)}function IL(i,{headers:t={},maxRanges:e=0,allowFullFile:n=!1,...s}={}){const r=new TL(i),o=new Ig(r,t,e,n);return Pg(o,s)}function PL(i,{headers:t={},maxRanges:e=0,allowFullFile:n=!1,...s}={}){const r=new RL(i),o=new Ig(r,t,e,n);return Pg(o,s)}function Iu(i,{forceXHR:t=!1,...e}={}){return typeof fetch=="function"&&!t?CL(i,e):typeof XMLHttpRequest<"u"?IL(i,e):PL(i,e)}class AL extends Mg{constructor(t){super(),this.file=t}async fetchSlice(t,e){return new Promise((n,s)=>{const r=this.file.slice(t.offset,t.offset+t.length),o=new FileReader;o.onload=a=>n(a.target.result),o.onerror=s,o.onabort=s,o.readAsArrayBuffer(r),e&&e.addEventListener("abort",()=>o.abort())})}}function LL(i){return new AL(i)}function Pu(i){switch(i){case Mt.BYTE:case Mt.ASCII:case Mt.SBYTE:case Mt.UNDEFINED:return 1;case Mt.SHORT:case Mt.SSHORT:return 2;case Mt.LONG:case Mt.SLONG:case Mt.FLOAT:case Mt.IFD:return 4;case Mt.RATIONAL:case Mt.SRATIONAL:case Mt.DOUBLE:case Mt.LONG8:case Mt.SLONG8:case Mt.IFD8:return 8;default:throw new RangeError(`Invalid field type: ${i}`)}}function OL(i){const t=i.GeoKeyDirectory;if(!t)return null;const e={};for(let n=4;n<=t[3]*4;n+=4){const s=WA[t[n]],r=t[n+1]?Bo[t[n+1]]:null,o=t[n+2],a=t[n+3];let l=null;if(!r)l=a;else{if(l=i[r],typeof l>"u"||l===null)throw new Error(`Could not get value of geoKey '${s}'.`);typeof l=="string"?l=l.substring(a,a+o-1):l.subarray&&(l=l.subarray(a,a+o),o===1&&(l=l[0]))}e[s]=l}return e}function dr(i,t,e,n){let s=null,r=null;const o=Pu(t);switch(t){case Mt.BYTE:case Mt.ASCII:case Mt.UNDEFINED:s=new Uint8Array(e),r=i.readUint8;break;case Mt.SBYTE:s=new Int8Array(e),r=i.readInt8;break;case Mt.SHORT:s=new Uint16Array(e),r=i.readUint16;break;case Mt.SSHORT:s=new Int16Array(e),r=i.readInt16;break;case Mt.LONG:case Mt.IFD:s=new Uint32Array(e),r=i.readUint32;break;case Mt.SLONG:s=new Int32Array(e),r=i.readInt32;break;case Mt.LONG8:case Mt.IFD8:s=new Array(e),r=i.readUint64;break;case Mt.SLONG8:s=new Array(e),r=i.readInt64;break;case Mt.RATIONAL:s=new Uint32Array(e*2),r=i.readUint32;break;case Mt.SRATIONAL:s=new Int32Array(e*2),r=i.readInt32;break;case Mt.FLOAT:s=new Float32Array(e),r=i.readFloat32;break;case Mt.DOUBLE:s=new Float64Array(e),r=i.readFloat64;break;default:throw new RangeError(`Invalid field type: ${t}`)}if(t===Mt.RATIONAL||t===Mt.SRATIONAL)for(let a=0;ap.getWidth()-_.getWidth());for(let p=0;px||o&&o>v)break}}let g=e;if(a){const[f,p]=l.getOrigin(),[_,x]=h.getResolution(l);g=[Math.round((a[0]-f)/_),Math.round((a[1]-p)/x),Math.round((a[2]-f)/_),Math.round((a[3]-p)/x)],g=[Math.min(g[0],g[2]),Math.min(g[1],g[3]),Math.max(g[0],g[2]),Math.max(g[1],g[3])]}return h.readRasters({...t,window:g})}}class $r extends Hy{constructor(t,e,n,s,r={}){super(),this.source=t,this.littleEndian=e,this.bigTiff=n,this.firstIFDOffset=s,this.cache=r.cache||!1,this.ifdRequests=[],this.ghostValues=null}async getSlice(t,e){const n=this.bigTiff?4048:1024;return new hL((await this.source.fetch([{offset:t,length:typeof e<"u"?e:n}]))[0],t,this.littleEndian,this.bigTiff)}async parseFileDirectoryAt(t){const e=this.bigTiff?20:12,n=this.bigTiff?8:2;let s=await this.getSlice(t);const r=this.bigTiff?s.readUint64(t):s.readUint16(t),o=r*e+(this.bigTiff?16:6);s.covers(t,o)||(s=await this.getSlice(t,o));const a={};let l=t+(this.bigTiff?8:2);for(let u=0;u{const e=await this.ifdRequests[t-1];if(e.nextIFDByteOffset===0)throw new gl(t);return this.parseFileDirectoryAt(e.nextIFDByteOffset)})(),this.ifdRequests[t]}async getImage(t=0){const e=await this.requestIFD(t);return new Vy(e.fileDirectory,e.geoKeyDirectory,this.dataView,this.littleEndian,this.cache,this.source)}async getImageCount(){let t=0,e=!0;for(;e;)try{await this.requestIFD(t),++t}catch(n){if(n instanceof gl)e=!1;else throw n}return t}async getGhostValues(){const t=this.bigTiff?16:8;if(this.ghostValues)return this.ghostValues;const e="GDAL_STRUCTURAL_METADATA_SIZE=",n=e.length+100;let s=await this.getSlice(t,n);if(e===dr(s,Mt.ASCII,e.length,t)){const r=dr(s,Mt.ASCII,n,t).split(` -`)[0],o=Number(r.split("=")[1].split(" ")[0])+r.length;o>n&&(s=await this.getSlice(t,o));const a=dr(s,Mt.ASCII,o,t);this.ghostValues={},a.split(` -`).filter(l=>l.length>0).map(l=>l.split("=")).forEach(([l,h])=>{this.ghostValues[l]=h})}return this.ghostValues}static async fromSource(t,e,n){const s=(await t.fetch([{offset:0,length:1024}],n))[0],r=new lL(s),o=r.getUint16(0,0);let a;if(o===18761)a=!0;else if(o===19789)a=!1;else throw new TypeError("Invalid byte order value.");const l=r.getUint16(2,a);let h;if(l===42)h=!1;else if(l===43){if(h=!0,r.getUint16(4,a)!==8)throw new Error("Unsupported offset byte-size.")}else throw new TypeError("Invalid magic number.");const c=h?r.getUint64(8,a):r.getUint32(4,a);return new $r(t,a,h,c,e)}close(){return typeof this.source.close=="function"?this.source.close():!1}}class NL extends Hy{constructor(t,e){super(),this.mainFile=t,this.overviewFiles=e,this.imageFiles=[t].concat(e),this.fileDirectoriesPerFile=null,this.fileDirectoriesPerFileParsing=null,this.imageCount=null}async parseFileDirectoriesPerFile(){const t=[this.mainFile.parseFileDirectoryAt(this.mainFile.firstIFDOffset)].concat(this.overviewFiles.map(e=>e.parseFileDirectoryAt(e.firstIFDOffset)));return this.fileDirectoriesPerFile=await Promise.all(t),this.fileDirectoriesPerFile}async getImage(t=0){await this.getImageCount(),await this.parseFileDirectoriesPerFile();let e=0,n=0;for(let s=0;se.getImageCount()));return this.imageCounts=await Promise.all(t),this.imageCount=this.imageCounts.reduce((e,n)=>e+n,0),this.imageCount}}async function kL(i,t={},e){return $r.fromSource(Iu(i,t),e)}async function DL(i,t){return $r.fromSource(LL(i),t)}async function GL(i,t=[],e={},n){const s=await $r.fromSource(Iu(i,e),n),r=await Promise.all(t.map(o=>$r.fromSource(Iu(o,e))));return new NL(s,r)}function jL(i){return((i.fileDirectory.NewSubfileType||0)&4)===4}function zL(i,t){if(!i)return!1;if(i===!0)return!0;if(t.getSamplesPerPixel()!==3)return!1;const e=t.fileDirectory.PhotometricInterpretation,n=Qe;return e===n.CMYK||e===n.YCbCr||e===n.CIELab||e===n.ICCLab}const rm="STATISTICS_MAXIMUM",om="STATISTICS_MINIMUM",zc=256;let Uc;function UL(){return Uc||(Uc=new uL),Uc}function BL(i){try{return i.getBoundingBox()}catch{return[0,0,i.getWidth(),i.getHeight()]}}function WL(i){try{return i.getOrigin().slice(0,2)}catch{return[0,i.getHeight()]}}function qL(i,t){try{return i.getResolution(t)}catch{return[t.getWidth()/i.getWidth(),t.getHeight()/i.getHeight()]}}function XL(i){const t=i.geoKeys;if(!t)return null;if(t.ProjectedCSTypeGeoKey&&t.ProjectedCSTypeGeoKey!==32767){const e="EPSG:"+t.ProjectedCSTypeGeoKey;let n=tt(e);if(!n){const s=ff(t.ProjLinearUnitsGeoKey);s&&(n=new jr({code:e,units:s}))}return n}if(t.GeographicTypeGeoKey&&t.GeographicTypeGeoKey!==32767){const e="EPSG:"+t.GeographicTypeGeoKey;let n=tt(e);if(!n){const s=ff(t.GeogAngularUnitsGeoKey);s&&(n=new jr({code:e,units:s}))}return n}return null}function ZL(i){return i.getImageCount().then(function(t){const e=new Array(t);for(let n=0;ne*i)throw new Error(n)}function VL(i){return i instanceof Int8Array?-128:i instanceof Int16Array?-32768:i instanceof Int32Array?-2147483648:i instanceof Float32Array?12e-39:0}function YL(i){return i instanceof Int8Array?127:i instanceof Uint8Array||i instanceof Uint8ClampedArray?255:i instanceof Int16Array?32767:i instanceof Uint16Array?65535:i instanceof Int32Array?2147483647:i instanceof Uint32Array?4294967295:i instanceof Float32Array?34e37:255}class Ag extends fg{constructor(t){super({state:"loading",tileGrid:null,projection:t.projection||null,opaque:t.opaque,transition:t.transition,interpolate:t.interpolate!==!1,wrapX:t.wrapX}),this.sourceInfo_=t.sources;const e=this.sourceInfo_.length;this.sourceOptions_=t.sourceOptions,this.sourceImagery_=new Array(e),this.sourceMasks_=new Array(e),this.resolutionFactors_=new Array(e),this.samplesPerPixel_,this.nodataValues_,this.metadata_,this.normalize_=t.normalize!==!1,this.addAlpha_=!1,this.error_=null,this.convertToRGB_=t.convertToRGB||!1,this.setKey(this.sourceInfo_.map(r=>r.url).join(","));const n=this,s=new Array(e);for(let r=0;r=0;--n){const s=e[n],r=XL(s);if(r){this.projection=r;break}}}configure_(t){let e,n,s,r,o;const a=new Array(t.length),l=new Array(t.length),h=new Array(t.length);let c=0;const u=t.length;for(let p=0;p{jL(C)?x.push(C):_.push(C)});const v=_.length;if(x.length>0&&x.length!==v)throw new Error(`Expected one mask per image found ${x.length} masks and ${v} images`);let w,E;const S=new Array(v),T=new Array(v),R=new Array(v);l[p]=new Array(v),h[p]=new Array(v);for(let C=0;CR.length&&(c=o.length-R.length);const C=o[o.length-1]/R[R.length-1];this.resolutionFactors_[p]=C;const P=R.map(U=>U*=C),N=`Resolution mismatch for source ${p}, got [${P}] but expected [${o}]`;Co(o.slice(c,o.length),P,.02,N,this.viewRejector)}s?Co(s.slice(c,s.length),T,.01,`Tile size mismatch for source ${p}`,this.viewRejector):s=T,r?Co(r.slice(c,r.length),S,0,`Tile size mismatch for source ${p}`,this.viewRejector):r=S,this.sourceImagery_[p]=_.reverse(),this.sourceMasks_[p]=x.reverse()}for(let p=0,_=this.sourceImagery_.length;p<_;++p){const x=this.sourceImagery_[p];for(;x.lengththis.getImageInternal(o,a,l,r),this.getInterpolate()),this.reprojectedRevision_=this.getRevision(),this.reprojectedImage_}getImageInternal(t,e,n,s){if(this.loader){const r=Hh(t,e,n,1),o=this.findNearestResolution(e);if(this.image&&(this.static_||this.wantedProjection_===s&&(this.wantedExtent_&&Ze(this.wantedExtent_,r)||Ze(this.image.getExtent(),r))&&(this.wantedResolution_&&Jl(this.wantedResolution_)===o||Jl(this.image.getResolution())===o)))return this.image;this.wantedProjection_=s,this.wantedExtent_=r,this.wantedResolution_=o,this.image=new Th(r,o,n,this.loader),this.image.addEventListener(Lt.CHANGE,this.handleImageChange.bind(this))}return this.image}handleImageChange(t){const e=t.target;let n;switch(e.getState()){case et.LOADING:this.loading=!0,n=Bc.IMAGELOADSTART;break;case et.LOADED:this.loading=!1,n=Bc.IMAGELOADEND;break;case et.ERROR:this.loading=!1,n=Bc.IMAGELOADERROR;break;default:return}this.hasListener(n)&&this.dispatchEvent(new KL(n,e))}}function Yh(i,t){i.getImage().src=t}function Hh(i,t,e,n){const s=t/e,r=Ce(i),o=ns(yt(i)/s,sn),a=ns(Vt(i)/s,sn),l=ns((n-1)*o/2,sn),h=o+2*l,c=ns((n-1)*a/2,sn),u=a+2*c;return Vu(r,s,0,[h,u])}const vs=QL;function Ky(i){const t=i.load||_s,e=i.imageExtent,n=new Image;return i.crossOrigin!==null&&(n.crossOrigin=i.crossOrigin),()=>t(n,i.url).then(s=>{const r=yt(e)/s.width,o=Vt(e)/s.height;return{image:s,extent:e,resolution:r!==o?[r,o]:o,pixelRatio:1}})}class Qy extends vs{constructor(t){const e=t.crossOrigin!==void 0?t.crossOrigin:null,n=t.imageLoadFunction!==void 0?t.imageLoadFunction:Yh;super({attributions:t.attributions,interpolate:t.interpolate,projection:tt(t.projection)}),this.url_=t.url,this.imageExtent_=t.imageExtent,this.image=null,this.image=new Th(this.imageExtent_,void 0,1,Ky({url:t.url,imageExtent:t.imageExtent,crossOrigin:e,load:(s,r)=>(this.image.setImage(s),n(this.image,r),_s(s))})),this.image.addEventListener(Lt.CHANGE,this.handleImageChange.bind(this))}getImageExtent(){return this.imageExtent_}getImageInternal(t,e,n,s){return Qt(t,this.image.getExtent())?this.image:null}getUrl(){return this.url_}}function JL(i,t){const e=/\{z\}/g,n=/\{x\}/g,s=/\{y\}/g,r=/\{-y\}/g;return function(o,a,l){if(o)return i.replace(e,o[0].toString()).replace(n,o[1].toString()).replace(s,o[2].toString()).replace(r,function(){const h=o[0],c=t.getFullTileRange(h);if(!c)throw new Error("The {-y} placeholder requires a tile grid with extent");return(c.getHeight()-o[2]-1).toString()})}}function Lg(i,t){const e=i.length,n=new Array(e);for(let s=0;sthis.getTileInternal(x,v,w,E,o),this.reprojectionErrorThreshold_,this.renderReprojectionEdges_,this.tileOptions);return _.key=u,h?(_.interimTile=h,_.refreshInterimChain(),a.replace(c,_)):a.set(c,_),_}getTileInternal(t,e,n,s,r){let o=null;const a=un(t,e,n),l=this.getKey();if(!this.tileCache.containsKey(a))o=this.createTile_(t,e,n,s,r,l),this.tileCache.set(a,o);else if(o=this.tileCache.get(a),o.key!=l){const h=o;o=this.createTile_(t,e,n,s,r,l),h.getState()==q.IDLE?o.interimTile=h.interimTile:o.interimTile=h,o.refreshInterimChain(),this.tileCache.replace(a,o)}return o}setRenderReprojectionEdges(t){if(this.renderReprojectionEdges_!=t){this.renderReprojectionEdges_=t;for(const e in this.tileCacheForProjection)this.tileCacheForProjection[e].clear();this.changed()}}setTileGridForProjection(t,e){const n=tt(t);if(n){const s=st(n);s in this.tileGridForProjection||(this.tileGridForProjection[s]=e)}}clear(){super.clear();for(const t in this.tileCacheForProjection)this.tileCacheForProjection[t].clear()}}function eO(i,t){i.getImage().src=t}function kg(i,t,e,n){const s=document.createElement("script"),r="olc_"+st(t);function o(){delete window[r],s.parentNode.removeChild(s)}s.async=!0,s.src=i+(i.includes("?")?"&":"?")+(n||"callback")+"="+r;const a=setTimeout(function(){o(),e&&e()},1e4);window[r]=function(l){clearTimeout(a),o(),t(l)},document.head.appendChild(s)}class iO extends Error{constructor(t){const e="Unexpected response status: "+t.status;super(e),this.name="ResponseError",this.response=t}}class nO extends Error{constructor(t){super("Failed to issue request"),this.name="ClientError",this.client=t}}function Jy(i){return new Promise(function(t,e){function n(o){const a=o.target;if(!a.status||a.status>=200&&a.status<300){let l;try{l=JSON.parse(a.responseText)}catch(h){const c="Error parsing response text as JSON: "+h.message;e(new Error(c));return}t(l);return}e(new iO(a))}function s(o){e(new nO(o.target))}const r=new XMLHttpRequest;r.addEventListener("load",n),r.addEventListener("error",s),r.open("GET",i),r.setRequestHeader("Accept","application/json"),r.send()})}function t1(i,t){return t.includes("://")?t:new URL(t,i).href}class e1 extends Ai{constructor(t){if(super({attributions:t.attributions,cacheSize:t.cacheSize,crossOrigin:t.crossOrigin,interpolate:t.interpolate,projection:tt("EPSG:3857"),reprojectionErrorThreshold:t.reprojectionErrorThreshold,state:"loading",tileLoadFunction:t.tileLoadFunction,wrapX:t.wrapX!==void 0?t.wrapX:!0,transition:t.transition,zDirection:t.zDirection}),this.tileJSON_=null,this.tileSize_=t.tileSize,t.url)if(t.jsonp)kg(t.url,this.handleTileJSONResponse.bind(this),this.handleTileJSONError.bind(this));else{const e=new XMLHttpRequest;e.addEventListener("load",this.onXHRLoad_.bind(this)),e.addEventListener("error",this.onXHRError_.bind(this)),e.open("GET",t.url),e.send()}else if(t.tileJSON)this.handleTileJSONResponse(t.tileJSON);else throw new Error("Either `url` or `tileJSON` options must be provided")}onXHRLoad_(t){const e=t.target;if(!e.status||e.status>=200&&e.status<300){let n;try{n=JSON.parse(e.responseText)}catch{this.handleTileJSONError();return}this.handleTileJSONResponse(n)}else this.handleTileJSONError()}onXHRError_(t){this.handleTileJSONError()}getTileJSON(){return this.tileJSON_}handleTileJSONResponse(t){const e=tt("EPSG:4326"),n=this.getProjection();let s;if(t.bounds!==void 0){const h=Hs(e,n);s=Gr(t.bounds,h)}const r=qn(n),o=t.minzoom||0,a=t.maxzoom||22,l=Js({extent:r,maxZoom:a,minZoom:o,tileSize:this.tileSize_});if(this.tileGrid=l,this.tileUrlFunction=Lg(t.tiles,l),t.attribution&&!this.getAttributions()){const h=s!==void 0?s:r;this.setAttributions(function(c){return Qt(h,c.extent)?[t.attribution]:null})}this.tileJSON_=t,this.setState("ready")}handleTileJSONError(){this.setState("error")}}let sO=class extends ao{constructor(i,t,e,n,s,r){super(i,t,r),this.extent=null,this.format_=n,this.features_=null,this.loader_,this.projection=null,this.resolution,this.tileLoadFunction_=s,this.url_=e,this.key=e}getFormat(){return this.format_}getFeatures(){return this.features_}load(){this.state==q.IDLE&&(this.setState(q.LOADING),this.tileLoadFunction_(this,this.url_),this.loader_&&this.loader_(this.extent,this.resolution,this.projection))}onLoad(i,t){this.setFeatures(i)}onError(){this.setState(q.ERROR)}setFeatures(i){this.features_=i,this.setState(q.LOADED)}setLoader(i){this.loader_=i}};const am=[];class rO extends ao{constructor(t,e,n,s){super(t,e,{transition:0}),this.context_={},this.executorGroups={},this.loadingSourceTiles=0,this.hitDetectionImageData={},this.replayState_={},this.sourceTiles=[],this.errorTileKeys={},this.wantedResolution,this.getSourceTiles=s.bind(void 0,this),this.wrappedTileCoord=n}getContext(t){const e=st(t);return e in this.context_||(this.context_[e]=Jt(1,1,am)),this.context_[e]}hasContext(t){return st(t)in this.context_}getImage(t){return this.hasContext(t)?this.getContext(t).canvas:null}getReplayState(t){const e=st(t);return e in this.replayState_||(this.replayState_[e]={dirty:!1,renderedRenderOrder:null,renderedResolution:NaN,renderedRevision:-1,renderedTileResolution:NaN,renderedTileRevision:-1,renderedTileZ:-1}),this.replayState_[e]}load(){this.getSourceTiles()}release(){for(const t in this.context_){const e=this.context_[t];Us(e),am.push(e.canvas),delete this.context_[t]}super.release()}}class Kh extends Ng{constructor(t){const e=t.projection||"EPSG:3857",n=t.extent||qn(e),s=t.tileGrid||Js({extent:n,maxResolution:t.maxResolution,maxZoom:t.maxZoom!==void 0?t.maxZoom:22,minZoom:t.minZoom,tileSize:t.tileSize||512});super({attributions:t.attributions,attributionsCollapsible:t.attributionsCollapsible,cacheSize:t.cacheSize,interpolate:!0,opaque:!1,projection:e,state:t.state,tileGrid:s,tileLoadFunction:t.tileLoadFunction?t.tileLoadFunction:oO,tileUrlFunction:t.tileUrlFunction,url:t.url,urls:t.urls,wrapX:t.wrapX===void 0?!0:t.wrapX,transition:t.transition,zDirection:t.zDirection===void 0?1:t.zDirection}),this.format_=t.format?t.format:null,this.sourceTileCache=new $h(this.tileCache.highWaterMark),this.overlaps_=t.overlaps==null?!0:t.overlaps,this.tileClass=t.tileClass?t.tileClass:sO,this.tileGrids_={}}getFeaturesInExtent(t){const e=[],n=this.tileCache;if(n.getCount()===0)return e;const s=sy(n.peekFirstKey())[0],r=this.tileGrid;return n.forEach(function(o){if(o.tileCoord[0]!==s||o.getState()!==q.LOADED)return;const a=o.getSourceTiles();for(let l=0,h=a.length;l{const a=DI(o),l=n.peek(a);if(l){const h=l.sourceTiles;for(let c=0,u=h.length;c{const f=this.tileUrlFunction(g,t,e),p=this.sourceTileCache.containsKey(f)?this.sourceTileCache.get(f):new this.tileClass(g,f?q.IDLE:q.EMPTY,f,this.format_,this.tileLoadFunction);n.sourceTiles.push(p);const _=p.getState();if(_{this.handleTileChange(v);const w=p.getState();if(w===q.LOADED||w===q.ERROR){const E=p.getKey();E in n.errorTileKeys?p.getState()===q.LOADED&&delete n.errorTileKeys[E]:n.loadingSourceTiles--,w===q.ERROR?n.errorTileKeys[E]=!0:p.removeEventListener(Lt.CHANGE,x),n.loadingSourceTiles===0&&n.setState(Fn(n.errorTileKeys)?q.LOADED:q.ERROR)}};p.addEventListener(Lt.CHANGE,x),n.loadingSourceTiles++}_===q.IDLE&&(p.extent=h.getTileCoordExtent(g),p.projection=e,p.resolution=h.getResolution(g[0]),this.sourceTileCache.set(f,p),p.load())}),n.loadingSourceTiles||n.setState(n.sourceTiles.some(g=>g.getState()===q.ERROR)?q.ERROR:q.LOADED)}return n.sourceTiles}getTile(t,e,n,s,r){const o=un(t,e,n),a=this.getKey();let l;if(this.tileCache.containsKey(o)&&(l=this.tileCache.get(o),l.key===a))return l;const h=[t,e,n];let c=this.getTileCoordForTileUrlFunction(h,r);const u=this.getTileGrid().getExtent(),g=this.getTileGridForProjection(r);if(c&&u){const _=g.getTileCoordExtent(c);Ii(_,-g.getResolution(t),_),Qt(u,_)||(c=null)}let f=!0;if(c!==null){const _=this.tileGrid,x=g.getResolution(t),v=_.getZForResolution(x,1),w=g.getTileCoordExtent(c);Ii(w,-x,w),_.forEachTileCoord(w,v,E=>{f=f&&!this.tileUrlFunction(E,s,r)})}const p=new rO(h,f?q.EMPTY:q.IDLE,c,this.getSourceTiles.bind(this,s,r));return p.key=a,l?(p.interimTile=l,p.refreshInterimChain(),this.tileCache.replace(o,p)):this.tileCache.set(o,p),p}getTileGridForProjection(t){const e=t.getCode();let n=this.tileGrids_[e];if(!n){const s=this.tileGrid,r=s.getResolutions().slice(),o=r.map(function(h,c){return s.getOrigin(c)}),a=r.map(function(h,c){return s.getTileSize(c)}),l=S_+1;for(let h=r.length;h=0;return s[a?"CRS":"SRS"]=n.getCode(),a&&r.substr(0,2)=="ne"?o=[t[1],t[0],t[3],t[2]]:o=t,s.BBOX=o.join(","),Gn(i,s)}function n1(i,t,e,n,s,r,o){r=Object.assign({REQUEST:"GetMap"},r);const a=t/e,l=[Rl(yt(i)/a,sn),Rl(Vt(i)/a,sn)];if(e!=1)switch(o){case"geoserver":const h=90*e+.5|0;"FORMAT_OPTIONS"in r?r.FORMAT_OPTIONS+=";dpi:"+h:r.FORMAT_OPTIONS="dpi:"+h;break;case"mapserver":r.MAP_RESOLUTION=90*e;break;case"carmentaserver":case"qgis":r.DPI=90*e;break;default:throw new Error("Unknown `serverType` configured")}return i1(s,i,l,n,r)}function sh(i,t){return Object.assign({REQUEST:t,SERVICE:"WMS",VERSION:nh,FORMAT:"image/png",STYLES:"",TRANSPARENT:!0},i)}function s1(i){const t=i.hidpi===void 0?!0:i.hidpi,e=tt(i.projection||"EPSG:3857"),n=i.ratio||1.5,s=i.load||_s;return(r,o,a)=>{r=Hh(r,o,a,n),a!=1&&(!t||i.serverType===void 0)&&(a=1);const l=n1(r,o,a,e,i.url,sh(i.params,"GetMap"),i.serverType),h=new Image;return i.crossOrigin!==null&&(h.crossOrigin=i.crossOrigin),s(h,l).then(c=>({image:c,extent:r,pixelRatio:a}))}}function aO(i,t,e){if(i.url===void 0)return;const n=tt(i.projection||"EPSG:3857"),s=Vu(t,e,0,lm),r={QUERY_LAYERS:i.params.LAYERS,INFO_FORMAT:"application/json"};Object.assign(r,sh(i.params,"GetFeatureInfo"),i.params);const o=wr((t[0]-s[0])/e,sn),a=wr((s[3]-t[1])/e,sn),l=Hu(r.VERSION,"1.3")>=0;return r[l?"I":"X"]=o,r[l?"J":"Y"]=a,i1(i.url,s,lm,n,r)}function lO(i,t){if(i.url===void 0)return;const e={SERVICE:"WMS",VERSION:nh,REQUEST:"GetLegendGraphic",FORMAT:"image/png"};if(i.params===void 0||i.params.LAYER===void 0){const n=i.params.LAYERS;if(!(!Array.isArray(n)||n.length===1))return;e.LAYER=n}if(t!==void 0){const n=tt(i.projection||"EPSG:3857").getMetersPerUnit()||1,s=28e-5;e.SCALE=t*n/s}return Object.assign(e,i.params),Gn(i.url,e)}class r1 extends Ai{constructor(t){t=t||{};const e=Object.assign({},t.params),n="TRANSPARENT"in e?e.TRANSPARENT:!0;super({attributions:t.attributions,attributionsCollapsible:t.attributionsCollapsible,cacheSize:t.cacheSize,crossOrigin:t.crossOrigin,interpolate:t.interpolate,opaque:!n,projection:t.projection,reprojectionErrorThreshold:t.reprojectionErrorThreshold,tileClass:t.tileClass,tileGrid:t.tileGrid,tileLoadFunction:t.tileLoadFunction,url:t.url,urls:t.urls,wrapX:t.wrapX!==void 0?t.wrapX:!0,transition:t.transition,zDirection:t.zDirection}),this.gutter_=t.gutter!==void 0?t.gutter:0,this.params_=e,this.v13_=!0,this.serverType_=t.serverType,this.hidpi_=t.hidpi!==void 0?t.hidpi:!0,this.tmpExtent_=ze(),this.updateV13_(),this.setKey(this.getKeyForParams_())}getFeatureInfoUrl(t,e,n,s){const r=tt(n),o=this.getProjection()||r;let a=this.getTileGrid();a||(a=this.getTileGridForProjection(o));const l=_h(t,r,o),h=ua(o,r,t,e),c=a.getZForResolution(h,this.zDirection),u=a.getResolution(c),g=a.getTileCoordForCoordAndZ(l,c);if(a.getResolutions().length<=g[0])return;let f=a.getTileCoordExtent(g,this.tmpExtent_);const p=this.gutter_;p!==0&&(f=Ii(f,u*p,f));const _={QUERY_LAYERS:this.params_.LAYERS};Object.assign(_,sh(this.params_,"GetFeatureInfo"),s);const x=Math.floor((l[0]-f[0])/u),v=Math.floor((f[3]-l[1])/u);return _[this.v13_?"I":"X"]=x,_[this.v13_?"J":"Y"]=v,this.getRequestUrl_(g,f,1,o||r,_)}getLegendUrl(t,e){if(this.urls[0]===void 0)return;const n={SERVICE:"WMS",VERSION:nh,REQUEST:"GetLegendGraphic",FORMAT:"image/png"};if(e===void 0||e.LAYER===void 0){const s=this.params_.LAYERS;if(!(!Array.isArray(s)||s.length===1))return;n.LAYER=s}if(t!==void 0){const s=this.getProjection()?this.getProjection().getMetersPerUnit():1,r=28e-5;n.SCALE=t*s/r}return Object.assign(n,e),Gn(this.urls[0],n)}getGutter(){return this.gutter_}getParams(){return this.params_}getRequestUrl_(t,e,n,s,r){const o=this.urls;if(!o)return;let a;if(o.length==1)a=o[0];else{const l=an(ig(t),o.length);a=o[l]}return n1(e,(this.tileGrid||this.getTileGridForProjection(s)).getResolution(t[0]),n,s,a,r,this.serverType_)}getTilePixelRatio(t){return!this.hidpi_||this.serverType_===void 0?1:t}getKeyForParams_(){let t=0;const e=[];for(const n in this.params_)e[t++]=n+"-"+this.params_[n];return e.join("/")}updateParams(t){Object.assign(this.params_,t),this.updateV13_(),this.setKey(this.getKeyForParams_())}updateV13_(){const t=this.params_.VERSION||nh;this.v13_=Hu(t,"1.3")>=0}tileUrlFunction(t,e,n){let s=this.getTileGrid();if(s||(s=this.getTileGridForProjection(n)),s.getResolutions().length<=t[0])return;e!=1&&(!this.hidpi_||this.serverType_===void 0)&&(e=1);const r=s.getResolution(t[0]);let o=s.getTileCoordExtent(t,this.tmpExtent_);const a=this.gutter_;a!==0&&(o=Ii(o,r*a,o));const l=Object.assign({},sh(this.params_,"GetMap"));return this.getRequestUrl_(t,o,e,n,l)}}class o1 extends Ai{constructor(t){const e=t.requestEncoding!==void 0?t.requestEncoding:"KVP",n=t.tileGrid;let s=t.urls;s===void 0&&t.url!==void 0&&(s=Og(t.url)),super({attributions:t.attributions,attributionsCollapsible:t.attributionsCollapsible,cacheSize:t.cacheSize,crossOrigin:t.crossOrigin,interpolate:t.interpolate,projection:t.projection,reprojectionErrorThreshold:t.reprojectionErrorThreshold,tileClass:t.tileClass,tileGrid:n,tileLoadFunction:t.tileLoadFunction,tilePixelRatio:t.tilePixelRatio,urls:s,wrapX:t.wrapX!==void 0?t.wrapX:!1,transition:t.transition,zDirection:t.zDirection}),this.version_=t.version!==void 0?t.version:"1.0.0",this.format_=t.format!==void 0?t.format:"image/jpeg",this.dimensions_=t.dimensions!==void 0?t.dimensions:{},this.layer_=t.layer,this.matrixSet_=t.matrixSet,this.style_=t.style,this.requestEncoding_=e,this.setKey(this.getKeyForDimensions_()),s&&s.length>0&&(this.tileUrlFunction=Vr(s.map(this.createFromWMTSTemplate.bind(this))))}setUrls(t){this.urls=t;const e=t.join(` -`);this.setTileUrlFunction(Vr(t.map(this.createFromWMTSTemplate.bind(this))),e)}getDimensions(){return this.dimensions_}getFormat(){return this.format_}getLayer(){return this.layer_}getMatrixSet(){return this.matrixSet_}getRequestEncoding(){return this.requestEncoding_}getStyle(){return this.style_}getVersion(){return this.version_}getKeyForDimensions_(){const t=this.urls?this.urls.slice(0):[];for(const e in this.dimensions_)t.push(e+"-"+this.dimensions_[e]);return t.join("/")}updateDimensions(t){Object.assign(this.dimensions_,t),this.setKey(this.getKeyForDimensions_())}createFromWMTSTemplate(t){const e=this.requestEncoding_,n={layer:this.layer_,style:this.style_,tilematrixset:this.matrixSet_};e=="KVP"&&Object.assign(n,{Service:"WMTS",Request:"GetTile",Version:this.version_,Format:this.format_}),t=e=="KVP"?Gn(t,n):t.replace(/\{(\w+?)\}/g,function(o,a){return a.toLowerCase()in n?n[a.toLowerCase()]:o});const s=this.tileGrid,r=this.dimensions_;return function(o,a,l){if(!o)return;const h={TileMatrix:s.getMatrixId(o[0]),TileCol:o[1],TileRow:o[2]};Object.assign(h,r);let c=t;return e=="KVP"?c=Gn(c,h):c=c.replace(/\{(\w+?)\}/g,function(u,g){return h[g]}),c}}}function a1(i,t){const e=i.Contents.Layer,n=e==null?void 0:e.find(function(j){return j.Identifier==t.layer});if(!n)return null;const s=i.Contents.TileMatrixSet;let r;n.TileMatrixSetLink.length>1?"projection"in t?r=n.TileMatrixSetLink.findIndex(function(j){const B=s.find(function(y){return y.Identifier==j.TileMatrixSet}).SupportedCRS,d=tt(B),m=tt(t.projection);return d&&m?Ae(d,m):B==t.projection}):r=n.TileMatrixSetLink.findIndex(function(j){return j.TileMatrixSet==t.matrixSet}):r=0,r<0&&(r=0);const o=n.TileMatrixSetLink[r].TileMatrixSet,a=n.TileMatrixSetLink[r].TileMatrixSetLimits;let l=n.Format[0];"format"in t&&(l=t.format),r=n.Style.findIndex(function(j){return"style"in t?j.Title==t.style:j.isDefault}),r<0&&(r=0);const h=n.Style[r].Identifier,c={};"Dimension"in n&&n.Dimension.forEach(function(j,B,d){const m=j.Identifier;let y=j.Default;y===void 0&&(y=j.Value[0]),c[m]=y});const u=i.Contents.TileMatrixSet.find(function(j){return j.Identifier==o});let g;const f=u.SupportedCRS;if(f&&(g=tt(f)),"projection"in t){const j=tt(t.projection);j&&(!g||Ae(j,g))&&(g=j)}let p=!1;const _=g.getAxisOrientation().substr(0,2)=="ne";let x=u.TileMatrix[0],v={MinTileCol:0,MinTileRow:0,MaxTileCol:x.MatrixWidth-1,MaxTileRow:x.MatrixHeight-1};if(a){v=a[a.length-1];const j=u.TileMatrix.find(B=>B.Identifier===v.TileMatrix||u.Identifier+":"+B.Identifier===v.TileMatrix);j&&(x=j)}const w=x.ScaleDenominator*28e-5/g.getMetersPerUnit(),E=_?[x.TopLeftCorner[1],x.TopLeftCorner[0]]:x.TopLeftCorner,S=x.TileWidth*w,T=x.TileHeight*w;let R=u.BoundingBox;R&&_&&(R=[R[1],R[0],R[3],R[2]]);let C=[E[0]+S*v.MinTileCol,E[1]-T*(1+v.MaxTileRow),E[0]+S*(1+v.MaxTileCol),E[1]-T*v.MinTileRow];if(R!==void 0&&!Ze(R,C)){const j=n.WGS84BoundingBox,B=tt("EPSG:4326").getExtent();if(C=R,j)p=j[0]===B[0]&&j[2]===B[2];else{const d=Ju(R,u.SupportedCRS,"EPSG:4326");p=d[0]-1e-10<=B[0]&&d[2]+1e-10>=B[2]}}const P=sA(u,C,a),N=[];let U=t.requestEncoding;if(U=U!==void 0?U:"","OperationsMetadata"in i&&"GetTile"in i.OperationsMetadata){const j=i.OperationsMetadata.GetTile.DCP.HTTP.Get;for(let B=0,d=j.length;Bv)return 1;if(v>x)return-1}var w=f[f.length-1],E=p[p.length-1];if(w&&E){var S=w.split(".").map(r),T=E.split(".").map(r);for(_=0;_T[_])return 1;if(T[_]>S[_])return-1}}else if(w||E)return w?-1:1;return 0}var l=[">",">=","=","<","<="],h={">":[1],">=":[0,1],"=":[0],"<=":[-1,0],"<":[-1]};function c(u){if(typeof u!="string")throw new TypeError("Invalid operator type, expected string but got "+typeof u);if(l.indexOf(u)===-1)throw new TypeError("Invalid operator, expected one of "+l.join("|"))}return a.validate=function(u){return typeof u=="string"&&e.test(u)},a.compare=function(u,g,f){c(f);var p=a(u,g);return h[f].indexOf(p)>-1},a})})(l1);var hO=l1.exports,Au=hO;const Dg="1.0.0",gt={classification:"https://stac-extensions.github.io/classification/v1.1.0/schema.json",datacube:"https://stac-extensions.github.io/datacube/v2.1.0/schema.json",eo:"https://stac-extensions.github.io/eo/v1.0.0/schema.json",file:"https://stac-extensions.github.io/file/v1.0.0/schema.json","item-assets":"https://stac-extensions.github.io/item-assets/v1.0.0/schema.json",label:"https://stac-extensions.github.io/label/v1.0.1/schema.json",pointcloud:"https://stac-extensions.github.io/pointcloud/v1.0.0/schema.json",processing:"https://stac-extensions.github.io/processing/v1.1.0/schema.json",projection:"https://stac-extensions.github.io/projection/v1.0.0/schema.json",raster:"https://stac-extensions.github.io/raster/v1.1.0/schema.json",sar:"https://stac-extensions.github.io/sar/v1.0.0/schema.json",sat:"https://stac-extensions.github.io/sat/v1.0.0/schema.json",scientific:"https://stac-extensions.github.io/scientific/v1.0.0/schema.json",table:"https://stac-extensions.github.io/table/v1.2.0/schema.json",timestamps:"https://stac-extensions.github.io/timestamps/v1.0.0/schema.json",version:"https://stac-extensions.github.io/version/v1.0.0/schema.json",view:"https://stac-extensions.github.io/view/v1.0.0/schema.json"},Gs={itemAndCollection:{"cube:":gt.datacube,"eo:":gt.eo,"file:":gt.file,"label:":gt.label,"pc:":gt.pointcloud,"processing:":gt.processing,"proj:":gt.projection,"raster:":gt.raster,"sar:":gt.sar,"sat:":gt.sat,"sci:":gt.scientific,"view:":gt.view,version:gt.version,deprecated:gt.version,published:gt.timestamps,expires:gt.timestamps,unpublished:gt.timestamps},catalog:{},collection:{item_assets:gt["item-assets"]},item:{}};Gs.collection=Object.assign(Gs.collection,Gs.itemAndCollection);Gs.item=Object.assign(Gs.item,Gs.itemAndCollection);var Io={parseUrl(i){let t=i.match(/^https?:\/\/stac-extensions.github.io\/([^\/]+)\/v([^\/]+)\/[^.]+.json$/i);if(t)return{id:t[1],version:t[2]}}},Ft={version:Dg,extensions:{},set(i){if(typeof i.stac_version!="string"?Ft.version="0.6.0":Ft.version=i.stac_version,Array.isArray(i.stac_extensions))for(let t of i.stac_extensions){let e=Io.parseUrl(t);e&&(Ft.extensions[e.id]=e.version)}},before(i,t=null){let e=t?Ft.extensions[t]:Ft.version;return typeof e>"u"?!1:Au.compare(e,i,"<")}},D={type(i){let t=typeof i;if(t==="object"){if(i===null)return"null";if(Array.isArray(i))return"array"}return t},is(i,t){return D.type(i)===t},isDefined(i){return typeof i<"u"},isObject(i){return typeof i=="object"&&i===Object(i)&&!Array.isArray(i)},rename(i,t,e){return typeof i[t]<"u"&&typeof i[e]>"u"?(i[e]=i[t],delete i[t],!0):!1},forAll(i,t,e){if(i[t]&&typeof i[t]=="object")for(let n in i[t])e(i[t][n])},toArray(i,t){return typeof i[t]<"u"&&!Array.isArray(i[t])?(i[t]=[i[t]],!0):!1},flattenArray(i,t,e,n=!1){if(Array.isArray(i[t])){for(let s in i[t])if(typeof e[s]=="string"){let r=i[t][s];i[e[s]]=n?[r]:r}return delete i[t],!0}return!1},flattenOneElementArray(i,t,e=!1){return!e&&Array.isArray(i[t])?i[t].length===1?(i[t]=i[t][0],!0):!1:!0},removeFromArray(i,t,e){if(Array.isArray(i[t])){let n=i[t].indexOf(e);return n>-1&&i[t].splice(n,1),!0}return!1},ensure(i,t,e){return D.type(e)!==D.type(i[t])&&(i[t]=e),!0},upgradeExtension(i,t){let{id:e,version:n}=Io.parseUrl(t),s=i.stac_extensions.findIndex(r=>{let o=Io.parseUrl(r);return o&&o.id===e&&Au.compare(o.version,n,"<")});return s!==-1?(i.stac_extensions[s]=t,!0):!1},addExtension(i,t){let{id:e,version:n}=Io.parseUrl(t),s=i.stac_extensions.findIndex(r=>{if(r===t)return!0;let o=Io.parseUrl(r);return!!(o&&o.id===e&&Au.compare(o.version,n,"<"))});return s===-1?i.stac_extensions.push(t):i.stac_extensions[s]=t,i.stac_extensions.sort(),!0},removeExtension(i,t){return D.removeFromArray(i,"stac_extensions",t)},migrateExtensionShortnames(i){let t=Object.keys(gt),e=Object.values(gt);return D.mapValues(i,"stac_extensions",t,e)},populateExtensions(i,t){let e=[];(t=="catalog"||t=="collection")&&e.push(i),(t=="item"||t=="collection")&&D.isObject(i.assets)&&(e=e.concat(Object.values(i.assets))),t=="collection"&&D.isObject(i.item_assets)&&(e=e.concat(Object.values(i.item_assets))),t=="collection"&&D.isObject(i.summaries)&&e.push(i.summaries),t=="item"&&D.isObject(i.properties)&&e.push(i.properties);for(let n of e)Object.keys(n).forEach(s=>{let r=s.match(/^(\w+:|[^:]+$)/i);if(Array.isArray(r)){let o=Gs[t][r[0]];D.is(o,"string")&&D.addExtension(i,o)}})},mapValues(i,t,e,n){let s=r=>{let o=e.indexOf(r);return o>=0?n[o]:r};return Array.isArray(i[t])?i[t]=i[t].map(s):typeof i[t]<"u"&&(i[t]=s(i[t])),!0},mapObject(i,t){for(let e in i)i[e]=t(i[e],e)},moveTo(i,t,e,n=!1,s=!1){let r;return n?s?r=o=>Array.isArray(o):r=o=>Array.isArray(o)&&o.length===1:r=D.isDefined,r(i[t])?(e[t]=n&&!s?i[t][0]:i[t],delete i[t],!0):!1},runAll(i,t,e,n){for(let s in i)s.startsWith("migrate")||i[s](t,e,n)},toUTC(i,t){if(typeof i[t]=="string")try{return i[t]=this.toISOString(i[t]),!0}catch{}return delete i[t],!1},toISOString(i){return i instanceof Date||(i=new Date(i)),i.toISOString().replace(".000","")}},en={multihash:null,hexToUint8(i){if(i.length===0||i.length%2!==0)throw new Error(`The string "${i}" is not valid hex.`);return new Uint8Array(i.match(/.{1,2}/g).map(t=>parseInt(t,16)))},uint8ToHex(i){return i.reduce((t,e)=>t+e.toString(16).padStart(2,"0"),"")},toMultihash(i,t,e){if(!en.multihash||!D.is(i[t],"string"))return!1;try{const n=en.multihash.encode(en.hexToUint8(i[t]),e);return i[t]=en.uint8ToHex(n),!0}catch(n){return console.warn(n),!1}}},Gg={migrate(i,t=!0){return Ft.set(i),t&&(i.stac_version=Dg),i.type="Catalog",D.ensure(i,"stac_extensions",[]),Ft.before("1.0.0-rc.1")&&D.migrateExtensionShortnames(i),D.ensure(i,"id",""),D.ensure(i,"description",""),D.ensure(i,"links",[]),D.runAll(Gg,i,i),Ft.before("0.8.0")&&D.populateExtensions(i,"catalog"),i}},jg={migrate(i,t=!0){return Gg.migrate(i,t),i.type="Collection",Ft.before("1.0.0-rc.1")&&D.migrateExtensionShortnames(i),D.ensure(i,"license","proprietary"),D.ensure(i,"extent",{spatial:{bbox:[]},temporal:{interval:[]}}),D.runAll(jg,i,i),D.isObject(i.properties)&&(D.removeFromArray(i,"stac_extensions","commons"),delete i.properties),Ft.before("0.8.0")&&D.populateExtensions(i,"collection"),Ft.before("1.0.0-beta.1")&&D.mapValues(i,"stac_extensions",["assets"],["item-assets"]),i},extent(i){if(D.ensure(i,"extent",{}),Ft.before("0.8.0")&&(Array.isArray(i.extent.spatial)&&(i.extent.spatial={bbox:[i.extent.spatial]}),Array.isArray(i.extent.temporal)&&(i.extent.temporal={interval:[i.extent.temporal]})),D.ensure(i.extent,"spatial",{}),D.ensure(i.extent.spatial,"bbox",[]),D.ensure(i.extent,"temporal",{}),D.ensure(i.extent.temporal,"interval",[]),Ft.before("1.0.0-rc.3")){if(i.extent.temporal.interval.length>1){let t,e;for(let n of i.extent.temporal.interval){if(n[0]===null)t=null;else if(typeof n[0]=="string"&&t!==null)try{let s=new Date(n[0]);(typeof t>"u"||s"u"||s>e)&&(e=s)}catch{}}i.extent.temporal.interval.unshift([t?D.toISOString(t):null,e?D.toISOString(e):null])}if(i.extent.spatial.bbox.length>1){let t=i.extent.spatial.bbox.reduce((e,n)=>Array.isArray(n)?Math.max(n.length,e):e,4);if(t>=4){let e=new Array(t).fill(null),n=t/2;for(let s of i.extent.spatial.bbox){if(!Array.isArray(s)||s.length<4)break;for(let r in s){let o=s[r];e[r]===null?e[r]=o:rs===null)===-1&&i.extent.spatial.bbox.unshift(e)}}}},collectionAssets(i){Ft.before("1.0.0-rc.1")&&D.removeExtension(i,"collection-assets"),fa.migrateAll(i)},itemAsset(i){Ft.before("1.0.0-beta.2")&&D.rename(i,"item_assets","assets"),fa.migrateAll(i,"item_assets")},summaries(i){if(D.ensure(i,"summaries",{}),Ft.before("0.8.0")&&D.isObject(i.other_properties)){for(let t in i.other_properties){let e=i.other_properties[t];Array.isArray(e.extent)&&e.extent.length===2?i.summaries[t]={minimum:e.extent[0],maximum:e.extent[1]}:Array.isArray(e.values)&&(e.values.filter(n=>Array.isArray(n)).length===e.values.length?i.summaries[t]=e.values.reduce((n,s)=>n.concat(s),[]):i.summaries[t]=e.values)}delete i.other_properties}if(Ft.before("1.0.0-beta.1")&&D.isObject(i.properties)&&!i.links.find(t=>["child","item"].includes(t.rel)))for(let t in i.properties){let e=i.properties[t];Array.isArray(e)||(e=[e]),i.summaries[t]=e}Ft.before("1.0.0-rc.1")&&D.mapObject(i.summaries,t=>(D.rename(t,"min","minimum"),D.rename(t,"max","maximum"),t)),Qh.migrate(i.summaries,i,!0),D.moveTo(i.summaries,"sci:doi",i,!0)&&D.addExtension(i,gt.scientific),D.moveTo(i.summaries,"sci:publications",i,!0,!0)&&D.addExtension(i,gt.scientific),D.moveTo(i.summaries,"sci:citation",i,!0)&&D.addExtension(i,gt.scientific),D.moveTo(i.summaries,"cube:dimensions",i,!0)&&D.addExtension(i,gt.datacube),Object.keys(i.summaries).length===0&&delete i.summaries}},zg={migrate(i,t=null,e=!0){Ft.set(i),e&&(i.stac_version=Dg),D.ensure(i,"stac_extensions",[]),Ft.before("1.0.0-rc.1")&&D.migrateExtensionShortnames(i),D.ensure(i,"id",""),D.ensure(i,"type","Feature"),D.isObject(i.geometry)||(i.geometry=null),i.geometry!==null&&D.ensure(i,"bbox",[]),D.ensure(i,"properties",{}),D.ensure(i,"links",[]),D.ensure(i,"assets",{});let n=!1;return D.isObject(t)&&D.isObject(t.properties)&&(D.removeFromArray(i,"stac_extensions","commons"),i.properties=Object.assign({},t.properties,i.properties),n=!0),D.runAll(zg,i,i),Qh.migrate(i.properties,i),fa.migrateAll(i),(Ft.before("0.8.0")||n)&&D.populateExtensions(i,"item"),i}},h1={migrate(i,t=!0){return D.ensure(i,"collections",[]),D.ensure(i,"links",[]),D.runAll(h1,i,i),i.collections=i.collections.map(e=>jg.migrate(e,t)),i}},c1={migrate(i,t=!0){return D.ensure(i,"type","FeatureCollection"),D.ensure(i,"features",[]),D.ensure(i,"links",[]),D.runAll(c1,i,i),i.features=i.features.map(e=>zg.migrate(e,null,t)),i}},fa={migrateAll(i,t="assets"){for(let e in i[t])fa.migrate(i[t][e],i)},migrate(i,t){return D.runAll(fa,i,t),Qh.migrate(i,t),i},mediaTypes(i){D.is(i.type,"string")&&D.mapValues(i,"type",["image/vnd.stac.geotiff","image/vnd.stac.geotiff; cloud-optimized=true"],["image/tiff; application=geotiff","image/tiff; application=geotiff; profile=cloud-optimized"])},eo(i,t){let e=D.isObject(t.properties)&&Array.isArray(t.properties["eo:bands"])?t.properties["eo:bands"]:[];if(Array.isArray(i["eo:bands"]))for(let n in i["eo:bands"]){let s=i["eo:bands"][n];D.is(s,"number")&&D.isObject(e[s])?s=e[s]:D.isObject(s)||(s={}),i["eo:bands"][n]=s}}},Qh={migrate(i,t,e=!1){return D.runAll(Qh,i,t,e),i},_commonMetadata(i){Ft.before("1.0.0-rc.3")&&(D.toUTC(i,"created"),D.toUTC(i,"updated"))},_timestamps(i,t){D.toUTC(i,"published"),D.toUTC(i,"expires"),D.toUTC(i,"unpublished"),D.upgradeExtension(t,gt.timestamps)},_versioningIndicator(i,t){D.upgradeExtension(t,gt.version)},checksum(i,t){Ft.before("0.9.0")&&en.multihash&&(D.rename(i,"checksum:md5","checksum:multihash")&&en.toMultihash(i,"checksum:multihash","md5"),D.rename(i,"checksum:sha1","checksum:multihash")&&en.toMultihash(i,"checksum:multihash","sha1"),D.rename(i,"checksum:sha2","checksum:multihash")&&en.toMultihash(i,"checksum:multihash","sha2-256"),D.rename(i,"checksum:sha3","checksum:multihash")&&en.toMultihash(i,"checksum:multihash","sha3-256")),Ft.before("1.0.0-rc.1")&&D.rename(i,"checksum:multihash","file:checksum")&&D.addExtension(t,gt.file),D.removeExtension(t,"checksum")},classification(i,t){Ft.before("1.1.0","classification")&&D.forAll(i,"classification:classes",e=>D.rename(e,"color-hint","color_hint")),D.upgradeExtension(t,gt.classification)},cube(i,t){D.upgradeExtension(t,gt.datacube)},dtr(i,t){Ft.before("0.9.0")&&(D.rename(i,"dtr:start_datetime","start_datetime"),D.rename(i,"dtr:end_datetime","end_datetime"),D.removeExtension(t,"datetime-range"))},eo(i,t){Ft.before("0.9.0")&&(D.rename(i,"eo:epsg","proj:epsg")&&D.addExtension(t,gt.projection),D.rename(i,"eo:platform","platform"),D.rename(i,"eo:instrument","instruments")&&D.toArray(i,"instruments"),D.rename(i,"eo:constellation","constellation"),D.rename(i,"eo:off_nadir","view:off_nadir")&&D.addExtension(t,gt.view),D.rename(i,"eo:azimuth","view:azimuth")&&D.addExtension(t,gt.view),D.rename(i,"eo:incidence_angle","view:incidence_angle")&&D.addExtension(t,gt.view),D.rename(i,"eo:sun_azimuth","view:sun_azimuth")&&D.addExtension(t,gt.view),D.rename(i,"eo:sun_elevation","view:sun_elevation")&&D.addExtension(t,gt.view)),Ft.before("1.0.0-beta.1")&&D.rename(i,"eo:gsd","gsd"),D.upgradeExtension(t,gt.eo)},file(i,t){D.upgradeExtension(t,gt.file)},label(i,t){Ft.before("0.8.0")&&(D.rename(i,"label:property","label:properties"),D.rename(i,"label:task","label:tasks"),D.rename(i,"label:overview","label:overviews")&&D.toArray(i,"label:overviews"),D.rename(i,"label:method","label:methods"),D.toArray(i,"label:classes")),D.upgradeExtension(t,gt.label)},pc(i,t){Ft.before("0.8.0")&&D.rename(i,"pc:schema","pc:schemas"),D.upgradeExtension(t,gt.pointcloud)},processing(i,t){D.upgradeExtension(t,gt.processing)},proj(i,t){D.upgradeExtension(t,gt.projection)},raster(i,t){D.upgradeExtension(t,gt.raster)},sar(i,t,e){D.rename(i,"sar:incidence_angle","view:incidence_angle")&&D.addExtension(t,gt.view),D.rename(i,"sar:pass_direction","sat:orbit_state")&&D.mapValues(i,"sat:orbit_state",[null],["geostationary"])&&D.addExtension(t,gt.sat),Ft.before("0.7.0")&&(D.flattenArray(i,"sar:resolution",["sar:resolution_range","sar:resolution_azimuth"],e),D.flattenArray(i,"sar:pixel_spacing",["sar:pixel_spacing_range","sar:pixel_spacing_azimuth"],e),D.flattenArray(i,"sar:looks",["sar:looks_range","sar:looks_azimuth","sar:looks_equivalent_number"],e),D.rename(i,"sar:off_nadir","view:off_nadir")&&D.addExtension(t,gt.view)),Ft.before("0.9.0")&&(D.rename(i,"sar:platform","platform"),D.rename(i,"sar:instrument","instruments")&&D.toArray(i,"instruments"),D.rename(i,"sar:constellation","constellation"),D.rename(i,"sar:type","sar:product_type"),D.rename(i,"sar:polarization","sar:polarizations"),D.flattenOneElementArray(i,"sar:absolute_orbit",e)&&D.rename(i,"sar:absolute_orbit","sat:absolute_orbit")&&D.addExtension(t,gt.sat),D.flattenOneElementArray(i,"sar:relative_orbit",e)&&D.rename(i,"sar:relative_orbit","sat:relative_orbit")&&D.addExtension(t,gt.sat)),D.upgradeExtension(t,gt.sar)},sat(i,t){Ft.before("0.9.0")&&(D.rename(i,"sat:off_nadir_angle","sat:off_nadir"),D.rename(i,"sat:azimuth_angle","sat:azimuth"),D.rename(i,"sat:sun_azimuth_angle","sat:sun_azimuth"),D.rename(i,"sat:sun_elevation_angle","sat:sun_elevation")),D.upgradeExtension(t,gt.sat)},sci(i,t){D.upgradeExtension(t,gt.scientific)},item(i){Ft.before("0.8.0")&&(D.rename(i,"item:license","license"),D.rename(i,"item:providers","providers"))},table(i,t){D.upgradeExtension(t,gt.table)},view(i,t){D.upgradeExtension(t,gt.view)}},yr={item(i,t=null,e=!0){return zg.migrate(i,t,e)},catalog(i,t=!0){return Gg.migrate(i,t)},collection(i,t=!0){return jg.migrate(i,t)},collectionCollection(i,t=!0){return h1.migrate(i,t)},itemCollection(i,t=!0){return c1.migrate(i,t)},stac(i,t=!0){return i.type==="Feature"?yr.item(i,null,t):i.type==="FeatureCollection"?yr.itemCollection(i,t):i.type==="Collection"||!i.type&&D.isDefined(i.extent)&&D.isDefined(i.license)?yr.collection(i,t):!i.type&&Array.isArray(i.collections)?yr.collectionCollection(i,t):yr.catalog(i,t)},enableMultihash(i){en.multihash=i}},cO=yr;const uO=eo(cO);function co(i){let t=i.length>=6,e=i[0],n=i[t?3:2],s=i[1],r=i[t?4:3],o={west:e,east:n,south:s,north:r};return t&&(o.base=i[2],o.height=i[5]),o}function Wc(i){let{west:t,east:e,south:n,north:s}=co(i);return[[[t,s],[t,n],[e,n],[e,s],[t,s]]]}function dO(i){if(!zi(i))return null;let t=co(i),e=[];if(d1(i)){let n=(t.west+360+t.east)/2;n>180&&(n-=360),e.push(n)}else e.push((t.west+t.east)/2);return e.push((t.south+t.north)/2),typeof t.base<"u"&&e.push((t.base+t.height)/2),e}function u1(i){if(zi(i)?i=[i]:Array.isArray(i)&&(i=i.filter(n=>zi(n))),!Array.isArray(i)||i.length===0)return null;let t=i.reduce((n,s)=>{if(d1(s)){let{west:r,east:o,south:a,north:l}=co(s);n.push(Wc([-180,a,o,l])),n.push(Wc([r,a,180,l]))}else n.push(Wc(s));return n},[]),e=null;if(t.length===1?e={type:"Polygon",coordinates:t[0]}:t.length>1&&(e={type:"MultiPolygon",coordinates:t}),e)return{type:"Feature",geometry:e,properties:{}}}function zi(i){if(!Array.isArray(i)||![4,6].includes(i.length)||i.some(r=>typeof r!="number"))return!1;let{west:t,east:e,south:n,north:s}=co(i);return n<=s&&t>=-180&&t<=180&&n>=-90&&e<=180&&e>=-180&&s<=90}function d1(i){if(!zi(i))return!1;let{west:t,east:e}=co(i);return t>e}function g1(i){if(!Array.isArray(i)||i.length===0)return null;let t={west:180,south:90,east:-180,north:-90};i.forEach(n=>{if(!zi(n))return;let s=co(n),r=["west","south"];for(let o in s){let a=r.includes(o)?Math.min:Math.max;t[o]=a(t[o],s[o])}});let e=[t.west,t.south,t.east,t.north];return zi(e)?e:null}function ai(i){return typeof i=="string"&&i.length>0}function ei(i){return typeof i=="object"&&i===Object(i)&&!Array.isArray(i)}function f1(...i){if(i=i.filter(t=>Array.isArray(t)),i.length>1){let t=Math.max(...i.map(n=>n.length)),e=[];for(let n=0;ns[n])));return e}else if(i.length===1)return i[0];return[]}function gO(i){switch(i){case"int8":return-128;case"int16":return-32768;case"int32":return-2147483648}return i.startsWith("u")?0:null}function fO(i){switch(i){case"int8":return 127;case"uint8":return 255;case"int16":return 32767;case"uint16":return 65535;case"int32":return 2147483647;case"uint32":return 4294967295}return null}class Jh{constructor(t,e={},n=[]){if(!ei(t))throw new Error("Given data is not an object");if(t instanceof Jh){for(let s of n)this[s]=t[s];t=t.toJSON()}this._keyMap=e,this._privateKeys=["_keyMap","_privateKeys"].concat(n);for(let s in t)typeof this[s]>"u"&&(s in e?this[s]=e[s](t[s],this):this[s]=t[s])}isItem(){return this.type==="Feature"}isCatalog(){return this.type==="Catalog"}isCatalogLike(){return this.isCatalog()||this.isCollection()}isCollection(){return this.type==="Collection"}isItemCollection(){return this.type==="FeatureCollection"}isCollectionCollection(){return!1}isAsset(){return!1}isLink(){return!1}getObjectType(){}getAbsoluteUrl(){return null}getMetadata(t){return this[t]}toGeoJSON(){return null}getBoundingBox(){return null}getCenter(){return dO(this.getBoundingBox())}getBoundingBoxes(){return[]}toJSON(){let t={};return Object.keys(this).forEach(e=>{if(typeof this[e]=="function"||this._privateKeys.includes(e))return;let n=this[e];if(e in this._keyMap){let s=Array.isArray(n)?[]:{};for(let r in n)s[r]=n[r].toJSON();n=s}t[e]=n}),t}}var p1={exports:{}},bl={exports:{}};/*! https://mths.be/punycode v1.4.0 by @mathias */bl.exports;var hm;function pO(){return hm||(hm=1,function(i,t){(function(e){var n=t&&!t.nodeType&&t,s=i&&!i.nodeType&&i,r=typeof ks=="object"&&ks;(r.global===r||r.window===r||r.self===r)&&(e=r);var o,a=2147483647,l=36,h=1,c=26,u=38,g=700,f=72,p=128,_="-",x=/^xn--/,v=/[^\x20-\x7E]/,w=/[\x2E\u3002\uFF0E\uFF61]/g,E={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},S=l-h,T=Math.floor,R=String.fromCharCode,C;function P(L){throw new RangeError(E[L])}function N(L,k){for(var W=L.length,K=[];W--;)K[W]=k(L[W]);return K}function U(L,k){var W=L.split("@"),K="";W.length>1&&(K=W[0]+"@",L=W[1]),L=L.replace(w,".");var G=L.split("."),H=N(G,k).join(".");return K+H}function j(L){for(var k=[],W=0,K=L.length,G,H;W=55296&&G<=56319&&W65535&&(k-=65536,W+=R(k>>>10&1023|55296),k=56320|k&1023),W+=R(k),W}).join("")}function d(L){return L-48<10?L-22:L-65<26?L-65:L-97<26?L-97:l}function m(L,k){return L+22+75*(L<26)-((k!=0)<<5)}function y(L,k,W){var K=0;for(L=W?T(L/g):L>>1,L+=T(L/k);L>S*c>>1;K+=l)L=T(L/S);return T(K+(S+1)*L/(L+u))}function b(L){var k=[],W=L.length,K,G=0,H=p,Q=f,nt,xt,dt,Tt,Et,kt,Yt,ue,Ht;for(nt=L.lastIndexOf(_),nt<0&&(nt=0),xt=0;xt=128&&P("not-basic"),k.push(L.charCodeAt(xt));for(dt=nt>0?nt+1:0;dt=W&&P("invalid-input"),Yt=d(L.charCodeAt(dt++)),(Yt>=l||Yt>T((a-G)/Et))&&P("overflow"),G+=Yt*Et,ue=kt<=Q?h:kt>=Q+c?c:kt-Q,!(YtT(a/Ht)&&P("overflow"),Et*=Ht;K=k.length+1,Q=y(G-Tt,K,Tt==0),T(G/K)>a-H&&P("overflow"),H+=T(G/K),G%=K,k.splice(G++,0,H)}return B(k)}function M(L){var k,W,K,G,H,Q,nt,xt,dt,Tt,Et,kt=[],Yt,ue,Ht,Ke;for(L=j(L),Yt=L.length,k=p,W=0,H=f,Q=0;Q=k&&EtT((a-W)/ue)&&P("overflow"),W+=(nt-k)*ue,k=nt,Q=0;Qa&&P("overflow"),Et==k){for(xt=W,dt=l;Tt=dt<=H?h:dt>=H+c?c:dt-H,!(xt1;f++)u.splice(0,1);a[g]=u.join("")}var p=-1,_=0,x=0,v=-1,w=!1;for(g=0;g_&&(p=v,_=x)):a[g]==="0"&&(w=!0,v=g,x=1);x>_&&(p=v,_=x),_>1&&a.splice(p,_,""),l=a.length;var E="";for(a[0]===""&&(E=":"),g=0;g=s.length-1)return!1;var o=s.lastIndexOf(".",r-1);if(o<=0||o>=r-1)return!1;var a=n.list[s.slice(r+1)];return a?a.indexOf(" "+s.slice(o+1,r)+" ")>=0:!1},is:function(s){var r=s.lastIndexOf(".");if(r<=0||r>=s.length-1)return!1;var o=s.lastIndexOf(".",r-1);if(o>=0)return!1;var a=n.list[s.slice(r+1)];return a?a.indexOf(" "+s.slice(0,r)+" ")>=0:!1},get:function(s){var r=s.lastIndexOf(".");if(r<=0||r>=s.length-1)return null;var o=s.lastIndexOf(".",r-1);if(o<=0||o>=r-1)return null;var a=n.list[s.slice(r+1)];return!a||a.indexOf(" "+s.slice(o+1,r)+" ")<0?null:s.slice(o+1)},noConflict:function(){return t.SecondLevelDomains===this&&(t.SecondLevelDomains=e),this}};return n})}(dm)),dm.exports}/*! - * URI.js - Mutating URLs - * - * Version: 1.19.11 - * - * Author: Rodney Rehm - * Web: http://medialize.github.io/URI.js/ - * - * Licensed under - * MIT License http://www.opensource.org/licenses/mit-license - * - */(function(i){(function(t,e){i.exports?i.exports=e(pO(),mO(),_O()):t.URI=e(t.punycode,t.IPv6,t.SecondLevelDomains,t)})(ks,function(t,e,n,s){var r=s&&s.URI;function o(d,m){var y=arguments.length>=1,b=arguments.length>=2;if(!(this instanceof o))return y?b?new o(d,m):new o(d):new o;if(d===void 0){if(y)throw new TypeError("undefined is not a valid argument for URI");typeof location<"u"?d=location.href+"":d=""}if(d===null&&y)throw new TypeError("null is not a valid argument for URI");return this.href(d),m!==void 0?this.absoluteTo(m):this}function a(d){return/^[0-9]+$/.test(d)}o.version="1.19.11";var l=o.prototype,h=Object.prototype.hasOwnProperty;function c(d){return d.replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")}function u(d){return d===void 0?"Undefined":String(Object.prototype.toString.call(d)).slice(8,-1)}function g(d){return u(d)==="Array"}function f(d,m){var y={},b,M;if(u(m)==="RegExp")y=null;else if(g(m))for(b=0,M=m.length;b]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?«»“”‘’]))/ig,o.findUri={start:/\b(?:([a-z][a-z0-9.+-]*:\/\/)|www\.)/gi,end:/[\s\r\n]|$/,trim:/[`!()\[\]{};:'".,<>?«»“”„‘’]+$/,parens:/(\([^\)]*\)|\[[^\]]*\]|\{[^}]*\}|<[^>]*>)/g},o.leading_whitespace_expression=/^[\x00-\x20\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/,o.ascii_tab_whitespace=/[\u0009\u000A\u000D]+/g,o.defaultPorts={http:"80",https:"443",ftp:"21",gopher:"70",ws:"80",wss:"443"},o.hostProtocols=["http","https"],o.invalid_hostname_characters=/[^a-zA-Z0-9\.\-:_]/,o.domAttributes={a:"href",blockquote:"cite",link:"href",base:"href",script:"src",form:"action",img:"src",area:"href",iframe:"src",embed:"src",source:"src",track:"src",input:"src",audio:"src",video:"src"},o.getDomAttribute=function(d){if(!(!d||!d.nodeName)){var m=d.nodeName.toLowerCase();if(!(m==="input"&&d.type!=="image"))return o.domAttributes[m]}};function v(d){return escape(d)}function w(d){return encodeURIComponent(d).replace(/[!'()*]/g,v).replace(/\*/g,"%2A")}o.encode=w,o.decode=decodeURIComponent,o.iso8859=function(){o.encode=escape,o.decode=unescape},o.unicode=function(){o.encode=w,o.decode=decodeURIComponent},o.characters={pathname:{encode:{expression:/%(24|26|2B|2C|3B|3D|3A|40)/ig,map:{"%24":"$","%26":"&","%2B":"+","%2C":",","%3B":";","%3D":"=","%3A":":","%40":"@"}},decode:{expression:/[\/\?#]/g,map:{"/":"%2F","?":"%3F","#":"%23"}}},reserved:{encode:{expression:/%(21|23|24|26|27|28|29|2A|2B|2C|2F|3A|3B|3D|3F|40|5B|5D)/ig,map:{"%3A":":","%2F":"/","%3F":"?","%23":"#","%5B":"[","%5D":"]","%40":"@","%21":"!","%24":"$","%26":"&","%27":"'","%28":"(","%29":")","%2A":"*","%2B":"+","%2C":",","%3B":";","%3D":"="}}},urnpath:{encode:{expression:/%(21|24|27|28|29|2A|2B|2C|3B|3D|40)/ig,map:{"%21":"!","%24":"$","%27":"'","%28":"(","%29":")","%2A":"*","%2B":"+","%2C":",","%3B":";","%3D":"=","%40":"@"}},decode:{expression:/[\/\?#:]/g,map:{"/":"%2F","?":"%3F","#":"%23",":":"%3A"}}}},o.encodeQuery=function(d,m){var y=o.encode(d+"");return m===void 0&&(m=o.escapeQuerySpace),m?y.replace(/%20/g,"+"):y},o.decodeQuery=function(d,m){d+="",m===void 0&&(m=o.escapeQuerySpace);try{return o.decode(m?d.replace(/\+/g,"%20"):d)}catch{return d}};var E={encode:"encode",decode:"decode"},S,T=function(d,m){return function(y){try{return o[m](y+"").replace(o.characters[d][m].expression,function(b){return o.characters[d][m].map[b]})}catch{return y}}};for(S in E)o[S+"PathSegment"]=T("pathname",E[S]),o[S+"UrnPathSegment"]=T("urnpath",E[S]);var R=function(d,m,y){return function(b){var M;y?M=function(k){return o[m](o[y](k))}:M=o[m];for(var I=(b+"").split(d),A=0,L=I.length;A-1&&(m.fragment=d.substring(y+1)||null,d=d.substring(0,y)),y=d.indexOf("?"),y>-1&&(m.query=d.substring(y+1)||null,d=d.substring(0,y)),d=d.replace(/^(https?|ftp|wss?)?:+[/\\]*/i,"$1://"),d=d.replace(/^[/\\]{2,}/i,"//"),d.substring(0,2)==="//"?(m.protocol=null,d=d.substring(2),d=o.parseAuthority(d,m)):(y=d.indexOf(":"),y>-1&&(m.protocol=d.substring(0,y)||null,m.protocol&&!m.protocol.match(o.protocol_expression)?m.protocol=void 0:d.substring(y+1,y+3).replace(/\\/g,"/")==="//"?(d=d.substring(y+3),d=o.parseAuthority(d,m)):(d=d.substring(y+1),m.urn=!0))),m.path=d,m},o.parseHost=function(d,m){d||(d=""),d=d.replace(/\\/g,"/");var y=d.indexOf("/"),b,M;if(y===-1&&(y=d.length),d.charAt(0)==="[")b=d.indexOf("]"),m.hostname=d.substring(1,b)||null,m.port=d.substring(b+2,y)||null,m.port==="/"&&(m.port=null);else{var I=d.indexOf(":"),A=d.indexOf("/"),L=d.indexOf(":",I+1);L!==-1&&(A===-1||L-1?M:d.length-1),A;return I>-1&&(M===-1||I-1?H=H.slice(0,Q)+H.slice(Q).replace(I,""):H=H.replace(I,""),!(H.length<=k[0].length)&&!(y.ignore&&y.ignore.test(H))){G=W+H.length;var dt=m(H,W,G,d);if(dt===void 0){b.lastIndex=G;continue}dt=String(dt),d=d.slice(0,W)+dt+d.slice(G),b.lastIndex=W+dt.length}}return b.lastIndex=0,d},o.ensureValidHostname=function(d,m){var y=!!d,b=!!m,M=!1;if(b&&(M=p(o.hostProtocols,m)),M&&!y)throw new TypeError("Hostname cannot be empty, if protocol is "+m);if(d&&d.match(o.invalid_hostname_characters)){if(!t)throw new TypeError('Hostname "'+d+'" contains characters other than [A-Z0-9.-:_] and Punycode.js is not available');if(t.toASCII(d).match(o.invalid_hostname_characters))throw new TypeError('Hostname "'+d+'" contains characters other than [A-Z0-9.-:_]')}},o.ensureValidPort=function(d){if(d){var m=Number(d);if(!(a(m)&&m>0&&m<65536))throw new TypeError('Port "'+d+'" is not a valid port')}},o.noConflict=function(d){if(d){var m={URI:this.noConflict()};return s.URITemplate&&typeof s.URITemplate.noConflict=="function"&&(m.URITemplate=s.URITemplate.noConflict()),s.IPv6&&typeof s.IPv6.noConflict=="function"&&(m.IPv6=s.IPv6.noConflict()),s.SecondLevelDomains&&typeof s.SecondLevelDomains.noConflict=="function"&&(m.SecondLevelDomains=s.SecondLevelDomains.noConflict()),m}else s.URI===this&&(s.URI=r);return this},l.build=function(d){return d===!0?this._deferred_build=!0:(d===void 0||this._deferred_build)&&(this._string=o.build(this._parts),this._deferred_build=!1),this},l.clone=function(){return new o(this)},l.valueOf=l.toString=function(){return this.build(!1)._string};function C(d){return function(m,y){return m===void 0?this._parts[d]||"":(this._parts[d]=m||null,this.build(!y),this)}}function P(d,m){return function(y,b){return y===void 0?this._parts[d]||"":(y!==null&&(y=y+"",y.charAt(0)===m&&(y=y.substring(1))),this._parts[d]=y,this.build(!b),this)}}l.protocol=C("protocol"),l.username=C("username"),l.password=C("password"),l.hostname=C("hostname"),l.port=C("port"),l.query=P("query","?"),l.fragment=P("fragment","#"),l.search=function(d,m){var y=this.query(d,m);return typeof y=="string"&&y.length?"?"+y:y},l.hash=function(d,m){var y=this.fragment(d,m);return typeof y=="string"&&y.length?"#"+y:y},l.pathname=function(d,m){if(d===void 0||d===!0){var y=this._parts.path||(this._parts.hostname?"/":"");return d?(this._parts.urn?o.decodeUrnPath:o.decodePath)(y):y}else return this._parts.urn?this._parts.path=d?o.recodeUrnPath(d):"":this._parts.path=d?o.recodePath(d):"/",this.build(!m),this},l.path=l.pathname,l.href=function(d,m){var y;if(d===void 0)return this.toString();this._string="",this._parts=o._parts();var b=d instanceof o,M=typeof d=="object"&&(d.hostname||d.path||d.pathname);if(d.nodeName){var I=o.getDomAttribute(d);d=d[I]||"",M=!1}if(!b&&M&&d.pathname!==void 0&&(d=d.toString()),typeof d=="string"||d instanceof String)this._parts=o.parse(String(d),this._parts);else if(b||M){var A=b?d._parts:d;for(y in A)y!=="query"&&h.call(this._parts,y)&&(this._parts[y]=A[y]);A.query&&this.query(A.query,!1)}else throw new TypeError("invalid input");return this.build(!m),this},l.is=function(d){var m=!1,y=!1,b=!1,M=!1,I=!1,A=!1,L=!1,k=!this._parts.urn;switch(this._parts.hostname&&(k=!1,y=o.ip4_expression.test(this._parts.hostname),b=o.ip6_expression.test(this._parts.hostname),m=y||b,M=!m,I=M&&n&&n.has(this._parts.hostname),A=M&&o.idn_expression.test(this._parts.hostname),L=M&&o.punycode_expression.test(this._parts.hostname)),d.toLowerCase()){case"relative":return k;case"absolute":return!k;case"domain":case"name":return M;case"sld":return I;case"ip":return m;case"ip4":case"ipv4":case"inet4":return y;case"ip6":case"ipv6":case"inet6":return b;case"idn":return A;case"url":return!this._parts.urn;case"urn":return!!this._parts.urn;case"punycode":return L}return null};var N=l.protocol,U=l.port,j=l.hostname;l.protocol=function(d,m){if(d&&(d=d.replace(/:(\/\/)?$/,""),!d.match(o.protocol_expression)))throw new TypeError('Protocol "'+d+`" contains characters other than [A-Z0-9.+-] or doesn't start with [A-Z]`);return N.call(this,d,m)},l.scheme=l.protocol,l.port=function(d,m){return this._parts.urn?d===void 0?"":this:(d!==void 0&&(d===0&&(d=null),d&&(d+="",d.charAt(0)===":"&&(d=d.substring(1)),o.ensureValidPort(d))),U.call(this,d,m))},l.hostname=function(d,m){if(this._parts.urn)return d===void 0?"":this;if(d!==void 0){var y={preventInvalidHostname:this._parts.preventInvalidHostname},b=o.parseHost(d,y);if(b!=="/")throw new TypeError('Hostname "'+d+'" contains characters other than [A-Z0-9.-]');d=y.hostname,this._parts.preventInvalidHostname&&o.ensureValidHostname(d,this._parts.protocol)}return j.call(this,d,m)},l.origin=function(d,m){if(this._parts.urn)return d===void 0?"":this;if(d===void 0){var y=this.protocol(),b=this.authority();return b?(y?y+"://":"")+this.authority():""}else{var M=o(d);return this.protocol(M.protocol()).authority(M.authority()).build(!m),this}},l.host=function(d,m){if(this._parts.urn)return d===void 0?"":this;if(d===void 0)return this._parts.hostname?o.buildHost(this._parts):"";var y=o.parseHost(d,this._parts);if(y!=="/")throw new TypeError('Hostname "'+d+'" contains characters other than [A-Z0-9.-]');return this.build(!m),this},l.authority=function(d,m){if(this._parts.urn)return d===void 0?"":this;if(d===void 0)return this._parts.hostname?o.buildAuthority(this._parts):"";var y=o.parseAuthority(d,this._parts);if(y!=="/")throw new TypeError('Hostname "'+d+'" contains characters other than [A-Z0-9.-]');return this.build(!m),this},l.userinfo=function(d,m){if(this._parts.urn)return d===void 0?"":this;if(d===void 0){var y=o.buildUserinfo(this._parts);return y&&y.substring(0,y.length-1)}else return d[d.length-1]!=="@"&&(d+="@"),o.parseUserinfo(d,this._parts),this.build(!m),this},l.resource=function(d,m){var y;return d===void 0?this.path()+this.search()+this.hash():(y=o.parse(d),this._parts.path=y.path,this._parts.query=y.query,this._parts.fragment=y.fragment,this.build(!m),this)},l.subdomain=function(d,m){if(this._parts.urn)return d===void 0?"":this;if(d===void 0){if(!this._parts.hostname||this.is("IP"))return"";var y=this._parts.hostname.length-this.domain().length-1;return this._parts.hostname.substring(0,y)||""}else{var b=this._parts.hostname.length-this.domain().length,M=this._parts.hostname.substring(0,b),I=new RegExp("^"+c(M));if(d&&d.charAt(d.length-1)!=="."&&(d+="."),d.indexOf(":")!==-1)throw new TypeError("Domains cannot contain colons");return d&&o.ensureValidHostname(d,this._parts.protocol),this._parts.hostname=this._parts.hostname.replace(I,d),this.build(!m),this}},l.domain=function(d,m){if(this._parts.urn)return d===void 0?"":this;if(typeof d=="boolean"&&(m=d,d=void 0),d===void 0){if(!this._parts.hostname||this.is("IP"))return"";var y=this._parts.hostname.match(/\./g);if(y&&y.length<2)return this._parts.hostname;var b=this._parts.hostname.length-this.tld(m).length-1;return b=this._parts.hostname.lastIndexOf(".",b-1)+1,this._parts.hostname.substring(b)||""}else{if(!d)throw new TypeError("cannot set domain empty");if(d.indexOf(":")!==-1)throw new TypeError("Domains cannot contain colons");if(o.ensureValidHostname(d,this._parts.protocol),!this._parts.hostname||this.is("IP"))this._parts.hostname=d;else{var M=new RegExp(c(this.domain())+"$");this._parts.hostname=this._parts.hostname.replace(M,d)}return this.build(!m),this}},l.tld=function(d,m){if(this._parts.urn)return d===void 0?"":this;if(typeof d=="boolean"&&(m=d,d=void 0),d===void 0){if(!this._parts.hostname||this.is("IP"))return"";var y=this._parts.hostname.lastIndexOf("."),b=this._parts.hostname.substring(y+1);return m!==!0&&n&&n.list[b.toLowerCase()]&&n.get(this._parts.hostname)||b}else{var M;if(d)if(d.match(/[^a-zA-Z0-9-]/))if(n&&n.is(d))M=new RegExp(c(this.tld())+"$"),this._parts.hostname=this._parts.hostname.replace(M,d);else throw new TypeError('TLD "'+d+'" contains characters other than [A-Z0-9]');else{if(!this._parts.hostname||this.is("IP"))throw new ReferenceError("cannot set TLD on non-domain host");M=new RegExp(c(this.tld())+"$"),this._parts.hostname=this._parts.hostname.replace(M,d)}else throw new TypeError("cannot set TLD empty");return this.build(!m),this}},l.directory=function(d,m){if(this._parts.urn)return d===void 0?"":this;if(d===void 0||d===!0){if(!this._parts.path&&!this._parts.hostname)return"";if(this._parts.path==="/")return"/";var y=this._parts.path.length-this.filename().length-1,b=this._parts.path.substring(0,y)||(this._parts.hostname?"/":"");return d?o.decodePath(b):b}else{var M=this._parts.path.length-this.filename().length,I=this._parts.path.substring(0,M),A=new RegExp("^"+c(I));return this.is("relative")||(d||(d="/"),d.charAt(0)!=="/"&&(d="/"+d)),d&&d.charAt(d.length-1)!=="/"&&(d+="/"),d=o.recodePath(d),this._parts.path=this._parts.path.replace(A,d),this.build(!m),this}},l.filename=function(d,m){if(this._parts.urn)return d===void 0?"":this;if(typeof d!="string"){if(!this._parts.path||this._parts.path==="/")return"";var y=this._parts.path.lastIndexOf("/"),b=this._parts.path.substring(y+1);return d?o.decodePathSegment(b):b}else{var M=!1;d.charAt(0)==="/"&&(d=d.substring(1)),d.match(/\.?\//)&&(M=!0);var I=new RegExp(c(this.filename())+"$");return d=o.recodePath(d),this._parts.path=this._parts.path.replace(I,d),M?this.normalizePath(m):this.build(!m),this}},l.suffix=function(d,m){if(this._parts.urn)return d===void 0?"":this;if(d===void 0||d===!0){if(!this._parts.path||this._parts.path==="/")return"";var y=this.filename(),b=y.lastIndexOf("."),M,I;return b===-1?"":(M=y.substring(b+1),I=/^[a-z0-9%]+$/i.test(M)?M:"",d?o.decodePathSegment(I):I)}else{d.charAt(0)==="."&&(d=d.substring(1));var A=this.suffix(),L;if(A)d?L=new RegExp(c(A)+"$"):L=new RegExp(c("."+A)+"$");else{if(!d)return this;this._parts.path+="."+o.recodePath(d)}return L&&(d=o.recodePath(d),this._parts.path=this._parts.path.replace(L,d)),this.build(!m),this}},l.segment=function(d,m,y){var b=this._parts.urn?":":"/",M=this.path(),I=M.substring(0,1)==="/",A=M.split(b);if(d!==void 0&&typeof d!="number"&&(y=m,m=d,d=void 0),d!==void 0&&typeof d!="number")throw new Error('Bad segment "'+d+'", must be 0-based integer');if(I&&A.shift(),d<0&&(d=Math.max(A.length+d,0)),m===void 0)return d===void 0?A:A[d];if(d===null||A[d]===void 0)if(g(m)){A=[];for(var L=0,k=m.length;L"u"?!0:typeof i!="string"?!1:(t=t.map(n=>n.toLowerCase()),t.includes(i.toLowerCase()))}function SO(i,t=!1){return Ug(i,EO,t)}class y1 extends Jh{constructor(t,e=null,n={},s=[]){super(t,n,["_context"].concat(s)),this._context||(this._context=e)}getAbsoluteUrl(t=!0){return this._context?vO(this.href,this._context.getAbsoluteUrl(),t):this.href.includes("://")?this.href:null}getContext(){return this._context}canBrowserDisplayImage(t=!1){if(typeof this.href!="string"||!t&&typeof this.type>"u")return!1;let e=new Lu(this.href),n=e.protocol().toLowerCase(),s=e.suffix().toLowerCase();return ai(n)&&!fm.includes(n)?!1:ai(this.type)&&pm.includes(this.type.toLowerCase())?!0:!!(typeof this.type>"u"&&ai(s)&&(s==="jpg"||pm.includes("image/"+s)))}isType(t){return ai(this.type)&&Ug(this.type,t)}isGeoTIFF(){return this.isType(_1)}isCOG(){return this.isType(m1)}isHTTP(){let t=this.getAbsoluteUrl(!1).protocol().toLowerCase();return ai(t)&&fm.includes(t)}}class Bg extends y1{constructor(t,e=null){super(t,e)}isLink(){return!0}getObjectType(){return"Link"}static fromLinks(t,e=null){return Array.isArray(t)?t.map(n=>ei(n)?new Bg(n,e):n):[]}}class x1 extends Jh{constructor(t,e=null,n={},s=[]){if(super(t,Object.assign({links:Bg.fromLinks},n),["_url"].concat(s)),!this._url&&(this._url=e,!this._url)){let r=this.getSelfLink();r&&(this._url=r.href)}}getAbsoluteUrl(){return this._url}setAbsoluteUrl(t){this._url=t}getStacLinksWithRel(t,e=!0){return this.getLinksWithRels([t]).filter(n=>SO(n.type,e))}getStacLinkWithRel(t,e=!0){const n=this.getStacLinksWithRel(t,e);return n.length>0?n[0]:null}getLinks(){return Array.isArray(this.links)?this.links.filter(t=>ei(t)&&ai(t.href)):[]}getLinkWithRel(t){return this.getLinks().find(e=>e.rel===t)||null}getLinksWithRels(t){return this.getLinks().filter(e=>t.includes(e.rel))}getLinksWithOtherRels(t){return this.getLinks().filter(e=>!t.includes(e.rel))}getSelfLink(){return this.getStacLinkWithRel("self")}getRootLink(){return this.getStacLinkWithRel("root")}getParentLink(){return this.getStacLinkWithRel("parent")}}class v1 extends x1{constructor(t,e=null,n={},s=[]){super(t,e,n,s)}getAll(){return[]}}class cs extends y1{constructor(t,e=null,n=null){super(t,n,{},["_key"]),this._key||(this._key=e)}getObjectType(){return"Asset"}isAsset(){return!0}getAbsoluteUrl(t=!0){return this.isDefinition()?null:super.getAbsoluteUrl(t)}getKey(){return this._key}getMetadata(t){if(typeof this[t]<"u")return this[t];if(this._context)return this._context.getMetadata(t)}getBands(){return f1(this["eo:bands"],this["raster:bands"])}findVisualBands(){let t={red:null,green:null,blue:null},e=this.getBands();for(let n in e){let s=parseInt(n,10),r=e[s];ei(r)&&ai(r.common_name)&&r.common_name in t&&(t[r.common_name]={index:s,band:r})}return Object.values(t).every(n=>n!==null)?t:null}findBand(t,e="name",n=null){Array.isArray(t)||(t=[t]),ei(n)||(n=this.getBands());let s=n.findIndex(r=>ei(r)&&t.includes(r[e]));return s>=0?{index:s,band:n[s]}:null}getBand(t){return ei(t)||t===null?t:this.getBands()[t]||null}getMinMaxValues(t=null){t=this.getBand(t);const e={minimum:null,maximum:null},n=a=>a.minimum!==null&&a.maximum!==null;if(t&&(ei(t.statistics)&&(typeof t.statistics.minimum=="number"&&(e.minimum=t.statistics.minimum),typeof t.statistics.maximum=="number"&&(e.maximum=t.statistics.maximum),n(e))||ei(t.histogram)&&(typeof t.histogram.min=="number"&&(e.minimum=t.histogram.min),typeof t.histogram.max=="number"&&(e.maximum=t.histogram.max),n(e))))return e;let s=this.getMetadata("classification:classes");if(Array.isArray(s)&&(s.reduce((a,l)=>(a.minimum=Math.min(a.minimum,l.value),a.maximum=Math.max(a.maximum,l.value),a),e),n(e)))return e;let r=this.getMetadata("file:values");if(Array.isArray(r)&&(r.reduce((a,l)=>(a.minimum=Math.min(a.minimum,...l.values),a.maximum=Math.max(a.maximum,...l.values),a),e),n(e)))return e;let o=ei(t)&&t.data_type||this.getMetadata("file:data_type");return o&&(e.minimum=gO(o),e.maximum=fO(o)),e}getNoDataValues(t=null){t=this.getBand(t);let e=[];if(t&&typeof t.nodata<"u")e.push(t.nodata);else{let n=this.getMetadata("file:nodata");if(typeof n<"u")e=n;else{let s=this.getMetadata("classification:classes");Array.isArray(s)&&(e=s.filter(r=>!!r.nodata).map(r=>r.value))}}return e.map(n=>n==="nan"?NaN:n==="+inf"?1/0:n==="-inf"?-1/0:n)}isDefinition(){return!ai(this.href)}isHTTP(){return this.isDefinition()?null:super.isHTTP()}hasRole(t,e=!1){return Array.isArray(t)||(t=[t]),e&&t.includes(this.getKey())?!0:Array.isArray(this.roles)&&!!this.roles.find(n=>t.includes(n))}static fromAssets(t,e=null){let n={};if(ei(t))for(let s in t)n[s]=new cs(t[s],s,e);return n}}class Ua extends x1{constructor(t,e=null,n={},s=[]){super(t,e,n,s)}getTemporalExtent(){return null}getTemporalExtents(){return[]}getIcons(t=!0){return this.getLinksWithRels(["icon"]).filter(e=>e.canBrowserDisplayImage(t))}getThumbnails(t=!0,e=null){let n=this.getAssetsWithRoles(["thumbnail","overview"],!0);if(n.length===0&&(n=this.getLinksWithRels(["preview"])),t&&(n=n.filter(s=>s.canBrowserDisplayImage())),e&&n.length>1){let s=r=>Array.isArray(r.roles)&&r.roles.includes(e)||r.getKey()===e;n=n.filter(s).concat(n.filter(r=>!s(r)))}return n}getDefaultGeoTIFF(t=!0,e=!1){var n;return(n=this.rankGeoTIFFs(t,e)[0])==null?void 0:n.asset}rankGeoTIFFs(t=!0,e=!1,n=null,s=null){ei(n)||(n={data:1,visual:2,thumbnail:2,overview:3});let r=[],o=this.getAssetsByTypes(_1);t&&(o=o.filter(l=>l.isHTTP()&&(!e||l.isCOG())));let a=Object.entries(n);for(let l of o){let h=0;if(a.length>0){let c=a.filter(([u])=>l.hasRole(u,!0)).map(([,u])=>u);c.length>0&&(h+=Math.max(...c))}!e&&l.isCOG()&&(h+=2),l.findVisualBands()&&(h+=1),typeof s=="function"&&(h+=s(l)),r.push({asset:l,score:h})}return r.sort((l,h)=>h.score-l.score),r}findVisualAssets(){let t={red:null,green:null,blue:null},e=Object.keys(t),n=this.getAssets();for(let s of n){let r=s.getBands();if(r.length!==1)continue;let o=s.findBand(e,"common_name",r);o&&(t[o.band.common_name]=s)}return Object.values(t).every(s=>s!==null)?t:null}getAsset(t){return ei(this.assets)&&this.assets[t]||null}getAssets(){return ei(this.assets)?Object.values(this.assets):[]}getAssetsWithRoles(t,e=!1){return this.getAssets().filter(n=>n.hasRole(t,e))}getAssetWithRole(t,e=!1){return this.getAssetsWithRoles([t],e)[0]||null}getAssetsByTypes(t){return this.getAssets().filter(e=>Ug(e.type,t))}equals(t){return this===t?!0:!(t instanceof Ua)||this.getObjectType()!==t.getObjectType()?!1:!!(this.id&&this.id===t.id)}}class w1 extends Ua{constructor(t,e=null,n={},s=[]){super(t,e,n,s)}getObjectType(){return this.type}getSearchLink(t=null){let e=this.getStacLinksWithRel("search");return t?e[0]||null:e.find(n=>n.method===t||!t&&!n.method)||null}getApiCollectionsLink(){return this.getStacLinkWithRel("data")}getApiItemsLink(){return this.getStacLinkWithRel("items")}getChildLinks(){return this.getStacLinksWithRel("child")}getItemLinks(){return this.getStacLinksWithRel("item")}}class TO extends w1{constructor(t,e=null){super(t,e)}}function Po(i){if(ai(i)&&i.length>=10)try{let t=i.match(/^(-?\d{1,})-(\d\d)-(\d\d)[T ](\d\d):(\d\d):(\d\d)(?:\.(\d*))?(?:Z|[+-]00:00)?$/i).slice(1).map(e=>parseInt(e,10));return new Date(Date.UTC(t[0],t[1]-1,t[2],t[3],t[4],t[5],t[6]||0))}catch{return null}return null}function MO(i,t){return new Date(i.valueOf()+(t-i)/2)}function b1(i){if(!Array.isArray(i)||i.length===0)return null;let t,e;const n=(s,r,o)=>typeof s>"u"?r:s===null||r===null?null:o(s,r);return i.forEach(([s,r])=>{t=n(t,s,Math.min),e=n(e,r,Math.max)}),[t===null?null:new Date(t),e===null?null:new Date(e)]}class E1 extends w1{constructor(t,e=null){const n={assets:cs.fromAssets,item_assets:cs.fromAssets};super(t,e,n)}toGeoJSON(){let t=u1(this.getBoundingBoxes());return t&&(t.id=this.id),t}getBoundingBox(){let t=this.getRawBoundingBoxes();return t.length>0&&zi(t[0])?t[0]:null}getBoundingBoxes(){let t=this.getRawBoundingBoxes();return t.length===1&&zi(t[0])?t:t.length>1?t.filter((e,n)=>n>0&&zi(e)):[]}getRawBoundingBoxes(){var t,e;let n=(e=(t=this.extent)==null?void 0:t.spatial)==null?void 0:e.bbox;return Array.isArray(n)&&n.length>0?n:[]}getTemporalExtent(){return this.getTemporalExtents()[0]||null}getTemporalExtents(){var t,e;let n=(e=(t=this.extent)==null?void 0:t.temporal)==null?void 0:e.interval;return Array.isArray(n)&&n.length>0?n.filter(s=>Array.isArray(s)&&(ai(s[0])||ai(s[1]))).map(s=>s.map(r=>Po(r))):[]}getSummary(t){return this.summaries[t]}getBands(){let t=this.getSummary("eo:bands"),e=this.getSummary("raster:bands"),n=[t,e].filter(s=>Array.isArray(s));return n.length>=2?f1(...n):n.length===1?n[0]:[]}}class RO extends v1{constructor(t,e=null){const n={collections:s=>s.map(r=>new E1(r))};super(t,e,n)}getObjectType(){return"CollectionCollection"}getAll(){return this.collections}isCollectionCollection(){return!0}toGeoJSON(){return{type:"FeatureCollection",features:this.collections.map(t=>t.toGeoJSON()).filter(t=>t!==null)}}getBoundingBox(){return g1(this.getBoundingBoxes())}getBoundingBoxes(){return this.collections.map(t=>t.getBoundingBox())}getTemporalExtent(){return b1(this.getTemporalExtents())}getTemporalExtents(){return this.collections.map(t=>t.getTemporalExtent())}}class S1 extends Ua{constructor(t,e=null){super(t,e,{assets:cs.fromAssets})}getObjectType(){return"Item"}toGeoJSON(){return this.toJSON()}getBoundingBox(){return zi(this.bbox)?this.bbox:null}getBoundingBoxes(){return zi(this.bbox)?[this.bbox]:[]}getDateTime(){let t=Po(this.properties.datetime);if(!t){let e=Po(this.properties.start_datetime),n=Po(this.properties.end_datetime);return e&&n?MO(e,n):e||n}return t}getTemporalExtent(){return this.getTemporalExtents()[0]||null}getTemporalExtents(){let t=[];return ai(this.properties.start_datetime)||ai(this.properties.end_datetime)?t=[[this.properties.start_datetime||null,this.properties.end_datetime||null]]:ai(this.properties.datetime)&&(t=[[this.properties.datetime,this.properties.datetime]]),t.map(e=>e.map(n=>Po(n)))}getMetadata(t){return this.properties[t]}getBands(){let t=this.getMetadata("eo:bands");return Array.isArray(t)?t:[]}getCollectionLink(){return this.getStacLinkWithRel("collection")}}class CO extends v1{constructor(t,e=null){const n={features:s=>s.map(r=>new S1(r))};super(t,e,n)}getObjectType(){return"ItemCollection"}getAll(){return this.features}toGeoJSON(){return this.toJSON()}getBoundingBox(){return g1(this.getBoundingBoxes())}getBoundingBoxes(){return this.features.map(t=>t.getBoundingBox())}getTemporalExtent(){return b1(this.getTemporalExtents())}getTemporalExtents(){return this.features.map(t=>t.getTemporalExtent())}}function IO(i,t=!0,e=!1){return t&&(i=uO.stac(i,e)),i.type==="Feature"?new S1(i):i.type==="FeatureCollection"?new CO(i):i.type==="Collection"||!i.type&&typeof i.extent<"u"&&typeof i.license<"u"?new E1(i):!i.type&&Array.isArray(i.collections)?new RO(i):new TO(i)}class mm extends fg{constructor(t){super({...t,state:"loading"}),ju(this,"loadImage",n=>new Promise((s,r)=>{const o=new Image;o.addEventListener("load",()=>s(o)),o.addEventListener("error",()=>r(new Error("load failed"))),o.src=n}));const e=new dg(t.url);e.getHeader().then(n=>{this.tileGrid.minZoom=n.minZoom,this.tileGrid.maxZoom=n.maxZoom,this.setLoader(async(s,r,o)=>{const a=await e.getZxy(s,r,o),l=URL.createObjectURL(new Blob([a.data])),h=await this.loadImage(l);return URL.revokeObjectURL(l),h}),this.setState("ready")})}}class PO extends Kh{constructor(t){super({...t,state:"loading",url:"pmtiles://"+t.url+"/{z}/{x}/{y}",format:new s_}),ju(this,"tileLoadFunction",(e,n)=>{const s=new RegExp(/pmtiles:\/\/(.+)\/(\d+)\/(\d+)\/(\d+)/),r=n.match(s),o=+r[2],a=+r[3],l=+r[4];e.setLoader((h,c,u)=>{e.setState(q.LOADING),this.pmtiles_.getZxy(o,a,l).then(g=>{if(g){const f=e.getFormat();e.setFeatures(f.readFeatures(g.data,{extent:h,featureProjection:u})),e.setState(q.LOADED)}else e.setFeatures([]),e.setState(q.EMPTY)}).catch(g=>{e.setFeatures([]),e.setState(q.ERROR)})})}),this.pmtiles_=new dg(t.url),this.pmtiles_.getHeader().then(e=>{this.tileGrid.minZoom=e.minZoom,this.tileGrid.maxZoom=e.maxZoom,this.setTileLoadFunction(this.tileLoadFunction),this.setState("ready")})}}let Wg=null;function AO(){return!!Wg}function T1(i){Wg=i;const t=Object.keys(i.defs),e=t.length;let n,s;for(n=0;n0&&(e.nodata=o[0]),t.length>0&&(e.bands=t),e}async function _m(i,t=void 0){let e=t;if(AO()){const n=i.getMetadata("proj:epsg");if(n)try{e=await OO(n)}catch{}}return e}function ym(i,t){const e=i.clone();return t.hasOnlyBounds()||e.setFill(null),e}function DO(i){let t=i.href;if(t.includes("{s}"))if(Array.isArray(i["href:servers"])&&i["href:servers"].length>0){const e=Math.random()*i["href:servers"].length|0;t=t.replace("{s}",i["href:servers"][e])}else return null;return t}async function GO(i){try{const t=new URL(i);t.searchParams.set("service","wmts"),t.searchParams.set("request","GetCapabilities");const e=await fetch(t);return new jd().read(await e.text())}catch{return null}}class qg extends zh{constructor(t){const e={};if(["opacity","visible","zIndex","minResolution","maxResolution","minZoom","maxZoom","properties"].forEach(n=>e[n]=t[n]),super(e),this.getSourceOptions_=t.getSourceOptions,this.data_,this.assets_=null,this.bands_=[],this.crossOrigin_=t.crossOrigin||null,this.displayFootprint_=t.displayFootprint!==!1,this.displayGeoTiffByDefault_=!!t.displayGeoTiffByDefault,this.displayPreview_=!!t.displayPreview,this.displayOverview_=t.displayOverview!==!1,this.displayWebMapLink_=t.displayWebMapLink||!1,this.buildTileUrlTemplate_=t.buildTileUrlTemplate||null,this.useTileLayerAsFallback_=t.useTileLayerAsFallback||!1,this.boundsStyle_=t.boundsStyle||FO,this.collectionStyle_=t.collectionStyle||NO,this.boundsLayer_=null,t.data){try{this.configure_(t.data,t.url,t.assets,t.bands)}catch(n){this.handleError_(n)}return}if(!t.url)throw new Error("Either url or data must be provided");fetch(t.url).then(n=>n.json()).then(n=>this.configure_(n,t.url,t.assets,t.bands)).catch(n=>this.handleError_(n))}getBoundsLayer(){return this.boundsLayer_}handleError_(t){this.dispatchEvent(new iA(t))}configure_(t,e=null,n=null,s=[]){t instanceof cs||t instanceof Ua?this.data_=t:this.data_=IO(t),e&&e.includes("://")&&this.data_.setAbsoluteUrl(e),this.bands_=s,this.boundsLayer_=this.addFootprint_();const r=()=>{this.boundsLayer_&&this.boundsLayer_.setStyle(ym(this.boundsStyle_,this))};this.getLayers().on("add",r),this.getLayers().on("remove",r),this.setAssets(n).then(()=>this.dispatchEvent("assetsready")).catch(o=>this.handleError_(o)),this.dispatchEvent("sourceready")}async addApiCollection_(){const t=this.getData().getAll().map(e=>{const n=new qg({data:e,crossOrigin:this.crossOrigin_,boundsStyle:this.collectionStyle_,displayGeoTiffByDefault:this.displayGeoTiffByDefault_,displayOverview:this.displayOverview_,displayPreview:this.displayPreview_,displayFootprint:this.displayFootprint_});return this.addLayer_(n),n});return await Promise.all(t)}async addStacAssets_(){let t=this.getAssets();if(t===null){t=[];const n=this.getData().getDefaultGeoTIFF(!0,!this.displayGeoTiffByDefault_);if(n)t.push(n);else{const s=this.getData().getThumbnails();s.length>0&&t.push(s[0])}}const e=t.map(n=>this.addImagery_(n));return await Promise.all(e)}async addImagery_(t){if(t){if(t.isGeoTIFF())return await this.addGeoTiff_(t);if(t.canBrowserDisplayImage())return await this.addThumbnail_(t)}}async addThumbnail_(t){if(!this.displayPreview_)return;let e={url:t.getAbsoluteUrl(),projection:await _m(t,"EPSG:4326"),imageExtent:t.getContext().getBoundingBox(),crossOrigin:this.crossOrigin_};this.getSourceOptions_&&(e=await this.getSourceOptions_(ie.ImageStatic,e,t));const n=new og({source:new Qy(e)});return this.addLayer_(n,t),n}async addWebMapLinks_(){const t=this.getWebMapLinks();if(t.length>0)return await this.addLayerForLink(t[0])}async addLayerForLink(t){const e=DO(t);if(!e)return;const n={attributions:t.getMetadata("attribution")||this.data_.getMetadata("attribution"),crossOrigin:this.crossOrigin_,url:e},s=async(o,a)=>(this.getSourceOptions_&&(a=await this.getSourceOptions_(o,a,t)),a),r=[];switch(t.rel){case"pmtiles":const o=await new dg(n.url).getHeader();let a;switch(o.tileType){case _r.Mvt:a=new PO(await s(ie.PMTilesVector,n));break;case _r.Avif:case _r.Jpeg:case _r.Png:case _r.Webp:a=new mm(await s(ie.PMTilesRaster,n));break;default:return}r.push(a);break;case"tilejson":r.push(new e1(await s(ie.TileJSON,n)));break;case"wms":if(!Array.isArray(t["wms:layers"]))break;for(const c in t["wms:layers"]){const u=t["wms:layers"][c];let g;Array.isArray(t["wms:styles"])&&typeof t["wms:styles"][c]=="string"&&(g=t["wms:styles"][c]);const f=Object.assign({LAYERS:u,STYLES:g},t["wms:dimensions"]);typeof t["wms:transparent"]=="boolean"&&(f.TRANSPARENT=String(t["wms:transparent"])),typeof t.type=="string"&&t.type.startsWith("image/")&&(f.FORMAT=t.type);const p=await s(ie.TileWMS,Object.assign({},n,{params:f}));r.push(new r1(p))}break;case"wmts":const l=await GO(e);if(!l)return;const h=Array.isArray(t["wmts:layer"])?t["wmts:layer"]:[t["wmts:layer"]];for(const c of h){let u=Object.assign({},n,{layer:c});typeof t.type=="string"&&t.type.startsWith("image/")&&(u.format=t.type),u=await s(ie.WMTS,u),r.push(new o1(a1(l,u)))}break;case"xyz":r.push(new qs(await s(ie.XYZ,n)));break;default:return}return r.map(o=>{let a;return o instanceof Kh?a=new cy({source:o,declutter:!0}):o instanceof mm?a=new eh({source:o}):a=new Ql({source:o}),this.addLayer_(a,t),a})}async addGeoTiff_(t){if(!this.displayOverview_)return;if(this.buildTileUrlTemplate_&&!this.useTileLayerAsFallback_)return await this.addTileLayerForImagery_(t);let e={sources:[kO(t,this.bands_)]};const n=await _m(t);n&&(e.projection=n),this.getSourceOptions_&&(e=await this.getSourceOptions_(ie.GeoTIFF,e,t));const s=async(r,o)=>(o&&this.getLayers().remove(o),await this.addTileLayerForImagery_(r));try{const r=new Ag(e),o=new eh({source:r});if(this.useTileLayerAsFallback_){const a=()=>s(t,o);r.on("error",a),r.on("tileloaderror",a),r.on("change",()=>{r.getState()==="error"&&s(t,o)}),o.on("error",a),await r.getView()}return this.addLayer_(o,t),o}catch(r){if(this.useTileLayerAsFallback_)return await s(t,null);this.handleError_(r)}}async addTileLayerForImagery_(t){let e={crossOrigin:this.crossOrigin_,url:this.buildTileUrlTemplate_(t)};this.getSourceOptions_&&(e=await this.getSourceOptions_(ie.XYZ,e,t));const n=new Ql({source:new qs(e)});return this.addLayer_(n,t),n}addLayer_(t,e,n=0){t.set("stac",e),t.setZIndex(n),this.getLayers().push(t)}addFootprint_(){let t=null;const e=this.getData();if(e.isItemCollection()||e.isCollectionCollection()?t=u1(e.getBoundingBox()):t=e.toGeoJSON(),t){const n=new w0,s=new jh({format:n,loader:(o,a,l)=>{const h=n.readFeatures(t,{featureProjection:l});s.addFeatures(h)}}),r=new Vd({source:s,style:ym(this.boundsStyle_,this),visible:this.displayFootprint_});return r.set("bounds",!0),this.addLayer_(r,e,1),r}return null}async updateLayers_(){const t=this.getLayers();for(let n=t.getLength()-1;n>=0;n--){const s=t.item(n).get("stac");s&&(s.isLink()||s.isAsset())&&t.removeAt(n)}const e=this.getData();e.isItemCollection()||e.isCollectionCollection()?await this.addApiCollection_():(e.isItem()||e.isCollection())&&await this.addStacAssets_(),this.displayWebMapLink_&&(Array.isArray(this.displayWebMapLink_)||this.hasOnlyBounds())&&await this.addWebMapLinks_()}hasOnlyBounds(){const t=this.getBoundsLayer();return typeof this.getLayersArray().find(e=>e!==t)>"u"}getWebMapLinks(){let t=["xyz","tilejson","pmtiles","wmts","wms"];typeof this.displayWebMapLink_=="string"&&(t=[this.displayWebMapLink_]);let e=this.data_.getLinksWithRels(t);return Array.isArray(this.displayWebMapLink_)?e=this.displayWebMapLink_.map(n=>typeof n=="string"?e.find(s=>s.id===n)||null:n).filter(n=>!!n):e.sort((n,s)=>{const r=t.indexOf(n.rel),o=t.indexOf(s.rel);return r-o}),e}async setAssets(t){Array.isArray(t)?this.assets_=t.map(e=>typeof e=="string"?this.getData().getAsset(e):e instanceof cs?e:new cs(e)):this.assets_=null,await this.updateLayers_()}getData(){return this.data_}getAssets(){return this.assets_}getExtent(){if(!this.boundsLayer_)return;const t=this.boundsLayer_.getMapInternal();if(!t)return;const e=t.getView();if(!e)return;const n=this.getData();if(!n)return;const s=n.getBoundingBox();if(s)return Ju(s,"EPSG:4326",e.getProjection())}}function jO(i){i("EPSG:4326","+title=WGS 84 (long/lat) +proj=longlat +ellps=WGS84 +datum=WGS84 +units=degrees"),i("EPSG:4269","+title=NAD83 (long/lat) +proj=longlat +a=6378137.0 +b=6356752.31414036 +ellps=GRS80 +datum=NAD83 +units=degrees"),i("EPSG:3857","+title=WGS 84 / Pseudo-Mercator +proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs"),i.WGS84=i["EPSG:4326"],i["EPSG:3785"]=i["EPSG:3857"],i.GOOGLE=i["EPSG:3857"],i["EPSG:900913"]=i["EPSG:3857"],i["EPSG:102113"]=i["EPSG:3857"]}var Xs=1,Zs=2,Nr=3,zO=4,Ou=5,xm=6378137,UO=6356752314e-3,vm=.0066943799901413165,Wo=484813681109536e-20,V=Math.PI/2,BO=.16666666666666666,WO=.04722222222222222,qO=.022156084656084655,J=1e-10,Pe=.017453292519943295,rn=57.29577951308232,Zt=Math.PI/4,pa=Math.PI*2,fe=3.14159265359,gi={};gi.greenwich=0;gi.lisbon=-9.131906111111;gi.paris=2.337229166667;gi.bogota=-74.080916666667;gi.madrid=-3.687938888889;gi.rome=12.452333333333;gi.bern=7.439583333333;gi.jakarta=106.807719444444;gi.ferro=-17.666666666667;gi.brussels=4.367975;gi.stockholm=18.058277777778;gi.athens=23.7163375;gi.oslo=10.722916666667;const XO={ft:{to_meter:.3048},"us-ft":{to_meter:1200/3937}};var wm=/[\s_\-\/\(\)]/g;function ps(i,t){if(i[t])return i[t];for(var e=Object.keys(i),n=t.toLowerCase().replace(wm,""),s=-1,r,o;++s=this.text.length)return;i=this.text[this.place++]}switch(this.state){case ma:return this.neutral(i);case M1:return this.keyword(i);case rh:return this.quoted(i);case C1:return this.afterquote(i);case R1:return this.number(i);case Xg:return}};Xn.prototype.afterquote=function(i){if(i==='"'){this.word+='"',this.state=rh;return}if(tc.test(i)){this.word=this.word.trim(),this.afterItem(i);return}throw new Error(`havn't handled "`+i+'" in afterquote yet, index '+this.place)};Xn.prototype.afterItem=function(i){if(i===","){this.word!==null&&this.currentObject.push(this.word),this.word=null,this.state=ma;return}if(i==="]"){this.level--,this.word!==null&&(this.currentObject.push(this.word),this.word=null),this.state=ma,this.currentObject=this.stack.pop(),this.currentObject||(this.state=Xg);return}};Xn.prototype.number=function(i){if(I1.test(i)){this.word+=i;return}if(tc.test(i)){this.word=parseFloat(this.word),this.afterItem(i);return}throw new Error(`havn't handled "`+i+'" in number yet, index '+this.place)};Xn.prototype.quoted=function(i){if(i==='"'){this.state=C1;return}this.word+=i};Xn.prototype.keyword=function(i){if(VO.test(i)){this.word+=i;return}if(i==="["){var t=[];t.push(this.word),this.level++,this.root===null?this.root=t:this.currentObject.push(t),this.stack.push(this.currentObject),this.currentObject=t,this.state=ma;return}if(tc.test(i)){this.afterItem(i);return}throw new Error(`havn't handled "`+i+'" in keyword yet, index '+this.place)};Xn.prototype.neutral=function(i){if($O.test(i)){this.word=i,this.state=M1;return}if(i==='"'){this.word="",this.state=rh;return}if(I1.test(i)){this.word=i,this.state=R1;return}if(tc.test(i)){this.afterItem(i);return}throw new Error(`havn't handled "`+i+'" in neutral yet, index '+this.place)};Xn.prototype.output=function(){for(;this.place0?90:-90),i.lat_ts=i.lat1):!i.lat_ts&&i.lat0&&i.projName==="Polar_Stereographic"&&(i.lat_ts=i.lat0,i.lat0=Qi(i.lat0>0?90:-90))}function P1(i){var t=YO(i),e=t.shift(),n=t.shift();t.unshift(["name",n]),t.unshift(["type",e]);var s={};return Tr(t,s),QO(s),s}function qe(i){var t=this;if(arguments.length===2){var e=arguments[1];typeof e=="string"?e.charAt(0)==="+"?qe[i]=Fu(arguments[1]):qe[i]=P1(arguments[1]):qe[i]=e}else if(arguments.length===1){if(Array.isArray(i))return i.map(function(n){Array.isArray(n)?qe.apply(t,n):qe(n)});if(typeof i=="string"){if(i in qe)return qe[i]}else"EPSG"in i?qe["EPSG:"+i.EPSG]=i:"ESRI"in i?qe["ESRI:"+i.ESRI]=i:"IAU2000"in i?qe["IAU2000:"+i.IAU2000]=i:console.log(i);return}}jO(qe);function JO(i){return typeof i=="string"}function tF(i){return i in qe}var eF=["PROJECTEDCRS","PROJCRS","GEOGCS","GEOCCS","PROJCS","LOCAL_CS","GEODCRS","GEODETICCRS","GEODETICDATUM","ENGCRS","ENGINEERINGCRS"];function iF(i){return eF.some(function(t){return i.indexOf(t)>-1})}var nF=["3857","900913","3785","102113"];function sF(i){var t=ps(i,"authority");if(t){var e=ps(t,"epsg");return e&&nF.indexOf(e)>-1}}function rF(i){var t=ps(i,"extension");if(t)return ps(t,"proj4")}function oF(i){return i[0]==="+"}function aF(i){if(JO(i)){if(tF(i))return qe[i];if(iF(i)){var t=P1(i);if(sF(t))return qe["EPSG:3857"];var e=rF(t);return e?Fu(e):t}if(oF(i))return Fu(i)}else return i}function Em(i,t){i=i||{};var e,n;if(!t)return i;for(n in t)e=t[n],e!==void 0&&(i[n]=e);return i}function dn(i,t,e){var n=i*t;return e/Math.sqrt(1-n*n)}function Ba(i){return i<0?-1:1}function it(i){return Math.abs(i)<=fe?i:i-Ba(i)*pa}function Ui(i,t,e){var n=i*e,s=.5*i;return n=Math.pow((1-n)/(1+n),s),Math.tan(.5*(V-t))/n}function _a(i,t){for(var e=.5*i,n,s,r=V-2*Math.atan(t),o=0;o<=15;o++)if(n=i*Math.sin(r),s=V-2*Math.atan(t*Math.pow((1-n)/(1+n),e))-r,r+=s,Math.abs(s)<=1e-10)return r;return-9999}function lF(){var i=this.b/this.a;this.es=1-i*i,"x0"in this||(this.x0=0),"y0"in this||(this.y0=0),this.e=Math.sqrt(this.es),this.lat_ts?this.sphere?this.k0=Math.cos(this.lat_ts):this.k0=dn(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts)):this.k0||(this.k?this.k0=this.k:this.k0=1)}function hF(i){var t=i.x,e=i.y;if(e*rn>90&&e*rn<-90&&t*rn>180&&t*rn<-180)return null;var n,s;if(Math.abs(Math.abs(e)-V)<=J)return null;if(this.sphere)n=this.x0+this.a*this.k0*it(t-this.long0),s=this.y0+this.a*this.k0*Math.log(Math.tan(Zt+.5*e));else{var r=Math.sin(e),o=Ui(this.e,e,r);n=this.x0+this.a*this.k0*it(t-this.long0),s=this.y0-this.a*this.k0*Math.log(o)}return i.x=n,i.y=s,i}function cF(i){var t=i.x-this.x0,e=i.y-this.y0,n,s;if(this.sphere)s=V-2*Math.atan(Math.exp(-e/(this.a*this.k0)));else{var r=Math.exp(-e/(this.a*this.k0));if(s=_a(this.e,r),s===-9999)return null}return n=it(this.long0+t/(this.a*this.k0)),i.x=n,i.y=s,i}var uF=["Mercator","Popular Visualisation Pseudo Mercator","Mercator_1SP","Mercator_Auxiliary_Sphere","merc"];const dF={init:lF,forward:hF,inverse:cF,names:uF};function gF(){}function Sm(i){return i}var fF=["longlat","identity"];const pF={init:gF,forward:Sm,inverse:Sm,names:fF};var mF=[dF,pF],El={},oh=[];function A1(i,t){var e=oh.length;return i.names?(oh[e]=i,i.names.forEach(function(n){El[n.toLowerCase()]=e}),this):(console.log(t),!0)}function _F(i){if(!i)return!1;var t=i.toLowerCase();if(typeof El[t]<"u"&&oh[El[t]])return oh[El[t]]}function yF(){mF.forEach(A1)}const xF={start:yF,add:A1,get:_F};var bt={};bt.MERIT={a:6378137,rf:298.257,ellipseName:"MERIT 1983"};bt.SGS85={a:6378136,rf:298.257,ellipseName:"Soviet Geodetic System 85"};bt.GRS80={a:6378137,rf:298.257222101,ellipseName:"GRS 1980(IUGG, 1980)"};bt.IAU76={a:6378140,rf:298.257,ellipseName:"IAU 1976"};bt.airy={a:6377563396e-3,b:635625691e-2,ellipseName:"Airy 1830"};bt.APL4={a:6378137,rf:298.25,ellipseName:"Appl. Physics. 1965"};bt.NWL9D={a:6378145,rf:298.25,ellipseName:"Naval Weapons Lab., 1965"};bt.mod_airy={a:6377340189e-3,b:6356034446e-3,ellipseName:"Modified Airy"};bt.andrae={a:637710443e-2,rf:300,ellipseName:"Andrae 1876 (Den., Iclnd.)"};bt.aust_SA={a:6378160,rf:298.25,ellipseName:"Australian Natl & S. Amer. 1969"};bt.GRS67={a:6378160,rf:298.247167427,ellipseName:"GRS 67(IUGG 1967)"};bt.bessel={a:6377397155e-3,rf:299.1528128,ellipseName:"Bessel 1841"};bt.bess_nam={a:6377483865e-3,rf:299.1528128,ellipseName:"Bessel 1841 (Namibia)"};bt.clrk66={a:63782064e-1,b:63565838e-1,ellipseName:"Clarke 1866"};bt.clrk80={a:6378249145e-3,rf:293.4663,ellipseName:"Clarke 1880 mod."};bt.clrk80ign={a:63782492e-1,b:6356515,rf:293.4660213,ellipseName:"Clarke 1880 (IGN)"};bt.clrk58={a:6378293645208759e-9,rf:294.2606763692654,ellipseName:"Clarke 1858"};bt.CPM={a:63757387e-1,rf:334.29,ellipseName:"Comm. des Poids et Mesures 1799"};bt.delmbr={a:6376428,rf:311.5,ellipseName:"Delambre 1810 (Belgium)"};bt.engelis={a:637813605e-2,rf:298.2566,ellipseName:"Engelis 1985"};bt.evrst30={a:6377276345e-3,rf:300.8017,ellipseName:"Everest 1830"};bt.evrst48={a:6377304063e-3,rf:300.8017,ellipseName:"Everest 1948"};bt.evrst56={a:6377301243e-3,rf:300.8017,ellipseName:"Everest 1956"};bt.evrst69={a:6377295664e-3,rf:300.8017,ellipseName:"Everest 1969"};bt.evrstSS={a:6377298556e-3,rf:300.8017,ellipseName:"Everest (Sabah & Sarawak)"};bt.fschr60={a:6378166,rf:298.3,ellipseName:"Fischer (Mercury Datum) 1960"};bt.fschr60m={a:6378155,rf:298.3,ellipseName:"Fischer 1960"};bt.fschr68={a:6378150,rf:298.3,ellipseName:"Fischer 1968"};bt.helmert={a:6378200,rf:298.3,ellipseName:"Helmert 1906"};bt.hough={a:6378270,rf:297,ellipseName:"Hough"};bt.intl={a:6378388,rf:297,ellipseName:"International 1909 (Hayford)"};bt.kaula={a:6378163,rf:298.24,ellipseName:"Kaula 1961"};bt.lerch={a:6378139,rf:298.257,ellipseName:"Lerch 1979"};bt.mprts={a:6397300,rf:191,ellipseName:"Maupertius 1738"};bt.new_intl={a:63781575e-1,b:63567722e-1,ellipseName:"New International 1967"};bt.plessis={a:6376523,rf:6355863,ellipseName:"Plessis 1817 (France)"};bt.krass={a:6378245,rf:298.3,ellipseName:"Krassovsky, 1942"};bt.SEasia={a:6378155,b:63567733205e-4,ellipseName:"Southeast Asia"};bt.walbeck={a:6376896,b:63558348467e-4,ellipseName:"Walbeck"};bt.WGS60={a:6378165,rf:298.3,ellipseName:"WGS 60"};bt.WGS66={a:6378145,rf:298.25,ellipseName:"WGS 66"};bt.WGS7={a:6378135,rf:298.26,ellipseName:"WGS 72"};var vF=bt.WGS84={a:6378137,rf:298.257223563,ellipseName:"WGS 84"};bt.sphere={a:6370997,b:6370997,ellipseName:"Normal Sphere (r=6370997)"};function wF(i,t,e,n){var s=i*i,r=t*t,o=(s-r)/s,a=0;n?(i*=1-o*(BO+o*(WO+o*qO)),s=i*i,o=0):a=Math.sqrt(o);var l=(s-r)/r;return{es:o,e:a,ep2:l}}function bF(i,t,e,n,s){if(!i){var r=ps(bt,n);r||(r=vF),i=r.a,t=r.b,e=r.rf}return e&&!t&&(t=(1-1/e)*i),(e===0||Math.abs(i-t)3&&(a.datum_params[3]!==0||a.datum_params[4]!==0||a.datum_params[5]!==0||a.datum_params[6]!==0)&&(a.datum_type=Zs,a.datum_params[3]*=Wo,a.datum_params[4]*=Wo,a.datum_params[5]*=Wo,a.datum_params[6]=a.datum_params[6]/1e6+1)),o&&(a.datum_type=Nr,a.grids=o),a.a=e,a.b=n,a.es=s,a.ep2=r,a}var L1={};function SF(i,t){var e=new DataView(t),n=RF(e),s=CF(e,n),r=IF(e,s,n),o={header:s,subgrids:r};return L1[i]=o,o}function TF(i){if(i===void 0)return null;var t=i.split(",");return t.map(MF)}function MF(i){if(i.length===0)return null;var t=i[0]==="@";return t&&(i=i.slice(1)),i==="null"?{name:"null",mandatory:!t,grid:null,isNull:!0}:{name:i,mandatory:!t,grid:L1[i]||null,isNull:!1}}function Mr(i){return i/3600*Math.PI/180}function RF(i){var t=i.getInt32(8,!1);return t===11?!1:(t=i.getInt32(8,!0),t!==11&&console.warn("Failed to detect nadgrid endian-ness, defaulting to little-endian"),!0)}function CF(i,t){return{nFields:i.getInt32(8,t),nSubgridFields:i.getInt32(24,t),nSubgrids:i.getInt32(40,t),shiftType:Nu(i,56,64).trim(),fromSemiMajorAxis:i.getFloat64(120,t),fromSemiMinorAxis:i.getFloat64(136,t),toSemiMajorAxis:i.getFloat64(152,t),toSemiMinorAxis:i.getFloat64(168,t)}}function Nu(i,t,e){return String.fromCharCode.apply(null,new Uint8Array(i.buffer.slice(t,e)))}function IF(i,t,e){for(var n=176,s=[],r=0;r5e-11?!1:i.datum_type===Xs?i.datum_params[0]===t.datum_params[0]&&i.datum_params[1]===t.datum_params[1]&&i.datum_params[2]===t.datum_params[2]:i.datum_type===Zs?i.datum_params[0]===t.datum_params[0]&&i.datum_params[1]===t.datum_params[1]&&i.datum_params[2]===t.datum_params[2]&&i.datum_params[3]===t.datum_params[3]&&i.datum_params[4]===t.datum_params[4]&&i.datum_params[5]===t.datum_params[5]&&i.datum_params[6]===t.datum_params[6]:!0}function O1(i,t,e){var n=i.x,s=i.y,r=i.z?i.z:0,o,a,l,h;if(s<-V&&s>-1.001*V)s=-V;else if(s>V&&s<1.001*V)s=V;else{if(s<-V)return{x:-1/0,y:-1/0,z:i.z};if(s>V)return{x:1/0,y:1/0,z:i.z}}return n>Math.PI&&(n-=2*Math.PI),a=Math.sin(s),h=Math.cos(s),l=a*a,o=e/Math.sqrt(1-t*l),{x:(o+r)*h*Math.cos(n),y:(o+r)*h*Math.sin(n),z:(o*(1-t)+r)*a}}function F1(i,t,e,n){var s=1e-12,r=s*s,o=30,a,l,h,c,u,g,f,p,_,x,v,w,E,S=i.x,T=i.y,R=i.z?i.z:0,C,P,N;if(a=Math.sqrt(S*S+T*T),l=Math.sqrt(S*S+T*T+R*R),a/er&&En.y||f>n.x||xa&&Math.abs(l.y)>a);if(o<0)return console.log("Inverse grid shift iterator failed to converge."),n;n.x=it(r.x+e.ll[0]),n.y=r.y+e.ll[1]}else isNaN(r.x)||(n.x=i.x+r.x,n.y=i.y+r.y);return n}function Mm(i,t){var e={x:i.x/t.del[0],y:i.y/t.del[1]},n={x:Math.floor(e.x),y:Math.floor(e.y)},s={x:e.x-1*n.x,y:e.y-1*n.y},r={x:Number.NaN,y:Number.NaN},o;if(n.x<0||n.x>=t.lim[0]||n.y<0||n.y>=t.lim[1])return r;o=n.y*t.lim[0]+n.x;var a={x:t.cvs[o][0],y:t.cvs[o][1]};o++;var l={x:t.cvs[o][0],y:t.cvs[o][1]};o+=t.lim[0];var h={x:t.cvs[o][0],y:t.cvs[o][1]};o--;var c={x:t.cvs[o][0],y:t.cvs[o][1]},u=s.x*s.y,g=s.x*(1-s.y),f=(1-s.x)*(1-s.y),p=(1-s.x)*s.y;return r.x=f*a.x+g*l.x+p*c.x+u*h.x,r.y=f*a.y+g*l.y+p*c.y+u*h.y,r}function Rm(i,t,e){var n=e.x,s=e.y,r=e.z||0,o,a,l,h={};for(l=0;l<3;l++)if(!(t&&l===2&&e.z===void 0))switch(l===0?(o=n,"ew".indexOf(i.axis[l])!==-1?a="x":a="y"):l===1?(o=s,"ns".indexOf(i.axis[l])!==-1?a="y":a="x"):(o=r,a="z"),i.axis[l]){case"e":h[a]=o;break;case"w":h[a]=-o;break;case"n":h[a]=o;break;case"s":h[a]=-o;break;case"u":e[a]!==void 0&&(h.z=o);break;case"d":e[a]!==void 0&&(h.z=-o);break;default:return null}return h}function N1(i){var t={x:i[0],y:i[1]};return i.length>2&&(t.z=i[2]),i.length>3&&(t.m=i[3]),t}function GF(i){Cm(i.x),Cm(i.y)}function Cm(i){if(typeof Number.isFinite=="function"){if(Number.isFinite(i))return;throw new TypeError("coordinates must be finite numbers")}if(typeof i!="number"||i!==i||!isFinite(i))throw new TypeError("coordinates must be finite numbers")}function jF(i,t){return(i.datum.datum_type===Xs||i.datum.datum_type===Zs||i.datum.datum_type===Nr)&&t.datumCode!=="WGS84"||(t.datum.datum_type===Xs||t.datum.datum_type===Zs||t.datum.datum_type===Nr)&&i.datumCode!=="WGS84"}function ah(i,t,e,n){var s;Array.isArray(e)?e=N1(e):e={x:e.x,y:e.y,z:e.z,m:e.m};var r=e.z!==void 0;if(GF(e),i.datum&&t.datum&&jF(i,t)&&(s=new ln("WGS84"),e=ah(i,s,e,n),i=s),n&&i.axis!=="enu"&&(e=Rm(i,!1,e)),i.projName==="longlat")e={x:e.x*Pe,y:e.y*Pe,z:e.z||0};else if(i.to_meter&&(e={x:e.x*i.to_meter,y:e.y*i.to_meter,z:e.z||0}),e=i.inverse(e),!e)return;if(i.from_greenwich&&(e.x+=i.from_greenwich),e=kF(i.datum,t.datum,e),!!e)return t.from_greenwich&&(e={x:e.x-t.from_greenwich,y:e.y,z:e.z||0}),t.projName==="longlat"?e={x:e.x*rn,y:e.y*rn,z:e.z||0}:(e=t.forward(e),t.to_meter&&(e={x:e.x/t.to_meter,y:e.y/t.to_meter,z:e.z||0})),n&&t.axis!=="enu"?Rm(t,!0,e):(e&&!r&&delete e.z,e)}var Im=ln("WGS84");function qc(i,t,e,n){var s,r,o;return Array.isArray(e)?(s=ah(i,t,e,n)||{x:NaN,y:NaN},e.length>2?typeof i.name<"u"&&i.name==="geocent"||typeof t.name<"u"&&t.name==="geocent"?typeof s.z=="number"?[s.x,s.y,s.z].concat(e.splice(3)):[s.x,s.y,e[2]].concat(e.splice(3)):[s.x,s.y].concat(e.splice(2)):[s.x,s.y]):(r=ah(i,t,e,n),o=Object.keys(e),o.length===2||o.forEach(function(a){if(typeof i.name<"u"&&i.name==="geocent"||typeof t.name<"u"&&t.name==="geocent"){if(a==="x"||a==="y"||a==="z")return}else if(a==="x"||a==="y")return;r[a]=e[a]}),r)}function Pm(i){return i instanceof ln?i:i.oProj?i.oProj:ln(i)}function vi(i,t,e){i=Pm(i);var n=!1,s;return typeof t>"u"?(t=i,i=Im,n=!0):(typeof t.x<"u"||Array.isArray(t))&&(e=t,t=i,i=Im,n=!0),t=Pm(t),e?qc(i,t,e):(s={forward:function(r,o){return qc(i,t,r,o)},inverse:function(r,o){return qc(t,i,r,o)}},n&&(s.oProj=t),s)}var Am=6,k1="AJSAJS",D1="AFAFAF",Rr=65,Je=73,Ti=79,Ao=86,Lo=90;const zF={forward:G1,inverse:UF,toPoint:j1};function G1(i,t){return t=t||5,qF(BF({lat:i[1],lon:i[0]}),t)}function UF(i){var t=Zg(U1(i.toUpperCase()));return t.lat&&t.lon?[t.lon,t.lat,t.lon,t.lat]:[t.left,t.bottom,t.right,t.top]}function j1(i){var t=Zg(U1(i.toUpperCase()));return t.lat&&t.lon?[t.lon,t.lat]:[(t.left+t.right)/2,(t.top+t.bottom)/2]}function Xc(i){return i*(Math.PI/180)}function Lm(i){return 180*(i/Math.PI)}function BF(i){var t=i.lat,e=i.lon,n=6378137,s=.00669438,r=.9996,o,a,l,h,c,u,g,f=Xc(t),p=Xc(e),_,x;x=Math.floor((e+180)/6)+1,e===180&&(x=60),t>=56&&t<64&&e>=3&&e<12&&(x=32),t>=72&&t<84&&(e>=0&&e<9?x=31:e>=9&&e<21?x=33:e>=21&&e<33?x=35:e>=33&&e<42&&(x=37)),o=(x-1)*6-180+3,_=Xc(o),a=s/(1-s),l=n/Math.sqrt(1-s*Math.sin(f)*Math.sin(f)),h=Math.tan(f)*Math.tan(f),c=a*Math.cos(f)*Math.cos(f),u=Math.cos(f)*(p-_),g=n*((1-s/4-3*s*s/64-5*s*s*s/256)*f-(3*s/8+3*s*s/32+45*s*s*s/1024)*Math.sin(2*f)+(15*s*s/256+45*s*s*s/1024)*Math.sin(4*f)-35*s*s*s/3072*Math.sin(6*f));var v=r*l*(u+(1-h+c)*u*u*u/6+(5-18*h+h*h+72*c-58*a)*u*u*u*u*u/120)+5e5,w=r*(g+l*Math.tan(f)*(u*u/2+(5-h+9*c+4*c*c)*u*u*u*u/24+(61-58*h+h*h+600*c-330*a)*u*u*u*u*u*u/720));return t<0&&(w+=1e7),{northing:Math.round(w),easting:Math.round(v),zoneNumber:x,zoneLetter:WF(t)}}function Zg(i){var t=i.northing,e=i.easting,n=i.zoneLetter,s=i.zoneNumber;if(s<0||s>60)return null;var r=.9996,o=6378137,a=.00669438,l,h=(1-Math.sqrt(1-a))/(1+Math.sqrt(1-a)),c,u,g,f,p,_,x,v,w,E=e-5e5,S=t;n<"N"&&(S-=1e7),x=(s-1)*6-180+3,l=a/(1-a),_=S/r,v=_/(o*(1-a/4-3*a*a/64-5*a*a*a/256)),w=v+(3*h/2-27*h*h*h/32)*Math.sin(2*v)+(21*h*h/16-55*h*h*h*h/32)*Math.sin(4*v)+151*h*h*h/96*Math.sin(6*v),c=o/Math.sqrt(1-a*Math.sin(w)*Math.sin(w)),u=Math.tan(w)*Math.tan(w),g=l*Math.cos(w)*Math.cos(w),f=o*(1-a)/Math.pow(1-a*Math.sin(w)*Math.sin(w),1.5),p=E/(c*r);var T=w-c*Math.tan(w)/f*(p*p/2-(5+3*u+10*g-4*g*g-9*l)*p*p*p*p/24+(61+90*u+298*g+45*u*u-252*l-3*g*g)*p*p*p*p*p*p/720);T=Lm(T);var R=(p-(1+2*u+g)*p*p*p/6+(5-2*g+28*u-3*g*g+8*l+24*u*u)*p*p*p*p*p/120)/Math.cos(w);R=x+Lm(R);var C;if(i.accuracy){var P=Zg({northing:i.northing+i.accuracy,easting:i.easting+i.accuracy,zoneLetter:i.zoneLetter,zoneNumber:i.zoneNumber});C={top:P.lat,right:P.lon,bottom:T,left:R}}else C={lat:T,lon:R};return C}function WF(i){var t="Z";return 84>=i&&i>=72?t="X":72>i&&i>=64?t="W":64>i&&i>=56?t="V":56>i&&i>=48?t="U":48>i&&i>=40?t="T":40>i&&i>=32?t="S":32>i&&i>=24?t="R":24>i&&i>=16?t="Q":16>i&&i>=8?t="P":8>i&&i>=0?t="N":0>i&&i>=-8?t="M":-8>i&&i>=-16?t="L":-16>i&&i>=-24?t="K":-24>i&&i>=-32?t="J":-32>i&&i>=-40?t="H":-40>i&&i>=-48?t="G":-48>i&&i>=-56?t="F":-56>i&&i>=-64?t="E":-64>i&&i>=-72?t="D":-72>i&&i>=-80&&(t="C"),t}function qF(i,t){var e="00000"+i.easting,n="00000"+i.northing;return i.zoneNumber+i.zoneLetter+XF(i.easting,i.northing,i.zoneNumber)+e.substr(e.length-5,t)+n.substr(n.length-5,t)}function XF(i,t,e){var n=z1(e),s=Math.floor(i/1e5),r=Math.floor(t/1e5)%20;return ZF(s,r,n)}function z1(i){var t=i%Am;return t===0&&(t=Am),t}function ZF(i,t,e){var n=e-1,s=k1.charCodeAt(n),r=D1.charCodeAt(n),o=s+i-1,a=r+t,l=!1;o>Lo&&(o=o-Lo+Rr-1,l=!0),(o===Je||sJe||(o>Je||sTi||(o>Ti||sLo&&(o=o-Lo+Rr-1),a>Ao?(a=a-Ao+Rr-1,l=!0):l=!1,(a===Je||rJe||(a>Je||rTi||(a>Ti||rAo&&(a=a-Ao+Rr-1);var h=String.fromCharCode(o)+String.fromCharCode(a);return h}function U1(i){if(i&&i.length===0)throw"MGRSPoint coverting from nothing";for(var t=i.length,e=null,n="",s,r=0;!/[A-Z]/.test(s=i.charAt(r));){if(r>=2)throw"MGRSPoint bad conversion from: "+i;n+=s,r++}var o=parseInt(n,10);if(r===0||r+3>t)throw"MGRSPoint bad conversion from: "+i;var a=i.charAt(r++);if(a<="A"||a==="B"||a==="Y"||a>="Z"||a==="I"||a==="O")throw"MGRSPoint zone letter "+a+" not handled: "+i;e=i.substring(r,r+=2);for(var l=z1(o),h=$F(e.charAt(0),l),c=VF(e.charAt(1),l);c0&&(_=1e5/Math.pow(10,g),x=i.substring(r,r+g),f=parseFloat(x)*_,v=i.substring(r+g),p=parseFloat(v)*_),w=f+h,E=p+c,{easting:w,northing:E,zoneLetter:a,zoneNumber:o,accuracy:_}}function $F(i,t){for(var e=k1.charCodeAt(t-1),n=1e5,s=!1;e!==i.charCodeAt(0);){if(e++,e===Je&&e++,e===Ti&&e++,e>Lo){if(s)throw"Bad character: "+i;e=Rr,s=!0}n+=1e5}return n}function VF(i,t){if(i>"V")throw"MGRSPoint given invalid Northing "+i;for(var e=D1.charCodeAt(t-1),n=0,s=!1;e!==i.charCodeAt(0);){if(e++,e===Je&&e++,e===Ti&&e++,e>Ao){if(s)throw"Bad character: "+i;e=Rr,s=!0}n+=1e5}return n}function YF(i){var t;switch(i){case"C":t=11e5;break;case"D":t=2e6;break;case"E":t=28e5;break;case"F":t=37e5;break;case"G":t=46e5;break;case"H":t=55e5;break;case"J":t=64e5;break;case"K":t=73e5;break;case"L":t=82e5;break;case"M":t=91e5;break;case"N":t=0;break;case"P":t=8e5;break;case"Q":t=17e5;break;case"R":t=26e5;break;case"S":t=35e5;break;case"T":t=44e5;break;case"U":t=53e5;break;case"V":t=62e5;break;case"W":t=7e6;break;case"X":t=79e5;break;default:t=-1}if(t>=0)return t;throw"Invalid zone letter: "+i}function Yr(i,t,e){if(!(this instanceof Yr))return new Yr(i,t,e);if(Array.isArray(i))this.x=i[0],this.y=i[1],this.z=i[2]||0;else if(typeof i=="object")this.x=i.x,this.y=i.y,this.z=i.z||0;else if(typeof i=="string"&&typeof t>"u"){var n=i.split(",");this.x=parseFloat(n[0],10),this.y=parseFloat(n[1],10),this.z=parseFloat(n[2],10)||0}else this.x=i,this.y=t,this.z=e||0;console.warn("proj4.Point will be removed in version 3, use proj4.toPoint")}Yr.fromMGRS=function(i){return new Yr(j1(i))};Yr.prototype.toMGRS=function(i){return G1([this.x,this.y],i)};var HF=1,KF=.25,Om=.046875,Fm=.01953125,Nm=.01068115234375,QF=.75,JF=.46875,t3=.013020833333333334,e3=.007120768229166667,i3=.3645833333333333,n3=.005696614583333333,s3=.3076171875;function B1(i){var t=[];t[0]=HF-i*(KF+i*(Om+i*(Fm+i*Nm))),t[1]=i*(QF-i*(Om+i*(Fm+i*Nm)));var e=i*i;return t[2]=e*(JF-i*(t3+i*e3)),e*=i,t[3]=e*(i3-i*n3),t[4]=e*i*s3,t}function ec(i,t,e,n){return e*=t,t*=t,n[0]*i-e*(n[1]+t*(n[2]+t*(n[3]+t*n[4])))}var r3=20;function W1(i,t,e){for(var n=1/(1-t),s=i,r=r3;r;--r){var o=Math.sin(s),a=1-t*o*o;if(a=(ec(s,o,Math.cos(s),e)-i)*(a*Math.sqrt(a))*n,s-=a,Math.abs(a)J?Math.tan(e):0,p=Math.pow(f,2),_=Math.pow(p,2);s=1-this.es*Math.pow(a,2),h=h/Math.sqrt(s);var x=ec(e,a,l,this.en);r=this.a*(this.k0*h*(1+c/6*(1-p+u+c/20*(5-18*p+_+14*u-58*p*u+c/42*(61+179*_-_*p-479*p)))))+this.x0,o=this.a*(this.k0*(x-this.ml0+a*n*h/2*(1+c/12*(5-p+9*u+4*g+c/30*(61+_-58*p+270*u-330*p*u+c/56*(1385+543*_-_*p-3111*p))))))+this.y0}else{var v=l*Math.sin(n);if(Math.abs(Math.abs(v)-1)=1){if(v-1>J)return 93;o=0}else o=Math.acos(o);e<0&&(o=-o),o=this.a*this.k0*(o-this.lat0)+this.y0}return i.x=r,i.y=o,i}function l3(i){var t,e,n,s,r=(i.x-this.x0)*(1/this.a),o=(i.y-this.y0)*(1/this.a);if(this.es)if(t=this.ml0+o/this.k0,e=W1(t,this.es,this.en),Math.abs(e)J?Math.tan(e):0,c=this.ep2*Math.pow(l,2),u=Math.pow(c,2),g=Math.pow(h,2),f=Math.pow(g,2);t=1-this.es*Math.pow(a,2);var p=r*Math.sqrt(t)/this.k0,_=Math.pow(p,2);t=t*h,n=e-t*_/(1-this.es)*.5*(1-_/12*(5+3*g-9*c*g+c-4*u-_/30*(61+90*g-252*c*g+45*f+46*c-_/56*(1385+3633*g+4095*f+1574*f*g)))),s=it(this.long0+p*(1-_/6*(1+2*g+c-_/20*(5+28*g+24*f+8*c*g+6*c-_/42*(61+662*g+1320*f+720*f*g))))/l)}else n=V*Ba(o),s=0;else{var x=Math.exp(r/this.k0),v=.5*(x-1/x),w=this.lat0+o/this.k0,E=Math.cos(w);t=Math.sqrt((1-Math.pow(E,2))/(1+Math.pow(v,2))),n=Math.asin(t),o<0&&(n=-n),v===0&&E===0?s=0:s=it(Math.atan2(v,E)+this.long0)}return i.x=s,i.y=n,i}var h3=["Fast_Transverse_Mercator","Fast Transverse Mercator"];const Sl={init:o3,forward:a3,inverse:l3,names:h3};function q1(i){var t=Math.exp(i);return t=(t-1/t)/2,t}function Mi(i,t){i=Math.abs(i),t=Math.abs(t);var e=Math.max(i,t),n=Math.min(i,t)/(e||1);return e*Math.sqrt(1+Math.pow(n,2))}function c3(i){var t=1+i,e=t-1;return e===0?i:i*Math.log(t)/e}function u3(i){var t=Math.abs(i);return t=c3(t*(1+t/(Mi(1,t)+1))),i<0?-t:t}function $g(i,t){for(var e=2*Math.cos(2*t),n=i.length-1,s=i[n],r=0,o;--n>=0;)o=-r+e*s+i[n],r=s,s=o;return t+o*Math.sin(2*t)}function d3(i,t){for(var e=2*Math.cos(t),n=i.length-1,s=i[n],r=0,o;--n>=0;)o=-r+e*s+i[n],r=s,s=o;return Math.sin(t)*o}function g3(i){var t=Math.exp(i);return t=(t+1/t)/2,t}function X1(i,t,e){for(var n=Math.sin(t),s=Math.cos(t),r=q1(e),o=g3(e),a=2*s*o,l=-2*n*r,h=i.length-1,c=i[h],u=0,g=0,f=0,p,_;--h>=0;)p=g,_=u,g=c,u=f,c=-p+a*g-l*u+i[h],f=-_+l*g+a*u;return a=n*o,l=s*r,[a*c-l*f,a*f+l*c]}function f3(){if(!this.approx&&(isNaN(this.es)||this.es<=0))throw new Error('Incorrect elliptical usage. Try using the +approx option in the proj string, or PROJECTION["Fast_Transverse_Mercator"] in the WKT.');this.approx&&(Sl.init.apply(this),this.forward=Sl.forward,this.inverse=Sl.inverse),this.x0=this.x0!==void 0?this.x0:0,this.y0=this.y0!==void 0?this.y0:0,this.long0=this.long0!==void 0?this.long0:0,this.lat0=this.lat0!==void 0?this.lat0:0,this.cgb=[],this.cbg=[],this.utg=[],this.gtu=[];var i=this.es/(1+Math.sqrt(1-this.es)),t=i/(2-i),e=t;this.cgb[0]=t*(2+t*(-2/3+t*(-2+t*(116/45+t*(26/45+t*(-2854/675)))))),this.cbg[0]=t*(-2+t*(2/3+t*(4/3+t*(-82/45+t*(32/45+t*(4642/4725)))))),e=e*t,this.cgb[1]=e*(7/3+t*(-8/5+t*(-227/45+t*(2704/315+t*(2323/945))))),this.cbg[1]=e*(5/3+t*(-16/15+t*(-13/9+t*(904/315+t*(-1522/945))))),e=e*t,this.cgb[2]=e*(56/15+t*(-136/35+t*(-1262/105+t*(73814/2835)))),this.cbg[2]=e*(-26/15+t*(34/21+t*(8/5+t*(-12686/2835)))),e=e*t,this.cgb[3]=e*(4279/630+t*(-332/35+t*(-399572/14175))),this.cbg[3]=e*(1237/630+t*(-12/5+t*(-24832/14175))),e=e*t,this.cgb[4]=e*(4174/315+t*(-144838/6237)),this.cbg[4]=e*(-734/315+t*(109598/31185)),e=e*t,this.cgb[5]=e*(601676/22275),this.cbg[5]=e*(444337/155925),e=Math.pow(t,2),this.Qn=this.k0/(1+t)*(1+e*(1/4+e*(1/64+e/256))),this.utg[0]=t*(-.5+t*(2/3+t*(-37/96+t*(1/360+t*(81/512+t*(-96199/604800)))))),this.gtu[0]=t*(.5+t*(-2/3+t*(5/16+t*(41/180+t*(-127/288+t*(7891/37800)))))),this.utg[1]=e*(-1/48+t*(-1/15+t*(437/1440+t*(-46/105+t*(1118711/3870720))))),this.gtu[1]=e*(13/48+t*(-3/5+t*(557/1440+t*(281/630+t*(-1983433/1935360))))),e=e*t,this.utg[2]=e*(-17/480+t*(37/840+t*(209/4480+t*(-5569/90720)))),this.gtu[2]=e*(61/240+t*(-103/140+t*(15061/26880+t*(167603/181440)))),e=e*t,this.utg[3]=e*(-4397/161280+t*(11/504+t*(830251/7257600))),this.gtu[3]=e*(49561/161280+t*(-179/168+t*(6601661/7257600))),e=e*t,this.utg[4]=e*(-4583/161280+t*(108847/3991680)),this.gtu[4]=e*(34729/80640+t*(-3418889/1995840)),e=e*t,this.utg[5]=e*(-20648693/638668800),this.gtu[5]=e*(212378941/319334400);var n=$g(this.cbg,this.lat0);this.Zb=-this.Qn*(n+d3(this.gtu,2*n))}function p3(i){var t=it(i.x-this.long0),e=i.y;e=$g(this.cbg,e);var n=Math.sin(e),s=Math.cos(e),r=Math.sin(t),o=Math.cos(t);e=Math.atan2(n,o*s),t=Math.atan2(r*s,Mi(n,s*o)),t=u3(Math.tan(t));var a=X1(this.gtu,2*e,2*t);e=e+a[0],t=t+a[1];var l,h;return Math.abs(t)<=2.623395162778?(l=this.a*(this.Qn*t)+this.x0,h=this.a*(this.Qn*e+this.Zb)+this.y0):(l=1/0,h=1/0),i.x=l,i.y=h,i}function m3(i){var t=(i.x-this.x0)*(1/this.a),e=(i.y-this.y0)*(1/this.a);e=(e-this.Zb)/this.Qn,t=t/this.Qn;var n,s;if(Math.abs(t)<=2.623395162778){var r=X1(this.utg,2*e,2*t);e=e+r[0],t=t+r[1],t=Math.atan(q1(t));var o=Math.sin(e),a=Math.cos(e),l=Math.sin(t),h=Math.cos(t);e=Math.atan2(o*h,Mi(l,h*a)),t=Math.atan2(l,h*a),n=it(t+this.long0),s=$g(this.cgb,e)}else n=1/0,s=1/0;return i.x=n,i.y=s,i}var _3=["Extended_Transverse_Mercator","Extended Transverse Mercator","etmerc","Transverse_Mercator","Transverse Mercator","Gauss Kruger","Gauss_Kruger","tmerc"];const Tl={init:f3,forward:p3,inverse:m3,names:_3};function y3(i,t){if(i===void 0){if(i=Math.floor((it(t)+Math.PI)*30/Math.PI)+1,i<0)return 0;if(i>60)return 60}return i}var x3="etmerc";function v3(){var i=y3(this.zone,this.long0);if(i===void 0)throw new Error("unknown utm zone");this.lat0=0,this.long0=(6*Math.abs(i)-183)*Pe,this.x0=5e5,this.y0=this.utmSouth?1e7:0,this.k0=.9996,Tl.init.apply(this),this.forward=Tl.forward,this.inverse=Tl.inverse}var w3=["Universal Transverse Mercator System","utm"];const b3={init:v3,names:w3,dependsOn:x3};function Vg(i,t){return Math.pow((1-i)/(1+i),t)}var E3=20;function S3(){var i=Math.sin(this.lat0),t=Math.cos(this.lat0);t*=t,this.rc=Math.sqrt(1-this.es)/(1-this.es*i*i),this.C=Math.sqrt(1+this.es*t*t/(1-this.es)),this.phic0=Math.asin(i/this.C),this.ratexp=.5*this.C*this.e,this.K=Math.tan(.5*this.phic0+Zt)/(Math.pow(Math.tan(.5*this.lat0+Zt),this.C)*Vg(this.e*i,this.ratexp))}function T3(i){var t=i.x,e=i.y;return i.y=2*Math.atan(this.K*Math.pow(Math.tan(.5*e+Zt),this.C)*Vg(this.e*Math.sin(e),this.ratexp))-V,i.x=this.C*t,i}function M3(i){for(var t=1e-14,e=i.x/this.C,n=i.y,s=Math.pow(Math.tan(.5*n+Zt)/this.K,1/this.C),r=E3;r>0&&(n=2*Math.atan(s*Vg(this.e*Math.sin(i.y),-.5*this.e))-V,!(Math.abs(n-i.y)0?this.con=1:this.con=-1),this.cons=Math.sqrt(Math.pow(1+this.e,1+this.e)*Math.pow(1-this.e,1-this.e)),this.k0===1&&!isNaN(this.lat_ts)&&Math.abs(this.coslat0)<=J&&Math.abs(Math.cos(this.lat_ts))>J&&(this.k0=.5*this.cons*dn(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts))/Ui(this.e,this.con*this.lat_ts,this.con*Math.sin(this.lat_ts))),this.ms1=dn(this.e,this.sinlat0,this.coslat0),this.X0=2*Math.atan(this.ssfn_(this.lat0,this.sinlat0,this.e))-V,this.cosX0=Math.cos(this.X0),this.sinX0=Math.sin(this.X0))}function N3(i){var t=i.x,e=i.y,n=Math.sin(e),s=Math.cos(e),r,o,a,l,h,c,u=it(t-this.long0);return Math.abs(Math.abs(t-this.long0)-Math.PI)<=J&&Math.abs(e+this.lat0)<=J?(i.x=NaN,i.y=NaN,i):this.sphere?(r=2*this.k0/(1+this.sinlat0*n+this.coslat0*s*Math.cos(u)),i.x=this.a*r*s*Math.sin(u)+this.x0,i.y=this.a*r*(this.coslat0*n-this.sinlat0*s*Math.cos(u))+this.y0,i):(o=2*Math.atan(this.ssfn_(e,n,this.e))-V,l=Math.cos(o),a=Math.sin(o),Math.abs(this.coslat0)<=J?(h=Ui(this.e,e*this.con,this.con*n),c=2*this.a*this.k0*h/this.cons,i.x=this.x0+c*Math.sin(t-this.long0),i.y=this.y0-this.con*c*Math.cos(t-this.long0),i):(Math.abs(this.sinlat0)0?t=it(this.long0+Math.atan2(i.x,-1*i.y)):t=it(this.long0+Math.atan2(i.x,i.y)):t=it(this.long0+Math.atan2(i.x*Math.sin(a),o*this.coslat0*Math.cos(a)-i.y*this.sinlat0*Math.sin(a))),i.x=t,i.y=e,i)}else if(Math.abs(this.coslat0)<=J){if(o<=J)return e=this.lat0,t=this.long0,i.x=t,i.y=e,i;i.x*=this.con,i.y*=this.con,n=o*this.cons/(2*this.a*this.k0),e=this.con*_a(this.e,n),t=this.con*it(this.con*this.long0+Math.atan2(i.x,-1*i.y))}else s=2*Math.atan(o*this.cosX0/(2*this.a*this.k0*this.ms1)),t=this.long0,o<=J?r=this.X0:(r=Math.asin(Math.cos(s)*this.sinX0+i.y*Math.sin(s)*this.cosX0/o),t=it(this.long0+Math.atan2(i.x*Math.sin(s),o*this.cosX0*Math.cos(s)-i.y*this.sinX0*Math.sin(s)))),e=-1*_a(this.e,Math.tan(.5*(V+r)));return i.x=t,i.y=e,i}var D3=["stere","Stereographic_South_Pole","Polar Stereographic (variant B)","Polar_Stereographic"];const G3={init:F3,forward:N3,inverse:k3,names:D3,ssfn_:O3};function j3(){var i=this.lat0;this.lambda0=this.long0;var t=Math.sin(i),e=this.a,n=this.rf,s=1/n,r=2*s-Math.pow(s,2),o=this.e=Math.sqrt(r);this.R=this.k0*e*Math.sqrt(1-r)/(1-r*Math.pow(t,2)),this.alpha=Math.sqrt(1+r/(1-r)*Math.pow(Math.cos(i),4)),this.b0=Math.asin(t/this.alpha);var a=Math.log(Math.tan(Math.PI/4+this.b0/2)),l=Math.log(Math.tan(Math.PI/4+i/2)),h=Math.log((1+o*t)/(1-o*t));this.K=a-this.alpha*l+this.alpha*o/2*h}function z3(i){var t=Math.log(Math.tan(Math.PI/4-i.y/2)),e=this.e/2*Math.log((1+this.e*Math.sin(i.y))/(1-this.e*Math.sin(i.y))),n=-this.alpha*(t+e)+this.K,s=2*(Math.atan(Math.exp(n))-Math.PI/4),r=this.alpha*(i.x-this.lambda0),o=Math.atan(Math.sin(r)/(Math.sin(this.b0)*Math.tan(s)+Math.cos(this.b0)*Math.cos(r))),a=Math.asin(Math.cos(this.b0)*Math.sin(s)-Math.sin(this.b0)*Math.cos(s)*Math.cos(r));return i.y=this.R/2*Math.log((1+Math.sin(a))/(1-Math.sin(a)))+this.y0,i.x=this.R*o+this.x0,i}function U3(i){for(var t=i.x-this.x0,e=i.y-this.y0,n=t/this.R,s=2*(Math.atan(Math.exp(e/this.R))-Math.PI/4),r=Math.asin(Math.cos(this.b0)*Math.sin(s)+Math.sin(this.b0)*Math.cos(s)*Math.cos(n)),o=Math.atan(Math.sin(n)/(Math.cos(this.b0)*Math.cos(n)-Math.sin(this.b0)*Math.tan(s))),a=this.lambda0+o/this.alpha,l=0,h=r,c=-1e3,u=0;Math.abs(h-c)>1e-7;){if(++u>20)return;l=1/this.alpha*(Math.log(Math.tan(Math.PI/4+r/2))-this.K)+this.e*Math.log(Math.tan(Math.PI/4+Math.asin(this.e*Math.sin(h))/2)),c=h,h=2*Math.atan(Math.exp(l))-Math.PI/2}return i.x=a,i.y=h,i}var B3=["somerc"];const W3={init:j3,forward:z3,inverse:U3,names:B3};var xr=1e-7;function q3(i){var t=["Hotine_Oblique_Mercator","Hotine_Oblique_Mercator_Azimuth_Natural_Origin"],e=typeof i.PROJECTION=="object"?Object.keys(i.PROJECTION)[0]:i.PROJECTION;return"no_uoff"in i||"no_off"in i||t.indexOf(e)!==-1}function X3(){var i,t,e,n,s,r,o,a,l,h,c=0,u,g=0,f=0,p=0,_=0,x=0,v=0;this.no_off=q3(this),this.no_rot="no_rot"in this;var w=!1;"alpha"in this&&(w=!0);var E=!1;if("rectified_grid_angle"in this&&(E=!0),w&&(v=this.alpha),E&&(c=this.rectified_grid_angle*Pe),w||E)g=this.longc;else if(f=this.long1,_=this.lat1,p=this.long2,x=this.lat2,Math.abs(_-x)<=xr||(i=Math.abs(_))<=xr||Math.abs(i-V)<=xr||Math.abs(Math.abs(this.lat0)-V)<=xr||Math.abs(Math.abs(x)-V)<=xr)throw new Error;var S=1-this.es;t=Math.sqrt(S),Math.abs(this.lat0)>J?(a=Math.sin(this.lat0),e=Math.cos(this.lat0),i=1-this.es*a*a,this.B=e*e,this.B=Math.sqrt(1+this.es*this.B*this.B/S),this.A=this.B*this.k0*t/i,n=this.B*t/(e*Math.sqrt(i)),s=n*n-1,s<=0?s=0:(s=Math.sqrt(s),this.lat0<0&&(s=-s)),this.E=s+=n,this.E*=Math.pow(Ui(this.e,this.lat0,a),this.B)):(this.B=1/t,this.A=this.k0,this.E=n=s=1),w||E?(w?(u=Math.asin(Math.sin(v)/n),E||(c=v)):(u=c,v=Math.asin(n*Math.sin(u))),this.lam0=g-Math.asin(.5*(s-1/s)*Math.tan(u))/this.B):(r=Math.pow(Ui(this.e,_,Math.sin(_)),this.B),o=Math.pow(Ui(this.e,x,Math.sin(x)),this.B),s=this.E/r,l=(o-r)/(o+r),h=this.E*this.E,h=(h-o*r)/(h+o*r),i=f-p,i<-Math.pi?p-=pa:i>Math.pi&&(p+=pa),this.lam0=it(.5*(f+p)-Math.atan(h*Math.tan(.5*this.B*(f-p))/l)/this.B),u=Math.atan(2*Math.sin(this.B*it(f-this.lam0))/(s-1/s)),c=v=Math.asin(n*Math.sin(u))),this.singam=Math.sin(u),this.cosgam=Math.cos(u),this.sinrot=Math.sin(c),this.cosrot=Math.cos(c),this.rB=1/this.B,this.ArB=this.A*this.rB,this.BrA=1/this.ArB,this.A*this.B,this.no_off?this.u_0=0:(this.u_0=Math.abs(this.ArB*Math.atan(Math.sqrt(n*n-1)/Math.cos(v))),this.lat0<0&&(this.u_0=-this.u_0)),s=.5*u,this.v_pole_n=this.ArB*Math.log(Math.tan(Zt-s)),this.v_pole_s=this.ArB*Math.log(Math.tan(Zt+s))}function Z3(i){var t={},e,n,s,r,o,a,l,h;if(i.x=i.x-this.lam0,Math.abs(Math.abs(i.y)-V)>J){if(o=this.E/Math.pow(Ui(this.e,i.y,Math.sin(i.y)),this.B),a=1/o,e=.5*(o-a),n=.5*(o+a),r=Math.sin(this.B*i.x),s=(e*this.singam-r*this.cosgam)/n,Math.abs(Math.abs(s)-1)0?this.v_pole_n:this.v_pole_s,l=this.ArB*i.y;return this.no_rot?(t.x=l,t.y=h):(l-=this.u_0,t.x=h*this.cosrot+l*this.sinrot,t.y=l*this.cosrot-h*this.sinrot),t.x=this.a*t.x+this.x0,t.y=this.a*t.y+this.y0,t}function $3(i){var t,e,n,s,r,o,a,l={};if(i.x=(i.x-this.x0)*(1/this.a),i.y=(i.y-this.y0)*(1/this.a),this.no_rot?(e=i.y,t=i.x):(e=i.x*this.cosrot-i.y*this.sinrot,t=i.y*this.cosrot+i.x*this.sinrot+this.u_0),n=Math.exp(-this.BrA*e),s=.5*(n-1/n),r=.5*(n+1/n),o=Math.sin(this.BrA*t),a=(o*this.cosgam+s*this.singam)/r,Math.abs(Math.abs(a)-1)J?this.ns=Math.log(n/a)/Math.log(s/l):this.ns=t,isNaN(this.ns)&&(this.ns=t),this.f0=n/(this.ns*Math.pow(s,this.ns)),this.rh=this.a*this.f0*Math.pow(h,this.ns),this.title||(this.title="Lambert Conformal Conic")}}function K3(i){var t=i.x,e=i.y;Math.abs(2*Math.abs(e)-Math.PI)<=J&&(e=Ba(e)*(V-2*J));var n=Math.abs(Math.abs(e)-V),s,r;if(n>J)s=Ui(this.e,e,Math.sin(e)),r=this.a*this.f0*Math.pow(s,this.ns);else{if(n=e*this.ns,n<=0)return null;r=0}var o=this.ns*it(t-this.long0);return i.x=this.k0*(r*Math.sin(o))+this.x0,i.y=this.k0*(this.rh-r*Math.cos(o))+this.y0,i}function Q3(i){var t,e,n,s,r,o=(i.x-this.x0)/this.k0,a=this.rh-(i.y-this.y0)/this.k0;this.ns>0?(t=Math.sqrt(o*o+a*a),e=1):(t=-Math.sqrt(o*o+a*a),e=-1);var l=0;if(t!==0&&(l=Math.atan2(e*o,e*a)),t!==0||this.ns>0){if(e=1/this.ns,n=Math.pow(t/(this.a*this.f0),e),s=_a(this.e,n),s===-9999)return null}else s=-V;return r=it(l/this.ns+this.long0),i.x=r,i.y=s,i}var J3=["Lambert Tangential Conformal Conic Projection","Lambert_Conformal_Conic","Lambert_Conformal_Conic_1SP","Lambert_Conformal_Conic_2SP","lcc","Lambert Conic Conformal (1SP)","Lambert Conic Conformal (2SP)"];const tN={init:H3,forward:K3,inverse:Q3,names:J3};function eN(){this.a=6377397155e-3,this.es=.006674372230614,this.e=Math.sqrt(this.es),this.lat0||(this.lat0=.863937979737193),this.long0||(this.long0=.7417649320975901-.308341501185665),this.k0||(this.k0=.9999),this.s45=.785398163397448,this.s90=2*this.s45,this.fi0=this.lat0,this.e2=this.es,this.e=Math.sqrt(this.e2),this.alfa=Math.sqrt(1+this.e2*Math.pow(Math.cos(this.fi0),4)/(1-this.e2)),this.uq=1.04216856380474,this.u0=Math.asin(Math.sin(this.fi0)/this.alfa),this.g=Math.pow((1+this.e*Math.sin(this.fi0))/(1-this.e*Math.sin(this.fi0)),this.alfa*this.e/2),this.k=Math.tan(this.u0/2+this.s45)/Math.pow(Math.tan(this.fi0/2+this.s45),this.alfa)*this.g,this.k1=this.k0,this.n0=this.a*Math.sqrt(1-this.e2)/(1-this.e2*Math.pow(Math.sin(this.fi0),2)),this.s0=1.37008346281555,this.n=Math.sin(this.s0),this.ro0=this.k1*this.n0/Math.tan(this.s0),this.ad=this.s90-this.uq}function iN(i){var t,e,n,s,r,o,a,l=i.x,h=i.y,c=it(l-this.long0);return t=Math.pow((1+this.e*Math.sin(h))/(1-this.e*Math.sin(h)),this.alfa*this.e/2),e=2*(Math.atan(this.k*Math.pow(Math.tan(h/2+this.s45),this.alfa)/t)-this.s45),n=-c*this.alfa,s=Math.asin(Math.cos(this.ad)*Math.sin(e)+Math.sin(this.ad)*Math.cos(e)*Math.cos(n)),r=Math.asin(Math.cos(e)*Math.sin(n)/Math.cos(s)),o=this.n*r,a=this.ro0*Math.pow(Math.tan(this.s0/2+this.s45),this.n)/Math.pow(Math.tan(s/2+this.s45),this.n),i.y=a*Math.cos(o)/1,i.x=a*Math.sin(o)/1,this.czech||(i.y*=-1,i.x*=-1),i}function nN(i){var t,e,n,s,r,o,a,l,h=i.x;i.x=i.y,i.y=h,this.czech||(i.y*=-1,i.x*=-1),o=Math.sqrt(i.x*i.x+i.y*i.y),r=Math.atan2(i.y,i.x),s=r/Math.sin(this.s0),n=2*(Math.atan(Math.pow(this.ro0/o,1/this.n)*Math.tan(this.s0/2+this.s45))-this.s45),t=Math.asin(Math.cos(this.ad)*Math.sin(n)-Math.sin(this.ad)*Math.cos(n)*Math.cos(s)),e=Math.asin(Math.cos(n)*Math.sin(s)/Math.cos(t)),i.x=this.long0-e/this.alfa,a=t,l=0;var c=0;do i.y=2*(Math.atan(Math.pow(this.k,-1/this.alfa)*Math.pow(Math.tan(t/2+this.s45),1/this.alfa)*Math.pow((1+this.e*Math.sin(a))/(1-this.e*Math.sin(a)),this.e/2))-this.s45),Math.abs(a-i.y)<1e-10&&(l=1),a=i.y,c+=1;while(l===0&&c<15);return c>=15?null:i}var sN=["Krovak","krovak"];const rN={init:eN,forward:iN,inverse:nN,names:sN};function $e(i,t,e,n,s){return i*s-t*Math.sin(2*s)+e*Math.sin(4*s)-n*Math.sin(6*s)}function Wa(i){return 1-.25*i*(1+i/16*(3+1.25*i))}function qa(i){return .375*i*(1+.25*i*(1+.46875*i))}function Xa(i){return .05859375*i*i*(1+.75*i)}function Za(i){return i*i*i*(35/3072)}function Hr(i,t,e){var n=t*e;return i/Math.sqrt(1-n*n)}function uo(i){return Math.abs(i)1e-7?(e=i*t,(1-i*i)*(t/(1-e*e)-.5/i*Math.log((1-e)/(1+e)))):2*t}var uN=1,dN=2,gN=3,fN=4;function pN(){var i=Math.abs(this.lat0);if(Math.abs(i-V)0){var t;switch(this.qp=us(this.e,1),this.mmf=.5/(1-this.es),this.apa=SN(this.es),this.mode){case this.N_POLE:this.dd=1;break;case this.S_POLE:this.dd=1;break;case this.EQUIT:this.rq=Math.sqrt(.5*this.qp),this.dd=1/this.rq,this.xmf=1,this.ymf=.5*this.qp;break;case this.OBLIQ:this.rq=Math.sqrt(.5*this.qp),t=Math.sin(this.lat0),this.sinb1=us(this.e,t)/this.qp,this.cosb1=Math.sqrt(1-this.sinb1*this.sinb1),this.dd=Math.cos(this.lat0)/(Math.sqrt(1-this.es*t*t)*this.rq*this.cosb1),this.ymf=(this.xmf=this.rq)/this.dd,this.xmf*=this.dd;break}}else this.mode===this.OBLIQ&&(this.sinph0=Math.sin(this.lat0),this.cosph0=Math.cos(this.lat0))}function mN(i){var t,e,n,s,r,o,a,l,h,c,u=i.x,g=i.y;if(u=it(u-this.long0),this.sphere){if(r=Math.sin(g),c=Math.cos(g),n=Math.cos(u),this.mode===this.OBLIQ||this.mode===this.EQUIT){if(e=this.mode===this.EQUIT?1+c*n:1+this.sinph0*r+this.cosph0*c*n,e<=J)return null;e=Math.sqrt(2/e),t=e*c*Math.sin(u),e*=this.mode===this.EQUIT?r:this.cosph0*r-this.sinph0*c*n}else if(this.mode===this.N_POLE||this.mode===this.S_POLE){if(this.mode===this.N_POLE&&(n=-n),Math.abs(g+this.lat0)=0?(t=(h=Math.sqrt(o))*s,e=n*(this.mode===this.S_POLE?h:-h)):t=e=0;break}}return i.x=this.a*t+this.x0,i.y=this.a*e+this.y0,i}function _N(i){i.x-=this.x0,i.y-=this.y0;var t=i.x/this.a,e=i.y/this.a,n,s,r,o,a,l,h;if(this.sphere){var c=0,u,g=0;if(u=Math.sqrt(t*t+e*e),s=u*.5,s>1)return null;switch(s=2*Math.asin(s),(this.mode===this.OBLIQ||this.mode===this.EQUIT)&&(g=Math.sin(s),c=Math.cos(s)),this.mode){case this.EQUIT:s=Math.abs(u)<=J?0:Math.asin(e*g/u),t*=g,e=c*u;break;case this.OBLIQ:s=Math.abs(u)<=J?this.lat0:Math.asin(c*this.sinph0+e*g*this.cosph0/u),t*=g*this.cosph0,e=(c-Math.sin(s)*this.sinph0)*u;break;case this.N_POLE:e=-e,s=V-s;break;case this.S_POLE:s-=V;break}n=e===0&&(this.mode===this.EQUIT||this.mode===this.OBLIQ)?0:Math.atan2(t,e)}else{if(h=0,this.mode===this.OBLIQ||this.mode===this.EQUIT){if(t/=this.dd,e*=this.dd,l=Math.sqrt(t*t+e*e),l1&&(i=i>1?1:-1),Math.asin(i)}function CN(){Math.abs(this.lat1+this.lat2)J?this.ns0=(this.ms1*this.ms1-this.ms2*this.ms2)/(this.qs2-this.qs1):this.ns0=this.con,this.c=this.ms1*this.ms1+this.ns0*this.qs1,this.rh=this.a*Math.sqrt(this.c-this.ns0*this.qs0)/this.ns0)}function IN(i){var t=i.x,e=i.y;this.sin_phi=Math.sin(e),this.cos_phi=Math.cos(e);var n=us(this.e3,this.sin_phi),s=this.a*Math.sqrt(this.c-this.ns0*n)/this.ns0,r=this.ns0*it(t-this.long0),o=s*Math.sin(r)+this.x0,a=this.rh-s*Math.cos(r)+this.y0;return i.x=o,i.y=a,i}function PN(i){var t,e,n,s,r,o;return i.x-=this.x0,i.y=this.rh-i.y+this.y0,this.ns0>=0?(t=Math.sqrt(i.x*i.x+i.y*i.y),n=1):(t=-Math.sqrt(i.x*i.x+i.y*i.y),n=-1),s=0,t!==0&&(s=Math.atan2(n*i.x,n*i.y)),n=t*this.ns0/this.a,this.sphere?o=Math.asin((this.c-n*n)/(2*this.ns0)):(e=(this.c-n*n)/this.ns0,o=this.phi1z(this.e3,e)),r=it(s/this.ns0+this.long0),i.x=r,i.y=o,i}function AN(i,t){var e,n,s,r,o,a=ms(.5*t);if(i0||Math.abs(o)<=J?(a=this.x0+this.a*r*e*Math.sin(n)/o,l=this.y0+this.a*r*(this.cos_p14*t-this.sin_p14*e*s)/o):(a=this.x0+this.infinity_dist*e*Math.sin(n),l=this.y0+this.infinity_dist*(this.cos_p14*t-this.sin_p14*e*s)),i.x=a,i.y=l,i}function kN(i){var t,e,n,s,r,o;return i.x=(i.x-this.x0)/this.a,i.y=(i.y-this.y0)/this.a,i.x/=this.k0,i.y/=this.k0,(t=Math.sqrt(i.x*i.x+i.y*i.y))?(s=Math.atan2(t,this.rc),e=Math.sin(s),n=Math.cos(s),o=ms(n*this.sin_p14+i.y*e*this.cos_p14/t),r=Math.atan2(i.x*e,t*this.cos_p14*n-i.y*this.sin_p14*e),r=it(this.long0+r)):(o=this.phic0,r=0),i.x=r,i.y=o,i}var DN=["gnom"];const GN={init:FN,forward:NN,inverse:kN,names:DN};function jN(i,t){var e=1-(1-i*i)/(2*i)*Math.log((1-i)/(1+i));if(Math.abs(Math.abs(t)-e)<1e-6)return t<0?-1*V:V;for(var n=Math.asin(.5*t),s,r,o,a,l=0;l<30;l++)if(r=Math.sin(n),o=Math.cos(n),a=i*r,s=Math.pow(1-a*a,2)/(2*o)*(t/(1-i*i)-r/(1-a*a)+.5/i*Math.log((1-a)/(1+a))),n+=s,Math.abs(s)<=1e-10)return n;return NaN}function zN(){this.sphere||(this.k0=dn(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts)))}function UN(i){var t=i.x,e=i.y,n,s,r=it(t-this.long0);if(this.sphere)n=this.x0+this.a*r*Math.cos(this.lat_ts),s=this.y0+this.a*Math.sin(e)/Math.cos(this.lat_ts);else{var o=us(this.e,Math.sin(e));n=this.x0+this.a*this.k0*r,s=this.y0+this.a*o*.5/this.k0}return i.x=n,i.y=s,i}function BN(i){i.x-=this.x0,i.y-=this.y0;var t,e;return this.sphere?(t=it(this.long0+i.x/this.a/Math.cos(this.lat_ts)),e=Math.asin(i.y/this.a*Math.cos(this.lat_ts))):(e=jN(this.e,2*i.y*this.k0/this.a),t=it(this.long0+i.x/(this.a*this.k0))),i.x=t,i.y=e,i}var WN=["cea"];const qN={init:zN,forward:UN,inverse:BN,names:WN};function XN(){this.x0=this.x0||0,this.y0=this.y0||0,this.lat0=this.lat0||0,this.long0=this.long0||0,this.lat_ts=this.lat_ts||0,this.title=this.title||"Equidistant Cylindrical (Plate Carre)",this.rc=Math.cos(this.lat_ts)}function ZN(i){var t=i.x,e=i.y,n=it(t-this.long0),s=uo(e-this.lat0);return i.x=this.x0+this.a*n*this.rc,i.y=this.y0+this.a*s,i}function $N(i){var t=i.x,e=i.y;return i.x=it(this.long0+(t-this.x0)/(this.a*this.rc)),i.y=uo(this.lat0+(e-this.y0)/this.a),i}var VN=["Equirectangular","Equidistant_Cylindrical","eqc"];const YN={init:XN,forward:ZN,inverse:$N,names:VN};var km=20;function HN(){this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e=Math.sqrt(this.es),this.e0=Wa(this.es),this.e1=qa(this.es),this.e2=Xa(this.es),this.e3=Za(this.es),this.ml0=this.a*$e(this.e0,this.e1,this.e2,this.e3,this.lat0)}function KN(i){var t=i.x,e=i.y,n,s,r,o=it(t-this.long0);if(r=o*Math.sin(e),this.sphere)Math.abs(e)<=J?(n=this.a*o,s=-1*this.a*this.lat0):(n=this.a*Math.sin(r)/Math.tan(e),s=this.a*(uo(e-this.lat0)+(1-Math.cos(r))/Math.tan(e)));else if(Math.abs(e)<=J)n=this.a*o,s=-1*this.ml0;else{var a=Hr(this.a,this.e,Math.sin(e))/Math.tan(e);n=a*Math.sin(r),s=this.a*$e(this.e0,this.e1,this.e2,this.e3,e)-this.ml0+a*(1-Math.cos(r))}return i.x=n+this.x0,i.y=s+this.y0,i}function QN(i){var t,e,n,s,r,o,a,l,h;if(n=i.x-this.x0,s=i.y-this.y0,this.sphere)if(Math.abs(s+this.a*this.lat0)<=J)t=it(n/this.a+this.long0),e=0;else{o=this.lat0+s/this.a,a=n*n/this.a/this.a+o*o,l=o;var c;for(r=km;r;--r)if(c=Math.tan(l),h=-1*(o*(l*c+1)-l-.5*(l*l+a)*c)/((l-o)/c-1),l+=h,Math.abs(h)<=J){e=l;break}t=it(this.long0+Math.asin(n*Math.tan(l)/this.a)/Math.sin(e))}else if(Math.abs(s+this.ml0)<=J)e=0,t=it(this.long0+n/this.a);else{o=(this.ml0+s)/this.a,a=n*n/this.a/this.a+o*o,l=o;var u,g,f,p,_;for(r=km;r;--r)if(_=this.e*Math.sin(l),u=Math.sqrt(1-_*_)*Math.tan(l),g=this.a*$e(this.e0,this.e1,this.e2,this.e3,l),f=this.e0-2*this.e1*Math.cos(2*l)+4*this.e2*Math.cos(4*l)-6*this.e3*Math.cos(6*l),p=g/this.a,h=(o*(u*p+1)-p-.5*u*(p*p+a))/(this.es*Math.sin(2*l)*(p*p+a-2*o*p)/(4*u)+(o-p)*(u*f-2/Math.sin(2*l))-f),l-=h,Math.abs(h)<=J){e=l;break}u=Math.sqrt(1-this.es*Math.pow(Math.sin(e),2))*Math.tan(e),t=it(this.long0+Math.asin(n*u/this.a)/Math.sin(e))}return i.x=t,i.y=e,i}var JN=["Polyconic","poly"];const tk={init:HN,forward:KN,inverse:QN,names:JN};function ek(){this.A=[],this.A[1]=.6399175073,this.A[2]=-.1358797613,this.A[3]=.063294409,this.A[4]=-.02526853,this.A[5]=.0117879,this.A[6]=-.0055161,this.A[7]=.0026906,this.A[8]=-.001333,this.A[9]=67e-5,this.A[10]=-34e-5,this.B_re=[],this.B_im=[],this.B_re[1]=.7557853228,this.B_im[1]=0,this.B_re[2]=.249204646,this.B_im[2]=.003371507,this.B_re[3]=-.001541739,this.B_im[3]=.04105856,this.B_re[4]=-.10162907,this.B_im[4]=.01727609,this.B_re[5]=-.26623489,this.B_im[5]=-.36249218,this.B_re[6]=-.6870983,this.B_im[6]=-1.1651967,this.C_re=[],this.C_im=[],this.C_re[1]=1.3231270439,this.C_im[1]=0,this.C_re[2]=-.577245789,this.C_im[2]=-.007809598,this.C_re[3]=.508307513,this.C_im[3]=-.112208952,this.C_re[4]=-.15094762,this.C_im[4]=.18200602,this.C_re[5]=1.01418179,this.C_im[5]=1.64497696,this.C_re[6]=1.9660549,this.C_im[6]=2.5127645,this.D=[],this.D[1]=1.5627014243,this.D[2]=.5185406398,this.D[3]=-.03333098,this.D[4]=-.1052906,this.D[5]=-.0368594,this.D[6]=.007317,this.D[7]=.0122,this.D[8]=.00394,this.D[9]=-.0013}function ik(i){var t,e=i.x,n=i.y,s=n-this.lat0,r=e-this.long0,o=s/Wo*1e-5,a=r,l=1,h=0;for(t=1;t<=10;t++)l=l*o,h=h+this.A[t]*l;var c=h,u=a,g=1,f=0,p,_,x=0,v=0;for(t=1;t<=6;t++)p=g*c-f*u,_=f*c+g*u,g=p,f=_,x=x+this.B_re[t]*g-this.B_im[t]*f,v=v+this.B_im[t]*g+this.B_re[t]*f;return i.x=v*this.a+this.x0,i.y=x*this.a+this.y0,i}function nk(i){var t,e=i.x,n=i.y,s=e-this.x0,r=n-this.y0,o=r/this.a,a=s/this.a,l=1,h=0,c,u,g=0,f=0;for(t=1;t<=6;t++)c=l*o-h*a,u=h*o+l*a,l=c,h=u,g=g+this.C_re[t]*l-this.C_im[t]*h,f=f+this.C_im[t]*l+this.C_re[t]*h;for(var p=0;p.999999999999&&(e=.999999999999),t=Math.asin(e);var n=it(this.long0+i.x/(.900316316158*this.a*Math.cos(t)));n<-Math.PI&&(n=-Math.PI),n>Math.PI&&(n=Math.PI),e=(2*t+Math.sin(2*t))/Math.PI,Math.abs(e)>1&&(e=1);var s=Math.asin(e);return i.x=n,i.y=s,i}var vk=["Mollweide","moll"];const wk={init:_k,forward:yk,inverse:xk,names:vk};function bk(){Math.abs(this.lat1+this.lat2)=0?(e=Math.sqrt(i.x*i.x+i.y*i.y),t=1):(e=-Math.sqrt(i.x*i.x+i.y*i.y),t=-1);var r=0;if(e!==0&&(r=Math.atan2(t*i.x,t*i.y)),this.sphere)return s=it(this.long0+r/this.ns),n=uo(this.g-e/this.a),i.x=s,i.y=n,i;var o=this.g-e/this.a;return n=lh(o,this.e0,this.e1,this.e2,this.e3),s=it(this.long0+r/this.ns),i.x=s,i.y=n,i}var Tk=["Equidistant_Conic","eqdc"];const Mk={init:bk,forward:Ek,inverse:Sk,names:Tk};function Rk(){this.R=this.a}function Ck(i){var t=i.x,e=i.y,n=it(t-this.long0),s,r;Math.abs(e)<=J&&(s=this.x0+this.R*n,r=this.y0);var o=ms(2*Math.abs(e/Math.PI));(Math.abs(n)<=J||Math.abs(Math.abs(e)-V)<=J)&&(s=this.x0,e>=0?r=this.y0+Math.PI*this.R*Math.tan(.5*o):r=this.y0+Math.PI*this.R*-Math.tan(.5*o));var a=.5*Math.abs(Math.PI/n-n/Math.PI),l=a*a,h=Math.sin(o),c=Math.cos(o),u=c/(h+c-1),g=u*u,f=u*(2/h-1),p=f*f,_=Math.PI*this.R*(a*(u-p)+Math.sqrt(l*(u-p)*(u-p)-(p+l)*(g-p)))/(p+l);n<0&&(_=-_),s=this.x0+_;var x=l+u;return _=Math.PI*this.R*(f*x-a*Math.sqrt((p+l)*(l+1)-x*x))/(p+l),e>=0?r=this.y0+_:r=this.y0-_,i.x=s,i.y=r,i}function Ik(i){var t,e,n,s,r,o,a,l,h,c,u,g,f;return i.x-=this.x0,i.y-=this.y0,u=Math.PI*this.R,n=i.x/u,s=i.y/u,r=n*n+s*s,o=-Math.abs(s)*(1+r),a=o-2*s*s+n*n,l=-2*o+1+2*s*s+r*r,f=s*s/l+(2*a*a*a/l/l/l-9*o*a/l/l)/27,h=(o-a*a/3/l)/l,c=2*Math.sqrt(-h/3),u=3*f/h/c,Math.abs(u)>1&&(u>=0?u=1:u=-1),g=Math.acos(u)/3,i.y>=0?e=(-c*Math.cos(g+Math.PI/3)-a/3/l)*Math.PI:e=-(-c*Math.cos(g+Math.PI/3)-a/3/l)*Math.PI,Math.abs(n)2*V*this.a?void 0:(e=t/this.a,n=Math.sin(e),s=Math.cos(e),r=this.long0,Math.abs(t)<=J?o=this.lat0:(o=ms(s*this.sin_p12+i.y*n*this.cos_p12/t),a=Math.abs(this.lat0)-V,Math.abs(a)<=J?this.lat0>=0?r=it(this.long0+Math.atan2(i.x,-i.y)):r=it(this.long0-Math.atan2(-i.x,i.y)):r=it(this.long0+Math.atan2(i.x*n,t*this.cos_p12*s-i.y*this.sin_p12*n))),i.x=r,i.y=o,i)):(l=Wa(this.es),h=qa(this.es),c=Xa(this.es),u=Za(this.es),Math.abs(this.sin_p12-1)<=J?(g=this.a*$e(l,h,c,u,V),t=Math.sqrt(i.x*i.x+i.y*i.y),f=g-t,o=lh(f/this.a,l,h,c,u),r=it(this.long0+Math.atan2(i.x,-1*i.y)),i.x=r,i.y=o,i):Math.abs(this.sin_p12+1)<=J?(g=this.a*$e(l,h,c,u,V),t=Math.sqrt(i.x*i.x+i.y*i.y),f=t-g,o=lh(f/this.a,l,h,c,u),r=it(this.long0+Math.atan2(i.x,i.y)),i.x=r,i.y=o,i):(t=Math.sqrt(i.x*i.x+i.y*i.y),x=Math.atan2(i.x,i.y),p=Hr(this.a,this.e,this.sin_p12),v=Math.cos(x),w=this.e*this.cos_p12*v,E=-w*w/(1-this.es),S=3*this.es*(1-E)*this.sin_p12*this.cos_p12*v/(1-this.es),T=t/p,R=T-E*(1+E)*Math.pow(T,3)/6-S*(1+3*E)*Math.pow(T,4)/24,C=1-E*R*R/2-T*R*R*R/6,_=Math.asin(this.sin_p12*Math.cos(R)+this.cos_p12*Math.sin(R)*v),r=it(this.long0+Math.asin(Math.sin(x)*Math.sin(R)/Math.cos(_))),P=Math.sin(_),o=Math.atan2((P-this.es*C*this.sin_p12)*Math.tan(_),P*(1-this.es)),i.x=r,i.y=o,i))}var Nk=["Azimuthal_Equidistant","aeqd"];const kk={init:Lk,forward:Ok,inverse:Fk,names:Nk};function Dk(){this.sin_p14=Math.sin(this.lat0),this.cos_p14=Math.cos(this.lat0)}function Gk(i){var t,e,n,s,r,o,a,l,h=i.x,c=i.y;return n=it(h-this.long0),t=Math.sin(c),e=Math.cos(c),s=Math.cos(n),o=this.sin_p14*t+this.cos_p14*e*s,r=1,(o>0||Math.abs(o)<=J)&&(a=this.a*r*e*Math.sin(n),l=this.y0+this.a*r*(this.cos_p14*t-this.sin_p14*e*s)),i.x=a,i.y=l,i}function jk(i){var t,e,n,s,r,o,a;return i.x-=this.x0,i.y-=this.y0,t=Math.sqrt(i.x*i.x+i.y*i.y),e=ms(t/this.a),n=Math.sin(e),s=Math.cos(e),o=this.long0,Math.abs(t)<=J?(a=this.lat0,i.x=o,i.y=a,i):(a=ms(s*this.sin_p14+i.y*n*this.cos_p14/t),r=Math.abs(this.lat0)-V,Math.abs(r)<=J?(this.lat0>=0?o=it(this.long0+Math.atan2(i.x,-i.y)):o=it(this.long0-Math.atan2(-i.x,i.y)),i.x=o,i.y=a,i):(o=it(this.long0+Math.atan2(i.x*n,t*this.cos_p14*s-i.y*this.sin_p14*n)),i.x=o,i.y=a,i))}var zk=["ortho"];const Uk={init:Dk,forward:Gk,inverse:jk,names:zk};var oe={FRONT:1,RIGHT:2,BACK:3,LEFT:4,TOP:5,BOTTOM:6},$t={AREA_0:1,AREA_1:2,AREA_2:3,AREA_3:4};function Bk(){this.x0=this.x0||0,this.y0=this.y0||0,this.lat0=this.lat0||0,this.long0=this.long0||0,this.lat_ts=this.lat_ts||0,this.title=this.title||"Quadrilateralized Spherical Cube",this.lat0>=V-Zt/2?this.face=oe.TOP:this.lat0<=-(V-Zt/2)?this.face=oe.BOTTOM:Math.abs(this.long0)<=Zt?this.face=oe.FRONT:Math.abs(this.long0)<=V+Zt?this.face=this.long0>0?oe.RIGHT:oe.LEFT:this.face=oe.BACK,this.es!==0&&(this.one_minus_f=1-(this.a-this.b)/this.a,this.one_minus_f_squared=this.one_minus_f*this.one_minus_f)}function Wk(i){var t={x:0,y:0},e,n,s,r,o,a,l={value:0};if(i.x-=this.long0,this.es!==0?e=Math.atan(this.one_minus_f_squared*Math.tan(i.y)):e=i.y,n=i.x,this.face===oe.TOP)r=V-e,n>=Zt&&n<=V+Zt?(l.value=$t.AREA_0,s=n-V):n>V+Zt||n<=-(V+Zt)?(l.value=$t.AREA_1,s=n>0?n-fe:n+fe):n>-(V+Zt)&&n<=-Zt?(l.value=$t.AREA_2,s=n+V):(l.value=$t.AREA_3,s=n);else if(this.face===oe.BOTTOM)r=V+e,n>=Zt&&n<=V+Zt?(l.value=$t.AREA_0,s=-n+V):n=-Zt?(l.value=$t.AREA_1,s=-n):n<-Zt&&n>=-(V+Zt)?(l.value=$t.AREA_2,s=-n-V):(l.value=$t.AREA_3,s=n>0?-n+fe:-n-fe);else{var h,c,u,g,f,p,_;this.face===oe.RIGHT?n=kr(n,+V):this.face===oe.BACK?n=kr(n,+fe):this.face===oe.LEFT&&(n=kr(n,-V)),g=Math.sin(e),f=Math.cos(e),p=Math.sin(n),_=Math.cos(n),h=f*_,c=f*p,u=g,this.face===oe.FRONT?(r=Math.acos(h),s=pl(r,u,c,l)):this.face===oe.RIGHT?(r=Math.acos(c),s=pl(r,u,-h,l)):this.face===oe.BACK?(r=Math.acos(-h),s=pl(r,u,-c,l)):this.face===oe.LEFT?(r=Math.acos(-c),s=pl(r,u,h,l)):(r=s=0,l.value=$t.AREA_0)}return a=Math.atan(12/fe*(s+Math.acos(Math.sin(s)*Math.cos(Zt))-V)),o=Math.sqrt((1-Math.cos(r))/(Math.cos(a)*Math.cos(a))/(1-Math.cos(Math.atan(1/Math.cos(s))))),l.value===$t.AREA_1?a+=V:l.value===$t.AREA_2?a+=fe:l.value===$t.AREA_3&&(a+=1.5*fe),t.x=o*Math.cos(a),t.y=o*Math.sin(a),t.x=t.x*this.a+this.x0,t.y=t.y*this.a+this.y0,i.x=t.x,i.y=t.y,i}function qk(i){var t={lam:0,phi:0},e,n,s,r,o,a,l,h,c,u={value:0};if(i.x=(i.x-this.x0)/this.a,i.y=(i.y-this.y0)/this.a,n=Math.atan(Math.sqrt(i.x*i.x+i.y*i.y)),e=Math.atan2(i.y,i.x),i.x>=0&&i.x>=Math.abs(i.y)?u.value=$t.AREA_0:i.y>=0&&i.y>=Math.abs(i.x)?(u.value=$t.AREA_1,e-=V):i.x<0&&-i.x>=Math.abs(i.y)?(u.value=$t.AREA_2,e=e<0?e+fe:e-fe):(u.value=$t.AREA_3,e+=V),c=fe/12*Math.tan(e),o=Math.sin(c)/(Math.cos(c)-1/Math.sqrt(2)),a=Math.atan(o),s=Math.cos(e),r=Math.tan(n),l=1-s*s*r*r*(1-Math.cos(Math.atan(1/Math.cos(a)))),l<-1?l=-1:l>1&&(l=1),this.face===oe.TOP)h=Math.acos(l),t.phi=V-h,u.value===$t.AREA_0?t.lam=a+V:u.value===$t.AREA_1?t.lam=a<0?a+fe:a-fe:u.value===$t.AREA_2?t.lam=a-V:t.lam=a;else if(this.face===oe.BOTTOM)h=Math.acos(l),t.phi=h-V,u.value===$t.AREA_0?t.lam=-a+V:u.value===$t.AREA_1?t.lam=-a:u.value===$t.AREA_2?t.lam=-a-V:t.lam=a<0?-a-fe:-a+fe;else{var g,f,p;g=l,c=g*g,c>=1?p=0:p=Math.sqrt(1-c)*Math.sin(a),c+=p*p,c>=1?f=0:f=Math.sqrt(1-c),u.value===$t.AREA_1?(c=f,f=-p,p=c):u.value===$t.AREA_2?(f=-f,p=-p):u.value===$t.AREA_3&&(c=f,f=p,p=-c),this.face===oe.RIGHT?(c=g,g=-f,f=c):this.face===oe.BACK?(g=-g,f=-f):this.face===oe.LEFT&&(c=g,g=f,f=-c),t.phi=Math.acos(-p)-V,t.lam=Math.atan2(f,g),this.face===oe.RIGHT?t.lam=kr(t.lam,-V):this.face===oe.BACK?t.lam=kr(t.lam,-fe):this.face===oe.LEFT&&(t.lam=kr(t.lam,+V))}if(this.es!==0){var _,x,v;_=t.phi<0?1:0,x=Math.tan(t.phi),v=this.b/Math.sqrt(x*x+this.one_minus_f_squared),t.phi=Math.atan(Math.sqrt(this.a*this.a-v*v)/(this.one_minus_f*v)),_&&(t.phi=-t.phi)}return t.lam+=this.long0,i.x=t.lam,i.y=t.phi,i}function pl(i,t,e,n){var s;return iZt&&s<=V+Zt?(n.value=$t.AREA_1,s-=V):s>V+Zt||s<=-(V+Zt)?(n.value=$t.AREA_2,s=s>=0?s-fe:s+fe):(n.value=$t.AREA_3,s+=V)),s}function kr(i,t){var e=i+t;return e<-fe?e+=pa:e>+fe&&(e-=pa),e}var Xk=["Quadrilateralized Spherical Cube","Quadrilateralized_Spherical_Cube","qsc"];const Zk={init:Bk,forward:Wk,inverse:qk,names:Xk};var ku=[[1,22199e-21,-715515e-10,31103e-10],[.9986,-482243e-9,-24897e-9,-13309e-10],[.9954,-83103e-8,-448605e-10,-986701e-12],[.99,-.00135364,-59661e-9,36777e-10],[.9822,-.00167442,-449547e-11,-572411e-11],[.973,-.00214868,-903571e-10,18736e-12],[.96,-.00305085,-900761e-10,164917e-11],[.9427,-.00382792,-653386e-10,-26154e-10],[.9216,-.00467746,-10457e-8,481243e-11],[.8962,-.00536223,-323831e-10,-543432e-11],[.8679,-.00609363,-113898e-9,332484e-11],[.835,-.00698325,-640253e-10,934959e-12],[.7986,-.00755338,-500009e-10,935324e-12],[.7597,-.00798324,-35971e-9,-227626e-11],[.7186,-.00851367,-701149e-10,-86303e-10],[.6732,-.00986209,-199569e-9,191974e-10],[.6213,-.010418,883923e-10,624051e-11],[.5722,-.00906601,182e-6,624051e-11],[.5322,-.00677797,275608e-9,624051e-11]],Oo=[[-520417e-23,.0124,121431e-23,-845284e-16],[.062,.0124,-126793e-14,422642e-15],[.124,.0124,507171e-14,-160604e-14],[.186,.0123999,-190189e-13,600152e-14],[.248,.0124002,710039e-13,-224e-10],[.31,.0123992,-264997e-12,835986e-13],[.372,.0124029,988983e-12,-311994e-12],[.434,.0123893,-369093e-11,-435621e-12],[.4958,.0123198,-102252e-10,-345523e-12],[.5571,.0121916,-154081e-10,-582288e-12],[.6176,.0119938,-241424e-10,-525327e-12],[.6769,.011713,-320223e-10,-516405e-12],[.7346,.0113541,-397684e-10,-609052e-12],[.7903,.0109107,-489042e-10,-104739e-11],[.8435,.0103431,-64615e-9,-140374e-14],[.8936,.00969686,-64636e-9,-8547e-9],[.9394,.00840947,-192841e-9,-42106e-10],[.9761,.00616527,-256e-6,-42106e-10],[1,.00328947,-319159e-9,-42106e-10]],Z1=.8487,$1=1.3523,V1=rn/5,$k=1/V1,Cr=18,hh=function(i,t){return i[0]+t*(i[1]+t*(i[2]+t*i[3]))},Vk=function(i,t){return i[1]+t*(2*i[2]+t*3*i[3])};function Yk(i,t,e,n){for(var s=t;n;--n){var r=i(s);if(s-=r,Math.abs(r)=Cr&&(n=Cr-1),e=rn*(e-$k*n);var s={x:hh(ku[n],e)*t,y:hh(Oo[n],e)};return i.y<0&&(s.y=-s.y),s.x=s.x*this.a*Z1+this.x0,s.y=s.y*this.a*$1+this.y0,s}function Qk(i){var t={x:(i.x-this.x0)/(this.a*Z1),y:Math.abs(i.y-this.y0)/(this.a*$1)};if(t.y>=1)t.x/=ku[Cr][0],t.y=i.y<0?-V:V;else{var e=Math.floor(t.y*Cr);for(e<0?e=0:e>=Cr&&(e=Cr-1);;)if(Oo[e][0]>t.y)--e;else if(Oo[e+1][0]<=t.y)++e;else break;var n=Oo[e],s=5*(t.y-n[0])/(Oo[e+1][0]-n[0]);s=Yk(function(r){return(hh(n,r)-t.y)/Vk(n,r)},s,J,100),t.x/=hh(ku[e],s),t.y=(5*e+s)*Pe,i.y<0&&(t.y=-t.y)}return t.x=it(t.x+this.long0),t}var Jk=["Robinson","robin"];const t5={init:Hk,forward:Kk,inverse:Qk,names:Jk};function e5(){this.name="geocent"}function i5(i){var t=O1(i,this.es,this.a);return t}function n5(i){var t=F1(i,this.es,this.a,this.b);return t}var s5=["Geocentric","geocentric","geocent","Geocent"];const r5={init:e5,forward:i5,inverse:n5,names:s5};var De={N_POLE:0,S_POLE:1,EQUIT:2,OBLIQ:3},bo={h:{def:1e5,num:!0},azi:{def:0,num:!0,degrees:!0},tilt:{def:0,num:!0,degrees:!0},long0:{def:0,num:!0},lat0:{def:0,num:!0}};function o5(){if(Object.keys(bo).forEach((function(e){if(typeof this[e]>"u")this[e]=bo[e].def;else{if(bo[e].num&&isNaN(this[e]))throw new Error("Invalid parameter value, must be numeric "+e+" = "+this[e]);bo[e].num&&(this[e]=parseFloat(this[e]))}bo[e].degrees&&(this[e]=this[e]*Pe)}).bind(this)),Math.abs(Math.abs(this.lat0)-V)1e10)throw new Error("Invalid height");this.p=1+this.pn1,this.rp=1/this.p,this.h1=1/this.pn1,this.pfact=(this.p+1)*this.h1,this.es=0;var i=this.tilt,t=this.azi;this.cg=Math.cos(t),this.sg=Math.sin(t),this.cw=Math.cos(i),this.sw=Math.sin(i)}function a5(i){i.x-=this.long0;var t=Math.sin(i.y),e=Math.cos(i.y),n=Math.cos(i.x),s,r;switch(this.mode){case De.OBLIQ:r=this.sinph0*t+this.cosph0*e*n;break;case De.EQUIT:r=e*n;break;case De.S_POLE:r=-t;break;case De.N_POLE:r=t;break}switch(r=this.pn1/(this.p-r),s=r*e*Math.sin(i.x),this.mode){case De.OBLIQ:r*=this.cosph0*t-this.sinph0*e*n;break;case De.EQUIT:r*=t;break;case De.N_POLE:r*=-(e*n);break;case De.S_POLE:r*=e*n;break}var o,a;return o=r*this.cg+s*this.sg,a=1/(o*this.sw*this.h1+this.cw),s=(s*this.cg-r*this.sg)*this.cw*a,r=o*a,i.x=s*this.a,i.y=r*this.a,i}function l5(i){i.x/=this.a,i.y/=this.a;var t={x:i.x,y:i.y},e,n,s;s=1/(this.pn1-i.y*this.sw),e=this.pn1*i.x*s,n=this.pn1*i.y*this.cw*s,i.x=e*this.cg+n*this.sg,i.y=n*this.cg-e*this.sg;var r=Mi(i.x,i.y);if(Math.abs(r)1e10)throw new Error;if(this.radius_g=1+this.radius_g_1,this.C=this.radius_g*this.radius_g-1,this.es!==0){var i=1-this.es,t=1/i;this.radius_p=Math.sqrt(i),this.radius_p2=i,this.radius_p_inv2=t,this.shape="ellipse"}else this.radius_p=1,this.radius_p2=1,this.radius_p_inv2=1,this.shape="sphere";this.title||(this.title="Geostationary Satellite View")}function d5(i){var t=i.x,e=i.y,n,s,r,o;if(t=t-this.long0,this.shape==="ellipse"){e=Math.atan(this.radius_p2*Math.tan(e));var a=this.radius_p/Mi(this.radius_p*Math.cos(e),Math.sin(e));if(s=a*Math.cos(t)*Math.cos(e),r=a*Math.sin(t)*Math.cos(e),o=a*Math.sin(e),(this.radius_g-s)*s-r*r-o*o*this.radius_p_inv2<0)return i.x=Number.NaN,i.y=Number.NaN,i;n=this.radius_g-s,this.flip_axis?(i.x=this.radius_g_1*Math.atan(r/Mi(o,n)),i.y=this.radius_g_1*Math.atan(o/n)):(i.x=this.radius_g_1*Math.atan(r/n),i.y=this.radius_g_1*Math.atan(o/Mi(r,n)))}else this.shape==="sphere"&&(n=Math.cos(e),s=Math.cos(t)*n,r=Math.sin(t)*n,o=Math.sin(e),n=this.radius_g-s,this.flip_axis?(i.x=this.radius_g_1*Math.atan(r/Mi(o,n)),i.y=this.radius_g_1*Math.atan(o/n)):(i.x=this.radius_g_1*Math.atan(r/n),i.y=this.radius_g_1*Math.atan(o/Mi(r,n))));return i.x=i.x*this.a,i.y=i.y*this.a,i}function g5(i){var t=-1,e=0,n=0,s,r,o,a;if(i.x=i.x/this.a,i.y=i.y/this.a,this.shape==="ellipse"){this.flip_axis?(n=Math.tan(i.y/this.radius_g_1),e=Math.tan(i.x/this.radius_g_1)*Mi(1,n)):(e=Math.tan(i.x/this.radius_g_1),n=Math.tan(i.y/this.radius_g_1)*Mi(1,e));var l=n/this.radius_p;if(s=e*e+l*l+t*t,r=2*this.radius_g*t,o=r*r-4*s*this.C,o<0)return i.x=Number.NaN,i.y=Number.NaN,i;a=(-r-Math.sqrt(o))/(2*s),t=this.radius_g+a*t,e*=a,n*=a,i.x=Math.atan2(e,t),i.y=Math.atan(n*Math.cos(i.x)/t),i.y=Math.atan(this.radius_p_inv2*Math.tan(i.y))}else if(this.shape==="sphere"){if(this.flip_axis?(n=Math.tan(i.y/this.radius_g_1),e=Math.tan(i.x/this.radius_g_1)*Math.sqrt(1+n*n)):(e=Math.tan(i.x/this.radius_g_1),n=Math.tan(i.y/this.radius_g_1)*Math.sqrt(1+e*e)),s=e*e+n*n+t*t,r=2*this.radius_g*t,o=r*r-4*s*this.C,o<0)return i.x=Number.NaN,i.y=Number.NaN,i;a=(-r-Math.sqrt(o))/(2*s),t=this.radius_g+a*t,e*=a,n*=a,i.x=Math.atan2(e,t),i.y=Math.atan(n*Math.cos(i.x)/t)}return i.x=i.x+this.long0,i}var f5=["Geostationary Satellite View","Geostationary_Satellite","geos"];const p5={init:u5,forward:d5,inverse:g5,names:f5};var qo=1.340264,Xo=-.081106,Zo=893e-6,$o=.003796,ch=Math.sqrt(3)/2;function m5(){this.es=0,this.long0=this.long0!==void 0?this.long0:0}function _5(i){var t=it(i.x-this.long0),e=i.y,n=Math.asin(ch*Math.sin(e)),s=n*n,r=s*s*s;return i.x=t*Math.cos(n)/(ch*(qo+3*Xo*s+r*(7*Zo+9*$o*s))),i.y=n*(qo+Xo*s+r*(Zo+$o*s)),i.x=this.a*i.x+this.x0,i.y=this.a*i.y+this.y0,i}function y5(i){i.x=(i.x-this.x0)/this.a,i.y=(i.y-this.y0)/this.a;var t=1e-9,e=12,n=i.y,s,r,o,a,l,h;for(h=0;h>=1;return e.join("")}const E5='Terms of Use';class S5 extends Ai{constructor(t){const e=t.hidpi!==void 0?t.hidpi:!1;super({cacheSize:t.cacheSize,crossOrigin:"anonymous",interpolate:t.interpolate,opaque:!0,projection:tt("EPSG:3857"),reprojectionErrorThreshold:t.reprojectionErrorThreshold,state:"loading",tileLoadFunction:t.tileLoadFunction,tilePixelRatio:e?2:1,wrapX:t.wrapX!==void 0?t.wrapX:!0,transition:t.transition,zDirection:t.zDirection}),this.hidpi_=e,this.culture_=t.culture!==void 0?t.culture:"en-us",this.maxZoom_=t.maxZoom!==void 0?t.maxZoom:-1,this.apiKey_=t.key,this.imagerySet_=t.imagerySet,this.placeholderTiles_=t.placeholderTiles;const n="https://dev.virtualearth.net/REST/v1/Imagery/Metadata/"+this.imagerySet_+"?uriScheme=https&include=ImageryProviders&key="+this.apiKey_+"&c="+this.culture_;fetch(n).then(s=>s.json()).then(s=>this.handleImageryMetadataResponse(s))}getApiKey(){return this.apiKey_}getImagerySet(){return this.imagerySet_}handleImageryMetadataResponse(t){if(t.statusCode!=200||t.statusDescription!="OK"||t.authenticationResultCode!="ValidCredentials"||t.resourceSets.length!=1||t.resourceSets[0].resources.length!=1){this.setState("error");return}const e=t.resourceSets[0].resources[0],n=this.maxZoom_==-1?e.zoomMax:this.maxZoom_,s=this.getProjection(),r=qn(s),o=this.hidpi_?2:1,a=e.imageWidth==e.imageHeight?e.imageWidth/o:[e.imageWidth/o,e.imageHeight/o],l=Js({extent:r,minZoom:e.zoomMin,maxZoom:n,tileSize:a});this.tileGrid=l;const h=this.culture_,c=this.hidpi_,u=this.placeholderTiles_;if(this.tileUrlFunction=Vr(e.imageUrlSubdomains.map(function(g){const f=[0,0,0],p=e.imageUrl.replace("{subdomain}",g).replace("{culture}",h);return function(_,x,v){if(!_)return;da(_[0],_[1],_[2],f);const w=new URL(p.replace("{quadkey}",b5(f))),E=w.searchParams;return c&&(E.set("dpi","d1"),E.set("device","mobile")),u===!0?E.delete("n"):u===!1&&E.set("n","z"),w.toString()}})),e.imageryProviders){const g=Hs(tt("EPSG:4326"),this.getProjection());this.setAttributions(f=>{const p=[],_=f.viewState,x=this.getTileGrid(),v=x.getZForResolution(_.resolution,this.zDirection),w=x.getTileCoordForCoordAndZ(_.center,v)[0];return e.imageryProviders.map(function(E){let S=!1;const T=E.coverageAreas;for(let R=0,C=T.length;R=P.zoomMin&&w<=P.zoomMax){const N=P.bbox,U=[N[1],N[0],N[3],N[2]],j=Gr(U,g);if(Qt(j,f.extent)){S=!0;break}}}S&&p.push(E.attribution)}),p.push(E5),p})}this.setState("ready")}}const T5=S5;class M5 extends qs{constructor(t){super({attributions:t.attributions,cacheSize:t.cacheSize,crossOrigin:t.crossOrigin,maxZoom:t.maxZoom!==void 0?t.maxZoom:18,minZoom:t.minZoom,projection:t.projection,transition:t.transition,wrapX:t.wrapX,zDirection:t.zDirection}),this.account_=t.account,this.mapId_=t.map||"",this.config_=t.config||{},this.templateCache_={},this.initializeMap_()}getConfig(){return this.config_}updateConfig(t){Object.assign(this.config_,t),this.initializeMap_()}setConfig(t){this.config_=t||{},this.initializeMap_()}initializeMap_(){const t=JSON.stringify(this.config_);if(this.templateCache_[t]){this.applyTemplate_(this.templateCache_[t]);return}let e="https://"+this.account_+".carto.com/api/v1/map";this.mapId_&&(e+="/named/"+this.mapId_);const n=new XMLHttpRequest;n.addEventListener("load",this.handleInitResponse_.bind(this,t)),n.addEventListener("error",this.handleInitError_.bind(this)),n.open("POST",e),n.setRequestHeader("Content-type","application/json"),n.send(JSON.stringify(this.config_))}handleInitResponse_(t,e){const n=e.target;if(!n.status||n.status>=200&&n.status<300){let s;try{s=JSON.parse(n.responseText)}catch{this.setState("error");return}this.applyTemplate_(s),this.templateCache_[t]=s,this.setState("ready")}else this.setState("error")}handleInitError_(t){this.setState("error")}applyTemplate_(t){const e="https://"+t.cdn_url.https+"/"+this.account_+"/api/v1/map/"+t.layergroupid+"/{z}/{x}/{y}.png";this.setUrl(e)}}const R5=M5;class C5 extends jh{constructor(t){super({attributions:t.attributions,wrapX:t.wrapX}),this.resolution=void 0,this.distance=t.distance!==void 0?t.distance:20,this.minDistance=t.minDistance||0,this.interpolationRatio=0,this.features=[],this.geometryFunction=t.geometryFunction||function(e){const n=e.getGeometry();return At(!n||n.getType()==="Point","The default `geometryFunction` can only handle `Point` or null geometries"),n},this.createCustomCluster_=t.createCluster,this.source=null,this.boundRefresh_=this.refresh.bind(this),this.updateDistance(this.distance,this.minDistance),this.setSource(t.source||null)}clear(t){this.features.length=0,super.clear(t)}getDistance(){return this.distance}getSource(){return this.source}loadFeatures(t,e,n){this.source.loadFeatures(t,e,n),e!==this.resolution&&(this.resolution=e,this.refresh())}setDistance(t){this.updateDistance(t,this.minDistance)}setMinDistance(t){this.updateDistance(this.distance,t)}getMinDistance(){return this.minDistance}setSource(t){this.source&&this.source.removeEventListener(Lt.CHANGE,this.boundRefresh_),this.source=t,t&&t.addEventListener(Lt.CHANGE,this.boundRefresh_),this.refresh()}refresh(){this.clear(),this.cluster(),this.addFeatures(this.features)}updateDistance(t,e){const n=t===0?0:Math.min(e,t)/t,s=t!==this.distance||this.interpolationRatio!==n;this.distance=t,this.minDistance=e,this.interpolationRatio=n,s&&this.refresh()}cluster(){if(this.resolution===void 0||!this.source)return;const t=ze(),e=this.distance*this.resolution,n=this.source.getFeatures(),s={};for(let r=0,o=n.length;r=0;--a){const l=this.geometryFunction(t[a]);l?e0(n,l.getCoordinates()):t.splice(a,1)}mv(n,1/t.length);const s=Ce(e),r=this.interpolationRatio,o=new Re([n[0]*(1-r)+s[0]*r,n[1]*(1-r)+s[1]*r]);return this.createCustomCluster_?this.createCustomCluster_(o,t):new Ee({geometry:o,features:t})}}const I5=C5,P5="https://tile.googleapis.com/v1/createSession",A5="https://tile.googleapis.com/v1/2dtiles",L5="https://tile.googleapis.com/tile/v1/viewport",O5=22;class F5 extends Ai{constructor(t){const e=!!t.highDpi,n=t.overlay!==!0;super({attributionsCollapsible:t.attributionsCollapsible,cacheSize:t.cacheSize,crossOrigin:"anonymous",interpolate:t.interpolate,opaque:n,projection:"EPSG:3857",reprojectionErrorThreshold:t.reprojectionErrorThreshold,state:"loading",tileLoadFunction:t.tileLoadFunction,tilePixelRatio:e?2:1,wrapX:t.wrapX!==void 0?t.wrapX:!0,transition:t.transition,zDirection:t.zDirection}),this.apiKey_=t.key,this.error_=null;const s={mapType:t.mapType||"roadmap",language:t.language||"en-US",region:t.region||"US"};t.imageFormat&&(s.imageFormat=t.imageFormat),t.scale&&(s.scale=t.scale),e&&(s.highDpi=!0),t.layerTypes&&(s.layerTypes=t.layerTypes),t.styles&&(s.styles=t.styles),t.overlay===!0&&(s.overlay=!0),this.sessionTokenRequest_=s,this.sessionTokenValue_,this.sessionRefreshId_,this.previousViewportAttribution_,this.previousViewportExtent_,this.createSession_()}getError(){return this.error_}fetchSessionToken(t,e){return fetch(t,e)}async createSession_(){const t=P5+"?key="+this.apiKey_,e={method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(this.sessionTokenRequest_)},n=await this.fetchSessionToken(t,e);if(!n.ok){try{const u=await n.json();this.error_=new Error(u.error.message)}catch{this.error_=new Error("Error fetching session token")}this.setState("error");return}const s=await n.json(),r=this.getTilePixelRatio(1),o=[s.tileWidth/r,s.tileHeight/r];this.tileGrid=Js({extent:qn(this.getProjection()),maxZoom:O5,tileSize:o});const a=s.session;this.sessionTokenValue_=a;const l=this.apiKey_;this.tileUrlFunction=function(u,g,f){const p=u[0],_=u[1],x=u[2];return`${A5}/${p}/${_}/${x}?session=${a}&key=${l}`};const h=parseInt(s.expiry,10)*1e3,c=Math.max(h-Date.now()-60*1e3,1);this.sessionRefreshId_=setTimeout(()=>this.createSession_(),c),this.setAttributions(this.fetchAttributions_.bind(this)),this.setState("ready")}async fetchAttributions_(t){if(t.viewHints[ee.ANIMATING]||t.viewHints[ee.INTERACTING]||t.animate)return this.previousViewportAttribution_;const[e,n]=bf(ba(t.extent),t.viewState.projection),[s,r]=bf(Ea(t.extent),t.viewState.projection),o=`zoom=${this.getTileGrid().getZForResolution(t.viewState.resolution,this.zDirection)}&north=${r}&south=${n}&east=${s}&west=${e}`;if(this.previousViewportExtent_==o)return this.previousViewportAttribution_;this.previousViewportExtent_=o;const a=this.sessionTokenValue_,l=this.apiKey_,h=`${L5}?session=${a}&key=${l}&${o}`;return this.previousViewportAttribution_=await fetch(h).then(c=>c.json()).then(c=>c.copyright),this.previousViewportAttribution_}disposeInternal(){clearTimeout(this.sessionRefreshId_),super.disposeInternal()}}const N5=F5;let Y1=class extends Da{constructor(i,t,e,n,s,r,o){super(t,e,n,s,r,o),this.zoomifyImage_=null,this.tileSize_=i}getImage(){if(this.zoomifyImage_)return this.zoomifyImage_;const i=super.getImage();if(this.state==q.LOADED){const t=this.tileSize_;if(i.width==t[0]&&i.height==t[1])return this.zoomifyImage_=i,i;const e=Jt(t[0],t[1]);return e.drawImage(i,0,0),this.zoomifyImage_=e.canvas,e.canvas}return i}};class k5 extends Ai{constructor(t){const e=t.size,n=t.tierSizeCalculation!==void 0?t.tierSizeCalculation:"default",s=t.tilePixelRatio||1,r=e[0],o=e[1],a=[],l=t.tileSize||qr;let h=l*s;switch(n){case"default":for(;r>h||o>h;)a.push([Math.ceil(r/h),Math.ceil(o/h)]),h+=h;break;case"truncated":let R=r,C=o;for(;R>h||C>h;)a.push([Math.ceil(R/h),Math.ceil(C/h)]),R>>=1,C>>=1;break;default:throw new Error("Unknown `tierSizeCalculation` configured")}a.push([1,1]),a.reverse();const c=[s],u=[0];for(let R=1,C=a.length;R{_=l,this.changed()}),T.src=S}}const D5=k5;function Eo(i){return i.toLocaleString("en",{maximumFractionDigits:10})}class G5 extends Ai{constructor(t){const e=t||{};let n=e.url||"";n=n+(n.lastIndexOf("/")===n.length-1||n===""?"":"/");const s=e.version||_e.VERSION2,r=e.sizes||[],o=e.size;At(o!=null&&Array.isArray(o)&&o.length==2&&!isNaN(o[0])&&o[0]>0&&!isNaN(o[1])&&o[1]>0,"Missing or invalid `size`");const a=o[0],l=o[1],h=e.tileSize,c=e.tilePixelRatio||1,u=e.format||"jpg",g=e.quality||(e.version==_e.VERSION1?"native":"default");let f=e.resolutions||[];const p=e.supports||[],_=e.extent||[0,-l,a,0],x=r!=null&&Array.isArray(r)&&r.length>0,v=h!==void 0&&(typeof h=="number"&&Number.isInteger(h)&&h>0||Array.isArray(h)&&h.length>0),w=p!=null&&Array.isArray(p)&&(p.includes("regionByPx")||p.includes("regionByPct"))&&(p.includes("sizeByWh")||p.includes("sizeByH")||p.includes("sizeByW")||p.includes("sizeByPct"));let E,S,T;if(f.sort(function(N,U){return U-N}),v||w)if(h!=null&&(typeof h=="number"&&Number.isInteger(h)&&h>0?(E=h,S=h):Array.isArray(h)&&h.length>0&&((h.length==1||h[1]==null&&Number.isInteger(h[0]))&&(E=h[0],S=h[0]),h.length==2&&(Number.isInteger(h[0])&&Number.isInteger(h[1])?(E=h[0],S=h[1]):h[0]==null&&Number.isInteger(h[1])&&(E=h[1],S=h[1])))),(E===void 0||S===void 0)&&(E=qr,S=qr),f.length==0){T=Math.max(Math.ceil(Math.log(a/E)/Math.LN2),Math.ceil(Math.log(l/S)/Math.LN2));for(let N=T;N>=0;N--)f.push(Math.pow(2,N))}else{const N=Math.max(...f);T=Math.round(Math.log(N)/Math.LN2)}else if(E=a,S=l,f=[],x){r.sort(function(U,j){return U[0]-j[0]}),T=-1;const N=[];for(let U=0;U0&&f[f.length-1]==j){N.push(U);continue}f.push(j),T++}if(N.length>0)for(let U=0;UT)return;const y=N[1],b=N[2],M=f[m];if(!(y===void 0||b===void 0||M===void 0||y<0||Math.ceil(a/M/E)<=y||b<0||Math.ceil(l/M/S)<=b)){if(w||v){const I=y*E*M,A=b*S*M;let L=E*M,k=S*M,W=E,K=S;if(I+L>a&&(L=a-I),A+k>l&&(k=l-A),I+E*M>a&&(W=Math.floor((a-I+M-1)/M)),A+S*M>l&&(K=Math.floor((l-A+M-1)/M)),I==0&&L==a&&A==0&&k==l)B="full";else if(!w||p.includes("regionByPx"))B=I+","+A+","+L+","+k;else if(p.includes("regionByPct")){const G=Eo(I/a*100),H=Eo(A/l*100),Q=Eo(L/a*100),nt=Eo(k/l*100);B="pct:"+G+","+H+","+Q+","+nt}s==_e.VERSION3&&(!w||p.includes("sizeByWh"))?d=W+","+K:!w||p.includes("sizeByW")?d=W+",":p.includes("sizeByH")?d=","+K:p.includes("sizeByWh")?d=W+","+K:p.includes("sizeByPct")&&(d="pct:"+Eo(100/M))}else if(B="full",x){const I=r[m][0],A=r[m][1];s==_e.VERSION3?I==a&&A==l?d="max":d=I+","+A:I==a?d="full":d=I+","}else d=s==_e.VERSION3?"max":"full";return n+B+"/"+d+"/0/"+g+"."+u}},P=Y1.bind(null,se(h||256).map(function(N){return N*c}));super({attributions:e.attributions,attributionsCollapsible:e.attributionsCollapsible,cacheSize:e.cacheSize,crossOrigin:e.crossOrigin,interpolate:e.interpolate,projection:e.projection,reprojectionErrorThreshold:e.reprojectionErrorThreshold,state:e.state,tileClass:P,tileGrid:R,tilePixelRatio:e.tilePixelRatio,tileUrlFunction:C,transition:e.transition}),this.zDirection=e.zDirection}}const j5=G5;function H1(i,t,e,n,s,r){const o=s.getCode().split(/:(?=\d+$)/).pop(),a=e/n,l=[Rl(yt(t)/a,sn),Rl(Vt(t)/a,sn)];r.SIZE=l[0]+","+l[1],r.BBOX=t.join(","),r.BBOXSR=o,r.IMAGESR=o,r.DPI=Math.round(r.DPI?r.DPI*n:90*n);const h=i.replace(/MapServer\/?$/,"MapServer/export").replace(/ImageServer\/?$/,"ImageServer/exportImage");return Gn(h,r)}function K1(i){const t=i.load?i.load:_s,e=tt(i.projection||"EPSG:3857");return function(n,s,r){r=i.hidpi?r:1;const o={F:"image",FORMAT:"PNG32",TRANSPARENT:!0};Object.assign(o,i.params),n=Hh(n,s,r,i.ratio);const a=H1(i.url,n,s,r,e,o),l=new Image;return i.crossOrigin!==null&&(l.crossOrigin=i.crossOrigin),t(l,a).then(h=>{const c=yt(n)/h.width*r;return{image:h,extent:n,resolution:c,pixelRatio:r}})}}class z5 extends vs{constructor(t){t=t||{},super({attributions:t.attributions,interpolate:t.interpolate,projection:t.projection,resolutions:t.resolutions}),this.crossOrigin_=t.crossOrigin!==void 0?t.crossOrigin:null,this.hidpi_=t.hidpi!==void 0?t.hidpi:!0,this.url_=t.url,this.imageLoadFunction_=t.imageLoadFunction!==void 0?t.imageLoadFunction:Yh,this.params_=Object.assign({},t.params),this.imageSize_=[0,0],this.renderedRevision_=0,this.ratio_=t.ratio!==void 0?t.ratio:1.5,this.loaderProjection_=null}getParams(){return this.params_}getImageInternal(t,e,n,s){return this.url_===void 0?null:((!this.loader||this.loaderProjection_!==s)&&(this.loaderProjection_=s,this.loader=K1({crossOrigin:this.crossOrigin_,params:this.params_,projection:s,hidpi:this.hidpi_,url:this.url_,ratio:this.ratio_,load:(r,o)=>(this.image.setImage(r),this.imageLoadFunction_(this.image,o),_s(r))})),super.getImageInternal(t,e,n,s))}getImageLoadFunction(){return this.imageLoadFunction_}getUrl(){return this.url_}setImageLoadFunction(t){this.imageLoadFunction_=t,this.changed()}setUrl(t){t!=this.url_&&(this.url_=t,this.loader=null,this.changed())}updateParams(t){Object.assign(this.params_,t),this.changed()}changed(){this.image=null,super.changed()}}const U5=z5;class B5 extends vs{constructor(t){t=t||{},super({attributions:t.attributions,interpolate:t.interpolate,projection:t.projection,resolutions:t.resolutions,state:t.state}),this.canvasFunction_=t.canvasFunction,this.canvas_=null,this.renderedRevision_=0,this.ratio_=t.ratio!==void 0?t.ratio:1.5}getImageInternal(t,e,n,s){e=this.findNearestResolution(e);let r=this.canvas_;if(r&&this.renderedRevision_==this.getRevision()&&r.getResolution()==e&&r.getPixelRatio()==n&&Ze(r.getExtent(),t))return r;t=t.slice(),Qm(t,this.ratio_);const o=yt(t)/e,a=Vt(t)/e,l=[o*n,a*n],h=this.canvasFunction_.call(this,t,e,n,l,s);return h&&(r=new ag(t,e,n,h)),this.canvas_=r,this.renderedRevision_=this.getRevision(),r}}const W5=B5;function q5(i,t,e,n){const s=yt(i),r=Vt(i),o=t[0],a=t[1],l=.0254/n;return a*s>o*r?s*e/(o*l):r*e/(a*l)}function X5(i,t,e,n,s,r,o){const a=q5(e,n,r,o),l=Ce(e),h={OPERATION:s?"GETDYNAMICMAPOVERLAYIMAGE":"GETMAPIMAGE",VERSION:"2.0.0",LOCALE:"en",CLIENTAGENT:"ol/source/ImageMapGuide source",CLIP:"1",SETDISPLAYDPI:o,SETDISPLAYWIDTH:Math.round(n[0]),SETDISPLAYHEIGHT:Math.round(n[1]),SETVIEWSCALE:a,SETVIEWCENTERX:l[0],SETVIEWCENTERY:l[1]};return Object.assign(h,t),Gn(i,h)}function Q1(i){const t=i.load||_s;return function(e,n,s){const r=new Image;i.crossOrigin!==null&&(r.crossOrigin=i.crossOrigin),e=Hh(e,n,s,i.ratio);const o=yt(e)/n,a=Vt(e)/n,l=[o*s,a*s],h=X5(i.url,i.params,e,l,i.useOverlay,i.metersPerUnit||1,i.displayDpi||96);return t(r,h).then(c=>({image:c,extent:e,pixelRatio:s}))}}class Z5 extends vs{constructor(t){super({interpolate:t.interpolate,projection:t.projection,resolutions:t.resolutions}),this.crossOrigin_=t.crossOrigin!==void 0?t.crossOrigin:null,this.displayDpi_=t.displayDpi!==void 0?t.displayDpi:96,this.params_=Object.assign({},t.params),this.url_=t.url,this.imageLoadFunction_=t.imageLoadFunction!==void 0?t.imageLoadFunction:Yh,this.hidpi_=t.hidpi!==void 0?t.hidpi:!0,this.metersPerUnit_=t.metersPerUnit!==void 0?t.metersPerUnit:1,this.ratio_=t.ratio!==void 0?t.ratio:1,this.useOverlay_=t.useOverlay!==void 0?t.useOverlay:!1,this.renderedRevision_=0,this.loaderProjection_=null}getParams(){return this.params_}getImageInternal(t,e,n,s){return this.url_===void 0?null:((!this.loader||this.loaderProjection_!==s)&&(this.loaderProjection_=s,this.loader=Q1({crossOrigin:this.crossOrigin_,params:this.params_,hidpi:this.hidpi_,metersPerUnit:this.metersPerUnit_,url:this.url_,useOverlay:this.useOverlay_,ratio:this.ratio_,load:(r,o)=>(this.image.setImage(r),this.imageLoadFunction_(this.image,o),_s(r))})),super.getImageInternal(t,e,n,s))}getImageLoadFunction(){return this.imageLoadFunction_}updateParams(t){Object.assign(this.params_,t),this.changed()}setImageLoadFunction(t){this.imageLoadFunction_=t,this.changed()}changed(){this.image=null,super.changed()}}const $5=Z5;class V5 extends vs{constructor(t){t=t||{},super({attributions:t.attributions,interpolate:t.interpolate,projection:t.projection,resolutions:t.resolutions}),this.crossOrigin_=t.crossOrigin!==void 0?t.crossOrigin:null,this.url_=t.url,this.imageLoadFunction_=t.imageLoadFunction!==void 0?t.imageLoadFunction:Yh,this.params_=Object.assign({},t.params),this.serverType_=t.serverType,this.hidpi_=t.hidpi!==void 0?t.hidpi:!0,this.renderedRevision_=0,this.ratio_=t.ratio!==void 0?t.ratio:1.5,this.loaderProjection_=null}getFeatureInfoUrl(t,e,n,s){const r=tt(n),o=this.getProjection();o&&o!==r&&(e=ua(o,r,t,e),t=_h(t,r,o));const a={url:this.url_,params:{...this.params_,...s},projection:o||r};return aO(a,t,e)}getLegendUrl(t,e){return lO({url:this.url_,params:{...this.params_,...e}},t)}getParams(){return this.params_}getImageInternal(t,e,n,s){return this.url_===void 0?null:((!this.loader||this.loaderProjection_!==s)&&(this.loaderProjection_=s,this.loader=s1({crossOrigin:this.crossOrigin_,params:this.params_,projection:s,serverType:this.serverType_,hidpi:this.hidpi_,url:this.url_,ratio:this.ratio_,load:(r,o)=>(this.image.setImage(r),this.imageLoadFunction_(this.image,o),_s(r))})),super.getImageInternal(t,e,n,s))}getImageLoadFunction(){return this.imageLoadFunction_}getUrl(){return this.url_}setImageLoadFunction(t){this.imageLoadFunction_=t,this.changed()}setUrl(t){t!=this.url_&&(this.url_=t,this.loader=null,this.changed())}updateParams(t){Object.assign(this.params_,t),this.changed()}changed(){this.image=null,super.changed()}}const Y5=V5,H5={"image/png":!0,"image/jpeg":!0,"image/gif":!0,"image/webp":!0},K5={"application/vnd.mapbox-vector-tile":!0,"application/geo+json":!0};function Q5(i,t){let e,n;for(let s=0;sT.replace(/E|X|Lon/i,"e").replace(/N|Y|Lat/i,"n")).join(""):s.getAxisOrientation().substr(0,2))!=="en",a=t.tileMatrices,l={};for(let T=0;Td.maxTileCol||j.tileRowd.maxTileRow)return}Object.assign(j,w);const B=e.replace(/\{(\w+?)\}/g,function(d,m){return j[m]});return t1(E,B)}return{grid:v,urlTemplate:e,urlFunction:S}}function tD(i,t){const e=t.tileMatrixSetLimits;let n;if(t.dataType==="map")n=Q5(t.links,i.mediaType);else if(t.dataType==="vector")n=J5(t.links,i.mediaType,i.supportedMediaTypes);else throw new Error('Expected tileset data type to be "map" or "vector"');if(t.tileMatrixSet)return Dm(i,t.tileMatrixSet,n,e);const s=t.links.find(a=>a.rel==="http://www.opengis.net/def/rel/ogc/1.0/tiling-scheme");if(!s)throw new Error("Expected http://www.opengis.net/def/rel/ogc/1.0/tiling-scheme link or tileMatrixSet");const r=s.href,o=t1(i.url,r);return Jy(o).then(function(a){return Dm(i,a,n,e)})}function J1(i){return Jy(i.url).then(function(t){return tD(i,t)})}class eD extends Ai{constructor(t){super({attributions:t.attributions,cacheSize:t.cacheSize,crossOrigin:t.crossOrigin,interpolate:t.interpolate,projection:t.projection,reprojectionErrorThreshold:t.reprojectionErrorThreshold,state:"loading",tileLoadFunction:t.tileLoadFunction,wrapX:t.wrapX!==void 0?t.wrapX:!0,transition:t.transition});const e={url:t.url,projection:this.getProjection(),mediaType:t.mediaType,context:t.context||null};J1(e).then(this.handleTileSetInfo_.bind(this)).catch(this.handleError_.bind(this))}handleTileSetInfo_(t){this.tileGrid=t.grid,this.setTileUrlFunction(t.urlFunction,t.urlTemplate),this.setState("ready")}handleError_(t){Il(t),this.setState("error")}}const iD=eD;class nD extends Kh{constructor(t){super({attributions:t.attributions,attributionsCollapsible:t.attributionsCollapsible,cacheSize:t.cacheSize,format:t.format,overlaps:t.overlaps,projection:t.projection,tileClass:t.tileClass,transition:t.transition,wrapX:t.wrapX,zDirection:t.zDirection,state:"loading"});const e={url:t.url,projection:this.getProjection(),mediaType:t.mediaType,supportedMediaTypes:t.format.supportedMediaTypes,context:t.context||null};J1(e).then(this.handleTileSetInfo_.bind(this)).catch(this.handleError_.bind(this))}handleTileSetInfo_(t){this.tileGrid=t.grid,this.setTileUrlFunction(t.urlFunction,t.urlTemplate),this.setState("ready")}handleError_(t){Il(t),this.setState("error")}}const sD=nD,tx='© OpenStreetMap contributors.';class rD extends qs{constructor(t){t=t||{};let e;t.attributions!==void 0?e=t.attributions:e=[tx];const n=t.crossOrigin!==void 0?t.crossOrigin:"anonymous",s=t.url!==void 0?t.url:"https://tile.openstreetmap.org/{z}/{x}/{y}.png";super({attributions:e,attributionsCollapsible:!1,cacheSize:t.cacheSize,crossOrigin:n,interpolate:t.interpolate,maxZoom:t.maxZoom!==void 0?t.maxZoom:19,opaque:t.opaque!==void 0?t.opaque:!0,reprojectionErrorThreshold:t.reprojectionErrorThreshold,tileLoadFunction:t.tileLoadFunction,transition:t.transition,url:s,wrapX:t.wrapX,zDirection:t.zDirection})}}const oD=rD,Gm=1/0;class aD{constructor(t,e){this.priorityFunction_=t,this.keyFunction_=e,this.elements_=[],this.priorities_=[],this.queuedElements_={}}clear(){this.elements_.length=0,this.priorities_.length=0,Kr(this.queuedElements_)}dequeue(){const t=this.elements_,e=this.priorities_,n=t[0];t.length==1?(t.length=0,e.length=0):(t[0]=t.pop(),e[0]=e.pop(),this.siftUp_(0));const s=this.keyFunction_(n);return delete this.queuedElements_[s],n}enqueue(t){At(!(this.keyFunction_(t)in this.queuedElements_),"Tried to enqueue an `element` that was already added to the queue");const e=this.priorityFunction_(t);return e!=Gm?(this.elements_.push(t),this.priorities_.push(e),this.queuedElements_[this.keyFunction_(t)]=!0,this.siftDown_(0,this.elements_.length-1),!0):!1}getCount(){return this.elements_.length}getLeftChildIndex_(t){return t*2+1}getRightChildIndex_(t){return t*2+2}getParentIndex_(t){return t-1>>1}heapify_(){let t;for(t=(this.elements_.length>>1)-1;t>=0;t--)this.siftUp_(t)}isEmpty(){return this.elements_.length===0}isKeyQueued(t){return t in this.queuedElements_}isQueued(t){return this.isKeyQueued(this.keyFunction_(t))}siftUp_(t){const e=this.elements_,n=this.priorities_,s=e.length,r=e[t],o=n[t],a=t;for(;t>1;){const l=this.getLeftChildIndex_(t),h=this.getRightChildIndex_(t),c=ht;){const a=this.getParentIndex_(e);if(s[a]>o)n[e]=n[a],s[e]=s[a],e=a;else break}n[e]=r,s[e]=o}reprioritize(){const t=this.priorityFunction_,e=this.elements_,n=this.priorities_;let s=0;const r=e.length;let o,a,l;for(a=0;a0;)r=this.dequeue()[0],o=r.getKey(),s=r.getState(),s===q.IDLE&&!(o in this.tilesLoadingKeys_)&&(this.tilesLoadingKeys_[o]=!0,++this.tilesLoading_,++n,r.load())}}let ex=!0;try{new ImageData(10,10)}catch{ex=!1}let Zc;function hD(i,t,e){if(ex)return new ImageData(i,t,e);Zc||(Zc=document.createElement("canvas").getContext("2d"));const n=Zc.createImageData(t,e);return n.data.set(i),n}function ix(i){let t=!0;try{new ImageData(10,10)}catch{t=!1}function e(n,s,r){return t?new ImageData(n,s,r):{data:n,width:s,height:r}}return function(n){const s=n.buffers,r=n.meta,o=n.imageOps,a=n.width,l=n.height,h=s.length,c=s[0].byteLength;if(o){const p=new Array(h);for(let _=0;_"u"?"data:text/javascript;base64,"+Buffer.from(e.join(` -`),"binary").toString("base64"):URL.createObjectURL(new Blob(e,{type:"text/javascript"})));return n.addEventListener("message",t),n}function uD(i,t){const e=ix(i.operation);let n=!1;return{postMessage:function(s){setTimeout(function(){n||t({data:{buffer:e(s),meta:s.meta}})},0)},terminate:function(){n=!0}}}class dD extends Uu{constructor(t){super(),this._imageOps=!!t.imageOps;let e;t.threads===0?e=0:this._imageOps?e=1:e=t.threads||1;const n=new Array(e);if(e)for(let s=0;sthis._maxQueueLength;)this._queue.shift().callback(null,null)}_dispatch(){if(this._running||this._queue.length===0)return;const t=this._queue.shift();this._job=t;const e=t.inputs[0].width,n=t.inputs[0].height,s=t.inputs.map(function(l){return l.data.buffer}),r=this._workers.length;if(this._running=r,r===1){this._workers[0].postMessage({buffers:s,meta:t.meta,imageOps:this._imageOps,width:e,height:n},s);return}const o=t.inputs[0].data.length,a=4*Math.ceil(o/4/r);for(let l=0;lStadia Maps',xD='© OpenMapTiles',vD='© Stamen Design',wD={stamen_terrain:{extension:"png",opaque:!0},stamen_terrain_background:{extension:"png",opaque:!0},stamen_terrain_labels:{extension:"png",opaque:!1},stamen_terrain_lines:{extension:"png",opaque:!1},stamen_toner_background:{extension:"png",opaque:!0},stamen_toner:{extension:"png",opaque:!0},stamen_toner_labels:{extension:"png",opaque:!1},stamen_toner_lines:{extension:"png",opaque:!1},stamen_toner_lite:{extension:"png",opaque:!0},stamen_watercolor:{extension:"jpg",opaque:!0},alidade_smooth:{extension:"png",opaque:!0},alidade_smooth_dark:{extension:"png",opaque:!0},alidade_satellite:{extension:"png",opaque:!0},outdoors:{extension:"png",opaque:!0},osm_bright:{extension:"png",opaque:!0}},bD={stamen_terrain:{minZoom:0,maxZoom:18,retina:!0},stamen_toner:{minZoom:0,maxZoom:20,retina:!0},stamen_watercolor:{minZoom:1,maxZoom:18,retina:!1}};class ED extends qs{constructor(t){const e=t.layer.indexOf("-"),n=e==-1?t.layer:t.layer.slice(0,e),s=bD[n]||{minZoom:0,maxZoom:20,retina:!0},r=wD[t.layer],o=t.apiKey?"?api_key="+t.apiKey:"",a=s.retina&&t.retina?"@2x":"",l=t.url!==void 0?t.url:"https://tiles.stadiamaps.com/tiles/"+t.layer+"/{z}/{x}/{y}"+a+"."+r.extension+o,h=[yD,xD,tx];t.layer.startsWith("stamen_")&&h.splice(1,0,vD),super({attributions:h,cacheSize:t.cacheSize,crossOrigin:"anonymous",interpolate:t.interpolate,maxZoom:t.maxZoom!==void 0?t.maxZoom:s.maxZoom,minZoom:t.minZoom!==void 0?t.minZoom:s.minZoom,opaque:r.opaque,reprojectionErrorThreshold:t.reprojectionErrorThreshold,tileLoadFunction:t.tileLoadFunction,transition:t.transition,url:l,tilePixelRatio:a?2:1,wrapX:t.wrapX,zDirection:t.zDirection})}}const SD=ED;class TD extends Ai{constructor(t){t=t||{},super({attributions:t.attributions,cacheSize:t.cacheSize,crossOrigin:t.crossOrigin,interpolate:t.interpolate,projection:t.projection,reprojectionErrorThreshold:t.reprojectionErrorThreshold,tileGrid:t.tileGrid,tileLoadFunction:t.tileLoadFunction,url:t.url,urls:t.urls,wrapX:t.wrapX!==void 0?t.wrapX:!0,transition:t.transition,zDirection:t.zDirection}),this.params_=Object.assign({},t.params),this.hidpi_=t.hidpi!==void 0?t.hidpi:!0,this.tmpExtent_=ze(),this.setKey(this.getKeyForParams_())}getKeyForParams_(){let t=0;const e=[];for(const n in this.params_)e[t++]=n+"-"+this.params_[n];return e.join("/")}getParams(){return this.params_}getRequestUrl_(t,e,n,s,r,o){const a=this.urls;if(!a)return;let l;if(a.length==1)l=a[0];else{const h=an(ig(t),a.length);l=a[h]}return H1(l,n,(this.tileGrid||this.getTileGridForProjection(r)).getResolution(t[0]),s,r,o)}getTilePixelRatio(t){return this.hidpi_?t:1}updateParams(t){Object.assign(this.params_,t),this.setKey(this.getKeyForParams_())}tileUrlFunction(t,e,n){let s=this.getTileGrid();if(s||(s=this.getTileGridForProjection(n)),s.getResolutions().length<=t[0])return;e!=1&&!this.hidpi_&&(e=1);const r=s.getTileCoordExtent(t,this.tmpExtent_);let o=se(s.getTileSize(t[0]),this.tmpSize);e!=1&&(o=L0(o,e,this.tmpSize));const a={F:"image",FORMAT:"PNG32",TRANSPARENT:!0};return Object.assign(a,this.params_),this.getRequestUrl_(t,o,r,e,n,a)}}const MD=TD;class RD extends qs{constructor(t){t=t||{},super({opaque:!1,projection:t.projection,tileGrid:t.tileGrid,wrapX:t.wrapX!==void 0?t.wrapX:!0,zDirection:t.zDirection,url:t.template||"z:{z} x:{x} y:{y}",tileLoadFunction:(e,n)=>{const s=e.getTileCoord()[0],r=se(this.tileGrid.getTileSize(s)),o=Jt(r[0],r[1]);o.strokeStyle="grey",o.strokeRect(.5,.5,r[0]+.5,r[1]+.5),o.fillStyle="grey",o.strokeStyle="white",o.textAlign="center",o.textBaseline="middle",o.font="24px sans-serif",o.lineWidth=4,o.strokeText(n,r[0]/2,r[1]/2,r[0]),o.fillText(n,r[0]/2,r[1]/2,r[0]),e.setImage(o.canvas)}})}}const CD=RD;class ID extends ao{constructor(t,e,n,s,r,o){super(t,e),this.src_=n,this.extent_=s,this.preemptive_=r,this.grid_=null,this.keys_=null,this.data_=null,this.jsonp_=o}getImage(){return null}getData(t){if(!this.grid_||!this.keys_)return null;const e=(t[0]-this.extent_[0])/(this.extent_[2]-this.extent_[0]),n=(t[1]-this.extent_[1])/(this.extent_[3]-this.extent_[1]),s=this.grid_[Math.floor((1-n)*this.grid_.length)];if(typeof s!="string")return null;let r=s.charCodeAt(Math.floor(e*s.length));r>=93&&r--,r>=35&&r--,r-=32;let o=null;if(r in this.keys_){const a=this.keys_[r];this.data_&&a in this.data_?o=this.data_[a]:o=a}return o}forDataAtCoordinate(t,e,n){this.state==q.EMPTY&&n===!0?(this.state=q.IDLE,Ho(this,Lt.CHANGE,function(s){e(this.getData(t))},this),this.loadInternal_()):n===!0?setTimeout(()=>{e(this.getData(t))},0):e(this.getData(t))}getKey(){return this.src_}handleError_(){this.state=q.ERROR,this.changed()}handleLoad_(t){this.grid_=t.grid,this.keys_=t.keys,this.data_=t.data,this.state=q.LOADED,this.changed()}loadInternal_(){if(this.state==q.IDLE)if(this.state=q.LOADING,this.jsonp_)kg(this.src_,this.handleLoad_.bind(this),this.handleError_.bind(this));else{const t=new XMLHttpRequest;t.addEventListener("load",this.onXHRLoad_.bind(this)),t.addEventListener("error",this.onXHRError_.bind(this)),t.open("GET",this.src_),t.send()}}onXHRLoad_(t){const e=t.target;if(!e.status||e.status>=200&&e.status<300){let n;try{n=JSON.parse(e.responseText)}catch{this.handleError_();return}this.handleLoad_(n)}else this.handleError_()}onXHRError_(t){this.handleError_()}load(){this.preemptive_?this.loadInternal_():this.setState(q.EMPTY)}}class PD extends ja{constructor(t){if(super({projection:tt("EPSG:3857"),state:"loading",wrapX:t.wrapX!==void 0?t.wrapX:!0,zDirection:t.zDirection}),this.preemptive_=t.preemptive!==void 0?t.preemptive:!0,this.tileUrlFunction_=tO,this.template_=void 0,this.jsonp_=t.jsonp||!1,t.url)if(this.jsonp_)kg(t.url,this.handleTileJSONResponse.bind(this),this.handleTileJSONError.bind(this));else{const e=new XMLHttpRequest;e.addEventListener("load",this.onXHRLoad_.bind(this)),e.addEventListener("error",this.onXHRError_.bind(this)),e.open("GET",t.url),e.send()}else if(t.tileJSON)this.handleTileJSONResponse(t.tileJSON);else throw new Error("Either `url` or `tileJSON` options must be provided")}onXHRLoad_(t){const e=t.target;if(!e.status||e.status>=200&&e.status<300){let n;try{n=JSON.parse(e.responseText)}catch{this.handleTileJSONError();return}this.handleTileJSONResponse(n)}else this.handleTileJSONError()}onXHRError_(t){this.handleTileJSONError()}getTemplate(){return this.template_}forDataAtCoordinateAndResolution(t,e,n,s){if(this.tileGrid){const r=this.tileGrid.getZForResolution(e,this.zDirection),o=this.tileGrid.getTileCoordForCoordAndZ(t,r);this.getTile(o[0],o[1],o[2],1,this.getProjection()).forDataAtCoordinate(t,n,s)}else s===!0?setTimeout(function(){n(null)},0):n(null)}handleTileJSONError(){this.setState("error")}handleTileJSONResponse(t){const e=tt("EPSG:4326"),n=this.getProjection();let s;if(t.bounds!==void 0){const c=Hs(e,n);s=Gr(t.bounds,c)}const r=qn(n),o=t.minzoom||0,a=t.maxzoom||22,l=Js({extent:r,maxZoom:a,minZoom:o});this.tileGrid=l,this.template_=t.template;const h=t.grids;if(!h){this.setState("error");return}if(this.tileUrlFunction_=Lg(h,l),t.attribution){const c=s!==void 0?s:r;this.setAttributions(function(u){return Qt(c,u.extent)?[t.attribution]:null})}this.setState("ready")}getTile(t,e,n,s,r){const o=un(t,e,n);if(this.tileCache.containsKey(o))return this.tileCache.get(o);const a=[t,e,n],l=this.getTileCoordForTileUrlFunction(a,r),h=this.tileUrlFunction_(l,s,r),c=new ID(a,h!==void 0?q.IDLE:q.EMPTY,h!==void 0?h:"",this.tileGrid.getTileCoordExtent(a),this.preemptive_,this.jsonp_);return this.tileCache.set(o,c),c}useTile(t,e,n){const s=un(t,e,n);this.tileCache.containsKey(s)&&this.tileCache.get(s)}}const AD=PD;function LD(i,t){const e=new eg(32),n=i.getExtent();return function(s,r){e.expireCache(),n&&(s=we(n,s));const o=i.getZForResolution(r),a=[];return i.forEachTileCoord(s,o,l=>{const h=l.toString();if(!e.containsKey(h)){const c=t(l);e.set(h,c)}a.push(e.get(h))}),a}}const OD=Object.freeze(Object.defineProperty({__proto__:null,BingMaps:T5,CartoDB:R5,Cluster:I5,DataTile:fg,GeoTIFF:Ag,Google:N5,IIIF:j5,Image:vs,ImageArcGISRest:U5,ImageCanvas:W5,ImageMapGuide:$5,ImageStatic:Qy,ImageWMS:Y5,OGCMapTile:iD,OGCVectorTile:sD,OSM:oD,Raster:_D,Source:oo,StadiaMaps:SD,Tile:ja,TileArcGISRest:MD,TileDebug:CD,TileImage:Ai,TileJSON:e1,TileWMS:r1,UTFGrid:AD,UrlTile:Ng,Vector:jh,VectorTile:Kh,WMTS:o1,XYZ:qs,Zoomify:D5,createArcGISRestLoader:K1,createMapGuideLoader:Q1,createStaticLoader:Ky,createWMSLoader:s1,sourcesFromTileGrid:LD},Symbol.toStringTag,{value:"Module"}));class FD extends Ai{constructor(t){super({attributions:t.attributions,cacheSize:t.cacheSize,opaque:t.opaque,tilePixelRatio:t.tilePixelRatio,transition:t.transition,interpolate:t.interpolate!==void 0?t.interpolate:!0,key:t.key,attributionsCollapsible:t.attributionsCollapsible,zDirection:t.zDirection,wrapX:t.wrapX}),this.version_=t.version!==void 0?t==null?void 0:t.version:"1.0.0",this.dimensions_=t.dimensions!==void 0?t.dimensions:{},this.layer_=t.layer,fetch(t.url).then(e=>e.text()).then(e=>new window.DOMParser().parseFromString(e,"application/xml")).then(e=>{this.handleCapabilitiesResponse(e,t)})}handleCapabilitiesResponse(t,e){const n=new jd().read(t),s=a1(n,e);this.crossOrigin=s.crossOrigin,this.projection=s.projection,this.tileGrid=s.tileGrid,this.requestEncoding_=s.requestEncoding,this.matrixSet_=s.matrixSet,this.style_=s.style,this.format_=s.format,this.dimensions_=s.dimensions,this.setUrls(s.urls),this.urls&&this.urls.length>0&&(this.tileUrlFunction=Vr(this.urls.map(this.createFromWMTSTemplate.bind(this)))),this.setState("ready")}createFromWMTSTemplate(t){const e=this.requestEncoding_,n={layer:this.layer_,style:this.style_,tilematrixset:this.matrixSet_};e=="KVP"&&Object.assign(n,{Service:"WMTS",Request:"GetTile",Version:this.version_,Format:this.format_}),t=e=="KVP"?Gn(t,n):t.replace(/\{(\w+?)\}/g,function(o,a){return a.toLowerCase()in n?n[a.toLowerCase()]:o});const s=this.tileGrid,r=this.dimensions_;return function(o){if(!o)return;const a={TileMatrix:s.getMatrixId(o[0]),TileCol:o[1],TileRow:o[2]};Object.assign(a,r);let l=t;return e=="KVP"?l=Gn(l,a):l=l.replace(/\{(\w+?)\}/g,function(h,c){return a[c]}),l}}}window.eoxMapAdvancedOlSources={...OD,WMTSCapabilities:FD};const ND={__name:"EodashMap",setup(i){var a;const t=hx(dx),e={class:"fill-height fill-width overflow-none",center:[15,48],layers:[{type:"Tile",source:{type:"OSM"}}]};Es&&Es.value&&Es.value.length===3&&(e.center=[(a=Es.value)==null?void 0:a[0],Es.value[1]],e.zoom=Es.value[2]);const n=()=>jn(()=>import("./eox-map-BJ9SIixs.C3ovk8H8.js"),[]),s=l=>{const h=l.map,[c,u]=(h==null?void 0:h.getView().getCenter())??[0,0],g=h==null?void 0:h.getView().getZoom();!Number.isNaN(c)&&!Number.isNaN(u)&&!Number.isNaN(g)&&(Es.value=[c,u,g])},r=(l,h)=>{var u;(u=l==null?void 0:l.map)==null||u.on("moveend",s);const{selectedStac:c}=gx(h);fx([c,px],async([g,f])=>{if(g){const p=Ml(`./${g.id}/collection.json`,t.stacEndpoint),_=Ml(g.links[1].href,p),x=new Dx(_);f?l.layers=await x.createLayersJson(new Date(f)):l.layers=await x.createLayersJson()}},{immediate:!0})},o=(l,h)=>{var c;(c=l==null?void 0:l.map)==null||c.un("moveend",s)};return(l,h)=>(cx(),ux(_x,{link:n,"tag-name":"eox-map",properties:e,"on-mounted":r,"on-unmounted":o}))}},JD=Object.freeze(Object.defineProperty({__proto__:null,default:ND},Symbol.toStringTag,{value:"Module"}));export{KD as D,JD as E,QD as G,eo as V}; diff --git a/pr-preview/pr-2/assets/chunks/Footer-AohCH8U7.Cwd531iG.js b/pr-preview/pr-2/assets/chunks/Footer-AohCH8U7.Cwd531iG.js deleted file mode 100644 index 49700a6..0000000 --- a/pr-preview/pr-2/assets/chunks/Footer-AohCH8U7.Cwd531iG.js +++ /dev/null @@ -1 +0,0 @@ -import{e as y,U as w,aE as b,y as x,H as k,Y as _,z as M,c as f,w as z,ag as C,X as e,aF as S,L as X,b as Z,M as F,f as H,_ as j,a0 as B,af as E,t as I,O as R,aj as U,a5 as t,a6 as V,J as i,G as Y}from"./eo-dash.Bz0AiLIy.js";import{k as q,y as G,S as J,N as L,x as N,h as O,B as $}from"./color-DpYEub1f.C1TESEKr.js";import"./framework.CCzXaKCO.js";const A=y({app:Boolean,color:String,height:{type:[Number,String],default:"auto"},...q(),...w(),...G(),...b(),...J(),...x({tag:"footer"}),...k()},"VFooter"),D=_()({name:"VFooter",props:A(),setup(l,a){let{slots:s}=a;const{themeClasses:o}=M(l),{backgroundColorClasses:r,backgroundColorStyles:c}=L(f(l,"color")),{borderClasses:n}=N(l),{elevationClasses:u}=O(l),{roundedClasses:g}=$(l),h=z(32),{resizeRef:m}=C(d=>{d.length&&(h.value=d[0].target.clientHeight)}),p=e(()=>l.height==="auto"?h.value:parseInt(l.height,10)),{layoutItemStyles:v}=S({id:l.name,order:e(()=>parseInt(l.order,10)),position:e(()=>"bottom"),layoutSize:p,elementSize:e(()=>l.height==="auto"?void 0:p.value),active:e(()=>l.app),absolute:f(l,"absolute")});return X(()=>Z(l.tag,{ref:m,class:["v-footer",o.value,r.value,n.value,u.value,g.value,l.class],style:[c.value,l.app?v.value:{height:F(l.height)},l.style]},s)),{}}}),K={class:"pt-0",style:{"font-size":"0.8rem"}},Q=t("a",{href:"https://github.com/eodash/eodash",class:"text-white",target:"_blank"},"eodash",-1),T={href:"https://eox.at",target:"_blank",class:"text-white"},W=["src"],P='',a0={__name:"Footer",setup(l){const a=H(null),s=j(B),{mdAndDown:o}=E(),r=window.btoa(P);return(c,n)=>(I(),R(D,{ref_key:"footer",ref:a,height:i(o)?"48px":"auto",color:"secondary",app:"",class:"d-flex justify-space-between"},{default:U(()=>[t("p",K,V(i(s).brand.footerText??""),1),t("div",null,[Q,Y(" by "),t("a",T,[t("img",{src:`data:image/svg+xml;base64,${i(r)}`,height:"11px"},null,8,W)])])]),_:1},8,["height"]))}};export{a0 as default}; diff --git a/pr-preview/pr-2/assets/chunks/Header-DC50S6GR.Bnz2I-RP.js b/pr-preview/pr-2/assets/chunks/Header-DC50S6GR.Bnz2I-RP.js deleted file mode 100644 index 352adc3..0000000 --- a/pr-preview/pr-2/assets/chunks/Header-DC50S6GR.Bnz2I-RP.js +++ /dev/null @@ -1 +0,0 @@ -import{e as I,U as k,y as G,Y as C,L as N,b as a,c as $,aq as ie,w as y,f as U,X as d,g as z,u as ue,ax as ce,s as ve,n as J,F as O,I as de,$ as ge,T as A,M as H,H as pe,z as me,q as fe,ai as he,aE as be,j as ye,o as Se,R as _e,aF as xe,_ as Te,a0 as Be,t as Ve,O as we,aj as W,G as ze,a6 as Ie,J as M,C as Ce,al as Ne,v as He,aA as Re}from"./eo-dash.Bz0AiLIy.js";import{S as $e,v as ke,b as j}from"./dimensions-CJaGeSrj.Ds6JJdiE.js";import{S as Z,N as D,B as K,k as je,y as Ue,x as Ae,h as Ee}from"./color-DpYEub1f.C1TESEKr.js";import{j as Le,h as qe,I as R}from"./index-Sa2Vg_gx.CceVueR3.js";import{A as Fe}from"./index-DTkOfh2g.aV6WRR23.js";import{i as Oe}from"./ssrBoot-D-b4-M19.5KPN_o8O.js";import"./framework.CCzXaKCO.js";const Q=I({text:String,...k(),...G()},"VToolbarTitle"),X=C()({name:"VToolbarTitle",props:Q(),setup(e,v){let{slots:l}=v;return N(()=>{const n=!!(l.default||l.text||e.text);return a(e.tag,{class:["v-toolbar-title",e.class],style:e.style},{default:()=>{var i;return[n&&a("div",{class:"v-toolbar-title__placeholder"},[l.text?l.text():e.text,(i=l.default)==null?void 0:i.call(l)])]}})}),{}}});function We(e){return{aspectStyles:d(()=>{const v=Number(e.aspectRatio);return v?{paddingBottom:String(1/v*100)+"%"}:void 0})}}const ee=I({aspectRatio:[String,Number],contentClass:String,inline:Boolean,...k(),...$e()},"VResponsive"),P=C()({name:"VResponsive",props:ee(),setup(e,v){let{slots:l}=v;const{aspectStyles:n}=We(e),{dimensionStyles:i}=ke(e);return N(()=>{var s;return a("div",{class:["v-responsive",{"v-responsive--inline":e.inline},e.class],style:[i.value,e.style]},[a("div",{class:"v-responsive__sizer",style:n.value},null),(s=l.additional)==null?void 0:s.call(l),l.default&&a("div",{class:["v-responsive__content",e.contentClass]},[l.default()])])}),{}}}),Me=I({alt:String,cover:Boolean,color:String,draggable:{type:[Boolean,String],default:void 0},eager:Boolean,gradient:String,lazySrc:String,options:{type:Object,default:()=>({root:void 0,rootMargin:void 0,threshold:void 0})},sizes:String,src:{type:[String,Object],default:""},crossorigin:String,referrerpolicy:String,srcset:String,position:String,...ee(),...k(),...Z(),...Le()},"VImg"),le=C()({name:"VImg",directives:{intersect:qe},props:Me(),emits:{loadstart:e=>!0,load:e=>!0,error:e=>!0},setup(e,v){let{emit:l,slots:n}=v;const{backgroundColorClasses:i,backgroundColorStyles:s}=D($(e,"color")),{roundedClasses:f}=K(e),m=ie("VImg"),_=y(""),u=U(),r=y(e.eager?"loading":"idle"),h=y(),g=y(),t=d(()=>e.src&&typeof e.src=="object"?{src:e.src.src,srcset:e.srcset||e.src.srcset,lazySrc:e.lazySrc||e.src.lazySrc,aspect:Number(e.aspectRatio||e.src.aspect||0)}:{src:e.src,srcset:e.srcset,lazySrc:e.lazySrc,aspect:Number(e.aspectRatio||0)}),b=d(()=>t.value.aspect||h.value/g.value||0);z(()=>e.src,()=>{x(r.value!=="idle")}),z(b,(o,p)=>{!o&&p&&u.value&&S(u.value)}),ue(()=>x());function x(o){if(!(e.eager&&o)&&!(ce&&!o&&!e.eager)){if(r.value="loading",t.value.lazySrc){const p=new Image;p.src=t.value.lazySrc,S(p,null)}t.value.src&&ve(()=>{var p;l("loadstart",((p=u.value)==null?void 0:p.currentSrc)||t.value.src),setTimeout(()=>{var V;if(!m.isUnmounted)if((V=u.value)!=null&&V.complete){if(u.value.naturalWidth||c(),r.value==="error")return;b.value||S(u.value,null),r.value==="loading"&&w()}else b.value||S(u.value),T()})})}}function w(){var o;m.isUnmounted||(T(),S(u.value),r.value="loaded",l("load",((o=u.value)==null?void 0:o.currentSrc)||t.value.src))}function c(){var o;m.isUnmounted||(r.value="error",l("error",((o=u.value)==null?void 0:o.currentSrc)||t.value.src))}function T(){const o=u.value;o&&(_.value=o.currentSrc||o.src)}let B=-1;J(()=>{clearTimeout(B)});function S(o){let p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:100;const V=()=>{if(clearTimeout(B),m.isUnmounted)return;const{naturalHeight:q,naturalWidth:F}=o;q||F?(h.value=F,g.value=q):!o.complete&&r.value==="loading"&&p!=null?B=window.setTimeout(V,p):(o.currentSrc.endsWith(".svg")||o.currentSrc.startsWith("data:image/svg+xml"))&&(h.value=1,g.value=1)};V()}const E=d(()=>({"v-img__img--cover":e.cover,"v-img__img--contain":!e.cover})),te=()=>{var V;if(!t.value.src||r.value==="idle")return null;const o=a("img",{class:["v-img__img",E.value],style:{objectPosition:e.position},src:t.value.src,srcset:t.value.srcset,alt:e.alt,crossorigin:e.crossorigin,referrerpolicy:e.referrerpolicy,draggable:e.draggable,sizes:e.sizes,ref:u,onLoad:w,onError:c},null),p=(V=n.sources)==null?void 0:V.call(n);return a(R,{transition:e.transition,appear:!0},{default:()=>[O(p?a("picture",{class:"v-img__picture"},[p,o]):o,[[Ce,r.value==="loaded"]])]})},re=()=>a(R,{transition:e.transition},{default:()=>[t.value.lazySrc&&r.value!=="loaded"&&a("img",{class:["v-img__img","v-img__img--preload",E.value],style:{objectPosition:e.position},src:t.value.lazySrc,alt:e.alt,crossorigin:e.crossorigin,referrerpolicy:e.referrerpolicy,draggable:e.draggable},null)]}),se=()=>n.placeholder?a(R,{transition:e.transition,appear:!0},{default:()=>[(r.value==="loading"||r.value==="error"&&!n.error)&&a("div",{class:"v-img__placeholder"},[n.placeholder()])]}):null,oe=()=>n.error?a(R,{transition:e.transition,appear:!0},{default:()=>[r.value==="error"&&a("div",{class:"v-img__error"},[n.error()])]}):null,ne=()=>e.gradient?a("div",{class:"v-img__gradient",style:{backgroundImage:`linear-gradient(${e.gradient})`}},null):null,L=y(!1);{const o=z(b,p=>{p&&(requestAnimationFrame(()=>{requestAnimationFrame(()=>{L.value=!0})}),o())})}return N(()=>{const o=P.filterProps(e);return O(a(P,A({class:["v-img",{"v-img--booting":!L.value},i.value,f.value,e.class],style:[{width:H(e.width==="auto"?h.value:e.width)},s.value,e.style]},o,{aspectRatio:b.value,"aria-label":e.alt,role:e.alt?"img":void 0}),{additional:()=>a(ge,null,[a(te,null,null),a(re,null,null),a(ne,null,null),a(se,null,null),a(oe,null,null)]),default:n.default}),[[de("intersect"),{handler:x,options:e.options},null,{once:!0}]])}),{currentSrc:_,image:u,state:r,naturalWidth:h,naturalHeight:g}}}),Pe=[null,"prominent","default","comfortable","compact"],ae=I({absolute:Boolean,collapse:Boolean,color:String,density:{type:String,default:"default",validator:e=>Pe.includes(e)},extended:Boolean,extensionHeight:{type:[Number,String],default:48},flat:Boolean,floating:Boolean,height:{type:[Number,String],default:64},image:String,title:String,...je(),...k(),...Ue(),...Z(),...G({tag:"header"}),...pe()},"VToolbar"),Y=C()({name:"VToolbar",props:ae(),setup(e,v){var t;let{slots:l}=v;const{backgroundColorClasses:n,backgroundColorStyles:i}=D($(e,"color")),{borderClasses:s}=Ae(e),{elevationClasses:f}=Ee(e),{roundedClasses:m}=K(e),{themeClasses:_}=me(e),{rtlClasses:u}=fe(),r=y(!!(e.extended||(t=l.extension)!=null&&t.call(l))),h=d(()=>parseInt(Number(e.height)+(e.density==="prominent"?Number(e.height):0)-(e.density==="comfortable"?8:0)-(e.density==="compact"?16:0),10)),g=d(()=>r.value?parseInt(Number(e.extensionHeight)+(e.density==="prominent"?Number(e.extensionHeight):0)-(e.density==="comfortable"?4:0)-(e.density==="compact"?8:0),10):0);return he({VBtn:{variant:"text"}}),N(()=>{var c;const b=!!(e.title||l.title),x=!!(l.image||e.image),w=(c=l.extension)==null?void 0:c.call(l);return r.value=!!(e.extended||w),a(e.tag,{class:["v-toolbar",{"v-toolbar--absolute":e.absolute,"v-toolbar--collapse":e.collapse,"v-toolbar--flat":e.flat,"v-toolbar--floating":e.floating,[`v-toolbar--density-${e.density}`]:!0},n.value,s.value,f.value,m.value,_.value,u.value,e.class],style:[i.value,e.style]},{default:()=>[x&&a("div",{key:"image",class:"v-toolbar__image"},[l.image?a(j,{key:"image-defaults",disabled:!e.image,defaults:{VImg:{cover:!0,src:e.image}}},l.image):a(le,{key:"image-img",cover:!0,src:e.image},null)]),a(j,{defaults:{VTabs:{height:H(h.value)}}},{default:()=>{var T,B,S;return[a("div",{class:"v-toolbar__content",style:{height:H(h.value)}},[l.prepend&&a("div",{class:"v-toolbar__prepend"},[(T=l.prepend)==null?void 0:T.call(l)]),b&&a(X,{key:"title",text:e.title},{text:l.title}),(B=l.default)==null?void 0:B.call(l),l.append&&a("div",{class:"v-toolbar__append"},[(S=l.append)==null?void 0:S.call(l)])])]}}),a(j,{defaults:{VTabs:{height:H(g.value)}}},{default:()=>[a(Fe,null,{default:()=>[r.value&&a("div",{class:"v-toolbar__extension",style:{height:H(g.value)}},[w])]})]})]})}),{contentHeight:h,extensionHeight:g}}}),Ye=I({scrollTarget:{type:String},scrollThreshold:{type:[String,Number],default:300}},"scroll");function Ge(e){let v=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{canScroll:l}=v;let n=0;const i=U(null),s=y(0),f=y(0),m=y(0),_=y(!1),u=y(!1),r=d(()=>Number(e.scrollThreshold)),h=d(()=>Ne((r.value-s.value)/r.value||0)),g=()=>{const t=i.value;!t||l&&!l.value||(n=s.value,s.value="window"in t?t.pageYOffset:t.scrollTop,u.value=s.value{f.value=f.value||s.value}),z(_,()=>{f.value=0}),He(()=>{z(()=>e.scrollTarget,t=>{var x;const b=t?document.querySelector(t):window;if(!b){Re(`Unable to locate element with identifier ${t}`);return}b!==i.value&&((x=i.value)==null||x.removeEventListener("scroll",g),i.value=b,i.value.addEventListener("scroll",g,{passive:!0}))},{immediate:!0})}),J(()=>{var t;(t=i.value)==null||t.removeEventListener("scroll",g)}),l&&z(l,g,{immediate:!0}),{scrollThreshold:r,currentScroll:s,currentThreshold:m,isScrollActive:_,scrollRatio:h,isScrollingUp:u,savedScroll:f}}const Je=I({scrollBehavior:String,modelValue:{type:Boolean,default:!0},location:{type:String,default:"top",validator:e=>["top","bottom"].includes(e)},...ae(),...be(),...Ye(),height:{type:[Number,String],default:64}},"VAppBar"),Ze=C()({name:"VAppBar",props:Je(),emits:{"update:modelValue":e=>!0},setup(e,v){let{slots:l}=v;const n=U(),i=ye(e,"modelValue"),s=d(()=>{var T;const c=new Set(((T=e.scrollBehavior)==null?void 0:T.split(" "))??[]);return{hide:c.has("hide"),inverted:c.has("inverted"),collapse:c.has("collapse"),elevate:c.has("elevate"),fadeImage:c.has("fade-image")}}),f=d(()=>{const c=s.value;return c.hide||c.inverted||c.collapse||c.elevate||c.fadeImage||!i.value}),{currentScroll:m,scrollThreshold:_,isScrollingUp:u,scrollRatio:r}=Ge(e,{canScroll:f}),h=d(()=>e.collapse||s.value.collapse&&(s.value.inverted?r.value>0:r.value===0)),g=d(()=>e.flat||s.value.elevate&&(s.value.inverted?m.value>0:m.value===0)),t=d(()=>s.value.fadeImage?s.value.inverted?1-r.value:r.value:void 0),b=d(()=>{var B,S;if(s.value.hide&&s.value.inverted)return 0;const c=((B=n.value)==null?void 0:B.contentHeight)??0,T=((S=n.value)==null?void 0:S.extensionHeight)??0;return c+T});Se(d(()=>!!e.scrollBehavior),()=>{_e(()=>{s.value.hide?s.value.inverted?i.value=m.value>_.value:i.value=u.value||m.value<_.value:i.value=!0})});const{ssrBootStyles:x}=Oe(),{layoutItemStyles:w}=xe({id:e.name,order:d(()=>parseInt(e.order,10)),position:$(e,"location"),layoutSize:b,elementSize:y(void 0),active:i,absolute:$(e,"absolute")});return N(()=>{const c=Y.filterProps(e);return a(Y,A({ref:n,class:["v-app-bar",{"v-app-bar--bottom":e.location==="bottom"},e.class],style:[{...w.value,"--v-toolbar-image-opacity":t.value,height:void 0,...x.value},e.style]},c,{collapse:h.value,flat:g.value}),l)}),{}}}),De=C()({name:"VAppBarTitle",props:Q(),setup(e,v){let{slots:l}=v;return N(()=>a(X,A(e,{class:"v-app-bar-title"}),l)),{}}}),rl={__name:"Header",setup(e){var n;const v=Te(Be),l=(n=v.brand)==null?void 0:n.name;return(i,s)=>(Ve(),we(Ze,{color:"primary"},{default:W(()=>{var f;return[a(De,null,{default:W(()=>[ze(Ie(M(l)),1)]),_:1}),a(le,{class:"mx-12",style:{"max-width":"140px"},src:(f=M(v).brand)==null?void 0:f.logo},null,8,["src"])]}),_:1}))}};export{rl as default}; diff --git a/pr-preview/pr-2/assets/chunks/IframeWrapper-Dd9zrX9s.uUv_EKs2.js b/pr-preview/pr-2/assets/chunks/IframeWrapper-Dd9zrX9s.uUv_EKs2.js deleted file mode 100644 index afca6d8..0000000 --- a/pr-preview/pr-2/assets/chunks/IframeWrapper-Dd9zrX9s.uUv_EKs2.js +++ /dev/null @@ -1 +0,0 @@ -import{t as e,k as s}from"./eo-dash.Bz0AiLIy.js";import"./framework.CCzXaKCO.js";const t=["src"],c={__name:"IframeWrapper",props:{src:{type:String,required:!0}},setup(r){return(a,p)=>(e(),s("iframe",{src:r.src,style:{width:"100%",height:"100%"}},null,8,t))}};export{c as default}; diff --git a/pr-preview/pr-2/assets/chunks/MobileLayout-CgToA7Gp.CZBTTNp3.js b/pr-preview/pr-2/assets/chunks/MobileLayout-CgToA7Gp.CZBTTNp3.js deleted file mode 100644 index ddfcd27..0000000 --- a/pr-preview/pr-2/assets/chunks/MobileLayout-CgToA7Gp.CZBTTNp3.js +++ /dev/null @@ -1 +0,0 @@ -import{e as Z,d as Ce,Y as K,f as H,X as x,L as Q,b as m,$ as J,T as I,i as se,U as _e,ae as ze,y as ye,q as $e,af as Te,w as A,ag as ne,ah as Me,g as Re,j as Ve,c as $,ai as Ae,M as Be,_ as Ee,a0 as He,a2 as ue,a3 as Ie,v as Le,t as T,O as q,aj as P,a9 as ie,J as B,k as D,a4 as re,F as ve,aa as ce,G as de,C as fe,a6 as qe,ak as Pe,al as Ye,am as je}from"./eo-dash.Bz0AiLIy.js";import{j as Fe,e as N,k as Ge,a as Oe,W as pe,S as Ue,x as Xe}from"./VBtn-Bz7ruRUg.DWwH2z8a.js";import{$ as We,N as De}from"./color-DpYEub1f.C1TESEKr.js";import{x as Je,w as Ne,R as Ze}from"./forwardRefs-Bxeu9Obx.D8TmPTZr.js";import{T as me}from"./index-DTkOfh2g.aV6WRR23.js";import{V as Ke}from"./VMain-BHfWJU2j.ByWWJTS2.js";import"./framework.CCzXaKCO.js";import"./dimensions-CJaGeSrj.Ds6JJdiE.js";import"./ssrBoot-D-b4-M19.5KPN_o8O.js";const xe=Symbol.for("vuetify:v-tabs"),Qe=Z({fixed:Boolean,sliderColor:String,hideSlider:Boolean,direction:{type:String,default:"horizontal"},...Ce(Fe({selectedClass:"v-tab--selected",variant:"text"}),["active","block","flat","location","position","symbol"])},"VTab"),Se=K()({name:"VTab",props:Qe(),setup(e,u){let{slots:i,attrs:v}=u;const{textColorClasses:h,textColorStyles:c}=We(e,"sliderColor"),a=H(),r=H(),t=x(()=>e.direction==="horizontal"),s=x(()=>{var o,d;return((d=(o=a.value)==null?void 0:o.group)==null?void 0:d.isSelected.value)??!1});function f(o){var b,p;let{value:d}=o;if(d){const _=(p=(b=a.value)==null?void 0:b.$el.parentElement)==null?void 0:p.querySelector(".v-tab--selected .v-tab__slider"),M=r.value;if(!_||!M)return;const Y=getComputedStyle(_).color,y=_.getBoundingClientRect(),k=M.getBoundingClientRect(),z=t.value?"x":"y",R=t.value?"X":"Y",L=t.value?"right":"bottom",w=t.value?"width":"height",j=y[z],V=k[z],C=j>V?y[L]-k[L]:y[z]-k[z],F=Math.sign(C)>0?t.value?"right":"bottom":Math.sign(C)<0?t.value?"left":"top":"center",G=(Math.abs(C)+(Math.sign(C)<0?y[w]:k[w]))/Math.max(y[w],k[w])||0,O=y[w]/k[w]||0,g=1.5;Ne(M,{backgroundColor:[Y,"currentcolor"],transform:[`translate${R}(${C}px) scale${R}(${O})`,`translate${R}(${C/g}px) scale${R}(${(G-1)/g+1})`,"none"],transformOrigin:Array(3).fill(F)},{duration:225,easing:Ze})}}return Q(()=>{const o=N.filterProps(e);return m(N,I({symbol:xe,ref:a,class:["v-tab",e.class],style:e.style,tabindex:s.value?0:-1,role:"tab","aria-selected":String(s.value),active:!1},o,v,{block:e.fixed,maxWidth:e.fixed?300:void 0,"onGroup:selected":f}),{...i,default:()=>{var d;return m(J,null,[((d=i.default)==null?void 0:d.call(i))??e.text,!e.hideSlider&&m("div",{ref:r,class:["v-tab__slider",h.value],style:c.value},null)])}})}),Je({},a)}});function be(e){const u=Math.abs(e);return Math.sign(e)*(u/((1/.501-2)*(1-u)+1))}function ge(e){let{selectedElement:u,containerSize:i,contentSize:v,isRtl:h,currentScrollOffset:c,isHorizontal:a}=e;const r=a?u.clientWidth:u.clientHeight,t=a?u.offsetLeft:u.offsetTop,s=h&&a?v-t-r:t,f=i+c,o=r+s,d=r*.4;return s<=c?c=Math.max(s-d,0):f<=o&&(c=Math.min(c-(f-o-d),v-i)),c}function et(e){let{selectedElement:u,containerSize:i,contentSize:v,isRtl:h,isHorizontal:c}=e;const a=c?u.clientWidth:u.clientHeight,r=c?u.offsetLeft:u.offsetTop,t=h&&c?v-r-a/2-i/2:r+a/2-i/2;return Math.min(v-i,Math.max(0,t))}const tt=Symbol.for("vuetify:v-slide-group"),ke=Z({centerActive:Boolean,direction:{type:String,default:"horizontal"},symbol:{type:null,default:tt},nextIcon:{type:se,default:"$next"},prevIcon:{type:se,default:"$prev"},showArrows:{type:[Boolean,String],validator:e=>typeof e=="boolean"||["always","desktop","mobile"].includes(e)},..._e(),...ze(),...ye(),...Ge({selectedClass:"v-slide-group-item--active"})},"VSlideGroup"),he=K()({name:"VSlideGroup",props:ke(),emits:{"update:modelValue":e=>!0},setup(e,u){let{slots:i}=u;const{isRtl:v}=$e(),{displayClasses:h,mobile:c}=Te(e),a=Oe(e,e.symbol),r=A(!1),t=A(0),s=A(0),f=A(0),o=x(()=>e.direction==="horizontal"),{resizeRef:d,contentRect:b}=ne(),{resizeRef:p,contentRect:_}=ne(),M=x(()=>a.selected.value.length?a.items.value.findIndex(l=>l.id===a.selected.value[0]):-1),Y=x(()=>a.selected.value.length?a.items.value.findIndex(l=>l.id===a.selected.value[a.selected.value.length-1]):-1);if(Me){let l=-1;Re(()=>[a.selected.value,b.value,_.value,o.value],()=>{cancelAnimationFrame(l),l=requestAnimationFrame(()=>{if(b.value&&_.value){const n=o.value?"width":"height";s.value=b.value[n],f.value=_.value[n],r.value=s.value+1=0&&p.value){const n=p.value.children[Y.value];M.value===0||!r.value?t.value=0:e.centerActive?t.value=et({selectedElement:n,containerSize:s.value,contentSize:f.value,isRtl:v.value,isHorizontal:o.value}):r.value&&(t.value=ge({selectedElement:n,containerSize:s.value,contentSize:f.value,isRtl:v.value,currentScrollOffset:t.value,isHorizontal:o.value}))}})})}const y=A(!1);let k=0,z=0;function R(l){const n=o.value?"clientX":"clientY";z=(v.value&&o.value?-1:1)*t.value,k=l.touches[0][n],y.value=!0}function L(l){if(!r.value)return;const n=o.value?"clientX":"clientY",S=v.value&&o.value?-1:1;t.value=S*(z+k-l.touches[0][n])}function w(l){const n=f.value-s.value;t.value<0||!r.value?t.value=0:t.value>=n&&(t.value=n),y.value=!1}function j(){d.value&&(d.value[o.value?"scrollLeft":"scrollTop"]=0)}const V=A(!1);function C(l){if(V.value=!0,!(!r.value||!p.value)){for(const n of l.composedPath())for(const S of p.value.children)if(S===n){t.value=ge({selectedElement:S,containerSize:s.value,contentSize:f.value,isRtl:v.value,currentScrollOffset:t.value,isHorizontal:o.value});return}}}function F(l){V.value=!1}function G(l){var n;!V.value&&!(l.relatedTarget&&((n=p.value)!=null&&n.contains(l.relatedTarget)))&&g()}function O(l){p.value&&(o.value?l.key==="ArrowRight"?g(v.value?"prev":"next"):l.key==="ArrowLeft"&&g(v.value?"next":"prev"):l.key==="ArrowDown"?g("next"):l.key==="ArrowUp"&&g("prev"),l.key==="Home"?g("first"):l.key==="End"&&g("last"))}function g(l){var n,S,le,ae,oe;if(p.value)if(!l)(n=Pe(p.value)[0])==null||n.focus();else if(l==="next"){const E=(S=p.value.querySelector(":focus"))==null?void 0:S.nextElementSibling;E?E.focus():g("first")}else if(l==="prev"){const E=(le=p.value.querySelector(":focus"))==null?void 0:le.previousElementSibling;E?E.focus():g("last")}else l==="first"?(ae=p.value.firstElementChild)==null||ae.focus():l==="last"&&((oe=p.value.lastElementChild)==null||oe.focus())}function U(l){const n=t.value+(l==="prev"?-1:1)*s.value;t.value=Ye(n,0,f.value-s.value)}const we=x(()=>{let l=t.value>f.value-s.value?-(f.value-s.value)+be(f.value-s.value-t.value):-t.value;t.value<=0&&(l=be(-t.value));const n=v.value&&o.value?-1:1;return{transform:`translate${o.value?"X":"Y"}(${n*l}px)`,transition:y.value?"none":"",willChange:y.value?"transform":""}}),X=x(()=>({next:a.next,prev:a.prev,select:a.select,isSelected:a.isSelected})),W=x(()=>{switch(e.showArrows){case"always":return!0;case"desktop":return!c.value;case!0:return r.value||Math.abs(t.value)>0;case"mobile":return c.value||r.value||Math.abs(t.value)>0;default:return!c.value&&(r.value||Math.abs(t.value)>0)}}),ee=x(()=>Math.abs(t.value)>0),te=x(()=>f.value>Math.abs(t.value)+s.value);return Q(()=>m(e.tag,{class:["v-slide-group",{"v-slide-group--vertical":!o.value,"v-slide-group--has-affixes":W.value,"v-slide-group--is-overflowing":r.value},h.value,e.class],style:e.style,tabindex:V.value||a.selected.value.length?-1:0,onFocus:G},{default:()=>{var l,n,S;return[W.value&&m("div",{key:"prev",class:["v-slide-group__prev",{"v-slide-group__prev--disabled":!ee.value}],onClick:()=>ee.value&&U("prev")},[((l=i.prev)==null?void 0:l.call(i,X.value))??m(me,null,{default:()=>[m(pe,{icon:v.value?e.nextIcon:e.prevIcon},null)]})]),m("div",{key:"container",ref:d,class:"v-slide-group__container",onScroll:j},[m("div",{ref:p,class:"v-slide-group__content",style:we.value,onTouchstartPassive:R,onTouchmovePassive:L,onTouchendPassive:w,onFocusin:C,onFocusout:F,onKeydown:O},[(n=i.default)==null?void 0:n.call(i,X.value)])]),W.value&&m("div",{key:"next",class:["v-slide-group__next",{"v-slide-group__next--disabled":!te.value}],onClick:()=>te.value&&U("next")},[((S=i.next)==null?void 0:S.call(i,X.value))??m(me,null,{default:()=>[m(pe,{icon:v.value?e.prevIcon:e.nextIcon},null)]})])]}})),{selected:a.selected,scrollTo:U,scrollOffset:t,focus:g}}});function lt(e){return e?e.map(u=>je(u)?u:{text:u,value:u}):[]}const at=Z({alignTabs:{type:String,default:"start"},color:String,fixedTabs:Boolean,items:{type:Array,default:()=>[]},stacked:Boolean,bgColor:String,grow:Boolean,height:{type:[Number,String],default:void 0},hideSlider:Boolean,sliderColor:String,...ke({mandatory:"force"}),...Ue(),...ye()},"VTabs"),ot=K()({name:"VTabs",props:at(),emits:{"update:modelValue":e=>!0},setup(e,u){let{slots:i}=u;const v=Ve(e,"modelValue"),h=x(()=>lt(e.items)),{densityClasses:c}=Xe(e),{backgroundColorClasses:a,backgroundColorStyles:r}=De($(e,"bgColor"));return Ae({VTab:{color:$(e,"color"),direction:$(e,"direction"),stacked:$(e,"stacked"),fixed:$(e,"fixedTabs"),sliderColor:$(e,"sliderColor"),hideSlider:$(e,"hideSlider")}}),Q(()=>{const t=he.filterProps(e);return m(he,I(t,{modelValue:v.value,"onUpdate:modelValue":s=>v.value=s,class:["v-tabs",`v-tabs--${e.direction}`,`v-tabs--align-tabs-${e.alignTabs}`,{"v-tabs--fixed-tabs":e.fixedTabs,"v-tabs--grow":e.grow,"v-tabs--stacked":e.stacked},c.value,a.value,e.class],style:[{"--v-tabs-height":Be(e.height)},r.value,e.style],role:"tablist",symbol:xe}),{default:()=>[i.default?i.default():h.value.map(s=>m(Se,I(s,{key:s.text}),null))]})}),{}}}),pt={__name:"MobileLayout",setup(e){var s;const u=Ee(He),i=u.template.widgets,v=ue(i),[h]=ue([(s=u.template)==null?void 0:s.background]),{mainRect:c}=Ie(),a=H(-1),r=H(null),t=H("");return Le(()=>{var f,o;t.value=c.value.bottom+(((o=(f=r.value)==null?void 0:f.$el)==null?void 0:o.clientHeight)??0)+"px"}),(f,o)=>(T(),q(Ke,{class:"overflow-hidden",style:{height:"91dvh"}},{default:P(()=>[(T(),q(ie(B(h).component),I({id:"bg-widget"},B(h).props),null,16)),(T(!0),D(J,null,re(B(v),(d,b)=>ve((T(),D("div",{id:"overlay",class:"pa-2",key:b,style:ce({bottom:t.value,position:"absolute",overflow:"hidden",width:"100%",left:0,top:B(c).top+"px",zIndex:1,background:"rgb(var(--v-theme-surface))"})},[m(N,{icon:"",variant:"text",style:{height:"5%",position:"relative"},onClick:o[0]||(o[0]=p=>a.value=-1)},{default:P(()=>[de("✕")]),_:1}),ve((T(),q(ie(d.value.component),I({style:{height:"94% !important"},key:d.value.id},d.value.props),null,16)),[[fe,a.value===b]])],4)),[[fe,a.value===b]])),128)),m(ot,{ref_key:"tabs",ref:r,"align-tabs":"center","bg-color":"surface",style:ce({position:"relative",bottom:(B(c).bottom||48)+"px",zIndex:10}),"show-arrows":"",modelValue:a.value,"onUpdate:modelValue":o[1]||(o[1]=d=>a.value=d)},{default:P(()=>[(T(!0),D(J,null,re(B(v),(d,b)=>(T(),q(Se,{key:b,value:b},{default:P(()=>[de(qe(d.value.title),1)]),_:2},1032,["value"]))),128))]),_:1},8,["style","modelValue"])]),_:1}))}};export{pt as default}; diff --git a/pr-preview/pr-2/assets/chunks/VBtn-Bz7ruRUg.DWwH2z8a.js b/pr-preview/pr-2/assets/chunks/VBtn-Bz7ruRUg.DWwH2z8a.js deleted file mode 100644 index ee0c8c1..0000000 --- a/pr-preview/pr-2/assets/chunks/VBtn-Bz7ruRUg.DWwH2z8a.js +++ /dev/null @@ -1 +0,0 @@ -import{e as x,U as O,y as M,H as A,Y as E,z as P,ai as Fe,c as B,L as V,i as U,f as ee,ap as Ye,X as c,ag as We,R as Ke,j as _e,q as Ce,m as j,b as v,aq as te,W as Ue,ar as ke,_ as De,n as ae,g as le,as as Qe,v as Je,at as we,T as Ze,au as et,av as tt,aw as at,M as w,w as lt,ax as st,ay as nt,a9 as it,F as ot,I as rt,$ as ut,J as D,az as ct,aA as dt,aB as Q,aC as ve,s as vt,x as pt,am as mt,aD as pe}from"./eo-dash.Bz0AiLIy.js";import{k as xe,y as Se,S as se,x as $e,h as Be,B as ne,$ as X,N as me,i as gt}from"./color-DpYEub1f.C1TESEKr.js";import{S as ft,v as ht,b as W}from"./dimensions-CJaGeSrj.Ds6JJdiE.js";const yt=["top","bottom"],bt=["start","end","left","right"];function _t(e,t){let[a,l]=e.split(" ");return l||(l=Q(yt,a)?"start":Q(bt,a)?"top":"center"),{side:ge(a,t),align:ge(l,t)}}function ge(e,t){return e==="start"?t?"right":"left":e==="end"?t?"left":"right":e}const Ct=[null,"default","comfortable","compact"],Le=x({density:{type:String,default:"default",validator:e=>Ct.includes(e)}},"density");function Te(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:j();return{densityClasses:c(()=>`${t}--density-${e.density}`)}}const kt=["elevated","flat","tonal","outlined","text","plain"];function wt(e,t){return v(ut,null,[e&&v("span",{key:"overlay",class:`${t}__overlay`},null),v("span",{key:"underlay",class:`${t}__underlay`},null)])}const Ie=x({color:String,variant:{type:String,default:"elevated",validator:e=>kt.includes(e)}},"variant");function xt(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:j();const a=c(()=>{const{variant:n}=D(e);return`${t}--variant-${n}`}),{colorClasses:l,colorStyles:s}=gt(c(()=>{const{variant:n,color:o}=D(e);return{[["elevated","flat"].includes(n)?"background":"text"]:o}}));return{colorClasses:l,colorStyles:s,variantClasses:a}}const Ee=x({divided:Boolean,...xe(),...O(),...Le(),...Se(),...se(),...M(),...A(),...Ie()},"VBtnGroup"),fe=E()({name:"VBtnGroup",props:Ee(),setup(e,t){let{slots:a}=t;const{themeClasses:l}=P(e),{densityClasses:s}=Te(e),{borderClasses:n}=$e(e),{elevationClasses:o}=Be(e),{roundedClasses:r}=ne(e);Fe({VBtn:{height:"auto",color:B(e,"color"),density:B(e,"density"),flat:!0,variant:B(e,"variant")}}),V(()=>v(e.tag,{class:["v-btn-group",{"v-btn-group--divided":e.divided},l.value,n.value,s.value,o.value,r.value,e.class],style:e.style},a))}}),St=x({modelValue:{type:null,default:void 0},multiple:Boolean,mandatory:[Boolean,String],max:Number,selectedClass:String,disabled:Boolean},"group"),$t=x({value:null,disabled:Boolean,selectedClass:String},"group-item");function Bt(e,t){let a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;const l=te("useGroupItem");if(!l)throw new Error("[Vuetify] useGroupItem composable must be used inside a component setup function");const s=Ue();ke(Symbol.for(`${t.description}:id`),s);const n=De(t,null);if(!n){if(!a)return n;throw new Error(`[Vuetify] Could not find useGroup injection with symbol ${t.description}`)}const o=B(e,"value"),r=c(()=>!!(n.disabled.value||e.disabled));n.register({id:s,value:o,disabled:r},l),ae(()=>{n.unregister(s)});const p=c(()=>n.isSelected(s)),y=c(()=>p.value&&[n.selectedClass.value,e.selectedClass]);return le(p,h=>{l.emit("group:selected",{value:h})},{flush:"sync"}),{id:s,isSelected:p,toggle:()=>n.select(s,!p.value),select:h=>n.select(s,h),selectedClass:y,value:o,disabled:r,group:n}}function Lt(e,t){let a=!1;const l=Qe([]),s=_e(e,"modelValue",[],i=>i==null?[]:Ve(l,pt(i)),i=>{const u=It(l,i);return e.multiple?u:u[0]}),n=te("useGroup");function o(i,u){const f=i,m=Symbol.for(`${t.description}:id`),b=ct(m,n==null?void 0:n.vnode).indexOf(u);D(f.value)==null&&(f.value=b),b>-1?l.splice(b,0,f):l.push(f)}function r(i){if(a)return;p();const u=l.findIndex(f=>f.id===i);l.splice(u,1)}function p(){const i=l.find(u=>!u.disabled);i&&e.mandatory==="force"&&!s.value.length&&(s.value=[i.id])}Je(()=>{p()}),ae(()=>{a=!0});function y(i,u){const f=l.find(m=>m.id===i);if(!(u&&(f!=null&&f.disabled)))if(e.multiple){const m=s.value.slice(),b=m.findIndex(d=>d===i),k=~b;if(u=u??!k,k&&e.mandatory&&m.length<=1||!k&&e.max!=null&&m.length+1>e.max)return;b<0&&u?m.push(i):b>=0&&!u&&m.splice(b,1),s.value=m}else{const m=s.value.includes(i);if(e.mandatory&&m)return;s.value=u??!m?[i]:[]}}function h(i){if(e.multiple&&dt('This method is not supported when using "multiple" prop'),s.value.length){const u=s.value[0],f=l.findIndex(k=>k.id===u);let m=(f+i)%l.length,b=l[m];for(;b.disabled&&m!==f;)m=(m+i)%l.length,b=l[m];if(b.disabled)return;s.value=[l[m].id]}else{const u=l.find(f=>!f.disabled);u&&(s.value=[u.id])}}const g={register:o,unregister:r,selected:s,select:y,disabled:B(e,"disabled"),prev:()=>h(l.length-1),next:()=>h(1),isSelected:i=>s.value.includes(i),selectedClass:c(()=>e.selectedClass),items:c(()=>l),getItemIndex:i=>Tt(l,i)};return ke(t,g),g}function Tt(e,t){const a=Ve(e,[t]);return a.length?e.findIndex(l=>l.id===a[0]):-1}function Ve(e,t){const a=[];return t.forEach(l=>{const s=e.find(o=>we(l,o.value)),n=e[l];(s==null?void 0:s.value)!=null?a.push(s.id):n!=null&&a.push(n.id)}),a}function It(e,t){const a=[];return t.forEach(l=>{const s=e.findIndex(n=>n.id===l);if(~s){const n=e[s];a.push(n.value!=null?n.value:s)}}),a}const ze=Symbol.for("vuetify:v-btn-toggle"),Et=x({...Ee(),...St()},"VBtnToggle");E()({name:"VBtnToggle",props:Et(),emits:{"update:modelValue":e=>!0},setup(e,t){let{slots:a}=t;const{isSelected:l,next:s,prev:n,select:o,selected:r}=Lt(e,ze);return V(()=>{const p=fe.filterProps(e);return v(fe,Ze({class:["v-btn-toggle",e.class]},p,{style:e.style}),{default:()=>{var y;return[(y=a.default)==null?void 0:y.call(a,{isSelected:l,next:s,prev:n,select:o,selected:r})]}})}),{next:s,prev:n,select:o}}});const Vt=["x-small","small","default","large","x-large"],ie=x({size:{type:[String,Number],default:"default"}},"size");function oe(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:j();return et(()=>{let a,l;return Q(Vt,e.size)?a=`${t}--size-${e.size}`:e.size&&(l={width:w(e.size),height:w(e.size)}),{sizeClasses:a,sizeStyles:l}})}const zt=x({color:String,disabled:Boolean,start:Boolean,end:Boolean,icon:U,...O(),...ie(),...M({tag:"i"}),...A()},"VIcon"),K=E()({name:"VIcon",props:zt(),setup(e,t){let{attrs:a,slots:l}=t;const s=ee(),{themeClasses:n}=P(e),{iconData:o}=Ye(c(()=>s.value||e.icon)),{sizeClasses:r}=oe(e),{textColorClasses:p,textColorStyles:y}=X(B(e,"color"));return V(()=>{var i,u;const h=(i=l.default)==null?void 0:i.call(l);h&&(s.value=(u=tt(h).filter(f=>f.type===at&&f.children&&typeof f.children=="string")[0])==null?void 0:u.children);const g=!!(a.onClick||a.onClickOnce);return v(o.value.component,{tag:e.tag,icon:o.value.icon,class:["v-icon","notranslate",n.value,r.value,p.value,{"v-icon--clickable":g,"v-icon--disabled":e.disabled,"v-icon--start":e.start,"v-icon--end":e.end},e.class],style:[r.value?void 0:{fontSize:w(e.size),height:w(e.size),width:w(e.size)},y.value,e.style],role:g?"button":void 0,"aria-hidden":!g,tabindex:g?e.disabled?-1:0:void 0},{default:()=>[h]})}),{}}});function Ne(e,t){const a=ee(),l=lt(!1);if(st){const s=new IntersectionObserver(n=>{e==null||e(n,s),l.value=!!n.find(o=>o.isIntersecting)},t);ae(()=>{s.disconnect()}),le(a,(n,o)=>{o&&(s.unobserve(o),l.value=!1),n&&s.observe(n)},{flush:"post"})}return{intersectionRef:a,isIntersecting:l}}const Nt=x({bgColor:String,color:String,indeterminate:[Boolean,String],modelValue:{type:[Number,String],default:0},rotate:{type:[Number,String],default:0},width:{type:[Number,String],default:4},...O(),...ie(),...M({tag:"div"}),...A()},"VProgressCircular"),Rt=E()({name:"VProgressCircular",props:Nt(),setup(e,t){let{slots:a}=t;const l=20,s=2*Math.PI*l,n=ee(),{themeClasses:o}=P(e),{sizeClasses:r,sizeStyles:p}=oe(e),{textColorClasses:y,textColorStyles:h}=X(B(e,"color")),{textColorClasses:g,textColorStyles:i}=X(B(e,"bgColor")),{intersectionRef:u,isIntersecting:f}=Ne(),{resizeRef:m,contentRect:b}=We(),k=c(()=>Math.max(0,Math.min(100,parseFloat(e.modelValue)))),d=c(()=>Number(e.width)),_=c(()=>p.value?Number(e.size):b.value?b.value.width:Math.max(d.value,32)),L=c(()=>l/(1-d.value/_.value)*2),$=c(()=>d.value/_.value*L.value),z=c(()=>w((100-k.value)/100*s));return Ke(()=>{u.value=n.value,m.value=n.value}),V(()=>v(e.tag,{ref:n,class:["v-progress-circular",{"v-progress-circular--indeterminate":!!e.indeterminate,"v-progress-circular--visible":f.value,"v-progress-circular--disable-shrink":e.indeterminate==="disable-shrink"},o.value,r.value,y.value,e.class],style:[p.value,h.value,e.style],role:"progressbar","aria-valuemin":"0","aria-valuemax":"100","aria-valuenow":e.indeterminate?void 0:k.value},{default:()=>[v("svg",{style:{transform:`rotate(calc(-90deg + ${Number(e.rotate)}deg))`},xmlns:"http://www.w3.org/2000/svg",viewBox:`0 0 ${L.value} ${L.value}`},[v("circle",{class:["v-progress-circular__underlay",g.value],style:i.value,fill:"transparent",cx:"50%",cy:"50%",r:l,"stroke-width":$.value,"stroke-dasharray":s,"stroke-dashoffset":0},null),v("circle",{class:"v-progress-circular__overlay",fill:"transparent",cx:"50%",cy:"50%",r:l,"stroke-width":$.value,"stroke-dasharray":s,"stroke-dashoffset":z.value},null)]),a.default&&v("div",{class:"v-progress-circular__content"},[a.default({value:k.value})])]})),{}}}),he={center:"center",top:"bottom",bottom:"top",left:"right",right:"left"},Re=x({location:String},"location");function Oe(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,a=arguments.length>2?arguments[2]:void 0;const{isRtl:l}=Ce();return{locationStyles:c(()=>{if(!e.location)return{};const{side:s,align:n}=_t(e.location.split(" ").length>1?e.location:`${e.location} center`,l.value);function o(p){return a?a(p):0}const r={};return s!=="center"&&(t?r[he[s]]=`calc(100% - ${o(s)}px)`:r[s]=0),n!=="center"?t?r[he[n]]=`calc(100% - ${o(n)}px)`:r[n]=0:(s==="center"?r.top=r.left="50%":r[{top:"left",bottom:"left",left:"top",right:"top"}[s]]="50%",r.transform={top:"translateX(-50%)",bottom:"translateX(-50%)",left:"translateY(-50%)",right:"translateY(-50%)",center:"translate(-50%, -50%)"}[s]),r})}}const Ot=x({absolute:Boolean,active:{type:Boolean,default:!0},bgColor:String,bgOpacity:[Number,String],bufferValue:{type:[Number,String],default:0},clickable:Boolean,color:String,height:{type:[Number,String],default:4},indeterminate:Boolean,max:{type:[Number,String],default:100},modelValue:{type:[Number,String],default:0},reverse:Boolean,stream:Boolean,striped:Boolean,roundedBar:Boolean,...O(),...Re({location:"top"}),...se(),...M(),...A()},"VProgressLinear"),Mt=E()({name:"VProgressLinear",props:Ot(),emits:{"update:modelValue":e=>!0},setup(e,t){let{slots:a}=t;const l=_e(e,"modelValue"),{isRtl:s,rtlClasses:n}=Ce(),{themeClasses:o}=P(e),{locationStyles:r}=Oe(e),{textColorClasses:p,textColorStyles:y}=X(e,"color"),{backgroundColorClasses:h,backgroundColorStyles:g}=me(c(()=>e.bgColor||e.color)),{backgroundColorClasses:i,backgroundColorStyles:u}=me(e,"color"),{roundedClasses:f}=ne(e),{intersectionRef:m,isIntersecting:b}=Ne(),k=c(()=>parseInt(e.max,10)),d=c(()=>parseInt(e.height,10)),_=c(()=>parseFloat(e.bufferValue)/k.value*100),L=c(()=>parseFloat(l.value)/k.value*100),$=c(()=>s.value!==e.reverse),z=c(()=>e.indeterminate?"fade-transition":"slide-x-transition"),q=c(()=>e.bgOpacity==null?e.bgOpacity:parseFloat(e.bgOpacity));function F(C){if(!m.value)return;const{left:T,right:Y,width:I}=m.value.getBoundingClientRect(),H=$.value?I-C.clientX+(Y-I):C.clientX-T;l.value=Math.round(H/I*k.value)}return V(()=>v(e.tag,{ref:m,class:["v-progress-linear",{"v-progress-linear--absolute":e.absolute,"v-progress-linear--active":e.active&&b.value,"v-progress-linear--reverse":$.value,"v-progress-linear--rounded":e.rounded,"v-progress-linear--rounded-bar":e.roundedBar,"v-progress-linear--striped":e.striped},f.value,o.value,n.value,e.class],style:[{bottom:e.location==="bottom"?0:void 0,top:e.location==="top"?0:void 0,height:e.active?w(d.value):0,"--v-progress-linear-height":w(d.value),...r.value},e.style],role:"progressbar","aria-hidden":e.active?"false":"true","aria-valuemin":"0","aria-valuemax":e.max,"aria-valuenow":e.indeterminate?void 0:L.value,onClick:e.clickable&&F},{default:()=>[e.stream&&v("div",{key:"stream",class:["v-progress-linear__stream",p.value],style:{...y.value,[$.value?"left":"right"]:w(-d.value),borderTop:`${w(d.value/2)} dotted`,opacity:q.value,top:`calc(50% - ${w(d.value/4)})`,width:w(100-_.value,"%"),"--v-progress-linear-stream-to":w(d.value*($.value?1:-1))}},null),v("div",{class:["v-progress-linear__background",h.value],style:[g.value,{opacity:q.value,width:w(e.stream?_.value:100,"%")}]},null),v(nt,{name:z.value},{default:()=>[e.indeterminate?v("div",{class:"v-progress-linear__indeterminate"},[["long","short"].map(C=>v("div",{key:C,class:["v-progress-linear__indeterminate",C,i.value],style:u.value},null))]):v("div",{class:["v-progress-linear__determinate",i.value],style:[u.value,{width:w(L.value,"%")}]},null)]}),a.default&&v("div",{class:"v-progress-linear__content"},[a.default({value:L.value,buffer:_.value})])]})),{}}}),At=x({loading:[Boolean,String]},"loader");function Pt(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:j();return{loaderClasses:c(()=>({[`${t}--loading`]:e.loading}))}}function la(e,t){var l;let{slots:a}=t;return v("div",{class:`${e.name}__loader`},[((l=a.default)==null?void 0:l.call(a,{color:e.color,isActive:e.active}))||v(Mt,{absolute:e.absolute,active:e.active,color:e.color,height:"2",indeterminate:!0},null)])}const jt=["static","relative","fixed","absolute","sticky"],qt=x({position:{type:String,validator:e=>jt.includes(e)}},"position");function Ht(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:j();return{positionClasses:c(()=>e.position?`${t}--${e.position}`:void 0)}}function Xt(){const e=te("useRoute");return c(()=>{var t;return(t=e==null?void 0:e.proxy)==null?void 0:t.$route})}function Gt(e,t){var y,h;const a=it("RouterLink"),l=c(()=>!!(e.href||e.to)),s=c(()=>(l==null?void 0:l.value)||ve(t,"click")||ve(e,"click"));if(typeof a=="string"||!("useLink"in a))return{isLink:l,isClickable:s,href:B(e,"href")};const n=c(()=>({...e,to:B(()=>e.to||{})})),o=a.useLink(n.value),r=c(()=>e.to?o:void 0),p=Xt();return{isLink:l,isClickable:s,route:(y=r.value)==null?void 0:y.route,navigate:(h=r.value)==null?void 0:h.navigate,isActive:c(()=>{var g,i,u;return r.value?e.exact?p.value?((g=r.value.isExactActive)==null?void 0:g.value)&&we(r.value.route.value.query,p.value.query):((i=r.value.isExactActive)==null?void 0:i.value)??!1:((u=r.value.isActive)==null?void 0:u.value)??!1:!1}),href:c(()=>{var g;return e.to?(g=r.value)==null?void 0:g.route.value.href:e.href})}}const Ft=x({href:String,replace:Boolean,to:[String,Object],exact:Boolean},"router");function Yt(e,t){le(()=>{var a;return(a=e.isActive)==null?void 0:a.value},a=>{e.isLink.value&&a&&t&&vt(()=>{t(!0)})},{immediate:!0})}const J=Symbol("rippleStop"),Wt=80;function ye(e,t){e.style.transform=t,e.style.webkitTransform=t}function Z(e){return e.constructor.name==="TouchEvent"}function Me(e){return e.constructor.name==="KeyboardEvent"}const Kt=function(e,t){var g;let a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},l=0,s=0;if(!Me(e)){const i=t.getBoundingClientRect(),u=Z(e)?e.touches[e.touches.length-1]:e;l=u.clientX-i.left,s=u.clientY-i.top}let n=0,o=.3;(g=t._ripple)!=null&&g.circle?(o=.15,n=t.clientWidth/2,n=a.center?n:n+Math.sqrt((l-n)**2+(s-n)**2)/4):n=Math.sqrt(t.clientWidth**2+t.clientHeight**2)/2;const r=`${(t.clientWidth-n*2)/2}px`,p=`${(t.clientHeight-n*2)/2}px`,y=a.center?r:`${l-n}px`,h=a.center?p:`${s-n}px`;return{radius:n,scale:o,x:y,y:h,centerX:r,centerY:p}},G={show(e,t){var u;let a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(!((u=t==null?void 0:t._ripple)!=null&&u.enabled))return;const l=document.createElement("span"),s=document.createElement("span");l.appendChild(s),l.className="v-ripple__container",a.class&&(l.className+=` ${a.class}`);const{radius:n,scale:o,x:r,y:p,centerX:y,centerY:h}=Kt(e,t,a),g=`${n*2}px`;s.className="v-ripple__animation",s.style.width=g,s.style.height=g,t.appendChild(l);const i=window.getComputedStyle(t);i&&i.position==="static"&&(t.style.position="relative",t.dataset.previousPosition="static"),s.classList.add("v-ripple__animation--enter"),s.classList.add("v-ripple__animation--visible"),ye(s,`translate(${r}, ${p}) scale3d(${o},${o},${o})`),s.dataset.activated=String(performance.now()),setTimeout(()=>{s.classList.remove("v-ripple__animation--enter"),s.classList.add("v-ripple__animation--in"),ye(s,`translate(${y}, ${h}) scale3d(1,1,1)`)},0)},hide(e){var n;if(!((n=e==null?void 0:e._ripple)!=null&&n.enabled))return;const t=e.getElementsByClassName("v-ripple__animation");if(t.length===0)return;const a=t[t.length-1];if(a.dataset.isHiding)return;a.dataset.isHiding="true";const l=performance.now()-Number(a.dataset.activated),s=Math.max(250-l,0);setTimeout(()=>{a.classList.remove("v-ripple__animation--in"),a.classList.add("v-ripple__animation--out"),setTimeout(()=>{var o;e.getElementsByClassName("v-ripple__animation").length===1&&e.dataset.previousPosition&&(e.style.position=e.dataset.previousPosition,delete e.dataset.previousPosition),((o=a.parentNode)==null?void 0:o.parentNode)===e&&e.removeChild(a.parentNode)},300)},s)}};function Ae(e){return typeof e>"u"||!!e}function N(e){const t={},a=e.currentTarget;if(!(!(a!=null&&a._ripple)||a._ripple.touched||e[J])){if(e[J]=!0,Z(e))a._ripple.touched=!0,a._ripple.isTouch=!0;else if(a._ripple.isTouch)return;if(t.center=a._ripple.centered||Me(e),a._ripple.class&&(t.class=a._ripple.class),Z(e)){if(a._ripple.showTimerCommit)return;a._ripple.showTimerCommit=()=>{G.show(e,a,t)},a._ripple.showTimer=window.setTimeout(()=>{var l;(l=a==null?void 0:a._ripple)!=null&&l.showTimerCommit&&(a._ripple.showTimerCommit(),a._ripple.showTimerCommit=null)},Wt)}else G.show(e,a,t)}}function be(e){e[J]=!0}function S(e){const t=e.currentTarget;if(t!=null&&t._ripple){if(window.clearTimeout(t._ripple.showTimer),e.type==="touchend"&&t._ripple.showTimerCommit){t._ripple.showTimerCommit(),t._ripple.showTimerCommit=null,t._ripple.showTimer=window.setTimeout(()=>{S(e)});return}window.setTimeout(()=>{t._ripple&&(t._ripple.touched=!1)}),G.hide(t)}}function Pe(e){const t=e.currentTarget;t!=null&&t._ripple&&(t._ripple.showTimerCommit&&(t._ripple.showTimerCommit=null),window.clearTimeout(t._ripple.showTimer))}let R=!1;function je(e){!R&&(e.keyCode===pe.enter||e.keyCode===pe.space)&&(R=!0,N(e))}function qe(e){R=!1,S(e)}function He(e){R&&(R=!1,S(e))}function Xe(e,t,a){const{value:l,modifiers:s}=t,n=Ae(l);if(n||G.hide(e),e._ripple=e._ripple??{},e._ripple.enabled=n,e._ripple.centered=s.center,e._ripple.circle=s.circle,mt(l)&&l.class&&(e._ripple.class=l.class),n&&!a){if(s.stop){e.addEventListener("touchstart",be,{passive:!0}),e.addEventListener("mousedown",be);return}e.addEventListener("touchstart",N,{passive:!0}),e.addEventListener("touchend",S,{passive:!0}),e.addEventListener("touchmove",Pe,{passive:!0}),e.addEventListener("touchcancel",S),e.addEventListener("mousedown",N),e.addEventListener("mouseup",S),e.addEventListener("mouseleave",S),e.addEventListener("keydown",je),e.addEventListener("keyup",qe),e.addEventListener("blur",He),e.addEventListener("dragstart",S,{passive:!0})}else!n&&a&&Ge(e)}function Ge(e){e.removeEventListener("mousedown",N),e.removeEventListener("touchstart",N),e.removeEventListener("touchend",S),e.removeEventListener("touchmove",Pe),e.removeEventListener("touchcancel",S),e.removeEventListener("mouseup",S),e.removeEventListener("mouseleave",S),e.removeEventListener("keydown",je),e.removeEventListener("keyup",qe),e.removeEventListener("dragstart",S),e.removeEventListener("blur",He)}function Ut(e,t){Xe(e,t,!1)}function Dt(e){delete e._ripple,Ge(e)}function Qt(e,t){if(t.value===t.oldValue)return;const a=Ae(t.oldValue);Xe(e,t,a)}const Jt={mounted:Ut,unmounted:Dt,updated:Qt},Zt=x({active:{type:Boolean,default:void 0},symbol:{type:null,default:ze},flat:Boolean,icon:[Boolean,String,Function,Object],prependIcon:U,appendIcon:U,block:Boolean,slim:Boolean,stacked:Boolean,ripple:{type:[Boolean,Object],default:!0},text:String,...xe(),...O(),...Le(),...ft(),...Se(),...$t(),...At(),...Re(),...qt(),...se(),...Ft(),...ie(),...M({tag:"button"}),...A(),...Ie({variant:"elevated"})},"VBtn"),sa=E()({name:"VBtn",directives:{Ripple:Jt},props:Zt(),emits:{"group:selected":e=>!0},setup(e,t){let{attrs:a,slots:l}=t;const{themeClasses:s}=P(e),{borderClasses:n}=$e(e),{colorClasses:o,colorStyles:r,variantClasses:p}=xt(e),{densityClasses:y}=Te(e),{dimensionStyles:h}=ht(e),{elevationClasses:g}=Be(e),{loaderClasses:i}=Pt(e),{locationStyles:u}=Oe(e),{positionClasses:f}=Ht(e),{roundedClasses:m}=ne(e),{sizeClasses:b,sizeStyles:k}=oe(e),d=Bt(e,e.symbol,!1),_=Gt(e,a),L=c(()=>{var C;return e.active!==void 0?e.active:_.isLink.value?(C=_.isActive)==null?void 0:C.value:d==null?void 0:d.isSelected.value}),$=c(()=>(d==null?void 0:d.disabled.value)||e.disabled),z=c(()=>e.variant==="elevated"&&!(e.disabled||e.flat||e.border)),q=c(()=>{if(!(e.value===void 0||typeof e.value=="symbol"))return Object(e.value)===e.value?JSON.stringify(e.value,null,0):e.value});function F(C){var T;$.value||_.isLink.value&&(C.metaKey||C.ctrlKey||C.shiftKey||C.button!==0||a.target==="_blank")||((T=_.navigate)==null||T.call(_,C),d==null||d.toggle())}return Yt(_,d==null?void 0:d.select),V(()=>{var re,ue;const C=_.isLink.value?"a":e.tag,T=!!(e.prependIcon||l.prepend),Y=!!(e.appendIcon||l.append),I=!!(e.icon&&e.icon!==!0),H=(d==null?void 0:d.isSelected.value)&&(!_.isLink.value||((re=_.isActive)==null?void 0:re.value))||!d||((ue=_.isActive)==null?void 0:ue.value);return ot(v(C,{type:C==="a"?void 0:"button",class:["v-btn",d==null?void 0:d.selectedClass.value,{"v-btn--active":L.value,"v-btn--block":e.block,"v-btn--disabled":$.value,"v-btn--elevated":z.value,"v-btn--flat":e.flat,"v-btn--icon":!!e.icon,"v-btn--loading":e.loading,"v-btn--slim":e.slim,"v-btn--stacked":e.stacked},s.value,n.value,H?o.value:void 0,y.value,g.value,i.value,f.value,m.value,b.value,p.value,e.class],style:[H?r.value:void 0,h.value,u.value,k.value,e.style],"aria-busy":e.loading?!0:void 0,disabled:$.value||void 0,href:_.href.value,tabindex:e.loading?-1:void 0,onClick:F,value:q.value},{default:()=>{var ce;return[wt(!0,"v-btn"),!e.icon&&T&&v("span",{key:"prepend",class:"v-btn__prepend"},[l.prepend?v(W,{key:"prepend-defaults",disabled:!e.prependIcon,defaults:{VIcon:{icon:e.prependIcon}}},l.prepend):v(K,{key:"prepend-icon",icon:e.prependIcon},null)]),v("span",{class:"v-btn__content","data-no-activator":""},[!l.default&&I?v(K,{key:"content-icon",icon:e.icon},null):v(W,{key:"content-defaults",disabled:!I,defaults:{VIcon:{icon:e.icon}}},{default:()=>{var de;return[((de=l.default)==null?void 0:de.call(l))??e.text]}})]),!e.icon&&Y&&v("span",{key:"append",class:"v-btn__append"},[l.append?v(W,{key:"append-defaults",disabled:!e.appendIcon,defaults:{VIcon:{icon:e.appendIcon}}},l.append):v(K,{key:"append-icon",icon:e.appendIcon},null)]),!!e.loading&&v("span",{key:"loader",class:"v-btn__loader"},[((ce=l.loader)==null?void 0:ce.call(l))??v(Rt,{color:typeof e.loading=="boolean"?void 0:e.loading,indeterminate:!0,size:"23",width:"2"},null)])]}}),[[rt("ripple"),!$.value&&e.ripple,null]])}),{group:d}}});export{Ht as A,qt as O,Re as P,la as Q,At as R,Le as S,Oe as T,K as W,Lt as a,sa as e,Zt as j,St as k,Te as x,Pt as z}; diff --git a/pr-preview/pr-2/assets/chunks/VMain-BHfWJU2j.ByWWJTS2.js b/pr-preview/pr-2/assets/chunks/VMain-BHfWJU2j.ByWWJTS2.js deleted file mode 100644 index 85890dd..0000000 --- a/pr-preview/pr-2/assets/chunks/VMain-BHfWJU2j.ByWWJTS2.js +++ /dev/null @@ -1 +0,0 @@ -import{e as n,U as c,y as m,Y as p,a3 as u,L as y,b as t}from"./eo-dash.Bz0AiLIy.js";import{i as b}from"./ssrBoot-D-b4-M19.5KPN_o8O.js";const f=n({scrollable:Boolean,...c(),...m({tag:"main"})},"VMain"),V=p()({name:"VMain",props:f(),setup(a,o){let{slots:l}=o;const{mainStyles:r}=u(),{ssrBootStyles:i}=b();return y(()=>t(a.tag,{class:["v-main",{"v-main--scrollable":a.scrollable},a.class],style:[r.value,i.value,a.style]},{default:()=>{var s,e;return[a.scrollable?t("div",{class:"v-main__scroller"},[(s=l.default)==null?void 0:s.call(l)]):(e=l.default)==null?void 0:e.call(l)]}})),{}}});export{V}; diff --git a/pr-preview/pr-2/assets/chunks/WidgetsContainer-DxfCu0I3.DPGt-1ZD.js b/pr-preview/pr-2/assets/chunks/WidgetsContainer-DxfCu0I3.DPGt-1ZD.js deleted file mode 100644 index 7308dc5..0000000 --- a/pr-preview/pr-2/assets/chunks/WidgetsContainer-DxfCu0I3.DPGt-1ZD.js +++ /dev/null @@ -1 +0,0 @@ -import{a2 as p,f as s,v as f,a3 as g,k as u,a4 as x,J as v,$ as y,t as l,a5 as d,a6 as k,O as E,a7 as C,a8 as w,a9 as H,aa as _}from"./eo-dash.Bz0AiLIy.js";import"./framework.CCzXaKCO.js";class $ extends HTMLDetailsElement{constructor(){super()}connectedCallback(){this.el=this,this.summary=this.querySelector("summary"),this.content=this.lastElementChild,this.animation=null,this.isClosing=!1,this.isExpanding=!1,this.summary.addEventListener("click",i=>this.onClick(i))}onClick(i){i==null||i.preventDefault(),this.el.style.overflow="hidden",this.isClosing||!this.el.open?this.doOpen():(this.isExpanding||this.el.open)&&this.shrink()}shrink(){this.isClosing=!0;const i=`${this.el.offsetHeight}px`,t=`${this.summary.offsetHeight}px`;this.animation&&this.animation.cancel(),this.animation=this.el.animate({height:[i,t]},{duration:300,easing:"ease-out"}),this.animation.onfinish=()=>this.onAnimationFinish(!1),this.animation.oncancel=()=>this.isClosing=!1}doOpen(){this.el.style.height=`${this.el.offsetHeight}px`,this.el.open=!0,window.requestAnimationFrame(()=>this.expand()),this.parentElement.querySelectorAll("details[open][exclusive]").forEach(i=>{i!==this&&i.onClick()})}expand(){this.isExpanding=!0;const i=`${this.el.offsetHeight}px`,t=`${this.summary.offsetHeight+this.content.offsetHeight}px`;this.animation&&this.animation.cancel(),this.animation=this.el.animate({height:[i,t]},{duration:300,easing:"ease-out"}),this.animation.onfinish=()=>this.onAnimationFinish(!0),this.animation.oncancel=()=>this.isExpanding=!1}onAnimationFinish(i){this.el.open=i,this.animation=null,this.isClosing=!1,this.isExpanding=!1,this.el.style.height=this.el.style.overflow=""}}customElements.define("animated-details",$,{extends:"details"});const F={__name:"WidgetsContainer",props:{widgets:{type:Array,required:!0}},setup(o){const i=p(o.widgets),t=s([]),h=s([]),r=s(""),m=s(0);return f(()=>{var n;m.value=h.value.reduce((e,a)=>e+=a.clientHeight,0);const{mainRect:c}=g();r.value=(((n=t.value[0].parentElement)==null?void 0:n.scrollHeight)??0)-m.value-c.value.top+"px"}),(c,n)=>(l(!0),u(y,null,x(v(i),(e,a)=>(l(),u("details",{is:"animated-details",ref_for:!0,ref_key:"detailsEls",ref:t,key:a,class:"overflow-auto",exclusive:""},[d("summary",{ref_for:!0,ref_key:"summaryEls",ref:h},k(e.value.title),513),d("span",{style:_({height:r.value}),class:"d-flex flex-column"},[(l(),E(H(e.value.component),C(w(e.value.props)),null,16))],4)]))),128))}};export{F as default}; diff --git a/pr-preview/pr-2/assets/chunks/basedecoder-Qm25PwVp-CHo5Pomv.CXiqZbVR.js b/pr-preview/pr-2/assets/chunks/basedecoder-Qm25PwVp-CHo5Pomv.CXiqZbVR.js deleted file mode 100644 index 448054b..0000000 --- a/pr-preview/pr-2/assets/chunks/basedecoder-Qm25PwVp-CHo5Pomv.CXiqZbVR.js +++ /dev/null @@ -1 +0,0 @@ -function h(n,r){let t=n.length-r,l=0;do{for(let o=r;o>0;o--)n[l+r]+=n[l],l++;t-=r}while(t>0)}function f(n,r,t){let l=0,o=n.length;const c=o/t;for(;o>r;){for(let e=r;e>0;--e)n[l+r]+=n[l],++l;o-=r}const a=n.slice();for(let e=0;e=n.byteLength);++s){let i;if(r===2){switch(o[0]){case 8:i=new Uint8Array(n,s*e*t*a,e*t*a);break;case 16:i=new Uint16Array(n,s*e*t*a,e*t*a/2);break;case 32:i=new Uint32Array(n,s*e*t*a,e*t*a/4);break;default:throw new Error(`Predictor 2 not allowed with ${o[0]} bits per sample.`)}h(i,e)}else r===3&&(i=new Uint8Array(n,s*e*t*a,e*t*a),f(i,e,a))}return n}class w{async decode(r,t){const l=await this.decodeBlock(t),o=r.Predictor||1;if(o!==1){const c=!r.StripOffsets,a=c?r.TileWidth:r.ImageWidth,e=c?r.TileLength:r.RowsPerStrip||r.ImageLength;return d(l,o,a,e,r.BitsPerSample,r.PlanarConfiguration)}return l}}export{w}; diff --git a/pr-preview/pr-2/assets/chunks/color-DpYEub1f.C1TESEKr.js b/pr-preview/pr-2/assets/chunks/color-DpYEub1f.C1TESEKr.js deleted file mode 100644 index 2c41335..0000000 --- a/pr-preview/pr-2/assets/chunks/color-DpYEub1f.C1TESEKr.js +++ /dev/null @@ -1 +0,0 @@ -import{e as a,m as c,X as l,aJ as s,au as v,aK as u,aL as g,aM as f,aN as b}from"./eo-dash.Bz0AiLIy.js";const C=a({border:[Boolean,Number,String]},"border");function y(o){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:c();return{borderClasses:l(()=>{const t=s(o)?o.value:o.border,e=[];if(t===!0||t==="")e.push(`${r}--border`);else if(typeof t=="string"||t===0)for(const n of String(t).split(" "))e.push(`border-${n}`);return e})}}const k=a({elevation:{type:[Number,String],validator(o){const r=parseInt(o);return!isNaN(r)&&r>=0&&r<=24}}},"elevation");function m(o){return{elevationClasses:l(()=>{const r=s(o)?o.value:o.elevation,t=[];return r==null||t.push(`elevation-${r}`),t})}}const x=a({rounded:{type:[Boolean,Number,String],default:void 0},tile:Boolean},"rounded");function S(o){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:c();return{roundedClasses:l(()=>{const t=s(o)?o.value:o.rounded,e=s(o)?o.value:o.tile,n=[];if(t===!0||t==="")n.push(`${r}--rounded`);else if(typeof t=="string"||t===0)for(const d of String(t).split(" "))n.push(`rounded-${d}`);else e&&n.push("rounded-0");return n})}}function i(o){return v(()=>{const r=[],t={};if(o.value.background)if(u(o.value.background)){if(t.backgroundColor=o.value.background,!o.value.text&&g(o.value.background)){const e=f(o.value.background);if(e.a==null||e.a===1){const n=b(e);t.color=n,t.caretColor=n}}}else r.push(`bg-${o.value.background}`);return o.value.text&&(u(o.value.text)?(t.color=o.value.text,t.caretColor=o.value.text):r.push(`text-${o.value.text}`)),{colorClasses:r,colorStyles:t}})}function h(o,r){const t=l(()=>({text:s(o)?o.value:r?o[r]:null})),{colorClasses:e,colorStyles:n}=i(t);return{textColorClasses:e,textColorStyles:n}}function $(o,r){const t=l(()=>({background:s(o)?o.value:r?o[r]:null})),{colorClasses:e,colorStyles:n}=i(t);return{backgroundColorClasses:e,backgroundColorStyles:n}}export{h as $,S as B,$ as N,x as S,m as h,i,C as k,y as x,k as y}; diff --git a/pr-preview/pr-2/assets/chunks/commonjsHelpers-DaMA6jEr.DwXtFsJ3.js b/pr-preview/pr-2/assets/chunks/commonjsHelpers-DaMA6jEr.DwXtFsJ3.js deleted file mode 100644 index 44a86b5..0000000 --- a/pr-preview/pr-2/assets/chunks/commonjsHelpers-DaMA6jEr.DwXtFsJ3.js +++ /dev/null @@ -1 +0,0 @@ -var l=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function t(o){return o&&o.__esModule&&Object.prototype.hasOwnProperty.call(o,"default")?o.default:o}export{t as l,l as o}; diff --git a/pr-preview/pr-2/assets/chunks/config.data.TKfgcGHH.js b/pr-preview/pr-2/assets/chunks/config.data.TKfgcGHH.js deleted file mode 100644 index fe829ff..0000000 --- a/pr-preview/pr-2/assets/chunks/config.data.TKfgcGHH.js +++ /dev/null @@ -1 +0,0 @@ -const e=JSON.parse('{"example1":{"title":"Story title first example","file":"/storyfiles/firststory.md"},"example2":{"title":"Story title second example","file":"/storyfiles/secondstory.md"}}');export{e as d}; diff --git a/pr-preview/pr-2/assets/chunks/decoder-kAoyGIq9-BBR5CgzS.DzeLK-aU.js b/pr-preview/pr-2/assets/chunks/decoder-kAoyGIq9-BBR5CgzS.DzeLK-aU.js deleted file mode 100644 index 5200c42..0000000 --- a/pr-preview/pr-2/assets/chunks/decoder-kAoyGIq9-BBR5CgzS.DzeLK-aU.js +++ /dev/null @@ -1 +0,0 @@ -import{V as e}from"./EodashMap-Bxl_aqY2.BFSWz631.js";import"./framework.CCzXaKCO.js";import"./eo-dash.Bz0AiLIy.js";import"./commonjsHelpers-DaMA6jEr.DwXtFsJ3.js";import"./DynamicWebComponent-BrHVTesn.BNJLct30.js";var t=Worker;const i=e(t);function o(){const A='function A(A,e,t,i,r,I,g){try{var n=A[I](g),a=n.value}catch(A){return void t(A)}n.done?e(a):Promise.resolve(a).then(i,r)}function e(e){return function(){var t=this,i=arguments;return new Promise((function(r,I){var g=e.apply(t,i);function n(e){A(g,r,I,n,a,"next",e)}function a(e){A(g,r,I,n,a,"throw",e)}n(void 0)}))}}function t(A){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(A){return typeof A}:function(A){return A&&"function"==typeof Symbol&&A.constructor===Symbol&&A!==Symbol.prototype?"symbol":typeof A},t(A)}var i={exports:{}};!function(A){var e=function(A){var e,i=Object.prototype,r=i.hasOwnProperty,I="function"==typeof Symbol?Symbol:{},g=I.iterator||"@@iterator",n=I.asyncIterator||"@@asyncIterator",a=I.toStringTag||"@@toStringTag";function o(A,e,t){return Object.defineProperty(A,e,{value:t,enumerable:!0,configurable:!0,writable:!0}),A[e]}try{o({},"")}catch(A){o=function(A,e,t){return A[e]=t}}function B(A,e,t,i){var r=e&&e.prototype instanceof h?e:h,I=Object.create(r.prototype),g=new S(i||[]);return I._invoke=function(A,e,t){var i=Q;return function(r,I){if(i===s)throw new Error("Generator is already running");if(i===f){if("throw"===r)throw I;return R()}for(t.method=r,t.arg=I;;){var g=t.delegate;if(g){var n=m(g,t);if(n){if(n===c)continue;return n}}if("next"===t.method)t.sent=t._sent=t.arg;else if("throw"===t.method){if(i===Q)throw i=f,t.arg;t.dispatchException(t.arg)}else"return"===t.method&&t.abrupt("return",t.arg);i=s;var a=C(A,e,t);if("normal"===a.type){if(i=t.done?f:E,a.arg===c)continue;return{value:a.arg,done:t.done}}"throw"===a.type&&(i=f,t.method="throw",t.arg=a.arg)}}}(A,t,g),I}function C(A,e,t){try{return{type:"normal",arg:A.call(e,t)}}catch(A){return{type:"throw",arg:A}}}A.wrap=B;var Q="suspendedStart",E="suspendedYield",s="executing",f="completed",c={};function h(){}function l(){}function u(){}var w={};o(w,g,(function(){return this}));var d=Object.getPrototypeOf,D=d&&d(d(v([])));D&&D!==i&&r.call(D,g)&&(w=D);var y=u.prototype=h.prototype=Object.create(w);function k(A){["next","throw","return"].forEach((function(e){o(A,e,(function(A){return this._invoke(e,A)}))}))}function p(A,e){function i(I,g,n,a){var o=C(A[I],A,g);if("throw"!==o.type){var B=o.arg,Q=B.value;return Q&&"object"===t(Q)&&r.call(Q,"__await")?e.resolve(Q.__await).then((function(A){i("next",A,n,a)}),(function(A){i("throw",A,n,a)})):e.resolve(Q).then((function(A){B.value=A,n(B)}),(function(A){return i("throw",A,n,a)}))}a(o.arg)}var I;this._invoke=function(A,t){function r(){return new e((function(e,r){i(A,t,e,r)}))}return I=I?I.then(r,r):r()}}function m(A,t){var i=A.iterator[t.method];if(i===e){if(t.delegate=null,"throw"===t.method){if(A.iterator.return&&(t.method="return",t.arg=e,m(A,t),"throw"===t.method))return c;t.method="throw",t.arg=new TypeError("The iterator does not provide a \'throw\' method")}return c}var r=C(i,A.iterator,t.arg);if("throw"===r.type)return t.method="throw",t.arg=r.arg,t.delegate=null,c;var I=r.arg;return I?I.done?(t[A.resultName]=I.value,t.next=A.nextLoc,"return"!==t.method&&(t.method="next",t.arg=e),t.delegate=null,c):I:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,c)}function G(A){var e={tryLoc:A[0]};1 in A&&(e.catchLoc=A[1]),2 in A&&(e.finallyLoc=A[2],e.afterLoc=A[3]),this.tryEntries.push(e)}function F(A){var e=A.completion||{};e.type="normal",delete e.arg,A.completion=e}function S(A){this.tryEntries=[{tryLoc:"root"}],A.forEach(G,this),this.reset(!0)}function v(A){if(A){var t=A[g];if(t)return t.call(A);if("function"==typeof A.next)return A;if(!isNaN(A.length)){var i=-1,I=function t(){for(;++i=0;--I){var g=this.tryEntries[I],n=g.completion;if("root"===g.tryLoc)return i("end");if(g.tryLoc<=this.prev){var a=r.call(g,"catchLoc"),o=r.call(g,"finallyLoc");if(a&&o){if(this.prev=0;--t){var i=this.tryEntries[t];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev=0;--e){var t=this.tryEntries[e];if(t.finallyLoc===A)return this.complete(t.completion,t.afterLoc),F(t),c}},catch:function(A){for(var e=this.tryEntries.length-1;e>=0;--e){var t=this.tryEntries[e];if(t.tryLoc===A){var i=t.completion;if("throw"===i.type){var r=i.arg;F(t)}return r}}throw new Error("illegal catch attempt")},delegateYield:function(A,t,i){return this.delegate={iterator:v(A),resultName:t,nextLoc:i},"next"===this.method&&(this.arg=e),c}},A}(A.exports);try{regeneratorRuntime=e}catch(A){"object"===("undefined"==typeof globalThis?"undefined":t(globalThis))?globalThis.regeneratorRuntime=e:Function("r","regeneratorRuntime = r")(e)}}(i);var r=i.exports,I=new Map;function g(A,e){Array.isArray(A)||(A=[A]),A.forEach((function(A){return I.set(A,e)}))}function n(A){return a.apply(this,arguments)}function a(){return(a=e(r.mark((function A(e){var t,i;return r.wrap((function(A){for(;;)switch(A.prev=A.next){case 0:if(t=I.get(e.Compression)){A.next=3;break}throw new Error("Unknown compression method identifier: ".concat(e.Compression));case 3:return A.next=5,t();case 5:return i=A.sent,A.abrupt("return",new i(e));case 7:case"end":return A.stop()}}),A)})))).apply(this,arguments)}g([void 0,1],(function(){return Promise.resolve().then((function(){return y})).then((function(A){return A.default}))})),g(5,(function(){return Promise.resolve().then((function(){return F})).then((function(A){return A.default}))})),g(6,(function(){throw new Error("old style JPEG compression is not supported.")})),g(7,(function(){return Promise.resolve().then((function(){return N})).then((function(A){return A.default}))})),g([8,32946],(function(){return Promise.resolve().then((function(){return OA})).then((function(A){return A.default}))})),g(32773,(function(){return Promise.resolve().then((function(){return _A})).then((function(A){return A.default}))})),g(34887,(function(){return Promise.resolve().then((function(){return le})).then(function(){var A=e(r.mark((function A(e){return r.wrap((function(A){for(;;)switch(A.prev=A.next){case 0:return A.next=2,e.zstd.init();case 2:return A.abrupt("return",e);case 3:case"end":return A.stop()}}),A)})));return function(e){return A.apply(this,arguments)}}()).then((function(A){return A.default}))})),g(50001,(function(){return Promise.resolve().then((function(){return de})).then((function(A){return A.default}))}));var o=globalThis;function B(A,e){if(!(A instanceof e))throw new TypeError("Cannot call a class as a function")}function C(A,e){for(var t=0;t0;r--)A[i+e]+=A[i],i++;t-=e}while(t>0)}function l(A,e,t){for(var i=0,r=A.length,I=r/t;r>e;){for(var g=e;g>0;--g)A[i+e]+=A[i],++i;r-=e}for(var n=A.slice(),a=0;a=A.byteLength);++o){var B=void 0;if(2===e){switch(r[0]){case 8:B=new Uint8Array(A,o*a*t*n,a*t*n);break;case 16:B=new Uint16Array(A,o*a*t*n,a*t*n/2);break;case 32:B=new Uint32Array(A,o*a*t*n,a*t*n/4);break;default:throw new Error("Predictor 2 not allowed with ".concat(r[0]," bits per sample."))}h(B,a)}else 3===e&&l(B=new Uint8Array(A,o*a*t*n,a*t*n),a,n)}return A}o.addEventListener("message",function(){var A=e(r.mark((function A(e){var t,i,I,g,a,B;return r.wrap((function(A){for(;;)switch(A.prev=A.next){case 0:return t=e.data,i=t.id,I=t.fileDirectory,g=t.buffer,A.next=3,n(I);case 3:return a=A.sent,A.next=6,a.decode(I,g);case 6:B=A.sent,o.postMessage({decoded:B,id:i},[B]);case 8:case"end":return A.stop()}}),A)})));return function(e){return A.apply(this,arguments)}}());var w=function(){function A(){B(this,A)}var t;return Q(A,[{key:"decode",value:(t=e(r.mark((function A(e,t){var i,I,g,n,a;return r.wrap((function(A){for(;;)switch(A.prev=A.next){case 0:return A.next=2,this.decodeBlock(t);case 2:if(i=A.sent,1===(I=e.Predictor||1)){A.next=9;break}return g=!e.StripOffsets,n=g?e.TileWidth:e.ImageWidth,a=g?e.TileLength:e.RowsPerStrip||e.ImageLength,A.abrupt("return",u(i,I,n,a,e.BitsPerSample,e.PlanarConfiguration));case 9:return A.abrupt("return",i);case 10:case"end":return A.stop()}}),A,this)}))),function(A,e){return t.apply(this,arguments)})}]),A}();function d(A){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(A){return!1}}();return function(){var t,i=c(A);if(e){var r=c(this).constructor;t=Reflect.construct(i,arguments,r)}else t=i.apply(this,arguments);return f(this,t)}}var D=function(A){s(t,w);var e=d(t);function t(){return B(this,t),e.apply(this,arguments)}return Q(t,[{key:"decodeBlock",value:function(A){return A}}]),t}(),y=Object.freeze({__proto__:null,default:D});function k(A){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(A){return!1}}();return function(){var t,i=c(A);if(e){var r=c(this).constructor;t=Reflect.construct(i,arguments,r)}else t=i.apply(this,arguments);return f(this,t)}}function p(A,e){for(var t=e.length-1;t>=0;t--)A.push(e[t]);return A}function m(A){for(var e=new Uint16Array(4093),t=new Uint8Array(4093),i=0;i<=257;i++)e[i]=4096,t[i]=i;var r=258,I=9,g=0;function n(){r=258,I=9}function a(A){var e=function(A,e,t){var i=e%8,r=Math.floor(e/8),I=8-i,g=e+t-8*(r+1),n=8*(r+2)-(e+t),a=8*(r+2)-e;if(n=Math.max(0,n),r>=A.length)return console.warn("ran off the end of the buffer before finding EOI_CODE (end on input code)"),257;var o=A[r]&Math.pow(2,8-i)-1,B=o<<=t-I;if(r+1>>n;B+=C<<=Math.max(0,t-a)}if(g>8&&r+2>>Q}return B}(A,g,I);return g+=I,e}function o(A,i){return t[r]=i,e[r]=A,++r-1}function B(A){for(var i=[],r=A;4096!==r;r=e[r])i.push(t[r]);return i}var C=[];n();for(var Q,E=new Uint8Array(A),s=a(E);257!==s;){if(256===s){for(n(),s=a(E);256===s;)s=a(E);if(257===s)break;if(s>256)throw new Error("corrupted code at scanline ".concat(s));p(C,B(s)),Q=s}else if(s=Math.pow(2,I)&&(12===I?Q=void 0:I++),s=a(E)}return new Uint8Array(C)}var G=function(A){s(t,w);var e=k(t);function t(){return B(this,t),e.apply(this,arguments)}return Q(t,[{key:"decodeBlock",value:function(A){return m(A).buffer}}]),t}(),F=Object.freeze({__proto__:null,default:G});function S(A){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(A){return!1}}();return function(){var t,i=c(A);if(e){var r=c(this).constructor;t=Reflect.construct(i,arguments,r)}else t=i.apply(this,arguments);return f(this,t)}}var v=new Int32Array([0,1,8,16,9,2,3,10,17,24,32,25,18,11,4,5,12,19,26,33,40,48,41,34,27,20,13,6,7,14,21,28,35,42,49,56,57,50,43,36,29,22,15,23,30,37,44,51,58,59,52,45,38,31,39,46,53,60,61,54,47,55,62,63]);function R(A,e){for(var t=0,i=[],r=16;r>0&&!A[r-1];)--r;i.push({children:[],index:0});for(var I,g=i[0],n=0;n0;)g=i.pop();for(g.index++,i.push(g);i.length<=n;)i.push(I={children:[],index:0}),g.children[g.index]=I.children,g=I;t++}n+10)return f--,s>>f&1;if(255===(s=A[E++])){var e=A[E++];if(e)throw new Error("unexpected marker: ".concat((s<<8|e).toString(16)))}return f=7,s>>>7}function h(A){for(var e,i=A;null!==(e=c());){if("number"==typeof(i=i[e]))return i;if("object"!==t(i))throw new Error("invalid huffman sequence")}return null}function l(A){for(var e=A,t=0;e>0;){var i=c();if(null===i)return;t=t<<1|i,--e}return t}function u(A){var e=l(A);return e>=1<0)w--;else for(var t=g,i=n;t<=i;){var r=h(A.huffmanTableAC),I=15&r,a=r>>4;if(0===I){if(a<15){w=l(a)+(1<>4,0===C)r<15?(w=l(r)+(1<>4;if(0===g){if(n<15)break;r+=16}else e[v[r+=n]]=u(g),r++}};var L,b,M=0;b=1===U?r[0].blocksPerLine*r[0].blocksPerColumn:B*i.mcusPerColumn;for(var N=I||b;M=65488&&L<=65495))break;E+=2}return E-Q}function L(A,e){var t=[],i=e.blocksPerLine,r=e.blocksPerColumn,I=i<<3,g=new Int32Array(64),n=new Uint8Array(64);function a(A,t,i){var r,I,g,n,a,o,B,C,Q,E,s=e.quantizationTable,f=i;for(E=0;E<64;E++)f[E]=A[E]*s[E];for(E=0;E<8;++E){var c=8*E;0!==f[1+c]||0!==f[2+c]||0!==f[3+c]||0!==f[4+c]||0!==f[5+c]||0!==f[6+c]||0!==f[7+c]?(r=5793*f[0+c]+128>>8,I=5793*f[4+c]+128>>8,g=f[2+c],n=f[6+c],a=2896*(f[1+c]-f[7+c])+128>>8,C=2896*(f[1+c]+f[7+c])+128>>8,o=f[3+c]<<4,Q=r-I+1>>1,r=r+I+1>>1,I=Q,Q=3784*g+1567*n+128>>8,g=1567*g-3784*n+128>>8,n=Q,Q=a-(B=f[5+c]<<4)+1>>1,a=a+B+1>>1,B=Q,Q=C+o+1>>1,o=C-o+1>>1,C=Q,Q=r-n+1>>1,r=r+n+1>>1,n=Q,Q=I-g+1>>1,I=I+g+1>>1,g=Q,Q=2276*a+3406*C+2048>>12,a=3406*a-2276*C+2048>>12,C=Q,Q=799*o+4017*B+2048>>12,o=4017*o-799*B+2048>>12,B=Q,f[0+c]=r+C,f[7+c]=r-C,f[1+c]=I+B,f[6+c]=I-B,f[2+c]=g+o,f[5+c]=g-o,f[3+c]=n+a,f[4+c]=n-a):(Q=5793*f[0+c]+512>>10,f[0+c]=Q,f[1+c]=Q,f[2+c]=Q,f[3+c]=Q,f[4+c]=Q,f[5+c]=Q,f[6+c]=Q,f[7+c]=Q)}for(E=0;E<8;++E){var h=E;0!==f[8+h]||0!==f[16+h]||0!==f[24+h]||0!==f[32+h]||0!==f[40+h]||0!==f[48+h]||0!==f[56+h]?(r=5793*f[0+h]+2048>>12,I=5793*f[32+h]+2048>>12,g=f[16+h],n=f[48+h],a=2896*(f[8+h]-f[56+h])+2048>>12,C=2896*(f[8+h]+f[56+h])+2048>>12,o=f[24+h],Q=r-I+1>>1,r=r+I+1>>1,I=Q,Q=3784*g+1567*n+2048>>12,g=1567*g-3784*n+2048>>12,n=Q,Q=a-(B=f[40+h])+1>>1,a=a+B+1>>1,B=Q,Q=C+o+1>>1,o=C-o+1>>1,C=Q,Q=r-n+1>>1,r=r+n+1>>1,n=Q,Q=I-g+1>>1,I=I+g+1>>1,g=Q,Q=2276*a+3406*C+2048>>12,a=3406*a-2276*C+2048>>12,C=Q,Q=799*o+4017*B+2048>>12,o=4017*o-799*B+2048>>12,B=Q,f[0+h]=r+C,f[56+h]=r-C,f[8+h]=I+B,f[48+h]=I-B,f[16+h]=g+o,f[40+h]=g-o,f[24+h]=n+a,f[32+h]=n-a):(Q=5793*i[E+0]+8192>>14,f[0+h]=Q,f[8+h]=Q,f[16+h]=Q,f[24+h]=Q,f[32+h]=Q,f[40+h]=Q,f[48+h]=Q,f[56+h]=Q)}for(E=0;E<64;++E){var l=128+(f[E]+8>>4);t[E]=l<0?0:l>255?255:l}}for(var o=0;o>4==0)for(var C=0;C<64;C++){B[v[C]]=A[e++]}else{if(o>>4!=1)throw new Error("DQT: invalid table spec");for(var Q=0;Q<64;Q++){B[v[Q]]=t()}}this.quantizationTables[15&o]=B}break;case 65472:case 65473:case 65474:t();for(var E={extended:65473===g,progressive:65474===g,precision:A[e++],scanLines:t(),samplesPerLine:t(),components:{},componentsOrder:[]},s=A[e++],f=void 0,c=0;c>4,l=15&A[e+1],u=A[e+2];E.componentsOrder.push(f),E.components[f]={h:h,v:l,quantizationIdx:u},e+=3}i(E),this.frames.push(E);break;case 65476:for(var w=t(),d=2;d>4==0?this.huffmanTablesDC[15&D]=R(y,m):this.huffmanTablesAC[15&D]=R(y,m)}break;case 65501:t(),this.resetInterval=t();break;case 65498:t();for(var F=A[e++],S=[],L=this.frames[0],b=0;b>4],M.huffmanTableAC=this.huffmanTablesAC[15&N],S.push(M)}var x=A[e++],J=A[e++],q=A[e++],Y=U(A,e,L,S,this.resetInterval,x,J,q>>4,15&q);e+=Y;break;case 65535:255!==A[e]&&e--;break;default:if(255===A[e-3]&&A[e-2]>=192&&A[e-2]<=254){e-=3;break}throw new Error("unknown JPEG marker ".concat(g.toString(16)))}g=t()}}},{key:"getResult",value:function(){var A=this.frames;if(0===this.frames.length)throw new Error("no frames were decoded");this.frames.length>1&&console.warn("more than one frame is not supported");for(var e=0;e=0;)A[e]=0}x(new Array(576)),x(new Array(60)),x(new Array(512)),x(new Array(256)),x(new Array(29)),x(new Array(30));var J=function(A,e,t,i){for(var r=65535&A|0,I=A>>>16&65535|0,g=0;0!==t;){t-=g=t>2e3?2e3:t;do{I=I+(r=r+e[i++]|0)|0}while(--g);r%=65521,I%=65521}return r|I<<16|0},q=new Uint32Array(function(){for(var A,e=[],t=0;t<256;t++){A=t;for(var i=0;i<8;i++)A=1&A?3988292384^A>>>1:A>>>1;e[t]=A}return e}()),Y=function(A,e,t,i){var r=q,I=i+t;A^=-1;for(var g=i;g>>8^r[255&(A^e[g])];return-1^A},K={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"},H={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8},O=function(A,e){return Object.prototype.hasOwnProperty.call(A,e)},P=function(A){for(var e=Array.prototype.slice.call(arguments,1);e.length;){var i=e.shift();if(i){if("object"!==t(i))throw new TypeError(i+"must be non-object");for(var r in i)O(i,r)&&(A[r]=i[r])}}return A},T=function(A){for(var e=0,t=0,i=A.length;t=252?6:X>=248?5:X>=240?4:X>=224?3:X>=192?2:1;_[254]=_[254]=1;var Z=function(A){if("function"==typeof TextEncoder&&TextEncoder.prototype.encode)return(new TextEncoder).encode(A);var e,t,i,r,I,g=A.length,n=0;for(r=0;r>>6,e[I++]=128|63&t):t<65536?(e[I++]=224|t>>>12,e[I++]=128|t>>>6&63,e[I++]=128|63&t):(e[I++]=240|t>>>18,e[I++]=128|t>>>12&63,e[I++]=128|t>>>6&63,e[I++]=128|63&t);return e},j=function(A,e){var t,i,r=e||A.length;if("function"==typeof TextDecoder&&TextDecoder.prototype.decode)return(new TextDecoder).decode(A.subarray(0,e));var I=new Array(2*r);for(i=0,t=0;t4)I[i++]=65533,t+=n-1;else{for(g&=2===n?31:3===n?15:7;n>1&&t1?I[i++]=65533:g<65536?I[i++]=g:(g-=65536,I[i++]=55296|g>>10&1023,I[i++]=56320|1023&g)}}}return function(A,e){if(e<65534&&A.subarray&&V)return String.fromCharCode.apply(null,A.length===e?A:A.subarray(0,e));for(var t="",i=0;iA.length&&(e=A.length);for(var t=e-1;t>=0&&128==(192&A[t]);)t--;return t<0||0===t?e:t+_[A[t]]>e?t:e};var z=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0},$=function(A,e){var t,i,r,I,g,n,a,o,B,C,Q,E,s,f,c,h,l,u,w,d,D,y,k,p,m=A.state;t=A.next_in,k=A.input,i=t+(A.avail_in-5),r=A.next_out,p=A.output,I=r-(e-A.avail_out),g=r+(A.avail_out-257),n=m.dmax,a=m.wsize,o=m.whave,B=m.wnext,C=m.window,Q=m.hold,E=m.bits,s=m.lencode,f=m.distcode,c=(1<>>=u=l>>>24,E-=u,0===(u=l>>>16&255))p[r++]=65535&l;else{if(!(16&u)){if(0==(64&u)){l=s[(65535&l)+(Q&(1<>>=u,E-=u),E<15&&(Q+=k[t++]<>>=u=l>>>24,E-=u,!(16&(u=l>>>16&255))){if(0==(64&u)){l=f[(65535&l)+(Q&(1<n){A.msg="invalid distance too far back",m.mode=30;break A}if(Q>>>=u,E-=u,d>(u=r-I)){if((u=d-u)>o&&m.sane){A.msg="invalid distance too far back",m.mode=30;break A}if(D=0,y=C,0===B){if(D+=a-u,u2;)p[r++]=y[D++],p[r++]=y[D++],p[r++]=y[D++],w-=3;w&&(p[r++]=y[D++],w>1&&(p[r++]=y[D++]))}else{D=r-d;do{p[r++]=p[D++],p[r++]=p[D++],p[r++]=p[D++],w-=3}while(w>2);w&&(p[r++]=p[D++],w>1&&(p[r++]=p[D++]))}break}}break}}while(t>3,Q&=(1<<(E-=w<<3))-1,A.next_in=t,A.next_out=r,A.avail_in=t=1&&0===v[d];d--);if(D>d&&(D=d),0===d)return r[I++]=20971520,r[I++]=20971520,n.bits=1,0;for(w=1;w0&&(0===A||1!==d))return-1;for(R[1]=0,l=1;l<15;l++)R[l+1]=R[l]+v[l];for(u=0;u852||2===A&&m>592)return 1;for(;;){s=l-k,g[u]E?(f=U[L+g[u]],c=F[S+g[u]]):(f=96,c=0),a=1<>k)+(o-=a)]=s<<24|f<<16|c|0}while(0!==o);for(a=1<>=1;if(0!==a?(G&=a-1,G+=a):G=0,u++,0==--v[l]){if(l===d)break;l=e[t+g[u]]}if(l>D&&(G&C)!==B){for(0===k&&(k=D),Q+=w,p=1<<(y=l-k);y+k852||2===A&&m>592)return 1;r[B=G&C]=D<<24|y<<16|Q-I|0}}return 0!==G&&(r[Q+G]=l-k<<24|64<<16|0),n.bits=D,0},IA=H.Z_FINISH,gA=H.Z_BLOCK,nA=H.Z_TREES,aA=H.Z_OK,oA=H.Z_STREAM_END,BA=H.Z_NEED_DICT,CA=H.Z_STREAM_ERROR,QA=H.Z_DATA_ERROR,EA=H.Z_MEM_ERROR,sA=H.Z_BUF_ERROR,fA=H.Z_DEFLATED,cA=function(A){return(A>>>24&255)+(A>>>8&65280)+((65280&A)<<8)+((255&A)<<24)};function hA(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Uint16Array(320),this.work=new Uint16Array(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}var lA,uA,wA=function(A){if(!A||!A.state)return CA;var e=A.state;return A.total_in=A.total_out=e.total=0,A.msg="",e.wrap&&(A.adler=1&e.wrap),e.mode=1,e.last=0,e.havedict=0,e.dmax=32768,e.head=null,e.hold=0,e.bits=0,e.lencode=e.lendyn=new Int32Array(852),e.distcode=e.distdyn=new Int32Array(592),e.sane=1,e.back=-1,aA},dA=function(A){if(!A||!A.state)return CA;var e=A.state;return e.wsize=0,e.whave=0,e.wnext=0,wA(A)},DA=function(A,e){var t;if(!A||!A.state)return CA;var i=A.state;return e<0?(t=0,e=-e):(t=1+(e>>4),e<48&&(e&=15)),e&&(e<8||e>15)?CA:(null!==i.window&&i.wbits!==e&&(i.window=null),i.wrap=t,i.wbits=e,dA(A))},yA=function(A,e){if(!A)return CA;var t=new hA;A.state=t,t.window=null;var i=DA(A,e);return i!==aA&&(A.state=null),i},kA=!0,pA=function(A){if(kA){lA=new Int32Array(512),uA=new Int32Array(32);for(var e=0;e<144;)A.lens[e++]=8;for(;e<256;)A.lens[e++]=9;for(;e<280;)A.lens[e++]=7;for(;e<288;)A.lens[e++]=8;for(rA(1,A.lens,0,288,lA,0,A.work,{bits:9}),e=0;e<32;)A.lens[e++]=5;rA(2,A.lens,0,32,uA,0,A.work,{bits:5}),kA=!1}A.lencode=lA,A.lenbits=9,A.distcode=uA,A.distbits=5},mA=function(A,e,t,i){var r,I=A.state;return null===I.window&&(I.wsize=1<=I.wsize?(I.window.set(e.subarray(t-I.wsize,t),0),I.wnext=0,I.whave=I.wsize):((r=I.wsize-I.wnext)>i&&(r=i),I.window.set(e.subarray(t-i,t-i+r),I.wnext),(i-=r)?(I.window.set(e.subarray(t-i,t),0),I.wnext=i,I.whave=I.wsize):(I.wnext+=r,I.wnext===I.wsize&&(I.wnext=0),I.whave>>8&255,t.check=Y(t.check,G,2,0),o=0,B=0,t.mode=2;break}if(t.flags=0,t.head&&(t.head.done=!1),!(1&t.wrap)||(((255&o)<<8)+(o>>8))%31){A.msg="incorrect header check",t.mode=30;break}if((15&o)!==fA){A.msg="unknown compression method",t.mode=30;break}if(B-=4,D=8+(15&(o>>>=4)),0===t.wbits)t.wbits=D;else if(D>t.wbits){A.msg="invalid window size",t.mode=30;break}t.dmax=1<>8&1),512&t.flags&&(G[0]=255&o,G[1]=o>>>8&255,t.check=Y(t.check,G,2,0)),o=0,B=0,t.mode=3;case 3:for(;B<32;){if(0===n)break A;n--,o+=i[I++]<>>8&255,G[2]=o>>>16&255,G[3]=o>>>24&255,t.check=Y(t.check,G,4,0)),o=0,B=0,t.mode=4;case 4:for(;B<16;){if(0===n)break A;n--,o+=i[I++]<>8),512&t.flags&&(G[0]=255&o,G[1]=o>>>8&255,t.check=Y(t.check,G,2,0)),o=0,B=0,t.mode=5;case 5:if(1024&t.flags){for(;B<16;){if(0===n)break A;n--,o+=i[I++]<>>8&255,t.check=Y(t.check,G,2,0)),o=0,B=0}else t.head&&(t.head.extra=null);t.mode=6;case 6:if(1024&t.flags&&((E=t.length)>n&&(E=n),E&&(t.head&&(D=t.head.extra_len-t.length,t.head.extra||(t.head.extra=new Uint8Array(t.head.extra_len)),t.head.extra.set(i.subarray(I,I+E),D)),512&t.flags&&(t.check=Y(t.check,i,E,I)),n-=E,I+=E,t.length-=E),t.length))break A;t.length=0,t.mode=7;case 7:if(2048&t.flags){if(0===n)break A;E=0;do{D=i[I+E++],t.head&&D&&t.length<65536&&(t.head.name+=String.fromCharCode(D))}while(D&&E>9&1,t.head.done=!0),A.adler=t.check=0,t.mode=12;break;case 10:for(;B<32;){if(0===n)break A;n--,o+=i[I++]<>>=7&B,B-=7&B,t.mode=27;break}for(;B<3;){if(0===n)break A;n--,o+=i[I++]<>>=1)){case 0:t.mode=14;break;case 1:if(pA(t),t.mode=20,e===nA){o>>>=2,B-=2;break A}break;case 2:t.mode=17;break;case 3:A.msg="invalid block type",t.mode=30}o>>>=2,B-=2;break;case 14:for(o>>>=7&B,B-=7&B;B<32;){if(0===n)break A;n--,o+=i[I++]<>>16^65535)){A.msg="invalid stored block lengths",t.mode=30;break}if(t.length=65535&o,o=0,B=0,t.mode=15,e===nA)break A;case 15:t.mode=16;case 16:if(E=t.length){if(E>n&&(E=n),E>a&&(E=a),0===E)break A;r.set(i.subarray(I,I+E),g),n-=E,I+=E,a-=E,g+=E,t.length-=E;break}t.mode=12;break;case 17:for(;B<14;){if(0===n)break A;n--,o+=i[I++]<>>=5,B-=5,t.ndist=1+(31&o),o>>>=5,B-=5,t.ncode=4+(15&o),o>>>=4,B-=4,t.nlen>286||t.ndist>30){A.msg="too many length or distance symbols",t.mode=30;break}t.have=0,t.mode=18;case 18:for(;t.have>>=3,B-=3}for(;t.have<19;)t.lens[F[t.have++]]=0;if(t.lencode=t.lendyn,t.lenbits=7,k={bits:t.lenbits},y=rA(0,t.lens,0,19,t.lencode,0,t.work,k),t.lenbits=k.bits,y){A.msg="invalid code lengths set",t.mode=30;break}t.have=0,t.mode=19;case 19:for(;t.have>>16&255,l=65535&m,!((c=m>>>24)<=B);){if(0===n)break A;n--,o+=i[I++]<>>=c,B-=c,t.lens[t.have++]=l;else{if(16===l){for(p=c+2;B>>=c,B-=c,0===t.have){A.msg="invalid bit length repeat",t.mode=30;break}D=t.lens[t.have-1],E=3+(3&o),o>>>=2,B-=2}else if(17===l){for(p=c+3;B>>=c)),o>>>=3,B-=3}else{for(p=c+7;B>>=c)),o>>>=7,B-=7}if(t.have+E>t.nlen+t.ndist){A.msg="invalid bit length repeat",t.mode=30;break}for(;E--;)t.lens[t.have++]=D}}if(30===t.mode)break;if(0===t.lens[256]){A.msg="invalid code -- missing end-of-block",t.mode=30;break}if(t.lenbits=9,k={bits:t.lenbits},y=rA(1,t.lens,0,t.nlen,t.lencode,0,t.work,k),t.lenbits=k.bits,y){A.msg="invalid literal/lengths set",t.mode=30;break}if(t.distbits=6,t.distcode=t.distdyn,k={bits:t.distbits},y=rA(2,t.lens,t.nlen,t.ndist,t.distcode,0,t.work,k),t.distbits=k.bits,y){A.msg="invalid distances set",t.mode=30;break}if(t.mode=20,e===nA)break A;case 20:t.mode=21;case 21:if(n>=6&&a>=258){A.next_out=g,A.avail_out=a,A.next_in=I,A.avail_in=n,t.hold=o,t.bits=B,$(A,Q),g=A.next_out,r=A.output,a=A.avail_out,I=A.next_in,i=A.input,n=A.avail_in,o=t.hold,B=t.bits,12===t.mode&&(t.back=-1);break}for(t.back=0;h=(m=t.lencode[o&(1<>>16&255,l=65535&m,!((c=m>>>24)<=B);){if(0===n)break A;n--,o+=i[I++]<>u)])>>>16&255,l=65535&m,!(u+(c=m>>>24)<=B);){if(0===n)break A;n--,o+=i[I++]<>>=u,B-=u,t.back+=u}if(o>>>=c,B-=c,t.back+=c,t.length=l,0===h){t.mode=26;break}if(32&h){t.back=-1,t.mode=12;break}if(64&h){A.msg="invalid literal/length code",t.mode=30;break}t.extra=15&h,t.mode=22;case 22:if(t.extra){for(p=t.extra;B>>=t.extra,B-=t.extra,t.back+=t.extra}t.was=t.length,t.mode=23;case 23:for(;h=(m=t.distcode[o&(1<>>16&255,l=65535&m,!((c=m>>>24)<=B);){if(0===n)break A;n--,o+=i[I++]<>u)])>>>16&255,l=65535&m,!(u+(c=m>>>24)<=B);){if(0===n)break A;n--,o+=i[I++]<>>=u,B-=u,t.back+=u}if(o>>>=c,B-=c,t.back+=c,64&h){A.msg="invalid distance code",t.mode=30;break}t.offset=l,t.extra=15&h,t.mode=24;case 24:if(t.extra){for(p=t.extra;B>>=t.extra,B-=t.extra,t.back+=t.extra}if(t.offset>t.dmax){A.msg="invalid distance too far back",t.mode=30;break}t.mode=25;case 25:if(0===a)break A;if(E=Q-a,t.offset>E){if((E=t.offset-E)>t.whave&&t.sane){A.msg="invalid distance too far back",t.mode=30;break}E>t.wnext?(E-=t.wnext,s=t.wsize-E):s=t.wnext-E,E>t.length&&(E=t.length),f=t.window}else f=r,s=g-t.offset,E=t.length;E>a&&(E=a),a-=E,t.length-=E;do{r[g++]=f[s++]}while(--E);0===t.length&&(t.mode=21);break;case 26:if(0===a)break A;r[g++]=t.length,a--,t.mode=21;break;case 27:if(t.wrap){for(;B<32;){if(0===n)break A;n--,o|=i[I++]<=0&&e.windowBits<16&&(e.windowBits=-e.windowBits,0===e.windowBits&&(e.windowBits=-15)),!(e.windowBits>=0&&e.windowBits<16)||A&&A.windowBits||(e.windowBits+=32),e.windowBits>15&&e.windowBits<48&&0==(15&e.windowBits)&&(e.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new z,this.strm.avail_out=0;var t=GA.inflateInit2(this.strm,e.windowBits);if(t!==UA)throw new Error(K[t]);if(this.header=new FA,GA.inflateGetHeader(this.strm,this.header),e.dictionary&&("string"==typeof e.dictionary?e.dictionary=Z(e.dictionary):"[object ArrayBuffer]"===SA.call(e.dictionary)&&(e.dictionary=new Uint8Array(e.dictionary)),e.raw&&(t=GA.inflateSetDictionary(this.strm,e.dictionary))!==UA))throw new Error(K[t])}function qA(A,e){var t=new JA(e);if(t.push(A),t.err)throw t.msg||K[t.err];return t.result}JA.prototype.push=function(A,e){var t,i,r,I=this.strm,g=this.options.chunkSize,n=this.options.dictionary;if(this.ended)return!1;for(i=e===~~e?e:!0===e?RA:vA,"[object ArrayBuffer]"===SA.call(A)?I.input=new Uint8Array(A):I.input=A,I.next_in=0,I.avail_in=I.input.length;;){for(0===I.avail_out&&(I.output=new Uint8Array(g),I.next_out=0,I.avail_out=g),(t=GA.inflate(I,i))===bA&&n&&((t=GA.inflateSetDictionary(I,n))===UA?t=GA.inflate(I,i):t===NA&&(t=bA));I.avail_in>0&&t===LA&&I.state.wrap>0&&0!==A[I.next_in];)GA.inflateReset(I),t=GA.inflate(I,i);switch(t){case MA:case NA:case bA:case xA:return this.onEnd(t),this.ended=!0,!1}if(r=I.avail_out,I.next_out&&(0===I.avail_out||t===LA))if("string"===this.options.to){var a=W(I.output,I.next_out),o=I.next_out-a,B=j(I.output,a);I.next_out=o,I.avail_out=g-o,o&&I.output.set(I.output.subarray(a,a+o),0),this.onData(B)}else this.onData(I.output.length===I.next_out?I.output:I.output.subarray(0,I.next_out));if(t!==UA||0!==r){if(t===LA)return t=GA.inflateEnd(this.strm),this.onEnd(t),this.ended=!0,!0;if(0===I.avail_in)break}}return!0},JA.prototype.onData=function(A){this.chunks.push(A)},JA.prototype.onEnd=function(A){A===UA&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=T(this.chunks)),this.chunks=[],this.err=A,this.msg=this.strm.msg};var YA={Inflate:JA,inflate:qA,inflateRaw:function(A,e){return(e=e||{}).raw=!0,qA(A,e)},ungzip:qA,constants:H}.inflate;function KA(A){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(A){return!1}}();return function(){var t,i=c(A);if(e){var r=c(this).constructor;t=Reflect.construct(i,arguments,r)}else t=i.apply(this,arguments);return f(this,t)}}var HA=function(A){s(t,w);var e=KA(t);function t(){return B(this,t),e.apply(this,arguments)}return Q(t,[{key:"decodeBlock",value:function(A){return YA(new Uint8Array(A)).buffer}}]),t}(),OA=Object.freeze({__proto__:null,default:HA});function PA(A){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(A){return!1}}();return function(){var t,i=c(A);if(e){var r=c(this).constructor;t=Reflect.construct(i,arguments,r)}else t=i.apply(this,arguments);return f(this,t)}}var TA,VA=function(A){s(t,w);var e=PA(t);function t(){return B(this,t),e.apply(this,arguments)}return Q(t,[{key:"decodeBlock",value:function(A){for(var e=new DataView(A),t=[],i=0;i>3],m<<=7&G),c=0;c>3]),128&m?(a&&(a[G]=1),f=f>(g=S.encoding<2?y[k++]:p)?g:f,n[G++]=g):(a&&(a[G]=0),n[G++]=i),m<<=1;G+=F}else if(S.encoding<2)for(h=0;h(g=y[k++])?g:f,n[G++]=g;G+=F}else for(f=f>p?p:f,h=0;h0){var g=new Uint8Array(Math.ceil(i.width*i.height/8)),n=(I=new DataView(A,e,i.mask.numBytes)).getInt16(0,!0),a=2,o=0;do{if(n>0)for(;n--;)g[o++]=I.getUint8(a++);else{var B=I.getUint8(a++);for(n=-n;n--;)g[o++]=B}n=I.getInt16(a,!0),a+=2}while(a0?1:0),s=Q+(i.height%Q>0?1:0);i.pixels.blocks=new Array(E*s);for(var f=0,c=0;c3)throw"Invalid block encoding ("+w.encoding+")";if(2!==w.encoding){if(0!==d&&2!==d){if(d>>=6,w.offsetType=d,2===d)w.offset=I.getInt8(1),l++;else if(1===d)w.offset=I.getInt16(1,!0),l+=2;else{if(0!==d)throw"Invalid block offset type";w.offset=I.getFloat32(1,!0),l+=4}if(1===w.encoding)if(d=I.getUint8(l),l++,w.bitsPerPixel=63&d,d>>=6,w.numValidPixelsType=d,2===d)w.numValidPixels=I.getUint8(l),l++;else if(1===d)w.numValidPixels=I.getUint16(l,!0),l+=2;else{if(0!==d)throw"Invalid valid pixel count type";w.numValidPixels=I.getUint32(l,!0),l+=4}}var D;if(e+=l,3!==w.encoding)if(0===w.encoding){var y=(i.pixels.numBytes-1)/4;if(y!==Math.floor(y))throw"uncompressed block has invalid length";D=new ArrayBuffer(4*y),new Uint8Array(D).set(new Uint8Array(A,e,4*y));var k=new Float32Array(D);w.rawData=k,e+=4*y}else if(1===w.encoding){var p=Math.ceil(w.numValidPixels*w.bitsPerPixel/8),m=Math.ceil(p/4);D=new ArrayBuffer(4*m),new Uint8Array(D).set(new Uint8Array(A,e,p)),w.stuffedData=new Uint32Array(D),e+=p}}else e++}return i.eofOffset=e,i},I=function(A,e,t,i,r,I,g){var n,a,o,B=(1<=e)a=o>>>Q-e&B,Q-=e;else{var f=e-Q;a=(o&B)<>>(Q=32-f)}I[n]=a=t?(o=B>>>f-t&E,f-=t):(o=(B&E)<<(C=t-f)&E,o+=(B=A[s++])>>>(f=32-C)),e[a]=r[o];else for(Q=Math.ceil((n-I)/g),a=0;a=t?(o=B>>>f-t&E,f-=t):(o=(B&E)<<(C=t-f)&E,o+=(B=A[s++])>>>(f=32-C)),e[a]=o=e?(Q=g>>>C-e&n,C-=e):(Q=(g&n)<<(B=e-C)&n,Q+=(g=A[a++])>>>(C=32-B)),E[o]=Q=t?(o=B>>>f&Q,s-=t,f+=t):(o=B>>>f&Q,s=32-(C=t-s),o|=((B=A[E++])&(1<=t?(o=B>>>f&Q,s-=t,f+=t):(o=B>>>f&Q,s=32-(C=t-s),o|=((B=A[E++])&(1<=e?(Q=g>>>E&n,C-=e,E+=e):(Q=g>>>E&n,C=32-(B=e-C),Q|=((g=A[a++])&(1<=t?(I=g>>>B-t&a,B-=t):(I=(g&a)<<(n=t-B)&a,I+=(g=A[o++])>>>(B=32-n)),e[r]=I;return e},C=function(A,e,t,i){var r,I,g,n,a=(1<=t?(I=g>>>C&a,B-=t,C+=t):(I=g>>>C&a,B=32-(n=t-B),I|=((g=A[o++])&(1<=359?359:r;r-=g;do{e+=A[I++]<<8,t+=e+=A[I++]}while(--g);e=(65535&e)+(e>>>16),t=(65535&t)+(t>>>16)}return 1&i&&(t+=e+=A[I]<<8),((t=(65535&t)+(t>>>16))<<16|(e=(65535&e)+(e>>>16)))>>>0},readHeaderInfo:function(A,e){var t=e.ptr,i=new Uint8Array(A,t,6),r={};if(r.fileIdentifierString=String.fromCharCode.apply(null,i),0!==r.fileIdentifierString.lastIndexOf("Lerc2",0))throw"Unexpected file identifier string (expect Lerc2 ): "+r.fileIdentifierString;t+=6;var I,g=new DataView(A,t,8),n=g.getInt32(0,!0);if(r.fileVersion=n,t+=4,n>=3&&(r.checksum=g.getUint32(4,!0),t+=4),g=new DataView(A,t,12),r.height=g.getUint32(0,!0),r.width=g.getUint32(4,!0),t+=8,n>=4?(r.numDims=g.getUint32(8,!0),t+=4):r.numDims=1,g=new DataView(A,t,40),r.numValidPixel=g.getUint32(0,!0),r.microBlockSize=g.getInt32(4,!0),r.blobSize=g.getInt32(8,!0),r.imageType=g.getInt32(12,!0),r.maxZError=g.getFloat64(16,!0),r.zMin=g.getFloat64(24,!0),r.zMax=g.getFloat64(32,!0),t+=40,e.headerInfo=r,e.ptr=t,n>=3&&(I=n>=4?52:48,this.computeChecksumFletcher32(new Uint8Array(A,t-I,r.blobSize-14))!==r.checksum))throw"Checksum failed.";return!0},checkMinMaxRanges:function(A,e){var t=e.headerInfo,i=this.getDataTypeArray(t.imageType),r=t.numDims*this.getDataTypeSize(t.imageType),I=this.readSubArray(A,e.ptr,i,r),g=this.readSubArray(A,e.ptr+r,i,r);e.ptr+=2*r;var n,a=!0;for(n=0;n0){t=new Uint8Array(Math.ceil(g/8));var B=(a=new DataView(A,r,o.numBytes)).getInt16(0,!0),C=2,Q=0,E=0;do{if(B>0)for(;B--;)t[Q++]=a.getUint8(C++);else for(E=a.getUint8(C++),B=-B;B--;)t[Q++]=E;B=a.getInt16(C,!0),C+=2}while(C>3],s<<=7&f):s=t[f>>3],128&s&&(i[f]=1);e.pixels.resultMask=i,o.bitset=t,r+=o.numBytes}return e.ptr=r,e.mask=o,!0},readDataOneSweep:function(A,e,t,i){var r,I=e.ptr,g=e.headerInfo,n=g.numDims,a=g.width*g.height,o=g.imageType,B=g.numValidPixel*Q.getDataTypeSize(o)*n,C=e.pixels.resultMask;if(t===Uint8Array)r=new Uint8Array(A,I,B);else{var E=new ArrayBuffer(B);new Uint8Array(E).set(new Uint8Array(A,I,B)),r=new t(E)}if(r.length===a*n)e.pixels.resultPixels=i?Q.swapDimensionOrder(r,a,n,t,!0):r;else{e.pixels.resultPixels=new t(a*n);var s=0,f=0,c=0,h=0;if(n>1){if(i){for(f=0;f=g)return!1;var n=new Uint32Array(g-I);Q.decodeBits(A,e,n);var a,o,B,C,s=[];for(a=I;a0&&(s[o].second=l<>>32-C,32-w>=C?32===(w+=C)&&(w=0,l=u[++d]):(w+=C-32,l=u[++d],s[o].second|=l>>>32-w));var D=0,y=0,k=new E;for(a=0;a=t?t:D;var p,m,G,F,S,v=[];for(a=I;a0)if(p=[C,o],C<=y)for(m=s[o].second<=0;F--)m>>>F&1?(S.right||(S.right=new E),S=S.right):(S.left||(S.left=new E),S=S.left),0!==F||S.val||(S.val=p[1]);return{decodeLut:v,numBitsLUTQick:y,numBitsLUT:D,tree:k,stuffedData:u,srcPtr:d,bitPos:w}},readHuffman:function(A,e,t,i){var r,I,g,n,a,o,B,C,E,s=e.headerInfo.numDims,f=e.headerInfo.height,c=e.headerInfo.width,h=c*f,l=this.readHuffmanTree(A,e),u=l.decodeLut,w=l.tree,d=l.stuffedData,D=l.srcPtr,y=l.bitPos,k=l.numBitsLUTQick,p=l.numBitsLUT,m=0===e.headerInfo.imageType?128:0,G=e.pixels.resultMask,F=0;y>0&&(D++,y=0);var S,v=d[D],R=1===e.encodeMode,U=new t(h*s),L=U;if(s<2||R){for(S=0;S1&&(L=new t(U.buffer,h*S,h),F=0),e.headerInfo.numValidPixel===c*f)for(C=0,o=0;o>>32-k,32-y>>64-y-k),u[a])I=u[a][1],y+=u[a][0];else for(a=n=v<>>32-p,32-y>>64-y-p),r=w,E=0;E>>p-E-1&1?r.right:r.left).left&&!r.right){I=r.val,y=y+E+1;break}y>=32&&(y-=32,v=d[++D]),g=I-m,R?(g+=B>0?F:o>0?L[C-c]:F,g&=255,L[C]=g,F=g):L[C]=g}else for(C=0,o=0;o>>32-k,32-y>>64-y-k),u[a])I=u[a][1],y+=u[a][0];else for(a=n=v<>>32-p,32-y>>64-y-p),r=w,E=0;E>>p-E-1&1?r.right:r.left).left&&!r.right){I=r.val,y=y+E+1;break}y>=32&&(y-=32,v=d[++D]),g=I-m,R?(B>0&&G[C-1]?g+=F:o>0&&G[C-c]?g+=L[C-c]:g+=F,g&=255,L[C]=g,F=g):L[C]=g}}else for(C=0,o=0;o>>32-k,32-y>>64-y-k),u[a])I=u[a][1],y+=u[a][0];else for(a=n=v<>>32-p,32-y>>64-y-p),r=w,E=0;E>>p-E-1&1?r.right:r.left).left&&!r.right){I=r.val,y=y+E+1;break}y>=32&&(y-=32,v=d[++D]),g=I-m,L[C]=g}e.ptr=e.ptr+4*(D+1)+(y>0?4:0),e.pixels.resultPixels=U,s>1&&!i&&(e.pixels.resultPixels=Q.swapDimensionOrder(U,h,s,t))},decodeBits:function(A,e,t,i,r){var I=e.headerInfo,Q=I.fileVersion,E=0,s=A.byteLength-e.ptr>=5?5:A.byteLength-e.ptr,f=new DataView(A,e.ptr,s),c=f.getUint8(0);E++;var h=c>>6,l=0===h?4:3-h,u=(32&c)>0,w=31&c,d=0;if(1===l)d=f.getUint8(E),E++;else if(2===l)d=f.getUint16(E,!0),E+=2;else{if(4!==l)throw"Invalid valid pixel count type";d=f.getUint32(E,!0),E+=4}var D,y,k,p,m,G,F,S,v,R=2*I.maxZError,U=I.numDims>1?I.maxValues[r]:I.zMax;if(u){for(e.counter.lut++,S=f.getUint8(E),E++,p=Math.ceil((S-1)*w/8),m=Math.ceil(p/4),y=new ArrayBuffer(4*m),k=new Uint8Array(y),e.ptr+=E,k.set(new Uint8Array(A,e.ptr,p)),F=new Uint32Array(y),e.ptr+=p,v=0;S-1>>>v;)v++;p=Math.ceil(d*v/8),m=Math.ceil(p/4),y=new ArrayBuffer(4*m),(k=new Uint8Array(y)).set(new Uint8Array(A,e.ptr,p)),D=new Uint32Array(y),e.ptr+=p,G=Q>=3?o(F,w,S-1,i,R,U):n(F,w,S-1,i,R,U),Q>=3?a(D,t,v,d,G):g(D,t,v,d,G)}else e.counter.bitstuffer++,v=w,e.ptr+=E,v>0&&(p=Math.ceil(d*v/8),m=Math.ceil(p/4),y=new ArrayBuffer(4*m),(k=new Uint8Array(y)).set(new Uint8Array(A,e.ptr,p)),D=new Uint32Array(y),e.ptr+=p,Q>=3?null==i?C(D,t,v,d):a(D,t,v,d,!1,i,R,U):null==i?B(D,t,v,d):g(D,t,v,d,!1,i,R,U))},readTiles:function(A,e,t,i){var r=e.headerInfo,I=r.width,g=r.height,n=I*g,a=r.microBlockSize,o=r.imageType,B=Q.getDataTypeSize(o),C=Math.ceil(I/a),E=Math.ceil(g/a);e.pixels.numBlocksY=E,e.pixels.numBlocksX=C,e.pixels.ptr=0;var s,f,c,h,l,u,w,d,D,y,k=0,p=0,m=0,G=0,F=0,S=0,v=0,R=0,U=0,L=0,b=0,M=0,N=0,x=0,J=0,q=new t(a*a),Y=g%a||a,K=I%a||a,H=r.numDims,O=e.pixels.resultMask,P=e.pixels.resultPixels,T=r.fileVersion>=5?14:15,V=r.zMax;for(m=0;m1?(y=P,L=m*I*a+G*a,P=new t(e.pixels.resultPixels.buffer,n*d*B,n),V=r.maxValues[d]):y=null,v=A.byteLength-e.ptr,f={},J=0,R=(s=new DataView(A,e.ptr,Math.min(10,v))).getUint8(0),J++,D=r.fileVersion>=5?4&R:0,U=R>>6&255,(R>>2&T)!=(G*a>>3&T))throw"integrity issue";if(D&&0===d)throw"integrity issue";if((l=3&R)>3)throw e.ptr+=J,"Invalid block encoding ("+l+")";if(2!==l)if(0===l){if(D)throw"integrity issue";if(e.counter.uncompressed++,e.ptr+=J,M=(M=F*S*B)<(N=A.byteLength-e.ptr)?M:N,c=new ArrayBuffer(M%B==0?M:M+B-M%B),new Uint8Array(c).set(new Uint8Array(A,e.ptr,M)),h=new t(c),x=0,O)for(k=0;k1&&!i&&(e.pixels.resultPixels=Q.swapDimensionOrder(e.pixels.resultPixels,n,H,t))},formatFileInfo:function(A){return{fileIdentifierString:A.headerInfo.fileIdentifierString,fileVersion:A.headerInfo.fileVersion,imageType:A.headerInfo.imageType,height:A.headerInfo.height,width:A.headerInfo.width,numValidPixel:A.headerInfo.numValidPixel,microBlockSize:A.headerInfo.microBlockSize,blobSize:A.headerInfo.blobSize,maxZError:A.headerInfo.maxZError,pixelType:Q.getPixelType(A.headerInfo.imageType),eofOffset:A.eofOffset,mask:A.mask?{numBytes:A.mask.numBytes}:null,pixels:{numBlocksX:A.pixels.numBlocksX,numBlocksY:A.pixels.numBlocksY,maxValue:A.headerInfo.zMax,minValue:A.headerInfo.zMin,noDataValue:A.noDataValue}}},constructConstantSurface:function(A,e){var t=A.headerInfo.zMax,i=A.headerInfo.zMin,r=A.headerInfo.maxValues,I=A.headerInfo.numDims,g=A.headerInfo.height*A.headerInfo.width,n=0,a=0,o=0,B=A.pixels.resultMask,C=A.pixels.resultPixels;if(B)if(I>1){if(e)for(n=0;n1&&i!==t)if(e)for(n=0;n=-128&&e<=127;break;case 1:t=e>=0&&e<=255;break;case 2:t=e>=-32768&&e<=32767;break;case 3:t=e>=0&&e<=65536;break;case 4:t=e>=-2147483648&&e<=2147483647;break;case 5:t=e>=0&&e<=4294967296;break;case 6:t=e>=-34027999387901484e22&&e<=34027999387901484e22;break;case 7:t=e>=-17976931348623157e292&&e<=17976931348623157e292;break;default:t=!1}return t},getDataTypeSize:function(A){var e=0;switch(A){case 0:case 1:e=1;break;case 2:case 3:e=2;break;case 4:case 5:case 6:e=4;break;case 7:e=8;break;default:e=A}return e},getDataTypeUsed:function(A,e){var t=A;switch(A){case 2:case 4:t=A-e;break;case 3:case 5:t=A-2*e;break;case 6:t=0===e?A:1===e?2:1;break;case 7:t=0===e?A:A-2*e+1;break;default:t=A}return t},getOnePixel:function(A,e,t,i){var r=0;switch(t){case 0:r=i.getInt8(e);break;case 1:r=i.getUint8(e);break;case 2:r=i.getInt16(e,!0);break;case 3:r=i.getUint16(e,!0);break;case 4:r=i.getInt32(e,!0);break;case 5:r=i.getUInt32(e,!0);break;case 6:r=i.getFloat32(e,!0);break;case 7:r=i.getFloat64(e,!0);break;default:throw"the decoder does not understand this pixel type"}return r},swapDimensionOrder:function(A,e,t,i,r){var I=0,g=0,n=0,a=0,o=A;if(t>1)if(o=new i(e*t),r)for(I=0;I5)throw"unsupported lerc version 2."+g;Q.readMask(A,r),I.numValidPixel===I.width*I.height||r.pixels.resultMask||(r.pixels.resultMask=e.maskData);var a=I.width*I.height;r.pixels.resultPixels=new n(a*I.numDims),r.counter={onesweep:0,uncompressed:0,lut:0,bitstuffer:0,constant:0,constantoffset:0};var o,B=!e.returnPixelInterleavedDims;if(0!==I.numValidPixel)if(I.zMax===I.zMin)Q.constructConstantSurface(r,B);else if(g>=4&&Q.checkMinMaxRanges(A,r))Q.constructConstantSurface(r,B);else{var C=new DataView(A,r.ptr,2),E=C.getUint8(0);if(r.ptr++,E)Q.readDataOneSweep(A,r,n,B);else if(g>1&&I.imageType<=1&&Math.abs(I.maxZError-.5)<1e-5){var s=C.getUint8(1);if(r.ptr++,r.encodeMode=s,s>2||g<4&&s>1)throw"Invalid Huffman flag "+s;s?Q.readHuffman(A,r,n,B):Q.readTiles(A,r,n,B)}else Q.readTiles(A,r,n,B)}r.eofOffset=r.ptr,e.inputOffset?(o=r.headerInfo.blobSize+e.inputOffset-r.ptr,Math.abs(o)>=1&&(r.eofOffset=e.inputOffset+r.headerInfo.blobSize)):(o=r.headerInfo.blobSize-r.ptr,Math.abs(o)>=1&&(r.eofOffset=r.headerInfo.blobSize));var f={width:I.width,height:I.height,pixelData:r.pixels.resultPixels,minValue:I.zMin,maxValue:I.zMax,validPixelCount:I.numValidPixel,dimCount:I.numDims,dimStats:{minValues:I.minValues,maxValues:I.maxValues},maskData:r.pixels.resultMask};if(r.pixels.resultMask&&Q.isValidPixelValue(I.imageType,t)){var c=r.pixels.resultMask;for(i=0;i1&&(o&&f.push(o),d.fileInfo.mask&&d.fileInfo.mask.numBytes>0&&w++),E++,u.pixels.push(d.pixelData),u.statistics.push({minValue:d.minValue,maxValue:d.maxValue,noDataValue:d.noDataValue,dimStats:d.dimStats})}if(i>1&&w>1){for(Q=u.width*u.height,u.bandMasks=f,(o=new Uint8Array(Q)).set(f[0]),B=1;B1&&void 0!==arguments[1]?arguments[1]:0;if(!jA)throw new Error("ZSTDDecoder: Await .init() before decoding.");var t=A.byteLength,i=jA.exports.malloc(t);WA.set(A,i),e=e||Number(jA.exports.ZSTD_findDecompressedSize(i,t));var r=jA.exports.malloc(e),I=jA.exports.ZSTD_decompress(r,e,i,t),g=WA.slice(r,r+I);return jA.exports.free(i),jA.exports.free(r),g}}]),A}(),ee="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IAMNACAEQQNxBEADQCACRQ0FIAAgAkF/aiICaiIDIAEgAmotAAA6AAAgA0EDcQ0ACwsgAkEDTQ0AA0AgACACQXxqIgJqIAEgAmooAgA2AgAgAkEDSw0ACwsgAkUNAgNAIAAgAkF/aiICaiABIAJqLQAAOgAAIAINAAsMAgsgAkEDTQ0AIAIhBANAIAMgASgCADYCACABQQRqIQEgA0EEaiEDIARBfGoiBEEDSw0ACyACQQNxIQILIAJFDQADQCADIAEtAAA6AAAgA0EBaiEDIAFBAWohASACQX9qIgINAAsLIAAL8wICAn8BfgJAIAJFDQAgACACaiIDQX9qIAE6AAAgACABOgAAIAJBA0kNACADQX5qIAE6AAAgACABOgABIANBfWogAToAACAAIAE6AAIgAkEHSQ0AIANBfGogAToAACAAIAE6AAMgAkEJSQ0AIABBACAAa0EDcSIEaiIDIAFB/wFxQYGChAhsIgE2AgAgAyACIARrQXxxIgRqIgJBfGogATYCACAEQQlJDQAgAyABNgIIIAMgATYCBCACQXhqIAE2AgAgAkF0aiABNgIAIARBGUkNACADIAE2AhggAyABNgIUIAMgATYCECADIAE2AgwgAkFwaiABNgIAIAJBbGogATYCACACQWhqIAE2AgAgAkFkaiABNgIAIAQgA0EEcUEYciIEayICQSBJDQAgAa0iBUIghiAFhCEFIAMgBGohAQNAIAEgBTcDGCABIAU3AxAgASAFNwMIIAEgBTcDACABQSBqIQEgAkFgaiICQR9LDQALCyAACy8BAn8gACgCBCAAKAIAQQJ0aiICLQACIQMgACACLwEAIAEgAi0AAxAIajYCACADCy8BAn8gACgCBCAAKAIAQQJ0aiICLQACIQMgACACLwEAIAEgAi0AAxAFajYCACADCx8AIAAgASACKAIEEAg2AgAgARAEGiAAIAJBCGo2AgQLCAAgAGdBH3MLugUBDX8jAEEQayIKJAACfyAEQQNNBEAgCkEANgIMIApBDGogAyAEEAsaIAAgASACIApBDGpBBBAVIgBBbCAAEAMbIAAgACAESxsMAQsgAEEAIAEoAgBBAXRBAmoQECENQVQgAygAACIGQQ9xIgBBCksNABogAiAAQQVqNgIAIAMgBGoiAkF8aiEMIAJBeWohDiACQXtqIRAgAEEGaiELQQQh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ASIDNgLE4AEgACgCvOABIQQgACABNgK84AEgACABIAJqNgK44AEgACABIAQgA2tqNgLA4AELpgEBAX8gACAAKALs4QEQFjYCyOABIABCADcD+OABIABCADcDuOABIABBwOABakIANwMAIABBqNAAaiIBQYyAgOAANgIAIABBADYCmOIBIABCADcDiOEBIABCAzcDgOEBIABBrNABakHgEikCADcCACAAQbTQAWpB6BIoAgA2AgAgACABNgIMIAAgAEGYIGo2AgggACAAQaAwajYCBCAAIABBEGo2AgALYQEBf0G4fyEDAkAgAUEDSQ0AIAIgABAhIgFBA3YiADYCCCACIAFBAXE2AgQgAiABQQF2QQNxIgM2AgACQCADQX9qIgFBAksNAAJAIAFBAWsOAgEAAgtBbA8LIAAhAwsgAwsMACAAIAEgAkEAEC4LiAQCA38CfiADEBYhBCAAQQBBKBAQIQAgBCACSwRAIAQPCyABRQRAQX8PCwJAAkAgA0EBRg0AIAEoAAAiBkGo6r5pRg0AQXYhAyAGQXBxQdDUtMIBRw0BQQghAyACQQhJDQEgAEEAQSgQECEAIAEoAAQhASAAQQE2AhQgACABrTcDAEEADwsgASACIAMQLyIDIAJLDQAgACADNgIYQXIhAyABIARqIgVBf2otAAAiAkEIcQ0AIAJBIHEiBkUEQEFwIQMgBS0AACIFQacBSw0BIAVBB3GtQgEgBUEDdkEKaq2GIgdCA4h+IAd8IQggBEEBaiEECyACQQZ2IQMgAkECdiEFAkAgAkEDcUF/aiICQQJLBEBBACECDAELAkACQAJAIAJBAWsOAgECAAsgASAEai0AACECIARBAWohBAwCCyABIARqLwAAIQIgBEECaiEEDAELIAEgBGooAAAhAiAEQQRqIQQLIAVBAXEhBQJ+AkACQAJAIANBf2oiA0ECTQRAIANBAWsOAgIDAQtCfyAGRQ0DGiABIARqMQAADAMLIAEgBGovAACtQoACfAwCCyABIARqKAAArQwBCyABIARqKQAACyEHIAAgBTYCICAAIAI2AhwgACAHNwMAQQAhAyAAQQA2AhQgACAHIAggBhsiBzcDCCAAIAdCgIAIIAdCgIAIVBs+AhALIAMLWwEBf0G4fyEDIAIQFiICIAFNBH8gACACakF/ai0AACIAQQNxQQJ0QaAeaigC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C0Egak8NAQsgByAHKQNoNwMQIAcgBykDYDcDCCAEIA0gB0EIaiAHQdwAaiAPIA4gESAQEB4hCwwBCyACIARqIQggBCAKEAcgAkERTwRAIARBEGohAgNAIAIgCkEQaiIKEAcgAkEQaiICIAhJDQALCyAIIAlrIQIgByATNgJcIAkgCCAOa0sEQCAJIAggEWtLBEBBbCELDAILIBAgAiAOayICaiIKIANqIBBNBEAgCCAKIAMQDxoMAgsgCCAKQQAgAmsQDyEIIAcgAiADaiIDNgJkIAggAmshCCAOIQILIAlBEE8EQCADIAhqIQMDQCAIIAIQByACQRBqIQIgCEEQaiIIIANJDQALDAELAkAgCUEHTQRAIAggAi0AADoAACAIIAItAAE6AAEgCCACLQACOgACIAggAi0AAzoAAyAIQQRqIAIgCUECdCIDQcAeaigCAGoiAhAXIAIgA0HgHmooAgBrIQIgBygCZCEDDAELIAggAhAMCyADQQlJDQAgAyAIaiEDIAhBCGoiCCACQQhqIgJrQQ9MBEADQCAIIAIQDCACQQhqIQIgCEEIaiIIIANJDQAMAgALAAsDQCAIIAIQByACQRBqIQIgCEEQaiIIIANJDQALCyAHQRhqEAQaIAsgDCALEAMiAhshDCAEIAQgC2ogAhshBCAFQX9qIgUNAAsgDBADDQFBbCEMIAdBGGoQBEECSQ0BQQAhCANAIAhBA0cEQCAAIAhBAnQiAmpBrNABaiACIAdqKAJENgIAIAhBAWohCAwBCwsgBygCXCEIC0G6fyEMIA8gCGsiACANIARrSw0AIAQEfyAEIAggABALIABqBUEACyABayEMCyAHQfAAaiQAIAwLkRcCFn8FfiMAQdABayIHJAAgByAAKALw4QEiCDYCvAEgASACaiESIAggACgCgOIBaiETAkACQCAFRQRAIAEhAwwBCyAAKALE4AEhESAAKALA4AEhFSAAKAK84AEhDyAAQQE2AozhAUEAIQgDQCAIQQNHBEAgByAIQQJ0IgJqIAAgAmpBrNABaigCADYCVCAIQQFqIQgMAQsLIAcgETYCZCAHIA82AmAgByABIA9rNgJoQWwhECAHQShqIAMgBBAGEAMNASAFQQQgBUEESBshFyAHQTxqIAdBKGogACgCABATIAdBxABqIAdBKGogACgCCBATIAdBzABqIAdB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IAdB0AFqJAAgEAslACAAQgA3AgAgAEEAOwEIIABBADoACyAAIAE2AgwgACACOgAKC7QFAQN/IwBBMGsiBCQAIABB/wFqIgVBfWohBgJAIAMvAQIEQCAEQRhqIAEgAhAGIgIQAw0BIARBEGogBEEYaiADEBwgBEEIaiAEQRhqIAMQHCAAIQMDQAJAIARBGGoQBCADIAZPckUEQCADIARBEGogBEEYahASOgAAIAMgBEEIaiAEQRhqEBI6AAEgBEEYahAERQ0BIANBAmohAwsgBUF+aiEFAn8DQEG6fyECIAMiASAFSw0FIAEgBEEQaiAEQRhqEBI6AAAgAUEBaiEDIARBGGoQBEEDRgRAQQIhAiAEQQhqDAILIAMgBUsNBSABIARBCGogBEEYahASOgABIAFBAmohA0EDIQIgBEEYahAEQQNHDQALIARBEGoLIQUgAyAFIARBGGoQEjoAACABIAJqIABrIQIMAwsgAyAEQRBqIARBGGoQEjoAAiADIARBCGogBEEYahASOgADIANBBGohAwwAAAsACyAEQRhqIAEgAhAGIgIQAw0AIARBEGogBEEYaiADEBwgBEEIaiAEQRhqIAMQHCAAIQMDQAJAIARBGGoQBCADIAZPckUEQCADIARBEGogBEEYahAROgAAIAMgBEEIaiAEQRhqEBE6AAEgBEEYahAERQ0BIANBAmohAwsgBUF+aiEFAn8DQEG6fyECIAMiASAFSw0EIAEgBEEQaiAEQRhqEBE6AAAgAUEBaiEDIARBGGoQBEEDRgRAQQIhAiAEQQhqDAILIAMgBUsNBCABIARBCGogBEEYahAROgABIAFBAmohA0EDIQIgBEEYahAEQQNHDQALIARBEGoLIQUgAyAFIARBGGoQEToAACABIAJqIABrIQIMAgsgAyAEQRBqIARBGGoQEToAAiADIARBCGogBEEYahAROgADIANBBGohAwwAAAsACyAEQTBqJAAgAgtpAQF/An8CQAJAIAJBB00NACABKAAAQbfIwuF+Rw0AIAAgASgABDYCmOIBQWIgAEEQaiABIAIQPiIDEAMNAhogAEKBgICAEDcDiOEBIAAgASADaiACIANrECoMAQsgACABIAIQKgtBAAsLrQMBBn8jAEGAAWsiAyQAQWIhCAJAIAJBCUkNACAAQZjQAGogAUEIaiIEIAJBeGogAEGY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wOABCwutAgIEfwF+IwBBQGoiBCQAAkACQCACQQhJDQAgASgAAEFwcUHQ1LTCAUcNACABIAIQIiEBIABCADcDCCAAQQA2AgQgACABNgIADAELIARBGGogASACEC0iAxADBEAgACADEBoMAQsgAwRAIABBuH8QGgwBCyACIAQoAjAiA2shAiABIANqIQMDQAJAIAAgAyACIARBCGoQLCIFEAMEfyAFBSACIAVBA2oiBU8NAUG4fwsQGgwCCyAGQQFqIQYgAiAFayECIAMgBWohAyAEKAIMRQ0ACyAEKAI4BEAgAkEDTQRAIABBuH8QGgwCCyADQQRqIQMLIAQoAighAiAEKQMYIQcgAEEANgIEIAAgAyABazYCACAAIAIgBmytIAcgB0J/URs3AwgLIARBQGskAAslAQF/IwBBEGsiAiQAIAIgACABEFEgAigCACEAIAJBEGokACAAC30BBH8jAEGQBGsiBCQAIARB/wE2AggCQCAEQRBqIARBCGogBEEMaiABIAIQFSIGEAMEQCAGIQUMAQtBVCEFIAQoAgwiB0EGSw0AIAMgBEEQaiAEKAIIIAcQQSIFEAMNACAAIAEgBmogAiAGayADEDwhBQsgBEGQBGokACAFC4cBAgJ/An5BABAWIQMCQANAIAEgA08EQAJAIAAoAABBcHFB0NS0wgFGBEAgACABECIiAhADRQ0BQn4PCyAAIAEQVSIEQn1WDQMgBCAFfCIFIARUIQJCfiEEIAINAyAAIAEQUiICEAMNAwsgASACayEBIAAgAmohAAwBCwtCfiAFIAEbIQQLIAQLPwIBfwF+IwBBMGsiAiQAAn5CfiACQQhqIAAgARAtDQAaQgAgAigCHEEBRg0AGiACKQMICyEDIAJBMGokACADC40BAQJ/IwBBMGsiASQAAkAgAEUNACAAKAKI4gENACABIABB/OEBaigCADYCKCABIAApAvThATcDICAAEDAgACgCqOIBIQIgASABKAIoNgIYIAEgASkDIDcDECACIAFBEGoQGyAAQQA2AqjiASABIAEoAig2AgggASABKQMgNwMAIAAgARAbCyABQTBqJAALKgECfyMAQRBrIgAkACAAQQA2AgggAEIANwMAIAAQWCEBIABBEGokACABC4cBAQN/IwBBEGsiAiQAAkAgACgCAEUgACgCBEVzDQAgAiAAKAIINgIIIAIgACkCADcDAAJ/IAIoAgAiAQRAIAIoAghBqOMJIAERBQAMAQtBqOMJECgLIgFFDQAgASAAKQIANwL04QEgAUH84QFqIAAoAgg2AgAgARBZIAEhAwsgAkEQaiQAIAMLywEBAn8jAEEgayIBJAAgAEGBgIDAADYCtOIBIABBADYCiOIBIABBADYC7OEBIABCADcDkOIBIABBADYCpOMJIABBADYC3OIBIABCADcCzOIBIABBADYCvOIBIABBADYCxOABIABCADcCnOIBIABBpOIBakIANwIAIABBrOIBakEANgIAIAFCADcCECABQgA3AhggASABKQMYNwMIIAEgASkDEDcDACABKAIIQQh2QQFxIQIgAEEANgLg4gEgACACNgKM4gEgAUEgaiQAC3YBA38jAEEwayIBJAAgAARAIAEgAEHE0AFqIgIoAgA2AiggASAAKQK80AE3AyAgACgCACEDIAEgAigCADYCGCABIAApArzQATcDECADIAFBEGoQGyABIAEoAig2AgggASABKQMgNwMAIAAgARAbCyABQTBqJAALzAEBAX8gACABKAK00AE2ApjiASAAIAEoAgQiAjYCwOABIAAgAjYCvOABIAAgAiABKAIIaiICNgK44AEgACACNgLE4AEgASgCuNABBEAgAEKBgICAEDcDiOEBIAAgAUGk0ABqNgIMIAAgAUGUIGo2AgggACABQZwwajYCBCAAIAFBDGo2AgAgAEGs0AFqIAFBqNABaigCADYCACAAQbDQAWogAUGs0AFqKAIANgIAIABBtNABaiABQbDQAWooAgA2AgAPCyAAQgA3A4jhAQs7ACACRQRAQbp/DwsgBEUEQEFsDwsgAiAEEGAEQCAAIAEgAiADIAQgBRBhDwsgACABIAIgAyAEIAUQZQtGAQF/IwBBEGsiBSQAIAVBCGogBBAOAn8gBS0ACQRAIAAgASACIAMgBBAyDAELIAAgASACIAMgBBA0CyEAIAVBEGokACAACzQAIAAgAyAEIAUQNiIFEAMEQCAFDwsgBSAESQR/IAEgAiADIAVqIAQgBWsgABA1BUG4fwsLRgEBfyMAQRBrIgUkACAFQQhqIAQQDgJ/IAUtAAkEQCAAIAEgAiADIAQQYgwBCyAAIAEgAiADIAQQNQshACAFQRBqJAAgAAtZAQF/QQ8hAiABIABJBEAgAUEE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",te={315:"Artist",258:"BitsPerSample",265:"CellLength",264:"CellWidth",320:"ColorMap",259:"Compression",33432:"Copyright",306:"DateTime",338:"ExtraSamples",266:"FillOrder",289:"FreeByteCounts",288:"FreeOffsets",291:"GrayResponseCurve",290:"GrayResponseUnit",316:"HostComputer",270:"ImageDescription",257:"ImageLength",256:"ImageWidth",271:"Make",281:"MaxSampleValue",280:"MinSampleValue",272:"Model",254:"NewSubfileType",274:"Orientation",262:"PhotometricInterpretation",284:"PlanarConfiguration",296:"ResolutionUnit",278:"RowsPerStrip",277:"SamplesPerPixel",305:"Software",279:"StripByteCounts",273:"StripOffsets",255:"SubfileType",263:"Threshholding",282:"XResolution",283:"YResolution",326:"BadFaxLines",327:"CleanFaxData",343:"ClipPath",328:"ConsecutiveBadFaxLines",433:"Decode",434:"DefaultImageColor",269:"DocumentName",336:"DotRange",321:"HalftoneHints",346:"Indexed",347:"JPEGTables",285:"PageName",297:"PageNumber",317:"Predictor",319:"PrimaryChromaticities",532:"ReferenceBlackWhite",339:"SampleFormat",340:"SMinSampleValue",341:"SMaxSampleValue",559:"StripRowCounts",330:"SubIFDs",292:"T4Options",293:"T6Options",325:"TileByteCounts",323:"TileLength",324:"TileOffsets",322:"TileWidth",301:"TransferFunction",318:"WhitePoint",344:"XClipPathUnits",286:"XPosition",529:"YCbCrCoefficients",531:"YCbCrPositioning",530:"YCbCrSubSampling",345:"YClipPathUnits",287:"YPosition",37378:"ApertureValue",40961:"ColorSpace",36868:"DateTimeDigitized",36867:"DateTimeOriginal",34665:"Exif IFD",36864:"ExifVersion",33434:"ExposureTime",41728:"FileSource",37385:"Flash",40960:"FlashpixVersion",33437:"FNumber",42016:"ImageUniqueID",37384:"LightSource",37500:"MakerNote",37377:"ShutterSpeedValue",37510:"UserComment",33723:"IPTC",34675:"ICC Profile",700:"XMP",42112:"GDAL_METADATA",42113:"GDAL_NODATA",34377:"Photoshop",33550:"ModelPixelScale",33922:"ModelTiepoint",34264:"ModelTransformation",34735:"GeoKeyDirectory",34736:"GeoDoubleParams",34737:"GeoAsciiParams",50674:"LercParameters"},ie={};for(var re in te)te.hasOwnProperty(re)&&(ie[te[re]]=parseInt(re,10));ie.BitsPerSample,ie.ExtraSamples,ie.SampleFormat,ie.StripByteCounts,ie.StripOffsets,ie.StripRowCounts,ie.TileByteCounts,ie.TileOffsets,ie.SubIFDs;var Ie={1:"BYTE",2:"ASCII",3:"SHORT",4:"LONG",5:"RATIONAL",6:"SBYTE",7:"UNDEFINED",8:"SSHORT",9:"SLONG",10:"SRATIONAL",11:"FLOAT",12:"DOUBLE",13:"IFD",16:"LONG8",17:"SLONG8",18:"IFD8"},ge={};for(var ne in Ie)Ie.hasOwnProperty(ne)&&(ge[Ie[ne]]=parseInt(ne,10));var ae=1,oe=0,Be=1,Ce=2,Qe={1024:"GTModelTypeGeoKey",1025:"GTRasterTypeGeoKey",1026:"GTCitationGeoKey",2048:"GeographicTypeGeoKey",2049:"GeogCitationGeoKey",2050:"GeogGeodeticDatumGeoKey",2051:"GeogPrimeMeridianGeoKey",2052:"GeogLinearUnitsGeoKey",2053:"GeogLinearUnitSizeGeoKey",2054:"GeogAngularUnitsGeoKey",2055:"GeogAngularUnitSizeGeoKey",2056:"GeogEllipsoidGeoKey",2057:"GeogSemiMajorAxisGeoKey",2058:"GeogSemiMinorAxisGeoKey",2059:"GeogInvFlatteningGeoKey",2060:"GeogAzimuthUnitsGeoKey",2061:"GeogPrimeMeridianLongGeoKey",2062:"GeogTOWGS84GeoKey",3072:"ProjectedCSTypeGeoKey",3073:"PCSCitationGeoKey",3074:"ProjectionGeoKey",3075:"ProjCoordTransGeoKey",3076:"ProjLinearUnitsGeoKey",3077:"ProjLinearUnitSizeGeoKey",3078:"ProjStdParallel1GeoKey",3079:"ProjStdParallel2GeoKey",3080:"ProjNatOriginLongGeoKey",3081:"ProjNatOriginLatGeoKey",3082:"ProjFalseEastingGeoKey",3083:"ProjFalseNorthingGeoKey",3084:"ProjFalseOriginLongGeoKey",3085:"ProjFalseOriginLatGeoKey",3086:"ProjFalseOriginEastingGeoKey",3087:"ProjFalseOriginNorthingGeoKey",3088:"ProjCenterLongGeoKey",3089:"ProjCenterLatGeoKey",3090:"ProjCenterEastingGeoKey",3091:"ProjCenterNorthingGeoKey",3092:"ProjScaleAtNatOriginGeoKey",3093:"ProjScaleAtCenterGeoKey",3094:"ProjAzimuthAngleGeoKey",3095:"ProjStraightVertPoleLongGeoKey",3096:"ProjRectifiedGridAngleGeoKey",4096:"VerticalCSTypeGeoKey",4097:"VerticalCitationGeoKey",4098:"VerticalDatumGeoKey",4099:"VerticalUnitsGeoKey"},Ee={};for(var se in Qe)Qe.hasOwnProperty(se)&&(Ee[Qe[se]]=parseInt(se,10));function fe(A){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(A){return!1}}();return function(){var t,i=c(A);if(e){var r=c(this).constructor;t=Reflect.construct(i,arguments,r)}else t=i.apply(this,arguments);return f(this,t)}}var ce=new Ae,he=function(A){s(t,w);var e=fe(t);function t(A){var i;return B(this,t),(i=e.call(this)).planarConfiguration=void 0!==A.PlanarConfiguration?A.PlanarConfiguration:1,i.samplesPerPixel=void 0!==A.SamplesPerPixel?A.SamplesPerPixel:1,i.addCompression=A.LercParameters[ae],i}return Q(t,[{key:"decodeBlock",value:function(A){switch(this.addCompression){case oe:break;case Be:A=YA(new Uint8Array(A)).buffer;break;case Ce:A=ce.decode(new Uint8Array(A)).buffer;break;default:throw new Error("Unsupported LERC additional compression method identifier: ".concat(this.addCompression))}return zA.decode(A,{returnPixelInterleavedDims:1===this.planarConfiguration}).pixels[0].buffer}}]),t}(),le=Object.freeze({__proto__:null,zstd:ce,default:he});function ue(A){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(A){return!1}}();return function(){var t,i=c(A);if(e){var r=c(this).constructor;t=Reflect.construct(i,arguments,r)}else t=i.apply(this,arguments);return f(this,t)}}var we=function(A){s(I,w);var t,i=ue(I);function I(){var A;if(B(this,I),A=i.call(this),"undefined"==typeof createImageBitmap)throw new Error("Cannot decode WebImage as `createImageBitmap` is not available");if("undefined"==typeof document&&"undefined"==typeof OffscreenCanvas)throw new Error("Cannot decode WebImage as neither `document` nor `OffscreenCanvas` is not available");return A}return Q(I,[{key:"decode",value:(t=e(r.mark((function A(e,t){var i,I,g,n;return r.wrap((function(A){for(;;)switch(A.prev=A.next){case 0:return i=new Blob([t]),A.next=3,createImageBitmap(i);case 3:return I=A.sent,"undefined"!=typeof document?((g=document.createElement("canvas")).width=I.width,g.height=I.height):g=new OffscreenCanvas(I.width,I.height),(n=g.getContext("2d")).drawImage(I,0,0),A.abrupt("return",n.getImageData(0,0,I.width,I.height).data.buffer);case 8:case"end":return A.stop()}}),A)}))),function(A,e){return t.apply(this,arguments)})}]),I}(),de=Object.freeze({__proto__:null,default:we});';return new i(typeof Buffer<"u"?"data:application/javascript;base64,"+Buffer.from(A,"binary").toString("base64"):URL.createObjectURL(new Blob([A],{type:"application/javascript"})))}export{o as create}; diff --git a/pr-preview/pr-2/assets/chunks/deflate-Be2Arps5-hDqMz3RA.CZq5SbJs.js b/pr-preview/pr-2/assets/chunks/deflate-Be2Arps5-hDqMz3RA.CZq5SbJs.js deleted file mode 100644 index 1fb0e1d..0000000 --- a/pr-preview/pr-2/assets/chunks/deflate-Be2Arps5-hDqMz3RA.CZq5SbJs.js +++ /dev/null @@ -1 +0,0 @@ -import{y as e}from"./pako.esm-C3kYPGGQ-BMki8cQY.CkDq0qTE.js";import{w as o}from"./basedecoder-Qm25PwVp-CHo5Pomv.CXiqZbVR.js";class s extends o{decodeBlock(r){return e(new Uint8Array(r)).buffer}}export{s as default}; diff --git a/pr-preview/pr-2/assets/chunks/dimensions-CJaGeSrj.Ds6JJdiE.js b/pr-preview/pr-2/assets/chunks/dimensions-CJaGeSrj.Ds6JJdiE.js deleted file mode 100644 index 3c6d350..0000000 --- a/pr-preview/pr-2/assets/chunks/dimensions-CJaGeSrj.Ds6JJdiE.js +++ /dev/null @@ -1 +0,0 @@ -import{Y as g,aI as u,ai as l,e as o,X as b,M as e}from"./eo-dash.Bz0AiLIy.js";const S=o({defaults:Object,disabled:Boolean,reset:[Number,String],root:[Boolean,String],scoped:Boolean},"VDefaultsProvider"),p=g(!1)({name:"VDefaultsProvider",props:S(),setup(t,n){let{slots:i}=n;const{defaults:a,disabled:d,reset:s,root:m,scoped:h}=u(t);return l(a,{reset:s,root:m,scoped:h,disabled:d}),()=>{var r;return(r=i.default)==null?void 0:r.call(i)}}}),f=o({height:[Number,String],maxHeight:[Number,String],maxWidth:[Number,String],minHeight:[Number,String],minWidth:[Number,String],width:[Number,String]},"dimension");function x(t){return{dimensionStyles:b(()=>({height:e(t.height),maxHeight:e(t.maxHeight),maxWidth:e(t.maxWidth),minHeight:e(t.minHeight),minWidth:e(t.minWidth),width:e(t.width)}))}}export{f as S,p as b,x as v}; diff --git a/pr-preview/pr-2/assets/chunks/eo-dash.Bz0AiLIy.js b/pr-preview/pr-2/assets/chunks/eo-dash.Bz0AiLIy.js deleted file mode 100644 index 4658d77..0000000 --- a/pr-preview/pr-2/assets/chunks/eo-dash.Bz0AiLIy.js +++ /dev/null @@ -1,42 +0,0 @@ -const __vite__fileDeps=["assets/chunks/webfontloader-CyOFAuFB.jf1PFvbl.js","assets/chunks/commonjsHelpers-DaMA6jEr.DwXtFsJ3.js","assets/chunks/EodashDatePicker-D_udZ26j.DhyaqOc2.js","assets/chunks/index-DTkOfh2g.aV6WRR23.js","assets/chunks/index-Sa2Vg_gx.CceVueR3.js","assets/chunks/VBtn-Bz7ruRUg.DWwH2z8a.js","assets/chunks/color-DpYEub1f.C1TESEKr.js","assets/chunks/dimensions-CJaGeSrj.Ds6JJdiE.js","assets/chunks/forwardRefs-Bxeu9Obx.D8TmPTZr.js","assets/chunks/framework.CCzXaKCO.js","assets/chunks/EodashItemFilter-BLAGx2UD.DbZDU8Tg.js","assets/chunks/DynamicWebComponent-BrHVTesn.BNJLct30.js","assets/chunks/EodashMap-Bxl_aqY2.BFSWz631.js","assets/chunks/WidgetsContainer-DxfCu0I3.DPGt-1ZD.js","assets/chunks/IframeWrapper-Dd9zrX9s.uUv_EKs2.js","assets/chunks/MobileLayout-CgToA7Gp.CZBTTNp3.js","assets/chunks/VMain-BHfWJU2j.ByWWJTS2.js","assets/chunks/ssrBoot-D-b4-M19.5KPN_o8O.js","assets/chunks/DashboardLayout-Dp8AnYD9.C8ccImxE.js","assets/chunks/Header-DC50S6GR.Bnz2I-RP.js","assets/chunks/Footer-AohCH8U7.Cwd531iG.js"],__vite__mapDeps=i=>i.map(i=>__vite__fileDeps[i]); -import{a3 as je}from"./framework.CCzXaKCO.js";function Tp(e,t){const n=new Set(e.split(","));return t?o=>n.has(o.toLowerCase()):o=>n.has(o)}const Ap=()=>{},Lc=Object.assign,jp=Object.prototype.hasOwnProperty,rr=(e,t)=>jp.call(e,t),Mt=Array.isArray,Jn=e=>Mc(e)==="[object Map]",Ic=e=>typeof e=="function",Pp=e=>typeof e=="string",Nr=e=>typeof e=="symbol",vo=e=>e!==null&&typeof e=="object",$p=Object.prototype.toString,Mc=e=>$p.call(e),Uc=e=>Mc(e).slice(8,-1),si=e=>Pp(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,Fp=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},Rp=Fp(e=>e.charAt(0).toUpperCase()+e.slice(1)),jn=(e,t)=>!Object.is(e,t),Lp=(e,t,n)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,value:n})};var fe={};function pt(e,...t){console.warn(`[Vue warn] ${e}`,...t)}let $e;class Bc{constructor(t=!1){this.detached=t,this._active=!0,this.effects=[],this.cleanups=[],this.parent=$e,!t&&$e&&(this.index=($e.scopes||($e.scopes=[])).push(this)-1)}get active(){return this._active}run(t){if(this._active){const n=$e;try{return $e=this,t()}finally{$e=n}}else fe.NODE_ENV!=="production"&&pt("cannot run an inactive effect scope.")}on(){$e=this}off(){$e=this.parent}stop(t){if(this._active){let n,o;for(n=0,o=this.effects.length;n=4))break}this._dirtyLevel===1&&(this._dirtyLevel=0),zt()}return this._dirtyLevel>=4}set dirty(t){this._dirtyLevel=t?4:0}run(){if(this._dirtyLevel=0,!this.active)return this.fn();let t=Ut,n=en;try{return Ut=!0,en=this,this._runnings++,Xi(this),this.fn()}finally{ea(this),this._runnings--,en=n,Ut=t}}stop(){var t;this.active&&(Xi(this),ea(this),(t=this.onStop)==null||t.call(this),this.active=!1)}}function Mp(e){return e.value}function Xi(e){e._trackId++,e._depsLength=0}function ea(e){if(e.deps.length>e._depsLength){for(let t=e._depsLength;t{const n=new Map;return n.cleanup=e,n.computed=t,n},sr=new WeakMap,tn=Symbol(fe.NODE_ENV!=="production"?"iterate":""),Os=Symbol(fe.NODE_ENV!=="production"?"Map key iterate":"");function De(e,t,n){if(Ut&&en){let o=sr.get(e);o||sr.set(e,o=new Map);let r=o.get(n);r||o.set(n,r=Jc(()=>o.delete(n))),Yc(en,r,fe.NODE_ENV!=="production"?{target:e,type:t,key:n}:void 0)}}function lt(e,t,n,o,r,s){const i=sr.get(e);if(!i)return;let a=[];if(t==="clear")a=[...i.values()];else if(n==="length"&&Mt(e)){const c=Number(o);i.forEach((p,u)=>{(u==="length"||!Nr(u)&&u>=c)&&a.push(p)})}else switch(n!==void 0&&a.push(i.get(n)),t){case"add":Mt(e)?si(n)&&a.push(i.get("length")):(a.push(i.get(tn)),Jn(e)&&a.push(i.get(Os)));break;case"delete":Mt(e)||(a.push(i.get(tn)),Jn(e)&&a.push(i.get(Os)));break;case"set":Jn(e)&&a.push(i.get(tn));break}ci();for(const c of a)c&&Kc(c,4,fe.NODE_ENV!=="production"?{target:e,type:t,key:n,newValue:o,oldValue:r,oldTarget:s}:void 0);li()}function Up(e,t){var n;return(n=sr.get(e))==null?void 0:n.get(t)}const Bp=Tp("__proto__,__v_isRef,__isVue"),Gc=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(Nr)),ta=Hp();function Hp(){const e={};return["includes","indexOf","lastIndexOf"].forEach(t=>{e[t]=function(...n){const o=H(this);for(let s=0,i=this.length;s{e[t]=function(...n){Ht(),ci();const o=H(this)[t].apply(this,n);return li(),zt(),o}}),e}function zp(e){const t=H(this);return De(t,"has",e),t.hasOwnProperty(e)}class Zc{constructor(t=!1,n=!1){this._isReadonly=t,this._isShallow=n}get(t,n,o){const r=this._isReadonly,s=this._isShallow;if(n==="__v_isReactive")return!r;if(n==="__v_isReadonly")return r;if(n==="__v_isShallow")return s;if(n==="__v_raw")return o===(r?s?rl:ol:s?nl:tl).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(o)?t:void 0;const i=Mt(t);if(!r){if(i&&rr(ta,n))return Reflect.get(ta,n,o);if(n==="hasOwnProperty")return zp}const a=Reflect.get(t,n,o);return(Nr(n)?Gc.has(n):Bp(n))||(r||De(t,"get",n),s)?a:le(a)?i&&si(n)?a:a.value:vo(a)?r?pi(a):ye(a):a}}class Qc extends Zc{constructor(t=!1){super(!1,t)}set(t,n,o,r){let s=t[n];if(!this._isShallow){const c=Bt(s);if(!nn(o)&&!Bt(o)&&(s=H(s),o=H(o)),!Mt(t)&&le(s)&&!le(o))return c?!1:(s.value=o,!0)}const i=Mt(t)&&si(n)?Number(n)e,Or=e=>Reflect.getPrototypeOf(e);function Vo(e,t,n=!1,o=!1){e=e.__v_raw;const r=H(e),s=H(t);n||(jn(t,s)&&De(r,"get",t),De(r,"get",s));const{has:i}=Or(r),a=o?ui:n?di:ro;if(i.call(r,t))return a(e.get(t));if(i.call(r,s))return a(e.get(s));e!==r&&e.get(t)}function To(e,t=!1){const n=this.__v_raw,o=H(n),r=H(e);return t||(jn(e,r)&&De(o,"has",e),De(o,"has",r)),e===r?n.has(e):n.has(e)||n.has(r)}function Ao(e,t=!1){return e=e.__v_raw,!t&&De(H(e),"iterate",tn),Reflect.get(e,"size",e)}function na(e){e=H(e);const t=H(this);return Or(t).has.call(t,e)||(t.add(e),lt(t,"add",e,e)),this}function oa(e,t){t=H(t);const n=H(this),{has:o,get:r}=Or(n);let s=o.call(n,e);s?fe.NODE_ENV!=="production"&&el(n,o,e):(e=H(e),s=o.call(n,e));const i=r.call(n,e);return n.set(e,t),s?jn(t,i)&<(n,"set",e,t,i):lt(n,"add",e,t),this}function ra(e){const t=H(this),{has:n,get:o}=Or(t);let r=n.call(t,e);r?fe.NODE_ENV!=="production"&&el(t,n,e):(e=H(e),r=n.call(t,e));const s=o?o.call(t,e):void 0,i=t.delete(e);return r&<(t,"delete",e,void 0,s),i}function sa(){const e=H(this),t=e.size!==0,n=fe.NODE_ENV!=="production"?Jn(e)?new Map(e):new Set(e):void 0,o=e.clear();return t&<(e,"clear",void 0,void 0,n),o}function jo(e,t){return function(n,o){const r=this,s=r.__v_raw,i=H(s),a=t?ui:e?di:ro;return!e&&De(i,"iterate",tn),s.forEach((c,p)=>n.call(o,a(c),a(p),r))}}function Po(e,t,n){return function(...o){const r=this.__v_raw,s=H(r),i=Jn(s),a=e==="entries"||e===Symbol.iterator&&i,c=e==="keys"&&i,p=r[e](...o),u=n?ui:t?di:ro;return!t&&De(s,"iterate",c?Os:tn),{next(){const{value:l,done:f}=p.next();return f?{value:l,done:f}:{value:a?[u(l[0]),u(l[1])]:u(l),done:f}},[Symbol.iterator](){return this}}}}function Vt(e){return function(...t){if(fe.NODE_ENV!=="production"){const n=t[0]?`on key "${t[0]}" `:"";pt(`${Rp(e)} operation ${n}failed: target is readonly.`,H(this))}return e==="delete"?!1:e==="clear"?void 0:this}}function Jp(){const e={get(r){return Vo(this,r)},get size(){return Ao(this)},has:To,add:na,set:oa,delete:ra,clear:sa,forEach:jo(!1,!1)},t={get(r){return Vo(this,r,!1,!0)},get size(){return Ao(this)},has:To,add:na,set:oa,delete:ra,clear:sa,forEach:jo(!1,!0)},n={get(r){return Vo(this,r,!0)},get size(){return Ao(this,!0)},has(r){return To.call(this,r,!0)},add:Vt("add"),set:Vt("set"),delete:Vt("delete"),clear:Vt("clear"),forEach:jo(!0,!1)},o={get(r){return Vo(this,r,!0,!0)},get size(){return Ao(this,!0)},has(r){return To.call(this,r,!0)},add:Vt("add"),set:Vt("set"),delete:Vt("delete"),clear:Vt("clear"),forEach:jo(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach(r=>{e[r]=Po(r,!1,!1),n[r]=Po(r,!0,!1),t[r]=Po(r,!1,!0),o[r]=Po(r,!0,!0)}),[e,n,t,o]}const[Gp,Zp,Qp,Xp]=Jp();function Sr(e,t){const n=t?e?Xp:Qp:e?Zp:Gp;return(o,r,s)=>r==="__v_isReactive"?!e:r==="__v_isReadonly"?e:r==="__v_raw"?o:Reflect.get(rr(n,r)&&r in o?n:o,r,s)}const ed={get:Sr(!1,!1)},td={get:Sr(!1,!0)},nd={get:Sr(!0,!1)},od={get:Sr(!0,!0)};function el(e,t,n){const o=H(n);if(o!==n&&t.call(e,o)){const r=Uc(e);pt(`Reactive ${r} contains both the raw and reactive versions of the same object${r==="Map"?" as keys":""}, which can lead to inconsistencies. Avoid differentiating between the raw and reactive versions of an object and only use the reactive version if possible.`)}}const tl=new WeakMap,nl=new WeakMap,ol=new WeakMap,rl=new WeakMap;function rd(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function sd(e){return e.__v_skip||!Object.isExtensible(e)?0:rd(Uc(e))}function ye(e){return Bt(e)?e:Dr(e,!1,Wp,ed,tl)}function id(e){return Dr(e,!1,Yp,td,nl)}function pi(e){return Dr(e,!0,qp,nd,ol)}function bn(e){return Dr(e,!0,Kp,od,rl)}function Dr(e,t,n,o,r){if(!vo(e))return fe.NODE_ENV!=="production"&&pt(`value cannot be made reactive: ${String(e)}`),e;if(e.__v_raw&&!(t&&e.__v_isReactive))return e;const s=r.get(e);if(s)return s;const i=sd(e);if(i===0)return e;const a=new Proxy(e,i===2?o:n);return r.set(e,a),a}function Ze(e){return Bt(e)?Ze(e.__v_raw):!!(e&&e.__v_isReactive)}function Bt(e){return!!(e&&e.__v_isReadonly)}function nn(e){return!!(e&&e.__v_isShallow)}function ir(e){return Ze(e)||Bt(e)}function H(e){const t=e&&e.__v_raw;return t?H(t):e}function wt(e){return Object.isExtensible(e)&&Lp(e,"__v_skip",!0),e}const ro=e=>vo(e)?ye(e):e,di=e=>vo(e)?pi(e):e,ad="Computed is still dirty after getter evaluation, likely because a computed is mutating its own dependency in its getter. State mutations in computed getters should be avoided. Check the docs for more details: https://vuejs.org/guide/essentials/computed.html#getters-should-be-side-effect-free";class sl{constructor(t,n,o,r){this.getter=t,this._setter=n,this.dep=void 0,this.__v_isRef=!0,this.__v_isReadonly=!1,this.effect=new ai(()=>t(this._value),()=>Ho(this,this.effect._dirtyLevel===2?2:3)),this.effect.computed=this,this.effect.active=this._cacheable=!r,this.__v_isReadonly=o}get value(){const t=H(this);return(!t._cacheable||t.effect.dirty)&&jn(t._value,t._value=t.effect.run())&&Ho(t,4),il(t),t.effect._dirtyLevel>=2&&(fe.NODE_ENV!=="production"&&this._warnRecursive&&pt(ad,` - -getter: `,this.getter),Ho(t,2)),t._value}set value(t){this._setter(t)}get _dirty(){return this.effect.dirty}set _dirty(t){this.effect.dirty=t}}function cd(e,t,n=!1){let o,r;const s=Ic(e);s?(o=e,r=fe.NODE_ENV!=="production"?()=>{pt("Write operation failed: computed value is readonly")}:Ap):(o=e.get,r=e.set);const i=new sl(o,r,s||!r,n);return fe.NODE_ENV!=="production"&&t&&!n&&(i.effect.onTrack=t.onTrack,i.effect.onTrigger=t.onTrigger),i}function il(e){var t;Ut&&en&&(e=H(e),Yc(en,(t=e.dep)!=null?t:e.dep=Jc(()=>e.dep=void 0,e instanceof sl?e:void 0),fe.NODE_ENV!=="production"?{target:e,type:"get",key:"value"}:void 0))}function Ho(e,t=4,n){e=H(e);const o=e.dep;o&&Kc(o,t,fe.NODE_ENV!=="production"?{target:e,type:"set",key:"value",newValue:n}:void 0)}function le(e){return!!(e&&e.__v_isRef===!0)}function pe(e){return al(e,!1)}function Ot(e){return al(e,!0)}function al(e,t){return le(e)?e:new ld(e,t)}class ld{constructor(t,n){this.__v_isShallow=n,this.dep=void 0,this.__v_isRef=!0,this._rawValue=n?t:H(t),this._value=n?t:ro(t)}get value(){return il(this),this._value}set value(t){const n=this.__v_isShallow||nn(t)||Bt(t);t=n?t:H(t),jn(t,this._rawValue)&&(this._rawValue=t,this._value=n?t:ro(t),Ho(this,4,t))}}function we(e){return le(e)?e.value:e}const ud={get:(e,t,n)=>we(Reflect.get(e,t,n)),set:(e,t,n,o)=>{const r=e[t];return le(r)&&!le(n)?(r.value=n,!0):Reflect.set(e,t,n,o)}};function cl(e){return Ze(e)?e:new Proxy(e,ud)}function ar(e){fe.NODE_ENV!=="production"&&!ir(e)&&pt("toRefs() expects a reactive object but received a plain one.");const t=Mt(e)?new Array(e.length):{};for(const n in e)t[n]=ll(e,n);return t}class pd{constructor(t,n,o){this._object=t,this._key=n,this._defaultValue=o,this.__v_isRef=!0}get value(){const t=this._object[this._key];return t===void 0?this._defaultValue:t}set value(t){this._object[this._key]=t}get dep(){return Up(H(this._object),this._key)}}class dd{constructor(t){this._getter=t,this.__v_isRef=!0,this.__v_isReadonly=!0}get value(){return this._getter()}}function zo(e,t,n){return le(e)?e:Ic(e)?new dd(e):vo(e)&&arguments.length>1?ll(e,t,n):pe(e)}function ll(e,t,n){const o=e[t];return le(o)?o:new pd(e,t,n)}var ul={};/** -* @vue/shared v3.4.21 -* (c) 2018-present Yuxi (Evan) You and Vue contributors -* @license MIT -**/function kr(e,t){const n=new Set(e.split(","));return t?o=>n.has(o.toLowerCase()):o=>n.has(o)}const se=ul.NODE_ENV!=="production"?Object.freeze({}):{},wn=ul.NODE_ENV!=="production"?Object.freeze([]):[],ve=()=>{},fd=()=>!1,Cr=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),Ss=e=>e.startsWith("onUpdate:"),_e=Object.assign,fi=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},hd=Object.prototype.hasOwnProperty,ne=(e,t)=>hd.call(e,t),Y=Array.isArray,pl=e=>Vr(e)==="[object Map]",dl=e=>Vr(e)==="[object Set]",z=e=>typeof e=="function",ge=e=>typeof e=="string",fl=e=>typeof e=="symbol",ce=e=>e!==null&&typeof e=="object",xr=e=>(ce(e)||z(e))&&z(e.then)&&z(e.catch),hl=Object.prototype.toString,Vr=e=>hl.call(e),md=e=>Vr(e).slice(8,-1),ml=e=>Vr(e)==="[object Object]",Gn=kr(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),gd=kr("bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo"),Tr=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},yd=/-(\w)/g,dt=Tr(e=>e.replace(yd,(t,n)=>n?n.toUpperCase():"")),vd=/\B([A-Z])/g,Dn=Tr(e=>e.replace(vd,"-$1").toLowerCase()),Ct=Tr(e=>e.charAt(0).toUpperCase()+e.slice(1)),Jt=Tr(e=>e?`on${Ct(e)}`:""),ia=(e,t)=>!Object.is(e,t),Un=(e,t)=>{for(let n=0;n{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,value:n})},bd=e=>{const t=parseFloat(e);return isNaN(t)?e:t},_d=e=>{const t=ge(e)?Number(e):NaN;return isNaN(t)?e:t};let aa;const hi=()=>aa||(aa=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function bo(e){if(Y(e)){const t={};for(let n=0;n{if(n){const o=n.split(wd);o.length>1&&(t[o[0].trim()]=o[1].trim())}}),t}function Ar(e){let t="";if(ge(e))t=e;else if(Y(e))for(let n=0;nge(e)?e:e==null?"":Y(e)||ce(e)&&(e.toString===hl||!z(e.toString))?JSON.stringify(e,gl,2):String(e),gl=(e,t)=>t&&t.__v_isRef?gl(e,t.value):pl(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[o,r],s)=>(n[ns(o,s)+" =>"]=r,n),{})}:dl(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>ns(n))}:fl(t)?ns(t):ce(t)&&!Y(t)&&!ml(t)?String(t):t,ns=(e,t="")=>{var n;return fl(e)?`Symbol(${(n=e.description)!=null?n:t})`:e};var y={};const on=[];function Zn(e){on.push(e)}function Qn(){on.pop()}function x(e,...t){Ht();const n=on.length?on[on.length-1].component:null,o=n&&n.appContext.config.warnHandler,r=Dd();if(o)St(o,n,11,[e+t.map(s=>{var i,a;return(a=(i=s.toString)==null?void 0:i.call(s))!=null?a:JSON.stringify(s)}).join(""),n&&n.proxy,r.map(({vnode:s})=>`at <${Ur(n,s.type)}>`).join(` -`),r]);else{const s=[`[Vue warn]: ${e}`,...t];r.length&&s.push(` -`,...kd(r)),console.warn(...s)}zt()}function Dd(){let e=on[on.length-1];if(!e)return[];const t=[];for(;e;){const n=t[0];n&&n.vnode===e?n.recurseCount++:t.push({vnode:e,recurseCount:0});const o=e.component&&e.component.parent;e=o&&o.vnode}return t}function kd(e){const t=[];return e.forEach((n,o)=>{t.push(...o===0?[]:[` -`],...Cd(n))}),t}function Cd({vnode:e,recurseCount:t}){const n=t>0?`... (${t} recursive calls)`:"",o=e.component?e.component.parent==null:!1,r=` at <${Ur(e.component,e.type,o)}`,s=">"+n;return e.props?[r,...xd(e.props),s]:[r+s]}function xd(e){const t=[],n=Object.keys(e);return n.slice(0,3).forEach(o=>{t.push(...yl(o,e[o]))}),n.length>3&&t.push(" ..."),t}function yl(e,t,n){return ge(t)?(t=JSON.stringify(t),n?t:[`${e}=${t}`]):typeof t=="number"||typeof t=="boolean"||t==null?n?t:[`${e}=${t}`]:le(t)?(t=yl(e,H(t.value),!0),n?t:[`${e}=Ref<`,t,">"]):z(t)?[`${e}=fn${t.name?`<${t.name}>`:""}`]:(t=H(t),n?t:[`${e}=`,t])}function vl(e,t){y.NODE_ENV!=="production"&&e!==void 0&&(typeof e!="number"?x(`${t} is not a valid number - got ${JSON.stringify(e)}.`):isNaN(e)&&x(`${t} is NaN - the duration expression might be incorrect.`))}const mi={sp:"serverPrefetch hook",bc:"beforeCreate hook",c:"created hook",bm:"beforeMount hook",m:"mounted hook",bu:"beforeUpdate hook",u:"updated",bum:"beforeUnmount hook",um:"unmounted hook",a:"activated hook",da:"deactivated hook",ec:"errorCaptured hook",rtc:"renderTracked hook",rtg:"renderTriggered hook",0:"setup function",1:"render function",2:"watcher getter",3:"watcher callback",4:"watcher cleanup function",5:"native event handler",6:"component event handler",7:"vnode hook",8:"directive hook",9:"transition hook",10:"app errorHandler",11:"app warnHandler",12:"ref function",13:"async component loader",14:"scheduler flush. This is likely a Vue internals bug. Please open an issue at https://github.com/vuejs/core ."};function St(e,t,n,o){try{return o?e(...o):e()}catch(r){pn(r,t,n)}}function We(e,t,n,o){if(z(e)){const s=St(e,t,n,o);return s&&xr(s)&&s.catch(i=>{pn(i,t,n)}),s}const r=[];for(let s=0;s>>1,r=Ce[o],s=ao(r);srt&&Ce.splice(t,1)}function cr(e){Y(e)?Nn.push(...e):(!Et||!Et.includes(e,e.allowRecurse?Pt+1:Pt))&&Nn.push(e),_l()}function ca(e,t,n=so?rt+1:0){for(y.NODE_ENV!=="production"&&(t=t||new Map);nao(n)-ao(o));if(Nn.length=0,Et){Et.push(...t);return}for(Et=t,y.NODE_ENV!=="production"&&(e=e||new Map),Pt=0;Pte.id==null?1/0:e.id,Pd=(e,t)=>{const n=ao(e)-ao(t);if(n===0){if(e.pre&&!t.pre)return-1;if(t.pre&&!e.pre)return 1}return n};function wl(e){ks=!1,so=!0,y.NODE_ENV!=="production"&&(e=e||new Map),Ce.sort(Pd);const t=y.NODE_ENV!=="production"?n=>yi(e,n):ve;try{for(rt=0;rtTd){const o=t.ownerInstance,r=o&&Ti(o.type);return pn(`Maximum recursive updates exceeded${r?` in component <${r}>`:""}. This means you have a reactive effect that is mutating its own dependencies and thus recursively triggering itself. Possible sources include component template, render function, updated hook or watcher source function.`,null,10),!0}else e.set(t,n+1)}}let rn=!1;const vn=new Set;y.NODE_ENV!=="production"&&(hi().__VUE_HMR_RUNTIME__={createRecord:os(Nl),rerender:os(Rd),reload:os(Ld)});const cn=new Map;function $d(e){const t=e.type.__hmrId;let n=cn.get(t);n||(Nl(t,e.type),n=cn.get(t)),n.instances.add(e)}function Fd(e){cn.get(e.type.__hmrId).instances.delete(e)}function Nl(e,t){return cn.has(e)?!1:(cn.set(e,{initialDef:Xn(t),instances:new Set}),!0)}function Xn(e){return ru(e)?e.__vccOpts:e}function Rd(e,t){const n=cn.get(e);n&&(n.initialDef.render=t,[...n.instances].forEach(o=>{t&&(o.render=t,Xn(o.type).render=t),o.renderCache=[],rn=!0,o.effect.dirty=!0,o.update(),rn=!1}))}function Ld(e,t){const n=cn.get(e);if(!n)return;t=Xn(t),la(n.initialDef,t);const o=[...n.instances];for(const r of o){const s=Xn(r.type);vn.has(s)||(s!==n.initialDef&&la(s,t),vn.add(s)),r.appContext.propsCache.delete(r.type),r.appContext.emitsCache.delete(r.type),r.appContext.optionsCache.delete(r.type),r.ceReload?(vn.add(s),r.ceReload(t.styles),vn.delete(s)):r.parent?(r.parent.effect.dirty=!0,_o(r.parent.update)):r.appContext.reload?r.appContext.reload():typeof window<"u"?window.location.reload():console.warn("[HMR] Root or manually mounted instance modified. Full reload required.")}cr(()=>{for(const r of o)vn.delete(Xn(r.type))})}function la(e,t){_e(e,t);for(const n in e)n!=="__file"&&!(n in t)&&delete e[n]}function os(e){return(t,n)=>{try{return e(t,n)}catch(o){console.error(o),console.warn("[HMR] Something went wrong during Vue component hot-reload. Full reload required.")}}}let st,qn=[],Cs=!1;function Eo(e,...t){st?st.emit(e,...t):Cs||qn.push({event:e,args:t})}function Ol(e,t){var n,o;st=e,st?(st.enabled=!0,qn.forEach(({event:r,args:s})=>st.emit(r,...s)),qn=[]):typeof window<"u"&&window.HTMLElement&&!((o=(n=window.navigator)==null?void 0:n.userAgent)!=null&&o.includes("jsdom"))?((t.__VUE_DEVTOOLS_HOOK_REPLAY__=t.__VUE_DEVTOOLS_HOOK_REPLAY__||[]).push(r=>{Ol(r,t)}),setTimeout(()=>{st||(t.__VUE_DEVTOOLS_HOOK_REPLAY__=null,Cs=!0,qn=[])},3e3)):(Cs=!0,qn=[])}function Id(e,t){Eo("app:init",e,t,{Fragment:Ae,Text:No,Comment:Se,Static:Yo})}function Md(e){Eo("app:unmount",e)}const Ud=vi("component:added"),Sl=vi("component:updated"),Bd=vi("component:removed"),Hd=e=>{st&&typeof st.cleanupBuffer=="function"&&!st.cleanupBuffer(e)&&Bd(e)};function vi(e){return t=>{Eo(e,t.appContext.app,t.uid,t.parent?t.parent.uid:void 0,t)}}const zd=Dl("perf:start"),Wd=Dl("perf:end");function Dl(e){return(t,n,o)=>{Eo(e,t.appContext.app,t.uid,t,n,o)}}function qd(e,t,n){Eo("component:emit",e.appContext.app,e,t,n)}function Yd(e,t,...n){if(e.isUnmounted)return;const o=e.vnode.props||se;if(y.NODE_ENV!=="production"){const{emitsOptions:u,propsOptions:[l]}=e;if(u)if(!(t in u))(!l||!(Jt(t)in l))&&x(`Component emitted event "${t}" but it is neither declared in the emits option nor as an "${Jt(t)}" prop.`);else{const f=u[t];z(f)&&(f(...n)||x(`Invalid event arguments: event validation failed for event "${t}".`))}}let r=n;const s=t.startsWith("update:"),i=s&&t.slice(7);if(i&&i in o){const u=`${i==="modelValue"?"model":i}Modifiers`,{number:l,trim:f}=o[u]||se;f&&(r=n.map(m=>ge(m)?m.trim():m)),l&&(r=n.map(bd))}if(y.NODE_ENV!=="production"&&qd(e,t,r),y.NODE_ENV!=="production"){const u=t.toLowerCase();u!==t&&o[Jt(u)]&&x(`Event "${u}" is emitted in component ${Ur(e,e.type)} but the handler is registered for "${t}". Note that HTML attributes are case-insensitive and you cannot use v-on to listen to camelCase events when using in-DOM templates. You should probably use "${Dn(t)}" instead of "${t}".`)}let a,c=o[a=Jt(t)]||o[a=Jt(dt(t))];!c&&s&&(c=o[a=Jt(Dn(t))]),c&&We(c,e,6,r);const p=o[a+"Once"];if(p){if(!e.emitted)e.emitted={};else if(e.emitted[a])return;e.emitted[a]=!0,We(p,e,6,r)}}function kl(e,t,n=!1){const o=t.emitsCache,r=o.get(e);if(r!==void 0)return r;const s=e.emits;let i={},a=!1;if(!z(e)){const c=p=>{const u=kl(p,t,!0);u&&(a=!0,_e(i,u))};!n&&t.mixins.length&&t.mixins.forEach(c),e.extends&&c(e.extends),e.mixins&&e.mixins.forEach(c)}return!s&&!a?(ce(e)&&o.set(e,null),null):(Y(s)?s.forEach(c=>i[c]=null):_e(i,s),ce(e)&&o.set(e,i),i)}function jr(e,t){return!e||!Cr(t)?!1:(t=t.slice(2).replace(/Once$/,""),ne(e,t[0].toLowerCase()+t.slice(1))||ne(e,Dn(t))||ne(e,t))}let Oe=null,Cl=null;function lr(e){const t=Oe;return Oe=e,Cl=e&&e.type.__scopeId||null,t}function at(e,t=Oe,n){if(!t||e._n)return e;const o=(...r)=>{o._d&&Sa(-1);const s=lr(t);let i;try{i=e(...r)}finally{lr(s),o._d&&Sa(1)}return y.NODE_ENV!=="production"&&Sl(t),i};return o._n=!0,o._c=!0,o._d=!0,o}let xs=!1;function ur(){xs=!0}function rs(e){const{type:t,vnode:n,proxy:o,withProxy:r,props:s,propsOptions:[i],slots:a,attrs:c,emit:p,render:u,renderCache:l,data:f,setupState:m,ctx:h,inheritAttrs:v}=e;let A,W;const U=lr(e);y.NODE_ENV!=="production"&&(xs=!1);try{if(n.shapeFlag&4){const F=r||o,R=y.NODE_ENV!=="production"&&m.__isScriptSetup?new Proxy(F,{get(N,V,_){return x(`Property '${String(V)}' was accessed via 'this'. Avoid using 'this' in templates.`),Reflect.get(N,V,_)}}):F;A=Be(u.call(R,F,l,s,m,f,h)),W=c}else{const F=t;y.NODE_ENV!=="production"&&c===s&&ur(),A=Be(F.length>1?F(s,y.NODE_ENV!=="production"?{get attrs(){return ur(),c},slots:a,emit:p}:{attrs:c,slots:a,emit:p}):F(s,null)),W=t.props?c:Kd(c)}}catch(F){eo.length=0,pn(F,e,1),A=ee(Se)}let J=A,Q;if(y.NODE_ENV!=="production"&&A.patchFlag>0&&A.patchFlag&2048&&([J,Q]=xl(A)),W&&v!==!1){const F=Object.keys(W),{shapeFlag:R}=J;if(F.length){if(R&7)i&&F.some(Ss)&&(W=Jd(W,i)),J=ft(J,W);else if(y.NODE_ENV!=="production"&&!xs&&J.type!==Se){const N=Object.keys(c),V=[],_=[];for(let E=0,L=N.length;E renders non-element root node that cannot be animated."),J.transition=n.transition),y.NODE_ENV!=="production"&&Q?Q(J):A=J,lr(U),A}const xl=e=>{const t=e.children,n=e.dynamicChildren,o=Pr(t,!1);if(o){if(y.NODE_ENV!=="production"&&o.patchFlag>0&&o.patchFlag&2048)return xl(o)}else return[e,void 0];const r=t.indexOf(o),s=n?n.indexOf(o):-1,i=a=>{t[r]=a,n&&(s>-1?n[s]=a:a.patchFlag>0&&(e.dynamicChildren=[...n,a]))};return[Be(o),i]};function Pr(e,t=!0){let n;for(let o=0;o0&&n.patchFlag&2048)return Pr(n.children)}}else return}return n}const Kd=e=>{let t;for(const n in e)(n==="class"||n==="style"||Cr(n))&&((t||(t={}))[n]=e[n]);return t},Jd=(e,t)=>{const n={};for(const o in e)(!Ss(o)||!(o.slice(9)in t))&&(n[o]=e[o]);return n},ua=e=>e.shapeFlag&7||e.type===Se;function Gd(e,t,n){const{props:o,children:r,component:s}=e,{props:i,children:a,patchFlag:c}=t,p=s.emitsOptions;if(y.NODE_ENV!=="production"&&(r||a)&&rn||t.dirs||t.transition)return!0;if(n&&c>=0){if(c&1024)return!0;if(c&16)return o?pa(o,i,p):!!i;if(c&8){const u=t.dynamicProps;for(let l=0;le.__isSuspense;let Ts=0;const ef={name:"Suspense",__isSuspense:!0,process(e,t,n,o,r,s,i,a,c,p){if(e==null)tf(t,n,o,r,s,i,a,c,p);else{if(s&&s.deps>0&&!e.suspense.isInFallback){t.suspense=e.suspense,t.suspense.vnode=t,t.el=e.el;return}nf(e,t,n,o,r,i,a,c,p)}},hydrate:of,create:wi,normalize:rf},Ei=ef;function co(e,t){const n=e.props&&e.props[t];z(n)&&n()}function tf(e,t,n,o,r,s,i,a,c){const{p,o:{createElement:u}}=c,l=u("div"),f=e.suspense=wi(e,r,o,t,l,n,s,i,a,c);p(null,f.pendingBranch=e.ssContent,l,null,o,f,s,i),f.deps>0?(co(e,"onPending"),co(e,"onFallback"),p(null,e.ssFallback,t,n,o,null,s,i),On(f,e.ssFallback)):f.resolve(!1,!0)}function nf(e,t,n,o,r,s,i,a,{p:c,um:p,o:{createElement:u}}){const l=t.suspense=e.suspense;l.vnode=t,t.el=e.el;const f=t.ssContent,m=t.ssFallback,{activeBranch:h,pendingBranch:v,isInFallback:A,isHydrating:W}=l;if(v)l.pendingBranch=f,it(f,v)?(c(v,f,l.hiddenContainer,null,r,l,s,i,a),l.deps<=0?l.resolve():A&&(W||(c(h,m,n,o,r,null,s,i,a),On(l,m)))):(l.pendingId=Ts++,W?(l.isHydrating=!1,l.activeBranch=v):p(v,r,l),l.deps=0,l.effects.length=0,l.hiddenContainer=u("div"),A?(c(null,f,l.hiddenContainer,null,r,l,s,i,a),l.deps<=0?l.resolve():(c(h,m,n,o,r,null,s,i,a),On(l,m))):h&&it(f,h)?(c(h,f,n,o,r,l,s,i,a),l.resolve(!0)):(c(null,f,l.hiddenContainer,null,r,l,s,i,a),l.deps<=0&&l.resolve()));else if(h&&it(f,h))c(h,f,n,o,r,l,s,i,a),On(l,f);else if(co(t,"onPending"),l.pendingBranch=f,f.shapeFlag&512?l.pendingId=f.component.suspenseId:l.pendingId=Ts++,c(null,f,l.hiddenContainer,null,r,l,s,i,a),l.deps<=0)l.resolve();else{const{timeout:U,pendingId:J}=l;U>0?setTimeout(()=>{l.pendingId===J&&l.fallback(m)},U):U===0&&l.fallback(m)}}let fa=!1;function wi(e,t,n,o,r,s,i,a,c,p,u=!1){y.NODE_ENV!=="production"&&!fa&&(fa=!0,console[console.info?"info":"log"](" is an experimental feature and its API will likely change."));const{p:l,m:f,um:m,n:h,o:{parentNode:v,remove:A}}=p;let W;const U=af(e);U&&(t!=null&&t.pendingBranch)&&(W=t.pendingId,t.deps++);const J=e.props?_d(e.props.timeout):void 0;y.NODE_ENV!=="production"&&vl(J,"Suspense timeout");const Q=s,F={vnode:e,parent:t,parentComponent:n,namespace:i,container:o,hiddenContainer:r,deps:0,pendingId:Ts++,timeout:typeof J=="number"?J:-1,activeBranch:null,pendingBranch:null,isInFallback:!u,isHydrating:u,isUnmounted:!1,effects:[],resolve(R=!1,N=!1){if(y.NODE_ENV!=="production"){if(!R&&!F.pendingBranch)throw new Error("suspense.resolve() is called without a pending branch.");if(F.isUnmounted)throw new Error("suspense.resolve() is called on an already unmounted suspense boundary.")}const{vnode:V,activeBranch:_,pendingBranch:E,pendingId:L,effects:k,parentComponent:K,container:ie}=F;let me=!1;F.isHydrating?F.isHydrating=!1:R||(me=_&&E.transition&&E.transition.mode==="out-in",me&&(_.transition.afterLeave=()=>{L===F.pendingId&&(f(E,ie,s===Q?h(_):s,0),cr(k))}),_&&(v(_.el)!==F.hiddenContainer&&(s=h(_)),m(_,K,F,!0)),me||f(E,ie,s,0)),On(F,E),F.pendingBranch=null,F.isInFallback=!1;let oe=F.parent,M=!1;for(;oe;){if(oe.pendingBranch){oe.effects.push(...k),M=!0;break}oe=oe.parent}!M&&!me&&cr(k),F.effects=[],U&&t&&t.pendingBranch&&W===t.pendingId&&(t.deps--,t.deps===0&&!N&&t.resolve()),co(V,"onResolve")},fallback(R){if(!F.pendingBranch)return;const{vnode:N,activeBranch:V,parentComponent:_,container:E,namespace:L}=F;co(N,"onFallback");const k=h(V),K=()=>{F.isInFallback&&(l(null,R,E,k,_,null,L,a,c),On(F,R))},ie=R.transition&&R.transition.mode==="out-in";ie&&(V.transition.afterLeave=K),F.isInFallback=!0,m(V,_,null,!0),ie||K()},move(R,N,V){F.activeBranch&&f(F.activeBranch,R,N,V),F.container=R},next(){return F.activeBranch&&h(F.activeBranch)},registerDep(R,N){const V=!!F.pendingBranch;V&&F.deps++;const _=R.vnode.el;R.asyncDep.catch(E=>{pn(E,R,0)}).then(E=>{if(R.isUnmounted||F.isUnmounted||F.pendingId!==R.suspenseId)return;R.asyncResolved=!0;const{vnode:L}=R;y.NODE_ENV!=="production"&&Zn(L),Bs(R,E,!1),_&&(L.el=_);const k=!_&&R.subTree.el;N(R,L,v(_||R.subTree.el),_?null:h(R.subTree),F,i,c),k&&A(k),bi(R,L.el),y.NODE_ENV!=="production"&&Qn(),V&&--F.deps===0&&F.resolve()})},unmount(R,N){F.isUnmounted=!0,F.activeBranch&&m(F.activeBranch,n,R,N),F.pendingBranch&&m(F.pendingBranch,n,R,N)}};return F}function of(e,t,n,o,r,s,i,a,c){const p=t.suspense=wi(t,o,n,e.parentNode,document.createElement("div"),null,r,s,i,a,!0),u=c(e,p.pendingBranch=t.ssContent,n,p,s,i);return p.deps===0&&p.resolve(!1,!0),u}function rf(e){const{shapeFlag:t,children:n}=e,o=t&32;e.ssContent=ha(o?n.default:n),e.ssFallback=o?ha(n.fallback):ee(Se)}function ha(e){let t;if(z(e)){const n=kn&&e._c;n&&(e._d=!1,Fe()),e=e(),n&&(e._d=!0,t=He,Zl())}if(Y(e)){const n=Pr(e);y.NODE_ENV!=="production"&&!n&&e.filter(o=>o!==_i).length>0&&x(" slots expect a single root node."),e=n}return e=Be(e),t&&!e.dynamicChildren&&(e.dynamicChildren=t.filter(n=>n!==e)),e}function sf(e,t){t&&t.pendingBranch?Y(e)?t.effects.push(...e):t.effects.push(e):cr(e)}function On(e,t){e.activeBranch=t;const{vnode:n,parentComponent:o}=e;let r=t.el;for(;!r&&t.component;)t=t.component.subTree,r=t.el;n.el=r,o&&o.subTree===n&&(o.vnode.el=r,bi(o,r))}function af(e){var t;return((t=e.props)==null?void 0:t.suspensible)!=null&&e.props.suspensible!==!1}const cf=Symbol.for("v-scx"),lf=()=>{{const e=be(cf);return e||y.NODE_ENV!=="production"&&x("Server rendering context not provided. Make sure to only call useSSRContext() conditionally in the server build."),e}};function $r(e,t){return Ni(e,null,t)}const $o={};function Pe(e,t,n){return y.NODE_ENV!=="production"&&!z(t)&&x("`watch(fn, options?)` signature has been moved to a separate API. Use `watchEffect(fn, options?)` instead. `watch` now only supports `watch(source, cb, options?) signature."),Ni(e,t,n)}function Ni(e,t,{immediate:n,deep:o,flush:r,once:s,onTrack:i,onTrigger:a}=se){if(t&&s){const N=t;t=(...V)=>{N(...V),R()}}y.NODE_ENV!=="production"&&o!==void 0&&typeof o=="number"&&x('watch() "deep" option with number value will be used as watch depth in future versions. Please use a boolean instead to avoid potential breakage.'),y.NODE_ENV!=="production"&&!t&&(n!==void 0&&x('watch() "immediate" option is only respected when using the watch(source, callback, options?) signature.'),o!==void 0&&x('watch() "deep" option is only respected when using the watch(source, callback, options?) signature.'),s!==void 0&&x('watch() "once" option is only respected when using the watch(source, callback, options?) signature.'));const c=N=>{x("Invalid watch source: ",N,"A watch source can only be a getter/effect function, a ref, a reactive object, or an array of these types.")},p=de,u=N=>o===!0?N:Qt(N,o===!1?1:void 0);let l,f=!1,m=!1;if(le(e)?(l=()=>e.value,f=nn(e)):Ze(e)?(l=()=>u(e),f=!0):Y(e)?(m=!0,f=e.some(N=>Ze(N)||nn(N)),l=()=>e.map(N=>{if(le(N))return N.value;if(Ze(N))return u(N);if(z(N))return St(N,p,2);y.NODE_ENV!=="production"&&c(N)})):z(e)?t?l=()=>St(e,p,2):l=()=>(h&&h(),We(e,p,3,[v])):(l=ve,y.NODE_ENV!=="production"&&c(e)),t&&o){const N=l;l=()=>Qt(N())}let h,v=N=>{h=Q.onStop=()=>{St(N,p,4),h=Q.onStop=void 0}},A;if(Oo)if(v=ve,t?n&&We(t,p,3,[l(),m?[]:void 0,v]):l(),r==="sync"){const N=lf();A=N.__watcherHandles||(N.__watcherHandles=[])}else return ve;let W=m?new Array(e.length).fill($o):$o;const U=()=>{if(!(!Q.active||!Q.dirty))if(t){const N=Q.run();(o||f||(m?N.some((V,_)=>ia(V,W[_])):ia(N,W)))&&(h&&h(),We(t,p,3,[N,W===$o?void 0:m&&W[0]===$o?[]:W,v]),W=N)}else Q.run()};U.allowRecurse=!!t;let J;r==="sync"?J=U:r==="post"?J=()=>Te(U,p&&p.suspense):(U.pre=!0,p&&(U.id=p.uid),J=()=>_o(U));const Q=new ai(l,ve,J),F=Hc(),R=()=>{Q.stop(),F&&fi(F.effects,Q)};return y.NODE_ENV!=="production"&&(Q.onTrack=i,Q.onTrigger=a),t?n?U():W=Q.run():r==="post"?Te(Q.run.bind(Q),p&&p.suspense):Q.run(),A&&A.push(R),R}function uf(e,t,n){const o=this.proxy,r=ge(e)?e.includes(".")?Tl(o,e):()=>o[e]:e.bind(o,o);let s;z(t)?s=t:(s=t.handler,n=t);const i=ln(this),a=Ni(r,s.bind(o),n);return i(),a}function Tl(e,t){const n=t.split(".");return()=>{let o=e;for(let r=0;r0){if(n>=t)return e;n++}if(o=o||new Set,o.has(e))return e;if(o.add(e),le(e))Qt(e.value,t,n,o);else if(Y(e))for(let r=0;r{Qt(r,t,n,o)});else if(ml(e))for(const r in e)Qt(e[r],t,n,o);return e}function Al(e){gd(e)&&x("Do not use built-in directive ids as custom directive id: "+e)}function Rb(e,t){if(Oe===null)return y.NODE_ENV!=="production"&&x("withDirectives can only be used inside render functions."),e;const n=Mr(Oe)||Oe.proxy,o=e.dirs||(e.dirs=[]);for(let r=0;r{e.isMounted=!0}),Rr(()=>{e.isUnmounting=!0}),e}const Me=[Function,Array],Pl={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:Me,onEnter:Me,onAfterEnter:Me,onEnterCancelled:Me,onBeforeLeave:Me,onLeave:Me,onAfterLeave:Me,onLeaveCancelled:Me,onBeforeAppear:Me,onAppear:Me,onAfterAppear:Me,onAppearCancelled:Me},pf={name:"BaseTransition",props:Pl,setup(e,{slots:t}){const n=dn(),o=jl();return()=>{const r=t.default&&Oi(t.default(),!0);if(!r||!r.length)return;let s=r[0];if(r.length>1){let f=!1;for(const m of r)if(m.type!==Se){if(y.NODE_ENV!=="production"&&f){x(" can only be used on a single element or component. Use for lists.");break}if(s=m,f=!0,y.NODE_ENV==="production")break}}const i=H(e),{mode:a}=i;if(y.NODE_ENV!=="production"&&a&&a!=="in-out"&&a!=="out-in"&&a!=="default"&&x(`invalid mode: ${a}`),o.isLeaving)return ss(s);const c=ma(s);if(!c)return ss(s);const p=lo(c,i,o,n);uo(c,p);const u=n.subTree,l=u&&ma(u);if(l&&l.type!==Se&&!it(c,l)){const f=lo(l,i,o,n);if(uo(l,f),a==="out-in")return o.isLeaving=!0,f.afterLeave=()=>{o.isLeaving=!1,n.update.active!==!1&&(n.effect.dirty=!0,n.update())},ss(s);a==="in-out"&&c.type!==Se&&(f.delayLeave=(m,h,v)=>{const A=$l(o,l);A[String(l.key)]=l,m[$t]=()=>{h(),m[$t]=void 0,delete p.delayedLeave},p.delayedLeave=v})}return s}}},df=pf;function $l(e,t){const{leavingVNodes:n}=e;let o=n.get(t.type);return o||(o=Object.create(null),n.set(t.type,o)),o}function lo(e,t,n,o){const{appear:r,mode:s,persisted:i=!1,onBeforeEnter:a,onEnter:c,onAfterEnter:p,onEnterCancelled:u,onBeforeLeave:l,onLeave:f,onAfterLeave:m,onLeaveCancelled:h,onBeforeAppear:v,onAppear:A,onAfterAppear:W,onAppearCancelled:U}=t,J=String(e.key),Q=$l(n,e),F=(V,_)=>{V&&We(V,o,9,_)},R=(V,_)=>{const E=_[1];F(V,_),Y(V)?V.every(L=>L.length<=1)&&E():V.length<=1&&E()},N={mode:s,persisted:i,beforeEnter(V){let _=a;if(!n.isMounted)if(r)_=v||a;else return;V[$t]&&V[$t](!0);const E=Q[J];E&&it(e,E)&&E.el[$t]&&E.el[$t](),F(_,[V])},enter(V){let _=c,E=p,L=u;if(!n.isMounted)if(r)_=A||c,E=W||p,L=U||u;else return;let k=!1;const K=V[Fo]=ie=>{k||(k=!0,ie?F(L,[V]):F(E,[V]),N.delayedLeave&&N.delayedLeave(),V[Fo]=void 0)};_?R(_,[V,K]):K()},leave(V,_){const E=String(e.key);if(V[Fo]&&V[Fo](!0),n.isUnmounting)return _();F(l,[V]);let L=!1;const k=V[$t]=K=>{L||(L=!0,_(),K?F(h,[V]):F(m,[V]),V[$t]=void 0,Q[E]===e&&delete Q[E])};Q[E]=e,f?R(f,[V,k]):k()},clone(V){return lo(V,t,n,o)}};return N}function ss(e){if(Pn(e))return e=ft(e),e.children=null,e}function ma(e){return Pn(e)?y.NODE_ENV!=="production"&&e.component?e.component.subTree:e.children?e.children[0]:void 0:e}function uo(e,t){e.shapeFlag&6&&e.component?uo(e.component.subTree,t):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function Oi(e,t=!1,n){let o=[],r=0;for(let s=0;s1)for(let s=0;s!!e.type.__asyncLoader;/*! #__NO_SIDE_EFFECTS__ */function Xt(e){z(e)&&(e={loader:e});const{loader:t,loadingComponent:n,errorComponent:o,delay:r=200,timeout:s,suspensible:i=!0,onError:a}=e;let c=null,p,u=0;const l=()=>(u++,c=null,f()),f=()=>{let m;return c||(m=c=t().catch(h=>{if(h=h instanceof Error?h:new Error(String(h)),a)return new Promise((v,A)=>{a(h,()=>v(l()),()=>A(h),u+1)});throw h}).then(h=>{if(m!==c&&c)return c;if(y.NODE_ENV!=="production"&&!h&&x("Async component loader resolved to undefined. If you are using retry(), make sure to return its return value."),h&&(h.__esModule||h[Symbol.toStringTag]==="Module")&&(h=h.default),y.NODE_ENV!=="production"&&h&&!ce(h)&&!z(h))throw new Error(`Invalid async component load result: ${h}`);return p=h,h}))};return Si({name:"AsyncComponentWrapper",__asyncLoader:f,get __asyncResolved(){return p},setup(){const m=de;if(p)return()=>is(p,m);const h=U=>{c=null,pn(U,m,13,!o)};if(i&&m.suspense||Oo)return f().then(U=>()=>is(U,m)).catch(U=>(h(U),()=>o?ee(o,{error:U}):null));const v=pe(!1),A=pe(),W=pe(!!r);return r&&setTimeout(()=>{W.value=!1},r),s!=null&&setTimeout(()=>{if(!v.value&&!A.value){const U=new Error(`Async component timed out after ${s}ms.`);h(U),A.value=U}},s),f().then(()=>{v.value=!0,m.parent&&Pn(m.parent.vnode)&&(m.parent.effect.dirty=!0,_o(m.parent.update))}).catch(U=>{h(U),A.value=U}),()=>{if(v.value&&p)return is(p,m);if(A.value&&o)return ee(o,{error:A.value});if(n&&!W.value)return ee(n)}}})}function is(e,t){const{ref:n,props:o,children:r,ce:s}=t.vnode,i=ee(e,o,r);return i.ref=n,i.ce=s,delete t.vnode.ce,i}const Pn=e=>e.type.__isKeepAlive;function Fl(e,t){Ll(e,"a",t)}function Rl(e,t){Ll(e,"da",t)}function Ll(e,t,n=de){const o=e.__wdc||(e.__wdc=()=>{let r=n;for(;r;){if(r.isDeactivated)return;r=r.parent}return e()});if(Fr(t,o,n),n){let r=n.parent;for(;r&&r.parent;)Pn(r.parent.vnode)&&ff(o,t,n,r),r=r.parent}}function ff(e,t,n,o){const r=Fr(t,e,o,!0);Ml(()=>{fi(o[t],r)},n)}function Fr(e,t,n=de,o=!1){if(n){const r=n[e]||(n[e]=[]),s=t.__weh||(t.__weh=(...i)=>{if(n.isUnmounted)return;Ht();const a=ln(n),c=We(t,n,e,i);return a(),zt(),c});return o?r.unshift(s):r.push(s),s}else if(y.NODE_ENV!=="production"){const r=Jt(mi[e].replace(/ hook$/,""));x(`${r} is called when there is no active component instance to be associated with. Lifecycle injection APIs can only be used during execution of setup(). If you are using async setup(), make sure to register lifecycle hooks before the first await statement.`)}}const xt=e=>(t,n=de)=>(!Oo||e==="sp")&&Fr(e,(...o)=>t(...o),n),hf=xt("bm"),wo=xt("m"),mf=xt("bu"),Il=xt("u"),Rr=xt("bum"),Ml=xt("um"),gf=xt("sp"),yf=xt("rtg"),vf=xt("rtc");function bf(e,t=de){Fr("ec",e,t)}function Lb(e,t,n,o){let r;const s=n&&n[o];if(Y(e)||ge(e)){r=new Array(e.length);for(let i=0,a=e.length;it(i,a,void 0,s&&s[a]));else{const i=Object.keys(e);r=new Array(i.length);for(let a=0,c=i.length;ae?nu(e)?Mr(e)||e.proxy:As(e.parent):null,sn=_e(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>y.NODE_ENV!=="production"?bn(e.props):e.props,$attrs:e=>y.NODE_ENV!=="production"?bn(e.attrs):e.attrs,$slots:e=>y.NODE_ENV!=="production"?bn(e.slots):e.slots,$refs:e=>y.NODE_ENV!=="production"?bn(e.refs):e.refs,$parent:e=>As(e.parent),$root:e=>As(e.root),$emit:e=>e.emit,$options:e=>ki(e),$forceUpdate:e=>e.f||(e.f=()=>{e.effect.dirty=!0,_o(e.update)}),$nextTick:e=>e.n||(e.n=io.bind(e.proxy)),$watch:e=>uf.bind(e)}),Di=e=>e==="_"||e==="$",as=(e,t)=>e!==se&&!e.__isScriptSetup&&ne(e,t),Ul={get({_:e},t){const{ctx:n,setupState:o,data:r,props:s,accessCache:i,type:a,appContext:c}=e;if(y.NODE_ENV!=="production"&&t==="__isVue")return!0;let p;if(t[0]!=="$"){const m=i[t];if(m!==void 0)switch(m){case 1:return o[t];case 2:return r[t];case 4:return n[t];case 3:return s[t]}else{if(as(o,t))return i[t]=1,o[t];if(r!==se&&ne(r,t))return i[t]=2,r[t];if((p=e.propsOptions[0])&&ne(p,t))return i[t]=3,s[t];if(n!==se&&ne(n,t))return i[t]=4,n[t];js&&(i[t]=0)}}const u=sn[t];let l,f;if(u)return t==="$attrs"?(De(e,"get",t),y.NODE_ENV!=="production"&&ur()):y.NODE_ENV!=="production"&&t==="$slots"&&De(e,"get",t),u(e);if((l=a.__cssModules)&&(l=l[t]))return l;if(n!==se&&ne(n,t))return i[t]=4,n[t];if(f=c.config.globalProperties,ne(f,t))return f[t];y.NODE_ENV!=="production"&&Oe&&(!ge(t)||t.indexOf("__v")!==0)&&(r!==se&&Di(t[0])&&ne(r,t)?x(`Property ${JSON.stringify(t)} must be accessed via $data because it starts with a reserved character ("$" or "_") and is not proxied on the render context.`):e===Oe&&x(`Property ${JSON.stringify(t)} was accessed during render but is not defined on instance.`))},set({_:e},t,n){const{data:o,setupState:r,ctx:s}=e;return as(r,t)?(r[t]=n,!0):y.NODE_ENV!=="production"&&r.__isScriptSetup&&ne(r,t)?(x(`Cannot mutate - - - - - - - - - - - - - \ No newline at end of file diff --git a/pr-preview/pr-2/hashmap.json b/pr-preview/pr-2/hashmap.json deleted file mode 100644 index 6b3afdb..0000000 --- a/pr-preview/pr-2/hashmap.json +++ /dev/null @@ -1 +0,0 @@ -{"editor_index.md":"Dn41ImcV","index.md":"N7qy3WLp","public_storyfiles_secondstory.md":"DXfRkNTI","uc1dashboard_index.md":"CNXI6RKG","storyviewer_index.md":"usz-1Ozl","uc2dashboard_index.md":"mjbqsdtp","stories_index.md":"DIciCNSc","public_storyfiles_firststory.md":"C581_H4v"} diff --git a/pr-preview/pr-2/index.html b/pr-preview/pr-2/index.html deleted file mode 100644 index 8632807..0000000 --- a/pr-preview/pr-2/index.html +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - eodash Pages Template - - - - - - - - - - - - - -
Skip to content

eodash Pages Template

This is a template example of how to setup eodash within VitePress

- - - - \ No newline at end of file diff --git a/pr-preview/pr-2/public/storyfiles/firststory.html b/pr-preview/pr-2/public/storyfiles/firststory.html deleted file mode 100644 index be39c1c..0000000 --- a/pr-preview/pr-2/public/storyfiles/firststory.html +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - eodash Pages Template - - - - - - - - - - - - - -
Skip to content

This is the markdown text of the first story!

- - - - \ No newline at end of file diff --git a/pr-preview/pr-2/public/storyfiles/secondstory.html b/pr-preview/pr-2/public/storyfiles/secondstory.html deleted file mode 100644 index 42eae2b..0000000 --- a/pr-preview/pr-2/public/storyfiles/secondstory.html +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - eodash Pages Template - - - - - - - - - - - - - -
Skip to content

This is the markdown text of the second story!

- - - - \ No newline at end of file diff --git a/pr-preview/pr-2/stories/index.html b/pr-preview/pr-2/stories/index.html deleted file mode 100644 index bde8a43..0000000 --- a/pr-preview/pr-2/stories/index.html +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - eodash Pages Template - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/pr-preview/pr-2/storyfiles/firststory.md b/pr-preview/pr-2/storyfiles/firststory.md deleted file mode 100644 index 5af100f..0000000 --- a/pr-preview/pr-2/storyfiles/firststory.md +++ /dev/null @@ -1 +0,0 @@ -## This is the markdown text of the first story! \ No newline at end of file diff --git a/pr-preview/pr-2/storyfiles/secondstory.md b/pr-preview/pr-2/storyfiles/secondstory.md deleted file mode 100644 index efd91b5..0000000 --- a/pr-preview/pr-2/storyfiles/secondstory.md +++ /dev/null @@ -1 +0,0 @@ -## This is the markdown text of the second story! \ No newline at end of file diff --git a/pr-preview/pr-2/storyviewer/index.html b/pr-preview/pr-2/storyviewer/index.html deleted file mode 100644 index 64ed846..0000000 --- a/pr-preview/pr-2/storyviewer/index.html +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - eodash Pages Template - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/pr-preview/pr-2/uc1dashboard/index.html b/pr-preview/pr-2/uc1dashboard/index.html deleted file mode 100644 index 2c08767..0000000 --- a/pr-preview/pr-2/uc1dashboard/index.html +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - eodash Pages Template - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/pr-preview/pr-2/uc2dashboard/index.html b/pr-preview/pr-2/uc2dashboard/index.html deleted file mode 100644 index 3082ecd..0000000 --- a/pr-preview/pr-2/uc2dashboard/index.html +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - eodash Pages Template - - - - - - - - - - - - - - - - - - \ No newline at end of file