PageSourceSearch

https://cartes.gouv.fr/explorer-les-cartes/assets/index-ZDNodjBE.js

js cartes.gouv.fr collected 2026-09-24 09:23:14 UTC 3,266,584 bytes, 1,197 lines download raw bytes

vendor: 12,194 bytes, lines 1-7
1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/Load-DTmuDwdQ.js","assets/StoreData-BJWiXpC8.js","assets/Patience-BC-gKOfm.js","assets/Embed-DViUOxwZ.js","assets/Plan-qiT4Q95X.js","assets/Photo-yVaa9D5L.js"])))=>i.map(i=>d[i]);
2var gd=Object.defineProperty;var tu=ne=>{throw TypeError(ne)};var md=(ne,ee,te)=>ee in ne?gd(ne,ee,{enumerable:!0,configurable:!0,writable:!0,value:te}):ne[ee]=te;var Kn=(ne,ee,te)=>md(ne,typeof ee!="symbol"?ee+"":ee,te),rc=(ne,ee,te)=>ee.has(ne)||tu("Cannot "+te);var is=(ne,ee,te)=>(rc(ne,ee,"read from private field"),te?te.call(ne):ee.get(ne)),fo=(ne,ee,te)=>ee.has(ne)?tu("Cannot add the same private member more than once"):ee instanceof WeakSet?ee.add(ne):ee.set(ne,te),uo=(ne,ee,te,st)=>(rc(ne,ee,"write to private field"),st?st.call(ne,te):ee.set(ne,te),te),es=(ne,ee,te)=>(rc(ne,ee,"access private method"),te);(function(){const ee=document.createElement("link").relList;if(ee&&ee.supports&&ee.supports("modulepreload"))return;for(const ot of document.querySelectorAll('link[rel="modulepreload"]'))st(ot);new MutationObserver(ot=>{for(const ct of ot)if(ct.type==="childList")for(const ut of ct.addedNodes)ut.tagName==="LINK"&&ut.rel==="modulepreload"&&st(ut)}).observe(document,{childList:!0,subtree:!0});function te(ot){const ct={};return ot.integrity&&(ct.integrity=ot.integrity),ot.referrerPolicy&&(ct.referrerPolicy=ot.referrerPolicy),ot.crossOrigin==="use-credentials"?ct.credentials="include":ot.crossOrigin==="anonymous"?ct.credentials="omit":ct.credentials="same-origin",ct}function st(ot){if(ot.ep)return;ot.ep=!0;const ct=te(ot);fetch(ot.href,ct)}})();const scriptRel="modulepreload",assetsURL=function(ne){return"/explorer-les-cartes/"+ne},seen$2={},__vitePreload=function(ee,te,st){let ot=Promise.resolve();if(te&&te.length>0){let ut=function(ft){return Promise.all(ft.map(pt=>Promise.resolve(pt).then(mt=>({status:"fulfilled",value:mt}),mt=>({status:"rejected",reason:mt}))))};document.getElementsByTagName("link");const dt=document.querySelector("meta[property=csp-nonce]"),ht=(dt==null?void 0:dt.nonce)||(dt==null?void 0:dt.getAttribute("nonce"));ot=ut(te.map(ft=>{if(ft=assetsURL(ft),ft in seen$2)return;seen$2[ft]=!0;const pt=ft.endsWith(".css"),mt=pt?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${ft}"]${mt}`))return;const yt=document.createElement("link");if(yt.rel=pt?"stylesheet":scriptRel,pt||(yt.as="script"),yt.crossOrigin="",yt.href=ft,ht&&yt.setAttribute("nonce",ht),document.head.appendChild(yt),pt)return new Promise((vt,_t)=>{yt.addEventListener("load",vt),yt.addEventListener("error",()=>_t(new Error(`Unable to preload CSS for ${ft}`)))})}))}function ct(ut){const dt=new Event("vite:preloadError",{cancelable:!0});if(dt.payload=ut,window.dispatchEvent(dt),!dt.defaultPrevented)throw ut}return ot.then(ut=>{for(const dt of ut||[])dt.status==="rejected"&&ct(dt.reason);return ee().catch(ct)})};/**
3* @vue/shared v3.5.42
4* (c) 2018-present Yuxi (Evan) You and Vue contributors
5* @license MIT
6**/function makeMap(ne){const ee=Object.create(null);for(const te of ne.split(","))ee[te]=1;return te=>te in ee}const EMPTY_OBJ={},EMPTY_ARR=[],NOOP=()=>{},NO=()=>!1,isOn=ne=>ne.charCodeAt(0)===111&&ne.charCodeAt(1)===110&&(ne.charCodeAt(2)>122||ne.charCodeAt(2)<97),isModelListener=ne=>ne.startsWith("onUpdate:"),extend$5=Object.assign,remove=(ne,ee)=>{const te=ne.indexOf(ee);te>-1&&ne.splice(te,1)},hasOwnProperty$2=Object.prototype.hasOwnProperty,hasOwn=(ne,ee)=>hasOwnProperty$2.call(ne,ee),isArray$1=Array.isArray,isMap=ne=>toTypeString(ne)==="[object Map]",isSet=ne=>toTypeString(ne)==="[object Set]",isDate=ne=>toTypeString(ne)==="[object Date]",isRegExp=ne=>toTypeString(ne)==="[object RegExp]",isFunction$1=ne=>typeof ne=="function",isString=ne=>typeof ne=="string",isSymbol=ne=>typeof ne=="symbol",isObject$2=ne=>ne!==null&&typeof ne=="object",isPromise=ne=>(isObject$2(ne)||isFunction$1(ne))&&isFunction$1(ne.then)&&isFunction$1(ne.catch),objectToString$1=Object.prototype.toString,toTypeString=ne=>objectToString$1.call(ne),toRawType=ne=>toTypeString(ne).slice(8,-1),isPlainObject$2=ne=>toTypeString(ne)==="[object Object]",isIntegerKey=ne=>isString(ne)&&ne!=="NaN"&&ne[0]!=="-"&&""+parseInt(ne,10)===ne,isReservedProp=makeMap(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),isBuiltInDirective=makeMap("bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo"),cacheStringFunction=ne=>{const ee=Object.create(null);return(te=>ee[te]||(ee[te]=ne(te)))},camelizeRE=/-\w/g,camelize=cacheStringFunction(ne=>ne.replace(camelizeRE,ee=>ee.slice(1).toUpperCase())),hyphenateRE=/\B([A-Z])/g,hyphenate=cacheStringFunction(ne=>ne.replace(hyphenateRE,"-$1").toLowerCase()),capitalize=cacheStringFunction(ne=>ne.charAt(0).toUpperCase()+ne.slice(1)),toHandlerKey=cacheStringFunction(ne=>ne?`on${capitalize(ne)}`:""),hasChanged=(ne,ee)=>!Object.is(ne,ee),invokeArrayFns=(ne,...ee)=>{for(let te=0;te<ne.length;te++)ne[te](...ee)},def=(ne,ee,te,st=!1)=>{Object.defineProperty(ne,ee,{configurable:!0,enumerable:!1,writable:st,value:te})},looseToNumber=ne=>{const ee=parseFloat(ne);return isNaN(ee)?ne:ee},toNumber=ne=>{const ee=isString(ne)?Number(ne):NaN;return isNaN(ee)?ne:ee};let _globalThis;const getGlobalThis=()=>_globalThis||(_globalThis=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}),identRE=/^[_$a-zA-Z\xA0-\uFFFF][_$a-zA-Z0-9\xA0-\uFFFF]*$/;function genPropsAccessExp(ne){return identRE.test(ne)?`__props.${ne}`:`__props[${JSON.stringify(ne)}]`}function genCacheKey(ne,ee){return ne+JSON.stringify(ee,(te,st)=>typeof st=="function"?st.toString():st)}const PatchFlags={TEXT:1,1:"TEXT",CLASS:2,2:"CLASS",STYLE:4,4:"STYLE",PROPS:8,8:"PROPS",FULL_PROPS:16,16:"FULL_PROPS",NEED_HYDRATION:32,32:"NEED_HYDRATION",STABLE_FRAGMENT:64,64:"STABLE_FRAGMENT",KEYED_FRAGMENT:128,128:"KEYED_FRAGMENT",UNKEYED_FRAGMENT:256,256:"UNKEYED_FRAGMENT",NEED_PATCH:512,512:"NEED_PATCH",DYNAMIC_SLOTS:1024,1024:"DYNAMIC_SLOTS",DEV_ROOT_FRAGMENT:2048,2048:"DEV_ROOT_FRAGMENT",CACHED:-1,"-1":"CACHED",BAIL:-2,"-2":"BAIL"},PatchFlagNames={1:"TEXT",2:"CLASS",4:"STYLE",8:"PROPS",16:"FULL_PROPS",32:"NEED_HYDRATION",64:"STABLE_FRAGMENT",128:"KEYED_FRAGMENT",256:"UNKEYED_FRAGMENT",512:"NEED_PATCH",1024:"DYNAMIC_SLOTS",2048:"DEV_ROOT_FRAGMENT",[-1]:"CACHED",[-2]:"BAIL"},ShapeFlags={ELEMENT:1,1:"ELEMENT",FUNCTIONAL_COMPONENT:2,2:"FUNCTIONAL_COMPONENT",STATEFUL_COMPONENT:4,4:"STATEFUL_COMPONENT",TEXT_CHILDREN:8,8:"TEXT_CHILDREN",ARRAY_CHILDREN:16,16:"ARRAY_CHILDREN",SLOTS_CHILDREN:32,32:"SLOTS_CHILDREN",TELEPORT:64,64:"TELEPORT",SUSPENSE:128,128:"SUSPENSE",COMPONENT_SHOULD_KEEP_ALIVE:256,256:"COMPONENT_SHOULD_KEEP_ALIVE",COMPONENT_KEPT_ALIVE:512,512:"COMPONENT_KEPT_ALIVE",COMPONENT:6,6:"COMPONENT"},SlotFlags={STABLE:1,1:"STABLE",DYNAMIC:2,2:"DYNAMIC",FORWARDED:3,3:"FORWARDED"},slotFlagsText={1:"STABLE",2:"DYNAMIC",3:"FORWARDED"},GLOBALS_ALLOWED="Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,console,Error,Symbol",isGloballyAllowed=makeMap(GLOBALS_ALLOWED),isGloballyWhitelisted=isGloballyAllowed,range=2;function generateCodeFrame(ne,ee=0,te=ne.length){if(ee=Math.max(0,Math.min(ee,ne.length)),te=Math.max(0,Math.min(te,ne.length)),ee>te)return"";let st=ne.split(/(\r?\n)/);const ot=st.filter((dt,ht)=>ht%2===1);st=st.filter((dt,ht)=>ht%2===0);let ct=0;const ut=[];for(let dt=0;dt<st.length;dt++)if(ct+=st[dt].length+(ot[dt]&&ot[dt].length||0),ct>=ee){for(let ht=dt-range;ht<=dt+range||te>ct;ht++){if(ht<0||ht>=st.length)continue;const ft=ht+1;ut.push(`${ft}${" ".repeat(Math.max(3-String(ft).length,0))}|  ${st[ht]}`);const pt=st[ht].length,mt=ot[ht]&&ot[ht].length||0;if(ht===dt){const yt=ee-(ct-(pt+mt)),vt=Math.max(1,te>ct?pt-yt:te-ee);ut.push("   |  "+" ".repeat(yt)+"^".repeat(vt))}else if(ht>dt){if(te>ct){const yt=Math.max(Math.min(te-ct,pt),1);ut.push("   |  "+"^".repeat(yt))}ct+=pt+mt}}break}return ut.join(`
7`)}function normalizeStyle(ne){if(isArray$1(ne)){const ee={};for(let te=0;te<ne.length;te++){const st=ne[te],ot=isString(st)?parseStringStyle(st):normalizeStyle(st);if(ot)for(const ct in ot)ee[ct]=ot[ct]}return ee}else if(isString(ne)||isObject$2(ne))return ne}const listDelimiterRE=/;(?![^(]*\))/g,propertyDelimiterRE=/:([^]+)/,styleCommentRE=/\/\*[^]*?\*\//g;function parseStringStyle(ne){const ee={};return ne.replace(styleCommentRE,"").split(listDelimiterRE).forEach(te=>{if(te){const st=te.split(propertyDelimiterRE);st.length>1&&(ee[st[0].trim()]=st[1].trim())}}),ee}function stringifyStyle(ne){if(!ne)return"";if(isString(ne))return ne;let ee="";for(const te in ne){const st=ne[te];if(isString(st)||typeof st=="number"){const ot=te.startsWith("--")?te:hyphenate(te);ee+=`${ot}:${st};`}}return ee}function normalizeClass(ne){let ee="";if(isString(ne))ee=ne;else if(isArray$1(ne))for(let te=0;te<ne.length;te++){const st=normalizeClass(ne[te]);st&&(ee+=st+" ")}else if(isObject$2(ne))for(const te in ne)ne[te]&&(ee+=te+" ");return ee.trim()}function normalizeProps(ne){if(!ne)return null;let{class:ee,style:te}=ne;return ee&&!isString(ee)&&(ne.class=normalizeClass(ee)),te&&(ne.style=normalizeStyle(te)),ne}const HTML_TAGS="html,body,base,head,link,meta,style,title,address,article,aside,footer,header,hgroup,h1,h2,h3,h4,h5,h6,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,summary,template,blockquote,iframe,tfoot",SVG_TAGS="svg,animate,animateMotion,animateTransform,circle,clipPath,color-profile,defs,desc,discard,ellipse,feBlend,feColorMatrix,feComponentTransfer,feComposite,feConvolveMatrix,feDiffuseLighting,feDisplacementMap,feDistantLight,feDropShadow,feFlood,feFuncA,feFuncB,feFuncG,feFuncR,feGaussianBlur,feImage,feMerge,feMergeNode,feMorphology,feOffset,fePointLight,feSpecularLighting,feSpotLight,feTile,feTurbulence,filter,foreignObject,g,hatch,hatchpath,image,line,linearGradient,marker,mask,mesh,meshgradient,meshpatch,meshrow,metadata,mpath,path,pattern,polygon,polyline,radialGradient,rect,set,solidcolor,stop,switch,symbol,text,textPath,title,tspan,unknown,use,view",MATH_TAGS="annotation,annotation-xml,maction,maligngroup,malignmark,math,menclose,merror,mfenced,mfrac,mfraction,mglyph,mi,mlabeledtr,mlongdiv,mmultiscripts,mn,mo,mover,mpadded,mphantom,mprescripts,mroot,mrow,ms,mscarries,mscarry,msgroup,msline,mspace,msqrt,msrow,mstack,mstyle,msub,msubsup,msup,mtable,mtd,mtext,mtr,munder,munderover,none,semantics",VOID_TAGS="area,base,br,col,embed,hr,img,input,link,meta,param,source,track,wbr",isHTMLTag=makeMap(HTML_TAGS),isSVGTag=makeMap(SVG_TAGS),isMathMLTag=makeMap(MATH_TAGS),isVoidTag=makeMap(VOID_TAGS),specialBooleanAttrs="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",isSpecialBooleanAttr=makeMap(specialBooleanAttrs),isBooleanAttr=makeMap(specialBooleanAttrs+",async,autofocus,autoplay,controls,default,defer,disabled,inert,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected");function includeBooleanAttr(ne){return!!ne||ne===""}const unsafeAttrCharRE=/[>/="'\u0009\u000a\u000c\u000d\u0020]/,attrValidationCache={};function isSSRSafeAttrName(ne){if(attrValidationCache.hasOwnProperty(ne))return attrValidationCache[ne];const ee=unsafeAttrCharRE.test(ne);return ee&&console.error(`unsafe attribute name: ${ne}`),attrValidationCache[ne]=!ee}const propsToAttrMap={acceptCharset:"accept-charset",className:"class",htmlFor:"for",httpEquiv:"http-equiv"},isKnownHtmlAttr=makeMap("accept,accept-charset,accesskey,action,align,allow,alt,async,autocapitalize,autocomplete,autofocus,autoplay,background,bgcolor,border,buffered,capture,challenge,charset,checked,cite,class,code,codebase,color,cols,c
7olspan,content,contenteditable,contextmenu,controls,coords,crossorigin,csp,data,datetime,decoding,default,defer,dir,dirname,disabled,download,draggable,dropzone,enctype,enterkeyhint,for,form,formaction,formenctype,formmethod,formnovalidate,formtarget,headers,height,hidden,high,href,hreflang,http-equiv,icon,id,importance,inert,integrity,ismap,itemprop,keytype,kind,label,lang,language,loading,list,loop,low,manifest,max,maxlength,minlength,media,min,multiple,muted,name,novalidate,open,optimum,pattern,ping,placeholder,poster,preload,radiogroup,readonly,referrerpolicy,rel,required,reversed,rows,rowspan,sandbox,scope,scoped,selected,shape,size,sizes,slot,span,spellcheck,src,srcdoc,srclang,srcset,start,step,style,summary,tabindex,target,title,translate,type,usemap,value,width,wrap"),isKnownSvgAttr=makeMap("xmlns,accent-height,accumulate,additive,alignment-baseline,alphabetic,amplitude,arabic-form,ascent,attributeName,attributeType,azimuth,baseFrequency,baseline-shift,baseProfile,bbox,begin,bias,by,calcMode,cap-height,class,clip,clipPathUnits,clip-path,clip-rule,color,color-interpolation,color-interpolation-filters,color-profile,color-rendering,contentScriptType,contentStyleType,crossorigin,cursor,cx,cy,d,decelerate,descent,diffuseConstant,direction,display,divisor,dominant-baseline,dur,dx,dy,edgeMode,elevation,enable-background,end,exponent,fill,fill-opacity,fill-rule,filter,filterRes,filterUnits,flood-color,flood-opacity,font-family,font-size,font-size-adjust,font-stretch,font-style,font-variant,font-weight,format,from,fr,fx,fy,g1,g2,glyph-name,glyph-orientation-horizontal,glyph-orientation-vertical,glyphRef,gradientTransform,gradientUnits,hanging,height,href,hreflang,horiz-adv-x,horiz-origin-x,id,ideographic,image-rendering,in,in2,intercept,k,k1,k2,k3,k4,kernelMatrix,kernelUnitLength,kerning,keyPoints,keySplines,keyTimes,lang,lengthAdjust,letter-spacing,lighting-color,limitingConeAngle,local,marker-end,marker-mid,marker-start,markerHeight,markerUnits,markerWidth,mask,maskContentUnits,maskUnits,mathematical,max,media,method,min,mode,name,numOctaves,offset,opacity,operator,order,orient,orientation,origin,overflow,overline-position,overline-thickness,panose-1,paint-order,path,pathLength,patternContentUnits,patternTransform,patternUnits,ping,pointer-events,points,pointsAtX,pointsAtY,pointsAtZ,preserveAlpha,preserveAspectRatio,primitiveUnits,r,radius,referrerPolicy,refX,refY,rel,rendering-intent,repeatCount,repeatDur,requiredExtensions,requiredFeatures,restart,result,rotate,rx,ry,scale,seed,shape-rendering,slope,spacing,specularConstant,specularExponent,speed,spreadMethod,startOffset,stdDeviation,stemh,stemv,stitchTiles,stop-color,stop-opacity,strikethrough-position,strikethrough-thickness,string,stroke,stroke-dasharray,stroke-dashoffset,stroke-linecap,stroke-linejoin,stroke-miterlimit,stroke-opacity,stroke-width,style,surfaceScale,systemLanguage,tabindex,tableValues,target,targetX,targetY,text-anchor,text-decoration,text-rendering,textLength,to,transform,transform-origin,type,u1,u2,underline-position,underline-thickness,unicode,unicode
7-bidi,unicode-range,units-per-em,v-alphabetic,v-hanging,v-ideographic,v-mathematical,values,vector-effect,version,vert-adv-y,vert-origin-x,vert-origin-y,viewBox,viewTarget,visibility,width,widths,word-spacing,writing-mode,x,x-height,x1,x2,xChannelSelector,xlink:actuate,xlink:arcrole,xlink:href,xlink:role,xlink:show,xlink:title,xlink:type,xmlns:xlink,xml:base,xml:lang,xml:space,y,y1,y2,yChannelSelector,z,zoomAndPan"),isKnownMathMLAttr=makeMap("accent,accentunder,actiontype,align,alignmentscope,altimg,altimg-height,altimg-valign,altimg-width,alttext,bevelled,close,columnsalign,columnlines,columnspan,denomalign,depth,dir,display,displaystyle,encoding,equalcolumns,equalrows,fence,fontstyle,fontweight,form,frame,framespacing,groupalign,height,href,id,indentalign,indentalignfirst,indentalignlast,indentshift,indentshiftfirst,indentshiftlast,indextype,justify,largetop,largeop,lquote,lspace,mathbackground,mathcolor,mathsize,mathvariant,maxsize,minlabelspacing,mode,other,overflow,position,rowalign,rowlines,rowspan,rquote,rspace,scriptlevel,scriptminsize,scriptsizemultiplier,selection,separator,separators,shift,side,src,stackalign,stretchy,subscriptshift,superscriptshift,symmetric,voffset,width,widths,xlink:href,xlink:show,xlink:type,xmlns");function isRenderableAttrValue(ne){if(ne==null)return!1;const ee=typeof ne;return ee==="string"||ee==="number"||ee==="boolean"}const escapeRE=/["'&<>]/;function escapeHtml(ne){const ee=""+ne,te=escapeRE.exec(ee);if(!te)return ee;let st="",ot,ct,ut=0;for(ct=te.index;ct<ee.length;ct++){switch(ee.charCodeAt(ct)){case 34:ot="&quot;";break;case 38:ot="&amp;";break;case 39:ot="&#39;";break;case 60:ot="&lt;";break;case 62:ot="&gt;";break;default:continue}ut!==ct&&(st+=ee.slice(ut,ct)),ut=ct+1,st+=ot}return ut!==ct?st+ee.slice(ut,ct):st}const commentStripRE=/^(?:-?>)+|<!--|-->|--!>|<!-$/g;function escapeHtmlComment(ne){let ee;do ee=ne,ne=ne.replace(commentStripRE,"");while(ne!==ee);return ne}const cssVarNameEscapeSymbolsRE=/[ !"#$%&'()*+,./:;<=>?@[\\\]^`{|}~]/g;function getEscapedCssVarName(ne,ee){return ne.replace(cssVarNameEscapeSymbolsRE,te=>ee?te==='"'?'\\\\\\"':`\\\\${te}`:`\\${te}`)}function looseCompareArrays(ne,ee){if(ne.length!==ee.length)return!1;let te=!0;for(let st=0;te&&st<ne.length;st++)te=looseEqual(ne[st],ee[st]);return te}function looseCompareCollections(ne,ee){if(ne.size!==ee.size)return!1;const te=Array.from(ee),st=new Uint8Array(te.length);for(const ot of ne){let ct=-1;for(let ut=0;ut<te.length;ut++)if(!st[ut]&&looseEqual(ot,te[ut])){ct=ut;break}if(ct<0)return!1;st[ct]=1}return!0}function looseEqual(ne,ee){if(ne===ee)return!0;let te=isDate(ne),st=isDate(ee);if(te||st)return te&&st?ne.getTime()===ee.getTime():!1;if(te=isSymbol(ne),st=isSymbol(ee),te||st)return ne===ee;if(te=isArray$1(ne),st=isArray$1(ee),te||st)return te&&st?looseCompareArrays(ne,ee):!1;if(te=isObject$2(ne),st=isObject$2(ee),te||st){if(!te||!st)return!1;if(te=isMap(ne),st=isMap(ee),te||st||(te=isSet(ne),st=isSet(ee),te||st))return te&&st?looseCompareCollections(ne,ee):!1;const ot=Object.keys(ne).length,ct=Object.keys(ee).length;if(ot!==ct)return!1;for(const ut in ne){const dt=ne.hasOwnProperty(ut),ht=ee.hasOwnProperty(ut);if(dt&&!ht||!dt&&ht||!looseEqual(ne[ut],ee[ut]))return!1}}return String(ne)===String(ee)}function looseIndexOf(ne,ee){return ne.findIndex(te=>looseEqual(te,ee))}const isRef$1=ne=>!!(ne&&ne.__v_isRef===!0),toDisplayString=ne=>isString(ne)?ne:ne==null?"":isArray$1(ne)||isObject$2(ne)&&(ne.toString===objectToString$1||!isFunction$1(ne.toString))?isRef$1(ne)?toDisplayString(ne.value):JSON.stringify(ne,replacer,2):String(ne),replacer=(ne,ee)=>isRef$1(ee)?replacer(ne,ee.value):isMap(ee)?{[`Map(${ee.size})`]:[...ee.entries()].reduce((te,[st,ot],ct)=>(te[stringifySymbol(st,ct)+" =>"]=ot,te),{})}:isSet(ee)?{[`Set(${ee.size})`]:[...ee.values()].map(te=>stringifySymbol(te))}:isSymbol(ee)?stringifySymbol(ee):isObject$2(ee)&&!isArray$1(ee)&&!isPlainObject$2(ee)?String(ee):ee,stringifySymbol=(ne,ee="")=>{var te;return isSymbol(ne)?`Symbol(${(te=ne.description)!=null?te:ee})`:ne};function normalizeCssVarValue(ne){return ne==null?"initial":typeof ne=="string"?ne===""?" ":ne:String(ne)}const shared_esmBundler=Object.freeze(Object.defineProperty({__proto__:null,EMPTY_ARR,EMPTY_OBJ,NO,NOOP,PatchFlagNames,PatchFlags,ShapeFlags,SlotFlags,camelize,capitalize,cssVarNameEscapeSymbolsRE,def,escapeHtml,escapeHtmlComment,extend:extend$5,genCacheKey,genPropsAccessExp,generateCodeFrame,getEscapedCssVarName,getGlobalThis,hasChanged,hasOwn,hyphenate,includeBooleanAttr,invokeArrayFns,isArray:isArray$1,isBooleanAttr,isBuiltInDirective,isDate,isFunction:isFunction$1,isGloballyAllowed,isGloballyWhitelisted,isHTMLTag,isIntegerKey,isKnownHtmlAttr,isKnownMathMLAttr,isKnownSvgAttr,isMap,isMathMLTag,isModelListener,isObject:isObject$2,isOn,isPlainObject:isPlainObject$2,isPromise,isRegExp,isRenderableAttrValue,isReservedProp,isSSRSafeAttrName,isSVGTag,isSet,isSpecialBooleanAttr,isString,isSymbol,isVoidTag,looseEqual,looseIndexOf,looseToNumber,makeMap,normalizeClass,normalizeCssVarValue,normalizeProps,normalizeStyle,objectToString:objectToString$1,parseStringStyle,propsToAttrMap,remove,slotFlagsText,stringifyStyle,toDisplayString,toHandlerKey,toNumber,toRawType,toTypeString},Symbol.toStringTag,{value:"Module"}));/**
8* @vue/reactivity v3.5.42
9* (c) 2018-present Yuxi (Evan) You and Vue contributors
10* @license MIT
vendor: 8,889 bytes, line 11
11**/let activeEffectScope;class EffectScope{constructor(ee=!1){this.detached=ee,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this._warnOnRun=!0,this.__v_skip=!0,!ee&&activeEffectScope&&(activeEffectScope.active?(this.parent=activeEffectScope,this.index=(activeEffectScope.scopes||(activeEffectScope.scopes=[])).push(this)-1):(this._active=!1,this._warnOnRun=!1))}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let ee,te;if(this.scopes){const st=this.scopes.slice();for(ee=0,te=st.length;ee<te;ee++)st[ee].pause()}for(ee=0,te=this.effects.length;ee<te;ee++)this.effects[ee].pause()}}resume(){if(this._active&&this._isPaused){this._isPaused=!1;let ee,te;if(this.scopes){const ot=this.scopes.slice();for(ee=0,te=ot.length;ee<te;ee++)ot[ee].resume()}const st=this.effects.slice();for(ee=0,te=st.length;ee<te;ee++)st[ee].resume()}}run(ee){if(this._active){const te=activeEffectScope;try{return activeEffectScope=this,ee()}finally{activeEffectScope=te}}}on(){++this._on===1&&(this.prevScope=activeEffectScope,activeEffectScope=this)}off(){if(this._on>0&&--this._on===0){if(activeEffectScope===this)activeEffectScope=this.prevScope;else{let ee=activeEffectScope;for(;ee;){if(ee.prevScope===this){ee.prevScope=this.prevScope;break}ee=ee.prevScope}}this.prevScope=void 0}}stop(ee){if(this._active){this._active=!1;let te,st;for(te=0,st=this.effects.length;te<st;te++)this.effects[te].stop();for(this.effects.length=0,te=0,st=this.cleanups.length;te<st;te++)this.cleanups[te]();if(this.cleanups.length=0,this.scopes){const ot=this.scopes.slice();for(te=0,st=ot.length;te<st;te++)ot[te].stop(!0);this.scopes.length=0}if(!this.detached&&this.parent&&!ee){const ot=this.parent.scopes.pop();ot&&ot!==this&&(this.parent.scopes[this.index]=ot,ot.index=this.index)}this.parent=void 0}}}function effectScope(ne){return new EffectScope(ne)}function getCurrentScope(){return activeEffectScope}function onScopeDispose(ne,ee=!1){activeEffectScope&&activeEffectScope.cleanups.push(ne)}let activeSub;const pausedQueueEffects=new WeakSet;class ReactiveEffect{constructor(ee){this.fn=ee,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.next=void 0,this.cleanup=void 0,this.scheduler=void 0,activeEffectScope&&(activeEffectScope.active?activeEffectScope.effects.push(this):this.flags&=-2)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,pausedQueueEffects.has(this)&&(pausedQueueEffects.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||batch(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,cleanupEffect(this),prepareDeps(this);const ee=activeSub,te=shouldTrack;activeSub=this,shouldTrack=!0;try{return this.fn()}finally{cleanupDeps(this),activeSub=ee,shouldTrack=te,this.flags&=-3}}stop(){if(this.flags&1){for(let ee=this.deps;ee;ee=ee.nextDep)removeSub(ee);this.deps=this.depsTail=void 0,cleanupEffect(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?pausedQueueEffects.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){isDirty(this)&&this.run()}get dirty(){return isDirty(this)}}let batchDepth=0,batchedSub,batchedComputed;function batch(ne,ee=!1){if(ne.flags|=8,ee){ne.next=batchedComputed,batchedComputed=ne;return}ne.next=batchedSub,batchedSub=ne}function startBatch(){batchDepth++}function endBatch(){if(--batchDepth>0)return;if(batchedComputed){let ee=batchedComputed;for(batchedComputed=void 0;ee;){const te=ee.next;ee.next=void 0,ee.flags&=-9,ee=te}}let ne;for(;batchedSub;){let ee=batchedSub;for(batchedSub=void 0;ee;){const te=ee.next;if(ee.next=void 0,ee.flags&=-9,ee.flags&1)try{ee.trigger()}catch(st){ne||(ne=st)}ee=te}}if(ne)throw ne}function prepareDeps(ne){for(let ee=ne.deps;ee;ee=ee.nextDep)ee.version=-1,ee.prevActiveLink=ee.dep.activeLink,ee.dep.activeLink=ee}function cleanupDeps(ne){let ee,te=ne.depsTail,st=te;for(;st;){const ot=st.prevDep;st.version===-1?(st===te&&(te=ot),removeSub(st),removeDep(st)):ee=st,st.dep.activeLink=st.prevActiveLink,st.prevActiveLink=void 0,st=ot}ne.deps=ee,ne.depsTail=te}function isDirty(ne){for(let ee=ne.deps;ee;ee=ee.nextDep)if(ee.dep.version!==ee.version||ee.dep.computed&&(refreshComputed(ee.dep.computed)||ee.dep.version!==ee.version))return!0;return!!ne._dirty}function refreshComputed(ne){if(ne.flags&4&&!(ne.flags&16)||(ne.flags&=-17,ne.globalVersion===globalVersion)||(ne.globalVersion=globalVersion,!ne.isSSR&&ne.flags&128&&(!ne.deps&&!ne._dirty||!isDirty(ne))))return;ne.flags|=2;const ee=ne.dep,te=activeSub,st=shouldTrack;activeSub=ne,shouldTrack=!0;try{prepareDeps(ne);const ot=ne.fn(ne._value);(ee.version===0||hasChanged(ot,ne._value))&&(ne.flags|=128,ne._value=ot,ee.version++)}catch(ot){throw ee.version++,ot}finally{activeSub=te,shouldTrack=st,cleanupDeps(ne),ne.flags&=-3}}function removeSub(ne,ee=!1){const{dep:te,prevSub:st,nextSub:ot}=ne;if(st&&(st.nextSub=ot,ne.prevSub=void 0),ot&&(ot.prevSub=st,ne.nextSub=void 0),te.subs===ne&&(te.subs=st,!st&&te.computed)){te.computed.flags&=-5;for(let ct=te.computed.deps;ct;ct=ct.nextDep)removeSub(ct,!0)}!ee&&!--te.sc&&te.map&&te.map.delete(te.key)}function removeDep(ne){const{prevDep:ee,nextDep:te}=ne;ee&&(ee.nextDep=te,ne.prevDep=void 0),te&&(te.prevDep=ee,ne.nextDep=void 0)}function effect(ne,ee){ne.effect instanceof ReactiveEffect&&(ne=ne.effect.fn);const te=new ReactiveEffect(ne);ee&&extend$5(te,ee);try{te.run()}catch(ot){throw te.stop(),ot}const st=te.run.bind(te);return st.effect=te,st}function stop(ne){ne.effect.stop()}let shouldTrack=!0;const trackStack=[];function pauseTracking(){trackStack.push(shouldTrack),shouldTrack=!1}function resetTracking(){const ne=trackStack.pop();shouldTrack=ne===void 0?!0:ne}function cleanupEffect(ne){const{cleanup:ee}=ne;if(ne.cleanup=void 0,ee){const te=activeSub;activeSub=void 0;try{ee()}finally{activeSub=te}}}let globalVersion=0;class Link{constructor(ee,te){this.sub=ee,this.dep=te,this.version=te.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class Dep{constructor(ee){this.computed=ee,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(ee){if(!activeSub||!shouldTrack||activeSub===this.computed)return;let te=this.activeLink;if(te===void 0||te.sub!==activeSub)te=this.activeLink=new Link(activeSub,this),activeSub.deps?(te.prevDep=activeSub.depsTail,activeSub.depsTail.nextDep=te,activeSub.depsTail=te):activeSub.deps=activeSub.depsTail=te,addSub(te);else if(te.version===-1&&(te.version=this.version,te.nextDep)){const st=te.nextDep;st.prevDep=te.prevDep,te.prevDep&&(te.prevDep.nextDep=st),te.prevDep=activeSub.depsTail,te.nextDep=void 0,activeSub.depsTail.nextDep=te,activeSub.depsTail=te,activeSub.deps===te&&(activeSub.deps=st)}return te}trigger(ee){this.version++,globalVersion++,this.notify(ee)}notify(ee){startBatch();try{for(let te=this.subs;te;te=te.prevSub)te.sub.notify()&&te.sub.dep.notify()}finally{endBatch()}}}function addSub(ne){if(ne.dep.sc++,ne.sub.flags&4){const ee=ne.dep.computed;if(ee&&!ne.dep.subs){ee.flags|=20;for(let st=ee.deps;st;st=st.nextDep)addSub(st)}const te=ne.dep.subs;te!==ne&&(ne.prevSub=te,te&&(te.nextSub=ne)),ne.dep.subs=ne}}const targetMap=new WeakMap,ITERATE_KEY=Symbol(""),MAP_KEY_ITERATE_KEY=Symbol(""),ARRAY_ITERATE_KEY=Symbol("");function track(ne,ee,te){if(shouldTrack&&activeSub){let st=targetMap.get(ne);st||targetMap.set(ne,st=new Map);let ot=st.get(te);ot||(st.set(te,ot=new Dep),ot.map=st,ot.key=te),ot.track()}}function trigger(ne,ee,te,st,ot,ct){const ut=targetMap.get(ne);if(!ut){globalVersion++;return}const dt=ht=>{ht&&ht.trigger()};if(startBatch(),ee==="clear")ut.forEach(dt);else{const ht=isArray$1(ne),ft=ht&&isIntegerKey(te);if(ht&&te==="length"){const pt=Number(st);ut.forEach((mt,yt)=>{(yt==="length"||yt===ARRAY_ITERATE_KEY||!isSymbol(yt)&&yt>=pt)&&dt(mt)})}else switch((te!==void 0||ut.has(void 0))&&dt(ut.get(te)),ft&&dt(ut.get(ARRAY_ITERATE_KEY)),ee){case"add":ht?ft&&dt(ut.get("length")):(dt(ut.get(ITERATE_KEY)),isMap(ne)&&dt(ut.get(MAP_KEY_ITERATE_KEY)));break;case"delete":ht||(dt(ut.get(ITERATE_KEY)),isMap(ne)&&dt(ut.get(MAP_KEY_ITERATE_KEY)));break;case"set":isMap(ne)&&dt(ut.get(ITERATE_KEY));break}}endBatch()}function getDepFromReactive(ne,ee){const te=targetMap.get(ne);return te&&te.get(ee)}function reactiveReadArray(ne){const ee=toRaw(ne);return ee===ne?ee:(track(ee,"iterate",ARRAY_ITERATE_KEY),isShallow(ne)?ee:ee.map(toReactive))}function shallowReadArray(ne){return track(ne=toRaw(ne),"iterate",ARRAY_ITERATE_KEY),ne}function toWrapped(ne,ee){return isReadonly(ne)?toReadonly(isReactive(ne)?toReactive(ee):ee):toReactive(ee)}const arrayInstrumentations={__proto__:null,[Symbol.iterator](){return iterator(this,Symbol.iterator,ne=>toWrapped(this,ne))},concat(...ne){return reactiveReadArray(this).concat(...ne.map(ee=>isArray$1(ee)?reactiveReadArray(ee):ee))}
11,entries(){return iterator(this,"entries",ne=>(ne[1]=toWrapped(this,ne[1]),ne))},every(ne,ee){return apply$2(this,"every",ne,ee,void 0,arguments)},filter(ne,ee){return apply$2(this,"filter",ne,ee,te=>te.map(st=>toWrapped(this,st)),arguments)},find(ne,ee){return apply$2(this,"find",ne,ee,te=>toWrapped(this,te),arguments)},findIndex(ne,ee){return apply$2(this,"findIndex",ne,ee,void 0,arguments)},findLast(ne,ee){return apply$2(this,"findLast",ne,ee,te=>toWrapped(this,te),arguments)},findLastIndex(ne,ee){return apply$2(this,"findLastIndex",ne,ee,void 0,arguments)},forEach(ne,ee){return apply$2(this,"forEach",ne,ee,void 0,arguments)},includes(...ne){return searchProxy(this,"includes",ne)},indexOf(...ne){return searchProxy(this,"indexOf",ne)},join(ne){return reactiveReadArray(this).join(ne)},lastIndexOf(...ne){return searchProxy(this,"lastIndexOf",ne)},map(ne,ee){return apply$2(this,"map",ne,ee,void 0,arguments)},pop(){return noTracking(this,"pop")},push(...ne){return noTracking(this,"push",ne)},reduce(ne,...ee){return reduce(this,"reduce",ne,ee)},reduceRight(ne,...ee){return reduce(this,"reduceRight",ne,ee)},shift(){return noTracking(this,"shift")},some(ne,ee){return apply$2(this,"some",ne,ee,void 0,arguments)},splice(...ne){return noTracking(this,"splice",ne)},toReversed(){return reactiveReadArray(this).toReversed()},toSorted(ne){return reactiveReadArray(this).toSorted(ne)},toSpliced(...ne){return reactiveReadArray(this).toSpliced(...ne)},unshift(...ne){return noTracking(this,"unshift",ne)},values(){return iterator(this,"values",ne=>toWrapped(this,ne))}};function iterator(ne,ee,te){const st=shallowReadArray(ne),ot=st[ee]();return st!==ne&&!isShallow(ne)&&(ot._next=ot.next,ot.next=()=>{const ct=ot._next();return ct.done||(ct.value=te(ct.value)),ct}),ot}const arrayProto=Array.prototype;function apply$2(ne,ee,te,st,ot,ct){const ut=shallowReadArray(ne),dt=ut!==ne&&!isShallow(ne),ht=ut[ee];if(ht!==arrayProto[ee]){const mt=ht.apply(ne,ct);return dt?toReactive(mt):mt}let ft=te;ut!==ne&&(dt?ft=function(mt,yt){return te.call(this,toWrapped(ne,mt),yt,ne)}:te.length>2&&(ft=function(mt,yt){return te.call(this,mt,yt,ne)}));const pt=ht.call(ut,ft,st);return dt&&ot?ot(pt):pt}function reduce(ne,ee,te,st){const ot=shallowReadArray(ne),ct=ot!==ne&&!isShallow(ne);let ut=te,dt=!1;ot!==ne&&(ct?(dt=st.length===0,ut=function(ft,pt,mt){return dt&&(dt=!1,ft=toWrapped(ne,ft)),te.call(this,ft,toWrapped(ne,pt),mt,ne)}):te.length>3&&(ut=function(ft,pt,mt){return te.call(this,ft,pt,mt,ne)}));const ht=ot[ee](ut,...st);return dt?toWrapped(ne,ht):ht}function searchProxy(ne,ee,te){const st=toRaw(ne);track(st,"iterate",ARRAY_ITERATE_KEY);const ot=st[ee](...te);return(ot===-1||ot===!1)&&isProxy(te[0])?(te[0]=toRaw(te[0]),st[ee](...te)):ot}function noTracking(ne,ee,te=[]){pauseTracking(),startBatch();const st=toRaw(ne)[ee].apply(ne,te);return endBatch(),resetTracking(),st}const isNonTrackableKeys=makeMap("__proto__,__v_isRef,__isVue"),builtInSymbols=new Set(Object.getOwnPropertyNames(Symbol).filter(ne=>ne!=="arguments"&&ne!=="caller").map(ne=>Symbol[ne]).filter(isSymbol));function hasOwnProperty$1(ne){isSymbol(ne)||(ne=String(ne));const ee=toRaw(this);return track(ee,"has",ne),ee.hasOwnProperty(ne)}class BaseReactiveHandler{constructor(ee=!1,te=!1){this._isReadonly=ee,this._isShallow=te}get(ee,te,st){if(te==="__v_skip")return ee.__v_skip;const ot=this._isReadonly,ct=this._isShallow;if(te==="__v_isReactive")return!ot;if(te==="__v_isReadonly")return ot;if(te==="__v_isShallow")return ct;if(te==="__v_raw")return st===(ot?ct?shallowReadonlyMap:readonlyMap:ct?shallowReactiveMap:reactiveMap).get(ee)||Object.getPrototypeOf(ee)===Object.getPrototypeOf(st)?ee:void 0;const ut=isArray$1(ee);if(!ot){let ht;if(ut&&(ht=arrayInstrumentations[te]))return ht;if(te==="hasOwnProperty")return hasOwnProperty$1}const dt=Reflect.get(ee,te,isRef(ee)?ee:st);if((isSymbol(te)?builtInSymbols.has(te):isNonTrackableKeys(te))||(ot||track(ee,"get",te),ct))return dt;if(isRef(dt)){const ht=ut&&isIntegerKey(te)?dt:dt.value;return ot&&isObject$2(ht)?readonly(ht):ht}return isObject$2(dt)?ot?readonly(dt):reactive(dt):dt}}class MutableReactiveHandler extends BaseReactiveHandler{constructor(ee=!1){super(!1,ee)}set(ee,te,st,ot){let ct=ee[te];const ut=isArray$1(ee)&&isIntegerKey(te);
vendor: 11,623 bytes, lines 11-14
11if(!this._isShallow){const ft=isReadonly(ct);if(!isShallow(st)&&!isReadonly(st)&&(ct=toRaw(ct),st=toRaw(st)),!ut&&isRef(ct)&&!isRef(st))return ft||(ct.value=st),!0}const dt=ut?Number(te)<ee.length:hasOwn(ee,te),ht=Reflect.set(ee,te,st,isRef(ee)?ee:ot);return ee===toRaw(ot)&&ht&&(dt?hasChanged(st,ct)&&trigger(ee,"set",te,st):trigger(ee,"add",te,st)),ht}deleteProperty(ee,te){const st=hasOwn(ee,te);ee[te];const ot=Reflect.deleteProperty(ee,te);return ot&&st&&trigger(ee,"delete",te,void 0),ot}has(ee,te){const st=Reflect.has(ee,te);return(!isSymbol(te)||!builtInSymbols.has(te))&&track(ee,"has",te),st}ownKeys(ee){return track(ee,"iterate",isArray$1(ee)?"length":ITERATE_KEY),Reflect.ownKeys(ee)}}class ReadonlyReactiveHandler extends BaseReactiveHandler{constructor(ee=!1){super(!0,ee)}set(ee,te){return!0}deleteProperty(ee,te){return!0}}const mutableHandlers=new MutableReactiveHandler,readonlyHandlers=new ReadonlyReactiveHandler,shallowReactiveHandlers=new MutableReactiveHandler(!0),shallowReadonlyHandlers=new ReadonlyReactiveHandler(!0),toShallow=ne=>ne,getProto=ne=>Reflect.getPrototypeOf(ne);function createIterableMethod(ne,ee,te){return function(...st){const ot=this.__v_raw,ct=toRaw(ot),ut=isMap(ct),dt=ne==="entries"||ne===Symbol.iterator&&ut,ht=ne==="keys"&&ut,ft=ot[ne](...st),pt=te?toShallow:ee?toReadonly:toReactive;return!ee&&track(ct,"iterate",ht?MAP_KEY_ITERATE_KEY:ITERATE_KEY),extend$5(Object.create(ft),{next(){const{value:mt,done:yt}=ft.next();return yt?{value:mt,done:yt}:{value:dt?[pt(mt[0]),pt(mt[1])]:pt(mt),done:yt}}})}}function createReadonlyMethod(ne){return function(...ee){return ne==="delete"?!1:ne==="clear"?void 0:this}}function createInstrumentations(ne,ee){const te={get(ot){const ct=this.__v_raw,ut=toRaw(ct),dt=toRaw(ot);ne||(hasChanged(ot,dt)&&track(ut,"get",ot),track(ut,"get",dt));const{has:ht}=getProto(ut),ft=ee?toShallow:ne?toReadonly:toReactive;if(ht.call(ut,ot))return ft(ct.get(ot));if(ht.call(ut,dt))return ft(ct.get(dt));ct!==ut&&ct.get(ot)},get size(){const ot=this.__v_raw;return!ne&&track(toRaw(ot),"iterate",ITERATE_KEY),ot.size},has(ot){const ct=this.__v_raw,ut=toRaw(ct),dt=toRaw(ot);return ne||(hasChanged(ot,dt)&&track(ut,"has",ot),track(ut,"has",dt)),ot===dt?ct.has(ot):ct.has(ot)||ct.has(dt)},forEach(ot,ct){const ut=this,dt=ut.__v_raw,ht=toRaw(dt),ft=ee?toShallow:ne?toReadonly:toReactive;return!ne&&track(ht,"iterate",ITERATE_KEY),dt.forEach((pt,mt)=>ot.call(ct,ft(pt),ft(mt),ut))}};return extend$5(te,ne?{add:createReadonlyMethod("add"),set:createReadonlyMethod("set"),delete:createReadonlyMethod("delete"),clear:createReadonlyMethod("clear")}:{add(ot){const ct=toRaw(this),ut=getProto(ct),dt=toRaw(ot),ht=!ee&&!isShallow(ot)&&!isReadonly(ot)?dt:ot;return ut.has.call(ct,ht)||hasChanged(ot,ht)&&ut.has.call(ct,ot)||hasChanged(dt,ht)&&ut.has.call(ct,dt)||(ct.add(ht),trigger(ct,"add",ht,ht)),this},set(ot,ct){!ee&&!isShallow(ct)&&!isReadonly(ct)&&(ct=toRaw(ct));const ut=toRaw(this),{has:dt,get:ht}=getProto(ut);let ft=dt.call(ut,ot);ft||(ot=toRaw(ot),ft=dt.call(ut,ot));const pt=ht.call(ut,ot);return ut.set(ot,ct),ft?hasChanged(ct,pt)&&trigger(ut,"set",ot,ct):trigger(ut,"add",ot,ct),this},delete(ot){const ct=toRaw(this),{has:ut,get:dt}=getProto(ct);let ht=ut.call(ct,ot);ht||(ot=toRaw(ot),ht=ut.call(ct,ot)),dt&&dt.call(ct,ot);const ft=ct.delete(ot);return ht&&trigger(ct,"delete",ot,void 0),ft},clear(){const ot=toRaw(this),ct=ot.size!==0,ut=ot.clear();return ct&&trigger(ot,"clear",void 0,void 0),ut}}),["keys","values","entries",Symbol.iterator].forEach(ot=>{te[ot]=createIterableMethod(ot,ne,ee)}),te}function createInstrumentationGetter(ne,ee){const te=createInstrumentations(ne,ee);return(st,ot,ct)=>ot==="__v_isReactive"?!ne:ot==="__v_isReadonly"?ne:ot==="__v_raw"?st:Reflect.get(hasOwn(te,ot)&&ot in st?te:st,ot,ct)}const mutableCollectionHandlers={get:createInstrumentationGetter(!1,!1)},shallowCollectionHandlers={get:createInstrumentationGetter(!1,!0)},readonlyCollectionHandlers={get:createInstrumentationGetter(!0,!1)},shallowReadonlyCollectionHandlers={get:createInstrumentationGetter(!0,!0)},reactiveMap=new WeakMap,shallowReactiveMap=new WeakMap,readonlyMap=new WeakMap,shallowReadonlyMap=new WeakMap;function targetTypeMap(ne){switch(ne){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function reactive(ne){return isReadonly(ne)?ne:createReactiveObject(ne,!1,mutableHandlers,mutableCollectionHandlers,reactiveMap)}function shallowReactive(ne){return createReactiveObject(ne,!1,shallowReactiveHandlers,shallowCollectionHandlers,shallowReactiveMap)}function readonly(ne){return createReactiveObject(ne,!0,readonlyHandlers,readonlyCollectionHandlers,readonlyMap)}function shallowReadonly(ne){return createReactiveObject(ne,!0,shallowReadonlyHandlers,shallowReadonlyCollectionHandlers,shallowReadonlyMap)}function createReactiveObject(ne,ee,te,st,ot){if(!isObject$2(ne)||ne.__v_raw&&!(ee&&ne.__v_isReactive)||ne.__v_skip||!Object.isExtensible(ne))return ne;const ct=ot.get(ne);if(ct)return ct;const ut=targetTypeMap(toRawType(ne));if(ut===0)return ne;const dt=new Proxy(ne,ut===2?st:te);return ot.set(ne,dt),dt}function isReactive(ne){return isReadonly(ne)?isReactive(ne.__v_raw):!!(ne&&ne.__v_isReactive)}function isReadonly(ne){return!!(ne&&ne.__v_isReadonly)}function isShallow(ne){return!!(ne&&ne.__v_isShallow)}function isProxy(ne){return ne?!!ne.__v_raw:!1}function toRaw(ne){const ee=ne&&ne.__v_raw;return ee?toRaw(ee):ne}function markRaw(ne){return!hasOwn(ne,"__v_skip")&&Object.isExtensible(ne)&&def(ne,"__v_skip",!0),ne}const toReactive=ne=>isObject$2(ne)?reactive(ne):ne,toReadonly=ne=>isObject$2(ne)?readonly(ne):ne;function isRef(ne){return ne?ne.__v_isRef===!0:!1}function ref$1(ne){return createRef(ne,!1)}function shallowRef(ne){return createRef(ne,!0)}function createRef(ne,ee){return isRef(ne)?ne:new RefImpl(ne,ee)}class RefImpl{constructor(ee,te){this.dep=new Dep,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=te?ee:toRaw(ee),this._value=te?ee:toReactive(ee),this.__v_isShallow=te}get value(){return this.dep.track(),this._value}set value(ee){const te=this._rawValue,st=this.__v_isShallow||isShallow(ee)||isReadonly(ee);ee=st?ee:toRaw(ee),hasChanged(ee,te)&&(this._rawValue=ee,this._value=st?ee:toReactive(ee),this.dep.trigger())}}function triggerRef(ne){ne.dep&&ne.dep.trigger()}function unref(ne){return isRef(ne)?ne.value:ne}function toValue$1(ne){return isFunction$1(ne)?ne():unref(ne)}const shallowUnwrapHandlers={get:(ne,ee,te)=>ee==="__v_raw"?ne:unref(Reflect.get(ne,ee,te)),set:(ne,ee,te,st)=>{const ot=ne[ee];return isRef(ot)&&!isRef(te)?(ot.value=te,!0):Reflect.set(ne,ee,te,st)}};function proxyRefs(ne){return isReactive(ne)?ne:new Proxy(ne,shallowUnwrapHandlers)}class CustomRefImpl{constructor(ee){this.__v_isRef=!0,this._value=void 0;const te=this.dep=new Dep,{get:st,set:ot}=ee(te.track.bind(te),te.trigger.bind(te));this._get=st,this._set=ot}get value(){return this._value=this._get()}set value(ee){this._set(ee)}}function customRef(ne){return new CustomRefImpl(ne)}function toRefs(ne){const ee=isArray$1(ne)?new Array(ne.length):{};for(const te in ne)ee[te]=propertyToRef(ne,te);return ee}class ObjectRefImpl{constructor(ee,te,st){this._object=ee,this._defaultValue=st,this.__v_isRef=!0,this._value=void 0,this._key=isSymbol(te)?te:String(te),this._raw=toRaw(ee);let ot=!0,ct=ee;if(!isArray$1(ee)||isSymbol(this._key)||!isIntegerKey(this._key))do ot=!isProxy(ct)||isShallow(ct);while(ot&&(ct=ct.__v_raw));this._shallow=ot}get value(){let ee=this._object[this._key];return this._shallow&&(ee=unref(ee)),this._value=ee===void 0?this._defaultValue:ee}set value(ee){if(this._shallow&&isRef(this._raw[this._key])){const te=this._object[this._key];if(isRef(te)){te.value=ee;return}}this._object[this._key]=ee}get dep(){return getDepFromReactive(this._raw,this._key)}}class GetterRefImpl{constructor(ee){this._getter=ee,this.__v_isRef=!0,this.__v_isReadonly=!0,this._value=void 0}get value(){return this._value=this._getter()}}function toRef$1(ne,ee,te){return isRef(ne)?ne:isFunction$1(ne)?new GetterRefImpl(ne):isObject$2(ne)&&arguments.length>1?propertyToRef(ne,ee,te):ref$1(ne)}function propertyToRef(ne,ee,te){return new ObjectRefImpl(ne,ee,te)}class ComputedRefImpl{constructor(ee,te,st){this.fn=ee,this.setter=te,this._value=void 0,this.dep=new Dep(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=globalVersion-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!te,this.isSSR=st}notify(){if(this.flags|=16,!(this.flags&8)&&activeSub!==this)return batch(this,!0),!0}get value(){const ee=this.dep.track();return refreshComputed(this),ee&&(ee.version=this.dep.version),this._value}set value(ee){this.setter&&this.setter(ee)}}function computed$1(ne,ee,te=!1){let st,ot;return isFunction$1(ne)?st=ne:(st=ne.get,ot=ne.set),new ComputedRefImpl(st,ot,te)}const TrackOpTypes={GET:"get",HAS:"has",ITERATE:"iterate"},TriggerOpTypes={SET:"set",ADD:"add",DELETE:"delete",CLEAR:"clear"},INITIAL_WATCHER_VALUE={},cleanupMap=new WeakMap;let activeWatcher;function getCurrentWatcher(){return activeWatcher}function onWatcherCleanup(ne,ee=!1,te=activeWatcher){if(te){let st=cleanupMap.get(te);st||cleanupMap.set(te,st=[]),st.push(ne)}}function watch$1(ne,ee,te=EMPTY_OBJ){const{immediate:st,deep:ot,once:ct,scheduler:ut,augmentJob:dt,call:ht}=te,ft=Nt=>ot?Nt:isShallow(Nt)||ot===!1||ot===0?traverse(Nt,1):traverse(Nt);let pt,mt,yt,vt,_t=!1,bt=!1;if(isRef(ne)?(mt=()=>ne.value,_t=isShallow(ne)):isReactive(ne)?(mt=()=>ft(ne),_t=!0):isArray$1(ne)?(bt=!0,_t=ne.some(Nt=>isReactive(Nt)||isShallow(Nt)),mt=()=>ne.map(Nt=>{if(isRef(Nt))return Nt.value;if(isReactive(Nt))return ft(Nt);if(isFunction$1(Nt))return ht?ht(Nt,2):Nt()})):isFunction$1(ne)?ee?mt=ht?()=>ht(ne,2):ne:mt=()=>{if(yt){pauseTracking();try{yt()}finally{resetTracking()}}const Nt=activeWatcher;activeWatcher=pt;try{return ht?ht(ne,3,[vt]):ne(vt)}finally{activeWatcher=Nt}}:mt=NOOP,ee&&ot){const Nt=mt,Gt=ot===!0?1/0:ot;mt=()=>traverse(Nt(),Gt)}const xt=getCurrentScope(),Mt=()=>{pt.stop(),xt&&xt.active&&remove(xt.effects,pt)};if(ct&&ee){const Nt=ee;ee=(...Gt)=>{const Bt=Nt(...Gt);return Mt(),Bt}}let Ot=bt?new Array(ne.length).fill(INITIAL_WATCHER_VALUE):INITIAL_WATCHER_VALUE;const kt=Nt=>{if(!(!(pt.flags&1)||!pt.dirty&&!Nt))if(ee){const Gt=pt.run();if(Nt||ot||_t||(bt?Gt.some((Bt,Ut)=>hasChanged(Bt,Ot[Ut])):hasChanged(Gt,Ot))){yt&&yt();const Bt=activeWatcher;activeWatcher=pt;try{const Ut=[Gt,Ot===INITIAL_WATCHER_VALUE?void 0:bt&&Ot[0]===INITIAL_WATCHER_VALUE?[]:Ot,vt];Ot=Gt,ht?ht(ee,3,Ut):ee(...Ut)}finally{activeWatcher=Bt}}}else pt.run()};return dt&&dt(kt),pt=new ReactiveEffect(mt),pt.scheduler=ut?()=>ut(kt,!1):kt,vt=Nt=>onWatcherCleanup(Nt,!1,pt),yt=pt.onStop=()=>{const Nt=cleanupMap.get(pt);if(Nt){if(ht)ht(Nt,4);else for(const Gt of Nt)Gt();cleanupMap.delete(pt)}},ee?st?kt(!0):Ot=pt.run():ut?ut(kt.bind(null,!0),!0):pt.run(),Mt.pause=pt.pause.bind(pt),Mt.resume=pt.resume.bind(pt),Mt.stop=Mt,Mt}function traverse(ne,ee=1/0,te){if(ee<=0||!isObject$2(ne)||ne.__v_skip||(te=te||new Map,(te.get(ne)||0)>=ee))return ne;if(te.set(ne,ee),ee--,isRef(ne))traverse(ne.value,ee,te);else if(isArray$1(ne))for(let st=0;st<ne.length;st++)traverse(ne[st],ee,te);else if(isSet(ne)||isMap(ne))ne.forEach(st=>{traverse(st,ee,te)});else if(isPlainObject$2(ne)){for(const st in ne)traverse(ne[st],ee,te);for(const st of Object.getOwnPropertySymbols(ne))Object.prototype.propertyIsEnumerable.call(ne,st)&&traverse(ne[st],ee,te)}return ne}/**
12* @vue/runtime-core v3.5.42
13* (c) 2018-present Yuxi (Evan) You and Vue contributors
14* @license MIT
15**/const stack$1=[];function pushWarningContext(ne){stack$1.push(ne)}function popWarningContext(){stack$1.pop()}let isWarning=!1;function warn$1(ne,...ee){if(isWarning)return;isWarning=!0,pauseTracking();const te=stack$1.length?stack$1[stack$1.length-1].component:null,st=te&&te.appContext.config.warnHandler,ot=getComponentTrace();if(st)callWithErrorHandling(st,te,11,[ne+ee.map(ct=>{var ut,dt;return(dt=(ut=ct.toString)==null?void 0:ut.call(ct))!=null?dt:JSON.stringify(ct)}).join(""),te&&te.proxy,ot.map(({vnode:ct})=>`at <${formatComponentName(te,ct.type)}>`).join(`
16`),ot]);else{const ct=[`[Vue warn]: ${ne}`,...ee];ot.length&&ct.push(`
17`,...formatTrace(ot)),console.warn(...ct)}resetTracking(),isWarning=!1}function getComponentTrace(){let ne=stack$1[stack$1.length-1];if(!ne)return[];const ee=[];for(;ne;){const te=ee[0];te&&te.vnode===ne?te.recurseCount++:ee.push({vnode:ne,recurseCount:0});const st=ne.component&&ne.component.parent;ne=st&&st.vnode}return ee}function formatTrace(ne){const ee=[];return ne.forEach((te,st)=>{ee.push(...st===0?[]:[`
18`],...formatTraceEntry(te))}),ee}function formatTraceEntry({vnode:ne,recurseCount:ee}){const te=ee>0?`... (${ee} recursive calls)`:"",st=ne.component?ne.component.parent==null:!1,ot=` at <${formatComponentName(ne.component,ne.type,st)}`,ct=">"+te;return ne.props?[ot,...formatProps(ne.props),ct]:[ot+ct]}function formatProps(ne){const ee=[],te=Object.keys(ne);return te.slice(0,3).forEach(st=>{ee.push(...formatProp(st,ne[st]))}),te.length>3&&ee.push(" ..."),ee}function formatProp(ne,ee,te){return isString(ee)?(ee=JSON.stringify(ee),te?ee:[`${ne}=${ee}`]):typeof ee=="number"||typeof ee=="boolean"||ee==null?te?ee:[`${ne}=${ee}`]:isRef(ee)?(ee=formatProp(ne,toRaw(ee.value),!0),te?ee:[`${ne}=Ref<`,ee,">"]):isFunction$1(ee)?[`${ne}=fn${ee.name?`<${ee.name}>`:""}`]:(ee=toRaw(ee),te?ee:[`${ne}=`,ee])}function assertNumber(ne,ee){}const ErrorCodes$1={SETUP_FUNCTION:0,0:"SETUP_FUNCTION",RENDER_FUNCTION:1,1:"RENDER_FUNCTION",NATIVE_EVENT_HANDLER:5,5:"NATIVE_EVENT_HANDLER",COMPONENT_EVENT_HANDLER:6,6:"COMPONENT_EVENT_HANDLER",VNODE_HOOK:7,7:"VNODE_HOOK",DIRECTIVE_HOOK:8,8:"DIRECTIVE_HOOK",TRANSITION_HOOK:9,9:"TRANSITION_HOOK",APP_ERROR_HANDLER:10,10:"APP_ERROR_HANDLER",APP_WARN_HANDLER:11,11:"APP_WARN_HANDLER",FUNCTION_REF:12,12:"FUNCTION_REF",ASYNC_COMPONENT_LOADER:13,13:"ASYNC_COMPONENT_LOADER",SCHEDULER:14,14:"SCHEDULER",COMPONENT_UPDATE:15,15:"COMPONENT_UPDATE",APP_UNMOUNT_CLEANUP:16,16:"APP_UNMOUNT_CLEANUP"},ErrorTypeStrings$1={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",15:"component update",16:"app unmount cleanup function"};function callWithErrorHandling(ne,ee,te,st){try{return st?ne(...st):ne()}catch(ot){handleError(ot,ee,te)}}function callWithAsyncErrorHandling(ne,ee,te,st){if(isFunction$1(ne)){const ot=callWithErrorHandling(ne,ee,te,st);return ot&&isPromise(ot)&&ot.catch(ct=>{handleError(ct,ee,te)}),ot}if(isArray$1(ne)){const ot=[];for(let ct=0;ct<ne.length;ct++)ot.push(callWithAsyncErrorHandling(ne[ct],ee,te,st));return ot}}function handleError(ne,ee,te,st=!0){const ot=ee?ee.vnode:null,{errorHandler:ct,throwUnhandledErrorInProduction:ut}=ee&&ee.appContext.config||EMPTY_OBJ;if(ee){let dt=ee.parent;const ht=ee.proxy,ft=`https://vuejs.org/error-reference/#runtime-${te}`;for(;dt;){const pt=dt.ec;if(pt){for(let mt=0;mt<pt.length;mt++)if(pt[mt](ne,ht,ft)===!1)return}dt=dt.parent}if(ct){pauseTracking(),callWithErrorHandling(ct,null,10,[ne,ht,ft]),resetTracking();return}}logError(ne,te,ot,st,ut)}function logError(ne,ee,te,st=!0,ot=!1){if(ot)throw ne;console.error(ne)}const queue=[];let flushIndex=-1;const pendingPostFlushCbs=[];let activePostFlushCbs=null,postFlushIndex=0;const resolvedPromise=Promise.resolve();let currentFlushPromise=null;function nextTick(ne){const ee=currentFlushPromise||resolvedPromise;return ne?ee.then(this?ne.bind(this):ne):ee}function findInsertionIndex$1(ne){let ee=flushIndex+1,te=queue.length;for(;ee<te;){const st=ee+te>>>1,ot=queue[st],ct=getId(ot);ct<ne||ct===ne&&ot.flags&2?ee=st+1:te=st}return ee}function queueJob(ne){if(!(ne.flags&1)){const ee=getId(ne),te=queue[queue.length-1];!te||!(ne.flags&2)&&ee>=getId(te)?queue.push(ne):queue.splice(findInsertionIndex$1(ee),
180,ne),ne.flags|=1,queueFlush()}}function queueFlush(){currentFlushPromise||(currentFlushPromise=resolvedPromise.then(flushJobs))}function queuePostFlushCb(ne){if(!isArray$1(ne))activePostFlushCbs&&ne.id===-1?activePostFlushCbs.splice(postFlushIndex+1,0,ne):ne.flags&1||(pendingPostFlushCbs.push(ne),ne.flags|=1);else for(let ee=0;ee<ne.length;ee++)pendingPostFlushCbs.push(ne[ee]);queueFlush()}function flushPreFlushCbs(ne,ee,te=flushIndex+1){for(;te<queue.length;te++){const st=queue[te];if(st&&st.flags&2){if(ne&&st.id!==ne.uid)continue;queue.splice(te,1),te--,st.flags&4&&(st.flags&=-2),st(),st.flags&4||(st.flags&=-2)}}}function flushPostFlushCbs(ne){if(pendingPostFlushCbs.length){const ee=[...new Set(pendingPostFlushCbs)].sort((te,st)=>getId(te)-getId(st));if(pendingPostFlushCbs.length=0,activePostFlushCbs){for(let te=0;te<ee.length;te++)activePostFlushCbs.push(ee[te]);return}for(activePostFlushCbs=ee,postFlushIndex=0;postFlushIndex<activePostFlushCbs.length;postFlushIndex++){const te=activePostFlushCbs[postFlushIndex];te.flags&4&&(te.flags&=-2),te.flags&8||te(),te.flags&=-2}activePostFlushCbs=null,postFlushIndex=0}}const getId=ne=>ne.id==null?ne.flags&2?-1:1/0:ne.id;function flushJobs(ne){try{for(flushIndex=0;flushIndex<queue.length;flushIndex++){const ee=queue[flushIndex];ee&&!(ee.flags&8)&&(ee.flags&4&&(ee.flags&=-2),callWithErrorHandling(ee,ee.i,ee.i?15:14),ee.flags&4||(ee.flags&=-2))}}finally{for(;flushIndex<queue.length;flushIndex++){const ee=queue[flushIndex];ee&&(ee.flags&=-2)}flushIndex=-1,queue.length=0,flushPostFlushCbs(),currentFlushPromise=null,(queue.length||pendingPostFlushCbs.length)&&flushJobs()}}let devtools$1,buffer$1=[];function setDevtoolsHook$1(ne,ee){var te,st;
vendor: 5,109 bytes, line 18
18devtools$1=ne,devtools$1?(devtools$1.enabled=!0,buffer$1.forEach(({event:ot,args:ct})=>devtools$1.emit(ot,...ct)),buffer$1=[]):typeof window<"u"&&window.HTMLElement&&!((st=(te=window.navigator)==null?void 0:te.userAgent)!=null&&st.includes("jsdom"))?((ee.__VUE_DEVTOOLS_HOOK_REPLAY__=ee.__VUE_DEVTOOLS_HOOK_REPLAY__||[]).push(ct=>{setDevtoolsHook$1(ct,ee)}),setTimeout(()=>{devtools$1||(ee.__VUE_DEVTOOLS_HOOK_REPLAY__=null,buffer$1=[])},3e3)):buffer$1=[]}let currentRenderingInstance=null,currentScopeId=null;function setCurrentRenderingInstance(ne){const ee=currentRenderingInstance;return currentRenderingInstance=ne,currentScopeId=ne&&ne.type.__scopeId||null,ee}function pushScopeId(ne){currentScopeId=ne}function popScopeId(){currentScopeId=null}const withScopeId=ne=>withCtx;function withCtx(ne,ee=currentRenderingInstance,te){if(!ee||ne._n)return ne;const st=(...ot)=>{st._d&&setBlockTracking(-1);const ct=setCurrentRenderingInstance(ee),ut=blockStack.length;let dt;try{dt=ne(...ot)}finally{for(let ht=blockStack.length;ht>ut;ht--)closeBlock();setCurrentRenderingInstance(ct),st._d&&setBlockTracking(1)}return dt};return st._n=!0,st._c=!0,st._d=!0,st}function withDirectives(ne,ee){if(currentRenderingInstance===null)return ne;const te=getComponentPublicInstance(currentRenderingInstance),st=ne.dirs||(ne.dirs=[]);for(let ot=0;ot<ee.length;ot++){let[ct,ut,dt,ht=EMPTY_OBJ]=ee[ot];ct&&(isFunction$1(ct)&&(ct={mounted:ct,updated:ct}),ct.deep&&traverse(ut),st.push({dir:ct,instance:te,value:ut,oldValue:void 0,arg:dt,modifiers:ht}))}return ne}function invokeDirectiveHook(ne,ee,te,st){const ot=ne.dirs,ct=ee&&ee.dirs;for(let ut=0;ut<ot.length;ut++){const dt=ot[ut];ct&&(dt.oldValue=ct[ut].value);let ht=dt.dir[st];ht&&(pauseTracking(),callWithAsyncErrorHandling(ht,te,8,[ne.el,dt,ne,ee]),resetTracking())}}function provide(ne,ee){if(currentInstance){let te=currentInstance.provides;const st=currentInstance.parent&&currentInstance.parent.provides;st===te&&(te=currentInstance.provides=Object.create(st)),te[ne]=ee}}function inject(ne,ee,te=!1){const st=getCurrentInstance();if(st||currentApp){let ot=currentApp?currentApp._context.provides:st?st.parent==null||st.ce?st.vnode.appContext&&st.vnode.appContext.provides:st.parent.provides:void 0;if(ot&&ne in ot)return ot[ne];if(arguments.length>1)return te&&isFunction$1(ee)?ee.call(st&&st.proxy):ee}}function hasInjectionContext(){return!!(getCurrentInstance()||currentApp)}const ssrContextKey=Symbol.for("v-scx"),useSSRContext=()=>inject(ssrContextKey);function watchEffect(ne,ee){return doWatch(ne,null,ee)}function watchPostEffect(ne,ee){return doWatch(ne,null,{flush:"post"})}function watchSyncEffect(ne,ee){return doWatch(ne,null,{flush:"sync"})}function watch(ne,ee,te){return doWatch(ne,ee,te)}function doWatch(ne,ee,te=EMPTY_OBJ){const{immediate:st,deep:ot,flush:ct,once:ut}=te,dt=extend$5({},te),ht=ee&&st||!ee&&ct!=="post";let ft;if(isInSSRComponentSetup){if(ct==="sync"){const vt=useSSRContext();ft=vt.__watcherHandles||(vt.__watcherHandles=[])}else if(!ht){const vt=()=>{};return vt.stop=NOOP,vt.resume=NOOP,vt.pause=NOOP,vt}}const pt=currentInstance;dt.call=(vt,_t,bt)=>callWithAsyncErrorHandling(vt,pt,_t,bt);let mt=!1;ct==="post"?dt.scheduler=vt=>{queuePostRenderEffect(vt,pt&&pt.suspense)}:ct!=="sync"&&(mt=!0,dt.scheduler=(vt,_t)=>{_t?vt():queueJob(vt)}),dt.augmentJob=vt=>{ee&&(vt.flags|=4),mt&&(vt.flags|=2,pt&&(vt.id=pt.uid,vt.i=pt))};const yt=watch$1(ne,ee,dt);return isInSSRComponentSetup&&(ft?ft.push(yt):ht&&yt()),yt}function instanceWatch(ne,ee,te){const st=this.proxy,ot=isString(ne)?ne.includes(".")?createPathGetter(st,ne):()=>st[ne]:ne.bind(st,st);let ct;isFunction$1(ee)?ct=ee:(ct=ee.handler,te=ee);const ut=setCurrentInstance(this),dt=doWatch(ot,ct.bind(st),te);return ut(),dt}function createPathGetter(ne,ee){const te=ee.split(".");return()=>{let st=ne;for(let ot=0;ot<te.length&&st;ot++)st=st[te[ot]];return st}}const pendingMounts=new WeakMap,TeleportEndKey=Symbol("_vte"),isTeleport=ne=>ne.__isTeleport,isTeleportDisabled=ne=>ne&&(ne.disabled||ne.disabled===""),isTeleportDeferred=ne=>ne&&(ne.defer||ne.defer===""),isTargetSVG=ne=>typeof SVGElement<"u"&&ne instanceof SVGElement,isTargetMathML=ne=>typeof MathMLElement=="function"&&ne instanceof MathMLElement,resolveTarget=(ne,ee)=>{const te=ne&&ne.to;return isString(te)?ee?ee(te):null:te},TeleportImpl={name:"Teleport",__isTeleport:!0,process(ne,ee,te,st,ot,ct,ut,dt,ht,ft){const{mc:pt,pc:mt,pbc:yt,o:{insert:vt,querySelector:_t,createText:bt,createComment:xt,parentNode:Mt}}=ft,Ot=isTeleportDisabled(ee.props);let{dynamicChildren:kt}=ee;const Nt=(Ut,Vt,Ht)=>{Ut.shapeFlag&16&&pt(Ut.children,Vt,Ht,ot,ct,ut,dt,ht)},Gt=(Ut=ee)=>{const Vt=isTeleportDisabled(Ut.props),Ht=Ut.target=resolveTarget(Ut.props,_t),zt=prepareAnchor(Ht,Ut,bt,vt);Ht&&(ut!=="svg"&&isTargetSVG(Ht)?ut="svg":ut!=="mathml"&&isTargetMathML(Ht)&&(ut="mathml"),ot&&ot.isCE&&(ot.ce._teleportTargets||(ot.ce._teleportTargets=new Set)).add(Ht),Vt||(Nt(Ut,Ht,zt),updateCssVars(Ut,!1)))},Bt=Ut=>{const Vt=()=>{if(pendingMounts.get(Ut)===Vt){if(pendingMounts.delete(Ut),isTeleportDisabled(Ut.props)){const Ht=
18Mt(Ut.el)||te;Nt(Ut,Ht,Ut.anchor),updateCssVars(Ut,!0)}Gt(Ut)}};pendingMounts.set(Ut,Vt),queuePostRenderEffect(Vt,ct)};if(ne==null){const Ut=ee.el=bt(""),Vt=ee.anchor=bt("");if(vt(Ut,te,st),vt(Vt,te,st),isTeleportDeferred(ee.props)||ct&&ct.pendingBranch){Bt(ee);return}Ot&&(Nt(ee,te,Vt),updateCssVars(ee,!0)),Gt()}else{ee.el=ne.el;const Ut=ee.anchor=ne.anchor,Vt=pendingMounts.get(ne);if(Vt){Vt.flags|=8,pendingMounts.delete(ne),Bt(ee);return}ee.targetStart=ne.targetStart;const Ht=ee.target=ne.target,zt=ee.targetAnchor=ne.targetAnchor,jt=isTeleportDisabled(ne.props),Wt=jt?te:Ht,Jt=jt?Ut:zt;if(ut==="svg"||isTargetSVG(Ht)?ut="svg":(ut==="mathml"||isTargetMathML(Ht))&&(ut="mathml"),kt?(yt(ne.dynamicChildren,kt,Wt,ot,ct,ut,dt),traverseStaticChildren(ne,ee,!0)):ht||mt(ne,ee,Wt,Jt,ot,ct,ut,dt,!1),Ot)jt?ee.props&&ne.props&&ee.props.to!==ne.props.to&&(ee.props.to=ne.props.to):moveTeleport(ee,te,Ut,ft,1);else if((ee.props&&ee.props.to)!==(ne.props&&ne.props.to)){const Qt=resolveTarget(ee.props,_t);Qt&&(ee.target=Qt,moveTeleport(ee,Qt,null,ft,0))}else jt&&moveTeleport(ee,Ht,zt,ft,1);updateCssVars(ee,Ot)}},remove(ne,ee,te,{um:st,o:{remove:ot}},ct){const{shapeFlag:ut,children:dt,anchor:ht,targetStart:ft,targetAnchor:pt,target:mt,props:yt}=ne,vt=isTeleportDisabled(yt),_t=ct||!vt,bt=pendingMounts.get(ne);if(bt&&(bt.flags|=8,pendingMounts.delete(ne)),mt&&(ot(ft),ot(pt)),ct&&ot(ht),!bt&&(vt||mt)&&ut&16)for(let xt=0;xt<dt.length;xt++){const Mt=dt[xt];st(Mt,ee,te,_t,!!Mt.dynamicChildren)}},move:moveTeleport,hydrate:hydrateTeleport};function moveTeleport(ne,ee,te,{o:{insert:st},m:ot},ct=2){ct===0&&st(ne.targetAnchor,ee,te);const{el:ut,anchor:dt,shapeFlag:ht,children:ft,props:pt}=ne,mt=ct===2;if(mt&&st(ut,ee,te),!pendingMounts.has(ne)&&(!mt||isTeleportDisabled(pt))&&ht&16)for(let yt=0;yt<ft.length;yt++)ot(ft[yt],ee,te,2);mt&&st(dt,ee,te)}function hydrateTeleport(ne,ee,te,st,ot,ct,{o:{nextSibling:ut,parentNode:dt,querySelector:ht,insert:ft,createText:pt}},mt){function yt(xt,Mt){let Ot=Mt;for(;Ot;){if(Ot&&Ot.nodeType===8){if(Ot.data==="teleport start anchor")ee.targetStart=Ot;else if(Ot.data==="teleport anchor"){ee.targetAnchor=Ot,xt._lpa=ee.targetAnchor&&ut(ee.targetAnchor);break}}Ot=ut(Ot)}}function vt(xt,Mt){Mt.anchor=mt(ut(xt),Mt,dt(xt),te,st,ot,ct)}const _t=ee.target=resolveTarget(ee.props,ht),bt=isTeleportDisabled(ee.props);if(_t){const xt=_t._lpa||_t.firstChild;ee.shapeFlag&16&&(bt?(vt(ne,ee),yt(_t,xt),ee.targetAnchor||prepareAnchor(_t,ee,pt,ft,dt(ne)===_t?ne:null)):(ee.anchor=ut(ne),yt(_t,xt),ee.targetAnchor||prepareAnchor(_t,ee,pt,ft),mt(xt&&ut(xt),ee,_t,te,st,ot,ct))),updateCssVars(ee,bt)}else bt&&ee.shapeFlag&16&&(vt(ne,ee),ee.targetStart=ne,ee.targetAnchor=ut(ne));return ee.anchor&&ut(ee.anchor)}const Teleport=TeleportImpl;function updateCssVars(ne,ee){const te=ne.ctx;if(te&&te.ut){let st,ot;for(ee?(st=ne.el,ot=ne.anchor):(st=ne.targetStart,ot=ne.targetAnchor);st&&st!==ot;)st.nodeType===1&&st.setAttribute("data-v-owner",te.uid),st=st.nextSibling;te.ut()}}function prepareAnchor(ne,ee,te,st,ot=null){const ct=ee.targetStart=te(""),ut=ee.targetAnchor=te("");return ct[TeleportEndKey]=ut,ne&&(st(ct,ne,ot),st(ut,ne,ot)),ut}const leaveCbKey=Symbol("_leaveCb"),enterCbKey$1=Symbol("_enterCb");function useTransitionState(){const ne={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return onMounted(()=>{ne.isMounted=!0}),onBeforeUnmount(()=>{ne.isUnmounting=!0}),ne}const TransitionHookValidator=[Function,Array],BaseTransitionPropsValidators={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:TransitionHookValidator,onEnter:TransitionHookValidator,onAfterEnter:TransitionHookValidator,onEnterCancelled:TransitionHookValidator,onBeforeLeave:TransitionHookValidator,onLeave:TransitionHookValidator,onAfterLeave:TransitionHookValidator,onLeaveCancelled:TransitionHookValidator,onBeforeAppear:TransitionHookValidator,onAppear:TransitionHookValidator,onAfterAppear:TransitionHookValidator,onAppearCancelled:TransitionHookValidator},recursiveGetSubtree=ne=>{const ee=ne.subTree;return ee.component?recursiveGetSubtree(ee.component):ee},BaseTransitionImpl={name:"BaseTransition",props:BaseTransitionPropsValidators,setup(ne,{slots:ee}){const te=getCurrentInstance(),st=useTransitionState();return()=>{const ot=ee.default&&getTransitionRawChildren(ee.default(),!0),ct=ot&&ot.length?findNonCommentChild(ot):te.subTree?createCommentVNode():void 0;if(!ct)return;const ut=toRaw(ne),{mode:dt}=ut;if(st.isLeaving)return emptyPlaceholder(ct);const ht=getInnerChild$1(ct);
18if(!ht)return emptyPlaceholder(ct);let ft=resolveTransitionHooks(ht,ut,st,te,mt=>ft=mt);ht.type!==Comment&&setTransitionHooks(ht,ft);let pt=te.subTree&&getInnerChild$1(te.subTree);if(pt&&pt.type!==Comment&&!isSameVNodeType(pt,ht)&&recursiveGetSubtree(te).type!==Comment){let mt=resolveTransitionHooks(pt,ut,st,te);if(setTransitionHooks(pt,mt),dt==="out-in"&&ht.type!==Comment)return st.isLeaving=!0,mt.afterLeave=()=>{st.isLeaving=!1,te.job.flags&8||te.update(),delete mt.afterLeave,pt=void 0},emptyPlaceholder(ct);dt==="in-out"&&ht.type!==Comment?mt.delayLeave=(yt,vt,_t)=>{const bt=getLeavingNodesForType(st,pt);bt[String(pt.key)]=pt,yt[leaveCbKey]=()=>{vt(),yt[leaveCbKey]=void 0,delete ft.delayedLeave,pt=void 0},ft.delayedLeave=()=>{_t(),delete ft.delayedLeave,pt=void 0}}:pt=void 0}else pt&&(pt=void 0);return ct}}};function findNonCommentChild(ne){let ee=ne[0];if(ne.length>1){for(const te of ne)if(te.type!==Comment){ee=te;break}}return ee}const BaseTransition=BaseTransitionImpl;function getLeavingNodesForType(ne,ee){const{leavingVNodes:te}=ne;let st=te.get(ee.type);return st||(st=Object.create(null),te.set(ee.type,st)),st}function resolveTransitionHooks(ne,ee,te,st,ot){const{appear:ct,mode:ut,persisted:dt=!1,onBeforeEnter:ht,onEnter:ft,onAfterEnter:pt,onEnterCancelled:mt,onBeforeLeave:yt,onLeave:vt,onAfterLeave:_t,onLeaveCancelled:bt,onBeforeAppear:xt,onAppear:Mt,onAfterAppear:Ot,onAppearCancelled:kt}=ee,Nt=String(ne.key),Gt=getLeavingNodesForType(te,ne),Bt=(Ht,zt)=>{Ht&&callWithAsyncErrorHandling(Ht,st,9,zt)},Ut=(Ht,zt)=>{const jt=zt[1];Bt(Ht,zt),isArray$1(Ht)?Ht.every(Wt=>Wt.length<=1)&&jt():Ht.length<=1&&jt()},Vt={mode:ut,persisted:dt,beforeEnter(Ht){let zt=ht;if(!te.isMounted)if(ct)zt=xt||ht;else return;Ht[leaveCbKey]&&Ht[leaveCbKey](!0);const jt=Gt[Nt];jt&&isSameVNodeType(ne,jt)&&jt.el[leaveCbKey]&&jt.el[leaveCbKey](),Bt(zt,[Ht])},enter(Ht){if(Gt[Nt]===ne)return;let zt=ft,jt=pt,Wt=mt;if(!te.isMounted)if(ct)zt=Mt||ft,jt=Ot||pt,Wt=kt||mt;else return;let Jt=!1;Ht[enterCbKey$1]=oi=>{Jt||(Jt=!0,oi?Bt(Wt,[Ht]):Bt(jt,[Ht]),Vt.delayedLeave&&Vt.delayedLeave(),Ht[enterCbKey$1]=void 0)};const Qt=Ht[enterCbKey$1].bind(null,!1);zt?Ut(zt,[Ht,Qt]):Qt()},leave(Ht,zt){const jt=String(ne.key);if(Ht[enterCbKey$1]&&Ht[enterCbKey$1](!0),te.isUnmounting)return zt();Bt(yt,[Ht]);let Wt=!1;Ht[leaveCbKey]=Qt=>{Wt||(Wt=!0,zt(),Qt?Bt(bt,[Ht]):Bt(_t,[Ht]),Ht[leaveCbKey]=void 0,Gt[jt]===ne&&delete Gt[jt])};const Jt=Ht[leaveCbKey].bind(null,!1);Gt[jt]=ne,vt?Ut(vt,[Ht,Jt]):Jt()},clone(Ht){const zt=resolveTransitionHooks(Ht,ee,te,st,ot);return ot&&ot(zt),zt}};return Vt}function emptyPlaceholder(ne){if(isKeepAlive(ne))return ne=cloneVNode(ne),ne.children=null,ne}function getInnerChild$1(ne){if(!isKeepAlive(ne))return isTeleport(ne.type)&&ne.children?findNonCommentChild(ne.children):ne;if(ne.component)return ne.component.subTree;const{shapeFlag:ee,children:te}=ne;if(te){if(ee&16)return te[0];if(ee&32&&isFunction$1(te.default))return te.default()}}function setTransitionHooks(ne,ee){if(ne.shapeFlag&6&&ne.component){ne.transition=ee;const te=ne.component.subTree;setTransitionHooks(isTeleport(te.type)&&getInnerChild$1(te)||te,ee)}else ne.shapeFlag&128?(ne.ssContent.transition=ee.clone(ne.ssContent),ne.ssFallback.transition=ee.clone(ne.ssFallback)):ne.transition=ee}function getTransitionRawChildren(ne,ee=!1,te){let st=[],ot=0;for(let ct=0;ct<ne.length;ct++){let ut=ne[ct];const dt=te==null?ut.key:String(te)+String(ut.key!=null?ut.key:ct);ut.type===Fragment?(ut.patchFlag&128&&ot++,st=st.concat(getTransitionRawChildren(ut.children,ee,dt))):(ee||ut.type!==Comment)&&st.push(dt!=null?cloneVNode(ut,{key:dt}):ut)}if(ot>1)for(let ct=0;ct<st.length;ct++)st[ct].patchFlag=-2;return st}function defineComponent(ne,ee){return isFunction$1(ne)?extend$5({name:ne.name},ee,{setup:ne}):ne}function useId(){const ne=getCurrentInstance();return ne?(ne.appContext.config.idPrefix||"v")+"-"+ne.ids[0]+ne.ids[1]++:""}function markAsyncBoundary(ne){ne.ids=[ne.ids[0]+ne.ids[2]+++"-",0,0]}function useTemplateRef(ne){const ee=getCurrentInstance(),te=shallowRef(null);if(ee){const ot=ee.refs===EMPTY_OBJ?ee.refs={}:ee.refs;Object.defineProperty(ot,ne,{enumerable:!0,get:()=>te.value,set:ct=>te.value=ct})}return te}function isTemplateRefKey(ne,ee){let te;return!!((te=Object.getOwnPropertyDescriptor(ne,ee))&&!te.configurable)}const pendingSetRefMap=new WeakMap;function setRef(ne,ee,te,st,ot=!1){if(isArray$1(ne)){ne.forEach((bt,xt)=>setRef(bt,ee&&(isArray$1(ee)?ee[xt]:ee),te,st,ot));return}if(isAsyncWrapper(st)&&!ot){st.shapeFlag&512&&st.type.__asyncResolved&&st.component.subTree.component&&setRef(ne,ee,te,st.component.subTree);return}const ct=st.shapeFlag&4?getComponentPublicInstance(st.component):st.el,ut=ot?null:ct,{i:dt,r:ht}=ne,ft=ee&&ee.r,pt=dt.refs===EMPTY_OBJ?dt.refs={}:dt.refs,mt=dt.setupState,yt=toRaw(mt),vt=mt===EMPTY_OBJ?NO:bt=>isTemplateRefKey(pt,bt)?!1:hasOwn(yt,bt),_t=(bt,xt)=>!(xt&&isTemplateRefKey(pt,xt));if(ft!=null&&ft!==ht){if(invalidatePendingSetRef(ee),isString(ft))pt[ft]=null,vt(ft)&&(mt[ft]=null);else if(isRef(ft)){const bt=ee;_t(ft,bt.k)&&(ft.value=null),bt.k&&(pt[bt.k]=null)}}if(isFunction$1(ht))callWithErrorHandling(ht,dt,12,[ut,pt]);else{const bt=isString(ht),xt=isRef(ht);if(bt||xt){const Mt=()=>{if(ne.f){const Ot=bt?vt(ht)?mt[ht]:pt[ht]:_t()||!ne.k?ht.value:pt[ne.k];if(ot)isArray$1(Ot)&&remove(Ot,ct);else if(isArray$1(Ot))Ot.includes(ct)||Ot.push(ct);else if(bt)pt[ht]=[ct],vt(ht)&&(mt[ht]=pt[ht]);
18else{const kt=[ct];_t(ht,ne.k)&&(ht.value=kt),ne.k&&(pt[ne.k]=kt)}}else bt?(pt[ht]=ut,vt(ht)&&(mt[ht]=ut)):xt&&(_t(ht,ne.k)&&(ht.value=ut),ne.k&&(pt[ne.k]=ut))};if(ut){const Ot=()=>{Mt(),pendingSetRefMap.delete(ne)};Ot.id=-1,pendingSetRefMap.set(ne,Ot),queuePostRenderEffect(Ot,te)}else invalidatePendingSetRef(ne),Mt()}}}function invalidatePendingSetRef(ne){const ee=pendingSetRefMap.get(ne);ee&&(ee.flags|=8,pendingSetRefMap.delete(ne))}let hasLoggedMismatchError=!1;const logMismatchError=()=>{hasLoggedMismatchError||(console.error("Hydration completed but contains mismatches."),hasLoggedMismatchError=!0)},isSVGContainer=ne=>ne.namespaceURI.includes("svg")&&ne.tagName!=="foreignObject",isMathMLContainer=ne=>ne.namespaceURI.includes("MathML"),getContainerType=ne=>{if(ne.nodeType===1){if(isSVGContainer(ne))return"svg";if(isMathMLContainer(ne))return"mathml"}},isComment=ne=>ne.nodeType===8;function createHydrationFunctions(ne){const{mt:ee,p:te,o:{patchProp:st,createText:ot,nextSibling:ct,parentNode:ut,remove:dt,insert:ht,createComment:ft}}=ne,pt=(kt,Nt)=>{if(!Nt.hasChildNodes()){te(null,kt,Nt),flushPostFlushCbs(),Nt._vnode=kt;return}mt(Nt.firstChild,kt,null,null,null),flushPostFlushCbs(),Nt._vnode=kt},mt=(kt,Nt,Gt,Bt,Ut,Vt=!1)=>{Vt=Vt||!!Nt.dynamicChildren;const Ht=isComment(kt)&&kt.data==="[",zt=()=>bt(kt,Nt,Gt,Bt,Ut,Ht),{type:jt,ref:Wt,shapeFlag:Jt,patchFlag:Qt}=Nt;let oi=kt.nodeType;Nt.el=kt,Qt===-2&&(Vt=!1,Nt.dynamicChildren=null);let ai=null;switch(jt){case Text$1:oi!==3?Nt.children===""?(ht(Nt.el=ot(""),ut(kt),kt),ai=kt):ai=zt():(kt.data!==Nt.children&&(logMismatchError(),kt.data=Nt.children),ai=ct(kt));break;case Comment:Ot(kt)?(ai=ct(kt),Mt(Nt.el=kt.content.firstChild,kt,Gt)):oi!==8||Ht?ai=zt():ai=ct(kt);break;case Static:if(Ht&&(kt=ct(kt),oi=kt.nodeType),oi===1||oi===3){ai=kt;const xn=!Nt.children.length;for(let An=0;An<Nt.staticCount;An++)xn&&(Nt.children+=ai.nodeType===1?ai.outerHTML:ai.data),An===Nt.staticCount-1&&(Nt.anchor=ai),ai=ct(ai);return Ht?ct(ai):ai}else zt();break;case Fragment:Ht?ai=_t(kt,Nt,Gt,Bt,Ut,Vt):ai=zt();break;default:if(Jt&1)(oi!==1||Nt.type.toLowerCase()!==kt.tagName.toLowerCase())&&!Ot(kt)?ai=zt():ai=yt(kt,Nt,Gt,Bt,Ut,Vt);else if(Jt&6){Nt.slotScopeIds=Ut;const xn=ut(kt);if(Ht?ai=xt(kt):isComment(kt)&&kt.data==="teleport start"?ai=xt(kt,kt.data,"teleport end"):ai=ct(kt),ee(Nt,xn,null,Gt,Bt,getContainerType(xn),Vt),isAsyncWrapper(Nt)&&!Nt.component.subTree){let An;Ht?(An=createVNode(Static),An.anchor=ai?ai.previousSibling:xn.lastChild):An=kt.nodeType===3?createTextVNode(""):createVNode("div"),An.el=kt,Nt.component.subTree=An}}else Jt&64?oi!==8?ai=zt():ai=Nt.type.hydrate(kt,Nt,Gt,Bt,Ut,Vt,ne,vt):Jt&128&&(ai=Nt.type.hydrate(kt,Nt,Gt,Bt,getContainerType(ut(kt)),Ut,Vt,ne,mt))}return Wt!=null&&setRef(Wt,null,Bt,Nt),ai},yt=(kt,Nt,Gt,Bt,Ut,Vt)=>{Vt=Vt||!!Nt.dynamicChildren;const{type:Ht,dynamicProps:zt,props:jt,patchFlag:Wt,shapeFlag:Jt,dirs:Qt,transition:oi}=Nt,ai=Ht==="input"||Ht==="option",xn=!!zt;if(ai||xn||Wt!==-1){Qt&&invokeDirectiveHook(Nt,null,Gt,"created");let An=!1;if(Ot(kt)){An=needTransition(null,oi)&&Gt&&Gt.vnode.props&&Gt.vnode.props.appear;const Xt=kt.content.firstChild;if(An){const Zt=Xt.getAttribute("class");Zt&&(Xt.$cls=Zt),oi.beforeEnter(Xt)}Mt(Xt,kt,Gt),Nt.el=kt=Xt}if(Jt&16&&!(jt&&(jt.innerHTML||jt.textContent))){let Xt=vt(kt.firstChild,Nt,kt,Gt,Bt,Ut,Vt);for(Xt&&!isMismatchAllowed(kt,1)&&logMismatchError();Xt;){const Zt=Xt;Xt=Xt.nextSibling,dt(Zt)}}else if(Jt&8){let Xt=Nt.children;Xt[0]===`
19`&&(kt.tagName==="PRE"||kt.tagName==="TEXTAREA")&&(Xt=Xt.slice(1));const{textContent:Zt}=kt;Zt!==Xt&&Zt!==Xt.replace(/\r\n|\r/g,`
20`)&&(isMismatchAllowed(kt,0)||logMismatchError(),kt.textContent=Nt.children)}if(jt){if(ai||xn||!Vt||Wt&48){const Xt=kt.tagName.includes("-"),Zt=kt.namespaceURI.includes("svg")?"svg":kt.namespaceURI.includes("MathML")?"mathml":void 0;for(const Kt in jt)if(ai&&(Kt.endsWith("value")||Kt==="indeterminate")||isOn(Kt)&&!isReservedProp(Kt)||Kt[0]==="."||Xt&&!isReservedProp(Kt)||zt&&zt.includes(Kt)){if(isUnchangedResourceProp(kt,Kt,jt[Kt]))continue;st(kt,Kt,null,jt[Kt],Zt,Gt)}}else if(jt.onClick)st(kt,"onClick",null,jt.onClick,void 0,Gt);else if(Wt&4&&isReactive(jt.style))for(const Xt in jt.style)jt.style[Xt]}let Nn;(Nn=jt&&jt.onVnodeBeforeMount)&&invokeVNodeHook(Nn,Gt,Nt),Qt&&invokeDirectiveHook(Nt,null,Gt,"beforeMount"),((Nn=jt&&jt.onVnodeMounted)||Qt||An)&&queueEffectWithSuspense(()=>{Nn&&invokeVNodeHook(Nn,Gt,Nt),An&&oi.enter(kt),Qt&&invokeDirectiveHook(Nt,null,Gt,"mounted")},Bt)}return kt.nextSibling},vt=(kt,Nt,Gt,Bt,Ut,Vt,Ht)=>{Ht=Ht||!!Nt.dynamicChildren;
20const zt=Nt.children,jt=zt.length;let Wt=!1;for(let Jt=0;Jt<jt;Jt++){const Qt=Ht?zt[Jt]:zt[Jt]=normalizeVNode(zt[Jt]),oi=Qt.type===Text$1;kt?(oi&&!Ht&&Jt+1<jt&&normalizeVNode(zt[Jt+1]).type===Text$1&&(ht(ot(kt.data.slice(Qt.children.length)),Gt,ct(kt)),kt.data=Qt.children),kt=mt(kt,Qt,Bt,Ut,Vt,Ht)):oi&&!Qt.children?ht(Qt.el=ot(""),Gt):(Wt||(Wt=!0,isMismatchAllowed(Gt,1)||logMismatchError()),te(null,Qt,Gt,null,Bt,Ut,getContainerType(Gt),Vt))}return kt},_t=(kt,Nt,Gt,Bt,Ut,Vt)=>{const{slotScopeIds:Ht}=Nt;Ht&&(Ut=Ut?Ut.concat(Ht):Ht);const zt=ut(kt),jt=vt(ct(kt),Nt,zt,Gt,Bt,Ut,Vt);return jt&&isComment(jt)&&jt.data==="]"?ct(Nt.anchor=jt):(logMismatchError(),ht(Nt.anchor=ft("]"),zt,jt),jt)},bt=(kt,Nt,Gt,Bt,Ut,Vt)=>{if(isNodeMismatchAllowed(kt,Nt)||logMismatchError(),Nt.el=null,Vt){const jt=xt(kt);for(;;){const Wt=ct(kt);if(Wt&&Wt!==jt)dt(Wt);else break}}const Ht=ct(kt),zt=ut(kt);return dt(kt),te(null,Nt,zt,Ht,Gt,Bt,getContainerType(zt),Ut),Gt&&(Gt.vnode.el=Nt.el,updateHOCHostEl(Gt,Nt.el)),Ht},xt=(kt,Nt="[",Gt="]")=>{let Bt=0;for(;kt;)if(kt=ct(kt),kt&&isComment(kt)&&(kt.data===Nt&&Bt++,kt.data===Gt)){if(Bt===0)return ct(kt);Bt--}return kt},Mt=(kt,Nt,Gt)=>{const Bt=Nt.parentNode;Bt&&Bt.replaceChild(kt,Nt);let Ut=Gt;for(;Ut;)Ut.vnode.el===Nt&&(Ut.vnode.el=Ut.subTree.el=kt),Ut=Ut.parent},Ot=kt=>kt.nodeType===1&&kt.tagName==="TEMPLATE";return[pt,mt]}const resourceProps=new Set(["src","srcset","href","poster"]);function isUnchangedResourceProp(ne,ee,te){return resourceProps.has(ee)?ne.getAttribute(ee)===(te==null?null:`${te}`):!1}const allowMismatchAttr="data-allow-mismatch",MismatchTypeString={0:"text",1:"children",2:"class",3:"style",4:"attribute"};function isMismatchAllowed(ne,ee){if(ee===0||ee===1)for(;ne&&!ne.hasAttribute(allowMismatchAttr);)ne=ne.parentElement;return isMismatchAllowedByAttr(ne&&ne.getAttribute(allowMismatchAttr),ee)}function isMismatchAllowedByAttr(ne,ee){if(ne==null)return!1;if(ne==="")return!0;{const te=ne.split(",");return ee===0&&te.includes("children")?!0:te.includes(MismatchTypeString[ee])}}function isNodeMismatchAllowed(ne,ee){return isMismatchAllowed(ne.parentElement,1)||isMismatchAllowedByNode(ne)||isMismatchAllowedByVNode(ee)}function isMismatchAllowedByNode(ne){return ne.nodeType===1&&isMismatchAllowedByAttr(ne.getAttribute(allowMismatchAttr),1)}function isMismatchAllowedByVNode({props:ne}){const ee=ne&&ne[allowMismatchAttr];return typeof ee=="string"&&isMismatchAllowedByAttr(ee,1)}const requestIdleCallback$1=getGlobalThis().requestIdleCallback||(ne=>setTimeout(ne,1)),cancelIdleCallback=getGlobalThis().cancelIdleCallback||(ne=>clearTimeout(ne)),hydrateOnIdle=(ne=1e4)=>ee=>{const te=requestIdleCallback$1(ee,{timeout:ne});return()=>cancelIdleCallback(te)};function elementIsVisibleInViewport(ne){const{top:ee,left:te,bottom:st,right:ot}=ne.getBoundingClientRect(),{innerHeight:ct,innerWidth:ut}=window;return(ee>0&&ee<ct||st>0&&st<ct)&&(te>0&&te<ut||ot>0&&ot<ut)}const hydrateOnVisible=ne=>(ee,te)=>{const st=new IntersectionObserver(ot=>{for(const ct of ot)if(ct.isIntersecting){st.disconnect(),ee();break}},ne);return te(ot=>{if(ot instanceof Element){if(elementIsVisibleInViewport(ot))return ee(),st.disconnect(),!1;st.observe(ot)}}),()=>st.disconnect()},hydrateOnMediaQuery=ne=>ee=>{if(ne){const te=matchMedia(ne);if(te.matches)ee();else return te.addEventListener("change",ee,{once:!0}),()=>te.removeEventListener("change",ee)}},hydrateOnInteraction=(ne=[])=>(ee,te)=>{isString(ne)&&(ne=[ne]);let st=!1;const ot=ut=>{st||(st=!0,ct(),ee(),ut.target.dispatchEvent(new ut.constructor(ut.type,ut)))},ct=()=>{te(ut=>{for(const dt of ne)ut.removeEventListener(dt,ot)})};return te(ut=>{for(const dt of ne)ut.addEventListener(dt,ot,{once:!0})}),ct};function forEachElement(ne,ee){if(isComment(ne)&&ne.data==="["){let te=1,st=ne.nextSibling;for(;st;){if(st.nodeType===1){if(ee(st)===!1)break}else if(isComment(st))if(st.data==="]"){if(--te===0)break}else st.data==="["&&te++;st=st.nextSibling}}else ee(ne)}const isAsyncWrapper=ne=>!!ne.type.__asyncLoader;function defineAsyncComponent(ne){isFunction$1(ne)&&(ne={loader:ne});const{loader:ee,loadingComponent:te,errorComponent:st,delay:ot=200,hydrate:ct,timeout:ut,suspensible:dt=!0,onError:ht}=ne;let ft=null,pt,mt=0;const yt=()=>(mt++,ft=null,vt()),vt=()=>{let _t;return ft||(_t=ft=ee().catch(bt=>{if(bt=bt instanceof Error?bt:new Error(String(bt)),ht)return new Promise((xt,Mt)=>{ht(bt,()=>xt(yt()),()=>Mt(bt),mt+1)});throw bt}).then(bt=>_t!==ft&&ft?ft:(bt&&(bt.__esModule||bt[Symbol.toStringTag]==="Module")&&(bt=bt.default),pt=bt,bt)))};return defineComponent({name:"AsyncComponentWrapper",__asyncLoader:vt,__asyncHydrate(_t,bt,xt){const Mt=_t.isConnected;let Ot=!1;(bt.bu||(bt.bu=[])).push(()=>Ot=!0);const kt=()=>{Ot||!_t.parentNode||Mt&&!_t.isConnected||xt()},Nt=ct?()=>{const Gt=ct(kt,Bt=>forEachElement(_t,Bt));Gt&&(bt.bum||(bt.bum=[])).push(Gt)}:kt;pt?Nt():vt().then(()=>!bt.isUnmounted&&Nt())},get __asyncResolved(){return pt},setup(){const _t=currentInstance;if(markAsyncBoundary(_t),pt)return()=>createInnerComp(pt,_t);const bt=Gt=>{ft=null,handleError(Gt,_t,13,!st)};if(dt&&_t.suspense||isInSSRComponentSetup)return vt().then(Gt=>()=>createInnerComp(Gt,_t)).catch(Gt=>(bt(Gt),()=>st?createVNode(st,{error:Gt}):null));const xt=ref$1(!1),Mt=ref$1(),Ot=ref$1(!!ot);let kt,Nt;return onUnmounted(()=>{kt!=null&&clearTimeout(kt),Nt!=null&&clearTimeout(Nt)}),ot&&(Nt=setTimeout(()=>{_t.isUnmounted||(Ot.value=!1)},ot)),ut!=null&&(kt=setTimeout(()=>{if(!_t.isUnmounted&&!xt.value&&!Mt.value){const Gt=new Error(`Async component timed out after ${ut}ms.`);bt(Gt),Mt.value=Gt}},ut)),vt().then(()=>{_t.isUnmounted||(xt.value=!0,_t.parent&&isKeepAlive(_t.parent.vnode)&&_t.parent.update(
vendor: 6,610 bytes, line 20
20))}).catch(Gt=>{if(_t.isUnmounted){ft=null;return}bt(Gt),Mt.value=Gt}),()=>{if(xt.value&&pt)return createInnerComp(pt,_t);if(Mt.value&&st)return createVNode(st,{error:Mt.value});if(te&&!Ot.value)return createInnerComp(te,_t)}}})}function createInnerComp(ne,ee){const{ref:te,props:st,children:ot,ce:ct}=ee.vnode,ut=createVNode(ne,st,ot);return ut.ref=te,ut.ce=ct,delete ee.vnode.ce,ut}const isKeepAlive=ne=>ne.type.__isKeepAlive,KeepAliveImpl={name:"KeepAlive",__isKeepAlive:!0,props:{include:[String,RegExp,Array],exclude:[String,RegExp,Array],max:[String,Number]},setup(ne,{slots:ee}){const te=getCurrentInstance(),st=te.ctx;if(!st.renderer)return()=>{const Ot=ee.default&&ee.default();return Ot&&Ot.length===1?Ot[0]:Ot};const ot=new Map,ct=new Set;let ut=null;const dt=te.suspense,{renderer:{p:ht,m:ft,um:pt,o:{createElement:mt}}}=st,yt=mt("div");st.activate=(Ot,kt,Nt,Gt,Bt)=>{const Ut=Ot.component;ft(Ot,kt,Nt,0,dt),ht(Ut.vnode,Ot,kt,Nt,Ut,dt,Gt,Ot.slotScopeIds,Bt),queuePostRenderEffect(()=>{Ut.isDeactivated=!1,Ut.a&&invokeArrayFns(Ut.a);const Vt=Ot.props&&Ot.props.onVnodeMounted;Vt&&invokeVNodeHook(Vt,Ut.parent,Ot)},dt)},st.deactivate=Ot=>{const kt=Ot.component;invalidateMount(kt.m),invalidateMount(kt.a),ft(Ot,yt,null,1,dt),queuePostRenderEffect(()=>{kt.da&&invokeArrayFns(kt.da);const Nt=Ot.props&&Ot.props.onVnodeUnmounted;Nt&&invokeVNodeHook(Nt,kt.parent,Ot),kt.isDeactivated=!0},dt)};function vt(Ot){resetShapeFlag(Ot),pt(Ot,te,dt,!0)}function _t(Ot){ot.forEach((kt,Nt)=>{const Gt=getComponentName(isAsyncWrapper(kt)?kt.type.__asyncResolved||{}:kt.type);Gt&&!Ot(Gt)&&bt(Nt)})}function bt(Ot){const kt=ot.get(Ot);kt&&(!ut||!isSameVNodeType(kt,ut))?vt(kt):ut&&resetShapeFlag(ut),ot.delete(Ot),ct.delete(Ot)}watch(()=>[ne.include,ne.exclude],([Ot,kt])=>{Ot&&_t(Nt=>matches$1(Ot,Nt)),kt&&_t(Nt=>!matches$1(kt,Nt))},{flush:"post",deep:!0});let xt=null;const Mt=()=>{xt!=null&&(isSuspense(te.subTree.type)?queuePostRenderEffect(()=>{const Ot=getInnerChild(te.subTree);Ot.component&&ot.set(xt,Ot)},te.subTree.suspense):ot.set(xt,getInnerChild(te.subTree)))};return onMounted(Mt),onUpdated(Mt),onBeforeUnmount(()=>{ot.forEach(Ot=>{const{subTree:kt,suspense:Nt}=te,Gt=getInnerChild(kt);if(Ot.type===Gt.type&&Ot.key===Gt.key){resetShapeFlag(Gt);const Bt=Gt.component.da;Bt&&queuePostRenderEffect(Bt,Nt);return}vt(Ot)})}),()=>{if(xt=null,!ee.default)return ut=null;const Ot=ee.default(),kt=Ot[0];if(Ot.length>1)return ut=null,Ot;if(!isVNode(kt)||!(kt.shapeFlag&4)&&!(kt.shapeFlag&128))return ut=null,kt;let Nt=getInnerChild(kt);if(Nt.type===Comment)return ut=null,Nt;const Gt=Nt.type,Bt=getComponentName(isAsyncWrapper(Nt)?Nt.type.__asyncResolved||{}:Gt),{include:Ut,exclude:Vt,max:Ht}=ne;if(Ut&&(!Bt||!matches$1(Ut,Bt))||Vt&&Bt&&matches$1(Vt,Bt))return Nt.shapeFlag&=-257,ut=Nt,kt;const zt=Nt.key==null?Gt:Nt.key,jt=ot.get(zt);return Nt.el&&(Nt=cloneVNode(Nt),kt.shapeFlag&128&&(kt.ssContent=Nt)),xt=zt,jt?(Nt.el=jt.el,Nt.component=jt.component,Nt.transition&&setTransitionHooks(Nt,Nt.transition),Nt.shapeFlag|=512,ct.delete(zt),ct.add(zt)):(ct.add(zt),Ht&&ct.size>parseInt(Ht,10)&&bt(ct.values().next().value)),Nt.shapeFlag|=256,ut=Nt,isSuspense(kt.type)?kt:Nt}}},KeepAlive=KeepAliveImpl;function matches$1(ne,ee){return isArray$1(ne)?ne.some(te=>matches$1(te,ee)):isString(ne)?ne.split(",").includes(ee):isRegExp(ne)?(ne.lastIndex=0,ne.test(ee)):!1}function onActivated(ne,ee){registerKeepAliveHook(ne,"a",ee)}function onDeactivated(ne,ee){registerKeepAliveHook(ne,"da",ee)}function registerKeepAliveHook(ne,ee,te=currentInstance){const st=ne.__wdc||(ne.__wdc=()=>{let ot=te;for(;ot;){if(ot.isDeactivated)return;ot=ot.parent}return ne()});if(injectHook(ee,st,te),te){let ot=te.parent;for(;ot&&ot.parent;)isKeepAlive(ot.parent.vnode)&&injectToKeepAliveRoot(st,ee,te,ot),ot=ot.parent}}function injectToKeepAliveRoot(ne,ee,te,st){const ot=injectHook(ee,ne,st,!0);onUnmounted(()=>{remove(st[ee],ot)},te)}function resetShapeFlag(ne){ne.shapeFlag&=-257,ne.shapeFlag&=-513}function getInnerChild(ne){return ne.shapeFlag&128?ne.ssContent:ne}function injectHook(ne,ee,te=currentInstance,st=!1){if(te){const ot=te[ne]||(te[ne]=[]),ct=ee.__weh||(ee.__weh=(...ut)=>{pauseTracking();const dt=setCurrentInstance(te),ht=callWithAsyncErrorHandling(ee,te,ne,ut);return dt(),resetTracking(),ht});return st?ot.unshift(ct):ot.push(ct),ct}}const createHook=ne=>(ee,te=currentInstance)=>{(!isInSSRComponentSetup||ne==="sp")&&injectHook(ne,(...st)=>ee(...st),te)},onBeforeMount=createHook("bm"),onMounted=createHook("m"),onBeforeUpdate=createHook("bu"),onUpdated=createHook("u"),onBeforeUnmount=createHook("bum"),onUnmounted=createHook("um"),onServerPrefetch=createHook("sp"),onRenderTriggered=createHook("rtg"),onRenderTracked=createHook("rtc");function onErrorCaptured(ne,ee=currentInstance){injectHook("ec",ne,ee)}const COMPONENTS="components",DIRECTIVES="directives";function resolveComponent(ne,ee){return resolveAsset(COMPONENTS,ne,!0,ee)||ne}const NULL_DYNAMIC_COMPONENT=Symbol.for("v-ndc");function resolveDynamicComponent(ne){return isString(ne)?resolveAsset(COMPONENTS,ne,!1)||ne:ne||NULL_DYNAMIC_COMPONENT}function resolveDirective(ne){return resolveAsset(DIRECTIVES,ne)}function resolveAsset(ne,ee,te=!0,st=!1){const ot=currentRenderingInstance||currentInstance;if(ot){const ct=ot.type;if(ne===COMPONENTS){const dt=getComponentName(ct,!1);if(dt&&(dt===ee||dt===camelize(ee)||dt===capitalize(camelize(ee))))return ct}const ut=resolve$1(ot[ne]||ct[ne],ee)||resolve$1(ot.appContext[ne],ee);return!ut&&st?ct:ut}}function resolve$1(ne,ee){return ne&&(ne[ee]||ne[camelize(ee)]||ne[capitalize(camelize(ee))])}function renderList(ne,ee,te,st){let ot;const ct=te&&te[st],ut=isArray$1(ne);if(ut||isString(ne)){const dt=ut&&isReactive(ne);let ht=!1,ft=!1;dt&&(ht=!isShallow(ne),ft=isReadonly(ne),ne=shallowReadArray(ne)),ot=new Array(ne.length);for(let pt=0,mt=ne.length;pt<mt;pt++)ot[pt]=ee(ht?ft?toReadonly(toReactive(ne[pt])):toReactive(ne[pt]):ne[pt],pt,void 0,ct&&ct[pt])}else if(typeof ne=="number"){ot=new Array(ne);for(let dt=0;dt<ne;dt++)ot[dt]=ee(dt+1,dt,void 0,ct&&ct[dt])}else if(isObject$2(ne))if(ne[Symbol.iterator])ot=Array.from(ne,(dt,ht)=>ee(dt,ht,void 0,ct&&ct[ht]));else{const dt=Object.keys(ne);ot=new Array(dt.length);for(let ht=0,ft=dt.length;ht<ft;ht++){const pt=dt[ht];ot[ht]=ee(ne[pt],pt,ht,ct&&ct[ht])}}else ot=[];return te&&(te[st]=ot),ot}function createSlots(ne,ee){for(let te=0;te<ee.length;te++){const st=ee[te];if(isArray$1(st))for(let ot=0;ot<st.length;ot++)ne[st[ot].name]=st[ot].fn;else st&&(ne[st.name]=st.key?(...ot)=>{const ct=st.fn(...ot);return ct&&(ct.key=st.key),ct}:st.fn)}return ne}
20function renderSlot(ne,ee,te,st,ot,ct){if(te==null&&(te={}),currentRenderingInstance.ce||currentRenderingInstance.parent&&isAsyncWrapper(currentRenderingInstance.parent)&&currentRenderingInstance.parent.ce){const ft=ct!=null&&te.key==null?extend$5({},te,{key:ct}):te,pt=Object.keys(ft).length>0;return ee!=="default"&&(ft.name=ee),openBlock(),createBlock(Fragment,null,[createVNode("slot",ft,st&&st())],pt?-2:64)}let ut=ne[ee];ut&&ut._c&&(ut._d=!1);const dt=blockStack.length;openBlock();let ht;try{const ft=ut&&ensureValidVNode(ut(te)),pt=te.key||ct||ft&&ft.key;ht=createBlock(Fragment,{key:(pt&&!isSymbol(pt)?pt:`_${ee}`)+(!ft&&st?"_fb":"")},ft||(st?st():[]),ft&&ne._===1?64:-2)}catch(ft){for(let pt=blockStack.length;pt>dt;pt--)closeBlock();throw ft}finally{ut&&ut._c&&(ut._d=!0)}return!ot&&ht.scopeId&&(ht.slotScopeIds=[ht.scopeId+"-s"]),ht}function ensureValidVNode(ne){return ne.some(ee=>isVNode(ee)?!(ee.type===Comment||ee.type===Fragment&&!ensureValidVNode(ee.children)):!0)?ne:null}function toHandlers(ne,ee){const te={};for(const st in ne)te[ee&&/[A-Z]/.test(st)?`on:${st}`:toHandlerKey(st)]=ne[st];return te}const getPublicInstance=ne=>ne?isStatefulComponent(ne)?getComponentPublicInstance(ne):getPublicInstance(ne.parent):null,publicPropertiesMap=extend$5(Object.create(null),{$:ne=>ne,$el:ne=>ne.vnode.el,$data:ne=>ne.data,$props:ne=>ne.props,$attrs:ne=>ne.attrs,$slots:ne=>ne.slots,$refs:ne=>ne.refs,$parent:ne=>getPublicInstance(ne.parent),$root:ne=>getPublicInstance(ne.root),$host:ne=>ne.ce,$emit:ne=>ne.emit,$options:ne=>resolveMergedOptions(ne),$forceUpdate:ne=>ne.f||(ne.f=()=>{queueJob(ne.update)}),$nextTick:ne=>ne.n||(ne.n=nextTick.bind(ne.proxy)),$watch:ne=>instanceWatch.bind(ne)}),hasSetupBinding=(ne,ee)=>ne!==EMPTY_OBJ&&!ne.__isScriptSetup&&hasOwn(ne,ee),PublicInstanceProxyHandlers={get({_:ne},ee){if(ee==="__v_skip")return!0;const{ctx:te,setupState:st,data:ot,props:ct,accessCache:ut,type:dt,appContext:ht}=ne;if(ee[0]!=="$"){const yt=ut[ee];if(yt!==void 0)switch(yt){case 1:return st[ee];case 2:return ot[ee];case 4:return te[ee];case 3:return ct[ee]}else{if(hasSetupBinding(st,ee))return ut[ee]=1,st[ee];if(ot!==EMPTY_OBJ&&hasOwn(ot,ee))return ut[ee]=2,ot[ee];if(hasOwn(ct,ee))return ut[ee]=3,ct[ee];if(te!==EMPTY_OBJ&&hasOwn(te,ee))return ut[ee]=4,te[ee];shouldCacheAccess&&(ut[ee]=0)}}const ft=publicPropertiesMap[ee];let pt,mt;if(ft)return ee==="$attrs"&&track(ne.attrs,"get",""),ft(ne);if((pt=dt.__cssModules)&&(pt=pt[ee]))return pt;if(te!==EMPTY_OBJ&&hasOwn(te,ee))return ut[ee]=4,te[ee];if(mt=ht.config.globalProperties,hasOwn(mt,ee))return mt[ee]},set({_:ne},ee,te){const{data:st,setupState:ot,ctx:ct}=ne;return hasSetupBinding(ot,ee)?(ot[ee]=te,!0):st!==EMPTY_OBJ&&hasOwn(st,ee)?(st[ee]=te,!0):hasOwn(ne.props,ee)||ee[0]==="$"&&ee.slice(1)in ne?!1:(ct[ee]=te,!0)},has({_:{data:ne,setupState:ee,accessCache:te,ctx:st,appContext:ot,props:ct,type:ut}},dt){let ht;return!!(te[dt]||ne!==EMPTY_OBJ&&dt[0]!=="$"&&hasOwn(ne,dt)||hasSetupBinding(ee,dt)||hasOwn(ct,dt)||hasOwn(st,dt)||hasOwn(publicPropertiesMap,dt)||hasOwn(ot.config.globalProperties,dt)||(ht=ut.__cssModules)&&ht[dt])},defineProperty(ne,ee,te){return te.get!=null?ne._.accessCache[ee]=0:hasOwn(te,"value")&&this.set(ne,ee,te.value,null),Reflect.defineProperty(ne,ee,te)}},RuntimeCompiledPublicInstanceProxyHandlers=extend$5({},PublicInstanceProxyHandlers,{get(ne,ee){if(ee!==Symbol.unscopables)return PublicInstanceProxyHandlers.get(ne,ee,ne)},has(ne,ee){return ee[0]!=="_"&&!isGloballyAllowed(ee)}});function defineProps(){return null}function defineEmits(){return null}function defineExpose(ne){}function defineOptions(ne){}function defineSlots(){return null}function defineModel(){}function withDefaults(ne,ee){return null}function useSlots(){return getContext().slots}function useAttrs(){return getContext().attrs}function getContext(ne){const ee=getCurrentInstance();return ee.setupContext||(ee.setupContext=createSetupContext(ee))}function normalizePropsOrEmits(ne){return isArray$1(ne)?ne.reduce((ee,te)=>(ee[te]=null,ee),{}):ne}function mergeDefaults(ne,ee){const te=normalizePropsOrEmits(ne);for(const st in ee){if(st.startsWith("__skip"))continue;let ot=te[st];ot?isArray$1(ot)||isFunction$1(ot)?ot=te[st]={type:ot,default:ee[st]}:ot.default=ee[st]:ot===null&&(ot=te[st]={default:ee[st]}),ot&&ee[`__skip_${st}`]&&(ot.skipFactory=!0)}return te}function mergeModels(ne,ee){return!ne||!ee?ne||ee:isArray$1(ne)&&isArray$1(ee)?ne.concat(ee):extend$5({},normalizePropsOrEmits(ne),normalizePropsOrEmits(ee))}function createPropsRestProxy(ne,ee){const te={};for(const st in ne)ee.includes(st)||Object.defineProperty(te,st,{enumerable:!0,get:()=>ne[st]});return te}function withAsyncContext(ne){const ee=getCurrentInstance(),te=isInSSRComponentSetup;let st=ne();unsetCurrentInstance(),te&&setInSSRSetupState(!1);const ot=()=>{setCurrentInstance(ee),te&&setInSSRSetupState(!0)},ct=()=>{getCurrentInstance()!==ee&&ee.scope.off(),unsetCurrentInstance(),te&&setInSSRSetupState(!1)};return isPromise(st)&&(st=st.catch(ut=>{throw ot(),Promise.resolve().then(()=>Promise.resolve().then(ct)),ut})),[st,()=>{ot(),Promise.resolve().then(ct)}]}let shouldCacheAccess=!0;function applyOptions(ne){const ee=resolveMergedOptions(ne),te=ne.proxy,st=ne.ctx;shouldCacheAccess=!1,ee.beforeCreate&&callHook$1(ee.beforeCreate,ne,"bc");const{data:ot,computed:ct,methods:ut,watch:dt,provide:ht,inject:ft,created:pt,beforeMount:mt,mounted:yt,beforeUpdate:vt,updated:_t,activated:bt,deactivated:xt,beforeDestroy:Mt,beforeUnmount:Ot,destroyed:kt,unmounted:Nt,render:Gt,renderTracked:Bt,renderTriggered:Ut,errorCaptured:Vt,serverPrefetch:Ht,expose:zt,inheritAttrs:jt,components:Wt,directives:Jt,filters:Qt}=ee;if(ft&&resolveInjections(ft,st,null),ut)for(const xn in ut){const An=ut[xn];isFunction$1(An)&&(st[xn]=An.bind(te))}if(ot){const xn=ot.call(te,te);isObject$2(xn)&&(ne.data=reactive(xn))}if(shouldCacheAccess=!0,ct)for(const xn in ct){const An=ct[xn],Nn=isFunction$1(An)?An.bind(te,te):isFunction$1(An.get)?An.get.bind(te,te):NOOP,Xt=!isFunction$1(An)&&isFunction$1(An.set)?An.set.bind(te):NOOP,Zt=computed({get:Nn,set:Xt});Object.defineProperty(st,xn,{enumerable:!0,configurable:!0,get:()=>Zt.value,set:Kt=>Zt.value=Kt})}if(dt)for(const xn in dt)createWatcher(dt[xn],st,te,xn);if(ht){const xn=isFunction$1(ht)?ht.call(te):ht;
vendor: 29,456 bytes, line 20
20Reflect.ownKeys(xn).forEach(An=>{provide(An,xn[An])})}pt&&callHook$1(pt,ne,"c");function ai(xn,An){isArray$1(An)?An.forEach(Nn=>xn(Nn.bind(te))):An&&xn(An.bind(te))}if(ai(onBeforeMount,mt),ai(onMounted,yt),ai(onBeforeUpdate,vt),ai(onUpdated,_t),ai(onActivated,bt),ai(onDeactivated,xt),ai(onErrorCaptured,Vt),ai(onRenderTracked,Bt),ai(onRenderTriggered,Ut),ai(onBeforeUnmount,Ot),ai(onUnmounted,Nt),ai(onServerPrefetch,Ht),isArray$1(zt))if(zt.length){const xn=ne.exposed||(ne.exposed={});zt.forEach(An=>{Object.defineProperty(xn,An,{get:()=>te[An],set:Nn=>te[An]=Nn,enumerable:!0})})}else ne.exposed||(ne.exposed={});Gt&&ne.render===NOOP&&(ne.render=Gt),jt!=null&&(ne.inheritAttrs=jt),Wt&&(ne.components=Wt),Jt&&(ne.directives=Jt),Ht&&markAsyncBoundary(ne)}function resolveInjections(ne,ee,te=NOOP){isArray$1(ne)&&(ne=normalizeInject(ne));for(const st in ne){const ot=ne[st];let ct;isObject$2(ot)?"default"in ot?ct=inject(ot.from||st,ot.default,!0):ct=inject(ot.from||st):ct=inject(ot),isRef(ct)?Object.defineProperty(ee,st,{enumerable:!0,configurable:!0,get:()=>ct.value,set:ut=>ct.value=ut}):ee[st]=ct}}function callHook$1(ne,ee,te){callWithAsyncErrorHandling(isArray$1(ne)?ne.map(st=>st.bind(ee.proxy)):ne.bind(ee.proxy),ee,te)}function createWatcher(ne,ee,te,st){let ot=st.includes(".")?createPathGetter(te,st):()=>te[st];if(isString(ne)){const ct=ee[ne];isFunction$1(ct)&&watch(ot,ct)}else if(isFunction$1(ne))watch(ot,ne.bind(te));else if(isObject$2(ne))if(isArray$1(ne))ne.forEach(ct=>createWatcher(ct,ee,te,st));else{const ct=isFunction$1(ne.handler)?ne.handler.bind(te):ee[ne.handler];isFunction$1(ct)&&watch(ot,ct,ne)}}function resolveMergedOptions(ne){const ee=ne.type,{mixins:te,extends:st}=ee,{mixins:ot,optionsCache:ct,config:{optionMergeStrategies:ut}}=ne.appContext,dt=ct.get(ee);let ht;return dt?ht=dt:!ot.length&&!te&&!st?ht=ee:(ht={},ot.length&&ot.forEach(ft=>mergeOptions$1(ht,ft,ut,!0)),mergeOptions$1(ht,ee,ut)),isObject$2(ee)&&ct.set(ee,ht),ht}function mergeOptions$1(ne,ee,te,st=!1){const{mixins:ot,extends:ct}=ee;ct&&mergeOptions$1(ne,ct,te,!0),ot&&ot.forEach(ut=>mergeOptions$1(ne,ut,te,!0));for(const ut in ee)if(!(st&&ut==="expose")){const dt=internalOptionMergeStrats[ut]||te&&te[ut];ne[ut]=dt?dt(ne[ut],ee[ut]):ee[ut]}return ne}const internalOptionMergeStrats={data:mergeDataFn,props:mergeEmitsOrPropsOptions,emits:mergeEmitsOrPropsOptions,methods:mergeObjectOptions,computed:mergeObjectOptions,beforeCreate:mergeAsArray$1,created:mergeAsArray$1,beforeMount:mergeAsArray$1,mounted:mergeAsArray$1,beforeUpdate:mergeAsArray$1,updated:mergeAsArray$1,beforeDestroy:mergeAsArray$1,beforeUnmount:mergeAsArray$1,destroyed:mergeAsArray$1,unmounted:mergeAsArray$1,activated:mergeAsArray$1,deactivated:mergeAsArray$1,errorCaptured:mergeAsArray$1,serverPrefetch:mergeAsArray$1,components:mergeObjectOptions,directives:mergeObjectOptions,watch:mergeWatchOptions,provide:mergeDataFn,inject:mergeInject};function mergeDataFn(ne,ee){return ee?ne?function(){return extend$5(isFunction$1(ne)?ne.call(this,this):ne,isFunction$1(ee)?ee.call(this,this):ee)}:ee:ne}function mergeInject(ne,ee){return mergeObjectOptions(normalizeInject(ne),normalizeInject(ee))}function normalizeInject(ne){if(isArray$1(ne)){const ee={};for(let te=0;te<ne.length;te++)ee[ne[te]]=ne[te];return ee}return ne}function mergeAsArray$1(ne,ee){return ne?[...new Set([].concat(ne,ee))]:ee}function mergeObjectOptions(ne,ee){return ne?extend$5(Object.create(null),ne,ee):ee}function mergeEmitsOrPropsOptions(ne,ee){return ne?isArray$1(ne)&&isArray$1(ee)?[...new Set([...ne,...ee])]:extend$5(Object.create(null),normalizePropsOrEmits(ne),normalizePropsOrEmits(ee??{})):ee}function mergeWatchOptions(ne,ee){if(!ne)return ee;if(!ee)return ne;const te=extend$5(Object.create(null),ne);for(const st in ee)te[st]=mergeAsArray$1(ne[st],ee[st]);return te}function createAppContext(){return{app:null,config:{isNativeTag:NO,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}let uid$1=0;function createAppAPI(ne,ee){return function(st,ot=null){isFunction$1(st)||(st=extend$5({},st)),ot!=null&&!isObject$2(ot)&&(ot=null);const ct=createAppContext(),ut=new WeakSet,dt=[];let ht=!1;const ft=ct.app={_uid:uid$1++,_component:st,_props:ot,_container:null,_context:ct,_instance:null,version:version$3,get config(){return ct.config},set config(pt){},use(pt,...mt){return ut.has(pt)||(pt&&isFunction$1(pt.install)?(ut.add(pt),pt.install(ft,...mt)):isFunction$1(pt)&&(ut.add(pt),pt(ft,...mt))),ft},mixin(pt){return ct.mixins.includes(pt)||ct.mixins.push(pt),ft},component(pt,mt){return mt?(ct.components[pt]=mt,ft):ct.components[pt]},directive(pt,mt){return mt?(ct.directives[pt]=mt,ft):ct.directives[pt]},mount(pt,mt,yt){if(!ht){const vt=ft._ceVNode||createVNode(st,ot);return vt.appContext=ct,yt===!0?yt="svg":yt===!1&&(yt=void 0),mt&&ee?ee(vt,pt):ne(vt,pt,yt),ht=!0,ft._container=pt,pt.__vue_app__=ft,getComponentPublicInstance(vt.component)}},onUnmount(pt){dt.push(pt)},unmount(){ht&&(callWithAsyncErrorHandling(dt,ft._instance,16),ne(null,ft._container),delete ft._container.__vue_app__)},provide(pt,mt){return ct.provides[pt]=mt,ft},runWithContext(pt){const mt=currentApp;currentApp=ft;try{return pt()}finally{currentApp=mt}}};return ft}}let currentApp=null;function useModel(ne,ee,te=EMPTY_OBJ){const st=getCurrentInstance(),ot=camelize(ee),ct=hyphenate(ee),ut=getModelModifiers(ne,ot),dt=customRef((ht,ft)=>{let pt,mt=EMPTY_OBJ,yt;return watchSyncEffect(()=>{const vt=ne[ot];hasChanged(pt,vt)&&(pt=vt,ft())}),{get(){return ht(),te.get?te.get(pt):pt},set(vt){const _t=te.set?te.set(vt):vt;if(!hasChanged(_t,pt)&&!(mt!==EMPTY_OBJ&&hasChanged(vt,mt)))return;const bt=st.vnode.props,xt=!!(bt&&(ee in bt||ot in bt||ct in bt)&&(`onUpdate:${ee}`in bt||`onUpdate:${ot}`in bt||`onUpdate:${ct}`in bt));xt||(pt=vt,ft()),st.emit(`update:${ee}`,_t),hasChanged(vt,mt)&&(hasChanged(vt,_t)&&!hasChanged(_t,yt)||xt&&mt!==EMPTY_OBJ&&!hasChanged(_t,pt))&&ft(),mt=vt,yt=_t}}});return dt[Symbol.iterator]=()=>{let ht=0;return{next(){return ht<2?{value:ht++?ut||EMPTY_OBJ:dt,done:!1}:{done:!0}}}},dt}const getModelModifiers=(ne,ee)=>ee==="modelValue"||ee==="model-value"?ne.modelModifiers:ne[`${ee}Modifiers`]||ne[`${camelize(ee)}Modifiers`]||ne[`${hyphenate(ee)}Modifiers`];function emit(ne,ee,...te){if(ne.isUnmounted)return;const st=ne.vnode.props||EMPTY_OBJ;let ot=te;const ct=ee.startsWith("update:"),ut=ct&&getModelModifiers(st,ee.slice(7));ut&&(ut.trim&&(ot=te.map(pt=>isString(pt)?pt.trim():pt)),ut.number&&(ot=ot.map(looseToNumber)));let dt,ht=st[dt=toHandlerKey(ee)]||st[dt=toHandlerKey(camelize(ee))];!ht&&ct&&(ht=st[dt=toHandlerKey(hyphenate(ee))]),ht&&callWithAsyncErrorHandling(ht,ne,6,ot);const ft=st[dt+"Once"];if(ft){if(!ne.emitted)ne.emitted={};else if(ne.emitted[dt])return;ne.emitted[dt]=!0,callWithAsyncErrorHandling(ft,ne,6,ot)}}const mixinEmitsCache=new WeakMap;function normalizeEmitsOptions(ne,ee,te=!1){const st=te?mixinEmitsCache:ee.emitsCache,ot=st.get(ne);if(ot!==void 0)return ot;const ct=ne.emits;let ut={},dt=!1;if(!isFunction$1(ne)){const ht=ft=>{const pt=normalizeEmitsOptions(ft,ee,!0);pt&&(dt=!0,extend$5(ut,pt))};!te&&ee.mixins.length&&ee.mixins.forEach(ht),ne.extends&&ht(ne.extends),ne.mixins&&ne.mixins.forEach(ht)}return!ct&&!dt?(isObject$2(ne)&&st.set(ne,null),null):(isArray$1(ct)?ct.forEach(ht=>ut[ht]=null):extend$5(ut,ct),isObject$2(ne)&&st.set(ne,ut),ut)}function isEmitListener(ne,ee){return!ne||!isOn(ee)?!1:(ee=ee.slice(2),ee=ee==="Once"?ee:ee.replace(/Once$/,""),hasOwn(ne,ee[0].toLowerCase()+ee.slice(1))||hasOwn(ne,hyphenate(ee))||hasOwn(ne,ee))}function markAttrsAccessed(){}function renderComponentRoot(ne){const{type:ee,vnode:te,proxy:st,withProxy:ot,propsOptions:[ct],slots:ut,attrs:dt,emit:ht,render:ft,renderCache:pt,props:mt,data:yt,setupState:vt,ctx:_t,inheritAttrs:bt}=ne,xt=setCurrentRenderingInstance(ne);let Mt,Ot;try{if(te.shapeFlag&4){const Nt=ot||st,Gt=Nt;Mt=normalizeVNode(ft.call(Gt,Nt,pt,mt,vt,yt,_t)),Ot=dt}else{const Nt=ee;Mt=normalizeVNode(Nt.length>1?Nt(mt,{attrs:dt,slots:ut,emit:ht}):Nt(mt,null)),Ot=ee.props?dt:getFunctionalFallthrough(dt)}}catch(Nt){blockStack.length=0,handleError(Nt,ne,1),Mt=createVNode(Comment)}let kt=Mt;if(Ot&&bt!==!1){const Nt=Object.keys(Ot),{shapeFlag:Gt}=kt;Nt.length&&Gt&7&&(ct&&Nt.some(isModelListener)&&(Ot=filterModelListeners(Ot,ct)),kt=cloneVNode(kt,Ot,!1,!0))}if(te.dirs&&(kt=cloneVNode(kt,null,!1,!0),kt.dirs=kt.dirs?kt.dirs.concat(te.dirs):te.dirs),te.transition){const Nt=isTeleport(kt.type)&&getInnerChild$1(kt)||kt;setTransitionHooks(Nt,te.transition)}return Mt=kt,setCurrentRenderingInstance(xt),Mt}function filterSingleRoot(ne,ee=!0){let te;for(let st=0;st<ne.length;st++){const ot=ne[st];if(isVNode(ot)){if(ot.type!==Comment||ot.children==="v-if"){if(te)return;te=ot}}else return}return te}const getFunctionalFallthrough=ne=>{let ee;for(const te in ne)(te==="class"||te==="style"||isOn(te))&&((ee||(ee={}))[te]=ne[te]);return ee},filterModelListeners=(ne,ee)=>{const te={};for(const st in ne)(!isModelListener(st)||!(st.slice(9)in ee))&&(te[st]=ne[st]);return te};function shouldUpdateComponent(ne,ee,te){const{props:st,children:ot,component:ct}=ne,{props:ut,children:dt,patchFlag:ht}=ee,ft=ct.emitsOptions;if(ee.dirs||ee.transition)return!0;if(te&&ht>=0){if(ht&1024)return!0;if(ht&16)return st?hasPropsChanged(st,ut,ft):!!ut;if(ht&8){const pt=ee.dynamicProps;for(let mt=0;mt<pt.length;mt++){const yt=pt[mt];if(hasPropValueChanged(ut,st,yt)&&!isEmitListener(ft,yt))return!0}}}else return(ot||dt)&&(!dt||!dt.$stable)?!0:st===ut?!1:st?ut?hasPropsChanged(st,ut,ft):!0:!!ut;return!1}function hasPropsChanged(ne,ee,te){const st=Object.keys(ee);if(st.length!==Object.keys(ne).length)return!0;for(let ot=0;ot<st.length;ot++){const ct=st[ot];if(hasPropValueChanged(ee,ne,ct)&&!isEmitListener(te,ct))return!0}return!1}function hasPropValueChanged(ne,ee,te){const st=ne[te],ot=ee[te];return te==="style"&&isObject$2(st)&&isObject$2(ot)?!looseEqual(st,ot):st!==ot}function updateHOCHostEl({vnode:ne,parent:ee,suspense:te},st){for(;ee;){const ot=ee.subTree;if(ot.suspense&&ot.suspense.activeBranch===ne&&(ot.suspense.vnode.el=ot.el=st,ne=ot),ot===ne)(ne=ee.vnode).el=st,ee=ee.parent;else break}te&&te.activeBranch===ne&&(te.vnode.el=st)}const internalObjectProto={},createInternalObject=()=>Object.create(internalObjectProto),isInternalObject=ne=>Object.getPrototypeOf(ne)===internalObjectProto;function initProps(ne,ee,te,st=!1){const ot={},ct=createInternalObject();ne.propsDefaults=Object.create(null),setFullProps(ne,ee,ot,ct);for(const ut in ne.propsOptions[0])ut in ot||(ot[ut]=void 0);te?ne.props=st?ot:shallowReactive(ot):ne.type.props?ne.props=ot:ne.props=ct,ne.attrs=ct}function updateProps(ne,ee,te,st){const{props:ot,attrs:ct,vnode:{patchFlag:ut}}=ne,dt=toRaw(ot),[ht]=ne.propsOptions;let ft=!1;if((st||ut>0)&&!(ut&16)){if(ut&8){const pt=ne.vnode.dynamicProps;for(let mt=0;mt<pt.length;mt++){let yt=pt[mt];if(isEmitListener(ne.emitsOptions,yt))continue;const vt=ee[yt];if(ht)if(hasOwn(ct,yt))vt!==ct[yt]&&(ct[yt]=vt,ft=!0);else{const _t=camelize(yt);ot[_t]=resolvePropValue(ht,dt,_t,vt,ne,!1)}else vt!==ct[yt]&&(ct[yt]=vt,ft=!0)}}}else{setFullProps(ne,ee,ot,ct)&&(ft=!0);let pt;for(const mt in dt)(!ee||!hasOwn(ee,mt)&&((pt=hyphenate(mt))===mt||!hasOwn(ee,pt)))&&(ht?te&&(te[mt]!==void 0||te[pt]!==void 0)&&(ot[mt]=resolvePropValue(ht,dt,mt,void 0,ne,!0)):delete ot[mt]);if(ct!==dt)for(const mt in ct)(!ee||!hasOwn(ee,mt))&&(delete ct[mt],ft=!0)}ft&&trigger(ne.attrs,"set","")}function setFullProps(ne,ee,te,st){const[ot,ct]=ne.propsOptions;let ut=!1,dt;if(ee)for(let ht in ee){if(isReservedProp(ht))continue;const ft=ee[ht];let pt;ot&&hasOwn(ot,pt=camelize(ht))?!ct||!ct.includes(pt)?te[pt]=ft:(dt||(dt={}))[pt]=ft:isEmitListener(ne.emitsOptions,ht)||(!(ht in st)||ft!==st[ht])&&(st[ht]=ft,ut=!0)}if(ct){const ht=toRaw(te),ft=dt||EMPTY_OBJ;for(let pt=0;pt<ct.length;pt++){const mt=ct[pt];te[mt]=resolvePropValue(ot,ht,mt,ft[mt],ne,!hasOwn(ft,mt))}}return ut}function resolvePropValue(ne,ee,te,st,ot,ct){const ut=ne[te];if(ut!=null){const dt=hasOwn(ut,"default");if(dt&&st===void 0){const ht=ut.default;if(ut.type!==Function&&!ut.skipFactory&&isFunction$1(ht)){const{propsDefaults:ft}=ot;if(te in ft)st=ft[te];else{const pt=setCurrentInstance(ot);st=ft[te]=ht.call(null,ee),pt()}}else st=ht;ot.ce&&ot.ce._setProp(te,st)}ut[0]&&(ct&&!dt?st=!1:ut[1]&&(st===""||st===hyphenate(te))&&(st=!0))}return st}const mixinPropsCache=new WeakMap;function normalizePropsOptions(ne,ee,te=!1){const st=te?mixinPropsCache:ee.propsCache,ot=st.get(ne);if(ot)return ot;const ct=ne.props,ut={},dt=[];let ht=!1;if(!isFunction$1(ne)){const pt=mt=>{ht=!0;const[yt,vt]=normalizePropsOptions(mt,ee,!0);extend$5(ut,yt),vt&&dt.push(...vt)};!te&&ee.mixins.length&&ee.mixins.forEach(pt),ne.extends&&pt(ne.extends),ne.mixins&&ne.mixins.forEach(pt)}if(!ct&&!ht)return isObject$2(ne)&&st.set(ne,EMPTY_ARR),EMPTY_ARR;if(isArray$1(ct))for(let pt=0;pt<ct.length;pt++){const mt=camelize(ct[pt]);validatePropName(mt)&&(ut[mt]=EMPTY_OBJ)}else if(ct)for(const pt in ct){const mt=camelize(pt);if(validatePropName(mt)){const yt=ct[pt],vt=ut[mt]=isArray$1(yt)||isFunction$1(yt)?{type:yt}:extend$5({},yt),_t=vt.type;let bt=!1,xt=!0;if(isArray$1(_t))for(let Mt=0;Mt<_t.length;++Mt){const Ot=_t[Mt],kt=isFunction$1(Ot)&&Ot.name;if(kt==="Boolean"){bt=!0;break}else kt==="String"&&(xt=!1)}else bt=isFunction$1(_t)&&_t.name==="Boolean";vt[0]=bt,vt[1]=xt,(bt||hasOwn(vt,"default"))&&dt.push(mt)}}const ft=[ut,dt];return isObject$2(ne)&&st.set(ne,ft),ft}function validatePropName(ne){return ne[0]!=="$"&&!isReservedProp(ne)}const isInternalKey=ne=>ne==="_"||ne==="_ctx"||ne==="$stable",normalizeSlotValue=ne=>isArray$1(ne)?ne.map(normalizeVNode):[normalizeVNode(ne)],normalizeSlot$1=(ne,ee,te)=>{if(ee._n)return ee;const st=withCtx((...ot)=>normalizeSlotValue(ee(...ot)),te);return st._c=!1,st},normalizeObjectSlots=(ne,ee,te)=>{const st=ne._ctx;for(const ot in ne){if(isInternalKey(ot))continue;const ct=ne[ot];if(isFunction$1(ct))ee[ot]=normalizeSlot$1(ot,ct,st);else if(ct!=null){const ut=normalizeSlotValue(ct);ee[ot]=()=>ut}}},normalizeVNodeSlots=(ne,ee)=>{const te=normalizeSlotValue(ee);ne.slots.default=()=>te},assignSlots=(ne,ee,te)=>{for(const st in ee)(te||!isInternalKey(st))&&(ne[st]=ee[st])},initSlots=(ne,ee,te)=>{const st=ne.slots=createInternalObject();if(ne.vnode.shapeFlag&32){const ot=ee._;ot?(assignSlots(st,ee,te),te&&def(st,"_",ot,!0)):normalizeObjectSlots(ee,st)}else ee&&normalizeVNodeSlots(ne,ee)},updateSlots=(ne,ee,te)=>{const{vnode:st,slots:ot}=ne;let ct=!0,ut=EMPTY_OBJ;if(st.shapeFlag&32){const dt=ee._;dt?te&&dt===1?ct=!1:assignSlots(ot,ee,te):(ct=!ee.$stable,normalizeObjectSlots(ee,ot)),ut=ee}else ee&&(normalizeVNodeSlots(ne,ee),ut={default:1});if(ct)for(const dt in ot)!isInternalKey(dt)&&ut[dt]==null&&delete ot[dt]},queuePostRenderEffect=queueEffectWithSuspense;function createRenderer(ne){return baseCreateRenderer(ne)}function createHydrationRenderer(ne){return baseCreateRenderer(ne,createHydrationFunctions)}function baseCreateRenderer(ne,ee){const te=getGlobalThis();te.__VUE__=!0;const{insert:st,remove:ot,patchProp:ct,createElement:ut,createText:dt,createComment:ht,setText:ft,setElementText:pt,parentNode:mt,nextSibling:yt,setScopeId:vt=NOOP,insertStaticContent:_t}=ne,bt=(Yt,ri,Sn,On=null,Rn=null,Bn=null,Vn=void 0,Wn=null,Gn=!!ri.dynamicChildren)=>{if(Yt===ri)return;Yt&&!isSameVNodeType(Yt,ri)&&(On=ni(Yt),Kt(Yt,Rn,Bn,!0),Yt=null),ri.patchFlag===-2&&(Gn=!1,ri.dynamicChildren=null);const{type:Hn,ref:kn,shapeFlag:er}=ri;switch(Hn){case Text$1:xt(Yt,ri,Sn,On);break;case Comment:Mt(Yt,ri,Sn,On);break;case Static:Yt==null&&Ot(ri,Sn,On,Vn);break;case Fragment:Wt(Yt,ri,Sn,On,Rn,Bn,Vn,Wn,Gn);break;default:er&1?Gt(Yt,ri,Sn,On,Rn,Bn,Vn,Wn,Gn):er&6?Jt(Yt,ri,Sn,On,Rn,Bn,Vn,Wn,Gn):(er&64||er&128)&&Hn.process(Yt,ri,Sn,On,Rn,Bn,Vn,Wn,Gn,Un)}kn!=null&&Rn?setRef(kn,Yt&&Yt.ref,Bn,ri||Yt,!ri):kn==null&&Yt&&Yt.ref!=null&&setRef(Yt.ref,null,Bn,Yt,!0)},xt=(Yt,ri,Sn,On)=>{if(Yt==null)st(ri.el=dt(ri.children),Sn,On);else{const Rn=ri.el=Yt.el;ri.children!==Yt.children&&ft(Rn,ri.children)}},Mt=(Yt,ri,Sn,On)=>{Yt==null?st(ri.el=ht(ri.children||""),Sn,On):ri.el=Yt.el},Ot=(Yt,ri,Sn,On)=>{[Yt.el,Yt.anchor]=_t(Yt.children,ri,Sn,On,Yt.el,Yt.anchor)},kt=({el:Yt,anchor:ri},Sn,On)=>{let Rn;for(;Yt&&Yt!==ri;)Rn=yt(Yt),st(Yt,Sn,On),Yt=Rn;st(ri,Sn,On)},Nt=({el:Yt,anchor:ri})=>{let Sn;for(;Yt&&Yt!==ri;)Sn=yt(Yt),ot(Yt),Yt=Sn;ot(ri)},Gt=(Yt,ri,Sn,On,Rn,Bn,Vn,Wn,Gn)=>{if(ri.type==="svg"?Vn="svg":ri.type==="math"&&(Vn="mathml"),Yt==null)Bt(ri,Sn,On,Rn,Bn,Vn,Wn,Gn);else{const Hn=Yt.el&&Yt.el._isVueCE?Yt.el:null;try{Hn&&Hn._beginPatch(),Ht(Yt,ri,Rn,Bn,Vn,Wn,Gn)}finally{Hn&&Hn._endPatch()}}},Bt=(Yt,ri,Sn,On,Rn,Bn,Vn,Wn)=>{let Gn,Hn;const{props:kn,shapeFlag:er,transition:Tn,dirs:Dn}=Yt;if(Gn=Yt.el=ut(Yt.type,Bn,kn&&kn.is,kn),er&8?pt(Gn,Yt.children):er&16&&Vt(Yt.children,Gn,null,On,Rn,resolveChildrenNamespace(Yt,Bn),Vn,Wn),Dn&&invokeDirectiveHook(Yt,null,On,"created"),Ut(Gn,Yt,Yt.scopeId,Vn,On),kn){for(const jn in kn)jn!=="value"&&!isReservedProp(jn)&&ct(Gn,jn,null,kn[jn],Bn,On);"value"in kn&&ct(Gn,"value",null,kn.value,Bn),(Hn=kn.onVnodeBeforeMount)&&invokeVNodeHook(Hn,On,Yt)}Dn&&invokeDirectiveHook(Yt,null,On,"beforeMount");const $n=needTransition(Rn,Tn);$n&&Tn.beforeEnter(Gn),st(Gn,ri,Sn),((Hn=kn&&kn.onVnodeMounted)||$n||Dn)&&queuePostRenderEffect(()=>{try{Hn&&invokeVNodeHook(Hn,On,Yt),$n&&Tn.enter(Gn),Dn&&invokeDirectiveHook(Yt,null,On,"mounted")}finally{}},Rn)},Ut=(Yt,ri,Sn,On,Rn)=>{if(Sn&&vt(Yt,Sn),On)for(let Bn=0;Bn<On.length;Bn++)vt(Yt,On[Bn]);if(Rn){let Bn=Rn.subTree;if(ri===Bn||isSuspense(Bn.type)&&(Bn.ssContent===ri||Bn.ssFallback===ri)){const Vn=Rn.vnode;Ut(Yt,Vn,Vn.scopeId,Vn.slotScopeIds,Rn.parent)}}},Vt=(Yt,ri,Sn,On,Rn,Bn,Vn,Wn,Gn=0)=>{for(let Hn=Gn;Hn<Yt.length;Hn++){const kn=Yt[Hn]=Wn?cloneIfMounted(Yt[Hn]):normalizeVNode(Yt[Hn]);bt(null,kn,ri,Sn,On,Rn,Bn,Vn,Wn)}},Ht=(Yt,ri,Sn,On,Rn,Bn,Vn)=>{const Wn=ri.el=Yt.el;let{patchFlag:Gn,dynamicChildren:Hn,dirs:kn}=ri;Gn|=Yt.patchFlag&16;const er=Yt.props||EMPTY_OBJ,Tn=ri.props||EMPTY_OBJ;let Dn;if(Sn&&toggleRecurse(Sn,!1),(Dn=Tn.onVnodeBeforeUpdate)&&invokeVNodeHook(Dn,Sn,ri,Yt),kn&&invokeDirectiveHook(ri,Yt,Sn,"beforeUpdate"),Sn&&toggleRecurse(Sn,!0),Hn&&(!Yt.dynamicChildren||Yt.dynamicChildren.length!==Hn.length)&&(Gn=0,Vn=!1,Hn=null),(er.innerHTML&&Tn.innerHTML==null||er.textContent&&Tn.textContent==null)&&pt(Wn,""),Hn?zt(Yt.dynamicChildren,Hn,Wn,Sn,On,resolveChildrenNamespace(ri,Rn),Bn):Vn||An(Yt,ri,Wn,null,Sn,On,resolveChildrenNamespace(ri,Rn),Bn,!1),Gn>0){if(Gn&16)jt(Wn,er,Tn,Sn,Rn);else if(Gn&2&&er.class!==Tn.class&&ct(Wn,"class",null,Tn.class,Rn),Gn&4&&ct(Wn,"style",er.style,Tn.style,Rn),Gn&8){const $n=ri.dynamicProps;for(let jn=0;jn<$n.length;jn++){const zn=$n[jn],Jn=er[zn],rs=Tn[zn];(rs!==Jn||zn==="value")&&ct(Wn,zn,Jn,rs,Rn,Sn)}}Gn&1&&Yt.children!==ri.children&&pt(Wn,ri.children)}else!Vn&&Hn==null&&jt(Wn,er,Tn,Sn,Rn);((Dn=Tn.onVnodeUpdated)||kn)&&queuePostRenderEffect(()=>{Dn&&invokeVNodeHook(Dn,Sn,ri,Yt),kn&&invokeDirectiveHook(ri,Yt,Sn,"updated")},On)},zt=(Yt,ri,Sn,On,Rn,Bn,Vn)=>{for(let Wn=0;Wn<ri.length;Wn++){const Gn=Yt[Wn],Hn=ri[Wn],kn=Gn.el&&(Gn.type===Fragment||!isSameVNodeType(Gn,Hn)||Gn.shapeFlag&198)?mt(Gn.el):Sn;bt(Gn,Hn,kn,null,On,Rn,Bn,Vn,!0)}},jt=(Yt,ri,Sn,On,Rn)=>{if(ri!==Sn){if(ri!==EMPTY_OBJ)for(const Bn in ri)!isReservedProp(Bn)&&!(Bn in Sn)&&ct(Yt,Bn,ri[Bn],null,Rn,On);for(const Bn in Sn){if(isReservedProp(Bn))continue;const Vn=Sn[Bn],Wn=ri[Bn];Vn!==Wn&&Bn!=="value"&&ct(Yt,Bn,Wn,Vn,Rn,On)}"value"in Sn&&ct(Yt,"value",ri.value,Sn.value,Rn)}},Wt=(Yt,ri,Sn,On,Rn,Bn,Vn,Wn,Gn)=>{const Hn=ri.el=Yt?Yt.el:dt(""),kn=ri.anchor=Yt?Yt.anchor:dt("");let{patchFlag:er,dynamicChildren:Tn,slotScopeIds:Dn}=ri;Dn&&(Wn=Wn?Wn.concat(Dn):Dn),Yt==null?(st(Hn,Sn,On),st(kn,Sn,On),Vt(ri.children||[],Sn,kn,Rn,Bn,Vn,Wn,Gn)):er>0&&er&64&&Tn&&Yt.dynamicChildren&&Yt.dynamicChildren.length===Tn.length?(zt(Yt.dynamicChildren,Tn,Sn,Rn,Bn,Vn,Wn),(ri.key!=null||Rn&&ri===Rn.subTree)&&traverseStaticChildren(Yt,ri,!0)):An(Yt,ri,Sn,kn,Rn,Bn,Vn,Wn,Gn)},Jt=(Yt,ri,Sn,On,Rn,Bn,Vn,Wn,Gn)=>{ri.slotScopeIds=Wn,Yt==null?ri.shapeFlag&512?Rn.ctx.activate(ri,Sn,On,Vn,Gn):Qt(ri,Sn,On,Rn,Bn,Vn,Gn):oi(Yt,ri,Gn)},Qt=(Yt,ri,Sn,On,Rn,Bn,Vn)=>{const Wn=Yt.component=createComponentInstance(Yt,On,Rn);if(isKeepAlive(Yt)&&(Wn.ctx.renderer=Un),setupComponent(Wn,!1,Vn),Wn.asyncDep){if(Rn&&Rn.registerDep(Wn,ai,Vn),!Yt.el){const Gn=Wn.subTree=createVNode(Comment);Mt(null,Gn,ri,Sn),Yt.placeholder=Gn.el}}else ai(Wn,Yt,ri,Sn,Rn,Bn,Vn)},oi=(Yt,ri,Sn)=>{const On=ri.component=Yt.component;if(shouldUpdateComponent(Yt,ri,Sn))if(On.asyncDep&&!On.asyncResolved){xn(On,ri,Sn);return}else On.next=ri,On.update();else ri.el=Yt.el,On.vnode=ri},ai=(Yt,ri,Sn,On,Rn,Bn,Vn)=>{const Wn=()=>{if(Yt.isMounted){let{next:er,bu:Tn,u:Dn,parent:$n,vnode:jn}=Yt;{const ls=locateNonHydratedAsyncRoot(Yt);if(ls){er&&(er.el=jn.el,xn(Yt,er,Vn)),ls.asyncDep.then(()=>{queuePostRenderEffect(()=>{Yt.isUnmounted||Hn()},Rn)});return}}let zn=er,Jn;toggleRecurse(Yt,!1),er?(er.el=jn.el,xn(Yt,er,Vn)):er=jn,Tn&&invokeArrayFns(Tn),(Jn=er.props&&er.props.onVnodeBeforeUpdate)&&invokeVNodeHook(Jn,$n,er,jn),toggleRecurse(Yt,!0);const rs=renderComponentRoot(Yt),os=Yt.subTree;Yt.subTree=rs,bt(os,rs,mt(os.el),ni(os),Yt,Rn,Bn),er.el=rs.el,zn===null&&updateHOCHostEl(Yt,rs.el),Dn&&queuePostRenderEffect(Dn,Rn),(Jn=er.props&&er.props.onVnodeUpdated)&&queuePostRenderEffect(()=>invokeVNodeHook(Jn,$n,er,jn),Rn)}else{let er;const{el:Tn,props:Dn}=ri,{bm:$n,m:jn,parent:zn,root:Jn,type:rs}=Yt,os=isAsyncWrapper(ri);if(toggleRecurse(Yt,!1),$n&&invokeArrayFns($n),!os&&(er=Dn&&Dn.onVnodeBeforeMount)&&invokeVNodeHook(er,zn,ri),toggleRecurse(Yt,!0),Tn&&Mn){const ls=()=>{Yt.subTree=renderComponentRoot(Yt),Mn(Tn,Yt.subTree,Yt,Rn,null)};os&&rs.__asyncHydrate?rs.__asyncHydrate(Tn,Yt,ls):ls()}else{Jn.ce&&Jn.ce._hasShadowRoot()&&Jn.ce._injectChildStyle(rs,Yt.parent?Yt.parent.type:void 0);const ls=Yt.subTree=renderComponentRoot(Yt);bt(null,ls,Sn,On,Yt,Rn,Bn),ri.el=ls.el}if(jn&&queuePostRenderEffect(jn,Rn),!os&&(er=Dn&&Dn.onVnodeMounted)){const ls=ri;queuePostRenderEffect(()=>invokeVNodeHook(er,zn,ls),Rn)}(ri.shapeFlag&256||zn&&isAsyncWrapper(zn.vnode)&&zn.vnode.shapeFlag&256)&&Yt.a&&queuePostRenderEffect(Yt.a,Rn),Yt.isMounted=!0,ri=Sn=On=null}};Yt.scope.on();const Gn=Yt.effect=new ReactiveEffect(Wn);Yt.scope.off();const Hn=Yt.update=Gn.run.bind(Gn),kn=Yt.job=Gn.runIfDirty.bind(Gn);kn.i=Yt,kn.id=Yt.uid,Gn.scheduler=()=>queueJob(kn),toggleRecurse(Yt,!0),Hn()},xn=(Yt,ri,Sn)=>{ri.component=Yt;const On=Yt.vnode.props;Yt.vnode=ri,Yt.next=null,updateProps(Yt,ri.props,On,Sn),updateSlots(Yt,ri.children,Sn),pauseTracking(),flushPreFlushCbs(Yt),resetTracking()},An=(Yt,ri,Sn,On,Rn,Bn,Vn,Wn,Gn=!1)=>{const Hn=Yt&&Yt.children,kn=Yt?Yt.shapeFlag:0,er=ri.children,{patchFlag:Tn,shapeFlag:Dn}=ri;if(Tn>0){if(Tn&128){Xt(Hn,er,Sn,On,Rn,Bn,Vn,Wn,Gn);return}else if(Tn&256){Nn(Hn,er,Sn,On,Rn,Bn,Vn,Wn,Gn);return}}Dn&8?(kn&16&&wn(Hn,Rn,Bn),er!==Hn&&pt(Sn,er)):kn&16?Dn&16?Xt(Hn,er,Sn,On,Rn,Bn,Vn,Wn,Gn):wn(Hn,Rn,Bn,!0):(kn&8&&pt(Sn,""),Dn&16&&Vt(er,Sn,On,Rn,Bn,Vn,Wn,Gn))},Nn=(Yt,ri,Sn,On,Rn,Bn,Vn,Wn,Gn)=>{Yt=Yt||EMPTY_ARR,ri=ri||EMPTY_ARR;const Hn=Yt.length,kn=ri.length,er=Math.min(Hn,kn);let Tn;for(Tn=0;Tn<er;Tn++){const Dn=ri[Tn]=Gn?cloneIfMounted(ri[Tn]):normalizeVNode(ri[Tn]);bt(Yt[Tn],Dn,Sn,null,Rn,Bn,Vn,Wn,Gn)}Hn>kn?wn(Yt,Rn,Bn,!0,!1,er):Vt(ri,Sn,On,Rn,Bn,Vn,Wn,Gn,er)},Xt=(Yt,ri,Sn,On,Rn,Bn,Vn,Wn,Gn)=>{let Hn=0;const kn=ri.length;let er=Yt.length-1,Tn=kn-1;for(;Hn<=er&&Hn<=Tn;){const Dn=Yt[Hn],$n=ri[Hn]=Gn?cloneIfMounted(ri[Hn]):normalizeVNode(ri[Hn]);if(isSameVNodeType(Dn,$n))bt(Dn,$n,Sn,null,Rn,Bn,Vn,Wn,Gn);else break;Hn++}for(;Hn<=er&&Hn<=Tn;){const Dn=Yt[er],$n=ri[Tn]=Gn?cloneIfMounted(ri[Tn]):normalizeVNode(ri[Tn]);if(isSameVNodeType(Dn,$n))bt(Dn,$n,Sn,null,Rn,Bn,Vn,Wn,Gn);else break;er--,Tn--}if(Hn>er){if(Hn<=Tn){const Dn=Tn+1,$n=Dn<kn?ri[Dn].el:On;for(;Hn<=Tn;)bt(null,ri[Hn]=Gn?cloneIfMounted(ri[Hn]):normalizeVNode(ri[Hn]),Sn,$n,Rn,Bn,Vn,Wn,Gn),Hn++}}else if(Hn>Tn)for(;Hn<=er;)Kt(Yt[Hn],Rn,Bn,!0),Hn++;else{const Dn=Hn,$n=Hn,jn=new Map;for(Hn=$n;Hn<=Tn;Hn++){const hs=ri[Hn]=Gn?cloneIfMounted(ri[Hn]):normalizeVNode(ri[Hn]);hs.key!=null&&jn.set(hs.key,Hn)}let zn,Jn=0;const rs=Tn-$n+1;let os=!1,ls=0;const cs=new Array(rs);for(Hn=0;Hn<rs;Hn++)cs[Hn]=0;for(Hn=Dn;Hn<=er;Hn++){const hs=Yt[Hn];if(Jn>=rs){Kt(hs,Rn,Bn,!0);continue}let fs;if(hs.key!=null)fs=jn.get(hs.key);else for(zn=$n;zn<=Tn;zn++)if(cs[zn-$n]===0&&isSameVNodeType(hs,ri[zn])){fs=zn;break}fs===void 0?Kt(hs,Rn,Bn,!0):(cs[fs-$n]=Hn+1,fs>=ls?ls=fs:os=!0,bt(hs,ri[fs],Sn,null,Rn,Bn,Vn,Wn,Gn),Jn++)}const vs=os?getSequence(cs):EMPTY_ARR;for(zn=vs.length-1,Hn=rs-1;Hn>=0;Hn--){const hs=$n+Hn,fs=ri[hs],_s=ri[hs+1],ms=hs+1<kn?_s.el||resolveAsyncComponentPlaceholder(_s):On;cs[Hn]===0?bt(null,fs,Sn,ms,Rn,Bn,Vn,Wn,Gn):os&&(zn<0||Hn!==vs[zn]?Zt(fs,Sn,ms,2):zn--)}}},Zt=(Yt,ri,Sn,On,Rn=null)=>{const{el:Bn,type:Vn,transition:Wn,children:Gn,shapeFlag:Hn}=Yt;if(Hn&6){Zt(Yt.component.subTree,ri,Sn,On);return}if(Hn&128){Yt.suspense.move(ri,Sn,On);return}if(Hn&64){Vn.move(Yt,ri,Sn,Un);return}if(Vn===Fragment){st(Bn,ri,Sn);for(let er=0;er<Gn.length;er++)Zt(Gn[er],ri,Sn,On);st(Yt.anchor,ri,Sn);return}if(Vn===Static){kt(Yt,ri,Sn);return}if(On!==2&&Hn&1&&Wn)if(On===0)Wn.persisted&&!Bn[leaveCbKey]?st(Bn,ri,Sn):(Wn.beforeEnter(Bn),st(Bn,ri,Sn),queuePostRenderEffect(()=>Wn.enter(Bn),Rn));else{const{leave:er,delayLeave:Tn,afterLeave:Dn}=Wn,$n=()=>{Yt.ctx.isUnmounted?ot(Bn):st(Bn,ri,Sn)},jn=()=>{const zn=Bn._isLeaving||!!Bn[leaveCbKey];Bn._isLeaving&&Bn[leaveCbKey](!0),Wn.persisted&&!zn?$n():er(Bn,()=>{$n(),Dn&&Dn()})};Tn?Tn(Bn,$n,jn):jn()}else st(Bn,ri,Sn)},Kt=(Yt,ri,Sn,On=!1,Rn=!1)=>{const{type:Bn,props:Vn,ref:Wn,children:Gn,dynamicChildren:Hn,shapeFlag:kn,patchFlag:er,dirs:Tn,cacheIndex:Dn,memo:$n}=Yt;if(er===-2&&(Rn=!1),Wn!=null&&(pauseTracking(),setRef(Wn,null,Sn,Yt,!0),resetTracking()),Dn!=null&&(ri.renderCache[Dn]=void 0),kn&256){ri.ctx.deactivate(Yt);return}const jn=kn&1&&Tn,zn=!isAsyncWrapper(Yt);let Jn;if(zn&&(Jn=Vn&&Vn.onVnodeBeforeUnmount)&&invokeVNodeHook(Jn,ri,Yt),kn&6)ii(Yt.component,Sn,On);else{if(kn&128){Yt.suspense.unmount(Sn,On);return}jn&&invokeDirectiveHook(Yt,null,ri,"beforeUnmount"),kn&64?Yt.type.remove(Yt,ri,Sn,Un,On):Hn&&!Hn.hasOnce&&(Bn!==Fragment||er>0&&er&64)?wn(Hn,ri,Sn,!1,!0):(Bn===Fragment&&er&384||!Rn&&kn&16)&&wn(Gn,ri,Sn),On&&ti(Yt)}const rs=$n!=null&&Dn==null;(zn&&(Jn=Vn&&Vn.onVnodeUnmounted)||jn||rs)&&queuePostRenderEffect(()=>{Jn&&invokeVNodeHook(Jn,ri,Yt),jn&&invokeDirectiveHook(Yt,null,ri,"unmounted"),rs&&(Yt.el=null)},Sn)},ti=Yt=>{const{type:ri,el:Sn,anchor:On,transition:Rn}=Yt;if(ri===Fragment){qt(Sn,On);return}if(ri===Static){Nt(Yt);return}const Bn=()=>{ot(Sn),Rn&&!Rn.persisted&&Rn.afterLeave&&Rn.afterLeave()};if(Yt.shapeFlag&1&&Rn&&!Rn.persisted){const{leave:Vn,delayLeave:Wn}=Rn,Gn=()=>Vn(Sn,Bn);Wn?Wn(Yt.el,Bn,Gn):Gn()}else Bn()},qt=(Yt,ri)=>{let Sn;for(;Yt!==ri;)Sn=yt(Yt),ot(Yt),Yt=Sn;ot(ri)},ii=(Yt,ri,Sn)=>{const{bum:On,scope:Rn,job:Bn,subTree:Vn,um:Wn,m:Gn,a:Hn}=Yt;invalidateMount(Gn),invalidateMount(Hn),On&&invokeArrayFns(On),Rn.stop(),Bn&&(Bn.flags|=8,Kt(Vn,Yt,ri,Sn)),Wn&&queuePostRenderEffect(Wn,ri),queuePostRenderEffect(()=>{Yt.isUnmounted=!0},ri)},wn=(Yt,ri,Sn,On=!1,Rn=!1,Bn=0)=>{for(let Vn=Bn;Vn<Yt.length;Vn++)Kt(Yt[Vn],ri,Sn,On,Rn)},ni=Yt=>{if(Yt.shapeFlag&6)return ni(Yt.component.subTree);if(Yt.shapeFlag&128)return Yt.suspense.next();const ri=yt(Yt.anchor||Yt.el),Sn=ri&&ri[TeleportEndKey];return Sn?yt(Sn):ri};let Cn=!1;const Ln=(Yt,ri,Sn)=>{let On;Yt==null?ri._vnode&&(Kt(ri._vnode,null,null,!0),On=ri._vnode.component):bt(ri._vnode||null,Yt,ri,null,null,null,Sn),ri._vnode=Yt,Cn||(Cn=!0,flushPreFlushCbs(On),flushPostFlushCbs(),Cn=!1)},Un={p:bt,um:Kt,m:Zt,r:ti,mt:Qt,mc:Vt,pc:An,pbc:zt,n:ni,o:ne};let Pn,Mn;return ee&&([Pn,Mn]=ee(Un)),{render:Ln,hydrate:Pn,createApp:createAppAPI(Ln,Pn)}}function resolveChildrenNamespace({type:ne,props:ee},te){return te==="svg"&&ne==="foreignObject"||te==="mathml"&&ne==="annotation-xml"&&ee&&ee.encoding&&ee.encoding.includes("html")?void 0:te}function toggleRecurse({effect:ne,job:ee},te){te?(ne.flags|=32,ee.flags|=4):(ne.flags&=-33,ee.flags&=-5)}function needTransition(ne,ee){return(!ne||ne&&!ne.pendingBranch)&&ee&&!ee.persisted}function traverseStaticChildren(ne,ee,te=!1){const st=ne.children,ot=ee.children;if(isArray$1(st)&&isArray$1(ot))for(let ct=0;ct<st.length;ct++){const ut=st[ct];let dt=ot[ct];dt.shapeFlag&1&&!dt.dynamicChildren&&((dt.patchFlag<=0||dt.patchFlag===32)&&(dt=ot[ct]=cloneIfMounted(ot[ct]),dt.el=ut.el),!te&&dt.patchFlag!==-2&&traverseStaticChildren(ut,dt)),dt.type===Text$1&&(dt.patchFlag===-1&&(dt=ot[ct]=cloneIfMounted(dt)),dt.el=ut.el),dt.type===Comment&&!dt.el&&(dt.el=ut.el)}}function getSequence(ne){const ee=ne.slice(),te=[0];let st,ot,ct,ut,dt;const ht=ne.length;for(st=0;st<ht;st++){const ft=ne[st];if(ft!==0){if(ot=te[te.length-1],ne[ot]<ft){ee[st]=ot,te.push(st);continue}for(ct=0,ut=te.length-1;ct<ut;)dt=ct+ut>>1,ne[te[dt]]<ft?ct=dt+1:ut=dt;ft<ne[te[ct]]&&(ct>0&&(ee[st]=te[ct-1]),te[ct]=st)}}for(ct=te.length,ut=te[ct-1];ct-- >0;)te[ct]=ut,ut=ee[ut];return te}function locateNonHydratedAsyncRoot(ne){const ee=ne.subTree.component;if(ee)return ee.asyncDep&&!ee.asyncResolved?ee:locateNonHydratedAsyncRoot(ee)}
20function invalidateMount(ne){if(ne)for(let ee=0;ee<ne.length;ee++)ne[ee].flags|=8}function resolveAsyncComponentPlaceholder(ne){if(ne.placeholder)return ne.placeholder;const ee=ne.component;return ee?resolveAsyncComponentPlaceholder(ee.subTree):null}const isSuspense=ne=>ne.__isSuspense;let suspenseId=0;const SuspenseImpl={name:"Suspense",__isSuspense:!0,process(ne,ee,te,st,ot,ct,ut,dt,ht,ft){if(ne==null)mountSuspense(ee,te,st,ot,ct,ut,dt,ht,ft);else{if(ct&&ct.deps>0&&!ne.suspense.isInFallback){ee.suspense=ne.suspense,ee.suspense.vnode=ee,ee.el=ne.el;return}patchSuspense(ne,ee,te,st,ot,ut,dt,ht,ft)}},hydrate:hydrateSuspense,normalize:normalizeSuspenseChildren},Suspense=SuspenseImpl;function triggerEvent(ne,ee){const te=ne.props&&ne.props[ee];isFunction$1(te)&&te()}function mountSuspense(ne,ee,te,st,ot,ct,ut,dt,ht){const{p:ft,o:{createElement:pt}}=ht,mt=pt("div"),yt=ne.suspense=createSuspenseBoundary(ne,ot,st,ee,mt,te,ct,ut,dt,ht);ft(null,yt.pendingBranch=ne.ssContent,mt,null,st,yt,ct,ut),yt.deps>0?(triggerEvent(ne,"onPending"),triggerEvent(ne,"onFallback"),ft(null,ne.ssFallback,ee,te,st,null,ct,ut),setActiveBranch(yt,ne.ssFallback)):yt.resolve(!1,!0)}function patchSuspense(ne,ee,te,st,ot,ct,ut,dt,{p:ht,um:ft,o:{createElement:pt}}){const mt=ee.suspense=ne.suspense;mt.vnode=ee,ee.el=ne.el;const yt=ee.ssContent,vt=ee.ssFallback,{activeBranch:_t,pendingBranch:bt,isInFallback:xt,isHydrating:Mt}=mt;if(bt)mt.pendingBranch=yt,isSameVNodeType(bt,yt)?(ht(bt,yt,mt.hiddenContainer,null,ot,mt,ct,ut,dt),mt.deps<=0?mt.resolve():xt&&!Mt&&!mt.isFallbackMountPending&&(ht(_t,vt,te,st,ot,null,ct,ut,dt),setActiveBranch(mt,vt))):(mt.pendingId=suspenseId++,Mt?(mt.isHydrating=!1,mt.activeBranch=bt):ft(bt,ot,mt),mt.deps=0,mt.effects.length=0,mt.hiddenContainer=pt("div"),xt?(ht(null,yt,mt.hiddenContainer,null,ot,mt,ct,ut,dt),mt.deps<=0?mt.resolve():mt.isFallbackMountPending||(ht(_t,vt,te,st,ot,null,ct,ut,dt),setActiveBranch(mt,vt))):_t&&isSameVNodeType(_t,yt)?(ht(_t,yt,te,st,ot,mt,ct,ut,dt),mt.resolve(!0)):(ht(null,yt,mt.hiddenContainer,null,ot,mt,ct,ut,dt),mt.deps<=0&&mt.resolve()));else if(_t&&isSameVNodeType(_t,yt))ht(_t,yt,te,st,ot,mt,ct,ut,dt),setActiveBranch(mt,yt);else if(triggerEvent(ee,"onPending"),mt.pendingBranch=yt,yt.shapeFlag&512?mt.pendingId=yt.component.suspenseId:mt.pendingId=suspenseId++,ht(null,yt,mt.hiddenContainer,null,ot,mt,ct,ut,dt),mt.deps<=0)mt.resolve();else{const{timeout:Ot,pendingId:kt}=mt;Ot>0?setTimeout(()=>{mt.pendingId===kt&&mt.fallback(vt)},Ot):Ot===0&&mt.fallback(vt)}}function createSuspenseBoundary(ne,ee,te,st,ot,ct,ut,dt,ht,ft,pt=!1){const{p:mt,m:yt,um:vt,n:_t,o:{parentNode:bt,remove:xt}}=ft;let Mt;const Ot=isVNodeSuspensible(ne);Ot&&ee&&ee.pendingBranch&&(Mt=ee.pendingId,ee.deps++);const kt=ne.props?toNumber(ne.props.timeout):void 0,Nt=ct,Gt={vnode:ne,parent:ee,parentComponent:te,namespace:ut,container:st,hiddenContainer:ot,deps:0,pendingId:suspenseId++,timeout:typeof kt=="number"?kt:-1,activeBranch:null,isFallbackMountPending:!1,pendingBranch:null,isInFallback:!pt,isHydrating:pt,isUnmounted:!1,effects:[],resolve(Bt=!1,Ut=!1){const{vnode:Vt,activeBranch:Ht,pendingBranch:zt,pendingId:jt,effects:Wt,parentComponent:Jt,container:Qt,isInFallback:oi}=Gt;let ai=!1;if(Gt.isHydrating)Gt.isHydrating=!1;else if(!Bt){ai=Ht&&zt.transition&&zt.transition.mode==="out-in";let Nn=!1;ai&&(Ht.transition.afterLeave=()=>{jt===Gt.pendingId&&(yt(zt,Qt,ct===Nt&&!Nn?_t(Ht):ct,0),queuePostFlushCb(Wt),oi&&Vt.ssFallback&&(Vt.ssFallback.el=null))}),Ht&&!Gt.isFallbackMountPending&&(bt(Ht.el)===Qt&&(ct=_t(Ht),Nn=!0),vt(Ht,Jt,Gt,!0),!ai&&oi&&Vt.ssFallback&&queuePostRenderEffect(()=>Vt.ssFallback.el=null,Gt)),ai||yt(zt,Qt,ct,0)}Gt.isFallbackMountPending=!1,setActiveBranch(Gt,zt),Gt.pendingBranch=null,Gt.isInFallback=!1;let xn=Gt.parent,An=!1;for(;xn;){if(xn.pendingBranch){for(let Nn=0;Nn<Wt.length;Nn++)xn.effects.push(Wt[Nn]);An=!0;break}xn=xn.parent}!An&&!ai&&queuePostFlushCb(Wt),Gt.effects=[],Ot&&ee&&ee.pendingBranch&&Mt===ee.pendingId&&(ee.deps--,ee.deps===0&&!Ut&&ee.resolve()),triggerEvent(Vt,"onResolve")},fallback(Bt){if(!Gt.pendingBranch)return;const{vnode:Ut,activeBranch:Vt,parentComponent:Ht,container:zt,namespace:jt}=Gt;triggerEvent(Ut,"onFallback");const Wt=_t(Vt),Jt=()=>{if(Gt.isFallbackMountPending=!1,!Gt.isInFallback)return;const oi=Gt.vnode.ssFallback;mt(null,oi,zt,Wt,Ht,null,jt,dt,ht),setActiveBranch(Gt,oi)}
vendor: 10,713 bytes, line 20
20,Qt=Bt.transition&&Bt.transition.mode==="out-in";Qt&&(Gt.isFallbackMountPending=!0,Vt.transition.afterLeave=Jt),Gt.isInFallback=!0,vt(Vt,Ht,null,!0),Qt||Jt()},move(Bt,Ut,Vt){Gt.activeBranch&&yt(Gt.activeBranch,Bt,Ut,Vt),Gt.container=Bt},next(){return Gt.activeBranch&&_t(Gt.activeBranch)},registerDep(Bt,Ut,Vt){const Ht=!!Gt.pendingBranch;Ht&&Gt.deps++;const zt=Bt.vnode.el;Bt.asyncDep.catch(jt=>{handleError(jt,Bt,0)}).then(jt=>{if(Bt.isUnmounted||Gt.isUnmounted||Gt.pendingId!==Bt.suspenseId)return;unsetCurrentInstance(),Bt.asyncResolved=!0;const{vnode:Wt}=Bt;handleSetupResult(Bt,jt,!1),zt&&(Wt.el=zt);const Jt=!zt&&Bt.subTree.el;Ut(Bt,Wt,bt(zt||Bt.subTree.el),zt?null:_t(Bt.subTree),Gt,ut,Vt),Jt&&(Wt.placeholder=null,xt(Jt)),updateHOCHostEl(Bt,Wt.el),Ht&&--Gt.deps===0&&Gt.resolve()})},unmount(Bt,Ut){Gt.isUnmounted=!0,Gt.activeBranch&&vt(Gt.activeBranch,te,Bt,Ut),Gt.pendingBranch&&vt(Gt.pendingBranch,te,Bt,Ut)}};return Gt}function hydrateSuspense(ne,ee,te,st,ot,ct,ut,dt,ht){const ft=ee.suspense=createSuspenseBoundary(ee,st,te,ne.parentNode,document.createElement("div"),null,ot,ct,ut,dt,!0),pt=ht(ne,ft.pendingBranch=ee.ssContent,te,ft,ct,ut);return ft.deps===0&&ft.resolve(!1,!0),pt}function normalizeSuspenseChildren(ne){const{shapeFlag:ee,children:te}=ne,st=ee&32;ne.ssContent=normalizeSuspenseSlot(st?te.default:te),ne.ssFallback=st?normalizeSuspenseSlot(te.fallback):createVNode(Comment)}function normalizeSuspenseSlot(ne){let ee;if(isFunction$1(ne)){const te=isBlockTreeEnabled&&ne._c;te&&(ne._d=!1,openBlock()),ne=ne(),te&&(ne._d=!0,ee=currentBlock,closeBlock())}return isArray$1(ne)&&(ne=filterSingleRoot(ne)),ne=normalizeVNode(ne),ee&&!ne.dynamicChildren&&(ne.dynamicChildren=ee.filter(te=>te!==ne)),ne}function queueEffectWithSuspense(ne,ee){ee&&ee.pendingBranch?isArray$1(ne)?ee.effects.push(...ne):ee.effects.push(ne):queuePostFlushCb(ne)}function setActiveBranch(ne,ee){ne.activeBranch=ee;const{vnode:te,parentComponent:st}=ne;let ot=ee.el;for(;!ot&&ee.component;)ee=ee.component.subTree,ot=ee.el;te.el=ot,st&&st.subTree===te&&(st.vnode.el=ot,updateHOCHostEl(st,ot))}function isVNodeSuspensible(ne){const ee=ne.props&&ne.props.suspensible;return ee!=null&&ee!==!1}const Fragment=Symbol.for("v-fgt"),Text$1=Symbol.for("v-txt"),Comment=Symbol.for("v-cmt"),Static=Symbol.for("v-stc"),blockStack=[];let currentBlock=null;function openBlock(ne=!1){blockStack.push(currentBlock=ne?null:[])}function closeBlock(){blockStack.pop(),currentBlock=blockStack[blockStack.length-1]||null}let isBlockTreeEnabled=1;function setBlockTracking(ne,ee=!1){isBlockTreeEnabled+=ne,ne<0&&currentBlock&&ee&&(currentBlock.hasOnce=!0)}function setupBlock(ne){return ne.dynamicChildren=isBlockTreeEnabled>0?currentBlock||EMPTY_ARR:null,closeBlock(),isBlockTreeEnabled>0&&currentBlock&&currentBlock.push(ne),ne}function createElementBlock(ne,ee,te,st,ot,ct){return setupBlock(createBaseVNode(ne,ee,te,st,ot,ct,!0))}function createBlock(ne,ee,te,st,ot){return setupBlock(createVNode(ne,ee,te,st,ot,!0))}function isVNode(ne){return ne?ne.__v_isVNode===!0:!1}function isSameVNodeType(ne,ee){return ne.type===ee.type&&ne.key===ee.key}function transformVNodeArgs(ne){}const normalizeKey=({key:ne})=>ne??null,normalizeRef=({ref:ne,ref_key:ee,ref_for:te})=>(typeof ne=="number"&&(ne=""+ne),ne!=null?isString(ne)||isRef(ne)||isFunction$1(ne)?{i:currentRenderingInstance,r:ne,k:ee,f:!!te}:ne:null);function createBaseVNode(ne,ee=null,te=null,st=0,ot=null,ct=ne===Fragment?0:1,ut=!1,dt=!1){const ht={__v_isVNode:!0,__v_skip:!0,type:ne,props:ee,key:ee&&normalizeKey(ee),ref:ee&&normalizeRef(ee),scopeId:currentScopeId,slotScopeIds:null,children:te,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:ct,patchFlag:st,dynamicProps:ot,dynamicChildren:null,appContext:null,ctx:currentRenderingInstance};return dt?(normalizeChildren(ht,te),ct&128&&ne.normalize(ht)):te&&(ht.shapeFlag|=isString(te)?8:16),isBlockTreeEnabled>0&&!ut&&currentBlock&&(ht.patchFlag>0||ct&6)&&ht.patchFlag!==32&&currentBlock.push(ht),ht}const createVNode=_createVNode;function _createVNode(ne,ee=null,te=null,st=0,ot=null,ct=!1){if((!ne||ne===NULL_DYNAMIC_COMPONENT)&&(ne=Comment),isVNode(ne)){const dt=cloneVNode(ne,ee,!0);return te&&normalizeChildren(dt,te),isBlockTreeEnabled>0&&!ct&&currentBlock&&(dt.shapeFlag&6?currentBlock[currentBlock.indexOf(ne)]=dt:currentBlock.push(dt)),dt.patchFlag=-2,dt}if(isClassComponent(ne)&&(ne=ne.__vccOpts),ee){ee=guardReactiveProps(ee);let{class:dt,style:ht}=ee;dt&&!isString(dt)&&(ee.class=normalizeClass(dt)),isObject$2(ht)&&(isProxy(ht)&&!isArray$1(ht)&&(ht=extend$5({},ht)),ee.style=normalizeStyle(ht))}const ut=isString(ne)?1:isSuspense(ne)?128:isTeleport(ne)?64:isObject$2(ne)?4:isFunction$1(ne)?2:0;return createBaseVNode(ne,ee,te,st,ot,ut,ct,!0)}function guardReactiveProps(ne){return ne?isProxy(ne)||isInternalObject(ne)?extend$5({},ne):ne:null}function cloneVNode(ne,ee,te=!1,st=!1){const{props:ot,ref:ct,patchFlag:ut,children:dt,transition:ht}=ne,ft=ee?mergeProps(ot||{},ee):ot,pt={__v_isVNode:!0,__v_skip:!0,type:ne.type,props:ft,key:ft&&normalizeKey(ft),ref:ee&&ee.ref?te&&ct?isArray$1(ct)?ct.concat(normalizeRef(ee)):[ct,normalizeRef(ee)]:normalizeRef(ee):ct,scopeId:ne.scopeId,slotScopeIds:ne.slotScopeIds,children:dt,target:ne.target,targetStart:ne.targetStart,targetAnchor:ne.targetAnchor,staticCount:ne.staticCount,shapeFlag:ne.shapeFlag,patchFlag:ee&&ne.type!==Fragment?ut===-1?16:ut|16:ut,dynamicProps:ne.dynamicProps,dynamicChildren:ne.dynamicChildren,appContext:ne.appContext,dirs:ne.dirs,transition:ht,component:ne.component,suspense:ne.suspense,ssContent:ne.ssContent&&cloneVNode(ne.ssContent),ssFallback:ne.ssFallback&&cloneVNode(ne.ssFallback),placeholder:ne.placeholder,el:ne.el,anchor:ne.anchor,ctx:ne.ctx,ce:ne.ce};return ht&&st&&setTransitionHooks(pt,ht.clone(pt)),pt}function createTextVNode(ne=" ",ee=0){return createVNode(Text$1,null,ne,ee)}function createStaticVNode(ne,ee){const te=createVNode(Static,null,ne);return te.staticCount=ee,te}function createCommentVNode(ne="",ee=!1){return ee?(openBlock(),createBlock(Comment,null,ne)):createVNode(Comment,null,ne)}function normalizeVNode(ne){return ne==null||typeof ne=="boolean"?createVNode(Comment):isArray$1(ne)?createVNode(Fragment,null,ne.slice()):isVNode(ne)?cloneIfMounted(ne):createVNode(Text$1,null,String(ne))}function cloneIfMounted(ne){return ne.el===null&&ne.patchFlag!==-1||ne.memo?ne:cloneVNode(ne)}function normalizeChildren(ne,ee){let te=0;const{shapeFlag:st}=ne;if(ee==null)ee=null;else if(isArray$1(ee))te=16;else if(typeof ee=="object")if(st&65){const ot=ee.default;ot&&(ot._c&&(ot._d=!1),normalizeChildren(ne,ot()),ot._c&&(ot._d=!0));return}else{te=32;const ot=ee._;!ot&&!isInternalObject(ee)?ee._ctx=currentRenderingInstance:ot===3&&currentRenderingInstance&&(currentRenderingInstance.slots._===1?ee._=1:(ee._=2,ne.patchFlag|=1024))}else if(isFunction$1(ee)){if(st&65){normalizeChildren(ne,{default:ee});return}ee={default:ee,_ctx:currentRenderingInstance},te=32}else ee=String(ee),st&64?(te=16,ee=[createTextVNode(ee)]):te=8;ne.children=ee,ne.shapeFlag|=te}function mergeProps(...ne){const ee={};for(let te=0;te<ne.length;te++){const st=ne[te];for(const ot in st)if(ot==="class")ee.class!==st.class&&(ee.class=normalizeClass([ee.class,st.class]));else if(ot==="style")ee.style=normalizeStyle([ee.style,st.style]);else if(isOn(ot)){const ct=ee[ot],ut=st[ot];ut&&ct!==ut&&!(isArray$1(ct)&&ct.includes(ut))?ee[ot]=ct?[].concat(ct,ut):ut:ut==null&&ct==null&&!isModelListener(ot)&&(ee[ot]=ut)}else ot!==""&&(ee[ot]=st[ot])}return ee}function invokeVNodeHook(ne,ee,te,st=null){callWithAsyncErrorHandling(ne,ee,7,[te,st])}const emptyAppContext=createAppContext();let uid=0;function createComponentInstance(ne,ee,te){const st=ne.type,ot=(ee?ee.appContext:ne.appContext)||emptyAppContext,ct={uid:uid++,vnode:ne,type:st,parent:ee,appContext:ot,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new EffectScope(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:ee?ee.provides:Object.create(ot.provides),ids:ee?ee.ids:["",0,0],accessCache:null,renderCache:[],components:null,directives:null,propsOptions:normalizePropsOptions(st,ot),emitsOptions:normalizeEmitsOptions(st,ot),emit:null,emitted:null,propsDefaults:EMPTY_OBJ,inheritAttrs:st.inheritAttrs,ctx:EMPTY_OBJ,data:EMPTY_OBJ,props:EMPTY_OBJ,attrs:EMPTY_OBJ,slots:EMPTY_OBJ,refs:EMPTY_OBJ,setupState:EMPTY_OBJ,setupContext:null,suspense:te,suspenseId:te?te.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};return ct.ctx={_:ct},ct.root=ee?ee.root:ct,ct.emit=emit.bind(null,ct),ne.ce&&ne.ce(ct),ct}let currentInstance=null;const getCurrentInstance=()=>currentInstance||currentRenderingInstance;let internalSetCurrentInstance,setInSSRSetupState;{const ne=getGlobalThis(),ee=(te,st)=>{let ot;return(ot=ne[te])||(ot=ne[te]=[]),ot.push(st),ct=>{ot.length>1?ot.forEach(ut=>ut(ct)):ot[0](ct)}};internalSetCurrentInstance=ee("__VUE_INSTANCE_SETTERS__",te=>currentInstance=te),setInSSRSetupState=ee("__VUE_SSR_SETTERS__",te=>isInSSRComponentSetup=te)}const setCurrentInstance=ne=>{const ee=currentInstance;return internalSetCurrentInstance(ne),ne.scope.on(),()=>{ne.scope.off(),internalSetCurrentInstance(ee)}},unsetCurrentInstance=()=>{currentInstance&&currentInstance.scope.off(),internalSetCurrentInstance(null)};function isStatefulComponent(ne){return ne.vnode.shapeFlag&4}let isInSSRComponentSetup=!1;function setupComponent(ne,ee=!1,te=!1){ee&&setInSSRSetupState(ee);const{props:st,children:ot}=ne.vnode,ct=isStatefulComponent(ne);initProps(ne,st,ct,ee),initSlots(ne,ot,te||ee);const ut=ct?setupStatefulComponent(ne,ee):void 0;return ee&&setInSSRSetupState(!1),ut}function setupStatefulComponent(ne,ee){const te=ne.type;ne.accessCache=Object.create(null),ne.proxy=new Proxy(ne.ctx,PublicInstanceProxyHandlers);const{setup:st}=te;if(st){pauseTracking();const ot=ne.setupContext=st.length>1?createSetupContext(ne):null,ct=setCurrentInstance(ne),ut=callWithErrorHandling(st,ne,0,[ne.props,ot]),dt=isPromise(ut);if(resetTracking(),ct(),(dt||ne.sp)&&!isAsyncWrapper(ne)&&markAsyncBoundary(ne),dt){if(ut.then(unsetCurrentInstance,unsetCurrentInstance),ee)return ut.then(ht=>{setInSSRSetupState(!0);try{handleSetupResult(ne,ht,ee)}finally{setInSSRSetupState(!1)}}).catch(ht=>{handleError(ht,ne,0)});ne.asyncDep=ut}else handleSetupResult(ne,ut,ee)}else finishComponentSetup(ne,ee)}function handleSetupResult(ne,ee,te){isFunction$1(ee)?ne.type.__ssrInlineRe
20nder?ne.ssrRender=ee:ne.render=ee:isObject$2(ee)&&(ne.setupState=proxyRefs(ee)),finishComponentSetup(ne,te)}let compile$2,installWithProxy;function registerRuntimeCompiler(ne){compile$2=ne,installWithProxy=ee=>{ee.render._rc&&(ee.withProxy=new Proxy(ee.ctx,RuntimeCompiledPublicInstanceProxyHandlers))}}const isRuntimeOnly=()=>!compile$2;function finishComponentSetup(ne,ee,te){const st=ne.type;if(!ne.render){if(!ee&&compile$2&&!st.render){const ot=st.template||resolveMergedOptions(ne).template;if(ot){const{isCustomElement:ct,compilerOptions:ut}=ne.appContext.config,{delimiters:dt,compilerOptions:ht}=st,ft=extend$5(extend$5({isCustomElement:ct,delimiters:dt},ut),ht);st.render=compile$2(ot,ft)}}ne.render=st.render||NOOP,installWithProxy&&installWithProxy(ne)}{const ot=setCurrentInstance(ne);pauseTracking();try{applyOptions(ne)}finally{resetTracking(),ot()}}}const attrsProxyHandlers={get(ne,ee){return track(ne,"get",""),ne[ee]}};function createSetupContext(ne){const ee=te=>{ne.exposed=te||{}};return{attrs:new Proxy(ne.attrs,attrsProxyHandlers),slots:ne.slots,emit:ne.emit,expose:ee}}function getComponentPublicInstance(ne){return ne.exposed?ne.exposeProxy||(ne.exposeProxy=new Proxy(proxyRefs(markRaw(ne.exposed)),{get(ee,te){if(te in ee)return ee[te];if(te in publicPropertiesMap)return publicPropertiesMap[te](ne)},has(ee,te){return te in ee||te in publicPropertiesMap}})):ne.proxy}const classifyRE=/(?:^|[-_])\w/g,classify=ne=>ne.replace(classifyRE,ee=>ee.toUpperCase()).replace(/[-_]/g,"");function getComponentName(ne,ee=!0){return isFunction$1(ne)?ne.displayName||ne.name:ne.name||ee&&ne.__name}function formatComponentName(ne,ee,te=!1){let st=getComponentName(ee);if(!st&&ee.__file){const ot=ee.__file.match(/([^/\\]+)\.\w+$/);ot&&(st=ot[1])}if(!st&&ne){const ot=ct=>{for(const ut in ct)if(ct[ut]===ee)return ut};st=ot(ne.components)||ne.parent&&ot(ne.parent.type.components)||ot(ne.appContext.components)}return st?classify(st):te?"App":"Anonymous"}function isClassComponent(ne){return isFunction$1(ne)&&"__vccOpts"in ne}const computed=(ne,ee)=>computed$1(ne,ee,isInSSRComponentSetup);function h$3(ne,ee,te){try{setBlockTracking(-1);const st=arguments.length;return st===2?isObject$2(ee)&&!isArray$1(ee)?isVNode(ee)?createVNode(ne,null,[ee]):createVNode(ne,ee):createVNode(ne,null,ee):(st>3?te=Array.prototype.slice.call(arguments,2):st===3&&isVNode(te)&&(te=[te]),createVNode(ne,ee,te))}finally{setBlockTracking(1)}}function initCustomFormatter(){}function withMemo(ne,ee,te,st){const ot=te[st];if(ot&&isMemoSame(ot,ne))return ot;const ct=ee();return ct.memo=ne.slice(),ct.cacheIndex=st,te[st]=ct}function isMemoSame(ne,ee){const te=ne.memo;if(te.length!=ee.length)return!1;for(let st=0;st<te.length;st++)if(hasChanged(te[st],ee[st]))return!1;return isBlockTreeEnabled>0&&currentBlock&&currentBlock.push(ne),!0}const version$3="3.5.42",warn$2=NOOP,ErrorTypeStrings=ErrorTypeStrings$1,devtools=devtools$1,setDevtoolsHook=setDevtoolsHook$1,_ssrUtils={createComponentInstance,setupComponent,renderComponentRoot,setCurrentRenderingInstance,isVNode,normalizeVNode,getComponentPublicInstance,ensureValidVNode,pushWarningContext,popWarningContext},ssrUtils=_ssrUtils,resolveFilter=null,compatUtils=null,DeprecationTypes=null;/**
21* @vue/runtime-dom v3.5.42
22* (c) 2018-present Yuxi (Evan) You and Vue contributors
23* @license MIT
24**/let policy;const tt$2=typeof window<"u"&&window.trustedTypes;if(tt$2)try{policy=tt$2.createPolicy("vue",{createHTML:ne=>ne})}catch{}const unsafeToTrustedHTML=policy?ne=>policy.createHTML(ne):ne=>ne,svgNS="http://www.w3.org/2000/svg",mathmlNS="http://www.w3.org/1998/Math/MathML",doc=typeof document<"u"?document:null,templateContainer=doc&&doc.createElement("template"),nodeOps={insert:(ne,ee,te)=>{ee.insertBefore(ne,te||null)},remove:ne=>{const ee=ne.parentNode;ee&&ee.removeChild(ne)},createElement:(ne,ee,te,st)=>{const ot=ee==="svg"?doc.createElementNS(svgNS,ne):ee==="mathml"?doc.createElementNS(mathmlNS,ne):te?doc.createElement(ne,{is:te}):doc.createElement(ne);return ne==="select"&&st&&st.multiple!=null&&ot.setAttribute("multiple",st.multiple),ot},createText:ne=>doc.createTextNode(ne),createComment:ne=>doc.createComment(ne),setText:(ne,ee)=>{ne.nodeValue=ee},setElementText:(ne,ee)=>{ne.textContent=ee},parentNode:ne=>ne.parentNode,nextSibling:ne=>ne.nextSibling,querySelector:ne=>doc.querySelector(ne),setScopeId(ne,ee){ne.setAttribute(ee,"")},insertStaticContent(ne,ee,te,st,ot,ct){const ut=te?te.previousSibling:ee.lastChild;if(ot&&(ot===ct||ot.nextSibling))for(;ee.insertBefore(ot.cloneNode(!0),te),!(ot===ct||!(ot=ot.nextSibling)););else{templateContainer.innerHTML=unsafeToTrustedHTML(st==="svg"?`<svg>${ne}</svg>`:st==="mathml"?`<math>${ne}</math>`:ne);const dt=templateContainer.content;if(st==="svg"||st==="mathml"){const ht=dt.firstChild;for(;ht.firstChild;)dt.appendChild(ht.firstChild);dt.removeChild(ht)}ee.insertBefore(dt,te)}return[ut?ut.nextSibling:ee.firstChild,te?te.previousSibling:ee.lastChild]}},TRANSITION$1="transition",ANIMATION="animation",vtcKey=Symbol("_vtc"),DOMTransitionPropsValidators={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},TransitionPropsValidators=extend$5({},BaseTransitionPropsValidators,DOMTransitionPropsValidators),decorate$1=ne=>(ne.displayName="Transition",ne.props=TransitionPropsValidators,ne),Transition=decorate$1((ne,{slots:ee})=>h$3(BaseTransition,resolveTransitionProps(ne),ee)),callHook=(ne,ee=[])=>{isArray$1(ne)?ne.forEach(te=>te(...ee)):ne&&ne(...ee)},hasExplicitCallback=ne=>ne?isArray$1(ne)?ne.some(ee=>ee.length>1):ne.length>1:!1;function resolveTransitionProps(ne){const ee={};for(const Wt in ne)Wt in DOMTransitionPropsValidators||(ee[Wt]=ne[Wt]);if(ne.css===!1)return ee;const{name:te="v",type:st,duration:ot,enterFromClass:ct=`${te}-enter-from`,enterActiveClass:ut=`${te}-enter-active`,enterToClass:dt=`${te}-enter-to`,appearFromClass:ht=ct,appearActiveClass:ft=ut,appearToClass:pt=dt,leaveFromClass:mt=`${te}-leave-from`,leaveActiveClass:yt=`${te}-leave-active`,leaveToClass:vt=`${te}-leave-to`}=ne,_t=normalizeDuration(ot),bt=_t&&_t[0],xt=_t&&_t[1],{onBeforeEnter:Mt,onEnter:Ot,onEnterCancelled:kt,onLeave:Nt,onLeaveCancelled:Gt,onBeforeAppear:Bt=Mt,onAppear:Ut=Ot,onAppearCancelled:Vt=kt}=ee,Ht=(Wt,Jt,Qt,oi)=>{Wt._enterCancelled=oi,removeTransitionClass(Wt,Jt?pt:dt),removeTransitionClass(Wt,Jt?ft:ut),Qt&&Qt()},zt=(Wt,Jt)=>{Wt._isLeaving=!1,removeTransitionClass(Wt,mt),removeTransitionClass(Wt,vt),removeTransitionClass(Wt,yt),Jt&&Jt()},jt=Wt=>(Jt,Qt)=>{const oi=Wt?Ut:Ot,ai=()=>Ht(Jt,Wt,Qt);callHook(oi,[Jt,ai]),nextFrame(()=>{removeTransitionClass(Jt,Wt?ht:ct),addTransitionClass(Jt,Wt?pt:dt),hasExplicitCallback(oi)||whenTransitionEnds(Jt,st,bt,ai)})};return extend$5(ee,{onBeforeEnter(Wt){callHook(Mt,[Wt]),addTransitionClass(Wt,ct),addTransitionClass(Wt,ut)},onBeforeAppear(Wt){callHook(Bt,[Wt]),addTransitionClass(Wt,ht),addTransitionClass(Wt,ft)},onEnter:jt(!1),onAppear:jt(!0),onLeave(Wt,Jt){Wt._isLeaving=!0;const Qt=()=>zt(Wt,Jt);addTransitionClass(Wt,mt),Wt._enterCancelled?(addTransitionClass(Wt,yt),forceReflow(Wt)):(forceReflow(Wt),addTransitionClass(Wt,yt)),nextFrame(()=>{Wt._isLeaving&&(removeTransitionClass(Wt,mt),addTransitionClass(Wt,vt),hasExplicitCallback(Nt)||whenTransitionEnds(Wt,st,xt,Qt))}),callHook(Nt,[Wt,Qt])},onEnterCancelled(Wt){Ht(Wt,!1,void 0,!0),callHook(kt,[Wt])},onAppearCancelled(Wt){Ht(Wt,!0,void 0,!0),callHook(Vt,[Wt])},onLeaveCancelled(Wt){zt(Wt),callHook(Gt,[Wt])}})}function normalizeDuration(ne){if(ne==null)return null;if(isObject$2(ne))return[NumberOf(ne.enter),NumberOf(ne.leave)];{const ee=NumberOf(ne);return[ee,ee]}}function NumberOf(ne){return toNumber(ne)}
vendor: 6,259 bytes, line 24
24function addTransitionClass(ne,ee){ee.split(/\s+/).forEach(te=>te&&ne.classList.add(te)),(ne[vtcKey]||(ne[vtcKey]=new Set)).add(ee)}function removeTransitionClass(ne,ee){ee.split(/\s+/).forEach(st=>st&&ne.classList.remove(st));const te=ne[vtcKey];te&&(te.delete(ee),te.size||(ne[vtcKey]=void 0))}function nextFrame(ne){requestAnimationFrame(()=>{requestAnimationFrame(ne)})}let endId=0;function whenTransitionEnds(ne,ee,te,st){const ot=ne._endId=++endId,ct=()=>{ot===ne._endId&&st()};if(te!=null)return setTimeout(ct,te);const{type:ut,timeout:dt,propCount:ht}=getTransitionInfo(ne,ee);if(!ut)return st();const ft=ut+"end";let pt=0;const mt=()=>{ne.removeEventListener(ft,yt),ct()},yt=vt=>{vt.target===ne&&++pt>=ht&&mt()};setTimeout(()=>{pt<ht&&mt()},dt+1),ne.addEventListener(ft,yt)}function getTransitionInfo(ne,ee){const te=window.getComputedStyle(ne),st=_t=>(te[_t]||"").split(", "),ot=st(`${TRANSITION$1}Delay`),ct=st(`${TRANSITION$1}Duration`),ut=getTimeout(ot,ct),dt=st(`${ANIMATION}Delay`),ht=st(`${ANIMATION}Duration`),ft=getTimeout(dt,ht);let pt=null,mt=0,yt=0;ee===TRANSITION$1?ut>0&&(pt=TRANSITION$1,mt=ut,yt=ct.length):ee===ANIMATION?ft>0&&(pt=ANIMATION,mt=ft,yt=ht.length):(mt=Math.max(ut,ft),pt=mt>0?ut>ft?TRANSITION$1:ANIMATION:null,yt=pt?pt===TRANSITION$1?ct.length:ht.length:0);const vt=pt===TRANSITION$1&&/\b(?:transform|all)(?:,|$)/.test(st(`${TRANSITION$1}Property`).toString());return{type:pt,timeout:mt,propCount:yt,hasTransform:vt}}function getTimeout(ne,ee){for(;ne.length<ee.length;)ne=ne.concat(ne);return Math.max(...ee.map((te,st)=>toMs(te)+toMs(ne[st])))}function toMs(ne){return ne==="auto"?0:Number(ne.slice(0,-1).replace(",","."))*1e3}function forceReflow(ne){return(ne?ne.ownerDocument:document).body.offsetHeight}function patchClass(ne,ee,te){const st=ne[vtcKey];st&&(ee=(ee?[ee,...st]:[...st]).join(" ")),ee==null?ne.removeAttribute("class"):te?ne.setAttribute("class",ee):ne.className=ee}const vShowOriginalDisplay=Symbol("_vod"),vShowHidden=Symbol("_vsh"),vShow={name:"show",beforeMount(ne,{value:ee},{transition:te}){ne[vShowOriginalDisplay]=ne.style.display==="none"?"":ne.style.display,te&&ee?te.beforeEnter(ne):setDisplay(ne,ee)},mounted(ne,{value:ee},{transition:te}){te&&ee&&te.enter(ne)},updated(ne,{value:ee,oldValue:te},{transition:st}){!ee!=!te&&(st?ee?(st.beforeEnter(ne),setDisplay(ne,!0),st.enter(ne)):st.leave(ne,()=>{setDisplay(ne,!1)}):setDisplay(ne,ee))},beforeUnmount(ne,{value:ee}){setDisplay(ne,ee)}};function setDisplay(ne,ee){ne.style.display=ee?ne[vShowOriginalDisplay]:"none",ne[vShowHidden]=!ee}function initVShowForSSR(){vShow.getSSRProps=({value:ne})=>{if(!ne)return{style:{display:"none"}}}}const CSS_VAR_TEXT=Symbol("");function useCssVars(ne){const ee=getCurrentInstance();if(!ee)return;const te=ee.ut=(ot=ne(ee.proxy))=>{Array.from(document.querySelectorAll(`[data-v-owner="${ee.uid}"]`)).forEach(ct=>setVarsOnNode(ct,ot))},st=()=>{const ot=ne(ee.proxy);ee.ce?setVarsOnNode(ee.ce,ot):setVarsOnVNode(ee.subTree,ot),te(ot)};onBeforeUpdate(()=>{queuePostFlushCb(st)}),onMounted(()=>{watch(st,NOOP,{flush:"post"});const ot=new MutationObserver(st);ot.observe(ee.subTree.el.parentNode,{childList:!0}),onUnmounted(()=>ot.disconnect())})}function setVarsOnVNode(ne,ee){if(ne.shapeFlag&128){const te=ne.suspense;ne=te.activeBranch,te.pendingBranch&&!te.isHydrating&&te.effects.push(()=>{setVarsOnVNode(te.activeBranch,ee)})}for(;ne.component;)ne=ne.component.subTree;if(ne.shapeFlag&1&&ne.el)setVarsOnNode(ne.el,ee);else if(ne.type===Fragment)ne.children.forEach(te=>setVarsOnVNode(te,ee));else if(ne.type===Static){let{el:te,anchor:st}=ne;for(;te&&(setVarsOnNode(te,ee),te!==st);)te=te.nextSibling}}function setVarsOnNode(ne,ee){if(ne.nodeType===1){const te=ne.style;let st="";for(const ot in ee){const ct=normalizeCssVarValue(ee[ot]);te.setProperty(`--${ot}`,ct),st+=`--${ot}: ${ct};`}te[CSS_VAR_TEXT]=st}}const displayRE=/(?:^|;)\s*display\s*:/;function patchStyle(ne,ee,te){const st=ne.style,ot=isString(te);let ct=!1;if(te&&!ot){if(ee)if(isString(ee))for(const ut of ee.split(";")){const dt=ut.slice(0,ut.indexOf(":")).trim();te[dt]==null&&setStyle(st,dt,"")}else for(const ut in ee)te[ut]==null&&setStyle(st,ut,"");for(const ut in te){ut==="display"&&(ct=!0);const dt=te[ut];dt!=null?shouldPreserveTextareaResizeStyle(ne,ut,!isString(ee)&&ee?ee[ut]:void 0,dt)||setStyle(st,ut,dt):setStyle(st,ut,"")}}else if(ot){if(ee!==te){const ut=st[CSS_VAR_TEXT];ut&&(te+=";"+ut),st.cssText=te,ct=displayRE.test(te)}}else ee&&ne.removeAttribute("style");vShowOriginalDisplay in ne&&(ne[vShowOriginalDisplay]=ct?st.display:"",ne[vShowHidden]&&(st.display="none"))}const importantRE=/\s*!important$/;function setStyle(ne,ee,te){if(isArray$1(te))te.forEach(st=>setStyle(ne,ee,st));else if(te==null&&(te=""),ee.startsWith("--"))importantRE.test(te)?ne.setProperty(ee,te.replace(importantRE,""),"important"):ne.setProperty(ee,te);else{const st=autoPrefix(ne,ee);importantRE.test(te)?ne.setProperty(hyphenate(st),te.replace(importantRE,""),"important"):ne[st]=te}}const prefixes=["Webkit","Moz","ms"],prefixCache={};function autoPrefix(ne,ee){const te=prefixCache[ee];if(te)return te;let st=camelize(ee);if(st!=="filter"&&st in ne)return prefixCache[ee]=st;st=capitalize(st);for(let ot=0;ot<prefixes.length;ot++){const ct=prefixes[ot]+st;if(ct in ne)return prefixCache[ee]=ct}return ee}function shouldPreserveTextareaResizeStyle(ne,ee,te,st){return ne.tagName==="TEXTAREA"&&(ee==="width"||ee==="height")&&isString(st)&&te===st}const xlinkNS="http://www.w3.org/1999/xlink";function patchAttr(ne,ee,te,st,ot,ct=isSpecialBooleanAttr(ee)){st&&ee.startsWith("xlink:")?te==null?ne.removeAttributeNS(xlinkNS,ee.slice(6,ee.length)):ne.setAttributeNS(xlinkNS,ee,te):te==null||ct&&!includeBooleanAttr(te)?ne.removeAttribute(ee):ne.setAttribute(ee,ct?"":isSymbol(te)?String(te):te)}function patchDOMProp(ne,ee,te,st,ot){if(ee==="innerHTML"||ee==="textContent"){te!=null&&(ne[ee]=ee==="innerHTML"?unsafeToTrustedHTML(te):te);return}const ct=ne.tagName;if(ee==="value"&&ct!=="PROGRESS"&&!ct.includes("-")){const dt=ct==="OPTION"?ne.getAttribute("value")||"":ne.value,ht=te==null?ne.type==="checkbox"?"on":"":String(te);(dt!==ht||!("_value"in ne))&&(ne.value=ht),te==null&&ne.removeAttribute(ee),ne._value=te;return}let ut=!1;
24if(te===""||te==null){const dt=typeof ne[ee];dt==="boolean"?te=includeBooleanAttr(te):te==null&&dt==="string"?(te="",ut=!0):dt==="number"&&(te=0,ut=!0)}try{ne[ee]=te}catch{}ut&&ne.removeAttribute(ot||ee)}function addEventListener(ne,ee,te,st){ne.addEventListener(ee,te,st)}function removeEventListener(ne,ee,te,st){ne.removeEventListener(ee,te,st)}const veiKey=Symbol("_vei");function patchEvent(ne,ee,te,st,ot=null){const ct=ne[veiKey]||(ne[veiKey]={}),ut=ct[ee];if(st&&ut)ut.value=st;else{const[dt,ht]=parseName(ee);if(st){const ft=ct[ee]=createInvoker(st,ot);addEventListener(ne,dt,ft,ht)}else ut&&(removeEventListener(ne,dt,ut,ht),ct[ee]=void 0)}}const optionsModifierRE=/(Once|Passive|Capture)$/,optionsModifierEventRE=/^on:?(?:Once|Passive|Capture)$/;function parseName(ne){let ee,te;for(;(te=ne.match(optionsModifierRE))&&!optionsModifierEventRE.test(ne);)ee||(ee={}),ne=ne.slice(0,ne.length-te[1].length),ee[te[1].toLowerCase()]=!0;return[ne[2]===":"?ne.slice(3):hyphenate(ne.slice(2)),ee]}let cachedNow=0;const p$4=Promise.resolve(),getNow=()=>cachedNow||(p$4.then(()=>cachedNow=0),cachedNow=Date.now());function createInvoker(ne,ee){const te=st=>{if(!st._vts)st._vts=Date.now();else if(st._vts<=te.attached)return;const ot=te.value;if(isArray$1(ot)){const ct=st.stopImmediatePropagation;st.stopImmediatePropagation=()=>{ct.call(st),st._stopped=!0};const ut=ot.slice(),dt=[st];for(let ht=0;ht<ut.length&&!st._stopped;ht++){const ft=ut[ht];ft&&callWithAsyncErrorHandling(ft,ee,5,dt)}}else callWithAsyncErrorHandling(ot,ee,5,[st])};return te.value=ne,te.attached=getNow(),te}const isNativeOn=ne=>ne.charCodeAt(0)===111&&ne.charCodeAt(1)===110&&ne.charCodeAt(2)>96&&ne.charCodeAt(2)<123,patchProp=(ne,ee,te,st,ot,ct)=>{const ut=ot==="svg";ee==="class"?patchClass(ne,st,ut):ee==="style"?patchStyle(ne,te,st):isOn(ee)?isModelListener(ee)||patchEvent(ne,ee,te,st,ct):(ee[0]==="."?(ee=ee.slice(1),!0):ee[0]==="^"?(ee=ee.slice(1),!1):shouldSetAsProp(ne,ee,st,ut))?(patchDOMProp(ne,ee,st),!ne.tagName.includes("-")&&(ee==="value"||ee==="checked"||ee==="selected")&&patchAttr(ne,ee,st,ut,ct,ee!=="value")):ne._isVueCE&&(shouldSetAsPropForVueCE(ne,ee)||ne._def.__asyncLoader&&(/[A-Z]/.test(ee)||!isString(st)))?patchDOMProp(ne,camelize(ee),st,ct,ee):(ee==="true-value"?ne._trueValue=st:ee==="false-value"&&(ne._falseValue=st),patchAttr(ne,ee,st,ut))};function shouldSetAsProp(ne,ee,te,st){if(st)return!!(ee==="innerHTML"||ee==="textContent"||ee in ne&&isNativeOn(ee)&&isFunction$1(te));if(ee==="spellcheck"||ee==="draggable"||ee==="translate"||ee==="autocorrect"||ee==="sandbox"&&ne.tagName==="IFRAME"||ee==="form"||ee==="list"&&ne.tagName==="INPUT"||ee==="type"&&ne.tagName==="TEXTAREA")return!1;if(ee==="width"||ee==="height"){const ot=ne.tagName;if(ot==="IMG"||ot==="VIDEO"||ot==="CANVAS"||ot==="SOURCE")return!1}return isNativeOn(ee)&&isString(te)?!1:ee in ne}function shouldSetAsPropForVueCE(ne,ee){const te=ne._def.props;if(!te)return!1;const st=camelize(ee);return Array.isArray(te)?te.some(ot=>camelize(ot)===st):Object.keys(te).some(ot=>camelize(ot)===st)}const REMOVAL={};function defineCustomElement(ne,ee,te){let st=defineComponent(ne,ee);isPlainObject$2(st)&&(st=extend$5({},st,ee));class ot extends VueElement{constructor(ut){super(st,ut,te)}}return ot.def=st,ot}const defineSSRCustomElement=((ne,ee)=>defineCustomElement(ne,ee,createSSRApp)),BaseClass=typeof HTMLElement<"u"?HTMLElement:class{};class VueElement extends BaseClass{constructor(ee,te={},st=createApp){super(),this._def=ee,this._props=te,this._createApp=st,this._isVueCE=!0,this._instance=null,this._app=null,this._nonce=this._def.nonce,this._connected=!1,this._resolved=!1,this._patching=!1,this._dirty=!1,this._numberProps=null,this._styleChildren=new WeakSet,this._styleAnchors=new WeakMap,this._ob=null,this.shadowRoot&&st!==createApp?this._root=this.shadowRoot:ee.shadowRoot!==!1?(this.attachShadow(extend$5({},ee.shadowRootOptions,{mode:"open"})),this._root=this.shadowRoot):this._root=this}connectedCallback(){if(!this.isConnected)return;!this.shadowRoot&&!this._resolved&&this._parseSlots(),this._connected=!0;let ee=this;for(;ee=ee&&(ee.assignedSlot||ee.parentNode||ee.host);)if(ee instanceof VueElement){this._parent=ee;break}this._instance||(this._resolved?this._mount(this._def):ee&&ee._pendingResolve?this._pendingResolve=ee._pendingResolve.then(()=>
vendor: 2,957 bytes, line 24
24{if(this._pendingResolve=void 0,this.isConnected)return this._resolveDef()}):this._resolveDef())}_setParent(ee=this._parent){ee&&(this._instance.parent=ee._instance,this._inheritParentContext(ee))}_inheritParentContext(ee=this._parent){ee&&this._app&&Object.setPrototypeOf(this._app._context.provides,ee._instance.provides)}disconnectedCallback(){this._connected=!1,nextTick(()=>{this._connected||(this._ob&&(this._ob.disconnect(),this._ob=null),this._app&&this._app.unmount(),this._instance&&(this._instance.ce=void 0),this._app=this._instance=null,this._teleportTargets&&(this._teleportTargets.clear(),this._teleportTargets=void 0))})}_processMutations(ee){for(const te of ee)this._setAttr(te.attributeName)}_resolveDef(){if(this._pendingResolve)return this._pendingResolve;for(let st=0;st<this.attributes.length;st++)this._setAttr(this.attributes[st].name);this._ob=new MutationObserver(this._processMutations.bind(this)),this._ob.observe(this,{attributes:!0});const ee=(st,ot=!1)=>{this._resolved=!0,this._pendingResolve=void 0;const{props:ct,styles:ut}=st;let dt;if(ct&&!isArray$1(ct))for(const ht in ct){const ft=ct[ht];(ft===Number||ft&&ft.type===Number)&&(ht in this._props&&(this._props[ht]=toNumber(this._props[ht])),(dt||(dt=Object.create(null)))[camelize(ht)]=!0)}this._numberProps=dt,this._resolveProps(st),this.shadowRoot&&this._applyStyles(ut),this._mount(st)},te=this._def.__asyncLoader;if(te)return this._pendingResolve=te().then(st=>{st.configureApp=this._def.configureApp,ee(this._def=st,!0)}),this._pendingResolve;ee(this._def)}_mount(ee){this._app=this._createApp(ee),this._inheritParentContext(),ee.configureApp&&ee.configureApp(this._app),this._app._ceVNode=this._createVNode(),this._app.mount(this._root);const te=this._instance&&this._instance.exposed;if(te)for(const st in te)hasOwn(this,st)||Object.defineProperty(this,st,{get:()=>unref(te[st])})}_resolveProps(ee){const{props:te}=ee,st=isArray$1(te)?te:Object.keys(te||{});for(const ot of Object.keys(this))ot[0]!=="_"&&st.includes(ot)&&this._setProp(ot,this[ot]);for(const ot of st.map(camelize))Object.defineProperty(this,ot,{get(){return this._getProp(ot)},set(ct){this._setProp(ot,ct,!0,!this._patching)}})}_setAttr(ee){if(ee.startsWith("data-v-"))return;const te=this.hasAttribute(ee);let st=te?this.getAttribute(ee):REMOVAL;const ot=camelize(ee);te&&this._numberProps&&this._numberProps[ot]&&(st=toNumber(st)),this._setProp(ot,st,!1,!0)}_getProp(ee){return this._props[ee]}_setProp(ee,te,st=!0,ot=!1){if(te!==this._props[ee]&&(this._dirty=!0,te===REMOVAL?delete this._props[ee]:(this._props[ee]=te,ee==="key"&&this._app&&(this._app._ceVNode.key=te)),ot&&this._instance&&this._update(),st)){const ct=this._ob;ct&&(this._processMutations(ct.takeRecords()),ct.disconnect()),te===!0?this.setAttribute(hyphenate(ee),""):typeof te=="string"||typeof te=="number"?this.setAttribute(hyphenate(ee),te+""):te||this.removeAttribute(hyphenate(ee)),ct&&ct.observe(this,{attributes:!0})}}
24_update(){const ee=this._createVNode();this._app&&(ee.appContext=this._app._context),render$2(ee,this._root)}_createVNode(){const ee={};this.shadowRoot||(ee.onVnodeMounted=ee.onVnodeUpdated=this._renderSlots.bind(this));const te=createVNode(this._def,extend$5(ee,this._props));return this._instance||(te.ce=st=>{this._instance=st,st.ce=this,st.isCE=!0;const ot=(ct,ut)=>{this.dispatchEvent(new CustomEvent(ct,isPlainObject$2(ut[0])?extend$5({detail:ut},ut[0]):{detail:ut}))};st.emit=(ct,...ut)=>{ot(ct,ut),hyphenate(ct)!==ct&&ot(hyphenate(ct),ut)},this._setParent()}),te}_applyStyles(ee,te,st){if(!ee)return;if(te){if(te===this._def||this._styleChildren.has(te))return;this._styleChildren.add(te)}const ot=this._nonce,ct=this.shadowRoot,ut=st?this._getStyleAnchor(st)||this._getStyleAnchor(this._def):this._getRootStyleInsertionAnchor(ct);let dt=null;for(let ht=ee.length-1;ht>=0;ht--){const ft=document.createElement("style");ot&&ft.setAttribute("nonce",ot),ft.textContent=ee[ht],ct.insertBefore(ft,dt||ut),dt=ft,ht===0&&(st||this._styleAnchors.set(this._def,ft),te&&this._styleAnchors.set(te,ft))}}_getStyleAnchor(ee){if(!ee)return null;const te=this._styleAnchors.get(ee);return te&&te.parentNode===this.shadowRoot?te:(te&&this._styleAnchors.delete(ee),null)}_getRootStyleInsertionAnchor(ee){for(let te=0;te<ee.childNodes.length;te++){const st=ee.childNodes[te];if(!(st instanceof HTMLStyleElement))return st}return null}_parseSlots(){const ee=this._slots={};let te;for(;te=this.firstChild;){const st=te.nodeType===1&&te.getAttribute("slot")||"default";(ee[st]||(ee[st]=[])).push(te),this.removeChild(te)}}_renderSlots(){const ee=this._getSlots(),te=this._instance.type.__scopeId;for(let st=0;st<ee.length;st++){const ot=ee[st],ct=ot.getAttribute("name")||"default",ut=this._slots[ct],dt=ot.parentNode;if(ut)for(const ht of ut){if(te&&ht.nodeType===1){const ft=te+"-s",pt=document.createTreeWalker(ht,1);ht.setAttribute(ft,"");let mt;for(;mt=pt.nextNode();)mt.setAttribute(ft,"")}dt.insertBefore(ht,ot)}else for(;ot.firstChild;)dt.insertBefore(ot.firstChild,ot);dt.removeChild(ot)}}_getSlots(){const ee=[this];this._teleportTargets&&ee.push(...this._teleportTargets);const te=new Set;for(const st of ee){const ot=st.querySelectorAll("slot");for(let ct=0;ct<ot.length;ct++)te.add(ot[ct])}return Array.from(te)}_injectChildStyle(ee,te){this._applyStyles(ee.styles,ee,te)}_beginPatch(){this._patching=!0,this._dirty=!1}_endPatch(){this._patching=!1,this._dirty&&this._instance&&this._update()}_hasShadowRoot(){return this._def.shadowRoot!==!1}_removeChildStyle(ee){}}function useHost(ne){const ee=getCurrentInstance(),te=ee&&ee.ce;return te||null}function useShadowRoot(){const ne=useHost();return ne&&ne.shadowRoot}function useCssModule(ne="$style"){{const ee=getCurrentInstance();if(!ee)return EMPTY_OBJ;const te=ee.type.__cssModules;if(!te)return EMPTY_OBJ;const st=te[ne];return st||EMPTY_OBJ}}const positionMap=new WeakMap,newPositionMap=new WeakMap,moveCbKey=Symbol("_moveCb"),enterCbKey=Symbol("_enterCb"),decorate=ne=>(delete ne.props.mode,ne),TransitionGroupImpl=decorate({name:"TransitionGroup",props:extend$5({},TransitionPropsValidators,{tag:String,moveClass:String}),setup(ne,{slots:ee}){const te=getCurrentInstance(),st=useTransitionState();let ot,ct;return onUpdated(()=>{if(!ot.length)return;const ut=ne.moveClass||`${ne.name||"v"}-move`;if(!hasCSSTransform(ot[0].el,te.vnode.el,ut)){ot=[];return}ot.forEach(callPendingCbs),ot.forEach(recordPosition);const dt=ot.filter(applyTranslation);forceReflow(te.vnode.el),dt.forEach(ht=>{const ft=ht.el,pt=ft.style;addTransitionClass(ft,ut),pt.transform=pt.webkitTransform=pt.transitionDuration="";const mt=ft[moveCbKey]=yt=>{yt&&yt.target!==ft||(!yt||yt.propertyName.endsWith("transform"))&&(ft.removeEventListener("transitionend",mt),ft[moveCbKey]=null,removeTransitionClass(ft,ut))};ft.addEventListener("transitionend",mt)}),ot=[]}),()=>{const ut=toRaw(ne),dt=resolveTransitionProps(ut);let ht=ut.tag||Fragment;if(ot=[],ct)for(let ft=0;ft<ct.length;ft++){const pt=ct[ft];pt.el&&pt.el instanceof Element&&!pt.el[vShowHidden]&&(ot.push(pt),setTransitionHooks(pt,resolveTransitionHooks(pt,dt,st,te)),positionMap.set(pt,getPosition(pt.el)))}ct=ee.default?getTransitionRawChildren(ee.default()):[];for(let ft=0;ft<ct.length;ft++){const pt=ct[ft];pt.key!=null&&setTransitionHooks(pt,resolveTransitionHooks(pt,dt,st,te))}return createVNode(ht,null,ct)}}}),TransitionGroup=TransitionGroupImpl;function callPendingCbs(ne){const ee=ne.el;ee[moveCbKey]&&ee[moveCbKey](),ee[enterCbKey]&&ee[enterCbKey]()}function recordPosition(ne){newPositionMap.set(ne,getPosition(ne.el))}function applyTranslation(ne){const ee=positionMap.get(ne),te=newPositionMap.get(ne),st=ee.left-te.left,ot=ee.top-te.top;if(st||ot){const ct=ne.el,ut=ct.style,dt=ct.getBoundingClientRect();let ht=1,ft=1;return ct.offsetWidth&&(ht=dt.width/ct.offsetWidth),ct.offsetHeight&&(ft=dt.height/ct.offsetHeight),(!Number.isFinite(ht)||ht===0)&&(ht=1),(!Number.isFinite(ft)||ft===0)&&(ft=1),Math.abs(ht-1)<.01&&(ht=1),Math.abs(ft-1)<.01&&(ft=1),ut.transform=ut.webkitTransform=`translate(${st/ht}px,${ot/ft}px)`,ut.transitionDuration="0s",ne}}function getPosition(ne){const ee=ne.getBoundingClientRect();return{left:ee.left,top:ee.top}}function hasCSSTransform(ne,ee,te){const st=ne.cloneNode(),ot=ne[vtcKey];ot&&ot.forEach(dt=>
24{dt.split(/\s+/).forEach(ht=>ht&&st.classList.remove(ht))}),te.split(/\s+/).forEach(dt=>dt&&st.classList.add(dt)),st.style.display="none";const ct=ee.nodeType===1?ee:ee.parentNode;ct.appendChild(st);const{hasTransform:ut}=getTransitionInfo(st);return ct.removeChild(st),ut}const getModelAssigner=ne=>{const ee=ne.props["onUpdate:modelValue"]||!1;return isArray$1(ee)?te=>invokeArrayFns(ee,te):ee};function onCompositionStart(ne){ne.target.composing=!0}function onCompositionEnd(ne){const ee=ne.target;ee.composing&&(ee.composing=!1,ee.dispatchEvent(new Event("input")))}const assignKey=Symbol("_assign"),initialValueKey=Symbol("_initialValue");function castValue(ne,ee,te){return ee&&(ne=ne.trim()),te&&(ne=looseToNumber(ne)),ne}const vModelText={created(ne,{modifiers:{lazy:ee,trim:te,number:st}},ot){ne.parentNode&&(ne.type==="text"?ne[initialValueKey]=ne.defaultValue.replace(/[\r\n]/g,""):ne.type==="textarea"&&(ne[initialValueKey]=ne.defaultValue.replace(/\r\n?/g,`
25`))),ne[assignKey]=getModelAssigner(ot);const ct=st||ot.props&&ot.props.type==="number";addEventListener(ne,ee?"change":"input",ut=>{ut.target.composing||ne[assignKey](castValue(ne.value,te,ct))}),(te||ct)&&addEventListener(ne,"change",()=>{ne.value=castValue(ne.value,te,ct)}),ee||(addEventListener(ne,"compositionstart",onCompositionStart),addEventListener(ne,"compositionend",onCompositionEnd),addEventListener(ne,"change",onCompositionEnd))},mounted(ne,{value:ee,modifiers:{trim:te,number:st}}){const ot=ee??"",ct=ne[initialValueKey];delete ne[initialValueKey],ct!==void 0&&(ne.type==="text"||ne.type==="textarea")&&ne.value!==ct?ne[assignKey](castValue(ne.value,te,st)):ne.value=ot},beforeUpdate(ne,{value:ee,oldValue:te,modifiers:{lazy:st,trim:ot,number:ct}},ut){if(ne[assignKey]=getModelAssigner(ut),ne.composing)return;const dt=(ct||ne.type==="number")&&!/^0\d/.test(ne.value)?looseToNumber(ne.value):ne.value,ht=ee??"";if(dt===ht)return;const ft=ne.getRootNode();(ft instanceof Document||ft instanceof ShadowRoot)&&ft.activeElement===ne&&ne.type!=="range"&&(st&&ee===te||ot&&ne.value.trim()===ht)||(ne.value=ht)}},vModelCheckbox={deep:!0,created(ne,ee,te){ne[assignKey]=getModelAssigner(te),addEventListener(ne,"change",()=>{const st=ne._modelValue,ot=getValue$1(ne),ct=ne.checked,ut=ne[assignKey];if(isArray$1(st)){const dt=looseIndexOf(st,ot),ht=dt!==-1;if(ct&&!ht)ut(st.concat(ot));else if(!ct&&ht){const ft=[...st];ft.splice(dt,1),ut(ft)}}else if(isSet(st)){const dt=new Set(st);ct?dt.add(ot):dt.delete(ot),ut(dt)}else ut(getCheckboxValue(ne,ct))})},mounted:setChecked,beforeUpdate(ne,ee,te){ne[assignKey]=getModelAssigner(te),setChecked(ne,ee,te)}};function setChecked(ne,{value:ee,oldValue:te},st){ne._modelValue=ee;let ot;if(isArray$1(ee))ot=looseIndexOf(ee,st.props.value)>-1;else if(isSet(ee))ot=ee.has(st.props.value);else{if(ee===te)return;ot=looseEqual(ee,getCheckboxValue(ne,!0))}ne.checked!==ot&&(ne.checked=ot)}const vModelRadio={created(ne,{value:ee},te){ne.checked=looseEqual(ee,te.props.value),ne[assignKey]=getModelAssigner(te),addEventListener(ne,"change",()=>{ne[assignKey](getValue$1(ne))})},beforeUpdate(ne,{value:ee,oldValue:te},st){ne[assignKey]=getModelAssigner(st),ee!==te&&(ne.checked=looseEqual(ee,st.props.value))}},vModelSelect={deep:!0,created(ne,{value:ee,modifiers:{number:te}},st){ne._modelValue=ee,addEventListener(ne,"change",()=>{const ot=Array.prototype.filter.call(ne.options,ht=>ht.selected).map(ht=>te?looseToNumber(getValue$1(ht)):getValue$1(ht)),ct=ne.multiple,ut=ct?isSet(ne._modelValue)?new Set(ot):ot:ot[0],dt=ne._pendingValue=[ct,ct?isArray$1(ut)?ot.slice():ot:ut];try{ne[assignKey](ut)}finally{nextTick(()=>{ne._pendingValue===dt&&(ne._pendingValue=void 0)})}}),ne[assignKey]=getModelAssigner(st)},mounted(ne,{value:ee}){setSelected(ne,ee)},beforeUpdate(ne,{value:ee},te){ne._modelValue=ee,ne[assignKey]=getModelAssigner(te)},updated(ne,{value:ee}){const te=ne._pendingValue;ne._pendingValue=void 0,(!te||te[0]!==ne.multiple||!isSameSelectValue(ee,te[1],te[0]))&&setSelected(ne,ee)}};function isSameSelectValue(ne,ee,te){if(!te||isArray$1(ne))return looseEqual(ne,ee);if(isSet(ne)){if(ne.size!==ee.length)return!1;for(const st of ee)if(!ne.has(st))return!1;return!0}return!1}function setSelected(ne,ee){const te=ne.multiple,st=isArray$1(ee);if(!(te&&!st&&!isSet(ee))){for(let ot=0,ct=ne.options.length;ot<ct;
vendor: 32,823 bytes, lines 25-33
25ot++){const ut=ne.options[ot],dt=getValue$1(ut);if(te)if(st){const ht=typeof dt;ht==="string"||ht==="number"?ut.selected=ee.some(ft=>String(ft)===String(dt)):ut.selected=looseIndexOf(ee,dt)>-1}else ut.selected=ee.has(dt);else if(looseEqual(getValue$1(ut),ee)){ne.selectedIndex!==ot&&(ne.selectedIndex=ot);return}}!te&&ne.selectedIndex!==-1&&(ne.selectedIndex=-1)}}function getValue$1(ne){return"_value"in ne?ne._value:ne.value}function getCheckboxValue(ne,ee){const te=ee?"_trueValue":"_falseValue";return te in ne?ne[te]:ee}const vModelDynamic={created(ne,ee,te){callModelHook(ne,ee,te,null,"created")},mounted(ne,ee,te){callModelHook(ne,ee,te,null,"mounted")},beforeUpdate(ne,ee,te,st){callModelHook(ne,ee,te,st,"beforeUpdate")},updated(ne,ee,te,st){callModelHook(ne,ee,te,st,"updated")}};function resolveDynamicModel(ne,ee){switch(ne){case"SELECT":return vModelSelect;case"TEXTAREA":return vModelText;default:switch(ee){case"checkbox":return vModelCheckbox;case"radio":return vModelRadio;default:return vModelText}}}function callModelHook(ne,ee,te,st,ot){const ut=resolveDynamicModel(ne.tagName,te.props&&te.props.type)[ot];ut&&ut(ne,ee,te,st)}function initVModelForSSR(){vModelText.getSSRProps=({value:ne})=>({value:ne}),vModelRadio.getSSRProps=({value:ne},ee)=>{if(ee.props&&looseEqual(ee.props.value,ne))return{checked:!0}},vModelCheckbox.getSSRProps=({value:ne},ee)=>{if(isArray$1(ne)){if(ee.props&&looseIndexOf(ne,ee.props.value)>-1)return{checked:!0}}else if(isSet(ne)){if(ee.props&&ne.has(ee.props.value))return{checked:!0}}else if(ne)return{checked:!0}},vModelDynamic.getSSRProps=(ne,ee)=>{if(typeof ee.type!="string")return;const te=resolveDynamicModel(ee.type.toUpperCase(),ee.props&&ee.props.type);if(te.getSSRProps)return te.getSSRProps(ne,ee)}}const systemModifiers=["ctrl","shift","alt","meta"],modifierGuards={stop:ne=>ne.stopPropagation(),prevent:ne=>ne.preventDefault(),self:ne=>ne.target!==ne.currentTarget,ctrl:ne=>!ne.ctrlKey,shift:ne=>!ne.shiftKey,alt:ne=>!ne.altKey,meta:ne=>!ne.metaKey,left:ne=>"button"in ne&&ne.button!==0,middle:ne=>"button"in ne&&ne.button!==1,right:ne=>"button"in ne&&ne.button!==2,exact:(ne,ee)=>systemModifiers.some(te=>ne[`${te}Key`]&&!ee.includes(te))},withModifiers=(ne,ee)=>{if(!ne)return ne;const te=ne._withMods||(ne._withMods={}),st=ee.join(".");return te[st]||(te[st]=((ot,...ct)=>{for(let ut=0;ut<ee.length;ut++){const dt=modifierGuards[ee[ut]];if(dt&&dt(ot,ee))return}return ne(ot,...ct)}))},keyNames={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},withKeys=(ne,ee)=>{const te=ne._withKeys||(ne._withKeys={}),st=ee.join(".");return te[st]||(te[st]=(ot=>{if(!("key"in ot))return;const ct=hyphenate(ot.key);if(ee.some(ut=>ut===ct||keyNames[ut]===ct))return ne(ot)}))},rendererOptions=extend$5({patchProp},nodeOps);let renderer,enabledHydration=!1;function ensureRenderer(){return renderer||(renderer=createRenderer(rendererOptions))}function ensureHydrationRenderer(){return renderer=enabledHydration?renderer:createHydrationRenderer(rendererOptions),enabledHydration=!0,renderer}const render$2=((...ne)=>{ensureRenderer().render(...ne)}),hydrate=((...ne)=>{ensureHydrationRenderer().hydrate(...ne)}),createApp=((...ne)=>{const ee=ensureRenderer().createApp(...ne),{mount:te}=ee;return ee.mount=st=>{const ot=normalizeContainer(st);if(!ot)return;const ct=ee._component;!isFunction$1(ct)&&!ct.render&&!ct.template&&(ct.template=ot.innerHTML),ot.nodeType===1&&(ot.textContent="");const ut=te(ot,!1,resolveRootNamespace(ot));return ot instanceof Element&&(ot.removeAttribute("v-cloak"),ot.setAttribute("data-v-app","")),ut},ee}),createSSRApp=((...ne)=>{const ee=ensureHydrationRenderer().createApp(...ne),{mount:te}=ee;return ee.mount=st=>{const ot=normalizeContainer(st);if(ot)return te(ot,!0,resolveRootNamespace(ot))},ee});function resolveRootNamespace(ne){if(ne instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&ne instanceof MathMLElement)return"mathml"}function normalizeContainer(ne){return isString(ne)?document.querySelector(ne):ne}let ssrDirectiveInitialized=!1;const initDirectivesForSSR=()=>{ssrDirectiveInitialized||(ssrDirectiveInitialized=!0,initVModelForSSR(),initVShowForSSR())},runtimeDom_esmBundler=Object.freeze(Object.defineProperty({__proto__:null,BaseTransition,BaseTransitionPropsValidators,Comment,DeprecationTypes,EffectScope,ErrorCodes:ErrorCodes$1,ErrorTypeStrings,Fragment,KeepAlive,ReactiveEffect,Static,Suspense,Teleport,Text:Text$1,TrackOpTypes,Transition,TransitionGroup,TriggerOpTypes,VueElement,assertNumber,callWithAsyncErrorHandling,callWithErrorHandling,camelize,capitalize,cloneVNode,compatUtils,computed,createApp,createBlock,createCommentVNode,createElementBlock,createElementVNode:createBaseVNode,createHydrationRenderer,createPropsRestProxy,createRenderer,createSSRApp,createSlots,createStaticVNode,createTextVNode,createVNode,customRef,defineAsyncComponent,defineComponent,defineCustomElement,defineEmits,defineExpose,defineModel,defineOptions,defineProps,defineSSRCustomElement,defineSlots,devtools,effect,effectScope,getCurrentInstance,getCurrentScope,getCurrentWatcher,getTransitionRawChildren,guardReactiveProps,h:h$3,handleError,hasInjectionContext,hydrate,hydrateOnIdle,hydrateOnInteraction,hydrateOnMediaQuery,hydrateOnVisible,initCustomFormatter,initDirectivesForSSR,inject,isMemoSame,isProxy,isReactive,isReadonly,isRef,isRuntimeOnly,isShallow,isVNode,markRaw,mergeDefaults,mergeModels,mergeProps,nextTick,nodeOps,normalizeClass,normalizeProps,normalizeStyle,onActivated,onBeforeMount,onBeforeUnmount,onBeforeUpdate,onDeactivated,onErrorCaptured,onMounted,onRenderTracked,onRenderTriggered,onScopeDispose,onServerPrefetch,onUnmounted,onUpdated,onWatcherCleanup,openBlock,patchProp,popScopeId,provide,proxyRefs,pushScopeId,queuePostFlushCb,reactive,readonly,ref:ref$1,registerRuntimeCompiler,render:render$2,renderList,renderSlot,resolveComponent,resolveDirective,resolveDynamicComponent,resolveFilter,resolveTransitionHooks,setBlockTracking,setDevtoolsHook,setTransitionHooks,shallowReactive,shallowReadonly,shallowRef,ssrContextKey,ssrUtils,stop,toDisplayString,toHandlerKey,toHandlers,toRaw,toRef:toRef$1,toRefs,toValue:toValue$1,transformVNodeArgs,triggerRef,unref,useAttrs,useCssModule,useCssVars,useHost,useId,useModel,useSSRContext,useShadowRoot,useSlots,useTemplateRef,useTransitionState,vModelCheckbox,vModelDynamic,vModelRadio,vModelSelect,vModelText,vShow,version:version$3,warn:warn$2,watch,watchEffect,watchPostEffect,watchSyncEffect,withAsyncContext,withCtx,withDefaults,withDirectives,withKeys,withMemo,withModifiers,withScopeId},Symbol.toStringTag,{value:"Module"}));/*!
26 * pinia v2.3.1
27 * (c) 2025 Eduardo San Martin Morote
28 * @license MIT
29 */let activePinia;const setActivePinia=ne=>activePinia=ne,piniaSymbol=Symbol();function isPlainObject$1(ne){return ne&&typeof ne=="object"&&Object.prototype.toString.call(ne)==="[object Object]"&&typeof ne.toJSON!="function"}var MutationType;(function(ne){ne.direct="direct",ne.patchObject="patch object",ne.patchFunction="patch function"})(MutationType||(MutationType={}));function createPinia(){const ne=effectScope(!0),ee=ne.run(()=>ref$1({}));let te=[],st=[];const ot=markRaw({install(ct){setActivePinia(ot),ot._a=ct,ct.provide(piniaSymbol,ot),ct.config.globalProperties.$pinia=ot,st.forEach(ut=>te.push(ut)),st=[]},use(ct){return this._a?te.push(ct):st.push(ct),this},_p:te,_a:null,_e:ne,_s:new Map,state:ee});return ot}const noop$2=()=>{};function addSubscription(ne,ee,te,st=noop$2){ne.push(ee);const ot=()=>{const ct=ne.indexOf(ee);ct>-1&&(ne.splice(ct,1),st())};return!te&&getCurrentScope()&&onScopeDispose(ot),ot}function triggerSubscriptions(ne,...ee){ne.slice().forEach(te=>{te(...ee)})}const fallbackRunWithContext=ne=>ne(),ACTION_MARKER=Symbol(),ACTION_NAME=Symbol();function mergeReactiveObjects(ne,ee){ne instanceof Map&&ee instanceof Map?ee.forEach((te,st)=>ne.set(st,te)):ne instanceof Set&&ee instanceof Set&&ee.forEach(ne.add,ne);for(const te in ee){if(!ee.hasOwnProperty(te))continue;const st=ee[te],ot=ne[te];isPlainObject$1(ot)&&isPlainObject$1(st)&&ne.hasOwnProperty(te)&&!isRef(st)&&!isReactive(st)?ne[te]=mergeReactiveObjects(ot,st):ne[te]=st}return ne}const skipHydrateSymbol=Symbol();function shouldHydrate(ne){return!isPlainObject$1(ne)||!ne.hasOwnProperty(skipHydrateSymbol)}const{assign:assign$1}=Object;function isComputed(ne){return!!(isRef(ne)&&ne.effect)}function createOptionsStore(ne,ee,te,st){const{state:ot,actions:ct,getters:ut}=ee,dt=te.state.value[ne];let ht;function ft(){dt||(te.state.value[ne]=ot?ot():{});const pt=toRefs(te.state.value[ne]);return assign$1(pt,ct,Object.keys(ut||{}).reduce((mt,yt)=>(mt[yt]=markRaw(computed(()=>{setActivePinia(te);const vt=te._s.get(ne);return ut[yt].call(vt,vt)})),mt),{}))}return ht=createSetupStore(ne,ft,ee,te,st,!0),ht}function createSetupStore(ne,ee,te={},st,ot,ct){let ut;const dt=assign$1({actions:{}},te),ht={deep:!0};let ft,pt,mt=[],yt=[],vt;const _t=st.state.value[ne];!ct&&!_t&&(st.state.value[ne]={});let bt;function xt(Vt){let Ht;ft=pt=!1,typeof Vt=="function"?(Vt(st.state.value[ne]),Ht={type:MutationType.patchFunction,storeId:ne,events:vt}):(mergeReactiveObjects(st.state.value[ne],Vt),Ht={type:MutationType.patchObject,payload:Vt,storeId:ne,events:vt});const zt=bt=Symbol();nextTick().then(()=>{bt===zt&&(ft=!0)}),pt=!0,triggerSubscriptions(mt,Ht,st.state.value[ne])}const Mt=ct?function(){const{state:Ht}=te,zt=Ht?Ht():{};this.$patch(jt=>{assign$1(jt,zt)})}:noop$2;function Ot(){ut.stop(),mt=[],yt=[],st._s.delete(ne)}const kt=(Vt,Ht="")=>{if(ACTION_MARKER in Vt)return Vt[ACTION_NAME]=Ht,Vt;const zt=function(){setActivePinia(st);const jt=Array.from(arguments),Wt=[],Jt=[];function Qt(xn){Wt.push(xn)}function oi(xn){Jt.push(xn)}triggerSubscriptions(yt,{args:jt,name:zt[ACTION_NAME],store:Gt,after:Qt,onError:oi});let ai;try{ai=Vt.apply(this&&this.$id===ne?this:Gt,jt)}catch(xn){throw triggerSubscriptions(Jt,xn),xn}return ai instanceof Promise?ai.then(xn=>(triggerSubscriptions(Wt,xn),xn)).catch(xn=>(triggerSubscriptions(Jt,xn),Promise.reject(xn))):(triggerSubscriptions(Wt,ai),ai)};return zt[ACTION_MARKER]=!0,zt[ACTION_NAME]=Ht,zt},Nt={_p:st,$id:ne,$onAction:addSubscription.bind(null,yt),$patch:xt,$reset:Mt,$subscribe(Vt,Ht={}){const zt=addSubscription(mt,Vt,Ht.detached,()=>jt()),jt=ut.run(()=>watch(()=>st.state.value[ne],Wt=>{(Ht.flush==="sync"?pt:ft)&&Vt({storeId:ne,type:MutationType.direct,events:vt},Wt)},assign$1({},ht,Ht)));return zt},$dispose:Ot},Gt=reactive(Nt);st._s.set(ne,Gt);const Ut=(st._a&&st._a.runWithContext||fallbackRunWithContext)(()=>st._e.run(()=>(ut=effectScope()).run(()=>ee({action:kt}))));for(const Vt in Ut){const Ht=Ut[Vt];if(isRef(Ht)&&!isComputed(Ht)||isReactive(Ht))ct||(_t&&shouldHydrate(Ht)&&(isRef(Ht)?Ht.value=_t[Vt]:mergeReactiveObjects(Ht,_t[Vt])),st.state.value[ne][Vt]=Ht);else if(typeof Ht=="function"){const zt=kt(Ht,Vt);Ut[Vt]=zt,dt.actions[Vt]=Ht}}return assign$1(Gt,Ut),assign$1(toRaw(Gt),Ut),Object.defineProperty(Gt,"$state",{get:()=>st.state.value[ne],set:Vt=>{xt(Ht=>{assign$1(Ht,Vt)})}}),st._p.forEach(Vt=>{assign$1(Gt,ut.run(()=>Vt({store:Gt,app:st._a,pinia:st,options:dt})))}),_t&&ct&&te.hydrate&&te.hydrate(Gt.$state,_t),ft=!0,pt=!0,Gt}/*! #__NO_SIDE_EFFECTS__ */function defineStore(ne,ee,te){let st,ot;const ct=typeof ee=="function";typeof ne=="string"?(st=ne,ot=ct?te:ee):(ot=ne,st=ne.id);function ut(dt,ht){const ft=hasInjectionContext();return dt=dt||(ft?inject(piniaSymbol,null):null),dt&&setActivePinia(dt),dt=activePinia,dt._s.has(st)||(ct?createSetupStore(st,ee,ot,dt):createOptionsStore(st,ot,dt)),dt._s.get(st)}return ut.$id=st,ut}var commonjsGlobal=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function getDefaultExportFromCjs(ne){return ne&&ne.__esModule&&Object.prototype.hasOwnProperty.call(ne,"default")?ne.default:ne}function getAugmentedNamespace(ne){if(Object.prototype.hasOwnProperty.call(ne,"__esModule"))return ne;var ee=ne.default;if(typeof ee=="function"){var te=function st(){return this instanceof st?Reflect.construct(ee,arguments,this.constructor):ee.apply(this,arguments)};te.prototype=ee.prototype}else te={};return Object.defineProperty(te,"__esModule",{value:!0}),Object.keys(ne).forEach(function(st){var ot=Object.getOwnPropertyDescriptor(ne,st);Object.defineProperty(te,st,ot.get?ot:{enumerable:!0,get:function(){return ne[st]}})}),te}var dist$1={},logger$K={},vue={exports:{}},vue_cjs_prod={};/**
30* @vue/compiler-core v3.5.42
31* (c) 2018-present Yuxi (Evan) You and Vue contributors
32* @license MIT
33**/const FRAGMENT=Symbol(""),TELEPORT=Symbol(""),SUSPENSE=Symbol(""),KEEP_ALIVE=Symbol(""),BASE_TRANSITION=Symbol(""),OPEN_BLOCK=Symbol(""),CREATE_BLOCK=Symbol(""),CREATE_ELEMENT_BLOCK=Symbol(""),CREATE_VNODE=Symbol(""),CREATE_ELEMENT_VNODE=Symbol(""),CREATE_COMMENT=Symbol(""),CREATE_TEXT=Symbol(""),CREATE_STATIC=Symbol(""),RESOLVE_COMPONENT=Symbol(""),RESOLVE_DYNAMIC_COMPONENT=Symbol(""),RESOLVE_DIRECTIVE=Symbol(""),RESOLVE_FILTER=Symbol(""),WITH_DIRECTIVES=Symbol(""),RENDER_LIST=Symbol(""),RENDER_SLOT=Symbol(""),CREATE_SLOTS=Symbol(""),TO_DISPLAY_STRING=Symbol(""),MERGE_PROPS=Symbol(""),NORMALIZE_CLASS=Symbol(""),NORMALIZE_STYLE=Symbol(""),NORMALIZE_PROPS=Symbol(""),GUARD_REACTIVE_PROPS=Symbol(""),TO_HANDLERS=Symbol(""),CAMELIZE=Symbol(""),CAPITALIZE=Symbol(""),TO_HANDLER_KEY=Symbol(""),SET_BLOCK_TRACKING=Symbol(""),PUSH_SCOPE_ID=Symbol(""),POP_SCOPE_ID=Symbol(""),WITH_CTX=Symbol(""),UNREF=Symbol(""),IS_REF=Symbol(""),WITH_MEMO=Symbol(""),IS_MEMO_SAME=Symbol(""),helperNameMap={[FRAGMENT]:"Fragment",[TELEPORT]:"Teleport",[SUSPENSE]:"Suspense",[KEEP_ALIVE]:"KeepAlive",[BASE_TRANSITION]:"BaseTransition",[OPEN_BLOCK]:"openBlock",[CREATE_BLOCK]:"createBlock",[CREATE_ELEMENT_BLOCK]:"createElementBlock",[CREATE_VNODE]:"createVNode",[CREATE_ELEMENT_VNODE]:"createElementVNode",[CREATE_COMMENT]:"createCommentVNode",[CREATE_TEXT]:"createTextVNode",[CREATE_STATIC]:"createStaticVNode",[RESOLVE_COMPONENT]:"resolveComponent",[RESOLVE_DYNAMIC_COMPONENT]:"resolveDynamicComponent",[RESOLVE_DIRECTIVE]:"resolveDirective",[RESOLVE_FILTER]:"resolveFilter",[WITH_DIRECTIVES]:"withDirectives",[RENDER_LIST]:"renderList",[RENDER_SLOT]:"renderSlot",[CREATE_SLOTS]:"createSlots",[TO_DISPLAY_STRING]:"toDisplayString",[MERGE_PROPS]:"mergeProps",[NORMALIZE_CLASS]:"normalizeClass",[NORMALIZE_STYLE]:"normalizeStyle",[NORMALIZE_PROPS]:"normalizeProps",[GUARD_REACTIVE_PROPS]:"guardReactiveProps",[TO_HANDLERS]:"toHandlers",[CAMELIZE]:"camelize",[CAPITALIZE]:"capitalize",[TO_HANDLER_KEY]:"toHandlerKey",[SET_BLOCK_TRACKING]:"setBlockTracking",[PUSH_SCOPE_ID]:"pushScopeId",[POP_SCOPE_ID]:"popScopeId",[WITH_CTX]:"withCtx",[UNREF]:"unref",[IS_REF]:"isRef",[WITH_MEMO]:"withMemo",[IS_MEMO_SAME]:"isMemoSame"};function registerRuntimeHelpers(ne){Object.getOwnPropertySymbols(ne).forEach(ee=>{helperNameMap[ee]=ne[ee]})}const Namespaces={HTML:0,0:"HTML",SVG:1,1:"SVG",MATH_ML:2,2:"MATH_ML"},NodeTypes={ROOT:0,0:"ROOT",ELEMENT:1,1:"ELEMENT",TEXT:2,2:"TEXT",COMMENT:3,3:"COMMENT",SIMPLE_EXPRESSION:4,4:"SIMPLE_EXPRESSION",INTERPOLATION:5,5:"INTERPOLATION",ATTRIBUTE:6,6:"ATTRIBUTE",DIRECTIVE:7,7:"DIRECTIVE",COMPOUND_EXPRESSION:8,8:"COMPOUND_EXPRESSION",IF:9,9:"IF",IF_BRANCH:10,10:"IF_BRANCH",FOR:11,11:"FOR",TEXT_CALL:12,12:"TEXT_CALL",VNODE_CALL:13,13:"VNODE_CALL",JS_CALL_EXPRESSION:14,14:"JS_CALL_EXPRESSION",JS_OBJECT_EXPRESSION:15,15:"JS_OBJECT_EXPRESSION",JS_PROPERTY:16,16:"JS_PROPERTY",JS_ARRAY_EXPRESSION:17,17:"JS_ARRAY_EXPRESSION",JS_FUNCTION_EXPRESSION:18,18:"JS_FUNCTION_EXPRESSION",JS_CONDITIONAL_EXPRESSION:19,19:"JS_CONDITIONAL_EXPRESSION",JS_CACHE_EXPRESSION:20,20:"JS_CACHE_EXPRESSION",JS_BLOCK_STATEMENT:21,21:"JS_BLOCK_STATEMENT",JS_TEMPLATE_LITERAL:22,22:"JS_TEMPLATE_LITERAL",JS_IF_STATEMENT:23,23:"JS_IF_STATEMENT",JS_ASSIGNMENT_EXPRESSION:24,24:"JS_ASSIGNMENT_EXPRESSION",JS_SEQUENCE_EXPRESSION:25,25:"JS_SEQUENCE_EXPRESSION",JS_RETURN_STATEMENT:26,26:"JS_RETURN_STATEMENT"},ElementTypes={ELEMENT:0,0:"ELEMENT",COMPONENT:1,1:"COMPONENT",SLOT:2,2:"SLOT",TEMPLATE:3,3:"TEMPLATE"},ConstantTypes={NOT_CONSTANT:0,0:"NOT_CONSTANT",CAN_SKIP_PATCH:1,1:"CAN_SKIP_PATCH",CAN_CACHE:2,2:"CAN_CACHE",CAN_STRINGIFY:3,3:"CAN_STRINGIFY"},locStub={start:{line:1,column:1,offset:0},end:{line:1,column:1,offset:0},source:""};function createRoot(ne,ee=""){return{type:0,source:ee,children:ne,helpers:new Set,components:[],directives:[],hoists:[],imports:[],cached:[],temps:0,codegenNode:void 0,loc:locStub}}function createVNodeCall(ne,ee,te,st,ot,ct,ut,dt=!1,ht=!1,ft=!1,pt=locStub){return ne&&(dt?(ne.helper(OPEN_BLOCK),ne.helper(getVNodeBlockHelper(ne.inSSR,ft))):ne.helper(getVNodeHelper(ne.inSSR,ft)),ut&&ne.helper(WITH_DIRECTIVES)),{type:13,tag:ee,props:te,children:st,patchFlag:ot,dynamicProps:ct,directives:ut,isBlock:dt,disableTracking:ht,isComponent:ft,loc:pt}}function createArrayExpression(ne,ee=locStub){return{type:17,loc:ee,elements:ne}}function createObjectExpression(ne,ee=locStub){return{type:15,loc:ee,properties:ne}}function createObjectProperty(ne,ee){return{type:16,loc:locStub,key:isString(ne)?createSimpleExpression(ne,!0):ne,value:ee}}function createSimpleExpression(ne,ee=!1,te=locStub,st=0){return{type:4,loc:te,content:ne,isStatic:ee,constType:ee?3:st}}function createInterpolation(ne,ee){return{type:5,loc:ee,content:isString(ne)?createSimpleExpression(ne,!1,ee):ne}}function createCompoundExpression(ne,ee=locStub){return{type:8,loc:ee,children:ne}}function createCallExpression(ne,ee=[],te=locStub){return{type:14,loc:te,callee:ne,arguments:ee}}function createFunctionExpression(ne,ee=void 0,te=!1,st=!1,ot=locStub){return{type:18,params:ne,returns:ee,newline:te,isSlot:st,loc:ot}}function createConditionalExpression(ne,ee,te,st=!0){return{type:19,test:ne,consequent:ee,alternate:te,newline:st,loc:locStub}}function createCacheExpression(ne,ee,te=!1,st=!1){return{type:20,index:ne,value:ee,needPauseTracking:te,inVOnce:st,needArraySpread:!1,loc:locStub}}function createBlockStatement(ne){return{type:21,body:ne,loc:locStub}}function createTemplateLiteral(ne){return{type:22,elements:ne,loc:locStub}}function createIfStatement(ne,ee,te){return{type:23,test:ne,consequent:ee,alternate:te,loc:locStub}}function createAssignmentExpression(ne,ee){return{type:24,left:ne,right:ee,loc:locStub}}function createSequenceExpression(ne){return{type:25,expressions:ne,loc:locStub}}function createReturnStatement(ne){return{type:26,returns:ne,loc:locStub}}function getVNodeHelper(ne,ee){return ne||ee?CREATE_VNODE:CREATE_ELEMENT_VNODE}function getVNodeBlockHelper(ne,ee){return ne||ee?CREATE_BLOCK:CREATE_ELEMENT_BLOCK}function convertToBlock(ne,{helper:ee,removeHelper:te,inSSR:st}){ne.isBlock||(ne.isBlock=!0,te(getVNodeHelper(st,ne.isComponent)),ee(OPEN_BLOCK),ee(getVNodeBlockHelper(st,ne.isComponent)))}const defaultDelimitersOpen=new Uint8Array([123,123]),defaultDelimitersClose=new Uint8Array([125,125]);function isTagStartChar(ne){return ne>=97&&ne<=122||ne>=65&&ne<=90}function isWhitespace(ne){return ne===32||ne===10||ne===9||ne===12||ne===13}function isEndOfTagSection(ne){return ne===47||ne===62||isWhitespace(ne)}function toCharCodes(ne){const ee=new Uint8Array(ne.length);for(let te=0;te<ne.length;te++)ee[te]=ne.charCodeAt(te);return ee}const Sequences={Cdata:new Uint8Array([67,68,65,84,65,91]),CdataEnd:new Uint8Array([93,93,62]),CommentEnd:new Uint8Array([45,45,62]),ScriptEnd:new Uint8Array([60,47,115,99,114,105,112,116]),StyleEnd:new Uint8Array([60,47,115,116,121,108,101]),TitleEnd:new Uint8Array([60,47,116,105,116,108,101]),TextareaEnd:new Uint8Array([60,47,116,101,120,116,97,114,101,97])};class Tokenizer{constructor(ee,te){this.stack=ee,this.cbs=te,this.state=1,this.buffer="",this.sectionStart=0,this.index=0,this.entityStart=0,this.baseState=1,this.inRCDATA=!1,this.inXML=!1,this.inVPre=!1,this.newlines=[],this.mode=0,this.delimiterOpen=defaultDelimitersOpen,this.delimiterClose=defaultDelimitersClose,this.delimiterIndex=-1,this.currentSequence=void 0,this.sequenceIndex=0}get inSFCRoot(){return this.mode===2&&this.stack.length===0}reset(){this.state=1,this.mode=0,this.buffer="",this.sectionStart=0,this.index=0,this.baseState=1,this.inRCDATA=!1,this.currentSequence=void 0,this.newlines.length=0,this.delimiterOpen=defaultDelimitersOpen,this.delimiterClose=defaultDelimitersClose}getPos(ee){let te=1,st=ee+1;const ot=this.newlines.length;let ct=-1;if(ot>100){let ut=-1,dt=ot;for(;ut+1<dt;){const ht=ut+dt>>>1;this.newlines[ht]<ee?ut=ht:dt=ht}ct=ut}else for(let ut=ot-1;ut>=0;ut--)if(ee>this.newlines[ut]){ct=ut;break}return ct>=0&&(te=ct+2,st=ee-this.newlines[ct]),{column:st,line:te,offset:ee}}peek(){return this.buffer.charCodeAt(this.index+1)}stateText(ee){ee===60?(this.index>this.sectionStart&&this.cbs.ontext(this.sectionStart,this.index),this.state=5,this.sectionStart=this.index):!this.inVPre&&ee===this.delimiterOpen[0]&&(this.state=2,this.delimiterIndex=0,this.stateInterpolationOpen(ee))}stateInterpolationOpen(ee){if(ee===this.delimiterOpen[this.delimiterIndex])if(this.delimiterIndex===this.delimiterOpen.length-1){const te=this.index+1-this.delimiterOpen.length;te>this.sectionStart&&this.cbs.ontext(this.sectionStart,te),this.state=3,this.sectionStart=te}else this.delimiterIndex++;else this.inRCDATA?(this.state=32,this.stateInRCDATA(ee)):(this.state=1,this.stateText(ee))}stateInterpolation(ee){ee===this.delimiterClose[0]&&(this.state=4,this.delimiterIndex=0,this.stateInterpolationClose(ee))}stateInterpolationClose(ee){ee===this.delimiterClose[this.delimiterIndex]?this.delimiterIndex===this.delimiterClose.length-1?(this.cbs.oninterpolation(this.sectionStart,this.index+1),this.inRCDATA?this.state=32:this.state=1,this.sectionStart=this.index+1):this.delimiterIndex++:(this.state=3,this.stateInterpolation(ee))}stateSpecialStartSequence(ee){const te=this.sequenceIndex===this.currentSequence.length;if(!(te?isEndOfTagSection(ee):(ee|32)===this.currentSequence[this.sequenceIndex]))this.inRCDATA=!1;else if(!te){this.sequenceIndex++;return}this.sequenceIndex=0,this.state=6,this.stateInTagName(ee)}stateInRCDATA(ee){if(this.sequenceIndex===this.currentSequence.length){if(ee===62||isWhitespace(ee)){const te=this.index-this.currentSequence.length;if(this.sectionStart<te){const st=this.index;this.index=te,this.cbs.ontext(this.sectionStart,te),this.index=st}this.sectionStart=te+2,this.stateInClosingTagName(ee),this.inRCDATA=!1;return}this.sequenceIndex=0}(ee|32)===this.currentSequence[this.sequenceIndex]?this.sequenceIndex+=1:this.sequenceIndex===0?this.currentSequence===Sequences.TitleEnd||this.currentSequence===Sequences.TextareaEnd&&!this.inSFCRoot?!this.inVPre&&ee===this.delimiterOpen[0]&&(this.state=2,this.delimiterIndex=0,this.stateInterpolationOpen(ee)):this.fastForwardTo(60)&&(this.sequenceIndex=1):this.sequenceIndex=+(ee===60)}stateCDATASequence(ee){ee===Sequences.Cdata[this.sequenceIndex]?++this.sequenceIndex===Sequences.Cdata.length&&(this.state=28,this.currentSequence=Sequences.CdataEnd,this.sequenceIndex=0,this.sectionStart=this.index+1):(this.sequenceIndex=0,this.state=23,this.stateInDeclaration(ee))}fastForwardTo(ee){for(;++this.index<this.buffer.length;){const te=this.buffer.charCodeAt(this.index);if(te===10&&this.newlines.push(this.index),te===ee)return!0}return this.index=this.buffer.length-1,!1}stateInCommentLike(ee){ee===this.currentSequence[this.sequenceIndex]?++this.sequenceIndex===this.currentSequence.length&&(this.currentSequence===Sequences.CdataEnd?this.cbs.oncdata(this.sectionStart,this.index-2):this.cbs.oncomment(this.sectionStart,this.index-2),this.sequenceIndex=0,this.sectionStart=this.index+1,this.state=1):this.sequenceIndex===0?this.fastForwardTo(this.currentSequence[0])&&(this.sequenceIndex=1):ee!==this.currentSequence[this.sequenceIndex-1]&&(this.sequenceIndex=0)}startSpecial(ee,te){this.enterRCDATA(ee,te),this.state=31}enterRCDATA(ee,te){this.inRCDATA=!0,this.currentSequence=ee,this.sequenceIndex=te}stateBeforeTagName(ee){ee===33?(this.state=22,this.sectionStart=this.index+1):ee===63?(this.state=24,this.sectionStart=this.index+1):isTagStartChar(ee)?(this.sectionStart=this.index,this.mode===0?this.state=6:this.inSFCRoot?this.state=34:this.inXML?this.state=6:ee===116?this.state=30:this.state=ee===115?29:6):ee===47?this.state=8:(this.state=1,this.stateText(ee))}stateInTagName(ee){isEndOfTagSection(ee)&&this.handleTagName(ee)}stateInSFCRootTagName(ee){if(isEndOfTagSection(ee)){const te=this.buffer.slice(this.sectionStart,this.index);te!=="template"&&this.enterRCDATA(toCharCodes("</"+te),0),this.handleTagName(ee)}}handleTagName(ee){this.cbs.onopentagname(this.sectionStart,this.index),this.sectionStart=-1,this.state=11,this.stateBeforeAttrName(ee)}stateBeforeClosingTagName(ee){isWhitespace(ee)||(ee===62?(this.state=1,this.sectionStart=this.index+1):(this.state=isTagStartChar(ee)?9:27,this.sectionStart=this.index))}stateInClosingTagName(ee){(ee===62||isWhitespace(ee))&&(this.cbs.onclosetag(this.sectionStart,this.index),this.sectionStart=-1,this.state=10,this.stateAfterClosingTagName(ee))}stateAfterClosingTagName(ee){ee===62&&(this.state=1,this.sectionStart=this.index+1)}stateBeforeAttrName(ee){ee===62?(this.cbs.onopentagend(this.index),this.inRCDATA?this.state=32:this.state=1,this.sectionStart=this.index+1):ee===47?this.state=7:ee===60&&this.peek()===47?(this.cbs.onopentagend(this.index),this.state=5,this.sectionStart=this.index):isWhitespace(ee)||this.handleAttrStart(ee)}handleAttrStart(ee){ee===118&&this.peek()===45?(this.state=13,this.sectionStart=this.index):ee===46||ee===58||ee===64||ee===35?(this.cbs.ondirname(this.index,this.index+1),this.state=14,this.sectionStart=this.index+1):(this.state=12,this.sectionStart=this.index)}stateInSelfClosingTag(ee){ee===62?(this.cbs.onselfclosingtag(this.index),this.state=1,this.sectionStart=this.index+1,this.inRCDATA=!1):isWhitespace(ee)||(this.state=11,this.stateBeforeAttrName(ee))}stateInAttrName(ee){(ee===61||isEndOfTagSection(ee))&&(this.cbs.onattribname(this.sectionStart,this.index),this.handleAttrNameEnd(ee))}stateInDirName(ee){ee===61||isEndOfTagSection(ee)?(this.cbs.ondirname(this.sectionStart,this.index),this.handleAttrNameEnd(ee)):ee===58?(this.cbs.ondirname(this.sectionStart,this.index),this.state=14,this.sectionStart=this.index+1):ee===46&&(this.cbs.ondirname(this.sectionStart,this.index),this.state=16,this.sectionStart=this.index+1)}stateInDirArg(ee){ee===61||isEndOfTagSection(ee)?(this.cbs.ondirarg(this.sectionStart,this.index),this.handleAttrNameEnd(ee)):ee===91?this.state=15:ee===46&&(this.cbs.ondirarg(this.sectionStart,this.index),this.state=16,this.sectionStart=this.index+1)}stateInDynamicDirArg(ee){ee===93?this.state=14:(ee===61||isEndOfTagSection(ee))&&(this.cbs.ondirarg(this.sectionStart,this.index+1),this.handleAttrNameEnd(ee))}stateInDirModifier(ee){ee===61||isEndOfTagSection(ee)?(this.cbs.ondirmodifier(this.sectionStart,this.index),this.handleAttrNameEnd(ee)):ee===46&&(this.cbs.ondirmodifier(this.sectionStart,this.index),this.sectionStart=this.index+1)}handleAttrNameEnd(ee){this.sectionStart=this.index,this.state=17,this.cbs.onattribnameend(this.index),this.stateAfterAttrName(ee)}stateAfterAttrName(ee){ee===61?this.state=18:ee===47||ee===62?(this.cbs.onattribend(0,this.sectionStart),this.sectionStart=-1,this.state=11,this.stateBeforeAttrName(ee)):isWhitespace(ee)||(this.cbs.onattribend(0,this.sectionStart),this.handleAttrStart(ee))}stateBeforeAttrValue(ee){ee===34?(this.state=19,this.sectionStart=this.index+1):ee===39?(this.state=20,this.sectionStart=this.index+1):isWhitespace(ee)||(this.sectionStart=this.index,this.state=21,this.stateInAttrValueNoQuotes(ee))}handleInAttrValue(ee,te){(ee===te||this.fastForwardTo(te))&&(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=-1,this.cbs.onattribend(te===34?3:2,this.index+1),this.state=11)}stateInAttrValueDoubleQuotes(ee){this.handleInAttrValue(ee,34)}stateInAttrValueSingleQuotes(ee){this.handleInAttrValue(ee,39)}stateInAttrValueNoQuotes(ee){isWhitespace(ee)||ee===62?(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=-1,this.cbs.onattribend(1,this.index),this.state=11,this.stateBeforeAttrName(ee)):(ee===39||ee===60||ee===61||ee===96)&&this.cbs.onerr(18,this.index)}stateBeforeDeclaration(ee){ee===91?(this.state=26,this.sequenceIndex=0):this.state=ee===45?25:23}stateInDeclaration(ee){(ee===62||this.fastForwardTo(62))&&(this.state=1,this.sectionStart=this.index+1)}stateInProcessingInstruction(ee){(ee===62||this.fastForwardTo(62))&&(this.cbs.onprocessinginstruction(this.sectionStart,this.index),this.state=1,this.sectionStart=this.index+1)}stateBeforeComment(ee){ee===45?(this.state=28,this.currentSequence=Sequences.CommentEnd,this.sequenceIndex=2,this.sectionStart=this.index+1):this.state=23}stateInSpecialComment(ee){(ee===62||this.fastForwardTo(62))&&(this.cbs.oncomment(this.sectionStart,this.index),this.state=1,this.sectionStart=this.index+1)}stateBeforeSpecialS(ee){ee===Sequences.ScriptEnd[3]?this.startSpecial(Sequences.ScriptEnd,4):ee===Sequences.StyleEnd[3]?this.startSpecial(Sequences.StyleEnd,4):(this.state=6,this.stateInTagName(ee))}stateBeforeSpecialT(ee){ee===Sequences.TitleEnd[3]?this.startSpecial(Sequences.TitleEnd,4):ee===Sequences.TextareaEnd[3]?this.startSpecial(Sequences.TextareaEnd,4):(this.state=6,this.stateInTagName(ee))}startEntity(){}stateInEntity(){}parse(ee){for(this.buffer=ee;this.index<this.buffer.length;){const te=this.buffer.charCodeAt(this.index);switch(te===10&&this.state!==33&&this.newlines.push(this.index),this.state){case 1:{this.stateText(te);break}case 2:{this.stateInterpolationOpen(te);break}case 3:{this.stateInterpolation(te);break}case 4:{this.stateInterpolationClose(te);break}case 31:{this.stateSpecialStartSequence(te);break}case 32:{this.stateInRCDATA(te);break}case 26:{this.stateCDATASequence(te);break}case 19:{this.stateInAttrValueDoubleQuotes(te);break}case 12:{this.stateInAttrName(te);break}case 13:{this.stateInDirName(te);break}case 14:{this.stateInDirArg(te);break}case 15:{this.stateInDynamicDirArg(te);break}case 16:{this.stateInDirModifier(te);break}case 28:{this.stateInCommentLike(te);break}case 27:{this.stateInSpecialComment(te);break}case 11:{this.stateBeforeAttrName(te);break}case 6:{this.stateInTagName(te);break}case 34:{this.stateInSFCRootTagName(te);break}case 9:{this.stateInClosingTagName(te);break}case 5:{this.stateBeforeTagName(te);break}case 17:{this.stateAfterAttrName(te);break}case 20:{this.stateInAttrValueSingleQuotes(te);break}case 18:{this.stateBeforeAttrValue(te);break}case 8:{this.stateBeforeClosingTagName(te);break}case 10:{this.stateAfterClosingTagName(te);break}case 29:{this.stateBeforeSpecialS(te);break}case 30:{this.stateBeforeSpecialT(te);break}case 21:{this.stateInAttrValueNoQuotes(te);break}case 7:{this.stateInSelfClosingTag(te);break}case 23:{this.stateInDeclaration(te);break}case 22:{this.stateBeforeDeclaration(te);break}case 25:{this.stateBeforeComment(te);break}case 24:{this.stateInProcessingInstruction(te);break}case 33:{this.stateInEntity();break}}this.index++}this.cleanup(),this.finish()}cleanup(){this.sectionStart!==this.index&&(this.state===1||this.state===32&&this.sequenceIndex===0?(this.cbs.ontext(this.sectionStart,this.index),this.sectionStart=this.index):(this.state===19||this.state===20||this.state===21)&&(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=this.index))}finish(){this.handleTrailingData(),this.cbs.onend()}handleTrailingData(){const ee=this.buffer.length;this.sectionStart>=ee||(this.state===28?this.currentSequence===Sequences.CdataEnd?this.cbs.oncdata(this.sectionStart,ee):this.cbs.oncomment(this.sectionStart,ee):this.state===6||this.state===11||this.state===18||this.state===17||this.state===12||this.state===13||this.state===14||this.state===15||this.state===16||this.state===20||this.state===19||this.state===21||this.state===9||this.cbs.ontext(this.sectionStart,ee))}emitCodePoint(ee,te){}}const CompilerDeprecationTypes={COMPILER_IS_ON_ELEMENT:"COMPILER_IS_ON_ELEMENT",COMPILER_V_BIND_SYNC:"COMPILER_V_BIND_SYNC",COMPILER_V_BIND_OBJECT_ORDER:"COMPILER_V_BIND_OBJECT_ORDER",COMPILER_V_ON_NATIVE:"COMPILER_V_ON_NATIVE",COMPILER_V_IF_V_FOR_PRECEDENCE:"COMPILER_V_IF_V_FOR_PRECEDENCE",COMPILER_NATIVE_TEMPLATE:"COMPILER_NATIVE_TEMPLATE",COMPILER_INLINE_TEMPLATE:"COMPILER_INLINE_TEMPLATE",COMPILER_FILTERS:"COMPILER_FILTERS"},deprecationData={COMPILER_IS_ON_ELEMENT:{message:'Platform-native elements with "is" prop will no longer be treated as components in Vue 3 unless the "is" value is explicitly prefixed with "vue:".',link:"https://v3-migration.vuejs.org/breaking-changes/custom-elements-interop.html"},COMPILER_V_BIND_SYNC:{message:ne=>`.sync modifier for v-bind has been removed. Use v-model with argument instead. \`v-bind:${ne}.sync\` should be changed to \`v-model:${n
vendor: 1,682 bytes, line 33
33e}\`.`,link:"https://v3-migration.vuejs.org/breaking-changes/v-model.html"},COMPILER_V_BIND_OBJECT_ORDER:{message:'v-bind="obj" usage is now order sensitive and behaves like JavaScript object spread: it will now overwrite an existing non-mergeable attribute that appears before v-bind in the case of conflict. To retain 2.x behavior, move v-bind to make it the first attribute. You can also suppress this warning if the usage is intended.',link:"https://v3-migration.vuejs.org/breaking-changes/v-bind.html"},COMPILER_V_ON_NATIVE:{message:".native modifier for v-on has been removed as is no longer necessary.",link:"https://v3-migration.vuejs.org/breaking-changes/v-on-native-modifier-removed.html"},COMPILER_V_IF_V_FOR_PRECEDENCE:{message:"v-if / v-for precedence when used on the same element has changed in Vue 3: v-if now takes higher precedence and will no longer have access to v-for scope variables. It is best to avoid the ambiguity with <template> tags or use a computed property that filters v-for data source.",link:"https://v3-migration.vuejs.org/breaking-changes/v-if-v-for.html"},COMPILER_NATIVE_TEMPLATE:{message:"<template> with no special directives will render as a native template element instead of its inner content in Vue 3."},COMPILER_INLINE_TEMPLATE:{message:'"inline-template" has been removed in Vue 3.',link:"https://v3-migration.vuejs.org/breaking-changes/inline-template-attribute.html"},COMPILER_FILTERS:{message:'filters have been removed in Vue 3. The "|" symbol will be treated as native JavaScript bitwise OR operator. Use method calls or computed properties instead.',link:"https://v3-migration.vuejs.org/breaking-changes/filters.html"}};function 
vendor: 12,979 bytes, lines 33-35
33getCompatValue(ne,{compatConfig:ee}){const te=ee&&ee[ne];return ne==="MODE"?te||3:te}function isCompatEnabled(ne,ee){const te=getCompatValue("MODE",ee),st=getCompatValue(ne,ee);return te===3?st===!0:st!==!1}function checkCompatEnabled(ne,ee,te,...st){return isCompatEnabled(ne,ee)}function warnDeprecation(ne,ee,te,...st){if(getCompatValue(ne,ee)==="suppress-warning")return;const{message:ct,link:ut}=deprecationData[ne],dt=`(deprecation ${ne}) ${typeof ct=="function"?ct(...st):ct}${ut?`
34  Details: ${ut}`:""}`,ht=new SyntaxError(dt);ht.code=ne,te&&(ht.loc=te),ee.onWarn(ht)}function defaultOnError(ne){throw ne}function defaultOnWarn(ne){}function createCompilerError(ne,ee,te,st){const ot=`https://vuejs.org/error-reference/#compiler-${ne}`,ct=new SyntaxError(String(ot));return ct.code=ne,ct.loc=ee,ct}const ErrorCodes={ABRUPT_CLOSING_OF_EMPTY_COMMENT:0,0:"ABRUPT_CLOSING_OF_EMPTY_COMMENT",CDATA_IN_HTML_CONTENT:1,1:"CDATA_IN_HTML_CONTENT",DUPLICATE_ATTRIBUTE:2,2:"DUPLICATE_ATTRIBUTE",END_TAG_WITH_ATTRIBUTES:3,3:"END_TAG_WITH_ATTRIBUTES",END_TAG_WITH_TRAILING_SOLIDUS:4,4:"END_TAG_WITH_TRAILING_SOLIDUS",EOF_BEFORE_TAG_NAME:5,5:"EOF_BEFORE_TAG_NAME",EOF_IN_CDATA:6,6:"EOF_IN_CDATA",EOF_IN_COMMENT:7,7:"EOF_IN_COMMENT",EOF_IN_SCRIPT_HTML_COMMENT_LIKE_TEXT:8,8:"EOF_IN_SCRIPT_HTML_COMMENT_LIKE_TEXT",EOF_IN_TAG:9,9:"EOF_IN_TAG",INCORRECTLY_CLOSED_COMMENT:10,10:"INCORRECTLY_CLOSED_COMMENT",INCORRECTLY_OPENED_COMMENT:11,11:"INCORRECTLY_OPENED_COMMENT",INVALID_FIRST_CHARACTER_OF_TAG_NAME:12,12:"INVALID_FIRST_CHARACTER_OF_TAG_NAME",MISSING_ATTRIBUTE_VALUE:13,13:"MISSING_ATTRIBUTE_VALUE",MISSING_END_TAG_NAME:14,14:"MISSING_END_TAG_NAME",MISSING_WHITESPACE_BETWEEN_ATTRIBUTES:15,15:"MISSING_WHITESPACE_BETWEEN_ATTRIBUTES",NESTED_COMMENT:16,16:"NESTED_COMMENT",UNEXPECTED_CHARACTER_IN_ATTRIBUTE_NAME:17,17:"UNEXPECTED_CHARACTER_IN_ATTRIBUTE_NAME",UNEXPECTED_CHARACTER_IN_UNQUOTED_ATTRIBUTE_VALUE:18,18:"UNEXPECTED_CHARACTER_IN_UNQUOTED_ATTRIBUTE_VALUE",UNEXPECTED_EQUALS_SIGN_BEFORE_ATTRIBUTE_NAME:19,19:"UNEXPECTED_EQUALS_SIGN_BEFORE_ATTRIBUTE_NAME",UNEXPECTED_NULL_CHARACTER:20,20:"UNEXPECTED_NULL_CHARACTER",UNEXPECTED_QUESTION_MARK_INSTEAD_OF_TAG_NAME:21,21:"UNEXPECTED_QUESTION_MARK_INSTEAD_OF_TAG_NAME",UNEXPECTED_SOLIDUS_IN_TAG:22,22:"UNEXPECTED_SOLIDUS_IN_TAG",X_INVALID_END_TAG:23,23:"X_INVALID_END_TAG",X_MISSING_END_TAG:24,24:"X_MISSING_END_TAG",X_MISSING_INTERPOLATION_END:25,25:"X_MISSING_INTERPOLATION_END",X_MISSING_DIRECTIVE_NAME:26,26:"X_MISSING_DIRECTIVE_NAME",X_MISSING_DYNAMIC_DIRECTIVE_ARGUMENT_END:27,27:"X_MISSING_DYNAMIC_DIRECTIVE_ARGUMENT_END",X_V_IF_NO_EXPRESSION:28,28:"X_V_IF_NO_EXPRESSION",X_V_IF_SAME_KEY:29,29:"X_V_IF_SAME_KEY",X_V_ELSE_NO_ADJACENT_IF:30,30:"X_V_ELSE_NO_ADJACENT_IF",X_V_FOR_NO_EXPRESSION:31,31:"X_V_FOR_NO_EXPRESSION",X_V_FOR_MALFORMED_EXPRESSION:32,32:"X_V_FOR_MALFORMED_EXPRESSION",X_V_FOR_TEMPLATE_KEY_PLACEMENT:33,33:"X_V_FOR_TEMPLATE_KEY_PLACEMENT",X_V_BIND_NO_EXPRESSION:34,34:"X_V_BIND_NO_EXPRESSION",X_V_ON_NO_EXPRESSION:35,35:"X_V_ON_NO_EXPRESSION",X_V_SLOT_UNEXPECTED_DIRECTIVE_ON_SLOT_OUTLET:36,36:"X_V_SLOT_UNEXPECTED_DIRECTIVE_ON_SLOT_OUTLET",X_V_SLOT_MIXED_SLOT_USAGE:37,37:"X_V_SLOT_MIXED_SLOT_USAGE",X_V_SLOT_DUPLICATE_SLOT_NAMES:38,38:"X_V_SLOT_DUPLICATE_SLOT_NAMES",X_V_SLOT_EXTRANEOUS_DEFAULT_SLOT_CHILDREN:39,39:"X_V_SLOT_EXTRANEOUS_DEFAULT_SLOT_CHILDREN",X_V_SLOT_MISPLACED:40,40:"X_V_SLOT_MISPLACED",X_V_MODEL_NO_EXPRESSION:41,41:"X_V_MODEL_NO_EXPRESSION",X_V_MODEL_MALFORMED_EXPRESSION:42,42:"X_V_MODEL_MALFORMED_EXPRESSION",X_V_MODEL_ON_SCOPE_VARIABLE:43,43:"X_V_MODEL_ON_SCOPE_VARIABLE",X_V_MODEL_ON_PROPS:44,44:"X_V_MODEL_ON_PROPS",X_V_MODEL_ON_CONST:45,45:"X_V_MODEL_ON_CONST",X_INVALID_EXPRESSION:46,46:"X_INVALID_EXPRESSION",X_KEEP_ALIVE_INVALID_CHILDREN:47,47:"X_KEEP_ALIVE_INVALID_CHILDREN",X_PREFIX_ID_NOT_SUPPORTED:48,48:"X_PREFIX_ID_NOT_SUPPORTED",X_MODULE_MODE_NOT_SUPPORTED:49,49:"X_MODULE_MODE_NOT_SUPPORTED",X_CACHE_HANDLER_NOT_SUPPORTED:50,50:"X_CACHE_HANDLER_NOT_SUPPORTED",X_SCOPE_ID_NOT_SUPPORTED:51,51:"X_SCOPE_ID_NOT_SUPPORTED",X_VNODE_HOOKS:52,52:"X_VNODE_HOOKS",X_V_BIND_INVALID_SAME_NAME_ARGUMENT:53,53:"X_V_BIND_INVALID_SAME_NAME_ARGUMENT",__EXTEND_POINT__:54,54:"__EXTEND_POINT__"},errorMessages={0:"Illegal comment.",1:"CDATA section is allowed only in XML context.",2:"Duplicate attribute.",3:"End tag cannot have attributes.",4:"Illegal '/' in tags.",5:"Unexpected EOF in tag.",6:"Unexpected EOF in CDATA section.",7:"Unexpected EOF in comment.",8:"Unexpected EOF in script.",9:"Unexpected EOF in tag.",10:"Incorrectly closed comment.",11:"Incorrectly opened comment.",12:"Illegal tag name. Use '&lt;' to print '<'.",13:"Attribute value was expected.",14:"End tag name was expected.",15:"Whitespace was expected.",16:"Unexpected '<!--' in comment.",17:`Attribute name cannot contain U+0022 ("), U+0027 ('), and U+003C (<).`,18:"Unquoted attribute value cannot contain U+0022 (\"), U+0027 ('), U+003C (<), U+003D (=), and U+0060 (`).",19:"Attribute name cannot start with '='.",21:"'<?' is allowed only in XML context.",20:"Unexpected null character.",22:"Illegal '/' in tags.",23:"Invalid end tag.",24:"Element is missing end tag.",25:"Interpolation end sign was not found.",27:"End bracket for dynamic directive argument was not found. Note that dynamic directive argument cannot contain spaces.",26:"Legal directive name was expected.",28:"v-if/v-else-if is missing expression.",29:"v-if/else branches must use unique keys.",30:"v-else/v-else-if has no adjacent v-if or v-else-if.",31:"v-for is missing expression.",32:"v-for has invalid expression.",33:"<template v-for> key should be placed on the <template> tag.",34:"v-bind is missing expression.",53:"v-bind with same-name shorthand only allows static argument.",35:"v-on is missing expression.",36:"Unexpected custom directive on <slot> outlet.",37:"Mixed v-slot usage on both the component and nested <template>. When there are multiple named slots, all slots should use <template> syntax to avoid scope ambiguity.",38:"Duplicate slot names found. ",39:"Extraneous children found when component already has explicitly named default slot. These children will be ignored.",40:"v-slot can only be used on components or <template> tags.",41:"v-model is missing expression.",42:"v-model value must be a valid JavaScript member expression.",43:"v-model cannot be used on v-for or v-slot scope variables because they are not writable.",44:`v-model cannot be used on a prop, because local prop bindings are not writable.
35Use a v-bind binding combined with a v-on listener that emits update:x event instead.`,45:"v-model cannot be used on a const binding because it is not writable.",46:"Error parsing JavaScript expression: ",47:"<KeepAlive> expects exactly one child component.",52:"@vnode-* hooks in templates are no longer supported. Use the vue: prefix instead. For example, @vnode-mounted should be changed to @vue:mounted. @vnode-* hooks support has been removed in 3.4.",48:'"prefixIdentifiers" option is not supported in this build of compiler.',49:"ES module mode is not supported in this build of compiler.",50:'"cacheHandlers" option is only supported when the "prefixIdentifiers" option is enabled.',51:'"scopeId" option is only supported in module mode.',54:""};function walkIdentifiers(ne,ee,te=!1,st=[],ot=Object.create(null)){}function isReferencedIdentifier(ne,ee,te){return!1}function isInDestructureAssignment(ne,ee){if(ne&&(ne.type==="ObjectProperty"||ne.type==="ArrayPattern")){let te=ee.length;for(;te--;){const st=ee[te];if(st.type==="AssignmentExpression")return!0;if(st.type!=="ObjectProperty"&&!st.type.endsWith("Pattern"))break}}return!1}function isInNewExpression(ne){let ee=ne.length;for(;ee--;){const te=ne[ee];if(te.type==="NewExpression")return!0;if(te.type!=="MemberExpression")break}return!1}function walkFunctionParams(ne,ee){for(const te of ne.params)for(const st of extractIdentifiers(te))ee(st)}function walkBlockDeclarations(ne,ee){const te=ne.type==="SwitchCase"?ne.consequent:ne.body;for(const st of te)if(st.type==="VariableDeclaration"){if(st.declare)continue;for(const ot of st.declarations)for(const ct of extractIdentifiers(ot.id))ee(ct)}else if(st.type==="FunctionDeclaration"||st.type==="ClassDeclaration"){if(st.declare||!st.id)continue;ee(st.id)}else isForStatement(st)?walkForStatement(st,!0,ee):st.type==="SwitchStatement"&&walkSwitchStatement(st,!0,ee)}function isForStatement(ne){return ne.type==="ForOfStatement"||ne.type==="ForInStatement"||ne.type==="ForStatement"}function walkForStatement(ne,ee,te){const st=ne.type==="ForStatement"?ne.init:ne.left;if(st&&st.type==="VariableDeclaration"&&(st.kind==="var"?ee:!ee))for(const ot of st.declarations)for(const ct of extractIdentifiers(ot.id))te(ct)}function walkSwitchStatement(ne,ee,te){for(const st of ne.cases){for(const ot of st.consequent)if(ot.type==="VariableDeclaration"&&(ot.kind==="var"?ee:!ee))for(const ct of ot.declarations)for(const ut of extractIdentifiers(ct.id))te(ut);walkBlockDeclarations(st,te)}}function extractIdentifiers(ne,ee=[]){switch(ne.type){case"Identifier":ee.push(ne);break;case"MemberExpression":let te=ne;for(;te.type==="MemberExpression";)te=te.object;ee.push(te);break;case"ObjectPattern":for(const st of ne.properties)st.type==="RestElement"?extractIdentifiers(st.argument,ee):extractIdentifiers(st.value,ee);break;case"ArrayPattern":ne.elements.forEach(st=>{st&&extractIdentifiers(st,ee)});break;case"RestElement":extractIdentifiers(ne.argument,ee);break;case"AssignmentPattern":extractIdentifiers(ne.left,ee);break}return ee}const isFunctionType=ne=>/Function(?:Expression|Declaration)$|Method$/.test(ne.type),isStaticProperty=ne=>ne&&(ne.type==="ObjectProperty"||ne.type==="ObjectMethod")&&!ne.computed,isStaticPropertyKey=(ne,ee)=>isStaticProperty(ee)&&ee.key===ne,TS_NODE_TYPES=["TSAsExpression","TSTypeAssertion","TSNonNullExpression","TSInstantiationExpression","TSSatisfiesExpression"];function unwrapTSNode(ne){return TS_NODE_TYPES.includes(ne.type)?unwrapTSNode(ne.expression):ne}const isStaticExp=ne=>ne.type===4&&ne.isStatic;function isCoreComponent(ne){switch(ne){case"Teleport":case"teleport":return TELEPORT;case"Suspense":case"suspense":return SUSPENSE;case"KeepAlive":case"keep-alive":return KEEP_ALIVE;case"BaseTransition":case"base-transition":return BASE_TRANSITION}}const nonIdentifierRE=/^$|^\d|[^\$\w\xA0-\uFFFF]/,isSimpleIdentifier=ne=>!nonIdentifierRE.test(ne),validFirstIdentCharRE=/[A-Za-z_$\xA0-\uFFFF]/,validIdentCharRE=/[\.\?\w$\xA0-\uFFFF]/,whitespaceRE=/\s+[.[]\s*|\s*[.[]\s+/g,getExpSource=ne=>ne.type===4?ne.content:ne.loc.source,isMemberExpressionBrowser=ne=>{const ee=getExpSource(ne).trim().replace(whitespaceRE,dt=>dt.trim());let te=0,st=[],ot=0,ct=0,ut=null;for(let dt=0;dt<ee.length;dt++){const ht=ee.charAt(dt);switch(te){case 0:if(ht==="[")st.push(te),te=1,ot++;else if(ht==="(")st.push(te),te=2,ct++;else if(!(dt===0?validFirstIdentCharRE:validIdentCharRE).test(ht))return!1;break;case 1:ht==="'"||ht==='"'||ht==="`"?(st.push(te),te=3,ut=ht):ht==="["?ot++:ht==="]"&&(--ot||(te=st.pop()));break;case 2:if(ht==="'"||ht==='"'||ht==="`")st.push(te),te=3,ut=ht;else if(ht==="(")ct++;else if(ht===")"){if(dt===ee.length-1)return!1;--ct||(te=st.pop())}break;case 3:ht===ut&&(te=st.pop(),ut=null);break}}return!ot&&!ct},isMemberExpressionNode=NOOP,isMemberExpression=isMemberExpressionBrowser,fnExpRE=/^\s*(?:async\s*)?(?:\([^)]*?\)|[\w$_]+)\s*(?::[^=]+)?=>|^\s*(?:async\s+)?function(?:\s+[\w$]+)?\s*\(/,isFnExpressionBrowser=ne=>fnExpRE.test(getExpSource(ne)),isFnExpressionNode=NOOP,isFnExpression=isFnExpressionBrowser;function advancePositionWithClone(ne,ee,te=ee.length){return advancePositionWithMutation({offset:ne.offset,line:ne.line,column:ne.column},ee,te)}function advancePositionWithMutation(ne,ee,te=ee.length){let st=0,ot=-1;for(let ct=0;ct<te;ct++)ee.charCodeAt(ct)===10&&(st++,ot=ct);return ne.offset+=te,ne.line+=st,ne.column=ot===-1?ne.column+te:te-ot,ne}function assert$1(ne,ee){if(!ne)throw new Error(ee||"unexpected compiler condition")}function findDir(ne,ee,te=!1){for(let st=0;st<ne.props.length;st++){const ot=ne.props[st];if(ot.type===7&&(te||ot.exp)&&(isString(ee)?ot.name===ee:ee.test(ot.name)))return ot}}function findProp(ne,ee,te=!1,st=!1){for(let ot=0;ot<ne.props.length;ot++){const ct=ne.props[ot];if(ct.type===6){if(te)continue;if(ct.name===ee&&(ct.value||st))return ct}else if(ct.name==="bind"&&(ct.exp||st)&&isStaticArgOf(ct.arg,ee))return ct}}function isStaticArgOf(ne,ee){return!!(ne&&isStaticExp(ne)&&ne.content===ee)}function hasDynamicKeyVBind(ne){return ne.props.some(ee=>ee.type===7&&ee.name==="bind"&&(!ee.arg||ee.arg.type!==4||!ee.arg.isStatic))}function isText$1(ne){return ne.type===5||ne.type===2}function isVPre(ne){return ne.type===7&&ne.name==="pre"}function isVSlot(ne){return ne.type===7&&ne.name==="slot"}function isTemplateNode(ne){return ne.type===1&&ne.tagType===3}function isSlotOutlet(ne){return ne.type===1&&ne.tagType===2}const propsHelperSet=new Set([NORMALIZE_PROPS,GUARD_REACTIVE_PROP
35S]);function getUnnormalizedProps(ne,ee=[]){if(ne&&!isString(ne)&&ne.type===14){const te=ne.callee;if(!isString(te)&&propsHelperSet.has(te))return getUnnormalizedProps(ne.arguments[0],ee.concat(ne))}return[ne,ee]}function injectProp(ne,ee,te){if(ne.type!==13&&injectSlotKey(ne,ee))return;let st,ot=ne.type===13?ne.props:ne.arguments[2],ct=[],ut;if(ot&&!isString(ot)&&ot.type===14){const dt=getUnnormalizedProps(ot);ot=dt[0],ct=dt[1],ut=ct[ct.length-1]}if(ot==null||isString(ot))st=createObjectExpression([ee]);else if(ot.type===14){const dt=ot.arguments[0];!isString(dt)&&dt.type===15?hasProp(ee,dt)||dt.properties.unshift(ee):ot.callee===TO_HANDLERS?st=createCallExpression(te.helper(MERGE_PROPS),[createObjectExpression([ee]),ot]):ot.arguments.unshift(createObjectExpression([ee])),!st&&(st=ot)}else ot.type===15?(hasProp(ee,ot)||ot.properties.unshift(ee),st=ot):(st=createCallExpression(te.helper(MERGE_PROPS),[createObjectExpression([ee]),ot]),ut&&ut.callee===GUARD_REACTIVE_PROPS&&(ut=ct[ct.length-2]));ne.type===13?ut?ut.arguments[0]=st:ne.props=st:ut?ut.arguments[0]=st:ne.arguments[2]=st}function injectSlotKey(ne,ee){var te,st,ot;if(ee.key.type!==4||ee.key.content!=="key")return!1;const ct=ne.arguments[2];if(ct&&!isString(ct)){const[ut]=getUnnormalizedProps(ct);if(ut&&!isString(ut)&&ut.type===15&&hasProp(ee,ut))return!0}return(te=ne.arguments)[2]||(te[2]="{}"),(st=ne.arguments)[3]||(st[3]="undefined"),(ot=ne.arguments)[4]||(ot[4]="undefined"),ne.arguments[5]=ee.value,!0}function hasProp(ne,ee){let te=!1;if(ne.key.type===4){const st=ne.key.content;te=ee.properties.some(ot=>ot.key.type===4&&ot.key.content===st)}return te}function toValidAssetId(ne,ee){return`_${ee}_${ne.replace(/[^\w]/g,(te,st)=>te==="-"?"_":ne.charCodeAt(st).toString())}`}function hasScopeRef(ne,ee){if(!ne||Object.keys(ee).length===0)return!1;switch(ne.type){case 1:for(let te=0;te<ne.props.length;te++){const st=ne.props[te];if(st.type===7&&(hasScopeRef(st.arg,ee)||hasScopeRef(st.exp,ee)))return!0}return ne.children.some(te=>hasScopeRef(te,ee));case 11:return hasScopeRef(ne.source,ee)?!0:ne.children.some(te=>hasScopeRef(te,ee));case 9:return ne.branches.some(te=>hasScopeRef(te,ee));case 10:return hasScopeRef(ne.condition,ee)?!0:ne.children.some(te=>hasScopeRef(te,ee));case 4:return!ne.isStatic&&isSimpleIdentifier(ne.content)&&!!ee[ne.content];case 8:return ne.children.some(te=>isObject$2(te)&&hasScopeRef(te,ee));case 5:case 12:return hasScopeRef(ne.content,ee);case 2:case 3:case 20:return!1;default:return!1}}function getMemoedVNodeCall(ne){return ne.type===14&&ne.callee===WITH_MEMO?ne.arguments[1].returns:ne}const forAliasRE=/([\s\S]*?)\s+(?:in|of)\s+(\S[\s\S]*)/;function isAllWhitespace(ne){for(let ee=0;ee<ne.length;ee++)if(!isWhitespace(ne.charCodeAt(ee)))return!1;return!0}function isWhitespaceText(ne){return ne.type===2&&isAllWhitespace(ne.content)||ne.type===12&&isWhitespaceText(ne.content)}function isCommentOrWhitespace(ne){return ne.type===3||isWhitespaceText(ne)}const defaultParserOptions={parseMode:"base",ns:0,delimiters:["{{","}}"],getNamespace:()=>0,isVoidTag:NO,isPreTag:NO,isIgnoreNewlineTag:NO,isCustomElement:NO,onError:defaultOnError,onWarn:defaultOnWarn,comments:!1,prefixIdentifiers:!1};let currentOptions=defaultParserOptions,currentRoot=null,currentInput="",currentOpenTag=null,currentProp=null,currentAttrValue="",currentAttrStartIndex=-1,
vendor: 29,025 bytes, lines 35-41
35currentAttrEndIndex=-1,inPre=0,inVPre=!1,currentVPreBoundary=null;const stack=[],tokenizer=new Tokenizer(stack,{onerr:emitError,ontext(ne,ee){onText(getSlice(ne,ee),ne,ee)},ontextentity(ne,ee,te){onText(ne,ee,te)},oninterpolation(ne,ee){if(inVPre)return onText(getSlice(ne,ee),ne,ee);let te=ne+tokenizer.delimiterOpen.length,st=ee-tokenizer.delimiterClose.length;for(;isWhitespace(currentInput.charCodeAt(te));)te++;for(;isWhitespace(currentInput.charCodeAt(st-1));)st--;let ot=getSlice(te,st);ot.includes("&")&&(ot=currentOptions.decodeEntities(ot,!1)),addNode({type:5,content:createExp(ot,!1,getLoc(te,st)),loc:getLoc(ne,ee)})},onopentagname(ne,ee){const te=getSlice(ne,ee);currentOpenTag={type:1,tag:te,ns:currentOptions.getNamespace(te,stack[0],currentOptions.ns),tagType:0,props:[],children:[],loc:getLoc(ne-1,ee),codegenNode:void 0}},onopentagend(ne){endOpenTag(ne)},onclosetag(ne,ee){const te=getSlice(ne,ee);if(!currentOptions.isVoidTag(te)){let st=!1;for(let ot=0;ot<stack.length;ot++)if(stack[ot].tag.toLowerCase()===te.toLowerCase()){st=!0,ot>0&&emitError(24,stack[0].loc.start.offset);for(let ut=0;ut<=ot;ut++){const dt=stack.shift();onCloseTag(dt,ee,ut<ot)}break}st||emitError(23,backTrack(ne,60))}},onselfclosingtag(ne){const ee=currentOpenTag.tag;currentOpenTag.isSelfClosing=!0,endOpenTag(ne),stack[0]&&stack[0].tag===ee&&onCloseTag(stack.shift(),ne)},onattribname(ne,ee){currentProp={type:6,name:getSlice(ne,ee),nameLoc:getLoc(ne,ee),value:void 0,loc:getLoc(ne)}},ondirname(ne,ee){const te=getSlice(ne,ee),st=te==="."||te===":"?"bind":te==="@"?"on":te==="#"?"slot":te.slice(2);if(!inVPre&&st===""&&emitError(26,ne),inVPre||st==="")currentProp={type:6,name:te,nameLoc:getLoc(ne,ee),value:void 0,loc:getLoc(ne)};else if(currentProp={type:7,name:st,rawName:te,exp:void 0,arg:void 0,modifiers:te==="."?[createSimpleExpression("prop")]:[],loc:getLoc(ne)},st==="pre"){inVPre=tokenizer.inVPre=!0,currentVPreBoundary=currentOpenTag;const ot=currentOpenTag.props;for(let ct=0;ct<ot.length;ct++)ot[ct].type===7&&(ot[ct]=dirToAttr(ot[ct]))}},ondirarg(ne,ee){if(ne===ee)return;const te=getSlice(ne,ee);if(inVPre&&!isVPre(currentProp))currentProp.name+=te,setLocEnd(currentProp.nameLoc,ee);else{const st=te[0]!=="[";currentProp.arg=createExp(st?te:te.slice(1,-1),st,getLoc(ne,ee),st?3:0)}},ondirmodifier(ne,ee){const te=getSlice(ne,ee);if(inVPre&&!isVPre(currentProp))currentProp.name+="."+te,setLocEnd(currentProp.nameLoc,ee);else if(currentProp.name==="slot"){const st=currentProp.arg;st&&(st.content+="."+te,setLocEnd(st.loc,ee))}else{const st=createSimpleExpression(te,!0,getLoc(ne,ee));currentProp.modifiers.push(st)}},onattribdata(ne,ee){currentAttrValue+=getSlice(ne,ee),currentAttrStartIndex<0&&(currentAttrStartIndex=ne),currentAttrEndIndex=ee},onattribentity(ne,ee,te){currentAttrValue+=ne,currentAttrStartIndex<0&&(currentAttrStartIndex=ee),currentAttrEndIndex=te},onattribnameend(ne){const ee=currentProp.loc.start.offset,te=getSlice(ee,ne);currentProp.type===7&&(currentProp.rawName=te),currentOpenTag.props.some(st=>(st.type===7?st.rawName:st.name)===te)&&emitError(2,ee)},onattribend(ne,ee){if(currentOpenTag&&currentProp){if(setLocEnd(currentProp.loc,ee),ne!==0)if(currentAttrValue.includes("&")&&(currentAttrValue=currentOptions.decodeEntities(currentAttrValue,!0)),currentProp.type===6)currentProp.name==="class"&&(currentAttrValue=condense(currentAttrValue).trim()),ne===1&&!currentAttrValue&&emitError(13,ee),currentProp.value={type:2,content:currentAttrValue,loc:ne===1?getLoc(currentAttrStartIndex,currentAttrEndIndex):getLoc(currentAttrStartIndex-1,currentAttrEndIndex+1)},tokenizer.inSFCRoot&&currentOpenTag.tag==="template"&&currentProp.name==="lang"&&currentAttrValue&&currentAttrValue!=="html"&&tokenizer.enterRCDATA(toCharCodes("</template"),0);else{let te=0;currentProp.exp=createExp(currentAttrValue,!1,getLoc(currentAttrStartIndex,currentAttrEndIndex),0,te),currentProp.name==="for"&&(currentProp.forParseResult=parseForExpression(currentProp.exp));let st=-1;currentProp.name==="bind"&&(st=currentProp.modifiers.findIndex(ot=>ot.content==="sync"))>-1&&checkCompatEnabled("COMPILER_V_BIND_SYNC",currentOptions,currentProp.loc,currentProp.arg.loc.source)&&(currentProp.name="model",currentProp.modifiers.splice(st,1))}(currentProp.type!==7||currentProp.name!=="pre")&&currentOpenTag.props.push(currentProp)}currentAttrValue="",currentAttrStartIndex=currentAttrEndIndex=-1},oncomment(ne,ee){currentOptions.comments&&addNode({type:3,content:getSlice(ne,ee),loc:getLoc(ne-4,ee+3)})},onend(){const ne=currentInput.length;for(let ee=0;ee<stack.length;ee++)onCloseTag(stack[ee],ne-1),emitError(24,stack[ee].loc.start.offset)},oncdata(ne,ee){(stack[0]?stack[0].ns:currentOptions.ns)!==0?onText(getSlice(ne,ee),ne,ee):emitError(1,ne-9)},onprocessinginstruction(ne){(stack[0]?stack[0].ns:currentOptions.ns)===0&&emitError(21,ne-1)}}),forIteratorRE=/,([^,\}\]]*)(?:,([^,\}\]]*))?$/,stripParensRE=/^\(|\)$/g;function parseForExpression(ne){const ee=ne.loc,te=ne.content,st=te.match(forAliasRE);if(!st)return;const[,ot,ct]=st,ut=(mt,yt,vt=!1)=>{const _t=ee.start.offset+yt,bt=_t+mt.length;return createExp(mt,!1,getLoc(_t,bt),0,vt?1:0)},dt={source:ut(ct.trim(),te.indexOf(ct,ot.length)),value:void 0,key:void 0,index:void 0,finalized:!1};let ht=ot.trim().replace(stripParensRE,"").trim();const ft=ot.indexOf(ht),pt=ht.match(forIteratorRE);if(pt){ht=ht.replace(forIteratorRE,"").trim();const mt=pt[1].trim();let yt;if(mt&&(yt=te.indexOf(mt,ft+ht.length),dt.key=ut(mt,yt,!0)),pt[2]){const vt=pt[2].trim();vt&&(dt.index=ut(vt,te.indexOf(vt,dt.key?yt+mt.length:ft+ht.length),!0))}}return ht&&(dt.value=ut(ht,ft,!0)),dt}function getSlice(ne,ee){return currentInput.slice(ne,ee)}function endOpenTag(ne){tokenizer.inSFCRoot&&(currentOpenTag.innerLoc=getLoc(ne+1,ne+1)),addNode(currentOpenTag);const{tag:ee,ns:te}=currentOpenTag;te===0&&currentOptions.isPreTag(ee)&&inPre++,currentOptions.isVoidTag(ee)?onCloseTag(currentOpenTag,ne):(stack.unshift(currentOpenTag),(te===1||te===2)&&(tokenizer.inXML=!0)),currentOpenTag=null}function onText(ne,ee,te){{const ct=stack[0]&&stack[0].tag;ct!=="script"&&ct!=="style"&&ne.includes("&")&&(ne=currentOptions.decodeEntities(ne,!1))}const st=stack[0]||currentRoot,ot=st.children[st.children.length-1];ot&&ot.type===2?(ot.content+=ne,setLocEnd(ot.loc,te)):st.children.push({type:2,content:ne,loc:getLoc(ee,te)})}function onCloseTag(ne,ee,te=!1){te?setLocEnd(ne.loc,backTrack(ee,60)):setLocEnd(ne.loc,lookAhead(ee,62)+1),tokenizer.inSFCRoot&&(ne.children.length?ne.innerLoc.end=extend$5({},ne.children[ne.children.length-1].loc.end):ne.innerLoc.end=extend$5({},ne.innerLoc.start),ne.innerLoc.source=getSlice(ne.innerLoc.start.offset,ne.innerLoc.end.offset));const{tag:st,ns:ot,children:ct}=ne;if(inVPre||(st==="slot"?ne.tagType=2:isFragmentTemplate(ne)?ne.tagType=3:isComponent(ne)&&(ne.tagType=1)),tokenizer.inRCDATA||(ne.children=condenseWhitespace(ct)),ot===0&&currentOptions.isIgnoreNewlineTag(st)){const ut=ct[0];ut&&ut.type===2&&(ut.content=ut.content.replace(/^\r?\n/,""))}ot===0&&currentOptions.isPreTag(st)&&inPre--,currentVPreBoundary===ne&&(inVPre=tokenizer.inVPre=!1,currentVPreBoundary=null),tokenizer.inXML&&(stack[0]?stack[0].ns:currentOptions.ns)===0&&(tokenizer.inXML=!1);{const ut=ne.props;if(!tokenizer.inSFCRoot&&isCompatEnabled("COMPILER_NATIVE_TEMPLATE",currentOptions)&&ne.tag==="template"&&!isFragmentTemplate(ne)){const ht=stack[0]||currentRoot,ft=ht.children.indexOf(ne);ht.children.splice(ft,1,...ne.children)}const dt=ut.find(ht=>ht.type===6&&ht.name==="inline-template");dt&&checkCompatEnabled("COMPILER_INLINE_TEMPLATE",currentOptions,dt.loc)&&ne.children.length&&(dt.value={type:2,content:getSlice(ne.children[0].loc.start.offset,ne.children[ne.children.length-1].loc.end.offset),loc:dt.loc})}}function lookAhead(ne,ee){let te=ne;for(;currentInput.charCodeAt(te)!==ee&&te<currentInput.length-1;)te++;return te}function backTrack(ne,ee){let te=ne;for(;currentInput.charCodeAt(te)!==ee&&te>=0;)te--;return te}const specialTemplateDir=new Set(["if","else","else-if","for","slot"]);function isFragmentTemplate({tag:ne,props:ee}){if(ne==="template"){for(let te=0;te<ee.length;te++)if(ee[te].type===7&&specialTemplateDir.has(ee[te].name))return!0}return!1}function isComponent({tag:ne,props:ee}){if(currentOptions.isCustomElement(ne))return!1;if(ne==="component"||isUpperCase(ne.charCodeAt(0))||isCoreComponent(ne)||currentOptions.isBuiltInComponent&&currentOptions.isBuiltInComponent(ne)||currentOptions.isNativeTag&&!currentOptions.isNativeTag(ne))return!0;for(let te=0;te<ee.length;te++){const st=ee[te];if(st.type===6){if(st.name==="is"&&st.value){if(st.value.content.startsWith("vue:"))return!0;if(checkCompatEnabled("COMPILER_IS_ON_ELEMENT",currentOptions,st.loc))return!0}}else if(st.name==="bind"&&isStaticArgOf(st.arg,"is")&&checkCompatEnabled("COMPILER_IS_ON_ELEMENT",currentOptions,st.loc))return!0}return!1}function isUpperCase(ne){return ne>64&&ne<91}const windowsNewlineRE=/\r\n/g;function condenseWhitespace(ne){const ee=currentOptions.whitespace!=="preserve";let te=!1;for(let st=0;st<ne.length;st++){const ot=ne[st];if(ot.type===2)if(inPre)ot.content=ot.content.replace(windowsNewlineRE,`
36`);else if(isAllWhitespace(ot.content)){const ct=ne[st-1]&&ne[st-1].type,ut=ne[st+1]&&ne[st+1].type;!ct||!ut||ee&&(ct===3&&(ut===3||ut===1)||ct===1&&(ut===3||ut===1&&hasNewlineChar(ot.content)))?(te=!0,ne[st]=null):ot.content=" "}else ee&&(ot.content=condense(ot.content))}return te?ne.filter(Boolean):ne}function hasNewlineChar(ne){for(let ee=0;ee<ne.length;ee++){const te=ne.charCodeAt(ee);if(te===10||te===13)return!0}return!1}function condense(ne){let ee="",te=!1;for(let st=0;st<ne.length;st++)isWhitespace(ne.charCodeAt(st))?te||(ee+=" ",te=!0):(ee+=ne[st],te=!1);return ee}function addNode(ne){(stack[0]||currentRoot).children.push(ne)}function getLoc(ne,ee){return{start:tokenizer.getPos(ne),end:ee==null?ee:tokenizer.getPos(ee),source:ee==null?ee:getSlice(ne,ee)}}function cloneLoc(ne){return getLoc(ne.start.offset,ne.end.offset)}function setLocEnd(ne,ee){ne.end=tokenizer.getPos(ee),ne.source=getSlice(ne.start.offset,ee)}function dirToAttr(ne){const ee={type:6,name:ne.rawName,nameLoc:getLoc(ne.loc.start.offset,ne.loc.start.offset+ne.rawName.length),value:void 0,loc:ne.loc};if(ne.exp){const te=ne.exp.loc;te.end.offset<ne.loc.end.offset&&(te.start.offset--,te.start.column--,te.end.offset++,te.end.column++),ee.value={type:2,content:ne.exp.content,loc:te}}return ee}function createExp(ne,ee=!1,te,st=0,ot=0){return createSimpleExpression(ne,ee,te,st)}function emitError(ne,ee,te){currentOptions.onError(createCompilerError(ne,getLoc(ee,ee)))}function reset$1(){tokenizer.reset(),currentOpenTag=null,currentProp=null,currentAttrValue="",currentAttrStartIndex=-1,currentAttrEndIndex=-1,stack.length=0}function baseParse(ne,ee){if(reset$1(),currentInput=ne,currentOptions=extend$5({},defaultParserOptions),ee){let ot;for(ot in ee)ee[ot]!=null&&(currentOptions[ot]=ee[ot])}tokenizer.mode=currentOptions.parseMode==="html"?1:currentOptions.parseMode==="sfc"?2:0,tokenizer.inXML=currentOptions.ns===1||currentOptions.ns===2;const te=ee&&ee.delimiters;te&&(tokenizer.delimiterOpen=toCharCodes(te[0]),tokenizer.delimiterClose=toCharCodes(te[1]));const st=currentRoot=createRoot([],ne);return tokenizer.parse(currentInput),st.loc=getLoc(0,ne.length),st.children=condenseWhitespace(st.children),currentRoot=null,st}function cacheStatic(ne,ee){walk(ne,void 0,ee,!!getSingleElementRoot(ne))}function getSingleElementRoot(ne){const ee=ne.children.filter(te=>te.type!==3);return ee.length===1&&ee[0].type===1&&!isSlotOutlet(ee[0])?ee[0]:null}function walk(ne,ee,te,st=!1,ot=!1){const{children:ct}=ne,ut=[];for(let pt=0;pt<ct.length;pt++){const mt=ct[pt];if(mt.type===1&&mt.tagType===0){const yt=st?0:getConstantType(mt,te);if(yt>0){if(yt>=2){mt.codegenNode.patchFlag=-1,ut.push(mt);continue}}else{const vt=mt.codegenNode;if(vt.type===13){const _t=vt.patchFlag;if((_t===void 0||_t===512||_t===1)&&getGeneratedPropsConstantType(mt,te)>=2){const bt=getNodeProps(mt);bt&&(vt.props=te.hoist(bt))}vt.dynamicProps&&(vt.dynamicProps=te.hoist(vt.dynamicProps))}}}else if(mt.type===12&&(st?0:getConstantType(mt,te))>=2){mt.codegenNode.type===14&&mt.codegenNode.arguments.length>0&&mt.codegenNode.arguments.push("-1"),ut.push(mt);continue}if(mt.type===1){const yt=mt.tagType===1;yt&&te.scopes.vSlot++,walk(mt,ne,te,!1,ot),yt&&te.scopes.vSlot--}else if(mt.type===11)walk(mt,ne,te,mt.children.length===1,!0);else if(mt.type===9)for(let yt=0;yt<mt.branches.length;yt++)walk(mt.branches[yt],ne,te,mt.branches[yt].children.length===1,ot)}let dt=!1;if(ut.length===ct.length&&ne.type===1){if(ne.tagType===0&&ne.codegenNode&&ne.codegenNode.type===13&&isArray$1(ne.codegenNode.children))ne.codegenNode.children=ht(createArrayExpression(ne.codegenNode.children)),dt=!0;else if(ne.tagType===1&&ne.codegenNode&&ne.codegenNode.type===13&&ne.codegenNode.children&&!isArray$1(ne.codegenNode.children)&&ne.codegenNode.children.type===15){const pt=ft(ne.codegenNode,"default");pt&&(pt.returns=ht(createArrayExpression(pt.returns)),dt=!0)}else if(ne.tagType===3&&ee&&ee.type===1&&ee.tagType===1&&ee.codegenNode&&ee.codegenNode.type===13&&ee.codegenNode.children&&!isArray$1(ee.codegenNode.children)&&ee.codegenNode.children.type===15){const pt=findDir(ne,"slot",!0),mt=pt&&pt.arg&&ft(ee.codegenNode,pt.arg);mt&&(mt.returns=ht(createArrayExpression(mt.returns)),dt=!0)}}if(!dt)for(const pt of ut)pt.codegenNode=te.cache(pt.codegenNode);function ht(pt){const mt=te.cache(pt);return mt.needArraySpread=!0,mt}function ft(pt,mt){if(pt.children&&!isArray$1(pt.children)&&pt.children.type===15){const yt=pt.children.properties.find(vt=>vt.key===mt||vt.key.content===mt);return yt&&yt.value}}ut.length&&te.transformHoist&&te.transformHoist(ct,te,ne)}function getConstantType(ne,ee){const{constantCache:te}=ee;switch(ne.type){case 1:if(ne.tagType!==0)return 0;const st=te.get(ne);if(st!==void 0)return st;const ot=ne.codegenNode;if(ot.type!==13||ot.isBlock&&ne.tag!=="svg"&&ne.tag!=="foreignObject"&&ne.tag!=="math")return 0;if(ot.patchFlag===void 0){let ut=3;const dt=getGeneratedPropsConstantType(ne,ee);if(dt===0)return te.set(ne,0),0;dt<ut&&(ut=dt);for(let ht=0;ht<ne.children.length;ht++){const ft=getConstantType(ne.children[ht],ee);if(ft===0)return te.set(ne,0),0;ft<ut&&(ut=ft)}if(ut>1)for(let ht=0;ht<ne.props.length;ht++){const ft=ne.props[ht];if(ft.type===7&&ft.name==="bind"&&ft.exp){const pt=getConstantType(ft.exp,ee);if(pt===0)return te.set(ne,0),0;pt<ut&&(ut=pt)}}if(ot.isBlock){for(let ht=0;ht<ne.props.length;ht++)if(ne.props[ht].type===7)return te.set(ne,0),0;ee.removeHelper(OPEN_BLOCK),ee.removeHelper(getVNodeBlockHelper(ee.inSSR,ot.isComponent)),ot.isBlock=!1,ee.helper(getVNodeHelper(ee.inSSR,ot.isComponent))}return te.set(ne,ut),ut}else return te.set(ne,0),0;case 2:case 3:return 3;case 9:case 11:case 10:return 0;case 5:case 12:return getConstantType(ne.content,ee);case 4:return ne.constType;case 8:let ct=3;for(let ut=0;ut<ne.children.length;ut++){const dt=ne.children[ut];if(isString(dt)||isSymbol(dt))continue;const ht=getConstantType(dt,ee);if(ht===0)return 0;ht<ct&&(ct=ht)}return ct;case 20:return 2;default:return 0}}const allowHoistedHelperSet=new Set([NORMALIZE_CLASS,NORMALIZE_STYLE,NORMALIZE_PROPS,GUARD_REACTIVE_PROPS]);function getConstantTypeOfHelperCall(ne,ee){if(ne.type===14&&!isString(ne.callee)&&allowHoistedHelperSet.has(ne.callee)){const te=ne.arguments[0];if(te.type===4)return getConstantType(te,ee);if(te.type===14)return getConstantTypeOfHelperCall(te,ee)}return 0}function getGeneratedPropsConstantType(ne,ee){let te=3;const st=getNodeProps(ne);if(st&&st.type===15){const{properties:ot}=st;for(let ct=0;ct<ot.length;ct++){const{key:ut,value:dt}=ot[ct],ht=getConstantType(ut,ee);if(ht===0)return ht;ht<te&&(te=ht);let ft;if(dt.type===4?ft=getConstantType(dt,ee):dt.type===14?ft=getConstantTypeOfHelperCall(dt,ee):ft=0,ft===0)return ft;ft<te&&(te=ft)}}return te}function getNodeProps(ne){const ee=ne.codegenNode;if(ee.type===13)return ee.props}function createTransformContext(ne,{filename:ee="",prefixIdentifiers:te=!1,hoistStatic:st=!1,hmr:ot=!1,cacheHandlers:ct=!1,nodeTransforms:ut=[],directiveTransforms:dt={},transformHoist:ht=null,isBuiltInComponent:ft=NOOP,isCustomElement:pt=NOOP,expressionPlugins:mt=[],scopeId:yt=null,slotted:vt=!0,ssr:_t=!1,inSSR:bt=!1,ssrCssVars:xt="",bindingMetadata:Mt=EMPTY_OBJ,inline:Ot=!1,isTS:kt=!1,onError:Nt=defaultOnError,onWarn:Gt=defaultOnWarn,compatConfig:Bt}){const Ut=ee.replace(/\?.*$/,"").match(/([^/\\]+)\.\w+$/),Vt={filename:ee,selfName:Ut&&capitalize(camelize(Ut[1])),prefixIdentifiers:te,hoistStatic:st,hmr:ot,cacheHandlers:ct,nodeTransforms:ut,directiveTransforms:dt,transformHoist:ht,isBuiltInComponent:ft,isCustomElement:pt,expressionPlugins:mt,scopeId:yt,slotted:vt,ssr:_t,inSSR:bt,ssrCssVars:xt,bindingMetadata:Mt,inline:Ot,isTS:kt,onError:Nt,onWarn:Gt,compatConfig:Bt,root:ne,helpers:new Map,components:new Set,directives:new Set,hoists:[],imports:[],cached:[],constantCache:new WeakMap,vForMemoKeyedNodes:new WeakSet,temps:0,identifiers:Object.create(null),scopes:{vFor:0,vSlot:0,vPre:0,vOnce:0},parent:null,grandParent:null,currentNode:ne,childIndex:0,inVOnce:!1,helper(Ht){const zt=Vt.helpers.get(Ht)||0;return Vt.helpers.set(Ht,zt+1),Ht},removeHelper(Ht){const zt=Vt.helpers.get(Ht);if(zt){const jt=zt-1;jt?Vt.helpers.set(Ht,jt):Vt.helpers.delete(Ht)}},helperString(Ht){return`_${helperNameMap[Vt.helper(Ht)]}`},replaceNode(Ht){Vt.parent.children[Vt.childIndex]=Vt.currentNode=Ht},removeNode(Ht){const zt=Vt.parent.children,jt=Ht?zt.indexOf(Ht):Vt.currentNode?Vt.childIndex:-1;!Ht||Ht===Vt.currentNode?(Vt.currentNode=null,Vt.onNodeRemoved()):Vt.childIndex>jt&&(Vt.childIndex--,Vt.onNodeRemoved()),Vt.parent.children.splice(jt,1)},onNodeRemoved:NOOP,addIdentifiers(Ht){},removeIdentifiers(Ht){},hoist(Ht){isString(Ht)&&(Ht=createSimpleExpression(Ht)),Vt.hoists.push(Ht);const zt=createSimpleExpression(`_hoisted_${Vt.hoists.length}`,!1,Ht.loc,2);return zt.hoisted=Ht,zt},cache(Ht,zt=!1,jt=!1){const Wt=createCacheExpression(Vt.cached.length,Ht,zt,jt);return Vt.cached.push(Wt),Wt}};return Vt.filters=new Set,Vt}function transform$2(ne,ee){const te=createTransformContext(ne,ee);traverseNode(ne,te),ee.hoistStatic&&cacheStatic(ne,te),ee.ssr||createRootCodegen(ne,te),ne.helpers=new Set([...te.helpers.keys()]),ne.components=[...te.components],ne.directives=[...te.directives],ne.imports=te.imports,ne.hoists=te.hoists,ne.temps=te.temps,ne.cached=te.cached,ne.transformed=!0,ne.filters=[...te.filters]}function createRootCodegen(ne,ee){const{helper:te}=ee,{children:st}=ne;if(st.length===1){const ot=getSingleElementRoot(ne);if(ot&&ot.codegenNode){const ct=ot.codegenNode;ct.type===13&&convertToBlock(ct,ee),ne.codegenNode=ct}else ne.codegenNode=st[0]}else if(st.length>1){let ot=64;ne.codegenNode=createVNodeCall(ee,te(FRAGMENT),void 0,ne.children,ot,void 0,void 0,!0,void 0,!1)}}function traverseChildren(ne,ee){let te=0;const st=()=>{te--};for(;te<ne.children.length;te++){const ot=ne.children[te];isString(ot)||(ee.grandParent=ee.parent,ee.parent=ne,ee.childIndex=te,ee.onNodeRemoved=st,traverseNode(ot,ee))}}function traverseNode(ne,ee){ee.currentNode=ne;const{nodeTransforms:te}=ee,st=[];for(let ct=0;ct<te.length;ct++){const ut=te[ct](ne,ee);if(ut&&(isArray$1(ut)?st.push(...ut):st.push(ut)),ee.currentNode)ne=ee.currentNode;else return}switch(ne.type){case 3:ee.ssr||ee.helper(CREATE_COMMENT);break;case 5:ee.ssr||ee.helper(TO_DISPLAY_STRING);break;case 9:for(let ct=0;ct<ne.branches.length;ct++)traverseNode(ne.branches[ct],ee);break;case 10:case 11:case 1:case 0:traverseChildren(ne,ee);break}ee.currentNode=ne;let ot=st.length;for(;ot--;)st[ot]()}function createStructuralDirectiveTransform(ne,ee){const te=isString(ne)?st=>st===ne:st=>ne.test(st);return(st,ot)=>{if(st.type===1){const{props:ct}=st;if(st.tagType===3&&ct.some(isVSlot))return;const ut=[];for(let dt=0;dt<ct.length;dt++){const ht=ct[dt];if(ht.type===7&&te(ht.name)){ct.splice(dt,1),dt--;const ft=ee(st,ht,ot);ft&&ut.push(ft)}}return ut}}}const PURE_ANNOTATION="/*@__PURE__*/",aliasHelper=ne=>`${helperNameMap[ne]}: _${helperNameMap[ne]}`;function createCodegenContext(ne,{mode:ee="function",prefixIdentifiers:te=ee==="module",sourceMap:st=!1,filename:ot="template.vue.html",scopeId:ct=null,optimizeImports:ut=!1,runtimeGlobalName:dt="Vue",runtimeModuleName:ht="vue",ssrRuntimeModuleName:ft="vue/server-renderer",ssr:pt=!1,isTS:mt=!1,inSSR:yt=!1}){const vt={mode:ee,prefixIdentifiers:te,sourceMap:st,filename:ot,scopeId:ct,optimizeImports:ut,runtimeGlobalName:dt,runtimeModuleName:ht,ssrRuntimeModuleName:ft,ssr:pt,isTS:mt,inSSR:yt,source:ne.source,code:"",column:1,line:1,offset:0,indentLevel:0,pure:!1,map:void 0,helper(bt){return`_${helperNameMap[bt]}`},push(bt,xt=-2,Mt){vt.code+=bt},indent(){_t(++vt.indentLevel)},deindent(bt=!1){bt?--vt.indentLevel:_t(--vt.indentLevel)},newline(){_t(vt.indentLevel)}};function _t(bt){vt.push(`
37`+"  ".repeat(bt),0)}return vt}function generate(ne,ee={}){const te=createCodegenContext(ne,ee);ee.onContextCreated&&ee.onContextCreated(te);const{mode:st,push:ot,prefixIdentifiers:ct,indent:ut,deindent:dt,newline:ht,scopeId:ft,ssr:pt}=te,mt=Array.from(ne.helpers),yt=mt.length>0,vt=!ct&&st!=="module";genFunctionPreamble(ne,te);const bt=pt?"ssrRender":"render",Mt=(pt?["_ctx","_push","_parent","_attrs"]:["_ctx","_cache"]).join(", ");if(ot(`function ${bt}(${Mt}) {`),ut(),vt&&(ot("with (_ctx) {"),ut(),yt&&(ot(`const { ${mt.map(aliasHelper).join(", ")} } = _Vue
38`,-1),ht())),ne.components.length&&(genAssets(ne.components,"component",te),(ne.directives.length||ne.temps>0)&&ht()),ne.directives.length&&(genAssets(ne.directives,"directive",te),ne.temps>0&&ht()),ne.filters&&ne.filters.length&&(ht(),genAssets(ne.filters,"filter",te),ht()),ne.temps>0){ot("let ");for(let Ot=0;Ot<ne.temps;Ot++)ot(`${Ot>0?", ":""}_temp${Ot}`)}return(ne.components.length||ne.directives.length||ne.temps)&&(ot(`
39`,0),ht()),pt||ot("return "),ne.codegenNode?genNode(ne.codegenNode,te):ot("null"),vt&&(dt(),ot("}")),dt(),ot("}"),{ast:ne,code:te.code,preamble:"",map:te.map?te.map.toJSON():void 0}}function genFunctionPreamble(ne,ee){const{ssr:te,prefixIdentifiers:st,push:ot,newline:ct,runtimeModuleName:ut,runtimeGlobalName:dt,ssrRuntimeModuleName:ht}=ee,ft=dt,pt=Array.from(ne.helpers);if(pt.length>0&&(ot(`const _Vue = ${ft}
40`,-1),ne.hoists.length)){const mt=[CREATE_VNODE,CREATE_ELEMENT_VNODE,CREATE_COMMENT,CREATE_TEXT,CREATE_STATIC].filter(yt=>pt.includes(yt)).map(aliasHelper).join(", ");ot(`const { ${mt} } = _Vue
41`,-1)}genHoists(ne.hoists,ee),ct(),ot("return ")}function genAssets(ne,ee,{helper:te,push:st,newline:ot,isTS:ct}){const ut=te(ee==="filter"?RESOLVE_FILTER:ee==="component"?RESOLVE_COMPONENT:RESOLVE_DIRECTIVE);for(let dt=0;dt<ne.length;dt++){let ht=ne[dt];const ft=ht.endsWith("__self");ft&&(ht=ht.slice(0,-6)),st(`const ${toValidAssetId(ht,ee)} = ${ut}(${JSON.stringify(ht)}${ft?", true":""})${ct?"!":""}`),dt<ne.length-1&&ot()}}function genHoists(ne,ee){if(!ne.length)return;ee.pure=!0;const{push:te,newline:st}=ee;st();for(let ot=0;ot<ne.length;ot++){const ct=ne[ot];ct&&(te(`const _hoisted_${ot+1} = `),genNode(ct,ee),st())}ee.pure=!1}function genNodeListAsArray(ne,ee){const te=ne.length>3||!1;ee.push("["),te&&ee.indent(),genNodeList(ne,ee,te),te&&ee.deindent(),ee.push("]")}function genNodeList(ne,ee,te=!1,st=!0){const{push:ot,newline:ct}=ee;for(let ut=0;ut<ne.length;ut++){const dt=ne[ut];isString(dt)?ot(dt,-3):isArray$1(dt)?genNodeListAsArray(dt,ee):genNode(dt,ee),ut<ne.length-1&&(te?(st&&ot(","),ct()):st&&ot(", "))}}function genNode(ne,ee){if(isString(ne)){ee.push(ne,-3);return}if(isSymbol(ne)){ee.push(ee.helper(ne));return}switch(ne.type){case 1:case 9:case 11:genNode(ne.codegenNode,ee);break;case 2:genText(ne,ee);break;case 4:genExpression(ne,ee);break;case 5:genInterpolation(ne,ee);break;case 12:genNode(ne.codegenNode,ee);break;case 8:genCompoundExpression(ne,ee);break;case 3:genComment(ne,ee);break;case 13:genVNodeCall(ne,ee);break;case 14:genCallExpression(ne,ee);break;case 15:genObjectExpression(ne,ee);break;case 17:genArrayExpression(ne,ee);break;case 18:genFunctionExpression(ne,ee);break;case 19:genConditionalExpression(ne,ee);break;case 20:genCacheExpression(ne,ee);break;case 21:genNodeList(ne.body,ee,!0,!1);break}}function genText(ne,ee){ee.push(JSON.stringify(ne.content),-3,ne)}function genExpression(ne,ee){const{content:te,isStatic:st}=ne;ee.push(st?JSON.stringify(te):te,-3,ne)}function genInterpolation(ne,ee){const{push:te,helper:st,pure:ot}=ee;ot&&te(PURE_ANNOTATION),te(`${st(TO_DISPLAY_STRING)}(`),genNode(ne.content,ee),te(")")}function genCompoundExpression(ne,ee){for(let te=0;te<ne.children.length;te++){const st=ne.children[te];isString(st)?ee.push(st,-3):genNode(st,ee)}}function genExpressionAsPropertyKey(ne,ee){const{push:te}=ee;if(ne.type===8)te("["),genCompoundExpression(ne,ee),te("]");else if(ne.isStatic){const st=isSimpleIdentifier(ne.content)?ne.content:JSON.stringify(ne.content);te(st,-2,ne)}else te(`[${ne.content}]`,-3,ne)}function genComment(ne,ee){const{push:te,helper:st,pure:ot}=ee;ot&&te(PURE_ANNOTATION),te(`${st(CREATE_COMMENT)}(${JSON.stringify(ne.content)})`,-3,ne)}function genVNodeCall(ne,ee){const{push:te,helper:st,pure:ot}=ee,{tag:ct,props:ut,children:dt,patchFlag:ht,dynamicProps:ft,directives:pt,isBlock:mt,disableTracking:yt,isComponent:vt}=ne;let _t;ht&&(_t=String(ht)),pt&&te(st(WITH_DIRECTIVES)+"("),mt&&te(`(${st(OPEN_BLOCK)}(${yt?"true":""}), `),ot&&te(PURE_ANNOTATION);const bt=mt?getVNodeBlockHelper(ee.inSSR,vt):getVNodeHelper(ee.inSSR,vt);te(st(bt)+"(",-2,ne),genNodeList(genNullableArgs([ct,ut,dt,_t,ft]),ee),te(")"),mt&&te(")"),pt&&(te(", "),genNode(pt,ee),te(")"))}function genNullableArgs(ne){let ee=ne.length;for(;ee--&&ne[ee]==null;);return ne.slice(0,ee+1).map(te=>te||"null")}function genCallExpression(ne,ee){const{push:te,helper:st,pure:ot}=ee,ct=isString(ne.callee)?ne.callee:st(ne.callee);ot&&te(PURE_ANNOTATION),te(ct+"(",-2,ne),genNodeList(ne.arguments,ee),te(")")}function genObjectExpression(ne,ee){const{push:te,indent:st,deindent:ot,newline:ct}=ee,{properties:ut}=ne;if(!ut.length){te("{}",-2,ne);return}const dt=ut.length>1||!1;te(dt?"{":"{ "),dt&&st();for(let ht=0;ht<ut.length;ht++){const{key:ft,value:pt}=ut[ht];genExpressionAsPropertyKey(ft,ee),te(": "),genNode(pt,ee),ht<ut.length-1&&(te(","),ct())}dt&&ot(),te(dt?"}":" }")}function genArrayExpression(ne,ee){genNodeListAsArray(ne.elements,ee)}function genFunctionExpression(ne,ee){const{push:te,indent:st,deindent:ot}=ee,{params:ct,returns:ut,body:dt,newline:ht,isSlot:ft}=ne;ft&&te(`_${helperNameMap[WITH_CTX]}(`),te("(",-2,ne),isArray$1(ct)?genNodeList(ct,ee):ct&&genNode(ct,ee),te(") => "),(ht||dt)&&(te("{"),st()),ut?(ht&&te("return "),isArray$1(ut)?genNodeListAsArray(ut,ee):genNode(ut,ee)):dt&&genNode(dt,ee),(ht||dt)&&(ot(),te("}")),ft&&(ne.isNonScopedSlot&&te(", undefined, true"),te(")"))}function genConditionalExpression(ne,ee){const{test:te,consequent:st,alternate:ot,newline:ct}=ne,{push:ut,indent:dt,deindent:ht,newline:ft}=ee;if(te.type===4){const mt=!isSimpleIdentifier(te.content);mt&&ut("("),genExpression(te,ee),mt&&ut(")")}else ut("("),genNode(te,ee),ut(")");ct&&dt(),ee.indentLevel++,ct||ut(" "),ut("? "),genNode(st,ee),ee.indentLevel--,ct&&ft(),ct||ut(" "),ut(": ");const pt=ot.type===19;pt||ee.indentLevel++,genNode(ot,ee),pt||ee.indentLevel--,ct&&ht(!0)}function genCacheExpression(ne,ee){const{push:te,helper:st,indent:ot,deindent:ct,newline:ut}=ee,{needPauseTracking:dt,needArraySpread:ht}=ne;ht&&te("[...("),te(`_cache[${ne.index}] || (`),dt&&(ot(),te(`${st(SET_BLOCK_TRACKING)}(-1`),ne.inVOnce&&te(", true"),te("),"),ut(),te("(")),te(`_cache[${ne.index}] = `),genNode(ne.value,ee),dt&&(te(`).cacheIndex = ${ne.index},`),ut(),te(`${st(SET_BLOCK_TRACKING)}(1),`),ut(),te(`_cache[${ne.index}]`),ct()),te(")"),ht&&te(")]")}new RegExp("\\b"+"arguments,await,break,case,catch,class,const,continue,debugger,default,delete,do,else,export,extends,finally,for,function,if,import,let,new,return,super,switch,throw,try,var,void,while,with,yield".split(",").join("\\b|\\b")+"\\b");const transformExpression=(ne,ee)=>{if(ne.type===5)ne.content=processExpression(ne.content,ee);else if(ne.type===1){const te=findDir(ne,"memo");for(let st=0;st<ne.props.length;st++){const ot=ne.props[st];if(ot.type===7&&ot.name!=="for"){const ct=ot.exp,ut=ot.arg;ct&&ct.type===4&&!(ot.name==="on"&&ut)&&!(te&&ee.vForMemoKeyedNodes.has(ne)&&ut&&ut.type===4&&ut.content==="key")&&(ot.exp=processExpression(ct,ee,ot.name==="slot")),ut&&ut.type===4&&!ut.isStatic&&(ot.arg=processExpression(ut,ee))}}}};function processExpression(ne,ee,te=!1,st=!1,ot=Object.create(ee.identifiers)){return ne}function stringifyExpression(ne){return isString(ne)?ne:ne.type===4?ne.content:ne.children.map(stringifyExpression).join("")}const transformIf=createStructuralDirectiveTransform(/^(?:if|else|else-if)$/,(ne,ee,te)=>processIf(ne,ee,te,(st,ot,ct)=>{const ut=te.parent.children;let dt=ut.indexOf(st),ht=0;for(;dt-->=0;
41){const ft=ut[dt];ft&&ft.type===9&&(ht+=ft.branches.length)}return()=>{if(ct)st.codegenNode=createCodegenNodeForBranch(ot,ht,te);else{const ft=getParentCondition(st.codegenNode);ft.alternate=createCodegenNodeForBranch(ot,ht+st.branches.length-1,te)}}}));function processIf(ne,ee,te,st){if(ee.name!=="else"&&(!ee.exp||!ee.exp.content.trim())){const ot=ee.exp?ee.exp.loc:ne.loc;te.onError(createCompilerError(28,ee.loc)),ee.exp=createSimpleExpression("true",!1,ot)}if(ee.name==="if"){const ot=createIfBranch(ne,ee),ct={type:9,loc:cloneLoc(ne.loc),branches:[ot]};if(te.replaceNode(ct),st)return st(ct,ot,!0)}else{const ot=te.parent.children;let ct=ot.indexOf(ne);for(;ct-->=-1;){const ut=ot[ct];if(ut&&isCommentOrWhitespace(ut)){te.removeNode(ut);continue}if(ut&&ut.type===9){(ee.name==="else-if"||ee.name==="else")&&ut.branches[ut.branches.length-1].condition===void 0&&te.onError(createCompilerError(30,ne.loc)),te.removeNode();const dt=createIfBranch(ne,ee);ut.branches.push(dt);const ht=st&&st(ut,dt,!1);traverseNode(dt,te),ht&&ht(),te.currentNode=null}else te.onError(createCompilerError(30,ne.loc));break}}}function createIfBranch(ne,ee){const te=ne.tagType===3;return{type:10,loc:ne.loc,condition:ee.name==="else"?void 0:ee.exp,children:te&&!findDir(ne,"for")?ne.children:[ne],userKey:findProp(ne,"key"),isTemplateIf:te}}function createCodegenNodeForBranch(ne,ee,te){return ne.condition?createConditionalExpression(ne.condition,createChildrenCodegenNode(ne,ee,te),createCallExpression(te.helper(CREATE_COMMENT),['""',"true"])):createChildrenCodegenNode(ne,ee,te)}function createChildrenCodegenNode(ne,ee,te){const{helper:st}=te,ot=createObjectProperty("key",createSimpleExpression(`${ee}`,!1,locStub,2)),{children:ct}=ne,ut=ct[0];if(ct.length!==1||ut.type!==1)if(ct.length===1&&ut.type===11){const ht=ut.codegenNode;return injectProp(ht,ot,te),ht}else return createVNodeCall(te,st(FRAGMENT),createObjectExpression([ot]),ct,64,void 0,void 0,!0,!1,!1,ne.loc);else{const ht=ut.codegenNode,ft=getMemoedVNodeCall(ht);return ft.type===13&&convertToBlock(ft,te),injectProp(ft,ot,te),ht}}function getParentCondition(ne){for(;;)if(ne.type===19)if(ne.alternate.type===19)ne=ne.alternate;else return ne;else ne.type===20&&(ne=ne.value)}const transformFor=createStructuralDirectiveTransform("for",(ne,ee,te)=>{const{helper:st,removeHelper:ot}=te;return processFor(ne,ee,te,ct=>{const ut=createCallExpression(st(RENDER_LIST),[ct.source]),dt=isTemplateNode(ne),ht=findDir(ne,"memo"),ft=findProp(ne,"key",!1,!0);ft&&ft.type;let pt=ft&&(ft.type===6?ft.value?createSimpleExpression(ft.value.content,!0):void 0:ft.exp);const mt=pt?createObjectProperty("key",pt):null,yt=ct.source.type===4&&ct.source.constType>0,vt=yt?64:ft?128:256;return ct.codegenNode=createVNodeCall(te,st(FRAGMENT),void 0,ut,vt,void 0,void 0,!0,!yt,!1,ne.loc),()=>{var _t;let bt;const{children:xt}=ct,Mt=xt.length!==1||xt[0].type!==1,Ot=isSlotOutlet(ne)?ne:dt&&ne.children.length===1&&isSlotOutlet(ne.children[0])?ne.children[0]:null;if(Ot)bt=Ot.codegenNode,dt&&mt&&injectProp(bt,mt,te);else if(Mt)bt=createVNodeCall(te,st(FRAGMENT),mt?createObjectExpression([mt]):void 0,ne.children,64,void 0,void 0,!0,void 0,!1);else{bt=xt[0].codegenNode,dt&&mt&&injectProp(bt,mt,te);const kt=!yt||bt.isBlockRequired===!0;bt.isBlock!==kt&&(bt.isBlock?(ot(OPEN_BLOCK),ot(getVNodeBlockHelper(te.inSSR,bt.isComponent))):ot(getVNodeHelper(te.inSSR,bt.isComponent))),bt.isBlock=kt,bt.isBlock?(st(OPEN_BLOCK),st(getVNodeBlockHelper(te.inSSR,bt.isComponent))):(st(getVNodeHelper(te.inSSR,bt.isComponent)),bt.needsPatch&&(bt.patchFlag=((_t=bt.patchFlag)!=null?_t:0)|512))}if(ht){const kt=createFunctionExpression(createForLoopParams(ct.parseResult,[createSimpleExpression("_cached")]));kt.body=createBlockStatement([createCompoundExpression(["const _memo = (",ht.exp,")"]),createCompoundExpression(["if (_cached && _cached.el",...pt?[" && _cached.key === ",pt]:[],` && ${te.helperString(IS_MEMO_SAME)}(_cached, _memo)) return _cached`]),createCompoundExpression(["const _item = ",bt]),createSimpleExpression("_item.memo = _memo"),createSimpleExpression("return _item")]),ut.arguments.push(kt,createSimpleExpression("_cache"),createSimpleExpression(String(te.cached.length))),te.cached.push(null)}else ut.arguments.push(createFunctionExpression(createForLoopParams(ct.parseResult),bt,!0))}})});
vendor: 5,317 bytes, line 41
41function processFor(ne,ee,te,st){if(!ee.exp){te.onError(createCompilerError(31,ee.loc));return}const ot=ee.forParseResult;if(!ot){te.onError(createCompilerError(32,ee.loc));return}finalizeForParseResult(ot);const{addIdentifiers:ct,removeIdentifiers:ut,scopes:dt}=te,{source:ht,value:ft,key:pt,index:mt}=ot,yt={type:11,loc:ee.loc,source:ht,valueAlias:ft,keyAlias:pt,objectIndexAlias:mt,parseResult:ot,children:isTemplateNode(ne)?ne.children:[ne]};te.replaceNode(yt),dt.vFor++;const vt=st&&st(yt);return()=>{dt.vFor--,vt&&vt()}}function finalizeForParseResult(ne,ee){ne.finalized||(ne.finalized=!0)}function createForLoopParams({value:ne,key:ee,index:te},st=[]){return createParamsList([ne,ee,te,...st])}function createParamsList(ne){let ee=ne.length;for(;ee--&&!ne[ee];);return ne.slice(0,ee+1).map((te,st)=>te||createSimpleExpression("_".repeat(st+1),!1))}const defaultFallback=createSimpleExpression("undefined",!1),trackSlotScopes=(ne,ee)=>{if(ne.type===1&&(ne.tagType===1||ne.tagType===3)){const te=findDir(ne,"slot");if(te)return te.exp,ee.scopes.vSlot++,()=>{ee.scopes.vSlot--}}},trackVForSlotScopes=(ne,ee)=>{let te;if(isTemplateNode(ne)&&ne.props.some(isVSlot)&&(te=findDir(ne,"for"))){const st=te.forParseResult;if(st){finalizeForParseResult(st);const{value:ot,key:ct,index:ut}=st,{addIdentifiers:dt,removeIdentifiers:ht}=ee;return ot&&dt(ot),ct&&dt(ct),ut&&dt(ut),()=>{ot&&ht(ot),ct&&ht(ct),ut&&ht(ut)}}}},buildClientSlotFn=(ne,ee,te,st)=>createFunctionExpression(ne,te,!1,!0,te.length?te[0].loc:st);function buildSlots(ne,ee,te=buildClientSlotFn){ee.helper(WITH_CTX);const{children:st,loc:ot}=ne,ct=[],ut=[];let dt=ee.scopes.vSlot>0||ee.scopes.vFor>0;const ht=findDir(ne,"slot",!0);if(ht){const{arg:xt,exp:Mt}=ht;xt&&!isStaticExp(xt)&&(dt=!0),ct.push(createObjectProperty(xt||createSimpleExpression("default",!0),te(Mt,void 0,st,ot)))}let ft=!1,pt=!1;const mt=[],yt=new Set;let vt=0;for(let xt=0;xt<st.length;xt++){const Mt=st[xt];let Ot;if(!isTemplateNode(Mt)||!(Ot=findDir(Mt,"slot",!0))){Mt.type!==3&&mt.push(Mt);continue}if(ht){ee.onError(createCompilerError(37,Ot.loc));break}ft=!0;const{children:kt,loc:Nt}=Mt,{arg:Gt=createSimpleExpression("default",!0),exp:Bt,loc:Ut}=Ot;let Vt;isStaticExp(Gt)?Vt=Gt?Gt.content:"default":dt=!0;const Ht=findDir(Mt,"for"),zt=te(Bt,Ht,kt,Nt);let jt,Wt;if(jt=findDir(Mt,"if"))dt=!0,ut.push(createConditionalExpression(jt.exp,buildDynamicSlot(Gt,zt,vt++),defaultFallback));else if(Wt=findDir(Mt,/^else(?:-if)?$/,!0)){let Jt=xt,Qt;for(;Jt--&&(Qt=st[Jt],!!isCommentOrWhitespace(Qt)););if(Qt&&isTemplateNode(Qt)&&findDir(Qt,/^(?:else-)?if$/)){let oi=ut[ut.length-1];for(;oi.alternate.type===19;)oi=oi.alternate;oi.alternate=Wt.exp?createConditionalExpression(Wt.exp,buildDynamicSlot(Gt,zt,vt++),defaultFallback):buildDynamicSlot(Gt,zt,vt++)}else ee.onError(createCompilerError(30,Wt.loc))}else if(Ht){dt=!0;const Jt=Ht.forParseResult;Jt?(finalizeForParseResult(Jt),ut.push(createCallExpression(ee.helper(RENDER_LIST),[Jt.source,createFunctionExpression(createForLoopParams(Jt),buildDynamicSlot(Gt,zt),!0)]))):ee.onError(createCompilerError(32,Ht.loc))}else{if(Vt){if(yt.has(Vt)){ee.onError(createCompilerError(38,Ut));continue}yt.add(Vt),Vt==="default"&&(pt=!0)}ct.push(createObjectProperty(Gt,zt))}}if(!ht){const xt=(Mt,Ot)=>{const kt=te(Mt,void 0,Ot,ot);return ee.compatConfig&&(kt.isNonScopedSlot=!0),createObjectProperty("default",kt)};ft?mt.length&&!mt.every(isWhitespaceText)&&(pt?ee.onError(createCompilerError(39,mt[0].loc)):ct.push(xt(void 0,mt))):ct.push(xt(void 0,st))}const _t=dt?2:hasForwardedSlots(ne.children)?3:1;let bt=createObjectExpression(ct.concat(createObjectProperty("_",createSimpleExpression(_t+"",!1))),ot);return ut.length&&(bt=createCallExpression(ee.helper(CREATE_SLOTS),[bt,createArrayExpression(ut)])),{slots:bt,hasDynamicSlots:dt}}function buildDynamicSlot(ne,ee,te){const st=[createObjectProperty("name",ne),createObjectProperty("fn",ee)];return te!=null&&st.push(createObjectProperty("key",createSimpleExpression(String(te),!0))),createObjectExpression(st)}function hasForwardedSlots(ne){for(let ee=0;ee<ne.length;ee++){const te=ne[ee];switch(te.type){case 1:if(te.tagType===2||hasForwardedSlots(te.children))return!0;break;case 9:if(hasForwardedSlots(te.branches))return!0;break;case 10:case 11:if(hasForwardedSlots(te.children))return!0;break}}return!1}const directiveImportMap=new WeakMap,transformElement=(ne,ee)=>function(){if(ne=ee.currentNode,!(ne.type===1&&(ne.tagType===0||ne.tagType===1)))return;const{tag:st,props:ot}=ne,ct=ne.tagType===1;let ut=ct?resolveComponentType(ne,ee):`"${st}"`;const dt=isObject$2(ut)&&ut.callee===RESOLVE_DYNAMIC_COMPONENT;let ht,ft,pt=0,mt,yt,vt,_t=!1,bt=!1,xt=dt||ut===TELEPORT||ut===SUSPENSE||!ct&&(st==="svg"||st==="foreignObject"||st==="math");if(ot.length>0){const Ot=buildProps(ne,ee,void 0,ct,dt);ht=Ot.props,pt=Ot.patchFlag,yt=Ot.dynamicPropNames,_t=Ot.needsPatch,bt=Ot.isBlockRequired;const kt=Ot.directives;vt=kt&&kt.length?createArrayExpression(kt.map(Nt=>buildDirectiveArgs(Nt,ee))):void 0,Ot.shouldUseBlock&&(xt=!0)}if(ne.children.length>0)if(ut===KEEP_ALIVE&&(xt=!0,pt|=1024),ct&&ut!==TELEPORT&&ut!==KEEP_ALIVE){const{slots:kt,hasDynamicSlots:Nt}=buildSlots(ne,ee);ft=kt,Nt&&(pt|=1024)}else if(ne.children.length===1&&ut!==TELEPORT){const kt=ne.children[0],Nt=kt.type,Gt=Nt===5||Nt===8;
41Gt&&getConstantType(kt,ee)===0&&(pt|=1),Gt||Nt===2?ft=kt:ft=ne.children}else ft=ne.children;yt&&yt.length&&(mt=stringifyDynamicPropNames(yt));const Mt=ne.codegenNode=createVNodeCall(ee,ut,ht,ft,pt===0?void 0:pt,mt,vt,!!xt,!1,ct,ne.loc);_t=_t&&(pt===0||pt===32),_t&&(Mt.needsPatch=!0),bt&&(Mt.isBlockRequired=!0)};function resolveComponentType(ne,ee,te=!1){let{tag:st}=ne;const ot=isComponentTag(st),ct=findProp(ne,"is",!1,!0);if(ct)if(ot||isCompatEnabled("COMPILER_IS_ON_ELEMENT",ee)){let dt;if(ct.type===6?dt=ct.value&&createSimpleExpression(ct.value.content,!0):(dt=ct.exp,dt||(dt=createSimpleExpression("is",!1,ct.arg.loc))),dt)return createCallExpression(ee.helper(RESOLVE_DYNAMIC_COMPONENT),[dt])}else ct.type===6&&ct.value.content.startsWith("vue:")&&(st=ct.value.content.slice(4));const ut=isCoreComponent(st)||ee.isBuiltInComponent(st);return ut?(te||ee.helper(ut),ut):(ee.helper(RESOLVE_COMPONENT),ee.components.add(st),toValidAssetId(st,"component"))}function buildProps(ne,ee,te=ne.props,st,ot,ct=!1){const{tag:ut,loc:dt,children:ht}=ne;let ft=[];const pt=[],mt=[],yt=ht.length>0;let vt=!1,_t=!1,bt=0,xt=!1,Mt=!1,Ot=!1,kt=!1,Nt=!1,Gt=!1;const Bt=[],Ut=Wt=>{ft.length&&(pt.push(createObjectExpression(dedupeProperties(ft),dt)),ft=[]),Wt&&pt.push(Wt)},Vt=()=>{ee.scopes.vFor>0&&ft.push(createObjectProperty(createSimpleExpression("ref_for",!0),createSimpleExpression("true")))},Ht=({key:Wt,value:Jt})=>{if(isStaticExp(Wt)){const Qt=Wt.content,oi=isOn(Qt);if(oi&&(!st||ot)&&Qt.toLowerCase()!=="onclick"&&Qt!=="onUpdate:modelValue"&&!isReservedProp(Qt)&&(kt=!0),oi&&isReservedProp(Qt)&&(Gt=!0),Qt==="ref"&&(xt=!0),oi&&Jt.type===14&&(Jt=Jt.arguments[0]),Jt.type===20||(Jt.type===4||Jt.type===8)&&getConstantType(Jt,ee)>0)return;Qt==="class"?Mt=!0:Qt==="style"?Ot=!0:Qt!=="ref"&&Qt!=="key"&&!Bt.includes(Qt)&&Bt.push(Qt),st&&(Qt==="class"||Qt==="style")&&!Bt.includes(Qt)&&Bt.push(Qt)}else Nt=!0};for(let Wt=0;Wt<te.length;Wt++){const Jt=te[Wt];if(Jt.type===6){const{loc:Qt,name:oi,nameLoc:ai,value:xn}=Jt;let An=!0;if(oi==="ref"&&(xt=!0,Vt()),oi==="is"&&(isComponentTag(ut)||xn&&xn.content.startsWith("vue:")||isCompatEnabled("COMPILER_IS_ON_ELEMENT",ee)))continue;ft.push(createObjectProperty(createSimpleExpression(oi,!0,ai),createSimpleExpression(xn?xn.content:"",An,xn?xn.loc:Qt)))}else{const{name:Qt,arg:oi,exp:ai,loc:xn,modifiers:An}=Jt,Nn=Qt==="bind",Xt=Qt==="on";if(Qt==="slot"){st||ee.onError(createCompilerError(40,xn));continue}if(Qt==="once"||Qt==="memo"||Qt==="is"||Nn&&isStaticArgOf(oi,"is")&&(isComponentTag(ut)||isCompatEnabled("COMPILER_IS_ON_ELEMENT",ee))||Xt&&ct)continue;if(Nn&&isStaticArgOf(oi,"key")&&(vt=!0),Xt&&yt&&oi&&isStaticExp(oi)&&camelize(oi.content)==="vue:beforeUpdate"&&(vt=!0,_t=!0),Nn&&isStaticArgOf(oi,"ref")&&Vt(),!oi&&(Nn||Xt)){if(Nt=!0,ai)if(Nn){if(Ut(),isCompatEnabled("COMPILER_V_BIND_OBJECT_ORDER",ee)){pt.unshift(ai);continue}Vt(),Ut(),pt.push(ai)}else Ut({type:14,loc:xn,callee:ee.helper(TO_HANDLERS),arguments:st?[ai]:[ai,"true"]});else ee.onError(createCompilerError(Nn?34:35,xn));continue}Nn&&An.some(Kt=>Kt.content==="prop")&&(bt|=32);const Zt=ee.directiveTransforms[Qt];if(Zt){const{props:Kt,needRuntime:ti}=Zt(Jt,ne,ee);!ct&&Kt.forEach(Ht),Xt&&oi&&!isStaticExp(oi)?Ut(createObjectExpression(Kt,dt)):ft.push(...Kt),ti&&(mt.push(Jt),isSymbol(ti)&&directiveImportMap.set(Jt,ti))}else isBuiltInDirective(Qt)||(mt.push(Jt),yt&&(vt=!0,_t=!0))}}let zt;pt.length?(Ut(),pt.length>1?zt=createCallExpression(ee.helper(MERGE_PROPS),pt,dt):zt=pt[0]):ft.length&&(zt=createObjectExpression(dedupeProperties(ft),dt)),Nt?bt|=16:(Mt&&!st&&(bt|=2),Ot&&!st&&(bt|=4),Bt.length&&(bt|=8),kt&&(bt|=32));const jt=(bt===0||bt===32)&&(xt||Gt||mt.length>0);if(!vt&&jt&&(bt|=512),!ee.inSSR&&zt)switch(zt.type){case 15:let Wt=-1,Jt=-1,Qt=!1;for(let xn=0;xn<zt.properties.length;xn++){const An=zt.properties[xn].key;isStaticExp(An)?An.content==="class"?Wt=xn:An.content==="style"&&(Jt=xn):An.isHandlerKey||(Qt=!0)}const oi=zt.properties[Wt],ai=zt.properties[Jt];Qt?zt=createCallExpression(ee.helper(NORMALIZE_PROPS),[zt]):(oi&&!isStaticExp(oi.value)&&(oi.value=createCallExpression(ee.helper(NORMALIZE_CLASS),[oi.value])),ai&&(Ot||ai.value.type===4&&ai.value.content.trim()[0]==="["||ai.value.type===17)&&(ai.value=createCallExpression(ee.helper(NORMALIZE_STYLE),[ai.value])));break;case 14:break;default:zt=createCallExpression(ee.helper(NORMALIZE_PROPS),[createCallExpression(ee.helper(GUARD_REACTIVE_PROP
vendor: 16,783 bytes, lines 41-45
41S),[zt])]);break}return{props:zt,directives:mt,patchFlag:bt,dynamicPropNames:Bt,shouldUseBlock:vt,needsPatch:jt,isBlockRequired:_t}}function dedupeProperties(ne){const ee=new Map,te=[];for(let st=0;st<ne.length;st++){const ot=ne[st];if(ot.key.type===8||!ot.key.isStatic){te.push(ot);continue}const ct=ot.key.content,ut=ee.get(ct);ut?(ct==="style"||ct==="class"||isOn(ct))&&mergeAsArray(ut,ot):(ee.set(ct,ot),te.push(ot))}return te}function mergeAsArray(ne,ee){ne.value.type===17?ne.value.elements.push(ee.value):ne.value=createArrayExpression([ne.value,ee.value],ne.loc)}function buildDirectiveArgs(ne,ee){const te=[],st=directiveImportMap.get(ne);st?te.push(ee.helperString(st)):(ee.helper(RESOLVE_DIRECTIVE),ee.directives.add(ne.name),te.push(toValidAssetId(ne.name,"directive")));const{loc:ot}=ne;if(ne.exp&&te.push(ne.exp),ne.arg&&(ne.exp||te.push("void 0"),te.push(ne.arg)),Object.keys(ne.modifiers).length){ne.arg||(ne.exp||te.push("void 0"),te.push("void 0"));const ct=createSimpleExpression("true",!1,ot);te.push(createObjectExpression(ne.modifiers.map(ut=>createObjectProperty(ut,ct)),ot))}return createArrayExpression(te,ne.loc)}function stringifyDynamicPropNames(ne){let ee="[";for(let te=0,st=ne.length;te<st;te++)ee+=JSON.stringify(ne[te]),te<st-1&&(ee+=", ");return ee+"]"}function isComponentTag(ne){return ne==="component"||ne==="Component"}const transformSlotOutlet=(ne,ee)=>{if(isSlotOutlet(ne)){const{children:te,loc:st}=ne,{slotName:ot,slotProps:ct}=processSlotOutlet(ne,ee),ut=[ee.prefixIdentifiers?"_ctx.$slots":"$slots",ot,"{}","undefined","true"];let dt=2;ct&&(ut[2]=ct,dt=3),te.length&&(ut[3]=createFunctionExpression([],te,!1,!1,st),dt=4),ee.scopeId&&!ee.slotted&&(dt=5),ut.splice(dt),ne.codegenNode=createCallExpression(ee.helper(RENDER_SLOT),ut,st)}};function processSlotOutlet(ne,ee){let te='"default"',st;const ot=[];for(let ct=0;ct<ne.props.length;ct++){const ut=ne.props[ct];if(ut.type===6)ut.value&&(ut.name==="name"?te=JSON.stringify(ut.value.content):(ut.name=camelize(ut.name),ot.push(ut)));else if(ut.name==="bind"&&isStaticArgOf(ut.arg,"name")){if(ut.exp)te=ut.exp;else if(ut.arg&&ut.arg.type===4){const dt=camelize(ut.arg.content);te=ut.exp=createSimpleExpression(dt,!1,ut.arg.loc)}}else ut.name==="bind"&&ut.arg&&isStaticExp(ut.arg)&&(ut.arg.content=camelize(ut.arg.content)),ot.push(ut)}if(ot.length>0){const{props:ct,directives:ut}=buildProps(ne,ee,ot,!1,!1);st=ct,ut.length&&ee.onError(createCompilerError(36,ut[0].loc))}return{slotName:te,slotProps:st}}const transformOn$1=(ne,ee,te,st)=>{const{loc:ot,modifiers:ct,arg:ut}=ne;!ne.exp&&!ct.length&&te.onError(createCompilerError(35,ot));let dt;if(ut.type===4)if(ut.isStatic){let mt=ut.content;mt.startsWith("vue:")&&(mt=`vnode-${mt.slice(4)}`);const yt=ee.tagType!==0||mt.startsWith("vnode")||!/[A-Z]/.test(mt)?toHandlerKey(camelize(mt)):`on:${mt}`;dt=createSimpleExpression(yt,!0,ut.loc)}else dt=createCompoundExpression([`${te.helperString(TO_HANDLER_KEY)}(`,ut,")"]);else dt=ut,dt.children.unshift(`${te.helperString(TO_HANDLER_KEY)}(`),dt.children.push(")");let ht=ne.exp;ht&&!ht.content.trim()&&(ht=void 0);let ft=te.cacheHandlers&&!ht&&!te.inVOnce;if(ht){const mt=isMemberExpression(ht),yt=!(mt||isFnExpression(ht)),vt=ht.content.includes(";");(yt||ft&&mt)&&(ht=createCompoundExpression([`${yt?"$event":"(...args)"} => ${vt?"{":"("}`,ht,vt?"}":")"]))}let pt={props:[createObjectProperty(dt,ht||createSimpleExpression("() => {}",!1,ot))]};return st&&(pt=st(pt)),ft&&(pt.props[0].value=te.cache(pt.props[0].value)),pt.props.forEach(mt=>mt.key.isHandlerKey=!0),pt},transformBind=(ne,ee,te)=>{const{modifiers:st,loc:ot}=ne,ct=ne.arg;let{exp:ut}=ne;return ut&&ut.type===4&&!ut.content.trim()&&(ut=void 0),ct.type!==4?(ct.children.unshift("("),ct.children.push(') || ""')):ct.isStatic||(ct.content=ct.content?`${ct.content} || ""`:'""'),st.some(dt=>dt.content==="camel")&&(ct.type===4?ct.isStatic?ct.content=camelize(ct.content):ct.content=`${te.helperString(CAMELIZE)}(${ct.content})`:(ct.children.unshift(`${te.helperString(CAMELIZE)}(`),ct.children.push(")"))),te.inSSR||(st.some(dt=>dt.content==="prop")&&injectPrefix(ct,"."),st.some(dt=>dt.content==="attr")&&injectPrefix(ct,"^")),{props:[createObjectProperty(ct,ut)]}},injectPrefix=(ne,ee)=>{ne.type===4?ne.isStatic?ne.content=ee+ne.content:ne.content=`\`${ee}\${${ne.content}}\``:(ne.children.unshift(`'${ee}' + (`),ne.children.push(")"))},transformText=(ne,ee)=>{if(ne.type===0||ne.type===1||ne.type===11||ne.type===10)return()=>{const te=ne.children;let st,ot=!1;for(let ct=0;ct<te.length;ct++){const ut=te[ct];if(isText$1(ut)){ot=!0;for(let dt=ct+1;dt<te.length;dt++){const ht=te[dt];if(isText$1(ht))st||(st=te[ct]=createCompoundExpression([ut],ut.loc)),st.children.push(" + ",ht),te.splice(dt,1),dt--;else{st=void 0;break}}}}if(!(!ot||te.length===1&&(ne.type===0||ne.type===1&&ne.tagType===0&&!ne.props.find(ct=>ct.type===7&&!ee.directiveTransforms[ct.name])&&ne.tag!=="template")))for(let ct=0;ct<te.length;ct++){const ut=te[ct];if(isText$1(ut)||ut.type===8){const dt=[];(ut.type!==2||ut.content!==" ")&&dt.push(ut),!ee.ssr&&getConstantType(ut,ee)===0&&dt.push("1"),te[ct]={type:12,content:ut,loc:ut.loc,codegenNode:createCallExpression(ee.helper(CREATE_TEXT),dt)}}}}},seen$1=new WeakSet,transformOnce=(ne,ee)=>{if(ne.type===1&&findDir(ne,"once",!0))return seen$1.has(ne)||ee.inVOnce||ee.inSSR?void 0:(seen$1.add(ne),ee.inVOnce=!0,ee.helper(SET_BLOCK_TRACKING),()=>{ee.inVOnce=!1;const te=ee.currentNode;te.codegenNode&&(te.codegenNode=ee.cache(te.codegenNode,!0,!0))})},transformModel$1=(ne,ee,te)=>{const{exp:st,arg:ot}=ne;if(!st)return te.onError(createCompilerError(41,ne.loc)),createTransformProps();const ct=st.loc.source.trim(),ut=st.type===4?st.content:ct,dt=te.bindingMetadata[ct];if(dt==="props"||dt==="props-aliased")return te.onError(createCompilerError(44,st.loc)),createTransformProps();if(dt==="literal-const"||dt==="setup-const")return te.onError(createCompilerError(45,st.loc)),createTransformProps();if(!ut.trim()||!isMemberExpression(st))return te.onError(createCompilerError(42,st.loc)),createTransformProps();const ht=ot||createSimpleExpression("modelValue",!0),ft=ot?isStaticExp(ot)?`onUpdate:${camelize(ot.content)}`:createCompoundExpression(['"onUpdate:" + ',ot]):"onUpdate:modelValue";let pt;const mt=te.isTS?"($event: any)":"$event";pt=createCompoundExpression([`${mt} => ((`,st,") = $event)"]);const yt=[createObjectProperty(ht,ne.exp),createObjectProperty(ft,pt)];if(ne.modifiers.length&&ee.tagType===1){const vt=ne.modifiers.map(bt=>bt.content).map(bt=>(isSimpleIdentifier(bt)?bt:JSON.stringify(bt))+": true").join(", "),_t=ot?isStaticExp(ot)?`${ot.content}Modifiers`:createCompoundExpression([ot,' + "Modifiers"']):"modelModifiers";yt.push(createObjectProperty(_t,createSimpleExpression(`{ ${vt} }`,!1,ne.loc,2)))}return createTransformProps(yt)};function createTransformProps(ne=[]){return{props:ne}}const validDivisionCharRE=/[\w).+\-_$\]]/,transformFilter=(ne,ee)=>{isCompatEnabled("COMPILER_FILTERS",ee)&&(ne.type===5?rewriteFilter(ne.content,ee):ne.type===1&&ne.props.forEach(te=>{te.type===7&&te.name!=="for"&&te.exp&&rewriteFilter(te.exp,ee)}))};function rewriteFilter(ne,ee){if(ne.type===4)parseFilter(ne,ee);else for(let te=0;te<ne.children.length;te++){const st=ne.children[te];typeof st=="object"&&(st.type===4?parseFilter(st,ee):st.type===8?rewriteFilter(st,ee):st.type===5&&rewriteFilter(st.content,ee))}}function parseFilter(ne,ee){const te=ne.content;let st=!1,ot=!1,ct=!1,ut=!1,dt=0,ht=0,ft=0,pt=0,mt,yt,vt,_t,bt=[];for(vt=0;vt<te.length;vt++)if(yt=mt,mt=te.charCodeAt(vt),st)mt===39&&yt!==92&&(st=!1);else if(ot)mt===34&&yt!==92&&(ot=!1);else if(ct)mt===96&&yt!==92&&(ct=!1);else if(ut)mt===47&&yt!==92&&(ut=!1);else if(mt===124&&te.charCodeAt(vt+1)!==124&&te.charCodeAt(vt-1)!==124&&!dt&&!ht&&!ft)_t===void 0?(pt=vt+1,_t=te.slice(0,vt).trim()):xt();else{switch(mt){case 34:ot=!0;break;case 39:st=!0;break;case 96:ct=!0;break;case 40:ft++;break;case 41:ft--;break;case 91:ht++;break;case 93:ht--;break;case 123:dt++;break;case 125:dt--;break}if(mt===47){let Mt=vt-1,Ot;for(;Mt>=0&&(Ot=te.charAt(Mt),Ot===" ");Mt--);(!Ot||!validDivisionCharRE.test(Ot))&&(ut=!0)}}_t===void 0?_t=te.slice(0,vt).trim():pt!==0&&xt();function xt(){bt.push(te.slice(pt,vt).trim()),pt=vt+1}if(bt.length){for(vt=0;vt<bt.length;vt++)_t=wrapFilter(_t,bt[vt],ee);ne.content=_t,ne.ast=void 0}}function wrapFilter(ne,ee,te){te.helper(RESOLVE_FILTER);const st=ee.indexOf("(");if(st<0)return te.filters.add(ee),`${toValidAssetId(ee,"filter")}(${ne})`;{const ot=ee.slice(0,st),ct=ee.slice(st+1);return te.filters.add(ot),`${toValidAssetId(ot,"filter")}(${ne}${ct!==")"?","+ct:ct}`}}const seen=new WeakSet,transformMemo=(ne,ee)=>{if(ne.type===1){const te=findDir(ne,"memo");return!te||seen.has(ne)||ee.inSSR?void 0:(seen.add(ne),()=>{const st=ne.codegenNode||ee.currentNode.codegenNode;st&&st.type===13&&(ne.tagType!==1&&convertToBlock(st,ee),ne.codegenNode=createCallExpression(ee.helper(WITH_MEMO),[te.exp,createFunctionExpression(void 0,st),"_cache",String(ee.cached.length)]),ee.cached.push(null))})}},transformVBindShorthand=(ne,ee)=>{if(ne.type===1){for(const te of ne.props)if(te.type===7&&te.name==="bind"&&(!te.exp||te.exp.type===4&&!te.exp.content.trim())&&te.arg){const st=te.arg;if(st.type!==4||!st.isStatic)ee.onError(createCompilerError(53,st.loc)),te.exp=createSimpleExpression("",!0,st.loc);else{const ot=camelize(st.content);(validFirstIdentCharRE.test(ot[0])||ot[0]==="-")&&(te.exp=createSimpleExpression(ot,!1,st.loc))}}}};function getBaseTransformPreset(ne){return[[transformVBindShorthand,transformOnce,transformIf,transformMemo,transformFor,transformFilter,transformSlotOutlet,transformElement,trackSlotScopes,transformText],{on:transformOn$1,bind:transformBind,model:transformModel$1}]}function baseCompile(ne,ee={}){const te=ee.onError||defaultOnError,st=ee.mode==="module";ee.prefixIdentifiers===!0?te(createCompilerError(48)):st&&te(createCompilerError(49));const ot=!1;ee.cacheHandlers&&te(createCompilerError(50)),ee.scopeId&&!st&&te(createCompilerError(51));const ct=extend$5({},ee,{prefixIdentifiers:ot}),ut=isString(ne)?baseParse(ne,ct):ne,[dt,ht]=getBaseTransformPreset();return transform$2(ut,extend$5({},ct,{nodeTransforms:[...dt,...ee.nodeTransforms||[]],directiveTransforms:extend$5({},ht,ee.directiveTransforms||{})})),generate(ut,ct)}const BindingTypes={DATA:"data",PROPS:"props",PROPS_ALIASED:"props-aliased",SETUP_LET:"setup-let",SETUP_CONST:"setup-const",SETUP_REACTIVE_CONST:"setup-reactive-const",SETUP_MAYBE_REF:"setup-maybe-ref",SETUP_REF:"setup-ref",OPTIONS:"options",LITERAL_CONST:"literal-const"},noopDirectiveTransform=()=>({props:[]});/**
42* @vue/compiler-dom v3.5.42
43* (c) 2018-present Yuxi (Evan) You and Vue contributors
44* @license MIT
45**/const V_MODEL_RADIO=Symbol(""),V_MODEL_CHECKBOX=Symbol(""),V_MODEL_TEXT=Symbol(""),V_MODEL_SELECT=Symbol(""),V_MODEL_DYNAMIC=Symbol(""),V_ON_WITH_MODIFIERS=Symbol(""),V_ON_WITH_KEYS=Symbol(""),V_SHOW=Symbol(""),TRANSITION=Symbol(""),TRANSITION_GROUP=Symbol("");registerRuntimeHelpers({[V_MODEL_RADIO]:"vModelRadio",[V_MODEL_CHECKBOX]:"vModelCheckbox",[V_MODEL_TEXT]:"vModelText",[V_MODEL_SELECT]:"vModelSelect",[V_MODEL_DYNAMIC]:"vModelDynamic",[V_ON_WITH_MODIFIERS]:"withModifiers",[V_ON_WITH_KEYS]:"withKeys",[V_SHOW]:"vShow",[TRANSITION]:"Transition",[TRANSITION_GROUP]:"TransitionGroup"});let decoder;function decodeHtmlBrowser(ne,ee=!1){return decoder||(decoder=document.createElement("div")),ee?(decoder.innerHTML=`<div foo="${ne.replace(/"/g,"&quot;")}">`,decoder.children[0].getAttribute("foo")):(decoder.innerHTML=ne,decoder.textContent)}const parserOptions={parseMode:"html",isVoidTag,isNativeTag:ne=>isHTMLTag(ne)||isSVGTag(ne)||isMathMLTag(ne),isPreTag:ne=>ne==="pre",isIgnoreNewlineTag:ne=>ne==="pre"||ne==="textarea",decodeEntities:decodeHtmlBrowser,isBuiltInComponent:ne=>{if(ne==="Transition"||ne==="transition")return TRANSITION;if(ne==="TransitionGroup"||ne==="transition-group")return TRANSITION_GROUP},getNamespace(ne,ee,te){let st=ee?ee.ns:te;if(ee&&st===2)if(ee.tag==="annotation-xml"){if(ne==="svg")return 1;ee.props.some(ot=>ot.type===6&&ot.name==="encoding"&&ot.value!=null&&(ot.value.content==="text/html"||ot.value.content==="application/xhtml+xml"))&&(st=0)}else/^m(?:[ions]|text)$/.test(ee.tag)&&ne!=="mglyph"&&ne!=="malignmark"&&(st=0);else ee&&st===1&&(ee.tag==="foreignObject"||ee.tag==="desc"||ee.tag==="title")&&(st=0);if(st===0){if(ne==="svg")return 1;if(ne==="math")return 2}return st}},transformStyle=ne=>{ne.type===1&&ne.props.forEach((ee,te)=>{ee.type===6&&ee.name==="style"&&ee.value&&(ne.props[te]={type:7,name:"bind",arg:createSimpleExpression("style",!0,ee.loc),exp:parseInlineCSS(ee.value.content,ee.loc),modifiers:[],loc:ee.loc})})},parseInlineCSS=(ne,ee)=>{const te=parseStringStyle(ne);return createSimpleExpression(JSON.stringify(te),!1,ee,3)};function createDOMCompilerError(ne,ee){return createCompilerError(ne,ee)}const DOMErrorCodes={X_V_HTML_NO_EXPRESSION:54,54:"X_V_HTML_NO_EXPRESSION",X_V_HTML_WITH_CHILDREN:55,55:"X_V_HTML_WITH_CHILDREN",X_V_TEXT_NO_EXPRESSION:56,56:"X_V_TEXT_NO_EXPRESSION",X_V_TEXT_WITH_CHILDREN:57,57:"X_V_TEXT_WITH_CHILDREN",X_V_MODEL_ON_INVALID_ELEMENT:58,58:"X_V_MODEL_ON_INVALID_ELEMENT",X_V_MODEL_ARG_ON_ELEMENT:59,59:"X_V_MODEL_ARG_ON_ELEMENT",X_V_MODEL_ON_FILE_INPUT_ELEMENT:60,60:"X_V_MODEL_ON_FILE_INPUT_ELEMENT",X_V_MODEL_UNNECESSARY_VALUE:61,61:"X_V_MODEL_UNNECESSARY_VALUE",X_V_SHOW_NO_EXPRESSION:62,62:"X_V_SHOW_NO_EXPRESSION",X_TRANSITION_INVALID_CHILDREN:63,63:"X_TRANSITION_INVALID_CHILDREN",X_IGNORED_SIDE_EFFECT_TAG:64,64:"X_IGNORED_SIDE_EFFECT_TAG",__EXTEND_POINT__:65,65:"__EXTEND_POINT__"},DOMErrorMessages={54:"v-html is missing expression.",55:"v-html will override element children.",56:"v-text is missing expression.",57:"v-text will override element children.",58:"v-model can only be used on <input>, <textarea> and <select> elements.",59:"v-model argument is not supported on plain elements.",60:"v-model cannot be used on file inputs since they are read-only. Use a v-on:change listener instead.",61:"Unnecessary value binding used alongside v-model. It will interfere with v-model's behavior.",62:"v-show is missing expression.",63:"<Transition> expects exactly one child element or component.",64:"Tags with side effect (<script> and <style>) are ignored in client component templates."},transformVHtml=(ne,ee,te)=>{const{exp:st,loc:ot}=ne;return st||te.onError(createDOMCompilerError(54,ot)),ee.children.length&&(te.onError(createDOMCompilerError(55,ot)),ee.children.length=0),{props:[createObjectProperty(createSimpleExpression("innerHTML",!0,ot),st||createSimpleExpression("",!0))]}},transformVText=(ne,ee,te)=>{const{exp:st,loc:ot}=ne;return st||te.onError(createDOMCompilerError(56,ot)),ee.children.length&&(te.onError(createDOMCompilerError(57,ot)),ee.children.length=0),{props:[createObjectProperty(createSimpleExpression("textContent",!0),st?getConstantType(st,te)>0?st:createCallExpression(te.helperString(TO_DISPLAY_STRING),[st],ot):createSimpleExpression("",!0))]}},transformModel=(ne,ee,te)=>{const st=transformModel$1(ne,ee,te);if(!st.props.length||ee.tagType===1)return st;ne.arg&&te.onError(createDOMCompilerError(59,ne.arg.loc));const{tag:ot}=ee,ct=te.isCustomElement(ot);if(ot==="input"||ot==="textarea"||ot==="select"||ct){let ut=V_MODEL_TEXT,dt=!1;if(ot==="input"||ct){const ht=findProp(ee,"type");if(ht){if(ht.type===7)ut=V_MODEL_DYNAMIC;else if(ht.value)switch(ht.value.content){case"radio":ut=V_MODEL_RADIO;break;case"checkbox":ut=V_MODEL_CHECKBOX;break;case"file":dt=!0,te.onError(createDOMCompilerError(60,ne.loc));break}}else hasDynamicKeyVBind(ee)&&(ut=V_MODEL_DYNAMIC)}else ot==="select"&&(ut=V_MODEL_SELECT);dt||(st.needRuntime=te.helper(ut))}else te.onError(createDOMCompilerError(58,ne.loc));return st.props=st.props.filter(ut=>!(ut.key.type===4&&ut.key.content==="modelValue")),st},isEventOptionModifier=makeMap("passive,once,capture"),isNonKeyModifier=makeMap("stop,prevent,self,ctrl,shift,alt,meta,exact,middle"),maybeKeyModifier=makeMap("left,right"),isKeyboardEvent=makeMap("onkeyup,onkeydown,onkeypress"),resolveModifiers=(ne,ee,te,st)=>{const ot=[],ct=[],ut=[];for(let dt=0;dt<ee.length;dt++){const ht=ee[dt].content;ht==="native"&&checkCompatEnabled("COMPILER_V_ON_NATIVE",te)||isEventOptionModifier(ht)?ut.push(ht):maybeKeyModifier(ht)?isStaticExp(ne)?isKeyboardEvent(ne.content.toLowerCase())?ot.push(ht):ct.push(ht):(ot.push(ht),ct.push(ht)):isNonKeyModifier(ht)?ct.push(ht):ot.push(ht)}return{keyModifiers:ot,nonKeyModifiers:ct,eventOptionModifiers:ut}},transformClick=(ne,ee)=>isStaticExp(ne)&&ne.content.toLowerCase()==="onclick"?createSimpleExpression(ee,!0):ne.type!==4?createCompoundExpression(["(",ne,`) === "onClick" ? "${ee}" : (`,ne,")"]):ne,transformOn=(ne,ee,te)=>
45transformOn$1(ne,ee,te,st=>{const{modifiers:ot}=ne;if(!ot.length)return st;let{key:ct,value:ut}=st.props[0];const{keyModifiers:dt,nonKeyModifiers:ht,eventOptionModifiers:ft}=resolveModifiers(ct,ot,te,ne.loc);if(ht.includes("right")&&(ct=transformClick(ct,"onContextmenu")),ht.includes("middle")&&(ct=transformClick(ct,"onMouseup")),ht.length&&(ut=createCallExpression(te.helper(V_ON_WITH_MODIFIERS),[ut,JSON.stringify(ht)])),dt.length&&(!isStaticExp(ct)||isKeyboardEvent(ct.content.toLowerCase()))&&(ut=createCallExpression(te.helper(V_ON_WITH_KEYS),[ut,JSON.stringify(dt)])),ft.length){const pt=ft.map(capitalize).join("");ct=isStaticExp(ct)?createSimpleExpression(`${ct.content}${pt}`,!0):createCompoundExpression(["(",ct,`) + "${pt}"`])}return{props:[createObjectProperty(ct,ut)]}}),transformShow=(ne,ee,te)=>{const{exp:st,loc:ot}=ne;return st||te.onError(createDOMCompilerError(62,ot)),{props:[],needRuntime:te.helper(V_SHOW)}},ignoreSideEffectTags=(ne,ee)=>{ne.type===1&&ne.tagType===0&&(ne.tag==="script"||ne.tag==="style")&&ee.removeNode()},DOMNodeTransforms=[transformStyle],DOMDirectiveTransforms={cloak:noopDirectiveTransform,html:transformVHtml,text:transformVText,model:transformModel,on:transformOn,show:transformShow};function compile$1(ne,ee={}){return baseCompile(ne,extend$5({},parserOptions,ee,{nodeTransforms:[ignoreSideEffectTags,...DOMNodeTransforms,...ee.nodeTransforms||[]],directiveTransforms:extend$5({},DOMDirectiveTransforms,ee.directiveTransforms||{}),transformHoist:null}))}function parse$3(ne,ee={}){return baseParse(ne,extend$5({},parserOptions,ee))}const compilerDom_esmBundler=Object.freeze(Object.defineProperty({__proto__:null,BASE_TRANSITION,BindingTypes,CAMELIZE,CAPITALIZE,CREATE_BLOCK,CREATE_COMMENT,CREATE_ELEMENT_BLOCK,CREATE_ELEMENT_VNODE,CREATE_SLOTS,CREATE_STATIC,CREATE_TEXT,CREATE_VNODE,CompilerDeprecationTypes,ConstantTypes,DOMDirectiveTransforms,DOMErrorCodes,DOMErrorMessages,DOMNodeTransforms,ElementTypes,ErrorCodes,FRAGMENT,GUARD_REACTIVE_PROPS,IS_MEMO_SAME,IS_REF,KEEP_ALIVE,MERGE_PROPS,NORMALIZE_CLASS,NORMALIZE_PROPS,NORMALIZE_STYLE,Namespaces,NodeTypes,OPEN_BLOCK,POP_SCOPE_ID,PUSH_SCOPE_ID,RENDER_LIST,RENDER_SLOT,RESOLVE_COMPONENT,RESOLVE_DIRECTIVE,RESOLVE_DYNAMIC_COMPONENT,RESOLVE_FILTER,SET_BLOCK_TRACKING,SUSPENSE,TELEPORT,TO_DISPLAY_STRING,TO_HANDLERS,TO_HANDLER_KEY,TRANSITION,TRANSITION_GROUP,TS_NODE_TYPES,UNREF,V_MODEL_CHECKBOX,V_MODEL_DYNAMIC,V_MODEL_RADIO,V_MODEL_SELECT,V_MODEL_TEXT,V_ON_WITH_KEYS,V_ON_WITH_MODIFIERS,V_SHOW,WITH_CTX,WITH_DIRECTIVES,WITH_MEMO,advancePositionWithClone,advancePositionWithMutation,assert:assert$1,baseCompile,baseParse,buildDirectiveArgs,buildProps,buildSlots,checkCompatEnabled,compile:compile$1,convertToBlock,createArrayExpression,createAssignmentExpression,createBlockStatement,createCacheExpression,createCallExpression,createCompilerError,createCompoundExpression,createConditionalExpression,createDOMCompilerError,createForLoopParams,createFunctionExpression,createIfStatement,createInterpolation,createObjectExpression,createObjectProperty,createReturnStatement,createRoot,createSequenceExpression,createSimpleExpression,createStructuralDirectiveTransform,createTemplateLiteral,createTransformContext,createVNodeCall,errorMessages,extractIdentifiers,findDir,findProp,forAliasRE,generate,generateCodeFrame,getBaseTransformPreset,getConstantType,getMemoedVNodeCall,getVNodeBlockHelper,getVNodeHelper,hasDynamicKeyVBind,hasScopeRef,helperNameMap,injectProp,isAllWhitespace,isCommentOrWhitespace,isCoreComponent,isFnExpression,isFnExpressionBrowser,isFnExpressionNode,isFunctionType,isInDestructureAssignment,isInNewExpression,isMemberExpression,isMemberExpressionBrowser,isMemberExpressionNode,isReferencedIdentifier,isSimpleIdentifier,isSlotOutlet,isStaticArgOf,isStaticExp,isStaticProperty,isStaticPropertyKey,isTemplateNode,isText:isText$1,isVPre,isVSlot,isWhitespaceText,locStub,noopDirectiveTransform,parse:parse$3,parserOptions,processExpression,processFor,processIf,processSlotOutlet,registerRuntimeHelpers,resolveComponentType,stringifyExpression,toValidAssetId,trackSlotScopes,trackVForSlotScopes,transform:transform$2,transformBind,transformElement,transformExpression,transformModel:transformModel$1,transformOn:transformOn$
451,transformStyle,transformVBindShorthand,traverseNode,unwrapTSNode,validFirstIdentCharRE,walkBlockDeclarations,walkFunctionParams,walkIdentifiers,warnDeprecation},Symbol.toStringTag,{value:"Module"})),require$$0=getAugmentedNamespace(compilerDom_esmBundler),require$$1=getAugmentedNamespace(runtimeDom_esmBundler),require$$2=getAugmentedNamespace(shared_esmBundler);/**
46* vue v3.5.42
47* (c) 2018-present Yuxi (Evan) You and Vue contributors
48* @license MIT
49**/var hasRequiredVue_cjs_prod;function requireVue_cjs_prod(){return hasRequiredVue_cjs_prod||(hasRequiredVue_cjs_prod=1,(function(ne){Object.defineProperty(ne,"__esModule",{value:!0});var ee=require$$0,te=require$$1,st=require$$2;function ot(ht){var ft=Object.create(null);if(ht)for(var pt in ht)ft[pt]=ht[pt];return ft.default=ht,Object.freeze(ft)}var ct=ot(te);const ut=Object.create(null);function dt(ht,ft){if(!st.isString(ht))if(ht.nodeType)ht=ht.innerHTML;else return st.NOOP;const pt=st.genCacheKey(ht,ft),mt=ut[pt];if(mt)return mt;if(ht[0]==="#"){const bt=document.querySelector(ht);ht=bt?bt.innerHTML:""}const yt=st.extend({hoistStatic:!0,onError:void 0,onWarn:st.NOOP},ft);!yt.isCustomElement&&typeof customElements<"u"&&(yt.isCustomElement=bt=>!!customElements.get(bt));const{code:vt}=ee.compile(ht,yt),_t=new Function("Vue",vt)(ct);return _t._rc=!0,ut[pt]=_t}te.registerRuntimeCompiler(dt),ne.compile=dt,Object.keys(te).forEach(function(ht){ht!=="default"&&!Object.prototype.hasOwnProperty.call(ne,ht)&&(ne[ht]=te[ht])})})(vue_cjs_prod)),vue_cjs_prod}var hasRequiredVue;function requireVue(){return hasRequiredVue||(hasRequiredVue=1,vue.exports=requireVue_cjs_prod()),vue.exports}var hasRequiredLogger;function requireLogger(){if(hasRequiredLogger)return logger$K;hasRequiredLogger=1,Object.defineProperty(logger$K,"__esModule",{value:!0}),logger$K.useLogger=logger$K.createLogger=logger$K.VueLogger=void 0;const ne=requireVue(),ee=Symbol("vue-logger-plugin"),te=["debug","info","warn","error","log"],st={enabled:!0,consoleEnabled:!0,level:"debug",callerInfo:!1,prefixFormat:({level:dt,caller:ht})=>ht?`[${dt.toUpperCase()}] [${ht==null?void 0:ht.fileName}:${ht==null?void 0:ht.functionName}:${ht==null?void 0:ht.lineNumber}]`:`[${dt.toUpperCase()}]`};class ot{constructor(ht){this.apply(ht),this._consoleFunctions=te.filter(ft=>typeof console[ft]=="function")}apply(ht){const ft=this._options||st;this._options={...ft,...ht},this.installHooks(this._options.beforeHooks),this.installHooks(this._options.afterHooks)}debug(...ht){this.invoke("debug",...ht).then(()=>{}).catch(()=>{})}info(...ht){this.invoke("info",...ht).then(()=>{}).catch(()=>{})}warn(...ht){this.invoke("warn",...ht).then(()=>{}).catch(()=>{})}error(...ht){this.invoke("error",...ht).then(()=>{}).catch(()=>{})}log(...ht){this.invoke("log",...ht).then(()=>{}).catch(()=>{})}async invoke(ht,...ft){if(this._options.enabled&&te.indexOf(ht)>=te.indexOf(this._options.level)){const pt=this._options.callerInfo?this.getCallerInfo():void 0,mt={level:ht,caller:pt,argumentArray:ft};if(await this.invokeHooks(this._options.beforeHooks,mt),this._options.consoleEnabled){const yt=this._options.prefixFormat({level:ht,caller:pt});this._consoleFunctions.indexOf(ht)>=0?console[ht](yt,...ft):console.log(yt,...ft)}await this.invokeHooks(this._options.afterHooks,mt)}}installHooks(ht){if(ht&&ht.length>0){for(const ft of ht)if(ft.install)try{ft.install(this._options)}catch(pt){console.warn("LoggerHook install failure",pt)}}}async invokeHooks(ht,ft){if(ht&&ht.length>0)for(const pt of ht)try{await pt.run(ft)}catch(mt){console.warn("LoggerHook run failure",mt)}}getCallerInfo(){const ht=new Error;if(ht.stack)try{const pt=ht.stack.split(`
50`)[0].startsWith("Error")?4:3,mt=ht.stack.split(`
51`)[pt].trim().replace("(","").replace(")","");let yt;mt.indexOf("at ")>-1?yt=mt.substring(mt.indexOf("at ")+3,mt.lastIndexOf(" ")).split(".").reverse()[0]:mt.indexOf("@")>-1&&(yt=mt.substring(0,mt.indexOf("@")));const vt=mt.split(":").reverse(),_t=vt[2].substring(Math.max(vt[2].lastIndexOf("/"),vt[2].lastIndexOf("\\"))+1).split("?")[0],bt=vt[1];return{functionName:yt,fileName:_t,lineNumber:bt}}catch{}}get enabled(){return this._options.enabled}get level(){return this._options.level}install(ht){ht.provide(ee,this),ht.config.globalProperties.$log=this,ht.config.globalProperties.$logger=this}}logger$K.VueLogger=ot;function ct(dt={}){return new ot(dt)}logger$K.createLogger=ct;function ut(){return ne.inject(ee)}
51return logger$K.useLogger=ut,logger$K}var hooks={},hasRequiredHooks;function requireHooks(){return hasRequiredHooks||(hasRequiredHooks=1,Object.defineProperty(hooks,"__esModule",{value:!0}),hooks.StringifyAndParseObjectsHook=hooks.StringifyObjectsHook=void 0,hooks.StringifyObjectsHook={run(ne){for(let ee=0;ee<ne.argumentArray.length;ee++)ne.argumentArray[ee]!=null&&typeof ne.argumentArray[ee]=="object"&&(ne.argumentArray[ee]=JSON.stringify(ne.argumentArray[ee]))}},hooks.StringifyAndParseObjectsHook={run(ne){for(let ee=0;ee<ne.argumentArray.length;ee++)ne.argumentArray[ee]!=null&&typeof ne.argumentArray[ee]=="object"&&(ne.argumentArray[ee]=JSON.parse(JSON.stringify(ne.argumentArray[ee])))}}),hooks}var hasRequiredDist$1;function requireDist$1(){return hasRequiredDist$1||(hasRequiredDist$1=1,(function(ne){Object.defineProperty(ne,"__esModule",{value:!0}),ne.StringifyAndParseObjectsHook=ne.StringifyObjectsHook=ne.useLogger=ne.createLogger=ne.VueLogger=void 0;var ee=requireLogger();Object.defineProperty(ne,"VueLogger",{enumerable:!0,get:function(){return ee.VueLogger}}),Object.defineProperty(ne,"createLogger",{enumerable:!0,get:function(){return ee.createLogger}}),Object.defineProperty(ne,"useLogger",{enumerable:!0,get:function(){return ee.useLogger}});var te=requireHooks();Object.defineProperty(ne,"StringifyObjectsHook",{enumerable:!0,get:function(){return te.StringifyObjectsHook}}),Object.defineProperty(ne,"StringifyAndParseObjectsHook",{enumerable:!0,get:function(){return te.StringifyAndParseObjectsHook}})})(dist$1)),dist$1}var distExports$1=requireDist$1();const eulerianSymbol=Symbol("vue-eulerian-plugin");class Eulerian{constructor(ee){console.debug("eulerian",ee),this.options=ee,window.dsfr={analytics:ee},this.key="@codegouvfr/react-dsfr finalityConsent eulerianAnalytics",this.status=!1,this.load().then(()=>{var te=JSON.parse(localStorage.getItem(this.key));te&&(te.eulerianAnalytics?this.start():this.stop())})}async load(){await __vitePreload(()=>import("./analytics.module.standalone-IbO__L6w.js"),[]).then(()=>{console.debug("import dynamic analytics.module.standalone !")})}start(){localStorage.setItem(this.key,'{"eulerianAnalytics":true,"isFullConsent":true}'),window.dsfr.analytics.opt.enable()}stop(){localStorage.setItem(this.key,'{"eulerianAnalytics":false,"isFullConsent":false}'),window.dsfr.analytics.opt.disable()}pause(){}resume(){}getKey(){return this.key}setKey(ee){this.key=ee}hasKey(){var ee=localStorage.getItem(this.key);return!!ee}install(ee){ee.provide(eulerianSymbol,this),ee.config.globalProperties.$eulerian=this}}function createEulerian(ne){return new Eulerian(ne)}function useEulerian(){return inject(eulerianSymbol)}var Users={getUser:function(){if(this.user){var ne=null,ee=this.user.first_name,te=this.user.last_name;return ee&&te?ne=`${ee} ${te}`:this.user.user_name?ne=this.user.user_name:this.user.email?ne=this.user.email:ne=this.user.user_identifier,ne}},getUserMe:async function(){try{var ne=await this.getFetch()(`${this.api}/users/me`,{method:"GET",headers:{"X-Requested-With":"XMLHttpRequest"}}),ee=null;if(ne.status===200)ee=await ne.json(),this.user=ee,this.saveStore();else{if(ne.status===401||ne.status===403)return this.user={},this.authenticated=!1,this.saveStore(),null;throw new Error(`Unexpected response status for /users/me: ${ne.status}`)}return ee}catch(te){console.error("Erreur lors de la récupération des informations de l'utilisateur :",te),this.throwError(te)}},getUserSize:function(){if(this.user){var ne=this.user.documents_quota,ee=this.user.documents_use,te=Math.round(100*ee/ne),st=te>80;return{size:ne-ee,ratio:te,alert:st}}}};const useServiceStore=defineStore({id:"service",state:()=>({connexion:{},authentificateSyncNeeded:!1,authentificated:!1}),getters:{isAuthentificateSyncNeeded:ne=>ne.authentificateSyncNeeded,isAuthentificated:ne=>ne.authentificated},actions:{getService(){return this.connexion},setService(ne){this.connexion=serviceFactotyCreate(ne)},setAuthentificateSyncNeeded(ne){const ee=!!ne;this.authentificateSyncNeeded=ee},getAuthentificateSyncNeeded(){return this.authentificateSyncNeeded},setAuthentificated(ne){const ee=!!ne;this.authentificated=ee},getAuthentificated(){return this.authentificated}}});var GetDocuments={getDrawing:async function(ne){return await this.getFileById(ne)},getImport:async function(ne){var ee=null,te=await this.getFileById(ne),st=useServiceStore(),ot=st.getService(),ct=ot.documents.import.find(dt=>dt._id===ne),ut=!0;return ct.labels.includes("internal")&&(ut=!1,ee=new Promise(dt=>{dt(te)})),ct.labels.includes("external")&&(ut=!1,ee=new Promise(dt=>{dt(te.url)})),ut&&(ee=new Promise(dt=>{dt(te)})),ee||(ee=new Promise(()=>{})),ee},getCompute:async function(ne){var ee=null,te=await this.getFileById(ne);if(typeof te=="string")try{te=JSON.parse(te)}catch{return Promise.reject("Le contenu du calcul n'est pas un JSON valide")}return ee=new Promise((st,ot)=>{if(!te||typeof te!="object"){ot("Le contenu du calcul est invalide");return}if(!Object.prototype.hasOwnProperty.call(te,"geoportail:compute")||!te["geoportail:compute"]){ot("La propriété 'geoportail:compute' est introuvable dans les données");return}st(te)}),ee},getService:async function(ne){var ee=null,te=await this.getFileById(ne);if(typeof te=="string")try{te=JSON.parse(te)}catch{return Promise.reject("Le contenu du service n'est pas un JSON valide")}var st=useServiceStore(),ot=st.getService(),ct=ot.documents.service.find(ut=>ut._id===ne);return!te||typeof te!="object"?Promise.reject("Le contenu du service est invalide"):((ct.labels.includes("wmts")||ct.labels.includes("wms"))&&(ct.labels.push("json"),ee=new Promise(ut=>{ut(te)})),ct.labels.includes("mapbox")&&(ct.labels.includes("internal")&&(ee=new Promise(ut=>{ut(te)})),ct.labels.includes("external")&&(ee=new Promise((ut,dt)=>{if(!Object.prototype.hasOwnProperty.call(te,"url")||!te.url){dt("L'url du service mapbox est introuvable dans les données");return}ut(te.url)}))),ee||(ee=new Promise(ut=>{ut("Exception pour récuperer le fichier !!!")})),ee)},getCartes:async function(ne){var ee=await this.getFileById(ne);if(typeof ee=="string")try{ee=JSON.parse(ee)}catch{return Promise.reject("Le contenu des cartes n'est pas un JSON valide")}var te=new Promise((st,ot)=>{if(!ee||typeof ee!="object"){ot("Le contenu des cartes est invalide");return}if(!Object.prototype.hasOwnProperty.call(ee,"permalink")||!ee.permalink){ot("Le permalink est introuvable dans les données");return}st(ee.permalink)});return te}},SetDocuments={getMimeType:ne=>{var ee="";switch(ne.toLowerCase()){case"json":ee="application/json";break;case"geojson":ee="application/geo+json";break;case"kml":ee="application/vnd.google-earth.kml+xml";break;case"gpx":ee="application/gpx+xml";break;default:ee="application/octet-stream";break}return ee},sliceText:(ne,ee)=>!ne||typeof ne!="string"?"":ne.length>ee?ne.slice(0,ee)+"...":ne,setDocument:async function(ne){if(this.isPending())return Promise.reject(new Error("Une requête est déjà en cours, veuillez réessayer plus tard."));try{const ut=new FormData;if(ut.append("name",ne.name),ut.append("description",this.sliceText(ne.description,255)),!this.isValideLabel(ne.type))throw new Error(`Le type de document "${ne.type}" n'est pas valide.`);const dt=[this.tag,ne.type,this.labelsFormats.find(mt=>ne.format.toLowerCase().includes(mt)),this.labelsTarget.find(mt=>ne.target.toLowerCase().includes(mt))];if(ne.kind){var ee=this.labelsService.find(mt=>ne.kind.toLowerCase().includes(mt));ee&&dt.push(ee)}if(ne.compute){var te=this.labelsCompute.find(mt=>ne.compute.toLowerCase().includes(mt));te&&dt.push(te)}ut.append("labels",dt.join(",")),ut.append("url_public",!0),ut.append("extra",JSON.stringify({kind:ne.kind?ne.kind.toLowerCase():null,format:ne.format.toLowerCase(),target:"internal",date:new Date().toLocaleDateString()}));const ht=ne.content,ft=new Blob([ht],{type:this.getMimeType(ne.format)}),pt=new File([ft],`${ne.name}.${ne.format}`,{type:this.getMimeType(ne.format)});ut.append("file",pt);var st=await this.getFetch()(`${this.api}/users/me/documents`,{method:"POST",headers:{Accept:"application/json","X-Requested-With":"XMLHttpRequest"},body:ut}),ot=await st.json();if(st.status!==200&&st.status!==201)throw new Error("Le document n'a pas été enregistré !",{cause:ot});if(!this.isValidDataResponse(ot))throw new Error("La réponse du service n'est pas valide !",{cause:ot});this.documents[ne.type].push(ot);var ct=ot._id;return this.saveStore(),{uuid:ct,action:"added"}}catch(ut){console.error("Erreur dans la création du document :",ut),this.throwError(ut)}},updateGeometryDocument:async function(ne){if(this.isPending())return Promise.reject(new Error("Une requête est déjà en cours, veuillez réessayer plus tard."));try{var ee=ne.uuid;if(!this.isValideLabel(ne.type))throw new Error(`Le type de document "${ne.type}" n'est pas valide.`);var te=this.documents[ne.type].findIndex(dt=>dt._id===ee);if(te===-1)throw new Error(`Le document ${ee} n'a pas été trouvé !`);const ct=new FormData,ut=new Blob([ne.content],{type:this.getMimeType(ne.format)});ct.append("file",ut);var st=await this.getFetch()(`${this.api}/users/me/documents/${ee}`,{method:this.mode==="local"?"PUT":"POST",headers:{Accept:"application/json","X-Requested-With":"XMLHttpRequest"},body:ct}),ot=await st.json();if(st.status!==200)throw st.status===404?new Error(`Le document ${ee} n'existe plus sur le serveur.`,{cause:{status:st.status,data:ot,code:"DOC_DELETED_REMOTELY"}}
51):st.status===409||st.status===412?new Error(`Le document ${ee} est en conflit de synchronisation.`,{cause:{status:st.status,data:ot,code:"DOC_VERSION_CONFLICT"}}):new Error(`Le document ${ee} n'a pas été mis à jour !`,{cause:{status:st.status,data:ot}});if(!this.isValidDataResponse(ot))throw new Error("La réponse du service n'est pas valide !",{cause:ot});return this.documents[ne.type][te]=ot,this.saveStore(),{uuid:ee,action:"updated"}}catch(ct){console.error("Erreur dans la mise à jour de la géométrie du document :",ct),this.throwError(ct)}},updateMetadataDocument:async function(ne){if(this.isPending())return Promise.reject(new Error("Une requête est déjà en cours, veuillez réessayer plus tard."));try{let ct=ne.uuid;if(!this.isValideLabel(ne.type))throw new Error(`Le type de document "${ne.type}" n'est pas valide.`);var ee=this.documents[ne.type].findIndex(ut=>ut._id===ct);if(ee===-1)throw new Error(`Le document ${ct} n'a pas été trouvé !`);var te={};ne.extra&&(this.documents[ne.type][ee].extra?te.extra={...this.documents[ne.type][ee].extra,...ne.extra}:te.extra=ne.extra),ne.name&&(te.name=ne.name),ne.description&&(te.description=ne.description);var st=await this.getFetch()(`${this.api}/users/me/documents/${ct}`,{method:"PATCH",headers:{Accept:"application/json","X-Requested-With":"XMLHttpRequest","Content-Type":"application/json"},body:JSON.stringify(te)}),ot=await st.json();if(st.status!==200)throw st.status===404?new Error(`Le document ${ct} n'existe plus sur le serveur.`,{cause:{status:st.status,data:ot,code:"DOC_DELETED_REMOTELY"}}
51):st.status===409||st.status===412?new Error(`Le document ${ct} est en conflit de synchronisation.`,{cause:{status:st.status,data:ot,code:"DOC_VERSION_CONFLICT"}}):new Error(`Le document ${ct} n'a pas été mis à jour !`,{cause:{status:st.status,data:ot}});if(!this.isValidDataResponse(ot))throw new Error("La réponse du service n'est pas valide !",{cause:ot});return this.documents[ne.type][ee]=ot,ct=ot._id,this.saveStore(),{uuid:ct,action:"updated"}}catch(ct){console.error("Erreur dans la mise à jour des métadonnées du document :",ct),this.throwError(ct)}},updateLabelsDocument:async function(ne){if(this.isPending())return Promise.reject(new Error("Une requête est déjà en cours, veuillez réessayer plus tard."));try{let ct=ne.uuid;if(!this.isValideLabel(ne.type))throw new Error(`Le type de document "${ne.type}" n'est pas valide.`);var ee=this.documents[ne.type].findIndex(ht=>ht._id===ct);if(ee===-1)throw new Error(`Le document ${ct} n'a pas été trouvé !`);const ut=this.documents[ne.type][ee].labels;if(!ut||!Array.isArray(ut))throw new Error(`Le document ${ct} n'a pas de labels existants !`);const dt=[...new Set([...ut,...ne.labels])];var te={};te.labels=dt;var st=await this.getFetch()(`${this.api}/users/me/documents/${ct}`,{method:"PATCH",headers:{Accept:"application/json","X-Requested-With":"XMLHttpRequest","Content-Type":"application/json"},body:JSON.stringify(te)}),ot=await st.json();if(st.status!==200)throw new Error(`Le document ${ct} n'a pas été mis à jour !`,{cause:ot});if(!this.isValidDataResponse(ot))throw new Error("La réponse du service n'est pas valide !",{cause:ot});return this.documents[ne.type][ee]=ot,ct=ot._id,this.saveStore(),{uuid:ct,action:"updated"}}catch(ct){console.error("Erreur dans la mise à jour des labels du document :",ct),this.throwError(ct)}},sharingDocument:async function(ne){if(this.isPending())return Promise.reject(new Error("Une requête est déjà en cours, veuillez réessayer plus tard."));try{let ot=ne.uuid;if(!this.isValideLabel(ne.type))throw new Error(`Le type de document "${ne.type}" n'est pas valide.`);var ee=this.documents[ne.type].findIndex(ct=>ct._id===ot);if(ee===-1)throw new Error(`Le document ${ot} n'a pas été trouvé !`);var te=await this.getFetch()(`${this.api}/users/me/documents/${ot}`,{method:"PATCH",headers:{Accept:"application/json","X-Requested-With":"XMLHttpRequest","Content-Type":"application/json"},body:JSON.stringify({public_url:!0})}),st=await te.json();if(te.status!==200)throw te.status===404?new Error(`Le document ${ot} n'existe plus sur le serveur.`,{cause:{status:te.status,data:st,code:"DOC_DELETED_REMOTELY"}}
51):te.status===409||te.status===412?new Error(`Le document ${ot} est en conflit de synchronisation.`,{cause:{status:te.status,data:st,code:"DOC_VERSION_CONFLICT"}}):new Error(`Le document ${ot} n'a pas été partagé !`,{cause:{status:te.status,data:st}});if(!this.isValidDataResponse(st))throw new Error("La réponse du service n'est pas valide !",{cause:st});return this.documents[ne.type][ee]=st,ot=st._id,this.saveStore(),{uuid:ot,action:"shared"}}catch(ot){console.error("Erreur dans le partage du document :",ot),this.throwError(ot)}},renameDocument:async function(ne){if(this.isPending())return Promise.reject(new Error("Une requête est déjà en cours, veuillez réessayer plus tard."));try{let ct=ne.uuid;if(!this.isValideLabel(ne.type))throw new Error(`Le type de document "${ne.type}" n'est pas valide.`);var ee=this.documents[ne.type].findIndex(ut=>ut._id===ct);if(ee===-1)throw new Error(`Le document ${ct} n'a pas été trouvé !`);var te={name:ne.name},st=await this.getFetch()(`${this.api}/users/me/documents/${ct}`,{method:"PATCH",headers:{Accept:"application/json","X-Requested-With":"XMLHttpRequest","Content-Type":"application/json"},body:JSON.stringify(te)}),ot=await st.json();if(st.status!==200&&st.status!==201)throw st.status===404?new Error(`Le document ${ct} n'existe plus sur le serveur.`,{cause:{status:st.status,data:ot,code:"DOC_DELETED_REMOTELY"}}
51):st.status===409||st.status===412?new Error(`Le document ${ct} est en conflit de synchronisation.`,{cause:{status:st.status,data:ot,code:"DOC_VERSION_CONFLICT"}}):new Error(`Le document ${ct} n'a pas été renommé !`,{cause:{status:st.status,data:ot}});if(!this.isValidDataResponse(ot))throw new Error("La réponse du service n'est pas valide !",{cause:ot});return this.documents[ne.type][ee]=ot,ct=ot._id,this.saveStore(),{uuid:ct,action:"updated"}}catch(ct){console.error("Erreur dans la mise à jour du nom du document :",ct),this.throwError(ct)}},deleteDocument:async function(ne){if(this.isPending())return Promise.reject(new Error("Une requête est déjà en cours, veuillez réessayer plus tard."));try{var ee=ne.uuid,te=await this.getFetch()(`${this.api}/users/me/documents/${ee}`,{method:"DELETE",headers:{Accept:"*/*","X-Requested-With":"XMLHttpRequest"}});if(te.status!==204)throw te.status===404?new Error(`Le document ${ee} n'existe plus sur le serveur.`,{cause:{status:te.status,response:te,code:"DOC_DELETED_REMOTELY"}}
51):te.status===409||te.status===412?new Error(`Le document ${ee} est en conflit de synchronisation.`,{cause:{status:te.status,response:te,code:"DOC_VERSION_CONFLICT"}}):new Error(`Le document ${ee} n'a pas été supprimé !`,{cause:{status:te.status,response:te}});if(!this.isValideLabel(ne.type))throw new Error(`Le type de document "${ne.type}" n'est pas valide.`);var st=this.documents[ne.type].findIndex(ct=>ct._id===ee);if(st===-1)throw new Error(`Le document ${ee} n'a pas été trouvé !`);this.documents[ne.type].splice(st,1),this.saveStore();var ot=this.hasDocumentInCarte(ee);return{uuid:ee,action:"deleted",extra:{isPresentInBookmarksCarte:ot}}}catch(ct){console.error("Erreur dans la suppression du document :",ct),this.throwError(ct)}},exportDocument:async function(ne){var ee=null,te=ne.uuid;this.isValideLabel(ne.type)||(ee=new Error(`Le type de document "${ne.type}" n'est pas valide.`),console.error("Erreur dans l'export du document :",ee),this.throwError(ee));var st=this.documents[ne.type].find(ut=>ut._id===te);if(st||(ee=new Error(`Le document ${te} n'a pas été trouvé !`),console.error("Erreur dans l'export du document :",ee),this.throwError(ee)),!st.extra){var ot=await this.getDocumentById(te);Object.assign(st,ot)}var ct=await this.getFileById(te);return ct||(ee=new Error(`Le document ${te} n'a pas été téléchargé !`),console.error("Erreur dans l'export du document :",ee),this.throwError(ee)),{uuid:te,action:"exported",extra:{content:ct,mimeType:this.getMimeType(st.extra.format),name:st.name,ext:st.extra.format}}}};const LIMIT_PER_PAGE=50;var Documents={tag:"cartes.gouv.fr",labels:["drawing","import","compute","service","carte"],labelsFormats:["geojson","gpx","kml","mapbox","json"],labelsService:["mapbox","wms","wmts"],labelsTarget:["internal","external"],labelsCompute:["isocurve","route","profil"],isValideLabel:function(ne){return this.labels.includes(ne)},isValideFormat:function(ne){return this.labelsFormats.includes(ne)},isValideService:function(ne){return this.labelsService.includes(ne)},isValideTarget:function(ne){return this.labelsTarget.includes(ne)},isValideCompute:function(ne){return this.labelsCompute.includes(ne)},isEmpty:function(){for(let ne=0;ne<this.labels.length;ne++){const ee=this.labels[ne];if(this.isValideLabel(ee)&&this.documents[ee]&&this.documents[ee].length>0)return!1}return!0},find:function(ne){for(let te=0;te<this.labels.length;te++){const st=this.labels[te];if(this.isValideLabel(st)&&this.documents[st]&&this.documents[st].length>0){var ee=this.documents[st].find(ot=>ot._id===ne);if(ee)return ee}}return null},hasDocumentInCarte:function(ne){var ee=!1;const te="carte";(!this.documents[te]||this.documents[te].length===0)&&console.warn(`Aucun document de type ${te} trouvé dans le store !`);for(let st=0;st<this.documents[te].length;st++){const ot=this.documents[te][st];if(ot.extra&&ot.extra.bookmarks&&ot.extra.bookmarks.includes(ne)){ee=!0;break}}return ee&&console.warn(`Le document ${ne} est présent dans une carte !`),ee},findInCartes:function(ne){const ee="carte";(!this.documents[ee]||this.documents[ee].length===0)&&console.warn(`Aucun document de type ${ee} trouvé dans le store !`);var te=[];for(let st=0;st<this.documents[ee].length;st++){const ot=this.documents[ee][st];ot.extra&&ot.extra.bookmarks&&ot.extra.bookmarks.includes(ne)&&te.push(ot)}return te},isValidDataResponse:function(ne){return!(!ne||typeof ne!="object"||!ne._id||typeof ne._id!="string"||!ne.labels||!Array.isArray(ne.labels)||!ne.mime_type||typeof ne.mime_type!="string"||!ne.creation||typeof ne.creation!="string"||!ne.update||typeof ne.update!="string")},getDocuments:async function(){var ne=[];for(let ee=0;ee<this.labels.length;ee++){const te=this.labels[ee];ne.push(this.getDocumentsByLabel(te))}return Promise.allSettled(ne)},getDocumentsByLabel:async function(ne){if(!this.labels.includes(ne))return Promise.reject("Label filter not allowed !");const ee=this.getEmitter?this.getEmitter():null;try{for(var te=1,st=LIMIT_PER_PAGE,ot=[],ct=null;;){var ut=await this._getDocumentsByLabelPerPage(ne,te,st);if(ot=ot.concat(ut.data),Number.isFinite(ut.total)&&(ct=ut.total),ut.data.length===0||Number.isFinite(ct)&&ot.length>=ct||!Number.isFinite(ct)&&ut.data.length<st)break;te+=1}return this.documents[ne]=ot.sort((dt,ht)=>dt.update.localeCompare(ht.update,"fr",{sensitivity:"base"})),this.saveStore(),ee&&ee.dispatchEvent("service:documents:completed",{label:ne,data:ot,total:ct}),ot}catch(dt){console.error(`Erreur lors de la récupération des documents pour le label ${ne} :`,dt),this.throwError(dt)}finally{this.stopPending()}},_getDocumentsByLabelPerPage:async function(ne,ee=1,te=LIMIT_PER_PAGE){if(!this.labels.includes(ne))return Promise.reject("Label filter not allowed !");try{var st=["owned=true","shared=false",`page=${ee}`,`limit=${te}`],ot=`${st.join("&")}&labels=${this.tag}&labels=${ne}`;ot+="&fields=name&fields=description&fields=extra&fields=labels&fields=public_url&fields=mime_type";var ct=await this.getFetch()(`${this.api}/users/me/documents?${ot}`,{method:"GET",headers:{"X-Requested-With":"XMLHttpRequest"}}),ut=await ct.json(),dt=ct.headers.get("Content-Range")||ct.headers.get("content-range"),ht=null;if(dt){var ft=dt.match(/^(\d+)-(\d+)\/(\d+|\*)$/);ft&&ft[3]!=="*"&&(ht=Number.parseInt(ft[3],10))}return{data:ut,total:ht,contentRange:dt}}catch(pt){console.error(`Erreur lors de la récupération des documents pour le label ${ne} :`,pt),this.throwError(pt)}finally{this.stopPending()}},getDocumentById:async function(ne){try{var ee=await this.getFetch()(`${this.api}/users/me/documents/${ne}`,{method:"GET",headers:{"X-Requested-With":"XMLHttpRequest"}});if(ee.status!==200)throw ee.status===404?new Error(`Le document (${ne}) n'existe plus sur le serveur.`,{cause:{status:ee.status,code:"DOC_DELETED_REMOTELY"}}):new Error(`Erreur HTTP lors de la récupération du document (${ne}).`,{cause:{status:ee.status}});var te=await ee.json();const ct=ut=>({id:ne.split("-").slice(-1)[0],format:this.labelsFormats.find(dt=>ut.includes(dt)),target:this.labelsTarget.find(dt=>ut.includes(dt)),compute:this.labelsCompute.find(dt=>ut.includes(dt)),kind:this.labelsService.find(dt=>ut.includes(dt)),date:new Date().toLocaleDateString()});var st={},ot=!1;for(let ut=0;ut<this.labels.length&&!ot;ut++){const dt=this.labels[ut];if(!this.isValideLabel(dt)){console.warn(`Label ${dt} non valide !`);continue}if(!this.documents[dt]||this.documents[dt].length===0){console.warn(`Aucun document trouvé pour le label ${dt} dans le store !`);continue}for(let ht=0;ht<this.documents[dt].length;ht++)if(st=this.documents[dt][ht],st._id===te._id){st.labels=te.labels,st.description=te.description,st.mime_type=te.mime_type,st.public_url=te.public_url,st.extra={...ct(te.labels),...te.extra},ot=!0;break}}
51return ot?(this.saveStore(),st):Promise.reject(`Le document (${ne}) n'a pas été trouvé !`)}catch(ct){console.error(`Erreur lors de la récupération du document avec l'id ${ne} :`,ct),this.throwError(ct)}finally{this.stopPending()}},getFileById:async function(ne){try{var ee=await this.getFetch()(`${this.api}/users/me/documents/${ne}/file`,{method:"GET",cache:"no-cache",headers:{"X-Requested-With":"XMLHttpRequest"}});if(ee.status!==200)throw ee.status===404?new Error(`Le fichier du document (${ne}) n'existe plus sur le serveur.`,{cause:{status:ee.status,code:"DOC_DELETED_REMOTELY"}}):new Error(`Erreur HTTP lors de la récupération du fichier (${ne}).`,{cause:{status:ee.status}});var te=ee.headers.get("content-type"),st=null;return te==="application/json"?st=await ee.json():st=await ee.text(),st}catch(ot){console.error(`Erreur lors de la récupération du fichier avec l'id ${ne} :`,ot),this.throwError(ot)}finally{this.stopPending()}}};Object.assign(Documents,GetDocuments);Object.assign(Documents,SetDocuments);class ServiceError{constructor(ee){if(!(this instanceof ServiceError))throw new TypeError("Le constructeur ServiceError ne peut pas être appelé comme une fonction.");var te=ee;typeof ee=="string"||ee instanceof String?(this.message=ee,this.status=-1,this.type=ServiceError.TYPE_UNKERR):(this.message=te.message||"indéfini!?",this.type=te.type||ServiceError.TYPE_UNKERR,this.status=te.status||-1,this.code=te.code),this.name="ServiceError",this.stack=new Error().stack}static serializeCause(ee){return ee&&(ee instanceof Error?{name:ee.name,message:ee.message,stack:ee.stack,status:ee.status,code:ee.code,cause:ServiceError.serializeCause(ee.cause)}:typeof ee=="object"?{...ee,cause:ServiceError.serializeCause(ee.cause)}:ee)}toJSON(){return{message:this.message,type:this.type,status:this.status,code:this.code,name:this.name,stack:this.stack,cause:ServiceError.serializeCause(this.cause)}}static from(ee,te){var mt,yt;if(ee instanceof ServiceError)return ee;var st=te||{},ot=st.message||"Erreur inconnue",ct=st.type||ServiceError.TYPE_UNKERR,ut=-1,dt=st.code;typeof ee=="string"||ee instanceof String?ot=String(ee):ee&&(ot=ee.message||ot,typeof ee.status=="number"&&(ut=ee.status),ee.type&&(ct=ee.type),ee.code&&(dt=ee.code));var ht=(mt=ee==null?void 0:ee.cause)==null?void 0:mt.status;typeof ht=="number"&&(ut=ht);var ft=(yt=ee==null?void 0:ee.cause)==null?void 0:yt.code;ft&&(dt=ft),ct===ServiceError.TYPE_UNKERR&&(ut===401||ut===403?ct=ServiceError.TYPE_AUTHERR:ut===400||ut===422?ct=ServiceError.TYPE_USEERR:ut===404||ut===409||ut===412?ct=ServiceError.TYPE_SYNCERR:ut===429?ct=ServiceError.TYPE_RATEERR:ut>=500&&(ct=ServiceError.TYPE_SRVERR)),(ee==null?void 0:ee.name)==="AbortError"&&(ct=ServiceError.TYPE_TIMEOUT),ee instanceof TypeError&&String(ee.message||"").toLowerCase().includes("fetch")&&(ct=ServiceError.TYPE_NETERR);var pt=new ServiceError({message:ot,type:ct,status:ut,code:dt});return ee&&(pt.cause=ServiceError.serializeCause(ee)),pt}}ServiceError.TYPE_SRVERR="SERVICE_ERROR";ServiceError.TYPE_USEERR="USAGE_ERROR";ServiceError.TYPE_AUTHERR="AUTHENTICATION_ERROR";ServiceError.TYPE_SYNCERR="SYNCHRONIZATION_ERROR";ServiceError.TYPE_NETERR="NETWORK_ERROR";ServiceError.TYPE_TIMEOUT="TIMEOUT_ERROR";ServiceError.TYPE_RATEERR="RATE_LIMIT_ERROR";ServiceError.TYPE_UNKERR="UNKNOWN_ERROR";const CONTENT_TYPE_JSON="application/json";var Yo,Do,ml,yl,zo,vl,$s,Uo,ts,Ul,ru,nu,su,ou,nc,au,sc,lu,cu,Vl,bl,oc,tl,uu,ac,nl,Hl,Il,jo,cc;class Keycloak{constructor(ee){fo(this,ts);fo(this,Yo,[]);fo(this,Do);fo(this,ml,!0);fo(this,yl);fo(this,zo,es(this,ts,cc).call(this,console.info));fo(this,vl,es(this,ts,cc).call(this,console.warn));fo(this,$s,{enable:!0,callbackList:[],interval:5});fo(this,Uo);Kn(this,"didInitialize",!1);Kn(this,"authenticated",!1);Kn(this,"loginRequired",!1);Kn(this,"responseMode","fragment");Kn(this,"responseType","code");Kn(this,"flow","standard");Kn(this,"timeSkew",null);Kn(this,"redirectUri");Kn(this,"silentCheckSsoRedirectUri");Kn(this,"silentCheckSsoFallback",!0);Kn(this,"pkceMethod","S256");Kn(this,"enableLogging",!1);Kn(this,"logoutMethod","GET");Kn(this,"scope");Kn(this,"messageReceiveTimeout",1e4);Kn(this,"idToken");Kn(this,"idTokenParsed");Kn(this,"token");Kn(this,"tokenParsed");Kn(this,"refreshToken");Kn(this,"refreshTokenParsed");Kn(this,"clientId");Kn(this,"sessionId");Kn(this,"subject");Kn(this,"authServerUrl");Kn(this,"realm");
51Kn(this,"realmAccess");Kn(this,"resourceAccess");Kn(this,"profile");Kn(this,"userInfo");Kn(this,"endpoints");Kn(this,"tokenTimeoutHandle");Kn(this,"onAuthSuccess");Kn(this,"onAuthError");Kn(this,"onAuthRefreshSuccess");Kn(this,"onAuthRefreshError");Kn(this,"onTokenExpired");Kn(this,"onAuthLogout");Kn(this,"onReady");Kn(this,"onActionUpdate");Kn(this,"init",async(ee={})=>{var st;if(this.didInitialize)throw new Error("A 'Keycloak' instance can only be initialized once.");this.didInitialize=!0,uo(this,yl,createCallbackStorage());const te=["default","cordova","cordova-native"];if(typeof ee.adapter=="string"&&te.includes(ee.adapter)?uo(this,Do,es(this,ts,Ul).call(this,ee.adapter)):typeof ee.adapter=="object"?uo(this,Do,ee.adapter):"Cordova"in window||"cordova"in window?uo(this,Do,es(this,ts,Ul).call(this,"cordova")):uo(this,Do,es(this,ts,Ul).call(this,"default")),typeof ee.useNonce<"u"&&uo(this,ml,ee.useNonce),typeof ee.checkLoginIframe<"u"&&(is(this,$s).enable=ee.checkLoginIframe),ee.checkLoginIframeInterval&&(is(this,$s).interval=ee.checkLoginIframeInterval),ee.onLoad==="login-required"&&(this.loginRequired=!0),ee.responseMode)if(ee.responseMode==="query"||ee.responseMode==="fragment")this.responseMode=ee.responseMode;else throw new Error("Invalid value for responseMode");if(ee.flow){switch(ee.flow){case"standard":this.responseType="code";break;case"implicit":this.responseType="id_token token";break;case"hybrid":this.responseType="code id_token token";break;default:throw new Error("Invalid value for flow")}this.flow=ee.flow}if(typeof ee.timeSkew=="number"&&(this.timeSkew=ee.timeSkew),ee.redirectUri&&(this.redirectUri=ee.redirectUri),ee.silentCheckSsoRedirectUri&&(this.silentCheckSsoRedirectUri=ee.silentCheckSsoRedirectUri),typeof ee.silentCheckSsoFallback=="boolean"&&(this.silentCheckSsoFallback=ee.silentCheckSsoFallback),typeof ee.pkceMethod<"u"){if(ee.pkceMethod!=="S256"&&ee.pkceMethod!==!1)throw new TypeError(`Invalid value for pkceMethod', expected 'S256' or false but got ${ee.pkceMethod}.`);this.pkceMethod=ee.pkceMethod}return typeof ee.enableLogging=="boolean"&&(this.enableLogging=ee.enableLogging),ee.logoutMethod==="POST"&&(this.logoutMethod="POST"),typeof ee.scope=="string"&&(this.scope=ee.scope),typeof ee.messageReceiveTimeout=="number"&&ee.messageReceiveTimeout>0&&(this.messageReceiveTimeout=ee.messageReceiveTimeout),await es(this,ts,ou).call(this),await es(this,ts,lu).call(this),await es(this,ts,cu).call(this,ee),(st=this.onReady)==null||st.call(this,this.authenticated),this.authenticated});Kn(this,"login",ee=>is(this,Do).login(ee));Kn(this,"createLoginUrl",async ee=>{const te=createUUID(),st=createUUID(),ot=is(this,Do).redirectUri(ee),ct={state:te,nonce:st,redirectUri:ot,loginOptions:ee};ee!=null&&ee.prompt&&(ct.prompt=ee.prompt);const ut=(ee==null?void 0:ee.action)==="register"?this.endpoints.register():this.endpoints.authorize();let dt=(ee==null?void 0:ee.scope)||this.scope;const ht=dt?dt.split(" "):[];ht.includes("openid")||ht.unshift("openid"),dt=ht.join(" ");const ft=new URLSearchParams([["client_id",this.clientId],["redirect_uri",ot],["state",te],["response_mode",this.responseMode],["response_type",this.responseType],["scope",dt]]);if(is(this,ml)&&ft.append("nonce",st),ee!=null&&ee.prompt&&ft.append("prompt",ee.prompt),typeof(ee==null?void 0:ee.maxAge)=="number"&&ft.append("max_age",ee.maxAge.toString()),ee!=null&&ee.loginHint&&ft.append("login_hint",ee.loginHint),ee!=null&&ee.idpHint&&ft.append("kc_idp_hint",ee.idpHint),ee!=null&&ee.action&&ee.action!=="register"&&ft.append("kc_action",ee.action),ee!=null&&ee.locale&&ft.append("ui_locales",ee.locale),ee!=null&&ee.acr&&ft.append("claims",buildClaimsParameter(ee.acr)),ee!=null&&ee.acrValues&&ft.append("acr_values",ee.acrValues),this.pkceMethod)try{const pt=generateCodeVerifier(96),mt=await generatePkceChallenge(this.pkceMethod,pt);ct.pkceCodeVerifier=pt,ft.append("code_challenge",mt),ft.append("code_challenge_method",this.pkceMethod)}catch(pt){throw new Error("Failed to generate PKCE challenge.",{cause:pt})}return is(this,yl).add(ct),`${ut}?${ft.toString()}`});Kn(this,"logout",ee=>is(this,Do).logout(ee));Kn(this,"createLogoutUrl",ee=>{const te=(ee==null?void 0:ee.logoutMethod)??this.logoutMethod,st=this.endpoints.logout();if(te==="POST")return st;const ot=new URLSearchParams([["client_id",this.clientId],["post_logout_redirect_uri",is(this,Do).redirectUri(ee)]]);return this.idToken&&ot.append("id_token_hint",this.idToken),`${st}?${ot.toString()}`});Kn(this,"register",ee=>is(this,Do).register(ee));Kn(this,"createRegisterUrl",ee=>this.createLoginUrl({...ee,action:"register"}));Kn(this,"createAccountUrl",ee=>{const te=es(this,ts,jo).call(this);if(!te)throw new Error("Unable to create account URL, make sure the adapter is not configured using a generic OIDC provider.");const st=new URLSearchParams([["referrer",this.clientId],["referrer_uri",is(this,Do).redirectUri(ee)]]);return`${te}/account?${st.toString()}`});Kn(this,"accountManagement",()=>is(this,Do).accountManagement());Kn(this,"hasRealmRole",ee=>
51{const te=this.realmAccess;return!!te&&te.roles.indexOf(ee)>=0});Kn(this,"hasResourceRole",(ee,te)=>{if(!this.resourceAccess)return!1;const st=this.resourceAccess[te||this.clientId];return!!st&&st.roles.indexOf(ee)>=0});Kn(this,"loadUserProfile",async()=>{const ee=es(this,ts,jo).call(this);if(!ee)throw new Error("Unable to load user profile, make sure the adapter is not configured using a generic OIDC provider.");const te=`${ee}/account`,st=await fetchJSON(te,{headers:[buildAuthorizationHeader(this.token)]});return this.profile=st});Kn(this,"loadUserInfo",async()=>{const ee=this.endpoints.userinfo(),te=await fetchJSON(ee,{headers:[buildAuthorizationHeader(this.token)]});return this.userInfo=te});Kn(this,"isTokenExpired",ee=>{if(!this.tokenParsed||!this.refreshToken&&this.flow!=="implicit")throw new Error("Not authenticated");if(this.timeSkew==null)return is(this,zo).call(this,"[KEYCLOAK] Unable to determine if token is expired as timeskew is not set"),!0;if(typeof this.tokenParsed.exp!="number")return!1;let te=this.tokenParsed.exp-Math.ceil(new Date().getTime()/1e3)+this.timeSkew;if(ee){if(isNaN(ee))throw new Error("Invalid minValidity");te-=ee}return te<0});Kn(this,"updateToken",async ee=>{var ut,dt;if(!this.refreshToken)throw new Error("Unable to update token, no refresh token available.");ee=ee||5,is(this,$s).enable&&await es(this,ts,bl).call(this);let te=!1;if(ee===-1?(te=!0,is(this,zo).call(this,"[KEYCLOAK] Refreshing token: forced refresh")):(!this.tokenParsed||this.isTokenExpired(ee))&&(te=!0,is(this,zo).call(this,"[KEYCLOAK] Refreshing token: token expired")),!te)return!1;const{promise:st,resolve:ot,reject:ct}=Promise.withResolvers();if(is(this,Yo).push({resolve:ot,reject:ct}),is(this,Yo).length===1){const ht=this.endpoints.token();let ft=new Date().getTime();try{const pt=await fetchRefreshToken(ht,this.refreshToken,this.clientId);is(this,zo).call(this,"[KEYCLOAK] Token refreshed"),ft=(ft+new Date().getTime())/2,es(this,ts,Il).call(this,pt.access_token,pt.refresh_token,pt.id_token,ft),(ut=this.onAuthRefreshSuccess)==null||ut.call(this);for(let mt=is(this,Yo).pop();mt!=null;mt=is(this,Yo).pop())mt.resolve(!0)}catch(pt){is(this,vl).call(this,"[KEYCLOAK] Failed to refresh token"),pt instanceof NetworkError&&pt.response.status===400&&this.clearToken(),(dt=this.onAuthRefreshError)==null||dt.call(this);for(let mt=is(this,Yo).pop();mt!=null;mt=is(this,Yo).pop())mt.reject(pt)}}return await st});Kn(this,"clearToken",()=>{var ee;this.token&&(es(this,ts,Il).call(this),(ee=this.onAuthLogout)==null||ee.call(this),this.loginRequired&&this.login())});if(typeof ee!="string"&&!isObject$1(ee))throw new Error("The 'Keycloak' constructor must be provided with a configuration object, or a URL to a JSON configuration file.");if(isObject$1(ee)){const te="oidcProvider"in ee?["clientId"]:["url","realm","clientId"];for(const st of te)if(!(st in ee))throw new Error(`The configuration object is missing the required '${st}' property.`)}globalThis.isSecureContext||is(this,vl).call(this,`[KEYCLOAK] Keycloak JS must be used in a 'secure context' to function properly as it relies on browser APIs that are otherwise not available.
52Continuing to run your application insecurely will lead to unexpected behavior and breakage.
53
54For more information see: https://developer.mozilla.org/en-US/docs/Web/Security/Secure_Contexts`),uo(this,Uo,ee)}}Yo=new WeakMap,Do=new WeakMap,ml=new WeakMap,yl=new WeakMap,zo=new WeakMap,vl=new WeakMap,$s=new WeakMap,Uo=new WeakMap,ts=new WeakSet,Ul=function(ee){if(ee==="default")return es(this,ts,ru).call(this);if(ee==="cordova")return is(this,$s).enable=!1,es(this,ts,nu).call(this);if(ee==="cordova-native")return is(this,$s).enable=!1,es(this,ts,su).call(this);throw new Error("invalid adapter type: "+ee)},ru=function(){const ee=te=>(te==null?void 0:te.redirectUri)||this.redirectUri||globalThis.location.href;return{login:async te=>(window.location.assign(await this.createLoginUrl(te)),await new Promise(()=>{})),logout:async te=>{if(((te==null?void 0:te.logoutMethod)??this.logoutMethod)==="GET"){window.location.replace(this.createLogoutUrl(te));return}const ot=document.createElement("form");ot.setAttribute("method","POST"),ot.setAttribute("action",this.createLogoutUrl(te)),ot.style.display="none";const ct={id_token_hint:this.idToken,client_id:this.clientId,post_logout_redirect_uri:ee(te)};for(const[ut,dt]of Object.entries(ct)){const ht=document.createElement("input");ht.setAttribute("type","hidden"),ht.setAttribute("name",ut),ht.setAttribute("value",dt),ot.appendChild(ht)}document.body.appendChild(ot),ot.submit()},register:async te=>(window.location.assign(await this.createRegisterUrl(te)),await new Promise(()=>{})),accountManagement:async()=>{const te=this.createAccountUrl();if(typeof te<"u")window.location.href=te;else throw new Error("Not supported by the OIDC server");return await new Promise(()=>{})},redirectUri:ee}},nu=function(){const ee=(ut,dt,ht)=>window.cordova&&window.cordova.InAppBrowser?window.cordova.InAppBrowser.open(ut,dt,ht):window.open(ut,dt,ht),te=ut=>ut&&ut.cordovaOptions?Object.keys(ut.cordovaOptions).reduce((dt,ht)=>(dt[ht]=ut.cordovaOptions[ht],dt),{}):{},st=ut=>Object.keys(ut).reduce((dt,ht)=>(dt.push(ht+"="+ut[ht]),dt),[]).join(","),ot=ut=>{const dt=te(ut);return dt.location="no",ut&&ut.prompt==="none"&&(dt.hidden="yes"),st(dt)},ct=()=>this.redirectUri||"http://localhost";return{login:async ut=>{const dt=ot(ut),ht=await this.createLoginUrl(ut),ft=ee(ht,"_blank",dt);let pt=!1,mt=!1;function yt(){mt=!0,ft.close()}return await new Promise((vt,_t)=>{ft.addEventListener("loadstart",async bt=>{if(bt.url.indexOf(ct())===0){const xt=es(this,ts,tl).call(this,bt.url);pt=!0,yt();try{await es(this,ts,nl).call(this,xt),vt()}catch(Mt){_t(Mt)}}}),ft.addEventListener("loaderror",async bt=>{if(!pt)if(bt.url.indexOf(ct())===0){const xt=es(this,ts,tl).call(this,bt.url);pt=!0,yt();try{await es(this,ts,nl).call(this,xt),vt()}catch(Mt){_t(Mt)}}
54else _t(new Error("Unable to process login.")),yt()}),ft.addEventListener("exit",function(bt){mt||_t(new Error("User closed the login window."))})})},logout:async ut=>{const dt=this.createLogoutUrl(ut),ht=ee(dt,"_blank","location=no,hidden=yes,clearcache=yes");let ft=!1;ht.addEventListener("loadstart",pt=>{pt.url.indexOf(ct())===0&&ht.close()}),ht.addEventListener("loaderror",pt=>{pt.url.indexOf(ct())===0||(ft=!0),ht.close()}),await new Promise((pt,mt)=>{ht.addEventListener("exit",()=>{ft?mt(new Error("User closed the login window.")):(this.clearToken(),pt())})})},register:async ut=>{const dt=await this.createRegisterUrl(),ht=ot(ut),ft=ee(dt,"_blank",ht);await new Promise((mt,yt)=>{ft.addEventListener("loadstart",async vt=>{if(vt.url.indexOf(ct())===0){ft.close();const _t=es(this,ts,tl).call(this,vt.url);try{await es(this,ts,nl).call(this,_t),mt()}catch(bt){yt(bt)}}})})},accountManagement:async()=>{const ut=this.createAccountUrl();if(typeof ut<"u"){const dt=ee(ut,"_blank","location=no");dt.addEventListener("loadstart",function(ht){ht.url.indexOf(ct())===0&&dt.close()})}else throw new Error("Not supported by the OIDC server")},redirectUri:()=>ct()}},su=function(){return{login:async ee=>{const te=await this.createLoginUrl(ee);await new Promise((st,ot)=>{universalLinks.subscribe("keycloak",async ct=>{universalLinks.unsubscribe("keycloak"),window.cordova.plugins.browsertab.close();const ut=es(this,ts,tl).call(this,ct.url);try{await es(this,ts,nl).call(this,ut),st()}catch(dt){ot(dt)}}),window.cordova.plugins.browsertab.openUrl(te)})},logout:async ee=>{const te=this.createLogoutUrl(ee);await new Promise(st=>{universalLinks.subscribe("keycloak",()=>{universalLinks.unsubscribe("keycloak"),window.cordova.plugins.browsertab.close(),this.clearToken(),st
54()}),window.cordova.plugins.browsertab.openUrl(te)})},register:async ee=>{const te=await this.createRegisterUrl(ee);await new Promise((st,ot)=>{universalLinks.subscribe("keycloak",async ct=>{universalLinks.unsubscribe("keycloak"),window.cordova.plugins.browsertab.close();const ut=es(this,ts,tl).call(this,ct.url);try{await es(this,ts,nl).call(this,ut),st()}catch(dt){ot(dt)}}),window.cordova.plugins.browsertab.openUrl(te)})},accountManagement:async()=>{const ee=this.createAccountUrl();if(typeof ee<"u")window.cordova.plugins.browsertab.openUrl(ee);else throw new Error("Not supported by the OIDC server")},redirectUri:ee=>ee&&ee.redirectUri?ee.redirectUri:this.redirectUri?this.redirectUri:"http://localhost"}},ou=async function(){if(typeof is(this,Uo)=="string"){const ee=await fetchJsonConfig(is(this,Uo));this.authServerUrl=ee["auth-server-url"],this.realm=ee.realm,this.clientId=ee.resource,es(this,ts,nc).call(this)}else this.clientId=is(this,Uo).clientId,"oidcProvider"in is(this,Uo)?await es(this,ts,au).call(this,is(this,Uo).oidcProvider):(this.authServerUrl=is(this,Uo).url,this.realm=is(this,Uo).realm,es(this,ts,nc).call(this))},nc=function(){this.endpoints={authorize:()=>es(this,ts,jo).call(this)+"/protocol/openid-connect/auth",token:()=>es(this,ts,jo).call(this)+"/protocol/openid-connect/token",logout:()=>es(this,ts,jo).call(this)+"/protocol/openid-connect/logout",checkSessionIframe:()=>es(this,ts,jo).call(this)+"/protocol/openid-connect/login-status-iframe.html",thirdPartyCookiesIframe:()=>es(this,ts,jo).call(this)+"/protocol/openid-connect/3p-cookies/step1.html",register:()=>es(this,ts,jo).call(this)+"/protocol/openid-connect/registrations",userinfo:()=>es(this,ts,jo).call(this)+"/protocol/openid-connect/userinfo"}},au=async function(ee){if(typeof ee=="string"){const te=`${stripTrailingSlash(ee)}/.well-known/openid-configuration`,st=await fetchOpenIdConfig(te);es(this,ts,sc).call(this,st)}else es(this,ts,sc).call(this,ee)},sc=function(ee){this.endpoints={authorize(){return ee.authorization_endpoint},token(){return ee.token_endpoint},logout(){if(!ee.end_session_endpoint)throw new Error("Not supported by the OIDC server");return ee.end_session_endpoint},checkSessionIframe(){if(!ee.check_session_iframe)throw new Error("Not supported by the OIDC server");return ee.check_session_iframe},register(){throw new Error('Redirection to "Register user" page not supported in standard OIDC mode')},userinfo(){if(!ee.userinfo_endpoint)throw new Error("Not supported by the OIDC server");return ee.userinfo_endpoint}}},lu=async function(){if(!is(this,$s).enable&&!this.silentCheckSsoRedirectUri||typeof this.endpoints.thirdPartyCookiesIframe!="function")return;const ee=document.createElement("iframe");ee.setAttribute("src",this.endpoints.thirdPartyCookiesIframe()),ee.setAttribute("sandbox","allow-storage-access-by-user-activation allow-scripts allow-same-origin"),ee.setAttribute("title","keycloak-3p-check-iframe"),ee.style.display="none",document.body.appendChild(ee);const te=new Promise(st=>{const ot=ct=>{ee.contentWindow===ct.source&&(ct.data!=="supported"&&ct.data!=="unsupported"||(ct.data==="unsupported"&&(is(this,vl).call(this,`[KEYCLOAK] Your browser is blocking access to 3rd-party cookies, this means:
55
56 - It is not possible to retrieve tokens without redirecting to the Keycloak server (a.k.a. no support for silent authentication).
57 - It is not possible to automatically detect changes to the session status (such as the user logging out in another tab).
58
59For more information see: https://www.keycloak.org/securing-apps/javascript-adapter#_modern_browsers`),is(this,$s).enable=!1,this.silentCheckSsoFallback&&(this.silentCheckSsoRedirectUri=void 0)),document.body.removeChild(ee),window.removeEventListener("message",ot),st()))};window.addEventListener("message",ot,!1)});return await applyTimeoutToPromise(te,this.messageReceiveTimeout,"Timeout when waiting for 3rd party check iframe message.")},cu=async function(ee){var ct,ut,dt;const te=es(this,ts,tl).call(this,window.location.href);if(te!=null&&te.newUrl&&window.history.replaceState(window.history.state,"",te.newUrl),te&&te.valid){await es(this,ts,Vl).call(this),await es(this,ts,nl).call(this,te);return}const st=async ht=>
59{const ft={};ht||(ft.prompt="none"),ee.locale&&(ft.locale=ee.locale),await this.login(ft)},ot=async()=>{switch(ee.onLoad){case"check-sso":is(this,$s).enable?(await es(this,ts,Vl).call(this),await es(this,ts,bl).call(this)||(this.silentCheckSsoRedirectUri?await es(this,ts,oc).call(this):await st(!1))):this.silentCheckSsoRedirectUri?await es(this,ts,oc).call(this):await st(!1);break;case"login-required":await st(!0);break;default:throw new Error("Invalid value for onLoad")}};if(ee.token&&ee.refreshToken)if(es(this,ts,Il).call(this,ee.token,ee.refreshToken,ee.idToken),is(this,$s).enable)await es(this,ts,Vl).call(this),await es(this,ts,bl).call(this)&&((ct=this.onAuthSuccess)==null||ct.call(this),es(this,ts,Hl).call(this));else try{await this.updateToken(-1),(ut=this.onAuthSuccess)==null||ut.call(this)}catch(ht){if((dt=this.onAuthError)==null||dt.call(this),ee.onLoad)await ot();else throw ht}else ee.onLoad&&await ot()},Vl=async function(){if(!is(this,$s).enable||is(this,$s).iframe)return;const ee=document.createElement("iframe");is(this,$s).iframe=ee,ee.setAttribute("src",this.endpoints.checkSessionIframe()),ee.setAttribute("sandbox","allow-storage-access-by-user-activation allow-scripts allow-same-origin"),ee.setAttribute("title","keycloak-session-iframe"),ee.style.display="none",document.body.appendChild(ee);const te=ot=>{var ut;if(ot.origin!==is(this,$s).iframeOrigin||((ut=is(this,$s).iframe)==null?void 0:ut.contentWindow)!==ot.source||!(ot.data==="unchanged"||ot.data==="changed"||ot.data==="error"))return;ot.data!=="unchanged"&&this.clearToken();const ct=is(this,$s).callbackList;is(this,$s).callbackList=[];for(const dt of ct.reverse())ot.data==="error"?dt(new Error("Error while checking login iframe")):dt(null,ot.data==="unchanged")};window.addEventListener("message",te,!1),await new Promise(ot=>{ee.addEventListener("load",()=>{const ct=this.endpoints.authorize();ct.startsWith("/")?is(this,$s).iframeOrigin=globalThis.location.origin:is(this,$s).iframeOrigin=new URL(ct).origin,ot()})})},bl=async function(){if(!is(this,$s).iframe||!is(this,$s).iframeOrigin)return;const ee=`${this.clientId} ${this.sessionId?this.sessionId:""}`,te=is(this,$s).iframeOrigin;return await new Promise((ot,ct)=>{var dt,ht;const ut=(ft,pt)=>ft?ct(ft):ot(pt);is(this,$s).callbackList.push(ut),is(this,$s).callbackList.length===1&&((ht=(dt=is(this,$s).iframe)==null?void 0:dt.contentWindow)==null||ht.postMessage(ee,te))})},oc=async function(){const ee=document.createElement("iframe"),te=await this.createLoginUrl({prompt:"none",redirectUri:this.silentCheckSsoRedirectUri});return ee.setAttribute("src",te),ee.setAttribute("sandbox","allow-storage-access-by-user-activation allow-scripts allow-same-origin"),ee.setAttribute("title","keycloak-silent-check-sso"),ee.style.display="none",document.body.appendChild(ee),await new Promise((st,ot)=>{const ct=async ut=>{if(ut.origin!==window.location.origin||ee.contentWindow!==ut.source)return;const dt=es(this,ts,tl).call(this,ut.data);try{await es(this,ts,nl).call(this,dt),st()}catch(ht){ot(ht)}document.body.removeChild(ee),window.removeEventListener("message",ct)};window.addEventListener("message",ct)})},tl=function(ee){const te=es(this,ts,uu).call(this,ee);if(!te)return;const st=is(this,yl).get(te.state);return st&&(te.valid=!0,te.redirectUri=st.redirectUri,te.storedNonce=st.nonce,te.prompt=st.prompt,te.pkceCodeVerifier=st.pkceCodeVerifier,te.loginOptions=st.loginOptions),te},uu=function(ee){let te=[];switch(this.flow){case"standard":te=["code","state","session_state","kc_action_status","kc_action","iss"];break;case"implicit":te=["access_token","token_type","id_token","state","session_state","expires_in","kc_action_status","kc_action","iss"];break;case"hybrid":te=["access_token","token_type","id_token","code","state","session_state","expires_in","kc_action_status","kc_action","iss"];break}te.push("error"),te.push("error_description"),te.push("error_uri");const st=new URL(ee);let ot="",ct;if(this.responseMode==="query"&&st.searchParams.size>0?(ct=es(this,ts,ac).call(this,st.search,te),st.search=ct.paramsString,ot=st.toString()):this.responseMode==="fragment"&&st.hash.length>0&&(ct=es(this,ts,ac).call(this,st.hash.substring(1),te),st.hash=ct.paramsString,ot=st.toString()),ct!=null&&ct.oauthParams){if(this.flow==="standard"||this.flow==="hybrid"){if((ct.oauthParams.code||ct.oauthParams.error)&&ct.oauthParams.state)return ct.oauthParams.newUrl=ot,ct.oauthParams}else if(this.flow==="implicit"&&(ct.oauthParams.access_token||ct.oauthParams.error)&&ct.oauthParams.state)return ct.oauthParams.newUrl=ot,ct.oauthParams}},ac=function(ee,te){const st=ee.split("&"),ot={};let ct="";for(const ut of st.reverse()){const dt=new URLSearchParams(ut).entries().next().value;if(!dt){ct="&"+ct;continue}const[ht,ft]=dt;te.includes(ht)&&!(ht in ot)?ot[ht]=ft:ct=ct.length===0?ut:ut+"&"+ct}return{paramsString:ct,oauthParams:ot}},nl=async function(ee){var dt,ht,ft,pt;const{code:te,error:st,prompt:ot}=ee;let ct=new Date().getTime();const ut=(mt,yt,vt)=>{if(ct=(ct+new Date().getTime())/2,es(this,ts,Il).call(this,mt,yt,vt,ct),is(this,ml)&&this.idTokenParsed&&this.idTokenParsed.nonce!==ee.storedNonce)throw is(this,zo).call(this,"[KEYCLOAK] Invalid nonce, clearing token"),this.clearToken(),new Error("Invalid nonce.")};if(ee.kc_action_status&&this.onActionUpdate&&this.onActionUpdate(ee.kc_action_status,ee.kc_action),st){if(ot!=="none")if(ee.error_description&&ee.error_description==="authentication_expired")await this.login(ee.loginOptions);else{const mt={error:st,error_description:ee.error_description};throw(dt=this.onAuthError)==null||dt.call(this,mt),mt}return}
59else this.flow!=="standard"&&(ee.access_token||ee.id_token)&&(ut(ee.access_token,void 0,ee.id_token),(ht=this.onAuthSuccess)==null||ht.call(this));if(this.flow!=="implicit"&&te)try{const mt=await fetchAccessToken(this.endpoints.token(),te,this.clientId,ee.redirectUri,ee.pkceCodeVerifier);ut(mt.access_token,mt.refresh_token,mt.id_token),this.flow==="standard"&&((ft=this.onAuthSuccess)==null||ft.call(this)),es(this,ts,Hl).call(this)}catch(mt){throw(pt=this.onAuthError)==null||pt.call(this),mt}},Hl=async function(){is(this,$s).enable&&this.token&&(await waitForTimeout(is(this,$s).interval*1e3),await es(this,ts,bl).call(this)&&await es(this,ts,Hl).call(this))},Il=function(ee,te,st,ot){if(this.tokenTimeoutHandle&&(clearTimeout(this.tokenTimeoutHandle),this.tokenTimeoutHandle=void 0),te?(this.refreshToken=te,this.refreshTokenParsed=decodeToken(te)):(delete this.refreshToken,delete this.refreshTokenParsed),st?(this.idToken=st,this.idTokenParsed=decodeToken(st)):(delete this.idToken,delete this.idTokenParsed),ee){if(this.token=ee,this.tokenParsed=decodeToken(ee),this.sessionId=this.tokenParsed.sid,this.authenticated=!0,this.subject=this.tokenParsed.sub,this.realmAccess=this.tokenParsed.realm_access,this.resourceAccess=this.tokenParsed.resource_access,ot&&(this.timeSkew=Math.floor(ot/1e3)-this.tokenParsed.iat),this.timeSkew!==null&&(is(this,zo).call(this,"[KEYCLOAK] Estimated time difference between browser and server is "+this.timeSkew+" seconds"),this.onTokenExpired)){const ct=(this.tokenParsed.exp-new Date().getTime()/1e3+this.timeSkew)*1e3;is(this,zo).call(this,"[KEYCLOAK] Token expires in "+Math.round(ct/1e3)+" s"),ct<=0?this.onTokenExpired():this.tokenTimeoutHandle=window.setTimeout(this.onTokenExpired,ct)}}else delete this.token,delete this.tokenParsed,delete this.subject,delete this.realmAccess,delete this.resourceAccess,this.authenticated=!1},jo=function(){if(!(typeof this.authServerUrl>"u"))return`${stripTrailingSlash(this.authServerUrl)}/realms/${encodeURIComponent(this.realm)}`},cc=function(ee){return te=>{this.enableLogging&&ee.call(console,te)}};function createUUID(){if(typeof crypto>"u"||typeof crypto.randomUUID>"u")throw new Error("Web Crypto API is not available.");return crypto.randomUUID()}function buildClaimsParameter(ne){return JSON.stringify({id_token:{acr:ne}})}function generateCodeVerifier(ne){return generateRandomString(ne,"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789")}async function generatePkceChallenge(ne,ee){if(ne!=="S256")throw new TypeError(`Invalid value for 'pkceMethod', expected 'S256' but got '${ne}'.`);const te=new Uint8Array(await sha256Digest(ee));return bytesToBase64(te).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function generateRandomString(ne,ee){const te=generateRandomData(ne),st=new Array(ne);for(let ot=0;ot<ne;ot++)st[ot]=ee.charCodeAt(te[ot]%ee.length);return String.fromCharCode.apply(null,st)}function generateRandomData(ne){if(typeof crypto>"u"||typeof crypto.getRandomValues>"u")throw new Error("Web Crypto API is not available.");return crypto.getRandomValues(new Uint8Array(ne))}function applyTimeoutToPromise(ne,ee,te){let st;const ot=new Promise(function(ct,ut){st=window.setTimeout(function(){ut(new Error(te))},ee)});return Promise.race([ne,ot]).finally(function(){clearTimeout(st)})}function createCallbackStorage(){try{return new LocalStorage}catch{return new CookieStorage}}const STORAGE_KEY_PREFIX="kc-callback-";var $o,Ac,du,Ic,hu;class LocalStorage{constructor(){fo(this,$o);globalThis.localStorage.setItem("kc-test","test"),globalThis.localStorage.removeItem("kc-test")}get(ee){if(!ee)return null;es(this,$o,Ac).call(this);const te=STORAGE_KEY_PREFIX+ee,st=globalThis.localStorage.getItem(te);return st?(globalThis.localStorage.removeItem(te),JSON.parse(st)):null}add(ee){es(this,$o,Ac).call(this);const te=STORAGE_KEY_PREFIX+ee.state,st=JSON.stringify({...ee,expires:Date.now()+3600*1e3});try{globalThis.localStorage.setItem(te,st)}catch{es(this,$o,du).call(this),globalThis.localStorage.setItem(te,st)}}}$o=new WeakSet,Ac=function(){const ee=Date.now();for(const[te,st]of es(this,$o,Ic).call(this)){const ot=es(this,$o,hu).call(this,st);(ot===null||ot<ee)&&globalThis.localStorage.removeItem(te)}},du=function(){for(const[ee]of es(this,$o,Ic).call(this))globalThis.localStorage.removeItem(ee)},Ic=function(){return Object.entries(globalThis.localStorage).filter(([ee])=>ee.startsWith(STORAGE_KEY_PREFIX))},hu=function(ee){let te;try{te=JSON.parse(ee)}catch{return null}return isObject$1(te)&&"expires"in te&&typeof te.expires=="number"?te.expires:null};var Wo,fu,Pc,Rc;class CookieStorage{constructor(){fo(this,Wo)}get(ee){if(!ee)return null;const te=es(this,Wo,fu).call(this,STORAGE_KEY_PREFIX+ee);return es(this,Wo,Pc).call(this,STORAGE_KEY_PREFIX+ee,"",es(this,Wo,Rc).call(this,-100)),te?JSON.parse(te):null}add(ee){es(this,Wo,Pc).call(this,STORAGE_KEY_PREFIX+ee.state,JSON.stringify(ee),es(this,Wo,Rc).call(this,60))}}Wo=new WeakSet,fu=function(ee){const te=ee+"=",st=document.cookie.split(";");for(let ot=0;ot<st.length;ot++){let ct=st[ot];for(;ct.charAt(0)===" ";)ct=ct.substring(1);if(ct.indexOf(te)===0)return ct.substring(te.length,ct.length)}return""},Pc=function(ee,te,st){const ot=ee+"="+te+"; expires="+st.toUTCString()+"; ";document.cookie=ot},Rc=function(ee){const te=new Date;return te.setTime(te.getTime()+ee*60*1e3),te};function bytesToBase64(ne){const ee=String.fromCodePoint(...ne);return btoa(ee)}async function sha256Digest(ne){const te=new TextEncoder().encode(ne);if(typeof crypto>"u"||typeof crypto.subtle>"u")throw new Error("Web Crypto API is not available.");return await crypto.subtle.digest("SHA-256",te)}function decodeToken(ne){const[,ee]=ne.split(".");if(typeof ee!="string")throw new Error("Unable to decode token, payload not found.");let te;try{te=base64UrlDecode(ee)}catch(st){throw new Error("Unable to decode token, payload is not a valid Base64URL value.",{cause:st})}try{return JSON.parse(te)}catch(st){throw new Error("Unable to decode token, payload is not a valid JSON value.",{cause:st})}}function base64UrlDecode(ne){let ee=ne.replaceAll("-","+").replaceAll("_","/");switch(ee.length%4){case 0:break;case 2:ee+="==";break;case 3:ee+="=";break;default:throw new Error("Input is not of the correct length.")}try{return b64DecodeUnicode(ee)}catch{return atob(ee)}}function b64DecodeUnicode(ne){return decodeURIComponent(atob(ne).replace(/(.)/g,(ee,te)=>{let st=te.charCodeAt(0).toString(16).toUpperCase();return st.length<2&&(st="0"+st),"%"+st}))}function isObject$1(ne){return typeof ne=="object"&&ne!==null}async function fetchJsonConfig(ne){return await fetchJSON(ne)}async function fetchOpenIdConfig(ne){return await fetchJSON(ne)}async function fetchAccessToken(ne,ee,te,st,ot){const ct=new URLSearchParams([["code",ee],["grant_type","authorization_code"],["client_id",te],["redirect_uri",st]]);return ot&&ct.append("code_verifier",ot),await fetchJSON(ne,{method:"POST",credentials:"include",body:ct})}async function fetchRefreshToken(ne,ee,te){const st=new URLSearchParams([["grant_type","refresh_token"],["refresh_token",ee],["client_id",te]]);return await fetchJSON(ne,{method:"POST",credentials:"include",body:st})}async function fetchJSON(ne,ee={}){const te=new Headers(ee.headers);return te.set("Accept",CONTENT_TYPE_JSON),await(await fetchWithErrorHandling(ne,{...ee,headers:te})).json()}async function fetchWithErrorHandling(ne,ee){const te=await fetch(ne,ee);if(!te.ok)throw new NetworkError("Server responded with an invali
59d status.",{response:te});return te}function buildAuthorizationHeader(ne){if(!ne)throw new Error("Unable to build authorization header, token is not set, make sure the user is authenticated.");return["Authorization",`bearer ${ne}`]}function stripTrailingSlash(ne){return ne.endsWith("/")?ne.slice(0,-1):ne}class NetworkError extends Error{constructor(te,st){super(te,st);Kn(this,"response");this.response=st.response}}const waitForTimeout=ne=>new Promise(ee=>setTimeout(ee,ne)),IAM_AUTH_MODE=window.__ENV__.IAM_AUTH_MODE,IAM_URL$1=window.__ENV__.IAM_URL,IAM_REALM$1=window.__ENV__.IAM_REALM,IAM_CHECK_SSO_CLIENT_ID$1=window.__ENV__.IAM_CHECK_SSO_CLIENT_ID||"cartes-gouv-public",KEYCLOAK_SILENT_SSO_BLOCKED_KEY="auth:keycloak-silent-sso-blocked";var _l,Xo,Cl;class ServiceBase{constructor(ee){fo(this,_l);fo(this,Xo);fo(this,Cl);return ee=ee||{},this.authenticated=ee.authenticated||!1,this.user=ee.user||{},this.documents=ee.documents||{},this.error=ee.error||{},this.mode=IAM_AUTH_MODE,this.url=encodeURI(location.origin+"/explorer-les-cartes"),this.api=null,uo(this,_l,null),uo(this,Xo,!1),uo(this,Cl,ee.emitter||null),this}getFetch(){return uo(this,Xo,!0),is(this,_l)}setFetch(ee){uo(this,_l,ee)}saveStore(){var ee=useServiceStore();ee.setService(this),uo(this,Xo,!1)}throwError(ee){throw uo(this,Xo,!1),ServiceError.from(ee)}isPending(){return is(this,Xo)}stopPending(){uo(this,Xo,!1)}getEmitter(){return is(this,Cl)}setEmitter(ee){uo(this,Cl,ee||null)}async checkKeycloakSession(ee){if(ee==="keycloak"){if(sessionStorage.getItem(KEYCLOAK_SILENT_SSO_BLOCKED_KEY)==="1")return!1;console.log("use checkKeycloakSessionAdapter keycloak");const st=new Keycloak({url:IAM_URL$1,realm:IAM_REALM$1,clientId:IAM_CHECK_SSO_CLIENT_ID$1});try{return await st.init({onLoad:"check-sso",flow:"standard",pkceMethod:"S256",checkLoginIframe:!1,silentCheckSsoFallback:!1,silentCheckSsoRedirectUri:this.url+"/silent-check-sso-keycloak.html"})}catch(ot){if(String((ot==null?void 0:ot.message)||ot||"").includes("3rd party check iframe message"))return sessionStorage.setItem(KEYCLOAK_SILENT_SSO_BLOCKED_KEY,"1"),console.warn("Silent SSO check skipped: browser blocks third-party storage/cookies (requestStorageAccess or iframe timeout)."),!1;throw ot}}else return console.log("use checkKeycloakSessionAdapter oauth2"),new Promise(te=>{te("checkKeycloakSessionAdapter oauth2 is not implemented yet !")})}async resolveAccessStatus(){this.saveStore(),Promise.resolve()}async getAccessLogin(){Promise.reject("this must be overridden !")}async getAccessLogout(){Promise.reject("this must be overridden !")}async getAccessToken(){Promise.reject("this must be overridden !")}isAuthenticatedLocally(){return!!this.authenticated}async validateAuthentication(){try{var ee=await this.getUserMe();return ee!==null}catch{return!1}}}_l=new WeakMap,Xo=new WeakMap,Cl=new WeakMap;const dangerousKeys=["__proto__","constructor","prototype"],safeAssign=(ne,ee)=>{new Map(Object.entries(ee)).forEach((st,ot)=>{!dangerousKeys.includes(ot)&&Object.prototype.hasOwnProperty.call(ee,ot)&&(ne[ot]=st)})};safeAssign(ServiceBase.prototype,Users);safeAssign(ServiceBase.prototype,Documents);const OAUTH_LOCAL_ENC_SALT="oauth-state-salt",OAUTH_LOCAL_ENC_PASSWORD="oauth-state-password";async function deriveEncryptionKey(){const ne=new TextEncoder,ee=await crypto.subtle.importKey("raw",ne.encode(OAUTH_LOCAL_ENC_PASSWORD),{name:"PBKDF2"},!1,["deriveKey"]);return crypto.subtle.deriveKey({name:"PBKDF2",salt:ne.encode(OAUTH_LOCAL_ENC_SALT),iterations:1e5,hash:"SHA-256"},ee,{name:"AES-GCM",length:256},!1,["encrypt","decrypt"])}async function encryptValue(ne){if(ne===null)return ne;const te=new TextEncoder().encode(ne),st=await deriveEncryptionKey(),ot=crypto.getRandomValues(new Uint8Array(12)),ct=await crypto.subtle.encrypt({name:"AES-GCM",iv:ot},st,te),ut=new Uint8Array(ot.byteLength+ct.byteLength);return ut.set(ot,0),ut.set(new Uint8Array(ct),ot.byteLength),btoa(String.fromCharCode.apply(null,ut))}async function decryptValue(ne){if(ne===null)return ne;const ee=atob(ne),te=new Uint8Array(ee.length);for(let ht=0;ht<ee.length;ht++)te[ht]=ee.charCodeAt(ht);const st=te.slice(0,12),ot=te.slice(12),ct=await deriveEncryptionKey(),ut=await crypto.subtle.decrypt({
59name:"AES-GCM",iv:st},ct,ot);return new TextDecoder().decode(ut)}let f$2=class extends Error{constructor(ee,te){super(ee),this.oauth2Code=te}},k$3=class extends f$2{constructor(ee,te,st,ot){super(ee,te),this.httpCode=st.status,this.response=st,this.parsedBody=ot}},g$1=class{constructor(ee){this.client=ee}async getAuthorizeUri(ee){const[te,st]=await Promise.all([ee.codeVerifier?y$4(ee.codeVerifier):void 0,this.client.getEndpoint("authorizationEndpoint")]),ot=new URLSearchParams({client_id:this.client.settings.clientId,response_type:"code",redirect_uri:ee.redirectUri});if(te&&(ot.set("code_challenge_method",te[0]),ot.set("code_challenge",te[1])),ee.state&&ot.set("state",ee.state),ee.scope&&ot.set("scope",ee.scope.join(" ")),ee.resource)for(const ct of[].concat(ee.resource))ot.append("resource",ct);if(ee.responseMode&&ee.responseMode!=="query"&&ot.append("response_mode",ee.responseMode),ee.extraParams)for(const[ct,ut]of Object.entries(ee.extraParams)){if(ot.has(ct))throw new Error(`Property in extraParams would overwrite standard property: ${ct}`);ot.set(ct,ut)}return st+"?"+ot.toString()}async getTokenFromCodeRedirect(ee,te){const{code:st}=this.validateResponse(ee,{state:te.state});return this.getToken({code:st,redirectUri:te.redirectUri,codeVerifier:te.codeVerifier})}validateResponse(ee,te){ee=new URL(ee);let st=ee.searchParams;if(!st.has("code")&&!st.has("error")&&ee.hash.length>0&&(st=new URLSearchParams(ee.hash.slice(1))),st.has("error"))throw new f$2(st.get("error_description")??"OAuth2 error",st.get("error"));if(!st.has("code"))throw new Error(`The url did not contain a code parameter ${ee}`);if(te.state&&te.state!==st.get("state"))throw new Error(`The "state" parameter in the url did not match the expected value of ${te.state}`);return{code:st.get("code"),scope:st.has("scope")?st.get("scope").split(" "):void 0}}async getToken(ee){const te={grant_type:"authorization_code",code:ee.code,redirect_uri:ee.redirectUri,code_verifier:ee.codeVerifier,resource:ee.resource};return this.client.tokenResponseToOAuth2Token(this.client.request("tokenEndpoint",te))}};async function A$2(){const ne=await p$3(),ee=new Uint8Array(32);return ne.getRandomValues(ee),w$3(ee)}async function y$4(ne){const ee=await p$3();return["S256",w$3(await ee.subtle.digest("SHA-256",_$3(ne)))]}async function p$3(){var ne;if(typeof window<"u"&&window.crypto){if(!((ne=window.crypto.subtle)!=null&&ne.digest))throw new Error("The context/environment is not secure, and does not support the 'crypto.subtle' module. See: https://developer.mozilla.org/en-US/docs/Web/API/Crypto/subtle for details");return window.crypto}return typeof self<"u"&&self.crypto?self.crypto:(await Promise.resolve().then(()=>T$2)).webcrypto}function _$3(ne){const ee=new Uint8Array(ne.length);for(let te=0;te<ne.length;te++)ee[te]=ne.charCodeAt(te)&255;return ee}function w$3(ne){return btoa(String.fromCharCode(...new Uint8Array(ne))).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}let E$3=class{constructor(ee){this.serverMetadata=null,ee!=null&&ee.fetch||(ee.fetch=fetch.bind(globalThis)),this.settings=ee}async refreshToken(ee,te){if(!ee.refreshToken)throw new Error("This token didn't have a refreshToken. It's not possible to refresh this");const st={grant_type:"refresh_token",refresh_token:ee.refreshToken};this.settings.clientSecret||(st.client_id=this.settings.clientId),te!=null&&te.scope&&(st.scope=te.scope.join(" ")),te!=null&&te.resource&&(st.resource=te.resource);const ot=await this.tokenResponseToOAuth2Token(this.request("tokenEndpoint",st));return!ot.refreshToken&&ee.refreshToken&&(ot.refreshToken=ee.refreshToken),ot}async clientCredentials(ee){var te;const st=["client_id","client_secret","grant_type","scope"];if(ee!=null&&ee.extraParams&&Object.keys(ee.extraParams).filter(ct=>st.includes(ct)).length>0)throw new Error(`The following extraParams are disallowed: '${st.join("', '")}'`);const ot={grant_type:"client_credentials",scope:(te=ee==null?void 0:ee.scope)==null?void 0:te.join(" "),resource:ee==null?void 0:ee.resource,...ee==null?void 0:ee.extraParams};if(!this.settings.clientSecret)throw new Error("A clientSecret must be provided to use client_credentials");return this.tokenResponseToOAuth2Token(this.request("tokenEndpoint",ot))}async password(ee){var te;const st={grant_type:"password",...ee,scope:(te=ee.scope)==null?void 0:te.join(" ")};return this.tokenResponseToOAuth2Token(this.request("tokenEndpoint",st))}get authorizationCode(){return new g$1(this)}async introspect(ee){const te={token:ee.accessToken,token_type_hint:"access_token"};return this.request("introspectionEndpoint",te)}async revoke(ee,te="access_token"){let st=ee.accessToken;te==="refresh_token"&&(st=ee.refreshToken);const ot={token:st,token_type_hint:te};return this.request("revocationEndpoint",ot)}async getEndpoint(ee){if(this.settings[ee]!==void 0)return h$2(this.settings[ee],this.settings.server);if(ee!=="discoveryEndpoint"&&(await this.discover(),this.settings[ee]!==void 0))return h$2(this.settings[ee],this.settings.server);if(!this.settings.server)throw new Error(`Could not determine the location of ${ee}. Either specify ${ee} in the settings, or the "server" endpoint to let the client discover it.`);switch(ee){case"authorizationEndpoint":return h$2("/authorize",this.settings.server);case"tokenEndpoint":return h$2("/token",this.settings.server);case"discoveryEndpoint":return h$2("/.well-known/oauth-authorization-server",this.settings.server);case"introspectionEndpoint":return h$2("/introspect",this.settings.server);case"revocationEndpoint":return h$2("/revoke",this.settings.server)}}discover(){return this.discoveryPromise===void 0&&(this.discoveryPromise=this.doDiscover()),this.discoveryPromise}async doDiscover(){var ee;let te;try{te=await this.getEndpoint("discoveryEndpoint")}catch{console.warn('[oauth2] OAuth2 discovery endpoint could not be determined. Either specify the "server" or "discoveryEndpoint');return}const st=await this.settings.fetch(te,{headers:{Accept:"application/json"}});if(!st.ok)return;if(!((ee=st.headers.get("Content-Type"))!=null&&ee.startsWith("application/json"))){console.warn("[oauth2] OAuth2 discovery endpoint was not a JSON response. Response is ignored");return}this.serverMetadata=await st.json();const ot=[["authorization_endpoint","authorizationEndpoint"],["token_endpoint","tokenEndpoint"],["introspection_endpoint","introspectionEndpoint"],["revocation_endpoint","revocationEndpoint"]];if(this.serverMetadata!==null){for(const[ct,ut]of ot)this.serverMetadata[ct]&&(this.settings[ut]=h$2(this.serverMetadata[ct],te));if(this.serverMetadata.token_endpoint_auth_methods_supported&&!this.settings.authenticationMethod){for(const ct of this.serverMetadata.token_endpoint_auth_methods_supported)if(ct==="client_secret_basic"||ct==="client_secret_post"){this.settings.authenticationMethod=ct;break}}}}async request(ee,te){const st=await this.getEndpoint(ee),ot={"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"};let ct=this.settings.authenticationMethod;switch(this.settings.clientSecret||(ct="client_secret_post"),ct||(ct="client_secret_basic_interop"),ct){case"client_secret_basic":ot.Authorization="Basic "+btoa(l$3(this.settings.clientId)+":"+l$3(this.settings.clientSecret));break;case"client_secret_basic_interop":ot.Authorization="Basic "+btoa(this.settings.clientId.replace(/:/g,"%3A")+":"+this.settings.clientSecret.replace(/:/g,"%3A"));break;case"client_secret_post":te.client_id=this.settings.clientId,this.settings.clientSecret&&(te.client_secret=this.settings.clientSecret);break;default:throw new Error("Authentication method not yet supported:"+ct+". Open a feature request if you want this!")}const ut=await this.settings.fetch(st,{method:"POST",body:v$2(te),headers:ot});let dt;if(ut.status!==204&&ut.headers.has("Content-Type")&&ut.headers.get("Content-Type").match(/^application\/(.*\+)?json/)&&(dt=await ut.json()),ut.ok)return dt;let ht,ft;throw dt!=null&&dt.error?(ht="OAuth2 error "+dt.error+".",dt.error_description&&(ht+=" "+dt.error_description),ft=dt.error):(ht="HTTP Error "+ut.status+" "+ut.statusText,ut.status===401&&this.settings.clientSecret&&(ht+=". It's likely that the clientId and/or clientSecret was incorrect"),ft=null),new k$3(ht,ft,ut,dt)}async tokenResponseToOAuth2Token(ee){const te=await ee;if(!(te!=null&&te.access_token))throw console.warn("Invalid OAuth2 Token Response: ",te),new TypeError("We received an invali
59d token response from an OAuth2 server.");const{access_token:st,refresh_token:ot,expires_in:ct,id_token:ut,scope:dt,token_type:ht,...ft}=te,pt={accessToken:st,expiresAt:ct?Date.now()+ct*1e3:null,refreshToken:ot??null};return ut&&(pt.idToken=ut),dt&&(pt.scope=dt.split(" ")),Object.keys(ft).length>0&&(pt.extraParams=ft),pt}};function h$2(ne,ee){return new URL(ne,ee).toString()}function v$2(ne){const ee=new URLSearchParams;for(const[te,st]of Object.entries(ne))if(Array.isArray(st))for(const ot of st)ee.append(te,ot);else st!==void 0&&ee.set(te,st.toString());return ee.toString()}function l$3(ne){return encodeURIComponent(ne).replace(/%20/g,"+").replace(/[-_.!~*'()]/g,ee=>`%${ee.charCodeAt(0).toString(16).toUpperCase()}`)}let b$4=class{constructor(ee){this.token=null,this.activeGetStoredToken=null,this.activeRefresh=null,this.refreshTimer=null,(ee==null?void 0:ee.scheduleRefresh)===void 0&&(ee.scheduleRefresh=!0),this.options=ee,ee.getStoredToken&&(this.activeGetStoredToken=(async()=>{this.token=await ee.getStoredToken(),this.activeGetStoredToken=null})()),this.scheduleRefresh()}async fetch(ee,te){const st=new Request(ee,te);return this.mw()(st,ot=>fetch(ot))}mw(){return async(ee,te)=>{const st=await this.getAccessToken();let ot=ee.clone();ot.headers.set("Authorization","Bearer "+st);let ct=await te(ot);if(!ct.ok&&ct.status===401){const ut=await this.refreshToken();ot=ee.clone(),ot.headers.set("Authorization","Bearer "+ut.accessToken),ct=await te(ot)}return ct}}async getToken(){return this.token&&(this.token.expiresAt===null||this.token.expiresAt>Date.now())?this.token:this.refreshToken()}async getAccessToken(){return await this.activeGetStoredToken,(await this.getToken()).accessToken}async refreshToken(){var ee,te;if(this.activeRefresh)return this.activeRefresh;const st=this.token;this.activeRefresh=(async()=>{var ot,ct;let ut=null;try{st!=null&&st.refreshToken&&(ut=await this.options.client.refreshToken(st))}catch{console.warn("[oauth2] refresh token not accepted, we'll try reauthenticating")}if(ut||(ut=await this.options.getNewToken()),!ut){const dt=new Error("Unable to obtain OAuth2 tokens, a full reauth may be needed");throw(ct=(ot=this.options).onError)==null||ct.call(ot,dt),dt}return ut})();try{const ot=await this.activeRefresh;return this.token=ot,(te=(ee=this.options).storeToken)==null||te.call(ee,ot),this.scheduleRefresh(),ot}catch(ot){throw this.options.onError&&this.options.onError(ot),ot}finally{this.activeRefresh=null}}scheduleRefresh(){var ee;if(!this.options.scheduleRefresh||(this.refreshTimer&&(clearTimeout(this.refreshTimer),this.refreshTimer=null),!((ee=this.token)!=null&&ee.expiresAt)||!this.token.refreshToken))return;const te=this.token.expiresAt-Date.now();te<120*1e3||(this.refreshTimer=setTimeout(async()=>{try{await this.refreshToken()}catch(st){console.error("[fetch-mw-oauth2] error while doing a background OAuth2 auto-refresh",st)}},te-60*1e3))}};const T$2=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),IAM_URL=window.__ENV__.IAM_URL,IAM_REALM=window.__ENV__.IAM_REALM,IAM_CLIENT_ID=window.__ENV__.IAM_CLIENT_ID,IAM_CLIENT_SECRET=window.__ENV__.IAM_CLIENT_SECRET,IAM_CHECK_SSO_TIMEOUT=window.__ENV__.IAM_CHECK_SSO_TIMEOUT||5e3,IAM_CHECK_SSO_CLIENT_ID=window.__ENV__.IAM_CHECK_SSO_CLIENT_ID||"cartes-gouv-public",IAM_ENTREPOT_API_URL=window.__ENV__.IAM_ENTREPOT_API_URL,SESSION_EXPIRED_SILENT_LOGOUT_DELAY_MS=720*60*1e3,OAUTH_PKCE_STORAGE_KEY="oauth2:pkce",OAUTH_STATE_STORAGE_KEY="oauth2:state",OAUTH_CALLBACK_URL_STORAGE_KEY="oauth2:callback-url";function buildLogoutRedirectUri(ne,ee){const te=new URL(ne);return te.searchParams.set("session_status",ee),encodeURIComponent(te.toString())}function buildOAuthState(){if(window.crypto&&window.crypto.getRandomValues){const ne=new Uint8Array(16);return window.crypto.getRandomValues(ne),Array.from(ne,ee=>ee.toString(16).padStart(2,"0")).join("")}return`${Date.now()}-${Math.random().toString(16).slice(2)}`}var Ro,ll,ul,pu,gu,mu;class ServiceLocal extends ServiceBase{constructor(te){super(te);fo(this,ul);fo(this,Ro);fo(this,ll);
59return this.session=te.session||"",this.codeVerifier=te.codeVerifier||"",this.code=te.code||"",this.token=te.token||"",this.error=te.error||{},uo(this,Ro,null),uo(this,ll,null),this.api=IAM_ENTREPOT_API_URL,es(this,ul,pu).call(this,te),this}async checkKeycloakSession(te){return te!=="keycloak"?es(this,ul,mu).call(this):super.checkKeycloakSession("keycloak")}async resolveAccessStatus(){const te=this.getEmitter?this.getEmitter():null,st=useServiceStore(),ot=new URLSearchParams(location.search),ct=ot.get("code"),ut=ot.get("session_state")||ot.get("session_status"),dt=ot.get("error"),ht=ot.get("from");let ft="no-auth";if(dt)throw this.error={name:dt,message:ot.get("error_description")},this.error;if(ct&&ut){this.session=ut,this.code=ct,this.authenticated=!0,ft="login";const pt=new URL(location.href),mt=ot.get("state");mt&&!pt.searchParams.get("state")&&pt.searchParams.set("state",mt);try{if(!await this.getAccessToken({callbackUrl:pt,state:mt,code:ct,session:ut}))throw new Error("Token unavailable");let vt;try{vt=await this.getUserMe()}catch(_t){throw new Error("Error to get user info ("+_t.message+")")}if(!vt)throw new Error("User profile unavailable from API");console.debug(vt),te&&te.dispatchEvent("service:user:loaded",{bubbles:!0,detail:vt});try{const _t=await this.getDocuments();te&&te.dispatchEvent("service:documents:loaded",{bubbles:!0,detail:_t})}catch(_t){throw new Error("Error to get documents ("+_t.message+")")}return st.setService(this),ft}catch(yt){throw this.authenticated=!1,new Error("Error to get token ("+yt.message+")")}}return!ct&&(ut!==null||ht==="logout")&&(this.session=null,this.co
59de=null,this.authenticated=!1,this.token=null,this.user={},this.documents={},this.error={},ft="logout"),ft!=="login"&&st.setService(this),ft}async getAccessLogin(){const te=this.url.includes("login")?this.url:this.url+"/login",st=await A$2(),ot=buildOAuthState();this.codeVerifier=st;const ct=await encryptValue(ot);sessionStorage.setItem(`${OAUTH_PKCE_STORAGE_KEY}:${ct}`,st),sessionStorage.setItem(OAUTH_STATE_STORAGE_KEY,ct),localStorage.setItem("codeVerifier",st);var ut=await is(this,Ro).authorizationCode.getAuthorizeUri({redirectUri:te,state:ot,codeVerifier:st,scope:["openid","profile","email"],extraParams:{approval_prompt:"auto"},responseMode:"query"});return ut}async getAccessLogout(){const te=this.url.includes("logout")?this.url:this.url+"/logout";var st=`${is(this,Ro).settings.server}/realms/${is(this,Ro).settings.index}/protocol/openid-connect/logout?
60      scope=openid%20profile%20email&
61      approval_prompt=auto&
62      response_type=code&
63      client_id=${is(this,Ro).settings.clientId}&
64      post_logout_redirect_uri=${buildLogoutRedirectUri(te,this.session)}`.replace(/ /g,"");return Promise.resolve(st)}async getAccessLogoutSilent(){const te=this.url.includes("logout")?this.url:this.url+"/logout";if(!this.token||!this.token.idToken)return Promise.reject(new Error("No ID token available for silent logout"));var st=`${is(this,Ro).settings.server}/realms/${is(this,Ro).settings.index}/protocol/openid-connect/logout?
65      id_token_hint=${this.token.idToken}&
66      client_id=${is(this,Ro).settings.clientId}&
67      post_logout_redirect_uri=${buildLogoutRedirectUri(te,this.session)}`.replace(/ /g,"");return Promise.resolve(st)}async getAccessToken(te={}){const{callbackUrl:st,state:ot,code:ct,session:ut}=te,dt=this.url.includes("login")?this.url:this.url+"/login";let ht=st?new URL(st.toString()):new URL(location.href);const ft=sessionStorage.getItem(OAUTH_CALLBACK_URL_STORAGE_KEY);if((!ct||!ht.searchParams.get("code"))&&ft)try{ht=new URL(ft)}catch{sessionStorage.removeItem(OAUTH_CALLBACK_URL_STORAGE_KEY)}const pt=ct||this.code||ht.searchParams.get("code"),mt=ut||this.session||ht.searchParams.get("session_state"),yt=ot||ht.searchParams.get("state");pt&&!ht.searchParams.get("code")&&ht.searchParams.set("code",pt),mt&&!ht.searchParams.get("session_state")&&ht.searchParams.set("session_state",mt),yt&&!ht.searchParams.get("state")&&ht.searchParams.set("state",yt);const _t=new URLSearchParams(ht.search).get("state"),bt=sessionStorage.getItem(OAUTH_STATE_STORAGE_KEY),xt=bt?await decryptValue(bt):null;if(_t&&xt&&_t!==xt)throw new Error("OAuth state mismatch");const Mt=_t||xt,Ot=Mt?sessionStorage.getItem(`${OAUTH_PKCE_STORAGE_KEY}:${Mt}`):null;var kt=this.codeVerifier||Ot||localStorage.getItem("codeVerifier");if(!kt)throw new Error("Missing PKCE code verifier");if(!ht.searchParams.get("code"))throw new Error("Missing authorization code in callback URL");var Nt=await is(this,Ro).authorizationCode.getTokenFromCodeRedirect(ht,{redirectUri:dt,state:Mt||void 0,codeVerifier:kt});this.token=Nt;const Gt=new Date(Nt.expiresAt);console.debug("expires token",Gt),is(this,ll).token=Nt,bt&&sessionStorage.removeItem(`${OAUTH_PKCE_STORAGE_KEY}:${bt}`),sessionStorage.removeItem(OAUTH_STATE_STORAGE_KEY),sessionStorage.removeItem(OAUTH_CALLBACK_URL_STORAGE_KEY),localStorage.removeItem("codeVerifier");var Bt=useServiceStore();return Bt.setService(this),this.token}isTokenExpiredForMoreThan12h(){if(!this.token||!this.token.expiresAt)return!0;const te=Number(this.token.expiresAt);return Number.isFinite(te)?Date.now()-te>=SESSION_EXPIRED_SILENT_LOGOUT_DELAY_MS:!1}}Ro=new WeakMap,ll=new WeakMap,ul=new WeakSet,pu=function(te){var st=te.client?te.client.settings:{server:`${IAM_URL}`,clientId:`${IAM_CLIENT_ID}`,clientSecret:`${IAM_CLIENT_SECRET}`,index:`${IAM_REALM}`,tokenEndpoint:`/realms/${IAM_REALM}/protocol/openid-connect/token`,authorizationEndpoint:`/realms/${IAM_REALM}/protocol/openid-connect/auth`,discoveryEndpoint:`/realms/${IAM_REALM}/.well-known/openid-configuration`,revocationEndpoint:`/realms/${IAM_REALM}/protocol/openid-connect/revoke`};uo(this,Ro,new E$3(st)),uo(this,ll,new b$4({client:is(this,Ro),scheduleRefresh:!0,getNewToken:async()=>
67{if(this.token&&Object.keys(this.token).length&&this.token.expiresAt>Date.now())return this.token;var ot=await is(this,Ro).authorizationCode.getToken({code:this.code,redirectUri:this.url,code_verifier:this.codeVerifier});return ot},storeToken:ot=>{this.token=ot},getStoredToken:()=>{const ot=es(this,ul,gu).call(this);return ot&&Object.keys(ot).length?ot:null},onError:ot=>{console.error(ot),this.error=ot}})),this.setFetch(is(this,ll).fetch.bind(is(this,ll)))},gu=function(){var te=JSON.parse(localStorage.getItem("service"));return te?te.connexion.token:null},mu=async function(){return console.log("use checkKeycloakSessionAdapter oauth"),new Promise(te=>{const st=document.createElement("iframe");st.style.display="none";const ot=new URL(is(this,Ro).settings.server+is(this,Ro).settings.authorizationEndpoint);ot.searchParams.set("client_id",IAM_CHECK_SSO_CLIENT_ID),ot.searchParams.set("redirect_uri",this.url+"/silent-check-sso-oauth.html"),ot.searchParams.set("response_type","code"),ot.searchParams.set("scope","openid"),ot.searchParams.set("prompt","none"),st.src=ot.toString(),document.body.appendChild(st);const ct=setTimeout(()=>{ut(),te(!1)},IAM_CHECK_SSO_TIMEOUT);function ut(){clearTimeout(ct),window.removeEventListener("message",dt),st.remove()}function dt(ht){ht.origin===window.location.origin&&(ut(),ht.data.code?te(!0):te(!1))}window.addEventListener("message",dt)})};const IAM_REDIRECT_REMOTE=window.__ENV__.IAM_REDIRECT_REMOTE,IAM_ENTREPOT_API_URL_REMOTE=window.__ENV__.IAM_ENTREPOT_API_URL_REMOTE;class ServiceRemote extends ServiceBase{constructor(ee){return super(ee),this.api=IAM_ENTREPOT_API_URL_REMOTE,this.setFetch(window.fetch),this}async resolveAccessStatus(){const ee=this.getEmitter?this.getEmitter():null;var te=useServiceStore();const st=location.href.includes("login");console.log("route login ?",st,location.href);const ot=location.search,ct=new URLSearchParams(ot);var ut=ct.get("authentication_failed"),dt=ct.get("success"),ht=null,ft="no-auth";if(st&&dt!==null)if(parseInt(dt,10)){this.authenticated=!0,ft="login";try{const pt=await this.getUserMe();if(!pt)throw new Error("User profile unavailable from API");console.debug(pt),ee&&ee.dispatchEvent("service:user:loaded",{bubbles:!0,detail:pt});const mt=await this.getDocuments();ee&&ee.dispatchEvent("service:documents:loaded",{bubbles:!0,detail:mt}),ht=Promise.resolve(ft)}catch(pt){console.error("Error:",pt),ht=Promise.reject("Error to get user info or documents ("+pt.message+")")}}else ht=Promise.reject("Erreur inattendue !");return!st&&dt!==null&&(this.authenticated=!1,this.user={},this.documents={},this.error={},ft="logout",ht=Promise.resolve(ft)),ut!==null&&(ht=Promise.reject("Erreur inattendue !")),te.setService(this),ht||Promise.resolve(ft)}async getAccessLogin(){return`${IAM_REDIRECT_REMOTE}/login?app=entree-carto`}async getAccessLogout(){return`${IAM_REDIRECT_REMOTE}/logout?app=entree-carto`}async getAccessToken(){}}const serviceFactotyCreate=ne=>{var ee=new ServiceBase(ne);const te=ne.mode||ee.mode;var st;switch(te){case"local":st=new ServiceLocal(ne);break;case"remote":st=new ServiceRemote(ne);break;default:st=ee;break}return st},servicesSymbol=Symbol("vue-services-plugin");class PluginServices{constructor(ee){console.debug("connexion",ee),this.instance=serviceFactotyCreate(ee)}install(ee){typeof this.instance.setEmitter=="function"&&this.instance.setEmitter(ee.config.globalProperties.$emitter||null),ee.provide(servicesSymbol,this),ee.config.globalProperties.$services=this,ee.provide("services",this.instance)}}function createServices(ne){return new PluginServices(ne)}function mitt(ne){return{all:ne=ne||new Map,on:function(ee,te){var st=ne.get(ee);st?st.push(te):ne.set(ee,[te])},off:function(ee,te){var st=ne.get(ee);st&&(te?st.splice(st.indexOf(te)>>>0,1):ne.set(ee,[]))},emit:function(ee,te){var st=ne.get(ee);st&&st.slice().map(function(ot){ot(te)}),(st=ne.get("*"))&&st.slice().map(function(ot){ot(ee,te)})}}}var EVENTS={isNotRegistered:ne=>!EVENTS.eventsName.includes(ne),eventsName:["test:clicked","service:changed","service:documents:loaded","service:documents:completed","service:user:loaded","document:saved","document:updated","document:deleted","document:exported","document:synchronized","document:shared","document:restore","leftmenu:close","modalreporting:open:clicked","catalog:open:clicked","drawing:open:clicked","drawing:close","layerimport:open:clicked","searchengineadvanced:geolocation:displayed","searchengineadvanced:geolocation:clicked","searchengineadvanced:feature:removed","reporting:open:clicked","vector:edit:clicked","mapbox:edit:clicked","service:edit:clicked","compute-route:edit:clicked","compute-isocurve:edit:clicked","compute-profil:edit:clicked","printmodal:open"]};const busEventSymbol=Symbol("vue-bus-event-plugin");class BusEvent{constructor(ee){return console.debug("bus",ee),this.emitter=mitt(),this}addEventListener(ee,te){EVENTS.isNotRegistered(ee)||(onMounted(()=>this.emitter.on(ee,te)),onUnmounted(()=>this.emitter.off(ee,te)))}removeEventLstener(ee,te){EVENTS.isNotRegistered(ee)||this.emitter.off(ee,te)}
67dispatchEvent(ee,te){if(EVENTS.isNotRegistered(ee)){console.error("L'évenement n'a pas été enregistré dans le registre !");return}console.debug("dispatchEvent",ee,this),this.emitter.emit(ee,te)}install(ee){ee.provide(busEventSymbol,this),ee.config.globalProperties.$emitter=this,ee.provide("emitter",this)}}function createBusEvent(ne){return new BusEvent(ne)}var __defProp=Object.defineProperty,__defProps=Object.defineProperties,__getOwnPropDescs=Object.getOwnPropertyDescriptors,__getOwnPropSymbols=Object.getOwnPropertySymbols,__hasOwnProp=Object.prototype.hasOwnProperty,__propIsEnum=Object.prototype.propertyIsEnumerable,__defNormalProp=(ne,ee,te)=>ee in ne?__defProp(ne,ee,{enumerable:!0,configurable:!0,writable:!0,value:te}):ne[ee]=te,__spreadValues=(ne,ee)=>{for(var te in ee||(ee={}))__hasOwnProp.call(ee,te)&&__defNormalProp(ne,te,ee[te]);if(__getOwnPropSymbols)for(var te of __getOwnPropSymbols(ee))__propIsEnum.call(ee,te)&&__defNormalProp(ne,te,ee[te]);return ne},__spreadProps=(ne,ee)=>__defProps(ne,__getOwnPropDescs(ee)),__objRest=(ne,ee)=>{var te={};for(var st in ne)__hasOwnProp.call(ne,st)&&ee.indexOf(st)<0&&(te[st]=ne[st]);if(ne!=null&&__getOwnPropSymbols)for(var st of __getOwnPropSymbols(ne))ee.indexOf(st)<0&&__propIsEnum.call(ne,st)&&(te[st]=ne[st]);return te};const CLASS_PREFIX="Notivue__",DEFAULT_DURATION=6e3,NotificationTypeKeys={SUCCESS:"success",ERROR:"error",WARNING:"warning",INFO:"info",PROMISE:"promise",PROMISE_RESOLVE:"promise-resolve",PROMISE_REJECT:"promise-reject"},success$1={title:"",message:"",duration:DEFAULT_DURATION,ariaLive:"polite",ariaRole:"status"},error$1=__spreadProps(__spreadValues({},success$1),{ariaLive:"assertive",ariaRole:"alert"}),promise=__spreadProps(__spreadValues({},success$1),{duration:1/0}),warning=__spreadProps(__spreadValues({},error$1),{ariaLive:"polite"}),info=__spreadValues({},success$1),DEFAULT_NOTIFICATION_OPTIONS={[NotificationTypeKeys.SUCCESS]:success$1,[NotificationTypeKeys.ERROR]:error$1,[NotificationTypeKeys.WARNING]:warning,[NotificationTypeKeys.INFO]:info,[NotificationTypeKeys.PROMISE]:promise,[NotificationTypeKeys.PROMISE_RESOLVE]:success$1,[NotificationTypeKeys.PROMISE_REJECT]:error$1},DEFAULT_CONFIG$1={pauseOnHover:!0,pauseOnTouch:!0,pauseOnTabChange:!0,enqueue:!1,position:"top-center",teleportTo:"body",notifications:DEFAULT_NOTIFICATION_OPTIONS,limit:1/0,avoidDuplicates:!1,transition:"transform 0.35s cubic-bezier(0.5, 1, 0.25, 1)",animations:{enter:CLASS_PREFIX+"enter",leave:CLASS_PREFIX+"leave",clearAll:CLASS_PREFIX+"clearAll"}},push$1=createPushMock();function setPush(ne){Object.assign(push$1,ne)}function createPush(ne){let ee=0;function te(st,ot,ct=`${ee++}`){return typeof unref(st)=="string"&&(st={message:st}),ne.push(__spreadProps(__spreadValues({},st),{id:ct,type:ot})),{id:ct,clear:()=>ne.clear(ct),destroy:()=>ne.clear(ct,{isDestroy:!0})}}return{success:st=>te(st,NotificationTypeKeys.SUCCESS),error:st=>te(st,NotificationTypeKeys.ERROR),warning:st=>te(st,NotificationTypeKeys.WARNING),info:st=>te(st,NotificationTypeKeys.INFO),promise:st=>{const{id:ot,clear:ct,destroy:ut}=te(st,NotificationTypeKeys.PROMISE);return{resolve:dt=>te(dt,NotificationTypeKeys.PROMISE_RESOLVE,ot),reject:dt=>te(dt,NotificationTypeKeys.PROMISE_REJECT,ot),success:dt=>te(dt,NotificationTypeKeys.PROMISE_RESOLVE,ot),error:dt=>te(dt,NotificationTypeKeys.PROMISE_REJECT,ot),clear:ct,destroy:ut}},load(st){return this.promise(st)},clearAll:()=>ne.clearAll(),destroyAll:()=>ne.destroyAll()}}function createPushMock(){const ne=new Proxy({},{get:()=>()=>{}});return createPush(ne)}const isSSR=typeof window>"u";function mergeDeep(ne,ee){const te=__spreadValues({},ne);for(const st in ee)ee.hasOwnProperty(st)&&(isPlainObject(ee[st])?te[st]=mergeDeep(ne[st],ee[st]):te[st]=ee[st]);return te}function mergeNotificationOptions(ne,ee){return ee.props||(ee.props={}),__spreadValues(__spreadValues(__spreadValues(__spreadValues({},ne[ee.type]),ne.global),ee),ee.type==="promise"?{duration:1/0}:{})}function isPlainObject(ne){if(Object.prototype.toString.call(ne)!=="[object Object]")return!1;const ee=Object.getPrototypeOf(ne);return ee===null||Object.getPrototypeOf(ee)===null}function createConfigRefs(ne,ee,te){const st=mergeDeep(ne,ee);function ot(ct){return customRef((ut,dt)=>({get(){return ut(),ct},set(ht){te.value&&(ct=ht,dt())}}))}for(const ct in st)st[ct]=ot(st[ct]);return st}function toRawConfig(ne){return Object.entries(ne).reduce((ee,[te,{value:st}])=>__spreadProps(__spreadValues({},ee),{[te]:toRaw(st)}),{})}const isStatic=ne=>ne===NotificationTypeKeys.SUCCESS||ne===NotificationTypeKeys.ERROR||ne===NotificationTypeKeys.WARNING||ne===NotificationTypeKeys.INFO,internalKeys=["timeout","resumedAt","remaining","animationAttrs","positionStyles"];function getSlotItem(ne){return Object.fromEntries(Object.entries(ne).filter(([ee])=>!internalKeys.includes(ee)))}function createStore$1(ne,ee){const te=createConfig(ne,ee),st=createQueue(),ot=createItems(te,st),ct=createElements(),ut=createAnimations(te,ot,st,ct),dt=createTimeouts(ot,ut);return{config:te,queue:st,items:ot,elements:ct,animations:ut,timeouts:dt}}function createConfig(ne,ee){const te=createConfigRefs(DEFAULT_CONFIG$1,ne,ee);function st(ot){if(ee.value){typeof ot=="function"&&(ot=ot(toRawConfig(te)));for(const ct in ot)typeof te[ct].value=="object"?te[ct].value=mergeDeep(te[ct].value,ot[ct]):te[ct].value=ot[ct]}}return __spreadProps(__spreadValues({},te),{update:st})}function createQueue(){return{entries:shallowRef([]),get length(){return this.entries.value.length},add(ne){this.entries.value.push(ne),this.triggerRef()},get(ne){return this.entries.value.find(ee=>ee.id===ne)},update(ne,ee){const te=this.get(ne);te&&Object.assign(te,ee)},remove(ne){this.entries.value=this.entries.value.filter(ee=>ee.id!==ne)},triggerRef(){triggerRef(this.entries)},clear(){this.entries.value=[]}}}function createItems(ne,ee){return{entries:shallowRef([]),get length(){return this.entries.value.length},lifecycleEventsCount:ref$1(0),addLifecycleEvent(){this.lifecycleEventsCount.value++},clearLifecycleEvents(){this.lifecycleEventsCount.value=0},add(te){this.entries.value.unshift(te),this.triggerRef(),this.addLifecycleEvent()},addFromQueue(){const te=__spreadProps(__spreadValues({},ee.entries.value[0]),{timeout:ee.entries.value[0].timeout(),createdAt:Date.now()});ee.remove(te.id),this.add(te)},findDupe(te){return this.entries.value.find(st=>unref(st.message).replace(/\uFEFF/g,"")===unref(te.message).replace(/\uFEFF/g,"")&&unref(st.title)===unref(te.title)&&st.type===te.type)},get(te){return this.entries.value.find(st=>st.id===te)},update(te,st){const ot=this.get(te);ot&&Object.assign(ot,st)},triggerRef(){triggerRef(this.entries)},updateAll(te){this.entries.value=this.entries.value.map(te)},remove(te){this.entries.value=this.entries.value.filter(ot=>ot.id!==te),ee.length>0&&this.length<ne.limit.value&&this.addFromQueue()},clear(){this.entries.value=[]}}}function createElements(){return{root:ref$1(null),rootAttrs:shallowRef({}),setRootAttrs(ne){this.rootAttrs.value=ne},items:ref$1([]),getSortedItems(){return this.items.value.sort((ne,ee)=>+ee.dataset.notivueItem-+ne.dataset.notivueItem)},containers:ref$1([])}}function createAnimations(ne,ee,te,st){return{isReducedMotion:ref$1(!1),setReducedMotion(ot){this.isReducedMotion.value=ot},playLeave(ot,{isDestroy:ct=!1,isUserTriggered:ut=!1}={}){const{leave:dt=""}=ne.animations.value,ht=ee.get(ot);window.clearTimeout(ht==null?void 0:ht.timeout);
67const ft=pt=>{var mt;pt&&pt.currentTarget!==pt.target||((mt=ht==null?void 0:ht[ut?"onManualClear":"onAutoClear"])==null||mt.call(ht,getSlotItem(ht)),ee.remove(ot))};if(!ht||!dt||ct||this.isReducedMotion.value)return ee.addLifecycleEvent(),ft();ee.update(ot,{positionStyles:__spreadProps(__spreadValues({},ht.positionStyles),{zIndex:-1}),animationAttrs:{class:dt,onAnimationend:ft}}),ee.addLifecycleEvent()},playClearAll(){ee.entries.value.forEach(ut=>window.clearTimeout(ut.timeout));const{clearAll:ot=""}=ne.animations.value,ct=()=>{te.clear(),ee.clear()};if(!ot||this.isReducedMotion.value)return ct();st.setRootAttrs({class:ot,onAnimationend:ct})},updatePositions({isImmediate:ot=!1}={}){const ct=this.isReducedMotion.value||ot,ut=ne.position.value.indexOf("top")===0,dt=ne.animations.value.leave;let ht=0;for(const ft of st.getSortedItems()){const pt=ft.dataset.notivueItem,mt=ee.get(pt);!ft||!mt||mt.animationAttrs.class===dt||(ee.update(pt,{positionStyles:{transform:`translate3d(0, ${ht}px, 0)`,transition:ct?"none":ne.transition.value}}),ht+=(ut?1:-1)*ft.clientHeight)}ee.triggerRef()}}}function createTimeouts(ne,ee){return{isStreamPaused:ref$1(!1),isStreamFocused:ref$1(!1),debounceTimeout:void 0,setStreamPause(te=!0){this.isStreamPaused.value=te},setStreamFocus(te=!0){this.isStreamFocused.value=te},clearDebounceTimeout(){window.clearTimeout(this.debounceTimeout)},reset(){this.clearDebounceTimeout(),this.setStreamPause(!1),this.setStreamFocus(!1)},create(te,st){if(!this.isStreamPaused.value&&Number.isFinite(st)&&st>0)return window.setTimeout(()=>ee.playLeave(te),st)},pause(){ne.length===0||this.isStreamPaused.value||(this.setStreamPause(),ne.updateAll(te=>{var st;if(window.clearTimeout(te.timeout),te.duration===1/0)return te;let ot=0;return te.remaining==null?ot=te.duration-(Date.now()-((st=te.resumedAt)!=null?st:te.createdAt)):ot=te.remaining-(Date.now()-te.resumedAt),__spreadProps(__spreadValues({},te),{remaining:ot})}))},resume(){ne.length===0||!this.isStreamPaused.value||(this.setStreamPause(!1),ne.updateAll(te=>{var st;return window.clearTimeout(te.timeout),te.duration===1/0?te:__spreadProps(__spreadValues({},te),{timeout:this.create(te.id,(st=te.remaining)!=null?st:te.duration),resumedAt:Date.now()})}))},resumeWithDebounce(te){this.debounceTimeout=window.setTimeout(()=>{this.resume()},te)}}}function createPushProxies({config:ne,items:ee,queue:te,animations:st,timeouts:ot}){return{destroyAll(){te.clear(),ee.clear()},clearAll(){st.playClearAll()},clear(ct,{isDestroy:ut=!1}={}){var dt;((dt=ee.entries.value[ee.entries.value.length-1])==null?void 0:dt.id)===ct&&ot.resume(),st.playLeave(ct,{isUserTriggered:!0,isDestroy:ut})},push(ct){const ut=mergeNotificationOptions(ne.notifications.value,ct),dt=Date.now();if(ne.avoidDuplicates.value&&isStatic(ut.type)){const ft=ee.findDupe(ut);ft&&(window.clearTimeout(ft.timeout),ee.update(ft.id,{createdAt:dt,duration:ut.duration,remaining:void 0,timeout:ot.create(ft.id,ut.duration),duplicateCount:ft.duplicateCount+1}),isRef(ft.message)?ft.message.value+="\uFEFF":ft.message+="\uFEFF",ee.triggerRef());const pt=ee.findDupe.call(te,ut);if(pt&&(te.update(pt.id,{duration:ut.duration,createdAt:dt,duplicateCount:pt.duplicateCount+1}),te.triggerRef()),pt||ft)return}const ht=()=>ot.create(ut.id,ut.duration);if(ct.type===NotificationTypeKeys.PROMISE_RESOLVE||ct.type===NotificationTypeKeys.PROMISE_REJECT)te.get(ut.id)?(te.update(ut.id,__spreadProps(__spreadValues({},ut),{createdAt:dt,timeout:ht})),te.triggerRef()):(ee.update(ut.id,__spreadProps(__spreadValues({},ut),{createdAt:dt,timeout:ht()})),ee.triggerRef());else{const ft=ne.enqueue.value,pt=ee.length>=ne.limit.value,mt=!ft&&pt,yt=ft&&!ct.skipQueue&&pt;
67mt&&ee.entries.value.slice(ne.limit.value-1).forEach(_t=>ot.create(_t.id,1));const vt=__spreadProps(__spreadValues({},ut),{createdAt:dt,duplicateCount:0,animationAttrs:{class:st.isReducedMotion.value?"":ne.animations.value.enter,onAnimationend(){vt.animationAttrs.class===ne.animations.value.enter&&ee.update(ut.id,{animationAttrs:{class:"",onAnimationend:()=>{}}})}},timeout:yt?ht:ht(),clear:()=>this.clear(ut.id),destroy:()=>this.clear(ut.id,{isDestroy:!0})});yt?te.add(vt):ee.add(vt)}}}}const notivueInstanceInjectionKey=Symbol(),notivueInjectionKey=Symbol();function createStoreWatchers(ne){return[watch(ne.items.lifecycleEventsCount,()=>{ne.animations.updatePositions()},{flush:"post"}),watch(ne.config.position,()=>{ne.animations.updatePositions({isImmediate:!0})},{flush:"post"}),watch(()=>ne.items.length===0&&ne.queue.length===0,ee=>{ee&&(ne.timeouts.reset(),ne.elements.setRootAttrs({}))},{flush:"post"})]}function createInstance(ne){const ee=ref$1(ne),te=readonly(ee);function st(ot,ct){const ut=()=>createStoreWatchers(ot);ne&&setPush(ct);let dt=ne?ut():[()=>{}];return{isRunning:te,startInstance(){ee.value||(setPush(ct),dt=ut(),ee.value=!0)},stopInstance(){ee.value&&(ot.items.clear(),ot.queue.clear(),ot.items.clearLifecycleEvents(),setPush(createPushMock()),dt.forEach(ft=>ft()),ee.value=!1)}}}return{isRunning:te,setupInstance:st}}function createProvides(ne,ee){const{setupInstance:te,isRunning:st}=createInstance(ne),ot=createStore$1(ee,st),ct=createPushProxies(ot),ut=Object.freeze(createPush(ct)),dt=te(ot,ut);return{store:ot,instance:dt,push:ut}}function createNotivue$1(ne={}){return{install(ee){var te;const st=ne,{startOnCreation:ot=!0}=st,ct=__objRest(st,["startOnCreation"]),{store:ut,instance:dt,push:ht}=createProvides(ot,ct);ee.provide(notivueInstanceInjectionKey,dt),ee.provide(notivueInjectionKey,ut),(te=ee.config.globalProperties).$push||(te.$push=ht)}}}function useStore(){return inject(notivueInjectionKey)}function useNotivueInstance(){return isSSR?{isRunning:ref$1(!0),startInstance:()=>{},stopInstance:()=>{}}:inject(notivueInstanceInjectionKey)}function useNotivue(){if(isSSR)return __spreadProps(__spreadValues({},toRefs(reactive(DEFAULT_CONFIG$1))),{update:()=>{},isTopAlign:computed(()=>!0),isStreamPaused:ref$1(!1)});const ne=useStore();return __spreadProps(__spreadValues({},ne.config),{isStreamPaused:readonly(ne.timeouts.isStreamPaused),isTopAlign:computed(()=>ne.config.position.value.indexOf("top")===0)})}const DEFAULT_PROPS$1={listAriaLabel:"Notifications"},NotivueClientOnly=defineComponent({setup(ne,{slots:ee,attrs:te}){const st=ref$1(!1);return onMounted(()=>st.value=!0),()=>{var ot;return st.value?(ot=ee.default)==null?void 0:ot.call(ee):createElementBlock("span",te,"")}}}),isMouse=ne=>ne.pointerType==="mouse";function getAriaLabel(ne){return`${ne.title?`${ne.title}: `:""}${ne.message}`}const _hoisted_1$a$1=["role","aria-live"],_sfc_main$g=defineComponent({__name:"AriaLive",props:{item:{}},setup(ne){const ee=ne,te={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",border:"0"};return(st,ot)=>(openBlock(),createElementBlock("div",{style:te,role:ee.item.ariaRole,"aria-live":ee.item.ariaLive,key:`${st.item.id}_${st.item.type}`,"aria-atomic":"true"},toDisplayString(unref(getAriaLabel)(ee.item)),9,_hoisted_1$a$1))}});function useMouseEvents(){const{timeouts:ne,config:ee}=useStore();function te(ot){isMouse(ot)&&ne.pause()}function st(ot){isMouse(ot)&&ne.resume()}return computed(()=>ee.pauseOnHover.value&&!ne.isStreamFocused.value?{onPointerenter:te,onPointerleave:st}:{})}function useTouchEvents(){const{timeouts:ne,config:ee}=useStore();function te(st){isMouse(st)||(ne.clearDebounceTimeout(),ne.pause(),ne.resumeWithDebounce(2e3))}return onBeforeUnmount(()=>{ne.clearDebounceTimeout()}),computed(()=>ee.pauseOnTouch.value&&!ne.isStreamFocused.value?{onPointerdown:te}:{})}const boxSizing={boxSizing:"border-box"},baseStyles={list:__spreadProps(__spreadValues({},boxSizing),{display:"flex",justifyContent:"center",listStyle:"none",margin:"0 auto",maxWidth:"var(--nv-root-width, 100%)",padding:"0",pointerEvents:"none",position:"fixed",zIndex:"var(--nv-z, 500)"}),listItem:__spreadProps(__spreadValues({},boxSizing),{display:"flex",margin:"0",position:"absolute",transitionProperty:"transform",width:"100%"}),itemContainer:__spreadProps(__spreadValues({},boxSizing),{maxWidth:"100%",padding:"0 0 var(--nv-gap, 0.75rem) 0",pointerEvents:"auto"})};function useNotivueStyles(){const{isTopAlign:ne,position:ee}=useNotivue(),te=computed(()=>{const ot=ne.value,ct=[`var(--nv-root-top, ${ot?"1.25rem":"0px"})`,"var(--nv-root-right, 1.25rem)",`var(--nv-root-bottom, ${ot?"0px":"1.25rem"})`,"var(--nv-root-left, 1.25rem)"],ut=ct.map(dt=>`calc(-1 * ${dt})`);return ot?ut.splice(2,1,"0px"):ut.splice(0,1,"0px"),{inset:ct.join(" "),clipPath:`inset(${ut.join(" ")})`}}),st=computed(()=>({[ne.value?"top":"bottom"]:"0",justifyContent:`var(--nv-root-x-align, ${ee.value.endsWith("left")?"flex-start":ee.value.endsWith("right")?"flex-end":"center"})`}));return computed(()=>({list:__spreadValues(__spreadValues({},baseStyles.list),te.value),listItem:__spreadValues(__spreadValues({},baseStyles.listItem),st.value),itemContainer:baseStyles.itemContainer}))}function useWindowSize(ne){function ee(){window.matchMedia("(max-width: 1100px)").matches&&ne()}onMounted(()=>{window.addEventListener("resize",ee)}),onBeforeUnmount(()=>{window.removeEventListener("resize",ee)})}function useResizeListObserver(ne,ee){let te;const st=new WeakSet;onMounted(()=>{te=new ResizeObserver((ot,ct)=>{for(const ut of ot)st.has(ut.target)?Object.values(ut.contentRect.toJSON()).every(dt=>dt===0)?(st.delete(ut.target),ct.unobserve(ut.target)):(ee(),st.delete(ut.target),ct.unobserve(ut.target)):st.add(ut.target)})}),watch(ne,ot=>{ot.length>0&&ot.forEach(ct=>te==null?void 0:te.observe(ct))},{flush:"post"}),onBeforeUnmount(()=>{te==null||te.disconnect()})}function useSizes(){const{elements:ne,animations:ee}=useStore();useWindowSize(()=>ee.updatePositions({isImmediate:!0})),useResizeListObserver(ne.items.value,()=>ee.updatePositions())}function useWindowFocus(){const{config:ne,timeouts:ee}=useStore();function te(){ee.isStreamFocused.value||ne.pauseOnTabChange.value&&ee.resume()}function st(){ee.isStreamFocused.value||ne.pauseOnTabChange.value&&ee.pause()}onMounted(()=>{window.addEventListener("focus",te),window.addEventListener("blur",st)}),onBeforeUnmount(()=>{window.removeEventListener("focus",te),window.removeEventListener("blur",st)})}function useReducedMotion(){const{animations:ne}=useStore(),ee=window.matchMedia("(prefers-reduced-motion: reduce)"),te=()=>ne.setReducedMotion(ee.matches);onMounted(()=>{var st;te(),(st=ee.addEventListener)==null||st.call(ee,"change",te)}),onBeforeUnmount(()=>{var st;(st=ee.removeEventListener)==null||st.call(ee,"change",te)})}const _hoisted_1$9$1=["data-notivue-align","aria-label"],_hoisted_2$9=["data-notivue-item","aria-setsize","aria-posinset"],_hoisted_3$6=["aria-label","tabindex","data-notivue-container"],_sfc_main$f$1=defineComponent({__name:"NotivueImpl",props:mergeDefaults({class:{},containersTabIndex:{},listAriaLabel:{},styles:{}},DEFAULT_PROPS$1),setup(ne){const ee=ne,{config:te,items:st,elements:ot}=useStore(),ct=useNotivueStyles(),ut=useMouseEvents(),dt=useTouchEvents();return useReducedMotion(),useWindowFocus(),useSizes(),(ht,ft)=>{var pt;return openBlock(),createBlock(Teleport,{to:unref(te).teleportTo.value===!1?void 0:unref(te).teleportTo.value,disabled:unref(te).teleportTo.value===!1},[unref(st).entries.value.length>0?(openBlock(),createElementBlock("ol",mergeProps({key:0},__spreadValues(__spreadValues(__spreadValues({},unref(ut)),unref(dt)),unref(ot).rootAttrs.value),{"data-notivue-align":unref(te).position.value.split("-")[0],"aria-label":ee.listAriaLabel,ref:unref(ot).root,class:ee.class,style:__spreadValues(__spreadValues({},unref(ct).list),(pt=ee.styles)==null?void 0:pt.list)}),[(openBlock(!0),createElementBlock(Fragment,null,renderList(unref(st).entries.value,(mt,yt)=>{var vt,_t,bt,xt;return openBlock(),createElementBlock("li",{tabindex:"-1",key:mt.id,"data-notivue-item":mt.id,"aria-setsize":unref(st).length,"aria-posinset":yt+1,ref_for:!0,ref:unref(ot).items,style:normalizeStyle(__spreadValues(__spreadValues(__spreadValues({},unref(ct).listItem),mt.positionStyles),(vt=ee.styles)==null?void 0:vt.listItem))},[mt.ariaLiveOnly?(openBlock(),createBlock(_sfc_main$g,{key:0,item:mt},null,8,["item"])):(openBlock(),createElementBlock("div",mergeProps({key:1,ref_for:!0},mt.animationAttrs,{"aria-label":unref(getAriaLabel)(mt),tabindex:(bt=(_t=ht.containersTabIndex)==null?void 0:_t[mt.id])!=null?bt:-1,"data-notivue-container":mt.id,ref_for:!0,ref:unref(ot).containers,style:__spreadValues(__spreadValues({},unref(ct).itemContainer),(xt=ee.styles)==null?void 0:xt.itemContainer)}),[renderSlot(ht.$slots,"default",mergeProps({ref_for:!0},unref(getSlotItem)(mt)))],16,_hoisted_3$6))],12,_hoisted_2$9)}),128))],16,_hoisted_1$9$1)):createCommentVNode("",!0)],8,["to","disabled"])}}}),_sfc_main$e$1=defineComponent({__name:"Notivue",props:mergeDefaults({class:{},containersTabIndex:{},listAriaLabel:{},styles:{}},DEFAULT_PROPS$1),setup(ne){const ee=ne,{isRunning:te}=useNotivueInstance();return(st,ot)=>(openBlock(),createBlock(unref(NotivueClientOnly),null,{default:withCtx(()=>[unref(te)?(openBlock(),createBlock(_sfc_main$f$1,normalizeProps(mergeProps({key:0},ee)),{default:withCtx(ct=>[renderSlot(st.$slots,"default",normalizeProps(guardReactiveProps(ct)))]),_:3},16)):createCommentVNode("",!0)]),_:3}))}}),_hoisted_1$8$1=createBaseVNode("path",{d:"M6,-0c-3.308,-0 -6,2.692 -6,6c-0,3.308 2.692,6 6,6c3.308,-0 6,-2.692 6,-6c-0,-3.308 -2.692,-6 -6,-6Zm3.123,3.989l-3.877,4.616c-0.086,0.102 -0.213,0.162 -0.346,0.164l-0.008,0c-0.131,0 -0.256,-0.055 -0.343,-0.153l-1.662,-1.846c-0.081,-0.085 -0.126,-0.199 -0.126,-0.316c0,-0.254 0.209,-0.462 0.462,-0.462c0.135,0 0.263,0.059 0.35,0.161l1.307,1.451l3.536,-4.209c0.087,-0.101 0.215,-0.
67159 0.349,-0.159c0.253,-0 0.461,0.208 0.461,0.461c0,0.107 -0.036,0.21 -0.103,0.292Z"},null,-1),_hoisted_2$8=[_hoisted_1$8$1],_sfc_main$9$1=defineComponent({__name:"SuccessIcon",setup(ne){return(ee,te)=>(openBlock(),createElementBlock("svg",normalizeProps(guardReactiveProps(unref(ionProps))),_hoisted_2$8,16))}}),_hoisted_1$7$1=createBaseVNode("path",{d:"M6,-0c-3.308,-0 -6,2.692 -6,6c-0,3.308 2.692,6 6,6c3.308,-0 6,-2.692 6,-6c-0,-3.308 -2.692,-6 -6,-6Zm-0,9.228c-0.316,0 -0.577,-0.26 -0.577,-0.577c0,-0.316 0.261,-0.577 0.577,-0.577c0.316,0 0.577,0.261 0.577,0.577c-0,0.317 -0.261,0.577 -0.577,0.577Zm0.627,-5.802l-0.166,3.519c-0,0.253 -0.208,0.462 -0.462,0.462c-0.253,-0 -0.461,-0.209 -0.461,-0.462l-0.166,-3.518l0,-0.001c-0,-0.009 -0,-0.018 -0,-0.027c-0,-0.344 0.283,-0.627 0.627,-0.627c0.344,0 0.627,0.283 0.627,0.627c-0,0.009 -0,0.018 -0.001,0.027l0.002,-0Z"},null,-1),_hoisted_2$7=[_hoisted_1$7$1],_sfc_main$8$1=defineComponent({__name:"ErrorIcon",setup(ne){return(ee,te)=>(openBlock(),createElementBlock("svg",normalizeProps(guardReactiveProps(unref(ionProps))),_hoisted_2$7,16))}}),_hoisted_1$6$1=createBaseVNode("path",{d:"M6,0c-3.308,0 -6,2.692 -6,6c0,3.308 2.692,6 6,6c3.308,0 6,-2.692 6,-6c0,-3.308 -2.692,-6 -6,-6Zm0,2.46c0.428,0 0.78,0.352 0.78,0.78c-0,0.428 -0.352,0.78 -0.78,0.78c-0.428,0 -0.78,-0.352 -0.78,-0.78c0,-0.428 0.352,-0.78 0.78,-0.78Zm1.44,6.78l-2.64,0c-0.263,0 -0.48,-0.217 -0.48,-0.48c0,-0.263 0.217,-0.48 0.48,-0.48l0.84,0l0,-2.64l-0.48,0c-0.263,0 -0.48,-0.217 -0.48,-0.48c0,-0.263 0.217,-0.48 0.48,-0.48l0.96,0c0.263,0 0.48,0.217 0.48,0.48l0,3.12l0.84,0c0.263,0 0.48,0.217 0.48,0.48c0,0.263 -0.217,0.48 -0.48,0.48Z"},null,-1),_hoisted_2$6=[_hoisted_1$6$1],_sfc_main$7$1=defineComponent({__name:"InfoIcon",setup(ne){return(ee,te)=>(openBlock(),createElementBlock("svg",normalizeProps(guardReactiveProps(unref(ionProps))),_hoisted_2$6,16))}}),_hoisted_1$5$1=createBaseVNode("path",{d:"M11.963,6.037c-0,3.292 -2.671,5.963 -5.963,5.963c-3.292,0 -5.963,-2.671 -5.963,-5.963c0,-3.292 2.671,-5.962 5.963,-5.962c3.292,-0 5.963,2.67 5.963,5.962Zm-0.918,0c0,-2.785 -2.26,-5.045 -5.045,-5.045c-2.785,0 -5.045,2.26 -5.045,5.045c-0,2.786 2.26,5.046 5.045,5.046c2.785,-0 5.045,-2.26 5.045,-5.046Z"},null,-1),_hoisted_2$5$1=createBaseVNode("path",{d:"M8.401,3.449c0.163,-0.194 0.452,-0.219 0.646,-0.056c0.194,0.163 0.219,0.452 0.056,0.646l-3.853,4.587c-0.085,0.101 -0.21,0.161 -0.343,0.163c-0.133,0.003 -0.26,-0.053 -0.349,-0.151l-1.651,-1.835c-0.169,-0.188 -0.154,-0.479 0.034,-0.648c0.188,-0.169 0.479,-0.154 0.648,0.034l1.298,1.443l3.514,-4.183Z"},null,-1),_hoisted_3$5=[_hoisted_1$5$1,_hoisted_2$5$1],_sfc_main$6$1=defineComponent({__name:"SuccessOutlineIcon",setup(ne){return(ee,te)=>(openBlock(),createElementBlock("svg",normalizeProps(guardReactiveProps(unref(ionProps))),_hoisted_3$5,16))}}),_hoisted_1$4$1=createBaseVNode("path",{d:"M12, 6c0, 3.313 -2.687, 6 -6, 6c-3.313,-0 -6,-2.688 -6,-6c0,-3.313 2.688,-6 6,-6c3.313,-0 6,2.687 6,6Zm-0.923,-0c-0,-2.803 -2.274,-5.077 -5.077,-5.077c-2.803,0 -5.077,2.274 -5.077,5.077c0,2.803 2.274,5.077 5.077,5.077c2.803,-0 5.077,-2.274 5.077,-5.077Z"},null,-1),_hoisted_2$4$1=createBaseVNode("path",{d:"M5.373,3.426c-0,-0.009 -0,-0.019 -0,-0.028c-0,-0.342 0.279,-0.624 0.621,-0.627c0.002,-0 0.004,-0 0.006,-0c0.344,-0 0.627,0.283 0.627,0.627c-0,0.009 -0,0.019 -0.001,0.028l0,0.001l-0.165,3.518c-0.012,0.246 -0.215,0.44 -0.461,0.44c-0.246,-0 -0.449,-0.194 -0.461,-0.44l-0.166,-3.518l0,-0.001Z"},null,-1),_hoisted_3$4=createBaseVNode("path",{d:"M6,9.228c-0.316,0 -0.577,-0.26 -0.577,-0.577c0,-0.316 0.261,-0.577 0.577,-0.577c0.316,0 0.577,0.261 0.577,0.577c-0,0.317 -0.261,0.577 -0.577,0.577Z"},null,-1),_hoisted_4$2=[_hoisted_1$4$1,_hoisted_2$4$1,_hoisted_3$4],_sfc_main$5$1=defineComponent({__name:"ErrorOutlineIcon",setup(ne){return(ee,te)=>(openBlock(),createElementBlock("svg",normalizeProps(guardReactiveProps(unref(ionProps))),_hoisted_4$2,16))}}),_hoisted_1$3$1=createBaseVNode("path",{d:"M6, 0c3.313, 0 6, 2.687 6, 6c-0, 3.313 -2.687, 6 -6, 6c-3.313,-0 -6,-2.687 -6,-6c0,-3.313 2.687,-6 6,-6Zm0, 0.96c-2.783, 0 -5.04, 2.257 -5.04, 5.04c0, 2.783 2.257, 5.04 5.04, 5.04c2.783, 0 5.04,-2.257 5.04,-5.04c-0,-2.783 -2.257,-5.04 -5.04,-5.04Z"},null,-1),_hoisted_2$3$1=createBaseVNode("path",{d:"M6.6, 8.28l0.84, 0c0.265, 0 0.48, 0.215 0.48, 0.48c-0, 0.265 -0.215, 0.48 -0.48, 0.48l-2.64,-0c-0.265, 0 -0.48,-0.215 -0.48,-0.48c-0,-0.265 0.215,-0.48 0.48,-0.48l0.84, 0l-0,-2.64l-0.48, 0c-0.265, 0 -0.48,-0.215 -0.48,-0.48c-0,-0.265 0.215,-0.48 0.48,-0.48l0.96, 0c0.265, 0 0.48, 0.215 0.48, 0.48l-0, 3.12Z"},null,-1),_hoisted_3$3=createBaseVNode("path",{d:"M6, 2.46c-0.428, 0 -0.78, 0.352 -0.78, 0.78c-0, 0.428 0.352, 0.78 0.78, 0.78c0.428, 0 0.78,-0.352 0.78,-0.78c-0,-0.428 -0.352,-0.78 -0.78,-0.78Z"},null,-1),_hoisted_4$1$1=[_hoisted_1$3$1,_hoisted_2$3$1,_hoisted_3$3],_sfc_main$4$1=defineComponent({__name:"InfoOutlineIcon",setup(ne){return(ee,te)=>(openBlock(),createElementBlock("svg",normalizeProps(guardReactiveProps(unref(ionProps))),_hoisted_4$1$1,16))}}),_hoisted_1$2$1=createBaseVNode("path",{d:"M12,1A11,11,0,1,0,23,12,11,11,0,0,0,12,1Zm0,19a8,8,0,1,1,8-8A8,8,0,0,1,12,20Z",opacity:".25"},null,-1),_hoisted_2$2$1=createBaseVNode("path",{d:"M10.14,1.16a11,11,0,0,0-9,8.92A1.59,1.59,0,0,0,2.46,12,1.52,1.52,0,0,0,4.11,10.7a8,8,0,0,1,6.66-6.61A1.42,1.42,0,0,0,12,2.69h0A1.57,1.57,0,0,0,10.14,1.16Z",class:"Notivue__spinner"},null,-1),_hoisted_3$2$1=[_hoisted_1$2$1,_hoisted_2$2$1],_sfc_main$3$1=defineComponent({__name:"PromiseIcon",setup(ne){return(ee,te)=>(openBlock(),createElementBlock("svg",normalizeProps(guardReactiveProps(__spreadProps(__spreadValues({},unref(svgProps)),{width:28,height:28,fill:"currentColor"}))),_hoisted_3$2$1,16))}}),_hoisted_1$1$1=createBaseVNode("line",{x1:"18",y1:"6",x2:"6",y2:"18"},null,-1),_hoisted_2$1$1=createBaseVNode("line",{x1:"6",y1:"6",x2:"18",y2:"18"},null,-1),_hoisted_3$1$1=[_hoisted_1$1$1,_hoisted_2$1$1],_sfc_main$2$1=defineComponent({__name:"CloseIcon",setup(ne){return(ee,te)=>(openBlock(),createElementBlock("svg",normalizeProps(guardReactiveProps(unref(featherProps))),_hoisted_3$1$1,16))}}),svgProps={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24","aria-hidden":"true"},ionProps=__spreadProps(__spreadValues({},svgProps),{fill:"currentColor",viewBox:"0 0 12 12"}),featherProps=__spreadProps(__spreadValues({},svgProps),{stroke:"currentColor","stroke-width":2,"stroke-linecap":"round","stroke-linejoin":"round"}),filledIcons={[NotificationTypeKeys.SUCCESS]:markRaw(_sfc_main$9$1),[NotificationTypeKeys.ERROR]:markRaw(_sfc_main$8$1),[NotificationTypeKeys.INFO]:markRaw(_sfc_main$7$1),[NotificationTypeKeys.WARNING]:markRaw(_sfc_main$8$1),[NotificationTypeKeys.PROMISE]:markRaw(_sfc_main$3$1),[NotificationTypeKeys.PROMISE_RESOLVE]:markRaw(_sfc_main$9$1),[NotificationTypeKeys.PROMISE_REJECT]:markRaw(_sfc_main$8$1),close:markRaw(_sfc_main$2$1)};NotificationTypeKeys.SUCCESS+"",markRaw(_sfc_main$6$1),NotificationTypeKeys.ERROR+"",markRaw(_sfc_main$5$1),NotificationTypeKeys.INFO+"",markRaw(_sfc_main$4$1),NotificationTypeKeys.WARNING+"",markRaw(_sfc_main$5$1),NotificationTypeKeys.PROMISE+"",markRaw(_sfc_main$3$1),NotificationTypeKeys.PROMISE_RESOLVE+"",markRaw(_sfc_main$6$1),NotificationTypeKeys.PROMISE_REJECT+"",markRaw(_sfc_main$5$1),markRaw(_sfc_main$2$1);const layout={"--nv-width":"350px","--nv-spacing":"0.625rem","--nv-radius":"0.625rem","--nv-icon-size":"1.25rem","--nv-title-size":"0.925rem","--nv-message-size":"0.925rem","--nv-y-align":"center"}
67,shadow={"--nv-shadow":"rgba(0, 0, 0, 0.06) 0px 4px 6px -1px, rgba(0, 0, 0, 0.03) 0px 2px 4px -1px"},lightTheme=__spreadProps(__spreadValues(__spreadValues({},layout),shadow),{"--nv-global-bg":"#FFF","--nv-global-fg":"#171717","--nv-success-accent":"#28B780","--nv-error-accent":"#E74C3C","--nv-warning-accent":"#F59E0B","--nv-info-accent":"#3E8EFF","--nv-promise-accent":"#171717"});__spreadProps(__spreadValues(__spreadValues({},layout),shadow),{"--nv-success-bg":"#E9FAEF","--nv-success-accent":"#059669","--nv-success-fg":"#057452","--nv-error-bg":"#FEEFEF","--nv-error-accent":"#E6523C","--nv-error-fg":"#C5412C","--nv-warning-bg":"#FFF0D8","--nv-warning-accent":"#F48533","--nv-warning-fg":"#81471D","--nv-info-bg":"#DEF0FA","--nv-info-accent":"#1F70AC","--nv-info-fg":"#1F70AC","--nv-promise-bg":"#FFF","--nv-promise-accent":"#334155","--nv-promise-fg":"#334155"});__spreadProps(__spreadValues(__spreadValues({},layout),shadow),{"--nv-global-accent":"#FFF","--nv-global-fg":"#FFF","--nv-success-bg":"#178570","--nv-error-bg":"#C94430","--nv-info-bg":"#117AAE","--nv-warning-bg":"#FFE556","--nv-warning-fg":"#4F5358","--nv-warning-accent":"#4F5358","--nv-promise-bg":"#FFF","--nv-promise-fg":"#334155","--nv-promise-accent":"#64748B"});const darkTheme=__spreadProps(__spreadValues({},layout),{"--nv-border-width":"1px","--nv-global-bg":"#1F1F1F","--nv-global-border":"#414141","--nv-global-fg":"#D0D0D0","--nv-success-accent":"#8EF997","--nv-error-accent":"#FF7777","--nv-warning-accent":"#FFE554","--nv-info-accent":"#5FD4FF","--nv-promise-accent":"#D0D0D0"});__spreadProps(__spreadValues({},layout),{"--nv-border-width":"1px","--nv-global-bg":"#20252E","--nv-global-border":"#353b45","--nv-global-fg":"#dfdfdf","--nv-success-accent":"#34D399","--nv-error-accent":"#FF7777","--nv-warning-accent":"#FFE554","--nv-info-accent":"#5FD4FF","--nv-promise-accent":"#D0D0D0"});const Classes={NOTIFICATION:CLASS_PREFIX+"notification",ICON:CLASS_PREFIX+"icon",CONTENT:CLASS_PREFIX+"content",TITLE:CLASS_PREFIX+"content-title",MESSAGE:CLASS_PREFIX+"content-message",CLOSE:CLASS_PREFIX+"close",CLOSE_ICON:CLASS_PREFIX+"close-icon",TRANSITION:CLASS_PREFIX+"transition",PROGRESS:CLASS_PREFIX+"progress",DUPLICATE:CLASS_PREFIX+"duplicate"},DEFAULT_NOTIFICATIONS_PROPS={icons:()=>filledIcons,theme:()=>lightTheme,hideClose:!1,closeAriaLabel:"Close"},_hoisted_1$d=["data-notivue","data-notivue-has-title"],_hoisted_2$a=["aria-live","role"],_hoisted_3$7=["textContent"],_hoisted_4$3=["textContent"],_hoisted_5$2=["aria-label"],_hoisted_6$1=["textContent"],_sfc_main$1$1=defineComponent({__name:"Notification",props:mergeDefaults({item:{},icons:{},theme:{},closeAriaLabel:{},hideClose:{type:Boolean}},DEFAULT_NOTIFICATIONS_PROPS),setup(ne){const ee=ne,te=shallowRef(ee.icons[ee.item.type]),st=ee.icons.close;return watch(()=>ee.item.type,ot=>te.value=ee.icons[ot],{flush:"sync"}),(ot,ct)=>(openBlock(),createElementBlock("div",{class:normalizeClass([unref(Classes).NOTIFICATION,{[unref(Classes).DUPLICATE]:ot.item.duplicateCount>0}]),key:ot.item.duplicateCount,"data-notivue":ot.item.type,"data-notivue-has-title":!!ot.item.title,style:normalizeStyle(ot.theme)},[te.value?(openBlock(),createElementBlock(Fragment,{key:0},[typeof te.value=="object"?(openBlock(),createBlock(Transition,{key:0,name:unref(Classes).TRANSITION,mode:"out-in"},{default:withCtx(()=>[typeof te.value=="object"?(openBlock(),createBlock(resolveDynamicComponent(te.value),{key:0,class:normalizeClass(unref(Classes).ICON),"aria-hidden":"true"},null,8,["class"])):createCommentVNode("",!0)]),_:1},8,["name"])):typeof te.value=="string"?(openBlock(),createElementBlock("div",{key:1,class:normalizeClass(unref(Classes).ICON),"aria-hidden":"true"},toDisplayString(te.value),3)):createCommentVNode("",!0)],64)):createCommentVNode("",!0),createBaseVNode("div",{class:normalizeClass(unref(Classes).CONTENT),"aria-live":ot.item.ariaLive,role:ot.item.ariaRole,"aria-atomic":"true"},[ot.item.title?(openBlock(),createElementBlock("h3",{key:0,class:normalizeClass(unref(Classes).TITLE),textContent:toDisplayString(unref(ot.item.title))},null,10,_hoisted_3$7)):createCommentVNode("",!0),createBaseVNode("p",{class:normalizeClass(unref(Classes).MESSAGE),textContent:toDisplayString(unref(ot.item.message))},null,10,_hoisted_4$3)],10,_hoisted_2$a),!ee.hideClose&&unref(st)&&ot.item.type!=="promise"?(openBlock(),createElementBlock("button",{key:1,class:normalizeClass(unref(Classes).CLOSE),"aria-label":ot.closeAriaLabel,type:"button",tabindex:"-1",onClick:ct[0]||(ct[0]=(...ut)=>ot.item.clear&&ot.item.clear(...ut))},[typeof unref(st)=="object"?(openBlock(),createBlock(resolveDynamicComponent(unref(st)),{key:0,class:normalizeClass(unref(Classes).CLOSE_ICON)}
67,null,8,["class"])):typeof unref(st)=="string"?(openBlock(),createElementBlock("div",{key:1,"aria-hidden":"true",textContent:toDisplayString(unref(st))},null,8,_hoisted_6$1)):createCommentVNode("",!0)],10,_hoisted_5$2)):createCommentVNode("",!0),renderSlot(ot.$slots,"default")],14,_hoisted_1$d))}});function getState(ne){if(ne)try{return JSON.parse(ne)}catch(ee){console.warn(ee,"unknown json format!")}}function createStore(ne,ee){const{storage:te,encrypt:st,decrypt:ot}=ee,ct=te.getItem(ne.$id);if(ct){const dt=getState(ot?ot(ct):ct);dt&&(ne.$state=dt)}else{const dt=JSON.stringify(ne.$state);te.setItem(ne.$id,st?st(dt):dt)}const ut=(dt,ht)=>{const ft=JSON.stringify(ht);te.setItem(ne.$id,st?st(ft):ft)};ne.$subscribe(ut,{detached:!0,deep:!0,immediate:!0})}function storePlugin(ne){return ee=>{const te={...ne},{store:st}=ee,{stores:ot,encrypt:ct,decrypt:ut}=te;ot&&ot.length>0&&ot.forEach(dt=>{if(typeof dt=="string"){if(dt===st.$id){const ht=te.storage??localStorage;createStore(st,{storage:ht,encrypt:ct,decrypt:ut})}}else if(dt.name===st.$id){const{storage:ht,ciphertext:ft}=dt;createStore(st,{storage:ht||(te.storage?te.storage:localStorage),encrypt:ft===!1?void 0:ct,decrypt:ft===!1?void 0:ut})}})}}const _export_sfc=(ne,ee)=>{const te=ne.__vccOpts||ne;for(const[st,ot]of ee)te[st]=ot;return te},_sfc_main$f={},_hoisted_1$c={viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",class:"Notivue__info-icon"};function _sfc_render$4(ne,ee){return openBlock(),createElementBlock("svg",_hoisted_1$c,[...ee[0]||(ee[0]=[createBaseVNode("path",{fill:"currentColor",d:"M19.5,2.5h-15c-1.1,0-2,0.9-2,2v15c0,1.1,0.9,2,2,2h15c1.1,0,2-0.9,2-2v-15C21.5,3.4,20.6,2.5,19.5,2.5z M13,17h-2v-6h2V17z M13,9h-2V7h2V9z"},null,-1)])])}const NotificationInfo=_export_sfc(_sfc_main$f,[["render",_sfc_render$4]]),_sfc_main$e={},_hoisted_1$b={viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",class:"Notivue__success-icon"};function _sfc_render$3(ne,ee){return openBlock(),createElementBlock("svg",_hoisted_1$b,[...ee[0]||(ee[0]=[createBaseVNode("path",{fill:"currentColor",d:"M12 22C6.477 22 2 17.523 2 12S6.477 2 12 2s10 4.477 10 10-4.477 10-10 10zm-.997-6l7.07-7.071-1.414-1.414-5.656 5.657-2.829-2.829-1.414 1.414L11.003 16z"},null,-1)])])}const NotificationSuccess=_export_sfc(_sfc_main$e,[["render",_sfc_render$3]]),_sfc_main$d={},_hoisted_1$a={viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",class:"Notivue__error-icon"};function _sfc_render$2(ne,ee){return openBlock(),createElementBlock("svg",_hoisted_1$a,[...ee[0]||(ee[0]=[createBaseVNode("path",{fill:"currentColor",d:"M17.5,2.5h-11L1,12l5.5,9.5h11L23,12L17.5,2.5z M16.2,14.8l-1.4,1.4L12,13.4l-2.8,2.8l-1.4-1.4l2.8-2.8L7.8,9.2l1.4-1.4l2.8,2.8l2.8-2.8l1.4,1.4L13.4,12L16.2,14.8z"},null,-1)])])}const NotificationError=_export_sfc(_sfc_main$d,[["render",_sfc_render$2]]),_sfc_main$c={},_hoisted_1$9={viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",class:"Notivue__warning-icon"};function _sfc_render$1(ne,ee){return openBlock(),createElementBlock("svg",_hoisted_1$9,[...ee[0]||(ee[0]=[createBaseVNode("path",{fill:"currentColor",d:"m12.866 3 9.526 16.5a1 1 0 0 1-.866 1.5H2.474a1 1 0 0 1-.866-1.5L11.134 3a1 1 0 0 1 1.732 0ZM11 16v2h2v-2h-2Zm0-7v5h2V9h-2Z"},null,-1)])])}const NotificationWarning=_export_sfc(_sfc_main$c,[["render",_sfc_render$1]]),_sfc_main$b={},_hoisted_1$8={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24","aria-hidden":"true",stroke:"currentColor","stroke-width":"2","troke-linecap":"round","stroke-linejoin":"round",class:"Notivue__close-icon"};function _sfc_render(ne,ee){return openBlock(),createElementBlock("svg",_hoisted_1$8,[...ee[0]||(ee[0]=[createBaseVNode("line",{x1:"18",y1:"6",x2:"6",y2:"18"},null,-1),createBaseVNode("line",{x1:"6",y1:"6",x2:"18",y2:"18"},null,-1)])])}const NotificationClose=_export_sfc(_sfc_main$b,[["render",_sfc_render]]),matchIconName=/^[a-z0-9]+(-[a-z0-9]+)*$/,stringToIcon=(ne,ee,te,st="")=>{const ot=ne.split(":");if(ne.slice(0,1)==="@"){if(ot.length<2||ot.length>3)return null;st=ot.shift().slice(1)}if(ot.length>3||!ot.length)return null;if(ot.length>1){const dt=ot.pop(),ht=ot.pop(),ft={provider:ot.length>0?ot[0]:st,prefix:ht,name:dt};return ee&&!validateIconName(ft)?null:ft}const ct=ot[0],ut=ct.split("-");if(ut.length>1){const dt={provider:st,prefix:ut.shift(),name:ut.join("-")};return ee&&!validateIconName(dt)?null:dt}if(te&&st===""){const dt={provider:st,prefix:"",name:ct};return ee&&!validateIconName(dt,te)?null:dt}return null},validateIconName=(ne,ee)=>ne?!!((ee&&ne.prefix===""||ne.prefix)&&ne.name):!1;function getIconsTree(ne,ee){const te=ne.icons,st=ne.aliases||Object.create(null),ot=Object.create(null);function ct(ut){if(te[ut])return ot[ut]=[];if(!(ut in ot)){ot[ut]=null;const dt=st[ut]&&st[ut].parent,ht=dt&&ct(dt);ht&&(ot[ut]=[dt].concat(ht))}return ot[ut]}
67return Object.keys(te).concat(Object.keys(st)).forEach(ct),ot}const defaultIconDimensions=Object.freeze({left:0,top:0,width:16,height:16}),defaultIconTransformations=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),defaultIconProps=Object.freeze({...defaultIconDimensions,...defaultIconTransformations}),defaultExtendedIconProps=Object.freeze({...defaultIconProps,body:"",hidden:!1});function mergeIconTransformations(ne,ee){const te={};!ne.hFlip!=!ee.hFlip&&(te.hFlip=!0),!ne.vFlip!=!ee.vFlip&&(te.vFlip=!0);const st=((ne.rotate||0)+(ee.rotate||0))%4;return st&&(te.rotate=st),te}function mergeIconData(ne,ee){const te=mergeIconTransformations(ne,ee);for(const st in defaultExtendedIconProps)st in defaultIconTransformations?st in ne&&!(st in te)&&(te[st]=defaultIconTransformations[st]):st in ee?te[st]=ee[st]:st in ne&&(te[st]=ne[st]);return te}function internalGetIconData(ne,ee,te){const st=ne.icons,ot=ne.aliases||Object.create(null);let ct={};function ut(dt){ct=mergeIconData(st[dt]||ot[dt],ct)}return ut(ee),te.forEach(ut),mergeIconData(ne,ct)}function parseIconSet(ne,ee){const te=[];if(typeof ne!="object"||typeof ne.icons!="object")return te;ne.not_found instanceof Array&&ne.not_found.forEach(ot=>{ee(ot,null),te.push(ot)});const st=getIconsTree(ne);for(const ot in st){const ct=st[ot];ct&&(ee(ot,internalGetIconData(ne,ot,ct)),te.push(ot))}return te}const optionalPropertyDefaults={provider:"",aliases:{},not_found:{},...defaultIconDimensions};function checkOptionalProps(ne,ee){for(const te in ee)if(te in ne&&typeof ne[te]!=typeof ee[te])return!1;return!0}function quicklyValidateIconSet(ne){if(typeof ne!="object"||ne===null)return null;const ee=ne;if(typeof ee.prefix!="string"||!ne.icons||typeof ne.icons!="object"||!checkOptionalProps(ne,optionalPropertyDefaults))return null;const te=ee.icons;for(const ot in te){const ct=te[ot];if(!ot||typeof ct.body!="string"||!checkOptionalProps(ct,defaultExtendedIconProps))return null}const st=ee.aliases||Object.create(null);for(const ot in st){const ct=st[ot],ut=ct.parent;if(!ot||typeof ut!="string"||!te[ut]&&!st[ut]||!checkOptionalProps(ct,defaultExtendedIconProps))return null}return ee}const dataStorage=Object.create(null);function newStorage(ne,ee){return{provider:ne,prefix:ee,icons:Object.create(null),missing:new Set}}function getStorage(ne,ee){const te=dataStorage[ne]||(dataStorage[ne]=Object.create(null));return te[ee]||(te[ee]=newStorage(ne,ee))}function addIconSet(ne,ee){return quicklyValidateIconSet(ee)?parseIconSet(ee,(te,st)=>{st?ne.icons[te]=st:ne.missing.add(te)}):[]}function addIconToStorage(ne,ee,te){try{if(typeof te.body=="string")return ne.icons[ee]={...te},!0}catch{}return!1}let simpleNames=!1;function allowSimpleNames(ne){return typeof ne=="boolean"&&(simpleNames=ne),simpleNames}function getIconData(ne){const ee=typeof ne=="string"?stringToIcon(ne,!0,simpleNames):ne;if(ee){const te=getStorage(ee.provider,ee.prefix),st=ee.name;return te.icons[st]||(te.missing.has(st)?null:void 0)}}function addIcon(ne,ee){const te=stringToIcon(ne,!0,simpleNames);if(!te)return!1;const st=getStorage(te.provider,te.prefix);return ee?addIconToStorage(st,te.name,ee):(st.missing.add(te.name),!0)}function addCollection(ne,ee){if(typeof ne!="object")return!1;if(typeof ee!="string"&&(ee=ne.provider||""),simpleNames&&!ee&&!ne.prefix){let st=!1;return quicklyValidateIconSet(ne)&&(ne.prefix="",parseIconSet(ne,(ot,ct)=>{addIcon(ot,ct)&&(st=!0)})),st}const te=ne.prefix;return validateIconName({prefix:te,name:"a"})?!!addIconSet(getStorage(ee,te),ne):!1}const defaultIconSizeCustomisations=Object.freeze({width:null,height:null}),defaultIconCustomisations=Object.freeze({...defaultIconSizeCustomisations,...defaultIconTransformations}),unitsSplit=/(-?[0-9.]*[0-9]+[0-9.]*)/g,unitsTest=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function calculateSize(ne,ee,te){if(ee===1)return ne;if(te=te||100,typeof ne=="number")return Math.ceil(ne*ee*te)/te;if(typeof ne!="string")return ne;const st=ne.split(unitsSplit);if(st===null||!st.length)return ne;const ot=[];let ct=st.shift(),ut=unitsTest.test(ct);for(;;){if(ut){const dt=parseFloat(ct);isNaN(dt)?ot.push(ct):ot.push(Math.ceil(dt*ee*te)/te)}else ot.push(ct);if(ct=st.shift(),ct===void 0)return ot.join("");ut=!ut}}function splitSVGDefs(ne,ee="defs"){let te="";const st=ne.indexOf("<"+ee);for(;st>=0;){const ot=ne.indexOf(">",st),ct=ne.indexOf("</"+ee);if(ot===-1||ct===-1)break;const ut=ne.indexOf(">",ct);if(ut===-1)break;te+=ne.slice(ot+1,ct).trim(),ne=ne.slice(0,st).trim()+ne.slice(ut+1)}return{defs:te,content:ne}}function mergeDefsAndContent(ne,ee){return ne?"<defs>"+ne+"</defs>"+ee:ee}function wrapSVGContent(ne,ee,te){const st=splitSVGDefs(ne);
67return mergeDefsAndContent(st.defs,ee+st.content+te)}const isUnsetKeyword=ne=>ne==="unset"||ne==="undefined"||ne==="none";function iconToSVG(ne,ee){const te={...defaultIconProps,...ne},st={...defaultIconCustomisations,...ee},ot={left:te.left,top:te.top,width:te.width,height:te.height};let ct=te.body;[te,st].forEach(bt=>{const xt=[],Mt=bt.hFlip,Ot=bt.vFlip;let kt=bt.rotate;Mt?Ot?kt+=2:(xt.push("translate("+(ot.width+ot.left).toString()+" "+(0-ot.top).toString()+")"),xt.push("scale(-1 1)"),ot.top=ot.left=0):Ot&&(xt.push("translate("+(0-ot.left).toString()+" "+(ot.height+ot.top).toString()+")"),xt.push("scale(1 -1)"),ot.top=ot.left=0);let Nt;switch(kt<0&&(kt-=Math.floor(kt/4)*4),kt=kt%4,kt){case 1:Nt=ot.height/2+ot.top,xt.unshift("rotate(90 "+Nt.toString()+" "+Nt.toString()+")");break;case 2:xt.unshift("rotate(180 "+(ot.width/2+ot.left).toString()+" "+(ot.height/2+ot.top).toString()+")");break;case 3:Nt=ot.width/2+ot.left,xt.unshift("rotate(-90 "+Nt.toString()+" "+Nt.toString()+")");break}kt%2===1&&(ot.left!==ot.top&&(Nt=ot.left,ot.left=ot.top,ot.top=Nt),ot.width!==ot.height&&(Nt=ot.width,ot.width=ot.height,ot.height=Nt)),xt.length&&(ct=wrapSVGContent(ct,'<g transform="'+xt.join(" ")+'">',"</g>"))});const ut=st.width,dt=st.height,ht=ot.width,ft=ot.height;let pt,mt;ut===null?(mt=dt===null?"1em":dt==="auto"?ft:dt,pt=calculateSize(mt,ht/ft)):(pt=ut==="auto"?ht:ut,mt=dt===null?calculateSize(pt,ft/ht):dt==="auto"?ft:dt);const yt={},vt=(bt,xt)=>{isUnsetKeyword(xt)||(yt[bt]=xt.toString())};vt("width",pt),vt("height",mt);const _t=[ot.left,ot.top,ht,ft];return yt.viewBox=_t.join(" "),{attributes:yt,viewBox:_t,body:ct}}const regex=/\sid="(\S+)"/g,counters=new Map;function nextID(ne){ne=ne.replace(/[0-9]+$/,"")||"a";const ee=counters.get(ne)||0;return counters.set(ne,ee+1),ee?`${ne}${ee}`:ne}function replaceIDs(ne){const ee=[];let te;for(;te=regex.exec(ne);)ee.push(te[1]);if(!ee.length)return ne;const st="suffix"+(Math.random()*16777216|Date.now()).toString(16);return ee.forEach(ot=>{const ct=nextID(ot),ut=ot.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");ne=ne.replace(new RegExp('([#;"])('+ut+')([")]|\\.[a-z])',"g"),"$1"+ct+st+"$3")}),ne=ne.replace(new RegExp(st,"g"),""),ne}const storage$1=Object.create(null);function setAPIModule(ne,ee){storage$1[ne]=ee}function getAPIModule(ne){return storage$1[ne]||storage$1[""]}function createAPIConfig(ne){let ee;if(typeof ne.resources=="string")ee=[ne.resources];else if(ee=ne.resources,!(ee instanceof Array)||!ee.length)return null;return{resources:ee,path:ne.path||"/",maxURL:ne.maxURL||500,rotate:ne.rotate||750,timeout:ne.timeout||5e3,random:ne.random===!0,index:ne.index||0,dataAfterTimeout:ne.dataAfterTimeout!==!1}}const configStorage=Object.create(null),fallBackAPISources=["https://api.simplesvg.com","https://api.unisvg.com"],fallBackAPI=[];for(;fallBackAPISources.length>0;)fallBackAPISources.length===1||Math.random()>.5?fallBackAPI.push(fallBackAPISources.shift()):fallBackAPI.push(fallBackAPISources.pop());configStorage[""]=createAPIConfig({resources:["https://api.iconify.design"].concat(fallBackAPI)});function addAPIProvider(ne,ee){const te=createAPIConfig(ee);return te===null?!1:(configStorage[ne]=te,!0)}function getAPIConfig(ne){return configStorage[ne]}const detectFetch=()=>{let ne;try{if(ne=fetch,typeof ne=="function")return ne}catch{}};let fetchModule=detectFetch();function calculateMaxLength(ne,ee){const te=getAPIConfig(ne);if(!te)return 0;let st;if(!te.maxURL)st=0;else{let ot=0;te.resources.forEach(ut=>{ot=Math.max(ot,ut.length)});const ct=ee+".json?icons=";st=te.maxURL-ot-te.path.length-ct.length}return st}function shouldAbort(ne){return ne===404}const prepare=(ne,ee,te)=>{const st=[],ot=calculateMaxLength(ne,ee),ct="icons";let ut={type:ct,provider:ne,prefix:ee,icons:[]},dt=0;return te.forEach((ht,ft)=>{dt+=ht.length+1,dt>=ot&&ft>0&&(st.push(ut),ut={type:ct,provider:ne,prefix:ee,icons:[]},dt=ht.length),ut.icons.push(ht)}),st.push(ut),st};function getPath(ne){if(typeof ne=="string"){const ee=getAPIConfig(ne);if(ee)return ee.path}return"/"}const send=(ne,ee,te)=>{if(!fetchModule){te("abort",424);return}let st=getPath(ee.provider);switch(ee.type){case"icons":{const ct=ee.prefix,ut=ee.icons.join(","),dt=new URLSearchParams({icons:ut});st+=ct+".json?"+dt.toString();break}
67case"custom":{const ct=ee.uri;st+=ct.slice(0,1)==="/"?ct.slice(1):ct;break}default:te("abort",400);return}let ot=503;fetchModule(ne+st).then(ct=>{const ut=ct.status;if(ut!==200){setTimeout(()=>{te(shouldAbort(ut)?"abort":"next",ut)});return}return ot=501,ct.json()}).then(ct=>{if(typeof ct!="object"||ct===null){setTimeout(()=>{ct===404?te("abort",ct):te("next",ot)});return}setTimeout(()=>{te("success",ct)})}).catch(()=>{te("next",ot)})},fetchAPIModule={prepare,send};function removeCallback(ne,ee){ne.forEach(te=>{const st=te.loaderCallbacks;st&&(te.loaderCallbacks=st.filter(ot=>ot.id!==ee))})}function updateCallbacks(ne){ne.pendingCallbacksFlag||(ne.pendingCallbacksFlag=!0,setTimeout(()=>{ne.pendingCallbacksFlag=!1;const ee=ne.loaderCallbacks?ne.loaderCallbacks.slice(0):[];if(!ee.length)return;let te=!1;const st=ne.provider,ot=ne.prefix;ee.forEach(ct=>{const ut=ct.icons,dt=ut.pending.length;ut.pending=ut.pending.filter(ht=>{if(ht.prefix!==ot)return!0;const ft=ht.name;if(ne.icons[ft])ut.loaded.push({provider:st,prefix:ot,name:ft});else if(ne.missing.has(ft))ut.missing.push({provider:st,prefix:ot,name:ft});else return te=!0,!0;return!1}),ut.pending.length!==dt&&(te||removeCallback([ne],ct.id),ct.callback(ut.loaded.slice(0),ut.missing.slice(0),ut.pending.slice(0),ct.abort))})}))}let idCounter=0;function storeCallback(ne,ee,te){const st=idCounter++,ot=removeCallback.bind(null,te,st);if(!ee.pending.length)return ot;const ct={id:st,icons:ee,callback:ne,abort:ot};return te.forEach(ut=>{(ut.loaderCallbacks||(ut.loaderCallbacks=[])).push(ct)}),ot}function sortIcons(ne){const ee={loaded:[],missing:[],pending:[]},te=Object.create(null);ne.sort((ot,ct)=>ot.provider!==ct.provider?ot.provider.localeCompare(ct.provider):ot.prefix!==ct.prefix?ot.prefix.localeCompare(ct.prefix):ot.name.localeCompare(ct.name));let st={provider:"",prefix:"",name:""};return ne.forEach(ot=>{if(st.name===ot.name&&st.prefix===ot.prefix&&st.provider===ot.provider)return;st=ot;const ct=ot.provider,ut=ot.prefix,dt=ot.name,ht=te[ct]||(te[ct]=Object.create(null)),ft=ht[ut]||(ht[ut]=getStorage(ct,ut));let pt;dt in ft.icons?pt=ee.loaded:ut===""||ft.missing.has(dt)?pt=ee.missing:pt=ee.pending;const mt={provider:ct,prefix:ut,name:dt};pt.push(mt)}),ee}function listToIcons(ne,ee=!0,te=!1){const st=[];return ne.forEach(ot=>{const ct=typeof ot=="string"?stringToIcon(ot,ee,te):ot;ct&&st.push(ct)}),st}const defaultConfig={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function sendQuery(ne,ee,te,st){const ot=ne.resources.length,ct=ne.random?Math.floor(Math.random()*ot):ne.index;let ut;if(ne.random){let Bt=ne.resources.slice(0);for(ut=[];Bt.length>1;){const Ut=Math.floor(Math.random()*Bt.length);ut.push(Bt[Ut]),Bt=Bt.slice(0,Ut).concat(Bt.slice(Ut+1))}ut=ut.concat(Bt)}else ut=ne.resources.slice(ct).concat(ne.resources.slice(0,ct));const dt=Date.now();let ht="pending",ft=0,pt,mt=null,yt=[],vt=[];typeof st=="function"&&vt.push(st);function _t(){mt&&(clearTimeout(mt),mt=null)}function bt(){ht==="pending"&&(ht="aborted"),_t(),yt.forEach(Bt=>{Bt.status==="pending"&&(Bt.status="aborted")}),yt=[]}function xt(Bt,Ut){Ut&&(vt=[]),typeof Bt=="function"&&vt.push(Bt)}function Mt(){return{startTime:dt,payload:ee,status:ht,queriesSent:ft,queriesPending:yt.length,subscribe:xt,abort:bt}}function Ot(){ht="failed",vt.forEach(Bt=>{Bt(void 0,pt)})}function kt(){yt.forEach(Bt=>{Bt.status==="pending"&&(Bt.status="aborted")}),yt=[]}function Nt(Bt,Ut,Vt){const Ht=Ut!=="success";switch(yt=yt.filter(zt=>zt!==Bt),ht){case"pending":break;case"failed":if(Ht||!ne.dataAfterTimeout)return;break;default:return}if(Ut==="abort"){pt=Vt,Ot();return}if(Ht){pt=Vt,yt.length||(ut.length?Gt():Ot());return}if(_t(),kt(),!ne.random){const zt=ne.resources.indexOf(Bt.resource);zt!==-1&&zt!==ne.index&&(ne.index=zt)}ht="completed",vt.forEach(zt=>{zt(Vt)})}function Gt(){if(ht!=="pending")return;_t();const Bt=ut.shift();if(Bt===void 0){if(yt.length){mt=setTimeout(()=>{_t(),ht==="pending"&&(kt(),Ot())},ne.timeout);return}Ot();return}const Ut={status:"pending",resource:Bt,callback:(Vt,Ht)=>{Nt(Ut,Vt,Ht)}};yt.push(Ut),ft++,mt=setTimeout(Gt,ne.rotate),te(Bt,ee,Ut.callback)}return setTimeout(Gt),Mt}
67function initRedundancy(ne){const ee={...defaultConfig,...ne};let te=[];function st(){te=te.filter(ut=>ut().status==="pending")}function ot(ut,dt,ht){const ft=sendQuery(ee,ut,dt,(pt,mt)=>{st(),ht&&ht(pt,mt)});return te.push(ft),ft}function ct(ut){return te.find(dt=>ut(dt))||null}return{query:ot,find:ct,setIndex:ut=>{ee.index=ut},getIndex:()=>ee.index,cleanup:st}}function emptyCallback$1(){}const redundancyCache=Object.create(null);function getRedundancyCache(ne){if(!redundancyCache[ne]){const ee=getAPIConfig(ne);if(!ee)return;redundancyCache[ne]={config:ee,redundancy:initRedundancy(ee)}}return redundancyCache[ne]}function sendAPIQuery(ne,ee,te){let st,ot;if(typeof ne=="string"){const ct=getAPIModule(ne);if(!ct)return te(void 0,424),emptyCallback$1;ot=ct.send;const ut=getRedundancyCache(ne);ut&&(st=ut.redundancy)}else{const ct=createAPIConfig(ne);if(ct){st=initRedundancy(ct);const ut=getAPIModule(ne.resources?ne.resources[0]:"");ut&&(ot=ut.send)}}return!st||!ot?(te(void 0,424),emptyCallback$1):st.query(ee,ot,te)().abort}function emptyCallback(){}function loadedNewIcons(ne){ne.iconsLoaderFlag||(ne.iconsLoaderFlag=!0,setTimeout(()=>{ne.iconsLoaderFlag=!1,updateCallbacks(ne)}))}function checkIconNamesForAPI(ne){const ee=[],te=[];return ne.forEach(st=>{(st.match(matchIconName)?ee:te).push(st)}),{valid:ee,invalid:te}}function parseLoaderResponse(ne,ee,te){function st(){const ot=ne.pendingIcons;ee.forEach(ct=>{ot&&ot.delete(ct),ne.icons[ct]||ne.missing.add(ct)})}if(te&&typeof te=="object")try{if(!addIconSet(ne,te).length){st();return}}catch(ot){console.error(ot)}st(),loadedNewIcons(ne)}function parsePossiblyAsyncResponse(ne,ee){ne instanceof Promise?ne.then(te=>{ee(te)}).catch(()=>{ee(null)}):ee(ne)}function loadNewIcons(ne,ee){ne.iconsToLoad?ne.iconsToLoad=ne.iconsToLoad.concat(ee).sort():ne.iconsToLoad=ee,ne.iconsQueueFlag||(ne.iconsQueueFlag=!0,setTimeout(()=>{ne.iconsQueueFlag=!1;const{provider:te,prefix:st}=ne,ot=ne.iconsToLoad;if(delete ne.iconsToLoad,!ot||!ot.length)return;const ct=ne.loadIcon;if(ne.loadIcons&&(ot.length>1||!ct)){parsePossiblyAsyncResponse(ne.loadIcons(ot,st,te),ft=>{parseLoaderResponse(ne,ot,ft)});return}if(ct){ot.forEach(ft=>{parsePossiblyAsyncResponse(ct(ft,st,te),pt=>{parseLoaderResponse(ne,[ft],pt?{prefix:st,icons:{[ft]:pt}}:null)})});return}const{valid:ut,invalid:dt}=checkIconNamesForAPI(ot);if(dt.length&&parseLoaderResponse(ne,dt,null),!ut.length)return;const ht=st.match(matchIconName)?getAPIModule(te):null;if(!ht){parseLoaderResponse(ne,ut,null);return}ht.prepare(te,st,ut).forEach(ft=>{sendAPIQuery(te,ft,pt=>{parseLoaderResponse(ne,ft.icons,pt)})})}))}const loadIcons=(ne,ee)=>{const te=sortIcons(listToIcons(ne,!0,allowSimpleNames()));if(!te.pending.length){let dt=!0;return ee&&setTimeout(()=>{dt&&ee(te.loaded,te.missing,te.pending,emptyCallback)}),()=>{dt=!1}}const st=Object.create(null),ot=[];let ct,ut;return te.pending.forEach(dt=>{const{provider:ht,prefix:ft}=dt;if(ft===ut&&ht===ct)return;ct=ht,ut=ft,ot.push(getStorage(ht,ft));const pt=st[ht]||(st[ht]=Object.create(null));pt[ft]||(pt[ft]=[])}),te.pending.forEach(dt=>{const{provider:ht,prefix:ft,name:pt}=dt,mt=getStorage(ht,ft),yt=mt.pendingIcons||(mt.pendingIcons=new Set);yt.has(pt)||(yt.add(pt),st[ht][ft].push(pt))}),ot.forEach(dt=>{const ht=st[dt.provider][dt.prefix];ht.length&&loadNewIcons(dt,ht)}),ee?storeCallback(ee,te,ot):emptyCallback};function mergeCustomisations(ne,ee){const te={...ne};for(const st in ee){const ot=ee[st],ct=typeof ot;st in defaultIconSizeCustomisations?(ot===null||ot&&(ct==="string"||ct==="number"))&&(te[st]=ot):ct===typeof te[st]&&(te[st]=st==="rotate"?ot%4:ot)}return te}const separator=/[\s,]+/;function flipFromString(ne,ee){ee.split(separator).forEach(te=>{switch(te.trim()){case"horizontal":ne.hFlip=!0;break;case"vertical":ne.vFlip=!0;break}})}function rotateFromString(ne,ee=0){const te=ne.replace(/^-?[0-9.]*/,"");function st(ot){for(;ot<0;)ot+=4;return ot%4}if(te===""){const ot=parseInt(ne);return isNaN(ot)?0:st(ot)}else if(te!==ne){let ot=0;switch(te){case"%":ot=25;break;case"deg":ot=90}if(ot){let ct=parseFloat(ne.slice(0,ne.length-te.length));return isNaN(ct)?0:(ct=ct/ot,ct%1===0?st(ct):0)}}return ee}function iconToHTML(ne,ee){let te=ne.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const st in ee)te+=" "+st+'="'+ee[st]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+te+">"+ne+"</svg>"}function encodeSVGforURL(ne){return ne.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}function svgToData(ne){return"data:image/svg+xml,"+encodeSVGforURL(ne)}function svgToURL(ne){return'url("'+svgToData(ne)+'")'}
67const defaultExtendedIconCustomisations={...defaultIconCustomisations,inline:!1},svgDefaults={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":!0,role:"img"},commonProps={display:"inline-block"},monotoneProps={backgroundColor:"currentColor"},coloredProps={backgroundColor:"transparent"},propsToAdd={Image:"var(--svg)",Repeat:"no-repeat",Size:"100% 100%"},propsToAddTo={webkitMask:monotoneProps,mask:monotoneProps,background:coloredProps};for(const ne in propsToAddTo){const ee=propsToAddTo[ne];for(const te in propsToAdd)ee[ne+te]=propsToAdd[te]}const customisationAliases={};["horizontal","vertical"].forEach(ne=>{const ee=ne.slice(0,1)+"Flip";customisationAliases[ne+"-flip"]=ee,customisationAliases[ne.slice(0,1)+"-flip"]=ee,customisationAliases[ne+"Flip"]=ee});function fixSize(ne){return ne+(ne.match(/^[-0-9.]+$/)?"px":"")}const render$1=(ne,ee)=>{const te=mergeCustomisations(defaultExtendedIconCustomisations,ee),st={...svgDefaults},ot=ee.mode||"svg",ct={},ut=ee.style,dt=typeof ut=="object"&&!(ut instanceof Array)?ut:{};for(let bt in ee){const xt=ee[bt];if(xt!==void 0)switch(bt){case"icon":case"style":case"onLoad":case"mode":case"ssr":case"customise":break;case"inline":case"hFlip":case"vFlip":te[bt]=xt===!0||xt==="true"||xt===1;break;case"flip":typeof xt=="string"&&flipFromString(te,xt);break;case"color":ct.color=xt;break;case"rotate":typeof xt=="string"?te[bt]=rotateFromString(xt):typeof xt=="number"&&(te[bt]=xt);break;case"ariaHidden":case"aria-hidden":xt!==!0&&xt!=="true"&&delete st["aria-hidden"];break;default:{const Mt=customisationAliases[bt];Mt?(xt===!0||xt==="true"||xt===1)&&(te[Mt]=!0):defaultExtendedIconCustomisations[bt]===void 0&&(st[bt]=xt)}}}const ht=iconToSVG(ne,te),ft=ht.attributes;if(te.inline&&(ct.verticalAlign="-0.125em"),ot==="svg")return st.style={...ct,...dt},Object.assign(st,ft),st.innerHTML=replaceIDs(ht.body),h$3("svg",st);const{body:pt,width:mt,height:yt}=ne,vt=ot==="mask"||(ot==="bg"?!1:pt.indexOf("currentColor")!==-1),_t=iconToHTML(pt,{...ft,width:mt+"",height:yt+""});return st.style={...ct,"--svg":svgToURL(_t),width:fixSize(ft.width),height:fixSize(ft.height),...commonProps,...vt?monotoneProps:coloredProps,...dt},h$3("span",st)};allowSimpleNames(!0);setAPIModule("",fetchAPIModule);if(typeof document<"u"&&typeof window<"u"){const ne=window;if(ne.IconifyPreload!==void 0){const ee=ne.IconifyPreload,te="Invalid IconifyPreload syntax.";typeof ee=="object"&&ee!==null&&(ee instanceof Array?ee:[ee]).forEach(st=>{try{(typeof st!="object"||st===null||st instanceof Array||typeof st.icons!="object"||typeof st.prefix!="string"||!addCollection(st))&&console.error(te)}catch{console.error(te)}})}if(ne.IconifyProviders!==void 0){const ee=ne.IconifyProviders;if(typeof ee=="object"&&ee!==null)for(let te in ee){const st="IconifyProviders["+te+"] is invalid.";try{const ot=ee[te];if(typeof ot!="object"||!ot||ot.resources===void 0)continue;addAPIProvider(te,ot)||console.error(st)}catch{console.error(st)}}}}const emptyIcon={...defaultIconProps,body:""},Icon$1=defineComponent((ne,{emit:ee})=>{const te=ref$1(null);function st(){var ft,pt;te.value&&((pt=(ft=te.value).abort)==null||pt.call(ft),te.value=null)}const ot=ref$1(!!ne.ssr),ct=ref$1(""),ut=shallowRef(null);function dt(){const ft=ne.icon;if(typeof ft=="object"&&ft!==null&&typeof ft.body=="string")return ct.value="",{data:ft};let pt;if(typeof ft!="string"||(pt=stringToIcon(ft,!1,!0))===null)return null;let mt=getIconData(pt);if(!mt){const _t=te.value;return(!_t||_t.name!==ft)&&(mt===null?te.value={name:ft}:te.value={name:ft,abort:loadIcons([pt],ht)}),null}st(),ct.value!==ft&&(ct.value=ft,nextTick(()=>{ee("load",ft)}));const yt=ne.customise;if(yt){mt=Object.assign({},mt);const _t=yt(mt.body,pt.name,pt.prefix,pt.provider);typeof _t=="string"&&(mt.body=_t)}const vt=["iconify"];return pt.prefix!==""&&vt.push("iconify--"+pt.prefix),pt.provider!==""&&vt.push("iconify--"+pt.provider),{data:mt,classes:vt}}function ht(){var pt;const ft=dt();ft?ft.data!==((pt=ut.value)==null?void 0:pt.data)&&(ut.value=ft):ut.value=null}return ot.value?ht():onMounted(()=>
67{ot.value=!0,ht()}),watch(()=>ne.icon,ht),onUnmounted(st),()=>{const ft=ut.value;if(!ft)return render$1(emptyIcon,ne);let pt=ne;return ft.classes&&(pt={...ne,class:ft.classes.join(" ")}),render$1({...defaultIconProps,...ft.data},pt)}},{props:["icon","mode","ssr","width","height","style","color","inline","rotate","hFlip","horizontalFlip","vFlip","verticalFlip","flip","id","ariaHidden","customise","title"],emits:["load"]});var q$1=Symbol("header"),de$1=Symbol("tabs"),fe$1=Symbol("vue-dsfr-icon-collections"),pe$1=Symbol("vue-dsfr-prefer-offline-icons"),J$1=()=>{let ne=ref$1(),ee=ref$1(!1),te=ref$1(!1),st=()=>{if(!ne.value)return;ne.value.style.setProperty("--collapser","none");let ot=ne.value.offsetHeight;ne.value.style.setProperty("--collapse",`${-ot}px`),ne.value.style.setProperty("--collapser","")};return{collapse:ne,collapsing:ee,cssExpanded:te,doExpand:ot=>{ne.value&&(ot===!0&&ne.value.style.setProperty("--collapse-max-height","none"),window.requestAnimationFrame(()=>{ee.value=!0,st(),window.requestAnimationFrame(()=>{te.value=ot})}))},adjust:st,onTransitionEnd:(ot,ct=!0)=>{var ut,dt;ee.value=!1,ct&&((dt=(ut=ne.value)==null?void 0:ut.querySelector("a"))==null||dt.focus()),ne.value&&ot===!1&&ne.value.style.removeProperty("--collapse-max-height")}}},me$1="(prefers-color-scheme: dark)",he$1="vue-dsfr-scheme",Y,X$1="light",ge$1="dark",_e$1="system",ve$1="data-fr-theme",ye$1=ne=>[X$1,ge$1,_e$1].includes(ne),be$1=ne=>[X$1,ge$1].includes(ne),xe=ne=>{let ee=ne??(localStorage.getItem(Y)||"system");return ye$1(ee)?ee:_e$1},Se$1=(ne,ee)=>{let te=xe(ne);return te==="system"?ee!=null&&ee.matches?ge$1:X$1:te},Ce$1=ne=>{if(typeof window>"u")return;Y=he$1;let ee={scheme:localStorage.getItem(Y)||"system",dataThemeAttribute:ve$1,...ne},te=window.matchMedia&&window.matchMedia(me$1),st=ref$1(xe(ee.scheme));localStorage.setItem(Y,st.value);let ot=ref$1(Se$1(st.value,te)),ct=ref$1(st.value!==_e$1);watchEffect(()=>{var pt;(pt=document.body.parentElement)==null||pt.setAttribute(ee.dataThemeAttribute||ve$1,ot.value)}),te==null||te.addEventListener("change",pt=>{ct.value||(pt.matches?ot.value=ge$1:ot.value=X$1)}),!ct.value&&(te!=null&&te.matches)&&(ot.value=ge$1);let ut=pt=>{if(st.value=xe(pt),localStorage.setItem(Y,st.value),be$1(st.value)){ot.value=st.value,ct.value=!0;return}ot.value=Se$1(st.value,te),ct.value=!1},dt=document.documentElement,ht={subtree:!1,childList:!1,attributes:!0},ft=new MutationObserver(pt=>{for(let mt of pt)if(mt.type==="attributes"&&mt.attributeName===(ee.dataThemeAttribute||ve$1)){let yt=mt.target.getAttribute(mt.attributeName);yt&&yt!==st.value&&ut(yt)}});return ft.observe(dt,ht),window.addEventListener("unload",()=>ft.disconnect()),ut(st.value),{setScheme:ut,theme:computed(()=>ot.value),scheme:computed(()=>st.value)}},Z$2=(ne="",ee="")=>(ne?`${ne}-`:"")+useId()+(ee?`-${ee}`:""),Ie$1=["id","role"],Le$1=["id"],Re$1=["aria-describedby","title"],ze$1={class:"fr-sr-only"},Be$1=defineComponent({__name:"DsfrAlert",props:{alert:{type:Boolean},closed:{type:Boolean},closeable:{type:Boolean},id:{default:()=>Z$2("basic","alert")},title:{default:""},description:{},small:{type:Boolean},titleTag:{default:"h3"},type:{default:"info"},closeButtonLabel:{default:"Fermer le message"}},emits:["close"],setup(ne,{emit:ee}){let te=ne,st=ee,ot=()=>st("close"),ct=computed(()=>[`fr-alert--${te.type}`,{"fr-alert--sm":te.small}]),ut=computed(()=>Z$2("alert","title")),dt=computed(()=>Z$2("alert","description")),ht=computed(()=>te.description&&!te.title?dt.value:!te.description&&te.title?ut.value:`${ut.value} ${dt.value}`);return(ft,pt)=>ne.closed?createCommentVNode("",!0):(openBlock(),createElementBlock("div",{key:0,id:ne.id,class:normalizeClass(["fr-alert",ct.value]),role:ne.alert?"alert":void 0},[ne.small?createCommentVNode("",!0):(openBlock(),createBlock(resolveDynamicComponent(ne.titleTag),{key:0,id:ut.value,class:"fr-alert__title"},{default:withCtx(()=>[createTextVNode(toDisplayString(ne.title),1)]),_:1},8,["id"])),ne.description?(openBlock(),createElementBlock("p",{key:1,id:dt.value},toDisplayString(ne.description),9,Le$1)):renderSlot(ft.$slots,"default",{},void 0,!0,2),ne.closeable?(openBlock(),createElementBlock("button",{key:3,"aria-describedby":ht.value,title:ne.closeButtonLabel,class:"fr-btn fr-btn--close",onClick:ot},[createBaseVNode("span",ze$1,toDisplayString(ne.closeButtonLabel),1)],8,Re$1)):createCommentVNode("",!0)],10,Ie$1))}}),Q$2=(ne,ee)=>{let te=ne.__vccOpts||ne;for(let[st,ot]of ee)te[st]=ot;return te},Ve$2=Q$2(Be$1,[["__scopeId","data-v-3bdfcb0a"]]);function Ze$2(ne,ee){let te=Qe$2(ne);if(!te)return null;let st=ee.find(ct=>ct.prefix===te.prefix),ot=st==null?void 0:st.icons[te.name];return!st||!ot?null:{...ot,height:ot.height??st.height,left:ot.left??st.left??0,top:ot.top??st.top??0,width:ot.width??st.width}}function Qe$2(ne){let ee=ne.indexOf(":");if(ee>0&&ee<ne.length-1)return{name:ne.slice(ee+1),prefix:ne.slice(0,ee)};let te=ne.indexOf("-");return te>0&&te<ne.length-1?{name:ne.slice(te+1),prefix:ne.slice(0,te)}:null}var $e$2=["aria-label"],$$3=Q$2(defineComponent({__name:"VIcon",props:{name:{},scale:{default:1},verticalAlign:{default:"-0.2em"},animation:{},speed:{},flip:{},label:{},title:{},color:{},fill:{},inverse:{type:Boolean},ssr:{type:Boolean,default:!1},display:{default:"inline-block"}},setup(ne){let ee=ne,te=inject(fe$1,[]),st=inject(pe$1,!1),ot=/vi-(.*)/,ct=ref$1(null),ut=ref$1(!1),dt=computed(()=>`${ee.scale*1.2}rem`),ht=computed(()=>ee.flip==="both"?"horizontal,vertical":ee.flip);watch(()=>ee.title,ft);async function ft(){var xt,Mt,Ot,kt;if(!((xt=ct.value)!=null&&xt.$el))return;let _t=!!((Mt=ct.value)==null?void 0:Mt.$el).querySelector("title"),bt=document.createElement("title");if(!ee.title){bt.remove();return}bt.innerHTML=ee.title,await nextTick(),_t||((kt=((Ot=ct.value)==null?void 0:Ot.$el).firstChild)==null||kt.before(bt))}onMounted(()=>{ut.value=!0,ft()});let pt=computed(()=>{var _t;return(_t=ee.name)!=null&&_t.startsWith("vi-")?ee.name.replace(ot,"vscode-icons:$1"):ee.name??""}),mt=computed(()=>ee.color??ee.fill??"inherit"),yt=computed(()=>st?Ze$2(pt.value,te)??pt.value:pt.value),vt=computed(()=>typeof yt.value!="string");return(_t,bt)=>!ee.ssr||ut.value||vt.value?(openBlock(),createBlock(unref(Icon$1),{key:0,ref_key:"icon",ref:ct,icon:yt.value,style:normalizeStyle({fontSize:dt.value,verticalAlign:ne.verticalAlign,display:ne.display,color:mt.value}),"aria-label":ee.label,class:normalizeClass(["vicon",{"vicon-spin":ee.animation==="spin","vicon-wrench":ee.animation==="wrench","vicon-pulse":ee.animation==="pulse","vicon-spin-pulse":ee.animation==="spin-pulse","vicon-flash":ee.animation==="flash","vicon-float":ee.animation==="float","vicon-ring":ee.animation==="ring","vicon-slow":ee.speed==="slow","vicon-fast":ee.speed==="fast","vicon-inverse":ee.inverse}]),flip:ht.value,ssr:vt.value||ee.ssr&&ut.value},null,8,["icon","style","aria-label","class","flip","ssr"])):ee.ssr?(openBlock(),createElementBlock("span",{key:1,style:normalizeStyle({fontSize:dt.value,verticalAlign:ne.verticalAlign,display:ne.display,color:mt.value,opacity:.7}),"aria-label":ee.label,class:"vicon vicon-loading",role:"img"}," ⏳ ",12,$e$2)):createCommentVNode("",!0)}}),[["__scopeId","data-v-301f39e6"]]),et$1=["title","disabled","aria-disabled"],tt$1={key:1},nt$1=Q$2(defineComponent({__name:"DsfrButton",props:{disabled:{type:Boolean},label:{default:void 0},secondary:{type:Boolean},tertiary:{type:Boolean},iconRight:{type:Boolean},iconOnly:{type:Boolean},noOutline:{type:Boolean},size:{default:"md"},icon:{default:void 0},onClick:{type:Function,default:()=>{}}},setup(ne,{expose:ee}){let te=ne,st=computed(()=>["sm","small"].includes(te.size)),ot=computed(()=>["md","medium"].includes(te.size)),ct=computed(()=>["lg","large"].includes(te.size)),ut=ref$1(null);ee({focus:()=>{var pt;(pt=ut.value)==null||pt.focus()}});let dt=computed(()=>
67typeof te.icon=="string"&&te.icon.startsWith("fr-icon-")),ht=computed(()=>te.iconOnly?1.25:.8325),ft=computed(()=>typeof te.icon=="string"?{scale:ht.value,name:te.icon}:{scale:ht.value,...te.icon});return(pt,mt)=>(openBlock(),createElementBlock("button",{ref_key:"btn",ref:ut,class:normalizeClass(["fr-btn",{"fr-btn--secondary":ne.secondary&&!ne.tertiary,"fr-btn--tertiary":ne.tertiary&&!ne.secondary&&!ne.noOutline,"fr-btn--tertiary-no-outline":ne.tertiary&&!ne.secondary&&ne.noOutline,"fr-btn--sm":st.value,"fr-btn--md":ot.value,"fr-btn--lg":ct.value,"fr-btn--icon-right":!ne.iconOnly&&dt.value&&ne.iconRight,"fr-btn--icon-left":!ne.iconOnly&&dt.value&&!ne.iconRight,"inline-flex":!dt.value,reverse:ne.iconRight&&!dt.value,"justify-center":!dt.value&&ne.iconOnly,[ne.icon]:dt.value}]),title:ne.iconOnly?ne.label:void 0,disabled:ne.disabled,"aria-disabled":ne.disabled,style:normalizeStyle(!dt.value&&ne.iconOnly?{"padding-inline":"0.5rem"}:{}),onClick:mt[0]||(mt[0]=yt=>ne.onClick?ne.onClick(yt):()=>{})},[ne.icon&&!dt.value?(openBlock(),createBlock($$3,normalizeProps(mergeProps({key:0},ft.value)),null,16)):createCommentVNode("",!0),ne.iconOnly?createCommentVNode("",!0):(openBlock(),createElementBlock("span",tt$1,[createTextVNode(toDisplayString(ne.label)+" ",1),renderSlot(pt.$slots,"default",{},void 0,!0)]))],14,et$1))}}),[["__scopeId","data-v-dbede060"]]),rt$1=defineComponent({__name:"DsfrButtonGroup",props:{buttons:{default:()=>[]},reverse:{type:Boolean},equisized:{type:Boolean},iconRight:{type:Boolean},align:{default:void 0},inlineLayoutWhen:{type:[String,Boolean],default:"never"},size:{default:"md"}},setup(ne){let ee=ne,te=ref$1(null),st=computed(()=>["sm","small"].includes(ee.size)),ot=computed(()=>["md","medium"].includes(ee.size)),ct=computed(()=>["lg","large"].includes(ee.size)),ut=computed(()=>["always","",!0].includes(ee.inlineLayoutWhen)),dt=computed(()=>["sm","small"].includes(ee.inlineLayoutWhen)),ht=computed(()=>["md","medium"].includes(ee.inlineLayoutWhen)),ft=computed(()=>["lg","large"].includes(ee.inlineLayoutWhen)),pt=computed(()=>ee.align==="center"),mt=computed(()=>ee.align==="right"),yt=ref$1("auto"),vt=computed(()=>`--equisized-width: ${yt.value};`),_t=async()=>{var xt;let bt=0;await new Promise(Mt=>setTimeout(Mt,100)),(xt=te.value)==null||xt.querySelectorAll(".fr-btn").forEach(Mt=>{let Ot=Mt,kt=Ot.offsetWidth,Nt=window.getComputedStyle(Ot),Gt=+Nt.marginLeft.replace("px",""),Bt=+Nt.marginRight.replace("px","");Ot.style.width="var(--equisized-width)";let Ut=kt+Gt+Bt;Ut>bt&&(bt=Ut)}),yt.value=`${bt}px`};return onMounted(async()=>{!te.value||!ee.equisized||await _t()}),(bt,xt)=>(openBlock(),createElementBlock("ul",{ref_key:"buttonsEl",ref:te,style:normalizeStyle(vt.value),class:normalizeClass(["fr-btns-group",{"fr-btns-group--equisized":ne.equisized,"fr-btns-group--sm":st.value,"fr-btns-group--md":ot.value,"fr-btns-group--lg":ct.value,"fr-btns-group--inline-sm":ut.value||dt.value,"fr-btns-group--inline-md":ut.value||ht.value,"fr-btns-group--inline-lg":ut.value||ft.value,"fr-btns-group--center":pt.value,"fr-btns-group--right":mt.value,"fr-btns-group--icon-right":ne.iconRight,"fr-btns-group--inline-reverse":ne.reverse}]),"data-testid":"fr-btns"},[(openBlock(!0),createElementBlock(Fragment,null,renderList(ne.buttons,({onClick:Mt,...Ot},kt)=>(openBlock(),createElementBlock("li",{key:kt},[createVNode(nt$1,mergeProps({ref_for:!0},Ot,{onClick:Mt}),null,16,["onClick"])]))),128)),renderSlot(bt.$slots,"default")],6))}}),St=["id","name","value","checked","required","data-testid","data-test","tabindex","aria-describedby"],Ct=["for"],wt={key:0,class:"required"},Tt={key:0,class:"fr-hint-text"},Et=["id"],Dt=Q$2(defineComponent({inheritAttrs:!1,__name:"DsfrCheckbox",props:mergeModels({id:{default:()=>Z$2("basic","checkbox")},name:{},required:{type:Boolean},value:{},checked:{type:Boolean},modelValue:{},small:{type:Boolean},inline:{type:Boolean},readonly:{type:Boolean},readonlyOpacity:{default:.75},label:{default:""},errorMessage:{default:""},validMessage:{default:""},hint:{default:""}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(ne){useCssVars(ut=>({v3f90cb04:ut.readonlyOpacity}));let ee=ne,te=computed(()=>ee.errorMessage||ee.validMessage),st=computed(()=>te.value?Z$2("message","checkbox"):void 0),ot=computed(()=>ee.errorMessage?"fr-error-text":"fr-valid-text"),ct=useModel(ne,"modelValue");return(ut,dt)=>(openBlock(),createElementBlock("div",{class:normalizeClass(["fr-fieldset__element",{"fr-fieldset__element--inline":ne.inline,readonly:ne.readonly}])},[createBaseVNode("div",{class:normalizeClass(["fr-checkbox-group",{"fr-checkbox-group--error":ne.errorMessage,"fr-checkbox-group--valid":!ne.errorMessage&&ne.validMessage,"fr-checkbox-group--sm":ne.small}])},[withDirectives(createBaseVNode("input",mergeProps({id:ne.id,"onUpdate:modelValue":dt[0]||(dt[0]=ht=>ct.value=ht),name:ne.name,type:"checkbox",value:ne.value,checked:ct.value===!0||Array.isArray(ct.value)&&ct.value.includes(ne.value),required:ne.required},ut.$attrs,{"data-testid":`input-checkbox-${ne.id}`,"data-test":`input-checkbox-${ne.id}`,tabindex:ne.readonly?-1:void 0,"aria-describedby":st.value}),null,16,St),[[vModelCheckbox,ct.value]]),createBaseVNode("label",{for:ne.id,class:"fr-label"},[renderSlot(ut.$slots,"label",{},()=>[createTextVNode(toDisplayString(ne.label)+" ",1),renderSlot(ut.$slots,"required-tip",{},()=>[ne.required?(openBlock(),createElementBlock("span",wt," *")):createCommentVNode("",!0)],!0)],!0),ne.hint?(openBlock(),createElementBlock("span",Tt,toDisplayString(ne.hint),1)):createCommentVNode("",!0)],8,Ct),te.value?(openBlock(),createElementBlock("div",{key:0,id:st.value,class:"fr-messages-group","aria-live":"assertive",role:"alert"},[createBaseVNode("p",{class:normalizeClass(["fr-message--info flex items-center",ot.value])},toDisplayString(te.value),3)],8,Et)):createCommentVNode("",!0)],2)],2))}}),[["__scopeId","data-v-a88dd297"]]),Pt={class:"fr-consent-banner__content"},Ft={class:"fr-text--sm"},It={class:"fr-consent-banner__buttons fr-btns-group fr-btns-group--right fr-btns-group--inline-reverse fr-btns-group--inline-sm"},Lt=["aria-controls"],Rt=defineComponent({__name:"DsfrConsent",props:{url:{default:""}
67,ariaControlsId:{}},emits:["acceptAll","refuseAll","customize"],setup(ne){let ee=ne,te=computed(()=>typeof ee.url=="string"&&ee.url.startsWith("http")),st=computed(()=>ee.url?te.value?"a":"RouterLink":"a"),ot=computed(()=>({[te.value?"href":"to"]:ee.url}));return(ct,ut)=>(openBlock(),createElementBlock(Fragment,null,[createBaseVNode("div",Pt,[createBaseVNode("p",Ft,[renderSlot(ct.$slots,"default",{},()=>[ut[4]||(ut[4]=createTextVNode(" Bienvenue ! Nous utilisons des cookies pour améliorer votre expérience et les services disponibles sur ce site. Pour en savoir plus, visitez la page ",-1)),(openBlock(),createBlock(resolveDynamicComponent(st.value),mergeProps(ot.value,{"data-testid":"link"}),{default:withCtx(()=>[...ut[3]||(ut[3]=[createTextVNode(" Données personnelles et cookies ",-1)])]),_:1},16)),ut[5]||(ut[5]=createTextVNode(". Vous pouvez, à tout moment, avoir le contrôle sur les cookies que vous souhaitez activer. ",-1))])])]),createBaseVNode("ul",It,[createBaseVNode("li",null,[createBaseVNode("button",{class:"fr-btn",title:"Autoriser tous les cookies",onClick:ut[0]||(ut[0]=withModifiers(dt=>ct.$emit("acceptAll"),["stop"]))}," Tout accepter ")]),createBaseVNode("li",null,[createBaseVNode("button",{class:"fr-btn",title:"Refuser tous les cookies",onClick:ut[1]||(ut[1]=withModifiers(dt=>ct.$emit("refuseAll"),["stop"]))}," Tout refuser ")]),createBaseVNode("li",null,[createBaseVNode("button",{class:"fr-btn fr-btn--secondary","data-fr-opened":"false","aria-controls":ne.ariaControlsId,title:"Personnaliser les cookies",onClick:ut[2]||(ut[2]=withModifiers(dt=>ct.$emit("customize"),["stop"]))}," Personnaliser ",8,Lt)])])],64))}}),$t=["for"],en={key:0,class:"required"},tn$1={key:0,class:"fr-hint-text"},nn=["id","name","disabled","aria-disabled","required","aria-describedby"],rn=["selected"],an=["selected","value","disabled","aria-disabled"],on$2=["label","disabled","aria-disabled"],sn$1=["selected","value","disabled","aria-disabled"],cn$1=["id"],ln$1=defineComponent({inheritAttrs:!1,__name:"DsfrSelect",props:{required:{type:Boolean},disabled:{type:Boolean},selectId:{default:()=>Z$2("select")},name:{default:void 0},description:{default:void 0},hint:{default:void 0},modelValue:{default:void 0},label:{default:""},hideLabel:{type:Boolean},options:{default:()=>[]},successMessage:{default:""},errorMessage:{default:""},defaultUnselectedText:{default:"Sélectionner une option"},optionGroups:{default:()=>[]},isValid:{type:Boolean},isInvalid:{type:Boolean},descriptionId:{}},emits:["update:modelValue"],setup(ne){let ee=ne;ee.description&&console.warn("[DsfrSelect] : La prop `description` est obsolète. Veuillez utiliser `hint` à la place.");let te=computed(()=>!!(ee.errorMessage||ee.isInvalid)),st=computed(()=>!!(ee.successMessage||ee.isValid)&&!te.value),ot=computed(()=>te.value?ee.errorMessage:st.value?ee.successMessage:void 0);return(ct,ut)=>(openBlock(),createElementBlock("div",{class:normalizeClass(["fr-select-group",{"fr-select-group--error":te.value,"fr-select-group--valid":st.value}])},[createBaseVNode("label",{class:normalizeClass(["fr-label",{"fr-sr-only":ne.hideLabel}]),for:ne.selectId},[renderSlot(ct.$slots,"label",{},()=>[createTextVNode(toDisplayString(ne.label)+" ",1),renderSlot(ct.$slots,"required-tip",{},()=>[ne.required?(openBlock(),createElementBlock("span",en," *")):createCommentVNode("",!0)])]),ne.hint??ne.description?(openBlock(),createElementBlock("span",tn$1,toDisplayString(ne.hint??ne.description),1)):createCommentVNode("",!0)],10,$t),createBaseVNode("select",mergeProps({id:ne.selectId,class:[{"fr-select--error":te.value,"fr-select--valid":st.value},"fr-select"],name:ne.name||ne.selectId,disabled:ne.disabled,"aria-disabled":ne.disabled,required:ne.required},ct.$attrs,{"aria-describedby":[ct.$attrs["aria-describedby"],ne.descriptionId].filter(Boolean).join(" ")||void 0,onChange:ut[0]||(ut[0]=dt=>{var ht;return ct.$emit("update:modelValue",(ht=dt.target)==null?void 0:ht.value)})}),[createBaseVNode("option",{selected:!ne.options.some(dt=>typeof dt!="object"||!dt?dt===ne.modelValue:dt.value===ne.modelValue),disabled:"",value:""},toDisplayString(ne.defaultUnselectedText),9,rn),(openBlock(!0),createElementBlock(Fragment,null,renderList(ne.options,
67(dt,ht)=>(openBlock(),createElementBlock("option",{key:ht,selected:ne.modelValue===dt||typeof dt=="object"&&dt.value===ne.modelValue,value:typeof dt=="object"?dt.value:dt,disabled:!!(ne.disabled||typeof dt=="object"&&dt.disabled),"aria-disabled":!!(ne.disabled||typeof dt=="object"&&dt.disabled)},toDisplayString(typeof dt=="object"?dt.text:dt),9,an))),128)),(openBlock(!0),createElementBlock(Fragment,null,renderList(ne.optionGroups,(dt,ht)=>(openBlock(),createElementBlock("optgroup",{key:ht,label:dt.label,disabled:dt.disabled,"aria-disabled":!!dt.disabled},[(openBlock(!0),createElementBlock(Fragment,null,renderList(dt.options,(ft,pt)=>(openBlock(),createElementBlock("option",{key:pt,selected:ne.modelValue===ft||typeof ft=="object"&&ft.value===ne.modelValue,value:typeof ft=="object"?ft.value:ft,disabled:!!(ne.disabled||typeof ft=="object"&&ft.disabled||dt.disabled),"aria-disabled":!!(ne.disabled||typeof ft=="object"&&ft.disabled||dt.disabled)},toDisplayString(typeof ft=="object"?ft.text:ft),9,sn$1))),128))],8,on$2))),128))],16,nn),ot.value?(openBlock(),createElementBlock("p",{key:0,id:`select-${te.value?"error":"valid"}-desc-${te.value?"error":"valid"}`,class:normalizeClass(te.value?"fr-error-text":"fr-valid-text")},toDisplayString(ot.value),11,cn$1)):createCommentVNode("",!0)],2))}}),tr={class:"fr-follow__newsletter"},nr={class:"fr-h5 fr-follow__title"},rr={class:"fr-text--sm fr-follow__desc"},ir={key:0},ar=["title"],or={key:1},sr={class:"fr-label",for:"newsletter-email"},cr={class:"fr-input-wrap fr-input-wrap--addon"},lr=["title","placeholder"],ur=["title"],dr={key:0,class:"fr-messages-group",role:"alert"},fr={id:"newsletter-email-desc-error",class:"fr-error-text"},pr={id:"fr-newsletter-hint-text",class:"fr-hint-text"},mr=defineComponent({__name:"DsfrNewsLetter",props:mergeModels({title:{default:"Abonnez-vous à notre lettre d’information"},description:{default:""},email:{default:""},error:{default:""},labelEmail:{default:"Votre adresse électronique (ex. : [email protected])"},placeholder:{default:"[email protected]"},hintText:{default:""},inputTitle:{default:"Adresse courriel"},buttonText:{default:"S’abonner"},buttonTitle:{default:"S‘abonner à notre lettre d’information"},buttonAction:{type:Function,default:()=>{}},onSubmit:{type:Function,default:()=>{}},onlyCallout:{type:Boolean,default:!1}},{email:{},emailModifiers:{}}),emits:["update:email"],setup(ne){let ee=useModel(ne,"email");return(te,st)=>(openBlock(),createElementBlock("div",tr,[createBaseVNode("div",null,[createBaseVNode("h3",nr,toDisplayString(ne.title),1),createBaseVNode("p",rr,toDisplayString(ne.description),1)]),ne.onlyCallout?(openBlock(),createElementBlock("div",ir,[createBaseVNode("button",{class:"fr-btn",title:ne.buttonTitle,onClick:st[0]||(st[0]=ot=>ne.buttonAction?ne.buttonAction(ot):()=>{})},toDisplayString(ne.buttonText),9,ar)])):(openBlock(),createElementBlock("div",or,[createBaseVNode("form",{onSubmit:st[2]||(st[2]=withModifiers(ot=>ne.onSubmit(ee.value),["prevent"]))},[createBaseVNode("label",sr,toDisplayString(ne.labelEmail),1),createBaseVNode("div",cr,[withDirectives(createBaseVNode("input",{id:"newsletter-email","onUpdate:modelValue":st[1]||(st[1]=ot=>ee.value=ot),class:"fr-input","aria-describedby":"fr-newsletter-hint-text",title:ne.inputTitle||ne.labelEmail,placeholder:ne.placeholder||ne.labelEmail,type:"email",name:"newsletter-email",autocomplete:"email"},null,8,lr),[[vModelText,ee.value]]),createBaseVNode("button",{id:"newsletter-button",class:"fr-btn",title:ne.buttonTitle,type:"submit"},toDisplayString(ne.buttonText),9,ur)]),ne.error?(openBlock(),createElementBlock("div",dr,[createBaseVNode("p",fr,toDisplayString(ne.error),1)])):createCommentVNode("",!0),createBaseVNode("p",pr,toDisplayString(ne.hintText),1)],32)]))]))}}),hr={class:"fr-follow__social"},gr={key:0,class:"fr-btns-group fr-btns-group--lg"},_r=["title","href"],vr=defineComponent({__name:"DsfrSocialNetworks",props:{networks:{},titleTag:{default:"h3"}},setup(ne){return(ee,te)=>{var st;return openBlock(),createElementBlock("div",hr,[(openBlock(),createBlock(resolveDynamicComponent(ne.titleTag),{class:"fr-h5 fr-mb-3v fr-mb-3v"},{default:withCtx(()=>[...te[0]||(te[0]=[createTextVNode(" Suivez-nous ",-1),createBaseVNode("br",null,null,-1),createTextVNode(" sur les réseaux sociaux ",-1)])]),_:1})),(st=ne.networks)!=null&&st.length?(openBlock(),createElementBlock("ul",gr,[(openBlock(!0),createElementBlock(Fragment,null,renderList(ne.networks,(ot,ct)=>(openBlock(),createElementBlock("li",{key:ct},[createBaseVNode("a",{class:normalizeClass(["fr-btn",`fr-btn--${ot.type}`]),title:ot.name,href:ot.href,target:"_blank",rel:"noopener noreferrer"},toDisplayString(ot.name),11,_r)]))),128))])):createCommentVNode("",!0)])}}}),yr={class:"fr-follow"},br={class:"fr-container"},xr={class:"fr-grid-row"},Sr=defineComponent({__name:"DsfrFollow",props:{newsletterData:{default:()=>{}},networks:{default:()=>[]}},setup(ne){let ee=ne,te=computed(()=>ee.networks&&ee.networks.length),st=computed(()=>typeof ee.newsletterData=="object");return(ot,ct)=>(openBlock(),createElementBlock("div",yr,[createBaseVNode("div",br,[createBaseVNode("div",xr,[render
67Slot(ot.$slots,"default",{},()=>[ne.newsletterData?(openBlock(),createElementBlock("div",{key:0,class:normalizeClass(["fr-col-12",{"fr-col-md-8":te.value}])},[createVNode(mr,normalizeProps(guardReactiveProps(ne.newsletterData)),null,16)],2)):createCommentVNode("",!0),te.value?(openBlock(),createElementBlock("div",{key:1,class:normalizeClass(["fr-col-12",{"fr-col-md-4":st.value}])},[createVNode(vr,{networks:ne.networks},null,8,["networks"])],2)):createCommentVNode("",!0)])])])]))}}),Cr=1,wr=defineComponent({__name:"DsfrFooterLink",props:{button:{type:Boolean},icon:{default:void 0},iconAttrs:{default:()=>({})},iconRight:{type:Boolean},label:{default:""},target:{default:void 0},onClick:{type:Function,default:()=>{}},to:{default:void 0},href:{default:void 0},title:{}},setup(ne){let ee=ne,te=computed(()=>{var pt;return(pt=ee.href)==null?void 0:pt.startsWith("http")}),st=computed(()=>{var pt;return(pt=ee.href)==null?void 0:pt.startsWith("mailto")}),ot=computed(()=>ee.button?"button":te.value||st.value?"a":"RouterLink"),ct=computed(()=>{if(!(!te.value&&!st.value))return ee.href}),ut=computed(()=>{if(!(te.value||st.value))return ee.to}),dt=computed(()=>ut.value?{to:ut.value}:{href:ct.value}),ht=computed(()=>typeof ee.icon=="string"&&ee.icon.startsWith("fr-icon-")),ft=computed(()=>typeof ee.icon=="string"?{name:ee.icon,scale:Cr,...ee.iconAttrs??{}}:{scale:Cr,...ee.icon??{},...ee.iconAttrs??{}});return(pt,mt)=>(openBlock(),createBlock(resolveDynamicComponent(ot.value),mergeProps({class:["fr-footer__bottom-link",{"fr-btn--icon-right":ht.value&&ne.iconRight,"fr-btn--icon-left":ht.value&&!ne.iconRight,[String(ne.icon)]:ht.value}]},dt.value,{target:ne.target,onClick:withModifiers(ne.onClick,["stop"])}),{default:withCtx(()=>{var yt,vt;return[!ht.value&&(ne.icon||(yt=ne.iconAttrs)!=null&&yt.name)&&!ne.iconRight?(openBlock(),createBlock($$3,mergeProps({key:0,class:"fr-mr-1w"},ft.value),null,16)):createCommentVNode("",!0),createTextVNode(" "+toDisplayString(ne.label)+" ",1),!ht.value&&(ne.icon||(vt=ne.iconAttrs)!=null&&vt.name)&&ne.iconRight?(openBlock(),createBlock($$3,mergeProps({key:1,class:"fr-ml-1w"},ft.value),null,16)):createCommentVNode("",!0)]}),_:1},16,["class","target","onClick"]))}}),Tr={class:"fr-footer__partners"},Er={class:"fr-footer__partners-logos"},Dr={key:0,class:"fr-footer__partners-main"},Or=["href"],kr=["src","alt"],Ar={class:"fr-footer__partners-sub"},jr=["href"],Mr=["src","alt"],Nr=defineComponent({__name:"DsfrFooterPartners",props:{mainPartner:{default:void 0},subPartners:{default:()=>[]},title:{default:""},titleTag:{default:"h4"}}
67,setup(ne){return(ee,te)=>(openBlock(),createElementBlock("div",Tr,[ne.title?(openBlock(),createBlock(resolveDynamicComponent(ne.titleTag),{key:0,class:"fr-footer__partners-title"},{default:withCtx(()=>[createTextVNode(toDisplayString(ne.title),1)]),_:1})):createCommentVNode("",!0),createBaseVNode("div",Er,[ne.mainPartner?(openBlock(),createElementBlock("div",Dr,[createBaseVNode("a",{class:"fr-footer__partners-link",href:ne.mainPartner.href,target:"_blank",rel:"noopener noreferrer"},[createBaseVNode("img",{class:"fr-footer__logo",src:ne.mainPartner.logo,alt:ne.mainPartner.name},null,8,kr)],8,Or)])):createCommentVNode("",!0),createBaseVNode("div",Ar,[createBaseVNode("ul",null,[(openBlock(!0),createElementBlock(Fragment,null,renderList(ne.subPartners,(st,ot)=>(openBlock(),createElementBlock("li",{key:ot},[createBaseVNode("a",{class:"fr-footer__partners-link",href:st.href,target:"_blank",rel:"noopener noreferrer"},[createBaseVNode("img",{class:"fr-footer__logo",src:st.logo,alt:st.name},null,8,Mr)],8,jr)]))),128))])])])]))}}),Pr=["innerHTML"],Fr=defineComponent({__name:"DsfrLogo",props:{small:{type:Boolean},large:{type:Boolean},logoText:{default:()=>"Gouvernement"}},setup(ne){let ee=ne,te=computed(()=>Array.isArray(ee.logoText)?ee.logoText.join("<br>"):ee.logoText);return(st,ot)=>(openBlock(),createElementBlock("p",{class:normalizeClass(["fr-logo",{"fr-logo--sm":ne.small&&!ne.large,"fr-logo--lg":ne.large&&!ne.small}]),innerHTML:te.value},null,10,Pr))}}),Ir={id:"footer",class:"fr-footer",role:"contentinfo"},Lr={key:0,class:"fr-footer__top"},Rr={class:"fr-container"},zr={class:"fr-grid-row fr-grid-row--start fr-grid-row--gutters"},Br={class:"fr-container"},Vr={class:"fr-footer__body"},Hr={key:0,class:"fr-footer__brand fr-enlarge-link"},Ur=["href"],Wr=["src","alt"],Gr=["src","alt"],Kr={key:1,class:"fr-footer__brand fr-enlarge-link"},qr={class:"fr-footer__content"},Jr={class:"fr-footer__content-desc"},Yr={class:"fr-footer__content-list"},Xr=["href","title"],Zr={class:"fr-footer__bottom"},Qr={class:"fr-footer__bottom-list"},$r={key:0,class:"fr-footer__bottom-copy"},ei=Q$2(defineComponent({__name:"DsfrFooter",props:{a11yCompliance:{default:"non conforme"},a11yComplianceLink:{default:"/a11y"},legalLink:{default:"/mentions-legales"},homeLink:{default:"/"},homeTitle:{default:"Retour à l’accueil"},partners:{default:()=>{}},personalDataLink:{default:"/donnees-personnelles"},cookiesLink:{default:"/cookies"},logoText:{default:()=>["République","Française"]},descText:{default:void 0},beforeMandatoryLinks:{default:()=>[]},afterMandatoryLinks:{default:()=>[]},mandatoryLinks:{default:ne=>[{label:`Accessibilité : ${ne.a11yCompliance}`,to:ne.a11yComplianceLink},{label:"Mentions légales",to:ne.legalLink,"data-testid":"/mentions-legales"},{label:"Données personnelles",to:ne.personalDataLink},{label:"Gestion des cookies",to:ne.cookiesLink}]},ecosystemLinks:{default:()=>[{label:"info.gouv.fr",href:"https://info.gouv.fr",title:"info.gouv.fr, Informations gouvernementales, ouvre une nouvelle fenêtre"},{label:"service-public.gouv.fr",href:"https://service-public.gouv.fr",title:"service-public.gouv.fr, Informations et démarches administratives, ouvre une nouvelle fenêtre"},{label:"legifrance.gouv.fr",href:"https://legifrance.gouv.fr",title:"legifrance.gouv.fr, Service public de diffusion du droit, ouvre une nouvelle fenêtre"},{label:"data.gouv.fr",href:"https://data.gouv.fr",title:"data.gouv.fr, Plateforme des données publiques, ouvre une nouvelle fenêtre"}]},operatorLinkText:{default:"Revenir à l’accueil"},operatorTo:{default:"/"},operatorImgStyle:{type:[Boolean,null,String,Object,Array],default:void 0},operatorImgSrc:{default:void 0},operatorImgAlt:{default:""},licenceTo:{default:"https://github.com/etalab/licence-ouverte/blob/master/LO.md"},licenceLinkProps:{default:()=>{}},licenceText:{default:"Sauf mention explicite de propriété intellectuelle détenue par des tiers, les contenus de ce site sont proposés sous"},licenceName:{default:"licence etalab-2.0"}},setup(ne){let ee=ne,te=computed(()=>ee.mandatoryLinks??[{label:`Accessibilité : ${ee.a11yCompliance}`,to:ee.a11yComplianceLink},{label:"Mentions légales",to:ee.legalLink,"data-testid":"/mentions-legales"},{label:"Données personnelles",to:ee.personalDataLink},{label:"Gestion des cookies",to:ee.cookiesLink}]),st=computed(()=>[...ee.beforeMandatoryLinks,...te.value,...ee.afterMandatoryLinks]),ot=useSlots(),ct=computed(()=>{var mt;return(mt=ot["footer-link-lists"])==null?void 0:mt.call(ot)}),ut=computed(()=>{let mt=ee.licenceTo||ee.licenceLinkProps.to;return mt&&typeof mt=="string"&&mt.startsWith("http")}),dt=computed(()=>{let{to:mt,href:yt,...vt}=ee.licenceLinkProps??{};return vt}),ht=computed(()=>ut.value?"":ee.licenceTo),ft=computed(()=>ut.value?ee.licenceTo:""),pt=computed(()=>
67typeof ee.operatorTo=="string"&&ee.operatorTo.startsWith("http"));return(mt,yt)=>{let vt=resolveComponent("RouterLink");return openBlock(),createElementBlock("footer",Ir,[ct.value?(openBlock(),createElementBlock("div",Lr,[createBaseVNode("div",Rr,[createBaseVNode("div",zr,[renderSlot(mt.$slots,"footer-link-lists",{},void 0,!0)])])])):createCommentVNode("",!0),createBaseVNode("div",Br,[createBaseVNode("div",Vr,[ne.operatorImgSrc?(openBlock(),createElementBlock("div",Hr,[createVNode(Fr,{"logo-text":ne.logoText},null,8,["logo-text"]),pt.value?(openBlock(),createElementBlock("a",{key:0,href:ne.operatorTo,"data-testid":"card-link",class:"fr-footer__brand-link"},[createBaseVNode("img",{class:"fr-footer__logo",style:normalizeStyle(ne.operatorImgStyle),src:ne.operatorImgSrc,alt:ne.operatorImgAlt},null,12,Wr)],8,Ur)):(openBlock(),createBlock(vt,{key:1,class:"fr-footer__brand-link",to:ne.homeLink,title:ne.homeTitle},{default:withCtx(()=>[createBaseVNode("img",{class:"fr-footer__logo",style:normalizeStyle(ne.operatorImgStyle),src:ne.operatorImgSrc,alt:ne.operatorImgAlt},null,12,Gr)]),_:1},8,["to","title"]))])):(openBlock(),createElementBlock("div",Kr,[createVNode(vt,{to:ne.homeLink,title:ne.homeTitle},{default:withCtx(()=>[createVNode(Fr,{"logo-text":ne.logoText},null,8,["logo-text"])]),_:1},8,["to","title"])])),createBaseVNode("div",qr,[createBaseVNode("p",Jr,[renderSlot(mt.$slots,"description",{},()=>[createTextVNode(toDisplayString(ne.descText),1)],!0)]),createBaseVNode("ul",Yr,[(openBlock(!0),createElementBlock(Fragment,null,renderList(ne.ecosystemLinks,({href:_t,label:bt,title:xt,...Mt},Ot)=>(openBlock(),createElementBlock("li",{key:Ot,class:"fr-footer__content-item"},[createBaseVNode("a",mergeProps({class:"fr-footer__content-link",href:_t,target:"_blank",rel:"noopener noreferrer",title:xt},{ref_for:!0},Mt),toDisplayString(bt),17,Xr)]))),128))])])]),renderSlot(mt.$slots,"footer-partners",{},()=>[ne.partners?(openBlock(),createBlock(Nr,normalizeProps(mergeProps({key:0},ne.partners)),null,16)):createCommentVNode("",!0)],!0),createBaseVNode("div",Zr,[createBaseVNode("ul",Qr,[(openBlock(!0),createElementBlock(Fragment,null,renderList(st.value,(_t,bt)=>(openBlock(),createElementBlock("li",{key:bt,class:"fr-footer__bottom-item"},[createVNode(wr,mergeProps({ref_for:!0},_t),null,16)]))),128))]),ne.licenceText?(openBlock(),createElementBlock("div",$r,[createBaseVNode("p",null,[createTextVNode(toDisplayString(ne.licenceText)+" ",1),(openBlock(),createBlock(resolveDynamicComponent(ut.value?"a":"RouterLink"),mergeProps({class:"fr-link-licence no-content-after",to:ut.value?void 0:ht.value,href:ut.value?ft.value:void 0,target:ut.value?"_blank":void 0,title:ut.value?`${ne.licenceName} (nouvelle fenêtre)`:ne.licenceName,rel:"noopener noreferrer"},dt.value),{default:withCtx(()=>[createTextVNode(toDisplayString(ne.licenceName),1)]),_:1},16,["to","href","target","title"]))])])):createCommentVNode("",!0)])])])}}}),[["__scopeId","data-v-c992f399"]]),si=["input:not([inert]):not([inert] *)","select:not([inert]):not([inert] *)","textarea:not([inert]):not([inert] *)","a[href]:not([inert]):not([inert] *)","area[href]:not([inert]):not([inert] *)","button:not([inert]):not([inert] *)","[tabindex]:not(slot):not([inert]):not([inert] *)","audio[controls]:not([inert]):not([inert] *)","video[controls]:not([inert]):not([inert] *)",'[contenteditable]:not([contenteditable="false"]):not([inert]):not([inert] *)',"details>summary:first-of-type:not([inert]):not([inert] *)","details:not([inert]):not([inert] *)"],ci=si.join(","),li=typeof Element>"u",ui=li?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,di=!li&&Element.prototype.getRootNode?function(ne){var ee;return(ee=ne==null?void 0:ne.getRootNode)==null?void 0:ee.call(ne)}:function(ne){return ne==null?void 0:ne.ownerDocument},fi=function(ne,ee){var st;ee===void 0&&(ee=!0);var te=(st=ne==null?void 0:ne.getAttribute)==null?void 0:st.call(ne,"inert");return te===""||te==="true"||ee&&ne&&(typeof ne.closest=="function"?ne.closest("[inert]"):fi(ne.parentNode))},pi=function(ne){var te;var ee=(te=ne==null?void 0:ne.getAttribute)==null?void 0:te.call(ne,"contenteditable");return ee===""||ee==="true"},mi=function(ne,ee,te){if(fi(ne))return[];var st=Array.prototype.slice.apply(ne.querySelectorAll(ci));return ee&&ui.call(ne,ci)&&st.unshift(ne),st=st.filter(te),st},hi=function(ne,ee,te){for(var st=[],ot=Array.from(ne);ot.length;){var ct=ot.shift();if(!fi(ct,!1))if(ct.tagName==="SLOT"){var ut=ct.assignedElements(),dt=hi(ut.length?ut:ct.children,!0,te);te.flatten?st.push.apply(st,dt):st.push({scopeParent:ct,candidates:dt})}else{ui.call(ct,ci)&&te.filter(ct)&&(ee||!ne.includes(ct))&&st.push(ct);var ht=ct.shadowRoot||typeof te.getShadowRoot=="function"&&te.getShadowRoot(ct),ft=!fi(ht,!1)&&(!te.shadowRootFilter||te.shadowRootFilter(ct));if(ht&&ft){var pt=hi(ht===!0?ct.children:ht.children,!0,te);te.flatten?st.push.apply(st,pt):st.push({scopeParent:ct,candidates:pt})}else ot.unshift.apply(ot,ct.children)}}return st},gi=function(ne){return!isNaN(parseInt(ne.getAttribute("tabindex"),10))},_i=function(ne){if(!ne)throw Error("No node provided");return ne.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(ne.tagName)||pi(ne))&&!gi(ne)?0:ne.tabIndex},vi=function(ne,ee){var te=_i(ne);return te<0&&ee&&!gi(ne)?0:te},yi=function(ne,ee){return ne.tabIndex===ee.tabIndex?ne.documentOrder-ee.documentOrder:ne.tabIndex-ee.tabIndex},bi=function(ne){return ne.tagName==="INPUT"},xi=function(ne){return bi(ne)&&ne.type==="hidden"},Si=function(ne){return ne.tagName==="DETAILS"&&Array.prototype.slice.apply(ne.children).some(function(ee){return ee.tagName==="SUMMARY"})},Ci=function(ne,ee){for(var te=0;te<ne.length;te++)if(ne[te].checked&&ne[te].form===ee)return ne[te]},wi=function(ne){if(!ne.name)return!0;var ee=ne.form||di(ne),te=function(ct){return ee.querySelectorAll('input[type="radio"][name="'+ct+'"]')},st;if(typeof window<"u"&&window.CSS!==void 0&&typeof window.CSS.escape=="function")st=te(window.CSS.escape(ne.name));else try{st=te(ne.name)}catch(ct){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",ct.message),!1}var ot=Ci(st,ne.form);return!ot||ot===ne},Ti=function(ne){return bi(ne)&&ne.type==="radio"},Ei=function(ne){return Ti(ne)&&!wi(ne)},Di=function(ne){var ee=ne&&di(ne),te=ee==null?void 0:ee.host,st=!1;if(ee&&ee!==ne){var ot,ct,ut;for(st=!!((ot=te)!=null&&(ct=ot.ownerDocument)!=null&&ct.contains(te)||ne!=null&&(ut
vendor: 4,335 bytes, lines 67-69
67=ne.ownerDocument)!=null&&ut.contains(ne));!st&&te;){var dt,ht;ee=di(te),te=ee==null?void 0:ee.host,st=!!((dt=te)!=null&&(ht=dt.ownerDocument)!=null&&ht.contains(te))}}return st},Oi=function(ne){var ee=ne.getBoundingClientRect(),te=ee.width,st=ee.height;return te===0&&st===0},ki=function(ne,ee){var te=ee.displayCheck,st=ee.getShadowRoot;if(te==="full-native"&&"checkVisibility"in ne)return!ne.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});var ot=getComputedStyle(ne).visibility;if(ot==="hidden"||ot==="collapse")return!0;var ct=ui.call(ne,"details>summary:first-of-type")?ne.parentElement:ne;if(ui.call(ct,"details:not([open]) *"))return!0;if(!te||te==="full"||te==="full-native"||te==="legacy-full"){if(typeof st=="function"){for(var ut=ne;ne;){var dt=ne.parentElement,ht=di(ne);if(dt&&!dt.shadowRoot&&st(dt)===!0)return Oi(ne);ne=ne.assignedSlot?ne.assignedSlot:!dt&&ht!==ne.ownerDocument?ht.host:dt}ne=ut}if(Di(ne))return!ne.getClientRects().length;if(te!=="legacy-full")return!0}else if(te==="non-zero-area")return Oi(ne);return!1},Ai=function(ne){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(ne.tagName))for(var ee=ne.parentElement;ee;){if(ee.tagName==="FIELDSET"&&ee.disabled){for(var te=0;te<ee.children.length;te++){var st=ee.children.item(te);if(st.tagName==="LEGEND")return ui.call(ee,"fieldset[disabled] *")?!0:!st.contains(ne)}return!0}ee=ee.parentElement}return!1},ji=function(ne,ee){return!(ee.disabled||xi(ee)||ki(ee,ne)||Si(ee)||Ai(ee))},Mi=function(ne,ee){return!(Ei(ee)||_i(ee)<0||!ji(ne,ee))},Ni=function(ne){var ee=parseInt(ne.getAttribute("tabindex"),10);return!!(isNaN(ee)||ee>=0)},Pi=function(ne){var ee=[],te=[];return ne.forEach(function(st,ot){var ct=!!st.scopeParent,ut=ct?st.scopeParent:st,dt=vi(ut,ct),ht=ct?Pi(st.candidates):ut;dt===0?ct?ee.push.apply(ee,ht):ee.push(ut):te.push({documentOrder:ot,tabIndex:dt,item:st,isScope:ct,content:ht})}),te.sort(yi).reduce(function(st,ot){return ot.isScope?st.push.apply(st,ot.content):st.push(ot.content),st},[]).concat(ee)},Fi=function(ne,ee){return ee||(ee={}),Pi(ee.getShadowRoot?hi([ne],ee.includeContainer,{filter:Mi.bind(null,ee),flatten:!1,getShadowRoot:ee.getShadowRoot,shadowRootFilter:Ni}):mi(ne,ee.includeContainer,Mi.bind(null,ee)))},Ii=function(ne,ee){return ee||(ee={}),ee.getShadowRoot?hi([ne],ee.includeContainer,{filter:ji.bind(null,ee),flatten:!0,getShadowRoot:ee.getShadowRoot}):mi(ne,ee.includeContainer,ji.bind(null,ee))},Li=function(ne,ee){if(ee||(ee={}),!ne)throw Error("No node provided");return ui.call(ne,ci)!==!1&&Mi(ee,ne)},Ri=si.concat("iframe:not([inert]):not([inert] *)").join(","),zi=function(ne,ee){if(ee||(ee={}),!ne)throw Error("No node provided");return ui.call(ne,Ri)!==!1&&ji(ee,ne)};function Bi(ne,ee){(ee==null||ee>ne.length)&&(ee=ne.length);for(var te=0,st=Array(ee);te<ee;te++)st[te]=ne[te];return st}function Vi(ne){if(Array.isArray(ne))return Bi(ne)}function Hi(ne,ee){var te=typeof Symbol<"u"&&ne[Symbol.iterator]||ne["@@iterator"];if(!te){if(Array.isArray(ne)||(te=Zi(ne))||ee){te&&(ne=te);var st=0,ot=function(){};return{s:ot,n:function(){return st>=ne.length?{done:!0}:{done:!1,value:ne[st++]}},e:function(ht){throw ht},f:ot}}throw TypeError(`Invalid attempt to iterate non-iterable instance.
68In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var ct,ut=!0,dt=!1;return{s:function(){te=te.call(ne)},n:function(){var ht=te.next();return ut=ht.done,ht},e:function(ht){dt=!0,ct=ht},f:function(){try{ut||te.return==null||te.return()}finally{if(dt)throw ct}}}}function Ui(ne,ee,te){return(ee=Xi(ee))in ne?Object.defineProperty(ne,ee,{value:te,enumerable:!0,configurable:!0,writable:!0}):ne[ee]=te,ne}function Wi(ne){if(typeof Symbol<"u"&&ne[Symbol.iterator]!=null||ne["@@iterator"]!=null)return Array.from(ne)}function Gi(){throw TypeError(`Invalid attempt to spread non-iterable instance.
69In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ki(ne,ee){var te=Object.keys(ne);if(Object.getOwnPropertySymbols){var st=Object.getOwnPropertySymbols(ne);ee&&(st=st.filter(function(ot){return Object.getOwnPropertyDescriptor(ne,ot).enumerable})),te.push.apply(te,st)}return te}function qi(ne){for(var ee=1;ee<arguments.length;ee++){var te=arguments[ee]==null?{}:arguments[ee];
69ee%2?Ki(Object(te),!0).forEach(function(st){Ui(ne,st,te[st])}):Object.getOwnPropertyDescriptors?Object.defineProperties(ne,Object.getOwnPropertyDescriptors(te)):Ki(Object(te)).forEach(function(st){Object.defineProperty(ne,st,Object.getOwnPropertyDescriptor(te,st))})}return ne}function Ji(ne){return Vi(ne)||Wi(ne)||Zi(ne)||Gi()}function Yi(ne,ee){if(typeof ne!="object"||!ne)return ne;var te=ne[Symbol.toPrimitive];if(te!==void 0){var st=te.call(ne,ee);if(typeof st!="object")return st;throw TypeError("@@toPrimitive must return a primitive value.")}return(ee==="string"?String:Number)(ne)}function Xi(ne){var ee=Yi(ne,"string");return typeof ee=="symbol"?ee:ee+""}function Zi(ne,ee){if(ne){if(typeof ne=="string")return Bi(ne,ee);var te={}.toString.call(ne).slice(8,-1);return te==="Object"&&ne.constructor&&(te=ne.constructor.name),te==="Map"||te==="Set"?Array.from(ne):te==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(te)?Bi(ne,ee):void 0}}var Qi={getActiveTrap:function(ne){return(ne==null?void 0:ne.length)>0?ne[ne.length-1]:null},activateTrap:function(ne,ee){ee!==Qi.getActiveTrap(ne)&&Qi.pauseTrap(ne);var te=ne.indexOf(ee);te===-1||ne.splice(te,1),ne.push(ee)},deactivateTrap:function(ne,ee){var te=ne.indexOf(ee);te!==-1&&ne.splice(te,1),Qi.unpauseTrap(ne)},pauseTrap:function(ne){var ee;(ee=Qi.getActiveTrap(ne))==null||ee._setPausedState(!0)},unpauseTrap:function(ne){var ee=Qi.getActiveTrap(ne);ee&&!ee._isManuallyPaused()&&ee._setPausedState(!1)}},$i=function(ne){return ne.tagName&&ne.tagName.toLowerCase()==="input"&&typeof ne.select=="function"},ea=function(ne){return(ne==null?void 0:ne.key)==="Escape"||(ne==null?void 0:ne.key)==="Esc"||(ne==null?void 0:ne.keyCode)===27},ta=function(ne){return(ne==null?void 0:ne.key)==="Tab"||(ne==null?void 0:ne.keyCode)===9},na=function(ne){return ta(ne)&&!ne.shiftKey},ra=function(ne){return ta(ne)&&ne.shiftKey},ia=function(ne){return setTimeout(ne,0)},aa=function(ne){var ee=[...arguments].slice(1);return typeof ne=="function"?ne.apply(void 0,ee):ne},oa=function(ne){return ne.target.shadowRoot&&typeof ne.composedPath=="function"?ne.composedPath()[0]:ne.target},sa=[],ca=function(ne,ee){var te=(ee==null?void 0:ee.document)||document,st=(ee==null?void 0:ee.trapStack)||sa,ot=qi({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,delayReturnFocus:!0,isolateSubtrees:!1,isKeyForward:na,isKeyBackward:ra},ee),ct={containers:[],containerGroups:[],tabbableGroups:[],adjacentElements:new Set,alreadySilent:new Set,nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,manuallyPaused:!1,delayInitialFocusTimer:void 0,recentNavEvent:void 0},ut,dt=function(jt,Wt,Jt){return jt&&jt[Wt]!==void 0?jt[Wt]:ot[Jt||Wt]},ht=function(jt,Wt){var Jt=typeof(Wt==null?void 0:Wt.composedPath)=="function"?Wt.composedPath():void 0;return ct.containerGroups.findIndex(function(Qt){var oi=Qt.container,ai=Qt.tabbableNodes;return oi.contains(jt)||(Jt==null?void 0:Jt.includes(oi))||ai.find(function(xn){return xn===jt})})},ft=function(jt){var Wt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Jt=Wt.hasFallback,Qt=Jt!==void 0&&Jt,oi=Wt.params,ai=oi===void 0?[]:oi,xn=ot[jt];if(typeof xn=="function"&&(xn=xn.apply(void 0,Ji(ai))),xn===!0&&(xn=void 0),!xn){if(xn===void 0||xn===!1)return xn;throw Error(`\`${jt}\` was specified but was not a node, or did not return a node`)}var An=xn;if(typeof xn=="string"){try{An=te.querySelector(xn)}catch(Nn){throw Error(`\`${jt}\` appears to be an invalid selector; error="${Nn.message}"`)}if(!An&&!Qt)throw Error(`\`${jt}\` as selector refers to no known node`)}return An},pt=function(jt){var Wt=jt.activeElement;return Wt?Wt.shadowRoot&&Wt.shadowRoot.activeElement!==null?pt(Wt.shadowRoot):Wt:null},mt=function(){var jt=ft("initialFocus",{hasFallback:!0});if(jt===!1)return!1;if(jt===void 0||jt&&!zi(jt,ot.tabbableOptions)){var Wt=pt(te);if(ht(Wt)>=0)jt=Wt;else{var Jt=ct.tabbableGroups[0];jt=Jt&&Jt.firstTabbableNode||ft("fallbackFocus")}}else jt===null&&(jt=ft("fallbackFocus"));if(!jt)throw Error("Your focus-trap needs to have at least one focusable element");return jt},yt=function(){if(ct.containerGroups=ct.containers.map(function(jt){var Wt=Fi(jt,ot.tabbableOptions),Jt=Ii(jt,ot.tabbableOptions),Qt=Wt.length>0?Wt[0]:void 0,oi=Wt.length>0?Wt[Wt.length-1]:void 0,ai=Jt.find(function(An){return Li(An)}),xn=Jt.slice().reverse().find(function(An){return Li(An)});return{container:jt,tabbableNodes:Wt,focusableNodes:Jt,posTabIndexesFound:!!Wt.find(function(An){return _i(An)>0}),firstTabbableNode:Qt,lastTabbableNode:oi,firstDomTabbableNode:ai,lastDomTabbableNode:xn,nextTabbableNode:function(An){var Nn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,Xt=Wt.indexOf(An);return Xt<0?Nn?Jt.slice(Jt.indexOf(An)+1).find(function(Zt){return Li(Zt)}):Jt.slice(0,Jt.indexOf(An)).reverse().find(function(Zt){return Li(Zt)}):Wt[Xt+(Nn?1:-1)]}}}),ct.tabbableGroups=ct.containerGroups.filter(function(jt){return jt.tabbableNodes.length>0}),ct.tabbableGroups.length<=0&&!ft("fallbackFocus"))throw Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times");if(ct.containerGroups.find(function(jt){return jt.posTabIndexesFound})&&ct.containerGroups.length>1)throw Error("At least one node with a positive tabindex was found in one of your focus-trap's multiple containers. Positive tabindexes are only supported in single-container focus-traps.")},vt=function(jt){if(jt!==!1&&jt!==pt(document)){if(!jt||!jt.focus){vt(mt());return}jt.focus({preventScroll:!!ot.preventScroll}),ct.mostRecentlyFocusedNode=jt,$i(jt)&&jt.select()}},_t=function(jt){var Wt=ft("setReturnFocus",{params:[jt]}
vendor: 4,283 bytes, line 69
69);return Wt||Wt!==!1&&jt},bt=function(jt){var Wt=jt.target,Jt=jt.event,Qt=jt.isBackward,oi=Qt!==void 0&&Qt;Wt||(Wt=oa(Jt)),yt();var ai=null;if(ct.tabbableGroups.length>0){var xn=ht(Wt,Jt),An=xn>=0?ct.containerGroups[xn]:void 0;if(xn<0)ai=oi?ct.tabbableGroups[ct.tabbableGroups.length-1].lastTabbableNode:ct.tabbableGroups[0].firstTabbableNode;else if(oi){var Nn=ct.tabbableGroups.findIndex(function(ii){var wn=ii.firstTabbableNode;return Wt===wn});if(Nn<0&&(An.container===Wt||zi(Wt,ot.tabbableOptions)&&!Li(Wt,ot.tabbableOptions)&&!An.nextTabbableNode(Wt,!1))&&(Nn=xn),Nn>=0){var Xt=Nn===0?ct.tabbableGroups.length-1:Nn-1,Zt=ct.tabbableGroups[Xt];ai=_i(Wt)>=0?Zt.lastTabbableNode:Zt.lastDomTabbableNode}else ta(Jt)||(ai=An.nextTabbableNode(Wt,!1))}else{var Kt=ct.tabbableGroups.findIndex(function(ii){var wn=ii.lastTabbableNode;return Wt===wn});if(Kt<0&&(An.container===Wt||zi(Wt,ot.tabbableOptions)&&!Li(Wt,ot.tabbableOptions)&&!An.nextTabbableNode(Wt))&&(Kt=xn),Kt>=0){var ti=Kt===ct.tabbableGroups.length-1?0:Kt+1,qt=ct.tabbableGroups[ti];ai=_i(Wt)>=0?qt.firstTabbableNode:qt.firstDomTabbableNode}else ta(Jt)||(ai=An.nextTabbableNode(Wt))}}else ai=ft("fallbackFocus");return ai},xt=function(jt){if(!(ht(oa(jt),jt)>=0)){if(aa(ot.clickOutsideDeactivates,jt)){ut.deactivate({returnFocus:ot.returnFocusOnDeactivate});return}aa(ot.allowOutsideClick,jt)||jt.preventDefault()}},Mt=function(jt){var Wt=oa(jt),Jt=ht(Wt,jt)>=0;if(Jt||Wt instanceof Document)Jt&&(ct.mostRecentlyFocusedNode=Wt);else{jt.stopImmediatePropagation();var Qt,oi=!0;if(ct.mostRecentlyFocusedNode)if(_i(ct.mostRecentlyFocusedNode)>0){var ai=ht(ct.mostRecentlyFocusedNode),xn=ct.containerGroups[ai].tabbableNodes;if(xn.length>0){var An=xn.findIndex(function(Nn){return Nn===ct.mostRecentlyFocusedNode});An>=0&&(ot.isKeyForward(ct.recentNavEvent)?An+1<xn.length&&(Qt=xn[An+1],oi=!1):An-1>=0&&(Qt=xn[An-1],oi=!1))}}else ct.containerGroups.some(function(Nn){return Nn.tabbableNodes.some(function(Xt){return _i(Xt)>0})})||(oi=!1);else oi=!1;oi&&(Qt=bt({target:ct.mostRecentlyFocusedNode,isBackward:ot.isKeyBackward(ct.recentNavEvent)})),vt(Qt||ct.mostRecentlyFocusedNode||mt())}ct.recentNavEvent=void 0},Ot=function(jt){var Wt=arguments.length>1&&arguments[1]!==void 0&&arguments[1];ct.recentNavEvent=jt;var Jt=bt({event:jt,isBackward:Wt});Jt&&(ta(jt)&&jt.preventDefault(),vt(Jt))},kt=function(jt){(ot.isKeyForward(jt)||ot.isKeyBackward(jt))&&Ot(jt,ot.isKeyBackward(jt))},Nt=function(jt){ea(jt)&&aa(ot.escapeDeactivates,jt)!==!1&&(jt.preventDefault(),ut.deactivate())},Gt=function(jt){ht(oa(jt),jt)>=0||aa(ot.clickOutsideDeactivates,jt)||aa(ot.allowOutsideClick,jt)||(jt.preventDefault(),jt.stopImmediatePropagation())},Bt=function(){if(ct.active){Qi.activateTrap(st,ut);var jt;return ot.delayInitialFocus?jt=new Promise(function(Wt){ct.delayInitialFocusTimer=ia(function(){vt(mt()),Wt()})}):vt(mt()),te.addEventListener("focusin",Mt,!0),te.addEventListener("mousedown",xt,{capture:!0,passive:!1}),te.addEventListener("touchstart",xt,{capture:!0,passive:!1}),te.addEventListener("click",Gt,{capture:!0,passive:!1}),te.addEventListener("keydown",kt,{capture:!0,passive:!1}),te.addEventListener("keydown",Nt),jt}},Ut=function(jt){ct.active&&!ct.paused&&ut._setSubtreeIsolation(!1),ct.adjacentElements.clear(),ct.alreadySilent.clear();var Wt=new Set,Jt=new Set,Qt=Hi(jt),oi;try{for(Qt.s();!(oi=Qt.n()).done;){var ai=oi.value;Wt.add(ai);for(var xn=typeof ShadowRoot<"u"&&ai.getRootNode()instanceof ShadowRoot,An=ai;An;){Wt.add(An);var Nn=An.parentElement,Xt=[];Nn?Xt=Nn.children:!Nn&&xn&&(Xt=An.getRootNode().children,Nn=An.getRootNode().host,xn=typeof ShadowRoot<"u"&&Nn.getRootNode()instanceof ShadowRoot);var Zt=Hi(Xt),Kt;try{for(Zt.s();!(Kt=Zt.n()).done;){var ti=Kt.value;Jt.add(ti)}}catch(qt){Zt.e(qt)}finally{Zt.f()}An=Nn}}}catch(qt){Qt.e(qt)}finally{Qt.f()}Wt.forEach(function(qt){Jt.delete(qt)}),ct.adjacentElements=Jt},Vt=function(){if(ct.active)return te.removeEventListener("focusin",Mt,!0),te.removeEventListener("mousedown",xt,!0),te.removeEventListener("touchstart",xt,!0),te.removeEventListener("click",Gt,!0),te.removeEventListener("keydown",kt,!0),te.removeEventListener("keydown",Nt),ut},Ht=typeof window<"u"&&"MutationObserver"in window?new MutationObserver(function(jt){var Wt=ct.mostRecentlyFocusedNode;
69Wt&&jt.some(function(Jt){return Array.from(Jt.removedNodes).some(function(Qt){return Qt===Wt||typeof Qt.contains=="function"&&Qt.contains(Wt)})})&&ct.containers.some(function(Jt){return Jt==null?void 0:Jt.isConnected})&&(yt(),vt(mt()))}):void 0,zt=function(){Ht&&(Ht.disconnect(),ct.active&&!ct.paused&&ct.containers.map(function(jt){Ht.observe(jt,{subtree:!0,childList:!0})}))};return ut={get active(){return ct.active},get paused(){return ct.paused},activate:function(jt){if(ct.active)return this;var Wt=dt(jt,"onActivate"),Jt=dt(jt,"onPostActivate"),Qt=dt(jt,"checkCanFocusTrap"),oi=Qi.getActiveTrap(st),ai=!1;if(oi&&!oi.paused){var xn;(xn=oi._setSubtreeIsolation)==null||xn.call(oi,!1),ai=!0}try{Qt||yt(),ct.active=!0,ct.paused=!1,ct.nodeFocusedBeforeActivation=pt(te),Wt==null||Wt({trap:ut});var An=function(){Qt&&yt();var Xt=function(){ut._setSubtreeIsolation(!0),zt(),Jt==null||Jt({trap:ut})},Zt=Bt();Zt?Zt.then(Xt):Xt()};if(Qt)return Qt(ct.containers.concat()).then(An,An),this;An()}catch(Xt){if(oi===Qi.getActiveTrap(st)&&ai){var Nn;(Nn=oi._setSubtreeIsolation)==null||Nn.call(oi,!0)}throw Xt}return this},deactivate:function(jt){if(!ct.active)return this;var Wt=qi({onDeactivate:ot.onDeactivate,onPostDeactivate:ot.onPostDeactivate,checkCanReturnFocus:ot.checkCanReturnFocus},jt);clearTimeout(ct.delayInitialFocusTimer),ct.delayInitialFocusTimer=void 0,ct.paused||ut._setSubtreeIsolation(!1),ct.alreadySilent.clear(),Vt(),ct.active=!1,ct.paused=!1,zt(),Qi.deactivateTrap(st,ut);var Jt=dt(Wt,"onDeactivate"),Qt=dt(Wt,"onPostDeactivate"),oi=dt(Wt,"checkCanReturnFocus"),ai=dt(Wt,"delayReturnFocus"),xn=dt(Wt,"returnFocus","returnFocusOnDeactivate");Jt==null||Jt({trap:ut});var An=function(){xn&&vt(_t(ct.nodeFocusedBeforeActivation)),Qt==null||Qt({trap:ut})},Nn=function(){ai&&xn?ia(An):An()};return xn&&oi?(oi(_t(ct.nodeFocusedBeforeActivation)).then(Nn,Nn),this):(Nn(),this)},pause:function(jt){return ct.active?(ct.manuallyPaused=!0,this._setPausedState(!0,jt)):this},unpause:function(jt){return!ct.active||(ct.manuallyPaused=!1,st[st.length-1]!==this)?this:this._setPausedState(!1,jt)},updateContainerElements:function(jt){return ct.containers=[].concat(jt).filter(Boolean).map(function(Wt){return typeof Wt=="string"?te.querySelector(Wt):Wt}),ot.isolateSubtrees&&Ut(ct.containers),ct.active&&(yt(),ct.paused||ut._setSubtreeIsolation(!0)),zt(),this}},Object.defineProperties(ut,{_isManuallyPaused:{value:function(){return ct.manuallyPaused}},_setPausedState:{value:function(jt,Wt){if(ct.paused===jt)return this;if(ct.paused=jt,jt){var Jt=dt(Wt,"onPause"),Qt=dt(Wt,"onPostPause");Jt==null||Jt({trap:ut}),Vt(),ut._setSubtreeIsolation(!1),zt(),Qt==null||Qt({trap:ut})}else{var oi=dt(Wt,"onUnpause"),ai=dt(Wt,"onPostUnpause");oi==null||oi({trap:ut}),(function(){yt();var xn=function(){ut._setSubtreeIsolation(!0),zt(),ai==null||ai({trap:ut})},An=Bt();An?An.then(xn):xn()})()}return this}},_setSubtreeIsolation:{value:function(jt){ot.isolateSubtrees&&ct.adjacentElements.forEach(function(Wt){var Jt;if(jt)switch(ot.isolateSubtrees){case"aria-hidden":(Wt.ariaHidden==="true"||((Jt=Wt.getAttribute("aria-hidden"))==null?void 0:Jt.toLowerCase())==="true")&&ct.alreadySilent.add(Wt),Wt.setAttribute("aria-hidden","true");break;default:(Wt.inert||Wt.hasAttribute("inert"))&&ct.alreadySilent.add(Wt),Wt.setAttribute("inert",!0)}else if(!ct.alreadySilent.has(Wt))switch(ot.isolateSubtrees){case"aria-hidden":Wt.removeAttribute("aria-hidden");break;default:Wt.removeAttribute("inert")}})}}}),ut.updateContainerElements(ne),ut};function la(ne){return ne}var ua$1={escapeDeactivates:{type:Boolean,default:!0},returnFocusOnDeactivate:{type:Boolean,default:!0},allowOutsideClick:{type:[Boolean,Function],default:!0},clickOutsideDeactivates:[Boolean,Function],initialFocus:[String,Function,Boolean],fallbackFocus:[String,Function],checkCanFocusTrap:Function,checkCanReturnFocus:Function,delayInitialFocus:{type:Boolean,default:!0},document:Object,preventScroll:Boolean,setReturnFocus:[Object,String,Boolean,Function],tabbableOptions:Object},da=defineComponent({name:"FocusTrap",props:Object.assign({active:{type:Boolean,default:!0}},ua$1),emits:["update:active","activate","postActivate","deactivate","postDeactivate"],render(){return this.renderImpl()},setup(ne,{slots:ee,emit:te}){let st,ot=ref$1(null),ct=computed(()=>{let dt=ot.value;return dt&&(dt instanceof HTMLElement?dt:dt.$el)});function ut(){return st||(st=ca(ct.value,{escapeDeactivates:ne.escapeDeactivates,allowOutsideClick:ne.allowOutsideClick,returnFocusOnDeactivate:ne.returnFocusOnDeactivate,clickOutsideDeactivates:ne.clickOutsideDeactivates,onActivate:()=>{te("update:active",!0),te("activate")},onDeactivate:()=>{te("update:active",!1),te("deactivate")},onPostActivate:()=>te("postActivate"),onPostDeactivate:()=>te("postDeactivate"),initialFocus:ne.initialFocus,fallbackFocus:ne.fallbackFocus,tabbableOptions:ne.tabbableOptions,delayInitialFocus:ne.delayInitialFocus,preventScroll:ne.preventScroll}))}return onMounted(()=>{watch(()=>ne.active,dt=>{dt&&ct.value?ut().activate():st&&(st.deactivate(),(!ct.value||ct.value.nodeType===Node.COMMENT_NODE)&&(st=null))},{immediate:!0,flush:"post"})}),onUnmounted(()=>{st&&st.deactivate(),st=null}),{activate(){ut().activate()},deactivate(){st&&st.deactivate()},renderImpl(){if(!ee.default)return null;let dt=ee.default().filter(ht=>ht.type!==Comment);return!dt||!dt.length||dt.length>1?(console.error("[focus-trap-vue]: FocusTrap requires exactly one child."),dt):cloneVNode(dt[0],{ref:ot})}}}}),fa={class:"fr-nav__item"},pa=["aria-controls","aria-expanded","title"],ma={class:"fr-hidden-lg"},ha=["id"],ga={class:"fr-menu__list"},_a=["hreflang","lang","aria-current","href","onClick"],va=defineComponent({__name:"DsfrLanguageSelector",props:{id:{default:()=>Z$2("language-selector")},languages:{default:()=>[]},currentLanguage:{default:"fr"},title:{default:"Sélectionner une langue"},wrapperTag:{default:"div"}},emits:["select"],setup(ne,{emit:ee}){let te=ne,st=ee,{collapse:ot,collapsing:ct,cssExpanded:ut,doExpand:dt,onTransitionEnd:ht}=J$1(),ft=ref$1(!1);function pt(yt){ft.value=!1,st("select",yt)}let mt=computed(()=>te.languages.find(({codeIso:yt})=>yt===te.currentLanguage));return watch(ft,(yt,vt)=>{yt!==vt&&dt(yt)}),(yt,vt)=>(openBlock(),createBlock(resolveDynamicComponent(ne.wrapperTag),{class:"fr-translate fr-nav"},{default:withCtx(()=>{var _t,bt;return[createBaseVNode("div",fa,[createBaseVNode("button",{class:"fr-translate__btn fr-btn fr-btn--tertiary","aria-controls":ne.id,"aria-expanded":ft.value,title:ne.title,type:"button",onClick:vt[0]||(vt[0]=withModifiers(xt=>ft.value=!ft.value,["prevent","stop"]))},[createTextVNode(toDisplayString((_t=mt.value)==null?void 0:_t.codeIso.toUpperCase()),1),createBaseVNode("span",ma," - "+toDisplayString((bt=mt.value)==null?void 0:bt.label),1)],8,pa),createBaseVNode("div",{id:ne.id,ref_key:"collapse",ref:ot,class:normalizeClass(["fr-collapse fr-translate__menu fr-menu",{"fr-collapse--expanded":unref(ut),"fr-collapsing":unref(ct)}]),onTransitionend:vt[1]||(vt[1]=xt=>unref(ht)(ft.value))},[createBaseVNode("ul",ga,[(openBlock(!0),createElementBlock(Fragment,null,renderList(ne.languages,(xt,Mt)=>(openBlock(),createElementBlock("li",{key:Mt},[createBaseVNode("a",{class:"fr-translate__language fr-nav__link",hreflang:xt.codeIso,lang:xt.codeIso,"aria-current":ne.currentLanguage===xt.codeIso||void 0,href:`#${xt.codeIso}`,onClick:withModifiers(Ot=>pt(xt),["prevent","stop"])},toDisplayString(`${xt.codeIso.toUpperCase()} - ${xt.label}`),9,_a)]))),128))])],42,ha)])]}),_:1}))}}),ya=["for"],ba={key:0,class:"required"},xa={key:0,class:"fr-hint-text"}
69,Sa=Q$2(defineComponent({inheritAttrs:!1,__name:"DsfrInput",props:mergeModels({id:{default:()=>Z$2("basic","input")},descriptionId:{default:void 0},hint:{default:""},isInvalid:{type:Boolean},isValid:{type:Boolean},isTextarea:{type:Boolean},isWithWrapper:{type:Boolean},labelVisible:{type:Boolean},label:{default:""},labelClass:{default:""},modelValue:{},wrapperClass:{default:""}},{modelValue:{},modelModifiers:{}}),emits:mergeModels(["update:modelValue"],["update:modelValue"]),setup(ne,{expose:ee}){let te=ne,st=useModel(ne,"modelValue"),ot=useAttrs(),ct=ref$1(null),ut=()=>{var pt;return(pt=ct.value)==null?void 0:pt.focus()},dt=computed(()=>te.isTextarea?"textarea":"input"),ht=computed(()=>te.isWithWrapper||ot.type==="date"||!!te.wrapperClass),ft=computed(()=>["fr-label",{invisible:!te.labelVisible},te.labelClass]);return ee({focus:ut}),(pt,mt)=>(openBlock(),createElementBlock(Fragment,null,[createBaseVNode("label",{class:normalizeClass(ft.value),for:ne.id},[renderSlot(pt.$slots,"label",{},()=>[createTextVNode(toDisplayString(ne.label)+" ",1),renderSlot(pt.$slots,"required-tip",{},()=>["required"in pt.$attrs&&pt.$attrs.required!==!1?(openBlock(),createElementBlock("span",ba,"*")):createCommentVNode("",!0)],!0)],!0),ne.hint?(openBlock(),createElementBlock("span",xa,toDisplayString(ne.hint),1)):createCommentVNode("",!0)],10,ya),ht.value?(openBlock(),createElementBlock("div",{key:1,class:normalizeClass([{"fr-input-wrap":ne.isWithWrapper||pt.$attrs.type==="date"},ne.wrapperClass])},[(openBlock(),createBlock(resolveDynamicComponent(dt.value),mergeProps({id:ne.id},pt.$attrs,{ref_key:"__input",ref:ct,class:["fr-input",{"fr-input--error":ne.isInvalid,"fr-input--valid":ne.isValid}],value:ne.modelValue,"aria-describedby":ne.descriptionId||void 0,onInput:mt[1]||(mt[1]=yt=>pt.$emit("update:modelValue",yt.target.value))}),null,16,["id","class","value","aria-describedby"]))],2)):(openBlock(),createBlock(resolveDynamicComponent(dt.value),mergeProps({key:0,id:ne.id},pt.$attrs,{ref_key:"__input",ref:ct,class:["fr-input",{"fr-input--error":ne.isInvalid,"fr-input--valid":ne.isValid}],value:st.value,"aria-describedby":ne.descriptionId||void 0,onInput:mt[0]||(mt[0]=yt=>st.value=yt.target.value)}),null,16,["id","class","value","aria-describedby"]))],64))}}),[["__scopeId","data-v-28c26a79"]]),Ca={key:1,class:"fr-sr-only"},wa=defineComponent({__name:"DsfrSearchBar",props:{id:{default:()=>Z$2("search","input")},label:{default:""},large:{type:Boolean},buttonText:{default:""},modelValue:{default:""},placeholder:{default:"Rechercher"},disabled:{type:Boolean}},emits:["update:modelValue","search"],setup(ne,{emit:ee}){let te=ee;return(st,ot)=>(openBlock(),createElementBlock("form",{class:normalizeClass(["fr-search-bar",{"fr-search-bar--lg":ne.large}]),role:"search",onSubmit:ot[2]||(ot[2]=withModifiers(ct=>te("search",ne.modelValue),["prevent"]))},[createVNode(Sa,{id:ne.id,type:"search",placeholder:ne.placeholder,"model-value":ne.modelValue,label:ne.label,disabled:ne.disabled,"aria-disabled":ne.disabled,"onUpdate:modelValue":ot[0]||(ot[0]=ct=>te("update:modelValue",ct)),onKeydown:ot[1]||(ot[1]=withKeys(ct=>te("search",ne.modelValue),["enter"]))},null,8,["id","placeholder","model-value","label","disabled","aria-disabled"]),createVNode(nt$1,{title:"Rechercher",disabled:ne.disabled,"aria-disabled":ne.disabled},{default:withCtx(()=>[ne.buttonText?(openBlock(),createElementBlock(Fragment,{key:0},[createTextVNode(toDisplayString(ne.buttonText),1)],64)):(openBlock(),createElementBlock("span",Ca," Rechercher "))]),_:1},8,["disabled","aria-disabled"])],34))}}),Ta=1,Ea=defineComponent({__name:"DsfrHeaderMenuLink",props:{button:{type:Boolean},icon:{default:void 0},iconAttrs:{default:()=>({})},iconRight:{type:Boolean},label:{default:""},target:{default:"_self"},onClick:{type:Function,default:()=>{}},to:{default:void 0},href:{default:void 0},path:{default:""}},setup(ne){let ee=ne,te=computed(()=>typeof ee.path=="string"),st=computed(()=>{var mt;return((mt=ee.href)==null?void 0:mt.startsWith("http"))||te.value&&ee.path.startsWith("http")||typeof ee.to=="string"&&ee.to.startsWith("http")}),ot=computed(()=>{var mt;return((mt=ee.href)==null?void 0:mt.startsWith("mailto"))||te.value&&ee.path.startsWith("mailto")||typeof ee.to=="string"&&ee.to.startsWith("mailto")}),ct=computed(()=>ee.button?"button":st.value||ot.value?"a":"RouterLink"),ut=computed(()=>
69{if(!(!st.value&&!ot.value))return ee.to??ee.href??ee.path}),dt=computed(()=>{if(!(st.value||ot.value))return ee.to??ee.path}),ht=computed(()=>dt.value?{to:dt.value}:{href:ut.value}),ft=computed(()=>typeof ee.icon=="string"&&ee.icon.startsWith("fr-icon-")),pt=computed(()=>typeof ee.icon=="string"?{name:ee.icon,scale:Ta,...ee.iconAttrs??{}}:{scale:Ta,...ee.icon??{},...ee.iconAttrs??{}});return(mt,yt)=>(openBlock(),createBlock(resolveDynamicComponent(ct.value),mergeProps({class:["fr-btn",{"fr-btn--icon-right":ft.value&&ne.iconRight,"fr-btn--icon-left":ft.value&&!ne.iconRight,[String(ne.icon)]:ft.value}]},ht.value,{target:ne.target,onClick:yt[0]||(yt[0]=withModifiers(vt=>ne.onClick(vt),["stop"]))}),{default:withCtx(()=>{var vt,_t;return[!ft.value&&(ne.icon||(vt=ne.iconAttrs)!=null&&vt.name)&&!ne.iconRight?(openBlock(),createBlock($$3,mergeProps({key:0,class:"fr-mr-1w"},pt.value),null,16)):createCommentVNode("",!0),createTextVNode(" "+toDisplayString(ne.label)+" ",1),!ft.value&&(ne.icon||(_t=ne.iconAttrs)!=null&&_t.name)&&ne.iconRight?(openBlock(),createBlock($$3,mergeProps({key:1,class:"fr-ml-1w"},pt.value),null,16)):createCommentVNode("",!0)]}),_:1},16,["class","target"]))}}),Da={class:"fr-btns-group"},Oa=defineComponent({__name:"DsfrHeaderMenuLinks",props:{links:{default:()=>[]},navAriaLabel:{default:"Menu secondaire"},wrapperTag:{default:"div"}},emits:["linkClick"],setup(ne,{emit:ee}){let te=ee;return(st,ot)=>(openBlock(),createBlock(resolveDynamicComponent(ne.wrapperTag),{role:ne.wrapperTag==="nav"?"navigation":void 0,"aria-label":ne.wrapperTag==="nav"?ne.navAriaLabel:void 0},{default:withCtx(()=>[createBaseVNode("ul",Da,[(openBlock(!0),createElementBlock(Fragment,null,renderList(ne.links,(ct,ut)=>(openBlock(),createElementBlock("li",{key:ut},[createVNode(Ea,mergeProps({ref_for:!0},ct,{"on-click":dt=>{var ht;te("linkClick",dt),(ht=ct.onClick)==null||ht.call(ct,dt)}}),null,16,["on-click"])]))),128))])]),_:1},8,["role","aria-label"]))}}),ka={role:"banner",class:"fr-header"},Aa={class:"fr-header__body"},ja={class:"fr-container width-inherit"},Ma={class:"fr-header__body-row"},Na={class:"fr-header__brand fr-enlarge-link"},Pa={class:"fr-header__brand-top"},Fa={class:"fr-header__logo"},Ia={key:0,class:"fr-header__operator"},La=["src","alt"],Ra={key:1,class:"fr-header__navbar"},za=["aria-label","title","data-fr-opened"],Ba={class:"fr-sr-only"},Va={class:"fr-sr-only"},Ha={key:0,class:"fr-header__service"},Ua={class:"fr-header__service-title"},Wa={key:0,class:"fr-badge fr-badge--sm fr-badge--green-emeraude"},Ga={key:0,class:"fr-header__service-tagline"},Ka={key:1,class:"fr-header__service"},qa={class:"fr-header__tools"},Ja={key:0,class:"fr-header__tools-links"},Ya={key:1,class:"fr-header__search fr-modal"},Xa=["aria-label"],Za={class:"fr-container"},Qa={class:"fr-header__menu-links"},$a={key:1,class:"flex justify-center items-center"},eo={class:"fr-header__menu fr-modal"},to={key:0,class:"fr-container"},no="(min-width: 62em)",ro=defineComponent({__name:"DsfrHeader",props:{searchbarId:{default:"searchbar-header"},serviceTitle:{default:void 0},serviceDescription:{default:void 0},homeTo:{default:"/"},logoText:{default:()=>"Gouvernement"},modelValue:{default:""},operatorImgAlt:{default:""},operatorImgSrc:{default:""},operatorImgStyle:{type:[Boolean,null,String,Object,Array],default:()=>({})},placeholder:{default:"Rechercher..."},quickLinks:{default:()=>[]},languageSelector:{default:void 0},searchLabel:{default:"Recherche"},quickLinksAriaLabel:{default:"Menu secondaire"},showSearch:{type:Boolean},showSearchLabel:{default:"Recherche"},showBeta:{type:Boolean},menuLabel:{default:"Menu"},menuModalLabel:{default:"Menu"},closeMenuModalLabel:{default:"Fermer"},homeLabel:{default:"Accueil"}},emits:["update:modelValue","search","languageSelect"],setup(ne,{emit:ee}){let te=ne,st=ee,ot=useSlots(),ct=toRef$1(te,"languageSelector"),ut=ref$1(!1),dt=ref$1(!1),ht=ref$1(!1),ft=()=>{var kt;ht.value=!1,ut.value=!1,dt.value=!1,(kt=document.getElementById("button-menu"))==null||kt.focus()},pt=kt=>{kt.key==="Escape"&&ft()},mt=()=>typeof window>"u"||typeof window.matchMedia!="function"?!1:window.matchMedia(no).matches,yt=()=>{!dt.value||!mt()||(ht.value=!1,ut.value=!1,dt.value=!1)};onMounted(()=>{document.addEventListener("keydown",pt),window.addEventListener("resize",yt)}),onUnmounted(()=>{document.removeEventListener("keydown",pt),window.removeEventListener("resize",yt)});let vt=()=>{ht.value=!0,ut.value=!0,dt.value=!1,setTimeout(()=>{var kt;(kt=document.getElementById("close-button"))==null||kt.focus()},50)},_t=()=>{ht.value=!0,ut.value=!1,dt.value=!0},bt=ft,xt=computed(()=>[te.homeLabel,te.serviceTitle].filter(kt=>kt).join(" - ")),Mt=computed(()=>!!ot.operator||!!te.operatorImgSrc),Ot=computed(()=>!!ot.mainnav);return provide(q$1,()=>ft),(kt,Nt)=>{var Bt,Ut,Vt;let Gt=resolveComponent("RouterLink");return openBlock(),createElementBlock("header",ka,[createBaseVNode("div",Aa,[createBaseVNode("div",ja,[createBaseVNode("div",Ma,[createBaseVNode("div",Na,[createBaseVNode("div",Pa,[createBaseVNode("div",Fa,[!ne.serviceTitle&&(!ne.operatorImgSrc||kt.$slots.operator)?(openBlock(),createBlock(Gt,{key:0,to:ne.homeTo,title:xt.value},{default:withCtx(()=>[createVNode(Fr,{"logo-text":ne.logoText,"data-testid":"header-logo"},null,8,["logo-text"])]),_:1},8,["to","title"])):(openBlock(),createBlock(Fr,{key:1,"logo-text":ne.logoText,"data-testid":"header-logo"},null,8,["logo-text"]))]),Mt.value?(openBlock(),createElementBlock("div",Ia,[renderSlot(kt.$slots,"operator",{}
69,()=>[ne.operatorImgSrc?(openBlock(),createBlock(Gt,{key:0,to:ne.homeTo,title:xt.value},{default:withCtx(()=>[ne.operatorImgSrc?(openBlock(),createElementBlock("img",{key:0,class:"fr-responsive-img",src:ne.operatorImgSrc,alt:ne.operatorImgAlt,style:normalizeStyle(ne.operatorImgStyle)},null,12,La)):createCommentVNode("",!0)]),_:1},8,["to","title"])):createCommentVNode("",!0)])])):createCommentVNode("",!0),ne.showSearch||Ot.value||(Bt=ne.quickLinks)!=null&&Bt.length?(openBlock(),createElementBlock("div",Ra,[ne.showSearch?(openBlock(),createElementBlock("button",{key:0,class:"fr-btn fr-btn--search","aria-controls":"header-search","aria-label":ne.showSearchLabel,title:ne.showSearchLabel,"data-fr-opened":dt.value,onClick:Nt[0]||(Nt[0]=withModifiers(Ht=>_t(),["prevent","stop"]))},[createBaseVNode("span",Ba,toDisplayString(ne.showSearchLabel),1)],8,za)):createCommentVNode("",!0),Ot.value||(Ut=ne.quickLinks)!=null&&Ut.length?(openBlock(),createElementBlock("button",{key:1,id:"button-menu",class:"fr-btn--menu fr-btn","data-fr-opened":vt,"aria-controls":"header-navigation","aria-haspopup":"dialog","data-testid":"open-menu-btn",onClick:Nt[1]||(Nt[1]=withModifiers(Ht=>vt(),["prevent","stop"]))},[createBaseVNode("span",Va,toDisplayString(ne.menuLabel),1)])):createCommentVNode("",!0)])):createCommentVNode("",!0)]),ne.serviceTitle?(openBlock(),createElementBlock("div",Ha,[createVNode(Gt,mergeProps({to:ne.homeTo,title:xt.value},kt.$attrs),{default:withCtx(()=>[createBaseVNode("p",Ua,[createTextVNode(toDisplayString(ne.serviceTitle)+" ",1),ne.showBeta?(openBlock(),createElementBlock("span",Wa," BETA ")):createCommentVNode("",!0)])]),_:1},16,["to","title"]),ne.serviceDescription?(openBlock(),createElementBlock("p",Ga,toDisplayString(ne.serviceDescription),1)):createCommentVNode("",!0)])):createCommentVNode("",!0),!ne.serviceTitle&&ne.showBeta?(openBlock(),createElementBlock("div",Ka,[...Nt[9]||(Nt[9]=[createBaseVNode("p",{class:"fr-header__service-title"},[createBaseVNode("span",{class:"fr-badge fr-badge--sm fr-badge--green-emeraude"},"BETA")],-1)])])):createCommentVNode("",!0)]),createBaseVNode("div",qa,[(Vt=ne.quickLinks)!=null&&Vt.length||ct.value?(openBlock(),createElementBlock("div",Ja,[renderSlot(kt.$slots,"before-quick-links"),ut.value?createCommentVNode("",!0):(openBlock(),createBlock(Oa,{key:0,links:ne.quickLinks,"nav-aria-label":ne.quickLinksAriaLabel},null,8,["links","nav-aria-label"])),renderSlot(kt.$slots,"after-quick-links"),ct.value?(openBlock(),createBlock(va,mergeProps({key:1},ct.value,{onSelect:Nt[2]||(Nt[2]=Ht=>st("languageSelect",Ht))}),null,16)):createCommentVNode("",!0)])):createCommentVNode("",!0),ne.showSearch?(openBlock(),createElementBlock("div",Ya,[createVNode(wa,{id:ne.searchbarId,label:ne.searchLabel,"model-value":String(ne.modelValue||""),placeholder:ne.placeholder,style:{"justify-content":"flex-end"},"onUpdate:modelValue":Nt[3]||(Nt[3]=Ht=>st("update:modelValue",Ht)),onSearch:Nt[4]||(Nt[4]=Ht=>st("search",Ht))},null,8,["id","label","model-value","placeholder"])])):createCommentVNode("",!0)])]),ht.value?(openBlock(),createBlock(unref(da),{key:0,active:ht.value,"focus-trap-options":{initialFocus:"#close-button",fallbackFocus:"#close-button",escapeDeactivates:!0,clickOutsideDeactivates:!0,returnFocusOnDeactivate:!0}},{default:withCtx(()=>[(ne.showSearch||Ot.value||ne.quickLinks&&ne.quickLinks.length||ct.value)&&ht.value?(openBlock(),createElementBlock("div",{key:0,id:"header-navigation",class:"fr-header__menu fr-modal fr-modal--opened","aria-label":ne.menuModalLabel,role:"dialog","aria-modal":"true"},[createBaseVNode("div",Za,[createBaseVNode("button",{id:"close-button",class:"fr-btn fr-btn--close","aria-controls":"header-navigation","data-testid":"close-modal-btn",onClick:Nt[5]||(Nt[5]=withModifiers(Ht=>ft(),["prevent","stop"]))},toDisplayString(ne.closeMenuModalLabel),1),createBaseVNode("div",Qa,[ct.value?(openBlock(),createBlock(va,mergeProps({key:0},ct.value,{onSelect:Nt[6]||(Nt[6]=Ht=>st("languageSelect",Ht))}),null,16)):createCommentVNode("",!0),renderSlot(kt.$slots,"before-quick-links"),ut.value?(openBlock(),createBlock(Oa,{key:1,role:"navigation",links:ne.quickLinks,"nav-aria-label":ne.quickLinksAriaLabel,onLinkClick:unref(bt)},null,8,["links","nav-aria-label","onLinkClick"])):createCommentVNode("",!0),renderSlot(kt.$slots,"after-quick-links")]),ht.value?renderSlot(kt.$slots,"mainnav",{hidemodal:ft},void 0,void 0,0):createCommentVNode("",!0),dt.value?(openBlock(),createElementBlock("div",$a,[createVNode(wa,{"searchbar-id":ne.searchbarId,"model-value":String(ne.modelValue||""),placeholder:ne.placeholder,"onUpdate:modelValue":Nt[7]||(Nt[7]=Ht=>st("update:modelValue",Ht)),onSearch:Nt[8]||(Nt[8]=Ht=>st("search",Ht))},null,8,["searchbar-id","model-value","placeholder"])])):createCommentVNode("",!0)])],8,Xa)):createCommentVNode("",!0)]),_:3},8,["active"])):createCommentVNode("",!0),renderSlot(kt.$slots,"default")])]),createBaseVNode("div",eo,[Ot.value&&!ht.value?(openBlock(),createElementBlock("div",to,[renderSlot(kt.$slots,"mainnav",{hidemodal:ft})])):createCommentVNode("",!0)])])}}}),po=["id","aria-labelledby","aria-describedby","role","open"],mo={class:"fr-container fr-container--fluid fr-container-md"},ho={class:"fr-grid-row fr-grid-row--center"},go={class:"fr-modal__header"},_o=["id","title","aria-controls"],vo=["id"],yo={key:0,class:"fr-modal__footer"},bo=2,xo=Q$2(defineComponent({__name:"DsfrModal",props:{modalId:{default:()=>Z$2("modal","dialog")},opened:{type:Boolean},actions:{default:()=>[]},isAlert:{type:Boolean},origin:{default:()=>({focus(){}})},title:{},titleTag:{default:"h1"},icon:{default:void 0},size:{default:"md"},closeButtonLabel:{default:"Fermer"},closeButtonTitle:{default:"Fermer la fenêtre modale"},disableOutsideInteraction:{type:Boolean}},emits:["close"],setup(ne,{emit:ee}){let te=ne,st=ee;useSlots();let ot=Gt=>
69{te.opened&&Gt.key==="Escape"&&Ot()};function ct(Gt){te.isAlert||te.disableOutsideInteraction||Gt.target.closest(".fr-modal__body")||Ot()}let ut=computed(()=>{if(te.isAlert)return"alertdialog"}),dt=computed(()=>`${te.modalId}-close-button`),ht=useTemplateRef("closeBtn"),ft=useTemplateRef("modal"),pt=()=>ht.value??`#${dt.value}`,mt=useTemplateRef("modalBody"),yt=useTemplateRef("modalContent"),vt=ref$1(!1);function _t(){if(!mt.value||!yt.value){vt.value=!1;return}let Gt=mt.value.scrollHeight>mt.value.clientHeight,Bt=mt.value.scrollTop+mt.value.clientHeight>=mt.value.scrollHeight-1;vt.value=Gt&&!Bt}watch(()=>te.opened,Gt=>{var Bt,Ut;Gt?((Bt=ft.value)==null||Bt.showModal(),nextTick(()=>{_t()}),setTimeout(()=>{var Vt;(Vt=ht.value)==null||Vt.focus()},100)):((Ut=ft.value)==null||Ut.close(),vt.value=!1),bt(Gt)});function bt(Gt){typeof window<"u"&&document.body.classList.toggle("modal-open",Gt)}onMounted(()=>{xt(),bt(te.opened),window.addEventListener("resize",_t)}),onBeforeUnmount(()=>{Mt(),bt(!1),window.removeEventListener("resize",_t)});function xt(){document.addEventListener("keydown",ot)}function Mt(){document.removeEventListener("keydown",ot)}async function Ot(){var Gt;await nextTick(),(Gt=te.origin)==null||Gt.focus(),st("close")}let kt=computed(()=>typeof te.icon=="string"&&te.icon.startsWith("fr-icon-")),Nt=computed(()=>kt.value?void 0:typeof te.icon=="string"?{name:te.icon,scale:bo}:te.icon&&typeof te.icon=="object"?{scale:bo,...te.icon}:void 0);return(Gt,Bt)=>ne.opened?(openBlock(),createBlock(unref(da),{key:0,"initial-focus":pt,"fallback-focus":pt,"tabbable-options":unref(void 0)},{default:withCtx(()=>{var Ut,Vt;return[createBaseVNode("dialog",{id:`dialog-${ne.modalId}`,ref_key:"modal",ref:ft,"aria-modal":"true","aria-labelledby":ne.modalId,"aria-describedby":`${ne.modalId}-description`,role:ut.value,class:normalizeClass(["fr-modal",{"fr-modal--opened":ne.opened}]),open:ne.opened,onClick:ct},[createBaseVNode("div",mo,[createBaseVNode("div",ho,[createBaseVNode("div",{class:normalizeClass(["fr-col-12",{"fr-col-md-8":ne.size==="lg","fr-col-md-6":ne.size==="md","fr-col-md-4":ne.size==="sm"}])},[createBaseVNode("div",{ref_key:"modalBody",ref:mt,class:normalizeClass(["fr-modal__body",{"fr-scroll-divider":vt.value}]),onScroll:_t},[createBaseVNode("div",go,[createBaseVNode("button",{id:dt.value,ref_key:"closeBtn",ref:ht,class:"fr-btn fr-btn--close",title:ne.closeButtonTitle,"aria-controls":`dialog-${ne.modalId}`,type:"button",onClick:Bt[0]||(Bt[0]=Ht=>Ot())},[createBaseVNode("span",null,toDisplayString(ne.closeButtonLabel),1)],8,_o)]),createBaseVNode("div",{ref_key:"modalContent",ref:yt,class:"fr-modal__content"},[(openBlock(),createBlock(resolveDynamicComponent(ne.titleTag),{id:ne.modalId,class:"fr-modal__title"},{default:withCtx(()=>[kt.value||Nt.value?(openBlock(),createElementBlock("span",{key:0,class:normalizeClass({[String(ne.icon)]:kt.value})},[ne.icon&&Nt.value?(openBlock(),createBlock($$3,normalizeProps(mergeProps({key:0},Nt.value)),null,16)):createCommentVNode("",!0)],2)):createCommentVNode("",!0),createTextVNode(" "+toDisplayString(ne.title),1)]),_:1},8,["id"])),createBaseVNode("div",{id:`${ne.modalId}-description`},[renderSlot(Gt.$slots,"default",{},void 0,!0)],8,vo)],512),(Ut=ne.actions)!=null&&Ut.length||Gt.$slots.footer?(openBlock(),createElementBlock("div",yo,[renderSlot(Gt.$slots,"footer",{},void 0,!0),(Vt=ne.actions)!=null&&Vt.length?(openBlock(),createBlock(rt$1,{key:0,align:"right",buttons:ne.actions,"inline-layout-when":"large",reverse:""},null,8,["buttons"])):createCommentVNode("",!0)])):createCommentVNode("",!0)],34)],2)])])],10,po)]}),_:3},8,["tabbable-options"])):createCommentVNode("",!0)}}),[["__scopeId","data-v-c3039e1e"]]),Zo=["id","aria-current"],Qo=defineComponent({__name:"DsfrNavigationMenuItem",props:{id:{default:()=>Z$2("menu","item")},active:{type:Boolean}},setup(ne){return(ee,te)=>(openBlock(),createElementBlock("li",{id:ne.id,class:"fr-menu__item","aria-current":ne.active?"page":void 0},[renderSlot(ee.$slots,"default")],8,Zo))}}),Cs=/^data:image\/svg\+xml(?:;([^,]*))?,(.*)$/i,ws="script,foreignObject,iframe,object,embed,audio,video,canvas",Ts=/^on/i,Es=/^artwork-(?:decorative|minor|major)$/,Ds=(ne,ee)=>ne.toLowerCase().split(";
69").filter(Boolean).includes("base64")?globalThis.atob(ee):decodeURIComponent(ee),Os=ne=>{ne.querySelectorAll(ws).forEach(ee=>ee.remove()),[ne,...Array.from(ne.querySelectorAll("*"))].forEach(ee=>{Array.from(ee.attributes).forEach(te=>{let st=te.name.toLowerCase(),ot=te.value.trim();if(Ts.test(st)||st==="src"||st==="style"){ee.removeAttribute(te.name);return}if(ot.toLowerCase().includes("javascript:")){ee.removeAttribute(te.name);return}(st==="href"||st==="xlink:href")&&!ot.startsWith("#")&&ee.removeAttribute(te.name)})})},ks=(ne,ee)=>{let te=new Map;ne.querySelectorAll("[id]").forEach(st=>{let ot=st.getAttribute("id");if(!ot||!Es.test(ot))return;let ct=`${ot}-${ee}`;te.set(ot,ct),st.setAttribute("id",ct)}),te.size!==0&&ne.querySelectorAll("*").forEach(st=>{Array.from(st.attributes).forEach(ot=>{let ct=ot.value;te.forEach((ut,dt)=>{ct=ct.replaceAll(`#${dt}`,`#${ut}`).replaceAll(`url(#${dt})`,`url(#${ut})`)}),ct!==ot.value&&st.setAttribute(ot.name,ct)})})},As=(ne,ee)=>{if(!ne||!globalThis.DOMParser||!globalThis.XMLSerializer)return"";let te=ne.match(Cs);if(!te)return"";try{let st=Ds(te[1]??"",te[2]??""),ot=new DOMParser().parseFromString(st,"image/svg+xml").documentElement;return ot.tagName.toLowerCase()==="svg"?(Os(ot),ks(ot,ee),new XMLSerializer().serializeToString(ot)):""}catch{return""}},js=["id","name","value","checked","disabled"],Ms=["for"],Ns={key:0,class:"required"},Ps={key:0,class:"fr-hint-text"},Fs={key:0,class:"fr-radio-rich__pictogram"},Is=["src","title"],Ls=["innerHTML"],Rs=["src","title"],zs={key:0},Bs=["href"],Vs=["href"],Hs=["href"],Us=Q$2(defineComponent({__name:"DsfrRadioButton",props:{id:{default:()=>Z$2("basic","radio")},name:{},modelValue:{type:[String,Number,Boolean],default:""},disabled:{type:Boolean},small:{type:Boolean},inline:{type:Boolean},value:{type:[String,Number,Boolean]},label:{default:""},hint:{default:""},rich:{type:Boolean,default:!1},img:{default:void 0},imgTitle:{},svgPath:{default:void 0},svgAttrs:{default:()=>({viewBox:"0 0 80 80",width:"80px",height:"80px"})}},emits:["update:modelValue"],setup(ne){let ee=ne,te=/^data:image\/svg\+xml(?:;[^,]*)?,/i,st={viewBox:"0 0 80 80",width:"80px",height:"80px"},ot=computed(()=>ee.rich||!!ee.img||!!ee.svgPath),ct=computed(()=>{var ht;return!!((ht=ee.svgPath)!=null&&ht.match(te))}),ut=Z$2("radio","artwork").replace(/[^\w-]/g,"_"),dt=computed(()=>As(ee.svgPath,ut));return(ht,ft)=>(openBlock(),createElementBlock("div",{class:normalizeClass(["fr-fieldset__element",{"fr-fieldset__element--inline":ne.inline}])},[createBaseVNode("div",{class:normalizeClass(["fr-radio-group",{"fr-radio-rich":ot.value,"fr-radio-group--sm":ne.small}])},[createBaseVNode("input",mergeProps({id:ne.id,type:"radio",name:ne.name,value:ne.value,checked:ne.modelValue===ne.value,disabled:ne.disabled},ht.$attrs,{onClick:ft[0]||(ft[0]=pt=>ht.$emit("update:modelValue",ne.value))}),null,16,js),createBaseVNode("label",{for:ne.id,class:"fr-label"},[renderSlot(ht.$slots,"label",{label:ne.label},()=>[createTextVNode(toDisplayString(ne.label)+" ",1),renderSlot(ht.$slots,"required-tip",{},()=>[ht.$attrs.required?(openBlock(),createElementBlock("span",Ns," *")):createCommentVNode("",!0)],!0)],!0),ne.hint?(openBlock(),createElementBlock("span",Ps,toDisplayString(ne.hint),1)):createCommentVNode("",!0)],8,Ms),ne.img||ne.svgPath?(openBlock(),createElementBlock("div",Fs,[ne.img?(openBlock(),createElementBlock("img",{key:0,src:ne.img,class:"fr-artwork",alt:"",title:ne.imgTitle},null,8,Is)):dt.value?(openBlock(),createElementBlock("span",{key:1,"aria-hidden":"true",class:"fr-artwork fr-artwork--inline",innerHTML:dt.value},null,8,Ls)):ct.value?(openBlock(),createElementBlock("img",{key:2,src:ne.svgPath,class:"fr-artwork",alt:"",title:ne.imgTitle},null,8,Rs)):(openBlock(),createElementBlock("svg",mergeProps({key:3,"aria-hidden":"true",class:"fr-artwork"},{...st,...ne.svgAttrs}),[ne.imgTitle?(openBlock(),createElementBlock("title",zs,toDisplayString(ne.imgTitle),1)):createCommentVNode("",!0),createBaseVNode("use",{class:"fr-artwork-decorative",href:`${ne.svgPath}#artwork-decorative`}
69,null,8,Bs),createBaseVNode("use",{class:"fr-artwork-minor",href:`${ne.svgPath}#artwork-minor`},null,8,Vs),createBaseVNode("use",{class:"fr-artwork-major",href:`${ne.svgPath}#artwork-major`},null,8,Hs)],16))])):createCommentVNode("",!0)],2)],2))}}),[["__scopeId","data-v-2dd9efb8"]]),Ws={class:"fr-form-group"},Gs=["disabled","aria-labelledby","aria-describedby","aria-invalid","role"],Ks=["id"],qs={key:0,class:"fr-hint-text"},Js={key:0,class:"required"},Ys=["id"],Xs=defineComponent({__name:"DsfrRadioButtonSet",props:{titleId:{default:()=>Z$2("radio-button","group")},disabled:{type:Boolean},required:{type:Boolean},small:{type:Boolean},inline:{type:Boolean},name:{},errorMessage:{default:""},validMessage:{default:""},legend:{default:""},hint:{default:""},rich:{type:Boolean},modelValue:{type:[String,Number,Boolean]},options:{default:()=>[]},ariaInvalid:{type:[Boolean,String]}},emits:["update:modelValue"],setup(ne,{emit:ee}){let te=ne,st=ee,ot=computed(()=>te.errorMessage||te.validMessage),ct=computed(()=>te.errorMessage?"fr-error-text":"fr-valid-text"),ut=ht=>{ht!==te.modelValue&&st("update:modelValue",ht)},dt=computed(()=>ot.value?`messages-${te.titleId}`:void 0);return(ht,ft)=>(openBlock(),createElementBlock("div",Ws,[createBaseVNode("fieldset",{class:normalizeClass(["fr-fieldset",{"fr-fieldset--error":ne.errorMessage,"fr-fieldset--valid":ne.validMessage}]),disabled:ne.disabled,"aria-labelledby":ne.titleId,"aria-describedby":dt.value,"aria-invalid":ne.ariaInvalid,role:ne.errorMessage||ne.validMessage?"group":void 0},[ne.legend||ht.$slots.legend||ne.hint||ht.$slots.hint?(openBlock(),createElementBlock("legend",{key:0,id:ne.titleId,class:"fr-fieldset__legend fr-fieldset__legend--regular"},[renderSlot(ht.$slots,"legend",{},()=>[createTextVNode(toDisplayString(ne.legend)+" ",1),ne.hint||ht.$slots.hint?(openBlock(),createElementBlock("span",qs,[renderSlot(ht.$slots,"hint",{},()=>[createTextVNode(toDisplayString(ne.hint),1)])])):createCommentVNode("",!0),renderSlot(ht.$slots,"required-tip",{},()=>[ne.required?(openBlock(),createElementBlock("span",Js," *")):createCommentVNode("",!0)])])],8,Ks)):createCommentVNode("",!0),renderSlot(ht.$slots,"default",{},()=>[(openBlock(!0),createElementBlock(Fragment,null,renderList(ne.options,(pt,mt)=>(openBlock(),createBlock(Us,mergeProps({key:typeof pt.value=="boolean"?mt:pt.value||mt,name:ne.name,"aria-disabled":pt.disabled},{ref_for:!0},pt,{small:ne.small,inline:ne.inline,"model-value":ne.modelValue,rich:ne.rich,"onUpdate:modelValue":ft[0]||(ft[0]=yt=>ut(yt))}),null,16,["name","aria-disabled","small","inline","model-value","rich"]))),128))]),ot.value?(openBlock(),createElementBlock("div",{key:1,id:`messages-${ne.titleId}`,class:"fr-messages-group","aria-live":"assertive",role:"alert"},[createBaseVNode("p",{class:normalizeClass(["fr-message fr-message--info flex items-center",ct.value])},toDisplayString(ot.value),3)],8,Ys)):createCommentVNode("",!0)],10,Gs)]))}}),lc={class:"fr-segmented__element"},uc=["id","name","value","checked","disabled","aria-disabled"],dc=["for"],fc={key:1},pc=defineComponent({__name:"DsfrSegmented",props:{id:{default:()=>Z$2("segmented")},name:{default:void 0},modelValue:{default:""},value:{},label:{default:""},disabled:{type:Boolean},icon:{default:void 0}},emits:["update:modelValue"],setup(ne){let ee=ne,te=computed(()=>typeof ee.icon=="string"?{name:ee.icon}:ee.icon),st=computed(()=>ee.icon&&typeof ee.icon=="string"&&ee.icon.startsWith("fr-")?ee.icon:"");return(ot,ct)=>(openBlock(),createElementBlock("div",lc,[createBaseVNode("input",mergeProps({id:ne.id,type:"radio",name:ne.name,value:ne.value,checked:ne.modelValue===ne.value,disabled:ne.disabled,"aria-disabled":ne.disabled},ot.$attrs,{onClick:ct[0]||(ct[0]=ut=>ot.$emit("update:modelValue",ne.value))}),null,16,uc),createBaseVNode("label",{for:ne.id,class:normalizeClass(["fr-label",{[st.value]:st.value}])},[ne.icon&&!st.value?(openBlock(),createBlock($$3,normalizeProps(mergeProps({key:0},te.value)),null,16)):createCommentVNode("",!0),ne.icon?(openBlock(),createElementBlock("span",fc," ")):createCommentVNode("",!0),createTextVNode(" "+toDisplayString(ne.label),1)],10,dc)]))}}),mc={class:"fr-form-group"},hc=["disabled"],gc=["id"],_c={key:0,class:"fr-hint-text"},vc={class:"fr-segmented__elements"},yc=defineComponent({__name:"DsfrSegmentedSet",props:{titleId:{default:()=>Z$2("segmented-button","set")},disabled:{type:Boolean},small:{type:Boolean},inline:{type:Boolean},name:{default:()=>Z$2("segmented-button","set")},hint:{},legend:{default:""},modelValue:{},options:{default:()=>[]}},emits:["update:modelValue"],setup(ne,{emit:ee}){let te=ne,st=ee,ot=ct=>{ct!==te.modelValue&&st("update:modelValue",ct)};return(ct,ut)=>(openBlock(),createElementBlock("div",mc,[createBaseVNode("fieldset",{class:normalizeClass(["fr-segmented",{"fr-segmented--sm":ne.small,"fr-segmented--no-legend":!ne.legend}]),disabled:ne.disabled},[ne.legend?(openBlock(),createElementBlock("legend",{key:0,id:ne.titleId,class:normalizeClass(["fr-segmented__legend",{"fr-segmented__legend--inline":ne.inline}])},[renderSlot(ct.$slots,"legend",{},()=>[createTextVNode(toDisplayString(ne.legend),1)]),ne.hint?(openBlock(),createElementBlock("span",_c,toDisplayString(ne.hint),1)):createCommentVNode("",!0)],10,gc)):createCommentVNode("",!0),createBaseVNode("div",vc,[renderSlot(ct.$slots,"default",{},()=>[(openBlock(!0),createElementBlock(Fragment,null,renderList(ne.options,
69(dt,ht)=>(openBlock(),createBlock(pc,mergeProps({key:dt.value||ht,name:ne.name||dt.name},{ref_for:!0},{...dt,disabled:ne.disabled||dt.disabled},{"model-value":ne.modelValue,"onUpdate:modelValue":ut[0]||(ut[0]=ft=>ot(ft))}),null,16,["name","model-value"]))),128))])])],10,hc)]))}}),bc={class:"fr-share"},xc={class:"fr-share__title"},Sc={class:"fr-btns-group"},Cc=["title","href","onClick"],wc={key:0},Tc=["href","title"],Ec=["title"],Dc=defineComponent({__name:"DsfrShare",props:{title:{default:"Partager la page"},copyLabel:{default:"Copier dans le presse-papier"},mail:{default:()=>{}},networks:{default:()=>[]}},setup(ne){let ee=()=>{let st=window.location.href;navigator.clipboard.writeText(st)},te=({url:st,label:ot})=>{window.open(st,ot,"toolbar=no,location=yes,status=no,menubar=no,scrollbars=yes,resizable=yes,width=600,height=450")};return(st,ot)=>{var ct;return openBlock(),createElementBlock("div",bc,[createBaseVNode("p",xc,toDisplayString(ne.title),1),createBaseVNode("ul",Sc,[(openBlock(!0),createElementBlock(Fragment,null,renderList(ne.networks,(ut,dt)=>(openBlock(),createElementBlock("li",{key:dt},[createBaseVNode("a",{class:normalizeClass(`fr-btn fr-btn--${ut.name}`),title:`${ut.label} - nouvelle fenêtre`,href:ut.url,target:"_blank",rel:"noopener noreferrer",onClick:withModifiers(ht=>te(ut),["prevent"])},toDisplayString(ut.label),11,Cc)]))),128)),(ct=ne.mail)!=null&&ct.to?(openBlock(),createElementBlock("li",wc,[createBaseVNode("a",{class:"fr-btn fr-btn--mail",href:ne.mail.to,title:`${ne.mail.label} - nouvelle fenêtre`,target:"_blank",rel:"noopener noreferrer"},toDisplayString(ne.mail.label),9,Tc)])):createCommentVNode("",!0),createBaseVNode("li",null,[createBaseVNode("button",{class:"fr-btn fr-btn--copy",title:ne.copyLabel,onClick:ot[0]||(ot[0]=ut=>ee())},toDisplayString(ne.copyLabel),9,Ec)])])])}}}),rl=["id","aria-labelledby","tabindex"],il=Q$2(defineComponent({__name:"DsfrTabContent",props:{panelId:{},tabId:{}},setup(ne){useCssVars(dt=>({v480a19c4:ct.value,v4a7061d6:ut.value}));let ee=ne,te={true:"100%",false:"-100%"},{isVisible:st,asc:ot}=inject(de$1)(toRef$1(()=>ee.tabId)),ct=computed(()=>te[String(ot==null?void 0:ot.value)]),ut=computed(()=>te[String(!(ot!=null&&ot.value))]);return(dt,ht)=>(openBlock(),createBlock(Transition,{name:"slide-fade",mode:"in-out"},{default:withCtx(()=>[withDirectives(createBaseVNode("div",{id:ne.panelId,class:normalizeClass(["fr-tabs__panel",{"fr-tabs__panel--selected":unref(st)}]),role:"tabpanel","aria-labelledby":ne.tabId,tabindex:unref(st)?0:-1},[renderSlot(dt.$slots,"default",{},void 0,!0)],10,rl),[[vShow,unref(st)]])]),_:3}))}}),[["__scopeId","data-v-d925618f"]]),al={role:"presentation"},ol=["id","data-testid","tabindex","aria-selected","aria-controls"],sl={key:0,style:{"margin-left":"-0.25rem","margin-right":"0.5rem","font-size":"0.95rem"}},cl=defineComponent({inheritAttrs:!1,__name:"DsfrTabItem",props:{panelId:{},tabId:{},icon:{default:void 0}},emits:["click","next","previous","first","last"],setup(ne,{emit:ee}){let te=ne,st=ee,ot=ref$1(null),ct={ArrowRight:"next",ArrowLeft:"previous",Home:"first",End:"last"};function ut(ft){let pt=ft==null?void 0:ft.key,mt=ct[pt];mt&&st(mt)}let{isVisible:dt}=inject(de$1)(toRef$1(()=>te.tabId)),ht=useTemplateRef("button");return watch(dt,()=>{var ft;dt.value&&((ft=ht.value)==null||ft.focus())}),(ft,pt)=>(openBlock(),createElementBlock("li",al,[createBaseVNode("button",mergeProps(ft.$attrs,{id:ne.tabId,ref_key:"button",ref:ot,"data-testid":`test-${ne.tabId}`,class:"fr-tabs__tab",tabindex:unref(dt)?0:-1,role:"tab",type:"button","aria-selected":unref(dt),"aria-controls":ne.panelId,onClick:pt[0]||(pt[0]=withModifiers(mt=>ft.$emit("click",ne.tabId),["prevent"])),onKeydown:pt[1]||(pt[1]=mt=>ut(mt))}),[ne.icon?(openBlock(),createElementBlock("span",sl,[createVNode($$3,{name:ne.icon},null,8,["name"])])):createCommentVNode("",!0),renderSlot(ft.$slots,"default")],16,ol)]))}}),El=["aria-label"],Dl=16,Ol=defineComponent({__name:"DsfrTabs",props:{modelValue:{default:0},tabListName:{},tabTitles:{default:()=>[]},tabContents:{default:()=>[]}},emits:["update:modelValue"],setup(ne,{expose:ee,emit:te}){let st=ne,ot=te,ct=ref$1(!1),ut=computed({get:()=>st.modelValue,set(Ht){ot("update:modelValue",Ht)}}),dt=ref$1(new Map),ht=ref$1(0);provide(de$1,Ht=>{let zt=ref$1(!0);if(watch(ut,(Jt,Qt)=>{zt.value=Jt>Qt}),[...dt.value.values()].includes(Ht.value))return{isVisible:computed(()=>dt.value.get(ut.value)===Ht.value),asc:zt};let jt=ht.value++;dt.value.set(jt,Ht.value);let Wt=computed(()=>jt===ut.value);return watch(Ht,()=>{dt.value.set(jt,Ht.value)}),onUnmounted(()=>{dt.value.delete(jt)}),{isVisible:Wt}});let ft=ref$1(null),pt=ref$1(null),mt=ref$1(!1),yt=ref$1(!1),vt=ref$1(!1),_t=()=>{let Ht=pt.value;if(!Ht)return;let zt=Math.abs(Ht.scrollLeft),jt=getComputedStyle(Ht).direction==="rtl",Wt=zt<=Dl,Jt=zt>=Ht.scrollWidth-Ht.clientWidth-Dl;jt?(vt.value=!Wt,yt.value=!Jt):(yt.value=!Wt,vt.value=!Jt)},bt=()=>{let Ht=pt.value;Ht&&(mt.value=Ht.scrollWidth>Ht.clientWidth+Dl,mt.value?_t():(yt.value=!1,vt.value=!1))},xt=reactive({}),Mt=Ht=>{if(xt[Ht])return xt[Ht];let zt=Z$2("tab");return xt[Ht]=zt,zt},Ot=async()=>{let Ht=ut.value===0?st.tabTitles.length-1:ut.value-1;ct.value=!1,ut.value=Ht},kt=async()=>{let Ht=ut.value===st.tabTitles.length-1?0:ut.value+1;ct.value=!0,ut.value=Ht},Nt=async()=>{ut.value=0},Gt=async()=>{ut.value=st.tabTitles.length-1},Bt=ref$1({"--tabs-height":"100px"}),Ut=()=>{var Wt;if(ut.value<0||!pt.value||!pt.value.offsetHeight)return;let Ht=pt.value.offsetHeight,zt=(Wt=ft.value)==null?void 0:Wt.querySelectorAll(".fr-tabs__panel")[ut.value];if(!zt||!zt.offsetHeight)return;let jt=zt.offsetHeight;Bt.value["--tabs-height"]=`${Ht+jt}px`},Vt=ref$1(null);return onMounted(()=>{var Ht,zt;window.ResizeObserver&&(Vt.value=new window.ResizeObserver(()=>{Ut(),bt()})),(Ht=ft.value)==null||Ht.querySelectorAll(".fr-tabs__panel").forEach(jt=>{var Wt;jt&&((Wt=Vt.value)==null||Wt.observe(jt))}),pt.value&&((zt=Vt.value)==null||zt.observe(pt.value))}),onUnmounted(()=>{var Ht;(Ht=Vt.value)==null||Ht.disconnect()}),ee({renderTabs:Ut,selectFirst:Nt,selectLast:Gt}),(Ht,zt)=>(openBlock(),createElementBlock("div",{ref_key:"$el",ref:ft,class:"fr-tabs",style:normalizeStyle(Bt.value)},[createBaseVNode("ul",{ref_key:"tablist",ref:pt,class:normalizeClass(["fr-tabs__list",{"fr-tabs__shadow":mt.value,"fr-tabs__shadow--left":yt.value,"fr-tabs__shadow--right":vt.value}]),role:"tablist","aria-label":ne.tabListName,onScroll:_t},[renderSlot(Ht.$slots,"tab-items",{},()=>[(openBlock(!0),createElementBlock(Fragment,null,renderList(ne.tabTitles,(jt,Wt)=>(openBlock(),createBlock(cl,{key:Wt,icon:jt.icon,"panel-id":jt.panelId||`${Mt(Wt)}-panel`,"tab-id":jt.tabId||Mt(Wt),onClick:Jt=>ut.value=Wt,onNext:zt[0]||(zt[0]=Jt=>kt()),onPrevious:zt[1]||(zt[1]=Jt=>Ot()),onFirst:zt[2]||(zt[2]=Jt=>Nt()),onLast:zt[3]||(zt[3]=Jt=>Gt())},{default:withCtx(()=>
69[createTextVNode(toDisplayString(jt.title),1)]),_:2},1032,["icon","panel-id","tab-id","onClick"]))),128))])],42,El),(openBlock(!0),createElementBlock(Fragment,null,renderList(ne.tabContents,(jt,Wt)=>{var Jt,Qt,oi,ai;return openBlock(),createBlock(il,{key:Wt,"panel-id":((Qt=(Jt=ne.tabTitles)==null?void 0:Jt[Wt])==null?void 0:Qt.panelId)||`${Mt(Wt)}-panel`,"tab-id":((ai=(oi=ne.tabTitles)==null?void 0:oi[Wt])==null?void 0:ai.tabId)||Mt(Wt)},{default:withCtx(()=>[createTextVNode(toDisplayString(jt),1)]),_:2},1032,["panel-id","tab-id"])}),128)),renderSlot(Ht.$slots,"default")],4))}}),Yl=["id","disabled","aria-disabled","checked","data-testid","aria-describedby","name"],Xl=["id","for","data-fr-checked-label","data-fr-unchecked-label"],Zl=["id"],Ql=["id"],$l=["id"],eu=defineComponent({__name:"DsfrToggleSwitch",props:{modelValue:{type:Boolean},inputId:{default:()=>Z$2("toggle")},hint:{default:""},label:{default:""},disabled:{type:Boolean},labelLeft:{type:Boolean,default:!1},borderBottom:{type:Boolean,default:!1},activeText:{default:"Activé"},inactiveText:{default:"Désactivé"},noText:{type:Boolean,default:!1},name:{default:void 0},status:{default:void 0},validMessage:{},errorMessage:{}},emits:["update:modelValue"],setup(ne,{emit:ee}){let te=ne,st=ee,ot=computed(()=>`${te.inputId}-label`),ct=computed(()=>{if(te.status==="valid")return te.validMessage;if(te.status==="error")return te.errorMessage});return(ut,dt)=>(openBlock(),createElementBlock("div",{class:normalizeClass(["fr-toggle",{[`fr-toggle--${ne.status}`]:ne.status,"fr-toggle--border-bottom":ne.borderBottom}])},[createBaseVNode("input",{id:ne.inputId,disabled:ne.disabled,"aria-disabled":ne.disabled,type:"checkbox",checked:ne.modelValue,"data-testid":ne.inputId,class:"fr-toggle__input","aria-describedby":ot.value,name:ne.name,onInput:dt[0]||(dt[0]=ht=>st("update:modelValue",ht.target.checked))},null,40,Yl),createBaseVNode("label",{id:ot.value,class:"fr-toggle__label",for:ne.inputId,"data-fr-checked-label":ne.noText?void 0:ne.activeText,"data-fr-unchecked-label":ne.noText?void 0:ne.inactiveText,style:{"--toggle-status-width":"3.55208125rem"}},toDisplayString(ne.label),9,Xl),ne.hint?(openBlock(),createElementBlock("p",{key:0,id:`${ne.inputId}-hint-text`,class:"fr-hint-text"},toDisplayString(ne.hint),9,Zl)):createCommentVNode("",!0),ne.status?(openBlock(),createElementBlock("div",{key:1,id:`${ot.value}-messages`,class:"fr-messages-group","aria-live":"polite"},[createBaseVNode("p",{id:`${ot.value}-message-${ne.status}`,class:normalizeClass(["fr-message",{"fr-message--error":ne.status==="error","fr-message--valid":ne.status==="valid"}])},toDisplayString(ct.value),11,$l)],8,Ql)):createCommentVNode("",!0)],2))}}),ku=Object.freeze({left:0,top:0,width:16,height:16}),Au=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),ju=Object.freeze({...ku,...Au});Object.freeze({...ju,body:"",hidden:!1}),{...ku};var Mu=Object.freeze({width:null,height:null}),Nu=Object.freeze({...Mu,...Au});({...Nu});var rd={backgroundColor:"currentColor"},id$1={backgroundColor:"transparent"},ad={Image:"var(--svg)",Repeat:"no-repeat",Size:"100% 100%"},od={webkitMask:rd,mask:rd,background:id$1};for(let ne in od){let ee=od[ne];for(let te in ad)ee[ne+te]=ad[te]}var sd={};["horizontal","vertical"].forEach(ne=>{let ee=ne.slice(0,1)+"Flip";sd[ne+"-flip"]=ee,sd[ne.slice(0,1)+"-flip"]=ee,sd[ne+"Flip"]=ee});function tryOnScopeDispose(ne){return getCurrentScope()?(onScopeDispose(ne),!0):!1}const localProvidedStateMap=new WeakMap,injectLocal=(...ne)=>{var ee;const te=ne[0],st=(ee=getCurrentInstance())==null?void 0:ee.proxy;if(st==null&&!hasInjectionContext())throw new Error("injectLocal must be called in setup");return st&&localProvidedStateMap.has(st)&&te in localProvidedStateMap.get(st)?localProvidedStateMap.get(st)[te]:inject(...ne)},isClient=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const toString$2=Object.prototype.toString,isObject=ne=>toString$2.call(ne)==="[object Object]",noop$1=()=>{};function toRef(...ne){if(ne.length!==1)return toRef$1(...ne);const ee=ne[0];return typeof ee=="function"?readonly(customRef(()=>({get:ee,set:noop$1}))):ref$1(ee)}function createFilterWrapper(ne,ee){function te(...st){return new Promise((ot,ct)=>{Promise.resolve(ne(()=>ee.apply(this,st),{fn:ee,thisArg:this,args:st})).then(ot).catch(ct)})}return te}const bypassFilter=ne=>ne();function pausableFilter(ne=bypassFilter,ee={}){const{initialState:te="active"}=ee,st=toRef(te==="active");function ot(){st.value=!1}function ct(){st.value=!0}return{isActive:readonly(st),pause:ot,resume:ct,eventFilter:(...dt)=>{st.value&&ne(...dt)}}}function createSingletonPromise(ne){let ee;function te(){return ee||(ee=ne()),ee}return te.reset=async()=>{const st=ee;ee=void 0,st&&await st},te}function pxValue(ne){return ne.endsWith("rem")?Number.parseFloat(ne)*16:Number.parseFloat(ne)}function toArray(ne){return Array.isArray(ne)?ne:[ne]}function getLifeCycleTarget(ne){return getCurrentInstance()}function watchWithFilter(ne,ee,te={}){const{eventFilter:st=bypassFilter,...ot}=te;return watch(ne,createFilterWrapper(st,ee),ot)}function watchPausable(ne,ee,te={}){const{eventFilter:st,initialState:ot="active",...ct}=te,{eventFilter:ut,pause:dt,resume:ht,isActive:ft}=pausableFilter(st,{initialState:ot});return{stop:watchWithFilter(ne,ee,{...ct,eventFilter:ut}),pause:dt,resume:ht,isActive:ft}}function tryOnMounted(ne,ee=!0,te){getLifeCycleTarget()?onMounted(ne,te):ee?ne():nextTick(ne)}function useTimeoutFn(ne,ee,te={}){const{immediate:st=!0,immediateCallback:ot=!1}=te,ct=shallowRef(!1);let ut;function dt(){ut&&(clearTimeout(ut),ut=void 0)}function ht(){ct.value=!1,dt()}function ft(...pt){ot&&ne(),dt(),ct.value=!0,ut=setTimeout(()=>{ct.value=!1,ut=void 0,ne(...pt)},toValue$1(ee))}return st&&(ct.value=!0,isClient&&ft()),tryOnScopeDispose(ht),{isPending:shallowReadonly(ct),start:ft,stop:ht}}function watchImmediate(ne,ee,te){return watch(ne,ee,{...te,immediate:!0})}const defaultWindow=isClient?window:void 0,defaultNavigator=isClient?window.navigator:void 0;function unrefElement(ne){var ee;const te=toValue$1(ne);return(ee=te==null?void 0:te.$el)!=null?ee:te}function useEventListener(...ne){const ee=[],te=()=>{ee.forEach(dt=>dt()),ee.length=0},st=(dt,ht,ft,pt)=>(dt.addEventListener(ht,ft,pt),()=>dt.removeEventListener(ht,ft,pt)),ot=computed(()=>{const dt=toArray(toValue$1(ne[0])).filter(ht=>ht!=null);return dt.every(ht=>typeof ht!="string")?dt:void 0}),ct=watchImmediate(()=>{var dt,ht;return[(ht=(dt=ot.value)==null?void 0:dt.map(ft=>unrefElement(ft)))!=null?ht:[defaultWindow].filter(ft=>ft!=null),toArray(toValue$1(ot.value?ne[1]:ne[0])),toArray(unref(ot.value?ne[2]:ne[1])),toValue$1(ot.value?ne[3]:ne[2])]},([dt,ht,ft,pt])=>{if(te(),!(dt!=null&&dt.length)||!(ht!=null&&ht.length)||!(ft!=null&&ft.length))return;const mt=isObject(pt)?{...pt}:pt;ee.push(...dt.flatMap(yt=>ht.flatMap(vt=>ft.map(_t=>st(yt,vt,_t,mt)))))},{flush:"post"}),ut=()=>{ct(),te()};return tryOnScopeDispose(te),ut}
69function useMounted(){const ne=shallowRef(!1),ee=getCurrentInstance();return ee&&onMounted(()=>{ne.value=!0},ee),ne}function useSupported(ne){const ee=useMounted();return computed(()=>(ee.value,!!ne()))}const ssrWidthSymbol=Symbol("vueuse-ssr-width");function useSSRWidth(){const ne=hasInjectionContext()?injectLocal(ssrWidthSymbol,null):null;return typeof ne=="number"?ne:void 0}function useMediaQuery(ne,ee={}){const{window:te=defaultWindow,ssrWidth:st=useSSRWidth()}=ee,ot=useSupported(()=>te&&"matchMedia"in te&&typeof te.matchMedia=="function"),ct=shallowRef(typeof st=="number"),ut=shallowRef(),dt=shallowRef(!1),ht=ft=>{dt.value=ft.matches};return watchEffect(()=>{if(ct.value){ct.value=!ot.value;const ft=toValue$1(ne).split(",");dt.value=ft.some(pt=>{const mt=pt.includes("not all"),yt=pt.match(/\(\s*min-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/),vt=pt.match(/\(\s*max-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/);let _t=!!(yt||vt);return yt&&_t&&(_t=st>=pxValue(yt[1])),vt&&_t&&(_t=st<=pxValue(vt[1])),mt?!_t:_t});return}ot.value&&(ut.value=te.matchMedia(toValue$1(ne)),dt.value=ut.value.matches)}),useEventListener(ut,"change",ht,{passive:!0}),computed(()=>dt.value)}function usePermission(ne,ee={}){const{controls:te=!1,navigator:st=defaultNavigator}=ee,ot=useSupported(()=>st&&"permissions"in st),ct=shallowRef(),ut=typeof ne=="string"?{name:ne}:ne,dt=shallowRef(),ht=()=>{var pt,mt;dt.value=(mt=(pt=ct.value)==null?void 0:pt.state)!=null?mt:"prompt"};useEventListener(ct,"change",ht,{passive:!0});const ft=createSingletonPromise(async()=>{if(ot.value){if(!ct.value)try{ct.value=await st.permissions.query(ut)}catch{ct.value=void 0}finally{ht()}if(te)return toRaw(ct.value)}});return ft(),te?{state:dt,isSupported:ot,query:ft}:dt}function useClipboard(ne={}){const{navigator:ee=defaultNavigator,read:te=!1,source:st,copiedDuring:ot=1500,legacy:ct=!1}=ne,ut=useSupported(()=>ee&&"clipboard"in ee),dt=usePermission("clipboard-read"),ht=usePermission("clipboard-write"),ft=computed(()=>ut.value||ct),pt=shallowRef(""),mt=shallowRef(!1),yt=useTimeoutFn(()=>mt.value=!1,ot,{immediate:!1});async function vt(){let Ot=!(ut.value&&Mt(dt.value));if(!Ot)try{pt.value=await ee.clipboard.readText()}catch{Ot=!0}Ot&&(pt.value=xt())}ft.value&&te&&useEventListener(["copy","cut"],vt,{passive:!0});async function _t(Ot=toValue$1(st)){if(ft.value&&Ot!=null){let kt=!(ut.value&&Mt(ht.value));if(!kt)try{await ee.clipboard.writeText(Ot)}catch{kt=!0}kt&&bt(Ot),pt.value=Ot,mt.value=!0,yt.start()}}function bt(Ot){const kt=document.createElement("textarea");kt.value=Ot??"",kt.style.position="absolute",kt.style.opacity="0",document.body.appendChild(kt),kt.select(),document.execCommand("copy"),kt.remove()}function xt(){var Ot,kt,Nt;return(Nt=(kt=(Ot=document==null?void 0:document.getSelection)==null?void 0:Ot.call(document))==null?void 0:kt.toString())!=null?Nt:""}function Mt(Ot){return Ot==="granted"||Ot==="prompt"}return{isSupported:ft,text:pt,copied:mt,copy:_t}}const _global=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},globalKey="__vueuse_ssr_handlers__",handlers=getHandlers();function getHandlers(){return globalKey in _global||(_global[globalKey]=_global[globalKey]||{}),_global[globalKey]}function getSSRHandler(ne,ee){return handlers[ne]||ee}function guessSerializerType(ne){return ne==null?"any":ne instanceof Set?"set":ne instanceof Map?"map":ne instanceof Date?"date":typeof ne=="boolean"?"boolean":typeof ne=="string"?"string":typeof ne=="object"?"object":Number.isNaN(ne)?"any":"number"}const StorageSerializers={boolean:{read:ne=>ne==="true",write:ne=>String(ne)},object:{read:ne=>JSON.parse(ne),write:ne=>JSON.stringify(ne)},number:{read:ne=>Number.parseFloat(ne),write:ne=>String(ne)},any:{read:ne=>ne,write:ne=>String(ne)},string:{read:ne=>ne,write:ne=>String(ne)},map:{read:ne=>new Map(JSON.parse(ne)),write:ne=>JSON.stringify(Array.from(ne.entries()))},set:{read:ne=>new Set(JSON.parse(ne)),write:ne=>JSON.stringify(Array.from(ne))},date:{read:ne=>new Date(ne),write:ne=>ne.toISOString()}},customStorageEventName="vueuse-storage";function useStorage(ne,ee,te,st={}){var ot;const{flush:ct="pre",deep:ut=!0,listenToStorageChanges:dt=!0,writeDefaults:ht=!0,mergeDefaults:ft=!1,shallow:pt,window:mt=defaultWindow,eventFilter:yt,onError:vt=Qt=>{console.error(Qt)},initOnMounted:_t}=st,bt=(pt?shallowRef:ref$1)(typeof ee=="function"?ee():ee),xt=computed(()=>toValue$1(ne));if(!te)try{te=getSSRHandler("getDefaultStorage",()=>{var Qt;return(Qt=defaultWindow)==null?void 0:Qt.localStorage})()}catch(Qt){vt(Qt)}if(!te)return bt;const Mt=toValue$1(ee),Ot=guessSerializerType(Mt),kt=(ot=st.serializer)!=null?ot:StorageSerializers[Ot],{pause:Nt,resume:Gt}=watchPausable(bt,Qt=>zt(Qt),{flush:ct,deep:ut,eventFilter:yt});watch(xt,()=>Wt(),{flush:ct});let Bt=!1;const Ut=Qt=>{_t&&!Bt||Wt(Qt)},Vt=Qt=>{_t&&!Bt||Jt(Qt)};mt&&dt&&(te instanceof Storage?useEventListener(mt,"storage",Ut,{passive:!0}
69):useEventListener(mt,customStorageEventName,Vt)),_t?tryOnMounted(()=>{Bt=!0,Wt()}):Wt();function Ht(Qt,oi){if(mt){const ai={key:xt.value,oldValue:Qt,newValue:oi,storageArea:te};mt.dispatchEvent(te instanceof Storage?new StorageEvent("storage",ai):new CustomEvent(customStorageEventName,{detail:ai}))}}function zt(Qt){try{const oi=te.getItem(xt.value);if(Qt==null)Ht(oi,null),te.removeItem(xt.value);else{const ai=kt.write(Qt);oi!==ai&&(te.setItem(xt.value,ai),Ht(oi,ai))}}catch(oi){vt(oi)}}function jt(Qt){const oi=Qt?Qt.newValue:te.getItem(xt.value);if(oi==null)return ht&&Mt!=null&&te.setItem(xt.value,kt.write(Mt)),Mt;if(!Qt&&ft){const ai=kt.read(oi);return typeof ft=="function"?ft(ai,Mt):Ot==="object"&&!Array.isArray(ai)?{...Mt,...ai}:ai}else return typeof oi!="string"?oi:kt.read(oi)}function Wt(Qt){if(!(Qt&&Qt.storageArea!==te)){if(Qt&&Qt.key==null){bt.value=Mt;return}if(!(Qt&&Qt.key!==xt.value)){Nt();try{const oi=kt.write(bt.value);(Qt===void 0||(Qt==null?void 0:Qt.newValue)!==oi)&&(bt.value=jt(Qt))}catch(oi){vt(oi)}finally{Qt?nextTick(Gt):Gt()}}}}function Jt(Qt){Wt(Qt.detail)}return bt}function useResizeObserver(ne,ee,te={}){const{window:st=defaultWindow,...ot}=te;let ct;const ut=useSupported(()=>st&&"ResizeObserver"in st),dt=()=>{ct&&(ct.disconnect(),ct=void 0)},ht=computed(()=>{const mt=toValue$1(ne);return Array.isArray(mt)?mt.map(yt=>unrefElement(yt)):[unrefElement(mt)]}),ft=watch(ht,mt=>
69{if(dt(),ut.value&&st){ct=new ResizeObserver(ee);for(const yt of mt)yt&&ct.observe(yt,ot)}},{immediate:!0,flush:"post"}),pt=()=>{dt(),ft()};return tryOnScopeDispose(pt),{isSupported:ut,stop:pt}}function useElementSize(ne,ee={width:0,height:0},te={}){const{window:st=defaultWindow,box:ot="content-box"}=te,ct=computed(()=>{var mt,yt;return(yt=(mt=unrefElement(ne))==null?void 0:mt.namespaceURI)==null?void 0:yt.includes("svg")}),ut=shallowRef(ee.width),dt=shallowRef(ee.height),{stop:ht}=useResizeObserver(ne,([mt])=>{const yt=ot==="border-box"?mt.borderBoxSize:ot==="content-box"?mt.contentBoxSize:mt.devicePixelContentBoxSize;if(st&&ct.value){const vt=unrefElement(ne);if(vt){const _t=vt.getBoundingClientRect();ut.value=_t.width,dt.value=_t.height}}else if(yt){const vt=toArray(yt);ut.value=vt.reduce((_t,{inlineSize:bt})=>_t+bt,0),dt.value=vt.reduce((_t,{blockSize:bt})=>_t+bt,0)}else ut.value=mt.contentRect.width,dt.value=mt.contentRect.height},te);tryOnMounted(()=>{const mt=unrefElement(ne);mt&&(ut.value="offsetWidth"in mt?mt.offsetWidth:ee.width,dt.value="offsetHeight"in mt?mt.offsetHeight:ee.height)});const ft=watch(()=>unrefElement(ne),mt=>{ut.value=mt?ee.width:0,dt.value=mt?ee.height:0});function pt(){ht(),ft()}return{width:ut,height:dt,stop:pt}}function useUrlSearchParams(ne="history",ee={}){const{initialValue:te={},removeNullishValues:st=!0,removeFalsyValues:ot=!1,write:ct=!0,writeMode:ut="replace",window:dt=defaultWindow,stringify:ht=Nt=>Nt.toString()}=ee;if(!dt)return reactive(te);const ft=reactive({});function pt(){if(ne==="history")return dt.location.search||"";if(ne==="hash"){const Nt=dt.location.hash||"",Gt=Nt.indexOf("?");return Gt>0?Nt.slice(Gt):""}else return(dt.location.hash||"").replace(/^#/,"")}function mt(Nt){const Gt=ht(Nt);if(ne==="history")return`${Gt?`?${Gt}`:""}${dt.location.hash||""}`;if(ne==="hash-params")return`${dt.location.search||""}${Gt?`#${Gt}`:""}`;const Bt=dt.location.hash||"#",Ut=Bt.indexOf("?");return Ut>0?`${dt.location.search||""}${Bt.slice(0,Ut)}${Gt?`?${Gt}`:""}`:`${dt.location.search||""}${Bt}${Gt?`?${Gt}`:""}`}function yt(){return new URLSearchParams(pt())}function vt(Nt){const Gt=new Set(Object.keys(ft));for(const Bt of Nt.keys()){const Ut=Nt.getAll(Bt);ft[Bt]=Ut.length>1?Ut:Nt.get(Bt)||"",Gt.delete(Bt)}Array.from(Gt).forEach(Bt=>delete ft[Bt])}const{pause:_t,resume:bt}=watchPausable(ft,()=>{const Nt=new URLSearchParams("");Object.keys(ft).forEach(Gt=>{const Bt=ft[Gt];Array.isArray(Bt)?Bt.forEach(Ut=>Nt.append(Gt,Ut)):st&&Bt==null||ot&&!Bt?Nt.delete(Gt):Nt.set(Gt,Bt)}),xt(Nt,!1)},{deep:!0});function xt(Nt,Gt,Bt=!0){_t(),Gt&&vt(Nt),ut==="replace"?dt.history.replaceState(dt.history.state,dt.document.title,dt.location.pathname+mt(Nt)):Bt&&dt.history.pushState(dt.history.state,dt.document.title,dt.location.pathname+mt(Nt)),nextTick(()=>bt())}function Mt(){ct&&xt(yt(),!0,!1)}const Ot={passive:!0};useEventListener(dt,"popstate",Mt,Ot),ne!=="history"&&useEventListener(dt,"hashchange",Mt,Ot);const kt=yt();return kt.keys().next().value?vt(kt):Object.assign(ft,te),ft}const{setScheme,scheme}=Ce$1(),NAMESPACE$2="cartes.gouv.fr",ns$2=(ne=>NAMESPACE$2+"."+ne),VERSION="12",SCHEME_KEY_LS_MAIN="scheme",SCHEME_KEY_LS_CARTES="vue-dsfr-scheme",DOCUMENT_TEMP_KEY_LS="document-temporary",useAppStore=defineStore("app",()=>{var ne=useStorage(ns$2("version"),VERSION);ne.value!==VERSION&&(localStorage.clear(),localStorage.setItem(ns$2("version"),VERSION),ne.value=VERSION),watch(ne,()=>{localStorage.setItem(ns$2("version"),ne.value)});var ee=useStorage(SCHEME_KEY_LS_MAIN);ee.value&&(localStorage.setItem(SCHEME_KEY_LS_CARTES,ee.value),setScheme(ee.value)),watch(ee,()=>{localStorage.setItem(SCHEME_KEY_LS_CARTES,ee.value),setScheme(ee.value)}),watch(scheme,()=>{localStorage.setItem(SCHEME_KEY_LS_MAIN,scheme.value)});const te=ref$1(!1);function st(){sessionStorage.getItem(ns$2("siteOpened"))?te.value=!1:(te.value=!0,sessionStorage.setItem(ns$2("siteOpened"),"true"))}var ot=useStorage(DOCUMENT_TEMP_KEY_LS,"");return watch(ot,()=>{localStorage.setItem(DOCUMENT_TEMP_KEY_LS,ot.value)}),{ns:ns$2,siteOpened:te,detectFirstOpen:st,setDocumentTemporary:ht=>{ot.value=ht},getDocumentTemporary:()=>ot.value,clearDocumentTemporary:()=>{ot.value=""}}}),useDataStore=defineStore("data",()=>
69{const ne=shallowRef({}),ee=ref$1({}),te=shallowRef({}),st=ref$1({}),ot=ref$1([]),ct=shallowRef([]),ut=ref$1([]),dt=shallowRef([]),ht=ref$1(!1),ft=ref$1(""),pt="WMTS,WMS,TMS",mt="IGNF:LAMB93,EPSG:2154",yt=ref$1([]),vt=ref$1([]),_t=computed(()=>{let ni=[];return ni=[...new Set(Object.values(ne.value).flatMap(Cn=>(Cn==null?void 0:Cn.thematic)||[]).filter(Cn=>typeof Cn=="string"))].sort((Cn,Ln)=>Cn==="Autres"?1:Ln==="Autres"?-1:Cn.localeCompare(Ln,"fr",{sensitivity:"base"})),ni=ni.map(Cn=>[Cn,Ht(Cn)]),ni}),bt=computed(()=>{let ni=[];return ni=[...new Set(Object.values(ne.value).flatMap(Cn=>(Cn==null?void 0:Cn.producer)||[]).filter(Cn=>typeof Cn=="string"))].sort((Cn,Ln)=>Cn==="Autres"?1:Ln==="Autres"?-1:Cn.localeCompare(Ln,"fr",{sensitivity:"base"})),ni.map(Cn=>[Cn,jt(Cn)])});async function xt(ni,Cn=!1){const Ln=await fetch(ni);if(!Ln.ok)throw new Error(`Erreur HTTP (${Ln.status})`);if(!Cn&&!(Ln.headers.get("content-type")||"").includes("application/json"))throw new Error("Format de réponse inattendu");return Ln.json()}async function Mt(){const ni=window.__ENV__.VITE_GPF_CONF_TERRITORIES;try{const Cn=await xt(ni);if(!Cn||!Array.isArray(Cn.territories))throw new Error("Format des territoires invalide");if(Cn.territories.length===0)throw new Error("Aucun territoire trouvé");return Cn.territories}catch{return null}}async function Ot(){const ni=window.__ENV__.VITE_GPF_CONF_ALERTS;try{const Cn=await xt(ni);if(!Array.isArray(Cn))throw new Error("Format des alertes invalide");return Cn}catch{return[]}}async function kt(){const ni=Ln=>!!Ln&&typeof Ln=="object"&&!Array.isArray(Ln)&&!!Ln.layers&&typeof Ln.layers=="object"&&!!Ln.generalOptions&&typeof Ln.generalOptions=="object"&&!!Ln.tileMatrixSets&&typeof Ln.tileMatrixSets=="object",Cn=window.__ENV__.VITE_GPF_CONF_ENTREE_CARTO;try{const Ln=await xt(Cn,!0);if(!ni(Ln))throw new Error("Format des données d'entrée carto invalide");return Ln}catch{const Ln=await xt("data/entreeCarto.json",!0);if(!ni(Ln))throw new Error("Format des données d'entrée carto invalide (fallback)");return Ln}}async function Nt(){try{const ni=await Ot();ut.value=ni;const Cn=await kt();return ot.value=await Mt()||Cn.territories,st.value=Cn.contacts,ct.value=Cn.featured||[],ne.value=Cn.layers,ee.value.apiKeys={...Cn.generalOptions.apiKeys},te.value=Cn.tileMatrixSets,dt.value=Cn.topics||[],ht.value=!0,Cn.layers}catch(ni){console.error(ni),ht.value=!1,ft.value=ni.message}}function Gt(){return ot.value}function Bt(){return st.value}function Ut(){return ut.value.filter(ni=>ni.visibility.map)}function Vt(){return _t.value}function Ht(ni){const Cn=new Map(Object.entries(ne.value||{}));return Array.from(Cn.entries()).filter(([,Ln])=>{var Un;return(Un=Ln==null?void 0:Ln.thematic)==null?void 0:Un.includes(ni)}).map(([Ln])=>Ln)}function zt(){return bt.value}function jt(ni){const Cn=new Map(Object.entries(ne.value||{}));return Array.from(Cn.entries()).filter(([,Ln])=>{var Un;return(Un=Ln==null?void 0:Ln.producer)==null?void 0:Un.includes(ni)}).map(Ln=>Ln)}function Wt(){return ct.value}function Jt(){return ne.value}function Qt(){return Object.fromEntries(Object.entries(ne.value).map(([,ni])=>[ni.name,ni.serviceParams.id.split(":")[1]]))}function oi(ni,Cn){for(const Ln in ne.value)if(Object.hasOwnProperty.call(ne.value,Ln)){const Un=ne.value[Ln];if(Un.name===ni&&Un.serviceParams.id.split(":")[1]===Cn)return Un.name+"$GEOPORTAIL:"+Un.serviceParams.id}}function ai(ni,Cn){const Ln=this.getLayerIdByName(ni,Cn);return this.getLayerByID(Ln)}function xn(ni){return new Map(Object.entries(ne.value||{})).get(ni)}function An(ni){return Object.values(ne.value).filter(Cn=>{if(ni&&Cn.title===ni)return Cn})}function Nn(ni){var Cn=[],Ln=ee.value.apiKeys;for(var Un in Ln){var Pn=Ln[Un];Pn.forEach(function(Mn){Mn===ni&&Cn.push(Un)})}return Cn}function Xt(ni,Cn){var Ln=null;if((Cn==="WMS"||Object.keys(this.getTileMatrixSets()).length!==0)&&Object.keys(this.getLayers()).length!==0){var Un=this.getLayerIdByName(ni,Cn);Ln=this.getLayerParamsByID(Un)}return Ln}function Zt(ni){var Cn=null;if(ni){Cn={};var Ln=this.getLayerByID(ni),Un=this.getLayerKeysByID(ni);if(Un.length===0)return;for(var Pn=0;Pn<Un.length;Pn++){const On=new Map(Object.entries(Ln.serviceParams.serverUrl||{})).get(Un[Pn]);On&&(Cn.url=On)}if(/\/v\//.test(Cn.url)?Cn.styles=" ":Cn.styles=Ln.styles[0].name,Cn.version=Ln.serviceParams.version,Cn.format=Ln.formats[0].name,Cn.projection=Ln.defaultProjection,Cn.minScale=Ln.globalConstraint.minScaleDenominator,Cn.maxScale=Ln.globalConstraint.maxScaleDenominator,Cn.extent=Ln.globalConstraint.bbox,Cn.legends=Ln.legends,Cn.title=Ln.title,Cn.description=Ln.description,Ln.wmtsOptions){Cn.tileMatrixSetLimits=Ln.wmtsOptions.tileMatrixSetLimits;var Mn=Ln.wmtsOptions.tileMatrixSetLink;if(Mn){Cn.TMSLink=Mn;var Yt=this.getTileMatrixSetByID(Mn);Cn.matrixIds=Object.keys(Yt.tileMatrices),Cn.tileMatrices=Yt.tileMatrices,Cn.nativeResolutions=Yt.nativeResolutions}}}return Cn}function Kt(ni){var Cn=null;if(ni){var Ln=this.getLayerByID(ni);Cn={},Cn.projection=Ln.globalConstraint.crs,Cn.minScale=Ln.globalConstraint.minScaleDenominator,Cn.maxScale=Ln.globalConstraint.maxScaleDenominator,Cn.extent=Ln.globalConstraint.bbox}return Cn}function ti(ni,Cn){var Ln=this.getLayerIdByName(ni,Cn);return this.getGlobalConstraintsByID(Ln)}function qt(){return te.value}function ii(ni){const Cn=te.value;for(const[Ln,Un]of Object.entries(Cn))if(!Ln.localeCompare(ni))return Un;return null}function wn(){return dt.value}return{error:ft,isLoaded:ht,filterProjections:mt,filterServices:pt,producers:vt,themes:yt,fetchData:Nt,getTerritories:Gt,getContacts:Bt,getAlerts:Ut,getLayersByThematic:Ht,getThematics:Vt,getLayersByProducer:jt,getProducers:zt,getFeatured:Wt,getLayers:Jt,getLayersSignatures:Qt,getLayerKeysByID:Nn,getLayerIdByName:oi,getLayerByName:ai,getLayerByID:xn,getLayerByTitle:An,getTileMatrixSets:qt,getTileMatrixSetByID:ii,getLayerParamsByName:Xt,getLayerParamsByID:Zt,getGlobalConstraintsByID:Kt,getGlobalConstraintsByName:ti,getTopics:wn}});function warn(...ne){console.warn(...ne)}const Relationship={UNKNOWN:0,INTERSECTING:1,ABOVE:2,RIGHT:4,BELOW:8,LEFT:16};function boundingExtent(ne){const ee=createEmpty();for(let te=0,st=ne.length;te<st;++te)extendCoordinate(ee,ne[te]);return ee}function _boundingExtentXYs(ne,ee,te){const st=Math.min.apply(null,ne),ot=Math.min.apply(null,ee),ct=Math.max.apply(null,ne),ut=Math.max.apply(null,ee);return createOrUpdate$2(st,ot,ct,ut,te)}function buffer(ne,ee,te){return te?(te[0]=ne[0]-ee,te[1]=ne[1]-ee,te[2]=ne[2]+ee,te[3]=ne[3]+ee,te):[ne[0]-ee,ne[1]-ee,ne[2]+ee,ne[3]+ee]}function clone$2(ne,ee){return ee?(ee[0]=ne[0],ee[1]=ne[1],ee[2]=ne[2],ee[3]=ne[3],ee):ne.slice()}function closestSquaredDistanceXY(ne,ee,te){let st,ot;return ee<ne[0]?st=ne[0]-ee:ne[2]<ee?st=ee-ne[2]:st=0,te<ne[1]?ot=ne[1]-te:ne[3]<te?ot=te-ne[3]:ot=0,st*st+ot*ot}function containsCoordinate(ne,ee){return containsXY(ne,ee[0],ee[1])}function containsExtent(ne,ee){return ne[0]<=ee[0]&&ee[2]<=ne[2]&&ne[1]<=ee[1]&&ee[3]<=ne[3]}function containsXY(ne,ee,te){return ne[0]<=ee&&ee<=ne[2]&&ne[1]<=te&&te<=ne[3]}function coordinateRelationship(ne,ee){const te=ne[0],st=ne[1],ot=ne[2],ct=ne[3],ut=ee[0],dt=ee[1];let ht=Relationship.UNKNOWN;return ut<te?ht=ht|Relationship.LEFT:ut>ot&&(ht=ht|Relationship.RIGHT),dt<st?ht=ht|Relationship.BELOW:dt>ct&&(ht=ht|Relationship.ABOVE),ht===Relationship.UNKNOWN&&(ht=Relationship.INTERSECTING),ht}function createEmpty(){return[1/0,1/0,-1/0,-1/0]}function createOrUpdate$2(ne,ee,te,st,ot){return ot?(ot[0]=ne,ot[1]=ee,ot[2]=te,ot[3]=st,ot):[ne,ee,te,st]}function createOrUpdateEmpty(ne){return createOrUpdate$2(1/0,1/0,-1/0,-1/0,ne)}function createOrUpdateFromCoordinate(ne,ee){const te=ne[0],st=ne[1];return createOrUpdate$2(te,st,te,st,ee)}function createOrUpdateFromFlatCoordinates(ne,ee,te,st,ot){const ct=createOrUpdateEmpty(ot);return extendFlatCoordinates(ct,ne,ee,te,st)}function equals$2(ne,ee){return ne[0]==ee[0]&&ne[2]==ee[2]&&ne[1]==ee[1]&&ne[3]==ee[3]}function extend$4(ne,ee){return ee[0]<ne[0]&&(ne[0]=ee[0]),ee[2]>ne[2]&&(ne[2]=ee[2]),ee[1]<ne[1]&&(ne[1]=ee[1]),ee[3]>ne[3]&&(ne[3]=ee[3]),ne}function extendCoordinate(ne,ee){ee[0]<ne[0]&&(ne[0]=ee[0]),ee[0]>ne[2]&&(ne[2]=ee[0]),ee[1]<ne[1]&&(ne[1]=ee[1]),ee[1]>ne[3]&&(ne[3]=ee[1])}function extendFlatCoordinates(ne,ee,te,st,ot){for(;te<st;te+=ot)extendXY(ne,ee[te],ee[te+1]);return ne}function extendXY(ne,ee,te){ne[0]=Math.min(ne[0],ee),ne[1]=Math.min(ne[1],te),ne[2]=Math.max(ne[2],ee),ne[3]=Math.max(ne[3],te)}function forEachCorner(ne,ee){let te;return te=ee(getBottomLeft(ne)),te||(te=ee(getBottomRight(ne)),te)||(te=ee(getTopRight(ne)),te)||(te=ee(getTopLeft(ne)),te)?te:!1}function getArea$1(ne){let ee=0;return isEmpty$1(ne)||(ee=getWidth(ne)*getHeight(ne)),ee}function getBottomLeft(ne){return[ne[0],ne[1]]}function getBottomRight(ne){return[ne[2],ne[1]]}function getCenter(ne){return[(ne[0]+ne[2])/2,(ne[1]+ne[3])/2]}function getCorner(ne,ee){let te;if(ee==="bottom-left")te=getBottomLeft(ne);else if(ee==="bottom-right")te=getBottomRight(ne);else if(ee==="top-left")te=getTopLeft(ne);else if(ee==="top-right")te=getTopRight(ne);else throw new Error("Invalid corner");return te}function getForViewAndSize(ne,ee,te,st,ot){const[ct,ut,dt,ht,ft,pt,mt,yt]=getRotatedViewport(ne,ee,te,st);return createOrUpdate$2(Math.min(ct,dt,ft,mt),Math.min(ut,ht,pt,yt),Math.max(ct,dt,ft,mt),Math.max(ut,ht,pt,yt),ot)}function getRotatedViewport(ne,ee,te,st){const ot=ee*st[0]/2,ct=ee*st[1]/2,ut=Math.cos(te),dt=Math.sin(te),ht=ot*ut,ft=ot*dt,pt=ct*ut,mt=ct*dt,yt=ne[0],vt=ne[1];return[yt-ht+mt,vt-ft-pt,yt-ht-mt,vt-ft+pt,yt+ht-mt,vt+ft+pt,yt+ht+mt,vt+ft-pt,yt-ht+mt,vt-ft-pt]}function getHeight(ne){return ne[3]-ne[1]}function getIntersection(ne,ee,te){const st=te||createEmpty();return intersects$1(ne,ee)?(ne[0]>ee[0]?st[0]=ne[0]:st[0]=ee[0],ne[1]>ee[1]?st[1]=ne[1]:st[1]=ee[1],ne[2]<ee[2]?st[2]=ne[2]:st[2]=ee[2],ne[3]<ee[3]?st[3]=ne[3]:st[3]=ee[3]):createOrUpdateEmpty(st),st}function getDifference(ne,ee){if(!intersects$1(ne,ee))return[ne.slice()];if(containsExtent(ee,ne))return[];const[te,st,ot,ct]=ne,ut=Math.max(te,ee[0]),dt=Math.max(st,ee[1]),ht=
vendor: 6,149 bytes, line 69
69Math.min(ot,ee[2]),ft=Math.min(ct,ee[3]),pt=[];return ut>te&&pt.push([te,st,ut,ct]),ht<ot&&pt.push([ht,st,ot,ct]),dt>st&&pt.push([ut,st,ht,dt]),ft<ct&&pt.push([ut,ft,ht,ct]),pt}function getTopLeft(ne){return[ne[0],ne[3]]}function getTopRight(ne){return[ne[2],ne[3]]}function getWidth(ne){return ne[2]-ne[0]}function intersects$1(ne,ee){return ne[0]<=ee[2]&&ne[2]>=ee[0]&&ne[1]<=ee[3]&&ne[3]>=ee[1]}function isEmpty$1(ne){return ne[2]<ne[0]||ne[3]<ne[1]}function returnOrUpdate(ne,ee){return ee?(ee[0]=ne[0],ee[1]=ne[1],ee[2]=ne[2],ee[3]=ne[3],ee):ne}function scaleFromCenter(ne,ee){const te=(ne[2]-ne[0])/2*(ee-1),st=(ne[3]-ne[1])/2*(ee-1);ne[0]-=te,ne[2]+=te,ne[1]-=st,ne[3]+=st}function intersectsSegment(ne,ee,te){let st=!1;const ot=coordinateRelationship(ne,ee),ct=coordinateRelationship(ne,te);if(ot===Relationship.INTERSECTING||ct===Relationship.INTERSECTING)st=!0;else{const ut=ne[0],dt=ne[1],ht=ne[2],ft=ne[3],pt=ee[0],mt=ee[1],yt=te[0],vt=te[1],_t=(vt-mt)/(yt-pt);let bt,xt;ct&Relationship.ABOVE&&!(ot&Relationship.ABOVE)&&(bt=yt-(vt-ft)/_t,st=bt>=ut&&bt<=ht),!st&&ct&Relationship.RIGHT&&!(ot&Relationship.RIGHT)&&(xt=vt-(yt-ht)*_t,st=xt>=dt&&xt<=ft),!st&&ct&Relationship.BELOW&&!(ot&Relationship.BELOW)&&(bt=yt-(vt-dt)/_t,st=bt>=ut&&bt<=ht),!st&&ct&Relationship.LEFT&&!(ot&Relationship.LEFT)&&(xt=vt-(yt-ut)*_t,st=xt>=dt&&xt<=ft)}return st}function applyTransform(ne,ee,te,st){if(isEmpty$1(ne))return createOrUpdateEmpty(te);let ot=[];if(st>1){const dt=ne[2]-ne[0],ht=ne[3]-ne[1];for(let ft=0;ft<st;++ft)ot.push(ne[0]+dt*ft/st,ne[1],ne[2],ne[1]+ht*ft/st,ne[2]-dt*ft/st,ne[3],ne[0],ne[3]-ht*ft/st)}else ot=[ne[0],ne[1],ne[2],ne[1],ne[2],ne[3],ne[0],ne[3]];ee(ot,ot,2);const ct=[],ut=[];for(let dt=0,ht=ot.length;dt<ht;dt+=2)ct.push(ot[dt]),ut.push(ot[dt+1]);return _boundingExtentXYs(ct,ut,te)}function wrapX$2(ne,ee){const te=ee.getExtent(),st=getCenter(ne);if(ee.canWrapX()&&(st[0]<te[0]||st[0]>=te[2])){const ot=getWidth(te),ut=Math.floor((st[0]-te[0])/ot)*ot;ne[0]-=ut,ne[2]-=ut}return ne}function wrapAndSliceX(ne,ee,te){if(ee.canWrapX()){const st=ee.getExtent();if(!isFinite(ne[0])||!isFinite(ne[2]))return[[st[0],ne[1],st[2],ne[3]]];wrapX$2(ne,ee);const ot=getWidth(st);if(getWidth(ne)>ot&&!te)return[[st[0],ne[1],st[2],ne[3]]];if(ne[0]<st[0])return[[ne[0]+ot,ne[1],st[2],ne[3]],[st[0],ne[1],ne[2],ne[3]]];if(ne[2]>st[2])return[[ne[0],ne[1],st[2],ne[3]],[st[0],ne[1],ne[2]-ot,ne[3]]]}return[ne]}function subtractExtents(ne,ee){let te=[ne];for(let st=0,ot=ee.length;st<ot&&te.length>0;++st){const ct=[];for(let ut=0,dt=te.length;ut<dt;++ut)ct.push(...getDifference(te[ut],ee[st]));te=ct}return te}function clamp$1(ne,ee,te){return Math.min(Math.max(ne,ee),te)}function squaredSegmentDistance(ne,ee,te,st,ot,ct){const ut=ot-te,dt=ct-st;if(ut!==0||dt!==0){const ht=((ne-te)*ut+(ee-st)*dt)/(ut*ut+dt*dt);ht>1?(te=ot,st=ct):ht>0&&(te+=ut*ht,st+=dt*ht)}return squaredDistance$1(ne,ee,te,st)}function squaredDistance$1(ne,ee,te,st){const ot=te-ne,ct=st-ee;return ot*ot+ct*ct}function solveLinearSystem(ne){const ee=ne.length;for(let st=0;st<ee;st++){let ot=st,ct=Math.abs(ne[st][st]);for(let dt=st+1;dt<ee;dt++){const ht=Math.abs(ne[dt][st]);ht>ct&&(ct=ht,ot=dt)}if(ct===0)return null;const ut=ne[ot];ne[ot]=ne[st],ne[st]=ut;for(let dt=st+1;dt<ee;dt++){const ht=-ne[dt][st]/ne[st][st];for(let ft=st;ft<ee+1;ft++)st==ft?ne[dt][ft]=0:ne[dt][ft]+=ht*ne[st][ft]}}const te=new Array(ee);for(let st=ee-1;st>=0;st--){te[st]=ne[st][ee]/ne[st][st];for(let ot=st-1;ot>=0;ot--)ne[ot][ee]-=ne[ot][st]*te[st]}return te}function toDegrees(ne){return ne*180/Math.PI}function toRadians(ne){return ne*Math.PI/180}function modulo(ne,ee){const te=ne%ee;return te*ee<0?te+ee:te}function lerp(ne,ee,te){return ne+te*(ee-ne)}function toFixed(ne,ee){const te=Math.pow(10,ee);return Math.round(ne*te)/te}function round(ne,ee){return Math.round(toFixed(ne,ee))}function floor(ne,ee){return Math.floor(toFixed(ne,ee))}function ceil(ne,ee){return Math.ceil(toFixed(ne,ee))}function wrap(ne,ee,te){if(ne>=ee&&ne<te)return ne;const st=te-ee;return((ne-ee)%st+st)%st+ee}function padNumber(ne,ee,te){const st=""+ne;let ot=st.indexOf(".");return ot=ot===-1?st.length:ot,ot>ee?st:new Array(1+ee-ot).join("0")+st}function compareVersions(ne,ee){const te=(""+ne).split("."),st=(""+ee).split(".");for(let ot=0;ot<Math.max(te.length,st.length);ot++){const ct=parseInt(te[ot]||"0",10),ut=parseInt(st[ot]||"0",10);if(ct>ut)return 1;if(ut>ct)return-1}return 0}function add$3(ne,ee){return ne[0]+=+ee[0],ne[1]+=+ee[1],ne}function closestOnSegment(ne,ee){const te=ne[0],st=ne[1],ot=ee[0],ct=ee[1],ut=ot[0],dt=ot[1],ht=ct[0],ft=ct[1],pt=ht-ut,mt=ft-dt,yt=pt===0&&mt===0?0:(pt*(te-ut)+mt*(st-dt))/(pt*pt+mt*mt||0);let vt,_t;return yt<=0?(vt=ut,_t=dt):yt>=1?(vt=ht,_t=ft):(vt=ut+yt*pt,_t=dt+yt*mt),[vt,_t]}function equals$1(ne,ee){let te=!0;for(let st=ne.length-1;st>=0;--st)if(ne[st]!=ee[st]){te=!1;break}return te}function rotate$1(ne,ee){const te=Math.cos(ee),st=Math.sin(ee),ot=ne[0]*te-ne[1]*st,ct=ne[1]*te+ne[0]*st;return ne[0]=ot,ne[1]=ct,ne}function scale$3(ne,ee){return ne[0]*=ee,ne[1]*=ee,ne}function squaredDistance(ne,ee){const te=ne[0]-ee[0],st=ne[1]-ee[1];return te*te+st*st}function distance(ne,ee){return Math.sqrt(squaredDistance(ne,ee))}function squaredDistanceToSegment(ne,ee){return squaredDistance(ne,closestOnSegment(ne,ee))}function wrapX$1(ne,ee){if(ee.canWrapX()){const te=getWidth(ee.getExtent()),st=getWorldsAway(ne,ee,te);st&&(ne[0]-=st*te)}return ne}function getWorldsAway(ne,ee,te){const st=ee.getExtent();let ot=0;return ee.canWrapX()&&(ne[0]<st[0]||ne[0]>st[2])&&(te=te||getWidth(st),ot=Math.floor((ne[0]-st[0])/te)),ot}function angleBetween(ne,ee,te){const st=Math.sqrt((ee[0]-ne[0])*(ee[0]-ne[0])+(ee[1]-ne[1])*(ee[1]-ne[1])),ot=[(ee[0]-ne[0])/st,(ee[1]-ne[1])/st],ct=[-ot[1],ot[0]],ut=Math.sqrt((te[0]-ne[0])*(te[0]-ne[0])+(te[1]-ne[1])*(te[1]-ne[1])),dt=[(te[0]-ne[0])/ut,(te[1]-ne[1])/ut];let ht=st===0||ut===0?0:Math.acos(clamp$1(dt[0]*ot[0]+dt[1]*ot[1],-1,1));return ht=Math.max(ht,1e-5),dt[0]*ct[0]+dt[1]*ct[1]>0?ht:Math.PI*2-ht}const METERS_PER_UNIT$1={radians:6370997/(2*Math.PI),degrees:2*Math.PI*6370997/360,ft:.3048,m:1,"us-ft":1200/3937};
69let Projection$1=class{constructor(ee){this.code_=ee.code,this.units_=ee.units,this.extent_=ee.extent!==void 0?ee.extent:null,this.worldExtent_=ee.worldExtent!==void 0?ee.worldExtent:null,this.axisOrientation_=ee.axisOrientation!==void 0?ee.axisOrientation:"enu",this.global_=ee.global!==void 0?ee.global:!1,this.canWrapX_=!!(this.global_&&this.extent_),this.getPointResolutionFunc_=ee.getPointResolution,this.defaultTileGrid_=null,this.metersPerUnit_=ee.metersPerUnit}canWrapX(){return this.canWrapX_}getCode(){return this.code_}getExtent(){return this.extent_}getUnits(){return this.units_}getMetersPerUnit(){return this.metersPerUnit_||METERS_PER_UNIT$1[this.units_]}getWorldExtent(){return this.worldExtent_}getAxisOrientation(){return this.axisOrientation_}isGlobal(){return this.global_}setGlobal(ee){this.global_=ee,this.canWrapX_=!!(ee&&this.extent_)}getDefaultTileGrid(){return this.defaultTileGrid_}setDefaultTileGrid(ee){this.defaultTileGrid_=ee}setExtent(ee){this.extent_=ee,this.canWrapX_=!!(this.global_&&ee)}setWorldExtent(ee){this.worldExtent_=ee}setGetPointResolution(ee){this.getPointResolutionFunc_=ee}getPointResolutionFunc(){return this.getPointResolutionFunc_}};const RADIUS$1=6378137,HALF_SIZE=Math.PI*RADIUS$1,EXTENT$2=[-HALF_SIZE,-HALF_SIZE,HALF_SIZE,HALF_SIZE],WORLD_EXTENT=[-180,-85,180,85],MAX_SAFE_Y=RADIUS$1*Math.log(Math.tan(Math.PI/2));class EPSG3857Projection extends Projection$1{constructor(ee){super({code:ee,units:"m",extent:EXTENT$2,global:!0,worldExtent:WORLD_EXTENT,getPointResolution:function(te,st){return te/Math.cosh(st[1]/RADIUS$1)}})}}const PROJECTIONS$1=[new EPSG3857Projection("EPSG:3857"),new EPSG3857Projection("EPSG:102100"),new EPSG3857Projection("EPSG:102113"),new EPSG3857Projection("EPSG:900913"),new EPSG3857Projection("http://www.opengis.net/def/crs/EPSG/0/3857"),new EPSG3857Projection("http://www.opengis.net/gml/srs/epsg.xml#3857")];function fromEPSG4326(ne,ee,te,st){const ot=ne.length;te=te>1?te:2,st=st??te,ee===void 0&&(te>2?ee=ne.slice():ee=new Array(ot));for(let ct=0;ct<ot;ct+=st){ee[ct]=HALF_SIZE*ne[ct]/180;let ut=RADIUS$1*Math.log(Math.tan(Math.PI*(+ne[ct+1]+90)/360));ut>MAX_SAFE_Y?ut=MAX_SAFE_Y:ut<-MAX_SAFE_Y&&(ut=-MAX_SAFE_Y),ee[ct+1]=ut}return ee}function toEPSG4326(ne,ee,te,st){const ot=ne.length;te=te>1?te:2,st=st??te,ee===void 0&&(te>2?ee=ne.slice():ee=new Array(ot));for(let ct=0;ct<ot;ct+=st)ee[ct]=180*ne[ct]/HALF_SIZE,ee[ct+1]=360*Math.atan(Math.exp(ne[ct+1]/RADIUS$1))/Math.PI-90;return ee}const RADIUS=6378137,EXTENT$1=[-180,-90,180,90],METERS_PER_UNIT=Math.PI*RADIUS/180;class EPSG4326Projection extends Projection$1{constructor(ee,te){super({code:ee,units:"degrees",extent:EXTENT$1,axisOrientation:te,global:!0,metersPerUnit:METERS_PER_UNIT,worldExtent:EXTENT$1})}}const PROJECTIONS=[new EPSG4326Projection("CRS:84"),new EPSG4326Projection("EPSG:4326","neu"),new EPSG4326Projection("urn:ogc:def:crs:OGC:1.3:CRS84"),new EPSG4326Projection("urn:ogc:def:crs:OGC:2:84"),new EPSG4326Projection("http://www.opengis.net/def/crs/OGC/1.3/CRS84"),new EPSG4326Projection("http://www.opengis.net/gml/srs/epsg.xml#4326","neu"),new EPSG4326Projection("http://www.opengis.net/def/crs/EPSG/0/4326","neu")];let cache$1={};function get$5(ne){return cache$1[ne]||cache$1[ne.replace(/urn:(x-)?ogc:def:crs:EPSG:(.*:)?(\w+)$/,"EPSG:$3")]||null}function add$2(ne,ee){cache$1[ne]=ee}function clear$1(ne){for(const ee in ne)delete ne[ee]}function isEmpty(ne){let ee;for(ee in ne)return!1;return!ee}let transforms={};function add$1(ne,ee,te){const st=ne.getCode(),ot=ee.getCode();st in transforms||(transforms[st]={}),transforms[st][ot]=te}function get$4(ne,ee){return ne in transforms&&ee in transforms[ne]?transforms[ne][ee]:null}const K0=.9996,E$2=.00669438,E2$1=E$2*E$2,E3=E2$1*E$2,E_P2=E$2/(1-E$2),SQRT_E=Math.sqrt(1-E$2),_E=(1-SQRT_E)/(1+SQRT_E),_E2=_E*_E,_E3=_E2*_E,_E4=_E3*_E,_E5=_E4*_E,M1=1-E$2/4-3*E2$1/64-5*E3/256,M2=3*E$2/8+3*E2$1/32+45*E3/1024,M3=15*E2$1/256+45*E3/1024,M4=35*E3/3072,P2=3/2*_E-27/32*_E3+269/512*_E5,P3=21/16*_E2-55/32*_E4,P4=151/96*_E3-417/128*_E5,P5=1097/512*_E4,R$2=6378137;function toLonLat$1(ne,ee,te){const st=ne-5e5,ut=(te.north?ee:ee-1e7)/K0/(R$2*M1),dt=ut+P2*Math.sin(2*ut)+P3*Math.sin(4*ut)+P4*Math.sin(6*ut)+P5*Math.sin(8*ut),ht=Math.sin(dt),ft=ht*ht,pt=Math.cos(dt),mt=ht/pt,yt=mt*mt,vt=yt*yt,_t=1-E$2*ft,bt=Math.sqrt(1-E$2*ft),xt=R$2/bt,Mt=(1-E$2)/_t,Ot=E_P2*pt**2,kt=Ot*Ot,Nt=st/(xt*K0),Gt=Nt*Nt,Bt=Gt*Nt,Ut=Bt*Nt,Vt=Ut*Nt,Ht=Vt*Nt,zt=dt-mt/Mt*(Gt/2-Ut/24*(5+3*yt+10*Ot-4*kt-9*E_P2))+Ht/720*(61+90*yt+298*Ot+45*vt-252*E_P2-3*kt);let jt=(Nt-Bt/6*(1+2*yt+Ot)+Vt/120*(5-2*Ot+28*yt-3*kt+8*E_P2+24*vt))/pt;return jt=wrap(jt+toRadians(zoneToCentralLongitude(te.number)),-Math.PI,Math.PI),[toDegrees(jt),toDegrees(zt)]}const MIN_LATITUDE=-80,MAX_LATITUDE=84,MIN_LONGITUDE=-180,MAX_LONGITUDE=180;function fromLonLat$1(ne,ee,te){ne=wrap(ne,MIN_LONGITUDE,MAX_LONGITUDE),ee<MIN_LATITUDE?ee=MIN_LATITUDE:ee>MAX_LATITUDE&&(ee=MAX_LATITUDE);
69const st=toRadians(ee),ot=Math.sin(st),ct=Math.cos(st),ut=ot/ct,dt=ut*ut,ht=dt*dt,ft=toRadians(ne),pt=zoneToCentralLongitude(te.number),mt=toRadians(pt),yt=R$2/Math.sqrt(1-E$2*ot**2),vt=E_P2*ct**2,_t=ct*wrap(ft-mt,-Math.PI,Math.PI),bt=_t*_t,xt=bt*_t,Mt=xt*_t,Ot=Mt*_t,kt=Ot*_t,Nt=R$2*(M1*st-M2*Math.sin(2*st)+M3*Math.sin(4*st)-M4*Math.sin(6*st)),Gt=K0*yt*(_t+xt/6*(1-dt+vt)+Ot/120*(5-18*dt+ht+72*vt-58*E_P2))+5e5;let Bt=K0*(Nt+yt*ut*(bt/2+Mt/24*(5-dt+9*vt+4*vt**2)+kt/720*(61-58*dt+ht+600*vt-330*E_P2)));return te.north||(Bt+=1e7),[Gt,Bt]}function zoneToCentralLongitude(ne){return(ne-1)*6-180+3}const epsgRegExes=[/^EPSG:(\d+)$/,/^urn:ogc:def:crs:EPSG::(\d+)$/,/^http:\/\/www\.opengis\.net\/def\/crs\/EPSG\/0\/(\d+)$/];function zoneFromCode(ne){let ee=0;for(const ot of epsgRegExes){const ct=ne.match(ot);if(ct){ee=parseInt(ct[1]);break}}if(!ee)return null;let te=0,st=!1;return ee>32700&&ee<32761?te=ee-32700:ee>32600&&ee<32661&&(st=!0,te=ee-32600),te?{number:te,north:st}:null}function makeTransformFunction(ne,ee){return function(te,st,ot,ct){const ut=te.length;ot=ot>1?ot:2,ct=ct??ot,st||(ot>2?st=te.slice():st=new Array(ut));for(let dt=0;dt<ut;dt+=ct){const ht=te[dt],ft=te[dt+1],pt=ne(ht,ft,ee);st[dt]=pt[0],st[dt+1]=pt[1]}return st}}function makeProjection(ne){return zoneFromCode(ne)?new Projection$1({code:ne,units:"m"}):null}function makeTransforms(ne){const ee=zoneFromCode(ne.getCode());return ee?{forward:makeTransformFunction(fromLonLat$1,ee),inverse:makeTransformFunction(toLonLat$1,ee)}:null}const DEFAULT_RADIUS=63710088e-1;function getDistance(ne,ee,te){te=te||DEFAULT_RADIUS;const st=toRadians(ne[1]),ot=toRadians(ee[1]),ct=(ot-st)/2,ut=toRadians(ee[0]-ne[0])/2,dt=Math.sin(ct)*Math.sin(ct)+Math.sin(ut)*Math.sin(ut)*Math.cos(st)*Math.cos(ot);return 2*te*Math.atan2(Math.sqrt(dt),Math.sqrt(1-dt))}function getAreaInternal(ne,ee){let te=0;const st=ne.length;let ot=ne[st-1][0],ct=ne[st-1][1];for(let ut=0;ut<st;ut++){const dt=ne[ut][0],ht=ne[ut][1];te+=toRadians(dt-ot)*(2+Math.sin(toRadians(ct))+Math.sin(toRadians(ht))),ot=dt,ct=ht}return te*ee*ee/2}function getArea(ne,ee){ee=ee||{};const te=ee.radius||DEFAULT_RADIUS,st=ee.projection||"EPSG:3857",ot=ne.getType();ot!=="GeometryCollection"&&(ne=ne.clone().transform(st,"EPSG:4326"));let ct=0,ut,dt,ht,ft,pt,mt;switch(ot){case"Point":case"MultiPoint":case"LineString":case"MultiLineString":case"LinearRing":break;case"Polygon":{for(ut=ne.getCoordinates(),ct=Math.abs(getAreaInternal(ut[0],te)),ht=1,ft=ut.length;ht<ft;++ht)ct-=Math.abs(getAreaInternal(ut[ht],te));break}case"MultiPolygon":{for(ut=ne.getCoordinates(),ht=0,ft=ut.length;ht<ft;++ht)for(dt=ut[ht],ct+=Math.abs(getAreaInternal(dt[0],te)),pt=1,mt=dt.length;pt<mt;++pt)ct-=Math.abs(getAreaInternal(dt[pt],te));break}case"GeometryCollection":{const yt=ne.getGeometries();for(ht=0,ft=yt.length;ht<ft;++ht)ct+=getArea(yt[ht],ee);break}default:throw new Error("Unsupported geometry type: "+ot)}return ct}function offset(ne,ee,te,st){st=st||DEFAULT_RADIUS;const ot=toRadians(ne[1]),ct=toRadians(ne[0]),ut=ee/st,dt=Math.asin(Math.sin(ot)*Math.cos(ut)+Math.cos(ot)*Math.sin(ut)*Math.cos(te)),ht=ct+Math.atan2(Math.sin(te)*Math.sin(ut)*Math.cos(ot),Math.cos(ut)-Math.sin(ot)*Math.sin(dt));return[toDegrees(ht),toDegrees(dt)]}const transformFactories=[makeTransforms],projectionFactories=[makeProjection];let showCoordinateWarning=!0;function disableCoordinateWarning(ne){showCoordinateWarning=!1}function cloneTransform(ne,ee){if(ee!==void 0){for(let te=0,st=ne.length;te<st;++te)ee[te]=ne[te];ee=ee}else ee=ne.slice();return ee}function identityTransform(ne,ee){if(ee!==void 0&&ne!==ee){for(let te=0,st=ne.length;te<st;++te)ee[te]=ne[te];ne=ee}return ne}function addProjection(ne){add$2(ne.getCode(),ne),add$1(ne,ne,cloneTransform)}function addProjections(ne){ne.forEach(addProjection)}function get$3(ne){if(typeof ne!="string")return ne;const ee=get$5(ne);if(ee)return ee;for(const te of projectionFactories){const st=te(ne);if(st)return st}return null}function getPointResolution(ne,ee,te,st){ne=get$3(ne);let ot;const ct=ne.getPointResolutionFunc();if(ct){if(ot=ct(ee,te),st&&st!==ne.getUnits()){const ut=ne.getMetersPerUnit();ut&&(ot=ot*ut/METERS_PER_UNIT$1[st])}}else{const ut=ne.getUnits();if(ut=="degrees"&&!st||st=="degrees")ot=ee;
69else{const dt=getTransformFromProjections(ne,get$3("EPSG:4326"));if(!dt&&ut!=="degrees")ot=ee*ne.getMetersPerUnit();else{let ft=[te[0]-ee/2,te[1],te[0]+ee/2,te[1],te[0],te[1]-ee/2,te[0],te[1]+ee/2];ft=dt(ft,ft,2);const pt=getDistance(ft.slice(0,2),ft.slice(2,4)),mt=getDistance(ft.slice(4,6),ft.slice(6,8));ot=(pt+mt)/2}const ht=st?METERS_PER_UNIT$1[st]:ne.getMetersPerUnit();ht!==void 0&&(ot/=ht)}}return ot}function addEquivalentProjections(ne){addProjections(ne),ne.forEach(function(ee){ne.forEach(function(te){ee!==te&&add$1(ee,te,cloneTransform)})})}function addEquivalentTransforms(ne,ee,te,st){ne.forEach(function(ot){ee.forEach(function(ct){add$1(ot,ct,te),add$1(ct,ot,st)})})}function createProjection(ne,ee){return ne?typeof ne=="string"?get$3(ne):ne:get$3(ee)}function createTransformFromCoordinateTransform(ne){return(function(ee,te,st,ot){const ct=ee.length;st=st!==void 0?st:2,ot=ot??st,te=te!==void 0?te:new Array(ct);for(let ut=0;ut<ct;ut+=ot){const dt=ne(ee.slice(ut,ut+st)),ht=dt.length;for(let ft=0,pt=ot;ft<pt;++ft)te[ut+ft]=ft>=ht?ee[ut+ft]:dt[ft]}return te})}function addCoordinateTransforms(ne,ee,te,st){const ot=get$3(ne),ct=get$3(ee);add$1(ot,ct,createTransformFromCoordinateTransform(te)),add$1(ct,ot,createTransformFromCoordinateTransform(st))}function fromLonLat(ne,ee){return disableCoordinateWarning(),transform$1(ne,"EPSG:4326",ee!==void 0?ee:"EPSG:3857")}function toLonLat(ne,ee){const te=transform$1(ne,"EPSG:3857","EPSG:4326"),st=te[0];return(st<-180||st>180)&&(te[0]=modulo(st+180,360)-180),te}function equivalent$1(ne,ee){if(ne===ee)return!0;const te=ne.getUnits()===ee.getUnits();return(ne.getCode()===ee.getCode()||getTransformFromProjections(ne,ee)===cloneTransform)&&te}function getTransformFromProjections(ne,ee){const te=ne.getCode(),st=ee.getCode();let ot=get$4(te,st);if(ot)return ot;let ct=null,ut=null;for(const ht of transformFactories)ct||(ct=ht(ne)),ut||(ut=ht(ee));if(!ct&&!ut)return null;const dt="EPSG:4326";if(ut)if(ct)ot=composeTransformFuncs(ct.inverse,ut.forward);else{const ht=get$4(te,dt);ht&&(ot=composeTransformFuncs(ht,ut.forward))}else{const ht=get$4(dt,st);ht&&(ot=composeTransformFuncs(ct.inverse,ht))}return ot&&(addProjection(ne),addProjection(ee),add$1(ne,ee,ot)),ot}function composeTransformFuncs(ne,ee){return function(te,st,ot,ct){return st=ne(te,st,ot,ct),ee(st,st,ot,ct)}}function getTransform(ne,ee){const te=get$3(ne),st=get$3(ee);return getTransformFromProjections(te,st)}function transform$1(ne,ee,te){const st=getTransform(ee,te);if(!st){const ot=get$3(ee).getCode(),ct=get$3(te).getCode();throw new Error(`No transform available between ${ot} and ${ct}`)}return st(ne,void 0,ne.length)}function transformExtent(ne,ee,te,st){const ot=getTransform(ee,te);return applyTransform(ne,ot,void 0,st)}let userProjection=null;function getUserProjection(){return userProjection}function toUserCoordinate(ne,ee){return ne}function fromUserCoordinate(ne,ee){return showCoordinateWarning&&!equals$1(ne,[0,0])&&ne[0]>=-180&&ne[0]<=180&&ne[1]>=-90&&ne[1]<=90&&(showCoordinateWarning=!1,warn("Call useGeographic() from ol/proj once to work with [longitude, latitude] coordinates.")),ne}function toUserExtent(ne,ee){return ne}function fromUserExtent(ne,ee){return ne}function fromUserResolution(ne,ee){return ne}function addCommon(){addEquivalentProjections(PROJECTIONS$1),addEquivalentProjections(PROJECTIONS),addEquivalentTransforms(PROJECTIONS,PROJECTIONS$1,fromEPSG4326,toEPSG4326)}addCommon();function useUrlParams(ne){var ee={},te={};if(ne){const dt=new URL(ne),ht=new URLSearchParams(dt.search);for(const[ft,pt]of ht.entries())te[ft]=pt}else te=useUrlSearchParams("history");if(te)try{const dt=Object.keys(te);for(let ht=0;ht<dt.length;ht++){const ft=dt[ht];switch(ft){case"c":var st=te[ft].split(",");if(st.length!==2)throw new Error(`Le paramètre 'c' du permalien est invalide : ${te[ft]} !`);ee.lon=parseFloat(st[0]),ee.lat=parseFloat(st[1]);var ot=fromLonLat([ee.lon,ee.lat]);if(!ot||ot.length!==2)throw new Error(`Le paramètre 'c' du permalien est invalide : ${te[ft]} !`);ee.x=ot[0],ee.y=ot[1],ee.center=[ee.lon,ee.lat];break;case"l":ee.layers=te[ft];break;case"w":break;case"d":ee.bookmarks=te[ft];break;case"z":ee.zoom=parseInt(te[ft],10);break;case"p":var ct=te[ft].split(",");if(ct.length!==2)throw new Error(`Le paramètre 'p' du permalien est invalide : ${te[ft]} !`);ee.geolocation=[parseFloat(ct[0]),parseFloat(ct[1])];break;case"geolocation":ee.geolocation=te[ft];break;case"permalink":var ut=te[ft].toLowerCase();if(ut!=="yes"&&ut!=="no")throw new Error(`Le paramètre 'permalink' du permalien est invalide : ${te[ft]} !`);ee.permalink=ut;break;case"redirect":ee.redirect=te[ft];break;default:break}}}catch(dt){throw new Error(`Erreur de parsing du permalien : ${dt.message} !`)}return ee}function useMatchMedia(ne){var ee={SM:575,MD:767,LG:991,XL:1439};if(Object.prototype.hasOwnProperty.call(ee,ne)){const te="(max-width: "+ee[ne]+"px)";return useMediaQuery(te)}}
69const version$2="1.0.0-beta.14-hotfix-gfi",Pkg$1={version:version$2},MapEventType={POSTRENDER:"postrender",MOVESTART:"movestart",MOVEEND:"moveend",LOADSTART:"loadstart",LOADEND:"loadend"},ObjectEventType={PROPERTYCHANGE:"propertychange"};function listen(ne,ee,te,st,ot){if(ot){const ut=te;te=function(dt){return ne.removeEventListener(ee,te),ut.call(st??this,dt)}}else st&&st!==ne&&(te=te.bind(st));const ct={target:ne,type:ee,listener:te};return ne.addEventListener(ee,te),ct}function listenOnce(ne,ee,te,st){return listen(ne,ee,te,st,!0)}function unlistenByKey(ne){ne&&ne.target&&(ne.target.removeEventListener(ne.type,ne.listener),clear$1(ne))}const EventType={CHANGE:"change",ERROR:"error",CONTEXTMENU:"contextmenu",CLICK:"click",DBLCLICK:"dblclick",KEYDOWN:"keydown",KEYPRESS:"keypress",LOAD:"load",TOUCHMOVE:"touchmove",WHEEL:"wheel"};class Disposable{constructor(){this.disposed=!1}dispose(){this.disposed||(this.disposed=!0,this.disposeInternal())}disposeInternal(){}}function binarySearch$1(ne,ee,te){let st,ot;te=te||ascending;let ct=0,ut=ne.length,dt=!1;for(;ct<ut;)st=ct+(ut-ct>>1),ot=+te(ne[st],ee),ot<0?ct=st+1:(ut=st,dt=!ot);return dt?ct:~ct}function ascending(ne,ee){return ne>ee?1:ne<ee?-1:0}function descending(ne,ee){return ne<ee?1:ne>ee?-1:0}function linearFindNearest(ne,ee,te){if(ne[0]<=ee)return 0;const st=ne.length;if(ee<=ne[st-1])return st-1;if(typeof te=="function"){for(let ot=1;ot<st;++ot){const ct=ne[ot];if(ct===ee)return ot;if(ct<ee)return te(ee,ne[ot-1],ct)>0?ot-1:ot}return st-1}if(te>0){for(let ot=1;ot<st;++ot)if(ne[ot]<ee)return ot-1;return st-1}if(te<0){for(let ot=1;ot<st;++ot)if(ne[ot]<=ee)return ot;return st-1}for(let ot=1;ot<st;++ot){if(ne[ot]==ee)return ot;if(ne[ot]<ee)return ne[ot-1]-ee<ee-ne[ot]?ot-1:ot}return st-1}function reverseSubArray(ne,ee,te){for(;ee<te;){const st=ne[ee];ne[ee]=ne[te],ne[te]=st,++ee,--te}}function extend$3(ne,ee){const te=Array.isArray(ee)?ee:[ee],st=te.length;for(let ot=0;ot<st;ot++)ne[ne.length]=te[ot]}function equals(ne,ee){const te=ne.length;if(te!==ee.length)return!1;for(let st=0;st<te;st++)if(ne[st]!==ee[st])return!1;return!0}function isSorted(ne,ee,te){const st=ee||ascending;return ne.every(function(ot,ct){if(ct===0)return!0;const ut=st(ne[ct-1],ot);return!(ut>0||ut===0)})}function TRUE(){return!0}function FALSE(){return!1}function VOID(){}function memoizeOne(ne){let ee,te,st;return function(){const ot=Array.prototype.slice.call(arguments);return(!te||this!==st||!equals(ot,te))&&(st=this,te=ot,ee=ne.apply(this,arguments)),ee}}function toPromise(ne){function ee(){let te;try{te=ne()}catch(st){return Promise.reject(st)}return te instanceof Promise?te:Promise.resolve(te)}return ee()}class BaseEvent{constructor(ee){this.propagationStopped,this.defaultPrevented,this.type=ee,this.target=null}preventDefault(){this.defaultPrevented=!0}stopPropagation(){this.propagationStopped=!0}}class Target extends Disposable{constructor(ee){super(),this.eventTarget_=ee,this.pendingRemovals_=null,this.dispatching_=null,this.listeners_=null}addEventListener(ee,te){if(!ee||!te)return;const st=this.listeners_||(this.listeners_={}),ot=st[ee]||(st[ee]=[]);ot.includes(te)||ot.push(te)}dispatchEvent(ee){const te=typeof ee=="string",st=te?ee:ee.type,ot=this.listeners_&&this.listeners_[st];if(!ot)return;const ct=te?new BaseEvent(ee):ee;ct.target||(ct.target=this.eventTarget_||this);const ut=this.dispatching_||(this.dispatching_={}),dt=this.pendingRemovals_||(this.pendingRemovals_={});st in ut||(ut[st]=0,dt[st]=0),++ut[st];let ht;for(let ft=0,pt=ot.length;ft<pt;++ft)if("handleEvent"in ot[ft]?ht=ot[ft].handleEvent(ct):ht=ot[ft].call(this,ct),ht===!1||ct.propagationStopped){ht=!1;break}if(--ut[st]===0){let ft=dt[st];for(delete dt[st];ft--;)this.removeEventListener(st,VOID);delete ut[st]}return ht}disposeInternal(){this.listeners_&&clear$1(this.listeners_)}getListeners(ee){return this.listeners_&&this.listeners_[ee]||void 0}hasListener(ee){return this.listeners_?ee?ee in this.listeners_:Object.keys(this.listeners_).length>0:!1}removeEventListener(ee,te){if(!this.listeners_)return;const st=this.listeners_[ee];if(!st)return;const ot=st.indexOf(te);ot!==-1&&(this.pendingRemovals_&&ee in this.pendingRemovals_?(st[ot]=VOID,++this.pendingRemovals_[ee]):(st.splice(ot,1),st.length===0&&delete this.listeners_[ee]))}}class Observable extends Target{constructor(){super(),this.on=this.onInternal,this.once=this.onceInternal,this.un=this.unInternal,this.revision_=0}changed(){++this.revision_,this.dispatchEvent(EventType.CHANGE)}getRevision(){return this.revision_}onInternal(ee,te){if(Array.isArray(ee)){const st=ee.length,ot=new Array(st);for(let ct=0;ct<st;++ct)ot[ct]=listen(this,ee[ct],te);return ot}return listen(this,ee,te)}onceInternal(ee,te){let st;if(Array.isArray(ee)){const ot=ee.length;st=new Array(ot);for(let ct=0;ct<ot;++ct)st[ct]=listenOnce(this,ee[ct],te)}else st=listenOnce(this,ee,te);return te.ol_key=st,st}unInternal(ee,te){const st=te.ol_key;if(st)unByKey(st);else if(Array.isArray(ee))for(let ot=0,ct=ee.length;ot<ct;++ot)this.removeEventListener(ee[ot],te);else this.removeEventListener(ee,te)}}Observable.prototype.on;Observable.prototype.once;Observable.prototype.un;function unByKey(ne){if(Array.isArray(ne))for(let ee=0,te=ne.length;ee<te;++ee)unlistenByKey(ne[ee]);else unlistenByKey(ne)}function abstract(){throw new Error("Unimplemented abstract method.")}let uidCounter_$1=0;function getUid(ne){return ne.ol_uid||(ne.ol_uid=String(++uidCounter_$1))}class ObjectEvent extends BaseEvent{constructor(ee,te,st){super(ee),this.key=te,this.oldValue=st}}class BaseObject extends Observable{constructor(ee){super(),this.on,this.once,this.un,getUid(this),this.values_=null,ee!==void 0&&this.setProperties(ee)}get(ee){let te;return this.values_&&this.values_.hasOwnProperty(ee)&&(te=this.values_[ee]),te}getKeys(){return this.values_&&Object.keys(this.values_)||[]}getProperties(){return this.values_&&Object.assign({},this.values_)||{}}getPropertiesInternal(){return this.values_}
69hasProperties(){return!!this.values_}notify(ee,te){let st;st=`change:${ee}`,this.hasListener(st)&&this.dispatchEvent(new ObjectEvent(st,ee,te)),st=ObjectEventType.PROPERTYCHANGE,this.hasListener(st)&&this.dispatchEvent(new ObjectEvent(st,ee,te))}addChangeListener(ee,te){this.addEventListener(`change:${ee}`,te)}removeChangeListener(ee,te){this.removeEventListener(`change:${ee}`,te)}set(ee,te,st){const ot=this.values_||(this.values_={});if(st)ot[ee]=te;else{const ct=ot[ee];ot[ee]=te,ct!==te&&this.notify(ee,ct)}}setProperties(ee,te){for(const st in ee)this.set(st,ee[st],te)}applyProperties(ee){ee.values_&&Object.assign(this.values_||(this.values_={}),ee.values_)}unset(ee,te){if(this.values_&&ee in this.values_){const st=this.values_[ee];delete this.values_[ee],isEmpty(this.values_)&&(this.values_=null),te||this.notify(ee,st)}}}const CLASS_HIDDEN="ol-hidden",CLASS_SELECTABLE="ol-selectable",CLASS_UNSELECTABLE="ol-unselectable",CLASS_UNSUPPORTED="ol-unsupported",CLASS_CONTROL="ol-control",CLASS_COLLAPSED="ol-collapsed",fontRegEx=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-z0-9]+?)\\s*$`].join(""),"i"),fontRegExMatchIndex=["style","variant","weight","size","lineHeight","family"],fontWeights$1={normal:400,bold:700},getFontParameters=function(ne){const ee=ne.match(fontRegEx);if(!ee)return null;const te={lineHeight:"normal",size:"1.2em",style:"normal",weight:"400",variant:"normal"};for(let st=0,ot=fontRegExMatchIndex.length;st<ot;++st){const ct=ee[st+1];ct!==void 0&&(te[fontRegExMatchIndex[st]]=typeof ct=="string"?ct.trim():ct)}return isNaN(Number(te.weight))&&te.weight in fontWeights$1&&(te.weight=fontWeights$1[te.weight]),te.families=te.family.split(/,\s?/).map(st=>st.trim().replace(/^['"]|['"]$/g,"")),te},ua=typeof navigator<"u"&&typeof navigator.userAgent<"u"?navigator.userAgent.toLowerCase():"",SAFARI=ua.includes("safari")&&!ua.includes("chrom");SAFARI&&(ua.includes("version/15.4")||/cpu (os|iphone os) 15_4 like mac os x/.test(ua));const WEBKIT=ua.includes("webkit")&&!ua.includes("edge"),MAC=ua.includes("macintosh"),DEVICE_PIXEL_RATIO=typeof devicePixelRatio<"u"?devicePixelRatio:1,WORKER_OFFSCREEN_CANVAS=typeof WorkerGlobalScope<"u"&&typeof OffscreenCanvas<"u"&&self instanceof WorkerGlobalScope,IMAGE_DECODE=typeof Image<"u"&&Image.prototype.decode,CREATE_IMAGE_BITMAP=typeof createImageBitmap=="function",PASSIVE_EVENT_LISTENERS=(function(){let ne=!1;try{const ee=Object.defineProperty({},"passive",{get:function(){ne=!0}});window.addEventListener("_",null,ee),window.removeEventListener("_",null,ee)}catch{}return ne})();function createCanvasContext2D(ne,ee,te,st){let ot;return te&&te.length?ot=te.shift():WORKER_OFFSCREEN_CANVAS?ot=new class extends OffscreenCanvas{constructor(){super(...arguments);Kn(this,"style",{})}}(ne??300,ee??150):ot=document.createElement("canvas"),ne&&(ot.width=ne),ee&&(ot.height=ee),ot.getContext("2d",st)}let sharedCanvasContext;function getSharedCanvasContext2D(){return sharedCanvasContext||(sharedCanvasContext=createCanvasContext2D(1,1)),sharedCanvasContext}function releaseCanvas(ne){const ee=ne.canvas;ee.width=1,ee.height=1,ne.clearRect(0,0,1,1)}function outerWidth(ne){let ee=ne.offsetWidth;const te=getComputedStyle(ne);return ee+=parseInt(te.marginLeft,10)+parseInt(te.marginRight,10),ee}function outerHeight(ne){let ee=ne.offsetHeight;const te=getComputedStyle(ne);return ee+=parseInt(te.marginTop,10)+parseInt(te.marginBottom,10),ee}function replaceNode(ne,ee){const te=ee.parentNode;te&&te.replaceChild(ne,ee)}function removeChildren(ne){for(;ne.lastChild;)ne.lastChild.remove()}function replaceChildren(ne,ee){const te=ne.childNodes;for(let st=0;;++st){const ot=te[st],ct=ee[st];if(!ot&&!ct)break;if(ot!==ct){if(!ot){ne.appendChild(ct);continue}if(!ct){ne.removeChild(ot),--st;continue}ne.insertBefore(ct,ot)}}}function createMockDiv(){return new Proxy({childNodes:[],appendChild:function(ee){return this.childNodes.push(ee),ee},remove:function(){},removeChild:function(ee){const te=this.childNodes.indexOf(ee);if(te===-1)throw new Error("Node to remove was not found");return this.childNodes.splice(te,1),ee},insertBefore:function(ee,te){const st=this.childNodes.indexOf(te);if(st===-1)throw new Error("Reference node not found");return this.childNodes.splice(st,0,ee),ee},style:{}},{get(ee,te,st){return te==="firstElementChild"?ee.childNodes.length>0?ee.childNodes[0]:null:Reflect.get(ee,te,st)}})}function isCanvas(ne){return typeof HTMLCanvasElement<"u"&&ne instanceof HTMLCanvasElement||typeof OffscreenCanvas<"u"&&ne instanceof OffscreenCanvas}
69const Property$4={ELEMENT:"element",MAP:"map",OFFSET:"offset",POSITION:"position",POSITIONING:"positioning"};class Overlay extends BaseObject{constructor(ee){super(),this.on,this.once,this.un,this.options=ee,this.id=ee.id,this.insertFirst=ee.insertFirst!==void 0?ee.insertFirst:!0,this.stopEvent=ee.stopEvent!==void 0?ee.stopEvent:!0,this.element=document.createElement("div"),this.element.className=ee.className!==void 0?ee.className:"ol-overlay-container "+CLASS_SELECTABLE,this.element.style.position="absolute",this.element.style.pointerEvents="auto",this.autoPan=ee.autoPan===!0?{}:ee.autoPan||void 0,this.rendered={transform_:"",visible:!0},this.mapPostrenderListenerKey=null,this.addChangeListener(Property$4.ELEMENT,this.handleElementChanged),this.addChangeListener(Property$4.MAP,this.handleMapChanged),this.addChangeListener(Property$4.OFFSET,this.handleOffsetChanged),this.addChangeListener(Property$4.POSITION,this.handlePositionChanged),this.addChangeListener(Property$4.POSITIONING,this.handlePositioningChanged),ee.element!==void 0&&this.setElement(ee.element),this.setOffset(ee.offset!==void 0?ee.offset:[0,0]),this.setPositioning(ee.positioning||"top-left"),ee.position!==void 0&&this.setPosition(ee.position)}getElement(){return this.get(Property$4.ELEMENT)}getId(){return this.id}getMap(){return this.get(Property$4.MAP)||null}getOffset(){return this.get(Property$4.OFFSET)}getPosition(){return this.get(Property$4.POSITION)}getPositioning(){return this.get(Property$4.POSITIONING)}handleElementChanged(){removeChildren(this.element);const ee=this.getElement();ee&&this.element.appendChild(ee)}handleMapChanged(){var te;this.mapPostrenderListenerKey&&((te=this.element)==null||te.remove(),unlistenByKey(this.mapPostrenderListenerKey),this.mapPostrenderListenerKey=null);const ee=this.getMap();if(ee){this.mapPostrenderListenerKey=listen(ee,MapEventType.POSTRENDER,this.render,this),this.updatePixelPosition();const st=this.stopEvent?ee.getOverlayContainerStopEvent():ee.getOverlayContainer();this.insertFirst?st.insertBefore(this.element,st.childNodes[0]||null):st.appendChild(this.element),this.performAutoPan()}}render(){this.updatePixelPosition()}handleOffsetChanged(){this.updatePixelPosition()}handlePositionChanged(){this.updatePixelPosition(),this.performAutoPan()}handlePositioningChanged(){this.updatePixelPosition()}setElement(ee){this.set(Property$4.ELEMENT,ee)}setMap(ee){this.set(Property$4.MAP,ee)}setOffset(ee){this.set(Property$4.OFFSET,ee)}setPosition(ee){this.set(Property$4.POSITION,ee)}performAutoPan(){this.autoPan&&this.panIntoView(this.autoPan)}panIntoView(ee){const te=this.getMap();if(!te||!te.getTargetElement()||!this.get(Property$4.POSITION))return;const st=this.getRect(te.getTargetElement(),te.getSize()),ot=this.getElement(),ct=this.getRect(ot,[outerWidth(ot),outerHeight(ot)]);ee=ee||{};const ut=ee.margin===void 0?20:ee.margin;if(!containsExtent(st,ct)){const dt=ct[0]-st[0],ht=st[2]-ct[2],ft=ct[1]-st[1],pt=st[3]-ct[3],mt=[0,0];if(dt<0?mt[0]=dt-ut:ht<0&&(mt[0]=Math.abs(ht)+ut),ft<0?mt[1]=ft-ut:pt<0&&(mt[1]=Math.abs(pt)+ut),mt[0]!==0||mt[1]!==0){const yt=te.getView().getCenterInternal(),vt=te.getPixelFromCoordinateInternal(yt);if(!vt)return;const _t=[vt[0]+mt[0],vt[1]+mt[1]],bt=ee.animation||{};te.getView().animateInternal({center:te.getCoordinateFromPixelInternal(_t),duration:bt.duration,easing:bt.easing})}}}getRect(ee,te){const st=ee.getBoundingClientRect(),ot=st.left+window.pageXOffset,ct=st.top+window.pageYOffset;return[ot,ct,ot+te[0],ct+te[1]]}setPositioning(ee){this.set(Property$4.POSITIONING,ee)}setVisible(ee){this.rendered.visible!==ee&&(this.element.style.display=ee?"":"none",this.rendered.visible=ee)}updatePixelPosition(){const ee=this.getMap(),te=this.getPosition();if(!ee||!ee.isRendered()||!te){this.setVisible(!1);return}const st=ee.getPixelFromCoordinate(te),ot=ee.getSize();this.updateRenderedPosition(st,ot)}updateRenderedPosition(ee,te){const st=this.element.style,ot=this.getOffset(),ct=this.getPositioning();this.setVisible(!0);const ut=`${ee[0]+ot[0]}px`,dt=`${ee[1]+ot[1]}px`;let ht="0%",ft="0%";ct=="bottom-right"||ct=="center-right"||ct=="top-right"?ht="-100%":(ct=="bottom-center"||ct=="center-center"||ct=="top-center")&&(ht="-50%"),ct=="bottom-left"||ct=="bottom-center"||ct=="bottom-right"?ft="-100%":(ct=="center-left"||ct=="center-center"||ct=="center-right")&&(ft="-50%");const pt=`translate(${ht}, ${ft}) translate(${ut}, ${dt})`;this.rendered.transform_!=pt&&(this.rendered.transform_=pt,st.transform=pt)}getOptions(){return this.options}}const TileState={IDLE:0,LOADING:1,LOADED:2,ERROR:3,EMPTY:4};function easeIn(ne){return Math.pow(ne,3)}function easeOut(ne){return 1-easeIn(1-ne)}function inAndOut(ne){return 3*ne*ne-2*ne*ne*ne}function linear(ne){return ne}class Tile extends Target{constructor(ee,te,st){super(),st=st||{},this.tileCoord=ee,this.state=te,this.key="",this.transition_=st.transition===void 0?250:st.transition,this.transitionStarts_={},this.interpolate=!!st.interpolate}changed(){this.dispatchEvent(EventType.CHANGE)}release(){this.setState(TileState.EMPTY)}getKey(){return this.key+"/"+this.tileCoord}getTileCoord(){return this.tileCoord}getState(){return this.state}setState(ee){if(this.state!==TileState.EMPTY){if(this.state!==TileState.ERROR&&this.state>ee)throw new Error("Tile load sequence violation");this.state=ee,this.changed()}}load(){abstract()}getAlpha(ee,te){if(!this.transition_)return 1;let st=this.transitionStarts_[ee];if(!st)st=te,this.transitionStarts_[ee]=st;else if(st===-1)return 1;const ot=te-st+1e3/60;return ot>=this.transition_?1:easeIn(ot/this.transition_)}inTransition(ee){return this.transition_?this.transitionStarts_[ee]!==-1:!1}endTransition(ee){this.transition_&&(this.transitionStarts_[ee]=-1)}disposeInternal(){this.release(),super.disposeInternal()}}const canvasPool$2=[];class VectorRenderTile extends Tile{constructor(ee,te,st,ot,ct){super(ee,te,{transition:0}),this.context_=null,this.executorGroups={},this.loadingSourceTiles=0,this.hitDetectionImageData={},this.replayState_={},this.sourceTiles=[],this.errorTileKeys={}
69,this.wantedResolution,this.getSourceTiles=ot.bind(void 0,this),this.removeSourceTiles_=ct,this.wrappedTileCoord=st}getContext(){return this.context_||(this.context_=createCanvasContext2D(1,1,canvasPool$2)),this.context_}hasContext(){return!!this.context_}getImage(){return this.hasContext()?this.getContext().canvas:null}getReplayState(ee){const te=getUid(ee);return te in this.replayState_||(this.replayState_[te]={dirty:!1,renderedRenderOrder:null,renderedResolution:NaN,renderedPixelRatio:NaN,renderedRevision:-1,renderedTileResolution:NaN,renderedTileRevision:-1,renderedTileZ:-1}),this.replayState_[te]}load(){this.getSourceTiles()}release(){this.context_&&(releaseCanvas(this.context_),canvasPool$2.push(this.context_.canvas),this.context_=null),this.removeSourceTiles_(this),this.sourceTiles.length=0,super.release()}}let VectorTile$1=class extends Tile{constructor(ee,te,st,ot,ct,ut){super(ee,te,ut),this.extent=null,this.format_=ot,this.features_=null,this.loader_,this.projection=null,this.resolution,this.tileLoadFunction_=ct,this.url_=st,this.key=st}getTileUrl(){return this.url_}getFormat(){return this.format_}getFeatures(){return this.features_}load(){this.state==TileState.IDLE&&(this.setState(TileState.LOADING),this.tileLoadFunction_(this,this.url_),this.loader_&&this.loader_(this.extent,this.resolution,this.projection))}onLoad(ee,te){this.setFeatures(ee)}onError(){this.setState(TileState.ERROR)}setFeatures(ee){this.features_=ee,this.setState(TileState.LOADED)}setLoader(ee){this.loader_=ee}},withCredentials=!1;function loadFeaturesXhr(ne,ee,te,st,ot,ct,ut){const dt=new XMLHttpRequest;dt.open("GET",typeof ne=="function"?ne(te,st,ot):ne,!0),ee.getType()=="arraybuffer"&&(dt.responseType="arraybuffer"),dt.withCredentials=withCredentials,dt.onload=function(ht){if(!dt.status||dt.status>=200&&dt.status<300){const ft=ee.getType();try{let pt;ft=="text"||ft=="json"?pt=dt.responseText:ft=="xml"?pt=dt.responseXML||dt.responseText:ft=="arraybuffer"&&(pt=dt.response),pt?ct(ee.readFeatures(pt,{extent:te,featureProjection:ot}),ee.readProjection(pt)):ut()}catch{ut()}}else ut()},dt.onerror=ut,dt.send()}function xhr(ne,ee){return function(te,st,ot,ct,ut){loadFeaturesXhr(ne,ee,te,st,ot,(dt,ht)=>{this.addFeatures(dt),ct!==void 0&&ct(dt)},()=>{this.changed(),ut!==void 0&&ut()})}}function hasArea(ne){return ne[0]>0&&ne[1]>0}function scale$2(ne,ee,te){return te===void 0&&(te=[0,0]),te[0]=ne[0]*ee+.5|0,te[1]=ne[1]*ee+.5|0,te}function toSize(ne,ee){return Array.isArray(ne)?ne:(ee===void 0?ee=[ne,ne]:(ee[0]=ne,ee[1]=ne),ee)}class TileRange{constructor(ee,te,st,ot){this.minX=ee,this.maxX=te,this.minY=st,this.maxY=ot}contains(ee){return this.containsXY(ee[1],ee[2])}containsTileRange(ee){return this.minX<=ee.minX&&ee.maxX<=this.maxX&&this.minY<=ee.minY&&ee.maxY<=this.maxY}containsXY(ee,te){return this.minX<=ee&&ee<=this.maxX&&this.minY<=te&&te<=this.maxY}equals(ee){return this.minX==ee.minX&&this.minY==ee.minY&&this.maxX==ee.maxX&&this.maxY==ee.maxY}extend(ee){ee.minX<this.minX&&(this.minX=ee.minX),ee.maxX>this.maxX&&(this.maxX=ee.maxX),ee.minY<this.minY&&(this.minY=ee.minY),ee.maxY>this.maxY&&(this.maxY=ee.maxY)}
69getHeight(){return this.maxY-this.minY+1}getSize(){return[this.getWidth(),this.getHeight()]}getWidth(){return this.maxX-this.minX+1}intersects(ee){return this.minX<=ee.maxX&&this.maxX>=ee.minX&&this.minY<=ee.maxY&&this.maxY>=ee.minY}}function createOrUpdate$1(ne,ee,te,st,ot){return ot!==void 0?(ot.minX=ne,ot.maxX=ee,ot.minY=te,ot.maxY=st,ot):new TileRange(ne,ee,te,st)}function assert(ne,ee){if(!ne)throw new Error(ee)}function linearRingContainsExtent(ne,ee,te,st,ot){return!forEachCorner(ot,function(ut){return!linearRingContainsXY(ne,ee,te,st,ut[0],ut[1])})}function linearRingContainsXY(ne,ee,te,st,ot,ct){let ut=0,dt=ne[te-st],ht=ne[te-st+1];for(;ee<te;ee+=st){const ft=ne[ee],pt=ne[ee+1];ht<=ct?pt>ct&&(ft-dt)*(ct-ht)-(ot-dt)*(pt-ht)>0&&ut++:pt<=ct&&(ft-dt)*(ct-ht)-(ot-dt)*(pt-ht)<0&&ut--,dt=ft,ht=pt}return ut!==0}function linearRingsContainsXY(ne,ee,te,st,ot,ct){if(te.length===0||!linearRingContainsXY(ne,ee,te[0],st,ot,ct))return!1;for(let ut=1,dt=te.length;ut<dt;++ut)if(linearRingContainsXY(ne,te[ut-1],te[ut],st,ot,ct))return!1;return!0}function linearRingssContainsXY(ne,ee,te,st,ot,ct){if(te.length===0)return!1;for(let ut=0,dt=te.length;ut<dt;++ut){const ht=te[ut];if(linearRingsContainsXY(ne,ee,ht,st,ot,ct))return!0;ee=ht[ht.length-1]}return!1}function forEach(ne,ee,te,st,ot){let ct;for(ee+=st;ee<te;ee+=st)if(ct=ot(ne.slice(ee-st,ee),ne.slice(ee,ee+st)),ct)return ct;return!1}function intersectsLineString(ne,ee,te,st,ot,ct){return ct=ct??extendFlatCoordinates(createEmpty(),ne,ee,te,st),intersects$1(ot,ct)?ct[0]>=ot[0]&&ct[2]<=ot[2]||ct[1]>=ot[1]&&ct[3]<=ot[3]?!0:forEach(ne,ee,te,st,function(ut,dt){return intersectsSegment(ot,ut,dt)}):!1}function intersectsLineStringArray(ne,ee,te,st,ot){for(let ct=0,ut=te.length;ct<ut;++ct){if(intersectsLineString(ne,ee,te[ct],st,ot))return!0;ee=te[ct]}return!1}function intersectsLinearRing(ne,ee,te,st,ot){return!!(intersectsLineString(ne,ee,te,st,ot)||linearRingContainsXY(ne,ee,te,st,ot[0],ot[1])||linearRingContainsXY(ne,ee,te,st,ot[0],ot[3])||linearRingContainsXY(ne,ee,te,st,ot[2],ot[1])||linearRingContainsXY(ne,ee,te,st,ot[2],ot[3]))}function intersectsLinearRingArray(ne,ee,te,st,ot){if(!intersectsLinearRing(ne,ee,te[0],st,ot))return!1;if(te.length===1)return!0;for(let ct=1,ut=te.length;ct<ut;++ct)if(linearRingContainsExtent(ne,te[ct-1],te[ct],st,ot)&&!intersectsLineString(ne,te[ct-1],te[ct],st,ot))return!1;return!0}function intersectsLinearRingMultiArray(ne,ee,te,st,ot){for(let ct=0,ut=te.length;ct<ut;++ct){const dt=te[ct];if(intersectsLinearRingArray(ne,ee,dt,st,ot))return!0;ee=dt[dt.length-1]}return!1}function createOrUpdate(ne,ee,te,st){return st!==void 0?(st[0]=ne,st[1]=ee,st[2]=te,st):[ne,ee,te]}function getKeyZXY(ne,ee,te){return ne+"/"+ee+"/"+te}function getCacheKey$1(ne,ee,te,st,ot){return`${getUid(ne)},${ee},${getKeyZXY(te,st,ot)}`}function hash(ne){return hashZXY(ne[0],ne[1],ne[2])}function hashZXY(ne,ee,te){return(ee<<ne)+te}function withinExtentAndZ(ne,ee){const te=ne[0],st=ne[1],ot=ne[2];if(ee.getMinZoom()>te||te>ee.getMaxZoom())return!1;const ct=ee.getFullTileRange(te);return ct?ct.containsXY(st,ot):!0}const DEFAULT_MAX_ZOOM=42,DEFAULT_TILE_SIZE=256,tmpTileCoord=[0,0,0],DECIMALS$1=5;class TileGrid{constructor(ee){let te=ee.minZoom;const st=ee.resolutions;te===void 0&&st&&(te=st.findIndex(ut=>ut!==void 0)),this.minZoom=te!==void 0?te:0,this.resolutions_=st,assert(isSorted(this.resolutions_,(ut,dt)=>dt-ut),"`resolutions` must be sorted in descending order");let ot;if(!ee.origins){for(let ut=0,dt=this.resolutions_.length-1;ut<dt;++ut)if(!ot)ot=this.resolutions_[ut]/this.resolutions_[ut+1];else if(this.resolutions_[ut]/this.resolutions_[ut+1]!==ot){ot=void 0;break}}this.zoomFactor_=ot,this.maxZoom=this.resolutions_.length-1,this.origin_=ee.origin!==void 0?ee.origin:null,this.origins_=null,ee.origins!==void 0&&(this.origins_=ee.origins,assert(this.origins_.length==this.resolutions_.length,"Number of `origins` and `resolutions` must be equal"));const ct=ee.extent;ct!==void 0&&!this.origin_&&!this.origins_&&(this.origin_=getTopLeft(ct)),assert(!this.origin_&&this.origins_||this.origin_&&!this.origins_,"Either `origin` or `origins` must be configured, never both"),this.tileSizes_=null,ee.tileSizes!==void 0&&(this.tileSizes_=ee.tileSizes,assert(this.tileSizes_.length==this.resolutions_.length,"Number of `tileSizes` and `resolutions` must be equal")),this.tileSize_=ee.tileSize!==void 0?ee.tileSize:this.tileSizes_?null:DEFAULT_TILE_SIZE,assert(!this.tileSize_&&this.tileSizes_||this.tileSize_&&!this.tileSizes_,"Either `tileSize` or `tileSizes` must be configured, never both"),this.extent_=ct!==void 0?ct:null,this.fullTileRanges_=null,this.tmpSize_=[0,0],this.tmpExtent_=[0,0,0,0],ee.tileRanges!==void 0?this.fullTileRanges_=ee.tileRanges:ee.sizes!==void 0?this.fullTileRanges_=ee.sizes.map((ut,dt)=>{const ht=new TileRange(Math.min(0,ut[0]),Math.max(ut[0]-1,-1),Math.min(0,ut[1]),Math.max(ut[1]-1,-1));
69if(ct){const ft=this.getTileRangeForExtentAndZ(ct,dt);ht.minX=Math.max(ft.minX,ht.minX),ht.maxX=Math.min(ft.maxX,ht.maxX),ht.minY=Math.max(ft.minY,ht.minY),ht.maxY=Math.min(ft.maxY,ht.maxY)}return ht}):ct&&this.calculateTileRanges_(ct)}forEachTileCoord(ee,te,st){const ot=this.getTileRangeForExtentAndZ(ee,te);for(let ct=ot.minX,ut=ot.maxX;ct<=ut;++ct)for(let dt=ot.minY,ht=ot.maxY;dt<=ht;++dt)st([te,ct,dt])}forEachTileCoordParentTileRange(ee,te,st,ot){let ct,ut,dt,ht=null,ft=ee[0]-1;for(this.zoomFactor_===2?(ut=ee[1],dt=ee[2]):ht=this.getTileCoordExtent(ee,ot);ft>=this.minZoom;){if(ut!==void 0&&dt!==void 0?(ut=Math.floor(ut/2),dt=Math.floor(dt/2),ct=createOrUpdate$1(ut,ut,dt,dt,st)):ct=this.getTileRangeForExtentAndZ(ht,ft,st),te(ft,ct))return!0;--ft}return!1}getExtent(){return this.extent_}getMaxZoom(){return this.maxZoom}getMinZoom(){return this.minZoom}getOrigin(ee){return this.origin_?this.origin_:this.origins_[ee]}getOrigins(){return this.origins_}getResolution(ee){return this.resolutions_[ee]}getResolutions(){return this.resolutions_}getTileCoordChildTileRange(ee,te,st){if(ee[0]<this.maxZoom){if(this.zoomFactor_===2){const ct=ee[1]*2,ut=ee[2]*2;return createOrUpdate$1(ct,ct+1,ut,ut+1,te)}const ot=this.getTileCoordExtent(ee,st||this.tmpExtent_);return this.getTileRangeForExtentAndZ(ot,ee[0]+1,te)}return null}getTileRangeForTileCoordAndZ(ee,te,st){if(te>this.maxZoom||te<this.minZoom)return null;const ot=ee[0],ct=ee[1],ut=ee[2];if(te===ot)return createOrUpdate$1(ct,ut,ct,ut,st);if(this.zoomFactor_){const ht=Math.pow(this.zoomFactor_,te-ot),ft=Math.floor(ct*ht),pt=Math.floor(ut*ht);if(te<ot)return createOrUpdate$1(ft,ft,pt,pt,st);const mt=Math.floor(ht*(ct+1))-1,yt=Math.floor(ht*(ut+1))-1;return createOrUpdate$1(ft,mt,pt,yt,st)}const dt=this.getTileCoordExtent(ee,this.tmpExtent_);return this.getTileRangeForExtentAndZ(dt,te,st)}getTileRangeForExtentAndZ(ee,te,st){this.getTileCoordForXYAndZ_(ee[0],ee[3],te,!1,tmpTileCoord);const ot=tmpTileCoord[1],ct=tmpTileCoord[2];this.getTileCoordForXYAndZ_(ee[2],ee[1],te,!0,tmpTileCoord);const ut=tmpTileCoord[1],dt=tmpTileCoord[2];return createOrUpdate$1(ot,ut,ct,dt,st)}getTileCoordCenter(ee){const te=this.getOrigin(ee[0]),st=this.getResolution(ee[0]),ot=toSize(this.getTileSize(ee[0]),this.tmpSize_);return[te[0]+(ee[1]+.5)*ot[0]*st,te[1]-(ee[2]+.5)*ot[1]*st]}getTileCoordExtent(ee,te){const st=this.getOrigin(ee[0]),ot=this.getResolution(ee[0]),ct=toSize(this.getTileSize(ee[0]),this.tmpSize_),ut=st[0]+ee[1]*ct[0]*ot,dt=st[1]-(ee[2]+1)*ct[1]*ot,ht=ut+ct[0]*ot,ft=dt+ct[1]*ot;return createOrUpdate$2(ut,dt,ht,ft,te)}getTileCoordForCoordAndResolution(ee,te,st){return this.getTileCoordForXYAndResolution_(ee[0],ee[1],te,!1,st)}getTileCoordForXYAndResolution_(ee,te,st,ot,ct){const ut=this.getZForResolution(st),dt=st/this.getResolution(ut),ht=this.getOrigin(ut),ft=toSize(this.getTileSize(ut),this.tmpSize_);let pt=dt*(ee-ht[0])/st/ft[0],mt=dt*(ht[1]-te)/st/ft[1];return ot?(pt=ceil(pt,DECIMALS$1)-1,mt=ceil(mt,DECIMALS$1)-1):(pt=floor(pt,DECIMALS$1),mt=floor(mt,DECIMALS$1)),createOrUpdate(ut,pt,mt,ct)}getTileCoordForXYAndZ_(ee,te,st,ot,ct){const ut=this.getOrigin(st),dt=this.getResolution(st),ht=toSize(this.getTileSize(st),this.tmpSize_);let ft=(ee-ut[0])/dt/ht[0],pt=(ut[1]-te)/dt/ht[1];return ot?(ft=ceil(ft,DECIMALS$1)-1,pt=ceil(pt,DECIMALS$1)-1):(ft=floor(ft,DECIMALS$1),pt=floor(pt,DECIMALS$1)),createOrUpdate(st,ft,pt,ct)}getTileCoordForCoordAndZ(ee,te,st){return this.getTileCoordForXYAndZ_(ee[0],ee[1],te,!1,st)}getTileCoordResolution(ee){return this.resolutions_[ee[0]]}getTileSize(ee){return this.tileSize_?this.tileSize_:this.tileSizes_[ee]}getFullTileRange(ee){return this.fullTileRanges_?this.fullTileRanges_[ee]:this.extent_?this.getTileRangeForExtentAndZ(this.extent_,ee):null}getZForResolution(ee,te){const st=linearFindNearest(this.resolutions_,ee,te||0);return clamp$1(st,this.minZoom,this.maxZoom)}tileCoordIntersectsViewport(ee,te){return intersectsLinearRing(te,0,te.length,2,this.getTileCoordExtent(ee))}calculateTileRanges_(ee){const te=this.resolutions_.length,st=new Array(te);for(let ot=this.minZoom;ot<te;++ot)st[ot]=this.getTileRangeForExtentAndZ(ee,ot);this.fullTileRanges_=st}}class WMTSTileGrid extends TileGrid{constructor(ee){super({extent:ee.extent,origin:ee.origin,origins:ee.origins,resolutions:ee.resolutions,tileSize:ee.tileSize,tileSizes:ee.tileSizes,sizes:ee.sizes,tileRanges:ee.tileRanges,minZoom:ee.minZoom}),this.matrixIds_=ee.matrixIds}
69getMatrixId(ee){return this.matrixIds_[ee]}getMatrixIds(){return this.matrixIds_}}function getForProjection(ne){let ee=ne.getDefaultTileGrid();return ee||(ee=createForProjection(ne),ne.setDefaultTileGrid(ee)),ee}function wrapX(ne,ee,te){const st=ee[0],ot=ne.getTileCoordCenter(ee),ct=extentFromProjection(te);if(!containsCoordinate(ct,ot)){const ut=getWidth(ct),dt=Math.ceil((ct[0]-ot[0])/ut);return ot[0]+=ut*dt,ne.getTileCoordForCoordAndZ(ot,st)}return ee}function createForExtent(ne,ee,te,st){st=st!==void 0?st:"top-left";const ot=resolutionsFromExtent(ne,ee,te);return new TileGrid({extent:ne,origin:getCorner(ne,st),resolutions:ot,tileSize:te})}function createXYZ(ne){const ee=ne||{},te=ee.extent||get$3("EPSG:3857").getExtent(),st={extent:te,minZoom:ee.minZoom,tileSize:ee.tileSize,resolutions:resolutionsFromExtent(te,ee.maxZoom,ee.tileSize,ee.maxResolution)};return new TileGrid(st)}function resolutionsFromExtent(ne,ee,te,st){ee=ee!==void 0?ee:DEFAULT_MAX_ZOOM,te=toSize(te!==void 0?te:DEFAULT_TILE_SIZE);const ot=getHeight(ne),ct=getWidth(ne);st=st>0?st:Math.max(ct/te[0],ot/te[1]);const ut=ee+1,dt=new Array(ut);for(let ht=0;ht<ut;++ht)dt[ht]=st/Math.pow(2,ht);return dt}function createForProjection(ne,ee,te,st){const ot=extentFromProjection(ne);return createForExtent(ot,ee,te,st)}function extentFromProjection(ne){ne=get$3(ne);let ee=ne.getExtent();if(!ee){const te=180*METERS_PER_UNIT$1.degrees/ne.getMetersPerUnit();ee=createOrUpdate$2(-te,-te,te,te)}return ee}function appendParams(ne,ee){const te=[];Object.keys(ee).forEach(function(ot){ee[ot]!==null&&ee[ot]!==void 0&&te.push(ot+"="+encodeURIComponent(ee[ot]))});const st=te.join("&");return ne=ne.replace(/[?&]$/,""),ne+=ne.includes("?")?"&":"?",ne+st}const zRegEx=/\{z\}/g,xRegEx=/\{x\}/g,yRegEx=/\{y\}/g,dashYRegEx=/\{-y\}/g;function renderXYZTemplate(ne,ee,te,st,ot){return ne.replace(zRegEx,ee.toString()).replace(xRegEx,te.toString()).replace(yRegEx,st.toString()).replace(dashYRegEx,function(){if(ot===void 0)throw new Error("If the URL template has a {-y} placeholder, the grid extent must be known");return(ot-st).toString()})}function expandUrl(ne){const ee=[];let te=/\{([a-z])-([a-z])\}/.exec(ne);if(te){const st=te[1].charCodeAt(0),ot=te[2].charCodeAt(0);let ct;for(ct=st;ct<=ot;++ct)ee.push(ne.replace(te[0],String.fromCharCode(ct)));return ee}if(te=/\{(\d+)-(\d+)\}/.exec(ne),te){const st=parseInt(te[2],10);for(let ot=parseInt(te[1],10);ot<=st;ot++)ee.push(ne.replace(te[0],ot.toString()));return ee}return ee.push(ne),ee}function createFromTemplate(ne,ee){return(function(te,st,ot){if(!te)return;let ct;const ut=te[0];if(ee){const dt=ee.getFullTileRange(ut);dt&&(ct=dt.getHeight()-1)}return renderXYZTemplate(ne,ut,te[1],te[2],ct)})}function createFromTemplates(ne,ee){const te=ne.length,st=new Array(te);for(let ot=0;ot<te;++ot)st[ot]=createFromTemplate(ne[ot],ee);return createFromTileUrlFunctions(st)}function createFromTileUrlFunctions(ne){return ne.length===1?ne[0]:(function(ee,te,st){if(!ee)return;const ot=hash(ee),ct=modulo(ot,ne.length);return ne[ct](ee,te,st)})}class Source extends BaseObject{constructor(ee){super(),this.projection=get$3(ee.projection),this.attributions_=adaptAttributions(ee.attributions),this.attributionsCollapsible_=ee.attributionsCollapsible??!0,this.loading=!1,this.state_=ee.state!==void 0?ee.state:"ready",this.wrapX_=ee.wrapX!==void 0?ee.wrapX:!1,this.interpolate_=!!ee.interpolate,this.viewResolver=null,this.viewRejector=null;const te=this;this.viewPromise_=new Promise(function(st,ot){te.viewResolver=st,te.viewRejector=ot})}getAttributions(){return this.attributions_}getAttributionsCollapsible(){return this.attributionsCollapsible_}getProjection(){return this.projection}getResolutions(ee){return null}getView(){return this.viewPromise_}ready(){const ee=this.getState();return ee==="ready"?Promise.resolve():ee==="error"?Promise.reject(new Error("Source failed to load")):new Promise((te,st)=>{const ot=()=>{const ct=this.getState();ct==="ready"?(this.un("change",ot),te()):ct==="error"&&(this.un("change",ot),st(new Error("Source failed to load")))};this.on("change",ot)})}getState(){return this.state_}getWrapX(){return this.wrapX_}getInterpolate(){return this.interpolate_}refresh(){this.changed()}setAttributions(ee){this.attributions_=adaptAttributions(ee),this.changed()}setState(ee){this.state_=ee,this.changed()}}function adaptAttributions(ne){return ne?typeof ne=="function"?ne:(Array.isArray(ne)||(ne=[ne]),ee=>ne):null}class TileSource extends Source{constructor(ee){super({attributions:ee.attributions,attributionsCollapsible:ee.attributionsCollapsible,projection:ee.projection,state:ee.state,wrapX:ee.wrapX,interpolate:ee.interpolate}),this.on,this.once,this.un,this.tilePixelRatio_=ee.tilePixelRatio!==void 0?ee.tilePixelRatio:1,this.tileGrid=ee.tileGrid!==void 0?ee.tileGrid:null;const te=[256,256];this.tileGrid&&toSize(this.tileGrid.getTileSize(this.tileGrid.getMinZoom()),te),this.tmpSize=[0,0],this.key_=ee.key||getUid(this),this.tileOptions={transition:ee.transition,interpolate:ee.interpolate},this.zDirection=ee.zDirection?ee.zDirection:0}getGutterForProjection(ee){return 0}getKey(){return this.key_}setKey(ee){this.key_!==ee&&(this.key_=ee,this.changed())}getResolutions(ee){const te=ee?this.getTileGridForProjection(ee):this.tileGrid;return te?te.getResolutions():null}getTile(ee,te,st,ot,ct,ut){return abstract()}getTileGrid(){return this.tileGrid}getTileGridForProjection(ee){return this.tileGrid?this.tileGrid:getForProjection(ee)}getTilePixelRatio(ee){return this.tilePixelRatio_}getTilePixelSize(ee,te,st){const ot=this.getTileGridForProjection(st),ct=this.getTilePixelRatio(te),ut=toSize(ot.getTileSize(ee),this.tmpSize);return ct==1?ut:scale$2(ut,ct,this.tmpSize)}getTileCoordForTileUrlFunction(ee,te){const st=te!==void 0?te:this.getProjection(),ot=te!==void 0?this.getTileGridForProjection(st):this.tileGrid||this.getTileGridForProjection(st);return this.getWrapX()&&st.isGlobal()&&(ee=wrapX(ot,ee,st)),withinExtentAndZ(ee,ot)?ee:null}clear(){}refresh(){this.clear(),super.refresh()}}class TileSourceEvent extends BaseEvent{constructor(ee,te){super(ee),this.tile=te}}const TileEventType={TILELOADSTART:"tileloadstart",TILELOADEND:"tileloadend",TILELOADERROR:"tileloaderror"};class UrlTile extends TileSource{constructor(ee){super({attributions:ee.attributions,cacheSize:ee.cacheSize,projection:ee.projection,state:ee.state,tileGrid:ee.tileGrid,tilePixelRatio:ee.tilePixelRatio,wrapX:ee.wrapX,transition:ee.transition,interpolate:ee.interpolate,key:ee.key,attributionsCollapsible:ee.attributionsCollapsible,zDirection:ee.zDirection}),this.generateTileUrlFunction_=this.tileUrlFunction===UrlTile.prototype.tileUrlFunction,this.tileLoadFunction=ee.tileLoadFunction,ee.tileUrlFunction&&(this.tileUrlFunction=ee.tileUrlFunction),this.urls=null,ee.urls?this.setUrls(ee.urls):ee.url&&this.setUrl(ee.url),this.tileLoadingKeys_={}}getTileLoadFunction(){return this.tileLoadFunction}getTileUrlFunction(){return Object.getPrototypeOf(this).tileUrlFunction===this.tileUrlFunction?this.tileUrlFunction.bind(this):this.tileUrlFunction}getUrls(){return this.urls}handleTileChange(ee){const te=ee.target,st=getUid(te),ot=te.getState();let ct;ot==TileState.LOADING?(this.tileLoadingKeys_[st]=!0,ct=TileEventType.TILELOADSTART):st in this.tileLoadingKeys_&&(delete this.tileLoadingKeys_[st],ct=ot==TileState.ERROR?TileEventType.TILELOADERROR:ot==TileState.LOADED?TileEventType.TILELOADEND:void 0),ct!=null&&this.dispatchEvent(new TileSourceEvent(ct,te))}setTileLoadFunction(ee){this.tileLoadFunction=ee,this.changed()}setTileUrlFunction(ee,te){this.tileUrlFunction=ee,typeof te<"u"?this.setKey(te):this.changed()}setUrl(ee){const te=expandUrl(ee);this.urls=te,this.setUrls(te)}setUrls(ee){this.urls=ee;const te=ee.join(`
70`);this.generateTileUrlFunction_?this.setTileUrlFunction(createFromTemplates(ee,this.tileGrid),te):this.setKey(te)}tileUrlFunction(ee,te,st){}}class VectorTile extends UrlTile{constructor(ee){const te=ee.projection||"EPSG:3857",st=ee.extent||extentFromProjection(te),ot=ee.tileGrid||createXYZ({extent:st,maxResolution:ee.maxResolution,maxZoom:ee.maxZoom!==void 0?ee.maxZoom:22,minZoom:ee.minZoom,tileSize:ee.tileSize||512});super({attributions:ee.attributions,attributionsCollapsible:ee.attributionsCollapsible,cacheSize:ee.cacheSize,interpolate:!0,projection:te,state:ee.state,tileGrid:ot,t
70ileLoadFunction:ee.tileLoadFunction?ee.tileLoadFunction:defaultLoadFunction,tileUrlFunction:ee.tileUrlFunction,url:ee.url,urls:ee.urls,wrapX:ee.wrapX===void 0?!0:ee.wrapX,transition:ee.transition,zDirection:ee.zDirection===void 0?1:ee.zDirection}),this.format_=ee.format?ee.format:null,this.tileKeysBySourceTileUrl_={},this.sourceTiles_={},this.overlaps_=ee.overlaps==null?!0:ee.overlaps,this.tileClass=ee.tileClass?ee.tileClass:VectorTile$1,this.tileGrids_={}}getOverlaps(){return this.overlaps_}getSourceZ_(ee,te,st){const ot=this.projection,ct=te&&ot&&!equivalent$1(te,ot)?ee/ot.getMetersPerUnit()*te.getMetersPerUnit():ee;return this.tileGrid.getZForResolution(ct,st)}getSourceTiles(ee,te,st,ot){if(st.getState()===TileState.IDLE){st.setState(TileState.LOADING);const ct=st.wrappedTileCoord,ut=this.getTileGridForProjection(te);let dt=ut.getTileCoordExtent(ct);const ht=ct[0],ft=ut.getResolution(ht);buffer(dt,-ft,dt);const pt=this.projection;te&&this.projection&&!equivalent$1(te,pt)&&(dt=transformExtent(dt,te,pt));const mt=this.tileGrid,yt=mt.getExtent();yt&&getIntersection(dt,yt,dt);const vt=this.getSourceZ_(ft,te,this.zDirection),_t=ot||this.tileUrlFunction;mt.forEachTileCoord(dt,vt,bt=>{const xt=_t(bt,ee,te);this.sourceTiles_[xt]||(this.sourceTiles_[xt]=new this.tileClass(bt,xt?TileState.IDLE:TileState.EMPTY,xt,this.format_,this.tileLoadFunction));const Mt=this.sourceTiles_[xt];st.sourceTiles.push(Mt),this.tileKeysBySourceTileUrl_[xt]||(this.tileKeysBySourceTileUrl_[xt]=[]),this.tileKeysBySourceTileUrl_[xt].push(st.getKey());const Ot=Mt.getState();if(Ot<TileState.LOADED){const kt=Nt=>{this.handleTileChange(Nt);const Gt=Mt.getState();if(Gt===TileState.LOADED||Gt===TileState.ERROR){const Bt=Mt.getKey();Bt in st.errorTileKeys?Mt.getState()===TileState.LOADED&&delete st.errorTileKeys[Bt]:st.loadingSourceTiles--,Gt===TileState.ERROR?st.errorTileKeys[Bt]=!0:Mt.removeEventListener(EventType.CHANGE,kt),st.loadingSourceTiles===0&&st.setState(isEmpty(st.errorTileKeys)?TileState.LOADED:TileState.ERROR)}};Mt.addEventListener(EventType.CHANGE,kt),st.loadingSourceTiles++}Ot===TileState.IDLE&&(Mt.extent=mt.getTileCoordExtent(bt),Mt.projection=this.projection,Mt.resolution=mt.getResolution(bt[0]),Mt.load())}),st.loadingSourceTiles||st.setState(st.sourceTiles.some(bt=>bt.getState()===TileState.ERROR)?TileState.ERROR:TileState.LOADED)}return st.sourceTiles}removeSourceTiles(ee){const te=ee.getKey(),st=ee.sourceTiles;for(let ot=0,ct=st.length;ot<ct;++ot){const ut=st[ot].getTileUrl();if(!this.tileKeysBySourceTileUrl_[ut])return;const dt=this.tileKeysBySourceTileUrl_[ut].indexOf(te);dt!==-1&&(this.tileKeysBySourceTileUrl_[ut].splice(dt,1),this.tileKeysBySourceTileUrl_[ut].length===0&&(delete this.tileKeysBySourceTileUrl_[ut],delete this.sourceTiles_[ut]))}}getTile(ee,te,st,ot,ct){const ut=[ee,te,st];let dt=this.getTileCoordForTileUrlFunction(ut,ct);const ht=this.getTileGrid().getExtent(),ft=this.projection,pt=this.getTileGridForProjection(ct);if(dt&&ht){const _t=pt.getTileCoordExtent(dt);buffer(_t,-pt.getResolution(ee),_t),intersects$1(ht,!ct||!ft||equivalent$1(ct,ft)?_t:transformExtent(_t,ct,ft))||(dt=null)}let mt=!0;if(dt!==null){const _t=this.tileGrid,bt=pt.getResolution(ee),xt=this.getSourceZ_(bt,ct,1),Mt=pt.getTileCoordExtent(dt);buffer(Mt,-bt,Mt),_t.forEachTileCoord(!ct||!ft||equivalent$1(ct,ft)?Mt:transformExtent(Mt,ct,ft),xt,Ot=>{mt=mt&&!this.tileUrlFunction(Ot,ot,ft)})}const yt=this.tileUrlFunction,vt=new VectorRenderTile(ut,mt?TileState.EMPTY:TileState.IDLE,dt,_t=>this.getSourceTiles(ot,ct,_t,yt),this.removeSourceTiles.bind(this));return vt.key=this.getKey(),vt}getTileGridForProjection(ee){const te=ee.getCode();let st=this.tileGrids_[te];if(!st){const ot=this.projection;if(ot!==null&&!equivalent$1(ot,ee))return getForProjection(ee);const ct=this.tileGrid,ut=ct.getResolutions().slice(),dt=ut.map(function(pt,mt){return ct.getOrigin(mt)}),ht=ut.map(function(pt,mt){return ct.getTileSize(mt)}),ft=DEFAULT_MAX_ZOOM+1;for(let pt=ut.length;pt<ft;++pt)ut.push(ut[pt-1]/2),dt.push(dt[pt-1]),ht.push(ht[pt-1]);st=new TileGrid({extent:ct.getExtent(),origins:dt,resolutions:ut,tileSizes:ht}),this.tileGrids_[te]=st}return st}getTilePixelRatio(ee){return ee}getTilePixelSize(ee,te,st){const ot=this.getTileGridForProjection(st),ct=toSize(ot.getTileSize(ee),this.tmpSize);return[Math.round(ct[0]*te),Math.round(ct[1]*te)]}setOverlaps(ee){this.overlaps_=ee,this.changed()}}function defaultLoadFunction(ne,ee){ne.setLoader(function(te,st,ot){loadFeaturesXhr(ee,ne.getFormat(),te,st,ot,ne.onLoad.bind(ne),ne.onError.bind(ne))})}const CollectionEventType={ADD:"add",REMOVE:"remove"},Property$3={LENGTH:"length"};class CollectionEvent extends BaseEvent{constructor(ee,te,st){super(ee),this.element=te,this.index=st}}class Collection extends BaseObject{constructor(ee,te){if(super(),this.on,this.once,this.un,te=te||{},this.unique_=!!te.unique,this.array_=ee??[],this.unique_)for(let st=1,ot=this.array_.length;
70st<ot;++st)this.assertUnique_(this.array_[st],st);this.updateLength_()}clear(){for(;this.getLength()>0;)this.pop()}extend(ee){for(let te=0,st=ee.length;te<st;++te)this.push(ee[te]);return this}forEach(ee){const te=this.array_;for(let st=0,ot=te.length;st<ot;++st)ee(te[st],st,te)}getArray(){return this.array_}item(ee){return this.array_[ee]}getLength(){return this.get(Property$3.LENGTH)}insertAt(ee,te){if(ee<0||ee>this.getLength())throw new Error("Index out of bounds: "+ee);this.unique_&&this.assertUnique_(te),this.array_.splice(ee,0,te),this.updateLength_(),this.dispatchEvent(new CollectionEvent(CollectionEventType.ADD,te,ee))}pop(){return this.removeAt(this.getLength()-1)}push(ee){const te=this.getLength();return this.insertAt(te,ee),this.getLength()}remove(ee){const te=this.array_;for(let st=0,ot=te.length;st<ot;++st)if(te[st]===ee)return this.removeAt(st)}removeAt(ee){if(ee<0||ee>=this.getLength())return;const te=this.array_[ee];return this.array_.splice(ee,1),this.updateLength_(),this.dispatchEvent(new CollectionEvent(CollectionEventType.REMOVE,te,ee)),te}setAt(ee,te){const st=this.getLength();if(ee>=st){this.insertAt(ee,te);return}if(ee<0)throw new Error("Index out of bounds: "+ee);this.unique_&&this.assertUnique_(te,ee);const ot=this.array_[ee];this.array_[ee]=te,this.dispatchEvent(new CollectionEvent(CollectionEventType.REMOVE,ot,ee)),this.dispatchEvent(new CollectionEvent(CollectionEventType.ADD,te,ee))}updateLength_(){this.set(Property$3.LENGTH,this.array_.length)}assertUnique_(ee,te){const st=this.array_;for(let ot=0,ct=st.length;ot<ct;++ot)if(st[ot]===ee&&ot!==te)throw new Error("Duplicate item added to a unique collection")}}function all$1(ne,ee){return[[-1/0,-1/0,1/0,1/0]]}function bbox(ne,ee){return[ne]}function tile(ne){return(function(ee,te,st){const ot=ne.getZForResolution(fromUserResolution(te)),ct=ne.getTileRangeForExtentAndZ(fromUserExtent(ee),ot),ut=[],dt=[ot,0,0];for(dt[1]=ct.minX;dt[1]<=ct.maxX;++dt[1])for(dt[2]=ct.minY;dt[2]<=ct.maxY;++dt[2])ut.push(toUserExtent(ne.getTileCoordExtent(dt)));return ut})}class Feature extends BaseObject{constructor(ee){if(super(),this.on,this.once,this.un,this.id_=void 0,this.geometryName_="geometry",this.style_=null,this.styleFunction_=void 0,this.geometryChangeKey_=null,this.addChangeListener(this.geometryName_,this.handleGeometryChanged_),ee)if(typeof ee.getSimplifiedGeometry=="function"){const te=ee;this.setGeometry(te)}else{const te=ee;this.setProperties(te)}}clone(){const ee=new Feature,te=this.geometryName_;ee.setGeometryName(te);const st=this.getPropertiesInternal();if(st){const ct=this.getGeometry();for(const ut in st)ut===te&&ct?ee.set(ut,ct.clone()):ee.set(ut,st[ut],!0)}const ot=this.getStyle();return ot&&ee.setStyle(ot),ee}getGeometry(){return this.get(this.geometryName_)}getId(){return this.id_}getGeometryName(){return this.geometryName_}getStyle(){return this.style_}getStyleFunction(){return this.styleFunction_}handleGeometryChange_(){this.changed()}handleGeometryChanged_(){this.geometryChangeKey_&&(unlistenByKey(this.geometryChangeKey_),this.geometryChangeKey_=null);const ee=this.getGeometry();ee&&(this.geometryChangeKey_=listen(ee,EventType.CHANGE,this.handleGeometryChange_,this)),this.changed()}setGeometry(ee){this.set(this.geometryName_,ee)}setStyle(ee){this.style_=ee,this.styleFunction_=ee?createStyleFunction(ee):void 0,this.changed()}setId(ee){this.id_=ee,this.changed()}setGeometryName(ee){ee!==this.geometryName_&&(this.removeChangeListener(this.geometryName_,this.handleGeometryChanged_),this.geometryName_=ee,this.addChangeListener(this.geometryName_,this.handleGeometryChanged_),this.handleGeometryChanged_())}}function createStyleFunction(ne){if(typeof ne=="function")return ne;let ee;return Array.isArray(ne)?ee=ne:(assert(typeof ne.getZIndex=="function","Expected an `ol/style/Style` or an array of `ol/style/Style.js`"),ee=[ne]),function(){return ee}}const IDENTITY_TRANSFORM=[1,0,0,1,0,0],tmp_=new Array(6);function create$1(){return IDENTITY_TRANSFORM.slice(0)}function reset(ne){return set(ne,1,0,0,1,0,0)}function multiply(ne,ee){const te=ne[0],st=ne[1],ot=ne[2],ct=ne[3],ut=ne[4],dt=ne[5],ht=ee[0],ft=ee[1],pt=ee[2],mt=ee[3],yt=ee[4],vt=ee[5];return ne[0]=te*ht+ot*ft,ne[1]=st*ht+ct*ft,ne[2]=te*pt+ot*mt,ne[3]=st*pt+ct*mt,ne[4]=te*yt+ot*vt+ut,ne[5]=st*yt+ct*vt+dt,ne}function set(ne,ee,te,st,ot,ct,ut){return ne[0]=ee,ne[1]=te,ne[2]=st,ne[3]=ot,ne[4]=ct,ne[5]=ut,ne}function setFromArray(ne,ee){return ne[0]=ee[0],ne[1]=ee[1],ne[2]=ee[2],ne[3]=ee[3],ne[4]=ee[4],ne[5]=ee[5],ne}function apply$1(ne,ee){const te=ee[0],st=ee[1];return ee[0]=ne[0]*te+ne[2]*st+ne[4],ee[1]=ne[1]*te+ne[3]*st+ne[5],ee}function scale$1(ne,ee,te){return multiply(ne,set(tmp_,ee,0,0,te,0,0))}function translate$1(ne,ee,te){return multiply(ne,set(tmp_,1,0,0,1,ee,te))}function compose(ne,ee,te,st,ot,ct,ut,dt){const ht=Math.sin(ct),ft=Math.cos(ct);return ne[0]=st*ft,ne[1]=ot*ht,ne[2]=-st*ht,ne[3]=ot*ft,ne[4]=ut*st*ft-dt*st*ht+ee,ne[5]=ut*ot*ht+dt*ot*ft+te,ne}function makeInverse(ne,ee){const te=determinant(ee);assert(te!==0,"Transformation matrix cannot be inverted");const st=ee[0],ot=ee[1],ct=ee[2],ut=ee[3],dt=ee[4],ht=ee[5];return ne[0]=ut/te,ne[1]=-ot/te,ne[2]=-ct/te,ne[3]=st/te,ne[4]=(ct*ht-ut*dt)/te,ne[5]=-(st*ht-ot*dt)/te,ne}function determinant(ne){return ne[0]*ne[3]-ne[1]*ne[2]}const matrixPrecision=[1e5,1e5,1e5,1e5,2,2];function toString$1(ne){return"matrix("+ne.join(", ")+")"}function fromString$1(ne){return ne.substring(7,ne.length-1).split(",").map(parseFloat)}function equivalent(ne,ee){const te=fromString$1(ne),st=fromString$1(ee);for(let ot=0;ot<6;++ot)if(Math.round((te[ot]-st[ot])*matrixPrecision[ot])!==0)return!1;return!0}function transform2D(ne,ee,te,st,ot,ct,ut){ct=ct||[],ut=ut||2;let dt=0;for(let ht=ee;ht<te;
vendor: 4,134 bytes, line 70
70ht+=st){const ft=ne[ht],pt=ne[ht+1];ct[dt++]=ot[0]*ft+ot[2]*pt+ot[4],ct[dt++]=ot[1]*ft+ot[3]*pt+ot[5];for(let mt=2;mt<ut;mt++)ct[dt++]=ne[ht+mt]}return ct&&ct.length!=dt&&(ct.length=dt),ct}function rotate(ne,ee,te,st,ot,ct,ut){ut=ut||[];const dt=Math.cos(ot),ht=Math.sin(ot),ft=ct[0],pt=ct[1];let mt=0;for(let yt=ee;yt<te;yt+=st){const vt=ne[yt]-ft,_t=ne[yt+1]-pt;ut[mt++]=ft+vt*dt-_t*ht,ut[mt++]=pt+vt*ht+_t*dt;for(let bt=yt+2;bt<yt+st;++bt)ut[mt++]=ne[bt]}return ut&&ut.length!=mt&&(ut.length=mt),ut}function scale(ne,ee,te,st,ot,ct,ut,dt){dt=dt||[];const ht=ut[0],ft=ut[1];let pt=0;for(let mt=ee;mt<te;mt+=st){const yt=ne[mt]-ht,vt=ne[mt+1]-ft;dt[pt++]=ht+ot*yt,dt[pt++]=ft+ct*vt;for(let _t=mt+2;_t<mt+st;++_t)dt[pt++]=ne[_t]}return dt&&dt.length!=pt&&(dt.length=pt),dt}function translate(ne,ee,te,st,ot,ct,ut){ut=ut||[];let dt=0;for(let ht=ee;ht<te;ht+=st){ut[dt++]=ne[ht]+ot,ut[dt++]=ne[ht+1]+ct;for(let ft=ht+2;ft<ht+st;++ft)ut[dt++]=ne[ft]}return ut&&ut.length!=dt&&(ut.length=dt),ut}const tmpTransform$1=create$1(),tmpPoint=[NaN,NaN];class Geometry extends BaseObject{constructor(){super(),this.extent_=createEmpty(),this.extentRevision_=-1,this.simplifiedGeometryMaxMinSquaredTolerance=0,this.simplifiedGeometryRevision=0,this.simplifyTransformedInternal=memoizeOne((ee,te,st)=>{if(!st)return this.getSimplifiedGeometry(te);const ot=this.clone();return ot.applyTransform(st),ot.getSimplifiedGeometry(te)})}simplifyTransformed(ee,te){return this.simplifyTransformedInternal(this.getRevision(),ee,te)}clone(){return abstract()}closestPointXY(ee,te,st,ot){return abstract()}containsXY(ee,te){return this.closestPointXY(ee,te,tmpPoint,Number.MIN_VALUE)===0}getClosestPoint(ee,te){return te=te||[NaN,NaN],this.closestPointXY(ee[0],ee[1],te,1/0),te}intersectsCoordinate(ee){return this.containsXY(ee[0],ee[1])}computeExtent(ee){return abstract()}getExtent(ee){if(this.extentRevision_!=this.getRevision()){const te=this.computeExtent(this.extent_);(isNaN(te[0])||isNaN(te[1]))&&createOrUpdateEmpty(te),this.extentRevision_=this.getRevision()}return returnOrUpdate(this.extent_,ee)}rotate(ee,te){abstract()}scale(ee,te,st){abstract()}simplify(ee){return this.getSimplifiedGeometry(ee*ee)}getSimplifiedGeometry(ee){return abstract()}getType(){return abstract()}applyTransform(ee){abstract()}intersectsExtent(ee){return abstract()}translate(ee,te){abstract()}transform(ee,te){const st=get$3(ee),ot=st.getUnits()=="tile-pixels"?function(ct,ut,dt){const ht=st.getExtent(),ft=st.getWorldExtent(),pt=getHeight(ft)/getHeight(ht);compose(tmpTransform$1,ft[0],ft[3],pt,-pt,0,0,0);const mt=transform2D(ct,0,ct.length,dt,tmpTransform$1,ut),yt=getTransform(st,te);return yt?yt(mt,mt,dt):mt}:getTransform(st,te);return this.applyTransform(ot),this}}class SimpleGeometry extends Geometry{constructor(){super(),this.layout="XY",this.stride=2,this.flatCoordinates}computeExtent(ee){return createOrUpdateFromFlatCoordinates(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,ee)}getCoordinates(){return abstract()}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(ee){if(this.simplifiedGeometryRevision!==this.getRevision()&&(this.simplifiedGeometryMaxMinSquaredTolerance=0,this.simplifiedGeometryRevision=this.getRevision()),ee<0||this.simplifiedGeometryMaxMinSquaredTolerance!==0&&ee<=this.simplifiedGeometryMaxMinSquaredTolerance)return this;const te=this.getSimplifiedGeometryInternal(ee);return te.getFlatCoordinates().length<this.flatCoordinates.length?te:(this.simplifiedGeometryMaxMinSquaredTolerance=ee,this)}getSimplifiedGeometryInternal(ee){return this}getStride(){return this.stride}setFlatCoordinates(ee,te){this.stride=getStrideForLayout(ee),this.layout=ee,this.flatCoordinates=te}setCoordinates(ee,te){abstract()}setLayout(ee,te,st){let ot;if(ee)ot=getStrideForLayout(ee);else{for(let ct=0;ct<st;++ct){if(te.length===0){this.layout="XY",this.stride=2;return}te=te[0]}ot=te.length,ee=getLayoutForStride(ot)}
70this.layout=ee,this.stride=ot}applyTransform(ee){this.flatCoordinates&&(ee(this.flatCoordinates,this.flatCoordinates,this.layout.startsWith("XYZ")?3:2,this.stride),this.changed())}rotate(ee,te){const st=this.getFlatCoordinates();if(st){const ot=this.getStride();rotate(st,0,st.length,ot,ee,te,st),this.changed()}}scale(ee,te,st){te===void 0&&(te=ee),st||(st=getCenter(this.getExtent()));const ot=this.getFlatCoordinates();if(ot){const ct=this.getStride();scale(ot,0,ot.length,ct,ee,te,st,ot),this.changed()}}translate(ee,te){const st=this.getFlatCoordinates();if(st){const ot=this.getStride();translate(st,0,st.length,ot,ee,te,st),this.changed()}}}function getLayoutForStride(ne){let ee;return ne==2?ee="XY":ne==3?ee="XYZ":ne==4&&(ee="XYZM"),ee}function getStrideForLayout(ne){let ee;return ne=="XY"?ee=2:ne=="XYZ"||ne=="XYM"?ee=3:ne=="XYZM"&&(ee=4),ee}function transformGeom2D(ne,ee,te){const st=ne.getFlatCoordinates();if(!st)return null;const ot=ne.getStride();return transform2D(st,0,st.length,ot,ee,te)}function assignClosest(ne,ee,te,st,ot,ct,ut){const dt=ne[ee],ht=ne[ee+1],ft=ne[te]-dt,pt=ne[te+1]-ht;let mt;if(ft===0&&pt===0)mt=ee;else{const yt=((ot-dt)*ft+(ct-ht)*pt)/(ft*ft+pt*pt);if(yt>1)mt=te;else if(yt>0){for(let vt=0;vt<st;++vt)ut[vt]=lerp(ne[ee+vt],ne[te+vt],yt);ut.length=st;return}else mt=ee}for(let yt=0;yt<st;++yt)ut[yt]=ne[mt+yt];ut.length=st}function maxSquaredDelta(ne,ee,te,st,ot){let ct=ne[ee],ut=ne[ee+1];for(ee+=st;ee<te;ee+=st){const dt=ne[ee],ht=ne[ee+1],ft=squaredDistance$1(ct,ut,dt,ht);ft>ot&&(ot=ft),ct=dt,ut=ht}return ot}function arrayMaxSquaredDelta(ne,ee,te,st,ot){for(let ct=0,ut=te.length;ct<ut;++ct){const dt=te[ct];ot=maxSquaredDelta(ne,ee,dt,st,ot),ee=dt}return ot}function multiArrayMaxSquaredDelta(ne,ee,te,st,ot){for(let ct=0,ut=te.length;ct<ut;++ct){const dt=te[ct];ot=arrayMaxSquaredDelta(ne,ee,dt,st,ot),ee=dt[dt.length-1]}return ot}function assignClosestPoint(ne,ee,te,st,ot,ct,ut,dt,ht,ft,pt){if(ee==te)return ft;let mt,yt;if(ot===0){if(yt=squaredDistance$1(ut,dt,ne[ee],ne[ee+1]),yt<ft){for(mt=0;mt<st;++mt)ht[mt]=ne[ee+mt];return ht.length=st,yt}return ft}pt=pt||[NaN,NaN];let vt=ee+st;for(;vt<te;)if(assignClosest(ne,vt-st,vt,st,ut,dt,pt),yt=squaredDistance$1(ut,dt,pt[0],pt[1]),yt<ft){for(ft=yt,mt=0;mt<st;++mt)ht[mt]=pt[mt];ht.length=st,vt+=st}else vt+=st*Math.max((Math.sqrt(yt)-Math.sqrt(ft))/ot|0,1);if(ct&&(assignClosest(ne,te-st,ee,st,ut,dt,pt),yt=squaredDistance$1(ut,dt,pt[0],pt[1]),yt<ft)){for(ft=yt,mt=0;mt<st;++mt)ht[mt]=pt[mt];ht.length=st}return ft}function assignClosestArrayPoint(ne,ee,te,st,ot,ct,ut,dt,ht,ft,pt){pt=pt||[NaN,NaN];for(let mt=0,yt=te.length;mt<yt;++mt){const vt=te[mt];ft=assignClosestPoint(ne,ee,vt,st,ot,ct,ut,dt,ht,ft,pt),ee=vt}return ft}function assignClosestMultiArrayPoint(ne,ee,te,st,ot,ct,ut,dt,ht,ft,pt){pt=pt||[NaN,NaN];for(let mt=0,yt=te.length;mt<yt;++mt){const vt=te[mt];ft=assignClosestArrayPoint(ne,ee,vt,st,ot,ct,ut,dt,ht,ft,pt),ee=vt[vt.length-1]}return ft}function deflateCoordinate(ne,ee,te,st){for(let ot=0,ct=te.length;ot<ct;++ot)ne[ee++]=te[ot];return ee}function deflateCoordinates(ne,ee,te,st){for(let ot=0,ct=te.length;ot<ct;++ot){const ut=te[ot];for(let dt=0;dt<st;++dt)ne[ee++]=ut[dt]}return ee}function deflateCoordinatesArray(ne,ee,te,st,ot){ot=ot||[];let ct=0;for(let ut=0,dt=te.length;ut<dt;++ut){const ht=deflateCoordinates(ne,ee,te[ut],st);ot[ct++]=ht,ee=ht}return ot.length=ct,ot}function deflateMultiCoordinatesArray(ne,ee,te,st,ot){ot=ot||[];let ct=0;for(let ut=0,dt=te.length;ut<dt;++ut){const ht=deflateCoordinatesArray(ne,ee,te[ut],st,ot[ct]);ht.length===0&&(ht[0]=ee),ot[ct++]=ht,ee=ht[ht.length-1]}return ot.length=ct,ot}function inflateCoordinates(ne,ee,te,st,ot){ot=ot!==void 0?ot:[];let ct=0;for(let ut=ee;ut<te;ut+=st)ot[ct++]=ne.slice(ut,ut+st);return ot.length=ct,ot}function inflateCoordinatesArray(ne,ee,te,st,ot){ot=ot!==void 0?ot:[];let ct=0;for(let ut=0,dt=te.length;ut<dt;++ut){const ht=te[ut];ot[ct++]=inflateCoordinates(ne,ee,ht,st,ot[ct]),ee=ht}return ot.length=ct,ot}function inflateMultiCoordinatesArray(ne,ee,te,st,ot){ot=ot!==void 0?ot:[];let ct=0;for(let ut=0,dt=te.length;ut<dt;++ut){const ht=te[ut];ot[ct++]=ht.length===1&&ht[0]===ee?[]:inflateCoordinatesArray(ne,ee,ht,st,ot[ct]),ee=ht[ht.length-1]}return ot.length=ct,ot}function interpolatePoint(ne,ee,te,st,ot,ct,ut){let dt,ht;
vendor: 14,023 bytes, line 70
70const ft=(te-ee)/st;if(ft===1)dt=ee;else if(ft===2)dt=ee,ht=ot;else if(ft!==0){let pt=ne[ee],mt=ne[ee+1],yt=0;const vt=[0];for(let xt=ee+st;xt<te;xt+=st){const Mt=ne[xt],Ot=ne[xt+1];yt+=Math.sqrt((Mt-pt)*(Mt-pt)+(Ot-mt)*(Ot-mt)),vt.push(yt),pt=Mt,mt=Ot}const _t=ot*yt,bt=binarySearch$1(vt,_t);bt<0?(ht=(_t-vt[-bt-2])/(vt[-bt-1]-vt[-bt-2]),dt=ee+(-bt-2)*st):dt=ee+bt*st}ut=ut>1?ut:2,ct=ct||new Array(ut);for(let pt=0;pt<ut;++pt)ct[pt]=dt===void 0?NaN:ht===void 0?ne[dt+pt]:lerp(ne[dt+pt],ne[dt+st+pt],ht);return ct}function lineStringCoordinateAtM(ne,ee,te,st,ot,ct){if(te==ee)return null;let ut;if(ot<ne[ee+st-1])return ct?(ut=ne.slice(ee,ee+st),ut[st-1]=ot,ut):null;if(ne[te-1]<ot)return ct?(ut=ne.slice(te-st,te),ut[st-1]=ot,ut):null;if(ot==ne[ee+st-1])return ne.slice(ee,ee+st);let dt=ee/st,ht=te/st;for(;dt<ht;){const yt=dt+ht>>1;ot<ne[(yt+1)*st-1]?ht=yt:dt=yt+1}const ft=ne[dt*st-1];if(ot==ft)return ne.slice((dt-1)*st,(dt-1)*st+st);const pt=ne[(dt+1)*st-1],mt=(ot-ft)/(pt-ft);ut=[];for(let yt=0;yt<st-1;++yt)ut.push(lerp(ne[(dt-1)*st+yt],ne[dt*st+yt],mt));return ut.push(ot),ut}function lineStringsCoordinateAtM(ne,ee,te,st,ot,ct,ut){if(ut)return lineStringCoordinateAtM(ne,ee,te[te.length-1],st,ot,ct);let dt;if(ot<ne[st-1])return ct?(dt=ne.slice(0,st),dt[st-1]=ot,dt):null;if(ne[ne.length-1]<ot)return ct?(dt=ne.slice(ne.length-st),dt[st-1]=ot,dt):null;for(let ht=0,ft=te.length;ht<ft;++ht){const pt=te[ht];if(ee!=pt){if(ot<ne[ee+st-1])return null;if(ot<=ne[pt-1])return lineStringCoordinateAtM(ne,ee,pt,st,ot,!1);ee=pt}}return null}function lineStringLength(ne,ee,te,st){let ot=ne[ee],ct=ne[ee+1],ut=0;for(let dt=ee+st;dt<te;dt+=st){const ht=ne[dt],ft=ne[dt+1];ut+=Math.sqrt((ht-ot)*(ht-ot)+(ft-ct)*(ft-ct)),ot=ht,ct=ft}return ut}function douglasPeucker(ne,ee,te,st,ot,ct,ut){const dt=(te-ee)/st;if(dt<3){for(;ee<te;ee+=st)ct[ut++]=ne[ee],ct[ut++]=ne[ee+1];return ut}const ht=new Array(dt);ht[0]=1,ht[dt-1]=1;const ft=[ee,te-st];let pt=0;for(;ft.length>0;){const mt=ft.pop(),yt=ft.pop();let vt=0;const _t=ne[yt],bt=ne[yt+1],xt=ne[mt],Mt=ne[mt+1];for(let Ot=yt+st;Ot<mt;Ot+=st){const kt=ne[Ot],Nt=ne[Ot+1],Gt=squaredSegmentDistance(kt,Nt,_t,bt,xt,Mt);Gt>vt&&(pt=Ot,vt=Gt)}vt>ot&&(ht[(pt-ee)/st]=1,yt+st<pt&&ft.push(yt,pt),pt+st<mt&&ft.push(pt,mt))}for(let mt=0;mt<dt;++mt)ht[mt]&&(ct[ut++]=ne[ee+mt*st],ct[ut++]=ne[ee+mt*st+1]);return ut}function douglasPeuckerArray(ne,ee,te,st,ot,ct,ut,dt){for(let ht=0,ft=te.length;ht<ft;++ht){const pt=te[ht];ut=douglasPeucker(ne,ee,pt,st,ot,ct,ut),dt.push(ut),ee=pt}return ut}function snap(ne,ee){return ee*Math.round(ne/ee)}function quantize(ne,ee,te,st,ot,ct,ut){if(ee==te)return ut;let dt=snap(ne[ee],ot),ht=snap(ne[ee+1],ot);ee+=st,ct[ut++]=dt,ct[ut++]=ht;let ft,pt;do if(ft=snap(ne[ee],ot),pt=snap(ne[ee+1],ot),ee+=st,ee==te)return ct[ut++]=ft,ct[ut++]=pt,ut;while(ft==dt&&pt==ht);for(;ee<te;){const mt=snap(ne[ee],ot),yt=snap(ne[ee+1],ot);if(ee+=st,mt==ft&&yt==pt)continue;const vt=ft-dt,_t=pt-ht,bt=mt-dt,xt=yt-ht;if(vt*xt==_t*bt&&(vt<0&&bt<vt||vt==bt||vt>0&&bt>vt)&&(_t<0&&xt<_t||_t==xt||_t>0&&xt>_t)){ft=mt,pt=yt;continue}ct[ut++]=ft,ct[ut++]=pt,dt=ft,ht=pt,ft=mt,pt=yt}return ct[ut++]=ft,ct[ut++]=pt,ut}function quantizeArray(ne,ee,te,st,ot,ct,ut,dt){for(let ht=0,ft=te.length;ht<ft;++ht){const pt=te[ht];ut=quantize(ne,ee,pt,st,ot,ct,ut),dt.push(ut),ee=pt}return ut}function quantizeMultiArray(ne,ee,te,st,ot,ct,ut,dt){for(let ht=0,ft=te.length;ht<ft;++ht){const pt=te[ht],mt=[];ut=quantizeArray(ne,ee,pt,st,ot,ct,ut,mt),dt.push(mt),ee=pt[pt.length-1]}return ut}class LineString extends SimpleGeometry{constructor(ee,te){super(),this.flatMidpoint_=null,this.flatMidpointRevision_=-1,this.maxDelta_=-1,this.maxDeltaRevision_=-1,te!==void 0&&!Array.isArray(ee[0])?this.setFlatCoordinates(te,ee):this.setCoordinates(ee,te)}appendCoordinate(ee){extend$3(this.flatCoordinates,ee),this.changed()}clone(){const ee=new LineString(this.flatCoordinates.slice(),this.layout);return ee.applyProperties(this),ee}closestPointXY(ee,te,st,ot){return ot<closestSquaredDistanceXY(this.getExtent(),ee,te)?ot:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(maxSquaredDelta(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),assignClosestPoint(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,this.maxDelta_,!1,ee,te,st,ot))}forEachSegment(ee){return forEach(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,ee)}getCoordinateAtM(ee,te){return this.layout!="XYM"&&this.layout!="XYZM"?null:(te=te!==void 0?te:!1,lineStringCoordinateAtM(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,ee,te))}getCoordinates(){return inflateCoordinates(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)}getCoordinateAt(ee,te){return interpolatePoint(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,ee,te,this.stride)}getLength(){return lineStringLength(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)}getFlatMidpoint(){return this.flatMidpointRevision_!=this.getRevision()&&(this.flatMidpoint_=this.getCoordinateAt(.5,this.flatMidpoint_??void 0),this.flatMidpointRevision_=this.getRevision()),this.flatMidpoint_}getSimplifiedGeometryInternal(ee){const te=[];return te.length=douglasPeucker(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,ee,te,0),new LineString(te,"XY")}getType(){return"LineString"}intersectsExtent(ee){return intersectsLineString(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,ee,this.getExtent())}setCoordinates(ee,te){this.setLayout(te,ee,1),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=deflateCoordinates(this.flatCoordinates,0,ee,this.stride),this.changed()}}class MultiLineString extends SimpleGeometry{constructor(ee,te,st){if(super(),this.ends_=[],this.maxDelta_=-1,this.maxDeltaRevision_=-1,Array.isArray(ee[0]))this.setCoordinates(ee,te);else if(te!==void 0&&st)this.setFlatCoordinates(te,ee),this.ends_=st;else{const ot=ee,ct=[],ut=[];for(let ht=0,ft=ot.length;ht<ft;++ht){const pt=ot[ht];extend$3(ct,pt.getFlatCoordinates()),ut.push(ct.length)}const dt=ot.length===0?this.getLayout():ot[0].getLayout();this.setFlatCoordinates(dt,ct),this.ends_=ut}}appendLineString(ee){extend$3(this.flatCoordinates,ee.getFlatCoordinates().slice()),this.ends_.push(this.flatCoordinates.length),this.changed()}clone(){const ee=new MultiLineString(this.flatCoordinates.slice(),this.layout,this.ends_.slice());return ee.applyProperties(this),ee}closestPointXY(ee,te,st,ot){return ot<closestSquaredDistanceXY(this.getExtent(),ee,te)?ot:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(arrayMaxSquaredDelta(this.flatCoordinates,0,this.ends_,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),assignClosestArrayPoint(this.flatCoordinates,0,this.ends_,this.stride,this.maxDelta_,!1,ee,te,st,ot))}getCoordinateAtM(ee,te,st){return this.layout!="XYM"&&this.layout!="XYZM"||this.flatCoordinates.length===0?null:(te=te!==void 0?te:!1,st=st!==void 0?st:!1,lineStringsCoordinateAtM(this.flatCoordinates,0,this.ends_,this.stride,ee,te,st))}getCoordinates(){return inflateCoordinatesArray(this.flatCoordinates,0,this.ends_,this.stride)}getEnds(){return this.ends_}getLineString(ee){return ee<0||this.ends_.length<=ee?null:new LineString(this.flatCoordinates.slice(ee===0?0:this.ends_[ee-1],this.ends_[ee]),this.layout)}getLineStrings(){const ee=this.flatCoordinates,te=this.ends_,st=this.layout,ot=[];let ct=0;for(let ut=0,dt=te.length;ut<dt;++ut){const ht=te[ut],ft=new LineString(ee.slice(ct,ht),st);ot.push(ft),ct=ht}return ot}getLength(){const ee=this.ends_;let te=0,st=0;for(let ot=0,ct=ee.length;ot<ct;++ot)st+=lineStringLength(this.flatCoordinates,te,ee[ot],this.stride),te=ee[ot];return st}getFlatMidpoints(){const ee=[],te=this.flatCoordinates;let st=0;const ot=this.ends_,ct=this.stride;for(let ut=0,dt=ot.length;ut<dt;++ut){const ht=ot[ut],ft=interpolatePoint(te,st,ht,ct,.5);extend$3(ee,ft),st=ht}return ee}getSimplifiedGeometryInternal(ee){const te=[],st=[];return te.length=douglasPeuckerArray(this.flatCoordinates,0,this.ends_,this.stride,ee,te,0,st),new MultiLineString(te,"XY",st)}getType(){return"MultiLineString"}intersectsExtent(ee){return intersectsLineStringArray(this.flatCoordinates,0,this.ends_,this.stride,ee)}setCoordinates(ee,te){this.setLayout(te,ee,2),this.flatCoordinates||(this.flatCoordinates=[]);const st=deflateCoordinatesArray(this.flatCoordinates,0,ee,this.stride,this.ends_);this.flatCoordinates.length=st.length===0?0:st[st.length-1],this.changed()}}let Point$1=class yu extends SimpleGeometry{constructor(ee,te){super(),this.setCoordinates(ee,te)}clone(){const ee=new yu(this.flatCoordinates.slice(),this.layout);return ee.applyProperties(this),ee}closestPointXY(ee,te,st,ot){const ct=this.flatCoordinates,ut=squaredDistance$1(ee,te,ct[0],ct[1]);if(ut<ot){const dt=this.stride;for(let ht=0;ht<dt;++ht)st[ht]=ct[ht];return st.length=dt,ut}return ot}getCoordinates(){return this.flatCoordinates.slice()}computeExtent(ee){return createOrUpdateFromCoordinate(this.flatCoordinates,ee)}getType(){return"Point"}intersectsExtent(ee){return containsXY(ee,this.flatCoordinates[0],this.flatCoordinates[1])}setCoordinates(ee,te){this.setLayout(te,ee,0),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=deflateCoordinate(this.flatCoordinates,0,ee,this.stride),this.changed()}};class MultiPoint extends SimpleGeometry{constructor(ee,te){super(),te&&!Array.isArray(ee[0])?this.setFlatCoordinates(te,ee):this.setCoordinates(ee,te)}appendPoint(ee){extend$3(this.flatCoordinates,ee.getFlatCoordinates()),this.changed()}clone(){const ee=new MultiPoint(this.flatCoordinates.slice(),this.layout);return ee.applyProperties(this),ee}closestPointXY(ee,te,st,ot){if(ot<closestSquaredDistanceXY(this.getExtent(),ee,te))return ot;const ct=this.flatCoordinates,ut=this.stride;for(let dt=0,ht=ct.length;dt<ht;dt+=ut){const ft=squaredDistance$1(ee,te,ct[dt],ct[dt+1]);if(ft<ot){ot=ft;for(let pt=0;pt<ut;++pt)st[pt]=ct[dt+pt];st.length=ut}}return ot}getCoordinates(){return inflateCoordinates(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)}getPoint(ee){const te=this.flatCoordinates.length/this.stride;return ee<0||te<=ee?null:new Point$1(this.flatCoordinates.slice(ee*this.stride,(ee+1)*this.stride),this.layout)}getPoints(){const ee=this.flatCoordinates,te=this.layout,st=this.stride,ot=[];for(let ct=0,ut=ee.length;ct<ut;ct+=st){const dt=new Point$1(ee.slice(ct,ct+st),te);ot.push(dt)}return ot}getType(){return"MultiPoint"}intersectsExtent(ee){const te=this.flatCoordinates,st=this.stride;for(let ot=0,ct=te.length;ot<ct;ot+=st){const ut=te[ot],dt=te[ot+1];if(containsXY(ee,ut,dt))return!0}return!1}setCoordinates(ee,te){this.setLayout(te,ee,1),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=deflateCoordinates(this.flatCoordinates,0,ee,this.stride),this.changed()}}function linearRing(ne,ee,te,st){let ot=0;const ct=ne[te-st],ut=ne[te-st+1];let dt=0,ht=0;for(;ee<te;ee+=st){const ft=ne[ee]-ct,pt=ne[ee+1]-ut;ot+=ht*ft-dt*pt,dt=ft,ht=pt}return ot/2}function linearRings(ne,ee,te,st){let ot=0;for(let ct=0,ut=te.length;ct<ut;++ct){const dt=te[ct];ot+=linearRing(ne,ee,dt,st),ee=dt}return ot}function linearRingss$1(ne,ee,te,st){let ot=0;for(let ct=0,ut=te.length;ct<ut;++ct){const dt=te[ct];ot+=linearRings(ne,ee,dt,st),ee=dt[dt.length-1]}return ot}class LinearRing extends SimpleGeometry{constructor(ee,te){super(),this.maxDelta_=-1,this.maxDeltaRevision_=-1,te!==void 0&&!Array.isArray(ee[0])?this.setFlatCoordinates(te,ee):this.setCoordinates(ee,te)}clone(){return new LinearRing(this.flatCoordinates.slice(),this.layout)}closestPointXY(ee,te,st,ot){return ot<closestSquaredDistanceXY(this.getExtent(),ee,te)?ot:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(maxSquaredDelta(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),assignClosestPoint(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,this.maxDelta_,!0,ee,te,st,ot))}getArea(){return linearRing(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)}getCoordinates(){return inflateCoordinates(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)}getSimplifiedGeometryInternal(ee){const te=[];return te.length=douglasPeucker(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,ee,te,0),new LinearRing(te,"XY")}getType(){return"LinearRing"}intersectsExtent(ee){return intersectsLineString(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,ee)}setCoordinates(ee,te){this.setLayout(te,ee,1),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=deflateCoordinates(this.flatCoordinates,0,ee,this.stride),this.changed()}}function getInteriorPointOfArray(ne,ee,te,st,ot,ct,ut){let dt,ht,ft,pt,mt,yt,vt;const _t=ot[ct+1],bt=[];for(let Ot=0,kt=te.length;Ot<kt;++Ot){const Nt=te[Ot];for(pt=ne[Nt-st],yt=ne[Nt-st+1],dt=ee;dt<Nt;dt+=st)mt=ne[dt],vt=ne[dt+1],(_t<=yt&&vt<=_t||yt<=_t&&_t<=vt)&&(ft=(_t-yt)/(vt-yt)*(mt-pt)+pt,bt.push(ft)),pt=mt,yt=vt}let xt=NaN,Mt=-1/0;for(bt.sort(ascending),pt=bt[0],dt=1,ht=bt.length;dt<ht;++dt){mt=bt[dt];const Ot=Math.abs(mt-pt);Ot>Mt&&(ft=(pt+mt)/2,linearRingsContainsXY(ne,ee,te,st,ft,_t)&&(xt=ft,Mt=Ot)),pt=mt}return isNaN(xt)&&(xt=ot[ct]),ut?(ut.push(xt,_t,Mt),ut):[xt,_t,Mt]}function getInteriorPointsOfMultiArray(ne,ee,te,st,ot){let ct=[];for(let ut=0,dt=te.length;ut<dt;++ut){const ht=te[ut];ct=getInteriorPointOfArray(ne,ee,ht,st,ot,2*ut,ct),ee=ht[ht.length-1]}return ct}function coordinates(ne,ee,te,st){for(;ee<te-st;){for(let ot=0;ot<st;++ot){const ct=ne[ee+ot];ne[ee+ot]=ne[te-st+ot],ne[te-st+ot]=ct}ee+=st,te-=st}}function linearRingIsClockwise(ne,ee,te,st){let ot=0,ct=ne[te-st],ut=ne[te-st+1];for(;ee<te;ee+=st){const dt=ne[ee],ht=ne[ee+1];ot+=(dt-ct)*(ht+ut),ct=dt,ut=ht}return ot===0?void 0:ot>0}function linearRingsAreOriented(ne,ee,te,st,ot){ot=ot!==void 0?ot:!1;for(let ct=0,ut=te.length;ct<ut;
70++ct){const dt=te[ct],ht=linearRingIsClockwise(ne,ee,dt,st);if(ct===0){if(ot&&ht||!ot&&!ht)return!1}else if(ot&&!ht||!ot&&ht)return!1;ee=dt}return!0}function linearRingssAreOriented(ne,ee,te,st,ot){for(let ct=0,ut=te.length;ct<ut;++ct){const dt=te[ct];if(!linearRingsAreOriented(ne,ee,dt,st,ot))return!1;dt.length&&(ee=dt[dt.length-1])}return!0}function orientLinearRings(ne,ee,te,st,ot){ot=ot!==void 0?ot:!1;for(let ct=0,ut=te.length;ct<ut;++ct){const dt=te[ct],ht=linearRingIsClockwise(ne,ee,dt,st);(ct===0?ot&&ht||!ot&&!ht:ot&&!ht||!ot&&ht)&&coordinates(ne,ee,dt,st),ee=dt}return ee}function orientLinearRingsArray(ne,ee,te,st,ot){for(let ct=0,ut=te.length;ct<ut;++ct)ee=orientLinearRings(ne,ee,te[ct],st,ot);return ee}function inflateEnds(ne,ee){const te=[];let st=0,ot=0,ct;for(let ut=0,dt=ee.length;ut<dt;++ut){const ht=ee[ut],ft=linearRingIsClockwise(ne,st,ht,2);if(ct===void 0&&(ct=ft),ft===ct)te.push(ee.slice(ot,ut+1));else{if(te.length===0)continue;te[te.length-1].push(ee[ot])}ot=ut+1,st=ht}return te}class Polygon extends SimpleGeometry{constructor(ee,te,st){super(),this.ends_=[],this.flatInteriorPointRevision_=-1,this.flatInteriorPoint_=null,this.maxDelta_=-1,this.maxDeltaRevision_=-1,this.orientedRevision_=-1,this.orientedFlatCoordinates_=null,te!==void 0&&st?(this.setFlatCoordinates(te,ee),this.ends_=st):this.setCoordinates(ee,te)}appendLinearRing(ee){this.flatCoordinates?extend$3(this.flatCoordinates,ee.getFlatCoordinates()):this.flatCoordinates=ee.getFlatCoordinates().slice(),this.ends_.push(this.flatCoordinates.length),this.changed()}clone(){const ee=new Polygon(this.flatCoordinates.slice(),this.layout,this.ends_.slice());return ee.applyProperties(this),ee}closestPointXY(ee,te,st,ot){return ot<closestSquaredDistanceXY(this.getExtent(),ee,te)?ot:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(arrayMaxSquaredDelta(this.flatCoordinates,0,this.ends_,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),assignClosestArrayPoint(this.flatCoordinates,0,this.ends_,this.stride,this.maxDelta_,!0,ee,te,st,ot))}containsXY(ee,te){return linearRingsContainsXY(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,ee,te)}getArea(){return linearRings(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride)}getCoordinates(ee){let te;return ee!==void 0?(te=this.getOrientedFlatCoordinates().slice(),orientLinearRings(te,0,this.ends_,this.stride,ee)):te=this.flatCoordinates,inflateCoordinatesArray(te,0,this.ends_,this.stride)}getEnds(){return this.ends_}getFlatInteriorPoint(){if(this.flatInteriorPointRevision_!=this.getRevision()){const ee=getCenter(this.getExtent());this.flatInteriorPoint_=getInteriorPointOfArray(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,ee,0),this.flatInteriorPointRevision_=this.getRevision()}return this.flatInteriorPoint_}getInteriorPoint(){return new Point$1(this.getFlatInteriorPoint(),"XYM")}getLinearRingCount(){return this.ends_.length}getLinearRing(ee){return ee<0||this.ends_.length<=ee?null:new LinearRing(this.flatCoordinates.slice(ee===0?0:this.ends_[ee-1],this.ends_[ee]),this.layout)}getLinearRings(){const ee=this.layout,te=this.flatCoordinates,st=this.ends_,ot=[];let ct=0;for(let ut=0,dt=st.length;ut<dt;++ut){const ht=st[ut],ft=new LinearRing(te.slice(ct,ht),ee);ot.push(ft),ct=ht}return ot}getOrientedFlatCoordinates(){if(this.orientedRevision_!=this.getRevision()){const ee=this.flatCoordinates;linearRingsAreOriented(ee,0,this.ends_,this.stride)?this.orientedFlatCoordinates_=ee:(this.orientedFlatCoordinates_=ee.slice(),this.orientedFlatCoordinates_.length=orientLinearRings(this.orientedFlatCoordinates_,0,this.ends_,this.stride)),this.orientedRevision_=this.getRevision()}return this.orientedFlatCoordinates_}getSimplifiedGeometryInternal(ee){const te=[],st=[];return te.length=quantizeArray(this.flatCoordinates,0,this.ends_,this.stride,Math.sqrt(ee),te,0,st),new Polygon(te,"XY",st)}getType(){return"Polygon"}intersectsExtent(ee){return intersectsLinearRingArray(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,ee)}setCoordinates(ee,te){this.setLayout(te,ee,2),this.flatCoordinates||(this.flatCoordinates=[]);const st=deflateCoordinatesArray(this.flatCoordinates,0,ee,this.stride,this.ends_);this.flatCoordinates.length=st.length===0?0:st[st.length-1],this.changed()}}function circular(ne,ee,te,st){te=te||32;const ot=[];for(let ct=0;ct<te;++ct)extend$3(ot,offset(ne,ee,2*Math.PI*ct/te,st));return ot.push(ot[0],ot[1]),new Polygon(ot,"XY",[ot.length])}
vendor: 7,048 bytes, line 70
70function fromExtent(ne){if(isEmpty$1(ne))throw new Error("Cannot create polygon from empty extent");const ee=ne[0],te=ne[1],st=ne[2],ot=ne[3],ct=[ee,te,ee,ot,st,ot,st,te,ee,te];return new Polygon(ct,"XY",[ct.length])}function linearRingss(ne,ee,te,st){const ot=[];let ct=createEmpty();for(let ut=0,dt=te.length;ut<dt;++ut){const ht=te[ut];ct=createOrUpdateFromFlatCoordinates(ne,ee,ht[0],st),ot.push((ct[0]+ct[2])/2,(ct[1]+ct[3])/2),ee=ht[ht.length-1]}return ot}class MultiPolygon extends SimpleGeometry{constructor(ee,te,st){if(super(),this.endss_=[],this.flatInteriorPointsRevision_=-1,this.flatInteriorPoints_=null,this.maxDelta_=-1,this.maxDeltaRevision_=-1,this.orientedRevision_=-1,this.orientedFlatCoordinates_=null,!st&&!Array.isArray(ee[0])){const ot=ee,ct=[],ut=[];for(let dt=0,ht=ot.length;dt<ht;++dt){const ft=ot[dt],pt=ct.length,mt=ft.getEnds();for(let yt=0,vt=mt.length;yt<vt;++yt)mt[yt]+=pt;extend$3(ct,ft.getFlatCoordinates()),ut.push(mt)}te=ot.length===0?this.getLayout():ot[0].getLayout(),ee=ct,st=ut}te!==void 0&&st?(this.setFlatCoordinates(te,ee),this.endss_=st):this.setCoordinates(ee,te)}appendPolygon(ee){let te;if(!this.flatCoordinates)this.flatCoordinates=ee.getFlatCoordinates().slice(),te=ee.getEnds().slice(),this.endss_.push();else{const st=this.flatCoordinates.length;extend$3(this.flatCoordinates,ee.getFlatCoordinates()),te=ee.getEnds().slice();for(let ot=0,ct=te.length;ot<ct;++ot)te[ot]+=st}this.endss_.push(te),this.changed()}clone(){const ee=this.endss_.length,te=new Array(ee);for(let ot=0;ot<ee;++ot)te[ot]=this.endss_[ot].slice();const st=new MultiPolygon(this.flatCoordinates.slice(),this.layout,te);return st.applyProperties(this),st}closestPointXY(ee,te,st,ot){return ot<closestSquaredDistanceXY(this.getExtent(),ee,te)?ot:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(multiArrayMaxSquaredDelta(this.flatCoordinates,0,this.endss_,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),assignClosestMultiArrayPoint(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,this.maxDelta_,!0,ee,te,st,ot))}containsXY(ee,te){return linearRingssContainsXY(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,ee,te)}getArea(){return linearRingss$1(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride)}getCoordinates(ee){let te;return ee!==void 0?(te=this.getOrientedFlatCoordinates().slice(),orientLinearRingsArray(te,0,this.endss_,this.stride,ee)):te=this.flatCoordinates,inflateMultiCoordinatesArray(te,0,this.endss_,this.stride)}getEndss(){return this.endss_}getFlatInteriorPoints(){if(this.flatInteriorPointsRevision_!=this.getRevision()){const ee=linearRingss(this.flatCoordinates,0,this.endss_,this.stride);this.flatInteriorPoints_=getInteriorPointsOfMultiArray(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,ee),this.flatInteriorPointsRevision_=this.getRevision()}return this.flatInteriorPoints_}getInteriorPoints(){return new MultiPoint(this.getFlatInteriorPoints().slice(),"XYM")}getOrientedFlatCoordinates(){if(this.orientedRevision_!=this.getRevision()){const ee=this.flatCoordinates;linearRingssAreOriented(ee,0,this.endss_,this.stride)?this.orientedFlatCoordinates_=ee:(this.orientedFlatCoordinates_=ee.slice(),this.orientedFlatCoordinates_.length=orientLinearRingsArray(this.orientedFlatCoordinates_,0,this.endss_,this.stride)),this.orientedRevision_=this.getRevision()}return this.orientedFlatCoordinates_}getSimplifiedGeometryInternal(ee){const te=[],st=[];return te.length=quantizeMultiArray(this.flatCoordinates,0,this.endss_,this.stride,Math.sqrt(ee),te,0,st),new MultiPolygon(te,"XY",st)}getPolygon(ee){if(ee<0||this.endss_.length<=ee)return null;let te;if(ee===0)te=0;else{const ct=this.endss_[ee-1];te=ct[ct.length-1]}const st=this.endss_[ee].slice(),ot=st[st.length-1];if(te!==0)for(let ct=0,ut=st.length;ct<ut;++ct)st[ct]-=te;return new Polygon(this.flatCoordinates.slice(te,ot),this.layout,st)}getPolygons(){const ee=this.layout,te=this.flatCoordinates,st=this.endss_,ot=[];let ct=0;for(let ut=0,dt=st.length;ut<dt;++ut){const ht=st[ut].slice(),ft=ht[ht.length-1];if(ct!==0)for(let mt=0,yt=ht.length;mt<yt;++mt)ht[mt]-=ct;const pt=new Polygon(te.slice(ct,ft),ee,ht);ot.push(pt),ct=ft}return ot}getType(){return"MultiPolygon"}intersectsExtent(ee){return intersectsLinearRingMultiArray(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,ee)}setCoordinates(ee,te){this.setLayout(te,ee,3),this.flatCoordinates||(this.flatCoordinates=[]);const st=deflateMultiCoordinatesArray(this.flatCoordinates,0,ee,this.stride,this.endss_);if(st.length===0)this.flatCoordinates.length=0;else{const ot=st[st.length-1];this.flatCoordinates.length=ot.length===0?0:ot[ot.length-1]}this.changed()}}const tmpTransform=create$1();class RenderFeature{constructor(ee,te,st,ot,ct,ut){this.styleFunction,this.extent_,this.id_=ut,this.type_=ee,this.flatCoordinates_=te,this.flatInteriorPoints_=null,this.flatMidpoints_=null,this.ends_=st||null,this.properties_=ct,this.squaredTolerance_,this.stride_=ot,this.simplifiedGeometry_}get(ee){return this.properties_[ee]}getExtent(){return this.extent_||(this.extent_=this.type_==="Point"?createOrUpdateFromCoordinate(this.flatCoordinates_):createOrUpdateFromFlatCoordinates(this.flatCoordinates_,0,this.flatCoordinates_.length,this.stride_)),this.extent_}getFlatInteriorPoint(){if(!this.flatInteriorPoints_){const ee=getCenter(this.getExtent());this.flatInteriorPoints_=getInteriorPointOfArray(this.flatCoordinates_,0,this.ends_,this.stride_,ee,0)}return this.flatInteriorPoints_}getFlatInteriorPoints(){if(!this.flatInteriorPoints_){const ee=inflateEnds(this.flatCoordinates_,this.ends_),te=linearRingss(this.flatCoordinates_,0,ee,this.stride_);this.flatInteriorPoints_=getInteriorPointsOfMultiArray(this.flatCoordinates_,0,ee,this.stride_,te)}return this.flatInteriorPoints_}getFlatMidpoint(){return this.flatMidpoints_||(this.flatMidpoints_=interpolatePoint(this.flatCoordinates_,0,this.flatCoordinates_.length,this.stride_,.5)),this.flatMidpoints_}getFlatMidpoints(){if(!this.flatMidpoints_){this.flatMidpoints_=[];const ee=this.flatCoordinates_;let te=0;const st=this.ends_;for(let ot=0,ct=st.length;ot<ct;++ot){const ut=st[ot],dt=interpolatePoint(ee,te,ut,this.stride_,.5);extend$3(this.flatMidpoints_,dt),te=ut}}return this.flatMidpoints_}getId(){return this.id_}getOrientedFlatCoordinates(){return this.flatCoordinates_}getGeometry(){return this}getSimplifiedGeometry(ee){return this}simplifyTransformed(ee,te){return this}getProperties(){return this.properties_}getPropertiesInternal(){return this.properties_}getStride(){return this.stride_}getStyleFunction(){return this.styleFunction}getType(){return this.type_}transform(ee){ee=get$3(ee);const te=ee.getExtent(),st=ee.getWorldExtent();if(te&&st){const ot=getHeight(st)/getHeight(te);compose(tmpTransform,st[0],st[3],ot,-ot,0,0,0),transform2D(this.flatCoordinates_,0,this.flatCoordinates_.length,this.stride_,tmpTransform,this.flatCoordinates_)}}applyTransform(ee){ee(this.flatCoordinates_,this.flatCoordinates_,this.stride_)}clone(){var ee;
70return new RenderFeature(this.type_,this.flatCoordinates_.slice(),(ee=this.ends_)==null?void 0:ee.slice(),this.stride_,Object.assign({},this.properties_),this.id_)}getEnds(){return this.ends_}enableSimplifyTransformed(){return this.simplifyTransformed=memoizeOne((ee,te)=>{if(ee===this.squaredTolerance_)return this.simplifiedGeometry_;this.simplifiedGeometry_=this.clone(),te&&this.simplifiedGeometry_.applyTransform(te);const st=this.simplifiedGeometry_.getFlatCoordinates();let ot;switch(this.type_){case"LineString":st.length=douglasPeucker(st,0,this.simplifiedGeometry_.flatCoordinates_.length,this.simplifiedGeometry_.stride_,ee,st,0),ot=[st.length];break;case"MultiLineString":ot=[],st.length=douglasPeuckerArray(st,0,this.simplifiedGeometry_.ends_,this.simplifiedGeometry_.stride_,ee,st,0,ot);break;case"Polygon":ot=[],st.length=quantizeArray(st,0,this.simplifiedGeometry_.ends_,this.simplifiedGeometry_.stride_,Math.sqrt(ee),st,0,ot);break}return ot&&(this.simplifiedGeometry_=new RenderFeature(this.type_,st,ot,this.stride_,this.properties_,this.id_)),this.squaredTolerance_=ee,this.simplifiedGeometry_}),this}}RenderFeature.prototype.getFlatCoordinates=RenderFeature.prototype.getOrientedFlatCoordinates;function quickselect(ne,ee,te=0,st=ne.length-1,ot=defaultCompare){for(;st>te;){if(st-te>600){const ht=st-te+1,ft=ee-te+1,pt=Math.log(ht),mt=.5*Math.exp(2*pt/3),yt=.5*Math.sqrt(pt*mt*(ht-mt)/ht)*(ft-ht/2<0?-1:1),vt=Math.max(te,Math.floor(ee-ft*mt/ht+yt)),_t=Math.min(st,Math.floor(ee+(ht-ft)*mt/ht+yt));quickselect(ne,ee,vt,_t,ot)}const ct=ne[ee];let ut=te,dt=st;for(swap(ne,te,ee),ot(ne[st],ct)>0&&swap(ne,te,st);ut<dt;){for(swap(ne,ut,dt),ut++,dt--;ot(ne[ut],ct)<0;)ut++;for(;ot(ne[dt],ct)>0;)dt--}ot(ne[te],ct)===0?swap(ne,te,dt):(dt++,swap(ne,dt,st)),dt<=ee&&(te=dt+1),ee<=dt&&(st=dt-1)}}function swap(ne,ee,te){const st=ne[ee];ne[ee]=ne[te],ne[te]=st}function defaultCompare(ne,ee){return ne<ee?-1:ne>ee?1:0}let RBush$1=class{constructor(ee=9){this._maxEntries=Math.max(4,ee),this._minEntries=Math.max(2,Math.ceil(this._maxEntries*.4)),this.clear()}all(){return this._all(this.data,[])}search(ee){let te=this.data;const st=[];if(!intersects(ee,te))return st;const ot=this.toBBox,ct=[];for(;te;){for(let ut=0;ut<te.children.length;ut++){const dt=te.children[ut],ht=te.leaf?ot(dt):dt;intersects(ee,ht)&&(te.leaf?st.push(dt):contains$1(ee,ht)?this._all(dt,st):ct.push(dt))}te=ct.pop()}return st}collides(ee){let te=this.data;if(!intersects(ee,te))return!1;const st=[];for(;te;){for(let ot=0;ot<te.children.length;ot++){const ct=te.children[ot],ut=te.leaf?this.toBBox(ct):ct;if(intersects(ee,ut)){if(te.leaf||contains$1(ee,ut))return!0;st.push(ct)}}te=st.pop()}return!1}load(ee){if(!(ee&&ee.length))return this;if(ee.length<this._minEntries){for(let st=0;st<ee.length;st++)this.insert(ee[st]);return this}let te=this._build(ee.slice(),0,ee.length-1,0);if(!this.data.children.length)this.data=te;else if(this.data.height===te.height)this._splitRoot(this.data,te);else{if(this.data.height<te.height){const st=this.data;this.data=te,te=st}this._insert(te,this.data.height-te.height-1,!0)}return this}insert(ee){return ee&&this._insert(ee,this.data.height-1),this}clear(){return this.data=createNode([]),this}remove(ee,te){if(!ee)return this;let st=this.data;const ot=this.toBBox(ee),ct=[],ut=[];let dt,ht,ft;for(;st||ct.length;){if(st||(st=ct.pop(),ht=ct[ct.length-1],dt=ut.pop(),ft=!0),st.leaf){const pt=findItem(ee,st.children,te);if(pt!==-1)return st.children.splice(pt,1),ct.push(st),this._condense(ct),this}!ft&&!st.leaf&&contains$1(st,ot)?(ct.push(st),ut.push(dt),dt=0,ht=st,st=st.children[0]):ht?(dt++,st=ht.children[dt],ft=!1):st=null}return this}toBBox(ee){return ee}compareMinX(ee,te){return ee.minX-te.minX}compareMinY(ee,te){return ee.minY-te.minY}toJSON(){return this.data}fromJSON(ee){return this.data=ee,this}_all(ee,te){const st=[];for(;ee;)ee.leaf?te.push(...ee.children):st.push(...ee.children),ee=st.pop();return te}_build(ee,te,st,ot){const ct=st-te+1;let ut=this._maxEntries,dt;if(ct<=ut)return dt=createNode(ee.slice(te,st+1)),calcBBox(dt,this.toBBox),dt;ot||(ot=Math.ceil(Math.log(ct)/Math.log(ut)),ut=Math.ceil(ct/Math.pow(ut,ot-1))),dt=createNode([]),dt.leaf=!1,dt.height=ot;const ht=Math.ceil(ct/ut),ft=ht*Math.ceil(Math.sqrt(ut));multiSelect(ee,te,st,ft,this.compareMinX);for(let pt=te;pt<=st;pt+=ft){const mt=Math.min(pt+ft-1,st);multiSelect(ee,pt,mt,ht,this.compareMinY);for(let yt=pt;yt<=mt;yt+=ht){const vt=Math.min(yt+ht-1,mt);dt.children.push(this._build(ee,yt,vt,ot-1))}}return calcBBox(dt,this.toBBox),dt}_chooseSubtree(ee,te,st,ot){for(;ot.push(te),!(te.leaf||ot.length-1===st);){let ct=1/0,ut=1/0,dt;
vendor: 4,777 bytes, line 70
70for(let ht=0;ht<te.children.length;ht++){const ft=te.children[ht],pt=bboxArea(ft),mt=enlargedArea(ee,ft)-pt;mt<ut?(ut=mt,ct=pt<ct?pt:ct,dt=ft):mt===ut&&pt<ct&&(ct=pt,dt=ft)}te=dt||te.children[0]}return te}_insert(ee,te,st){const ot=st?ee:this.toBBox(ee),ct=[],ut=this._chooseSubtree(ot,this.data,te,ct);for(ut.children.push(ee),extend$2(ut,ot);te>=0&&ct[te].children.length>this._maxEntries;)this._split(ct,te),te--;this._adjustParentBBoxes(ot,ct,te)}_split(ee,te){const st=ee[te],ot=st.children.length,ct=this._minEntries;this._chooseSplitAxis(st,ct,ot);const ut=this._chooseSplitIndex(st,ct,ot),dt=createNode(st.children.splice(ut,st.children.length-ut));dt.height=st.height,dt.leaf=st.leaf,calcBBox(st,this.toBBox),calcBBox(dt,this.toBBox),te?ee[te-1].children.push(dt):this._splitRoot(st,dt)}_splitRoot(ee,te){this.data=createNode([ee,te]),this.data.height=ee.height+1,this.data.leaf=!1,calcBBox(this.data,this.toBBox)}_chooseSplitIndex(ee,te,st){let ot,ct=1/0,ut=1/0;for(let dt=te;dt<=st-te;dt++){const ht=distBBox(ee,0,dt,this.toBBox),ft=distBBox(ee,dt,st,this.toBBox),pt=intersectionArea(ht,ft),mt=bboxArea(ht)+bboxArea(ft);pt<ct?(ct=pt,ot=dt,ut=mt<ut?mt:ut):pt===ct&&mt<ut&&(ut=mt,ot=dt)}return ot||st-te}_chooseSplitAxis(ee,te,st){const ot=ee.leaf?this.compareMinX:compareNodeMinX,ct=ee.leaf?this.compareMinY:compareNodeMinY,ut=this._allDistMargin(ee,te,st,ot),dt=this._allDistMargin(ee,te,st,ct);ut<dt&&ee.children.sort(ot)}_allDistMargin(ee,te,st,ot){ee.children.sort(ot);const ct=this.toBBox,ut=distBBox(ee,0,te,ct),dt=distBBox(ee,st-te,st,ct);let ht=bboxMargin(ut)+bboxMargin(dt);for(let ft=te;ft<st-te;ft++){const pt=ee.children[ft];extend$2(ut,ee.leaf?ct(pt):pt),ht+=bboxMargin(ut)}for(let ft=st-te-1;ft>=te;ft--){const pt=ee.children[ft];extend$2(dt,ee.leaf?ct(pt):pt),ht+=bboxMargin(dt)}return ht}_adjustParentBBoxes(ee,te,st){for(let ot=st;ot>=0;ot--)extend$2(te[ot],ee)}_condense(ee){for(let te=ee.length-1,st;te>=0;te--)ee[te].children.length===0?te>0?(st=ee[te-1].children,st.splice(st.indexOf(ee[te]),1)):this.clear():calcBBox(ee[te],this.toBBox)}};function findItem(ne,ee,te){if(!te)return ee.indexOf(ne);for(let st=0;st<ee.length;st++)if(te(ne,ee[st]))return st;return-1}function calcBBox(ne,ee){distBBox(ne,0,ne.children.length,ee,ne)}function distBBox(ne,ee,te,st,ot){ot||(ot=createNode(null)),ot.minX=1/0,ot.minY=1/0,ot.maxX=-1/0,ot.maxY=-1/0;for(let ct=ee;ct<te;ct++){const ut=ne.children[ct];extend$2(ot,ne.leaf?st(ut):ut)}return ot}function extend$2(ne,ee){return ne.minX=Math.min(ne.minX,ee.minX),ne.minY=Math.min(ne.minY,ee.minY),ne.maxX=Math.max(ne.maxX,ee.maxX),ne.maxY=Math.max(ne.maxY,ee.maxY),ne}function compareNodeMinX(ne,ee){return ne.minX-ee.minX}function compareNodeMinY(ne,ee){return ne.minY-ee.minY}function bboxArea(ne){return(ne.maxX-ne.minX)*(ne.maxY-ne.minY)}function bboxMargin(ne){return ne.maxX-ne.minX+(ne.maxY-ne.minY)}function enlargedArea(ne,ee){return(Math.max(ee.maxX,ne.maxX)-Math.min(ee.minX,ne.minX))*(Math.max(ee.maxY,ne.maxY)-Math.min(ee.minY,ne.minY))}function intersectionArea(ne,ee){const te=Math.max(ne.minX,ee.minX),st=Math.max(ne.minY,ee.minY),ot=Math.min(ne.maxX,ee.maxX),ct=Math.min(ne.maxY,ee.maxY);return Math.max(0,ot-te)*Math.max(0,ct-st)}function contains$1(ne,ee){return ne.minX<=ee.minX&&ne.minY<=ee.minY&&ee.maxX<=ne.maxX&&ee.maxY<=ne.maxY}function intersects(ne,ee){return ee.minX<=ne.maxX&&ee.minY<=ne.maxY&&ee.maxX>=ne.minX&&ee.maxY>=ne.minY}function createNode(ne){return{children:ne,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function multiSelect(ne,ee,te,st,ot){const ct=[ee,te];for(;ct.length;){if(te=ct.pop(),ee=ct.pop(),te-ee<=st)continue;const ut=ee+Math.ceil((te-ee)/st/2)*st;quickselect(ne,ut,ee,te,ot),ct.push(ee,ut,ut,te)}}class RBush{constructor(ee){this.rbush_=new RBush$1(ee),this.items_={}}insert(ee,te){const st={minX:ee[0],minY:ee[1],maxX:ee[2],maxY:ee[3],value:te};this.rbush_.insert(st),this.items_[getUid(te)]=st}load(ee,te){const st=new Array(te.length);for(let ot=0,ct=te.length;ot<ct;ot++){const ut=ee[ot],dt=te[ot],ht={minX:ut[0],minY:ut[1],maxX:ut[2],maxY:ut[3],value:dt};st[ot]=ht,this.items_[getUid(dt)]=ht}this.rbush_.load(st)}remove(ee){const te=getUid(ee),st=this.items_[te];return delete this.items_[te],this.rbush_.remove(st)!==null}update(ee,te){const st=this.items_[getUid(te)],ot=[st.minX,st.minY,st.maxX,st.maxY];equals$2(ot,ee)||(this.remove(te),this.insert(ee,te))}getAll(){return this.rbush_.all().map(function(te){return te.value})}getInExtent(ee){const te={minX:ee[0],minY:ee[1],maxX:ee[2],maxY:ee[3]};return this.rbush_.search(te).map(function(ot){return ot.value})}forEach(ee){return this.forEach_(this.getAll(),ee)}forEachInExtent(ee,te){return this.forEach_(this.getInExtent(ee),te)}forEach_(ee,te){let st;for(let ot=0,ct=ee.length;ot<ct;
70ot++)if(st=te(ee[ot]),st)return st;return st}isEmpty(){return isEmpty(this.items_)}clear(){this.rbush_.clear(),this.items_={}}getExtent(ee){const te=this.rbush_.toJSON();return createOrUpdate$2(te.minX,te.minY,te.maxX,te.maxY,ee)}concat(ee){this.rbush_.load(ee.rbush_.all());for(const te in ee.items_)this.items_[te]=ee.items_[te]}}const VectorEventType={ADDFEATURE:"addfeature",CHANGEFEATURE:"changefeature",CLEAR:"clear",REMOVEFEATURE:"removefeature",FEATURESLOADSTART:"featuresloadstart",FEATURESLOADEND:"featuresloadend",FEATURESLOADERROR:"featuresloaderror"};class VectorSourceEvent extends BaseEvent{constructor(ee,te,st){super(ee),this.feature=te,this.features=st}}class VectorSource extends Source{constructor(ee){ee=ee||{},super({attributions:ee.attributions,interpolate:!0,projection:void 0,state:"ready",wrapX:ee.wrapX!==void 0?ee.wrapX:!0}),this.on,this.once,this.un,this.loader_=VOID,this.format_=ee.format||null,this.overlaps_=ee.overlaps===void 0?!0:ee.overlaps,this.url_=ee.url,ee.loader!==void 0?this.loader_=ee.loader:this.url_!==void 0&&(assert(this.format_,"`format` must be set when `url` is set"),this.loader_=xhr(this.url_,this.format_)),this.strategy_=ee.strategy!==void 0?ee.strategy:all$1;const te=ee.useSpatialIndex!==void 0?ee.useSpatialIndex:!0;this.featuresRtree_=te?new RBush:null,this.loadedExtentsRtree_=new RBush,this.nullGeometryFeatures_={},this.idIndex_={},this.uidIndex_={},this.featureChangeKeys_={},this.featuresCollection_=null;let st,ot;Array.isArray(ee.features)?ot=ee.features:ee.features&&(st=ee.features,ot=st.getArray()),!te&&st===void 0&&(st=new Collection(ot)),ot!==void 0&&this.addFeaturesInternal(ot),st!==void 0&&this.bindFeaturesCollection_(st)}addFeature(ee){this.addFeatureInternal(ee),this.changed()}addFeatureInternal(ee){const te=getUid(ee);if(!this.addToIndex_(te,ee)){this.featuresCollection_&&this.featuresCollection_.remove(ee);return}this.setupChangeEvents_(te,ee);const st=ee.getGeometry();if(st){const ot=st.getExtent();this.featuresRtree_&&this.featuresRtree_.insert(ot,ee)}else this.nullGeometryFeatures_[te]=ee;this.dispatchEvent(new VectorSourceEvent(VectorEventType.ADDFEATURE,ee))}setupChangeEvents_(ee,te){te instanceof RenderFeature||(this.featureChangeKeys_[ee]=[listen(te,EventType.CHANGE,this.handleFeatureChange_,this),listen(te,ObjectEventType.PROPERTYCHANGE,this.handleFeatureChange_,this)])}addToIndex_(ee,te){let st=!0;if(te.getId()!==void 0){const ot=String(te.getId());if(!(ot in this.idIndex_))this.idIndex_[ot]=te;else if(te instanceof RenderFeature){const ct=this.idIndex_[ot];ct instanceof RenderFeature?Array.isArray(ct)?ct.push(te):this.idIndex_[ot]=[ct,te]:st=!1}else st=!1}return st&&(assert(!(ee in this.uidIndex_),"The passed `feature` was already added to the source"),this.uidIndex_[ee]=te),st}addFeatures(ee){this.addFeaturesInternal(ee),this.changed()}addFeaturesInternal(ee){const te=[],st=[],ot=[];for(let ct=0,ut=ee.length;ct<ut;ct++){const dt=ee[ct],ht=getUid(dt);this.addToIndex_(ht,dt)&&st.push(dt)}for(let ct=0,ut=st.length;ct<ut;ct++){const dt=st[ct],ht=getUid(dt);this.setupChangeEvents_(ht,dt);const ft=dt.getGeometry();if(ft){const pt=ft.getExtent();te.push(pt),ot.push(dt)}else this.nullGeometryFeatures_[ht]=dt}if(this.featuresRtree_&&this.featuresRtree_.load(te,ot),this.hasListener(VectorEventType.ADDFEATURE))for(let ct=0,ut=st.length;ct<ut;ct++)this.dispatchEvent(new VectorSourceEvent(VectorEventType.ADDFEATURE,st[ct]))}bindFeaturesCollection_(ee){let te=!1;this.addEventListener(VectorEventType.ADDFEATURE,function(st){te||(te=!0,ee.push(st.feature),te=!1)}),this.addEventListener(VectorEventType.REMOVEFEATURE,function(st){te||(te=!0,ee.remove(st.feature),te=!1)}),ee.addEventListener(CollectionEventType.ADD,st=>{te||(te=!0,this.addFeature(st.element),te=!1)}),ee.addEventListener(CollectionEventType.REMOVE,st=>{te||(te=!0,this.removeFeature(st.element),te=!1)}),this.featuresCollection_=ee}clear(ee){if(ee){for(const st in this.featureChangeKeys_)this.featureChangeKeys_[st].forEach(unlistenByKey);this.featuresCollection_||(this.featureChangeKeys_={},this.idIndex_={}
70,this.uidIndex_={})}else if(this.featuresRtree_){this.featuresRtree_.forEach(st=>{this.removeFeatureInternal(st)});for(const st in this.nullGeometryFeatures_)this.removeFeatureInternal(this.nullGeometryFeatures_[st])}this.featuresCollection_&&this.featuresCollection_.clear(),this.featuresRtree_&&this.featuresRtree_.clear(),this.nullGeometryFeatures_={};const te=new VectorSourceEvent(VectorEventType.CLEAR);this.dispatchEvent(te),this.changed()}forEachFeature(ee){if(this.featuresRtree_)return this.featuresRtree_.forEach(ee);this.featuresCollection_&&this.featuresCollection_.forEach(ee)}forEachFeatureAtCoordinateDirect(ee,te){const st=[ee[0],ee[1],ee[0],ee[1]];return this.forEachFeatureInExtent(st,function(ot){const ct=ot.getGeometry();if(ct instanceof RenderFeature||ct.intersectsCoordinate(ee))return te(ot)})}forEachFeatureInExtent(ee,te){if(this.featuresRtree_)return this.featuresRtree_.forEachInExtent(ee,te);this.featuresCollection_&&this.featuresCollection_.forEach(te)}forEachFeatureIntersectingExtent(ee,te){return this.forEachFeatureInExtent(ee,function(st){const ot=st.getGeometry();if(ot instanceof RenderFeature||ot.intersectsExtent(ee)){const ct=te(st);if(ct)return ct}})}getFeaturesCollection(){return this.featuresCollection_}getFeatures(){let ee;return this.featuresCollection_?ee=this.featuresCollection_.getArray().slice(0):this.featuresRtree_&&(ee=this.featuresRtree_.getAll(),isEmpty(this.nullGeometryFeatures_)||extend$3(ee,Object.values(this.nullGeometryFeatures_))),ee}getFeaturesAtCoordinate(ee){const te=[];return this.forEachFeatureAtCoordinateDirect(ee,function(st){te.push(st)}),te}getFeaturesInExtent(ee,te){if(this.featuresRtree_){if(!(te&&te.canWrapX()&&this.getWrapX()))return this.featuresRtree_.getInExtent(ee);const ot=wrapAndSliceX(ee,te);return[].concat(...ot.map(ct=>this.featuresRtree_.getInExtent(ct)))}return this.featuresCollection_?this.featuresCollection_.getArray().slice(0):[]}getClosestFeatureToCoordinate(ee,te){const st=ee[0],ot=ee[1];let ct=null;const ut=[NaN,NaN];let dt=1/0;const ht=[-1/0,-1/0,1/0,1/0];return te=te||TRUE,this.featuresRtree_.forEachInExtent(ht,function(ft){if(te(ft)){const pt=ft.getGeometry(),mt=dt;if(dt=pt instanceof RenderFeature?0:pt.closestPointXY(st,ot,ut,dt),dt<mt){ct=ft;const yt=Math.sqrt(dt);ht[0]=st-yt,ht[1]=ot-yt,ht[2]=st+yt,ht[3]=ot+yt}}}),ct}getExtent(ee){var te;return((te=this.featuresRtree_)==null?void 0:te.getExtent(ee))??null}getFeatureById(ee){const te=this.idIndex_[ee.toString()];return te!==void 0?te:null}getFeatureByUid(ee){const te=this.uidIndex_[ee];return te!==void 0?te:null}getFormat(){return this.format_}getOverlaps(){return this.overlaps_}getUrl(){return this.url_}handleFeatureChange_(ee){const te=ee.target,st=getUid(te),ot=te.getGeometry();if(!ot)st in this.nullGeometryFeatures_||(this.featuresRtree_&&this.featuresRtree_.remove(te),this.nullGeometryFeatures_[st]=te);else{const ut=ot.getExtent();st in this.nullGeometryFeatures_?(delete this.nullGeometryFeatures_[st],this.featuresRtree_&&this.featuresRtree_.insert(ut,te)):this.featuresRtree_&&this.featuresRtree_.update(ut,te)}const ct=te.getId();if(ct!==void 0){const ut=ct.toString();this.idIndex_[ut]!==te&&(this.removeFromIdIndex_(te),this.idIndex_[ut]=te)}else this.removeFromIdIndex_(te),this.uidIndex_[st]=te;this.changed(),this.dispatchEvent(new VectorSourceEvent(VectorEventType.CHANGEFEATURE,te))}hasFeature(ee){const te=ee.getId();if(te!==void 0){const st=this.idIndex_[String(te)];return Array.isArray(st)?st.includes(ee):st===ee}return getUid(ee)in this.uidIndex_}isEmpty(){return this.featuresRtree_?this.featuresRtree_.isEmpty()&&isEmpty(this.nullGeometryFeatures_):this.featuresCollection_?this.featuresCollection_.getLength()===0:!0}loadFeatures(ee,te,st){const ot=this.loadedExtentsRtree_,ct=this.strategy_(ee,te,st);for(let ut=0,dt=ct.length;ut<dt;++ut){const ht=ct[ut];if(!ot.forEachInExtent(ht,function(pt){return containsExtent(pt.extent,ht)})){this.loading=Number(this.loading)+1,this.dispatchEvent(new VectorSourceEvent(VectorEventType.FEATURESLOADSTART));const pt=_t=>{this.loading=Number(this.loading)-1,this.dispatchEvent(new VectorSourceEvent(VectorEventType.FEATURESLOADEND,void 0,_t))},mt=()=>{this.changed(),this.loading=Number(this.loading)-1,this.dispatchEvent(new VectorSourceEvent(VectorEventType.FEATURESLOADERROR))};let yt=!1;const vt=this.loader_.call(this,ht,te,st,_t=>yt||pt(_t),()=>yt||mt());vt instanceof Promise?(yt=!0,vt.then(_t=>{this.addFeatures(_t),pt(_t)}).catch(mt)):this.loader_.length<4&&(this.loading=!1),ot.insert(ht,{extent:ht.slice()})}}}refresh(){this.clear(!0),this.loadedExtentsRtree_.clear(),super.refresh()}removeLoadedExtent(ee){const te=this.loadedExtentsRtree_,st=[];te.forEachInExtent(ee,function(ot){st.push(ot)}),st.forEach(ot=>{te.remove(ot);const ct=getDifference(ot.extent,ee);for(const ut of ct)te.insert(ut,{extent:ut})})}removeFeatures(ee){let te=!1;for(let st=0,ot=ee.length;
70st<ot;++st)te=this.removeFeatureInternal(ee[st])||te;te&&this.changed()}removeFeature(ee){if(!ee)return;this.removeFeatureInternal(ee)&&this.changed()}removeFeatureInternal(ee){const te=getUid(ee);if(!(te in this.uidIndex_))return!1;te in this.nullGeometryFeatures_?delete this.nullGeometryFeatures_[te]:this.featuresRtree_&&this.featuresRtree_.remove(ee);const st=this.featureChangeKeys_[te];st==null||st.forEach(unlistenByKey),delete this.featureChangeKeys_[te];const ot=ee.getId();if(ot!==void 0){const ct=ot.toString(),ut=this.idIndex_[ct];ut===ee?delete this.idIndex_[ct]:Array.isArray(ut)&&(ut.splice(ut.indexOf(ee),1),ut.length===1&&(this.idIndex_[ct]=ut[0]))}return delete this.uidIndex_[te],this.hasListener(VectorEventType.REMOVEFEATURE)&&this.dispatchEvent(new VectorSourceEvent(VectorEventType.REMOVEFEATURE,ee)),!0}removeFromIdIndex_(ee){for(const te in this.idIndex_)if(this.idIndex_[te]===ee){delete this.idIndex_[te];break}}setLoader(ee){this.loader_=ee}setUrl(ee){assert(this.format_,"`format` must be set when `url` is set"),this.url_=ee,this.setLoader(xhr(ee,this.format_))}setOverlaps(ee){this.overlaps_=ee,this.changed()}}let brokenDiagonalRendering_;const canvasPool$1=[];function drawTestTriangle(ne,ee,te,st,ot){ne.beginPath(),ne.moveTo(0,0),ne.lineTo(ee,te),ne.lineTo(st,ot),ne.closePath(),ne.save(),ne.clip(),ne.fillRect(0,0,Math.max(ee,st)+1,Math.max(te,ot)),ne.restore()}function verifyBrokenDiagonalRendering(ne,ee){return Math.abs(ne[ee*4]-210)>2||Math.abs(ne[ee*4+3]-.75*255)>2}function isBrokenDiagonalRendering(){if(brokenDiagonalRendering_===void 0){const ne=createCanvasContext2D(6,6,canvasPool$1);ne.globalCompositeOperation="lighter",ne.fillStyle="rgba(210, 0, 0, 0.75)",drawTestTriangle(ne,4,5,4,0),drawTestTriangle(ne,4,5,0,5);const ee=ne.getImageData(0,0,3,3).data;brokenDiagonalRendering_=verifyBrokenDiagonalRendering(ee,0)||verifyBrokenDiagonalRendering(ee,4)||verifyBrokenDiagonalRendering(ee,8),releaseCanvas(ne),canvasPool$1.push(ne.canvas)}return brokenDiagonalRendering_}function calculateSourceResolution(ne,ee,te,st){const ot=transform$1(te,ee,ne);let ct=getPointResolution(ee,st,te);const ut=ee.getMetersPerUnit();ut!==void 0&&(ct*=ut);const dt=ne.getMetersPerUnit();dt!==void 0&&(ct/=dt);const ht=ne.getExtent();if(!ht||containsCoordinate(ht,ot)){const ft=getPointResolution(ne,ct,ot)/ct;isFinite(ft)&&ft>0&&(ct/=ft)}return ct}function calculateSourceExtentResolution(ne,ee,te,st){const ot=getCenter(te);let ct=calculateSourceResolution(ne,ee,ot,st);return(!isFinite(ct)||ct<=0)&&forEachCorner(te,function(ut){return ct=calculateSourceResolution(ne,ee,ut,st),isFinite(ct)&&ct>0}),ct}function render(ne,ee,te,st,ot,ct,ut,dt,ht,ft,pt,mt,yt,vt){const _t=createCanvasContext2D(Math.round(te*ne),Math.round(te*ee),canvasPool$1);if(mt||(_t.imageSmoothingEnabled=!1),ht.length===0)return _t.canvas;_t.scale(te,te);function bt(Gt){return Math.round(Gt*te)/te}_t.globalCompositeOperation="lighter";const xt=createEmpty();ht.forEach(function(Gt,Bt,Ut){extend$4(xt,Gt.extent)});let Mt;const Ot=te/st,kt=(mt?1:1+Math.pow(2,-24))/Ot;(!yt||ht.length!==1||ft!==0)&&(Mt=createCanvasContext2D(Math.round(getWidth(xt)*Ot),Math.round(getHeight(xt)*Ot),canvasPool$1),mt||(Mt.imageSmoothingEnabled=!1),ht.forEach(function(Gt,Bt,Ut){if(Gt.image.width>0&&Gt.image.height>0){if(Gt.clipExtent){Mt.save();const Wt=(Gt.clipExtent[0]-xt[0])*Ot,Jt=-(Gt.clipExtent[3]-xt[3])*Ot,Qt=getWidth(Gt.clipExtent)*Ot,oi=getHeight(Gt.clipExtent)*Ot;Mt.rect(mt?Wt:Math.round(Wt),mt?Jt:Math.round(Jt),mt?Qt:Math.round(Wt+Qt)-Math.round(Wt),mt?oi:Math.round(Jt+oi)-Math.round(Jt)),Mt.clip()}const Vt=(Gt.extent[0]-xt[0])*Ot,Ht=-(Gt.extent[3]-xt[3])*Ot,zt=getWidth(Gt.extent)*Ot,jt=getHeight(Gt.extent)*Ot;Mt.drawImage(Gt.image,ft,ft,Gt.image.width-2*ft,Gt.image.height-2*ft,mt?Vt:Math.round(Vt),mt?Ht:Math.round(Ht),mt?zt:Math.round(Vt+zt)-Math.round(Vt),mt?jt:Math.round(Ht+jt)-Math.round(Ht)),Gt.clipExtent&&Mt.restore()}}));const Nt=getTopLeft(ut);
70return dt.getTriangles().forEach(function(Gt,Bt,Ut){const Vt=Gt.source,Ht=Gt.target;let zt=Vt[0][0],jt=Vt[0][1],Wt=Vt[1][0],Jt=Vt[1][1],Qt=Vt[2][0],oi=Vt[2][1];const ai=bt((Ht[0][0]-Nt[0])/ct),xn=bt(-(Ht[0][1]-Nt[1])/ct),An=bt((Ht[1][0]-Nt[0])/ct),Nn=bt(-(Ht[1][1]-Nt[1])/ct),Xt=bt((Ht[2][0]-Nt[0])/ct),Zt=bt(-(Ht[2][1]-Nt[1])/ct),Kt=zt,ti=jt;zt=0,jt=0,Wt-=Kt,Jt-=ti,Qt-=Kt,oi-=ti;const qt=[[Wt,Jt,0,0,An-ai],[Qt,oi,0,0,Xt-ai],[0,0,Wt,Jt,Nn-xn],[0,0,Qt,oi,Zt-xn]],ii=solveLinearSystem(qt);if(!ii)return;if(_t.save(),_t.beginPath(),isBrokenDiagonalRendering()||!mt){_t.moveTo(An,Nn);const ni=4,Cn=ai-An,Ln=xn-Nn;for(let Un=0;Un<ni;Un++)_t.lineTo(An+bt((Un+1)*Cn/ni),Nn+bt(Un*Ln/(ni-1))),Un!=ni-1&&_t.lineTo(An+bt((Un+1)*Cn/ni),Nn+bt((Un+1)*Ln/(ni-1)));_t.lineTo(Xt,Zt)}else _t.moveTo(An,Nn),_t.lineTo(ai,xn),_t.lineTo(Xt,Zt);_t.clip(),_t.transform(ii[0],ii[2],ii[1],ii[3],ai,xn),_t.translate(xt[0]-Kt,xt[3]-ti);let wn;if(Mt)wn=Mt.canvas,_t.scale(kt,-kt);else{const ni=ht[0],Cn=ni.extent;wn=ni.image,_t.scale(getWidth(Cn)/wn.width,-getHeight(Cn)/wn.height)}_t.drawImage(wn,0,0),_t.restore()}),Mt&&(releaseCanvas(Mt),canvasPool$1.push(Mt.canvas)),pt&&(_t.save(),_t.globalCompositeOperation="source-over",_t.strokeStyle="black",_t.lineWidth=1,dt.getTriangles().forEac
70h(function(Gt,Bt,Ut){const Vt=Gt.target,Ht=(Vt[0][0]-Nt[0])/ct,zt=-(Vt[0][1]-Nt[1])/ct,jt=(Vt[1][0]-Nt[0])/ct,Wt=-(Vt[1][1]-Nt[1])/ct,Jt=(Vt[2][0]-Nt[0])/ct,Qt=-(Vt[2][1]-Nt[1])/ct;_t.beginPath(),_t.moveTo(jt,Wt),_t.lineTo(Ht,zt),_t.lineTo(Jt,Qt),_t.closePath(),_t.stroke()}),_t.restore()),_t.canvas}const ImageState={IDLE:0,LOADING:1,LOADED:2,ERROR:3,EMPTY:4};class ImageWrapper extends Target{constructor(ee,te,st,ot){super(),this.extent=ee,this.pixelRatio_=st,this.resolution=te,this.state=typeof ot=="function"?ImageState.IDLE:ot,this.image_=null,this.loader=typeof ot=="function"?ot:null}changed(){this.dispatchEvent(EventType.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==ImageState.IDLE&&this.loader){this.state=ImageState.LOADING,this.changed();const ee=this.getResolution(),te=Array.isArray(ee)?ee[0]:ee;toPromise(()=>this.loader(this.getExtent(),te,this.getPixelRatio())).then(st=>{"image"in st&&(this.image_=st.image),"extent"in st&&(this.extent=st.extent),"resolution"in st&&(this.resolution=st.resolution),"pixelRatio"in st&&(this.pixelRatio_=st.pixelRatio),(st instanceof HTMLImageElement||CREATE_IMAGE_BITMAP&&st instanceof ImageBitmap||st instanceof HTMLCanvasElement||st instanceof HTMLVideoElement)&&(this.image_=st),this.state=ImageState.LOADED}).catch(st=>{this.state=ImageState.ERROR,console.error(st)}).finally(()=>this.changed())}}setImage(ee){this.image_=ee}setResolution(ee){this.resolution=ee}}function listenImage(ne,ee,te){const st=ne;let ot=!0,ct=!1,ut=!1;const dt=[listenOnce(st,EventType.LOAD,function(){ut=!0,ct||ee()})];return st.src&&IMAGE_DECODE?(ct=!0,st.decode().then(function(){ot&&ee()}).catch(function(ht){ot&&(ut?ee():te())})):dt.push(listenOnce(st,EventType.ERROR,te)),function(){ot=!1,dt.forEach(unlistenByKey)}}function load(ne,ee){return new Promise((te,st)=>{function ot(){ut(),te(ne)}function ct(){ut(),st(new Error("Image load error"))}function ut(){ne.removeEventListener("load",ot),ne.removeEventListener("error",ct)}ne.addEventListener("load",ot),ne.addEventListener("error",ct)})}function decodeFallback(ne,ee){return ee&&(ne.src=ee),ne.src&&IMAGE_DECODE?new Promise((te,st)=>ne.decode().then(()=>te(ne)).catch(ot=>ne.complete&&ne.width?te(ne):st(ot))):load(ne)}function decode$2(ne,ee){return ee&&(ne.src=ee),ne.src&&IMAGE_DECODE&&CREATE_IMAGE_BITMAP?ne.decode().then(()=>createImageBitmap(ne)).catch(te=>{if(ne.complete&&ne.width)return ne;throw te}):decodeFallback(ne)}class ImageTile extends Tile{constructor(ee,te,st,ot,ct,ut){super(ee,te,ut),this.crossOrigin_=ot==null?void 0:ot.crossOrigin,this.referrerPolicy_=ot==null?void 0:ot.referrerPolicy,this.src_=st,this.key=st,this.image_,WORKER_OFFSCREEN_CANVAS?this.image_=new OffscreenCanvas(1,1):(this.image_=new Image,this.crossOrigin_!==null&&(this.image_.crossOrigin=this.crossOrigin_),this.referrerPolicy_!==void 0&&(this.image_.referrerPolicy=this.referrerPolicy_)),this.unlisten_=null,this.tileLoadFunction_=ct}getImage(){return this.image_}setImage(ee){this.image_=ee,this.state=TileState.LOADED,this.unlistenImage_(),this.changed()}getCrossOrigin(){return this.crossOrigin_}getReferrerPolicy(){return this.referrerPolicy_}handleImageError_(){this.state=TileState.ERROR,this.unlistenImage_(),this.image_=getBlankImage(),this.changed()}handleImageLoad_(){if(WORKER_OFFSCREEN_CANVAS)this.state=TileState.LOADED;else{const ee=this.image_;ee.naturalWidth&&ee.naturalHeight?this.state=TileState.LOADED:this.state=TileState.EMPTY}this.unlistenImage_(),this.changed()}load(){this.state==TileState.ERROR&&(this.state=TileState.IDLE,this.image_=new Image,this.crossOrigin_!==null&&(this.image_.crossOrigin=this.crossOrigin_),this.referrerPolicy_!==void 0&&(this.image_.referrerPolicy=this.referrerPolicy_)),this.state==TileState.IDLE&&(this.state=TileState.LOADING,this.changed(),this.tileLoadFunction_(this,this.src_),this.unlisten_=listenImage(this.image_,this.handleImageLoad_.bind(this),this.handleImageError_.bind(this)))}unlistenImage_(){this.unlisten_&&(this.unlisten_(),this.unlisten_=null)}disposeInternal(){this.unlistenImage_(),this.image_=null,super.disposeInternal()}}function getBlankImage(){const ne=createCanvasContext2D(1,1);return ne.fillStyle="rgba(0,0,0,0)",ne.fillRect(0,0,1,1),ne.canvas}const MAX_SUBDIVISION=10,MAX_TRIANGLE_WIDTH=.25;class Triangulation{constructor(ee,te,st,ot,ct,ut,dt){this.sourceProj_=ee,this.targetProj_=te;let ht={};
vendor: 1,383 bytes, line 70
70const ft=dt?createTransformFromCoordinateTransform(kt=>apply$1(dt,transform$1(kt,this.targetProj_,this.sourceProj_))):getTransform(this.targetProj_,this.sourceProj_);this.transformInv_=function(kt){const Nt=kt[0]+"/"+kt[1];return ht[Nt]||(ht[Nt]=ft(kt)),ht[Nt]},this.maxSourceExtent_=ot,this.errorThresholdSquared_=ct*ct,this.triangles_=[],this.wrapsXInSource_=!1,this.canWrapXInSource_=this.sourceProj_.canWrapX()&&!!ot&&!!this.sourceProj_.getExtent()&&getWidth(ot)>=getWidth(this.sourceProj_.getExtent()),this.sourceWorldWidth_=this.sourceProj_.getExtent()?getWidth(this.sourceProj_.getExtent()):null,this.targetWorldWidth_=this.targetProj_.getExtent()?getWidth(this.targetProj_.getExtent()):null;const pt=getTopLeft(st),mt=getTopRight(st),yt=getBottomRight(st),vt=getBottomLeft(st),_t=this.transformInv_(pt),bt=this.transformInv_(mt),xt=this.transformInv_(yt),Mt=this.transformInv_(vt),Ot=MAX_SUBDIVISION+(ut?Math.max(0,Math.ceil(Math.log2(getArea$1(st)/(ut*ut*256*256)))):0);if(this.addQuad_(pt,mt,yt,vt,_t,bt,xt,Mt,Ot),this.wrapsXInSource_){let kt=1/0;this.triangles_.forEach(function(Nt,Gt,Bt){kt=Math.min(kt,Nt.source[0][0],Nt.source[1][0],Nt.source[2][0])}),this.triangles_.forEach(Nt=>{if(Math.max(Nt.source[0][0],Nt.source[1][0],Nt.source[2][0])-kt>this.sourceWorldWidth_/2){const Gt=[[Nt.source[0][0],Nt.source[0][1]],[Nt.source[1][0],Nt.source[1][1]],[Nt.source[2][0],Nt.
70source[2][1]]];Gt[0][0]-kt>this.sourceWorldWidth_/2&&(Gt[0][0]-=this.sourceWorldWidth_),Gt[1][0]-kt>this.sourceWorldWidth_/2&&(Gt[1][0]-=this.sourceWorldWidth_),Gt[2][0]-kt>this.sourceWorldWidth_/2&&(Gt[2][0]-=this.sourceWorldWidth_);const Bt=Math.min(Gt[0][0],Gt[1][0],Gt[2][0]);Math.max(Gt[0][0],Gt[1][0],Gt[2][0])-Bt<this.sourceWorldWidth_/2&&(Nt.source=Gt)}})}ht={}}addTriangle_(ee,te,st,ot,ct,ut){this.triangles_.push({source:[ot,ct,ut],target:[ee,te,st]})}addQuad_(ee,te,st,ot,ct,ut,dt,ht,ft){const pt=boundingExtent([ct,ut,dt,ht]),mt=this.sourceWorldWidth_?getWidth(pt)/this.sourceWorldWidth_:null,yt=this.sourceWorldWidth_,vt=this.sourceProj_.canWrapX()&&mt>.5&&mt<1;let _t=!1;if(ft>0){if(this.targetProj_.isGlobal()&&this.targetWorldWidth_){const xt=boundingExtent([ee,te,st,ot]);_t=getWidth(xt)/this.targetWorldWidth_>MAX_TRIANGLE_WIDTH||_t}!vt&&this.sourceProj_.isGlobal()&&mt&&(_t=mt>MAX_TRIANGLE_WIDTH||_t)}if(!_t&&this.maxSourceExtent_&&isFinite(pt[0])&&isFinite(pt[1])&&isFinite(pt[2])&&isFinite(pt[3])&&!intersects$1(pt,this.maxSourceExtent_))return;let bt=0;if(!_t&&(!isFinite(ct[0])||!isFinite(ct[1])||!isFinite(ut[0])||!isFinite(ut[1])||!isFinite(dt[0])||!isFinite(dt[1])||!isFinite(ht[0])||!isFinite(ht[1]))){if(ft>0)_t=!0;else if(bt=(!isFinite(ct[0])||!isFinite(ct[1])?8:0)+(!isFinite(ut[0])||!isFinite(ut[1])?4:0)+(!isFinite(dt[0])||!isFinite(dt[1])?2:0)+(!isFinite(ht[0])||!isFinite(ht[1])?1:0),bt!=1&&bt!=2&&bt!=4&&bt!=8)return}if(ft>0){if(!_t){const xt=[(ee[0]+st[0])/2,(ee[1]+st[1])/2],Mt=this.transformInv_(xt);let Ot;vt?Ot=(modulo(ct[0],yt)+modulo(dt[0],yt))/2-modulo(Mt[0],yt):Ot=(ct[0]+dt[0])/2-Mt[0];const kt=(ct[1]+dt[1])/2-Mt[1];_t=Ot*Ot+kt*kt>this.errorThresholdSquared_}if(_t){if(Math.abs(ee[0]-st[0])<=Math.abs(ee[1]-st[1])){const xt=[(te[0]+st[0])/2,(te[1]+st[1])/2],Mt=this.transformInv_(xt),Ot=[(ot[0]+ee[0])/2,(ot[1]+ee[1])/2],kt=this.transformInv_(Ot);this.addQuad_(ee,te,xt,Ot,ct,ut,Mt,kt,ft-1),this.addQuad_(Ot,xt,st,ot,kt,Mt,dt,ht,ft-1)}else{const xt=[(ee[0]+te[0])/2,(ee[1]+te[1])/2],Mt=this.transformInv_(xt),Ot=[(st[0]+ot[0])/2,(st[1]+ot[1])/2],kt=this.transformInv_(Ot);this.addQuad_(ee,xt,Ot,ot,ct,Mt,kt,ht,ft-1),this.addQuad_(xt,te,st,Ot,Mt,ut,dt,kt,ft-1)}return}}if(vt){if(!this.canWrapXInSource_)return;this.wrapsXInSource_=!0}(bt&11)==0&&this.addTriangle_(ee,st,ot,ct,dt,ht),(bt&14)==0&&this.addTriangle_(ee,st,te,ct,dt,ut),bt&&((bt&13)==0&&this.addTriangle_(te,ot,ee,ut,ht,ct),(bt&7)==0&&this.addTriangle_(te,ot,st,ut,ht,dt))}calculateSourceExtent(){const ee=createEmpty();return this.triangles_.forEach(function(te,st,ot){const ct=te.source;extendCoordinate(ee,ct[0]),extendCoordinate(ee,ct[1]),extendCoordinate(ee,ct[2])}),ee}getTriangles(){return this.triangles_}}const ERROR_THRESHOLD=.5;class ReprojTile extends Tile{constructor(ee,te,st,ot,ct,ut,dt,ht,ft,pt,mt,yt){super(ct,TileState.IDLE,yt),this.renderEdges_=mt!==void 0?mt:!1,this.pixelRatio_=dt,this.gutter_=ht,this.canvas_=null,this.sourceTileGrid_=te,this.targetTileGrid_=ot,this.wrappedTileCoord_=ut||ct,this.sourceTiles_=[],this.sourcesListenerKeys_=null,this.sourceZ_=0,this.clipExtent_=ee.canWrapX()?ee.getExtent():void 0;const vt=ot.getTileCoordExtent(this.wrappedTileCoord_),_t=this.targetTileGrid_.getExtent();let bt=this.sourceTileGrid_.getExtent();const xt=_t?getIntersection(vt,_t):vt;if(getArea$1(xt)===0){this.state=TileState.EMPTY;return}const Mt=ee.getExtent();Mt&&(bt?bt=getIntersection(bt,Mt):bt=Mt);const Ot=ot.getResolution(this.wrappedTileCoord_[0]),kt=calculateSourceExtentResolution(ee,st,xt,Ot);if(!isFinite(kt)||kt<=0){this.state=TileState.EMPTY;return}const Nt=pt!==void 0?pt:ERROR_THRESHOLD;if(this.triangulation_=new Triangulation(ee,st,xt,bt,kt*Nt,Ot),this.triangulation_.getTriangles().length===0){this.state=TileState.EMPTY;return}this.sourceZ_=te.getZForResolution(kt);let Gt=this.triangulation_.calculateSourceExtent();if(bt&&(ee.canWrapX()?(Gt[1]=clamp$1(Gt[1],bt[1],bt[3]),Gt[3]=clamp$1(Gt[3],bt[1],bt[3])):Gt=getIntersection(Gt,bt)),!getArea$1(Gt))this.state=TileState.EMPTY;else{let Bt=0,Ut=0;ee.canWrapX()&&(Bt=getWidth(Mt),Ut=Math.floor((Gt[0]-Mt[0])/Bt)),wrapAndSliceX(Gt.slice(),ee,!0).forEac
70h(Ht=>{const zt=te.getTileRangeForExtentAndZ(Ht,this.sourceZ_);for(let jt=zt.minX;jt<=zt.maxX;jt++)for(let Wt=zt.minY;Wt<=zt.maxY;Wt++){const Jt=Ut*Bt;this.sourceTiles_.push({getTile:()=>ft(this.sourceZ_,jt,Wt,dt),offset:Jt})}++Ut}),this.sourceTiles_.length===0&&(this.state=TileState.EMPTY)}}getImage(){return this.canvas_}reproject_(){const ee=[];if(this.sourceTiles_.forEach(te=>{var ot;const st=te.tile;if(st&&st.getState()==TileState.LOADED){const ct=this.sourceTileGrid_.getTileCoordExtent(st.tileCoord);ct[0]+=te.offset,ct[2]+=te.offset;const ut=(ot=this.clipExtent_)==null?void 0:ot.slice();ut&&(ut[0]+=te.offset,ut[2]+=te.offset),ee.push({extent:ct,clipExtent:ut,image:st.getImage()})}}),this.sourceTiles_.length=0,ee.length===0)this.state=TileState.ERROR;else{const te=this.wrappedTileCoord_[0],st=this.targetTileGrid_.getTileSize(te),ot=typeof st=="number"?st:st[0],ct=typeof st=="number"?st:st[1],ut=this.targetTileGrid_.getResolution(te),dt=this.sourceTileGrid_.getResolution(this.sourceZ_),ht=this.targetTileGrid_.getTileCoordExtent(this.wrappedTileCoord_);this.canvas_=render(ot,ct,this.pixelRatio_,dt,this.sourceTileGrid_.getExtent(),ut,ht,this.triangulation_,ee,this.gutter_,this.renderEdges_,this.interpolate),this.state=TileState.LOADED}this.changed()}load(){for(const ee of this.sourceTiles_)ee.tile=ee.getTile();if(this.state==TileState.IDLE){this.state=TileState.LOADING,this.changed();let ee=0;this.sourcesListenerKeys_=[],this.sourceTiles_.forEach(({tile:te})=>{const st=te.getState();if(st==TileState.IDLE||st==TileState.LOADING){ee++;const ot=listen(te,EventType.CHANGE,ct=>{const ut=te.getState();(ut==TileState.LOADED||ut==TileState.ERROR||ut==TileState.EMPTY)&&(unlistenByKey(ot),ee--,ee===0&&(this.unlistenSources_(),this.reproject_()))});this.sourcesListenerKeys_.push(ot)}}),ee===0?setTimeout(this.reproject_.bind(this),0):this.sourceTiles_.forEach(function({tile:te},st,ot){te.getState()==TileState.IDLE&&te.load()})}}unlistenSources_(){this.sourcesListenerKeys_.forEach(unlistenByKey),this.sourcesListenerKeys_=null}release(){this.canvas_&&(releaseCanvas(this.canvas_.getContext("2d")),canvasPool$1.push(this.canvas_),this.canvas_=null),this.sourceTiles_.length=0,super.release()}}class TileImage extends UrlTile{constructor(ee){super({attributions:ee.attributions,cacheSize:ee.cacheSize,projection:ee.projection,state:ee.state,tileGrid:ee.tileGrid,tileLoadFunction:ee.tileLoadFunction?ee.tileLoadFunction:defaultTileLoadFunction,tilePixelRatio:ee.tilePixelRatio,tileUrlFunction:ee.tileUrlFunction,url:ee.url,urls:ee.urls,wrapX:ee.wrapX,transition:ee.transition,interpolate:ee.interpolate!==void 0?ee.interpolate:!0,key:ee.key,attributionsCollapsible:ee.attributionsCollapsible,zDirection:ee.zDirection}),this.crossOrigin=ee.crossOrigin!==void 0?ee.crossOrigin:null,this.referrerPolicy=ee.referrerPolicy,this.tileClass=ee.tileClass!==void 0?ee.tileClass:ImageTile,this.tileGridForProjection={},this.reprojectionErrorThreshold_=ee.reprojectionErrorThreshold,this.renderReprojectionEdges_=!1}getGutterForProjection(ee){return this.getProjection()&&ee&&!equivalent$1(this.getProjection(),ee)?0:this.getGutter()}getGutter(){return 0}getKey(){let ee=super.getKey();return this.getInterpolate()||(ee+=":disable-interpolation"),ee}getTileGridForProjection(ee){const te=this.getProjection();if(this.tileGrid&&(!te||equivalent$1(te,ee)))return this.tileGrid;const st=getUid(ee);return st in this.tileGridForProjection||(this.tileGridForProjection[st]=getForProjection(ee)),this.tileGridForProjection[st]}createTile_(ee,te,st,ot,ct,ut){const dt=[ee,te,st],ht=this.getTileCoordForTileUrlFunction(dt,ct),ft=ht?this.tileUrlFunction(ht,ot,ct):void 0,pt=new this.tileClass(dt,ft!==void 0?TileState.IDLE:TileState.EMPTY,ft!==void 0?ft:"",{crossOrigin:this.crossOrigin,referrerPolicy:this.referrerPolicy},this.tileLoadFunction,this.tileOptions);return pt.key=ut,pt.addEventListener(EventType.CHANGE,this.handleTileChange.bind(this)),pt}getTile(ee,te,st,ot,ct,ut){const dt=this.getProjection();if(!dt||!ct||equivalent$1(dt,ct))return this.getTileInternal(ee,te,st,ot,dt||ct);const ht=[ee,te,st],ft=this.getKey(),pt=this.getTileGridForProjection(dt),mt=this.getTileGridForProjection(ct),yt=this.getTileCoordForTileUrlFunction(ht,ct),vt=new ReprojTile(dt,pt,ct,mt,ht,yt,this.getTilePixelRatio(ot),this.getGutter(),(_t,bt,xt,Mt)=>this.getTileInternal(_t,bt,xt,Mt,dt,ut),this.reprojectionErrorThreshold_,this.renderReprojectionEdges_,this.tileOptions);return vt.key=ft,vt}getTileInternal(ee,te,st,ot,ct,ut){const dt=this.getKey(),ht=getCacheKey$1(this,dt,ee,te,st);if(ut&&ut.containsKey(ht))return ut.get(ht);
70const ft=this.createTile_(ee,te,st,ot,ct,dt);return ut==null||ut.set(ht,ft),ft}setRenderReprojectionEdges(ee){this.renderReprojectionEdges_!=ee&&(this.renderReprojectionEdges_=ee,this.changed())}setTileGridForProjection(ee,te){const st=get$3(ee);if(st){const ot=getUid(st);ot in this.tileGridForProjection||(this.tileGridForProjection[ot]=te)}}}function defaultTileLoadFunction(ne,ee){if(WORKER_OFFSCREEN_CANVAS){const te=ne.getCrossOrigin();let st="same-origin",ot="same-origin";te==="anonymous"||te===""?(st="cors",ot="omit"):te==="use-credentials"&&(st="cors",ot="include");const ct={mode:st,credentials:ot,referrerPolicy:ne.getReferrerPolicy()};fetch(ee,ct).then(ut=>{if(!ut.ok)throw new Error(`HTTP ${ut.status}`);return ut.blob()}).then(ut=>createImageBitmap(ut)).then(ut=>{var ft;const dt=ne.getImage();dt.width=ut.width,dt.height=ut.height,dt.getContext("2d").drawImage(ut,0,0),(ft=ut.close)==null||ft.call(ut),dt.dispatchEvent(new Event("load"))}).catch(()=>{ne.getImage().dispatchEvent(new Event("error"))});return}ne.getImage().src=ee}function fromResolutionLike(ne){return Array.isArray(ne)?Math.min(...ne):ne}class ReprojImage extends ImageWrapper{constructor(ee,te,st,ot,ct,ut,dt){let ht=ee.getExtent();ht&&ee.canWrapX()&&(ht=ht.slice(),ht[0]=-1/0,ht[2]=1/0);let ft=te.getExtent();ft&&te.canWrapX()&&(ft=ft.slice(),ft[0]=-1/0,ft[2]=1/0);const pt=ft?getIntersection(st,ft):st,mt=getCenter(pt),yt=calculateSourceResolution(ee,te,mt,ot),vt=ERROR_THRESHOLD,_t=new Triangulation(ee,te,pt,ht,yt*vt,ot),bt=_t.calculateSourceExtent(),xt=isEmpty$1(bt)?null:ut(bt,yt,ct),Mt=xt?ImageState.IDLE:ImageState.EMPTY,Ot=xt?xt.getPixelRatio():1;super(st,ot,Ot,Mt),this.targetProj_=te,this.maxSourceExtent_=ht,this.triangulation_=_t,this.targetResolution_=ot,this.targetExtent_=st,this.sourceImage_=xt,this.sourcePixelRatio_=Ot,this.interpolate_=dt,this.canvas_=null,this.sourceListenerKey_=null}disposeInternal(){this.state==ImageState.LOADING&&this.unlistenSource_(),super.disposeInternal()}getImage(){return this.canvas_}getProjection(){return this.targetProj_}reproject_(){const ee=this.sourceImage_.getState();if(ee==ImageState.LOADED){const te=getWidth(this.targetExtent_)/this.targetResolution_,st=getHeight(this.targetExtent_)/this.targetResolution_;this.canvas_=render(te,st,this.sourcePixelRatio_,fromResolutionLike(this.sourceImage_.getResolution()),this.maxSourceExtent_,this.targetResolution_,this.targetExtent_,this.triangulation_,[{extent:this.sourceImage_.getExtent(),image:this.sourceImage_.getImage()}],0,void 0,this.interpolate_,!0)}this.state=ee,this.changed()}load(){if(this.state==ImageState.IDLE){this.state=ImageState.LOADING,this.changed();const ee=this.sourceImage_.getState();ee==ImageState.LOADED||ee==ImageState.ERROR?this.reproject_():(this.sourceListenerKey_=listen(this.sourceImage_,EventType.CHANGE,te=>{const st=this.sourceImage_.getState();(st==ImageState.LOADED||st==ImageState.ERROR)&&(this.unlistenSource_(),this.reproject_())}),this.sourceImage_.load())}}unlistenSource_(){unlistenByKey(this.sourceListenerKey_),this.sourceListenerKey_=null}}const DECIMALS=4,ImageSourceEventType={IMAGELOADSTART:"imageloadstart",IMAGELOADEND:"imageloadend",IMAGELOADERROR:"imageloaderror"};class ImageSourceEvent extends BaseEvent{constructor(ee,te){super(ee),this.image=te}}class ImageSource extends Source{constructor(ee){super({attributions:ee.attributions,projection:ee.projection,state:ee.state,interpolate:ee.interpolate!==void 0?ee.interpolate:!0}),this.on,this.once,this.un,this.loader=ee.loader||null,this.resolutions_=ee.resolutions!==void 0?ee.resolutions:null,this.reprojectedImage_=null,this.reprojectedRevision_=0,this.image=null,this.wantedExtent_,this.wantedResolution_,this.static_=ee.loader?ee.loader.length===0:!1,this.wantedProjection_=null}getResolutions(){return this.resolutions_}setResolutions(ee){this.resolutions_=ee}findNearestResolution(ee){const te=this.getResolutions();if(te){const st=linearFindNearest(te,ee,0);ee=te[st]}return ee}getImage(ee,te,st,ot){const ct=this.getProjection();if(!ct||!ot||equivalent$1(ct,ot))return ct&&(ot=ct),this.getImageInternal(ee,te,st,ot);if(this.reprojectedImage_){if(this.reprojectedRevision_==this.getRevision()&&equivalent$1(this.reprojectedImage_.getProjection(),ot)&&this.reprojectedImage_.getResolution()==te&&equals$2(this.reprojectedImage_.getExtent(),ee))return this.reprojectedImage_;this.reprojectedImage_.dispose(),this.reprojectedImage_=null}return this.reprojectedImage_=new ReprojImage(ct,ot,ee,te,st,(ut,dt,ht)=>this.getImageInternal(ut,dt,ht,ct),this.getInterpolate()),this.reprojectedRevision_=this.getRevision(),this.reprojectedImage_}getImageInternal(ee,te,st,ot){if(this.loader){const ct=getRequestExtent(ee,te,st,1),ut=this.findNearestResolution(te);if(this.image&&(this.static_||this.wantedProjection_===ot&&(this.wantedExtent_&&containsExtent(this.wantedExtent_,ct)||
70containsExtent(this.image.getExtent(),ct))&&(this.wantedResolution_&&fromResolutionLike(this.wantedResolution_)===ut||fromResolutionLike(this.image.getResolution())===ut)))return this.image;this.wantedProjection_=ot,this.wantedExtent_=ct,this.wantedResolution_=ut,this.image=new ImageWrapper(ct,ut,st,this.loader),this.image.addEventListener(EventType.CHANGE,this.handleImageChange.bind(this))}return this.image}handleImageChange(ee){const te=ee.target;let st;switch(te.getState()){case ImageState.LOADING:this.loading=!0,st=ImageSourceEventType.IMAGELOADSTART;break;case ImageState.LOADED:this.loading=!1,st=ImageSourceEventType.IMAGELOADEND;break;case ImageState.ERROR:this.loading=!1,st=ImageSourceEventType.IMAGELOADERROR;break;default:return}this.hasListener(st)&&this.dispatchEvent(new ImageSourceEvent(st,te))}}function defaultImageLoadFunction(ne,ee){ne.getImage().src=ee}function getRequestExtent(ne,ee,te,st){const ot=ee/te,ct=getCenter(ne),ut=ceil(getWidth(ne)/ot,DECIMALS),dt=ceil(getHeight(ne)/ot,DECIMALS),ht=ceil((st-1)*ut/2,DECIMALS),ft=ut+2*ht,pt=ceil((st-1)*dt/2,DECIMALS),mt=dt+2*pt;return getForViewAndSize(ct,ot,0,[ft,mt])}const DEFAULT_VERSION="1.3.0",GETFEATUREINFO_IMAGE_SIZE=[101,101];function getRequestUrl(ne,ee,te,st,ot){ot.WIDTH=te[0],ot.HEIGHT=te[1];const ct=st.getAxisOrientation(),ut=compareVersions(ot.VERSION,"1.3")>=0;ot[ut?"CRS":"SRS"]=st.getCode();const dt=ut&&ct.startsWith("ne")?[ee[1],ee[0],ee[3],ee[2]]:ee;return ot.BBOX=dt.join(","),appendParams(ne,ot)}function getImageSrc(ne,ee,te,st,ot,ct,ut){ct=Object.assign({REQUEST:"GetMap"},ct);const dt=ee/te,ht=[round(getWidth(ne)/dt,DECIMALS),round(getHeight(ne)/dt,DECIMALS)];if(te!=1)switch(ut){case"geoserver":const pt=90*te+.5|0;"FORMAT_OPTIONS"in ct?ct.FORMAT_OPTIONS+=";dpi:"+pt:ct.FORMAT_OPTIONS="dpi:"+pt;break;case"mapserver":ct.MAP_RESOLUTION=90*te;break;case"carmentaserver":case"qgis":ct.DPI=90*te;break;default:throw new Error("Unknown `serverType` configured")}return getRequestUrl(ot,ne,ht,st,ct)}
70function getRequestParams(ne,ee){return Object.assign({REQUEST:ee,SERVICE:"WMS",VERSION:DEFAULT_VERSION,FORMAT:"image/png",STYLES:"",TRANSPARENT:"TRUE"},ne)}function createLoader(ne){const ee=ne.hidpi===void 0?!0:ne.hidpi,te=get$3(ne.projection||"EPSG:3857"),st=ne.ratio||1.5,ot=ne.load||decode$2,ct=ne.crossOrigin??null,ut=ne.referrerPolicy;return(dt,ht,ft)=>{dt=getRequestExtent(dt,ht,ft,st),ft!=1&&(!ee||ne.serverType===void 0)&&(ft=1);const pt=getImageSrc(dt,ht,ft,te,ne.url,getRequestParams(ne.params,"GetMap"),ne.serverType),mt=new Image;return mt.crossOrigin=ct,ut!==void 0&&(mt.referrerPolicy=ut),ot(mt,pt).then(yt=>({image:yt,extent:dt,pixelRatio:ft}))}}function getFeatureInfoUrl(ne,ee,te){if(ne.url===void 0)return;const st=get$3(ne.projection||"EPSG:3857"),ot=getForViewAndSize(ee,te,0,GETFEATUREINFO_IMAGE_SIZE),ct={QUERY_LAYERS:ne.params.LAYERS,INFO_FORMAT:"application/json"};Object.assign(ct,getRequestParams(ne.params,"GetFeatureInfo"),ne.params);const ut=floor((ee[0]-ot[0])/te,DECIMALS),dt=floor((ot[3]-ee[1])/te,DECIMALS),ht=compareVersions(ct.VERSION,"1.3")>=0;return ct[ht?"I":"X"]=ut,ct[ht?"J":"Y"]=dt,getRequestUrl(ne.url,ot,GETFEATUREINFO_IMAGE_SIZE,st,ct)}function getLegendUrl(ne,ee){if(ne.url===void 0)return;const te={SERVICE:"WMS",VERSION:DEFAULT_VERSION,REQUEST:"GetLegendGraphic",FORMAT:"image/png"};if(ee!==void 0){const st=get$3(ne.projection||"EPSG:3857").getMetersPerUnit()||1,ot=28e-5;te.SCALE=ee*st/ot}if(Object.assign(te,ne.params),ne.params!==void 0&&te.LAYER===void 0){const st=te.LAYERS;if(!(!Array.isArray(st)||st.length!==1))return;te.LAYER=st}return appendParams(ne.url,te)}class TileWMS extends TileImage{constructor(ee){ee=ee||{};const te=Object.assign({},ee.params);super({attributions:ee.attributions,attributionsCollapsible:ee.attributionsCollapsible,cacheSize:ee.cacheSize,crossOrigin:ee.crossOrigin,interpolate:ee.interpolate,projection:ee.projection,reprojectionErrorThreshold:ee.reprojectionErrorThreshold,tileClass:ee.tileClass,tileGrid:ee.tileGrid,tileLoadFunction:ee.tileLoadFunction,url:ee.url,urls:ee.urls,wrapX:ee.wrapX!==void 0?ee.wrapX:!0,transition:ee.transition,zDirection:ee.zDirection}),this.gutter_=ee.gutter!==void 0?ee.gutter:0,this.params_=te,this.v13_=!0,this.serverType_=ee.serverType,this.hidpi_=ee.hidpi!==void 0?ee.hidpi:!0,this.tmpExtent_=createEmpty(),this.updateV13_(),this.setKey(this.getKeyForParams_())}getFeatureInfoUrl(ee,te,st,ot){const ct=get$3(st),ut=this.getProjection()||ct;let dt=this.getTileGrid();dt||(dt=this.getTileGridForProjection(ut));const ht=transform$1(ee,ct,ut),ft=calculateSourceResolution(ut,ct,ee,te),pt=dt.getZForResolution(ft,this.zDirection),mt=dt.getResolution(pt),yt=dt.getTileCoordForCoordAndZ(ht,pt);if(dt.getResolutions().length<=yt[0])return;let vt=dt.getTileCoordExtent(yt,this.tmpExtent_);const _t=this.gutter_;_t!==0&&(vt=buffer(vt,mt*_t,vt));const bt={QUERY_LAYERS:this.params_.LAYERS};
70Object.assign(bt,getRequestParams(this.params_,"GetFeatureInfo"),ot);const xt=Math.floor((ht[0]-vt[0])/mt),Mt=Math.floor((vt[3]-ht[1])/mt);return bt[this.v13_?"I":"X"]=xt,bt[this.v13_?"J":"Y"]=Mt,this.getRequestUrl_(yt,vt,1,ut||ct,bt)}getLegendUrl(ee,te){if(this.urls[0]===void 0)return;const st={SERVICE:"WMS",VERSION:DEFAULT_VERSION,REQUEST:"GetLegendGraphic",FORMAT:"image/png"};if(te===void 0||te.LAYER===void 0){const ot=this.params_.LAYERS;if(!(!Array.isArray(ot)||ot.length===1))return;st.LAYER=ot}if(ee!==void 0){const ot=this.getProjection()?this.getProjection().getMetersPerUnit():1,ct=28e-5;st.SCALE=ee*ot/ct}return Object.assign(st,te),appendParams(this.urls[0],st)}getGutter(){return this.gutter_}getParams(){return this.params_}getRequestUrl_(ee,te,st,ot,ct){const ut=this.urls;if(!ut)return;let dt;if(ut.length==1)dt=ut[0];else{const ht=modulo(hash(ee),ut.length);dt=ut[ht]}return getImageSrc(te,(this.tileGrid||this.getTileGridForProjection(ot)).getResolution(ee[0]),st,ot,dt,ct,this.serverType_)}getTilePixelRatio(ee){return!this.hidpi_||this.serverType_===void 0?1:ee}getKeyForParams_(){let ee=0;const te=[];for(const st in this.params_)te[ee++]=st+"-"+this.params_[st];return te.join("/")}setParams_(ee){this.params_=ee,this.updateV13_(),this.setKey(this.getKeyForParams_())}setParams(ee){this.setParams_(Object.assign({},ee))}updateParams(ee){this.setParams_(Object.assign(this.params_,ee))}updateV13_(){const ee=this.params_.VERSION||DEFAULT_VERSION;this.v13_=compareVersions(ee,"1.3")>=0}tileUrlFunction(ee,te,st){let ot=this.getTileGrid();if(ot||(ot=this.getTileGridForProjection(st)),ot.getResolutions().length<=ee[0])return;te!=1&&(!this.hidpi_||this.serverType_===void 0)&&(te=1);const ct=ot.getResolution(ee[0]);let ut=ot.getTileCoordExtent(ee,this.tmpExtent_);const dt=this.gutter_;dt!==0&&(ut=buffer(ut,ct*dt,ut));const ht=Object.assign({}
70,getRequestParams(this.params_,"GetMap"));return this.getRequestUrl_(ee,ut,te,st,ht)}}let WMTS$1=class extends TileImage{constructor(ee){const te=ee.requestEncoding!==void 0?ee.requestEncoding:"KVP",st=ee.tileGrid;let ot=ee.urls;ot===void 0&&ee.url!==void 0&&(ot=expandUrl(ee.url)),super({attributions:ee.attributions,attributionsCollapsible:ee.attributionsCollapsible,cacheSize:ee.cacheSize,crossOrigin:ee.crossOrigin,referrerPolicy:ee.referrerPolicy,interpolate:ee.interpolate,projection:ee.projection,reprojectionErrorThreshold:ee.reprojectionErrorThreshold,tileClass:ee.tileClass,tileGrid:st,tileLoadFunction:ee.tileLoadFunction,tilePixelRatio:ee.tilePixelRatio,urls:ot,wrapX:ee.wrapX!==void 0?ee.wrapX:!1,transition:ee.transition,zDirection:ee.zDirection}),this.version_=ee.version!==void 0?ee.version:"1.0.0",this.format_=ee.format!==void 0?ee.format:"image/jpeg",this.dimensions_=ee.dimensions!==void 0?ee.dimensions:{},this.layer_=ee.layer,this.matrixSet_=ee.matrixSet,this.style_=ee.style,this.requestEncoding_=te,this.setKey(this.getKeyForDimensions_()
70),ot&&ot.length>0&&(this.tileUrlFunction=createFromTileUrlFunctions(ot.map(this.createFromWMTSTemplate.bind(this))))}setUrls(ee){this.urls=ee;const te=ee.join(`
71`);this.setTileUrlFunction(createFromTileUrlFunctions(ee.map(this.createFromWMTSTemplate.bind(this))),te)}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 ee=this.urls?this.urls.slice(0):[];for(const te in this.dimensions_)ee.push(te+"-"+this.dimensions_[te]);return ee.join("/")}updateDimensions(ee){Object.assign(this.dimensions_,ee),this.setKey(this.getKeyForDimensions_())}createFromWMTSTemplate(ee){const te=this.requestEncoding_,st={layer:this.layer_,style:this.style_,tilematrixset:this.matrixSet_};te=="KVP"&&Object.assign(st,{Service:"WMTS",Request:"GetTile",Version:this.version_,Format:this.format_}),ee=te=="KVP"?appendParams(ee,st):ee.replace(/\{(\w+?)\}/g,function(ut,dt){return dt.toLowerCase()in st?st[dt.toLowerCase()]:ut});const ot=this.tileGrid,ct=this.dimensions_;return(function(ut,dt,ht){if(!ut)return;const ft={TileMatrix:ot.getMatrixId(ut[0]),TileCol:ut[1],TileRow:ut[2]};Object.assign(ft,ct);let pt=ee;return te=="KVP"?pt=appendParams(pt,ft):pt=pt.replace(/\{(\w+?)\}/g,function(mt,yt){return encodeURIComponent(ft[yt])}),pt})}};class ImageWMS extends ImageSource{constructor(ee){ee=ee||{},super({attributions:ee.attributions,interpolate:ee.interpolate,projection:ee.projection,resolutions:ee.resolutions}),this.crossOrigin_=ee.crossOrigin!==void 0?ee.crossOrigin:null,this.referrerPolicy_=ee.referrerPolicy,this.url_=ee.url,this.imageLoadFunction_=ee.imageLoadFunction!==void 0?ee.imageLoadFunction:defaultImageLoadFunction,this.params_=Object.assign({},ee.params),this.serverType_=ee.serverType,this.hidpi_=ee.hidpi!==void 0?ee.hidpi:!0,this.renderedRevision_=0,this.ratio_=ee.ratio!==void 0?ee.ratio:1.5,this.loaderProjection_=null}getFeatureInfoUrl(ee,te,st,ot){const ct=get$3(st),ut=this.getProjection();ut&&ut!==ct&&(te=calculateSourceResolution(ut,ct,ee,te),ee=transform$1(ee,ct,ut));const dt={url:this.url_,params:{...this.params_,...ot},projection:ut||ct};return getFeatureInfoUrl(dt,ee,te)}getLegendUrl(ee,te){return getLegendUrl({url:this.url_,params:{...this.params_,...te}},ee)}getParams(){return this.params_}getImageInternal(ee,te,st,ot){return this.url_===void 0?null:((!this.loader||this.loaderProjection_!==ot)&&(this.loaderProjection_=ot,this.loader=createLoader({crossOrigin:this.crossOrigin_,referrerPolicy:this.referrerPolicy_,params:this.params_,projection:ot,serverType:this.serverType_,hidpi:this.hidpi_,url:this.url_,ratio:this.ratio_,load:(ct,ut)=>(this.image.setImage(ct),this.imageLoadFunction_(this.image,ut),decode$2(ct))})),super.getImageInternal(ee,te,st,ot))}getImageLoadFunction(){return this.imageLoadFunction_}getUrl(){return this.url_}setImageLoadFunction(ee){this.imageLoadFunction_=ee,this.changed()}setUrl(ee){ee!=this.url_&&(this.url_=ee,this.loader=null,this.changed())}setParams(ee){this.params_=Object.assign({},ee),this.loader=null,this.changed()}updateParams(ee){Object.assign(this.params_,ee),this.changed()}changed(){this.image=null,super.changed()}}const MapBrowserEventType={SINGLECLICK:"singleclick",CLICK:EventType.CLICK,DBLCLICK:EventType.DBLCLICK,POINTERDRAG:"pointerdrag",POINTERMOVE:"pointermove",POINTERDOWN:"pointerdown",POINTERUP:"pointerup",POINTEROVER:"pointerover",POINTEROUT:"pointerout",POINTERENTER:"pointerenter",POINTERLEAVE:"pointerleave",POINTERCANCEL:"pointercancel"},InteractionProperty={ACTIVE:"active"};class Interaction extends BaseObject{constructor(ee){super(),this.on,this.once,this.un,ee&&ee.handleEvent&&(this.handleEvent=ee.handleEvent),this.map_=null,this.setActive(!0)}getActive(){return this.get(InteractionProperty.ACTIVE)}getMap(){return this.map_}handleEvent(ee){return!0}setActive(ee){this.set(InteractionProperty.ACTIVE,ee)}setMap(ee){this.map_=ee}}function pan(ne,ee,te){const st=ne.getCenterInternal();if(st){const ot=[st[0]+ee[0],st[1]+ee[1]];ne.animateInternal({duration:te!==void 0?te:250,easing:linear,center:ne.getConstrainedCenter(ot)})}}function zoomByDelta(ne,ee,te,st){const ot=ne.getZoom();if(ot===void 0)return;const ct=ne.getConstrainedZoom(ot+ee),ut=ne.getResolutionForZoom(ct);ne.getAnimating()&&ne.cancelAnimations(),ne.animate({resolution:ut,anchor:te,duration:st!==void 0?st:250,easing:easeOut})}class Kinetic{constructor(ee,te,st){this.decay_=ee,this.minVelocity_=te,this.delay_=st,this.points_=[],this.angle_=0,this.initialVelocity_=0}begin(){this.points_.length=0,this.angle_=0,this.initialVelocity_=0}update(ee,te){this.points_.push(ee,te,Date.now())}end(){if(this.points_.length<6)return!1;const ee=Date.now()-this.delay_,te=this.points_.length-3;if(this.points_[te+2]<ee)return!1;let st=te-3;for(;st>0&&this.points_[st+2]>ee;)st-=3;const ot=this.points_[te+2]-this.points_[st+2];if(ot<1e3/60)return!1;const ct=this.points_[te]-this.points_[st],ut=this.points_[te+1]-this.points_[st+1];return this.angle_=Math.atan2(ut,ct),this.initialVelocity_=Math.sqrt(ct*ct+ut*ut)/ot,this.initialVelocity_>this.minVelocity_}getDistance(){return(this.minVelocity_-this.initialVelocity_)/this.decay_}getAngle(){return this.angle_}}class DoubleClickZoom extends Interaction{constructor(ee){super(),ee=ee||{},this.delta_=ee.delta?ee.delta:1,this.duration_=ee.duration!==void 0?ee.duration:250}handleEvent(ee){let te=!1;if(ee.type==MapBrowserEventType.DBLCLICK){const st=ee.originalEvent,ot=ee.map,ct=ee.coordinate,ut=st.shiftKey?-this.delta_:this.delta_,dt=ot.getView();zoomByDelta(dt,ut,ct,this.duration_),st.preventDefault(),te=!0}return!te}}function all(ne){const ee=arguments;return function(te){let st=!0;for(let ot=0,ct=ee.length;ot<ct&&(st=st&&ee[ot](te),!!st);++ot);return st}}
71const altKeyOnly=function(ne){const ee=ne.originalEvent;return ee.altKey&&!(ee.metaKey||ee.ctrlKey)&&!ee.shiftKey},altShiftKeysOnly=function(ne){const ee=ne.originalEvent;return ee.altKey&&!(ee.metaKey||ee.ctrlKey)&&ee.shiftKey},focus=function(ne){const ee=ne.map.getTargetElement(),te=ee.getRootNode(),st=ne.map.getOwnerDocument().activeElement;return te instanceof ShadowRoot?te.host.contains(st):ee.contains(st)},focusWithTabindex=function(ne){const ee=ne.map.getTargetElement(),te=ee.getRootNode();return(te instanceof ShadowRoot?te.host:ee).hasAttribute("tabindex")?focus(ne):!0},always$1=TRUE,mouseActionButton=function(ne){const ee=ne.originalEvent;return"pointerId"in ee&&ee.button==0&&!(WEBKIT&&MAC&&ee.ctrlKey)},never=FALSE,pointerMove=function(ne){return ne.type=="pointermove"},singleClick=function(ne){return ne.type==MapBrowserEventType.SINGLECLICK},noModifierKeys=function(ne){const ee=ne.originalEvent;return!ee.altKey&&!(ee.metaKey||ee.ctrlKey)&&!ee.shiftKey},platformModifierKey=function(ne){const ee=ne.originalEvent;return MAC?ee.metaKey:ee.ctrlKey},shiftKeyOnly=function(ne){const ee=ne.originalEvent;return!ee.altKey&&!(ee.metaKey||ee.ctrlKey)&&ee.shiftKey},targetNotEditable=function(ne){const ee=ne.originalEvent,te=ee.target.tagName;return te!=="INPUT"&&te!=="SELECT"&&te!=="TEXTAREA"&&!ee.target.isContentEditable},mouseOnly=function(ne){const ee=ne.originalEvent;return"pointerId"in ee&&ee.pointerType=="mouse"},primaryAction=function(ne){const ee=ne.originalEvent;return"pointerId"in ee&&ee.isPrimary&&ee.button===0};class PointerInteraction extends Interaction{constructor(ee){ee=ee||{},super(ee),ee.handleDownEvent&&(this.handleDownEvent=ee.handleDownEvent),ee.handleDragEvent&&(this.handleDragEvent=ee.handleDragEvent),ee.handleMoveEvent&&(this.handleMoveEvent=ee.handleMoveEvent),ee.handleUpEvent&&(this.handleUpEvent=ee.handleUpEvent),ee.stopDown&&(this.stopDown=ee.stopDown),this.handlingDownUpSequence=!1,this.targetPointers=[]}getPointerCount(){return this.targetPointers.length}handleDownEvent(ee){return!1}handleDragEvent(ee){}handleEvent(ee){if(!ee.originalEvent)return!0;let te=!1;if(this.updateTrackedPointers_(ee),this.handlingDownUpSequence){if(ee.type==MapBrowserEventType.POINTERDRAG)this.handleDragEvent(ee),ee.originalEvent.preventDefault();else if(ee.type==MapBrowserEventType.POINTERUP){const st=this.handleUpEvent(ee);this.handlingDownUpSequence=st&&this.targetPointers.length>0}}else if(ee.type==MapBrowserEventType.POINTERDOWN){const st=this.handleDownEvent(ee);this.handlingDownUpSequence=st,te=this.stopDown(st)}else ee.type==MapBrowserEventType.POINTERMOVE&&this.handleMoveEvent(ee);return!te}handleMoveEvent(ee){}handleUpEvent(ee){return!1}stopDown(ee){return ee}updateTrackedPointers_(ee){ee.activePointers&&(this.targetPointers=ee.activePointers)}}function centroid(ne){const ee=ne.length;let te=0,st=0;for(let ot=0;ot<ee;ot++)te+=ne[ot].clientX,st+=ne[ot].clientY;return{clientX:te/ee,clientY:st/ee}}class DragPan extends PointerInteraction{constructor(ee){super({stopDown:FALSE}),ee=ee||{},this.kinetic_=ee.kinetic,this.lastCentroid=null,this.lastPointersCount_,this.panning_=!1;const te=ee.condition?ee.condition:all(noModifierKeys,primaryAction);this.condition_=ee.onFocusOnly?all(focusWithTabindex,te):te,this.noKinetic_=!1}handleDragEvent(ee){const te=ee.map;this.panning_||(this.panning_=!0,te.getView().beginInteraction());const st=this.targetPointers,ot=te.getEventPixel(centroid(st));if(st.length==this.lastPointersCount_){if(this.kinetic_&&this.kinetic_.update(ot[0],ot[1]),this.lastCentroid){const ct=[this.lastCentroid[0]-ot[0],ot[1]-this.lastCentroid[1]],dt=ee.map.getView();scale$3(ct,dt.getResolution()),rotate$1(ct,dt.getRotation()),dt.adjustCenterInternal(ct)}}else this.kinetic_&&this.kinetic_.begin();this.lastCentroid=ot,this.lastPointersCount_=st.length,ee.originalEvent.preventDefault()}handleUpEvent(ee){const te=ee.map,st=te.getView();if(this.targetPointers.length===0){if(!this.noKinetic_&&this.kinetic_&&this.kinetic_.end()){const ot=this.kinetic_.getDistance(),ct=this.kinetic_.getAngle(),ut=st.getCenterInternal(),dt=te.getPixelFromCo
71ordinateInternal(ut),ht=te.getCoordinateFromPixelInternal([dt[0]-ot*Math.cos(ct),dt[1]-ot*Math.sin(ct)]);st.animateInternal({center:st.getConstrainedCenter(ht),duration:500,easing:easeOut})}return this.panning_&&(this.panning_=!1,st.endInteraction()),!1}return this.kinetic_&&this.kinetic_.begin(),this.lastCentroid=null,!0}handleDownEvent(ee){if(this.targetPointers.length>0&&this.condition_(ee)){const st=ee.map.getView();return this.lastCentroid=null,st.getAnimating()&&st.cancelAnimations(),this.kinetic_&&this.kinetic_.begin(),this.noKinetic_=this.targetPointers.length>1,!0}return!1}}function disable(ne){if(ne!==void 0)return 0}function none$1(ne){if(ne!==void 0)return ne}function createSnapToN(ne){const ee=2*Math.PI/ne;return(function(te,st){if(st)return te;if(te!==void 0)return te=Math.floor(te/ee+.5)*ee,te})}function createSnapToZero(ne){const ee=toRadians(5);return(function(te,st){return st||te===void 0?te:Math.abs(te)<=ee?0:te})}class DragRotate extends PointerInteraction{constructor(ee){ee=ee||{},super({stopDown:FALSE}),this.condition_=ee.condition?ee.condition:altShiftKeysOnly,this.lastAngle_=void 0,this.duration_=ee.duration!==void 0?ee.duration:250}handleDragEvent(ee){if(!mouseOnly(ee))return;const te=ee.map,st=te.getView();if(st.getConstraints().rotation===disable)return;const ot=te.getSize(),ct=ee.pixel,ut=Math.atan2(ot[1]/2-ct[1],ct[0]-ot[0]/2);if(this.lastAngle_!==void 0){const dt=ut-this.lastAngle_;st.adjustRotationInternal(-dt)}this.lastAngle_=ut}handleUpEvent(ee){return mouseOnly(ee)?(ee.map.getView().endInteraction(this.duration_),!1):!0}handleDownEvent(ee){return mouseOnly(ee)&&mouseActionButton(ee)&&this.condition_(ee)?(ee.map.getView().beginInteraction(),this.lastAngle_=void 0,!0):!1}}class RenderBox extends Disposable{constructor(ee){super(),this.geometry_=null,this.element_=document.createElement("div"),this.element_.style.position="absolute",this.element_.style.pointerEvents="auto",this.element_.className="ol-box "+ee,this.map_=null,this.startPixel_=null,this.endPixel_=null}disposeInternal(){this.setMap(null)}render_(){const ee=this.startPixel_,te=this.endPixel_,st="px",ot=this.element_.style;ot.left=Math.min(ee[0],te[0])+st,ot.top=Math.min(ee[1],te[1])+st,ot.width=Math.abs(te[0]-ee[0])+st,ot.height=Math.abs(te[1]-ee[1])+st}setMap(ee){if(this.map_){this.map_.getOverlayContainer().removeChild(this.element_);const te=this.element_.style;te.left="inherit",te.top="inherit",te.width="inherit",te.height="inherit"}this.map_=ee,this.map_&&this.map_.getOverlayContainer().appendChild(this.element_)}setPixels(ee,te){this.startPixel_=ee,this.endPixel_=te,this.createOrUpdateGeometry(),this.render_()}createOrUpdateGeometry(){if(!this.map_)return;const ee=this.startPixel_,te=this.endPixel_,ot=[ee,[ee[0],te[1]],te,[te[0],ee[1]]].map(this.map_.getCoordinateFromPixelInternal,this.map_);ot[4]=ot[0].slice(),this.geometry_?this.geometry_.setCoordinates([ot]):this.geometry_=new Polygon([ot])}getGeometry(){return this.geometry_}}const DragBoxEventType={BOXSTART:"boxstart",BOXDRAG:"boxdrag",BOXEND:"boxend",BOXCANCEL:"boxcancel"};class DragBoxEvent extends BaseEvent{constructor(ee,te,st){super(ee),this.coordinate=te,this.mapBrowserEvent=st}}class DragBox extends PointerInteraction{constructor(ee){super(),this.on,this.once,this.un,ee=ee??{},this.box_=new RenderBox(ee.className||"ol-dragbox"),this.minArea_=ee.minArea??
7164,ee.onBoxEnd&&(this.onBoxEnd=ee.onBoxEnd),this.startPixel_=null,this.condition_=ee.condition??mouseActionButton,this.boxEndCondition_=ee.boxEndCondition??this.defaultBoxEndCondition}defaultBoxEndCondition(ee,te,st){const ot=st[0]-te[0],ct=st[1]-te[1];return ot*ot+ct*ct>=this.minArea_}getGeometry(){return this.box_.getGeometry()}handleDragEvent(ee){this.startPixel_&&(this.box_.setPixels(this.startPixel_,ee.pixel),this.dispatchEvent(new DragBoxEvent(DragBoxEventType.BOXDRAG,ee.coordinate,ee)))}handleUpEvent(ee){if(!this.startPixel_)return!1;const te=this.boxEndCondition_(ee,this.startPixel_,ee.pixel);return te&&this.onBoxEnd(ee),this.dispatchEvent(new DragBoxEvent(te?DragBoxEventType.BOXEND:DragBoxEventType.BOXCANCEL,ee.coordinate,ee)),this.box_.setMap(null),this.startPixel_=null,!1}handleDownEvent(ee){return this.condition_(ee)?(this.startPixel_=ee.pixel,this.box_.setMap(ee.map),this.box_.setPixels(this.startPixel_,this.startPixel_),this.dispatchEvent(new DragBoxEvent(DragBoxEventType.BOXSTART,ee.coordinate,ee)),!0):!1}onBoxEnd(ee){}setActive(ee){ee||(this.box_.setMap(null),this.startPixel_&&(this.dispatchEvent(new DragBoxEvent(DragBoxEventType.BOXCANCEL,this.startPixel_,null)),this.startPixel_=null)),super.setActive(ee)}setMap(ee){this.getMap()&&(this.box_.setMap(null),this.startPixel_&&(this.dispatchEvent(new DragBoxEvent(DragBoxEventType.BOXCANCEL,this.startPixel_,null)),this.startPixel_=null)),super.setMap(ee)}}class DragZoom extends DragBox{constructor(ee){ee=ee||{};const te=ee.condition?ee.condition:shiftKeyOnly;super({condition:te,className:ee.className||"ol-dragzoom",minArea:ee.minArea}),this.duration_=ee.duration!==void 0?ee.duration:200,this.out_=ee.out!==void 0?ee.out:!1}onBoxEnd(ee){const st=this.getMap().getView();let ot=this.getGeometry();if(this.out_){const ct=st.rotatedExtentForGeometry(ot),ut=st.getResolutionForExtentInternal(ct),dt=st.getResolution()/ut;ot=ot.clone(),ot.scale(dt*dt)}st.fitInternal(ot,{duration:this.duration_,easing:easeOut})}}const Key={LEFT:"ArrowLeft",UP:"ArrowUp",RIGHT:"ArrowRight",DOWN:"ArrowDown"};class KeyboardPan extends Interaction{constructor(ee){super(),ee=ee||{},this.defaultCondition_=function(te){return noModifierKeys(te)&&targetNotEditable(te)},this.condition_=ee.condition!==void 0?ee.condition:this.defaultCondition_,this.duration_=ee.duration!==void 0?ee.duration:100,this.pixelDelta_=ee.pixelDelta!==void 0?ee.pixelDelta:128}handleEvent(ee){let te=!1;if(ee.type==EventType.KEYDOWN){const st=ee.originalEvent,ot=st.key;if(this.condition_(ee)&&(ot==Key.DOWN||ot==Key.LEFT||ot==Key.RIGHT||ot==Key.UP)){const ut=ee.map.getView(),dt=ut.getResolution()*this.pixelDelta_;let ht=0,ft=0;ot==Key.DOWN?ft=-dt:ot==Key.LEFT?ht=-dt:ot==Key.RIGHT?ht=dt:ft=dt;const pt=[ht,ft];rotate$1(pt,ut.getRotation()),pan(ut,pt,this.duration_),st.preventDefault(),te=!0}}return!te}}class KeyboardZoom extends Interaction{constructor(ee){super(),ee=ee||{},this.condition_=ee.condition?ee.condition:function(te){return!platformModifierKey(te)&&targetNotEditable(te)},this.delta_=ee.delta?ee.delta:1,this.duration_=ee.duration!==void 0?ee.duration:100}handleEvent(ee){let te=!1;if(ee.type==EventType.KEYDOWN||ee.type==EventType.KEYPRESS){const st=ee.originalEvent,ot=st.key;if(this.condition_(ee)&&(ot==="+"||ot==="-")){const ct=ee.map,ut=ot==="+"?this.delta_:-this.delta_,dt=ct.getView();zoomByDelta(dt,ut,void 0,this.duration_),st.preventDefault(),te=!0}}return!te}}const DELTA_LINE_MULTIPLIER=40,DELTA_PAGE_MULTIPLIER=300,DELTA_TRACKPAD_PINCH_TO_ZOOM_MULTIPLIER=3;class MouseWheelZoom extends Interaction{constructor(ee){ee=ee||{},super(ee),this.totalDelta_=0,this.lastDelta_=0,this.maxDelta_=ee.maxDelta!==void 0?ee.maxDelta:1,this.duration_=ee.duration!==void 0?ee.duration:250,this.timeout_=ee.timeout!==void 0?ee.timeout:80,this.useAnchor_=ee.useAnchor!==void 0?ee.useAnchor:!0,this.constrainResolution_=ee.constrainResolution!==void 0?ee.constrainResolution:!1;const te=ee.condition?ee.condition:always$1;this.condition_=ee.onFocusOnly?all(focusWithTabindex,te):te,this.lastAnchor_=null,this.startTime_=void 0,this.timeoutId_,this.mode_=void 0,this.trackpadEventGap_=400,this.trackpadTimeoutId_,this.deltaPerZoom_=300,this.ctrlKeyPressed_=!1,this.ctrlKeyListenerKeys_=[]}setMap(ee){if(this.ctrlKeyListenerKeys_.forEach(unlistenByKey),this.ctrlKeyListenerKeys_.length=0,this.ctrlKeyPressed_=!1,super.setMap(ee),ee){const te=ee.getOwnerDocument();this.ctrlKeyListenerKeys_.push(listen(te,"keydown",st=>{st.key==="Control"&&(this.ctrlKeyPressed_=!0)}),listen(te,"keyup",st=>{st.key==="Control"&&(this.ctrlKeyPressed_=!1)}))}}endInteraction_(){this.trackpadTimeoutId_=void 0;const ee=this.getMap();if(!ee)return;const te=ee.getView(),st=this.lastDelta_?this.lastDelta_>0?1:-1:0;te.endInteraction(this.constrainResolution_||te.getConstrainResolution()?100:void 0,st,this.lastAnchor_?ee.getCoordinateFromPixel(this.lastAnchor_):null)}handleEvent(ee){if(!this.condition_(ee)||ee.type!==EventType.WHEEL)return!0;const st=ee.map,ot=ee.originalEvent;ot.preventDefault();const ct=ot.ctrlKey&&!this.ctrlKeyPressed_;ot.ctrlKey||(this.ctrlKeyPressed_=!1),this.useAnchor_&&(this.lastAnchor_=ee.pixel);let ut=ot.deltaY;switch(ot.deltaMode){case WheelEvent.DOM_DELTA_LINE:ut*=DELTA_LINE_MULTIPLIER;break;case WheelEvent.DOM_DELTA_PAGE:ut*=DELTA_PAGE_MULTIPLIER;break}if(ut===0)return!1;this.lastDelta_=ut;const dt=Date.now();this.startTime_===void 0&&(this.startTime_=dt),(!this.mode_||dt-this.startTime_>this.trackpadEventGap_)&&(this.mode_=Math.abs(ut)<4?"trackpad":"wheel");const ht=st.getView();if(this.mode_==="trackpad")return this.trackpadTimeoutId_?clearTimeout(this.trackpadTimeoutId_):(ht.getAnimating()&&ht.cancelAnimations(),ht.beginInteraction()),this.trackpadTimeoutId_=setTimeout(this.endInteraction_.bind(this),this.timeout_),ct&&(ut=ut*DELTA_TRACKPAD_PINCH_TO_ZOOM_MULTIPLIER),ht.adjustZoom(-ut/this.deltaPerZoom_,this.lastAnchor_?st.getCoordinateFromPixel(this.lastAnchor_):null),this.startTime_=dt,!1;this.totalDelta_+=ut;
71const ft=Math.max(this.timeout_-(dt-this.startTime_),0);return clearTimeout(this.timeoutId_),this.timeoutId_=setTimeout(this.handleWheelZoom_.bind(this,st),ft),!1}handleWheelZoom_(ee){const te=ee.getView();te.getAnimating()&&te.cancelAnimations();let st=-clamp$1(this.totalDelta_,-this.maxDelta_*this.deltaPerZoom_,this.maxDelta_*this.deltaPerZoom_)/this.deltaPerZoom_;(te.getConstrainResolution()||this.constrainResolution_)&&(st=st?st>0?1:-1:0),zoomByDelta(te,st,this.lastAnchor_?ee.getCoordinateFromPixel(this.lastAnchor_):null,this.duration_),this.mode_=void 0,this.totalDelta_=0,this.lastAnchor_=null,this.startTime_=void 0,this.timeoutId_=void 0}setMouseAnchor(ee){this.useAnchor_=ee,ee||(this.lastAnchor_=null)}}class PinchRotate extends PointerInteraction{constructor(ee){ee=ee||{};const te=ee;te.stopDown||(te.stopDown=FALSE),super(te),this.anchor_=null,this.lastAngle_=void 0,this.rotating_=!1,this.rotationDelta_=0,this.threshold_=ee.threshold!==void 0?ee.threshold:.3,this.duration_=ee.duration!==void 0?ee.duration:250}handleDragEvent(ee){let te=0;const st=this.targetPointers[0],ot=this.targetPointers[1],ct=Math.atan2(ot.clientY-st.clientY,ot.clientX-st.clientX);if(this.lastAngle_!==void 0){const ht=ct-this.lastAngle_;this.rotationDelta_+=ht,!this.rotating_&&Math.abs(this.rotationDelta_)>this.threshold_&&(this.rotating_=!0),te=ht}this.lastAngle_=ct;const ut=ee.map,dt=ut.getView();dt.getConstraints().rotation!==disable&&(this.anchor_=ut.getCoordinateFromPixelInternal(ut.getEventPixel(centroid(this.targetPointers))),this.rotating_&&(ut.render(),dt.adjustRotationInternal(te,this.anchor_)))}handleUpEvent(ee){return this.targetPointers.length<2?(ee.map.getView().endInteraction(this.duration_),!1):!0}handleDownEvent(ee){if(this.targetPointers.length>=2){const te=ee.map;return this.anchor_=null,this.lastAngle_=void 0,this.rotating_=!1,this.rotationDelta_=0,this.handlingDownUpSequence||te.getView().beginInteraction(),!0}return!1}}class PinchZoom extends PointerInteraction{constructor(ee){ee=ee||{};const te=ee;te.stopDown||(te.stopDown=FALSE),super(te),this.anchor_=null,this.duration_=ee.duration!==void 0?ee.duration:400,this.lastDistance_=void 0,this.lastScaleDelta_=1}handleDragEvent(ee){let te=1;const st=this.targetPointers[0],ot=this.targetPointers[1],ct=st.clientX-ot.clientX,ut=st.clientY-ot.clientY,dt=Math.sqrt(ct*ct+ut*ut);this.lastDistance_!==void 0&&(te=this.lastDistance_/dt),this.lastDistance_=dt;const ht=ee.map,ft=ht.getView();te!=1&&(this.lastScaleDelta_=te),this.anchor_=ht.getCoordinateFromPixelInternal(ht.getEventPixel(centroid(this.targetPointers))),ht.render(),ft.adjustResolutionInternal(te,this.anchor_)}handleUpEvent(ee){if(this.targetPointers.length<2){const st=ee.map.getView(),ot=this.lastScaleDelta_>1?1:-1;return st.endInteraction(this.duration_,ot),!1}return!0}handleDownEvent(ee){if(this.targetPointers.length>=2){const te=ee.map;return this.anchor_=null,this.lastDistance_=void 0,this.lastScaleDelta_=1,this.handlingDownUpSequence||te.getView().beginInteraction(),!0}return!1}}function defaults$3(ne){ne=ne||{};const ee=new Collection,te=new Kinetic(-.005,.05,100);return(ne.altShiftDragRotate!==void 0?ne.altShiftDragRotate:!0)&&ee.push(new DragRotate),(ne.doubleClickZoom!==void 0?ne.doubleClickZoom:!0)&&ee.push(new DoubleClickZoom({delta:ne.zoomDelta,duration:ne.zoomDuration})),(ne.dragPan!==void 0?ne.dragPan:!0)&&ee.push(new DragPan({onFocusOnly:ne.onFocusOnly,kinetic:te})),(ne.pinchRotate!==void 0?ne.pinchRotate:!0)&&ee.push(new PinchRotate),(ne.pinchZoom!==void 0?ne.pinchZoom:!0)&&ee.push(new PinchZoom({duration:ne.zoomDuration})),(ne.keyboard!==void 0?ne.keyboard:!0)&&(ee.push(new KeyboardPan),ee.push(new KeyboardZoom({delta:ne.zoomDelta,duration:ne.zoomDuration}))),(ne.mouseWheelZoom!==void 0?ne.mouseWheelZoom:!0)&&ee.push(new MouseWheelZoom({onFocusOnly:ne.onFocusOnly,duration:ne.zoomDuration})),(ne.shiftDragZoom!==void 0?ne.shiftDragZoom:!0)&&ee.push(new DragZoom({duration:ne.zoomDuration})),ee}class MapEvent extends BaseEvent{constructor(ee,te,st){super(ee),this.map=te,this.frameState=st!==void 0?st:null}}class MapBrowserEvent extends MapEvent{constructor(ee,te,st,ot,ct,ut){super(ee,te,ct),this.originalEvent=st,this.pixel_=null,this.coordinate_=null,this.dragging=ot!==void 0?ot:!1,this.activePointers=ut}get pixel(){return this.pixel_||(this.pixel_=this.map.getEventPixel(this.originalEvent)),this.pixel_}set pixel(ee){this.pixel_=ee}get coordinate(){return this.coordinate_||(this.coordinate_=this.map.getCoordinateFromPixel(this.pixel)),this.coordinate_}set coordinate(ee){this.coordinate_=ee}preventDefault(){super.preventDefault(),"preventDefault"in this.originalEvent&&this.originalEvent.preventDefault()}stopPropagation(){super.stopPropagation(),"stopPropagation"in this.originalEvent&&this.originalEvent.stopPropagation()}}class Circle extends SimpleGeometry{constructor(ee,te,st){super(),st!==void 0&&te===void 0?this.setFlatCoordinates(st,ee):(te=te||0,this.setCenterAndRadius(ee,te,st))}clone(){const ee=new Circle(this.flatCoordinates.slice(),void 0,this.layout);return ee.applyProperties(this),ee}closestPointXY(ee,te,st,ot){const ct=this.flatCoordinates,ut=ee-ct[0],dt=te-ct[1],ht=ut*ut+dt*dt;if(ht<ot){if(ht===0)for(let ft=0;ft<this.stride;++ft)st[ft]=ct[ft];
vendor: 1,747 bytes, line 71
71else{const ft=this.getRadius()/Math.sqrt(ht);st[0]=ct[0]+ft*ut,st[1]=ct[1]+ft*dt;for(let pt=2;pt<this.stride;++pt)st[pt]=ct[pt]}return st.length=this.stride,ht}return ot}containsXY(ee,te){const st=this.flatCoordinates,ot=ee-st[0],ct=te-st[1];return ot*ot+ct*ct<=this.getRadiusSquared_()}getCenter(){return this.flatCoordinates.slice(0,this.stride)}computeExtent(ee){const te=this.flatCoordinates,st=te[this.stride]-te[0];return createOrUpdate$2(te[0]-st,te[1]-st,te[0]+st,te[1]+st,ee)}getRadius(){return Math.sqrt(this.getRadiusSquared_())}getRadiusSquared_(){const ee=this.flatCoordinates[this.stride]-this.flatCoordinates[0],te=this.flatCoordinates[this.stride+1]-this.flatCoordinates[1];return ee*ee+te*te}getType(){return"Circle"}intersectsExtent(ee){const te=this.getExtent();if(intersects$1(ee,te)){const st=this.getCenter();return ee[0]<=st[0]&&ee[2]>=st[0]||ee[1]<=st[1]&&ee[3]>=st[1]?!0:forEachCorner(ee,this.intersectsCoordinate.bind(this))}return!1}setCenter(ee){const te=this.stride,st=this.flatCoordinates[te]-this.flatCoordinates[0],ot=ee.slice();ot[te]=ot[0]+st;for(let ct=1;ct<te;++ct)ot[te+ct]=ee[ct];this.setFlatCoordinates(this.layout,ot),this.changed()}setCenterAndRadius(ee,te,st){this.setLayout(st,ee,0),this.flatCoordinates||(this.flatCoordinates=[]);const ot=this.flatCoordinates;let ct=deflateCoordinate(ot,0,ee,this.stride);ot[ct++]=ot[0]+te;for(let ut=1,dt=this.stride;ut<dt;++ut)ot[ct++]=ot[ut];ot.length=ct,this.changed()}getCoordinates(){return null}setCoordinates(ee,te){}setRadius(ee){this.flatCoordinates[this.stride]=this.flatCoordinates[0]+ee,this.changed()}rotate(ee,te){const st=this.getCenter(),ot=this.getStride();this.setCenter(rotate(st,0,st.length,ot,ee,te,st)),this.changed()}}Circle.prototype.transform;
71const ViewHint={ANIMATING:0,INTERACTING:1},RenderEventType={PRERENDER:"prerender",POSTRENDER:"postrender",PRECOMPOSE:"precompose",POSTCOMPOSE:"postcompose",RENDERCOMPLETE:"rendercomplete"},NO_COLOR=[NaN,NaN,NaN,0];let colorParseContext;function getColorParseContext(){return colorParseContext||(colorParseContext=createCanvasContext2D(1,1,void 0,{willReadFrequently:!0,desynchronized:!0})),colorParseContext}const rgbModernRegEx=/^rgba?\(\s*(\d+%?)\s+(\d+%?)\s+(\d+%?)(?:\s*\/\s*(\d+%|\d*\.\d+|[01]))?\s*\)$/i,rgbLegacyAbsoluteRegEx=/^rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)(?:\s*,\s*(\d+%|\d*\.\d+|[01]))?\s*\)$/i,rgbLegacyPercentageRegEx=/^rgba?\(\s*(\d+%)\s*,\s*(\d+%)\s*,\s*(\d+%)(?:\s*,\s*(\d+%|\d*\.\d+|[01]))?\s*\)$/i,hexRegEx=/^#([\da-f]{3,4}|[\da-f]{6}|[\da-f]{8})$/i;function toColorComponent(ne,ee){return ne.endsWith("%")?Number(ne.substring(0,ne.length-1))/ee:Number(ne)}function throwInvalidColor(ne){throw new Error('failed to parse "'+ne+'" as color')}function parseRgba(ne){if(ne.toLowerCase().startsWith("rgb")){const ct=ne.match(rgbLegacyAbsoluteRegEx)||ne.match(rgbModernRegEx)||ne.match(rgbLegacyPercentageRegEx);if(ct){const ut=ct[4],dt=100/255;return[clamp$1(toColorComponent(ct[1],dt)+.5|0,0,255),clamp$1(toColorComponent(ct[2],dt)+.5|0,0,255),clamp$1(toColorComponent(ct[3],dt)+.5|0,0,255),ut!==void 0?clamp$1(toColorComponent(ut,100),0,1):1]}throwInvalidColor(ne)}if(ne.startsWith("#")){if(hexRegEx.test(ne)){const ct=ne.substring(1),ut=ct.length<=4?1:2,dt=[0,0,0,255];for(let ht=0,ft=ct.length;ht<ft;ht+=ut){let pt=parseInt(ct.substring(ht,ht+ut),16);ut===1&&(pt+=pt<<4),dt[ht/ut]=pt}return dt[3]=dt[3]/255,dt}throwInvalidColor(ne)}const ee=getColorParseContext();ee.fillStyle="#abcdef";let te=ee.fillStyle;ee.fillStyle=ne,ee.fillStyle===te&&(ee.fillStyle="#fedcba",te=ee.fillStyle,ee.fillStyle=ne,ee.fillStyle===te&&throwInvalidColor(ne));const st=ee.fillStyle;if(st.startsWith("#")||st.startsWith("rgba"))return parseRgba(st);ee.clearRect(0,0,1,1),ee.fillRect(0,0,1,1);const ot=Array.from(ee.getImageData(0,0,1,1).data);return ot[3]=toFixed(ot[3]/255,3),ot}function asString(ne){return typeof ne=="string"?ne:toString(ne)}const MAX_CACHE_SIZE=1024,cache={};let cacheSize=0;function withAlpha(ne){if(ne.length===4)return ne;const ee=ne.slice();return ee[3]=1,ee}function b1(ne){return ne>.0031308?Math.pow(ne,1/2.4)*269.025-14.025:ne*3294.6}function b2(ne){return ne>.2068965?Math.pow(ne,3):(ne-4/29)*(108/841)}function a1(ne){return ne>10.314724?Math.pow((ne+14.025)/269.025,2.4):ne/3294.6}function a2(ne){return ne>.0088564?Math.pow(ne,1/3):ne/(108/841)+4/29}function rgbaToLcha(ne){const ee=a1(ne[0]),te=a1(ne[1]),st=a1(ne[2]),ot=a2(ee*.222488403+te*.716873169+st*.06060791),ct=500*(a2(ee*.452247074+te*.399439023+st*.148375274)-ot),ut=200*(ot-a2(ee*.016863605+te*.117638439+st*.865350722)),dt=Math.atan2(ut,ct)*(180/Math.PI);return[116*ot-16,Math.sqrt(ct*ct+ut*ut),dt<0?dt+360:dt,ne[3]]}function lchaToRgba(ne){const ee=(ne[0]+16)/116,te=ne[1],st=ne[2]*Math.PI/180,ot=b2(ee),ct=b2(ee+te/500*Math.cos(st)),ut=b2(ee-te/200*Math.sin(st)),dt=b1(ct*3.021973625-ot*1.617392459-ut*.404875592),ht=b1(ct*-.943766287+ot*1.916279586+ut*.027607165),ft=b1(ct*.069407491-ot*.22898585+ut*1.159737864);return[clamp$1(dt+.5|0,0,255),clamp$1(ht+.5|0,0,255),clamp$1(ft+.5|0,0,255),ne[3]]}function fromString(ne){if(ne==="none")return NO_COLOR;if(cache.hasOwnProperty(ne))return cache[ne];if(cacheSize>=MAX_CACHE_SIZE){let te=0;for(const st in cache)(te++&3)===0&&(delete cache[st],--cacheSize)}const ee=parseRgba(ne);ee.length!==4&&throwInvalidColor(ne);for(const te of ee)isNaN(te)&&throwInvalidColor(ne);return cache[ne]=ee,++cacheSize,ee}function asArray(ne){return Array.isArray(ne)?ne:fromString(ne)}function toString(ne){let ee=ne[0];ee!=(ee|0)&&(ee=ee+.5|0);let te=ne[1];te!=(te|0)&&(te=te+.5|0);let st=ne[2];st!=(st|0)&&(st=st+.5|0);const ot=ne[3]===void 0?1:Math.round(ne[3]*1e3)/1e3;return"rgba("+ee+","+te+","+st+","+ot+")"}class IconImageCache{constructor(){this.cache_={},this.patternCache_={},this.cacheSize_=0,this.maxCacheSize_=1024}clear(){this.cache_={},this.patternCache_={},this.cacheSize_=0}canExpireCache(){return this.cacheSize_>this.maxCacheSize_}
71expire(){if(this.canExpireCache()){let ee=0;for(const te in this.cache_){const st=this.cache_[te];(ee++&3)===0&&!st.hasListener()&&(delete this.cache_[te],delete this.patternCache_[te],--this.cacheSize_)}}}get(ee,te){const st=getCacheKey(ee,te);return st in this.cache_?this.cache_[st]:null}getPattern(ee,te){const st=getCacheKey(ee,te);return st in this.patternCache_?this.patternCache_[st]:null}set(ee,te,st,ot){const ct=getCacheKey(ee,te),ut=ct in this.cache_;this.cache_[ct]=st,ot&&(st.getImageState()===ImageState.IDLE&&st.load(),st.getImageState()===ImageState.LOADING?st.ready().then(()=>{this.patternCache_[ct]=getSharedCanvasContext2D().createPattern(st.getImage(1),"repeat")}):this.patternCache_[ct]=getSharedCanvasContext2D().createPattern(st.getImage(1),"repeat")),ut||++this.cacheSize_}setSize(ee){this.maxCacheSize_=ee,this.expire()}}function getCacheKey(ne,ee){const te=ee?asArray(ee):"null";return ne+":"+te}const shared=new IconImageCache;let taintedTestContext=null;class IconImage extends Target{constructor(ee,te,st,ot,ct){super(),this.hitDetectionImage_=null,this.image_=ee,this.crossOrigin_=st==null?void 0:st.crossOrigin,this.referrerPolicy_=st==null?void 0:st.referrerPolicy,this.canvas_={},this.color_=ct,this.imageState_=ot===void 0?ImageState.IDLE:ot,this.size_=ee&&ee.width&&ee.height?[ee.width,ee.height]:null,this.src_=te,this.tainted_,this.ready_=null}initializeImage_(){this.image_=new Image,this.crossOrigin_!==null&&(this.image_.crossOrigin=this.crossOrigin_),this.referrerPolicy_!==void 0&&(this.image_.referrerPolicy=this.referrerPolicy_)}isTainted_(){if(this.tainted_===void 0&&this.imageState_===ImageState.LOADED){taintedTestContext||(taintedTestContext=createCanvasContext2D(1,1,void 0,{willReadFrequently:!0})),taintedTestContext.drawImage(this.image_,0,0);try{taintedTestContext.getImageData(0,0,1,1),this.tainted_=!1}catch{taintedTestContext=null,this.tainted_=!0}}return this.tainted_===!0}dispatchChangeEvent_(){this.dispatchEvent(EventType.CHANGE)}handleImageError_(){this.imageState_=ImageState.ERROR,this.dispatchChangeEvent_()}handleImageLoad_(){this.imageState_=ImageState.LOADED,this.size_=[this.image_.width,this.image_.height],this.dispatchChangeEvent_()}getImage(ee){return this.image_||this.initializeImage_(),this.replaceColor_(ee),this.canvas_[ee]?this.canvas_[ee]:this.image_}setImage(ee){this.image_=ee}getPixelRatio(ee){return this.replaceColor_(ee),this.canvas_[ee]?ee:1}getImageState(){return this.imageState_}getHitDetectionImage(){if(this.image_||this.initializeImage_(),!this.hitDetectionImage_)if(this.isTainted_()){const ee=this.size_[0],te=this.size_[1],st=createCanvasContext2D(ee,te);st.fillRect(0,0,ee,te),this.hitDetectionImage_=st.canvas}else this.hitDetectionImage_=this.image_;return this.hitDetectionImage_}getSize(){return this.size_}getSrc(){return this.src_}load(){if(this.imageState_===ImageState.IDLE){this.image_||this.initializeImage_(),this.imageState_=ImageState.LOADING;try{this.src_!==void 0&&(this.image_.src=this.src_)}catch{this.handleImageError_()}this.image_ instanceof HTMLImageElement&&decodeFallback(this.image_,this.src_).then(ee=>{this.image_=ee,this.handleImageLoad_()}).catch(this.handleImageError_.bind(this))}}replaceColor_(ee){if(!this.color_||this.canvas_[ee]||this.imageState_!==ImageState.LOADED)return;const te=this.image_,st=createCanvasContext2D(Math.ceil(te.width*ee),Math.ceil(te.height*ee)),ot=st.canvas;st.scale(ee,ee),st.drawImage(te,0,0),st.globalCompositeOperation="multiply",st.fillStyle=asString(this.color_),st.fillRect(0,0,ot.width/ee,ot.height/ee),st.globalCompositeOperation="destination-in",st.drawImage(te,0,0),this.canvas_[ee]=ot}ready(){return this.ready_||(this.ready_=new Promise(ee=>{if(this.imageState_===ImageState.LOADED||this.imageState_===ImageState.ERROR)ee();else{const te=()=>{(this.imageState_===ImageState.LOADED||this.imageState_===ImageState.ERROR)&&(this.removeEventListener(EventType.CHANGE,te),ee())};this.addEventListener(EventType.CHANGE,te)}})),this.ready_}}function get$2(ne,ee,te,st,ot,ct){let ut=ee===void 0?void 0:shared.get(ee,ot);return ut||(ut=new IconImage(ne,ne&&"src"in ne?ne.src||void 0:ee,te,st,ot),shared.set(ee,ot,ut,ct)),ct&&ut&&!sh
71ared.getPattern(ee,ot)&&shared.set(ee,ot,ut,ct),ut}function asColorLike(ne){return ne?Array.isArray(ne)?toString(ne):typeof ne=="object"&&"src"in ne?asCanvasPattern(ne):ne:null}function asCanvasPattern(ne){if(!ne.offset||!ne.size)return shared.getPattern(ne.src,ne.color);const ee=ne.src+":"+ne.offset,te=shared.getPattern(ee,ne.color);if(te)return te;const st=shared.get(ne.src,null);if(st.getImageState()!==ImageState.LOADED)return null;const ot=createCanvasContext2D(ne.size[0],ne.size[1]);return ot.drawImage(st.getImage(1),ne.offset[0],ne.offset[1],ne.size[0],ne.size[1],0,0,ne.size[0],ne.size[1]),get$2(ot.canvas,ee,void 0,ImageState.LOADED,ne.color,!0),shared.getPattern(ee,ne.color)}class VectorContext{drawCustom(ee,te,st,ot,ct){}drawGeometry(ee){}setStyle(ee){}drawCircle(ee,te,st){}drawFeature(ee,te,st){}drawGeometryCollection(ee,te,st){}drawLineString(ee,te,st){}drawMultiLineString(ee,te,st){}drawMultiPoint(ee,te,st){}drawMultiPolygon(ee,te,st){}drawPoint(ee,te,st){}drawPolygon(ee,te,st){}drawText(ee,te,st){}setFillStrokeStyle(ee,te){}setImageStyle(ee,te){}setTextStyle(ee,te){}}const defaultFont="10px sans-serif",defaultFillStyle="#000",defaultLineCap="round",defaultLineDash=[],defaultLineDashOffset=0,defaultLineJoin="round",defaultMiterLimit=10,defaultStrokeOffset=0,defaultStrokeStyle="#000",defaultTextAlign="center",defaultTextBaseline="middle",defaultPadding=[0,0,0,0],defaultLineWidth=1,checkedFonts=new BaseObject;let measureContext$1=null,measureFont;const textHeights={},genericFontFamilies=new Set(["serif","sans-serif","monospace","cursive","fantasy","system-ui","ui-serif","ui-sans-serif","ui-monospace","ui-rounded","emoji","math","fangsong"]);function getFontKey(ne,ee,te){return`${ne} ${ee} 16px "${te}"`}const registerFont=(function(){let ee,te;async function st(ct){await te.ready;const ut=getFontParameters(ct),dt=ut.families[0].toLowerCase(),ht=ut.weight,ft=[];return te.forEach(mt=>{const yt=mt.family.replace(/^['"]|['"]$/g,"").toLowerCase(),vt=fontWeights$1[mt.weight]||mt.weight;yt===dt&&mt.style===ut.style&&vt==ht&&ft.push(mt)}),ft.length===0?!1:(await Promise.all(ft.map(mt=>mt.load().then(()=>!0,()=>!1)))).some(mt=>mt)}async function ot(){await te.ready;let ct=!0;const ut=checkedFonts.getProperties(),dt=Object.keys(ut).filter(ht=>ut[ht]<100);for(let ht=dt.length-1;ht>=0;--ht){const ft=dt[ht];let pt=ut[ft];pt<100&&(await st(ft)?(clear$1(textHeights),checkedFonts.set(ft,100)):(pt+=10,checkedFonts.set(ft,pt,!0),pt<100&&(ct=!1)))}ee=void 0,ct||(ee=setTimeout(ot,100))}return async function(ct){te||(te=WORKER_OFFSCREEN_CANVAS?self.fonts:document.fonts);const ut=getFontParameters(ct);if(!ut)return;const dt=ut.families;let ht=!1;for(const ft of dt){if(genericFontFamilies.has(ft))continue;const pt=getFontKey(ut.style,ut.weight,ft);checkedFonts.get(pt)===void 0&&(checkedFonts.set(pt,0,!0),ht=!0)}ht&&(clearTimeout(ee),ee=setTimeout(ot,100))}})(),measureTextHeight=(function(){let ne;return function(ee){let te=textHeights[ee];if(te==null){if(WORKER_OFFSCREEN_CANVAS){const st=getFontParameters(ee),ot=measureText$1(ee,"Žg");te=(isNaN(Number(st.lineHeight))?1.2:Number(st.lineHeight))*(ot.actualBoundingBoxAscent+ot.actualBoundingBoxDescent)}else ne||(ne=document.createElement("div"),ne.innerHTML="M",ne.style.minHeight="0",ne.style.maxHeight="none",ne.style.height="auto",ne.style.padding="0",ne.style.border="none",ne.style.position="absolute",ne.style.display="block",ne.style.left="-99999px"),ne.style.font=ee,document.body.appendChild(ne),te=ne.offsetHeight,document.body.removeChild(ne);textHeights[ee]=te}return te}})();function measureText$1(ne,ee){return measureContext$1||(measureContext$1=createCanvasContext2D(1,1)),ne!=measureFont&&(measureContext$1.font=ne,measureFont=measureContext$1.font),measureContext$1.measureText(ee)}function measureTextWidth(ne,ee){return measureText$1(ne,ee).width}function measureAndCacheTextWidth(ne,ee,te){if(ee in te)return te[ee];const st=ee.split(`
72`).reduce((ot,ct)=>Math.max(ot,measureTextWidth(ne,ct)),0);return te[ee]=st,st}function getTextDimensions(ne,ee){const te=[],st=[],ot=[];let ct=0,ut=0,dt=0,ht=0;for(let ft=0,pt=ee.length;ft<=pt;ft+=2){const mt=ee[ft];if(mt===`
73`||ft===pt){ct=Math.max(ct,ut),ot.push(ut),ut=0,dt+=ht,ht=0;continue}const yt=ee[ft+1]||ne.font,vt=measureTextWidth(yt,mt);te.push(vt),ut+=vt;const _t=measureTextHeight(yt);st.push(_t),ht=Math.max(ht,_t)}return{width:ct,height:dt,widths:te,heights:st,lineWidths:ot}}function drawImageOrLabel(ne,ee,te,st,ot,ct,ut,dt,ht,ft,pt){ne.save(),te!==1&&(ne.globalAlpha===void 0?ne.globalAlpha=mt=>mt.globalAlpha*=te:ne.globalAlpha*=te),ee&&ne.transform.apply(ne,ee),st.contextInstructions?(ne.translate(ht,ft),ne.scale(pt[0],pt[1]),executeLabelInstructions(st,ne)):pt[0]<0||pt[1]<0?(ne.translate(ht,ft),ne.scale(pt[0],pt[1]),ne.drawImage(st,ot,ct,ut,dt,0,0,ut,dt)):ne.drawImage(st,ot,ct,ut,dt,ht,ft,ut*pt[0],dt*pt[1]),ne.restore(
73)}function executeLabelInstructions(ne,ee){const te=ne.contextInstructions;for(let st=0,ot=te.length;st<ot;st+=2)Array.isArray(te[st+1])?ee[te[st]].apply(ee,te[st+1]):ee[te[st]]=te[st+1]}const Instruction={BEGIN_GEOMETRY:0,BEGIN_PATH:1,CIRCLE:2,CLOSE_PATH:3,CUSTOM:4,DRAW_CHARS:5,DRAW_IMAGE:6,END_GEOMETRY:7,FILL:8,MOVE_TO_LINE_TO:9,SET_FILL_STYLE:10,SET_STROKE_STYLE:11,STROKE:12},fillInstruction=[Instruction.FILL],strokeInstruction=[Instruction.STROKE],beginPathInstruction=[Instruction.BEGIN_PATH],closePathInstruction=[Instruction.CLOSE_PATH];class CanvasBuilder extends VectorContext{constructor(ee,te,st,ot){super(),this.tolerance=ee,this.maxExtent=te,this.pixelRatio=ot,this.maxLineWidth=0,this.resolution=st,this.beginGeometryInstruction1_=null,this.beginGeometryInstruction2_=null,this.bufferedMaxExtent_=null,this.instructions=[],this.coordinates=[],this.tmpCoordinate_=[],this.hitDetectionInstructions=[],this.state={}}applyPixelRatio(ee){const te=this.pixelRatio;return te==1?ee:ee.map(function(st){return st*te})}appendFlatPointCoordinates(ee,te){const st=this.getBufferedMaxExtent(),ot=this.tmpCoordinate_,ct=this.coordinates;let ut=ct.length;for(let dt=0,ht=ee.length;dt<ht;dt+=te)ot[0]=ee[dt],ot[1]=ee[dt+1],containsCoordinate(st,ot)&&(ct[ut++]=ot[0],ct[ut++]=ot[1]);return ut}appendFlatLineCoordinates(ee,te,st,ot,ct,ut){const dt=this.coordinates;let ht=dt.length;const ft=this.getBufferedMaxExtent();ut&&(te+=ot);let pt=ee[te],mt=ee[te+1];const yt=this.tmpCoordinate_;let vt=!0,_t,bt,xt;for(_t=te+ot;_t<st;_t+=ot)yt[0]=ee[_t],yt[1]=ee[_t+1],xt=coordinateRelationship(ft,yt),xt!==bt?(vt&&(dt[ht++]=pt,dt[ht++]=mt,vt=!1),dt[ht++]=yt[0],dt[ht++]=yt[1]):xt===Relationship.INTERSECTING?(dt[ht++]=yt[0],dt[ht++]=yt[1],vt=!1):vt=!0,pt=yt[0],mt=yt[1],bt=xt;return(ct&&vt||_t===te+ot)&&(dt[ht++]=pt,dt[ht++]=mt),ht}drawCustomCoordinates_(ee,te,st,ot,ct){for(let ut=0,dt=st.length;ut<dt;++ut){const ht=st[ut],ft=this.appendFlatLineCoordinates(ee,te,ht,ot,!1,!1);ct.push(ft),te=ht}return te}drawCustom(ee,te,st,ot,ct){this.beginGeometry(ee,te,ct);const ut=ee.getType(),dt=ee.getStride(),ht=this.coordinates.length;let ft,pt,mt,yt,vt;switch(ut){case"MultiPolygon":ft=ee.getOrientedFlatCoordinates(),yt=[];const _t=ee.getEndss();vt=0;for(let bt=0,xt=_t.length;bt<xt;++bt){const Mt=[];vt=this.drawCustomCoordinates_(ft,vt,_t[bt],dt,Mt),yt.push(Mt)}this.instructions.push([Instruction.CUSTOM,ht,yt,ee,st,inflateMultiCoordinatesArray,ct]),this.hitDetectionInstructions.push([Instruction.CUSTOM,ht,yt,ee,ot||st,inflateMultiCoordinatesArray,ct]);break;case"Polygon":case"MultiLineString":mt=[],ft=ut=="Polygon"?ee.getOrientedFlatCoordinates():ee.getFlatCoordinates(),vt=this.drawCustomCoordinates_(ft,0,ee.getEnds(),dt,mt),this.instructions.push([Instruction.CUSTOM,ht,mt,ee,st,inflateCoordinatesArray,ct]),this.hitDetectionInstructions.push([Instruction.CUSTOM,ht,mt,ee,ot||st,inflateCoordinatesArray,ct]);break;case"LineString":case"Circle":ft=ee.getFlatCoordinates(),pt=this.appendFlatLineCoordinates(ft,0,ft.length,dt,!1,!1),this.instructions.push([Instruction.CUSTOM,ht,pt,ee,st,inflateCoordinates,ct]),this.hitDetectionInstructions.push([Instruction.CUSTOM,ht,pt,ee,ot||st,inflateCoordinates,ct]);break;case"MultiPoint":ft=ee.getFlatCoordinates(),pt=this.appendFlatPointCoordinates(ft,dt),pt>ht&&(this.instructions.push([Instruction.CUSTOM,ht,pt,ee,st,inflateCoordinates,ct]),this.hitDetectionInstructions.push([Instruction.CUSTOM,ht,pt,ee,ot||st,inflateCoordinates,ct]));break;case"Point":ft=ee.getFlatCoordinates(),this.coordinates.push(ft[0],ft[1]),pt=this.coordinates.length,this.instructions.push([Instruction.CUSTOM,ht,pt,ee,st,void 0,ct]),this.hitDetectionInstructions.push([Instruction.CUSTOM,ht,pt,ee,ot||st,void 0,ct]);break}this.endGeometry(te)}beginGeometry(ee,te,st){this.beginGeometryInstruction1_=[Instruction.BEGIN_GEOMETRY,te,0,ee,st],this.instructions.push(this.beginGeometryInstruction1_),this.beginGeometryInstruction2_=[Instruction.BEGIN_GEOMETRY,te,0,ee,st],this.hitDetectionInstructions.push(this.beginGeometryInstruction2_)}finish(){return{instructions:this.instructions,hitDetectionInstructions:this.hitDetectionInstructions,coordinates:this.coordinates}}reverseHitDetectionInstructions(){const ee=this.hitDetectionInstructions;ee.reverse();let te;const st=ee.length;let ot,ct,ut=-1;for(te=0;te<st;++te)ot=ee[te],ct=ot[0],ct==Instruction.END_GEOMETRY?ut=te:ct==Instruction.BEGIN_G
73EOMETRY&&(ot[2]=te,reverseSubArray(this.hitDetectionInstructions,ut,te),ut=-1)}fillStyleToState(ee,te={}){if(ee){const st=ee.getColor();te.fillPatternScale=st&&typeof st=="object"&&"src"in st?this.pixelRatio:1,te.fillStyle=asColorLike(st||defaultFillStyle)??void 0}else te.fillStyle=void 0;return te}strokeStyleToState(ee,te={}){if(ee){const st=ee.getColor();te.strokeStyle=asColorLike(st||defaultStrokeStyle);const ot=ee.getLineCap();te.lineCap=ot!==void 0?ot:defaultLineCap;const ct=ee.getLineDash();te.lineDash=ct?ct.slice():defaultLineDash;const ut=ee.getLineDashOffset();te.lineDashOffset=ut||defaultLineDashOffset;const dt=ee.getLineJoin();te.lineJoin=dt!==void 0?dt:defaultLineJoin;const ht=ee.getWidth();te.lineWidth=ht!==void 0?ht:defaultLineWidth;const ft=ee.getMiterLimit();te.miterLimit=ft!==void 0?ft:defaultMiterLimit;const pt=ee.getOffset();te.strokeOffset=pt??defaultStrokeOffset,te.lineWidth>this.maxLineWidth&&(this.maxLineWidth=te.lineWidth,this.bufferedMaxExtent_=null)}else te.strokeStyle=void 0,te.lineCap=void 0,te.lineDash=null,te.lineDashOffset=void 0,te.lineJoin=void 0,te.lineWidth=void 0,te.miterLimit=void 0,te.strokeOffset=void 0;return te}setFillStrokeStyle(ee,te){const st=this.state;this.fillStyleToState(ee,st),this.strokeStyleToState(te,st)}createFill(ee){const te=ee.fillStyle,st=[Instruction.SET_FILL_STYLE,te];return typeof te!="string"&&st.push(ee.fillPatternScale),st}applyStroke(ee){this.instructions.push(this.createStroke(ee))}createStroke(ee){return[Instruction.SET_STROKE_STYLE,ee.strokeStyle,ee.lineWidth*this.pixelRatio,ee.lineCap,ee.lineJoin,ee.miterLimit,ee.lineDash?this.applyPixelRatio(ee.lineDash):null,ee.lineDashOffset*this.pixelRatio]}updateFillStyle(ee,te){const st=ee.fillStyle;(st!==void 0&&typeof st!="string"||ee.currentFillStyle!=st)&&(this.instructions.push(te.call(this,ee)),ee.currentFillStyle=st)}updateStrokeStyle(ee,te){const st=ee.strokeStyle,ot=ee.lineCap,ct=ee.lineDash,ut=ee.lineDashOffset,dt=ee.lineJoin,ht=ee.lineWidth,ft=ee.miterLimit,pt=ee.strokeOffset;(ee.currentStrokeStyle!=st||ee.currentLineCap!=ot||ct!=ee.currentLineDash&&!equals(ee.currentLineDash,ct)||ee.currentLineDashOffset!=ut||ee.currentLineJoin!=dt||ee.currentLineWidth!=ht||ee.currentMiterLimit!=ft||ee.currentStrokeOffset!=pt)&&(te.call(this,ee),ee.currentStrokeStyle=st,ee.currentLineCap=ot,ee.currentLineDash=ct,ee.currentLineDashOffset=ut,ee.currentLineJoin=dt,ee.currentLineWidth=ht,ee.currentMiterLimit=ft,ee.currentStrokeOffset=pt)}endGeometry(ee){this.beginGeometryInstruction1_[2]=this.instructions.length,this.beginGeometryInstruction1_=null,this.beginGeometryInstruction2_[2]=this.hitDetectionInstructions.length,this.beginGeometryInstruction2_=null;const te=[Instruction.END_GEOMETRY,ee];this.instructions.push(te),this.hitDetectionInstructions.push(te)}getBufferedMaxExtent(){if(!this.bufferedMaxExtent_&&(this.bufferedMaxExtent_=clone$2(this.maxExtent),this.maxLineWidth>0)){const ee=this.resolution*(this.maxLineWidth+1)/2;buffer(this.bufferedMaxExtent_,ee,this.bufferedMaxExtent_)}return this.bufferedMaxExtent_}}class CanvasImageBuilder extends CanvasBuilder{constructor(ee,te,st,ot){super(ee,te,st,ot),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(ee,te,st){if(!this.image_||this.maxExtent&&!containsCoordinate(this.maxExtent,ee.getFlatCoordinates()))return;this.beginGeometry(ee,te,st);const ot=ee.getFlatCoordinates(),ct=ee.getStride(),ut=this.coordinates.length,dt=this.appendFlatPointCoordinates(ot,ct);this.instructions.push([Instruction.DRAW_IMAGE,ut,dt,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([Instruction.DRAW_IMAGE,ut,dt,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(te)}drawMultiPoint(ee,te,st){if(!this.image_)return;this.beginGeometry(ee,te,st);const ot=ee.getFlatCoordinates(),ct=[];for(let ht=0,ft=ot.length;ht<ft;ht+=ee.getStride())(!this.maxExtent||containsCoordinate(this.maxExtent,ot.slice(ht,ht+2)))&&ct.push(ot[ht],ot[ht+1]);const ut=this.coordinates.length,dt=this.appendFlatPointCoordinates(ct,2);this.instructions.push([Instruction.DRAW_IMAGE,ut,dt,this.image_,this.anchorX_*this.imagePixelRatio_,this.anchorY_*this.imagePixelRatio_,Math.
73ceil(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([Instruction.DRAW_IMAGE,ut,dt,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(te)}finish(){return this.reverseHitDetectionInstructions(),this.anchorX_=void 0,this.anchorY_=void 0,this.hitDetectionImage_=null,this.image_=null,this.imagePixelRatio_=void 0,this.height_=void 0,this.scale_=void 0,this.opacity_=void 0,this.originX_=void 0,this.originY_=void 0,this.rotateWithView_=void 0,this.rotation_=void 0,this.width_=void 0,super.finish()}setImageStyle(ee,te){const st=ee.getAnchor(),ot=ee.getSize(),ct=ee.getOrigin();this.imagePixelRatio_=ee.getPixelRatio(this.pixelRatio),this.anchorX_=st[0],this.anchorY_=st[1],this.hitDetectionImage_=ee.getHitDetectionImage(),this.image_=ee.getImage(this.pixelRatio),this.height_=ot[1],this.opacity_=ee.getOpacity(),this.originX_=ct[0],this.originY_=ct[1],this.rotateWithView_=ee.getRotateWithView(),this.rotation_=ee.getRotation(),this.scale_=ee.getScaleArray(),this.width_=ot[0],this.declutterMode_=ee.getDeclutterMode(),this.declutterImageWithText_=te}}class CanvasLineStringBuilder extends CanvasBuilder{constructor(ee,te,st,ot){super(ee,te,st,ot)}drawFlatCoordinates_(ee,te,st,ot,ct){const ut=this.coordinates.length,dt=this.appendFlatLineCoordinates(ee,te,st,ot,!1,!1);return this.instructions.push([Instruction.MOVE_TO_LINE_TO,ut,dt,ct*this.pixelRatio]),this.hitDetectionInstructions.push([Instruction.MOVE_TO_LINE_TO,ut,dt,ct]),st}drawLineString(ee,te,st){const ot=this.state,ct=ot.strokeStyle,ut=ot.lineWidth,dt=ot.strokeOffset;if(ct===void 0||ut===void 0)return;this.updateStrokeStyle(ot,this.applyStroke),this.beginGeometry(ee,te,st),this.hitDetectionInstructions.push([Instruction.SET_STROKE_STYLE,defaultStrokeStyle,ot.lineWidth,ot.lineCap,ot.lineJoin,ot.miterLimit,defaultLineDash,defaultLineDashOffset],beginPathInstruction);const ht=ee.getFlatCoordinates(),ft=ee.getStride();this.drawFlatCoordinates_(ht,0,ht.length,ft,dt),this.hitDetectionInstructions.push(strokeInstruction),this.endGeometry(te)}drawMultiLineString(ee,te,st){const ot=this.state,ct=ot.strokeStyle,ut=ot.lineWidth,dt=ot.strokeOffset;if(ct===void 0||ut===void 0)return;this.updateStrokeStyle(ot,this.applyStroke),this.beginGeometry(ee,te,st),this.hitDetectionInstructions.push([Instruction.SET_STROKE_STYLE,defaultStrokeStyle,ot.lineWidth,ot.lineCap,ot.lineJoin,ot.miterLimit,defaultLineDash,defaultLineDashOffset],beginPathInstruction);const ht=ee.getEnds(),ft=ee.getFlatCoordinates(),pt=ee.getStride();let mt=0;for(let yt=0,vt=ht.length;yt<vt;++yt)mt=this.drawFlatCoordinates_(ft,mt,ht[yt],pt,dt);this.hitDetectionInstructions.push(strokeInstruction),this.endGeometry(te)}finish(){const ee=this.state;return ee.lastStroke!=null&&ee.lastStroke!=this.coordinates.length&&this.instructions.push(strokeInstruction),this.reverseHitDetectionInstructions(),this.state=null,super.finish()}applyStroke(ee){ee.lastStroke!=null&&ee.lastStroke!=this.coordinates.length&&(this.instructions.push(strokeInstruction),ee.lastStroke=this.coordinates.length),ee.lastStroke=0,super.applyStroke(ee),this.instructions.push(beginPathInstruction)}}class CanvasPolygonBuilder extends CanvasBuilder{constructor(ee,te,st,ot){super(ee,te,st,ot)}drawFlatCoordinatess_(ee,te,st,ot,ct){const ut=this.state,dt=ut.fillStyle!==void 0,ht=ut.strokeStyle!==void 0,ft=st.length;this.instructions.push(beginPathInstruction),this.hitDetectionInstructions.push(beginPathInstruction);for(let pt=0;pt<ft;++pt){const mt=st[pt],yt=this.coordinates.length,vt=this.appendFlatLineCoordinates(ee,te,mt,ot,!0,!ht);this.instructions.push([Instruction.MOVE_TO_LINE_TO,yt,vt,ct*this.pixelRatio,!0]),this.hitDetectionInstructions.push([Instruction.MOVE_TO_LINE_TO,yt,vt,ct,!0]),ht&&(this.instructions.push(closePathInstruction),this.hitDetectionInstructions.push(closePathInstruction)),te=mt}return dt&&(this.instructions.push(fillInstruction),this.hitDetectionInstructions.push(fillInstruction)),ht&&(this.instructions.push(strokeInstru
73ction),this.hitDetectionInstructions.push(strokeInstruction)),te}drawCircle(ee,te,st){const ot=this.state,ct=ot.fillStyle,ut=ot.strokeStyle,dt=ot.strokeOffset;if(ct===void 0&&ut===void 0||this.handleStrokeOffset_(()=>this.drawCircle(ee,te,st)))return;this.setFillStrokeStyles_(),this.beginGeometry(ee,te,st),ot.fillStyle!==void 0&&this.hitDetectionInstructions.push([Instruction.SET_FILL_STYLE,defaultFillStyle]),ot.strokeStyle!==void 0&&this.hitDetectionInstructions.push([Instruction.SET_STROKE_STYLE,defaultStrokeStyle,ot.lineWidth,ot.lineCap,ot.lineJoin,ot.miterLimit,defaultLineDash,defaultLineDashOffset]);const ht=ee.getFlatCoordinates(),ft=ee.getStride(),pt=this.coordinates.length;this.appendFlatLineCoordinates(ht,0,ht.length,ft,!1,!1);const mt=[Instruction.CIRCLE,pt,dt];this.instructions.push(beginPathInstruction,mt),this.hitDetectionInstructions.push(beginPathInstruction,mt),ot.fillStyle!==void 0&&(this.instructions.push(fillInstruction),this.hitDetectionInstructions.push(fillInstruction)),ot.strokeStyle!==void 0&&(this.instructions.push(strokeInstruction),this.hitDetectionInstructions.push(strokeInstruction)),this.endGeometry(te)}drawPolygon(ee,te,st){const ot=this.state,ct=ot.fillStyle,ut=ot.strokeStyle,dt=ot.strokeOffset;if(ct===void 0&&ut===void 0||this.handleStrokeOffset_(()=>this.drawPolygon(ee,te,st)))return;this.setFillStrokeStyles_(),this.beginGeometry(ee,te,st),ot.fillStyle!==void 0&&this.hitDetectionInstructions.push([Instruction.SET_FILL_STYLE,defaultFillStyle]),ot.strokeStyle!==void 0&&this.hitDetectionInstructions.push([Instruction.SET_STROKE_STYLE,defaultStrokeStyle,ot.lineWidth,ot.lineCap,ot.lineJoin,ot.miterLimit,defaultLineDash,defaultLineDashOffset]);const ht=ee.getEnds(),ft=ee.getOrientedFlatCoordinates(),pt=ee.getStride();this.drawFlatCoordinatess_(ft,0,ht,pt,dt),this.endGeometry(te)}drawMultiPolygon(ee,te,st){const ot=this.state,ct=ot.fillStyle,ut=ot.strokeStyle,dt=ot.strokeOffset;if(ct===void 0&&ut===void 0||this.handleStrokeOffset_(()=>this.drawMultiPolygon(ee,te,st)))return;this.setFillStrokeStyles_(),this.beginGeometry(ee,te,st),ot.fillStyle!==void 0&&this.hitDetectionInstructions.push([Instruction.SET_FILL_STYLE,defaultFillStyle]),ot.strokeStyle!==void 0&&this.hitDetectionInstructions.push([Instruction.SET_STROKE_STYLE,defaultStrokeStyle,ot.lineWidth,ot.lineCap,ot.lineJoin,ot.miterLimit,defaultLineDash,defaultLineDashOffset]);const ht=ee.getEndss(),ft=ee.getOrientedFlatCoordinates(),pt=ee.getStride();let mt=0;for(let yt=0,vt=ht.length;yt<vt;++yt)mt=this.drawFlatCoordinatess_(ft,mt,ht[yt],pt,dt);this.endGeometry(te)}finish(){this.reverseHitDetectionInstructions(),this.state=null;const ee=this.tolerance;if(ee!==0){const te=this.coordinates;for(let st=0,ot=te.length;st<ot;++st)te[st]=snap(te[st],ee)}return super.finish()}setFillStrokeStyles_(){const ee=this.state;this.updateFillStyle(ee,this.createFill),this.updateStrokeStyle(ee,this.applyStroke)}handleStrokeOffset_(ee){const te=this.state,st=te.fillStyle,ot=te.strokeStyle,ct=te.strokeOffset;return Math.abs(ct)>0&&st!==void 0&&ot!==void 0?(te.strokeStyle=void 0,te.strokeOffset=0,ee(),te.fillStyle=void 0,te.strokeStyle=ot,te.strokeOffset=ct,ee(),te.fillStyle=st,!0):!1}}let clipSegmentStart=0,clipSegmentEnd=1;function clipSegment(ne,ee,te,st,ot,ct,ut,dt){const ht=ut-ot,ft=dt-ct;let pt=0,mt=1;if(ht===0){if(ot<ne||ot>te)return!1}else{let yt=(ne-ot)/ht,vt=(te-ot)/ht;if(yt>vt){const _t=yt;yt=vt,vt=_t}if(yt>pt&&(pt=yt),vt<mt&&(mt=vt),pt>mt)return!1}if(ft===0){if(ct<ee||ct>st)return!1}else{let yt=(ee-ct)/ft,vt=(st-ct)/ft;if(yt>vt){const _t=yt;yt=vt,vt=_t}if(yt>pt&&(pt=yt),vt<mt&&(mt=vt),pt>mt)return!1}return clipSegmentStart=pt,clipSegmentEnd=mt,!0}function clipFlatLineStrings(ne,ee,te,st){const ot=st[0],ct=st[1],ut=st[2],dt=st[3],ht=[],ft=[];let pt=!1,mt,yt,vt=0;for(let _t=0,bt=ee.length;_t<bt;++_t){const xt=ee[_t];let Mt=ne[vt],Ot=ne[vt+1],kt=!1;for(let Nt=vt+te;Nt<xt;Nt+=te){const Gt=ne[Nt],Bt=ne[Nt+1];if(clipSegment(ot,ct,ut,dt,Mt,Ot,Gt,Bt)){const Ut=Gt-Mt,Vt=Bt-Ot,Ht=Mt+clipSegmentStart*Ut,zt=Ot+clipSegmentStart*Vt,jt=Mt+clipSegmentEnd*Ut,Wt=Ot+clipSegmentEnd*Vt;pt&&kt&&Ht===mt&&zt===yt?ht.push(jt,Wt):(pt&&ft.push(ht.length),ht.push(Ht,zt,jt,Wt),pt=!0),mt=jt,yt=Wt,kt=!0}Mt=Gt,Ot=Bt}vt=xt}return pt&&ft.push(ht.length),{flatCoordinates:ht,ends:ft}}function lineChunk(ne,ee,te,st,ot){const ct=[];let ut=te,dt=0,ht=ee.slice(te,2);for(;dt<ne&&ut+ot<st;){const[ft,pt]=ht.slice(-2),mt=ee[ut+ot],yt=ee[ut+ot+1],vt=Math.sqrt((mt-ft)*(mt-ft)+(yt-pt)*(yt-pt));if(dt+=vt,dt>=ne){const _t=(ne-dt+vt)/vt,bt=lerp(ft,mt,_t),xt=lerp(pt,yt,_t);ht.push(bt,xt),ct.push(ht),ht=[bt,xt],dt==ne&&(ut+=ot),dt=0}else if(dt<ne)ht.push(ee[ut+ot],ee[ut+ot+1]),ut+=ot;else{const _t=vt-dt,bt=lerp(ft,mt,_t/vt),xt=lerp(pt,yt,_t/vt);ht.push(bt,xt),ct.push(ht),ht=[bt,xt],dt=0,ut+=ot}}return dt>0&&ct.push(ht),ct}function matchingChunk(ne,ee,te,st,ot){let ct=te,ut=te,dt=0,ht=0,ft=te,pt,mt,yt,vt,_t,bt,xt,Mt,Ot,kt;for(mt=te;mt<st;mt+=ot){const Nt=ee[mt],Gt=ee[mt+1];_t!==void 0&&(Ot=Nt-_t,kt=Gt-bt,vt=Math.sqrt(Ot*Ot+kt*kt),xt!==void 0&&(ht+=yt,pt=Math.acos((xt*Ot+Mt*kt)/(yt*vt)),pt>ne&&(ht>dt&&(dt=ht,ct=ft,ut=mt),ht=0,ft=mt-ot)),yt=vt,xt=Ot,Mt=kt),_t=Nt,bt=Gt}return ht+=vt,ht>dt?[ft,mt]:[ct,ut]}const TEXT_ALIGN={left:0,center:.5,right:1,top:0,middle:.5,hanging:.2,alphabetic:.8,ideographic:.8,bottom:1};class CanvasTextBuilder extends CanvasBuilder{constructor(ee,te,st,ot){super(ee,te,st,ot),this.labels_=null,this.text_="",this.textOffsetX_=0,this.textOffsetY_=0,this.textRotateWithView_=void 0,this.textKeepUpright_=void 0,this.textRotation_=0,this.textFillState_=null,this.fillStates={},this.fillStates[defaultFillStyle]={fillStyle:defaultFillStyle},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 ee=super.finish();return ee.textStates=this.textStates,ee.fillStates=this.fillStates,ee.strokeStates=this.strokeStates,ee}drawText(ee,te,st){const ot=this.textFillState_,ct=this.textStrokeState_,ut=this.textState_;if(this.text_===""||!ut||!ot&&!ct)return;const dt=this.coordinates;let ht=dt.length;
73const ft=ee.getType();let pt=null,mt=ee.getStride();if(ut.placement==="line"&&(ft=="LineString"||ft=="MultiLineString"||ft=="Polygon"||ft=="MultiPolygon")){const yt=ee.getExtent();if(!intersects$1(this.maxExtent,yt))return;let vt;if(pt=ee.getFlatCoordinates(),ft=="LineString")vt=[pt.length];else if(ft=="MultiLineString")vt=ee.getEnds();else if(ft=="Polygon")vt=ee.getEnds().slice(0,1);else if(ft=="MultiPolygon"){const Mt=ee.getEndss();vt=[];for(let Ot=0,kt=Mt.length;Ot<kt;++Ot)vt.push(Mt[Ot][0])}if((ft=="LineString"||ft=="MultiLineString")&&!containsExtent(this.getBufferedMaxExtent(),yt)){const Mt=clipFlatLineStrings(pt,vt,mt,this.getBufferedMaxExtent());if(pt=Mt.flatCoordinates,vt=Mt.ends,mt=2,vt.length===0)return}this.beginGeometry(ee,te,st);const _t=ut.repeat,bt=_t?void 0:ut.textAlign;let xt=0;for(let Mt=0,Ot=vt.length;Mt<Ot;++Mt){let kt;_t?kt=lineChunk(_t*this.resolution,pt,xt,vt[Mt],mt):kt=[pt.slice(xt,vt[Mt])];for(let Nt=0,Gt=kt.length;Nt<Gt;++Nt){const Bt=kt[Nt];let Ut=0,Vt=Bt.length;if(bt==null){const zt=matchingChunk(ut.maxAngle,Bt,0,Bt.length,2);Ut=zt[0],Vt=zt[1]}for(let zt=Ut;zt<Vt;zt+=mt)dt.push(Bt[zt],Bt[zt+1]);const Ht=dt.length;xt=vt[Mt],this.drawChars_(ht,Ht),ht=Ht}}this.endGeometry(te)}else{let yt=ut.overflow?null:[];switch(ft){case"Point":case"MultiPoint":pt=ee.getFlatCoordinates();break;case"LineString":pt=ee.getFlatMidpoint();break;case"Circle":pt=ee.getCenter();break;case"MultiLineString":pt=ee.getFlatMidpoints(),mt=2;break;case"Polygon":pt=ee.getFlatInteriorPoint(),ut.overflow||yt.push(pt[2]/this.resolution),mt=3;break;case"MultiPolygon":const Nt=ee.getFlatInteriorPoints();pt=[];for(let Gt=0,Bt=Nt.length;Gt<Bt;Gt+=3)ut.overflow||yt.push(Nt[Gt+2]/this.resolution),pt.push(Nt[Gt],Nt[Gt+1]);if(pt.length===0)return;mt=2;break}const vt=this.appendFlatPointCoordinates(pt,mt);if(vt===ht)return;if(yt&&(vt-ht)/2!==pt.length/mt){let Nt=ht/2;yt=yt.filter((Gt,Bt)=>{const Ut=dt[(Nt+Bt)*2]===pt[Bt*mt]&&dt[(Nt+Bt)*2+1]===pt[Bt*mt+1];return Ut||--Nt,Ut})}this.saveTextStates_();const _t=ut.backgroundFill?this.createFill(this.fillStyleToState(ut.backgroundFill)):null,bt=ut.backgroundStroke?this.createStroke(this.strokeStyleToState(ut.backgroundStroke)):null;this.beginGeometry(ee,te,st);let xt=ut.padding;if(xt!=defaultPadding&&(ut.scale[0]<0||ut.scale[1]<0)){let Nt=ut.padding[0],Gt=ut.padding[1],Bt=ut.padding[2],Ut=ut.padding[3];ut.scale[0]<0&&(Gt=-Gt,Ut=-Ut),ut.scale[1]<0&&(Nt=-Nt,Bt=-Bt),xt=[Nt,Gt,Bt,Ut]}const Mt=this.pixelRatio;this.instructions.push([Instruction.DRAW_IMAGE,ht,vt,null,NaN,NaN,NaN,1,0,0,this.textRotateWithView_,this.textRotation_,[1,1],NaN,this.declutterMode_,this.declutterImageWithText_,xt==defaultPadding?defaultPadding:xt.map(function(Nt){return Nt*Mt}),_t,bt,this.text_,this.textKey_,this.strokeKey_,this.fillKey_,this.textOffsetX_,this.textOffsetY_,yt]);const Ot=1/Mt,kt=_t?_t.slice(0):null;kt&&(kt[1]=defaultFillStyle),this.hitDetectionInstructions.push([Instruction.DRAW_IMAGE,ht,vt,null,NaN,NaN,NaN,1,0,0,this.textRotateWithView_,this.textRotation_,[Ot,Ot],NaN,this.declutterMode_,this.declutterImageWithText_,xt,kt,bt,this.text_,this.textKey_,this.strokeKey_,this.fillKey_?defaultFillStyle:this.fillKey_,this.textOffsetX_,this.textOffsetY_,yt]),this.endGeometry(te)}}saveTextStates_(){const ee=this.textStrokeState_,te=this.textState_,st=this.textFillState_,ot=this.strokeKey_;ee&&(ot in this.strokeStates||(this.strokeStates[ot]={strokeStyle:ee.strokeStyle,lineCap:ee.lineCap,lineDashOffset:ee.lineDashOffset,lineWidth:ee.lineWidth,lineJoin:ee.lineJoin,miterLimit:ee.miterLimit,lineDash:ee.lineDash}));const ct=this.textKey_;ct in this.textStates||(this.textStates[ct]={font:te.font,textAlign:te.textAlign||defaultTextAlign,justify:te.justify,textBaseline:te.textBaseline||defaultTextBaseline,scale:te.scale});const ut=this.fillKey_;st&&(ut in this.fillStates||(this.fillStates[ut]={fillStyle:st.fillStyle}))}drawChars_(ee,te){const st=this.textStrokeState_,ot=this.textState_,ct=this.strokeKey_,ut=this.textKey_,dt=this.fillKey_;this.saveTextStates_();const ht=this.pixelRatio,ft=TEXT_ALIGN[ot.textBaseline],pt=this.textOffsetX_*ht,mt=this.textOffsetY_*ht,yt=this.text_,vt=st?st.lineWidth*Math.abs(ot.scale[0])/2:0;this.instructions.push([Instruction.DRAW_CHARS,ee,te,ft,ot.overflow,dt,ot.maxAngle,ht,mt,ct,vt*ht,yt,ut,1,this.declutterMode_,this.textKeepUpright_,pt]),this.hitDetectionInstructions.push([Instruction.DRAW_CHARS,ee,te,ft,ot.overflow,dt&&defaultFillStyle,ot.maxAngle,ht,mt,ct,vt*ht,yt,ut,1/ht,this.declutterMode_,this.textKeepUpright_,pt])}setTextStyle(ee,te){let st,ot,ct;if(!ee)this.text_="";
73else{const ut=ee.getFill();ut?(ot=this.textFillState_,ot||(ot={},this.textFillState_=ot),ot.fillStyle=asColorLike(ut.getColor()||defaultFillStyle)):(ot=null,this.textFillState_=ot);const dt=ee.getStroke();if(!dt)ct=null,this.textStrokeState_=ct;else{ct=this.textStrokeState_,ct||(ct={},this.textStrokeState_=ct);const bt=dt.getLineDash(),xt=dt.getLineDashOffset(),Mt=dt.getWidth(),Ot=dt.getMiterLimit();ct.lineCap=dt.getLineCap()||defaultLineCap,ct.lineDash=bt?bt.slice():defaultLineDash,ct.lineDashOffset=xt===void 0?defaultLineDashOffset:xt,ct.lineJoin=dt.getLineJoin()||defaultLineJoin,ct.lineWidth=Mt===void 0?defaultLineWidth:Mt,ct.miterLimit=Ot===void 0?defaultMiterLimit:Ot,ct.strokeStyle=asColorLike(dt.getColor()||defaultStrokeStyle)}st=this.textState_;const ht=ee.getFont()||defaultFont;registerFont(ht);const ft=ee.getScaleArray();st.overflow=ee.getOverflow(),st.font=ht,st.maxAngle=ee.getMaxAngle(),st.placement=ee.getPlacement(),st.textAlign=ee.getTextAlign(),st.repeat=ee.getRepeat(),st.justify=ee.getJustify(),st.textBaseline=ee.getTextBaseline()||defaultTextBaseline,st.backgroundFill=ee.getBackgroundFill(),st.backgroundStroke=ee.getBackgroundStroke(),st.padding=ee.getPadding()||defaultPadding,st.scale=ft===void 0?[1,1]:ft;const pt=ee.getOffsetX(),mt=ee.getOffsetY(),yt=ee.getRotateWithView(),vt=ee.getKeepUpright(),_t=ee.getRotation();this.text_=ee.getText()||"",this.textOffsetX_=pt===void 0?0:pt,this.textOffsetY_=mt===void 0?0:mt,this.textRotateWithView_=yt===void 0?!1:yt,this.textKeepUpright_=vt===void 0?!0:vt,this.textRotation_=_t===void 0?0:_t,this.strokeKey_=ct?(typeof ct.strokeStyle=="string"?ct.strokeStyle:getUid(ct.strokeStyle))+ct.lineCap+ct.lineDashOffset+"|"+ct.lineWidth+ct.lineJoin+ct.miterLimit+"["+ct.lineDash.join()+"]":"",this.textKey_=st.font+st.scale+(st.textAlign||"?")+(st.repeat||"?")+(st.justify||"?")+(st.textBaseline||"?"),this.fillKey_=ot&&ot.fillStyle?typeof ot.fillStyle=="string"?ot.fillStyle:"|"+getUid(ot.fillStyle):""}this.declutterMode_=ee.getDeclutterMode(),this.declutterImageWithText_=te}}const BATCH_CONSTRUCTORS={Circle:CanvasPolygonBuilder,Default:CanvasBuilder,Image:CanvasImageBuilder,LineString:CanvasLineStringBuilder,Polygon:CanvasPolygonBuilder,Text:CanvasTextBuilder};class BuilderGroup{constructor(ee,te,st,ot){this.tolerance_=ee,this.maxExtent_=te,this.pixelRatio_=ot,this.resolution_=st,this.buildersByZIndex_={}}finish(){const ee={};for(const te in this.buildersByZIndex_){ee[te]=ee[te]||{};const st=this.buildersByZIndex_[te];for(const ot in st){const ct=st[ot].finish();ee[te][ot]=ct}}return ee}getBuilder(ee,te){const st=ee!==void 0?ee.toString():"0";let ot=this.buildersByZIndex_[st];ot===void 0&&(ot={},this.buildersByZIndex_[st]=ot);let ct=ot[te];if(ct===void 0){const ut=BATCH_CONSTRUCTORS[te];ct=new ut(this.tolerance_,this.maxExtent_,this.resolution_,this.pixelRatio_),ot[te]=ct}return ct}}function offsetLineString(ne,ee,te,st,ot,ct,ut,dt){ut=ut??[],dt=dt??st;const ht=ne[ee+st],ft=ne[ee+st+1],pt=ne[te-2*st],mt=ne[te-2*st+1];let yt,vt,_t,bt,xt,Mt,Ot,kt,Nt=0;for(let Gt=ee;Gt<te;Gt+=st){_t=yt,bt=vt,xt=void 0,Mt=void 0,Gt+st<te&&(xt=ne[Gt+st],Mt=ne[Gt+st+1]),ct&&Gt===ee&&(_t=pt,bt=mt),ct&&Gt===te-st&&(xt=ht,Mt=ft),yt=ne[Gt],vt=ne[Gt+1],[Ot,kt]=offsetLineVertex(yt,vt,_t,bt,xt,Mt,ot),ut[Nt++]=Ot,ut[Nt++]=kt;for(let Bt=2;Bt<dt;Bt++)ut[Nt++]=ne[Gt+Bt]}return ut.length!=Nt&&(ut.length=Nt),ut}function offsetLineVertex(ne,ee,te,st,ot,ct,ut){let dt,ht;te!==void 0&&st!==void 0?(dt=ne-te,ht=ee-st):ot!==void 0&&ct!==void 0?(dt=ot-ne,ht=ct-ee):(dt=1,ht=0);
73const ft=Math.hypot(dt,ht),pt=dt/ft,mt=ht/ft;if(dt=-mt,ht=pt,te===void 0||st===void 0)return[ne+dt*ut,ee+ht*ut];if(ot===void 0||ct===void 0)return[ne+dt*ut,ee+ht*ut];const yt=angleBetween([ne,ee],[te,st],[ot,ct]);if(Math.cos(yt)>.998)return[ne+pt*ut,ee+mt*ut];const vt=Math.cos(yt/2),_t=Math.sin(yt/2),bt=_t*dt+vt*ht,xt=-vt*dt+_t*ht,Mt=bt*(1/_t),Ot=xt*(1/_t);return[ne+Mt*ut,ee+Ot*ut]}function removeOffsetCycles(ne,ee,te=!1){for(let st=0,ot=ne.length-2;st<ot;st+=ee){const ct=te&&st===0?ne.length-3*ee:ne.length-2*ee;for(let ut=ct;ut>st+ee;ut-=ee){const dt=ne[st],ht=ne[st+1],ft=ne[st+ee],pt=ne[st+ee+1],mt=ne[ut],yt=ne[ut+1],vt=ne[ut+ee],_t=ne[ut+ee+1],bt=(_t-yt)*(ft-dt)-(vt-mt)*(pt-ht);if(bt===0)continue;const xt=((vt-mt)*(ht-yt)-(_t-yt)*(dt-mt))/bt,Mt=((ft-dt)*(ht-yt)-(pt-ht)*(dt-mt))/bt;if(xt>0&&xt<1&&Mt>0&&Mt<1){const Ot=dt+xt*(ft-dt),kt=ht+xt*(pt-ht);ne[st+ee]=Ot,ne[st+ee+1]=kt,ne.splice(st+2*ee,ut-st-ee);break}}}return ne}let segmenter;function getSegmenter(){return segmenter||(segmenter=new Intl.Segmenter(void 0,{granularity:"grapheme"})),segmenter}function drawTextOnPath(ne,ee,te,st,ot,ct,ut,dt,ht,ft,pt,mt,yt=!0){let vt=ne[ee],_t=ne[ee+1],bt=0,xt=0,Mt=0,Ot=0;function kt(){bt=vt,xt=_t,ee+=st,vt=ne[ee],_t=ne[ee+1],Ot+=Mt,Mt=Math.sqrt((vt-bt)*(vt-bt)+(_t-xt)*(_t-xt))}do kt();while(ee<te-st&&Ot+Mt<ct);let Nt=Mt===0?0:(ct-Ot)/Mt;const Gt=lerp(bt,vt,Nt),Bt=lerp(xt,_t,Nt),Ut=ee-st,Vt=Ot,Ht=ct+dt*ht(ft,ot,pt);for(;ee<te-st&&Ot+Mt<Ht;)kt();Nt=Mt===0?0:(Ht-Ot)/Mt;const zt=lerp(bt,vt,Nt),jt=lerp(xt,_t,Nt);let Wt=!1;if(yt)if(mt){const An=[Gt,Bt,zt,jt];rotate(An,0,4,2,mt,An,An),Wt=An[0]>An[2]}else Wt=Gt>zt;const Jt=Math.PI,Qt=[],oi=Ut+st===ee;ee=Ut,Mt=0,Ot=Vt,vt=ne[ee],_t=ne[ee+1];let ai;if(oi){kt(),ai=Math.atan2(_t-xt,vt-bt),Wt&&(ai+=ai>0?-Jt:Jt);const An=(zt+Gt)/2,Nn=(jt+Bt)/2;return Qt[0]=[An,Nn,(Ht-ct)/2,ai,ot],Qt}ot=ot.replace(/\n/g," ");const xn=Array.from(getSegmenter().segment(ot),An=>An.segment);for(let An=0,Nn=xn.length;An<Nn;){kt();let Xt=Math.atan2(_t-xt,vt-bt);if(Wt&&(Xt+=Xt>0?-Jt:Jt),ai!==void 0){let wn=Xt-ai;if(wn+=wn>Jt?-2*Jt:wn<-Jt?2*Jt:0,Math.abs(wn)>ut)return null}ai=Xt;const Zt=An;let Kt=0;for(;An<Nn;++An){const wn=Wt?Nn-An-1:An,ni=dt*ht(ft,xn[wn],pt);if(ee+st<te&&Ot+Mt<ct+Kt+ni/2)break;Kt+=ni}if(An===Zt)continue;const ti=(Wt?xn.slice(Nn-An,Nn-Zt):xn.slice(Zt,An)).join("");Nt=Mt===0?0:(ct+Kt/2-Ot)/Mt;const qt=lerp(bt,vt,Nt),ii=lerp(xt,_t,Nt);Qt.push([qt,ii,Kt/2,Xt,ti]),ct+=Kt}return Qt}class ZIndexContext{constructor(){Kn(this,"pushMethodArgs_",(...ee)=>{this.push_(this.pendingMethod_,ee)});this.instructions_=[],this.zIndex=0,this.offset_=0,this.pendingMethod_,this.context_=new Proxy(getSharedCanvasContext2D(),{get:(ee,te)=>{if(typeof ee[te]=="function")return this.pendingMethod_=te,this.pushMethodArgs_},set:(ee,te,st)=>(this.push_(te,st),!0)})}push_(...ee){const te=this.instructions_,st=this.zIndex+this.offset_;te[st]||(te[st]=[]),te[st].push(...ee)}pushFunction(ee){this.push_(ee)}getContext(){return this.context_}draw(ee){this.instructions_.forEach(te=>{for(let st=0,ot=te.length;st<ot;++st){const ct=te[st];if(typeof ct=="function"){ct(ee);continue}const ut=te[++st];typeof ee[ct]=="function"?ee[ct](...ut):typeof ut=="function"?ee[ct]=ut(ee):ee[ct]=ut}})}clear(){this.instructions_.length=0,this.zIndex=0,this.offset_=0}offset(){this.offset_=this.instructions_.length,this.zIndex=0}}const tmpExtent=createEmpty(),p1=[],p2=[],p3=[],p4=[];function getDeclutterBox(ne){return ne[3].declutterBox}const rtlRegEx=new RegExp("[֑-ࣿיִ-﷿ﹰ-ﻼࠀ-࿿-]");function horizontalTextAlign(ne,ee){return ee==="start"?ee=rtlRegEx.test(ne)?"right":"left":ee==="end"&&(ee=rtlRegEx.test(ne)?"left":"right"),TEXT_ALIGN[ee]}function createTextChunks(ne,ee,te){return te>0&&ne.push(`
74`,""),ne.push(ee,""),ne}function richTextToPlainText(ne,ee,te){return te%2===0&&(ne+=ee),ne}class Executor{constructor(ee,te,st,ot,ct){this.overlaps=st,this.pixelRatio=te,this.resolution=ee,this.alignAndScaleFill_,this.instructions=ot.instructions,this.coordinates=ot.coordinates,this.coordinateCache_={},this.renderedTransform_=create$1(),this.hitDetectionInstructions=ot.hitDetectionInstructions,this.pixelCoordinates_=null,this.viewRotation_=0,this.fillStates=ot.fillStates||{},this.strokeStates=ot.strokeStates||{},this.textStates=ot.textStates||{},this.widths_={},this.labels_={},this.zIndexContext_=ct?new ZIndexContext:null}getZIndexContext(){return this.zIndexContext_}createLabel(ee,te,st,ot){const ct=ee+te+st+ot;if(this.labels_[ct])return this.labels_[ct];const ut=ot?this.strokeStates[ot]:null,dt=st?this.fillStates[st]:null,ht=this.textStates[te],ft=this.pixelRatio,pt=[ht.scale[0]*ft,ht.scale[1]*ft],mt=ht.justify?TEXT_ALIGN[ht.justify]:horizontalTextAlign(Array.isArray(ee)?ee[0]:ee,ht.textAlign||defaultTextAlign),yt=ot&&ut.lineWidth?ut.lineWidth:0,vt=Array.isArray(ee)?ee:String(ee).split(`
75`).reduce(createTextChunks,[]),{width:_t,height:bt,widths:xt,heights:Mt,lineWidths:Ot}=getTextDimensions(ht,vt),kt=_t+yt,Nt=[],Gt=(kt+2)*pt[0],Bt=(bt+yt)*pt[1],Ut={width:Gt<0?Math.floor(Gt):Math.ceil(Gt),height:Bt<0?Math.floor(Bt):Math.ceil(Bt),contextInstructions:Nt};(pt[0]!=1||pt[1]!=1)&&Nt.push("scale",pt),ot&&(Nt.push("strokeStyle",ut.strokeStyle),Nt.push("lineWidth",yt),Nt.push("lineCap",ut.lineCap),Nt.push("lineJoin",ut.lineJoin),Nt.push("miterLimit",ut.miterLimit),Nt.push("set
75LineDash",[ut.lineDash]),Nt.push("lineDashOffset",ut.lineDashOffset)),st&&Nt.push("fillStyle",dt.fillStyle),Nt.push("textBaseline","middle"),Nt.push("textAlign","center");const Vt=.5-mt;let Ht=mt*kt+Vt*yt;const zt=[],jt=[];let Wt=0,Jt=0,Qt=0,oi=0,ai;for(let xn=0,An=vt.length;xn<An;xn+=2){const Nn=vt[xn];if(Nn===`
76`){Jt+=Wt,Wt=0,Ht=mt*kt+Vt*yt,++oi;continue}const Xt=vt[xn+1]||ht.font;Xt!==ai&&(ot&&zt.push("font",Xt),st&&jt.push("font",Xt),ai=Xt),Wt=Math.max(Wt,Mt[Qt]);const Zt=[Nn,Ht+Vt*xt[Qt]+mt*(xt[Qt]-Ot[oi]),.5*(yt+Wt)+Jt];Ht+=xt[Qt],ot&&zt.push("strokeText",Zt),st&&jt.push("fillText",Zt),++Qt}return Array.prototype.push.apply(Nt,zt),Array.prototype.push.apply(Nt,jt),this.labels_[ct]=Ut,Ut}replayTextBackground_(ee,te,st,ot,ct,ut,dt){ee.beginPath(),ee.moveTo.apply(ee,te),ee.lineTo.apply(ee,st),ee.lineTo.apply(ee,ot),ee.lineTo.apply(ee,ct),ee.lineTo.apply(ee,te),ut&&(this.alignAndScaleFill_=ut[2],ee.fillStyle=ut[1],this.fill_(ee)),dt&&(this.setStrokeStyle_(ee,dt),ee.stroke())}calculateImageOrLabelDimensions_(ee,te,st,ot,ct,ut,dt,ht,ft,pt,mt,yt,vt,_t,bt,xt){dt*=yt[0],ht*=yt[1];let Mt=st-dt,Ot=ot-ht;const kt=ct+ft>ee?ee-ft:ct,Nt=ut+pt>te?te-pt:ut,Gt=_t[3]+kt*yt[0]+_t[1],Bt=_t[0]+Nt*yt[1]+_t[2],Ut=Mt-_t[3],Vt=Ot-_t[0];(bt||mt!==0)&&(p1[0]=Ut,p4[0]=Ut,p1[1]=Vt,p2[1]=Vt,p2[0]=Ut+Gt,p3[0]=p2[0],p3[1]=Vt+Bt,p4[1]=p3[1]);let Ht;return mt!==0?(Ht=compose(create$1(),st,ot,1,1,mt,-st,-ot),apply$1(Ht,p1),apply$1(Ht,p2),apply$1(Ht,p3),apply$1(Ht,p4),createOrUpdate$2(Math.min(p1[0],p2[0],p3[0],p4[0]),Math.min(p1[1],p2[1],p3[1],p4[1]),Math.max(p1[0],p2[0],p3[0],p4[0]),Math.max(p1[1],p2[1],p3[1],p4[1]),tmpExtent)):createOrUpdate$2(Math.min(Ut,Ut+Gt),Math.min(Vt,Vt+Bt),Math.max(Ut,Ut+Gt),Math.max(Vt,Vt+Bt),tmpExtent),vt&&(Mt=Math.round(Mt),Ot=Math.round(Ot)),{drawImageX:Mt,drawImageY:Ot,drawImageW:kt,drawImageH:Nt,originX:ft,originY:pt,declutterBox:{minX:tmpExtent[0],minY:tmpExtent[1],maxX:tmpExtent[2],maxY:tmpExtent[3],value:xt},canvasTransform:Ht,scale:yt}}replayImageOrLabel_(ee,te,st,ot,ct,ut,dt){const ht=!!(ut||dt),ft=ot.declutterBox,pt=dt?dt[2]*ot.scale[0]/2:0;return ft.minX-pt<=te[0]&&ft.maxX+pt>=0&&ft.minY-pt<=te[1]&&ft.maxY+pt>=0&&(ht&&this.replayTextBackground_(ee,p1,p2,p3,p4,ut,dt),drawImageOrLabel(ee,ot.canvasTransform,ct,st,ot.originX,ot.originY,ot.drawImageW,ot.drawImageH,ot.drawImageX,ot.drawImageY,ot.scale)),!0}fill_(ee){const te=this.alignAndScaleFill_;if(te){const st=apply$1(this.renderedTransform_,[0,0]),ot=512*this.pixelRatio;ee.save(),ee.translate(st[0]%ot,st[1]%ot),te!==1&&ee.scale(te,te)}ee.fill(),te&&ee.restore()}setStrokeStyle_(ee,te){ee.strokeStyle=te[1],te[1]&&(ee.lineWidth=te[2],ee.lineCap=te[3],ee.lineJoin=te[4],ee.miterLimit=te[5],ee.lineDashOffset=te[7],ee.setLineDash(te[6]))}drawLabelWithPointPlacement_(ee,te,st,ot){const ct=this.textStates[te],ut=this.createLabel(ee,te,ot,st),dt=this.strokeStates[st],ht=this.pixelRatio,ft=horizontalTextAlign(Array.isArray(ee)?ee[0]:ee,ct.textAlign||defaultTextAlign),pt=TEXT_ALIGN[ct.textBaseline||defaultTextBaseline],mt=dt&&dt.lineWidth?dt.lineWidth:0,yt=ut.width/ht-2*ct.scale[0],vt=ft*yt+2*(.5-ft)*mt,_t=pt*ut.height/ht+2*(.5-pt)*mt;return{label:ut,anchorX:vt,anchorY:_t}}execute_(ee,te,st,ot,ct,ut,dt,ht){const ft=this.zIndexContext_;let pt;this.pixelCoordinates_&&equals(st,this.renderedTransform_)?pt=this.pixelCoordinates_:(this.pixelCoordinates_||(this.pixelCoordinates_=[]),pt=transform2D(this.coordinates,0,this.coordinates.length,2,st,this.pixelCoordinates_),setFromArray(this.renderedTransform_,st));let mt=0;const yt=ot.length;let vt=0,_t;const bt=[];let xt,Mt,Ot,kt,Nt,Gt,Bt,Ut,Vt,Ht,zt,jt,Wt,Jt=0,Qt=0;const oi=this.coordinateCache_,ai=this.viewRotation_,xn=Math.round(Math.atan2(-st[1],st[0])*1e12)/1e12,An={context:ee,pixelRatio:this.pixelRatio,resolution:this.resolution,rotation:ai},Nn=this.instructions!=ot||this.overlaps?0:200;let Xt,Zt,Kt,ti;for(;mt<yt;){const qt=ot[mt];switch(qt[0]){case Instruction.BEGIN_GEOMETRY:Xt=qt[1],ti=qt[3],Xt.getGeometry()?dt!==void 0&&!intersects$1(dt,ti.getExtent())?mt=qt[2]+1:++mt:mt=qt[2],ft&&(ft.zIndex=qt[4]);break;case Instruction.BEGIN_PATH:Jt>Nn&&(this.fill_(ee),Jt=0),Qt>
76Nn&&(ee.stroke(),Qt=0),!Jt&&!Qt&&(ee.beginPath(),Nt=NaN,Gt=NaN),++mt;break;case Instruction.CIRCLE:vt=qt[1],Ot=qt[2]??0;const wn=pt[vt],ni=pt[vt+1],Cn=pt[vt+2]-Ot,Ln=pt[vt+3]-Ot,Un=Cn-wn,Pn=Ln-ni,Mn=Math.sqrt(Un*Un+Pn*Pn);ee.moveTo(wn+Mn,ni),ee.arc(wn,ni,Mn,0,2*Math.PI,!0),++mt;break;case Instruction.CLOSE_PATH:ee.closePath(),++mt;break;case Instruction.CUSTOM:vt=qt[1],_t=qt[2];const Yt=qt[3],ri=qt[4],Sn=qt[5];An.geometry=Yt,An.feature=Xt,mt in oi||(oi[mt]=[]);const On=oi[mt];Sn?Sn(pt,vt,_t,2,On):(On[0]=pt[vt],On[1]=pt[vt+1],On.length=2),ft&&(ft.zIndex=qt[6]),ri(On,An),++mt;break;case Instruction.DRAW_IMAGE:vt=qt[1],_t=qt[2],Vt=qt[3],xt=qt[4],Mt=qt[5];let Rn=qt[6];const Bn=qt[7],Vn=qt[8],Wn=qt[9],Gn=qt[10];let Hn=qt[11];const kn=qt[12];let er=qt[13];kt=qt[14]||"declutter";const Tn=qt[15];if(!Vt&&qt.length>=20){Ht=qt[19],zt=qt[20],jt=qt[21],Wt=qt[22];const Ss=this.drawLabelWithPointPlacement_(Ht,zt,jt,Wt);Vt=Ss.label,qt[3]=Vt;const lo=qt[23];xt=(Ss.anchorX-lo)*this.pixelRatio,qt[4]=xt;const Ao=qt[24];Mt=(Ss.anchorY-Ao)*this.pixelRatio,qt[5]=Mt,Rn=Vt.height,qt[6]=Rn,er=Vt.width,qt[13]=er}let Dn;qt.length>25&&(Dn=qt[25]);let $n,jn,zn;qt.length>17?($n=qt[16],jn=qt[17],zn=qt[18]):($n=defaultPadding,jn=null,zn=null),Gn&&xn?Hn+=ai:!Gn&&!xn&&(Hn-=ai);let Jn=0;for(;vt<_t;vt+=2){if(Dn&&Dn[Jn++]<er/this.pixelRatio)continue;const Ss=this.calculateImageOrLabelDimensions_(Vt.width,Vt.height,pt[vt],pt[vt+1],er,Rn,xt,Mt,Vn,Wn,Hn,kn,ct,$n,!!jn||!!zn,Xt),lo=[ee,te,Vt,Ss,Bn,jn,zn];if(ht){let Ao,wo,To;if(Tn){const xs=_t-vt;if(!Tn[xs]){Tn[xs]={args:lo,declutterMode:kt};continue}const oo=Tn[xs];Ao=oo.args,wo=oo.declutterMode,delete Tn[xs],To=getDeclutterBox(Ao)}let io,So;if(Ao&&(wo!=="declutter"||!ht.collides(To))&&(io=!0),(kt!=="declutter"||!ht.collides(Ss.declutterBox))&&(So=!0),wo==="declutter"&&kt==="declutter"){const xs=io&&So;io=xs,So=xs}io&&(wo!=="none"&&ht.insert(To),this.replayImageOrLabel_.apply(this,Ao)),So&&(kt!=="none"&&ht.insert(Ss.declutterBox),this.replayImageOrLabel_.apply(this,lo))}else this.replayImageOrLabel_.apply(this,lo)}++mt;break;case Instruction.DRAW_CHARS:const rs=qt[1],os=qt[2],ls=qt[3],cs=qt[4];Wt=qt[5];const vs=qt[6],hs=qt[7],fs=qt[8];jt=qt[9];const _s=qt[10];Ht=qt[11],Array.isArray(Ht)&&(Ht=Ht.reduce(richTextToPlainText,"")),zt=qt[12];const ms=[qt[13],qt[13]];kt=qt[14]||"declutter";const Zs=qt[15],ao=qt[16],us=this.textStates[zt],ps=us.font,gs=[us.scale[0]*hs,us.scale[1]*hs];let bs;ps in this.widths_?bs=this.widths_[ps]:(bs={},this.widths_[ps]=bs);const Bo=lineStringLength(pt,rs,os,2),qo=Math.abs(gs[0])*measureAndCacheTextWidth(ps,Ht,bs);if(cs||qo<=Bo){const Ss=this.textStates[zt].textAlign,lo=(Bo-qo)*horizontalTextAlign(Ht,Ss),Ao=drawTextOnPath(pt,rs,os,2,Ht,lo,vs,Math.abs(gs[0]),measureAndCacheTextWidth,ps,bs,xn?0:this.viewRotation_,Zs);e:if(Ao){const wo=[];let To,io,So,xs,oo;if(jt)for(To=0,io=Ao.length;To<io;++To){oo=Ao[To],So=oo[4],xs=this.createLabel(So,zt,"",jt),xt=oo[2]+(gs[0]<0?-_s:_s)-ao,Mt=ls*xs.height+(.5-ls)*2*_s*gs[1]/gs[0]-fs;const Go=this.calculateImageOrLabelDimensions_(xs.width,xs.height,oo[0],oo[1],xs.width,xs.height,xt,Mt,0,0,oo[3],ms,!1,defaultPadding,!1,Xt);if(ht&&kt==="declutter"&&ht.collides(Go.declutterBox))break e;wo.push([ee,te,xs,Go,1,null,null])}if(Wt)for(To=0,io=Ao.length;To<io;++To){oo=Ao[To],So=oo[4],xs=this.createLabel(So,zt,Wt,""),xt=oo[2]-ao,Mt=ls*xs.height-fs;const Go=this.calculateImageOrLabelDimensions_(xs.width,xs.height,oo[0],oo[1],xs.width,xs.height,xt,Mt,0,0,oo[3],ms,!1,defaultPadding,!1,Xt);if(ht&&kt==="declutter"&&ht.collides(Go.declutterBox))break e;wo.push([ee,te,xs,Go,1,null,null])}ht&&kt!=="none"&&ht.load(wo.map(getDeclutterBox));for(let Go=0,Vo=wo.length;Go<Vo;++Go)this.replayImageOrLabel_.apply(this,wo[Go])}}++mt;break;case Instruction.END_GEOMETRY:if(ut!==void 0){Xt=qt[1];const Ss=ut(Xt,ti,kt);if(Ss)return Ss}
76++mt;break;case Instruction.FILL:Nn?Jt++:this.fill_(ee),++mt;break;case Instruction.MOVE_TO_LINE_TO:vt=qt[1],_t=qt[2],Ot=qt[3];let Lo,ys,Co;if(Ot){const lo=(qt[4]??!1)||Math.abs(pt[vt]-pt[_t-2])<1e-6&&Math.abs(pt[vt+1]-pt[_t-1])<1e-6;offsetLineString(pt,vt,_t,2,Ot,lo,bt),removeOffsetCycles(bt,2,lo),Lo=bt,ys=0,Co=Lo.length}else Lo=pt,ys=vt,Co=_t;Zt=Lo[ys],Kt=Lo[ys+1],ee.moveTo(Zt,Kt),Nt=Zt+.5|0,Gt=Kt+.5|0;for(let Ss=ys+2;Ss<Co;Ss+=2)Zt=Lo[Ss],Kt=Lo[Ss+1],Bt=Zt+.5|0,Ut=Kt+.5|0,(Ss==Co-2||Bt!==Nt||Ut!==Gt)&&(ee.lineTo(Zt,Kt),Nt=Bt,Gt=Ut);++mt;break;case Instruction.SET_FILL_STYLE:this.alignAndScaleFill_=qt[2],Jt?(this.fill_(ee),Jt=0,Qt&&(ee.stroke(),Qt=0)):Qt&&qt[1]&&(ee.stroke(),Qt=0),ee.fillStyle=qt[1],++mt;break;case Instruction.SET_STROKE_STYLE:Jt&&qt[1]&&(this.fill_(ee),Jt=0),Qt&&(ee.stroke(),Qt=0),this.setStrokeStyle_(ee,qt),++mt;break;case Instruction.STROKE:Nn?Qt++:ee.stroke(),++mt;break;default:++mt;break}}Jt&&this.fill_(ee),Qt&&ee.stroke()}execute(ee,te,st,ot,ct,ut){this.viewRotation_=ot,this.execute_(ee,te,st,this.instructions,ct,void 0,void 0,ut)}executeHitDetection(ee,te,st,ot,ct){return this.viewRotation_=st,this.execute_(ee,[ee.canvas.width,ee.canvas.height],te,this.hitDetectionInstructions,!0,ot,ct)}}const ALL=["Polygon","Circle","LineString","Image","Text","Default"],DECLUTTER=["Image","Text"],NON_DECLUTTER=ALL.filter(ne=>!DECLUTTER.includes(ne));let willReadFrequently=!1,canvasReadsBenchmarked=!1;function benchmarkCanvasReads(){let ne=0;const ee=st=>{const ot=createCanvasContext2D(1,1,null,{willReadFrequently:st});let ct=0;const ut=performance.now();for(;performance.now()-ut<50;++ct)ot.fillStyle=`rgba(255,0,${ct%256},1)`,ot.fillRect(0,0,1,1),ot.getImageData(0,0,1,1);return ne=ct>ne?ct:ne,ct};willReadFrequently={[ee(!0)]:!0,[ee(!1)]:!1,[ee(void 0)]:void 0}[ne],canvasReadsBenchmarked=!0}class ExecutorGroup{constructor(ee,te,st,ot,ct,ut,dt){this.maxExtent_=ee,this.overlaps_=ot,this.pixelRatio_=st,this.resolution_=te,this.renderBuffer_=ut,this.executorsByZIndex_={},this.hitDetectionContext_=null,this.hitDetectionTransform_=create$1(),this.renderedContext_=null,this.deferredZIndexContexts_={},this.createExecutors_(ct,dt)}clip(ee,te){const st=this.getClipCoords(te);ee.beginPath(),ee.moveTo(st[0],st[1]),ee.lineTo(st[2],st[3]),ee.lineTo(st[4],st[5]),ee.lineTo(st[6],st[7]),ee.clip()}createExecutors_(ee,te){for(const st in ee){let ot=this.executorsByZIndex_[st];ot===void 0&&(ot={},this.executorsByZIndex_[st]=ot);const ct=ee[st];for(const ut in ct){const dt=ct[ut];ot[ut]=new Executor(this.resolution_,this.pixelRatio_,this.overlaps_,dt,te)}}}hasExecutors(ee){for(const te in this.executorsByZIndex_){const st=this.executorsByZIndex_[te];for(let ot=0,ct=ee.length;ot<ct;++ot)if(ee[ot]in st)return!0}return!1}forEachFeatureAtCoordinate(ee,te,st,ot,ct,ut){canvasReadsBenchmarked===!1&&benchmarkCanvasReads(),ot=Math.round(ot);const dt=ot*2+1,ht=compose(this.hitDetectionTransform_,ot+.5,ot+.5,1/te,-1/te,-st,-ee[0],-ee[1]),ft=!this.hitDetectionContext_;ft&&(this.hitDetectionContext_=createCanvasContext2D(dt,dt,null,{willReadFrequently}));const pt=this.hitDetectionContext_;pt.canvas.width!==dt||pt.canvas.height!==dt?(pt.canvas.width=dt,pt.canvas.height=dt):ft||pt.clearRect(0,0,dt,dt);let mt;this.renderBuffer_!==void 0&&(mt=createEmpty(),extendCoordinate(mt,ee),buffer(mt,te*(this.renderBuffer_+ot),mt));const yt=getPixelIndexArray(ot);let vt;function _t(Gt,Bt,Ut){const Vt=pt.getImageData(0,0,dt,dt).data;for(let Ht=0,zt=yt.length;Ht<zt;Ht++)if(Vt[yt[Ht]]>0){if(!ut||Ut==="none"||vt!=="Image"&&vt!=="Text"||ut.includes(Gt)){const jt=(yt[Ht]-3)/4,Wt=ot-jt%dt,Jt=ot-(jt/dt|0),Qt=ct(Gt,Bt,Wt*Wt+Jt*Jt);if(Qt)return Qt}pt.clearRect(0,0,dt,dt);break}}const bt=Object.keys(this.executorsByZIndex_).map(Number);bt.sort(ascending);let xt,Mt,Ot,kt,Nt;for(xt=bt.length-1;xt>=0;--xt){const Gt=bt[xt].toString();for(Ot=this.executorsByZIndex_[Gt],Mt=ALL.length-1;Mt>=0;--Mt)if(vt=ALL[Mt],kt=Ot[vt],kt!==void 0&&(Nt=kt.executeHitDetection(pt,ht,st,_t,mt),Nt))return Nt}}getClipCoords(ee){const te=this.maxExtent_;if(!te)return null;const st=te[0],ot=te[1],ct=te[2],ut=te[3],dt=[st,ot,st,ut,ct,ut,ct,ot];return transform2D(dt,0,8,2,ee,dt),dt}isEmpty(){return isEmpty(this.executorsByZIndex_)}execute(ee,te,st,ot,ct,ut,dt){const ht=Object.keys(this.executorsByZIndex_).map(Number);ht.sort(dt?descending:ascending),ut=ut||ALL;
76const ft=ALL.length;for(let pt=0,mt=ht.length;pt<mt;++pt){const yt=ht[pt].toString(),vt=this.executorsByZIndex_[yt];for(let _t=0,bt=ut.length;_t<bt;++_t){const xt=ut[_t],Mt=vt[xt];if(Mt!==void 0){const Ot=dt===null?void 0:Mt.getZIndexContext(),kt=Ot?Ot.getContext():ee,Nt=this.maxExtent_&&xt!=="Image"&&xt!=="Text";if(Nt&&(kt.save(),this.clip(kt,st)),!Ot||xt==="Text"||xt==="Image"?Mt.execute(kt,te,st,ot,ct,dt):Ot.pushFunction(Gt=>Mt.execute(Gt,te,st,ot,ct,dt)),Nt&&kt.restore(),Ot){Ot.offset();const Gt=ht[pt]*ft+ALL.indexOf(xt);this.deferredZIndexContexts_[Gt]||(this.deferredZIndexContexts_[Gt]=[]),this.deferredZIndexContexts_[Gt].push(Ot)}}}}this.renderedContext_=ee}getDeferredZIndexContexts(){return this.deferredZIndexContexts_}getRenderedContext(){return this.renderedContext_}renderDeferred(){const ee=this.deferredZIndexContexts_,te=Object.keys(ee).map(Number).sort(ascending);for(let st=0,ot=te.length;st<ot;++st)ee[te[st]].forEach(ct=>{ct.draw(this.renderedContext_),ct.clear()}),ee[te[st]].length=0}}const circlePixelIndexArrayCache={};function getPixelIndexArray(ne){if(circlePixelIndexArrayCache[ne]!==void 0)return circlePixelIndexArrayCache[ne];const ee=ne*2+1,te=ne*ne,st=new Array(te+1);for(let ct=0;ct<=ne;++ct)for(let ut=0;ut<=ne;++ut){const dt=ct*ct+ut*ut;if(dt>te)break;let ht=st[dt];ht||(ht=[],st[dt]=ht),ht.push(((ne+ct)*ee+(ne+ut))*4+3),ct>0&&ht.push(((ne-ct)*ee+(ne+ut))*4+3),ut>0&&(ht.push(((ne+ct)*ee+(ne-ut))*4+3),ct>0&&ht.push(((ne-ct)*ee+(ne-ut))*4+3))}const ot=[];for(let ct=0,ut=st.length;ct<ut;++ct)st[ct]&&ot.push(...st[ct]);return circlePixelIndexArrayCache[ne]=ot,ot}class ImageStyle{constructor(ee){this.opacity_=ee.opacity,this.rotateWithView_=ee.rotateWithView,this.rotation_=ee.rotation,this.scale_=ee.scale,this.scaleArray_=toSize(ee.scale),this.displacement_=ee.displacement,this.declutterMode_=ee.declutterMode}clone(){const ee=this.getScale();return new ImageStyle({opacity:this.getOpacity(),scale:Array.isArray(ee)?ee.slice():ee,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 abstract()}getImage(ee){return abstract()}getHitDetectionImage(){return abstract()}getPixelRatio(ee){return 1}getImageState(){return abstract()}getImageSize(){return abstract()}getOrigin(){return abstract()}getSize(){return abstract()}setDisplacement(ee){this.displacement_=ee}setOpacity(ee){this.opacity_=ee}setRotateWithView(ee){this.rotateWithView_=ee}setRotation(ee){this.rotation_=ee}setScale(ee){this.scale_=ee,this.scaleArray_=toSize(ee)}listenImageChange(ee){abstract()}load(){abstract()}unlistenImageChange(ee){abstract()}ready(){return Promise.resolve()}}function calculateScale(ne,ee,te,st){return te!==void 0&&st!==void 0?[te/ne,st/ee]:te!==void 0?te/ne:st!==void 0?st/ee:1}class Icon extends ImageStyle{constructor(ee){ee=ee||{};const te=ee.opacity!==void 0?ee.opacity:1,st=ee.rotation!==void 0?ee.rotation:0,ot=ee.scale!==void 0?ee.scale:1,ct=ee.rotateWithView!==void 0?ee.rotateWithView:!1;super({opacity:te,rotation:st,scale:ot,displacement:ee.displacement!==void 0?ee.displacement:[0,0],rotateWithView:ct,declutterMode:ee.declutterMode}),this.anchor_=ee.anchor!==void 0?ee.anchor:[.5,.5],this.normalizedAnchor_=null,this.anchorOrigin_=ee.anchorOrigin!==void 0?ee.anchorOrigin:"top-left",this.anchorXUnits_=ee.anchorXUnits!==void 0?ee.anchorXUnits:"fraction",this.anchorYUnits_=ee.anchorYUnits!==void 0?ee.anchorYUnits:"fraction",this.crossOrigin_=ee.crossOrigin!==void 0?ee.crossOrigin:null,this.referrerPolicy_=ee.referrerPolicy;const ut=ee.img!==void 0?ee.img:null;let dt=ee.src;assert(!(dt!==void 0&&ut),"`image` and `src` cannot be provided at the same time"),(dt===void 0||dt.length===0)&&ut&&(dt=ut.src||getUid(ut)),assert(dt!==void 0&&dt.length>0,"A defined and non-empty `src` or `image` must be provided"),assert(!((ee.width!==void 0||ee.height!==void 0)&&ee.scale!==void 0),"`width` or `height` cannot be provided together with `scale`");let ht;if(ee.src!==void 0?ht=ImageState.IDLE:ut!==void 0&&("complete"in ut?ut.complete?ht=ut.src?ImageState.LOADED:ImageState.IDLE:ht=ImageState.LOADING:ht=ImageState.LOADED),this.color_=ee.color!==void 0?asArray(ee.color):null,this.iconImage_=get$2(ut,dt,{crossOrigin:this.crossOrigin_,referrerPolicy:this.referrerPolicy_},ht,this.color_),this.offset_=ee.offset!==void 0?ee.offset:[0,0],this.offsetOrigin_=ee.offsetOrigin!==void 0?ee.offsetOrigin:"top-left",this.origin_=null,this.size_=ee.size!==void 0?ee.size:null,this.initialOptions_,ee.width!==void 0||ee.height!==void 0){let ft,pt;if(ee.size)[ft,pt]=ee.size;else{const mt=this.getImage(1);if(mt.width&&mt.height)ft=mt.width,pt=mt.height;else if(mt instanceof HTMLImageElement){this.initialOptions_=ee;const yt=()=>{if(this.unlistenImageChange(yt),!this.initialOptions_)return;const vt=this.iconImage_.getSize();this.setScale(calculateScale(vt[0],vt[1],ee.width,ee.height))};this.listenImageChange(yt);return}}ft!==void 0&&this.setScale(calculateScale(ft,pt,ee.width,ee.height))}}clone(){let ee,te,st;return this.initialOptions_?(te=this.initialOptions_.width,st=this.initialOptions_.height):(ee=this.getScale(),ee=Array.isArray(ee)?ee.slice():ee),new Icon({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_,referrerPolicy:this.referrerPolicy_,offset:this.offset_.slice(),offsetOrigin:this.offsetOrigin_,opacity:this.getOpacity(),rotateWithView:this.getRotateWithView(),rotation:this.getRotation(),scale:ee,width:te,height:st,size:this.size_!==null?this.size_.slice():void 0,src:this.getSrc(),displacement:this.getDisplacement().slice(),declutterMode:this.getDeclutterMode()})}getAnchor(){let ee=this.normalizedAnchor_;if(!ee){ee=this.anchor_;const ot=this.getSize();if(this.anchorXUnits_=="fraction"||this.anchorYUnits_=="fraction"){if(!ot)return null;ee=this.anchor_.slice(),this.anchorXUnits_=="fraction"&&(ee[0]*=ot[0]),this.anchorYUnits_=="fraction"&&(ee[1]*=ot[1])}if(this.anchorOrigin_!="top-left"){if(!ot)return null;ee===this.anchor_&&(ee=this.anchor_.slice()),(this.anchorOrigin_=="top-right"||this.anchorOrigin_=="bottom-right")&&(ee[0]=-ee[0]+ot[0]),(this.anchorOrigin_=="bottom-left"||this.anchorOrigin_=="bottom-right")&&(ee[1]=-ee[1]+ot[1])}this.normalizedAnchor_=ee}const te=this.getDisplacement(),st=this.getScaleArray();return[ee[0]-te[0]/st[0],ee[1]+te[1]/st[1]]}setAnchor(ee){this.anchor_=ee,this.normalizedAnchor_=null}getColor(){return this.color_}setColor(ee){const te=ee?asArray(ee):null;if(this.color_===te||this.color_&&te&&this.color_.length===te.length&&this.color_.every((ut,dt)=>ut===te[dt]))return;this.color_=te;const st=this.getSrc(),ot=st!==void 0?null:this.getHitDetectionImage(),ct=st!==void 0?ImageState.IDLE:this.iconImage_.getImageState();this.iconImage_=get$2(ot,st,{crossOrigin:this.crossOrigin_,referrerPolicy:this.referrerPolicy_},ct,this.color_)}getImage(ee){return this.iconImage_.getImage(ee)}getPixelRatio(ee){return this.iconImage_.getPixelRatio(ee)}getImageSize(){return this.iconImage_.getSize()}getImageState(){return this.iconImage_.getImageState()}getHitDetectionImage(){return this.iconImage_.getHitDetectionImage()}getOrigin(){if(this.origin_)return this.origin_;let ee=this.offset_;if(this.offsetOrigin_!="top-left"){const te=this.getSize(),st=this.iconImage_.getSize();if(!te||!st)return null;ee=ee.slice(),(this.offsetOrigin_=="top-right"||this.offsetOrigin_=="bottom-right")&&(ee[0]=st[0]-te[0]-ee[0]),(this.offsetOrigin_=="bottom-left"||this.offsetOrigin_=="bottom-right")&&(ee[1]=st[1]-te[1]-ee[1])}return this.origin_=ee,this.origin_}getSrc(){return this.iconImage_.getSrc()}setSrc(ee){this.iconImage_=get$2(null,ee,{crossOrigin:this.crossOrigin_,referrerPolicy:this.referrerPolicy_},ImageState.IDLE,this.color_)}getSize(){return this.size_?this.size_:this.iconImage_.getSize()}getWidth(){const ee=this.getScaleArray();if(this.size_)return this.size_[0]*ee[0];if(this.iconImage_.getImageState()==ImageState.LOADED)return this.iconImage_.getSize()[0]*ee[0]}getHeight(){const ee=this.getScaleArray();if(this.size_)return this.size_[1]*ee[1];if(this.iconImage_.getImageState()==ImageState.LOADED)return this.iconImage_.getSize()[1]*ee[1]}setScale(ee){delete this.initialOptions_,super.setScale(ee)}listenImageChange(ee){this.iconImage_.addEventListener(EventType.CHANGE,ee)}load(){this.iconImage_.load()}unlistenImageChange(ee){this.iconImage_.removeEventListener(EventType.CHANGE,ee)}ready(){return this.iconImage_.ready()}}class CanvasImmediateRenderer extends VectorContext{constructor(ee,te,st,ot,ct,ut,dt){super(),this.context_=ee,this.pixelRatio_=te,this.extent_=st,this.transform_=ot,this.transformRotation_=ot?toFixed(Math.atan2(ot[1],ot[0]),10):0,this.viewRotation_=ct,this.squaredTolerance_=ut,this.userTransform_=dt,this.contextFillState_=null,this.contextStrokeState_=null,this.contextTextState_=null,this.fillState_=null,this.strokeState_=null,this.image_=null,this.imageAnchorX_=0,this.imageAnchorY_=0,this.imageHeight_=0,this.imageOpacity_=0,this.imageOriginX_=0,this.imageOriginY_=0,this.imageRotateWithView_=!1,this.imageRotation_=0,this.imageScale_=[0,0],this.imageWidth_=0,this.text_="",this.textOffsetX_=0,this.textOffsetY_=0,this.textRotateWithView_=!1,this.textRotation_=0,this.textScale_=[0,0],this.textFillState_=null,this.textStrokeState_=null,this.textState_=null,this.pixelCoordinates_=[],this.tmpLocalTransform_=create$1()}drawImages_(ee,te,st,ot){if(!this.image_)return;const ct=transform2D(ee,te,st,ot,this.transform_,this.pixelCoordinates_),ut=this.context_,dt=this.tmpLocalTransform_,ht=ut.globalAlpha;this.imageOpacity_!=1&&(ut.globalAlpha=ht*this.imageOpacity_);let ft=this.imageRotation_;this.transformRotation_===0&&(ft-=this.viewRotation_),this.imageRotateWithView_&&(ft+=this.viewRotation_);for(let pt=0,mt=ct.length;pt<mt;pt+=2){const yt=ct[pt]-this.imageAnchorX_,vt=ct[pt+1]-this.imageAnchorY_;if(ft!==0||this.imageScale_[0]!=1||this.imageScale_[1]!=1){const _t=yt+this.imageAnchorX_,bt=vt+this.imageAnchorY_;compose(dt,_t,bt,1,1,ft,-_t,-bt),ut.save(),ut.transform.apply(ut,dt),ut.translate(_t,bt),ut.scale(this.imageScale_[0],this.imageScale_[1]),ut.drawImage(this.image_,this.imageOriginX_,this.imageOriginY_,this.imageWidth_,this.imageHeight_,-this.imageAnchorX_,-this.imageAnchorY_,this.imageWidth_,this.imageHeight_),ut.restore(
76)}else ut.drawImage(this.image_,this.imageOriginX_,this.imageOriginY_,this.imageWidth_,this.imageHeight_,yt,vt,this.imageWidth_,this.imageHeight_)}this.imageOpacity_!=1&&(ut.globalAlpha=ht)}drawText_(ee,te,st,ot){if(!this.textState_||this.text_==="")return;this.textFillState_&&this.setContextFillState_(this.textFillState_),this.textStrokeState_&&this.setContextStrokeState_(this.textStrokeState_),this.setContextTextState_(this.textState_);const ct=transform2D(ee,te,st,ot,this.transform_,this.pixelCoordinates_),ut=this.context_;let dt=this.textRotation_;for(this.transformRotation_===0&&(dt-=this.viewRotation_),this.textRotateWithView_&&(dt+=this.viewRotation_);te<st;te+=ot){const ht=ct[te]+this.textOffsetX_,ft=ct[te+1]+this.textOffsetY_;dt!==0||this.textScale_[0]!=1||this.textScale_[1]!=1?(ut.save(),ut.translate(ht-this.textOffsetX_,ft-this.textOffsetY_),ut.rotate(dt),ut.translate(this.textOffsetX_,this.textOffsetY_),ut.scale(this.textScale_[0],this.textScale_[1]),this.textStrokeState_&&ut.strokeText(this.text_,0,0),this.textFillState_&&ut.fillText(this.text_,0,0),ut.restore()):(this.textStrokeState_&&ut.strokeText(this.text_,ht,ft),this.textFillState_&&ut.fillText(this.text_,ht,ft))}}moveToLineTo_(ee,te,st,ot,ct,ut){const dt=this.context_;let ht=transform2D(ee,te,st,ot,this.transform_,this.pixelCoordinates_);if(Math.abs(ut)>0){const pt=ht.length,mt=ct||Math.abs(ht[0]-ht[pt-2])<1e-6&&Math.abs(ht[1]-ht[pt-1])<1e-6;ht=offsetLineString(ht,0,pt,2,ut,mt,ht),removeOffsetCycles(ht,2,mt)}dt.moveTo(ht[0],ht[1]);let ft=ht.length;ct&&(ft-=2);for(let pt=2;pt<ft;pt+=2)dt.lineTo(ht[pt],ht[pt+1]);return ct&&dt.closePath(),st}drawRings_(ee,te,st,ot,ct){for(let ut=0,dt=st.length;ut<dt;++ut)te=this.moveToLineTo_(ee,te,st[ut],ot,!0,ct);return te}drawCircle(ee){if(this.squaredTolerance_&&(ee=ee.simplifyTransformed(this.squaredTolerance_,this.userTransform_)),!!intersects$1(this.extent_,ee.getExtent())){if(this.fillState_||this.strokeState_){this.fillState_&&this.setContextFillState_(this.fillState_),this.strokeState_&&this.setContextStrokeState_(this.strokeState_);const te=transformGeom2D(ee,this.transform_,this.pixelCoordinates_),st=te[2]-te[0],ot=te[3]-te[1],ct=Math.sqrt(st*st+ot*ot),ut=this.context_;ut.beginPath(),ut.arc(te[0],te[1],ct,0,2*Math.PI),this.fillState_&&ut.fill(),this.strokeState_&&ut.stroke()}this.text_!==""&&this.drawText_(ee.getCenter(),0,2,2)}}setStyle(ee){this.setFillStrokeStyle(ee.getFill(),ee.getStroke()),this.setImageStyle(ee.getImage()),this.setTextStyle(ee.getText())}setTransform(ee){this.transform_=ee}drawGeometry(ee){switch(ee.getType()){case"Point":this.drawPoint(ee);break;case"LineString":this.drawLineString(ee);break;case"Polygon":this.drawPolygon(ee);break;case"MultiPoint":this.drawMultiPoint(ee);break;case"MultiLineString":this.drawMultiLineString(ee);break;case"MultiPolygon":this.drawMultiPolygon(ee);break;case"GeometryCollection":this.drawGeometryCollection(ee);break;case"Circle":this.drawCircle(ee);break}}drawFeature(ee,te){const st=te.getGeometryFunction()(ee);st&&(this.setStyle(te),this.drawGeometry(st))}drawGeometryCollection(ee){const te=ee.getGeometriesArray();for(let st=0,ot=te.length;st<ot;++st)this.drawGeometry(te[st])}drawPoint(ee){this.squaredTolerance_&&(ee=ee.simplifyTransformed(this.squaredTolerance_,this.userTransform_));const te=ee.getFlatCoordinates(),st=ee.getStride();this.image_&&this.drawImages_(te,0,te.length,st),this.text_!==""&&this.drawText_(te,0,te.length,st)}drawMultiPoint(ee){this.squaredTolerance_&&(ee=ee.simplifyTransformed(this.squaredTolerance_,this.userTransform_));const te=ee.getFlatCoordinates(),st=ee.getStride();this.image_&&this.drawImages_(te,0,te.length,st),this.text_!==""&&this.drawText_(te,0,te.length,st)}drawLineString(ee){if(this.squaredTolerance_&&(ee=ee.simplifyTransformed(this.squaredTolerance_,this.userTransform_)),!!intersects$1(this.extent_,ee.getExtent())){if(this.strokeState_){this.setContextStrokeState_(this.strokeState_);const te=this.context_,st=ee.getFlatCoordinates();te.beginPath(),this.moveToLineTo_(st,0,st.length,ee.getStride(),!1,this.strokeState_.strokeOffset),te.stroke()}if(this.text_!==""){const te=ee.getFlatMidpoint();this.drawText_(te,0,2,2)}}}drawMultiLineString(ee){this.squaredTolerance_&&(ee=ee.simplifyTransformed(this.squaredTolerance_,this.userTransform_));const te=ee.getExtent();if(intersects$1(this.extent_,te)){if(this.strokeState_){this.setContextStrokeState_(this.strokeState_);const st=this.context_,ot=ee.getFlatCoordinates();let ct=0;const ut=ee.getEnds(),dt=ee.getStride();st.beginPath();for(let ht=0,ft=ut.length;ht<ft;++ht)ct=this.moveToLineTo_(ot,ct,ut[ht],dt,!1,this.strokeState_.strokeOffset);st.stroke()}if(this.text_!==""){const st=ee.getFlatMidpoints();this.drawText_(st,0,st.length,2)}}}drawPolygon(ee){var te;if(this.squaredTolerance_&&(ee=ee.simplifyTransformed(this.squaredTolerance_,this.userTransform_)),!!intersects$1(this.extent_,ee.getExtent())){if(this.strokeState_||this.fillState_){this.fillState_&&this.setContextFillState_(this.fillState_),this.strokeState_&&this.setContextStrokeState_(this.strokeState_);const st=this.context_;st.beginPath(),this.drawRings_(ee.getOrientedFlatCoordinates(),0,ee.getEnds(),ee.getStride(),(te=this.strokeState_)==null?void 0:te.strokeOffset),this.fillState_&&st.fill(),this.strokeState_&&st.stroke()}if(this.text_!==""){const st=ee.getFlatInteriorPoint();this.drawText_(st,0,2,2)}}}drawMultiPolygon(ee){var te;if(this.squaredTolerance_&&(ee=ee.simplifyTransformed(this.squaredTolerance_,this.userTransform_)),!!intersects$1(this.extent_,ee.getExtent())){if(this.strokeState_||this.fillState_){this.fillState_&&this.setContextFillState_(this.fillState_),this.strokeState_&&this.setContextStrokeState_(this.strokeState_);const st=this.context_,ot=ee.getOrientedFlatCoordinates();let ct=0;const ut=ee.getEndss(),dt=ee.getStride();st.beginPath();for(let ht=0,ft=ut.length;ht<ft;++ht){const pt=ut[ht];ct=this.drawRings_(ot,ct,pt,dt,(te=this.strokeState_)==null?void 0:te.strokeOffset)}this.fillState_&&st.fill(),this.strokeState_&&st.stroke()}if(this.text_!==""){const st=ee.getFlatInteriorPoints();this.drawText_(st,0,st.length,2)}}}setContextFillState_(ee){const te=this.context_,st=this.contextFillState_;st?st.fillStyle!=ee.fillStyle&&(st.fillStyle=ee.fillStyle,te.fillStyle=ee.fillStyle):(te.fillStyle=ee.fillStyle,this.contextFillState_={fillStyle:ee.fillStyle})}setContextStrokeState_(ee){const te=this.context_,st=this.contextStrokeState_;st?(st.lineCap!=ee.lineCap&&(st.lineCap=ee.lineCap,te.lineCap=ee.lineCap),equals(st.lineDash,ee.lineDash)||te.setLineDash(st.lineDash=ee.lineDash),st.lineDashOffset!=ee.lineDashOffset&&(st.lineDashOffset=ee.lineDashOffset,te.lineDashOffset=ee.lineDashOffset),st.lineJoin!=ee.lineJoin&&(st.lineJoin=ee.lineJoin,te.lineJoin=ee.lineJoin),st.lineWidth!=ee.lineWidth&&(st.lineWidth=ee.lineWidth,te.lineWidth=ee.lineWidth),st.miterLimit!=ee.miterLimit&&(st.miterLimit=ee.miterLimit,te.miterLimit=ee.miterLimit),st.strokeStyle!=ee.strokeStyle&&(st.strokeStyle=ee.strokeStyle,te.
76strokeStyle=ee.strokeStyle)):(te.lineCap=ee.lineCap,te.setLineDash(ee.lineDash),te.lineDashOffset=ee.lineDashOffset,te.lineJoin=ee.lineJoin,te.lineWidth=ee.lineWidth,te.miterLimit=ee.miterLimit,te.strokeStyle=ee.strokeStyle,this.contextStrokeState_={lineCap:ee.lineCap,lineDash:ee.lineDash,lineDashOffset:ee.lineDashOffset,lineJoin:ee.lineJoin,lineWidth:ee.lineWidth,miterLimit:ee.miterLimit,strokeStyle:ee.strokeStyle})}setContextTextState_(ee){const te=this.context_,st=this.contextTextState_,ot=ee.textAlign?ee.textAlign:defaultTextAlign;st?(st.font!=ee.font&&(st.font=ee.font,te.font=ee.font),st.textAlign!=ot&&(st.textAlign=ot,te.textAlign=ot),st.textBaseline!=ee.textBaseline&&(st.textBaseline=ee.textBaseline,te.textBaseline=ee.textBaseline)):(te.font=ee.font,te.textAlign=ot,te.textBaseline=ee.textBaseline,this.contextTextState_={font:ee.font,textAlign:ot,textBaseline:ee.textBaseline})}setFillStrokeStyle(ee,te){if(!ee)this.fillState_=null;else{const st=ee.getColor();this.fillState_={fillStyle:asColorLike(st||defaultFillStyle)}}if(!te)this.strokeState_=null;else{const st=te.getColor(),ot=te.getLineCap(),ct=te.getLineDash(),ut=te.getLineDashOffset(),dt=te.getLineJoin(),ht=te.getWidth(),ft=te.getMiterLimit(),pt=ct||defaultLineDash,mt=te.getOffset();this.strokeState_={lineCap:ot!==void 0?ot:defaultLineCap,lineDash:this.pixelRatio_===1?pt:pt.map(yt=>yt*this.pixelRatio_),lineDashOffset:(ut||defaultLineDashOffset)*this.pixelRatio_,lineJoin:dt!==void 0?dt:defaultLineJoin,lineWidth:(ht!==void 0?ht:defaultLineWidth)*this.pixelRatio_,miter
76Limit:ft!==void 0?ft:defaultMiterLimit,strokeStyle:asColorLike(st||defaultStrokeStyle),strokeOffset:(mt??0)*this.pixelRatio_}}}setImageStyle(ee){let te;if(!ee||!(te=ee.getSize())){this.image_=null;return}const st=ee.getPixelRatio(this.pixelRatio_),ot=ee.getAnchor(),ct=ee.getOrigin();this.image_=ee.getImage(this.pixelRatio_),this.imageAnchorX_=ot[0]*st,this.imageAnchorY_=ot[1]*st,this.imageHeight_=te[1]*st,this.imageOpacity_=ee.getOpacity(),this.imageOriginX_=ct[0],this.imageOriginY_=ct[1],this.imageRotateWithView_=ee.getRotateWithView(),this.imageRotation_=ee.getRotation();const ut=ee.getScaleArray();this.imageScale_=[ut[0]*this.pixelRatio_/st,ut[1]*this.pixelRatio_/st],this.imageWidth_=te[0]*st}setTextStyle(ee){if(!ee)this.text_="";else{const te=ee.getFill();if(!te)this.textFillState_=null;else{const vt=te.getColor();this.textFillState_={fillStyle:asColorLike(vt||defaultFillStyle)}}const st=ee.getStroke();if(!st)this.textStrokeState_=null;else{const vt=st.getColor(),_t=st.getLineCap(),bt=st.getLineDash(),xt=st.getLineDashOffset(),Mt=st.getLineJoin(),Ot=st.getWidth(),kt=st.getMiterLimit();this.textStrokeState_={lineCap:_t!==void 0?_t:defaultLineCap,lineDash:bt||defaultLineDash,lineDashOffset:xt||defaultLineDashOffset,lineJoin:Mt!==void 0?Mt:defaultLineJoin,lineWidth:Ot!==void 0?Ot:defaultLineWidth,miterLimit:kt!==void 0?kt:defaultMiterLimit,strokeStyle:asColorLike(vt||defaultStrokeStyle)}}const ot=ee.getFont(),ct=ee.getOffsetX(),ut=ee.getOffsetY(),dt=ee.getRotateWithView(),ht=ee.getRotation(),ft=ee.getScaleArray(),pt=ee.getText(),mt=ee.getTextAlign(),yt=ee.getTextBaseline();this.textState_={font:ot!==void 0?ot:defaultFont,textAlign:mt!==void 0?mt:defaultTextAlign,textBaseline:yt!==void 0?yt:defaultTextBaseline},this.text_=pt!==void 0?Array.isArray(pt)?pt.reduce((vt,_t,bt)=>vt+=bt%2?" ":_t,""):pt:"",this.textOffsetX_=ct!==void 0?this.pixelRatio_*ct:0,this.textOffsetY_=ut!==void 0?this.pixelRatio_*ut:0,this.textRotateWithView_=dt!==void 0?dt:!1,this.textRotation_=ht!==void 0?ht:0,this.textScale_=[this.pixelRatio_*ft[0],this.pixelRatio_*ft[1]]}}}const HIT_DETECT_RESOLUTION=.5;function createHitDetectionImageData(ne,ee,te,st,ot,ct,ut,dt,ht){const ft=ht?toUserExtent(ot):ot,pt=ne[0]*HIT_DETECT_RESOLUTION,mt=ne[1]*HIT_DETECT_RESOLUTION,yt=createCanvasContext2D(pt,mt);yt.imageSmoothingEnabled=!1;const vt=yt.canvas,_t=new CanvasImmediateRenderer(yt,HIT_DETECT_RESOLUTION,ot,null,ut,dt,ht?getTransformFromProjections(getUserProjection(),ht):null),bt=te.length,xt=Math.floor((256*256*256-1)/bt),Mt={};for(let kt=1;kt<=bt;++kt){const Nt=te[kt-1],Gt=Nt.getStyleFunction()||st;if(!Gt)continue;let Bt=Gt(Nt,ct);if(!Bt)continue;Array.isArray(Bt)||(Bt=[Bt]);const Vt=(kt*xt).toString(16).padStart(7,"#00000");for(let Ht=0,zt=Bt.length;Ht<zt;++Ht){const jt=Bt[Ht],Wt=jt.getGeometryFunction()(Nt);if(!Wt||!intersects$1(ft,Wt.getExtent()))continue;const Jt=jt.clone(),Qt=Jt.getFill();Qt&&Qt.setColor(Vt);const oi=Jt.getStroke();oi&&(oi.setColor(Vt),oi.setLineDash(null)),Jt.setText(void 0);const ai=jt.getImage();if(ai){const Xt=ai.getImageSize();if(!Xt)continue;const Zt=createCanvasContext2D(Xt[0],Xt[1],void 0,{alpha:!1}),Kt=Zt.canvas;Zt.fillStyle=Vt,Zt.fillRect(0,0,Kt.width,Kt.height),Jt.setImage(new Icon({img:Kt,anchor:ai.getAnchor(),anchorXUnits:"pixels",anchorYUnits:"pixels",offset:ai.getOrigin(),opacity:1,size:ai.getSize(),scale:ai.getScale(),rotation:ai.getRotation(),rotateWithView:ai.getRotateWithView()}))}const xn=Jt.getZIndex()||0;let An=Mt[xn];An||(An={},Mt[xn]=An,An.Polygon=[],An.Circle=[],An.LineString=[],An.Point=[]);const Nn=Wt.getType();if(Nn==="GeometryCollection"){const Xt=Wt.getGeometriesArrayRecursive();for(let Zt=0,Kt=Xt.length;Zt<Kt;++Zt){const ti=Xt[Zt];An[ti.getType().replace("Multi","")].push(ti,Jt)}}else An[Nn.replace("Multi","")].push(Wt,Jt)}}const Ot=Object.keys(Mt).map(Number).sort(ascending);for(let kt=0,Nt=Ot.length;kt<Nt;++kt){const Gt=Mt[Ot[kt]];for(const Bt in Gt){const Ut=Gt[Bt];for(let Vt=0,Ht=Ut.length;Vt<Ht;Vt+=2){_t.setStyle(Ut[Vt+1]);for(let zt=0,jt=ee.length;zt<jt;++zt)_t.setTransform(ee[zt]),_t.drawGeometry(Ut[Vt])}}}return yt.getImageData(0,0,vt.width,vt.height)}function hitDetect(ne,ee,te){const st=[];if(te){const ot=Math.floor(Math.round(ne[0])*HIT_DETECT_RESOLUTION),ct=Math.floor(Math.round(ne[1])*HIT_DETECT_RESOLUTION),ut=(clamp$1(ot,0,te.width-1)+clamp$1(ct,0,te.height-1)*te.width)*4,dt=te.data[ut],ht=te.data[ut+1],pt=te.data[ut+2]+256*(ht+256*dt),mt=Math.floor((256*256*256-1)/ee.length);pt&&pt%mt===0&&st.push(ee[pt/mt-1])}return st}const SIMPLIFY_TOLERANCE=.5,GEOMETRY_RENDERERS={Point:renderPointGeometry,LineString:renderLineStringGeometry,Polygon:renderPolygonGeometry,MultiPoint:renderMultiPointGeometry,MultiLineString:renderMultiLineStringGeometry,MultiPolygon:renderMultiPolygonGeometry,GeometryCollection:renderGeometryCollectionGeometry,Circle:renderCircleGeometry};function defaultOrder(ne,ee){return parseInt(getUid(ne),10)-parseInt(getUid(ee),10)}function getSquaredTolerance(ne,ee){const te=getTolerance(ne,ee);return te*te}function getTolerance(ne,ee){return SIMPLIFY_TOLERANCE*ne/ee}function renderCircleGeometry(ne,ee,te,st,ot){const ct=te.getFill
76(),ut=te.getStroke();if(ct||ut){const ht=ne.getBuilder(te.getZIndex(),"Circle");ht.setFillStrokeStyle(ct,ut),ht.drawCircle(ee,st,ot)}const dt=te.getText();if(dt&&dt.getText()){const ht=ne.getBuilder(te.getZIndex(),"Text");ht.setTextStyle(dt),ht.drawText(ee,st,ot)}}function renderFeature$1(ne,ee,te,st,ot,ct,ut,dt){const ht=[],ft=te.getImage();if(ft){let yt=!0;const vt=ft.getImageState();vt==ImageState.LOADED||vt==ImageState.ERROR?yt=!1:vt==ImageState.IDLE&&ft.load(),yt&&ht.push(ft.ready())}const pt=te.getFill();pt&&pt.loading()&&ht.push(pt.ready());const mt=ht.length>0;return mt&&Promise.all(ht).then(()=>ot(null)),renderFeatureInternal(ne,ee,te,st,ct,ut,dt),mt}function renderFeatureInternal(ne,ee,te,st,ot,ct,ut){const dt=te.getGeometryFunction()(ee);if(!dt)return;const ht=dt.simplifyTransformed(st,ot);if(te.getRenderer())renderGeometry(ne,ht,te,ee,ut);else{const pt=GEOMETRY_RENDERERS[ht.getType()];pt(ne,ht,te,ee,ut,ct)}}function renderGeometry(ne,ee,te,st,ot){if(ee.getType()=="GeometryCollection"){const ut=ee.getGeometries();for(let dt=0,ht=ut.length;dt<ht;++dt)renderGeometry(ne,ut[dt],te,st,ot);return}ne.getBuilder(te.getZIndex(),"Default").drawCustom(ee,st,te.getRenderer(),te.getHitDetectionRenderer(),ot)}function renderGeometryCollectionGeometry(ne,ee,te,st,ot,ct){const ut=ee.getGeometriesArray();let dt,ht;for(dt=0,ht=ut.length;dt<ht;++dt){const ft=GEOMETRY_RENDERERS[ut[dt].getType()];ft(ne,ut[dt],te,st,ot,ct)}}function renderLineStringGeometry(ne,ee,te,st,ot){const ct=te.getStroke();if(ct){const dt=ne.getBuilder(te.getZIndex(),"LineString");dt.setFillStrokeStyle(null,ct),dt.drawLineString(ee,st,ot)}const ut=te.getText();if(ut&&ut.getText()){const dt=ne.getBuilder(te.getZIndex(),"Text");dt.setTextStyle(ut),dt.drawText(ee,st,ot)}}function renderMultiLineStringGeometry(ne,ee,te,st,ot){const ct=te.getStroke();if(ct){const dt=ne.getBuilder(te.getZIndex(),"LineString");dt.setFillStrokeStyle(null,ct),dt.drawMultiLineString(ee,st,ot)}const ut=te.getText();if(ut&&ut.getText()){const dt=ne.getBuilder(te.getZIndex(),"Text");dt.setTextStyle(ut),dt.drawText(ee,st,ot)}}function renderMultiPolygonGeometry(ne,ee,te,st,ot){const ct=te.getFill(),ut=te.getStroke();if(ut||ct){const ht=ne.getBuilder(te.getZIndex(),"Polygon");ht.setFillStrokeStyle(ct,ut),ht.drawMultiPolygon(ee,st,ot)}const dt=te.getText();if(dt&&dt.getText()){const ht=ne.getBuilder(te.getZIndex(),"Text");ht.setTextStyle(dt),ht.drawText(ee,st,ot)}}function renderPointGeometry(ne,ee,te,st,ot,ct){const ut=te.getImage(),dt=te.getText(),ht=dt&&dt.getText(),ft=ct&&ut&&ht?{}:void 0;if(ut){if(ut.getImageState()!=ImageState.LOADED)return;const pt=ne.getBuilder(te.getZIndex(),"Image");pt.setImageStyle(ut,ft),pt.drawPoint(ee,st,ot)}if(ht){const pt=ne.getBuilder(te.getZIndex(),"Text");pt.setTextStyle(dt,ft),pt.drawText(ee,st,ot)}}function renderMultiPointGeometry(ne,ee,te,st,ot,ct){const ut=te.getImage(),dt=ut&&ut.getOpacity()!==0,ht=te.getText(),ft=ht&&ht.getText(),pt=ct&&dt&&ft?{}:void 0;if(dt){if(ut.getImageState()!=ImageState.LOADED)return;const mt=ne.getBuilder(te.getZIndex(),"Image");mt.setImageStyle(ut,pt),mt.drawMultiPoint(ee,st,ot)}if(ft){const mt=ne.getBuilder(te.getZIndex(),"Text");mt.setTextStyle(ht,pt),mt.drawText(ee,st,ot)}}function renderPolygonGeometry(ne,ee,te,st,ot){const ct=te.getFill(),ut=te.getStroke();if(ct||ut){const ht=ne.getBuilder(te.getZIndex(),"Polygon");ht.setFillStrokeStyle(ct,ut),ht.drawPolygon(ee,st,ot)}const dt=te.getText();if(dt&&dt.getText()){const ht=ne.getBuilder(te.getZIndex(),"Text");ht.setTextStyle(dt),ht.drawText(ee,st,ot)}}class RenderEvent extends BaseEvent{constructor(ee,te,st,ot){super(ee),this.inversePixelTransform=te,this.frameState=st,this.context=ot}}const maxStaleKeys=5;class LayerRenderer extends Observable{constructor(ee){super(),this.ready=!0,this.boundHandleImageChange_=this.handleImageChange_.bind(this),this.layer_=ee,this.staleKeys_=new Array,this.maxStaleKeys=maxStaleKeys,this.renderedSourceKey_}getStaleKeys(){return this.staleKeys_}prependStaleKey(ee){this.staleKeys_.unshift(ee),this.staleKeys_.length>this.maxStaleKeys&&(this.staleKeys_.length=this.maxStaleKeys)}updateStaleKeys(ee){this.renderedSourceKey_?this.renderedSourceKey_!==ee&&(this.prependStaleKey(this.renderedSourceKey_),this.renderedSourceKey_=ee):this.renderedSourceKey_=ee}getFeatures(ee){return abstract()}getData(ee){return null}prepareFrame(ee){return abstract()}renderFrame(ee,te){return abstract()}forEachFeatureAtCoordinate(ee,te,st,ot,ct){}getLayer(){return this.layer_}handleFontsChanged(){}handleImageChange_(ee){const te=ee.target;(te.getState()===ImageState.LOADED||te.getState()===ImageState.ERROR)&&this.renderIfReadyAndVisible()}loadImage(ee){let te=ee.getState();return te!=ImageState.LOADED&&te!=ImageState.ERROR&&ee.addEventListener(EventType.CHANGE,this.boundHandleImageChange_),te==ImageState.IDLE&&(ee.load(),te=ee.getState()),te==ImageState.LOADED}renderIfReadyAndVisible(){const ee=this.getLayer();ee&&ee.getVisible()&&ee.getSourceState()==="ready"&&ee.changed()}renderDeferred(ee){}disposeInternal(){delete this.layer_,super.disposeInternal()}}const canvasPool=[];let pixelContext=null;function createPixelContext(){pixelContext=createCanvasContext2D(1,1,void 0,{willReadFrequently:!0})}class CanvasLayerRenderer extends LayerRenderer{constructor(ee){super(ee),this.container=null,this.renderedResolution,this.tempTransform=create$1(),this.pixelTransform=create$1(),this.inversePixelTransform=create$1(),this.context=null,this.deferredContext_=null,this.containerReused=!1,this.frameState=null}getImageData(ee,te,st){pixelContext||createPixelContext(),pixelContext.clearRect(0,0,1,1);let ot;try{pixelContext.drawImage(ee,te,st,1,1,0,0,1,1),ot=pixelContext.getImageData(0,0,1,1).data}catch{return pixelContext=null,null}return ot}
76getBackground(ee){let st=this.getLayer().getBackground();return typeof st=="function"&&(st=st(ee.viewState.resolution)),st||void 0}useContainer(ee,te,st,ot,ct){if(isCanvas(ee)&&this.pixelTransform[1]===0&&this.pixelTransform[2]===0&&this.pixelTransform[4]===0&&this.pixelTransform[5]===0&&ee.width===ot&&ee.height===ct){const ft=ee,pt=ft.getContext("2d");if(pt){this.container=ee,this.context=pt,this.containerReused=!0,st&&(pt.fillStyle=st,pt.fillRect(0,0,ft.width,ft.height));return}}const ut=this.getLayer().getClassName();let dt,ht;if(ee&&ee.className===ut&&(!st||ee&&ee.style.backgroundColor&&equals(asArray(ee.style.backgroundColor),asArray(st)))){const ft=ee.firstElementChild;isCanvas(ft)&&(ht=ft.getContext("2d"))}if(ht&&equivalent(ht.canvas.style.transform,te)?(this.container=ee,this.context=ht,this.containerReused=!0):this.containerReused?(this.container=null,this.context=null,this.containerReused=!1):this.container&&(this.container.style.backgroundColor=null),!this.container){dt=WORKER_OFFSCREEN_CANVAS?createMockDiv():document.createElement("div"),dt.className=ut;let ft=dt.style;ft.position="absolute",ft.width="100%",ft.height="100%",ht=createCanvasContext2D();const pt=ht.canvas;dt.appendChild(pt),ft=pt.style,ft.position="absolute",ft.left="0",ft.transformOrigin="top left",this.container=dt,this.context=ht}!this.containerReused&&st&&!this.container.style.backgroundColor&&(this.container.style.backgroundColor=st)}clipUnrotated(ee,te,st){const ot=getTopLeft(st),ct=getTopRight(st),ut=getBottomRight(st),dt=getBottomLeft(st);apply$1(te.coordinateToPixelTransform,ot),apply$1(te.coordinateToPixelTransform,ct),apply$1(te.coordinateToPixelTransform,ut),apply$1(te.coordinateToPixelTransform,dt);const ht=this.inversePixelTransform;apply$1(ht,ot),apply$1(ht,ct),apply$1(ht,ut),apply$1(ht,dt),ee.save(),ee.beginPath(),ee.moveTo(Math.round(ot[0]),Math.round(ot[1])),ee.lineTo(Math.round(ct[0]),Math.round(ct[1])),ee.lineTo(Math.round(ut[0]),Math.round(ut[1])),ee.lineTo(Math.round(dt[0]),Math.round(dt[1])),ee.clip()}prepareContainer(ee,te){const st=ee.extent,ot=ee.viewState.resolution,ct=ee.viewState.rotation,ut=ee.pixelRatio,dt=Math.round(getWidth(st)/ot*ut),ht=Math.round(getHeight(st)/ot*ut);compose(this.pixelTransform,ee.size[0]/2,ee.size[1]/2,1/ut,1/ut,ct,-dt/2,-ht/2),makeInverse(this.inversePixelTransform,this.pixelTransform);const ft=toString$1(this.pixelTransform),pt=this.getBackground(ee);if(this.useContainer(te,ft,pt,dt,ht),!this.containerReused){const mt=this.context.canvas;mt.width!=dt||mt.height!=ht?(mt.width=dt,mt.height=ht):this.context.clearRect(0,0,dt,ht),ft!==mt.style.transform&&(mt.style.transform=ft)}}dispatchRenderEvent_(ee,te,st){const ot=this.getLayer();if(ot.hasListener(ee)){const ct=new RenderEvent(ee,this.inversePixelTransform,st,te);ot.dispatchEvent(ct)}}preRender(ee,te){this.frameState=te,!te.declutter&&this.dispatchRenderEvent_(RenderEventType.PRERENDER,ee,te)}postRender(ee,te){te.declutter||this.dispatchRenderEvent_(RenderEventType.POSTRENDER,ee,te)}renderDeferredInternal(ee){}getRenderContext(ee){return ee.declutter&&!this.deferredContext_&&(this.deferredContext_=new ZIndexContext),ee.declutter?this.deferredContext_.getContext():this.context}renderDeferred(ee){ee.declutter&&(this.dispatchRenderEvent_(RenderEventType.PRERENDER,this.context,ee),ee.declutter&&this.deferredContext_&&(this.deferredContext_.draw(this.context),this.deferredContext_.clear()),this.renderDeferredInternal(ee),this.dispatchRenderEvent_(RenderEventType.POSTRENDER,this.context,ee))}getRenderTransform(ee,te,st,ot,ct,ut,dt){const ht=ct/2,ft=ut/2,pt=ot/te,mt=-pt,yt=-ee[0]+dt,vt=-ee[1];return compose(this.tempTransform,ht,ft,pt,mt,-st,yt,vt)}disposeInternal(){delete this.frameState,super.disposeInternal()}}class CanvasVectorLayerRenderer extends CanvasLayerRenderer{constructor(ee){super(ee),this.boundHandleStyleImageChange_=this.handleStyleImageChange_.bind(this),this.animatingOrInteracting_,this.hitDetectionImageData_=null,this.clipExtent_=null,this.extendX_=!1,this.renderedFeatures_=null,this.renderedRevision_=-1,this.renderedResolution_=NaN,this.renderedExtent_=createEmpty(),this.wrappedRenderedExtent_=createEmpty(),this.renderedRotation_,this.renderedCenter_=null,this.renderedProjection_=null,this.renderedPixelRatio_=1,this.renderedRenderOrder_=null,this.renderedFrameDeclutter_,this.replayGroup_=null,this.replayGroupChanged=!0,this.clipping=!0,this.targetContext_=null,this.opacity_=1}renderWorlds(ee,te,st){const ot=te.extent,ct=te.viewState,ut=ct.center,dt=ct.resolution,ht=ct.projection,ft=ct.rotation,pt=ht.getExtent(),mt=this.getLayer().getSource(),yt=this.getLayer().getDeclutter(),vt=te.pixelRatio,_t=te.viewHints,bt=!(_t[ViewHint.ANIMATING]||_t[ViewHint.INTERACTING]),xt=this.context,Mt=Math.round(getWidth(ot)/dt*vt),Ot=Math.round(getHeight(ot)/dt*vt),kt=mt.getWrapX()&&ht.canWrapX(),Nt=kt?getWidth(pt):null,Gt=kt?Math.ceil((ot[2]-pt[2])/Nt)+(this.extendX_?2:1):1;let Bt=kt?Math.floor((ot[0]-pt[0])/Nt)-(this.extendX_?1:0):0;do{let Ut=this.getRenderTransform(ut,dt,0,vt,Mt,Ot,Bt*Nt);te.declutter&&(Ut=Ut.slice(0)),ee.execute(xt,[xt.canvas.width,xt.canvas.height],Ut,ft,bt,st===void 0?ALL:st?DECLUTTER:NON_DECLUTTER,st?yt&&te.declutter[yt]:void 0)}while(++Bt<Gt)}setDrawContext_(){this.opacity_!==1&&(this.targetContext_=this.context,this.context=createCanvasContext2D(this.context.canvas.width,this.context.canvas.height,canvasPool))}resetDrawContext_(){if(this.opacity_!==1&&this.targetContext_){const ee=this.targetContext_.globalAlpha;this.targetContext_.globalAlpha=this.opacity_,this.targetContext_.drawImage(this.context.canvas,0,0),this.targetContext_.globalAlpha=ee,releaseCanvas(this.context),canvasPool.push(this.context.canvas),this.context=this.targetContext_,this.targetContext_=null}}renderDeclutter(ee){!this.replayGroup_||!this.getLayer().getDeclutter()||this.renderWorlds(this.replayGroup_,ee,!0)}renderDeferredInternal(ee){this.replayGroup_&&(this.clipExtent_&&this.clipUnrotated(this.context,ee,this.clipExtent_),this.replayGroup_.renderDeferred(),this.clipExtent_&&(this.context.restore(
76),this.clipExtent_=null),this.resetDrawContext_())}renderFrame(ee,te){const st=ee.layerStatesArray[ee.layerIndex];this.opacity_=st.opacity;const ot=ee.viewState;this.prepareContainer(ee,te);const ct=this.context,ut=this.replayGroup_;let dt=ut&&!ut.isEmpty();if(!dt&&!(this.getLayer().hasListener(RenderEventType.PRERENDER)||this.getLayer().hasListener(RenderEventType.POSTRENDER)))return this.container;this.setDrawContext_(),this.preRender(ct,ee),ot.projection,this.clipExtent_=null;let ht=!1;if(dt&&st.extent&&this.clipping){const ft=fromUserExtent(st.extent);dt=intersects$1(ft,ee.extent),dt&&!containsExtent(ft,ee.extent)&&(ee.declutter?this.clipExtent_=ft:(this.clipUnrotated(ct,ee,ft),ht=!0))}return dt&&this.renderWorlds(ut,ee,this.getLayer().getDeclutter()?!1:void 0),ht&&ct.restore(),this.postRender(ct,ee),this.renderedRotation_!==ot.rotation&&(this.renderedRotation_=ot.rotation,this.hitDetectionImageData_=null),ee.declutter||this.resetDrawContext_(),this.container}getFeatures(ee){return new Promise(te=>{if(this.frameState&&!this.hitDetectionImageData_&&!this.animatingOrInteracting_){const st=this.frameState.size.slice(),ot=this.renderedCenter_,ct=this.renderedResolution_,ut=this.renderedRotation_,dt=this.renderedProjection_,ht=this.wrappedRenderedExtent_,ft=this.getLayer(),pt=[],mt=st[0]*HIT_DETECT_RESOLUTION,yt=st[1]*HIT_DETECT_RESOLUTION;pt.push(this.getRenderTransform(ot,ct,ut,HIT_DETECT_RESOLUTION,mt,yt,0).slice());const vt=ft.getSource(),_t=dt.getExtent();if(vt.getWrapX()&&dt.canWrapX()&&!containsExtent(_t,ht)){let bt=ht[0];const xt=getWidth(_t);let Mt=0,Ot;for(;bt<_t[0];)--Mt,Ot=xt*Mt,pt.push(this.getRenderTransform(ot,ct,ut,HIT_DETECT_RESOLUTION,mt,yt,Ot).slice()),bt+=xt;for(Mt=0,bt=ht[2];bt>_t[2];)++Mt,Ot=xt*Mt,pt.push(this.getRenderTransform(ot,ct,ut,HIT_DETECT_RESOLUTION,mt,yt,Ot).slice()),bt-=xt}this.hitDetectionImageData_=createHitDetectionImageData(st,pt,this.renderedFeatures_,ft.getStyleFunction(),ht,ct,ut,getSquaredTolerance(ct,this.renderedPixelRatio_),null)}te(hitDetect(ee,this.renderedFeatures_,this.hitDetectionImageData_))})}forEachFeatureAtCoordinate(ee,te,st,ot,ct){var yt,vt;if(!this.replayGroup_)return;const ut=te.viewState.resolution,dt=te.viewState.rotation,ht=this.getLayer(),ft={},pt=function(_t,bt,xt){const Mt=getUid(_t),Ot=ft[Mt];if(Ot){if(Ot!==!0&&xt<Ot.distanceSq){if(xt===0)return ft[Mt]=!0,ct.splice(ct.lastIndexOf(Ot),1),ot(_t,ht,bt);Ot.geometry=bt,Ot.distanceSq=xt}}else{if(xt===0)return ft[Mt]=!0,ot(_t,ht,bt);ct.push(ft[Mt]={feature:_t,layer:ht,geometry:bt,distanceSq:xt,callback:ot})}},mt=this.getLayer().getDeclutter();return this.replayGroup_.forEachFeatureAtCoordinate(ee,ut,dt,st,pt,mt?(vt=(yt=te.declutter)==null?void 0:yt[mt])==null?void 0:vt.all().map(_t=>_t.value):null)}handleFontsChanged(){const ee=this.getLayer();ee.getVisible()&&this.replayGroup_&&ee.changed()}handleStyleImageChange_(ee){this.renderIfReadyAndVisible()}prepareFrame(ee){const te=this.getLayer(),st=te.getSource();if(!st)return!1;const ot=ee.viewHints[ViewHint.ANIMATING],ct=ee.viewHints[ViewHint.INTERACTING],ut=te.getUpdateWhileAnimating(),dt=te.getUpdateWhileInteracting();if(this.ready&&!ut&&ot||!dt&&ct)return this.animatingOrInteracting_=!0,!0;this.animatingOrInteracting_=!1;const ht=ee.extent,ft=ee.viewState,pt=ft.projection,mt=ft.resolution,yt=ee.pixelRatio,vt=te.getRevision(),_t=te.getRenderBuffer();let bt=te.getRenderOrder();bt===void 0&&(bt=defaultOrder);const xt=ft.center.slice(),Mt=buffer(ht,_t*mt),Ot=Mt.slice(),kt=[Mt.slice()],Nt=pt.getExtent(),Gt=st.getWrapX()&&pt.canWrapX();if(this.extendX_=!1,Gt){const oi=st.getExtent();oi&&!isEmpty$1(oi)&&(this.extendX_=oi[0]<Nt[0]||oi[2]>Nt[2])}if(Gt&&(!containsExtent(Nt,ee.extent)||this.extendX_)){const oi=getWidth(Nt),ai=Math.max(getWidth(Mt)/2,oi);let xn=Nt[0],An=Nt[2];this.extendX_&&(xn-=oi,An+=oi),Mt[0]=xn-ai,Mt[2]=An+ai,wrapX$1(xt,pt);const Nn=wrapX$2(kt[0],pt);Nn[0]<Nt[0]&&Nn[2]<Nt[2]?kt.push([Nn[0]+oi,Nn[1],Nn[2]+oi,Nn[3]]):Nn[0]>Nt[0]&&Nn[2]>Nt[2]&&kt.push([Nn[0]-oi,Nn[1],Nn[2]-oi,Nn[3]])}if(this.ready&&this.renderedResolution_==mt&&this.renderedPixelRatio_===yt&&this.renderedRevision_==vt&&this.renderedRenderOrder_==bt&&this.renderedFrameDeclutter_===!!ee.declutter&&containsExtent(this.wrappedRenderedExtent_,Mt))return equals(this.renderedExtent_,Ot)||(this.hitDetectionImageData_=null,this.renderedExtent_=Ot),this.renderedCenter_=xt,this.replayGroupChanged=!1,!0;this.replayGroup_=null;const Bt=new BuilderGroup(getTolerance(mt,yt),Mt,mt,yt);let Ut;for(let oi=0,ai=kt.length;oi<ai;++oi)st.loadFeatures(kt[oi],mt,pt);const Vt=getSquaredTolerance(mt,yt);let Ht=!0;
76const zt=(oi,ai)=>{let xn;const An=oi.getStyleFunction()||te.getStyleFunction();if(An&&(xn=An(oi,mt)),xn){const Nn=this.renderFeature(oi,Vt,xn,Bt,Ut,this.getLayer().getDeclutter(),ai);Ht=Ht&&!Nn}},jt=toUserExtent(Mt),Wt=st.getFeaturesInExtent(jt);bt&&Wt.sort(bt);for(let oi=0,ai=Wt.length;oi<ai;++oi)zt(Wt[oi],oi);this.renderedFeatures_=Wt,this.ready=Ht;const Jt=Bt.finish(),Qt=new ExecutorGroup(Mt,mt,yt,st.getOverlaps(),Jt,te.getRenderBuffer(),!!ee.declutter);return this.renderedResolution_=mt,this.renderedRevision_=vt,this.renderedRenderOrder_=bt,this.renderedFrameDeclutter_=!!ee.declutter,this.renderedExtent_=Ot,this.wrappedRenderedExtent_=Mt,this.renderedCenter_=xt,this.renderedProjection_=pt,this.renderedPixelRatio_=yt,this.replayGroup_=Qt,this.hitDetectionImageData_=null,this.replayGroupChanged=!0,!0}renderFeature(ee,te,st,ot,ct,ut,dt){if(!st)return!1;let ht=!1;if(Array.isArray(st))for(let ft=0,pt=st.length;ft<pt;++ft)ht=renderFeature$1(ot,ee,st[ft],te,this.boundHandleStyleImageChange_,ct,ut,dt)||ht;else ht=renderFeature$1(ot,ee,st,te,this.boundHandleStyleImageChange_,ct,ut,dt);return ht}}let numTypes=0;const NoneType=0,BooleanType$1=1<<numTypes++,NumberType$1=1<<numTypes++,StringType$1=1<<numTypes++,ColorType$1=1<<numTypes++,NumberArrayType$1=1<<numTypes++,SizeType=1<<numTypes++,AnyType=Math.pow(2,numTypes)-1,typeNames={[BooleanType$1]:"boolean",[NumberType$1]:"number",[StringType$1]:"string",[ColorType$1]:"color",[NumberArrayType$1]:"number[]",[SizeType]:"size"},namedTypes=Object.keys(typeNames).map(Number).sort(ascending);function isSpecific(ne){return ne in typeNames}function typeName(ne){const ee=[];for(const te of namedTypes)includesType(ne,te)&&ee.push(typeNames[te]);return ee.length===0?"untyped":ee.length<3?ee.join(" or "):ee.slice(0,-1).join(", ")+", or "+ee[ee.length-1]}function includesType(ne,ee){return(ne&ee)===ee}function overlapsType(ne,ee){return!!(ne&ee)}function isType(ne,ee){return ne===ee}class LiteralExpression{constructor(ee,te){if(!isSpecific(ee))throw new Error(`literal expressions must have a specific type, got ${typeName(ee)}`);this.type=ee,this.value=te}}class CallExpression{constructor(ee,te,...st){this.type=ee,this.operator=te,this.args=st}}function newParsingContext(ne){return{variables:new Map,properties:new Map,featureId:!1,geometryType:!1,mCoordinate:!1,mapState:!1,inputVariables:ne}}function parse$2(ne,ee,te){switch(typeof ne){case"boolean":{if(isType(ee,StringType$1))return new LiteralExpression(StringType$1,ne?"true":"false");if(!includesType(ee,BooleanType$1))throw new Error(`got a boolean, but expected ${typeName(ee)}`);return new LiteralExpression(BooleanType$1,ne)}case"number":{if(isType(ee,SizeType))return new LiteralExpression(SizeType,toSize(ne));if(isType(ee,BooleanType$1))return new LiteralExpression(BooleanType$1,!!ne);if(isType(ee,StringType$1))return new LiteralExpression(StringType$1,ne.toString());if(!includesType(ee,NumberType$1))throw new Error(`got a number, but expected ${typeName(ee)}`);return new LiteralExpression(NumberType$1,ne)}case"string":{if(isType(ee,ColorType$1))return new LiteralExpression(ColorType$1,fromString(ne));if(isType(ee,BooleanType$1))return new LiteralExpression(BooleanType$1,!!ne);if(!includesType(ee,StringType$1))throw new Error(`got a string, but expected ${typeName(ee)}`);return new LiteralExpression(StringType$1,ne)}}if(!Array.isArray(ne))throw new Error("expression must be an array or a primitive value");if(ne.length===0)throw new Error("empty expression");if(typeof ne[0]=="string")return parseCallExpression(ne,ee,te);for(const st of ne)if(typeof st!="number")throw new Error("expected an array of numbers");if(isType(ee,SizeType)){if(ne.length!==2)throw new Error(`expected an array of two values for a size, got ${ne.length}`);return new LiteralExpression(SizeType,ne)}if(isType(ee,ColorType$1)){if(ne.length===3)return new LiteralExpression(ColorType$1,[...ne,1]);if(ne.length===4)return new LiteralExpression(ColorType$1,ne);throw new Error(`expected an array of 3 or 4 values for a color, got ${ne.length}`)}if(!includesType(ee,NumberArrayType$1))throw new Error(`got an array of numbers, but expected ${typeName(ee)}`);return new LiteralExpression(NumberArrayType$1,ne)}const Ops={Get:"get",Var:"var",Concat:"concat",GeometryType:"geometry-type",LineMetric:"line-metric",Any:"any",All:"all",Not:"!",Resolution:"resolution",Zoom:"zoom",Time:"time",Equal:"==",NotEqual:"!=",GreaterThan:">",GreaterThanOrEqualTo:">
76=",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",Has:"has"},parsers={[Ops.Get]:createCallExpressionParser(hasArgsCount(1,1/0),withGetArgs),[Ops.Var]:createVarExpressionParser(),[Ops.Has]:createCallExpressionParser(hasArgsCount(1,1/0),withGetArgs),[Ops.Id]:createCallExpressionParser(usesFeatureId,withNoArgs),[Ops.Concat]:createCallExpressionParser(hasArgsCount(2,1/0),withArgsOfType(StringType$1)),[Ops.GeometryType]:createCallExpressionParser(usesGeometryType,withNoArgs),[Ops.LineMetric]:createCallExpressionParser(usesMCoordinate,withNoArgs),[Ops.Resolution]:createCallExpressionParser(usesMapState,withNoArgs),[Ops.Zoom]:createCallExpressionParser(usesMapState,withNoArgs),[Ops.Time]:createCallExpressionParser(usesMapState,withNoArgs),[Ops.Any]:createCallExpressionParser(hasArgsCount(2,1/0),withArgsOfType(BooleanType$1)),[Ops.All]:createCallExpressionParser(hasArgsCount(2,1/0),withArgsOfType(BooleanType$1)),[Ops.Not]:createCallExpressionParser(hasArgsCount(1,1),withArgsOfType(BooleanType$1)),[Ops.Equal]:createCallExpressionParser(hasArgsCount(2,2),withArgsOfIdenticalType()),[Ops.NotEqual]:createCallExpressionParser(hasArgsCount(2,2),withArgsOfIdenticalType()),[Ops.GreaterThan]:createCallExpressionParser(hasArgsCount(2,2),withArgsOfType(NumberType$1)),[Ops.GreaterThanOrEqualTo]:createCallExpressionParser(hasArgsCount(2,2),withArgsOfType(NumberType$1)),[Ops.LessThan]:createCallExpressionParser(hasArgsCount(2,2),withArgsOfType(NumberType$1)),[Ops.LessThanOrEqualTo]:createCallExpressionParser(hasArgsCount(2,2),withArgsOfType(NumberType$1)),[Ops.Multiply]:createCallExpressionParser(hasArgsCount(2,1/0),withArgsOfReturnType),[Ops.Coalesce]:createCallExpressionParser(hasArgsCount(2,1/0),withArgsOfReturnType),[Ops.Divide]:createCallExpressionParser(hasArgsCount(2,2),withArgsOfType(NumberType$1)),[Ops.Add]:createCallExpressionParser(hasArgsCount(2,1/0),withArgsOfType(NumberType$1)),[Ops.Subtract]:createCallExpressionParser(hasArgsCount(2,2),withArgsOfType(NumberType$1)),[Ops.Clamp]:createCallExpressionParser(hasArgsCount(3,3),withArgsOfType(NumberType$1)),[Ops.Mod]:createCallExpressionParser(hasArgsCount(2,2),withArgsOfType(NumberType$1)),[Ops.Pow]:createCallExpressionParser(hasArgsCount(2,2),withArgsOfType(NumberType$1)),[Ops.Abs]:createCallExpressionParser(hasArgsCount(1,1),withArgsOfType(NumberType$1)),[Ops.Floor]:createCallExpressionParser(hasArgsCount(1,1),withArgsOfType(NumberType$1)),[Ops.Ceil]:createCallExpressionParser(hasArgsCount(1,1),withArgsOfType(NumberType$1)),[Ops.Round]:createCallExpressionParser(hasArgsCount(1,1),withArgsOfType(NumberType$1)),[Ops.Sin]:createCallExpressionParser(hasArgsCount(1,1),withArgsOfType(NumberType$1)),[Ops.Cos]:createCallExpressionParser(hasArgsCount(1,1),withArgsOfType(NumberType$1)),[Ops.Atan]:createCallExpressionParser(hasArgsCount(1,2),withArgsOfType(NumberType$1)),[Ops.Sqrt]:createCallExpressionParser(hasArgsCount(1,1),withArgsOfType(NumberType$1)),[Ops.Match]:createCallExpressionParser(hasArgsCount(4,1/0),hasEvenArgs,withMatchArgs),[Ops.Between]:createCallExpressionParser(hasArgsCount(3,3),withArgsOfType(NumberType$1)),[Ops.Interpolate]:createCallExpressionParser(hasArgsCount(6,1/0),hasEvenArgs,withInterpolateArgs),[Ops.Case]:createCallExpressionParser(hasArgsCount(3,1/0),hasOddArgs,withCaseArgs),[Ops.In]:createCallExpressionParser(hasArgsCount(2,2),withInArgs),[Ops.Number]:createCallExpressionParser(hasArgsCount(1,1/0),withArgsOfType(AnyType)),[Ops.String]:createCallExpressionParser(hasArgsCount(1,1/0),withArgsOfType(AnyType)),[Ops.Array]:createCallExpressionParser(hasArgsCount(1,1/0),withArgsOfType(NumberType$1)),[Ops.Color]:createCallExpressionParser(hasArgsCount(1,4),withArgsOfType(NumberType$1)),[Ops.Band]:createCallExpressionParser(hasArgsCount(1,3),withArgsOfType(NumberType$1)),[Ops.Palette]:createCallExpressionParser(hasArgsCount(2,2),withPaletteArgs),[Ops.ToString]:createCallExpressionParser(hasArgsCount(1,1),withArgsOfType(BooleanType$1|NumberType$1|StringType$1|ColorType$1))};function withGetArgs(ne,ee,te){const st=ne.length-1,ot=new Array(st);for(let ct=0;ct<st;++ct){const ut=ne[ct+1];switch(typeof ut){case"number":{ot[ct]=new LiteralExpression(NumberType$1,ut);break}case"string":{ot[ct]=new LiteralExpression(StringType$1,ut);break}default:throw new Error(`expected a string key or numeric array index for a get operation, got ${ut}`)}ct===0&&te.properties.set(String(ut),ee)}return ot}function createVarExpressionParser(){return function(ne,ee,te){var ut;const st=ne[1];if(typeof st!="string")throw new Error("expected a string argument for var operation");let ot=ee;const ct=(ut=te.inputVariables)==null?void 0:ut[st];if(ct!==void 0){const dt=parse$2(ct,AnyType,te);if(!(dt instanceof LiteralExpression))throw new Error(`style variables should only be literal values (no expressions!), variable name: ${st}`);let ht=dt.type;if(typeof ct=="string"&&overlapsType(ot,ColorType$1)&&!overlapsType(ot,StringType$1)?ht=ColorType$1:Array.isArray(ct)&&ct.length===2&&overlapsType(ot,SizeType)&&!overlapsType(ot,NumberArrayType$1)&&(ht=SizeType),ot&=ht,ot===NoneType)throw new Error(`the type expected from the var operator (${typeName(ee)}) did not have any overlap with the type of the corresponding style variables (${typeName(ht)}), variable name: ${st}`)}if(te.variables.has(st)){const dt=te.variables.get(st);if(ot&=dt,ot===NoneType)throw new Error(`a new type expected from the var operator (${typeName(ee)}) did not have any overlap with the previous type expected for it (${typeName(dt)}), variable name: ${st}`)}return te.variables.set(st,ot),new CallExpression(ot,"var",new LiteralExpression(StringType$1,st))}}function usesFeatureId(ne,ee,te){te.featureId=!0}function usesGeometryType(ne,ee,te){te.geometryType=!0}function usesMCoordinate(ne,ee,te){te.mCoordinate=!0}function usesMapState(ne,ee,te){te.mapState=!0}function withNoArgs(ne,ee,te){const st=ne[0];if(ne.length!==1)throw new Error(`expected no arguments for ${st} operation`);return[]}function hasArgsCount(ne,ee){return function(te,st,ot){const ct=te[0],ut=te.length-1;if(ne===ee){if(ut!==ne){const dt=ne===1?"":"s";throw new Error(`expected ${ne} argument${dt} for ${ct}, got ${ut}`)}}else if(ut<ne||ut>ee){const dt=ee===1/0?`${ne} or more`:`${ne} to ${ee}`;throw new Error(`expected ${dt} arguments for ${ct}, got ${ut}`)}}}function withArgsOfReturnType(ne,ee,te){const st=ne.length-1,ot=new Array(st);for(let ct=0;ct<st;++ct){const ut=parse$2(ne[ct+1],ee,te);ot[ct]=ut}return ot}function withArgsOfType(ne){return function(ee,te,st){const ot=ee.length-1,ct=new Array(ot);for(let ut=0;ut<ot;++ut){const dt=parse$2(ee[ut+1],ne,st);ct[ut]=dt}return ct}}function withArgsOfIdenticalType(){return function(ne,ee,te){const st=ne[0],ot=ne.length-1,ct=new Array(ot);let ut=AnyType;for(let dt=0;dt<ot;++dt){const ht=parse$2(ne[dt+1],ut,te);ut&=ht.type}if(ut===NoneType)throw new Error(`no common type was found among the arguments of ${st}`);for(let dt=0;dt<ot;++dt){const ht=parse$2(ne[dt+1],ut,te);ct[dt]=ht}return ct}}function hasOddArgs(ne,ee,te){const st=ne[0],ot=ne.length-1;if(ot%2===0)throw new Error(`expected an odd number of arguments for ${st}, got ${ot} instead`)}function hasEvenArgs(ne,ee,te){const st=ne[0],ot=ne.length-1;if(ot%2===1)throw new Error(`expected an even number of arguments for operation ${st}, got ${ot} instead`)}function withMatchArgs(ne,ee,te){const st=ne.length-1,ot=parse$2(ne[ne.length-1],ee,te);let ct=StringType$1|NumberType$1|BooleanType$1;const ut=new Array(st-2);for(let ht=0;ht<st-2;
76ht+=2){try{const ft=parse$2(ne[ht+2],ct,te);ct&=ft.type}catch(ft){throw new Error(`failed to parse argument ${ht+1} of match expression: ${ft.message}`)}if(ct===NoneType)throw new Error("no common type was found among the arguments of match expression")}for(let ht=0;ht<st-2;ht+=2){try{const ft=parse$2(ne[ht+2],ct,te);ut[ht]=ft}catch(ft){throw new Error(`failed to parse argument ${ht+1} of match expression: ${ft.message}`)}try{const ft=parse$2(ne[ht+3],ot.type,te);ut[ht+1]=ft}catch(ft){throw new Error(`failed to parse argument ${ht+2} of match expression: ${ft.message}`)}}return[parse$2(ne[1],ct,te),...ut,ot]}function withInterpolateArgs(ne,ee,te){const st=ne[1];let ot;switch(st[0]){case"linear":ot=1;break;case"exponential":const ht=st[1];if(typeof ht!="number"||ht<=0)throw new Error(`expected a number base for exponential interpolation, got ${JSON.stringify(ht)} instead`);ot=ht;break;default:throw new Error(`invalid interpolation type: ${JSON.stringify(st)}`)}const ct=new LiteralExpression(NumberType$1,ot);let ut;try{ut=parse$2(ne[2],NumberType$1,te)}catch(ht){throw new Error(`failed to parse argument 1 in interpolate expression: ${ht.message}`)}const dt=new Array(ne.length-3);for(let ht=0;ht<dt.length;ht+=2){try{const ft=parse$2(ne[ht+3],NumberType$1,te);dt[ht]=ft}catch(ft){throw new Error(`failed to parse argument ${ht+2} for interpolate expression: ${ft.message}`)}try{const ft=parse$2(ne[ht+4],ee,te);dt[ht+1]=ft}catch(ft){throw new Error(`failed to parse argument ${ht+3} for interpolate expression: ${ft.message}`)}}return[ct,ut,...dt]}function withCaseArgs(ne,ee,te){const st=parse$2(ne[ne.length-1],ee,te),ot=new Array(ne.length-1);for(let ct=0;ct<ot.length-1;ct+=2){try{const ut=parse$2(ne[ct+1],BooleanType$1,te);ot[ct]=ut}catch(ut){throw new Error(`failed to parse argument ${ct} of case expression: ${ut.message}`)}try{const ut=parse$2(ne[ct+2],st.type,te);ot[ct+1]=ut}catch(ut){throw new Error(`failed to parse argument ${ct+1} of case expression: ${ut.message}`)}}return ot[ot.length-1]=st,ot}function withInArgs(ne,ee,te){let st=ne[2];if(!Array.isArray(st))throw new Error('the second argument for the "in" operator must be an array');let ot;if(st[0]==="literal"){if(st=st[1],!Array.isArray(st))throw new Error('failed to parse "in" expression: the literal operator must be followed by an array')}else if(typeof st[0]=="string")throw new Error('for the "in" operator, a string array should be wrapped in a "literal" operator to disambiguate from expressions');typeof st[0]=="string"?ot=StringType$1:ot=NumberType$1;const ct=new Array(st.length);for(let dt=0;dt<ct.length;dt++)try{const ht=parse$2(st[dt],ot,te);ct[dt]=ht}catch(ht){throw new Error(`failed to parse haystack item ${dt} for "in" expression: ${ht.message}`)}return[parse$2(ne[1],ot,te),...ct]}function withPaletteArgs(ne,ee,te){let st;try{st=parse$2(ne[1],NumberType$1,te)}catch(ut){throw new Error(`failed to parse first argument in palette expression: ${ut.message}`)}const ot=ne[2];if(!Array.isArray(ot))throw new Error("the second argument of palette must be an array");const ct=new Array(ot.length);for(let ut=0;ut<ct.length;ut++){let dt;try{dt=parse$2(ot[ut],ColorType$1,te)}catch(ht){throw new Error(`failed to parse color at index ${ut} in palette expression: ${ht.message}`)}if(!(dt instanceof LiteralExpression))throw new Error(`the palette color at index ${ut} must be a literal value`);ct[ut]=dt}return[st,...ct]}function createCallExpressionParser(...ne){return function(ee,te,st){const ot=ee[0];let ct;for(let ut=0;ut<ne.length;ut++){const dt=ne[ut](ee,te,st);if(ut==ne.length-1){if(!dt)throw new Error("expected last argument validator to return the parsed args");ct=dt}}return new CallExpression(te,ot,...ct)}}function parseCallExpression(ne,ee,te){const st=ne[0],ot=parsers[st];if(!ot)throw new Error(`unknown operator: ${st}`);return ot(ne,ee,te)}function computeGeometryType(ne){if(!ne)return"";const ee=ne.getType();switch(ee){case"Point":case"LineString":case"Polygon":return ee;case"MultiPoint":case"MultiLineString":case"MultiPolygon":return ee.substring(5);case"Circle":return"Polygon";
vendor: 5,233 bytes, line 76
76case"GeometryCollection":return computeGeometryType(ne.getGeometries()[0]);default:return""}}function newEvaluationContext(){return{variables:{},properties:{},resolution:NaN,featureId:null,geometryType:""}}function buildExpression(ne,ee,te){const st=parse$2(ne,ee,te);return compileExpression(st)}function compileExpression(ne,ee){if(ne instanceof LiteralExpression){if(ne.type===ColorType$1&&typeof ne.value=="string"){const st=fromString(ne.value);return function(){return st}}return function(){return ne.value}}const te=ne.operator;switch(te){case Ops.Number:case Ops.String:case Ops.Coalesce:return compileAssertionExpression(ne);case Ops.Get:case Ops.Var:case Ops.Has:return compileAccessorExpression(ne);case Ops.Id:return st=>st.featureId;case Ops.GeometryType:return st=>st.geometryType;case Ops.Concat:{const st=ne.args.map(ot=>compileExpression(ot));return ot=>"".concat(...st.map(ct=>ct(ot).toString()))}case Ops.Resolution:return st=>st.resolution;case Ops.Any:case Ops.All:case Ops.Between:case Ops.In:case Ops.Not:return compileLogicalExpression(ne);case Ops.Equal:case Ops.NotEqual:case Ops.LessThan:case Ops.LessThanOrEqualTo:case Ops.GreaterThan:case Ops.GreaterThanOrEqualTo:return compileComparisonExpression(ne);case Ops.Multiply:case Ops.Divide:case Ops.Add:case Ops.Subtract:case Ops.Clamp:case Ops.Mod:case Ops.Pow:case Ops.Abs:case Ops.Floor:case Ops.Ceil:case Ops.Round:case Ops.Sin:case Ops.Cos:case Ops.Atan:case Ops.Sqrt:return compileNumericExpression(ne);case Ops.Case:return compileCaseExpression(ne);case Ops.Match:return compileMatchExpression(ne);case Ops.Interpolate:return compileInterpolateExpression(ne);case Ops.ToString:return compileConvertExpression(ne);default:throw new Error(`Unsupported operator ${te}`)}}function compileAssertionExpression(ne,ee){const te=ne.operator,st=ne.args.length,ot=new Array(st);for(let ct=0;ct<st;++ct)ot[ct]=compileExpression(ne.args[ct]);switch(te){case Ops.Coalesce:return ct=>{for(let ut=0;ut<st;++ut){const dt=ot[ut](ct);if(typeof dt<"u"&&dt!==null)return dt}throw new Error("Expected one of the values to be non-null")};case Ops.Number:case Ops.String:return ct=>{for(let ut=0;ut<st;++ut){const dt=ot[ut](ct);if(typeof dt===te)return dt}throw new Error(`Expected one of the values to be a ${te}`)};default:throw new Error(`Unsupported assertion operator ${te}`)}}function compileAccessorExpression(ne,ee){const st=ne.args[0].value;switch(ne.operator){case Ops.Get:return ot=>{const ct=ne.args;let ut=ot.properties[st];for(let dt=1,ht=ct.length;dt<ht;++dt){const pt=ct[dt].value;ut=ut[pt]}return ut};case Ops.Var:return ot=>ot.variables[st];case Ops.Has:return ot=>{const ct=ne.args;if(!(st in ot.properties))return!1;let ut=ot.properties[st];for(let dt=1,ht=ct.length;dt<ht;++dt){const pt=ct[dt].value;if(!ut||!Object.hasOwn(ut,pt))return!1;ut=ut[pt]}return!0};default:throw new Error(`Unsupported accessor operator ${ne.operator}`)}}function compileComparisonExpression(ne,ee){const te=ne.operator,st=compileExpression(ne.args[0]),ot=compileExpression(ne.args[1]);switch(te){case Ops.Equal:return ct=>st(ct)===ot(ct);case Ops.NotEqual:return ct=>st(ct)!==ot(ct);case Ops.LessThan:return ct=>st(ct)<ot(ct);case Ops.LessThanOrEqualTo:return ct=>st(ct)<=ot(ct);case Ops.GreaterThan:return ct=>st(ct)>ot(ct);case Ops.GreaterThanOrEqualTo:return ct=>st(ct)>=ot(ct);default:throw new Error(`Unsupported comparison operator ${te}`)}}function compileLogicalExpression(ne,ee){const te=ne.operator,st=ne.args.length,ot=new Array(st);for(let ct=0;ct<st;++ct)ot[ct]=compileExpression(ne.args[ct]);switch(te){case Ops.Any:return ct=>{for(let ut=0;ut<st;++ut)if(ot[ut](ct))return!0;return!1};case Ops.All:return ct=>{for(let ut=0;ut<st;++ut)if(!ot[ut](ct))return!1;return!0};case Ops.Between:return ct=>{const ut=ot[0](ct),dt=ot[1](ct),ht=ot[2](ct);return ut>=dt&&ut<=ht};case Ops.In:return ct=>{const ut=ot[0](ct);for(let dt=1;dt<st;++dt)if(ut===ot[dt](ct))return!0;return!1};case Ops.Not:return ct=>!ot[0](ct);default:throw new Error(`Unsupported logical operator ${te}`)}}function compileNumericExpression(ne,ee){const te=ne.operator,st=ne.args.length,ot=new Array(st);for(let ct=0;ct<st;++ct)ot[ct]=compileExpression(ne.args[ct]);switch(te){case Ops.Multiply:return ct=>{let ut=1;for(let dt=0;dt<st;++dt)ut*=ot[dt](ct);return ut};case Ops.Divide:return ct=>ot[0](ct)/ot[1](ct);case Ops.Add:return ct=>{let ut=0;for(let dt=0;dt<st;++dt)ut+=ot[dt](ct);return ut};case Ops.Subtract:return ct=>ot[0](ct)-ot[1](ct);case Ops.Clamp:return ct=>{const ut=ot[0](ct),dt=ot[1](ct);if(ut<dt)return dt;const ht=ot[2](ct);return ut>ht?ht:ut};case Ops.Mod:return ct=>ot[0](ct)%ot[1](ct);case Ops.Pow:return ct=>Math.pow(ot[0](ct),ot[1](ct));case Ops.Abs:return ct=>Math.abs(ot[0](ct));case Ops.Floor:return ct=>Math.floor(ot[0](ct));case Ops.Ceil:return ct=>Math.ceil(ot[0](ct));case Ops.Round:return ct=>Math.round(ot[0](ct));case Ops.Sin:return ct=>Math.sin(ot[0](ct));case Ops.Cos:return ct=>Math.cos(ot[0](ct));case Ops.Atan:return st===2?ct=>Math.atan2(ot[0](ct),ot[1](ct)):ct=>Math.atan(ot[0](ct));case Ops.Sqrt:return ct=>Math.sqrt(ot[0](ct));default:throw new Error(`Unsupported numeric operator ${te}`)}}function compileCaseExpression(ne,ee){const te=ne.args.length,st=ne
76w Array(te);for(let ot=0;ot<te;++ot)st[ot]=compileExpression(ne.args[ot]);return ot=>{for(let ct=0;ct<te-1;ct+=2)if(st[ct](ot))return st[ct+1](ot);return st[te-1](ot)}}function compileMatchExpression(ne,ee){const te=ne.args.length,st=new Array(te);for(let ot=0;ot<te;++ot)st[ot]=compileExpression(ne.args[ot]);return ot=>{const ct=st[0](ot);for(let ut=1;ut<te-1;ut+=2)if(ct===st[ut](ot))return st[ut+1](ot);return st[te-1](ot)}}function compileInterpolateExpression(ne,ee){const te=ne.args.length,st=new Array(te);for(let ot=0;ot<te;++ot)st[ot]=compileExpression(ne.args[ot]);return ot=>{const ct=st[0](ot),ut=st[1](ot);let dt,ht;for(let ft=2;ft<te;ft+=2){const pt=st[ft](ot);let mt=st[ft+1](ot);const yt=Array.isArray(mt);if(yt&&(mt=withAlpha(mt)),pt>=ut)return ft===2?mt:yt?interpolateColor(ct,ut,dt,ht,pt,mt):interpolateNumber$1(ct,ut,dt,ht,pt,mt);dt=pt,ht=mt}return ht}}function compileConvertExpression(ne,ee){const te=ne.operator,st=ne.args.length,ot=new Array(st);for(let ct=0;ct<st;++ct)ot[ct]=compileExpression(ne.args[ct]);switch(te){case Ops.ToString:return ct=>{const ut=ot[0](ct);return ne.args[0].type===ColorType$1?toString(ut):ut.toString()};default:throw new Error(`Unsupported convert operator ${te}`)}}function interpolateNumber$1(ne,ee,te,st,ot,ct){const ut=ot-te;if(ut===0)return st;const dt=ee-te,ht=ne===1?dt/ut:(Math.pow(ne,dt)-1)/(Math.pow(ne,ut)-1);return st+ht*(ct-st)}function interpolateColor(ne,ee,te,st,ot,ct){if(ot-te===0)return st;const dt=rgbaToLcha(st),ht=rgbaToLcha(ct);let ft=ht[2]-dt[2];ft>180?ft-=360:ft<-180&&(ft+=360);const pt=[interpolateNumber$1(ne,ee,te,dt[0],ot,ht[0]),interpolateNumber$1(ne,ee,te,dt[1],ot,ht[1]),dt[2]+interpolateNumber$1(ne,ee,te,0,ot,ft),interpolateNumber$1(ne,ee,te,st[3],ot,ct[3])];return lchaToRgba(pt)}class RegularShape extends ImageStyle{constructor(ee){super({opacity:1,rotateWithView:ee.rotateWithView!==void 0?ee.rotateWithView:!1,rotation:ee.rotation!==void 0?ee.rotation:0,scale:ee.scale!==void 0?ee.scale:1,displacement:ee.displacement!==void 0?ee.displacement:[0,0],declutterMode:ee.declutterMode}),this.hitDetectionCanvas_=null,this.fill_=ee.fill!==void 0?ee.fill:null,this.origin_=[0,0],this.points_=ee.points,this.radius=ee.radius,this.radius2_=ee.radius2,this.angle_=ee.angle!==void 0?ee.angle:0,this.stroke_=ee.stroke!==void 0?ee.stroke:null,this.size_,this.renderOptions_,this.imageState_=this.fill_&&this.fill_.loading()?ImageState.LOADING:ImageState.LOADED,this.imageState_===ImageState.LOADING&&this.ready().then(()=>this.imageState_=ImageState.LOADED),this.render()}clone(){const ee=this.getScale(),te=new RegularShape({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(ee)?ee.slice():ee,displacement:this.getDisplacement().slice(),declutterMode:this.getDeclutterMode()});return te.setOpacity(this.getOpacity()),te}getAnchor(){const ee=this.size_,te=this.getDisplacement(),st=this.getScaleArray();return[ee[0]/2-te[0]/st[0],ee[1]/2+te[1]/st[1]]}getAngle(){return this.angle_}getFill(){return this.fill_}setFill(ee){this.fill_=ee,this.render()}getHitDetectionImage(){return this.hitDetectionCanvas_||(this.hitDetectionCanvas_=this.createHitDetectionCanvas_(this.renderOptions_)),this.hitDetectionCanvas_}getImage(ee){var ct,ut;const te=(ct=this.fill_)==null?void 0:ct.getKey(),st=`${ee},${this.angle_},${this.radius},${this.radius2_},${this.points_},${te}`+Object.values(this.renderOptions_).join(",");let ot=(ut=shared.get(st,null))==null?void 0:ut.getImage(1);if(!ot){const dt=this.renderOptions_,ht=Math.ceil(dt.size*ee),ft=createCanvasContext2D(ht,ht);this.draw_(dt,ft,ee),ot=ft.canvas;const pt=new IconImage(ot,void 0,null,ImageState.LOADED,null);shared.set(st,null,pt),createImageBitmap(ot).then(mt=>{pt.setImage(mt)})}return ot}getPixelRatio(ee){return ee}getImageSize(){return this.size_}getImageState(){return this.imageState_}getOrigin(){return this.origin_}getPoints(){return this.points_}getRadius(){return this.radius}setRadius(ee){this.radius!==ee&&(this.radius=ee,this.render())}getRadius2(){return this.radius2_}setRadius2(ee){this.radius2_!==ee&&(this.radius2_=ee,this.render())}getSize(){return this.size_}getStroke(){return this.stroke_}setStroke(ee){this.stroke_=ee,this.render()}listenImageChange(ee){}load(){}unlistenImageChange(ee){}calculateLineJoinSize_(ee,te,st){if(te===0||this.points_===1/0||ee!=="bevel"&&ee!=="miter")return te;let ot=this.radius,ct=this.radius2_===void 0?ot:this.radius2_;if(ot<ct){const Bt=ot;ot=ct,ct=Bt}const ut=this.radius2_===void 0?this.points_:this.points_*2,dt=2*Math.PI/ut,ht=ct*Math.sin(dt),ft=M
76ath.sqrt(ct*ct-ht*ht),pt=ot-ft,mt=Math.sqrt(ht*ht+pt*pt),yt=mt/ht;if(ee==="miter"&&yt<=st)return yt*te;const vt=te/2/yt,_t=te/2*(pt/mt),xt=Math.sqrt((ot+vt)*(ot+vt)+_t*_t)-ot;if(this.radius2_===void 0||ee==="bevel")return xt*2;const Mt=ot*Math.sin(dt),Ot=Math.sqrt(ot*ot-Mt*Mt),kt=ct-Ot,Gt=Math.sqrt(Mt*Mt+kt*kt)/Mt;if(Gt<=st){const Bt=Gt*te/2-ct-ot;return 2*Math.max(xt,Bt)}return xt*2}createRenderOptions(){let ee=defaultLineCap,te=defaultLineJoin,st=0,ot=null,ct=0,ut,dt=0;this.stroke_&&(ut=asColorLike(this.stroke_.getColor()??defaultStrokeStyle),dt=this.stroke_.getWidth()??defaultLineWidth,ot=this.stroke_.getLineDash(),ct=this.stroke_.getLineDashOffset()??0,te=this.stroke_.getLineJoin()??defaultLineJoin,ee=this.stroke_.getLineCap()??defaultLineCap,st=this.stroke_.getMiterLimit()??defaultMiterLimit);const ht=this.calculateLineJoinSize_(te,dt,st),ft=Math.max(this.radius,this.radius2_||0),pt=Math.ceil(2*ft+ht);return{strokeStyle:ut,strokeWidth:dt,size:pt,lineCap:ee,lineDash:ot,lineDashOffset:ct,lineJoin:te,miterLimit:st}}render(){this.renderOptions_=this.createRenderOptions();const ee=this.renderOptions_.size;this.hitDetectionCanvas_=null,this.size_=[ee,ee]}draw_(ee,te,st){if(te.scale(st,st),te.translate(ee.size/2,ee.size/2),this.createPath_(te),this.fill_){let ot=this.fill_.getColor();ot===null&&(ot=defaultFillStyle),te.fillStyle=asColorLike(ot),te.fill()}ee.strokeStyle&&(te.strokeStyle=ee.strokeStyle,te.lineWidth=ee.strokeWidth,ee.lineDash&&(te.setLineDash(ee.lineDash),te.lineDashOffset=ee.lineDashOffset),te.lineCap=ee.lineCap,te.lineJoin=ee.lineJoin,te.miterLimit=ee.miterLimit,te.stroke())}createHitDetectionCanvas_(ee){let te;if(this.fill_){let st=this.fill_.getColor(),ot=0;typeof st=="string"&&(st=asArray(st)),st===null?ot=1:Array.isArray(st)&&(ot=st.length===4?st[3]:1),ot===0&&(te=createCanvasContext2D(ee.size,ee.size),this.drawHitDetectionCanvas_(ee,te))}return te?te.canvas:this.getImage(1)}createPath_(ee){let te=this.points_;const st=this.radius;if(te===1/0)ee.arc(0,0,st,0,2*Math.PI);else{const ot=this.radius2_===void 0?st:this.radius2_;this.radius2_!==void 0&&(te*=2);const ct=this.angle_-Math.PI/2,ut=2*Math.PI/te;for(let dt=0;dt<te;dt++){const ht=ct+dt*ut,ft=dt%2===0?st:ot;ee.lineTo(ft*Math.cos(ht),ft*Math.sin(ht))}ee.closePath()}}drawHitDetectionCanvas_(ee,te){te.translate(ee.size/2,ee.size/2),this.createPath_(te),te.fillStyle=defaultFillStyle,te.fill(),ee.strokeStyle&&(te.strokeStyle=ee.strokeStyle,te.lineWidth=ee.strokeWidth,ee.lineDash&&(te.setLineDash(ee.lineDash),te.lineDashOffset=ee.lineDashOffset),te.lineJoin=ee.lineJoin,te.miterLimit=ee.miterLimit,te.stroke())}ready(){return this.fill_?this.fill_.ready():Promise.resolve()}}class CircleStyle extends RegularShape{constructor(ee){ee=ee||{radius:5},super({points:1/0,fill:ee.fill,radius:ee.radius,stroke:ee.stroke,scale:ee.scale!==void 0?ee.scale:1,rotation:ee.rotation!==void 0?ee.rotation:0,rotateWithView:ee.rotateWithView!==void 0?ee.rotateWithView:!1,displacement:ee.displacement!==void 0?ee.displacement:[0,0],declutterMode:ee.declutterMode})}clone(){const ee=this.getScale(),te=new CircleStyle({fill:this.getFill()?this.getFill().clone():void 0,stroke:this.getStroke()?this.getStroke().clone():void 0,radius:this.getRadius(),scale:Array.isArray(ee)?ee.slice():ee,rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),displacement:this.getDisplacement().slice(),declutterMode:this.getDeclutterMode()});return te.setOpacity(this.getOpacity()),te}}class Fill{constructor(ee){ee=ee||{},this.patternImage_=null,this.color_=null,ee.color!==void 0&&this.setColor(ee.color)}clone(){const ee=this.getColor();return new Fill({color:Array.isArray(ee)?ee.slice():ee||void 0})}getColor(){return this.color_}setColor(ee){if(ee!==null&&typeof ee=="object"&&"src"in ee){const te=get$2(null,ee.src,{crossOrigin:"anonymous"},void 0,ee.offset?null:ee.color?ee.color:null,!(ee.offset&&ee.size));te.ready().then(()=>{this.patternImage_=null}),te.getImageState()===ImageState.IDLE&&te.load(),te.getImageState()===ImageState.LOADING&&(this.patternImage_=te)}this.color_=ee}getKey(){const ee=this.getColor();return ee?ee instanceof CanvasPattern||ee instanceof CanvasGradient?getUid(ee):typeof ee=="object"&&"src"in ee?ee.src+":"+ee.offset:asArray(ee).toString():""}loading(){return!!this.patternImage_}ready(){return this.patternImage_?this.patternImage_.ready():Promise.resolve()}}class Stroke{constructor(ee){ee=ee||{},this.color_=ee.color!==void 0?ee.color:null,this.lineCap_=ee.lineCap,this.lineDash_=ee.lineDash!==void 0?ee.lineDash:null,this.lineDashOffset_=ee.lineDashOffset,this.lineJoin_=ee.lineJoin,this.miterLimit_=ee.miterLimit,this.offset_=ee.offset,this.width_=ee.width}clone(){const ee=this.getColor();return new Stroke({color:Array.isArray(ee)?ee.slice():ee||void 0,lineCap:this.getLineCap(),lineDash:this.getLineDash()?this.getLineDash().slice():void 0,lineDashOffset:this.getLineDashOffset(),lineJoin:this.getLineJoin(),miterLimit:this.getMiterLimit(),offset:this.getOffset(),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_}getOffset(){return this.offset_}getWidth(){return this.width_}setColor(ee){this.color_=ee}setLineCap(ee){this.lineCap_=ee}setLineDash(ee){this.lineDash_=ee}setLineDashOffset(ee){this.lineDashOffset_=ee}setLineJoin(ee){this.lineJoin_=ee}setMiterLimit(ee){this.miterLimit_=ee}setOffset(ee){this.offset_=ee}setWidth(ee){this.width_=ee}}let Style$1=class vu{constructor(ee){ee=ee||{}
76,this.geometry_=null,this.geometryFunction_=defaultGeometryFunction,ee.geometry!==void 0&&this.setGeometry(ee.geometry),this.fill_=ee.fill!==void 0?ee.fill:null,this.image_=ee.image!==void 0?ee.image:null,this.renderer_=ee.renderer!==void 0?ee.renderer:null,this.hitDetectionRenderer_=ee.hitDetectionRenderer!==void 0?ee.hitDetectionRenderer:null,this.stroke_=ee.stroke!==void 0?ee.stroke:null,this.text_=ee.text!==void 0?ee.text:null,this.zIndex_=ee.zIndex}clone(){let ee=this.getGeometry();return ee&&typeof ee=="object"&&(ee=ee.clone()),new vu({geometry:ee??void 0,fill:this.getFill()?this.getFill().clone():void 0,image:this.getImage()?this.getImage().clone():void 0,renderer:this.getRenderer()??void 0,stroke:this.getStroke()?this.getStroke().clone():void 0,text:this.getText()?this.getText().clone():void 0,zIndex:this.getZIndex()})}getRenderer(){return this.renderer_}setRenderer(ee){this.renderer_=ee}setHitDetectionRenderer(ee){this.hitDetectionRenderer_=ee}getHitDetectionRenderer(){return this.hitDetectionRenderer_}getGeometry(){return this.geometry_}getGeometryFunction(){return this.geometryFunction_}getFill(){return this.fill_}setFill(ee){this.fill_=ee}getImage(){return this.image_}setImage(ee){this.image_=ee}getStroke(){return this.stroke_}setStroke(ee){this.stroke_=ee}getText(){return this.text_}setText(ee){this.text_=ee}getZIndex(){return this.zIndex_}setGeometry(ee){typeof ee=="function"?this.geometryFunction_=ee:typeof ee=="string"?this.geometryFunction_=function(te){return te.get(ee)}:ee?ee!==void 0&&(this.geometryFunction_=function(){return ee}):this.geometryFunction_=defaultGeometryFunction,this.geometry_=ee}setZIndex(ee){this.zIndex_=ee}};function toFunction(ne){let ee;if(typeof ne=="function")ee=ne;else{let te;Array.isArray(ne)?te=ne:(assert(typeof ne.getZIndex=="function","Expected an `Style` or an array of `Style`"),te=[ne]),ee=function(){return te}}return ee}let defaultStyles=null;function createDefaultStyle(ne,ee){if(!defaultStyles){const te=new Fill({color:"rgba(255,255,255,0.4)"}),st=new Stroke({color:"#3399CC",width:1.25});defaultStyles=[new Style$1({image:new CircleStyle({fill:te,stroke:st,radius:5}),fill:te,stroke:st})]}return defaultStyles}function createEditingStyle(){const ne={},ee=[255,255,255,1],te=[0,153,255,1],st=3;return ne.Polygon=[new Style$1({fill:new Fill({color:[255,255,255,.5]})})],ne.MultiPolygon=ne.Polygon,ne.LineString=[new Style$1({stroke:new Stroke({color:ee,width:st+2})}),new Style$1({stroke:new Stroke({color:te,width:st})})],ne.MultiLineString=ne.LineString,ne.Circle=ne.Polygon.concat(ne.LineString),ne.Point=[new Style$1({image:new CircleStyle({radius:st*2,fill:new Fill({color:te}),stroke:new Stroke({color:ee,width:st/2})}),zIndex:1/0})],ne.MultiPoint=ne.Point,ne.GeometryCollection=ne.Polygon.concat(ne.LineString,ne.Point),ne}function defaultGeometryFunction(ne){return ne.getGeometry()}const DEFAULT_FILL_COLOR="#333";class Text{constructor(ee){ee=ee||{},this.font_=ee.font,this.rotation_=ee.rotation,this.rotateWithView_=ee.rotateWithView,this.keepUpright_=ee.keepUpright,this.scale_=ee.scale,this.scaleArray_=toSize(ee.scale!==void 0?ee.scale:1),this.text_=ee.text,this.textAlign_=ee.textAlign,this.justify_=ee.justify,this.repeat_=ee.repeat,this.textBaseline_=ee.textBaseline,this.fill_=ee.fill!==void 0?ee.fill:new Fill({color:DEFAULT_FILL_COLOR}),this.maxAngle_=ee.maxAngle!==void 0?ee.maxAngle:Math.PI/4,this.placement_=ee.placement!==void 0?ee.placement:"point",this.overflow_=!!ee.overflow,this.stroke_=ee.stroke!==void 0?ee.stroke:null,this.offsetX_=ee.offsetX!==void 0?ee.offsetX:0,this.offsetY_=ee.offsetY!==void 0?ee.offsetY:0,this.backgroundFill_=ee.backgroundFill?ee.backgroundFill:null,this.backgroundStroke_=ee.backgroundStroke?ee.backgroundStroke:null,this.padding_=ee.padding===void 0?null:ee.padding,this.declutterMode_=ee.declutterMode}clone(){const ee=this.getScale();return new Text({font:this.getFont(),placement:this.getPlacement(),repeat:this.getRepeat(),maxAngle:this.getMaxAngle(),overflow:this.getOverflow(),rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),keepUpright:this.getKeepUpright(),scale:Array.isArray(ee)?ee.slice():ee,text:this.getText(),textAlign:this.getTextAlign(),justify:this.getJustify(),textBaseline:this.getTextBaseline(),fill:this.getFill()instanceof Fill?this.getFill().clone():this.getFill(),stroke:this.getStroke()?this.get
76Stroke().clone():void 0,offsetX:this.getOffsetX(),offsetY:this.getOffsetY(),backgroundFill:this.getBackgroundFill()?this.getBackgroundFill().clone():void 0,backgroundStroke:this.getBackgroundStroke()?this.getBackgroundStroke().clone():void 0,padding:this.getPadding()||void 0,declutterMode:this.getDeclutterMode()})}getOverflow(){return this.overflow_}getFont(){return this.font_}getMaxAngle(){return this.maxAngle_}getPlacement(){return this.placement_}getRepeat(){return this.repeat_}getOffsetX(){return this.offsetX_}getOffsetY(){return this.offsetY_}getFill(){return this.fill_}getRotateWithView(){return this.rotateWithView_}getKeepUpright(){return this.keepUpright_}getRotation(){return this.rotation_}getScale(){return this.scale_}getScaleArray(){return this.scaleArray_}getStroke(){return this.stroke_}getText(){return this.text_}getTextAlign(){return this.textAlign_}getJustify(){return this.justify_}getTextBaseline(){return this.textBaseline_}getBackgroundFill(){return this.backgroundFill_}getBackgroundStroke(){return this.backgroundStroke_}getPadding(){return this.padding_}getDeclutterMode(){return this.declutterMode_}setOverflow(ee){this.overflow_=ee}setFont(ee){this.font_=ee}setMaxAngle(ee){this.maxAngle_=ee}setOffsetX(ee){this.offsetX_=ee}setOffsetY(ee){this.offsetY_=ee}setPlacement(ee){this.placement_=ee}setRepeat(ee){this.repeat_=ee}setRotateWithView(ee){this.rotateWithView_=ee}setKeepUpright(ee){this.keepUpright_=ee}setFill(ee){this.fill_=ee}setRotation(ee){this.rotation_=ee}setScale(ee){this.scale_=ee,this.scaleArray_=toSize(ee!==void 0?ee:1)}setStroke(ee){this.stroke_=ee}setText(ee){this.text_=ee}setTextAlign(ee){this.textAlign_=ee}setJustify(ee){this.justify_=ee}setTextBaseline(ee){this.textBaseline_=ee}setBackgroundFill(ee){this.backgroundFill_=ee}setBackgroundStroke(ee){this.backgroundStroke_=ee}setPadding(ee){this.padding_=ee}}function always(ne){return!0}function rulesToStyleFunction(ne,ee){ee=ee??newParsingContext();const te=buildRuleSet(ne,ee),st=newEvaluationContext();return function(ot,ct){if(st.properties=ot.getPropertiesInternal(),st.resolution=ct,ee.featureId){const ut=ot.getId();ut!==void 0?st.featureId=ut:st.featureId=null}return ee.geometryType&&(st.geometryType=computeGeometryType(ot.getGeometry())),te(st)}}function flatStylesToStyleFunction(ne,ee){ee=ee??newParsingContext();const te=ne.length,st=new Array(te);for(let ut=0;ut<te;++ut)st[ut]=buildStyle(ne[ut],ee);const ot=newEvaluationContext(),ct=new Array(te);return function(ut,dt){if(ot.properties=ut.getPropertiesInternal(),ot.resolution=dt,ee.featureId){const ft=ut.getId();ft!==void 0?ot.featureId=ft:ot.featureId=null}ee.geometryType&&(ot.geometryType=computeGeometryType(ut.getGeometry()));let ht=0;for(let ft=0;ft<te;++ft){const pt=st[ft](ot);pt&&(ct[ht]=pt,ht+=1)}return ct.length=ht,ct}}function flatStyleLikeToStyleFunction(ne,ee){if(ee=ee??newParsingContext(),!Array.isArray(ne))return flatStylesToStyleFunction([ne],ee);const te=ne.length;if("style"in ne[0]){const ct=new Array(te);for(let ut=0;ut<te;++ut){const dt=ne[ut];if(!("style"in dt))throw new Error("Expected a list of rules with a style property");ct[ut]=dt}return rulesToStyleFunction(ct,ee)}return flatStylesToStyleFunction(ne,ee)}function buildRuleSet(ne,ee){const te=ne.length,st=new Array(te);for(let ot=0;ot<te;++ot){const ct=ne[ot],ut="filter"in ct?buildExpression(ct.filter,BooleanType$1,ee):always;let dt;if(Array.isArray(ct.style)){const ht=ct.style.length;dt=new Array(ht);for(let ft=0;ft<ht;++ft)dt[ft]=buildStyle(ct.style[ft],ee)}else dt=[buildStyle(ct.style,ee)];st[ot]={filter:ut,styles:dt}}return function(ot){const ct=[];let ut=!1;for(let dt=0;dt<te;++dt){const ht=st[dt].filter;if(ht(ot)&&!(ne[dt].else&&ut)){ut=!0;for(const ft of st[dt].styles){const pt=ft(ot);pt&&ct.push(pt)}}}return ct}}function buildStyle(ne,ee){const te=buildFill(ne,"",ee),st=buildStroke(ne,"",ee),ot=buildText(ne,ee),ct=buildImage(ne,ee),ut=numberEvaluator(ne,"z-index",ee);if(!te&&!st&&!ot&&!ct&&!isEmpty(ne))throw new Error("No fill, stroke, point, or text symbolizer properties in style: "+JSON.stringify(ne));const dt=new Style$1;return function(ht){let ft=!0;if(te){const pt=te(ht);pt&&(ft=!1),dt.setFill(pt)}if(st){const pt=st(ht);pt&&(ft=!1),dt.setStroke(pt)}if(ot){const pt=ot(ht);pt&&(ft=!1),dt.setText(pt)}if(ct){const pt=ct(ht);pt&&(ft=!1),dt.setImage(pt)}return ut&&dt.setZIndex(ut(ht)),ft?null:dt}}function buildFill(ne,ee,te){let st;if(ee+"fill-pattern-src"in ne)st=patternEvaluator(ne,ee+"fill-",te);else{if(ne[ee+"fill-color"]==="none")return ct=>null;st=colorLikeEvaluator(ne,ee+"fill-color",te)}if(!st)return null;const ot=new Fill;return function(ct){const ut=st(ct);return ut===NO_COLOR?null:(ot.setColor(ut),ot)}}
76function buildStroke(ne,ee,te){const st=numberEvaluator(ne,ee+"stroke-width",te),ot=colorLikeEvaluator(ne,ee+"stroke-color",te);if(!st&&!ot)return null;const ct=stringEvaluator(ne,ee+"stroke-line-cap",te),ut=stringEvaluator(ne,ee+"stroke-line-join",te),dt=numberArrayEvaluator(ne,ee+"stroke-line-dash",te),ht=numberEvaluator(ne,ee+"stroke-line-dash-offset",te),ft=numberEvaluator(ne,ee+"stroke-miter-limit",te),pt=numberEvaluator(ne,ee+"stroke-offset",te),mt=new Stroke;return function(yt){if(ot){const vt=ot(yt);if(vt===NO_COLOR)return null;mt.setColor(vt)}if(st&&mt.setWidth(st(yt)),ct){const vt=ct(yt);if(vt!=="butt"&&vt!=="round"&&vt!=="square")throw new Error("Expected butt, round, or square line cap");mt.setLineCap(vt)}if(ut){const vt=ut(yt);if(vt!=="bevel"&&vt!=="round"&&vt!=="miter")throw new Error("Expected bevel, round, or miter line join");mt.setLineJoin(vt)}return dt&&mt.setLineDash(dt(yt)),ht&&mt.setLineDashOffset(ht(yt)),ft&&mt.setMiterLimit(ft(yt)),pt&&mt.setOffset(pt(yt)),mt}}function buildText(ne,ee){const te="text-",st=stringEvaluator(ne,te+"value",ee);if(!st)return null;const ot=buildFill(ne,te,ee),ct=buildFill(ne,te+"background-",ee),ut=buildStroke(ne,te,ee),dt=buildStroke(ne,te+"background-",ee),ht=stringEvaluator(ne,te+"font",ee),ft=numberEvaluator(ne,te+"max-angle",ee),pt=numberEvaluator(ne,te+"offset-x",ee),mt=numberEvaluator(ne,te+"offset-y",ee),yt=booleanEvaluator(ne,te+"overflow",ee),vt=stringEvaluator(ne,te+"placement",ee),_t=numberEvaluator(ne,te+"repeat",ee),bt=sizeLikeEvaluator(ne,te+"scale",ee),xt=booleanEvaluator(ne,te+"rotate-with-view",ee),Mt=numberEvaluator(ne,te+"rotation",ee),Ot=stringEvaluator(ne,te+"align",ee),kt=stringEvaluator(ne,te+"justify",ee),Nt=stringEvaluator(ne,te+"baseline",ee),Gt=booleanEvaluator(ne,te+"keep-upright",ee),Bt=numberArrayEvaluator(ne,te+"padding",ee),Ut=optionalDeclutterMode(ne,te+"declutter-mode"),Vt=new Text({declutterMode:Ut});return function(Ht){if(Vt.setText(st(Ht)),ot&&Vt.setFill(ot(Ht)),ct&&Vt.setBackgroundFill(ct(Ht)),ut&&Vt.setStroke(ut(Ht)),dt&&Vt.setBackgroundStroke(dt(Ht)),ht&&Vt.setFont(ht(Ht)),ft&&Vt.setMaxAngle(ft(Ht)),pt&&Vt.setOffsetX(pt(Ht)),mt&&Vt.setOffsetY(mt(Ht)),yt&&Vt.setOverflow(yt(Ht)),vt){const zt=vt(Ht);if(zt!=="point"&&zt!=="line")throw new Error("Expected point or line for text-placement");Vt.setPlacement(zt)}if(_t&&Vt.setRepeat(_t(Ht)),bt&&Vt.setScale(bt(Ht)),xt&&Vt.setRotateWithView(xt(Ht)),Mt&&Vt.setRotation(Mt(Ht)),Ot){const zt=Ot(Ht);if(zt!=="left"&&zt!=="center"&&zt!=="right"&&zt!=="end"&&zt!=="start")throw new Error("Expected left, right, center, start, or end for text-align");Vt.setTextAlign(zt)}if(kt){const zt=kt(Ht);if(zt!=="left"&&zt!=="right"&&zt!=="center")throw new Error("Expected left, right, or center for text-justify");Vt.setJustify(zt)}if(Nt){const zt=Nt(Ht);if(zt!=="bottom"&&zt!=="top"&&zt!=="middle"&&zt!=="alphabetic"&&zt!=="hanging")throw new Error("Expected bottom, top, middle, alphabetic, or hanging for text-baseline");Vt.setTextBaseline(zt)}return Bt&&Vt.setPadding(Bt(Ht)),Gt&&Vt.setKeepUpright(Gt(Ht)),Vt}}function buildImage(ne,ee){return"icon-src"in ne?buildIcon(ne,ee):"shape-points"in ne?buildShape(ne,ee):"circle-radius"in ne?buildCircle(ne,ee):null}function buildIcon(ne,ee){const te="icon-",st=te+"src",ot=requireString(ne[st],st),ct=coordinateEvaluator(ne,te+"anch
76or",ee),ut=sizeLikeEvaluator(ne,te+"scale",ee),dt=numberEvaluator(ne,te+"opacity",ee),ht=coordinateEvaluator(ne,te+"displacement",ee),ft=numberEvaluator(ne,te+"rotation",ee),pt=booleanEvaluator(ne,te+"rotate-with-view",ee),mt=optionalIconOrigin(ne,te+"anchor-origin"),yt=optionalIconAnchorUnits(ne,te+"anchor-x-units"),vt=optionalIconAnchorUnits(ne,te+"anchor-y-units"),_t=getExpressionValue(ne,te+"color");let bt,xt=null;_t!==void 0&&(Array.isArray(_t)&&_t.length>0&&typeof _t[0]=="string"?xt=colorLikeEvaluator(ne,te+"color",ee):bt=requireColorLike(_t,te+"color"));const Mt=optionalString(ne,te+"cross-origin"),Ot=optionalNumberArray(ne,te+"offset"),kt=optionalIconOrigin(ne,te+"offset-origin"),Nt=optionalNumber(ne,te+"width"),Gt=optionalNumber(ne,te+"height"),Bt=optionalSize(ne,te+"size"),Ut=optionalDeclutterMode(ne,te+"declutter-mode"),Vt={src:ot,anchorOrigin:mt,anchorXUnits:yt,anchorYUnits:vt,crossOrigin:Mt,offset:Ot,offsetOrigin:kt,height:Gt,width:Nt,size:Bt,declutterMode:Ut};let Ht=null;return function(zt){if(Ht)xt&&Ht.setColor(xt(zt));else{const jt=xt?xt(zt):bt;Ht=new Icon(jt!==void 0?Object.assign({},Vt,{color:jt}):Object.assign({},Vt))}return dt&&Ht.setOpacity(dt(zt)),ht&&Ht.setDisplacement(ht(zt)),ft&&Ht.setRotation(ft(zt)),pt&&Ht.setRotateWithView(pt(zt)),ut&&Ht.setScale(ut(zt)),ct&&Ht.setAnchor(ct(zt)),Ht}}function buildShape(ne,ee){const te="shape-",st=te+"points",ot=te+"radius",ct=requireNumber(ne[st],st);if(!(ot in ne))throw new Error(`Expected a number for ${ot}`);const ut=numberEvaluator(ne,ot,ee),dt=typeof ne[ot]=="number"?ne[ot]:5,ht=te+"radius2",ft=numberEvaluator(ne,ht,ee),pt=typeof ne[ht]=="number"?ne[ht]:void 0,mt=buildFill(ne,te,ee),yt=buildStroke(ne,te,ee),vt=sizeLikeEvaluator(ne,te+"scale",ee),_t=coordinateEvaluator(ne,te+"displacement",ee),bt=numberEvaluator(ne,te+"rotation",ee),xt=booleanEvaluator(ne,te+"rotate-with-view",ee),Mt=optionalNumber(ne,te+"angle"),Ot=optionalDeclutterMode(ne,te+"declutter-mode"),kt=new RegularShape({points:ct,radius:dt,radius2:pt,angle:Mt,declutterMode:Ot});return function(Nt){return ut&&kt.setRadius(ut(Nt)),ft&&kt.setRadius2(ft(Nt)),mt&&kt.setFill(mt(Nt)),yt&&kt.setStroke(yt(Nt)),_t&&kt.setDisplacement(_t(Nt)),bt&&kt.setRotation(bt(Nt)),xt&&kt.setRotateWithView(xt(Nt)),vt&&kt.setScale(vt(Nt)),kt}}function buildCircle(ne,ee){const te="circle-",st=buildFill(ne,te,ee),ot=buildStroke(ne,te,ee),ct=numberEvaluator(ne,te+"radius",ee),ut=sizeLikeEvaluator(ne,te+"scale",ee),dt=coordinateEvaluator(ne,te+"displacement",ee),ht=numberEvaluator(ne,te+"rotation",ee),ft=booleanEvaluator(ne,te+"rotate-with-view",ee),pt=optionalDeclutterMode(ne,te+"declutter-mode"),mt=new CircleStyle({radius:5,declutterMode:pt});return function(yt){return ct&&mt.setRadius(ct(yt)),st&&mt.setFill(st(yt)),ot&&mt.setStroke(ot(yt)),dt&&mt.setDisplacement(dt(yt)),ht&&mt.setRotation(ht(yt)),ft&&mt.setRotateWithView(ft(yt)),ut&&mt.setScale(ut(yt)),mt}}function getExpressionValue(ne,ee){if(!(ee in ne))return;const te=ne[ee];return te===void 0?void 0:te}function numberEvaluator(ne,ee,te){const st=getExpressionValue(ne,ee);if(st===void 0)return;const ot=buildExpression(st,NumberType$1,te);return function(ct){return requireNumber(ot(ct),ee)}}function stringEvaluator(ne,ee,te){const st=getExpressionValue(ne,ee);if(st===void 0)return null;const ot=buildExpression(st,StringType$1,te);return function(ct){return requireString(ot(ct),ee)}}function patternEvaluator(ne,ee,te){const st=stringEvaluator(ne,ee+"pattern-src",te),ot=sizeEvaluator(ne,ee+"pattern-offset",te),ct=sizeEvaluator(ne,ee+"pattern-size",te),ut=colorLikeEvaluator(ne,ee+"color",te);return function(dt){return{src:st(dt),offset:ot&&ot(dt),size:ct&&ct(dt),color:ut&&ut(dt)}}}function booleanEvaluator(ne,ee,te){const st=getExpressionValue(ne,ee);if(st===void 0)return null;const ot=buildExpression(st,BooleanType$1,te);return function(ct){const ut=ot(ct);if(typeof ut!="boolean")throw new Error(`Expected a boolean for ${ee}`);return ut}}function colorLikeEvaluator(ne,ee,te){const st=getExpressionValue(ne,ee);if(st===void 0)return null;const ot=buildExpression(st,ColorType$1,te);return function(ct){return requireColorLike(ot(ct),ee)}}function numberArrayEvaluator(ne,ee,te){const st=getExpressionValue(ne,ee);if(st===void 0)return null;
76if(Array.isArray(st)&&(st.length===0||typeof st[0]!="string")){const ct=st.map((ut,dt)=>{if(typeof ut=="number")return()=>ut;const ht=buildExpression(ut,NumberType$1,te);return function(ft){return requireNumber(ht(ft),`${ee}[${dt}]`)}});return function(ut){const dt=new Array(ct.length);for(let ht=0;ht<ct.length;++ht)dt[ht]=ct[ht](ut);return dt}}const ot=buildExpression(st,NumberArrayType$1,te);return function(ct){return requireNumberArray(ot(ct),ee)}}function coordinateEvaluator(ne,ee,te){const st=getExpressionValue(ne,ee);if(st===void 0)return null;const ot=buildExpression(st,NumberArrayType$1,te);return function(ct){const ut=requireNumberArray(ot(ct),ee);if(ut.length!==2)throw new Error(`Expected two numbers for ${ee}`);return ut}}function sizeEvaluator(ne,ee,te){const st=getExpressionValue(ne,ee);if(st===void 0)return null;const ot=buildExpression(st,NumberArrayType$1,te);return function(ct){return requireSize(ot(ct),ee)}}function sizeLikeEvaluator(ne,ee,te){const st=getExpressionValue(ne,ee);if(st===void 0)return null;const ot=buildExpression(st,NumberArrayType$1|NumberType$1,te);return function(ct){return requireSizeLike(ot(ct),ee)}}function optionalNumber(ne,ee){const te=ne[ee];if(te!==void 0){if(typeof te!="number")throw new Error(`Expected a number for ${ee}`);return te}}function optionalSize(ne,ee){const te=ne[ee];if(te!==void 0){if(typeof te=="number")return toSize(te);if(!Array.isArray(te))throw new Error(`Expected a number or size array for ${ee}`);if(te.length!==2||typeof te[0]!="number"||typeof te[1]!="number")throw new Error(`Expected a number or size array for ${ee}`);return te}}function optionalString(ne,ee){const te=ne[ee];if(te!==void 0){if(typeof te!="string")throw new Error(`Expected a string for ${ee}`);return te}}function optionalIconOrigin(ne,ee){const te=ne[ee];if(te!==void 0){if(te!=="bottom-left"&&te!=="bottom-right"&&te!=="top-left"&&te!=="top-right")throw new Error(`Expected bottom-left, bottom-right, top-left, or top-right for ${ee}`);return te}}function optionalIconAnchorUnits(ne,ee){const te=ne[ee];if(te!==void 0){if(te!=="pixels"&&te!=="fraction")throw new Error(`Expected pixels or fraction for ${ee}`);return te}}function optionalNumberArray(ne,ee){const te=ne[ee];if(te!==void 0)return requireNumberArray(te,ee)}function optionalDeclutterMode(ne,ee){const te=ne[ee];if(te!==void 0){if(typeof te!="string")throw new Error(`Expected a string for ${ee}`);if(te!=="declutter"&&te!=="obstacle"&&te!=="none")throw new Error(`Expected declutter, obstacle, or none for ${ee}`);return te}}function requireNumberArray(ne,ee){if(!Array.isArray(ne))throw new Error(`Expected an array for ${ee}`);const te=ne.length;for(let st=0;st<te;++st)if(typeof ne[st]!="number")throw new Error(`Expected an array of numbers for ${ee}`);return ne}function requireString(ne,ee){if(typeof ne!="string")throw new Error(`Expected a string for ${ee}`);return ne}function requireNumber(ne,ee){if(typeof ne!="number")throw new Error(`Expected a number for ${ee}`);return ne}function requireColorLike(ne,ee){if(typeof ne=="string")return ne;const te=requireNumberArray(ne,ee),st=te.length;if(st<3||st>4)throw new Error(`Expected a color with 3 or 4 values for ${ee}`);return te}function requireSize(ne,ee){const te=requireNumberArray(ne,ee);if(te.length!==2)throw new Error(`Expected an array of two numbers for ${ee}`);return te}function requireSizeLike(ne,ee){return typeof ne=="number"?ne:requireSize(ne,ee)}const ViewProperty={CENTER:"center",RESOLUTION:"resolution",ROTATION:"rotation"};function createExtent(ne,ee,te){return(function(st,ot,ct,ut,dt){if(!st)return;if(!ot&&!ee)return st;const ht=ee?0:ct[0]*ot,ft=ee?0:ct[1]*ot,pt=dt?dt[0]:0,mt=dt?dt[1]:0;let yt=ne[0]+ht/2+pt,vt=ne[2]-ht/2+pt,_t=ne[1]+ft/2+mt,bt=ne[3]-ft/2+mt;yt>vt&&(yt=(vt+yt)/2,vt=yt),_t>bt&&(_t=(bt+_t)/2,bt=_t);let xt=clamp$1(st[0],yt,vt),Mt=clamp$1(st[1],_t,bt);if(ut&&te&&ot){const Ot=30*ot;xt+=-Ot*Math.log(1+Math.max(0,yt-st[0])/Ot)+Ot*Math.log(1+Math.max(0,st[0]-vt)/Ot),Mt+=-Ot*Math.log(1+Math.max(0,_t-st[1])/Ot)+Ot*Math.log(1+Math.max(0,st[1]-bt)/Ot)}return[xt,Mt]})}function none(ne){return ne}function getViewportClampedResolution(ne,ee,te,st){const ot=getWidth(ee)/te[0],ct=getHeight(ee)/te[1];return st?Math.min(ne,Math.max(ot,ct)):Math.min(ne,Math.min(ot,ct))}function getSmoothClampedResolution(ne,ee,te){let st=Math.min(ne,ee);const ot=50;return st*=Math.log(1+ot*Math.max(0,ne/ee-1))/ot+1,te&&(st=Math.max(st,te),st/=Math.log(1+ot*Math.max(0,te/ne-1))/ot+1),clamp$1(st,te/2,ee*2)}function createSnapToResolutions(ne,ee,te,st){return ee=ee!==void 0?ee:!0,(function(ot,ct,ut,dt){if(ot!==void 0){const ht=ne[0],ft=ne[ne.length-1],pt=te?getViewportClampedResolution(ht,te,ut,st):ht;if(dt)return ee?getSmoothClampedResolution(ot,pt,ft):clamp$1(ot,ft,pt);const mt=Math.min(pt,ot),yt=Math.floor(linearFindNearest(ne,mt,ct));return ne[yt]>pt&&yt<ne.length-1?ne[yt+1]:ne[yt]}})}function createSnapToPower(ne,ee,te,st,ot,ct){return st=st!==void 0?st:!0,te=te!==void 0?te:0,(function(ut,dt,ht,ft){if(ut!==void 0){const pt=ot?getViewportClampedResolution(ee,ot,ht,ct):ee;if(ft)return st?getSmoothClampedResolution(ut,pt,te):clamp$1(ut,te,pt);const mt=1e-9,yt=Math.ceil(Math.log(ee/pt)/Math.log(ne)-mt),vt=-dt*(.5-mt)+.5,_t=Math.min(pt,ut),bt=Math.floor(Math.log(ee/_t)/Math.log(ne)+vt),xt=Math.max(yt,bt),Mt=ee/Math.pow(ne,xt);return clamp$1(Mt,te,pt)}})}function createMinMaxResolution(ne,ee,te,st,ot){return te=te!==void 0?te:!0,(function(ct,ut,dt,ht){if(ct!==void 0){const ft
76=st?getViewportClampedResolution(ne,st,dt,ot):ne;return!te||!ht?clamp$1(ct,ee,ft):getSmoothClampedResolution(ct,ft,ee)}})}const DEFAULT_MIN_ZOOM=0;class View extends BaseObject{constructor(ee){super(),this.on,this.once,this.un,ee=Object.assign({},ee),this.hints_=[0,0],this.animations_=[],this.updateAnimationKey_,this.projection_=createProjection(ee.projection,"EPSG:3857"),this.viewportSize_=[100,100],this.targetCenter_=null,this.targetResolution_,this.targetRotation_,this.nextCenter_=null,this.nextResolution_,this.nextRotation_,this.cancelAnchor_=void 0,ee.projection&&disableCoordinateWarning(),ee.center&&(ee.center=fromUserCoordinate(ee.center,this.projection_)),ee.extent&&(ee.extent=fromUserExtent(ee.extent,this.projection_)),this.applyOptions_(ee)}applyOptions_(ee){const te=Object.assign({},ee);for(const dt in ViewProperty)delete te[dt];this.setProperties(te,!0);const st=createResolutionConstraint(ee);this.maxResolution_=st.maxResolution,this.minResolution_=st.minResolution,this.zoomFactor_=st.zoomFactor,this.resolutions_=ee.resolutions,this.padding_=ee.padding,this.minZoom_=st.minZoom;const ot=createCenterConstraint(ee),ct=st.constraint,ut=createRotationConstraint(ee);this.constraints_={center:ot,resolution:ct,rotation:ut},this.setRotation(ee.rotation!==void 0?ee.rotation:0),this.setCenterInternal(ee.center!==void 0?ee.center:null),ee.resolution!==void 0?this.setResolution(ee.resolution):ee.zoom!==void 0&&this.setZoom(ee.zoom)}get padding(){return this.padding_}set padding(ee){let te=this.padding_;this.padding_=ee;const st=this.getCenterInternal();if(st){const ot=ee||[0,0,0,0];te=te||[0,0,0,0];const ct=this.getResolution(),ut=ct/2*(ot[3]-te[3]+te[1]-ot[1]),dt=ct/2*(ot[0]-te[0]+te[2]-ot[2]);this.setCenterInternal([st[0]+ut,st[1]-dt])}}getUpdatedOptions_(ee){const te=this.getProperties();return te.resolution!==void 0?te.resolution=this.getResolution():te.zoom=this.getZoom(),te.center=this.getCenterInternal(),te.rotation=this.getRotation(),Object.assign({},te,ee)}animate(ee){this.isDef()&&!this.getAnimating()&&this.resolveConstraints(0);const te=new Array(arguments.length);for(let st=0;st<te.length;++st){let ot=arguments[st];ot.center&&(ot=Object.assign({},ot),ot.center=fromUserCoordinate(ot.center,this.getProjection())),ot.anchor&&(ot=Object.assign({},ot),ot.anchor=fromUserCoordinate(ot.anchor,this.getProjection())),te[st]=ot}this.animateInternal.apply(this,te)}animateInternal(ee){let te=arguments.length,st;te>1&&typeof arguments[te-1]=="function"&&(st=arguments[te-1],--te);let ot=0;for(;ot<te&&!this.isDef();++ot){const pt=arguments[ot];pt.center&&this.setCenterInternal(pt.center),pt.zoom!==void 0?this.setZoom(pt.zoom):pt.resolution&&this.setResolution(pt.resolution),pt.rotation!==void 0&&this.setRotation(pt.rotation)}if(ot===te){st&&animationCallback(st,!0);return}let ct=Date.now(),ut=this.targetCenter_.slice(),dt=this.targetResolution_,ht=this.targetRotation_;const ft=[];for(;ot<te;++ot){const pt=arguments[ot],mt={start:ct,complete:!1,anchor:pt.anchor,duration:pt.duration!==void 0?pt.duration:1e3,easing:pt.easing||inAndOut,callback:st};if(pt.center&&(mt.sourceCenter=ut,mt.targetCenter=pt.center.slice(),ut=mt.targetCenter),pt.zoom!==void 0?(mt.sourceResolution=dt,mt.targetResolution=this.getResolutionForZoom(pt.zoom),dt=mt.targetResolution):pt.resolution&&(mt.sourceResolution=dt,mt.targetResolution=pt.resolution,dt=mt.targetResolution),pt.rotation!==void 0){mt.sourceRotation=ht;const yt=modulo(pt.rotation-ht+Math.PI,2*Math.PI)-Math.PI;mt.targetRotation=ht+yt,ht=mt.targetRotation}isNoopAnimation(mt)?mt.complete=!0:ct+=mt.duration,ft.push(mt)}this.animations_.push(ft),this.setHint(ViewHint.ANIMATING,1),this.updateAnimations_()}getAnimating(){return this.hints_[ViewHint.ANIMATING]>0}getInteracting(){return this.hints_[ViewHint.INTERACTING]>0}cancelAnimations(){this.setHint(ViewHint.ANIMATING,-this.hints_[ViewHint.ANIMATING]);let ee;for(let te=0,st=this.animations_.length;te<st;++te){const ot=this.animations_[te];if(ot[0].callback&&animationCallback(ot[0].callback,!1),!ee)for(let ct=0,ut=ot.length;ct<ut;++ct){const dt=ot[ct];
76if(!dt.complete){ee=dt.anchor;break}}}this.animations_.length=0,this.cancelAnchor_=ee,this.nextCenter_=null,this.nextResolution_=NaN,this.nextRotation_=NaN}updateAnimations_(){if(this.updateAnimationKey_!==void 0&&(cancelAnimationFrame(this.updateAnimationKey_),this.updateAnimationKey_=void 0),!this.getAnimating())return;const ee=Date.now();let te=!1;for(let st=this.animations_.length-1;st>=0;--st){const ot=this.animations_[st];let ct=!0;for(let ut=0,dt=ot.length;ut<dt;++ut){const ht=ot[ut];if(ht.complete)continue;const ft=ee-ht.start;let pt=ht.duration>0?ft/ht.duration:1;pt>=1?(ht.complete=!0,pt=1):ct=!1;const mt=ht.easing(pt);if(ht.sourceCenter){const yt=ht.sourceCenter[0],vt=ht.sourceCenter[1],_t=ht.targetCenter[0],bt=ht.targetCenter[1];this.nextCenter_=ht.targetCenter;const xt=yt+mt*(_t-yt),Mt=vt+mt*(bt-vt);this.targetCenter_=[xt,Mt]}if(ht.sourceResolution&&ht.targetResolution){const yt=mt===1?ht.targetResolution:ht.sourceResolution+mt*(ht.targetResolution-ht.sourceResolution);if(ht.anchor){const vt=this.getViewportSize_(this.getRotation()),_t=this.constraints_.resolution(yt,0,vt,!0);this.targetCenter_=this.calculateCenterZoom(_t,ht.anchor)}this.nextResolution_=ht.targetResolution,this.targetResolution_=yt,this.applyTargetState_(!0)}if(ht.sourceRotation!==void 0&&ht.targetRotation!==void 0){const yt=mt===1?modulo(ht.targetRotation+Math.PI,2*Math.PI)-Math.PI:ht.sourceRotation+mt*(ht.targetRotation-ht.sourceRotation);if(ht.anchor){const vt=this.constraints_.rotation(yt,!0);this.targetCenter_=this.calculateCenterRotate(vt,ht.anchor)}this.nextRotation_=ht.targetRotation,this.targetRotation_=yt}if(this.applyTargetState_(!0),te=!0,!ht.complete)break}if(ct){this.animations_[st]=null,this.setHint(ViewHint.ANIMATING,-1),this.nextCenter_=null,this.nextResolution_=NaN,this.nextRotation_=NaN;const ut=ot[0].callback;ut&&animationCallback(ut,!0)}}this.animations_=this.animations_.filter(Boolean),te&&this.updateAnimationKey_===void 0&&(this.updateAnimationKey_=requestAnimationFrame(this.updateAnimations_.bind(this)))}calculateCenterRotate(ee,te){let st;const ot=this.getCenterInternal();return ot!==void 0&&(st=[ot[0]-te[0],ot[1]-te[1]],rotate$1(st,ee-this.getRotation()),add$3(st,te)),st}calculateCenterZoom(ee,te){let st;const ot=this.getCenterInternal(),ct=this.getResolution();if(ot!==void 0&&ct!==void 0){const ut=te[0]-ee*(te[0]-ot[0])/ct,dt=te[1]-ee*(te[1]-ot[1])/ct;st=[ut,dt]}return st}getViewportSize_(ee){const te=this.viewportSize_;if(ee){const st=te[0],ot=te[1];return[Math.abs(st*Math.cos(ee))+Math.abs(ot*Math.sin(ee)),Math.abs(st*Math.sin(ee))+Math.abs(ot*Math.cos(ee))]}return te}setViewportSize(ee){this.viewportSize_=Array.isArray(ee)?ee.slice():[100,100],this.getAnimating()||this.resolveConstraints(0)}getCenter(){const ee=this.getCenterInternal();return ee&&toUserCoordinate(ee,this.getProjection())}getCenterInternal(){return this.get(ViewProperty.CENTER)}getConstraints(){return this.constraints_}getConstrainResolution(){return this.get("constrainResolution")}getHints(ee){return ee!==void 0?(ee[0]=this.hints_[0],ee[1]=this.hints_[1],ee):this.hints_.slice()}calculateExtent(ee){const te=this.calculateExtentInternal(ee);return toUserExtent(te,this.getProjection())}calculateExtentInternal(ee){ee=ee||this.getViewportSizeMinusPadding_();const te=this.getCenterInternal();assert(te,"The view center is not defined");const st=this.getResolution();assert(st!==void 0,"The view resolution is not defined");const ot=this.getRotation();return assert(ot!==void 0,"The view rotation is not defined"),getForViewAndSize(te,st,ot,ee)}getMaxResolution(){return this.maxResolution_}getMinResolution(){return this.minResolution_}getMaxZoom(){return this.getZoomForResolution(this.minResolution_)}setMaxZoom(ee){this.applyOptions_(this.getUpdatedOptions_({maxZoom:ee}))}getMinZoom(){return this.getZoomForResolution(this.maxResolution_)}setMinZoom(ee){this.applyOptions_(this.getUpdatedOptions_({minZoom:ee}))}setConstrainResolution(ee){this.applyOptions_(this.getUpdatedOptions_({constrainResolution:ee}))}getProjection(){return this.projection_}getResolution(){return this.get(ViewProperty.RESOLUTION)}getResolutions(){return this.resolutions_}getResolutionForExtent(ee,te){return this.getResolutionForExtentInternal(fromUserExtent(ee,this.getProjection()),te)}getResolutionForExtentInternal(ee,te){te=te||this.getViewportSizeMinusPadding_();const st=getWidth(ee)/te[0],ot=getHeight(ee)/te[1];return Math.max(st,ot)}getResolutionForValueFunction(ee){ee=ee||2;const te=this.getConstrainedResolution(this.maxResolution_),st=this.minResolution_,ot=Math.log(te/st)/Math.log(ee);return(function(ct){return te/Math.pow(ee,ct*ot)})}getRotation(){return this.get(ViewProperty.ROTATION)}getValueForResolutionFunction(ee){const te=Math.log(ee||2),st=this.getConstrainedResolution(this.maxResolution_),ot=this.minResolution_,ct=Math.log(st/ot)/te;return(function(ut){return Math.log(st/ut)/te/ct})}getViewportSizeMinusPadding_(ee){let te=this.getViewportSize_(ee);const st=this.padding_;return st&&(te=[te[0]-st[1]-st[3],te[1]-st[0]-st[2]]),te}getState(){const ee=this.getProjection(),te=this.getResolution(),st=this.getRotation();let ot=this.getCenterInternal();const ct=this.padding_;if(ct){const ut=this.getViewportSizeMinusPadding_();ot=calculateCenterOn(ot,this.getViewportSize_(),[ut[0]/2+ct[3],ut[1]/2+ct[0]],te,st)}return{center:ot.slice(0),projection:ee!==void 0?ee:null,resolution:te,nextCenter:this.nextCenter_,nextResolution:this.nextResolution_,nextRotation:this.nextRotation_,rotation:st,zoom:this.getZoom()}}getViewStateAndExtent(){return{viewState:this.getState(),extent:this.calculateExtent()}}getZoom(){let ee;const te=this.getResolution();return te!==void 0&&(ee=this.getZoomForResolution(te)),ee}getZoomForResolution(ee){let te=this.minZoom_||0,st,ot;if(this.resolutions_){const ct=linearFindNearest(this.resolutions_,ee,1);te=ct,st=this.resolutions_[ct],ct==this.resolutions_.length-1?ot=2:ot=st/this.resolutions_[ct+1]}else st=this.maxResolution_,ot=this.zoomFactor_;return te+Math.log(st/ee)/Math.log(ot)}getResolutionForZoom(ee){var te;if((te=this.resolutions_)!=null&&te.length){if(this.resolutions_.length===1)return this.resolutions_[0];const st=clamp$1(Math.floor(ee),0,this.resolutions_.length-2),ot=this.resolutions_[st]/this.resolutions_[st+1];
76return this.resolutions_[st]/Math.pow(ot,clamp$1(ee-st,0,1))}return this.maxResolution_/Math.pow(this.zoomFactor_,ee-this.minZoom_)}fit(ee,te){let st;if(assert(Array.isArray(ee)||typeof ee.getSimplifiedGeometry=="function","Invalid extent or geometry provided as `geometry`"),Array.isArray(ee)){assert(!isEmpty$1(ee),"Cannot fit empty extent provided as `geometry`");const ot=fromUserExtent(ee,this.getProjection());st=fromExtent(ot)}else if(ee.getType()==="Circle"){const ot=fromUserExtent(ee.getExtent(),this.getProjection());st=fromExtent(ot),st.rotate(this.getRotation(),getCenter(ot))}else st=ee;this.fitInternal(st,te)}rotatedExtentForGeometry(ee){const te=this.getRotation(),st=Math.cos(te),ot=Math.sin(-te),ct=ee.getFlatCoordinates(),ut=ee.getStride();let dt=1/0,ht=1/0,ft=-1/0,pt=-1/0;for(let mt=0,yt=ct.length;mt<yt;mt+=ut){const vt=ct[mt]*st-ct[mt+1]*ot,_t=ct[mt]*ot+ct[mt+1]*st;dt=Math.min(dt,vt),ht=Math.min(ht,_t),ft=Math.max(ft,vt),pt=Math.max(pt,_t)}return[dt,ht,ft,pt]}fitInternal(ee,te){te=te||{};let st=te.size;st||(st=this.getViewportSizeMinusPadding_());const ot=te.padding!==void 0?te.padding:[0,0,0,0],ct=te.nearest!==void 0?te.nearest:!1;let ut;te.minResolution!==void 0?ut=te.minResolution:te.maxZoom!==void 0?ut=this.getResolutionForZoom(te.maxZoom):ut=0;const dt=this.rotatedExtentForGeometry(ee);let ht=this.getResolutionForExtentInternal(dt,[st[0]-ot[1]-ot[3],st[1]-ot[0]-ot[2]]);ht=isNaN(ht)?ut:Math.max(ht,ut),ht=this.getConstrainedResolution(ht,ct?0:1);const ft=this.getRotation(),pt=Math.sin(ft),mt=Math.cos(ft),yt=getCenter(dt);yt[0]+=(ot[1]-ot[3])/2*ht,yt[1]+=(ot[0]-ot[2])/2*ht;const vt=yt[0]*mt-yt[1]*pt,_t=yt[1]*mt+yt[0]*pt,bt=this.getConstrainedCenter([vt,_t],ht),xt=te.callback?te.callback:VOID;te.duration!==void 0?this.animateInternal({resolution:ht,center:bt,duration:te.duration,easing:te.easing},xt):(this.targetResolution_=ht,this.targetCenter_=bt,this.applyTargetState_(!1,!0),animationCallback(xt,!0))}centerOn(ee,te,st){this.centerOnInternal(fromUserCoordinate(ee,this.getProjection()),te,st)}centerOnInternal(ee,te,st){this.setCenterInternal(calculateCenterOn(ee,te,st,this.getResolution(),this.getRotation()))}calculateCenterShift(ee,te,st,ot){let ct;const ut=this.padding_;if(ut&&ee){const dt=this.getViewportSizeMinusPadding_(-st),ht=calculateCenterOn(ee,ot,[dt[0]/2+ut[3],dt[1]/2+ut[0]],te,st);ct=[ee[0]-ht[0],ee[1]-ht[1]]}return ct}isDef(){return!!this.getCenterInternal()&&this.getResolution()!==void 0}adjustCenter(ee){const te=toUserCoordinate(this.targetCenter_,this.getProjection());this.setCenter([te[0]+ee[0],te[1]+ee[1]])}adjustCenterInternal(ee){const te=this.targetCenter_;this.setCenterInternal([te[0]+ee[0],te[1]+ee[1]])}adjustResolution(ee,te){te=te&&fromUserCoordinate(te,this.getProjection()),this.adjustResolutionInternal(ee,te)}adjustResolutionInternal(ee,te){const st=this.getAnimating()||this.getInteracting(),ot=this.getViewportSize_(this.getRotation()),ct=this.constraints_.resolution(this.targetResolution_*ee,0,ot,st);te&&(this.targetCenter_=this.calculateCenterZoom(ct,te)),this.targetResolution_*=ee,this.applyTargetState_()}adjustZoom(ee,te){this.adjustResolution(Math.pow(this.zoomFactor_,-ee),te)}adjustRotation(ee,te){te&&(te=fromUserCoordinate(te,this.getProjection())),this.adjustRotationInternal(ee,te)}adjustRotationInternal(ee,te){const st=this.getAnimating()||this.getInteracting(),ot=this.constraints_.rotation(this.targetRotation_+ee,st);te&&(this.targetCenter_=this.calculateCenterRotate(ot,te)),this.targetRotation_+=ee,this.applyTargetState_()}setCenter(ee){this.setCenterInternal(ee&&fromUserCoordinate(ee,this.getProjection()))}setCenterInternal(ee){this.targetCenter_=ee,this.applyTargetState_()}setHint(ee,te){return this.hints_[ee]+=te,this.changed(),this.hints_[ee]}setResolution(ee){this.targetResolution_=ee,this.applyTargetState_()}setRotation(ee){this.targetRotation_=ee,this.applyTargetState_()}setZoom(ee){this.setResolution(this.getResolutionForZoom(ee))}applyTargetState_(ee,te){const st=this.getAnimating()||this.getInteracting()||te,ot=this.constraints_.rotation(this.targetRotation_,st),ct=this.getViewportSize_(
76ot),ut=this.constraints_.resolution(this.targetResolution_,0,ct,st),dt=this.constraints_.center(this.targetCenter_,ut,ct,st,this.calculateCenterShift(this.targetCenter_,ut,ot,ct));this.get(ViewProperty.ROTATION)!==ot&&this.set(ViewProperty.ROTATION,ot),this.get(ViewProperty.RESOLUTION)!==ut&&(this.set(ViewProperty.RESOLUTION,ut),this.set("zoom",this.getZoom(),!0)),(!dt||!this.get(ViewProperty.CENTER)||!equals$1(this.get(ViewProperty.CENTER),dt))&&this.set(ViewProperty.CENTER,dt),this.getAnimating()&&!ee&&this.cancelAnimations(),this.cancelAnchor_=void 0}resolveConstraints(ee,te,st){ee=ee!==void 0?ee:200;const ot=te||0,ct=this.constraints_.rotation(this.targetRotation_),ut=this.getViewportSize_(ct),dt=this.constraints_.resolution(this.targetResolution_,ot,ut),ht=this.constraints_.center(this.targetCenter_,dt,ut,!1,this.calculateCenterShift(this.targetCenter_,dt,ct,ut));if(ee===0&&!this.cancelAnchor_){this.targetResolution_=dt,this.targetRotation_=ct,this.targetCenter_=ht,this.applyTargetState_();return}st=st||(ee===0?this.cancelAnchor_:void 0),this.cancelAnchor_=void 0,(this.getResolution()!==dt||this.getRotation()!==ct||!this.getCenterInternal()||!equals$1(this.getCenterInternal(),ht))&&(this.getAnimating()&&this.cancelAnimations(),this.animateInternal({rotation:ct,center:ht,resolution:dt,duration:ee,easing:easeOut,anchor:st}))}beginInteraction(){this.resolveConstraints(0),this.setHint(ViewHint.INTERACTING,1)}endInteraction(ee,te,st){st=st&&fromUserCoordinate(st,this.getProjection()),this.endInteractionInternal(ee,te,st)}endInteractionInternal(ee,te,st){this.getInteracting()&&(this.setHint(ViewHint.INTERACTING,-1),this.resolveConstraints(ee,te,st))}getConstrainedCenter(ee,te){const st=this.getViewportSize_(this.getRotation());return this.constraints_.center(ee,te||this.getResolution(),st)}getConstrainedZoom(ee,te){const st=this.getResolutionForZoom(ee);return this.getZoomForResolution(this.getConstrainedResolution(st,te))}getConstrainedResolution(ee,te){te=te||0;const st=this.getViewportSize_(this.getRotation());return this.constraints_.resolution(ee,te,st)}}function animationCallback(ne,ee){setTimeout(function(){ne(ee)},0)}function createCenterConstraint(ne){if(ne.extent!==void 0){const te=ne.smoothExtentConstraint!==void 0?ne.smoothExtentConstraint:!0;return createExtent(ne.extent,ne.constrainOnlyCenter,te)}const ee=createProjection(ne.projection,"EPSG:3857");if(ne.multiWorld!==!0&&ee.isGlobal()){const te=ee.getExtent().slice();return te[0]=-1/0,te[2]=1/0,createExtent(te,!1,!1)}return none}function createResolutionConstraint(ne){let ee,te,st,ut=ne.minZoom!==void 0?ne.minZoom:DEFAULT_MIN_ZOOM,dt=ne.maxZoom!==void 0?ne.maxZoom:28;const ht=ne.zoomFactor!==void 0?ne.zoomFactor:2,ft=ne.multiWorld!==void 0?ne.multiWorld:!1,pt=ne.smoothResolutionConstraint!==void 0?ne.smoothResolutionConstraint:!0,mt=ne.showFullExtent!==void 0?ne.showFullExtent:!1,yt=createProjection(ne.projection,"EPSG:3857"),vt=yt.getExtent();let _t=ne.constrainOnlyCenter,bt=ne.extent;if(!ft&&!bt&&yt.isGlobal()&&(_t=!1,bt=vt),ne.resolutions!==void 0){const xt=ne.resolutions;te=xt[ut],st=xt[dt]!==void 0?xt[dt]:xt[xt.length-1],ne.constrainResolution?ee=createSnapToResolutions(xt,pt,!_t&&bt,mt):ee=createMinMaxResolution(te,st,pt,!_t&&bt,mt)}else{const Mt=(vt?Math.max(getWidth(vt),getHeight(vt)):360*METERS_PER_UNIT$1.degrees/yt.getMetersPerUnit())/DEFAULT_TILE_SIZE/Math.pow(2,DEFAULT_MIN_ZOOM),Ot=Mt/Math.pow(2,28-DEFAULT_MIN_ZOOM);te=ne.maxResolution,te!==void 0?ut=0:te=Mt/Math.pow(ht,ut),st=ne.minResolution,st===void 0&&(ne.maxZoom!==void 0?ne.maxResolution!==void 0?st=te/Math.pow(ht,dt):st=Mt/Math.pow(ht,dt):st=Ot),dt=ut+Math.floor(Math.log(te/st)/Math.log(ht)),st=te/Math.pow(ht,dt-ut),ne.constrainResolution?ee=createSnapToPower(ht,te,st,pt,!_t&&bt,mt):ee=createMinMaxResolution(te,st,pt,!_t&&bt,mt)}return{constraint:ee,maxResolution:te,minResolution:st,minZoom:ut,zoomFactor:ht}}function createRotationConstraint(ne){if(ne.enableRotation!==void 0?ne.enableRotation:!0){const te=ne.constrainRotation;return te===void 0||te===!0?createSnapToZero():te===!1?none$1:typeof te=="number"?createSnapToN(te):none$1}return disable}function isNoopAnimation(ne){return!(ne.sourceCenter&&ne.targetCenter&&!equals$1(ne.s
76ourceCenter,ne.targetCenter)||ne.sourceResolution!==ne.targetResolution||ne.sourceRotation!==ne.targetRotation)}function calculateCenterOn(ne,ee,te,st,ot){const ct=Math.cos(-ot);let ut=Math.sin(-ot),dt=ne[0]*ct-ne[1]*ut,ht=ne[1]*ct+ne[0]*ut;dt+=(ee[0]/2-te[0])*st,ht+=(te[1]-ee[1]/2)*st,ut=-ut;const ft=dt*ct-ht*ut,pt=ht*ct+dt*ut;return[ft,pt]}const LayerProperty={OPACITY:"opacity",VISIBLE:"visible",EXTENT:"extent",Z_INDEX:"zIndex",MAX_RESOLUTION:"maxResolution",MIN_RESOLUTION:"minResolution",MAX_ZOOM:"maxZoom",MIN_ZOOM:"minZoom",SOURCE:"source",MAP:"map"};class BaseLayer extends BaseObject{constructor(ee){super(),this.on,this.once,this.un,this.background_=ee.background;const te=Object.assign({},ee);typeof ee.properties=="object"&&(delete te.properties,Object.assign(te,ee.properties)),te[LayerProperty.OPACITY]=ee.opacity!==void 0?ee.opacity:1,assert(typeof te[LayerProperty.OPACITY]=="number","Layer opacity must be a number"),te[LayerProperty.VISIBLE]=ee.visible!==void 0?ee.visible:!0,te[LayerProperty.Z_INDEX]=ee.zIndex,te[LayerProperty.MAX_RESOLUTION]=ee.maxResolution!==void 0?ee.maxResolution:1/0,te[LayerProperty.MIN_RESOLUTION]=ee.minResolution!==void 0?ee.minResolution:0,te[LayerProperty.MIN_ZOOM]=ee.minZoom!==void 0?ee.minZoom:-1/0,te[LayerProperty.MAX_ZOOM]=ee.maxZoom!==void 0?ee.maxZoom:1/0,this.className_=te.className!==void 0?te.className:"ol-layer",delete te.className,this.setProperties(te),this.state_=null}getBackground(){return this.background_}getClassName(){return this.className_}getLayerState(ee){const te=this.state_||{layer:this,managed:ee===void 0?!0:ee},st=this.getZIndex();return te.opacity=clamp$1(Math.round(this.getOpacity()*100)/100,0,1),te.visible=this.getVisible(),te.extent=this.getExtent(),te.zIndex=st===void 0&&!te.managed?1/0:st,te.maxResolution=this.getMaxResolution(),te.minResolution=Math.max(this.getMinResolution(),0),te.minZoom=this.getMinZoom(),te.maxZoom=this.getMaxZoom(),this.state_=te,te}getLayersArray(ee){return abstract()}getLayerStatesArray(ee){return abstract()}getExtent(){return this.get(LayerProperty.EXTENT)}getMaxResolution(){return this.get(LayerProperty.MAX_RESOLUTION)}getMinResolution(){return this.get(LayerProperty.MIN_RESOLUTION)}getMinZoom(){return this.get(LayerProperty.MIN_ZOOM)}getMaxZoom(){return this.get(LayerProperty.MAX_ZOOM)}getOpacity(){return this.get(LayerProperty.OPACITY)}getSourceState(){return abstract()}getVisible(){return this.get(LayerProperty.VISIBLE)}getZIndex(){return this.get(LayerProperty.Z_INDEX)}setBackground(ee){this.background_=ee,this.changed()}setExtent(ee){this.set(LayerProperty.EXTENT,ee)}setMaxResolution(ee){this.set(LayerProperty.MAX_RESOLUTION,ee)}setMinResolution(ee){this.set(LayerProperty.MIN_RESOLUTION,ee)}setMaxZoom(ee){this.set(LayerProperty.MAX_ZOOM,ee)}setMinZoom(ee){this.set(LayerProperty.MIN_ZOOM,ee)}setOpacity(ee){assert(typeof ee=="number","Layer opacity must be a number"),this.set(LayerProperty.OPACITY,ee)}setVisible(ee){this.set(LayerProperty.VISIBLE,ee)}setZIndex(ee){this.set(LayerProperty.Z_INDEX,ee)}disposeInternal(){this.state_&&(this.state_.layer=null,this.state_=null),super.disposeInternal()}}let Layer$1=class extends BaseLayer{constructor(ee){const te=Object.assign({},ee);delete te.source,super(te),this.on,this.once,this.un,this.mapPrecomposeKey_=null,this.mapRenderKey_=null,this.sourceChangeKey_=null,this.renderer_=null,this.sourceReady_=!1,this.rendered=!1,ee.render&&(this.render=ee.render),ee.map&&this.setMap(ee.map),this.addChangeListener(LayerProperty.SOURCE,this.handleSourcePropertyChange_);const st=ee.source?ee.source:null;this.setSource(st)}getLayersArray(ee){return ee=ee||[],ee.push(this),ee}getLayerStatesArray(ee){return ee=ee||[],ee.push(this.getLayerState()),ee}getSource(){return this.get(LayerProperty.SOURCE)||null}getRenderSource(){return this.getSource()}getSourceState(){const ee=this.getSource();return ee?ee.getState():"undefined"}handleSourceChange_(){this.changed(),!(this.sourceReady_||this.get
76Source().getState()!=="ready")&&(this.sourceReady_=!0,this.dispatchEvent("sourceready"))}handleSourcePropertyChange_(){this.sourceChangeKey_&&(unlistenByKey(this.sourceChangeKey_),this.sourceChangeKey_=null),this.sourceReady_=!1;const ee=this.getSource();ee&&(this.sourceChangeKey_=listen(ee,EventType.CHANGE,this.handleSourceChange_,this),ee.getState()==="ready"&&(this.sourceReady_=!0,setTimeout(()=>{this.dispatchEvent("sourceready")},0))),this.changed()}getFeatures(ee){return this.renderer_?this.renderer_.getFeatures(ee):Promise.resolve([])}getData(ee){return!this.renderer_||!this.rendered?null:this.renderer_.getData(ee)}isVisible(ee){let te;const st=this.getMapInternal();!ee&&st&&(ee=st.getView()),ee instanceof View?te={viewState:ee.getState(),extent:ee.calculateExtent()}:te=ee,!te.layerStatesArray&&st&&(te.layerStatesArray=st.getLayerGroup().getLayerStatesArray());let ot;if(te.layerStatesArray){if(ot=te.layerStatesArray.find(ut=>ut.layer===this),!ot)return!1}else ot=this.getLayerState();const ct=this.getExtent();return inView(ot,te.viewState)&&(!ct||intersects$1(ct,te.extent))}getAttributions(ee){var ct;if(!this.isVisible(ee))return[];const te=(ct=this.getSource())==null?void 0:ct.getAttributions();if(!te)return[];const st=ee instanceof View?ee.getViewStateAndExtent():ee;let ot=te(st);return Array.isArray(ot)||(ot=[ot]),ot}render(ee,te){const st=this.getRenderer();return st.prepareFrame(ee)?(this.rendered=!0,st.renderFrame(ee,te)):null}unrender(){this.rendered=!1}getDeclutter(){}renderDeclutter(ee,te){}renderDeferred(ee){const te=this.getRenderer();te&&te.renderDeferred(ee)}setMapInternal(ee){ee||this.unrender(),this.set(LayerProperty.MAP,ee)}getMapInternal(){return this.get(LayerProperty.MAP)}setMap(ee){this.mapPrecomposeKey_&&(unlistenByKey(this.mapPrecomposeKey_),this.mapPrecomposeKey_=null),ee||this.changed(),this.mapRenderKey_&&(unlistenByKey(this.mapRenderKey_),this.mapRenderKey_=null),ee&&(this.mapPrecomposeKey_=listen(ee,RenderEventType.PRECOMPOSE,this.handlePrecompose_,this),this.mapRenderKey_=listen(this,EventType.CHANGE,ee.render,ee),this.changed())}handlePrecompose_(ee){const te=ee.frameState.layerStatesArray,st=this.getLayerState(!1);assert(!te.some(ot=>ot.layer===st.layer),"A layer can only be added to the map once. Use either `layer.setMap()` or `map.addLayer()`, not both."),te.push(st)}setSource(ee){this.set(LayerProperty.SOURCE,ee)}getRenderer(){return this.renderer_||(this.renderer_=this.createRenderer()),this.renderer_}hasRenderer(){return!!this.renderer_}createRenderer(){return null}clearRenderer(){this.renderer_&&(this.renderer_.dispose(),delete this.renderer_)}disposeInternal(){this.clearRenderer(),this.setSource(null),super.disposeInternal()}};function inView(ne,ee){if(!ne.visible)return!1;const te=ee.resolution;if(te<ne.minResolution||te>=ne.maxResolution)return!1;const st=ee.zoom;return st>ne.minZoom&&st<=ne.maxZoom}const Property$2={RENDER_ORDER:"renderOrder"};class BaseVectorLayer extends Layer$1{constructor(ee){ee=ee||{};const te=Object.assign({},ee);delete te.style,delete te.renderBuffer,delete te.updateWhileAnimating,delete te.updateWhileInteracting,super(te),this.declutter_=ee.declutter?String(ee.declutter):void 0,this.renderBuffer_=ee.renderBuffer!==void 0?ee.renderBuffer:100,this.style_=null,this.styleFunction_=void 0,this.setStyle(ee.style),this.updateWhileAnimating_=ee.updateWhileAnimating!==void 0?ee.updateWhileAnimating:!1,this.updateWhileInteracting_=ee.updateWhileInteracting!==void 0?ee.updateWhileInteracting:!1}getDeclutter(){return this.declutter_}getFeatures(ee){return super.getFeatures(ee)}getRenderBuffer(){return this.renderBuffer_}getRenderOrder(){return this.get(Property$2.RENDER_ORDER)}getStyle(){return this.style_}getStyleFunction(){return this.styleFunction_}getUpdateWhileAnimating(){return this.updateWhileAnimating_}getUpdateWhileInteracting(){return this.updateWhileInteracting_}renderDeclutter(ee,te){const st=this.getDeclutter();st in ee.declutter||(ee.declutter[st]=new RBush$1(9)),this.getRenderer().renderDeclutter(ee,te)}setRenderOrder(ee){this.set(Property$2.RENDER_ORDER,ee)}setStyle(ee){this.style_=ee===void 0?createDefaultStyle:ee;const te=toStyleLike(ee);this.styleFunction_=ee===null?void 0:toFunction(te),this.changed()}setDeclutter(ee){this.declutter_=ee?String(ee):void 0,this.changed()}}function toStyleLike(ne){if(ne===void 0)return createDefaultStyle;if(!ne)return null;if(typeof ne=="function"||ne instanceof Style$1)return ne;if(Array.isArray(ne)&&ne.length===0)return[];if(Array.isArray(ne)&&ne[0]instanceof Style$1){const te=ne.length,st=ne
76w Array(te);for(let ot=0;ot<te;++ot){const ct=ne[ot];if(!(ct instanceof Style$1))throw new Error("Expected a list of style instances");st[ot]=ct}return st}return flatStyleLikeToStyleFunction(ne)}class VectorLayer extends BaseVectorLayer{constructor(ee){super(ee)}createRenderer(){return new CanvasVectorLayerRenderer(this)}}class GeometryCollection extends Geometry{constructor(ee){super(),this.geometries_=ee,this.changeEventsKeys_=[],this.listenGeometriesChange_()}unlistenGeometriesChange_(){this.changeEventsKeys_.forEach(unlistenByKey),this.changeEventsKeys_.length=0}listenGeometriesChange_(){const ee=this.geometries_;for(let te=0,st=ee.length;te<st;++te)this.changeEventsKeys_.push(listen(ee[te],EventType.CHANGE,this.changed,this))}clone(){const ee=new GeometryCollection(cloneGeometries(this.geometries_));return ee.applyProperties(this),ee}closestPointXY(ee,te,st,ot){if(ot<closestSquaredDistanceXY(this.getExtent(),ee,te))return ot;const ct=this.geometries_;for(let ut=0,dt=ct.length;ut<dt;++ut)ot=ct[ut].closestPointXY(ee,te,st,ot);return ot}containsXY(ee,te){const st=this.geometries_;for(let ot=0,ct=st.length;ot<ct;++ot)if(st[ot].containsXY(ee,te))return!0;return!1}computeExtent(ee){createOrUpdateEmpty(ee);const te=this.geometries_;for(let st=0,ot=te.length;st<ot;++st)extend$4(ee,te[st].getExtent());return ee}getGeometries(){return cloneGeometries(this.geometries_)}getGeometriesArray(){return this.geometries_}getGeometriesArrayRecursive(){let ee=[];const te=this.geometries_;for(let st=0,ot=te.length;st<ot;++st)te[st].getType()===this.getType()?ee=ee.concat(te[st].getGeometriesArrayRecursive()):ee.push(te[st]);return ee}getSimplifiedGeometry(ee){if(this.simplifiedGeometryRevision!==this.getRevision()&&(this.simplifiedGeometryMaxMinSquaredTolerance=0,this.simplifiedGeometryRevision=this.getRevision()),ee<0||this.simplifiedGeometryMaxMinSquaredTolerance!==0&&ee<this.simplifiedGeometryMaxMinSquaredTolerance)return this;const te=[],st=this.geometries_;let ot=!1;for(let ct=0,ut=st.length;ct<ut;++ct){const dt=st[ct],ht=dt.getSimplifiedGeometry(ee);te.push(ht),ht!==dt&&(ot=!0)}return ot?new GeometryCollection(te):(this.simplifiedGeometryMaxMinSquaredTolerance=ee,this)}getType(){return"GeometryCollection"}intersectsExtent(ee){const te=this.geometries_;for(let st=0,ot=te.length;st<ot;++st)if(te[st].intersectsExtent(ee))return!0;return!1}isEmpty(){return this.geometries_.length===0}rotate(ee,te){const st=this.geometries_;for(let ot=0,ct=st.length;ot<ct;++ot)st[ot].rotate(ee,te);this.changed()}scale(ee,te,st){st||(st=getCenter(this.getExtent()));const ot=this.geometries_;for(let ct=0,ut=ot.length;ct<ut;++ct)ot[ct].scale(ee,te,st);this.changed()}setGeometries(ee){this.setGeometriesArray(cloneGeometries(ee))}setGeometriesArray(ee){this.unlistenGeometriesChange_(),this.geometries_=ee,this.listenGeometriesChange_(),this.changed()}applyTransform(ee){const te=this.geometries_;for(let st=0,ot=te.length;st<ot;++st)te[st].applyTransform(ee);this.changed()}translate(ee,te){const st=this.geometries_;for(let ot=0,ct=st.length;ot<ct;++ot)st[ot].translate(ee,te);this.changed()}disposeInternal(){this.unlistenGeometriesChange_(),super.disposeInternal()}}function cloneGeometries(ne){return ne.map(ee=>ee.clone())}function getCoordinate(ne,ee){const te=ne.length;return ee<0?ne[ee+te]:ee>=te?ne[ee-te]:ne[ee]}function interpolateCoordinate(ne,ee){const te=ne.length;let st=Math.floor(ee);const ot=ee-st;st>=te?st-=te:st<0&&(st+=te);let ct=st+1;ct>=te&&(ct-=te);const ut=ne[st],dt=ut[0],ht=ut[1],ft=ne[ct],pt=ft[0]-dt,mt=ft[1]-ht;return[dt+pt*ot,ht+mt*ot]}const sharedUpdateInfo={index:-1,endIndex:NaN,closestTargetDistance:1/0};function getTraceTargetUpdate(ne,ee,te,st){const ot=ne[0],ct=ne[1];let ut=1/0,dt=-1,ht=NaN;for(let mt=0;mt<ee.targets.length;++mt){const yt=ee.targets[mt],vt=yt.coordinates;let _t=1/0,bt;for(let xt=0;xt<vt.length-1;++xt){const Mt=vt[xt],Ot=vt[xt+1],kt=getPointSegmentRelationship(ot,ct,Mt,Ot);kt.squaredDistance<_t&&(_t=kt.squaredDistance,bt=xt+kt.along)}_t<ut&&(ut=_t,yt.ring&&ee.targetIndex===mt&&(yt.endIndex>yt.startIndex?bt<yt.startIndex&&(bt+=vt.length):yt.endIndex<yt.startIndex&&bt>yt.startIndex&&(bt-=vt.length)),ht=bt,dt=mt)}const ft=ee.targets[dt];let pt=ft.ring;if(ee.targetIndex===dt&&pt){const mt=interpolateCoordinate(ft.coordinates,ht),yt=te.getPixelFromCo
76ordinate(mt),vt=te.getPixelFromCoordinate(ee.startCoord);distance(yt,vt)>st&&(pt=!1)}if(pt){const mt=ft.coordinates,yt=mt.length,vt=ft.startIndex,_t=ht;if(vt<_t){const bt=getCumulativeSquaredDistance(mt,vt,_t);getCumulativeSquaredDistance(mt,vt,_t-yt)<bt&&(ht-=yt)}else{const bt=getCumulativeSquaredDistance(mt,vt,_t);getCumulativeSquaredDistance(mt,vt,_t+yt)<bt&&(ht+=yt)}}return sharedUpdateInfo.index=dt,sharedUpdateInfo.endIndex=ht,sharedUpdateInfo.closestTargetDistance=ut,sharedUpdateInfo}function getTraceTargets(ne,ee){const te=[];for(let st=0;st<ee.length;++st){const ct=ee[st].getGeometry();appendGeometryTraceTargets(ne,ct,te)}return te}function appendGeometryTraceTargets(ne,ee,te){if(ee instanceof LineString){appendTraceTarget(ne,ee.getCoordinates(),!1,te);return}if(ee instanceof MultiLineString){const st=ee.getCoordinates();for(let ot=0,ct=st.length;ot<ct;++ot)appendTraceTarget(ne,st[ot],!1,te);return}if(ee instanceof Polygon){const st=ee.getCoordinates();for(let ot=0,ct=st.length;ot<ct;++ot)appendTraceTarget(ne,st[ot],!0,te);return}if(ee instanceof MultiPolygon){const st=ee.getCoordinates();for(let ot=0,ct=st.length;ot<ct;++ot){const ut=st[ot];for(let dt=0,ht=ut.length;dt<ht;++dt)appendTraceTarget(ne,ut[dt],!0,te)}return}if(ee instanceof GeometryCollection){const st=ee.getGeometries();for(let ot=0;ot<st.length;++ot)appendGeometryTraceTargets(ne,st[ot],te);return}}function appendTraceTarget(ne,ee,te,st){const ot=ne[0],ct=ne[1];for(let ut=0,dt=ee.length-1;ut<dt;++ut){const ht=ee[ut],ft=ee[ut+1],pt=getPointSegmentRelationship(ot,ct,ht,ft);if(pt.squaredDistance===0){const mt=ut+pt.along;st.push({coordinates:ee,ring:te,startIndex:mt,endIndex:mt});return}}}function getSquaredDistance(ne,ee){return squaredDistance$1(ne[0],ne[1],ee[0],ee[1])}function getCumulativeSquaredDistance(ne,ee,te){let st,ot;ee<te?(st=ee,ot=te):(st=te,ot=ee);const ct=Math.ceil(st),ut=Math.floor(ot);if(ct>ut){const ht=interpolateCoordinate(ne,st),ft=interpolateCoordinate(ne,ot);return getSquaredDistance(ht,ft)}let dt=0;if(st<ct){const ht=interpolateCoordinate(ne,st),ft=getCoordinate(ne,ct);dt+=getSquaredDistance(ht,ft)}if(ut<ot){const ht=getCoordinate(ne,ut),ft=interpolateCoordinate(ne,ot);dt+=getSquaredDistance(ht,ft)}for(let ht=ct;ht<ut-1;++ht){const ft=getCoordinate(ne,ht),pt=getCoordinate(ne,ht+1);dt+=getSquaredDistance(ft,pt)}return dt}const sharedRel={along:0,squaredDistance:0};function getPointSegmentRelationship(ne,ee,te,st){const ot=te[0],ct=te[1],ut=st[0],dt=st[1],ht=ut-ot,ft=dt-ct;let pt=0,mt=ot,yt=ct;return(ht!==0||ft!==0)&&(pt=clamp$1(((ne-ot)*ht+(ee-ct)*ft)/(ht*ht+ft*ft),0,1),mt+=ht*pt,yt+=ft*pt),sharedRel.along=pt,sharedRel.squaredDistance=toFixed(squaredDistance$1(ne,ee,mt,yt),10),sharedRel}const DrawEventType={DRAWSTART:"drawstart",DRAWEND:"drawend",DRAWABORT:"drawabort"};class DrawEvent extends BaseEvent{constructor(ee,te){super(ee),this.feature=te}}class Draw extends PointerInteraction{constructor(ee){const te=ee;te.stopDown||(te.stopDown=FALSE),super(te),this.on,this.once,this.un,this.options_=ee,this.shouldHandle_=!1,this.downPx_=null,this.downTimeout_,this.lastDragTime_,this.pointerType_,this.freehand_=!1,this.source_=ee.source?ee.source:null,this.features_=ee.features?ee.features:null,this.snapTolerance_=ee.snapTolerance?ee.snapTolerance:12,this.type_=ee.type,this.mode_=getMode(this.type_),this.stopClick_=!!ee.stopClick,this.ignoreNextUpEvent_=!1,this.minPoints_=ee.minPoints?ee.minPoints:this.mode_==="Polygon"?3:2,this.maxPoints_=this.mode_==="Circle"?2:ee.maxPoints?ee.maxPoints:1/0,this.finishCondition_=ee.finishCondition?ee.finishCondition:TRUE,this.geometryLayout_=ee.geometryLayout?ee.geometryLayout:"XY";let st=ee.geometryFunction;if(!st){const ot=this.mode_;if(ot==="Circle")st=(ct,ut,dt)=>{const ht=ut||new Circle([NaN,NaN]),ft=fromUserCoordinate(ct[0]),pt=squaredDistance(ft,fromUserCoordinate(ct[ct.length-1]));return ht.setCenterAndRadius(ft,Math.sqrt(pt),this.geometryLayout_),ht};else{let ct;ot==="Point"?ct=Point$1:ot==="LineString"?ct=LineString:ot==="Polygon"&&(ct=Polygon),st=(ut,dt,ht)=>(dt?ot==="Polygon"?ut[0].length?dt.setCoordinates([ut[0].concat([ut[0][0]])],this.geometryLayout_):dt.setCoordinates([],this.geometryLayout_):dt.setCoordinates(ut,this.geometryLayout_):dt=new ct(ut,this.geometryLayout_),dt)}}this.geometryFunction_=st,this.dragVertexDelay_=ee.dragVertexDelay!==void 0?ee.dragVertexDelay:500,this.finishCoordinate_=null,this.sketchFeature_=null,this.sketchPoint_=null,this.sketchCoords_=null,this.sketchLine_=null,this.sketchLineCoords_=null,this.squaredClickTolerance_=ee.clickTolerance?ee.clickTolerance*ee.clickTolerance:36,this.overlay_=new VectorLayer({source:new VectorSource({useSpatialIndex:!1,wrapX:ee.wrapX?ee.wrapX:!1}),style:ee.style?ee.style:getDefaultStyleFunction$2(),updateWhileInteracting:!0}),this.geometryName_=ee.geometryName,this.condition_=ee.condition?ee.condition:noModifierKeys,this.freehandCondition_,ee.freehand?this.freehandCondition_=always$1:this.freehandCondition_=ee.freehandCondition?ee.freehandCondition:shiftKeyOnly,this.traceCondition_,this.setTrace(ee.trace||!1),this.traceState_={active:!1}
76,this.traceSource_=ee.traceSource||ee.source||null,this.addChangeListener(InteractionProperty.ACTIVE,this.updateState_)}setTrace(ee){let te;ee?ee===!0?te=always$1:te=ee:te=never,this.traceCondition_=te}setMap(ee){super.setMap(ee),this.updateState_()}setFreehand(ee){this.freehand_=ee,this.freehand_?this.freehandCondition_=always$1:this.freehandCondition_=this.options_&&this.options_.freehandCondition?this.options_.freehandCondition:shiftKeyOnly}getOverlay(){return this.overlay_}getFreehand(){return this.freehand_}handleEvent(ee){ee.originalEvent.type===EventType.CONTEXTMENU&&ee.originalEvent.preventDefault(),this.freehand_=this.mode_!=="Point"&&this.freehandCondition_(ee);let te=ee.type===MapBrowserEventType.POINTERMOVE,st=!0;return!this.freehand_&&this.lastDragTime_&&ee.type===MapBrowserEventType.POINTERDRAG&&(Date.now()-this.lastDragTime_>=this.dragVertexDelay_?(this.downPx_=ee.pixel,this.shouldHandle_=!this.freehand_,te=!0):this.lastDragTime_=void 0,this.shouldHandle_&&this.downTimeout_!==void 0&&(clearTimeout(this.downTimeout_),this.downTimeout_=void 0)),this.freehand_&&ee.type===MapBrowserEventType.POINTERDRAG&&this.sketchFeature_!==null?(this.addToDrawing_(ee.coordinate),st=!1):this.freehand_&&ee.type===MapBrowserEventType.POINTERDOWN?st=!1:te&&this.getPointerCount()<2?(st=ee.type===MapBrowserEventType.POINTERMOVE,st&&this.freehand_?(this.handlePointerMove_(ee),this.shouldHandle_&&ee.originalEvent.preventDefault()):(ee.originalEvent.pointerType==="mouse"||ee.type===MapBrowserEventType.POINTERDRAG&&this.downTimeout_===void 0)&&this.handlePointerMove_(ee)):ee.type===MapBrowserEventType.DBLCLICK&&(st=!1),super.handleEvent(ee)&&st}handleDownEvent(ee){return this.shouldHandle_=!this.freehand_,this.freehand_?(this.downPx_=ee.pixel,this.finishCoordinate_||this.startDrawing_(ee.coordinate),!0):this.condition_(ee)?(this.lastDragTime_=Date.now(),this.downTimeout_=setTimeout(()=>{this.handlePointerMove_(new MapBrowserEvent(MapBrowserEventType.POINTERMOVE,ee.map,ee.originalEvent,!1,ee.frameState))},this.dragVertexDelay_),this.downPx_=ee.pixel,!0):(this.lastDragTime_=void 0,!1)}deactivateTrace_(){this.traceState_={active:!1}}
76toggleTraceState_(ee){if(!this.traceSource_||!this.traceCondition_(ee))return;if(this.traceState_.active){this.deactivateTrace_();return}const te=this.getMap(),st=te.getCoordinateFromPixel([ee.pixel[0]-this.snapTolerance_,ee.pixel[1]+this.snapTolerance_]),ot=te.getCoordinateFromPixel([ee.pixel[0]+this.snapTolerance_,ee.pixel[1]-this.snapTolerance_]),ct=boundingExtent([st,ot]),ut=this.traceSource_.getFeaturesInExtent(ct);if(ut.length===0)return;const dt=getTraceTargets(ee.coordinate,ut);dt.length&&(this.traceState_={active:!0,startCoord:ee.coordinate.slice(),targets:dt,targetIndex:-1})}addOrRemoveTracedCoordinates_(ee,te){const st=ee.startIndex<=ee.endIndex,ot=ee.startIndex<=te;st===ot?st&&te>ee.endIndex||!st&&te<ee.endIndex?this.addTracedCoordinates_(ee,ee.endIndex,te):(st&&te<ee.endIndex||!st&&te>ee.endIndex)&&this.removeTracedCoordinates_(te,ee.endIndex):(this.removeTracedCoordinates_(ee.startIndex,ee.endIndex),this.addTracedCoordinates_(ee,ee.startIndex,te))}removeTracedCoordinates_(ee,te){if(ee===te)return;let st=0;if(ee<te){const ot=Math.ceil(ee);let ct=Math.floor(te);ct===te&&(ct-=1),st=ct-ot+1}else{const ot=Math.floor(ee);let ct=Math.ceil(te);ct===te&&(ct+=1),st=ot-ct+1}st>0&&this.removeLastPoints_(st)}addTracedCoordinates_(ee,te,st){if(te===st)return;const ot=[];if(te<st){const ct=Math.ceil(te);let ut=Math.floor(st);ut===st&&(ut-=1);for(let dt=ct;dt<=ut;++dt)ot.push(getCoordinate(ee.coordinates,dt))}else{const ct=Math.floor(te);let ut=Math.ceil(st);ut===st&&(ut+=1);for(let dt=ct;dt>=ut;--dt)ot.push(getCoordinate(ee.coordinates,dt))}ot.length&&this.appendCoordinates(ot)}updateTrace_(ee){const te=this.traceState_;if(!te.active)return;if(te.targetIndex===-1){const dt=ee.map.getPixelFromCoordinate(te.startCoord);if(distance(dt,ee.pixel)<this.snapTolerance_)return}const st=getTraceTargetUpdate(ee.coordinate,te,this.getMap(),this.snapTolerance_);if(te.targetIndex!==st.index){if(te.targetIndex!==-1){const ht=te.targets[te.targetIndex];this.removeTracedCoordinates_(ht.startIndex,ht.endIndex)}const dt=te.targets[st.index];this.addTracedCoordinates_(dt,dt.startIndex,st.endIndex)}else{const dt=te.targets[te.targetIndex];this.addOrRemoveTracedCoordinates_(dt,st.endIndex)}te.targetIndex=st.index;const ot=te.targets[te.targetIndex];ot.endIndex=st.endIndex;const ct=interpolateCoordinate(ot.coordinates,ot.endIndex),ut=this.getMap().getPixelFromCoordinate(ct);ee.coordinate=ct,ee.pixel=[Math.round(ut[0]),Math.round(ut[1])]}handleDragEvent(ee){this.ignoreNextUpEvent_=!0,super.handleDragEvent(ee)}handleUpEvent(ee){let te=!0;if(this.getPointerCount()===0){this.downTimeout_&&(clearTimeout(this.downTimeout_),this.downTimeout_=void 0),this.handlePointerMove_(ee);const st=this.traceState_.active;if(this.ignoreNextUpEvent_||this.toggleTraceState_(ee),this.shouldHandle_){const ot=!this.finishCoordinate_;ot&&this.startDrawing_(ee.coordinate),!ot&&this.freehand_?this.finishDrawing():!this.freehand_&&(!ot||this.mode_==="Point")&&(this.atFinish_(ee.pixel,st)?this.finishCondition_(ee)&&this.finishDrawing():this.addToDrawing_(ee.coordinate)),te=!1}else this.freehand_&&this.abortDrawing()}return this.ignoreNextUpEvent_=!1,!te&&this.stopClick_&&ee.preventDefault(),te}handlePointerMove_(ee){if(this.pointerType_=ee.originalEvent.pointerType,this.downPx_&&(!this.freehand_&&this.shouldHandle_||this.freehand_&&!this.shouldHandle_)){const te=this.downPx_,st=ee.pixel,ot=te[0]-st[0],ct=te[1]-st[1],ut=ot*ot+ct*ct;if(this.shouldHandle_=this.freehand_?ut>this.squaredClickTolerance_:ut<=this.squaredClickTolerance_,!this.shouldHandle_)return}if(!this.finishCoordinate_){this.createOrUpdateSketchPoint_(ee.coordinate.slice());return}this.updateTrace_(ee),this.modifyDrawing_(ee.coordinate)}atFinish_(ee,te){let st=!1;if(this.sketchFeature_){let ot=!1,ct=[this.finishCoordinate_];const ut=this.mode_;if(ut==="Point")st=!0;else if(ut==="Circle")st=this.sketchCoords_.length===2;else if(ut==="LineString")ot=!te&&this.sketchCoords_.length>this.minPoints_;else if(ut==="Polygon"){const dt=this.sketchCoords_;ot=dt[0].length>this.minPoints_,ct=[dt[0][0],dt[0][dt[0].length-2]],te?ct=[dt[0][0]]:ct=[dt[0][0],dt[0][dt[0].length-2]]}if(ot){const dt=this.getMap();for(let ht=0,ft=ct.length;ht<ft;
76ht++){const pt=ct[ht],mt=dt.getPixelFromCoordinate(pt),yt=ee[0]-mt[0],vt=ee[1]-mt[1],_t=this.freehand_?1:this.snapTolerance_;if(st=Math.sqrt(yt*yt+vt*vt)<=_t,st){this.finishCoordinate_=pt;break}}}}return st}createOrUpdateSketchPoint_(ee){this.sketchPoint_?this.sketchPoint_.getGeometry().setCoordinates(ee):(this.sketchPoint_=new Feature(new Point$1(ee)),this.updateSketchFeatures_())}createOrUpdateCustomSketchLine_(ee){this.sketchLine_||(this.sketchLine_=new Feature);const te=ee.getLinearRing(0);let st=this.sketchLine_.getGeometry();st?(st.setFlatCoordinates(te.getLayout(),te.getFlatCoordinates()),st.changed()):(st=new LineString(te.getFlatCoordinates(),te.getLayout()),this.sketchLine_.setGeometry(st))}startDrawing_(ee){const te=this.getMap().getView().getProjection(),st=getStrideForLayout(this.geometryLayout_);for(;ee.length<st;)ee.push(0);this.finishCoordinate_=ee,this.mode_==="Point"?this.sketchCoords_=ee.slice():this.mode_==="Polygon"?(this.sketchCoords_=[[ee.slice(),ee.slice()]],this.sketchLineCoords_=this.sketchCoords_[0]):this.sketchCoords_=[ee.slice(),ee.slice()],this.sketchLineCoords_&&(this.sketchLine_=new Feature(new LineString(this.sketchLineCoords_)));const ot=this.geometryFunction_(this.sketchCoords_,void 0,te);this.sketchFeature_=new Feature,this.geometryName_&&this.sketchFeature_.setGeometryName(this.geometryName_),this.sketchFeature_.setGeometry(ot),this.updateSketchFeatures_(),this.dispatchEvent(new DrawEvent(DrawEventType.DRAWSTART,this.sketchFeature_))}modifyDrawing_(ee){const te=this.getMap(),st=this.sketchFeature_.getGeometry(),ot=te.getView().getProjection(),ct=getStrideForLayout(this.geometryLayout_);let ut,dt;for(;ee.length<ct;)ee.push(0);this.mode_==="Point"?dt=this.sketchCoords_:this.mode_==="Polygon"?(ut=this.sketchCoords_[0],dt=ut[ut.length-1],this.atFinish_(te.getPixelFromCoordinate(ee))&&(ee=this.finishCoordinate_.slice())):(ut=this.sketchCoords_,dt=ut[ut.length-1]),dt[0]=ee[0],dt[1]=ee[1],this.geometryFunction_(this.sketchCoords_,st,ot),this.sketchPoint_&&this.sketchPoint_.getGeometry().setCoordinates(ee),st.getType()==="Polygon"&&this.mode_!=="Polygon"?this.createOrUpdateCustomSketchLine_(st):this.sketchLineCoords_&&this.sketchLine_.getGeometry().setCoordinates(this.sketchLineCoords_),this.updateSketchFeatures_()}addToDrawing_(ee){const te=this.sketchFeature_.getGeometry(),st=this.getMap().getView().getProjection();let ot,ct;const ut=this.mode_;return ut==="LineString"||ut==="Circle"?(this.finishCoordinate_=ee.slice(),ct=this.sketchCoords_,ct.length>=this.maxPoints_&&(this.freehand_?ct.pop():ot=!0),ct.push(ee.slice()),this.geometryFunction_(ct,te,st)):ut==="Polygon"&&(ct=this.sketchCoords_[0],ct.length>=this.maxPoints_&&(this.freehand_?ct.pop():ot=!0),ct.push(ee.slice()),ot&&(this.finishCoordinate_=ct[0]),this.geometryFunction_(this.sketchCoords_,te,st)),this.createOrUpdateSketchPoint_(ee.slice()),this.updateSketchFeatures_(),ot?this.finishDrawing():this.sketchFeature_}removeLastPoints_(ee){if(!this.sketchFeature_)return;const te=this.sketchFeature_.getGeometry(),st=this.getMap().getView().getProjection(),ot=this.mode_;for(let ct=0;ct<ee;++ct){let ut;if(ot==="LineString"||ot==="Circle"){if(ut=this.sketchCoords_,ut.splice(-2,1),ut.length>=2){this.finishCoordinate_=ut[ut.length-2].slice();const dt=this.finishCoordinate_.slice();ut[ut.length-1]=dt,this.createOrUpdateSketchPoint_(dt)}this.geometryFunction_(ut,te,st),te.getType()==="Polygon"&&this.sketchLine_&&this.createOrUpdateCustomSketchLine_(te)}else if(ot==="Polygon"){ut=this.sketchCoords_[0],ut.splice(-2,1);const dt=this.sketchLine_.getGeometry();if(ut.length>=2){const ht=ut[ut.length-2].slice();ut[ut.length-1]=ht,this.createOrUpdateSketchPoint_(ht)}dt.setCoordinates(ut),this.geometryFunction_(this.sketchCoords_,te,st)}if(ut.length===1){this.abortDrawing();break}}this.updateSketchFeatures_()}removeLastPoint(){this.removeLastPoints_(1)}finishDrawing(){const ee=this.abortDrawing_();if(!ee)return null;let te=this.sketchCoords_;const st=ee.getGeometry(),ot=this.getMap().getView().getProjection();return this.mode_==="LineString"?(te.pop(),this.geometryFunction_(te,
76st,ot)):this.mode_==="Polygon"&&(te[0].pop(),this.geometryFunction_(te,st,ot),te=st.getCoordinates()),this.type_==="MultiPoint"?ee.setGeometry(new MultiPoint([te])):this.type_==="MultiLineString"?ee.setGeometry(new MultiLineString([te])):this.type_==="MultiPolygon"&&ee.setGeometry(new MultiPolygon([te])),this.dispatchEvent(new DrawEvent(DrawEventType.DRAWEND,ee)),this.features_&&this.features_.push(ee),this.source_&&this.source_.addFeature(ee),ee}abortDrawing_(){this.finishCoordinate_=null;const ee=this.sketchFeature_;return this.sketchFeature_=null,this.sketchPoint_=null,this.sketchLine_=null,this.overlay_.getSource().clear(!0),this.deactivateTrace_(),ee}abortDrawing(){const ee=this.abortDrawing_();ee&&this.dispatchEvent(new DrawEvent(DrawEventType.DRAWABORT,ee))}appendCoordinates(ee){const te=this.mode_,st=!this.sketchFeature_;st&&this.startDrawing_(ee[0]);let ot;if(te==="LineString"||te==="Circle")ot=this.sketchCoords_;else if(te==="Polygon")ot=this.sketchCoords_&&this.sketchCoords_.length?this.sketchCoords_[0]:[];else return;st&&ot.shift(),ot.pop();for(let ut=0;ut<ee.length;ut++)this.addToDrawing_(ee[ut]);const ct=ee[ee.length-1];this.sketchFeature_=this.addToDrawing_(ct),this.modifyDrawing_(ct)}extend(ee){const st=ee.getGeometry();this.sketchFeature_=ee,this.sketchCoords_=st.getCoordinates();const ot=this.sketchCoords_[this.sketchCoords_.length-1];this.finishCoordinate_=ot.slice(),this.sketchCoords_.push(ot.slice()),this.sketchPoint_=new Feature(new Point$1(ot)),this.updateSketchFeatures_(),this.dispatchEvent(new DrawEvent(DrawEventType.DRAWSTART,this.sketchFeature_))}updateSketchFeatures_(){const ee=[];this.sketchFeature_&&ee.push(this.sketchFeature_),this.sketchLine_&&ee.push(this.sketchLine_),this.sketchPoint_&&ee.push(this.sketchPoint_);const te=this.overlay_.getSource();te.clear(!0),te.addFeatures(ee)}updateState_(){const ee=this.getMap(),te=this.getActive();(!ee||!te)&&this.abortDrawing(),this.overlay_.setMap(te?ee:null)}}function getDefaultStyleFunction$2(){const ne=createEditingStyle();return function(ee,te){return ne[ee.getGeometry().getType()]}}function getMode(ne){switch(ne){case"Point":case"MultiPoint":return"Point";case"LineString":case"MultiLineString":return"LineString";case"Polygon":case"MultiPolygon":return"Polygon";
76case"Circle":return"Circle";default:throw new Error("Invalid type: "+ne)}}const CIRCLE_CENTER_INDEX=0,CIRCLE_CIRCUMFERENCE_INDEX=1,tempExtent=[0,0,0,0],tempSegment=[],ModifyEventType={MODIFYSTART:"modifystart",MODIFYEND:"modifyend"};function getCoordinatesArray(ne,ee,te){let st;switch(ee){case"LineString":st=ne;break;case"MultiLineString":case"Polygon":st=ne[te[0]];break;case"MultiPolygon":st=ne[te[1]][te[0]];break}return st}class ModifyEvent extends BaseEvent{constructor(ee,te,st){super(ee),this.features=te,this.mapBrowserEvent=st}}class Modify extends PointerInteraction{constructor(ee){if(super(ee),this.handleSourceAdd_=this.handleSourceAdd_.bind(this),this.handleSourceRemove_=this.handleSourceRemove_.bind(this),this.handleExternalCollectionAdd_=this.handleExternalCollectionAdd_.bind(this),this.handleExternalCollectionRemove_=this.handleExternalCollectionRemove_.bind(this),this.handleFeatureChange_=this.handleFeatureChange_.bind(this),this.on,this.once,this.un,this.condition_=ee.condition?ee.condition:primaryAction,this.defaultDeleteCondition_=function(st){return altKeyOnly(st)&&singleClick(st)},this.deleteCondition_=ee.deleteCondition?ee.deleteCondition:this.defaultDeleteCondition_,this.insertVertexCondition_=ee.insertVertexCondition?ee.insertVertexCondition:always$1,this.vertexFeature_=null,this.vertexSegments_=null,this.lastCoordinate_=[0,0],this.ignoreNextSingleClick_=!1,this.featuresBeingModified_=null,this.rBush_=new RBush,this.pixelTolerance_=ee.pixelTolerance!==void 0?ee.pixelTolerance:10,this.snappedToVertex_=!1,this.changingFeature_=!1,this.dragSegments_=[],this.overlay_=new VectorLayer({source:new VectorSource({useSpatialIndex:!1,wrapX:!!ee.wrapX}),style:ee.style?ee.style:getDefaultStyleFunction$1(),updateWhileAnimating:!0,updateWhileInteracting:!0}),this.SEGMENT_WRITERS_={Point:this.writePointGeometry_.bind(this),LineString:this.writeLineStringGeometry_.bind(this),LinearRing:this.writeLineStringGeometry_.bind(this),Polygon:this.writePolygonGeometry_.bind(this),MultiPoint:this.writeMultiPointGeometry_.bind(this),MultiLineString:this.writeMultiLineStringGeometry_.bind(this),MultiPolygon:this.writeMultiPolygonGeometry_.bind(this),Circle:this.writeCircleGeometry_.bind(this),GeometryCollection:this.writeGeometryCollectionGeometry_.bind(this)},this.source_=null,this.traceSource_=ee.traceSource||ee.source||null,this.traceCondition_,this.setTrace(ee.trace||!1),this.traceState_={active:!1},this.traceSegments_=null,this.hitDetection_=null,this.filterFunctionWasSupplied_=ee.filter!=null,this.filter_=ee.filter?ee.filter:()=>!0,this.coordinatesEqual_=ee.sharedVerticesEqual?ee.sharedVerticesEqual:equals$1,!(ee.features||ee.source))throw new Error("The modify interaction requires features collection or a source");let te;ee.features?(te=ee.features.getArray(),ee.features.addEventListener(CollectionEventType.ADD,this.handleExternalCollectionAdd_),ee.features.addEventListener(CollectionEventType.REMOVE,this.handleExternalCollectionRemove_),this.featuresCollection_=ee.features):ee.source&&(te=ee.source.getFeatures(),ee.source.addEventListener(VectorEventType.ADDFEATURE,this.handleSourceAdd_),ee.source.addEventListener(VectorEventType.REMOVEFEATURE,this.handleSourceRemove_),this.source_=ee.source),te.forEach(st=>{st.addEventListener(EventType.CHANGE,this.handleFeatureChange_),this.filterFunctionWasSupplied_&&st.addEventListener(ObjectEventType.PROPERTYCHANGE,this.handleFeatureChange_)}),ee.hitDetection&&(this.hitDetection_=ee.hitDetection),this.features_=[],te.filter(this.filter_).forEach(st=>this.addFeature_(st)),this.lastPointerEvent_=null,this.delta_=[0,0],this.snapToPointer_=ee.snapToPointer===void 0?!this.hitDetection_:ee.snapToPointer}setTrace(ee){let te;ee?ee===!0?te=always$1:te=ee:te=never,this.traceCondition_=te}addFeature_(ee){this.features_.push(ee);const te=ee.getGeometry();if(te){const ot=this.SEGMENT_WRITERS_[te.getType()];ot&&ot(ee,te)}const st=this.getMap();st&&st.isRendered()&&this.getActive()&&this.handlePointerAtPixel_(this.lastCoordinate_)}willModifyFeatures_(ee,te){if(!this.featuresBeingModified_){this.featuresBeingModified_=new Collection;const st=this.featuresBeingModified_.getArray();for(let ot=0,ct=te.length;ot<ct;++ot){const ut=te[ot].feature;ut&&!st.includes(ut)&&this.featuresBeingModified_.push(ut)}this.featuresBeingModified_.getLength()===0?this.featuresBeingModified_=null:this.dispatchEvent(new ModifyEvent(ModifyEventType.MODIFYSTART,this.featuresBeingModified_,ee))}}removeFeature_(ee){const te=this.features_.indexOf(ee);this.features_.splice(te,1),this.removeFeatureSegmentData_(ee),this.vertexFeature_&&this.features_.length===0&&(this.overlay_.getSource().removeFeature
76(this.vertexFeature_),this.vertexFeature_=null)}removeFeatureSegmentData_(ee){const te=this.rBush_,st=[];te.forEach(function(ot){ee===ot.feature&&st.push(ot)});for(let ot=st.length-1;ot>=0;--ot){const ct=st[ot];for(let ut=this.dragSegments_.length-1;ut>=0;--ut)this.dragSegments_[ut][0]===ct&&this.dragSegments_.splice(ut,1);te.remove(ct)}}setActive(ee){this.vertexFeature_&&!ee&&(this.overlay_.getSource().removeFeature(this.vertexFeature_),this.vertexFeature_=null),super.setActive(ee)}setMap(ee){this.overlay_.setMap(ee),super.setMap(ee)}getOverlay(){return this.overlay_}handleSourceAdd_(ee){const te=ee.feature;te&&this.externalAddFeatureHandler_(te)}handleSourceRemove_(ee){const te=ee.feature;te&&this.externalRemoveFeatureHandler_(te)}handleExternalCollectionAdd_(ee){const te=ee.element;te&&this.externalAddFeatureHandler_(te)}handleExternalCollectionRemove_(ee){const te=ee.element;te&&this.externalRemoveFeatureHandler_(te)}externalAddFeatureHandler_(ee){ee.addEventListener(EventType.CHANGE,this.handleFeatureChange_),this.filterFunctionWasSupplied_&&ee.addEventListener(ObjectEventType.PROPERTYCHANGE,this.handleFeatureChange_),this.filter_(ee)&&this.addFeature_(ee)}externalRemoveFeatureHandler_(ee){ee.removeEventListener(EventType.CHANGE,this.handleFeatureChange_),this.filterFunctionWasSupplied_&&ee.removeEventListener(ObjectEventType.PROPERTYCHANGE,this.handleFeatureChange_),this.removeFeature_(ee)}handleFeatureChange_(ee){if(!this.changingFeature_){const te=ee.target;this.removeFeature_(te),this.filter_(te)&&this.addFeature_(te)}}writePointGeometry_(ee,te){const st=te.getCoordinates(),ot={feature:ee,geometry:te,segment:[st,st]};this.rBush_.insert(te.getExtent(),ot)}writeMultiPointGeometry_(ee,te){const st=te.getCoordinates();for(let ot=0,ct=st.length;ot<ct;++ot){const ut=st[ot],dt={feature:ee,geometry:te,depth:[ot],index:ot,segment:[ut,ut]};this.rBush_.insert(te.getExtent(),dt)}}writeLineStringGeometry_(ee,te){const st=te.getCoordinates();for(let ot=0,ct=st.length-1;ot<ct;++ot){const ut=st.slice(ot,ot+2),dt={feature:ee,geometry:te,index:ot,segment:ut};this.rBush_.insert(boundingExtent(ut),dt)}}writeMultiLineStringGeometry_(ee,te){const st=te.getCoordinates();for(let ot=0,ct=st.length;ot<ct;++ot){const ut=st[ot];for(let dt=0,ht=ut.length-1;dt<ht;++dt){const ft=ut.slice(dt,dt+2),pt={feature:ee,geometry:te,depth:[ot],index:dt,segment:ft};this.rBush_.insert(boundingExtent(ft),pt)}}}writePolygonGeometry_(ee,te){const st=te.getCoordinates();for(let ot=0,ct=st.length;ot<ct;++ot){const ut=st[ot];for(let dt=0,ht=ut.length-1;dt<ht;++dt){const ft=ut.slice(dt,dt+2),pt={feature:ee,geometry:te,depth:[ot],index:dt,segment:ft};this.rBush_.insert(boundingExtent(ft),pt)}}}writeMultiPolygonGeometry_(ee,te){const st=te.getCoordinates();for(let ot=0,ct=st.length;ot<ct;++ot){const ut=st[ot];for(let dt=0,ht=ut.length;dt<ht;++dt){const ft=ut[dt];for(let pt=0,mt=ft.length-1;pt<mt;++pt){const yt=ft.slice(pt,pt+2),vt={feature:ee,geometry:te,depth:[dt,ot],index:pt,segment:yt};this.rBush_.insert(boundingExtent(yt),vt)}}}}writeCircleGeometry_(ee,te){const st=te.getCenter(),ot={feature:ee,geometry:te,index:CIRCLE_CENTER_INDEX,segment:[st,st]},ct={feature:ee,geometry:te,index:CIRCLE_CIRCUMFERENCE_INDEX,segment:[st,st]},ut=[ot,ct];ot.featureSegments=ut,ct.featureSegments=ut,this.rBush_.insert(createOrUpdateFromCoordinate(st),ot);let dt=te;this.rBush_.insert(dt.getExtent(),ct)}writeGeometryCollectionGeometry_(ee,te){const st=te.getGeometriesArray();for(let ot=0;ot<st.length;++ot){const ct=st[ot],ut=this.SEGMENT_WRITERS_[ct.getType()];ut(ee,ct)}}createOrUpdateVertexFeature_(ee,te,st,ot){let ct=this.vertexFeature_;return ct?ct.getGeometry().setCoordinates(ee):(ct=new Feature(new Point$1(ee)),this.vertexFeature_=ct,this.overlay_.getSource().addFeature(ct)),ct.set("features",te),ct.set("geometries",st),ct.set("existing",ot),ct}handleEvent(ee){if(!ee.originalEvent)return!0;this.lastPointerEvent_=ee;let te;return!ee.map.getView().getInteracting()&&ee.type==MapBrowserEventType.POINTERMOVE&&!this.handlingDownUpSequence&&this.handlePointerMove_(ee),this.vertexFeature_&&this.deleteCondition_(ee)&&(ee.type!=MapBrowserEventType.SINGLECLICK||!this.ignoreNextSingleClick_?te=this.removePoint():te=!0),ee.type==MapBrowserEventType.SINGLECLICK&&(this.ignoreNextSingleClick_=!1),super.handleEvent(ee)&&!te}findInsertVerticesAndUpdateDragSegments_(ee){if(this.handlePointerAtPixel_(ee),this.dragSegments_.length=0,this.featuresBeingModified_=null,!this.vertexFeature_)return;this.getMap().getView().getProjection();const st=[],ot=this.vertexFeature_.getGeometry().getCoordinates(),ct=boundingExtent([ot]),ut=this.rBush_.getInExtent(ct),dt={};ut.sort(compareIndexes);for(let ht=0,ft=ut.length;ht<ft;++ht){const pt=ut[ht],mt=pt.segment;let yt=getUid(pt.geometry);const vt=pt.depth;if(vt&&(yt+="-"+vt.join("-")),dt[yt]||(dt[yt]=new Array(2)),pt.geometry.getType()==="Circle"&&pt.index===CIRCLE_CIRCUMFERENCE_INDEX){const _t=closestOnSegmentData(ee,pt);this.coordinatesEqual_(_t,ot)&&!dt[yt][0]&&(this.dragSegments_.pu
76sh([pt,0]),dt[yt][0]=pt);continue}if(this.coordinatesEqual_(mt[0],ot)&&!dt[yt][0]){this.dragSegments_.push([pt,0]),dt[yt][0]=pt;continue}if(this.coordinatesEqual_(mt[1],ot)&&!dt[yt][1]){if(dt[yt][0]&&dt[yt][0].index===0){let _t=pt.geometry.getCoordinates();switch(pt.geometry.getType()){case"LineString":case"MultiLineString":continue;case"MultiPolygon":_t=_t[vt[1]];case"Polygon":if(pt.index!==_t[vt[0]].length-2)continue;break}}this.dragSegments_.push([pt,1]),dt[yt][1]=pt;continue}getUid(mt)in this.vertexSegments_&&!dt[yt][0]&&!dt[yt][1]&&st.push(pt)}return st}deactivateTrace_(){this.traceState_={active:!1}}tracePassesVertex_(ee,te){if(ee===te)return!1;if(ee<te){const ct=Math.ceil(ee);let ut=Math.floor(te);return ut===te&&(ut-=1),ct<=ut}const st=Math.floor(ee);let ot=Math.ceil(te);return ot===te&&(ot+=1),st>=ot}updateTrace_(ee){const te=this.traceState_;if(!te.active)return;if(te.targetIndex===-1){const dt=ee.map.getPixelFromCoordinate(te.startCoord);if(distance(dt,ee.pixel)<this.pixelTolerance_)return}const st=getTraceTargetUpdate(ee.coordinate,te,ee.map,this.pixelTolerance_);if(te.targetIndex===-1&&Math.sqrt(st.closestTargetDistance)/ee.map.getView().getResolution()>this.pixelTolerance_)return;let ot=!0;if(te.targetIndex===-1){const dt=te.targets[st.index];ot=this.tracePassesVertex_(dt.startIndex,st.endIndex)}if(ot){if(te.targetIndex!==st.index){if(te.targetIndex!==-1){const ht=te.targets[te.targetIndex];this.removeTracedCoordinates_(ht.startIndex,ht.endIndex)}const dt=te.targets[st.index];this.addTracedCoordinates_(dt,dt.startIndex,st.endIndex)}else{const dt=te.targets[te.targetIndex];this.addOrRemoveTracedCoordinates_(dt,st.endIndex)}te.targetIndex=st.index,te.targets[te.targetIndex].endIndex=st.endIndex}const ct=te.targets[st.index],ut=interpolateCoordinate(ct.coordinates,st.endIndex);for(const dt of this.dragSegments_)this.updateGeometry_(ut.slice(),dt);return ut}getTraceCandidates_(ee){const te=this.getMap(),st=this.pixelTolerance_,ot=te.getCoordinateFromPixel([ee.pixel[0]-st,ee.pixel[1]+st]),ct=te.getCoordinateFromPixel([ee.pixel[0]+st,ee.pixel[1]-st]),ut=boundingExtent([ot,ct]);return this.traceSource_.getFeaturesInExtent(ut)}
76toggleTraceState_(ee){if(!this.traceSource_||!this.traceCondition_(ee))return;if(this.traceState_.active){this.deactivateTrace_(),this.traceSegments_=null;return}const te=this.getTraceCandidates_(ee);if(te.length===0)return;const st=getTraceTargets(ee.coordinate,te);st.length&&(this.traceState_={active:!0,startCoord:ee.coordinate.slice(),targets:st,targetIndex:-1})}addOrRemoveTracedCoordinates_(ee,te){const st=ee.startIndex<=ee.endIndex,ot=ee.startIndex<=te;st===ot?st&&te>ee.endIndex||!st&&te<ee.endIndex?this.addTracedCoordinates_(ee,ee.endIndex,te):(st&&te<ee.endIndex||!st&&te>ee.endIndex)&&this.removeTracedCoordinates_(te,ee.endIndex):(this.removeTracedCoordinates_(ee.startIndex,ee.endIndex),this.addTracedCoordinates_(ee,ee.startIndex,te))}shiftTracedSegmentIndices_(ee,te,st){for(const ot of this.dragSegments_){const ct=ot[0];ct!==ee&&ct.geometry===ee.geometry&&(ct.depth===void 0||ee.depth===void 0||equals(ct.depth,ee.depth))&&ct.index>=te&&(ct.index+=st)}}removeTracedCoordinates_(ee,te){if(ee===te)return;let st=0;if(ee<te){const ot=Math.ceil(ee);let ct=Math.floor(te);ct===te&&(ct-=1),st=ct-ot+1}else{const ot=Math.floor(ee);let ct=Math.ceil(te);ct===te&&(ct+=1),st=ot-ct+1}if(st>0)for(const ot of this.traceSegments_){const ct=ot[0],ut=ct.geometry,dt=ot[1];let ht=ot[0].index+1;dt===1&&(ht-=st);const ft=ut.getCoordinates();getCoordinatesArray(ft,ut.getType(),ct.depth).splice(ht,st),this.setGeometryCoordinates_(ut,ft),this.shiftTracedSegmentIndices_(ct,ht+st,-st),dt===1&&(ct.index-=st)}}addTracedCoordinates_(ee,te,st){if(te===st)return;const ot=[];if(te<st){const ct=Math.ceil(te);let ut=Math.floor(st);ut===st&&(ut-=1);for(let dt=ct;dt<=ut;++dt)ot.push(getCoordinate(ee.coordinates,dt))}else{const ct=Math.floor(te);let ut=Math.ceil(st);ut===st&&(ut+=1);for(let dt=ct;dt>=ut;--dt)ot.push(getCoordinate(ee.coordinates,dt))}if(ot.length)for(const ct of this.traceSegments_){const ut=ct[0],dt=ut.geometry,ht=ct[1],ft=ut.index+1;ht===0&&ot.reverse();const pt=dt.getCoordinates();getCoordinatesArray(pt,dt.getType(),ut.depth).splice(ft,0,...ot),this.setGeometryCoordinates_(dt,pt),this.shiftTracedSegmentIndices_(ut,ft,ot.length),ht===1&&(ut.index+=ot.length)}}updateGeometry_(ee,te){const st=te[0],ot=st.depth;let ct;const ut=st.segment,dt=st.geometry,ht=te[1],ft=dt.getStride();for(let pt=2;pt<ft;++pt)ee[pt]=ut[ht][pt];switch(ee.length=ft,dt.getType()){case"Point":ct=ee,ut[0]=ee,ut[1]=ee;break;case"MultiPoint":ct=dt.getCoordinates(),ct[st.index]=ee,ut[0]=ee,ut[1]=ee;break;case"LineString":ct=dt.getCoordinates(),ct[st.index+ht]=ee,ut[ht]=ee;break;case"MultiLineString":ct=dt.getCoordinates(),ct[ot[0]][st.index+ht]=ee,ut[ht]=ee;break;case"Polygon":{ct=dt.getCoordinates();const mt=ct[ot[0]],yt=st.index+ht;mt[yt][0]===ee[0]&&mt[yt][1]===ee[1]?ct=null:(mt[yt]=ee,yt===0?mt[mt.length-1]=ee:yt===mt.length-1&&(mt[0]=ee)),ut[ht]=ee;break}case"MultiPolygon":{ct=dt.getCoordinates();const mt=ct[ot[1]][ot[0]],yt=st.index+ht;mt[yt][0]===ee[0]&&mt[yt][1]===ee[1]?ct=null:(mt[yt]=ee,yt===0?mt[mt.length-1]=ee:yt===mt.length-1&&(mt[0]=ee)),ut[ht]=ee;break}case"Circle":const pt=dt;if(ut[0]=ee,ut[1]=ee,st.index===CIRCLE_CENTER_INDEX)this.changingFeature_=!0,pt.setCenter(ee),this.changingFeature_=!1;else{this.changingFeature_=!0,this.getMap().getView().getProjection();let mt=distance(fromUserCoordinate(pt.getCenter()),fromUserCoordinate(ee));pt.setRadius(mt),this.changingFeature_=!1}break}ct&&this.setGeometryCoordinates_(dt,ct)}handleDragEvent(ee){this.ignoreNextSingleClick_=!1,this.willModifyFeatures_(ee,this.dragSegments_.map(([dt])=>dt));const te=[ee.coordinate[0]+this.delta_[0],ee.coordinate[1]+this.delta_[1]],st=[],ot=[],ct=this.traceState_.active&&!this.traceSegments_?this.traceState_.startCoord:null;if(ct){this.traceSegments_=[];for(const dt of this.dragSegments_){const ht=dt[0];distance(closestOnSegment(ct,ht.segment),ct)/ee.map.getView().getResolution()<1&&this.traceSegments_.push(dt)}this.traceSegments_.length>1&&(this.deactivateTrace_(),this.traceSegments_=null)}for(let dt=0,ht=this.dragSegments_.length;dt<ht;++dt){const ft=this.dragSegments_[dt],pt=ft[0],mt=pt.feature;st.includes(mt)||st.push(mt);const yt=pt.geometry;ot.includes(yt)||ot.push(yt),this.updateGeometry_(te,ft)}const ut=this.updateTrace_(ee);this.createOrUpdateVertexFeature_(ut||te,st,ot,!0)}handleDownEvent(ee){if(!this.condition_(ee))return!1;
76const te=ee.coordinate,st=this.findInsertVerticesAndUpdateDragSegments_(te);if(st!=null&&st.length&&this.insertVertexCondition_(ee)&&(this.willModifyFeatures_(ee,st),this.vertexFeature_)){const ot=this.vertexFeature_.getGeometry().getCoordinates();for(let ct=st.length-1;ct>=0;--ct)this.insertVertex_(st[ct],ot);this.ignoreNextSingleClick_=!0}return!!this.vertexFeature_}handleUpEvent(ee){const te=this.traceState_.active?new Set:null;for(let st=this.dragSegments_.length-1;st>=0;--st){const ot=this.dragSegments_[st][0];te&&te.add(ot.feature);const ct=ot.geometry;if(ct.getType()==="Circle"){const ut=ct,dt=ut.getCenter(),ht=ot.featureSegments[0],ft=ot.featureSegments[1];ht.segment[0]=dt,ht.segment[1]=dt,ft.segment[0]=dt,ft.segment[1]=dt,this.rBush_.update(createOrUpdateFromCoordinate(dt),ht);let pt=ut;this.rBush_.update(pt.getExtent(),ft)}else this.rBush_.update(boundingExtent(ot.segment),ot)}if(te)for(const st of te)this.removeFeature_(st),this.filter_(st)&&this.addFeature_(st);return this.featuresBeingModified_&&(this.toggleTraceState_(ee),this.dispatchEvent(new ModifyEvent(ModifyEventType.MODIFYEND,this.featuresBeingModified_,ee)),this.featuresBeingModified_=null),!1}handlePointerMove_(ee){this.lastCoordinate_=ee.coordinate,this.handlePointerAtPixel_(this.lastCoordinate_)}handlePointerAtPixel_(ee){const te=this.getMap(),st=te.getPixelFromCoordinate(ee);te.getView().getProjection();const ot=function(dt,ht){return projectedDistanceToSegmentDataSquared(ee,dt)-projectedDistanceToSegmentDataSquared(ee,ht)};let ct,ut;if(this.hitDetection_){const dt=typeof this.hitDetection_=="object"?ht=>ht===this.hitDetection_:void 0;te.forEachFeatureAtPixel(st,(ht,ft,pt)=>{pt&&pt.getType()==="Point"&&(pt=new Point$1(toUserCoordinate(pt.getCoordinates())));const mt=pt||ht.getGeometry();if(mt&&mt.getType()==="Point"&&ht instanceof Feature&&this.features_.includes(ht)){ut=mt;const yt=ht.getGeometry().getFlatCoordinates().slice(0,2);ct=[{feature:ht,geometry:ut,segment:[yt,yt]}]}return!0},{layerFilter:dt})}if(!ct){const dt=fromUserExtent(createOrUpdateFromCoordinate(ee,tempExtent)),ht=te.getView().getResolution()*this.pixelTolerance_,ft=toUserExtent(buffer(dt,ht,tempExtent));ct=this.rBush_.getInExtent(ft)}if(ct&&ct.length>0){const dt=ct.sort(ot)[0],ht=dt.segment;let ft=closestOnSegmentData(ee,dt);const pt=te.getPixelFromCoordinate(ft);let mt=distance(st,pt);if(ut||mt<=this.pixelTolerance_){const yt={};if(yt[getUid(ht)]=!0,this.snapToPointer_||(this.delta_[0]=ft[0]-ee[0],this.delta_[1]=ft[1]-ee[1]),dt.geometry.getType()==="Circle"&&dt.index===CIRCLE_CIRCUMFERENCE_INDEX)this.snappedToVertex_=!0,this.createOrUpdateVertexFeature_(ft,[dt.feature],[dt.geometry],this.snappedToVertex_);else{const vt=te.getPixelFromCoordinate(ht[0]),_t=te.getPixelFromCoordinate(ht[1]),bt=squaredDistance(pt,vt),xt=squaredDistance(pt,_t);if(mt=Math.sqrt(Math.min(bt,xt)),this.snappedToVertex_=mt<=this.pixelTolerance_,!this.snappedToVertex_&&!this.insertVertexCondition_(this.lastPointerEvent_)){this.vertexFeature_&&(this.overlay_.getSource().removeFeature(this.vertexFeature_),this.vertexFeature_=null);return}this.snappedToVertex_&&(ft=bt>xt?ht[1]:ht[0]),this.createOrUpdateVertexFeature_(ft,[dt.feature],[dt.geometry],this.snappedToVertex_);const Mt={};Mt[getUid(dt.geometry)]=!0;for(let Ot=1,kt=ct.length;Ot<kt;++Ot){const Nt=ct[Ot].segment;if(this.coordinatesEqual_(ht[0],Nt[0])&&this.coordinatesEqual_(ht[1],Nt[1])||this.coordinatesEqual_(ht[0],Nt[1])&&this.coordinatesEqual_(ht[1],Nt[0])){const Gt=getUid(ct[Ot].geometry);Gt in Mt||(Mt[Gt]=!0,yt[getUid(Nt)]=!0)}else break}}this.vertexSegments_=yt;return}}this.vertexFeature_&&(this.overlay_.getSource().removeFeature(this.vertexFeature_),this.vertexFeature_=null)}insertVertex_(ee,te){const st=ee.segment,ot=ee.feature,ct=ee.geometry,ut=ee.depth,dt=ee.index;let ht;for(;te.length<ct.getStride();)te.push(0);switch(ct.getType()){case"MultiLineString":ht=ct.getCoordinates(),ht[ut[0]].splice(dt+1,0,te);break;case"Polygon":ht=ct.getCoordinates(),ht[ut[0]].splice(dt+1,0,te);break;case"MultiPolygon":ht=ct.getCoordinates(),ht[ut[1]][ut[0]].splice(dt+1,0,te);break;case"LineString":ht=ct.getCoordinates(),ht.splice(dt+1,0,te);break;default:return!1}this.setGeometryCoordinates_(ct,ht);
76const ft=this.rBush_;ft.remove(ee),this.updateSegmentIndices_(ct,dt,ut,1);const pt={segment:[st[0],te],feature:ot,geometry:ct,depth:ut,index:dt};ft.insert(boundingExtent(pt.segment),pt),this.dragSegments_.push([pt,1]);const mt={segment:[te,st[1]],feature:ot,geometry:ct,depth:ut,index:dt+1};return ft.insert(boundingExtent(mt.segment),mt),this.dragSegments_.push([mt,0]),!0}updatePointer_(ee){var te;return ee&&this.findInsertVerticesAndUpdateDragSegments_(ee),(te=this.vertexFeature_)==null?void 0:te.getGeometry().getCoordinates()}getPoint(){var te;const ee=(te=this.vertexFeature_)==null?void 0:te.getGeometry().getCoordinates();return ee?toUserCoordinate(ee,this.getMap().getView().getProjection()):null}canRemovePoint(){if(!this.vertexFeature_||this.vertexFeature_.get("geometries").every(st=>st.getType()==="Circle"||st.getType().endsWith("Point")))return!1;const ee=this.vertexFeature_.getGeometry().getCoordinates();return this.rBush_.getInExtent(boundingExtent([ee])).some(({segment:st})=>this.coordinatesEqual_(st[0],ee)||this.coordinatesEqual_(st[1],ee))}removePoint(ee){if(ee&&(ee=fromUserCoordinate(ee,this.getMap().getView().getProjection()),this.updatePointer_(ee)),!this.lastPointerEvent_||this.lastPointerEvent_&&this.lastPointerEvent_.type!=MapBrowserEventType.POINTERDRAG){const te=this.lastPointerEvent_;this.willModifyFeatures_(te,this.dragSegments_.map(([ot])=>ot));const st=this.removeVertex_();return this.featuresBeingModified_&&this.dispatchEvent(new ModifyEvent(ModifyEventType.MODIFYEND,this.featuresBeingModified_,te)),this.featuresBeingModified_=null,st}return!1}removeVertex_(){const ee=this.dragSegments_,te={};let st=!1,ot,ct,ut,dt,ht,ft,pt,mt,yt,vt,_t;for(ht=ee.length-1;ht>=0;--ht)ut=ee[ht],vt=ut[0],_t=getUid(vt.feature),vt.depth&&(_t+="-"+vt.depth.join("-")),_t in te||(te[_t]={}),ut[1]===0?(te[_t].right=vt,te[_t].index=vt.index):ut[1]==1&&(te[_t].left=vt,te[_t].index=vt.index+1);for(_t in te){switch(yt=te[_t].right,pt=te[_t].left,ft=te[_t].index,mt=ft-1,pt!==void 0?vt=pt:vt=yt,mt<0&&(mt=0),dt=vt.geometry,ct=dt.getCoordinates(),ot=ct,st=!1,dt.getType()){case"MultiLineString":ct[vt.depth[0]].length>2&&(ct[vt.depth[0]].splice(ft,1),st=!0);break;case"LineString":ct.length>2&&(ct.splice(ft,1),st=!0);break;case"MultiPolygon":ot=ot[vt.depth[1]];case"Polygon":ot=ot[vt.depth[0]],ot.length>4&&(ft==ot.length-1&&(ft=0),ot.splice(ft,1),st=!0,ft===0&&(ot.pop(),ot.push(ot[0]),mt=ot.length-1));break}if(st){this.setGeometryCoordinates_(dt,ct);const bt=[];if(pt!==void 0&&(this.rBush_.remove(pt),bt.push(pt.segment[0])),yt!==void 0&&(this.rBush_.remove(yt),bt.push(yt.segment[1])),pt!==void 0&&yt!==void 0){const xt={depth:vt.depth,feature:vt.feature,geometry:vt.geometry,index:mt,segment:bt};this.rBush_.insert(boundingExtent(xt.segment),xt)}this.updateSegmentIndices_(dt,ft,vt.depth,-1),this.vertexFeature_&&(this.overlay_.getSource().removeFeature(this.vertexFeature_),this.vertexFeature_=null),ee.length=0}}return st}canInsertPoint(){if(!this.vertexFeature_||this.vertexFeature_.get("geometries").every(st=>st.getType()==="Circle"||st.getType().endsWith("Point")))return!1;const ee=this.vertexFeature_.getGeometry().getCoordinates();return this.rBush_.getInExtent(boundingExtent([ee])).some(({segment:st})=>!(this.coordinatesEqual_(st[0],ee)||this.coordinatesEqual_(st[1],ee)))}insertPoint(ee){var ot;const te=ee?fromUserCoordinate(ee,this.getMap().getView().getProjection()):(ot=this.vertexFeature_)==null?void 0:ot.getGeometry().getCoordinates();return te?this.findInsertVerticesAndUpdateDragSegments_(te).reduce((ct,ut)=>ct||this.insertVertex_(ut,te),!1):!1}setGeometryCoordinates_(ee,te){this.changingFeature_=!0,ee.setCoordinates(te),this.changingFeature_=!1}updateSegmentIndices_(ee,te,st,ot){this.rBush_.forEachInExtent(ee.getExtent(),function(ct){ct.geometry===ee&&(st===void 0||ct.depth===void 0||equals(ct.depth,st))&&ct.index>te&&(ct.index+=ot)})}disposeInternal(){if(super.disposeInternal(),this.featuresCollection_){this.featuresCollection_.removeEventListener(CollectionEventType.ADD,this.handleExternalCollectionAdd_),this.featuresCollection_.removeEventListener(CollectionEventType.REMOVE,this.handleExternalCollectionRemove_);for(const ee of this.featuresCollection_.getArray())ee.removeEventListener(EventType.CHANGE,this.handleFeatureChange_),this.filterFunctionWasSupplied_&&ee.removeEventListener(ObjectEventType.PROPERTYCHANGE,this.handleFeatureChange_)}else if(this.source_){this.source_.removeEventListener(VectorEventType.ADDFEATURE,this.handleSourceAdd_),this.source_.removeEventListener(VectorEventType.REMOVE
76FEATURE,this.handleSourceRemove_);for(const ee of this.source_.getFeatures())ee.removeEventListener(EventType.CHANGE,this.handleFeatureChange_),this.filterFunctionWasSupplied_&&ee.removeEventListener(ObjectEventType.PROPERTYCHANGE,this.handleFeatureChange_)}}}function compareIndexes(ne,ee){return ne.index-ee.index}function projectedDistanceToSegmentDataSquared(ne,ee,te){const st=ee.geometry;if(st.getType()==="Circle"){let ct=st;if(ee.index===CIRCLE_CIRCUMFERENCE_INDEX){const ut=squaredDistance(ct.getCenter(),fromUserCoordinate(ne)),dt=Math.sqrt(ut)-ct.getRadius();return dt*dt}}const ot=fromUserCoordinate(ne);return tempSegment[0]=fromUserCoordinate(ee.segment[0]),tempSegment[1]=fromUserCoordinate(ee.segment[1]),squaredDistanceToSegment(ot,tempSegment)}function closestOnSegmentData(ne,ee,te){const st=ee.geometry;if(st.getType()==="Circle"&&ee.index===CIRCLE_CIRCUMFERENCE_INDEX)return toUserCoordinate(st.getClosestPoint(fromUserCoordinate(ne)));const ot=fromUserCoordinate(ne);return tempSegment[0]=fromUserCoordinate(ee.segment[0]),tempSegment[1]=fromUserCoordinate(ee.segment[1]),toUserCoordinate(closestOnSegment(ot,tempSegment))}function getDefaultStyleFunction$1(){const ne=createEditingStyle();return function(ee,te){return ne.Point}}const SelectEventType={SELECT:"select"};class SelectEvent extends BaseEvent{constructor(ee,te,st,ot){super(ee),this.selected=te,this.deselected=st,this.mapBrowserEvent=ot}}const originalFeatureStyles={};class Select extends Interaction{constructor(ee){super(),this.on,this.once,this.un,ee=ee||{},this.boundAddFeature_=this.addFeature_.bind(this),this.boundRemoveFeature_=this.removeFeature_.bind(this),this.condition_=ee.condition?ee.condition:singleClick,this.addCondition_=ee.addCondition?ee.addCondition:never,this.removeCondition_=ee.removeCondition?ee.removeCondition:never,this.toggleCondition_=ee.toggleCondition?ee.toggleCondition:shiftKeyOnly,this.multi_=ee.multi?ee.multi:!1,this.filter_=ee.filter?ee.filter:TRUE,this.hitTolerance_=ee.hitTolerance?ee.hitTolerance:0,this.style_=ee.style!==void 0?ee.style:getDefaultStyleFunction(),this.features_=ee.features||new Collection;let te;if(ee.layers)if(typeof ee.layers=="function")te=ee.layers;else{const st=ee.layers;te=function(ot){return st.includes(ot)}}else te=TRUE;this.layerFilter_=te,this.featureLayerAssociation_={}}addFeatureLayerAssociation_(ee,te){this.featureLayerAssociation_[getUid(ee)]=te}getFeatures(){return this.features_}getHitTolerance(){return this.hitTolerance_}getLayer(ee){return this.featureLayerAssociation_[getUid(ee)]}setHitTolerance(ee){this.hitTolerance_=ee}setMap(ee){this.getMap()&&this.style_&&this.features_.forEach(this.restorePreviousStyle_.bind(this)),super.setMap(ee),ee?(this.features_.addEventListener(CollectionEventType.ADD,this.boundAddFeature_),this.features_.addEventListener(CollectionEventType.REMOVE,this.boundRemoveFeature_),this.style_&&this.features_.forEach(this.applySelectedStyle_.bind(this))):(this.features_.removeEventListener(CollectionEventType.ADD,this.boundAddFeature_),this.features_.removeEventListener(CollectionEventType.REMOVE,this.boundRemoveFeature_))}addFeature_(ee){const te=ee.element;if(this.style_&&this.applySelectedStyle_(te),!this.getLayer(te)){const st=this.findLayerOfFeature_(te);st&&this.addFeatureLayerAssociation_(te,st)}}removeFeature_(ee){this.style_&&this.restorePreviousStyle_(ee.element),this.removeFeatureLayerAssociation_(ee.element)}findLayerOfFeature_(ee){return this.getMap().getAllLayers().find(function(st){if(st instanceof VectorLayer&&st.getSource()&&st.getSource().hasFeature(ee))return st})}getStyle(){return this.style_}applySelectedStyle_(ee){const te=getUid(ee);te in originalFeatureStyles||(originalFeatureStyles[te]=ee.getStyle()),ee.setStyle(this.style_)}restorePreviousStyle_(ee){const te=this.getMap().getInteractions().getArray();for(let ot=te.length-1;ot>=0;--ot){const ct=te[ot];if(ct!==this&&ct instanceof Select&&ct.getStyle()&&ct.getFeatures().getArray().lastIndexOf(ee)!==-1){ee.setStyle(ct.getStyle());return}}const st=getUid(ee);ee.setStyle(originalFeatureStyles[st]),delete originalFeatureStyles[st]}removeFeatureLayerAssociation_(ee){delete this.featureLayerAssociation_[getUid(ee)]}
76selectFeature(ee){const te=this.findLayerOfFeature_(ee);if(!this.layerFilter_(te)||!this.filter_(ee,te))return!1;const st=this.getFeatures();return st.getArray().includes(ee)?!1:(this.addFeatureLayerAssociation_(ee,te),st.push(ee),this.dispatchEvent(new SelectEvent(SelectEventType.SELECT,[ee],[],void 0)),!0)}deselectFeature(ee){const te=this.getFeatures(),st=te.getArray().indexOf(ee);return st===-1?!1:(te.removeAt(st),this.dispatchEvent(new SelectEvent(SelectEventType.SELECT,[],[ee],void 0)),!0)}toggleFeature(ee){this.deselectFeature(ee)||this.selectFeature(ee)}clearSelection(){const ee=this.getFeatures();if(ee.getLength()!==0){const te=ee.getArray().slice();ee.clear(),this.dispatchEvent(new SelectEvent(SelectEventType.SELECT,[],te,void 0))}}handleEvent(ee){if(!this.condition_(ee))return!0;const te=this.addCondition_(ee),st=this.removeCondition_(ee),ot=this.toggleCondition_(ee),ct=!te&&!st&&!ot,ut=ee.map,dt=this.getFeatures(),ht=[],ft=[];if(ct){ut.forEachFeatureAtPixel(ee.pixel,(pt,mt)=>{if(!(!(pt instanceof Feature)||!this.filter_(pt,mt)))return this.addFeatureLayerAssociation_(pt,mt),ft.push(pt),!this.multi_},{layerFilter:this.layerFilter_,hitTolerance:this.hitTolerance_});for(let pt=dt.getLength()-1;pt>=0;--pt){const mt=dt.item(pt),yt=ft.indexOf(mt);yt===-1?(dt.removeAt(pt),ht.push(mt)):ft.splice(yt,1)}ft.length!==0&&dt.extend(ft)}else{ut.forEachFeatureAtPixel(ee.pixel,(pt,mt)=>{if(!(pt instanceof Feature)||!this.filter_(pt,mt))return;const yt=dt.getArray().includes(pt);return yt&&(st||ot)?ht.push(pt):!yt&&(te||ot)&&(this.addFeatureLayerAssociation_(pt,mt),ft.push(pt)),!this.multi_},{layerFilter:this.layerFilter_,hitTolerance:this.hitTolerance_});for(let pt=ht.length-1;pt>=0;--pt)dt.remove(ht[pt]);dt.extend(ft)}return(ft.length>0||ht.length>0)&&this.dispatchEvent(new SelectEvent(SelectEventType.SELECT,ft,ht,ee)),!0}}function getDefaultStyleFunction(){const ne=createEditingStyle();return extend$3(ne.Polygon,ne.LineString),extend$3(ne.GeometryCollection,ne.LineString),function(ee){return ee.getGeometry()?ne[ee.getGeometry().getType()]:null}}var loglevel$1={exports:{}},loglevel=loglevel$1.exports,hasRequiredLoglevel;function requireLoglevel(){return hasRequiredLoglevel||(hasRequiredLoglevel=1,(function(ne){(function(ee,te){ne.exports?ne.exports=te():ee.log=te()})(loglevel,function(){var ee=function(){},te="undefined",st=typeof window!==te&&typeof window.navigator!==te&&/Trident\/|MSIE /.test(window.navigator.userAgent),ot=["trace","debug","info","warn","error"],ct={},ut=null;function dt(bt,xt){var Mt=bt[xt];if(typeof Mt.bind=="function")return Mt.bind(bt);try{return Function.prototype.bind.call(Mt,bt)}catch{return function(){return Function.prototype.apply.apply(Mt,[bt,arguments])}}}function ht(){console.log&&(console.log.apply?console.log.apply(console,arguments):Function.prototype.apply.apply(console.log,[console,arguments])),console.trace&&console.trace()}function ft(bt){return bt==="debug"&&(bt="log"),typeof console===te?!1:bt==="trace"&&st?ht:console[bt]!==void 0?dt(console,bt):console.log!==void 0?dt(console,"log"):ee}function pt(){for(var bt=this.getLevel(),xt=0;xt<ot.length;xt++){var Mt=ot[xt];this[Mt]=xt<bt?ee:this.methodFactory(Mt,bt,this.name)}if(this.log=this.debug,typeof console===te&&bt<this.levels.SILENT)return"No console available for logging"}function mt(bt){return function(){typeof console!==te&&(pt.call(this),this[bt].apply(this,arguments))}}function yt(bt,xt,Mt){return ft(bt)||mt.apply(this,arguments)}function vt(bt,xt){var Mt=this,Ot,kt,Nt,Gt="loglevel";typeof bt=="string"?Gt+=":"+bt:typeof bt=="symbol"&&(Gt=void 0);function Bt(jt){var Wt=(ot[jt]||"silent").toUpperCase();if(!(typeof window===te||!Gt)){try{window.localStorage[Gt]=Wt;return}catch{}try{window.document.cookie=encodeURIComponent(Gt)+"="+Wt+";"}catch{}}}function Ut(){var jt;if(!(typeof window===te||!Gt)){try{jt=window.localStorage[Gt]}catch{}if(typeof jt===te)try{var Wt=window.document.cookie,Jt=encodeURIComponent(Gt),Qt=Wt.indexOf(Jt+"=");Qt!==-1&&(jt=/^([^;]+)/.exec(Wt.slice(Qt+Jt.length+1))[1])}catch{}return Mt.levels[jt]===void 0&&(jt=void 0),jt}}function Vt(){if(!(typeof window===te||!Gt)){try{window.localStorage.removeItem(Gt)}catch{}try{window.document.cookie=encodeURIComponent(Gt)+"=; expires=Thu, 01 Jan 1970 00:00:00 UTC"}catch{}}}function Ht(jt){var Wt=jt;if(typeof Wt=="string"&&Mt.levels[Wt.toUpperCase()]!==void 0&&(Wt=Mt.levels[Wt.toUpperCase()]),typeof Wt=="number"&&Wt>=0&&Wt<=Mt.levels.SILENT)return Wt;
76throw new TypeError("log.setLevel() called with invalid level: "+jt)}Mt.name=bt,Mt.levels={TRACE:0,DEBUG:1,INFO:2,WARN:3,ERROR:4,SILENT:5},Mt.methodFactory=xt||yt,Mt.getLevel=function(){return Nt??kt??Ot},Mt.setLevel=function(jt,Wt){return Nt=Ht(jt),Wt!==!1&&Bt(Nt),pt.call(Mt)},Mt.setDefaultLevel=function(jt){kt=Ht(jt),Ut()||Mt.setLevel(jt,!1)},Mt.resetLevel=function(){Nt=null,Vt(),pt.call(Mt)},Mt.enableAll=function(jt){Mt.setLevel(Mt.levels.TRACE,jt)},Mt.disableAll=function(jt){Mt.setLevel(Mt.levels.SILENT,jt)},Mt.rebuild=function(){if(ut!==Mt&&(Ot=Ht(ut.getLevel())),pt.call(Mt),ut===Mt)for(var jt in ct)ct[jt].rebuild()},Ot=Ht(ut?ut.getLevel():"WARN");var zt=Ut();zt!=null&&(Nt=Ht(zt)),pt.call(Mt)}ut=new vt,ut.getLogger=function(xt){if(typeof xt!="symbol"&&typeof xt!="string"||xt==="")throw new TypeError("You must supply a name when creating a logger.");var Mt=ct[xt];return Mt||(Mt=ct[xt]=new vt(xt,ut.methodFactory)),Mt};var _t=typeof window!==te?window.log:void 0;return ut.noConflict=function(){return typeof window!==te&&window.log===ut&&(window.log=_t),ut},ut.getLoggers=function(){return ct},ut.default=ut,ut})})(loglevel$1)),loglevel$1.exports}var loglevelExports=requireLoglevel(),LoggerByDefault$1={getLogger:function(ne){if(typeof ee>"u"){var ee={};ee.env={VERBOSE:!1}}ee.env.VERBOSE?loglevelExports.enableAll():loglevelExports.disableAll();var te=ne||"default";return loglevelExports.getLogger(te)}},MessagesResources={PARAM_MISSING:"Parameter(s) '%var%' missing",PARAM_EMPTY:"Parameter(s) '%var%' empty",PARAM_TYPE:"Wrong type(s) for parameter(s) '%var%'",PARAM_FORMAT:"Parameter(s) '%var%' not correctly formatted",PARAM_NOT_SUPPORT:"Value(s) for parameter(s) '%var%' not supported",PARAM_NOT_SUPPORT_NODEJS:"Value(s) for parameter(s) '%var%' not supported to NodeJS",PARAM_UNKNOWN:"Value(s) for parameter(s) '%var%' unknown",SERVICE_REQUEST_BUILD:"An error occurred during the request building of the service",SERVICE_REQUEST_EMPTY:"The request sent to the service is empty",SERVICE_RESPONSE_EXCEPTION:"The service returned an exception : '%var%'",SERVICE_RESPONSE_EXCEPTION_2:"The service returned an exception",SERVICE_RESPONSE_ANALYSE:"An error occurred while parsing the response '%var%' of the service",SERVICE_RESPONSE_ANALYSE_2:"An unknown error occurred while parsing the response",SERVICE_RESPONSE_EMPTY:"The response of the service is empty",SERVICE_RESPONSE_EMPTY_2:"The response from the service could not be analyzed or is empty",SERVICE_RESPONSE_FORMAT:"The format of the service response is not supported (handled format(s) : '%var%')",SERVICE_RESPONSE_FORMAT_2:"The format of the service response is not supported",SERVICE_RESPONSE_FORMAT_3:"No suggestion matching the search",CLASS_CONSTRUCTOR:"'%var%' constructor cannot be called as a function.",getMessage:function(ne,ee){if(Object.keys(arguments).length===0)return"Message indefined !";var te=Array.prototype.slice.call(arguments),st=te.shift(),ot=te,ct=this[st];try{Array.isArray(ot)&&ot.length>0?ct=ct.replace("%var%",ot.join(" - ")):ct=ct.replace("%var%","%var% (not specified)")}catch{}return ct}},Helper$1={normalyzeParameters:function(ne){var ee=null;if(ne){var te=[];for(var st in ne)if(ne.hasOwnProperty(st)){var ot=ne[st];ot||(ot=""),te.push(st+"="+ot)}ee=te.join("&")}return ee},normalyzeUrl:function(ne,ee,te){var st=ne;if(ne){if(ne.split("?").length-1>=2){var ot=ne.search(/\?/)+1;st=ne.substring(0,ot)+ne.slice(ot).replace(/\?/g,"&")}var ct=ne.indexOf("?");ct===-1&&(st+="?"),ct!==-1&&ct!==ne.length-1&&(st+="&")}return ee&&(typeof ee=="string"?(ee=ee.replace("?",""),st+=ee):st+=this.normalyzeParameters(ee)),te&&(st=encodeURIComponent(st)),st},indent:function(ne,ee){var te=ne||0;return new Array(te+1).join("	")+ee}};function commonjsRequire(ne){throw new Error('Could not dynamically require "'+ne+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var es6Promise$1={exports:{}};/*!
77 * @overview es6-promise - a tiny implementation of Promises/A+.
78 * @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald)
79 * @license   Licensed under MIT license
80 *            See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE
81 * @version   v4.2.8+1e68dce6
82 */var es6Promise=es6Promise$1.exports,hasRequiredEs6Promise;function requireEs6Promise(){return hasRequiredEs6Promise||(hasRequiredEs6Promise=1,(function(ne,ee){(function(te,st){ne.exports=st()})(es6Promise,(function(){function te(kn){var er=typeof kn;return kn!==null&&(er==="object"||er==="function")}function st(kn){return typeof kn=="function"}var ot=void 0;Array.isArray?ot=Array.isArray:ot=function(kn){return Object.prototype.toString.call(kn)==="[object Array]"};var ct=ot,ut=0,dt=void 0,ht=void 0,ft=function(er,Tn){Bt[ut]=er,Bt[ut+1]=Tn,ut+=2,ut===2&&(ht?ht(Ut):Ht())};function pt(kn){ht=kn}function mt(kn){ft=kn}var yt=typeof window<"u"?window:void 0,vt=yt||{},_t=vt.MutationObserver||vt.WebKitMutationObserver,bt=typeof self>"u"&&typeof process<"u"&&{}.toString.call(process)==="[object process]",xt=typeof Uint8ClampedArray<"u"&&typeof importScripts<"u"&&typeof MessageChannel<"u";function Mt(){return function(){return process.nextTick(Ut)}}function Ot(){return typeof dt<"u"?function(){dt(Ut)}:Gt()}function kt(){var kn=0,er=new _t(Ut),Tn=document.createTextNode("");return er.observe(Tn,{characterData:!0}
82),function(){Tn.data=kn=++kn%2}}function Nt(){var kn=new MessageChannel;return kn.port1.onmessage=Ut,function(){return kn.port2.postMessage(0)}}function Gt(){var kn=setTimeout;return function(){return kn(Ut,1)}}var Bt=new Array(1e3);function Ut(){for(var kn=0;kn<ut;kn+=2){var er=Bt[kn],Tn=Bt[kn+1];er(Tn),Bt[kn]=void 0,Bt[kn+1]=void 0}ut=0}function Vt(){try{var kn=Function("return this")().require("vertx");return dt=kn.runOnLoop||kn.runOnContext,Ot()}catch{return Gt()}}var Ht=void 0;bt?Ht=Mt():_t?Ht=kt():xt?Ht=Nt():yt===void 0&&typeof commonjsRequire=="function"?Ht=Vt():Ht=Gt();function zt(kn,er){var Tn=this,Dn=new this.constructor(Jt);Dn[Wt]===void 0&&Yt(Dn);var $n=Tn._state;if($n){var jn=arguments[$n-1];ft(function(){return Ln($n,Dn,jn,Tn._result)})}else ni(Tn,Dn,kn,er);return Dn}function jt(kn){var er=this;if(kn&&typeof kn=="object"&&kn.constructor===er)return kn;var Tn=new er(Jt);return ti(Tn,kn),Tn}var Wt=Math.random().toString(36).substring(2);function Jt(){}var Qt=void 0,oi=1,ai=2;function xn(){return new TypeError("You cannot resolve a promise with itself")}function An(){return new TypeError("A promises callback cannot return that same promise.")}function Nn(kn,er,Tn,Dn){try{kn.call(er,Tn,Dn)}catch($n){return $n}}function Xt(kn,er,Tn){ft(function(Dn){var $n=!1,jn=Nn(Tn,er,function(zn){$n||($n=!0,er!==zn?ti(Dn,zn):ii(Dn,zn))},function(zn){$n||($n=!0,wn(Dn,zn))},"Settle: "+(Dn._label||" unknown promise"));!$n&&jn&&($n=!0,wn(Dn,jn))},kn)}function Zt(kn,er){er._state===oi?ii(kn,er._result):er._state===ai?wn(kn,er._result):ni(er,void 0,function(Tn){return ti(kn,Tn)},function(Tn){return wn(kn,Tn)})}function Kt(kn,er,Tn){er.constructor===kn.constructor&&Tn===zt&&er.constructor.resolve===jt?Zt(kn,er):Tn===void 0?ii(kn,er):st(Tn)?Xt(kn,er,Tn):ii(kn,er)}function ti(kn,er){if(kn===er)wn(kn,xn());else if(te(er)){var Tn=void 0;try{Tn=er.then}catch(Dn){wn(kn,Dn);return}Kt(kn,er,Tn)}else ii(kn,er)}function qt(kn){kn._onerror&&kn._onerror(kn._result),Cn(kn)}function ii(kn,er){kn._state===Qt&&(kn._result=er,kn._state=oi,kn._subscribers.length!==0&&ft(Cn,kn))}function wn(kn,er){kn._state===Qt&&(kn._state=ai,kn._result=er,ft(qt,kn))}function ni(kn,er,Tn,Dn){var $n=kn._subscribers,jn=$n.length;kn._onerror=null,$n[jn]=er,$n[jn+oi]=Tn,$n[jn+ai]=Dn,jn===0&&kn._state&&ft(Cn,kn)}function Cn(kn){var er=kn._subscribers,Tn=kn._state;if(er.length!==0){for(var Dn=void 0,$n=void 0,jn=kn._result,zn=0;zn<er.length;zn+=3)Dn=er[zn],$n=er[zn+Tn],Dn?Ln(Tn,Dn,$n,jn):$n(jn);kn._subscribers.length=0}}function Ln(kn,er,Tn,Dn){var $n=st(Tn),jn=void 0,zn=void 0,Jn=!0;if($n){try{jn=Tn(Dn)}catch(rs){Jn=!1,zn=rs}if(er===jn){wn(er,An());return}}else jn=Dn;er._state!==Qt||($n&&Jn?ti(er,jn):Jn===!1?wn(er,zn):kn===oi?ii(er,jn):kn===ai&&wn(er,jn))}function Un(kn,er){try{er(function(Dn){ti(kn,Dn)},function(Dn){wn(kn,Dn)})}catch(Tn){wn(kn,Tn)}}var Pn=0;function Mn(){return Pn++}function Yt(kn){kn[Wt]=Pn++,kn._state=void 0,kn._result=void 0,kn._subscribers=[]}function ri(){return new Error("Array Methods must be provided an Array")}var Sn=(function(){function kn(er,Tn){this._instanceConstructor=er,this.promise=new er(Jt),this.promise[Wt]||Yt(this.promise),ct(Tn)?(this.length=Tn.length,this._remaining=Tn.length,this._result=new Array(this.length),this.length===0?ii(this.promise,this._result):(this.length=this.length||0,this._enumerate(Tn),this._remaining===0&&ii(this.promise,this._result))):wn(this.promise,ri())}return kn.prototype._enumerate=function(Tn){for(var Dn=0;this._state===Qt&&Dn<Tn.length;Dn++)this._eachEntry(Tn[Dn],Dn)},kn.prototype._eachEntry=function(Tn,Dn){var $n=this._instanceConstructor,jn=$n.resolve;if(jn===jt){var zn=void 0,Jn=void 0,rs=!1;try{zn=Tn.then}catch(ls){rs=!0,Jn=ls}if(zn===zt&&Tn._state!==Qt)this._settledAt(Tn._state,Dn,Tn._result);else if(typeof zn!="function")this._remaining--,this._result[Dn]=Tn;else if($n===Gn){var os=new $n(Jt);rs?wn(os,Jn):Kt(os,Tn,zn),this._willSettleAt(os,Dn)}else this._willSettleAt(new $n(function(ls){return ls(Tn)}),Dn)}else this._willSettleAt(jn(Tn),Dn)},kn.prototype._settledAt=function(Tn,Dn,$n){var jn=this.promise;jn._state===Qt&&(this._remaining--,Tn===ai?wn(jn,$n):this._result[Dn]=$n),this._remaining===0&&ii(jn,this._result)},kn.prototype._willSettleAt=function(Tn,Dn){var $n=this;ni(Tn,void 0,function(jn){return $n._settledAt(oi,Dn,jn)},function(jn){return $n._settledAt(ai,Dn,jn)})},kn})();function On(kn){return new Sn(this,kn).promise}function Rn(kn){var er=this;return ct(kn)?new er(function(Tn,Dn){for(var $n=kn.length,jn=0;jn<$n;jn++)er.resolve(kn[jn]).then(Tn,Dn)}):new er(function(Tn,Dn){return Dn(new TypeError("You must pass an array to race."))})}function Bn(kn){var er=this,Tn=new er(Jt);return wn(Tn,kn),Tn}function Vn(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}function Wn(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object c
82onstructor cannot be called as a function.")}var Gn=(function(){function kn(er){this[Wt]=Mn(),this._result=this._state=void 0,this._subscribers=[],Jt!==er&&(typeof er!="function"&&Vn(),this instanceof kn?Un(this,er):Wn())}return kn.prototype.catch=function(Tn){return this.then(null,Tn)},kn.prototype.finally=function(Tn){var Dn=this,$n=Dn.constructor;return st(Tn)?Dn.then(function(jn){return $n.resolve(Tn()).then(function(){return jn})},function(jn){return $n.resolve(Tn()).then(function(){throw jn})}):Dn.then(Tn,Tn)},kn})();Gn.prototype.then=zt,Gn.all=On,Gn.race=Rn,Gn.resolve=jt,Gn.reject=Bn,Gn._setScheduler=pt,Gn._setAsap=mt,Gn._asap=ft;function Hn(){var kn=void 0;if(typeof commonjsGlobal<"u")kn=commonjsGlobal;else if(typeof self<"u")kn=self;else try{kn=Function("return this")()}catch{throw new Error("polyfill failed because global object is unavailable in this environment")}var er=kn.Promise;if(er){var Tn=null;try{Tn=Object.prototype.toString.call(er.resolve())}catch{}if(Tn==="[object Promise]"&&!er.cast)return}kn.Promise=Gn}return Gn.polyfill=Hn,Gn.Promise=Gn,Gn}))})(es6Promise$1)),es6Promise$1.exports}var es6PromiseExports=requireEs6Promise();const ES6Promise=getDefaultExportFromCjs(es6PromiseExports);var XHR={call:function(ne){var ee=LoggerByDefault$1.getLogger("XHR");if(ee.trace("[XHR::call()]"),ES6Promise.polyfill(),!ne.url)throw new Error("missing parameter : url is not defined !");if(!ne.method)throw new Error("missing parameter : method is not defined !");ne.format||(ne.format="text");var te={};switch(te.url=ne.url,te.data=ne.data?ne.data:null,te.method=ne.method,te.timeOut=ne.timeOut||0,te.scope=ne.scope||this,te.proxy=ne.proxy||null,te.content=ne.content||null,te.headers=ne.headers||{referer:"http://localhost"},ne.method){case"DELETE":case"GET":break;case"PUT":case"POST":te.content=ne.content?ne.content:"application/x-www-form-urlencoded",te.headers=ne.headers?ne.headers:{referer:"http://localhost"};break;case"HEAD":case"OPTIONS":throw new Error("HTTP method not yet supported !");default:throw new Error("HTTP method unknown !")}switch(ne.format){case"text":this.__call(te).then(function(st){ee.trace(st),ne.onResponse.call(this,st)}).catch(function(st){ne.onFailure.call(this,st)});break;case"json":this.__callJSON(te).then(function(st){ee.trace(st),ne.onResponse.call(this,st)}).catch(function(st){ne.onFailure.call(this,st)});break;case"xml":this.__callXML(te).then(function(st){ee.trace(st),ne.onResponse.call(this,st)}).catch(function(st){ne.onFailure.call(this,st)});break;default:throw new Error("This output Format is not yet supported !")}},__call:function(ne){var ee=LoggerByDefault$1.getLogger("XHR");ee.trace("[XHR::__call()]");var te=new Promise(function(st,ot){var ct=ne.method==="POST"||ne.method==="PUT"?1:0;ne.data&&(typeof ne.data=="object"&&Object.keys(ne.data).length||typeof ne.data=="string"&&ne.data.length)&&!ct&&(ne.url=Helper$1.normalyzeUrl(ne.url,ne.data)),ee.trace("URL = ",ne.url);var ut=null;if(typeof window>"u"){var dt=require("node-fetch"),ht={headers:{Referer:"https://localhost"}};return ne.data&&typeof ne.data=="string"&&ct&&(ht={method:ne.method,body:ne.data,headers:{"Content-Type":ne.content,Referer:"https://localhost"}}),dt(ne.url,ht).then(function(yt){if(yt.ok)st(yt.text());else{var vt="Errors Occured on Http Request (status : '"+yt.statusText+"' | url : '"+yt.url+"')",_t=yt.status;ot({message:vt,status:_t})}}).catch(function(yt){ot({message:yt,status:-1})})}else if(window.XMLHttpRequest){ee.trace("XMLHttpRequest"),ut=new XMLHttpRequest,ut.open(ne.method,ne.url,!0),ut.overrideMimeType=ne.content;var ft=null;ne.timeOut>0&&(ee.trace("XHR - TimeOut actif !"),ft=window.setTimeout(function(){var yt="TimeOut Occured on Http Request with XMLHttpRequest !";ot({message:yt,status:-1})},ne.timeOut)),ct&&(ee.trace("data = ",ne.data),ut.setRequestHeader("Content-type",ne.content)),ut.onerror=function(yt){console.log(yt),ot(new Error("Errors Occured on Http Request with XMLHttpRequest !"))},ut.ontimeout=function(yt){console.log(yt),ot(new Error("TimeOut Occured on Http Request with XMLHttpRequest !"))},ut.onreadystatechange=function(yt){if(ut.readyState===4)if(ut.status===200)window.clearTimeout(ft),st(ut.response);else{var vt="Errors Occured on Http Request (status : '"+yt.target.statusText+"' | url : '"+yt.target.responseURL+"' | response : '"+yt.target.response+"')",_t=yt.target.status;ot({message:vt,status:_t})}};var pt=ne.data&&ct?ne.data:null;ut.send(pt)}else if(window.XDomainRequest){ee.trace("XDomainRequest"),ut=new XDomainRequest,ut.open(ne.method,ne.url),ut.overrideMimeType=ne.content,ne.timeOut>0&&(ut.timeout=ne.timeout,ee.trace("XHR - TimeOut actif !")),ct&&ut.setRequestHeader("Content-type",ne.content),ut.onerror=function(){ot(new Error("Errors Occured on Http Request with XMLHttpRequest !"))},ut.ontimeout=function(){ot(new Error("TimeOut Occured on Http Request with XMLHttpRequest !"))},ut.onload=function(yt){if(ut.status===200)st(ut.responseText);else{var vt="Errors Occured on Http Request (status : '"+yt.target.statusText+"' | url : '"+yt.target.responseURL+"')",_t=yt.target.status;ot({message:vt,status:_t})}};var mt=ne.data&&ct?ne.data:null;ut.send(mt)}else throw new Error("CORS not supported")});return te},__callJSON:function(ne){return this.__call(ne).then(JSON.parse).catch(function(ee){console.log("_callJSON failed on : ",ne.url,ee)})},__callXML:function(ne){return this.__call(ne).then(function(ee){var te;if(typeof window>"u"){var st=require("@xmldom/xmldom").DOMParser;te=new st().parseFromString(ee,"text/xml")}else if(window.DOMParser){var ot=new window.DOMParser;te=ot.parseFromString(ee,"text/xml")}else te=new window.ActiveXObject("Microsoft.XMLDOM"),te.async=!1,te.loadXML(ee);return te}).catch(function(ee){console.log("__callXML failed on : ",ne.url,ee)})}},JSONP={uuid:(function(){var ne=Math.floor(Date.now());return function(){return ne++}})(),call:function(ne){var ee=LoggerByDefault$1.getLogger("JSONP");
82if(ee.trace("[JSONP::call ()]"),!ne)throw ee.error("missing parameter : options !"),new Error("missing parameter : options !");if(!ne.url)throw ee.error("missing parameter : options.url !"),new Error("missing parameter : options.url !");if(ne.timeOut||(ee.info("setting 'options.timeOut' default value"),ne.timeOut=0),!ne.onResponse)throw ee.error("missing parameter : options.onResponse !"),new Error("missing parameter : options.onResponse !");var te=typeof ne.callbackSuffix=="string"?ne.callbackSuffix:this.uuid(),st=!1,ot=!1,ct=ne.url.indexOf("callback=");if(ct!==-1){st=!0;var ut=ne.url.indexOf("&",ct);ut===-1&&(ut=ne.url.length);var dt=ne.url.substring(ct+9,ut);dt&&(ot=!0,ne.callbackName=dt,ee.info("setting 'options.callbackName' value ("+ne.callbackName+") from 'options.url' parameter"))}if(!st){var ht=ne.url.indexOf("?");ht===-1?ne.url=ne.url+"?callback=":ht===ne.url.length?ne.url=ne.url+"callback=":ne.url=ne.url+"&callback=",ee.info("setting callback default key in 'options.url' : "+ne.url)}var ft=ne.callbackName?!0:ot;if(ot||(ne.callbackName||(ee.info("setting 'options.callbackName' default value"),ne.callbackName="callback",(te||te==="")&&(ne.callbackName+=te)),ne.url=ne.url.replace("callback=","callback="+ne.callbackName),ee.info("setting callback function name in 'options.url' : "+ne.url)),ne.onTimeOut||(ee.info("setting 'options.onTimeOut' default value"),ne.onTimeOut=function(){console.log("TimeOut while invoking url : "+ne.url)}),!ft){var pt=this,mt=null;ne.timeOut>0&&(mt=window.setTimeout(function(){window[ne.callbackName]=function(){},ne.onTimeOut(),pt._deleteScript(te)},ne.timeOut)),window[ne.callbackName]=function(yt){window.clearTimeout(mt),ne.onResponse(yt),pt._deleteScript(te)}}this._createScript(te,ne.url)},_createScript:function(ne,ee){var te,st=document.getElementById("results"+ne);te=document.createElement("script"),te.setAttribute("type","text/javascript"),te.setAttribute("src",ee),te.setAttribute("charset","UTF-8"),te.setAttribute("id","results"+ne),te.setAttribute("async","true");var ot=document.documentElement||document.getElementsByTagName("head")[0];st===null?ot.appendChild(te):ot.replaceChild(te,st)},_deleteScript:function(ne){var ee=document.getElementById("results"+ne);if(ee){var te=ee.parentNode||document.documentElement;if(!te)return;te.removeChild(ee)}}},Protocol={send:function(ne){var ee=ne||{method:"GET",protocol:"XHR",timeOut:0,format:null,wrap:!0,nocache:!0,output:"json",callback:null,callbackSuffix:null};if(typeof window>"u"&&ne.protocol==="JSONP"){console.log("Value (s) for parameter (s) 'protocol=JSONP (instead use XHR)' not supported to NodeJS");return}if(ne.protocol==="XHR"||ne.format==="json"?ee.wrap=!1:ne.protocol==="JSONP"&&ne.format==="xml"&&(ee.wrap=!0),ee.callback=null,ee.output=ee.wrap?"json":null,ee.wrap){var te={};te.output=ee.output,te.callback=ee.callback,delete te.callback,ee.url=Helper$1.normalyzeUrl(ne.url,te)}switch(ee.protocol){case"XHR":ne.method==="GET"&&ne.nocache&&(ee.url=Helper$1.normalyzeUrl(ee.url,{t:new Date().getTime()})),XHR.call(ee);break;case"JSONP":ee.data&&(ee.url=Helper$1.normalyzeUrl(ee.url,ee.data)),JSONP.call(ee);break;default:throw new Error("protocol not supported (XHR|JSONP) !")}}};function ErrorService(ne){if(!(this instanceof ErrorService))throw new TypeError("ErrorService constructor cannot be called as a function.");var ee=ne;typeof ne=="string"||ne instanceof String?(this.message=ne,this.status=-1,this.type=ErrorService.TYPE_UNKERR):(this.message=ee.message||"undefined!?",this.type=ee.type,this.status=ee.status||-1),this.name="ErrorService",this.stack=new Error().stack}ErrorService.TYPE_SRVERR="SERVICE_ERROR";ErrorService.TYPE_USEERR="USAGE_ERROR";ErrorService.TYPE_UNKERR="UNKNOWN_ERROR";ErrorService.prototype=Object.create(Error.prototype,{constructor:{value:ErrorService,writable:!0,configurable:!0}});const version$1="3.4.6",date="19/12/2024",Pkg={version:version$1,date};function CommonService(ne){if(!(this instanceof CommonService))throw new TypeError(MessagesResources.getMessage("CLASS_CONSTRUCTOR"));this.logger=LoggerByDefault$1.getLogger("CommonService"),this.logger.trace("[Constructeur CommonService (options)]"),this.options={protocol:"XHR",ssl:!0,proxyURL:"",callbackSuffix:null,httpMethod:"GET",timeOut:0,rawResponse:!1,scope:this,onSuccess:function(st){console.log("onSuccess - la reponse est la suivante : ",st)},onFailure:function(st){st.status===200||!st.status?console.log("onFailure : ",st.message):console.log("onFailure - Erreur (",st.status,") : ",st.message)}};for(var ee in ne)ne.hasOwnProperty(ee)&&(this.options[ee]=ne[ee]);this.options.rawResponse&&!this.options.onSuccess&&(this.options.onSuccess=function(st){console.log("onSuccess - la réponse brute du service est la suivante : ",st)});var te=this.options.onSuccess!==null&&typeof this.options.onSuccess=="function";if(!te)throw new Error(MessagesResources.getMessage("PARAM_MISSING","onSuccess()"));switch(this.options.httpMethod=typeof ne.httpMethod=="string"?ne.httpMethod.toUpperCase():"GET",this.options.httpMethod){case"POST":case"GET":break;case"PUT":case"DELETE":case"HEAD":case"OPTIONS":throw new Error(MessagesResources.getMessage("PARAM_NOT_SUPPORT","httpMethod"));default:throw new Error(MessagesResources.getMessage("PARAM_UNKNOWN","httpMethod"))}switch(this.options.protocol=typeof ne.protocol=="string"?ne.protocol.toUpperCase():"XHR",this.options.protocol){case"JSONP":case"XHR":break;default:throw new Error(MessagesResources.getMessage("PARAM_UNKNOWN","protocol"))}if(typeof window>"u"&&this.options.protocol==="JSONP")throw new Error(MessagesResources.getMessage("PARAM_NOT_SUPPORT_NODEJS","protocol=JSONP (instead use XHR)"));this.options.protocol==="JSONP"&&(this.options.httpMethod="GET"),this.options.nocache=ne.nocache||!1,this.options.outputFormat=null,this.request=null,this.response=null}CommonService.prototype={constructor:CommonService,call:function(){this.logger.trace("CommonService::call ()");var ne=this;function ee(){this.logger.trace("CommonService::run ()"),this.buildRequest.call(ne,ct,te)}ee.call(ne);function te(ut){this.logger.trace("CommonService::onBuildRequest : ",ut),this.callService.call(ne,ct,st)}function st(ut){this.logger.trace("CommonService::onCallService : ",ut),this.analyzeResponse.call(ne,ct,ot)}function ot(ut){if(this.logger.trace("CommonService::onAnalyzeResponse : ",ut),ut)this.options.onSuccess.call(this,ut);else return ct.call(this,new ErrorService("Analyse de la reponse en échec !?"))}function ct(ut){this.logger.trace("CommonService::onError()");var dt=ut;dt instanceof ErrorService||(dt=new ErrorService(ut.message)),this.options.onFailure.call(this,dt)}},buildRequest:function(ne,ee){this.logger.error("overwritten method !"),ne&&ne.call(this,"This method must be overwritten !"),ee.call(this,"This method must be overwritten !")},callService:function(ne,ee){var te=null,st=this.request,ot=!!(this.options.proxyURL&&this.options.protocol==="XHR"),ct={"gp-access-lib":Pkg.version};this.options.apiKey&&(ct.apiKey=this.options.apiKey),this.options.serverUrl=Helper$1.normalyzeUrl(this.options.serverUrl,ct,!1),ot&&(this.options.httpMethod==="GET"&&(te=this.options.proxyURL+Helper$1.normalyzeUrl(this.options.serverUrl,this.request,!0),st=null),this.options.httpMethod==="POST"&&(te=this.options.proxyURL+Helper$1.normalyzeUrl(this.options.serverUrl,null,!0),st=this.request));var ut=this,dt={url:te||this.options.serverUrl,method:this.options.httpMethod,protocol:this.options.protocol,timeOut:this.options.timeOut||0,format:this.options.outputFormat,nocache:this.options.nocache||!1,wrap:this.options.protocol!=="XHR",callbackSuffix:this.options.callbackSuffix,data:st,headers:null,content:this.options.contentType||"application/xml",scope:this.options.scope||this,onResponse:function(ht){ut.logger.trace("callService::onResponse()");var ft=null;if(ut.options.protocol==="XHR"&&(ut.logger.trace("Response XHR",ht),ft=ht),ut.options.protocol==="JSONP")if(ut.logger.trace("Response JSON",ht),ht)if(ht.http)if(ht.http.status!==200){ne.call(ut,new ErrorService({status:ht.http.status,message:ht.http.error,type:ErrorService.TYPE_SRVERR}));return}else ft=ht.xml,ut.options.rawResponse&&(ft=ht);else ft=ht;else{ne.call(ut,new ErrorService("Le contenu de la reponse est vide !?"));return}if(typeof ut.options.onBeforeParse=="function"){var pt=ut.options.onBeforeParse(ft);typeof pt=="string"&&(ft=pt)}ut.response=ft,ee.call(ut,ft)},onFailure:function(ht){ut.logger.trace("callService::onFailure()"),ht.type=ErrorService.TYPE_SRVERR,ne.call(ut,new ErrorService(ht))},onTimeOut:function(){ut.logger.trace("callService::onTimeOut()"),ne.call(ut,new ErrorService("TimeOut!"))}};Protocol.send(dt)},analyzeResponse:function(ne,ee){this.logger.error("overwritten method !"),ne&&ne.call(this,"This method must be overwritten !"),ee.call(this,"This method must be overwritten !")}};var DefaultUrlService={ssl:!0,newUrl:function(ne){var ee="data.geopf.fr",te;return DefaultUrlService.ssl===!1?te="http://":te="https://",te+ee+ne},Alti:{new_key:{"elevation-json":"/altimetrie/1.0/calcul/alti/rest/elevation.json","elevation-xml":"/altimetrie/1.0/calcul/alti/rest/elevation.xml","profil-json":"/altimetrie/1.0/calcul/alti/rest/elevationLine.json","profil-xml":"/altimetrie/1.0/calcul/alti/rest/elevationLine.xml"},newUrl:function(){return{"elevation-json":DefaultUrlService.newUrl(this.new_key["elevation-json"]),"elevation-xml":DefaultUrlService.newUrl(this.new_key["elevation-xml"]),"profil-json":DefaultUrlService.newUrl(this.new_key["profil-json"]),"profil-xml":DefaultUrlService.newUrl(this.new_key["profil-xml"])}}},ProcessIsoCurve:{new_key:"/navigation/isochrone",newUrl:function(){return DefaultUrlService.newUrl(this.new_key)}},Config:{_key:"https://raw.githubusercontent.com/IGNF/geoportal-configuration/new-url/dist/",url:function(ne){Array.isArray(ne)||(ne=ne.split(","));for(var ee=[],te=0;te<ne.length;te++)ee[te]=this._key+ne[te]+"Config.json";return ee}},AutoComplete:{new_key:"/geocodage/completion",newUrl:function(){return DefaultUrlService.newUrl(this.new_key)}},ReverseGeocode:{new_key:"/geocodage/reverse",newUrl:function(){return DefaultUrlService.newUrl(this.new_key)}},Geocode:{new_key:"/geocodage/search",newUrl:function(){return DefaultUrlService.newUrl(this.new_key)}},Route:{new_key:"/navigation/itineraire",newUrl:function(){return DefaultUrlService.newUrl(this.new_key)}}};function ConfigInterface(){if(!(this instanceof ConfigInterface))throw new TypeError("ConfigInterface constructor cannot be called as a function.");this.generalOptions={apiKeys:{},title:null,defaultGMLGFIStyle:null,theme:null,wgs84Resolutions:[]},this.layers={},this.tileMatrixSets={}}ConfigInterface.prototype={constructor:ConfigInterface,isKeyConfLoaded:function(ne){if(ne)return!!this.generalOptions.apiKeys[ne]},getLayersId:function(ne){return this.generalOptions.apiKeys[ne]},getLayerId:function(ne,ee){if(!(!ne||!ee)){var te=null;if(this.layers){var st=this.layers;for(var ot in st)if(st.hasOwnProperty(ot)){var ct=ot.split("$");if(ne===ct[0]&&ct[1]){var ut=ct[1].split(":"),dt=ct[1].split(";");if(dt[1]===ee.toUpperCase()){te=ot;break}if(ut[2]===ee.toUpperCase()){te=ot;break}}}}if(te)return te}},getLayersConf:function(ne){var ee={},te=this.getLayersId(ne);if(te)for(var st=0;st<te.length;st++){var ot=te[st];ee[ot]=this.layers[ot]}return ee},getLayerConf:function(ne){if(this.layers)return this.layers[ne]},getLayerParams:function(ne,ee){var te={};
82if((ee==="WMS"||Object.keys(this.tileMatrixSets).length!==0)&&Object.keys(this.layers).length!==0){var st=this.getLayerId(ne,ee);if(st){var ot=this.getLayerConf(st),ct=this.getLayerKey(st);if(ct.length===0)return;for(var ut=0;ut<ct.length;ut++)ot.serviceParams.serverUrl[ct[ut]]&&(te.url=ot.serviceParams.serverUrl[ct[ut]]);if(ee!=="WFS"&&(/\/v\//.test(te.url)?te.styles=" ":te.styles=ot.styles[0].name),te.version=ot.serviceParams.version,te.format=ot.formats&&ot.formats.length?ot.formats[0].name:"",te.projection=ot.defaultProjection,te.minScale=ot.globalConstraint.minScaleDenominator,te.maxScale=ot.globalConstraint.maxScaleDenominator,te.extent=ot.globalConstraint.bbox,te.legends=ot.legends,te.title=ot.title,te.description=ot.description,ee==="WMS"&&(te.metadata=ot.metadata),ot.wmtsOptions){te.tileMatrixSetLimits=ot.wmtsOptions.tileMatrixSetLimits;var dt=ot.wmtsOptions.tileMatrixSetLink;if(dt){te.TMSLink=dt;var ht=this.getTMSConf(dt);te.matrixIds=Object.keys(ht.tileMatrices),te.tileMatrices=ht.tileMatrices,te.nativeResolutions=ht.nativeResolutions||this.getTMSConf("PM").nativeResolutions}}}}return te},getLayerKey:function(ne){var ee=[];if(this.generalOptions&&this.generalOptions.apiKeys&&Object.keys(this.generalOptions.apiKeys).length!==0){var te=this.generalOptions.apiKeys;for(var st in te){var ot=te[st];ot.forEach(function(ct){ct===ne&&ee.push(st)})}}return ee},getTileMatrixSets:function(){return this.tileMatrixSets},getTMSConf:function(ne){if(this.tileMatrixSets)return this.tileMatrixSets[ne]},getGlobalConstraints:function(ne){var ee={};if(ne){var te=this.getLayerConf(ne);ee.projection=te.defaultProjection,ee.minScale=te.globalConstraint.minScaleDenominator,ee.maxScale=te.globalConstraint.maxScaleDenominator,ee.extent=te.globalConstraint.bbox}return ee}};function Config$1(ne){if(!(this instanceof Config$1))throw new TypeError(MessagesResources.getMessage("CLASS_CONSTRUCTOR","Config"));this.CLASSNAME="Config",this.logger=LoggerByDefault$1.getLogger("Gp.Config"),this.logger.trace("[Constructeur Config (options)]");var ee=ne.onSuccess!==null&&typeof ne.onSuccess=="function";if(!ee)throw new Error(MessagesResources.getMessage("PARAM_MISSING","onSuccess()"));!ne.apiKey&&!ne.customConfigFile&&(ne.apiKey="full"),this.options={},this.options.onSuccess=ne.onSuccess,this.options.onFailure=ne.onFailure,this.options.sync=ne.sync||!1,this.options.listConfigUrls=ne.customConfigFile?[ne.customConfigFile]:Array.isArray(ne.apiKey)?DefaultUrlService.Config.url(ne.apiKey):DefaultUrlService.Config.url(ne.apiKey.split(","))}Config$1.prototype=Object.create(CommonService.prototype,{});Config$1.prototype.constructor=Config$1;Config$1.prototype.buildRequest=function(ne,ee){if(this.listConfigUrls=this.options.listConfigUrls,!this.listConfigUrls){ne.call(this,new Error("url by default not found !"));return}ee.call(this,this.listConfigUrls)};Config$1.prototype.callService=function(ne,ee){this.options.sync?__callServiceSync.call(this,ne,ee):__callService.call(this,ne,ee)};var __callService=function(ne,ee){this.listConfigResults=[];let te=null;if(typeof window>"u"){var st=require("node-fetch");te=st}else te=window.fetch;var ot=ut=>te(ut,{credentials:"same-origin"}).then(dt=>{if(dt.ok)return dt.json().then(ht=>ht).catch(ht=>{throw new Error("Exception Json : "+ht)});throw new Error("Exception HTTP : "+dt.status+" (status code) !")}).catch(dt=>new Promise((ht,ft)=>{ft(dt)})),ct=[];for(let ut=0;ut<this.listConfigUrls.length;ut++){const dt=this.listConfigUrls[ut];ct.push(ot(dt))}Promise.all(ct).then(ut=>{if(!ut)throw new Error("results config empty !?");ut.forEach(dt=>{this.listConfigResults.push(dt)})}).then(()=>{ee.call(this,this.listConfigResults)}).catch(ut=>{ne.call(this,ut)})},__callServiceSync=function(ne,ee){this.listConfigResults=[];for(var te=0;te<this.listConfigUrls.length;te++){const ot=this.listConfigUrls[te],ct=new XMLHttpRequest;if(ct.open("GET",ot,!1),ct.send(null),ct.status===200){var st=JSON.parse(ct.responseText);this.listConfigResults.push(st)}}this.listConfigResults.length!==0?ee.call(this,this.listConfigResults):ne.call(this,new Error("..."))};
82Config$1.prototype.analyzeResponse=function(ne,ee){var te=function(dt){for(var ht={},ft={},pt={},mt=0;mt<dt.length;mt++){if(!dt[mt].generalOptions||!dt[mt].layers)return;ft={...ft,...dt[mt].generalOptions.apiKeys},ht={...ht,...dt[mt].layers},pt={...pt,...dt[mt].tileMatrixSets}}var yt={generalOptions:{apiKeys:ft},layers:ht,tileMatrixSets:pt};return yt},st=te(this.listConfigResults);if(!st){ne.call(this,new Error("configuration structure not conforme !"));return}var ot=new ConfigInterface;Object.assign(ot,st);var ct=typeof window<"u"?window:{};if(ct.Gp||(ct.Gp={}),ct.Gp.Config){Object.assign(ct.Gp.Config,ot);for(var ut in ot)ct.Gp.Config[ut]=ot[ut]}else ct.Gp.Config=ot;ee.call(this,ct.Gp.Config)};function AltiRequest(ne){if(!(this instanceof AltiRequest))throw new TypeError("AltiRequest constructor cannot be called as a function.");this.logger=LoggerByDefault$1.getLogger(),this.logger.trace("[Constructeur AltiRequest ()]"),this.options=ne||{},this.positions=this.options.positions||[],this.delimiter=this.options.delimiter||"|",this.indent=this.options.indent||!1,this.crs=this.options.crs||"CRS:84",this.format=this.options.format||"json",this.resource=this.options.resource,this.measures=this.options.measures||!1}AltiRequest.CLASSNAME="AltiRequest";AltiRequest.prototype={constructor:AltiRequest,setPositions:function(ne){for(var ee=[],te=0;te<ne.length;te++){var st=ne[te];st.lon&&st.lat&&ee.push(st)}this.positions=ee},getPositions:function(ne){if(!ne)return this.positions;var ee=this.positions.length-1;return ne>ee||ne<ee?(this.logger.warn("index out of range !"),this.positions):this.positions[ne]},addPositions:function(ne){for(var ee=0;ee<ne.length;ee++){var te=ne[ee];te.lon&&te.lat&&this.positions.push(ne[ee])}},getLon:function(){for(var ne=[],ee=0;ee<this.positions.length;ee++)ne.push(this.positions[ee].lon);return this.logger.trace(ne),ne.join(this.delimiter)},getLat:function(){for(var ne=[],ee=0;ee<this.positions.length;ee++)ne.push(this.positions[ee].lat);return this.logger.trace(ne),ne.join(this.delimiter)}};AltiRequest.prototype.getData=function(){var ne=[];return ne.push({k:"lon",v:this.getLon()}),ne.push({k:"lat",v:this.getLat()}),ne.push({k:"delimiter",v:this.delimiter}),ne.push({k:"indent",v:this.indent}),ne.push({k:"crs",v:this.crs}),ne.push({k:"format",v:this.format}),ne};function AltiElevationRequest(ne){if(!(this instanceof AltiElevationRequest))throw new TypeError("AltiElevationRequest constructor cannot be called as a function.");this.CLASSNAME="AltiElevationRequest",AltiRequest.apply(this,arguments),this.logger=LoggerByDefault$1.getLogger(),this.logger.trace("[Constructeur AltiElevationRequest ()]"),this.zonly=this.options.zonly||!1}AltiElevationRequest.prototype=Object.create(AltiRequest.prototype,{zonly:{get:function(){return this._zonly},set:function(ne){this._zonly=ne}}});AltiElevationRequest.prototype.constructor=AltiElevationRequest;AltiElevationRequest.prototype.getData=function(){var ne=[];return ne.push({k:"lon",v:this.getLon()}),ne.push({k:"lat",v:this.getLat()}),ne.push({k:"indent",v:this.indent}),ne.push({k:"crs",v:this.crs}),ne.push({k:"zonly",v:this.zonly}),ne.push({k:"format",v:this.format}),ne.push({k:"resource",v:this.resource}),ne};function AltiProfilRequest(ne){if(!(this instanceof AltiProfilRequest))throw new TypeError("AltiProfilRequest constructor cannot be called as a function.");this.CLASSNAME="AltiProfilRequest",AltiRequest.apply(this,arguments),this.logger=LoggerByDefault$1.getLogger(),this.logger.trace("[Constructeur AltiProfilRequest ()]"),this.sampling=this.options.sampling||3}AltiProfilRequest.prototype=Object.create(AltiRequest.prototype,{sampling:{get:function(){return this._sampling},set:function(ne){this._sampling=ne}}});AltiProfilRequest.prototype.constructor=AltiProfilRequest;AltiProfilRequest.prototype.getData=function(){var ne=[];return ne.push({k:"lon",v:this.getLon()}),ne.push({k:"lat",v:this.getLat()}),ne.push({k:"indent",v:this.indent}),ne.push({k:"crs",v:this.crs}),ne.push({k:"sampling",v:this.sampling}),ne.push({k:"format",v:this.format}),ne.push({k:"resource",v:this.resource}),ne};function AltiRequestREST(ne){if(this.logger=LoggerByDefault$1.getLogger("AltiRequestREST"),this.logger.trace("[Constructeur AltiRequestREST ()]"),!(this instanceof AltiRequestREST))throw new TypeError("AltiRequestREST constructor cannot be called as a function.");
82if(this.options=ne||{},!this.options)throw new Error(MessagesResources.getMessage("PARAM_EMPTY","options"));if(!this.options.type)throw new Error(MessagesResources.getMessage("PARAM_EMPTY","type (Elevation or Profil)"));switch(this.DataObject=null,this.options.type){case"Elevation":this.DataObject=new AltiElevationRequest(this.options.param);break;case"Profil":this.DataObject=new AltiProfilRequest(this.options.param);break;default:throw new Error(MessagesResources.getMessage("PARAM_TYPE","type (Elevation or Profil)"))}this.method=this.options.method||"GET"}AltiRequestREST.prototype={requestString:null,constructor:AltiRequestREST,template:{get:{value:"lon=__LON__&lat=__LAT__&indent=__INDENT__&crs='__CRS__'&resource=__RESOURCE__&measures=__MEASURES__",input:{point:"&zonly=__ZONLY__",profil:"&sampling=__SAMPLING__"}},post:{value:`lon=__LON__
83lat=__LAT__
84indent=__INDENT__
85crs='__CRS__'
86resource='__RESOURCE__'
87measures='__MEASURES__'
88`,input:{point:`zonly=__ZONLY__
89`,profil:"sampling=__SAMPLING__"}}},processRequestString:function(){this.logger.trace("AltiRequestREST::processRequestString ()");var ne="";return this.method==="POST"?ne=this.template.post.value:this.method==="GET"&&(ne=this.template.get.value),ne=ne.replace(/__LON__/g,this.DataObject.getLon()),ne=ne.replace(/__LAT__/g,this.DataObject.getLat()),ne=ne.replace(/__INDENT__/g,this.DataObject.indent),ne=ne.replace(/__CRS__/g,this.DataObject.crs),ne=ne.replace(/__RESOURCE__/g,this.DataObject.resource),ne=ne.replace(/__MEASURES__/g,this.DataObject.measures),ne=ne+this.__addDataInputs(),this.logger.trace("traduction tmpl",ne),this.requestString=ne,this.requestString},__addDataInputs:function(){this.logger.trace("AltiRequestREST::addDataInput ()");var ne;if(this.method==="POST")ne=this.template.post;else if(this.method==="GET")ne=this.template.get;else throw new Error("No other HTTP method supported by the service !");var ee=null;if(this.DataObject.CLASSNAME==="AltiElevationRequest")return ee=ne.input.point,ee.replace(/__ZONLY__/g,this.DataObject.zonly.toString());if(this.DataObject.CLASSNAME==="AltiProfilRequest")return ee=ne.input.profil,ee.replace(/__SAMPLING__/g,this.DataObject.
89sampling);throw new Error("No other object supported than elevation or profil !?")}};function WPS(ne){if(this.logger=LoggerByDefault$1.getLogger(),this.logger.trace("[Constructeur WPS()]"),!(this instanceof WPS))throw new TypeError("WPS constructor cannot be called as a function.");if(this.options=ne||{},this.DataObject=this.options.data,!this.DataObject)throw new TypeError("This data object is not defined !");this.paramservice=this.options.param.service||"WPS",this.paramversion=this.options.param.version||"1.0.0",this.paramidentifier=this.options.param.identifier||"gs:WPS",this.paramrawdataoutput=this.options.param.rawdataoutput||"result",this.paramrequest=this.options.param.request||"Execute",this.method=this.options.method||"GET"}WPS.prototype={requestString:null,constructor:WPS,template:{get:{value:"service=__SERVICE__&version=__VERSION__&rawdataoutput=__RAWDATAOUTPUT__&identifier=__IDENTIFIER__&request=__REQUEST__&datainputs=<!-- __DATAINPUTS__ -->",input:"__KEY__=__DATA__"},post:{value:'<?xml version="1.0" encoding="UTF-8"?><wps:__REQUEST__ version="__VERSION__" service="__SERVICE__" __NAMESPACE__ __SCHEMALOCATION__><ows:Identifier>__IDENTIFIER__</ows:Identifier><wps:DataInputs><!-- __DATAINPUTS__ --></wps:DataInputs><wps:ResponseForm><wps:RawDataOutput><ows:Identifier>__RAWDATAOUTPUT__</ows:Identifier></wps:RawDataOutput></wps:ResponseForm></wps:__REQUEST__>',input:"<wps:Input><ows:Identifier>__KEY__</ows:Identifier><wps:Data><wps:LiteralData>__DATA__</wps:LiteralData></wps:Data></wps:Input>"}},namespaceByDefault:function(){var ne=['xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"','xmlns="http://www.opengis.net/wps/1.0.0"','xmlns:wfs="http://www.opengis.net/wfs"','xmlns:wps="http://www.opengis.net/wps/1.0.0"','xmlns:ows="http://www.opengis.net/ows/1.1"','xmlns:gml="http://www.opengis.net/gml"','xmlns:ogc="http://www.opengis.net/ogc"','xmlns:wcs="http://www.opengis.net/wcs/1.1.1"','xmlns:xlink="http://www.w3.org/1999/xlink"'];return ne.join(" ")},schemaLocationByDefault:function(){return'xsi:schemaLocation="http://www.opengis.net/wps/1.0.0 http://schemas.opengis.net/wps/1.0.0/wpsAll.xsd"'},processRequestString:function(){this.logger.trace("WPS::processRequestString ()");var ne="";if(this.method==="POST")ne=this.template.post.value;else if(this.method==="GET")ne=this.template.get.value;else return this.logger.error("No other method supported by the service !"),!1;return ne=ne.replace(/__SERVICE__/g,this.paramservice),ne=ne.replace(/__VERSION__/g,this.paramversion),ne=ne.replace(/__RAWDATAOUTPUT__/g,this.paramrawdataoutput),ne=ne.replace(/__IDENTIFIER__/g,this.paramidentifier),ne=ne.replace(/__REQUEST__/g,this.paramrequest),this.method==="POST"&&(ne=ne.replace(/__NAMESPACE__/g,this.namespaceByDefault),ne=ne.replace(/__SCHEMALOCATION__/g,this.schemaLocationByDefault)),ne=ne.replace(/<!-- __DATAINPUTS__ -->/g,this.__addDataInputs()),ne?(this.requestString=ne,this.logger.trace("traduction tmpl",ne),!0):(this.logger.warn("traduction tmpl : empty request !?"),!1)},__addDataInputs:function(){this.logger.trace("WPS::__addDataInputs ()");for(var ne=this.method==="GET"?this.template.get.input:this.template.post.input,ee=this.method==="GET"?";":"",te="",st=this,ot=this.DataObject.getData(),ct=0;ct<ot.length;ct++)(function(ut){ee&&(ee=ut===ot.length-1?"":";"),te=te.concat(st.__addDataInput(ne,ot[ut].k,ot[ut].v),ee)})(ct);return te},__addDataInput:function(ne,ee,te){var st=ne;return st=st.replace(/__KEY__/g,ee),st=st.replace(/__DATA__/g,te),st},setMethod:function(ne){ne==="GET"||ne==="POST"?this.method=ne:this.logger.warn("support only GET and POST method !")},getMethod:function(){return this.method}};var AltiRequestWPS={build:function(ne){var ee=LoggerByDefault$1.getLogger("AltiRequestWPS");if(ee.trace(["AltiRequestWPS::build()"]),!ne)throw new Error(MessagesResources.getMessage("PARAM_EMPTY","options"));if(!ne.type)throw new Error(MessagesResources.getMessage("PARAM_EMPTY","type (Elevation or Profil)"));var te=null;switch(ne.type){case"Elevation":ne.wps.identifier="gs:WPSElevation",te=new AltiElevationRequest(ne.param);break;case"Profil":ne.wps.identifier="gs:WPSLineElevation",te=new AltiProfilRequest
89(ne.param);break;default:throw new Error(MessagesResources.getMessage("PARAM_TYPE","type (Elevation or Profil)"))}var st={data:te,method:ne.method,param:ne.wps},ot=new WPS(st);if(!ot.processRequestString())throw new Error("Enable to process request !");return ot.requestString}},AltiRequestFactory={build:function(ne){var ee=LoggerByDefault$1.getLogger("AltiRequestFactory");ee.trace(["AltiRequestFactory::build()"]);var te=null,st={type:ne.sampling?"Profil":"Elevation",method:ne.httpMethod,param:{positions:null,delimiter:null,indent:null,crs:null,format:null,sampling:null,zonly:null,measures:null}};st.param.positions=ne.positions,st.param.format=ne.outputFormat,st.param.sampling=ne.sampling,st.param.zonly=ne.zonly,st.param.measures=ne.measures,st.param.resource=ne.resource;var ot=ne.onError!==null&&typeof ne.onError=="function",ct=ne.onSuccess!==null&&typeof ne.onSuccess=="function",ut=null;switch(ne.api){case"REST":var dt=new AltiRequestREST(st);if(!dt.processRequestString()){if(ut="Error in process request (rest) !",ot){ne.onError.call(ne.scope,new ErrorService(ut));return}throw new Error(ut)}te=dt.requestString;break;case"WPS":if(st.wps={service:null,version:null,identifier:null,rawdataoutput:null,request:null},te=AltiRequestWPS.build(st),!te){if(ut="Error in process request (wps) !",ot){ne.onError.call(ne.scope,new ErrorService(ut));return}throw new Error(ut)}break;default:if(ut="Type of API is not supported by service (REST or WPS) !",ot){ne.onError.call(ne.scope,new ErrorService(ut));return}throw new Error(ut)}return ct&&ne.onSuccess.call(ne.scope,te),te}};function XML$1(ne){if(!(this instanceof XML$1))throw new TypeError("XML constructor cannot be called as a function.");this.logger=LoggerByDefault$1.getLogger(),this.logger.trace("[Constructeur XML ()]"),this.xmlString=null,this.xmlDoc=null,this.reader=null,ne&&(ne.xmlString&&typeof ne.xmlString=="string"&&(this.xmlString=ne.xmlString,this.xmlDoc=__getXMLDOC(ne.xmlString)),ne.reader&&this.setReader(ne.reader))}XML$1.prototype={constructor:XML$1,getXMLString:function(){return this.xmlString},setXMLString:function(ne){ne&&typeof ne=="string"&&(this.xmlString=ne,this.xmlDoc=__getXMLDOC(ne))},getReader:function(){return this.reader},setReader:function(ne){ne&&ne.read&&typeof ne.read=="function"&&(this.reader=ne)},getXMLDoc:function(){return this.xmlDoc},setXMLDoc:function(ne){this.xmlDoc=ne},parse:function(){if(!this.xmlDoc&&this.xmlString&&(this.xmlDoc=__getXMLDOC(this.xmlString)),this.xmlDoc){var ne=__getRootNode(this.xmlDoc);if(ne){var ee;return this.reader&&this.reader.read?ee=this.reader.read(ne):(ee={},ee[ne.nodeName]=__readDefault(ne)),ee}else return{}}}};function __getXMLDOC(ne){if(typeof window>"u"){var ee=require("@xmldom/xmldom").DOMParser;return new ee().parseFromString(ne,"text/xml")}else{var te,st,ot="Erreur lors du parsing de la réponse du service : XML non conforme";if(window.ActiveXObject){st=new window.ActiveXObject("Microsoft.XMLDOM"),st.async=!1,st.loadXML(ne);var ct=st.parseError;if(ct.errorCode)throw ct.line&&ct.linepos&&(ot+="( ligne "+ct.line+", colonne "+ct.linepos),ct.reason&&(ot+=":  "+ct.reason+")"),new Error(ot);return st}else if(window.DOMParser){te=new window.DOMParser;try{st=te.parseFromString(ne,"text/xml")}catch(ft){throw ft.message==="SyntaxError"?new Error(ot):new Error("Erreur lors du parsing de la réponse du service : "+ft.message)}if(st.getElementsByTagName("parsererror").length>0)for(var ut=st.getElementsByTagName("parsererror"),dt=0;dt<ut.length;dt++){var ht=ut[dt].innerHTML;if(ht.indexOf("Huge input lookup")===-1)throw ot+="("+ht+")",new Error(ot)}else if(!st.documentElement)throw new Error(ot);return st}else throw new Error("Incompatible DOM Parser pour ce navigateur !")}}function __getRootNode(ne){var ee;return ne.nodeType===9?ee=ne.documentElement:ne.nodeType===1&&(ee=ne),ee}function __readDefault(ne){var ee={};if(ne.attributes.length>0){var te=__getAttributes(ne);ee.attributes=te}if(ne.hasChildNodes()){for(var st={},ot,ct=ne.childNodes,ut=0;ut<ct.length;ut++)if(ot=ct[ut],ot.nodeType===3)ee.textContent=ot.nodeValue;else if(ot.nodeType===1)if(st=__readDefault(ot),!ee[ot.nodeName])ee[ot.nodeName]=st;else{if(!Array.isArray(ee[ot.nodeName])){var dt=ee[ot.nodeName];ee[ot.nodeName]=[],ee[ot.nodeName].push(dt)}ee[ot.nodeName].push(st)}}return ee}function __getAttributes(ne){if(ne.attributes.length>0){for(var ee={},te=ne.attributes,st=0;st<te.length;st++){var ot=te[st];ee[ot.nodeName]=ot.nodeValue}return ee}}function AltiResponse(){if(!(this instanceof AltiResponse))throw new TypeError("AltiResponse constructor cannot be called as a function.");this.elevations=[]}AltiResponse.prototype={constructor:AltiResponse};function Elevation(){if(!(this instanceof Elevation))throw new TypeError("Elevation constructor cannot be called as a function.");this.z=null}Elevation.prototype={constructor:Elevation};function Measure(){if(!(this instanceof Measure))throw new TypeError("Measure constructor cannot be called as a function.");this.source_name=null,this.source_measure=null,this.z=null,this.acc=null}Measure.prototype={constructor:Measure};var AltiResponseReader={};AltiResponseReader.READERS={elevations:function(ne){var ee=new AltiResponse;if(ne.hasChildNodes())for(var te=ne.childNodes,st,ot,ct=0;ct<te.length;ct++)st=te[ct],AltiResponseReader.READERS[st.nodeName]&&(ot=AltiResponseReader.READERS[st.nodeName](st),ee.elevations.push(ot));return ee},elevation:function(ne){var ee=new Elevation;if(ne.hasChildNodes())for(var te=ne.childNodes,st,ot=0;ot<te.length;ot++)st=te[ot],AltiResponseReader.READERS[st.nodeName]&&AltiResponseReader.READERS[st.nodeName](st,ee);return ee},lat:function(ne,ee){var te=ne.firstChild;if(te&&te.nodeType===3)ee.lat=parseFloat(te.nodeValue);else throw new Error("Erreur dans la lecture de la réponse du service : latitude attendue mais absente")},lon:function(ne,ee){var te=ne.firstChild;if(te&&te.nodeType===3)ee.lon=parseFloat(te.nodeValue);else throw new Error("Erreur dans la lecture de la réponse du service : longitude attendue mais absente")},z:function(ne,ee){var te=ne.firstChild;if(te&&te.nodeType===3)if(ee)ee.z=parseFloat(te.nodeValue);else return ee=new Elevation,ee.z=parseFloat(te.nodeValue),ee;else throw new Error("Erreur dans la lecture de la réponse du service : altitude attendue mais absente")},acc:function(ne,ee){var te=ne.firstChild;if(te&&te.nodeType===3)ee.acc=parseFloat(te.nodeValue);else throw new Error("Erreur dans la lecture de la réponse du service : précision (acc) attendue mais absente")},source_name:function(ne,ee){var te=ne.firstChild;if(te&&te.nodeType===3)ee.source_name=te.nodeValue;else throw new Error("Erreur dans la lecture de la réponse du service : source_name attendue mais absente")},source_measure:function(ne,ee){var te=ne.firstChild;if(te&&te.nodeType===3)ee.source_measure=te.nodeValue;else throw new Error("Erreur dans la lecture de la réponse du service : source_measure attendue mais absente")},measures:function(ne,ee){ee.measures=[];var te;if(ne.hasChildNodes())for(var st=ne.childNodes,ot,ct,ut=0;ut<st.length;
89ut++){te=new Measure,ot=st[ut],ct=ot.childNodes;for(var dt=0;dt<ct.length;dt++)if(AltiResponseReader.READERS[ct[dt].nodeName])AltiResponseReader.READERS[ct[dt].nodeName](ct[dt],te);else throw new Error("Erreur dans la lecture de la réponse du service : measures attendues mais absentes");ee.measures.push(te)}},exceptionreport:function(ne){var ee={};if(ne.hasChildNodes())for(var te=ne.childNodes,st,ot=0;ot<te.length;ot++)st=te[ot],st.nodeName==="Exception"&&(ee.exceptionReport=AltiResponseReader.READERS.exception(st));return ee},exception:function(ne){var ee={},te=ne.getAttribute("exceptionCode");te&&(ee.exceptionCode=te);var st=ne.firstChild;return st&&st.nodeType===3&&(ee.exception=st.nodeValue),ee},error:function(ne){var ee={error:{}};if(ne.hasChildNodes())for(var te=ne.childNodes,st,ot=0;ot<te.length;ot++){st=te[ot];var ct;st.nodeType===1&&st.nodeName==="code"&&(ct=st.firstChild,ct&&ct.nodeType===3&&(ee.error.code=ct.nodeValue)),st.nodeType===1&&st.nodeName==="description"&&(ct=st.firstChild,ct&&ct.nodeType===3&&(ee.error.description=ct.nodeValue))}return ee}};AltiResponseReader.read=function(ne){if(ne.nodeName==="elevations"){var ee=AltiResponseReader.READERS.elevations(ne);return ee}else if(ne.nodeName==="ExceptionReport"){var te=AltiResponseReader.READERS.exceptionreport(ne);return te}else if(ne.nodeName==="error"){var st=AltiResponseReader.READERS.error(ne);return st}else throw new Error("Erreur lors de la lecture de la réponse : elle n'est pas au format attendu.")};var AltiResponseFactory={build:function(ne){var ee=LoggerByDefault$1.getLogger("AltiResponseFactory");ee.trace(["AltiResponseFactory::build()"]);var te=null;if(ne.response)if(ne.rawResponse)ee.trace("analyze response : raw"),te=ne.response;else{switch(ne.outputFormat){case"xml":ee.trace("analyze response : xml");try{var st=new XML$1({reader:AltiResponseReader});if(typeof ne.response=="string"?st.setXMLString(ne.response):st.setXMLDoc(ne.response),te=st.parse(),!te)throw new Error(MessagesResources.getMessage("SERVICE_RESPONSE_EXCEPTION_2"))}catch(mt){var ot=mt.message;ne.onError.call(ne.scope,new ErrorService({message:MessagesResources.getMessage("SERVICE_RESPONSE_EXCEPTION",ot),status:200,type:ErrorService.TYPE_SRVERR}));return}break;case"json":ee.trace("analyze response : json"),ee.trace("analyze response : ",typeof ne.response);var ct=null;if(typeof ne.response=="string"?ct=JSON.parse(ne.response):ct=ne.response,ct&&ct.error){ne.onError.call(ne.scope,new ErrorService({message:MessagesResources.getMessage("SERVICE_RESPONSE_EXCEPTION",ct.error.description),status:200,type:ErrorService.TYPE_SRVERR}));return}if(ct){var ut=ct.elevations,dt=new AltiResponse,ht;if(Array.isArray(ut)&&ut.length)for(var ft=0;ft<ut.length;ft++)ht=new Elevation,typeof ut[ft]=="object"?(ut[ft].lon&&(ht.lon=ut[ft].lon),ut[ft].lat&&(ht.lat=ut[ft].lat),ut[ft].z&&(ht.z=ut[ft].z),ut[ft].acc&&(ht.acc=ut[ft].acc),ut[ft].measures&&(ht.measures=ut[ft].measures)):typeof ut[ft]=="number"&&(ht.z=ut[ft]),Array.isArray(dt.elevations)&&dt.elevations.push(ht);te=dt}if(!te){ne.onError.call(ne.scope,new ErrorService({message:MessagesResources.getMessage("SERVICE_RESPONSE_ANALYSE_2"),type:ErrorService.TYPE_UNKERR,status:-1}));return}break;default:ne.onError.call(ne.scope,new ErrorService({message:MessagesResources.getMessage("SERVICE_RESPONSE_FORMAT_2"),type:ErrorService.TYPE_UNKERR,status:-1}));return}if(te.exceptionReport){ne.onError.call(ne.scope,new ErrorService({message:MessagesResources.getMessage("SERVICE_RESPONSE_EXCEPTION",te.exceptionReport),type:ErrorService.TYPE_SRVERR,status:200}));return}else if(te.error){var pt=te.error.description;ne.onError.call(ne.scope,new ErrorService({message:MessagesResources.getMessage("SERVICE_RESPONSE_EXCEPTION",pt),type:ErrorService.TYPE_SRVERR,status:200}));return}}else{ne.onError.call(ne.scope,new ErrorService(MessagesResources.getMessage("SERVICE_RESPONSE_EMPTY")));return}ne.onSuccess.call(ne.scope,te)}};function Alti(ne){if(!(this instanceof Alti))throw new TypeError(MessagesResources.getMessage("CLASS_CONSTRUCTOR","Alti"));if(this.CLASSNAME="Alti",CommonService.apply(this,arguments),this.logger=LoggerByDefault$1.getLogger("Gp.Services.Alti"),this.logger.trace("[Constructeur Alti (options)]"),!ne.positions)throw new Error(MessagesResources.getMessage("PARAM_MISSING","positions"));if(ne.positions.length===0)throw new Error(MessagesResources.getMessage("PARAM_EMPTY","positions"));if(this.options.positions=ne.positions,this.options.outputFormat=typeof ne.outputFormat=="string"?ne.outputFormat.toLowerCase():"xml",this.options.resource=ne.resource||"ign_rge_alti_wld",this.options.sampling=ne.sampling||null,this.options.api=typeof ne.api=="str
89ing"?ne.api.toUpperCase():"REST",this.options.api==="REST"&&(this.options.httpMethod="GET"),this.options.zonly=ne.zonly||!1,this.options.measures=ne.measures||!1,!this.options.serverUrl){var ee=DefaultUrlService.Alti.newUrl(),te=null;switch(this.options.api){case"WPS":te=ee.wps;break;case"REST":var st=(ne.sampling?"profil":"elevation")+"-"+this.options.outputFormat;te=ee[st];break;default:throw new Error(MessagesResources.getMessage("PARAM_UNKNOWN","api"))}if(!te)throw new Error("Url by default not found !");this.options.serverUrl=te,this.logger.trace("Server URL by default : "+this.options.serverUrl)}var ot=this.options.serverUrl.lastIndexOf(".");if(ot!==-1){var ct=this.options.serverUrl.substring(ot+1);if(ct&&ct.length<5)switch(this.logger.trace("Server Extension URL : "+ct),ct.toLowerCase()){case"json":case"xml":this.options.outputFormat=ct.toLowerCase();break;default:throw new Error("type of service : unknown or unsupported (json or xml) !")}}}Alti.prototype=Object.create(CommonService.prototype,{});Alti.prototype.constructor=Alti;Alti.prototype.buildRequest=function(ne,ee){var te={httpMethod:this.options.httpMethod,onSuccess:function(st){this.request=st,ee.call(this,this.request)},onError:ne,scope:this,resource:this.options.resource,positions:this.options.positions,outputFormat:this.options.outputFormat,sampling:this.options.sampling,api:this.options.api,zonly:this.options.zonly,measures:this.options.measures};AltiRequestFactory.build(te)};Alti.prototype.analyzeResponse=function(ne,ee){if(this.response){var te={response:this.response,outputFormat:this.options.outputFormat,rawResponse:this.options.rawResponse,onError:ne,onSuccess:ee,scope:this};AltiResponseFactory.build(te)}else ne.call(this,new ErrorService(MessagesResources.getMessage("SERVICE_RESPONSE_EMPTY")))};function GeocodeParamREST(ne){if(!(this instanceof GeocodeParamREST))throw new TypeError("GeocodeParamREST constructor cannot be called as a function.");if(this.logger=LoggerByDefault$1.getLogger(),this.logger.trace("[Constructeur GeocodeParamREST ()]"),this.options=ne||{},!this.options.geocodeMethod||this.options.geocodeMethod!=="search"&&this.options.geocodeMethod!=="reverse")throw new Error("Error geocodeMethod not valid");this.geocodeMethod=this.options.geocodeMethod,this.query=typeof this.options<"u"?this.options.query:null,this.searchGeometry=this.options.searchGeometry||null,this.index=this.options.index||null,this.lon=this.options.position&&this.options.position.lon?this.options.position.lon:null,this.lat=this.options.position&&this.options.position.lat?this.options.position.lat:null,this.maxResp=this.options.maxResp||null,this.returnTrueGeometry=this.options.returnTrueGeometry||null,this.filters=this.options.filters||{}}GeocodeParamREST.CLASSNAME="GeocodeParamREST";GeocodeParamREST.prototype={constructor:GeocodeParamREST,getFilters:function(){var ne={};for(var ee in this.filters)this.filters.hasOwnProperty(ee)&&(ne[ee]=this.filters[ee]);return ne},getIndex:function(){return this.index===void 0?null:this.index==="StreetAddress"?"address":this.index==="CadastralParcel"?"parcel":this.index==="PositionOfInterest"?"poi":this.index==="location"?"location":this.index},getSearchGeometry:function(){return JSON.stringify(this.searchGeometry)}};GeocodeParamREST.prototype.getParams=function(){var ne=[];this.geocodeMethod==="search"&&ne.push({k:"q",v:this.query}),this.index&&ne.push({k:"index",v:this.getIndex()}
89),this.geocodeMethod==="reverse"&&this.searchGeometry&&ne.push({k:"searchgeom",v:this.getSearchGeometry()}),this.lon&&this.lat&&(ne.push({k:"lon",v:this.lon}),ne.push({k:"lat",v:this.lat})),this.maxResp&&ne.push({k:"limit",v:this.maxResp}),this.returnTrueGeometry&&ne.push({k:"returntruegeometry",v:this.returnTrueGeometry});const ee=this.getFilters();for(var te in ee)ne.push({k:te,v:ee[te]});return ne};function GeocodeRequestREST(ne){if(this.logger=LoggerByDefault$1.getLogger("GeocodeRequestREST"),this.logger.trace("[Constructeur GeocodeRequestREST ()]"),!(this instanceof GeocodeRequestREST))throw new TypeError("GeocodeRequestREST constructor cannot be called as a function.");if(!ne)throw new Error(MessagesResources.getMessage("PARAM_EMPTY","options"));this.settings=ne}GeocodeRequestREST.prototype={requestString:null,constructor:GeocodeRequestREST,processRequestString:function(){var ne="";const te=new GeocodeParamREST(this.settings).getParams();for(var st=0;st<te.length;st++){var ot=te[st];ne&&(ne+="&"),ne+=ot.k+"="+ot.v}if(!this.settings.geocodeMethod||this.settings.geocodeMethod!=="search"&&this.settings.geocodeMethod!=="reverse")throw new Error("Error geocodeMethod not valid");return this.requestString="?"+ne,this.logger.trace(this.requestString),this.requestString}};var GeocodeRequestFactory={build:function(ne){var ee=LoggerByDefault$1.getLogger("GeocodeRequestFactory");ee.trace(["GeocodeRequestFactory::build()"]);var te=ne||{},st=new GeocodeRequestREST(te);if(!st.processRequestString())throw new Error("Error process request (rest) !");var ot=st.requestString;return ee.trace(ot),ot}};function GeocodeResponse(){if(!(this instanceof GeocodeResponse))throw new TypeError("GeocodeResponse constructor cannot be called as a function.");this.locations=[]}GeocodeResponse.prototype={constructor:GeocodeResponse};function GeocodedLocation(){if(!(this instanceof GeocodedLocation))throw new TypeError("GeocodedLocation constructor cannot be called as a function.");this.position=null,this.matchType=null,this.placeAttributes={},this.type=null,this.accuracy=null,this.CLASSNAME="GeocodedLocation"}GeocodedLocation.prototype={constructor:GeocodedLocation};function GeocodeResponseParser(){if(!(this instanceof GeocodeResponseParser))throw new TypeError("GeocodeResponseParser constructor cannot be called as a function.")}GeocodeResponseParser.prototype={constructor:GeocodeResponseParser,parse:function(ne){var ee=new GeocodeResponse;const te=JSON.parse(ne);if(te.type==="FeatureCollection")for(var st=0;st<te.features.length;++st)_parseFeature(te.features[st],ee);else if(te.type==="Feature")_parseFeature(te,ee);else{if(te.type==="SERVICE_ERROR")return _parseError(te);var ot=MessagesResources.getMessage("SERVICE_RESPONSE_ANALYSE",te.type);throw new ErrorService({message:ot,type:ErrorService.TYPE_UNKERR,status:200})}return ee}};function _parseFeature(ne,ee){var te=new GeocodedLocation;if(ne.geometry&&ne.geometry.type==="Point"&&(te.position={lon:ne.geometry.coordinates[0],lat:ne.geometry.coordinates[1]}),ne.properties){for(var st in ne.properties)st==="score"?te.accuracy=ne.properties[st]:st==="_type"?ne.properties[st]==="address"?te.type="StreetAddress":ne.properties[st]==="poi"?te.type="PositionOfInterest":(ne.properties[st]==="parcel"||ne.properties[st]==="cadastral")&&(te.type="CadastralParcel"):te.placeAttributes[st]=ne.properties[st];ne.properties._type==="address"&&(te.matchType=ne.properties.number!==void 0&&ne.properties.number!==null?"street number":"street")}ee.locations.push(te)}function _parseError(ne){return{exceptionReport:ne}}var GeocodeReponseFactory={build:function(ne){var ee=null;if(ne.response)if(ne.rawResponse)ee=ne.response;else{try{if(ee=new GeocodeResponseParser().parse(ne.response),!ee)throw new Error("L'analyse de la réponse du service !?")}catch(st){var te=st.message;typeof ne.response=="string"?te+="('"+ne.response+"')":te+="('"+ne.response.documentElement.innerHTML+"')",ne.onError.call(ne.scope,new ErrorService({message:MessagesResources.getMessage("SERVICE_RESPONSE_ANALYSE",te),type:ErrorService.TYPE_UNKERR,status:-1}));return}if(ee.exceptionReport){ne.onError.call(ne.scope,new ErrorService({message:MessagesResources.getMessage("SERVICE_RESPONSE_EXCEPTION",ee.exceptionReport),type:ErrorService.TYPE_SRVERR,status:200}));return}}else{ne.onError.call(ne.scope,new ErrorService({message:MessagesResources.getMessage("SERVICE_RESPONSE_EMPTY"),type:ErrorService.TYPE_SRVERR,status:-1}));return}ne.onSuccess.call(ne.scope,ee)}};function Geocode(ne){if(!(this instanceof Geocode))throw new TypeError(MessagesResources.getMessage("CLASS_CONSTRUCTOR","Geocode"));this.CLASSNAME="Geocode",this.logger=LoggerByDefault$1.getLogger("Gp.Services.Geocode"),this.logger.trace("[Constructeur Geocode (options)]");var ee=this.patchOptionConvertor(ne);if(ee.serverUrl||(ee.serverUrl=DefaultUrlService.Geocode.newUrl(
89)),CommonService.apply(this,[ee]),!ee.hasOwnProperty("query"))throw new Error(MessagesResources.getMessage("PARAM_MISSING","query"));if(this.options.query=ee.query,ee.index||(this.options.index=ee.index="StreetAddress"),ee.filters)for(var te=Object.keys(ee.filters),st=0;st<te.length;st++){var ot=te[st];(typeof ee.filters[ot]>"u"||typeof ee.filters[ot]=="object"&&Object.keys(ee.filters[ot]).length===0||typeof ee.filters[ot]=="string"&&ee.filters[ot].length===0||Array.isArray(ee.filters[ot])&&ee.filters[ot].length===0)&&delete this.options.filters[ot]}this.options.index=ee.index||"StreetAddress",this.options.maximumResponses=ee.maximumResponses||20}Geocode.prototype=Object.create(CommonService.prototype,{});Geocode.prototype.constructor=Geocode;Geocode.prototype.patchOptionConvertor=function(ne){const ee=ne;return ee.hasOwnProperty("location")&&(this.logger.warn("The parameter 'location' is deprecated"),ee.query||(ee.query=ee.location),delete ee.location),ee.filterOptions&&(this.logger.warn("The parameter 'filterOptions' is deprecated"),ee.filters||(ee.filters=ee.filterOptions,ee.filters.type&&(this.logger.warn("The parameter 'filterOptions.type' is deprecated"),ee.index||(Array.isArray(ee.filters.type)&&ee.filters.type.length>0?ee.index=ee.filters.type[0]:ee.index=ee.filters.type),delete ee.filters.type),ee.filters.bbox&&(this.logger.warn("The parameter 'filterOptions.bbox' is deprecated"),delete ee.filters.bbox)),delete ee.filterOptions),ee.position&&(ee.position.x&&(this.logger.warn("The parameter 'position.x' is deprecated"),ee.position.lon||(ee.position.lon=ee.position.x),delete ee.position.x),ee.position.y&&(this.logger.warn("The parameter 'position.y' is deprecated"),ee.position.lat||(ee.position.lat=ee.position.y),delete ee.position.y)),ee.returnFreeForm&&(this.logger.warn("The parameter 'returnFreeForm' is deprecated"),delete ee.returnFreeForm),ee.srs&&(this.logger.warn("The parameter 'srs' is deprecated"),delete ee.srs),ee};Geocode.prototype.buildRequest=function(ne,ee){var te={httpMethod:this.options.httpMethod,geocodeMethod:"search",query:this.options.query,index:this.options.index,returnTrueGeometry:this.options.returnTrueGeometry,position:this.options.position,maxResp:this.options.maximumResponses,filters:this.options.filters};this.request=GeocodeRequestFactory.build(te),this.request?ee.call(this,this.request):ne.call(this,new ErrorService(MessagesResources.getMessage("SERVICE_REQUEST_BUILD")))};Geocode.prototype.analyzeResponse=function(ne,ee){if(this.response){var te={response:this.response,rawResponse:this.options.rawResponse,onError:ne,onSuccess:ee,scope:this};GeocodeReponseFactory.build(te)}else ne.call(this,new ErrorService(MessagesResources.getMessage("SERVICE_RESPONSE_EMPTY")))};function ReverseGeocode$1(ne){if(!(this instanceof ReverseGeocode$1))throw new TypeError(MessagesResources.getMessage("CLASS_CONSTRUCTOR","ReverseGeocode"));this.CLASSNAME="ReverseGeocode",this.logger=LoggerByDefault$1.getLogger("Gp.Services.ReverseGeocode"),this.logger.trace("[Constructeur ReverseGeocode (options)]");var ee=this.patchOptionConvertor(ne);if(ee.serverUrl||(ee.serverUrl=DefaultUrlService.ReverseGeocode.newUrl()),CommonService.apply(this,[ee]),ee.searchGeometry)this.options.searchGeometry=ee.searchGeometry;else if(!ee.position)throw new Error(MessagesResources.getMessage("PARAM_MISSING","searchGeometry"));if(ee.index||(this.options.index=ee.index="StreetAddress"),ee.filters)for(var te=Object.keys(ee.filters),st=0;st<te.length;st++){var ot=te[st];(typeof ee.filters[ot]>"u"||typeof ee.filters[ot]=="object"&&Object.keys(ee.filters[ot]).length===0||typeof ee.filters[ot]=="string"&&ee.filters[ot].length===0||Array.isArray(ee.filters[ot])&&ee.filters[ot].length===0)&&delete this.options.filters[ot]}this.options.position=ee.position,this.options.index=ee.index||"StreetAddress",this.options.maximumResponses=ee.maximumResponses||20}ReverseGeocode$1.prototype=Object.create(CommonService.prototype,{});ReverseGeocode$1.prototype.constructor=ReverseGeocode$1;ReverseGeocode$1.prototype.patchOptionConvertor=function(ne){var ee=ne;return ee.filterOptions&&(this.logger.warn("The parameter 'filterOptions' is deprecated"),ee.filterOptions.type&&(this.logger.warn("The parameter 'filterOptions.type' is deprecated"),ee.index||(Array.isArray(ee.filterOptions.type)&&ee.filterOptions.type.length>0?ee.index=ee.filterOptions.type[0]:ee.index=ee.filterOptions.type),delete ee.filterOptions.type),ee.filterOptions.bbox&&(this.logger.warn("The parameter 'filterOptions.bbox' is deprecated"),ee.searchGeometry||(ee.searchGeometry=this.bbox2Json(ee.filterOptions.bbox)),delete ee.filterOptions.bbox),ee.filterOptions.circle&&(this.logger.warn("The parameter 'filterOptions.circle' is deprecated"),ee.searchGeometry||(ee.searchGeometry=this.circle2Json(ee.filterOptions.circle)),delete ee.filterOptions.circle),ee.filterOptions.polygon&&(this.logger.warn("The parameter 'filterOptions.polygon' is deprecated"),ee.searchGeometry||(ee.searchGeometry=this.polygon2Json(ee.filterOptions.polygon)),delete ee.filterOptions.polygon),!ee.filters&&Object.keys(ee.filterOptions).length>0&&(ee.filters=ee.filterOptions),delete ee.filterOptions),ee.position&&(ee.position.x&&(this.logger.warn("The parameter 'position.x' is deprecated"),ee.position.lon||(ee.position.lon=ee.position.x),delete ee.position.x),ee.position.y&&(this.logger.warn("The parameter 'position.y' is deprecated"),ee.position.lat||(ee.position.lat=ee.position.y),delete ee.position.y)),ee.srs&&(this.logger.warn("The parameter 'srs' is deprecated"),delete ee.srs),ee};ReverseGeocode$1.prototype.buildRequest=function(ne,ee){var te={httpMethod:this.options.httpMethod,geocodeMethod:"reverse",searchGeometry:this.options.searchGeometry,index:this.options.index,position:this.options.position,returnTrueGeometry:this.options.returnTrueGeometry,maxResp:this.options.maximumResponses,filters:this.options.filters};this.request=GeocodeRequestFactory.build(te),this.request?ee.call(this,this.request):ne.call(this,new ErrorService(MessagesResources.getMessage("SERVICE_REQUEST_BUILD")))};
89ReverseGeocode$1.prototype.analyzeResponse=function(ne,ee){if(this.response){var te={response:this.response,rawResponse:this.options.rawResponse,onError:ne,onSuccess:ee,scope:this};GeocodeReponseFactory.build(te)}else ne.call(this,new ErrorService(MessagesResources.getMessage("SERVICE_RESPONSE_EMPTY")))};ReverseGeocode$1.prototype.bbox2Json=function(ne){return{type:"Polygon",coordinates:[[[ne.left,ne.top],[ne.right,ne.top],[ne.right,ne.bottom],[ne.left,ne.bottom],[ne.left,ne.top]]]}};ReverseGeocode$1.prototype.circle2Json=function(ne){return{type:"Circle",radius:ne.radius,coordinates:[ne.x,ne.y]}};ReverseGeocode$1.prototype.polygon2Json=function(ne){for(var ee={type:"Polygon",coordinates:[[]]},te=0;te<ne.length;++te)ee.coordinates[0].push([ne[te].x,ne[te].y]);return ee};ReverseGeocode$1.geoEPSG=["EPSG:4326"];function AutoCompleteResponse(){if(!(this instanceof AutoCompleteResponse))throw new TypeError("AutoCompleteResponse constructor cannot be called as a function.");this.suggestedLocations=[]}AutoCompleteResponse.prototype={constructor:AutoCompleteResponse};function SuggestedLocation(){if(!(this instanceof SuggestedLocation))throw new TypeError("SuggestedLocation constructor cannot be called as a function.");this.type=null,this.position={x:null,y:null},this.commune=null,this.fullText=null,this.postalCode=null,this.classification=null,this.street=null,this.poi=null,this.kind=null}SuggestedLocation.prototype={constructor:SuggestedLocation};var AutoCompleteResponseFactory={build:function(ne){var ee=LoggerByDefault$1.getLogger("AutoCompleteResponseFactory");ee.trace(["AutoCompleteResponseFactory::build()"]);var te=null;if(ne.response)if(ne.rawResponse)ee.trace("analyze response : raw"),te=ne.response;else{var st=null;if(typeof ne.response=="string"?st=JSON.parse(ne.response):st=ne.response,st){if(st.error){ne.onError.call(ne.scope,new ErrorService({message:MessagesResources.getMessage("SERVICE_RESPONSE_EXCEPTION",st.error.description),status:st.error.code,type:ErrorService.TYPE_SRVERR}));return}if(te=new AutoCompleteResponse,st.results&&Array.isArray(st.results))for(var ot=null,ct=0;ct<st.results.length;ct++){var ut=st.results[ct];ot=new SuggestedLocation,ut&&(ut.country==="StreetAddress"?(ot.street=ut.street,ot.type="StreetAddress"):ut.country==="PositionOfInterest"&&(ot.poi=ut.street,ot.type="PositionOfInterest",ot.poiType=ut.poiType),ot.position&&(ot.position.x=ut.x,ot.position.y=ut.y),ot.kind=ut.kind,ot.commune=ut.city,ot.fullText=ut.fulltext,ot.postalCode=ut.zipcode,ot.classification=ut.classification),te.suggestedLocations.push(ot)}else{ne.onError.call(ne.scope,new ErrorService(MessagesResources.getMessage("SERVICE_RESPONSE_FORMAT_3")));return}if(!te.suggestedLocations.length){ne.onError.call(ne.scope,new ErrorService(MessagesResources.getMessage("SERVICE_RESPONSE_FORMAT_3")));return}}if(!te){ne.onError.call(ne.scope,new ErrorService({message:MessagesResources.getMessage("SERVICE_RESPONSE_ANALYSE_2"),type:ErrorService.TYPE_UNKERR,status:-1}));return}if(te.exceptionReport){ne.onError.call(ne.scope,new ErrorService({message:MessagesResources.getMessage("SERVICE_RESPONSE_EXCEPTION",te.exceptionReport),type:ErrorService.TYPE_SRVERR,status:200}));return}}else{ne.onError.call(ne.scope,new ErrorService(MessagesResources.getMessage("SERVICE_RESPONSE_EMPTY")));return}ne.onSuccess.call(ne.scope,te)}};function AutoComplete(ne){if(!(this instanceof AutoComplete))throw new TypeError(MessagesResources.getMessage("CLASS_CONSTRUCTOR","AutoComplete"));this.CLASSNAME="AutoComplete",this.logger=LoggerByDefault$1.getLogger("Gp.Services.AutoComplete"),this.logger.trace("[Constructeur AutoComplete (options)]");var ee=this.patchOptionConvertor(ne);if(ee.serverUrl||(ee.serverUrl=DefaultUrlService.AutoComplete.newUrl()),CommonService.apply(this,arguments),!ee.text)throw new Error(MessagesResources.getMessage("PARAM_MISSING","text"));this.options.text=ee.text,ee.type||(ee.type=["StreetAddress,PositionOfInterest"]),this.options.type=ee.type,this.options.territory=ee.terr||"",this.options.maximumResponses=ee.maximumResponses||10,this.options.protocol==="XHR"&&this.options.httpMethod==="POST"&&(this.logger.warn("Le service ne gére pas le mode d'interrogation en POST, on bascule sur du GET !"),this.options.httpMethod="GET"),this.options.outputFormat=this.options.rawResponse?"":"json"}AutoComplete.prototype=Object.create(CommonService.prototype,{});AutoComplete.prototype.constructor=AutoComplete;AutoComplete.prototype.patchOptionConvertor=function(ne){const ee=ne;return ee.filterOptions&&(this.logger.warn("The parameter 'filterOptions' is deprecated"),ee.filterOptions.type&&(this.logger.warn("The parameter 'filterOptions.type' is deprecated"),ee.type||(ee.type=ee.filterOptions.type)),ee.filterOptions.territory&&(this.logger.warn("The parameter 'filterOptions.territory' is deprecated"),ee.terr||(ee.terr=ee.filterOptions.territory)),delete ee.filterOptions),ee};AutoComplete.prototype.buildRequest=function(ne,ee){var te="";this.options.territory&&(te=this.options.territory);var st="";this.options.type&&(st=this.options.type.join(",")),this.request=Helper$1.normalyzeParameters({text:encodeURIComponent(this.options.text),type:st,terr:te,maximumResponses:this.options.maximumResponses}),this.request?ee.call(this,this.request):ne.call(this,new ErrorService(MessagesResources.getMessage("SERVICE_REQUEST_BUILD")))};
89AutoComplete.prototype.analyzeResponse=function(ne,ee){if(this.response){var te={response:this.response,rawResponse:this.options.rawResponse,onSuccess:ee,onError:ne,scope:this};AutoCompleteResponseFactory.build(te)}else ne.call(this,new ErrorService(MessagesResources.getMessage("SERVICE_RESPONSE_EMPTY")))};function RouteParamREST(ne){if(!(this instanceof RouteParamREST))throw new TypeError("RouteParamREST constructor cannot be called as a function.");this.logger=LoggerByDefault$1.getLogger(),this.logger.trace("[Constructeur RouteParamREST ()]"),this.options=ne||{},this.resource=this.options.resource,this.start=this.options.startPoint.x+","+this.options.startPoint.y,this.end=this.options.endPoint.x+","+this.options.endPoint.y,this.intermediates=this.options.viaPoints,this.profile=this.options.graph,this.crs=this.options.srs,this.constraints=this.options.constraints,this.optimization=this.options.routePreference,this.getSteps=this.options.geometryInInstructions?"true":"false",this.distanceUnit=this.options.distanceUnit,this.timeUnit=this.options.timeUnit,this.waysAttributes=this.options.waysAttributes}RouteParamREST.CLASSNAME="RouteParamREST";RouteParamREST.prototype={constructor:RouteParamREST,getIntermediates:function(){var ne=[];if(this.intermediates.length!==0)for(var ee=0;ee<this.intermediates.length;ee++){var te=this.intermediates[ee];ne.push(te.x+","+te.y)}return ne.join("|")},getWaysAttributes:function(){return this.waysAttributes.join("|")},getProfile:function(){return this.profile},getDistanceUnit:function(){return this.distanceUnit==="m"?"meter":this.distanceUnit==="km"?"kilometer":""},getOptimization:function(){return this.optimization?this.optimization:""},getConstraints:function(){var ne=[];if(this.constraints.length!==0)for(var ee=0;ee<this.constraints.length;ee++)ne.push(JSON.stringify(this.constraints[ee]));return ne.join("|")}};RouteParamREST.prototype.getParams=function(){var ne=[];return ne.push({k:"resource",v:this.resource}),ne.push({k:"start",v:this.start}),ne.push({k:"end",v:this.end}),ne.push({k:"geometryFormat",v:"geojson"}),this.optimization&&ne.push({k:"optimization",v:this.getOptimization()}),this.intermediates&&ne.push({k:"intermediates",v:this.getIntermediates()}),this.profile&&ne.push({k:"profile",v:this.getProfile()}),this.constraints&&ne.push({k:"constraints",v:this.getConstraints()}),this.crs&&ne.push({k:"crs",v:this.crs}),this.distanceUnit&&ne.push({k:"distanceUnit",v:this.getDistanceUnit()}),this.timeUnit&&ne.push({k:"timeUnit",v:this.timeUnit}),this.waysAttributes&&ne.push({k:"waysAttributes",v:this.getWaysAttributes()}),ne};function RouteRequestREST(ne){if(this.logger=LoggerByDefault$1.getLogger("RouteRequestREST"),this.logger.trace("[Constructeur RouteRequestREST ()]"),!(this instanceof RouteRequestREST))throw new TypeError("RouteRequestREST constructor cannot be called as a function.");if(!ne)throw new Error(MessagesResources.getMessage("PARAM_EMPTY","options"));this.settings=ne}RouteRequestREST.prototype={requestString:null,constructor:RouteRequestREST,processRequestString:function(){this.logger.warn(" PROTOTYPE !");for(var ne=new RouteParamREST(this.settings),ee=ne.getParams(),te="",st=0;st<ee.length;st++){var ot=ee[st];
89te&&(te+="&"),te+=ot.k+"="+ot.v}return this.logger.trace(te),this.requestString=te,this.requestString}};var RouteRequestFactory={build:function(ne){var ee=LoggerByDefault$1.getLogger("RouteRequestFactory");ee.trace(["RouteRequestFactory::build()"]);var te=null,st=ne||{},ot=ne.onError!==null&&typeof ne.onError=="function",ct=null,ut=new RouteRequestREST(st);if(!ut.processRequestString()){if(ct="Error process request (rest) !",ot){ne.onError.call(ne.scope,new ErrorService(ct));return}throw new Error(ct)}return te=ut.requestString,te}};function RouteResponse(){if(!(this instanceof RouteResponse))throw new TypeError("RouteResponse constructor cannot be called as a function.");this.totalTime=null,this.totalDistance=null,this.bbox={left:null,right:null,top:null,bottom:null},this.routeGeometry=null,this.routeInstructions=[]}RouteResponse.prototype={constructor:RouteResponse};function RouteInstruction(){if(!(this instanceof RouteInstruction))throw new TypeError("RouteInstruction constructor cannot be called as a function.");
89this.duration=null,this.distance=null,this.code=null,this.instruction=null,this.geometry=null}RouteInstruction.prototype={constructor:RouteInstruction};var RouteResponseFactory={build:function(ne){var ee=LoggerByDefault$1.getLogger("RouteResponseFactory");ee.trace("RouteResponseFactory::build()");var te=null;if(ne.response)if(ne.rawResponse)ee.trace("analyze response : raw"),te=ne.response;else{ee.trace("analyze response : json");var st;if(typeof ne.response=="string"?st=JSON.parse(ne.response):st=ne.response,st){if(st.message){ne.onError.call(ne.scope,new ErrorService(MessagesResources.getMessage("SERVICE_RESPONSE_EXCEPTION",st.message)));return}var ot=[],ct=[],ut=[];if(te=new RouteResponse,te.hasOwnProperty("totalTime")&&(te.totalTime=parseFloat(st.duration)),te.hasOwnProperty("totalDistance")&&(te.totalDistance=parseFloat(st.distance)),te.hasOwnProperty("bbox")&&(te.bbox.left=parseFloat(st.bbox[0]),te.bbox.bottom=parseFloat(st.bbox[1]),te.bbox.right=parseFloat(st.bbox[2]),te.bbox.top=parseFloat(st.bbox[3])),te.hasOwnProperty("routeGeometry")&&!ne.geometryInInstructions&&(te.routeGeometry=st.geometry),te.hasOwnProperty("routeInstructions")&&ne.geometryInInstructions){var dt=st.portions,ht;if(Array.isArray(dt)&&dt.length)for(ht=0;ht<dt.length;ht++)ot.push(dt[ht]);if(ot.length)for(ht=0;ht<ot.length;ht++)ct.push(ot[ht].steps);if(ct.length)for(ht=0;ht<ct.length;ht++)ut=ut.concat(ct[ht]);ut.forEach(function(ft){switch(te.routeInstructions.push(new RouteInstruction),te.routeInstructions[te.routeInstructions.length-1].duration=ft.duration,te.routeInstructions[te.routeInstructions.length-1].distance=ft.distance,te.routeInstructions[te.routeInstructions.length-1].code="",te.routeInstructions[te.routeInstructions.length-1].instruction="",te.routeInstructions[te.routeInstructions.length-1].geometry=ft.geometry,ft.name==="Valeur non renseignée"&&(ft.name=""),ft.instruction.type){case"turn":te.routeInstructions[te.routeInstructions.length-1].instruction+="Tourner";break;case"new name":te.routeInstructions[te.routeInstructions.length-1].instruction+="Continuer tout droit";break;case"depart":te.routeInstructions[te.routeInstructions.length-1].instruction+="Départ";break;case"arrive":te.routeInstructions[te.routeInstructions.length-1].instruction+="Arrivée";break;case"merge":te.routeInstructions[te.routeInstructions.length-1].instruction+="Rejoindre";break;case"ramp":te.routeInstructions[te.routeInstructions.length-1].instruction+="Prendre la bretelle";break;case"on ramp":te.routeInstructions[te.routeInstructions.length-1].instruction+="Prendre la bretelle";break;case"off ramp":te.routeInstructions[te.routeInstructions.length-1].instruction+="Prendre la sortie";break;case"fork":te.routeInstructions[te.routeInstructions.length-1].instruction+="Sur la bifurcation, prendre";break;case"end of road":te.routeInstructions[te.routeInstructions.length-1].instruction+="À la fin de la route, prendre";break;case"use lane":te.routeInstructions[te.routeInstructions.length-1].instruction+="Utiliser la file";break;case"continue":te.routeInstructions[te.routeInstructions.length-1].instruction+="Continuer";break;case"roundabout":te.routeInstructions[te.routeInstructions.length-1].instruction+="Au rond-point";break;case"rotary":te.routeInstructions[te.routeInstructions.length-1].instruction+="Au rond-point";break;case"roundabout turn":te.routeInstructions[te.routeInstructions.length-1].instruction+="Au rond point, tourner";break;case"notification":te.routeInstructions[te.routeInstructions.length-1].instruction+="";break;default:te.routeInstructions[te.routeInstructions.length-1].instruction+="?"+ft.instruction.type+"?";break}if(ft.instruction.modifier)switch(ft.instruction.modifier){case"uturn":te.routeInstructions[te.routeInstructions.length-1].instruction="Faire demi-tour";break;case"sharp right":te.routeInstructions[te.routeInstructions.length-1].instruction+=" complètement à droite";break;case"right":te.routeInstructions[te.routeInstructions.length-1].instruction+=" à droite";break;case"slight right":te.routeInstructions[te.routeInstructions.length-1].instruction+=" légèrement à droite";break;case"straight":te.routeInstructions[te.routeInstructions.length-1].instruction="Continuer tout droit";break;case"slight left":te.routeInstructions[te.routeInstructions.length-1].instruction+=" lègèrement à gauche";break;case"left":te.routeInstructions[te.routeInstructions.length-1].instruction+=" à gauche";break;case"sharp left":te.routeInstructions[te.routeInstructions.length-1].instruction+=" complètement à gauche";break;default:te.routeInstructions[te.routeInstructions.length-1].instruction+=" ?"+ft.instruction.modifier+"?";break}ft.instruction.exit&&(te.routeInstructions[te.routeInstructions.length-1].instruction+=`${ft.instruction.exit}e sortie`),ft.attributes.name&&((ft.attributes.name.nom_1_droite||ft.attributes.name.toponyme)&&(te.routeInstructions[te.routeInstructions.length-1].instruction+=" sur"),ft.attributes.name.nom_1_droite&&(te.routeInstructions[te.routeInstructions.length-1].instruction+=` ${ft.attributes.name.nom_1_droite}`),ft.attributes.name.toponyme&&(te.routeInstructions[te.routeInstructions.length-1].instruction+=` ${ft.attributes.name.toponyme}`))})}}if(!te){ne.onError.call(ne.scope,new ErrorService(MessagesResources.getMessage("SERVICE_RESPONSE_ANALYSE","json")));return}if(te.exceptionReport){ne.onError.call(ne.scope,new ErrorService(MessagesResources.getMessage("SERVICE_RESPONSE_EXCEPTION_2")));return}}else{ne.onError.call(ne.scope,new ErrorService(MessagesResources.getMessage("SERVICE_RESPONSE_EMPTY")));return}ne.onSuccess.call(ne.scope,te)}};function Route$1(ne){if(!(this instanceof Route$1))throw new TypeError(MessagesResources.getMessage("CLASS_CONSTRUCTOR","Route"));if(this.CLASSNAME="Route",CommonService.apply(this,arguments),this.logger=LoggerByDefault$1.getLogger("Gp.Services.Route"),this.logger.trace("[Constructeur Route (options)]"),!ne.startPoint)throw new Error(MessagesResources.getMessage("PARAM_MISSING","startPoint"));if(ne.startPoint.x===null)throw new Error(MessagesResources.getMessage("PARAM_MISSING","startPoint.x"));if(ne.startPoint.y===null)throw new Error(MessagesResources.getMessage("PARAM_MISSING","startPoint.y"));if(!ne.endPoint)throw new Error(MessagesResources.getMessage("PARAM_MISSING","endPoint"));if(ne.endPoint.x===null)throw new Error(MessagesResources.getMessage("PARAM_MISSING","endPoint.x"));if(ne.endPoint.y===null)throw new Error(MessagesResources.getMessage("PARAM_MISSING","endPoint.y"));if(ne.outputFormat&&ne.outputFormat!=="json"&&this.logger.warn("options.outputFormat could only be json"),this.options.outputFormat="json",this.options.resource=ne.resource||"bdtopo-osrm",this.options.startPoint=ne.startPoint,this.options.endPoint=ne.endPoint,this.options.viaPoints=ne.viaPoints||[],this.options.routePreference=ne.routePreference||"fastest",ne.graph?(ne.graph==="Voiture"&&(this.options.graph="car"),ne.graph==="Pieton"&&(this.options.graph="pedestrian")):this.options.graph="car",this.options.constraints=[],ne.constraints)if(Array.isArray(ne.constraints))for(var ee=0;ee<ne.constraints.length;ee++)this.options.constraints.push(ne.constraints[ee]);else throw new Error(MessagesResources.getMessage("PARAM_TYPE","constraints"));var te={},st={},ot={};if(ne.exclusions&&ne.exclusions.length!==0){this.logger.warn("options.exclusions is DEPRECATED !!");for(var ct=0;ct<ne.exclusions.length;ct++){if(typeof ne.exclusions[ct]=="string")ne.exclusions[ct]=ne.exclusions[ct].toLowerCase();else continue;ne.exclusions[ct]==="toll"&&(ot.constraintType="banned",ot.key="wayType",ot.operator="=",ot.value="autoroute",this.options.constraints.push(ot)),ne.exclusions[ct]==="tunnel"&&(te.constraintType="banned",te.key="wayType",te.operator="=",te.value="tunnel",this.options.constraints.push(te)),ne.exclusions[ct]==="bridge"&&(st.constraintType="banned",st.key="wayType",st.operator="=",st.value="pont",this.options.constraints.push(st))}}if(this.options.geometryInInstructions=ne.geometryInInstructions||!1,this.options.provideBbox=ne.provideBbox||!0,this.options.distanceUnit=ne.distanceUnit||"m",this.options.timeUnit=ne.timeUnit||"second",this.options.expectedStartTime=null,this.options.srs=ne.srs||"EPSG:4326",this.options.waysAttributes=ne.waysAttributes||[],!this.options.serverUrl){var ut=DefaultUrlService.Route.newUrl(
89);if(!ut)throw new Error("Url by default not found !");this.options.serverUrl=ut,this.logger.trace("Serveur URL par defaut : "+this.options.serverUrl)}}Route$1.prototype=Object.create(CommonService.prototype,{});Route$1.prototype.constructor=Route$1;Route$1.prototype.buildRequest=function(ne,ee){var te={resource:this.options.resource,startPoint:this.options.startPoint,endPoint:this.options.endPoint,viaPoints:this.options.viaPoints,provideBbox:this.options.provideBbox,constraints:this.options.constraints,distanceUnit:this.options.distanceUnit,timeUnit:this.options.timeUnit,graph:this.options.graph,geometryInInstructions:this.options.geometryInInstructions,routePreference:this.options.routePreference,srs:this.options.srs,waysAttributes:this.options.waysAttributes};this.request=RouteRequestFactory.build(te),this.request?ee.call(this,this.request):ne.call(this,new ErrorService(MessagesResources.getMessage("SERVICE_REQUEST_BUILD")))};Route$1.prototype.analyzeResponse=function(ne,ee){if(this.response){var te={distanceUnit:this.options.distanceUnit,timeUnit:this.options.timeUnit,response:this.response,outputFormat:this.options.outputFormat,rawResponse:this.options.rawResponse,onError:ne,onSuccess:ee,scope:this,geometryInInstructions:this.options.geometryInInstructions};RouteResponseFactory.build(te)}else ne.call(this,new ErrorService(MessagesResources.getMessage("SERVICE_RESPONSE_EMPTY")))};function ProcessIsoCurveParam(ne){if(!(this instanceof ProcessIsoCurveParam))throw new TypeError("ProcessIsoCurveParam constructor cannot be called as a function.");this.logger=LoggerByDefault$1.getLogger(),this.logger.trace("[Constructeur ProcessIsoCurveParam ()]"),this.options=ne||{},this.id=this.options.id,this.resource=this.options.resource,this.point=this.options.position,this.crs=this.options.srs,this.profile=this.options.graph,this.constraints=this.options.constraints,this.reverse=this.options.reverse,this.timeUnit=this.options.timeUnit,this.distanceUnit=this.options.distanceUnit,this.options.method==="distance"?(this.costType="distance",this.costValue=this.options.distance,this.distanceUnit==="m"&&this.costValue>=5e4&&(this.distanceUnit="km",this.costValue/=1e3)):(this.costType="time",this.costValue=this.options.time)}ProcessIsoCurveParam.CLASSNAME="ProcessIsoCurveParam";ProcessIsoCurveParam.prototype={constructor:ProcessIsoCurveParam,getLocation:function(){return this.point.x+","+this.point.y},getDistanceUnit:function(){return this.distanceUnit==="m"?"meter":this.distanceUnit==="km"?"kilometer":""},getConstraints:function(){var ne=[];if(this.constraints.length!==0)for(var ee=0;ee<this.constraints.length;ee++)ne.push(JSON.stringify(this.constraints[ee]));return ne.join("|")},getDirection:function(){return this.reverse?"arrival":"departure"}};ProcessIsoCurveParam.prototype.getParams=function(){var ne=[];return ne.push({k:"resource",v:this.resource}),ne.push({k:"point",v:this.getLocation()}),ne.push({k:"direction",v:this.getDirection()}),ne.push({k:"costType",v:this.costType}),ne.push({k:"costValue",v:this.costValue}),ne.push({k:"profile",v:this.profile}),ne.push({k:"timeUnit",v:this.timeUnit}),ne.push({k:"distanceUnit",v:this.getDistanceUnit()}),this.crs&&ne.push({k:"crs",v:this.crs}),this.constraints&&ne.push({k:"constraints",v:this.getConstraints()}),ne};function ProcessIsoCurveRequest(ne){if(this.logger=LoggerByDefault$1.getLogger("ProcessIsoCurveRequest"),this.logger.trace("[Constructeur ProcessIsoCurveRequest ()]"),!(this instanceof ProcessIsoCurveRequest))throw new TypeError("ProcessIsoCurveRequest constructor cannot be called as a function.");if(!ne)throw new Error(MessagesResources.getMessage("PARAM_EMPTY","options"));this.settings=ne,this.mode=this.settings.httpMethod||"GET"}ProcessIsoCurveRequest.prototype={requestString:null,constructor:ProcessIsoCurveRequest,processRequestString:function(){var ne="",ee=0;switch(this.mode){case"GET":this.logger.trace("Process GET Request");var te=new ProcessIsoCurveParam(this.settings),st=te.getParams();for(ee=0;ee<st.length;ee++){var ot=st[ee];ne&&(ne+="&"),ne+=ot.k+"="+ot.v}break;case"POST":this.logger.trace("Process POST Request");var ct={};ct.resource=this.settings.resource,ct.point=this.settings.position.x+","+this.settings.position.y,this.settings.method==="distance"?(ct.costType="distance",ct.costValue=this.settings.distance):(ct.costType="time",ct.costValue=this.settings.time),ct.profile=this.settings.graph,this.settings.reverse?ct.direction="arrival":ct.direction="departure",ct.constraints=this.settings.constraints,ct.distanceUnit=this.settings.distanceUnit,ct.timeUnit=this.settings.timeUnit,ct.crs=this.settings.srs,ne=JSON.stringify(ct);break;default:this.logger.error("No other HTTP method supported by the service !")}return this.logger.trace(ne),this.requestString=ne,this.requestString}};function ProcessIsoCurveResponse(){if(!(this instanceof ProcessIsoCurveResponse))throw new TypeError("ProcessIsoCurveResponse constructor cannot be called as a function.");this.message=null,this.id=null,this.location={},this.location.x=null,this.location.y=null,this.srs=null,this.geometry=null,this.time=null,this.distance=null}ProcessIsoCurveResponse.prototype={constructor:ProcessIsoCurveResponse};var ProcessIsoCurveResponseFactory={build:function(ne){var ee=LoggerByDefault$1.getLogger("ProcessIsoCurveResponseFactory");ee.trace(["ProcessIsoCurveResponseFactory::build()"]);var te=null;if(ne.response)if(ne.rawResponse)ee.trace("analyze response : raw"),te=ne.response;else{ee.trace("analyze response : json");var st;if(typeof ne.response=="string"?st=JSON.parse(ne.response):st=ne.response,te=new ProcessIsoCurveResponse,st){st.costType==="distance"?(te.time="",te.distance=st.costValue):(te.time=st.costValue,te.distance=""),te.message="",te.id="",te.srs=st.crs,te.geometry=st.geometry;var ot=st.point.split(",");te.location&&(te.location.x=ot[0],te.location.y=ot[1])}else{ne.onError.call(ne.scope,new ErrorService(MessagesResources.getMessage("SERVICE_RESPONSE_ANALYSE",ne.response)));return}if(te.exceptionReport){ne.onError.call(ne.scope,new ErrorService({message:MessagesResources.getMessage("SERVICE_RESPONSE_EXCEPTION",te.exceptionReport),type:ErrorService.TYPE_SRVERR,status:200}));return}}else{ne.onError.call(ne.scope,new ErrorService(MessagesResources.getMessage("SERVICE_RESPONSE_EMPTY")));return}ne.onSuccess.call(ne.scope,te)}};function ProcessIsoCurve(ne){if(!(this instanceof ProcessIsoCurve))throw new TypeError(MessagesResources.getMessage("CLASS_CONSTRUCTOR","ProcessIsoCurve"));if(this.CLASSNAME="ProcessIsoCurve",CommonService.apply(this,arguments),this.logger=LoggerByDefault$1.getLogger("Gp.Services.ProcessIsoCurve"),this.logger.trace("[Constructeur ProcessIsoCurve (options)]"),!ne.position)throw new Error(MessagesResources.getMessage("PARAM_MISSING","position"));if(ne.position.x===null)throw new Error(MessagesResources.getMessage("PARAM_MISSING","position.x"));if(ne.position.y===null)throw new Error(MessagesResources.getMessage("PARAM_MISSING","position.y"));if(!ne.time&&!ne.distance)throw new Error("Parameter (s) 'distance' missing. Parameter time to calculate an isochrone, parameter distance for an isodistance");if(!ne.time&&ne.distance&&(this.options.method="distance",this.options.time&&delete this.options.time),ne.time&&!ne.distance&&(this.options.method="time",this.options.distance&&delete this.options.distance),this.options.method=this.options.method||"time",this.options.resource=ne.resource||"bdtopo-valhalla",this.options.exclusions=ne.exclusions||[],this.options.reverse=ne.reverse||!1,this.options.srs=ne.srs||"EPSG:4326",this.options.distanceUnit=ne.distanceUnit||"m",this.options.timeUnit=ne.timeUnit||"second",ne.smoothing&&this.logger.warn("options.smoothing is DEPRECATED"),this.options.smoothing=!1,ne.holes&&this.logger.warn("options.holes is DEPRECATED"),this.options.holes=!1,ne.graph?(ne.graph==="Voiture"&&(this.options.graph="car"),ne.graph==="Pieton"&&(this.options.graph="pedestrian")):this.options.graph="car",this.options.constraints=[],ne.constraints)if(Array.isArray(ne.constraints))for(var ee=0;ee<ne.constraints.length;ee++)this.options.constraints.push(ne.constraints[ee]);else throw new Error(MessagesResources.getMessage("PARAM_TYPE","constraints"));var te={},st={},ot={};if(ne.exclusions&&ne.exclusions.length!==0){this.logger.warn("options.exclusions is DEPRECATED !!");for(var ct=0;ct<ne.exclusions.length;ct++){if(typeof ne.exclusions[ct]=="string")ne.exclusions[ct]=ne.exclusions[ct].toLowerCase();else continue;ne.exclusions[ct]==="toll"&&(ot.constraintType="banned",ot.key="wayType",ot.operator="=",ot.value="autoroute",this.options.constraints.push(ot)),ne.exclusions[ct]==="tunnel"&&(te.constraintType="banned",te.key="wayType",te.operator="=",te.value="tunnel",this.options.constraints.push(te)),ne.exclusions[ct]==="bridge"&&(st.constraintType="banned",st.key="wayType",st.operator="=",st.value="pont",this.options.constraints.push(st))}}if(this.options.outputFormat=typeof ne.outputFormat=="string"?ne.outputFormat.toLowerCase():"json",ne.outputFormat&&ne.outputFormat!=="json")throw new Error(MessagesResources.getMessage("PARAM_NOT_SUPPORT","outputFormat"));if(this.options.outputFormat="json",!this.options.serverUrl){var ut=DefaultUrlService.ProcessIsoCurve.newUrl(
89);if(!ut)throw new Error("Url by default not found !");this.options.serverUrl=ut,this.logger.trace("Serveur URL par defaut : "+this.options.serverUrl)}}ProcessIsoCurve.prototype=Object.create(CommonService.prototype,{});ProcessIsoCurve.prototype.constructor=ProcessIsoCurve;ProcessIsoCurve.prototype.buildRequest=function(ne,ee){try{var te=new ProcessIsoCurveRequest(this.options);if(!te.processRequestString())throw new Error(MessagesResources.getMessage("SERVICE_REQUEST_BUILD"));this.request=te.requestString}catch(st){ne.call(this,new ErrorService(st.message));return}ee.call(this,this.request)};ProcessIsoCurve.prototype.analyzeResponse=function(ne,ee){if(this.response){var te={response:this.response,outputFormat:this.options.outputFormat,rawResponse:this.options.rawResponse,onSuccess:ee,onError:ne,scope:this};ProcessIsoCurveResponseFactory.build(te)}else ne.call(this,new ErrorService(MessagesResources.getMessage("SERVICE_RESPONSE_EMPTY")))};var Services={getConfig:function(ne){var ee=new Config$1(ne);ee.call()},getAltitude:function(ne){var ee=new Alti(ne);ee.call()},geocode:function(ne){var ee=new Geocode(ne);ee.call()},reverseGeocode:function(ne){var ee=new ReverseGeocode$1(ne);ee.call()},autoComplete:function(ne){var ee=new AutoComplete(ne);ee.call()},route:function(ne){var ee=new Route$1(ne);ee.call()},isoCurve:function(ne){var ee=new ProcessIsoCurve(ne);ee.call()}};const servicesVersion=Pkg.version,servicesDate=Pkg.date;var Gp={};Gp.servicesVersion=servicesVersion;Gp.servicesDate=servicesDate;Gp.Protocols={};Gp.Protocols.XHR=XHR;Gp.Services=Services;Gp.Services.DefaultUrl=DefaultUrlService;Gp.Services.AltiResponse=AltiResponse;Gp.Services.Alti={};Gp.Services.Alti.Elevation=Elevation;Gp.Services.AutoCompleteResponse=AutoCompleteResponse;Gp.Services.AutoComplete={};Gp.Services.AutoComplete.SuggestedLocation=SuggestedLocation;Gp.Services.Config=Config$1;Gp.Services.IsoCurveResponse=ProcessIsoCurveResponse;Gp.Services.RouteResponse=RouteResponse;Gp.Services.Route={};Gp.Services.Route.RouteInstruction=RouteInstruction;Gp.Error=ErrorService;Gp.Helper=Helper$1;var LoggerByDefault={getLogger:function(ne){if(typeof ee>"u"){var ee={};ee.env={VERBOSE:!1}}ee.env.VERBOSE?loglevelExports.enableAll():loglevelExports.disableAll();var te=ne||"default";return loglevelExports.getLogger(te)},disableAll:function(){var ne=loglevelExports.getLoggers();for(const ee in ne)Object.hasOwnProperty.call(ne,ee)&&ne[ee].disableAll()},enableAll:function(){var ne=loglevelExports.getLoggers();for(const ee in ne)Object.hasOwnProperty.call(ne,ee)&&ne[ee].enableAll()}};window.Gp&&(window.Gp.Logger=LoggerByDefault);var ProxyUtils={proxifyUrl:function(ne,ee){var te=LoggerByDefault.getLogger("proxifyUrl");if(!ee||!ee.hasOwnProperty("proxyUrl")||ee.proxyUrl===null||ee.proxyUrl.trim().length===0)return ne;if(ee.noProxyDomains&&Array.isArray(ee.noProxyDomains)&&ee.noProxyDomains.length>0){for(var st in ee.noProxyDomains)if(te.trace("[ProxyUtils] proxifyUrl : analyzing "+ee.noProxyDomains[st]),ne.indexOf(ee.noProxyDomains[st])!==-1)return te.info("[ProxyUtils] proxifyUrl : "+ne+" found in noProxyDomains list ("+ee.noProxyDomains[st]+")."),ne}return ee.proxyUrl+encodeURIComponent(ne)}},logger$J=LoggerByDefault.getLogger("GfiUtils"),Gfi={getLayerFormat:function(ne){var ee=typeof ne.getType=="function"?ne.getType():null,te=ne.getSource();if(ee){if(ee==="VECTOR"||ee==="VECTOR_TILE")return"vector";if(ee==="TILE")return te.tileGrid?"wmts":"wms";if(ee==="IMAGE")return"wms"}else{if(te instanceof TileWMS||te instanceof ImageWMS)return"wms";if(te instanceof WMTS$1)return"wmts";if(te instanceof VectorSource||te instanceof VectorTile)return"vector"}return"unknown"},displayInfo:function(ne,ee,te,st,ot){if(logger$J.trace("[Gfi] : displayInfo..."),st||(st="text/html"),te!==null){var ct=null,ut=null,dt=te;dt=dt.replace(/\n/g,""),dt=dt.replace(/(>)\s*(<)/g,"$1$2");var ht=typeof window<"u"?window:null;if(typeof exports=="object"&&window===null){var ft=require("@xmldom/xmldom").DOMParser;ut=new ft,ct=ut.parseFromString(dt,st)}else if(ht.DOMParser)ut=new ht.DOMParser,ct=ut.parseFromString(dt,st);else if(ht.ActiveXObject)ct=new ht.ActiveXObject("Microsoft.XMLDOM"),ct.async=!1,ct.loadXML(dt);else return logger$J.log("Incompatible environment for DOM Parser !"),!1;var pt=ct.getElementsByTagName("body");if(pt&&pt.length===1&&!pt[0].hasChildNodes())return!1;var mt=document.createElement("div");mt.className="gp-feature-info-div";var yt=document.createElement("button");yt.className="gp-styling-button closer",yt.onclick=function(){return ne.featuresOverlay&&(ne.removeOverlay(ne.featuresOverlay),ne.featuresOverlay=null),!1};var vt=document.createElement("div");return vt.className="gp-features-content-div",vt.innerHTML=te,mt.appendChild(vt),mt.appendChild(yt),ne.featuresOverlay&&(ne.removeOverlay(ne.featuresOverlay),ne.featuresOverlay=null),ne.featuresOverlay=new Overlay({element:mt,autoPan:ot.autoPan,autoPanAnimation:ot.autoPanAnimation,autoPanMargin:ot.autoPanMargin,positioning:"bottom-center",insertFirst:!1,stopEvent:!0}),ne.addOverlay(ne.featuresOverlay),ne.featuresOverlay.setPosition(ee),ne.featuresOverlay.render(),!0}},features2html:function(ne,ee){var te=document.createElement("div");return ee.forEach(function(st){var ot=st.getProperties();if(ot.hasOwnProperty("render"))te.insertAdjacentHTML("beforeend",ot.render);else{if(ot.hasOwnProperty("name")){var ct=document.createElement("div");ct.className="gp-att-name-div",ct.insertAdjacentHTML("afterbegin",ot.name),te.appendChild(ct)}if(ot.hasOwnProperty("description")){var ut=document.createElement("div");ut.className="gp-att-description-div",ut.insertAdjacentHTML("afterbegin",ot.description),te.appendChild(ut)}var dt=null,ht=!1,ft=null,pt=null,mt=null,yt=["fill","fill-opacity","label-stroke","stroke","stroke-opacity","stroke-width","marker-symbol","marker-color","marker-size","geometry","value","name","description","styleUrl","extensionsNode_","icon"];for(dt in ot)if(ot[dt]!==void 0&&yt.indexOf(dt)===-1){ht||(ft=document.createElement("div"),ft.className="gp-att-others-div",pt=document.createElement("ul"),ht=!0),mt=document.createElement("li");var vt=document.createElement("span");vt.className="gp-attname-others-span",vt.appendChild(document.createTextNode(dt+" : ")),mt.appendChild(vt),mt.appendChild(document.createTextNode(ot[dt])),pt.appendChild(mt)}pt&&(ft.appendChild(pt),te.appendChild(ft))}},ne),te.hasChildNodes()||(te=null),te},layerGetFeatureAtCoordinates:function(ne,ee,te){var st=ne.getPixelFromCo
89ordinate(te);return ne.hasFeatureAtPixel(st,function(ot){return ot===ee})},displayVectorFeatureInfo:function(ne,ee,te,st){var ot=ne.getPixelFromCoordinate(ee),ct=[];if(ne.forEachFeatureAtPixel(ot,function(dt,ht){(!te||te.indexOf(ht)>-1)&&ct.push(dt)}),ct.length===0)return!1;var ut=this.features2html(ne,ct);return ut===null?!1:(this.displayInfo(ne,ee,ut.innerHTML,"text/html",st),!0)},displayFeatureInfo:function(ne,ee,te,st,ot){for(var ct={},ut=0;ut<te.length;ut++){var dt=te[ut],ht=dt.obj.getZIndex();ct[ht]||(ct[ht]=[]),ct[ht].push(dt)}var ft=[],pt=Object.keys(ct);pt.sort(function(Ut,Vt){return Vt-Ut});for(var mt=0;mt<pt.length;mt++)for(var yt=pt[mt],vt=0;vt<ct[yt].length;++vt){var _t=ct[yt][vt].obj,bt=ct[yt][vt].infoFormat||"text/html",xt=!0;if(_t.minResolution&&_t.minResolution>ne.getResolution()&&(xt=!1),xt&&_t.maxResolution&&_t.maxResolution<ne.getResolution()&&(xt=!1),_t.getVisible()&&xt){var Mt=this.getLayerFormat(_t);if(Mt==="vector"){this.layerGetFeatureAtCoordinates(ne,_t,ee)&&ft.push({format:Mt,scope:this,coordinate:ee});continue}else if(Mt!=="wms"&&Mt!=="wmts"){logger$J.log("[ERROR] DisplayFeatureInfo - layer format '"+Mt+"' not allowed");continue}var Ot=ne.getView().getResolution(),kt=null;Mt==="wmts"?kt=_t.getSource().getFeatureInfoUrl.call(_t.getSource(),ee,Ot,ne.getView().getProjection(),{INFOFORMAT:bt}):kt=_t.getSource().getFeatureInfoUrl.call(_t.getSource(),ee,Ot,ne.getView().getProjection(),{INFO_FORMAT:bt}),ft.push({format:bt,url:ProxyUtils.proxifyUrl(kt,st),scope:this,coordinate:ee})}}var Nt=null;function Gt(Ut,Vt,Ht){if(Ut.length===0)return;var zt=0;function jt(Wt){zt++,Wt||zt===Ut.length?Ht():Vt(Ut[zt],jt)}Vt(Ut[0],jt)}var Bt=this;Gt(ft,function(Ut,Vt){if(Ut.format==="vector"){if(!Nt){Nt=[];for(var Ht=0;Ht<pt.length;Ht++)for(var zt=pt[Ht],jt=0;jt<ct[zt].length;++jt)Nt.push(ct[zt][jt].obj)}Vt(Ut.scope.displayVectorFeatureInfo(ne,Ut.coordinate,Nt,ot))}else Gp.Protocols.XHR.call({url:Ut.url,method:"GET",scope:Ut.scope,onResponse:function(Wt){var Jt=!1;(Wt.trim().length===0||Wt.indexOf("ServiceExceptionReport")!==-1||Wt.indexOf("java.lang.NullPointerException")!==-1||Wt.indexOf("java.lang.OutOfMemoryError")!==-1||Wt.indexOf("not queryable")!==-1)&&(Jt=!0);var Qt=!Jt&&Bt.displayInfo(ne,Ut.coordinate,Wt,"text/html",ot);Vt(Qt)},onFailure:function(Wt){logger$J.log(Wt),Vt(!1)}})},function(){logger$J.trace("Finish sync to GFI !")})},getPosition:function(ne,ee){if(ne.coordinate)return ne.coordinate;var te=[0,0];if(ne.offsetX||ne.offsetY)te[0]=ne.offsetX,te[1]=ne.offsetY;else if(ne.pointerType==="touch"){var st=ne.pointers[0];te[0]=st.pageX,te[1]=st.pageY}var ot=ee.getCoordinateFromPixel(te);return ot},onDisplayFeatureInfo:function(ne,ee){if(ee.isActive()){logger$J.trace(ne);var te=ee.getMap();if(ne.type==="contextmenu"||ne.type==="dblclick")ne.preventDefault();else if(ne.type==="singleclick"){for(var st=te.getInteractions().getArray(),ot=0;ot<st.length;ot++)if(st[ot].getActive()&&(st[ot]instanceof Select||st[ot]instanceof Modify||st[ot]instanceof Draw))return}var ct={};ee._proxyUrl&&(ct.proxyUrl=ee._proxyUrl),ee._noProxyDomains&&(ct.noProxyDomains=ee._noProxyDomains);var ut={};ee._autoPan&&(ut.autoPan=ee._autoPan),ee._autoPanAnimation&&(ut.autoPanAnimation=ee._autoPanAnimation),ee._autoPanMargin&&(ut.autoPanMargin=ee._autoPanMargin);for(var dt=[],ht=0;ht<ee._layers.length;++ht){var ft=ee._layers[ht].event?ee._layers[ht].event:ee._defaultEvent;if(ft===ne.type){var pt=dt.push(ee._layers[ht])-1;dt[pt].infoFormat||(dt[pt].infoFormat=ee._defaultInfoFormat)}}var mt=this.getPosition(ne,te);this.displayFeatureInfo(te,mt,dt,ct,ut)}}};window.ol&&(window.ol.gp?window.ol.gp.GfiUtils=Gfi:window.ol.gp={GfiUtils:Gfi});class Control extends BaseObject{constructor(ee){super();const te=ee.element;te&&!ee.target&&!te.style.pointerEvents&&(te.style.pointerEvents="auto"),this.element=te||null,this.target_=null,this.map_=null,this.listenerKeys=[],ee.render&&(this.render=ee.render),ee.target&&this.setTarget(ee.target)}disposeInternal(){var ee;(ee=this.element)==null||ee.remove(),super.disposeInternal()}getMap(){return this.map_}setMap(ee){var te;this.map_&&((te=this.element)==null||te.remove());for(let st=0,ot=this.listenerKeys.length;
89st<ot;++st)unlistenByKey(this.listenerKeys[st]);if(this.listenerKeys.length=0,this.map_=ee,ee){const st=this.target_??ee.getOverlayContainerStopEvent();this.element&&st.appendChild(this.element),this.render!==VOID&&this.listenerKeys.push(listen(ee,MapEventType.POSTRENDER,this.render,this)),ee.render()}}render(ee){}setTarget(ee){this.target_=typeof ee=="string"?document.getElementById(ee):ee}}let uidCounter_=0;var Helper={detectSupport:function(){var ne=!0,ee=window.navigator.userAgent.toLowerCase();return(ee.indexOf("iphone")!==-1||ee.indexOf("ipod")!==-1||ee.indexOf("ipad")!==-1||ee.indexOf("android")!==-1||ee.indexOf("mobile")!==-1||ee.indexOf("blackberry")!==-1||ee.indexOf("tablet")!==-1||ee.indexOf("phone")!==-1||ee.indexOf("touch")!==-1)&&(ne=!1),(ee.indexOf("msie")!==-1||ee.indexOf("trident")!==-1)&&(ne=!0),ne},assign:function(ne,ee){ne=ne||{};for(var te in ee)ee.hasOwnProperty(te)&&(ne[te]=ee[te]);return ne},mergeParams:function(ne,ee,te){if(!(typeof ne>"u"||typeof ee>"u")){typeof te>"u"&&(te=!0);for(var st in ee)ee.hasOwnProperty(st)&&(typeof ee[st]=="object"?ne.hasOwnProperty(st)?this.mergeParam
89s(ne[st],ee[st],te):ne[st]=ee[st]:ne.hasOwnProperty(st)?te&&(ne[st]=ee[st]):ne[st]=ee[st])}},getUid:function(ne,ee){return ee&&ee.id?ee.id:ne+ ++uidCounter_}},logger$I=LoggerByDefault.getLogger("interactions"),Interactions={_extensions:["Measures","ElevationPath","Drawing"],_options:{current:null,clean:null},unset:function(ne,ee){logger$I.trace("unset()");var te={};Helper.mergeParams(te,this._options),Helper.mergeParams(te,ee);for(var st=ne.getInteractions().getArray(),ot=0;ot<st.length;ot++)if(st[ot].getActive()&&(st[ot]instanceof Draw||st[ot]instanceof Select||st[ot]instanceof Modify)){var ct=st[ot].getProperties(),ut=ct.name;if(typeof ut<"u"&&this._extensions.indexOf(ut)>-1){if(te.current&&te.current===ut)continue;st[ot].setActive(!1);var dt=ct.source;if(typeof dt<"u"&&dt instanceof Control){for(var ht in te)if(te.hasOwnProperty(ht)){if(ht==="current")continue;if(typeof dt[ht]=="function"){var ft=Array.isArray(te[ht])?te[ht]:[te[ht]];dt[ht].apply(dt,ft)}}}}}}},Marker={lightOrange:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADMAAAAgCAYAAAC/40AfAAASf3pUWHRSYXcgcHJvZmlsZSB0eXBlIGV4aWYAAHjapZpptuO4DYX/cxVZAsEBIJfD8ZzsIMvPB8mvpq5OupN6Xc8uW5Yo4OIOdIfzr3/e8A/+lNo1lGpNu2rkT+mlp8GTFt8/4/ktsTy/nz85f96Tn18P6fN6TLzkB30ObPo5/ut1+XaC92HwrP5worY+b8yf3+jlc/72y4k+F8q+Il/F/pyof06U0/uGfE4w3tuK2pv9eAvzvI/7607a+zf4r/tVE3sffv13Maq3K9fJKZ0sOfL7U6ycsv/NIQ+eVH6nXDhQsj3P31fssxIK8rs6ffvTWdH1pZbfHvRTV749+6Vbnwpwa790q6TPIfmXIuu3x9++HqT+vitP6X+4cmmfZ+nn10eVz4p+qf5T/Lvbfe6ZuxhFKbV+burrFp9nHDe5hF+6BZamdEfBUOPRfzo/jZtfQGHHFSc/S7ok2nWlyJYhV87zuGSxxJJOSMaTlFbKz4stW+ppZe9f8R+5yXLPOze6uJ62l5y+rUWey/a4wnO1xpW3cGgSTiZ85G//hL/7gXt9FES8luOtFetKyYvNMrxz/pvD6IjcT1HrU+Cvn1//eF8zHaxeZR+Rzqnne4r5NvPFVn4anTmw8vjOoNj+nIAScenKYiTTAbomuYpKtJRMhEI2GjRYus/MpANSa9osMpWcld605JfmIybPoakmXg68DpnRiZqVOWt0aNCsUir4sdLA0Ki5llqrVqut9jo0a9GqqqZOisOylWDV1MyadRstt9Jq02attd5GTz1DmhBpt95672NwzcGZB58eHDDGTDPPMmuYOm222edYwGeVVZcuW231NXbaecMfW7fttvseRw5QOuXUo8dOO/2MC9RuDrfcevXabbff8a1rn7b+4edvdE0+XUtPp/xA+9Y1XjX7OoU4nVTvGQ1LoQgdN28BgE7es9iklOSd857FDv3lmlhk9Z5t8Y7RwXIk1StfvQvp7ah37v/qW7DyU9/S/9q54K37m537Y99+17XtJLyejr1T6EWNmenjmJEa/zGtf3wMnycdEnrmgScKh+W2rFIB58FVtiU7CVaLdS1hHXPoPkvVW5b2oXDBZM5kyN7VVS1pzsLdAoljo1+6tE5b+ciweuqaTNwEgrpb3atwvSOzw3Aa7Git98o4VD3nq3Nz/50yiEw9MXMCh+hOfU+a3euZl0IjZX1tW/VQIF0lHO5kjFqF2hvlvCOvrEi+yhlzzHKu6fCXapZzFpUqw+TMUoU1TrM8K8eEt2CcvwpvlcXjErqqEPqJVIoz1cQ7CdQOB0qqW1QrkrCsK6Afva0R7pobdpd7pG47/Z7UpwDkCm4ql9Y8G2Oi4+S0rJ3LiVdtruM9Jb1Ja6ESIbdenfb7pXSsmRIcyTStcG9xoGh7gbLD1W/ra462dTTubFKUsWyMLTThhmZUszvGdgZEZizn7D1Pvb3VmlkuoOsHSOIrxmpt0EbpgB81ynTMBlDt4TB1Vq5U0EsVt3mfgfWpNiTznwumVxaPWHprbym/Svr9MfzZG/QkgrS9IGdlYQ6i4zdpbQ/m9sbCKqv0ZKwrI5D8c+V9b9uzAIzM/Z4lm07xdl/X4aOlTekLNI+orHQcAKRJpdnQM8CoBLRYV9plleJl8yJpa3OPe+a+2ljD2pnF7GnxzrzWZijn2Ke3SytrYTJHl3CK9lQgFlNNC3tc+vJx88VLOxAB9avWjwIU0L+9m61oK7lrkrd4DEFof16knx/5sM6pOzqQ89r9dFase7a2kvXApdQOnAIH5T1mG+BM+ikt1QrNMltZKx0fC2XliVbK2enAuDk5P93TQXSY4nS4IchETYYPGGuNXfPJe8dboIixZ13bJ3mSES4KnZel1RgaaOZA8OcESKbuDaQOmjUXww93t1szsyHSFGynylw7HKfe096ywI75p6qE/1AWLgx4tMx14z2j6kyisec64EDuBCwwy/Hkm8cNzHK6iw7YiNbnVQpjdjOH0neUT9rCo7fozG2DjiOBKQKQC/0ivclYZtIwF7fDPLR2xsKkM0cZc3h3ubjIPgBmOYr3S+fTa5Zz1mfVLToJjbVH2GgN1DhKaQuluyAVe7PRRMRsWBqIgqYBoNC+NuDliY1RKG/iF5V5dztbGlQLAybsk82qaE3fzPS1zo1n5ygmKC4wsUvbiNBGerilBnJoSE4DG6x13BXWzXBv4vYFstG1VoOoC6oGPXX/UIRoN9Ib52D6Juin06jZss0ksVys5ZihjGxtMgDdLmq0EzXjzAC3GYCBXfJmwiQVEFzdurMKcZKkpyctqt0wSD0I04f4UnjXutEEdDzPuPOKKFPiKejaATr81NlRGzDe3HRwNPkVbr8UG4ZhJjM8BolsXMthNArGnMEfadoZhuRvosTdXPLOb6A0JOrIp3/hv06r4ESq1wpWZVzvZn6y/7vgYoE/RL0HgLxUNSFWB62gtiN2hhEcIbWpICkUOvvAoA/4gwScv+C0v8MJXQ+Nhqg1bgvZyqdP8vWsKBV8RUCGpsq1Orzz87Z547iFBkQcRUQrWKA86w2AavJxAguRhd6xoAOTYog6816YrroLXcGYxwUwoyFHxbtxwRY8c6zO2TQAYZkL53DIRQdBfHU1oxhJNzYpyVhcSYrFDSNPjwSTWZx0C7pf0DkOS8j9rA2q42RUpIpREda6Y4OVDMScySKSXydzjIPsENagrkkhcCt4BqZhB/N2onoPdi7ctdN3/3Qrd4qgPo8DCaYdnU9QE0W7h/vF5XGz3/AdFCBL/iqDfzDxQUSMGzfioPgJEvYDInjPyQaugchuEgbt4iCQY5ZDnwpnKTiqgj3mLhg1NCq+QwLyYPY43chRPVrq0WriYlciCNXr9VZ3eICCMIBS4nhvGEAIw0qEhaAkDex6p7qYKmQHB1AbnfAkxigx1QyOzGYXWYL/CubfGEbWGIDhxA3eiL9PpQDHRUgAbReX0ZAINyI0tQyUgcVzKFiDBOCFjXMlQ6QIYkMb7saZZliZxQwEHn7o2G6Dw8gKBXCjW9HZ5/SKXUR+OGGzMloZaAvkmmvAMyBcC4kU4YA7WToAmhlidyGKa0VSxUljYxnPcmeRgXsRbqRzbRBckHloBPPrw4Zr9/nkeMzb5VrMpFf9AdVcbrK+uoGUwtqrX/d3dJMJxvohLt7qvV04IsR7p1zM26eJ1/k1x//g+d/H8D4BAfSL+aSxxKRFa8VwUdeY6QURKy/NDAFrToKxoZTYfM331eZeAgxflY4XBZ69YaDqBP0056yGHyqnI9Rm+K1p4rSSFV9wIQGusB4PwEsdXUP9DnZtZ94jN0xuBSPBvXtoV2+0IasUFkXDKp3lXoDfe5DX9kLTOsqO9cOHgM9dqcdiEIusVMgFQy508wSbpxADbn2mkuCEx6EsXBGIAZaI1QujONgyMWaU1cti1qaQEDl1Vj7vsZFkI2m+A1t7/N49QJhK5OIUe/mWkE
895sXwYa+J+lLKYCuDVajRjq3pAsYg3SQnkfQcb5LTz7xuPjv3k+dmCWUDi39Gl2ps4dXcYVJ+59d99wRJHQ9LtAD2XCRjYYkN8YUkIsrfFM5Bua5BDFyIKdxluACNO7zFkGegGi99np8n9j/ehWp2oYY4SOQWj9XHz1WcHWQL0BTYasCIpgkjyEg2C5TjD10bCGFz/PM8b5+O4Qk/m+Q5382uG5+CN3633jvfzjO4W5+TohQ8+pxIiNEfMI6VGFDe3Vd7VByDt4j0ebGrIEM2FxoZRLB0ld8XEkKBgMwyDC7QsJysobUBnjBgjRwxnsynv/tfjqx2VNJC2GPT4rjSDBV4jDl/3nVG6B+hHJ/bY9TyerWAXsIZHtzugCQWRAOXCVZl5Xxtv3fWErmHaDtJp8l2EikIXuKSylj/uCveU2fazmTH53yCEnm+KTd2E8hu4qTrIvHDJGlUkZS4IXFcPl7A8fAbrNqGf3Qh0xQTZ0SOsbIwDBLK/x9DWhsopPIiRsgHCMYjfP9wzMjbM37G0lr8B9aaI3NOogBL6Xs2HMOSH289KUQKo/Buvw+9qVTK6UUwqBuBPJFVPro5AfXk+Hn4zJjMj3RBR5J8BC2PqEG63CIG16OTfx+pr5fu30UWcS0DFuDuKHtdFjnLuM6psYkD2+oF5CjVvhS0CnoHwa/WNusfqXim5qQpjM1ZuFIjyYKi4vxKw4DZoiVeu6o4ZKaXzoURuq4nOHt6Fa9ATnU7ncxo7g6UE+0kYg8fExDzwLcq3ErIGXRo5wH+cRiu336mjg3/3hG2IT6ohLvVXuTCXB0dhTZ+++gRgyV/xAITch2WCqEVVrzPAxLgXRI1voOfSbmnM3/CXgYh8rPhxfDFL225b2jePCd7J7H2GzAwgjZgFyJj8SfsUItFBpFvCwUUQDA4ArY0Ch61SNvFZ8rw4vVhHyw5p9f3bEFDt1PjrID05RjBzVgqbJUJXSLARoRkQCNSZf5olAkobc12LqI73yrQJsCI4mLYS/rubukwKjPDlOFkPFgSrnRyNwuAcbiRm94aPI9zdmLUkujYQqcYLjaGRIFnZ9jYRcLJlv/hX30BiQgE6j5A+dU2RwwDKwGdzTAYnH2f2ctN0O7I1HTtBURMBcroAlYgjM8GYBFvPdA+imolWmjWHi4gzYfRqHKRuMrUQIsUDygBhBxs1jo+CJ/IRoNDEAuvemMJCC/Xg00L/U+v7I1Ly3qnhB/Jnv36SmOB4fM0A35hihOAcqHpM4x/zAdUx8e02G/BVzGxEpEBsqKathzVgltlb3EfNtLcNVGPPt0TpvbA+eMs3SfMcK04ln8fXDhgIiSOwUm4lj8jugXZhmRg6AHMb9gijciwnTDnNhKBXDI9m3iD38ciZ0YLpbxWho2ISpAY66Q2ZZgwv9YyzHM2QkASaOBrCM9OP4q+8xXnvSaycEuDbB4cHeJeEM08EstvvA765nu7r4RjF5YxNiO742DawE9XUMghITWK87c1sOWHBLFCdbxFqYR1wcoI8cBOX6jFuFBLCGvrO4QGX1bQxLMyX1IOX6X7bSfq7geCNzFbDeFfsL4sAm9acvxwtCFjQCGbaQ5SXYzrfVaxzOdTr6hCG35oVdOc2NjGrlX48wehxksic+UH1zZFGbgTZ0K7g4w03xafwEKo3qmAT1ovmmWMLjkxQfaNJsfbCSfP/Bjam3D72Oor77aumCQix5g05JlNJPOM40mKCcXes2BgAqwbwjX9C6YD5GLvF1Btsafh9ONbfSezJDaSKHSLBCtccxqI9oQpBKdPOW8ElM6cLAUEp480Jj9F8ZWZlutjwrw34IF3Ru/nXGEPVdmdKGfy3h2xPSckwZ++JVZyTNxYgPu4Xr7t9dEwC884PvdGPaUoDyS8JT24R1WOfECBGsahPUmDtm+cTW6WDpaAjUzlyS1kncYJEIDAiZyxN0E5/siGdvg+9mUv9KxWpkpJZHQvPvaxZnxBcgaAiXh+X94PwInyIy3xvwy/LG3eRYB/K+3Rv/0tbkr5t1/t2Cf/2ywR63xthCV3sBUwghIvm+R2nAiiQx9m1ALsHxHN59A48pBKgBad+otn9vQ+k4H3eDprO46VGMaI8i2WtEMWRIDaGfMTZn+VEuSgW8+gwAObmZIcwd38EfjH/1vT7fEMfSUMtuvYNP3y02Lp8384OnnB5SE3yl2JVLXkupN8SeLMR0edpWPOdiYAzEoLsnU06ADN0M4jS0g3qw/pl6ie/3qbB8IAwhZKSSWdYi2UeyRcdX7oYRIJHqRg3ohnS35cvNC0hB48rizpKbfgIpJ4K8UTXsMyPJS8f3molSYALLgj3yJXXfIQUczfMrnTGm9vXmbqT9Cxm1gL0Av0xdB/GsoGePVRtqwDiU7NkOC5OoSHUj2313k5QM26h2luk7Bj3ZCNe/pU0Qy4KK4CUIssMEE7uGyWV2uHjb+uw+wh8kX2daUJevGzUyICdt1kJizKnhNN9fJdvgDiNkP/wLw3jTrngRHBUjR54lJbBuOeAjo47O6yybKKQ1+BYN9E7SdXSh7kg7fhkCp+XcFTAgpvpIdDeDnincsPl3LFAaQHpywRwhptNoKXGKHlun1+/eKorKDU6M+vPdy4TRM3hBqOByFyqMtsOze740DPsC8pAEAoG/Lv5/CMA8eARSjpFJ/D3fpm7bv13y/1/gYgKdVn1LkvDNrMDBe5OOZLrnE6TOLjSDqjEAmIBNMzyKH+RuFd8whbrQq0Eg9sSGkBz/Ho6Yxe0G6mANNHo8de/ikteZX99WyNEZrVJf5T6opO+8RJLMjhgqGLMdsOXbSlqCutkhdPhvUMPc/H7Tgqm9nnHDvwF6YngoNZcUVAAAAYRpQ0NQSUNDIHByb2ZpbGUAAHicfZE9SMNAHMVfU0tFKh3sUMUhQ3WyICriqFUoQoVSK7TqYHLpFzRpSFJcHAXXgoMfi1UHF2ddHVwFQfADxNXFSdFFSvxfUmgR48FxP97de9y9A4RmlalmzzigapaRSSbEXH5VDL4igCjCGERIYqY+l06n4Dm+7uHj612cZ3mf+3P0KwWTAT6ReJbphkW8QTy9aemc94kjrCwpxOfEYwZdkPiR67LLb5xLDgs8M2JkM/PEEWKx1MVyF7OyoRJPEccUVaN8IeeywnmLs1qts/Y9+QtDBW1lmes0h5HEIpaQhggZdVRQhYU4rRopJjK0n/DwDzn+NLlkclXAyLGAGlRIjh/8D353axYnJ9ykUAIIvNj2xwgQ3AVaDdv+Prbt1gngfwautI6/1gRmPklvdLTYERDeBi6uO5q8B1zuANEnXTIkR/LTFIpF4P2MvikPDNwCfWtub+19nD4AWeoqdQMcHAKjJcpe93h3b3dv/55p9/cDPGdykYtTXU4AAA0aaVRYdFhNTDpjb20uYWRvYmUueG1wAAAAAAA8P3hwYWNrZXQgYmVnaW49Iu+7vyIgaWQ9Ilc1TTBNcENlaGlIenJlU3pOVGN6a2M5ZCI/Pgo8eDp4bXBtZXRhIHhtbG5zOng9ImFkb2JlOm5zOm1ldGEvIiB4OnhtcHRrPSJYTVAgQ29yZSA0LjQuMC1FeGl2MiI+CiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPgogIDxyZGY6RGVzY3JpcHRpb24gcmRmOmFib3V0PSIiCiAgICB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIKICAgIHhtbG5zOnN0RXZ0PSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VFdmVudCMiCiAgICB4bWxuczpkYz0iaHR0cDovL3B1cmwub3JnL2RjL2VsZW1lbnRzLzEuMS8iCiAgICB4bWxuczpHSU1QPSJodHRwOi8vd3d3LmdpbXAub3JnL3htcC8iCiAgICB4bWxuczp0aWZmPSJodHRwOi8vbnMuYWRvYmUuY29tL3RpZmYvMS4wLyIKICAgIHhtbG5zOnhtcD0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wLyIKICAgeG1wTU06RG9jdW1lbnRJRD0iZ2ltcDpkb2NpZDpnaW1wOjkyYWVkNjM2LWY3MDMtNDAzOC1hNzM4LWZiYzYxYzZlMTljNCIKICAgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDo5NWMzZWI3NC0zYWRmLTRkYzUtOWZjZS1iODQ4NTc3Nzg4ODQiCiAgIHhtcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD0ieG1wLmRpZDo0NjI3ZDg3NC1lZDIyLTRiZTUtYTlkNS00NDlmMzVhZDIxYzgiCiAgIGRjOkZvcm1hdD0iaW1hZ2UvcG5nIgogICBHSU1QOkFQST0iMi4wIgogICBHSU1QOlBsYXRmb3JtPSJMaW51eCIKICAgR0lNUDpUaW1lU3RhbXA9IjE2ODQ5NDE5Mjc4OTUzMDYiCiAgIEdJTVA6VmVyc2lvbj0iMi4xMC4zMCIKICAgdGlmZjpPcmllbnRhdGlvbj0iMSIKICAgeG1wOkNyZWF0b3JUb29sPSJHSU1QIDIuMTAiPgogICA8eG1wTU06SGlzdG9yeT4KICAgIDxyZGY6U2VxPgogICAgIDxyZGY6bGkKICAgICAgc3RFdnQ6YWN0aW9uPSJzYXZlZCIKICAgICAgc3RFdnQ6Y2hhbmdlZD0iLyIKICAgICAgc3RFdnQ6aW5zdGFuY2VJRD0ieG1wLmlpZDphM2U3ZWQ1MS0xNTI4LTRhYjAtODVjOS0zNzNkNzgxZGM2ZmMiCiAgICAgI
89HN0RXZ0OnNvZnR3YXJlQWdlbnQ9IkdpbXAgMi4xMCAoTGludXgpIgogICAgICBzdEV2dDp3aGVuPSIyMDIzLTA1LTI0VDE3OjI1OjI3KzAyOjAwIi8+CiAgICA8L3JkZjpTZXE+CiAgIDwveG1wTU06SGlzdG9yeT4KICA8L3JkZjpEZXNjcmlwdGlvbj4KIDwvcmRmOlJERj4KPC94OnhtcG1ldGE+CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAKPD94cGFja2V0IGVuZD0idyI/PofUkY4AAAAGYktHRAD/AP8A/6C9p5MAAAAJcEhZcwAADdcAAA3XAUIom3gAAAAHdElNRQfnBRgPGRuA4VZTAAAFcElEQVRYw82YW2xbVRaGv7XP8bHjXByHQkNhWigdVX1AikRBMBoQ8wASl4fRqPDAAxIPKAVxeRqQRohHBEVCaoGKUBCl4qHcNKCZVKMRRQxtgTaACLRKqlwB14NzM2ni2D2XvXjgBFXQOnFiA1uy/HB89u9/7bX+vf4l1HnpK57hTNCE0AzqAS5gAAuEID5KiWSiLPf4tp7YUjcSu4yLZzdi2IJyNXANcBlwAdAKzAHTwDhwDKEPywC+GZWHbPi7IKOvZIWguAnlr8BtwJ+AxDJeDYCPgF6Ed0hkh+Weov5mZLTHJMDeBjwYk0itYJtKTOpZML3SbYNfnYz2SBr0buARYENcFytdFvga2AGyT7p14Vcjoz3ShOgdKDuAi+pUewpMIDyCypvSreWGk9HdroOEV2F4A1hfTxGJCX2D5U7U/UzuD6NaXq49NRJhBsOjwMVLEtE4gaL4W5cV3IsxPEoizDT0ZLTHcSH6M/BWLLlVwpQKuPzhb+i8sRkv04Y/e5rvPigxtnM9trKU2k0D28A5LN3RsmXbrbFOU8DtQLpqfJqu97nh6TydmzvwWpOI8VDbxqbrkmz62yk+/Ps6yoe8KkeV/hHHfgrMNyrNEkBX1SAktgRs3T7ApV1rSWayiEkDLmLSJDNZLu1ay9btAyS2BEsEuWuZ99WKyRhgHeCcn8wGw/qbOnAS3jmfOwmP9Td1kNhQDduJcUwjyciS0RJXMMkWkPPUo/z4XFxZRhZII8mEwFCsT+f5xXTE7FAOteduItVaZodyhNPVZDeKccJGkxmsChIMOvTt6aRSzIP+7A9rRKWYp29PJ8GgsyqcVauZSADaj+IDTecWvBlD4e01HKjM07XtOOuuy+A2X0BYmib/8SxfvLWRYm8LdqZaCvkI/SDBci6nld0ze7KCLa4F3gSurR4MB5x1FnMhiCeor9hJiPKmWpbGp3EU2IbJFuTe5XfStbczLxgP7K0IPcCFDWhnJoFuMAek2/oNbWdku/WxHATejT1JPZcPvINysFYiK+gAFkXTK6H+MyhXADeseJ9fmrVDM6X080/+p1M2/yFsD1zjEIauEeMAqNpQE16oaKiqwfjYeLk+fuYl10HDq7DsBTavxs8o6FzFKez/dM3rLx9LjUyVxcb7yVkfzmpXFbACJURHIxgyxkyu1ml6qL0Z4YX4xl7Jfrrgm9Ov9bX/e++x1tHCgkQ11lgELGA4sBp3iHRbH5GDwJPAFLXo6KJnDmTh/aG2w2/3t47VSGQxs1zAE9U2s9pEjx3hXuBloCa7G1rxv8o3f/7SkUz/UFFWMqGRWMpHAqsDbl00KGotIXM7MawF7gKSS5oJJRospI7v+rD96Ikp8aV2EgrkVPW4OnIy6SVL9ZubvZgyaOVyYDfwl2oNqVWiXNEb231oTe+/BrzvK9Gy01MFyoiOKzIEmqsEfjGf/39U1yHgosJFUXhlFMl+z9E/nkvhVNHZsjux+9Caf77RnyzMBaJLmW4RrWAlB3Y4Uh13HLOA4wQjo6O2IRPN
89xVV4JuG5Et2SSelzjtFLzsZQ0NIZ8/2rx7K9+/paxqbKvyh4Bc4AFQxzau23Dow7FS+nHmfEUz05OqINH8+evXJPJVOuE93XkY4eSziaXcQpB2b+vZNt7+/8IPPl2OxPRMJ4dDsLzIho3hpzamJ6aqJ0ei6qtZAasmZ2OS1RyOMd6egBIzSFVoKj4y1Hnvhv+8cD02ZOkEmgIKITVnXKWDs1ksvNrgbTbRSZ46cypY50aWcllIsyKXvr8GTyi9f6WvePFGVQhO8EPW2NzI+OfV2pF2bDTgbg8D/aJeVUspd1BK3/G24u7/skO3+iYP3h3LdhI/B+AGodUpo8WKwoAAAAAElFTkSuQmCC",darkOrange:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADMAAAAgCAYAAAC/40AfAAAStXpUWHRSYXcgcHJvZmlsZSB0eXBlIGV4aWYAAHjapZpplmO5boT/cxVeAkeQWA4H8BzvwMv3B0pV7qou26/tyk5JeXXFAQgEIqgO9h//fsO/8a/2KKG2PkRFIv+qVs2TFyN+/s33mGJ9j+9fKd/30q/XQ/5ej5lLftP3xiHf+39cTz8H+DxNXrW/DDT294316xtav+OP3wb6TlR8Rb6K8x1IvwOV/HkjfQeYn21F0dH/uoVln+fzYyfj8xv84f6ISf88/f537UTvNOYpOVtJJfL4DVbJxX9LKJMXjcdcKjem0t/r9q7/2BIB+VOcfv5TVnR9qfWPN/2SlZ+vfsvWNwJs7bds1fy9pfwWZPn5/MfrIbU/Z+WF/i8z1/F9lX+9nkpKnxX9Fv0X/HvGfXtmF7MKoZbvpn5s8b3ivsUUPvUILE3IjoChwbP/KD+DzW+gcOKOi5+dNGXSdVNNJ810k73nnTZLrNlC7rzIeefyLo7Ss+ZdPH/Vf9LNvWg5ZZDL/dJeS/65lvSm1bjDm20w80ncmhODJT7yj3/CP/3AvV4KBHi81KdPfnP2YLMMz5w/chsZSfcb1PYC/OPn93+e10IGm0fZS0QZen2GWC39FxOUl+jCjY3nTw2mfr4DECKmbiwGBNRE1lJpSVLsOfeUCOQgQZOle80sMpBay4dF5lqKkJuRfWo+0tO7NbfM5cB1yIxMtCLU2SBDk2TV2sBPrwMMzVZaba1J6200bVOKVGki0sVJcfbSa+itS+99dO1zlFFHGzL6GEPH1KwF0mwq2nWo6pzMORl58unJDXOuvMqqq4Ulq6+xdM0NfHbdbcvue2zd8+RTDvxx5PQzjp5pyYCSVWsm1m2Y2rxA7ZZw621Xbr/j6p0/s/ZN699+/kHW0jdr+WXKb+w/s8bV3n8MkZxOmueMhOVQExnvngIAnT1ncaRas2fOcxYV+ists8jmOTvJM0YGq6XcbvqRu5A/GfXM/b/yFnr9JW/5/5q54Kn7h5n7e97+lLXjJLxfxj5V+BiwUH3cM/PgP6r178/h+2IWNXr3IZDKnG1YHtrtFtaVWu1ilevx7tYtr7VXOy3nSum0NHSeHSC4lcbIFUozk32J9iFdrXthMcaFq0z0Wlp6+qg7HfZer+Z0+zpjlQ5fRmKkS8fOua1j1CP7llovW7E816hHdHtUrZ5+oz0IDLDFuIMOT2Rma2CHreke6c5TYFqCY9puXmPuPRcL6KvoarLOvlBpNrRL37lJbySs733aav2UesPNIHA2O7WlZr3tW+ML4QSvXKsuLPpsgL0u/mbyXnZpdPGZjOttnz2khypsW2Jt5Fozqdl8qnedcofdunR20BHbANt15T1WAltjrZ53p6nfQqC6rqBWe6l0nMIi9+69RD0LYHu7WZT7SBuQzttKZNQmaIJGvHZZtrsC2T07siMATFvb7ja2C4/eLpMY6Y3jssO25l3SrxyZyBE7R4kTA+Zia60CIJVPnhkqFFtZ7lbmX7OMuH2OHEEBv42VEN66HZf+st21L32sSZIpaVIuvZie0Ge0B9BFHxzfMMd/8DzkZjNwFFdW4zWFApTWlpP3vCOzxUm1FWKkBtHMW+zI2iReZFFt7DcKsCld21qB8OQjdRDXQhXmKB1CEcC+q2c0bT7SjLbfG228GPk7hRnhmQNmEQOdQj6htHgI3AZ5KV/KSy5Qvz4ukCY1hWWM0YhnSa3Uk9dmzdAdoeYHkiPXuQbNHUoZk0+U1KEXyZnw7UUCFyAmnmlQI1tjE1u3fEp+abX5p+r/Iz2QS1Kc9umzQg1lt3Lhw1NuHXclsLDiGHcfUBnKZe/sIx0kz6JICFA+2cTpDpqVDFCytG0wMyxRxibwdjZ7Il4ytbdVoBED6TSBNCbLX7lBnKTOUXZxF2o2nAngN2KboX6uU13NKlAVjWsOwqVSAwGjKo22ARgudUtcr3jbr7JqqgS73qGbknEAGrMVbrKz7oxe06mx+Z3Ct8DT//JMvxjD+NC4EX461F1OUiEZ9Fo6PQak4+Q9cFXp/RXYwfqdetl701wUChFKMN42b+9HHuVV8vC2TBo2vXVGDSCqz6sQl2sSK9HIcSu0Boa7ZhMwb2bxhfVtCl19V/kBwlpSpmxq7XRkqEtPSbqTM/gr6VupkEZLO4fWYHXTxiKN58CCXNsCME6+O0Pc7LgEgroA87HqGzRqHg7g1iwoZdilXwZ1KQgjzcFdjZZAWs+iOv16vVkgmkBYdJF2PuA6s/DJnibdlxZzJwDhCu6LAGRQmeH6TpWowl4bxmBRWhagC2iAc05T0HOmEgY2Au9Qj3bpoMwJCCe7bsTXYPTvhMNbNy35wNACBQfebVUHW6cb07j9jtu4NhM6gGYFw2/BSEz7shWMncc+X1RAvc6jEiaCB4r2pC2MMTlBMZVELQMZ8sm87CGvc2yZLlbHzL5AGkM370hIm3UtpL4vKf2U9EEeSP1X6XGmaf1u5kU+BYRD0+6xqOhky2zr/PWGv79/S1EEBfVpo592XV3EGVjeB2AddoXuX/mwwVzp5WiI5K2oRm6nfGNeDSKS00DeGClvsFMQXpYCssEzwwNTL5wNayGwm/Z/EJA80jz7ukpsB3THWulMHV13IAfym+m+VAleRFOX4kRD6SEbCCQl4mKfAWCOJhC9AtoeUZMtbl7SD8aBayBoffyKhlwj0/zovihoCM2J6cwrkAYIoUEAvaO8n82lBUATNBjkBuFAz2jX69Gii1xgw/YFTl9mr6KFjXbxEih0lDTYKeQDaGlYWEA21FAdcME9yQnMc3hDivcvCX9w+QmbsVAVDI0MBeQQnLNu/lxhFsL3+SBgK+Gf4ebcDyzS32AR/jFu+gc3v8IG6fcDNwhHF3qHHr2JKxWOxa4GvSBc5MDZFQxAfgK1S3NJHLvz9aTBQRjBdTjkIZooUtwD+YcX9bWmaXD04mOOlQcfkghzo2hSvcz6GCkT/9bCKBEhhWrfyE6KFNm7EVoFtQCBILKAYro1Ge9EBFtVWGDZhCwaHNAQyAnJH8MtiKZVBxYBAYpEVEJZkQkoCMNQb2xFRX4AJ8iqpu7AqLZ9YXR/yB6mA/BBYR6iTfPcvZZ4yvTwcA3VjiY/9MkL6fVUNBu690BZQJXyQOShufFPKAW2dg6qJaPqaRfwIi2p+/pxEpdcokQK3RHJqILUAfKsNV1uRStfGq4e8Or4COhH4vE/IvJ3PCqY/hWNgDH8y2hcU3c+NAb0VY2If0FNd5zlrVtbph0h75BRgNL7LH/ePtT7LAouIZ6E5v/6rFs9Yo8NQaluBzGOrKGMHVkrFJe+bVOGy7B/GAhBBjJg75Wx8G/e6RgXkjmsCy14jXxw+63UNLEr04kNyoc4BNw3rJ0r0a7S3L/ebkgoIU3XOR/oYyHZFn+IkR8FYWQQfYgUa8hjrIJMUtkPsgHxr191N/JPtdzzIlqomkJs0dZIJ0rB1wCVQlNSLeBzyAw6N4vEM1B34oIfH5zBSOXNT4Mp+a8iHItfoMZdELWsAuILvO7QH/VNQo6rWzx9o4niuNx/Alw25XGqqBW8GS0x0TSN1TcuirqCbick1OFedZ+IZm00BUGeI6Iw5+7wwDNekAElOjrPoEAQ7vlaLndsJwZlnb25zTqYKdmUHgoVoW/TbQoQRyzdJ6egYhzH0x7R4sddUrh0GdT7wJTo0UAhkp5zgScViyGnkayJFFkIPW9+h05xySh
89/5Sdw8JFU/JvgRGjuWkxoyPeWx5SFsobrf+Nz3o0uOrgyBhFBfZHXtly3UTF9g4+Bw4iobQRTCahTcObjlt7co60nhwsZBdPNRKhMbYcFF39nVRsJk77A2qiMd8yPxDQUc8qtLjMhaH6n4s/cxkTEKvwwky/eF/Bx3lD7/INVCN8X0LRRg/vNekelk+FYGNfdY8IvYHUQXnZN7B5cyj2zAWqmX/idg86erDH7wYsiP5GtFcqPFEfCn70MQZ7AFbbod2La6ap4VgiTKoVgGoaku4ZMKOzW+TVv1V7KG4HMipBvtHCASd/Jxc+astMWOkDIOk0ZW1vOVZT5PrWESpfBRY423JcjvphjR0FHIPgorIt1VCrZGzjsbhQQ5EDFYudxaui3LJk1YPxw5fQVGo1+Gp47uF9F+R+dGKUKbcEHMIR1Cdk7Iu02D0X1WK4R4+7apqMdkDdMookuMgfea/phsvh3H8go/AOWFZZiQWWFjHhGiqSCUySO9FC6wXN41dWxHwSYPTG2l6cpDTYLzeNgMRqHoqKfdoJN53Syk04No6vmpGJKrscZchpwv8fe+U9EdomvwN1Pxh3Mi6LVtAFtaQitxVbBbSWOWKFnwA4suZPO5n+75os4exayDhZ83KN+ZnjdpGdaHAvut4Y5n/LGW7RKye3E/CiA5Qt87ANeWC14hAhGfLUIVEg+1oduAjaf1Apo9P/W9KFvcN2jEGpgDBoLPJz/puvRFGyNlWOhEhtxu9DRKNV0ozFB9xP1Y3WUTfFGRM+1om4xKgHeKeGMB2oEFje6CDRa0cBIJz/FchGAmHATTihQBojPgf5160WbqQpsN1IgDWFfup1Yd4KzMXjXpZQlbpWOIE+U1UkKqT+bTyXjre0dZ1U/Tft64hr/65nghzq2nw+q0zs0kw+2aMCBLR3UZZ2IMJQz0sUD0Zz9E5YS4vfmQTy2lwziI7RSITFofBE5qbGwBD/NOE8rUi/gqnk3AjzIJef0w/4+X58ISyh8hDQEQu1npzAGoCHoSE8IzskbcY76Wl9z/8HWH/JLInx7oUFd7APzRdOjJQgM7vYYyUTSucMPiunOIMij04t9FLqfV/81VuGXoH0VLjIL+d/84G/gxPMp3vAuQo6OFxH+Ha5Cd7k5Ue8bNUtwn1txU2cWDOIUJOeC7JSST8MPjXZVVAP9TEmddbQdoQX64PA08TZsxi82SzY2G95A/0CUbjSKwxIiq610mIy9IJmmH7AOQFE9KJQe8pgxyi4EAM6mC1HLSsshbMJO1Pzgjj6DWb906nvgnn7xBgoPQENyHul725zomKKEDXMMs0A/AitvQzdvNDVvmDMo5BCJd6e14c2Vhr4GmYGAzVHUq3+TMEv207ca/HAPoda7Vcyklg77X+9nFfXgehp7dyraEC1HyG8FTlOyOsSRlbGgWSjAFHCnAnfDZ2jq/NqAkGzsQETfUyaHlZXL6ogHrTopSECq09eoP4llyTvWC24H4NTNJhpcpAhXq09Wt+GYbnul7vb+nbF/TL0r9NcFqh8PrYoK2OHRb3QHiysgU2DERaHhACp967hQTKgmcN2JWUreSXNZHUshBZOCLnI7GlCFKArV+U7Vp94l5xB9MgRbH2gYGQOZOj46DQeF3tG9hrDU9mQOThdP8mTNfCrnwJwISKQPnT0uR7VNigXpWiEFP0Lxr98KaVRvvbFK9W99yFLG00LSEBRM6N9hdpSdn1v1xajAaNI5aoM1RvOvbtFmReiHev0we/lXd/QOdgDhk35za4XWdq2Kq0CLNKSaZSMmiFa3b52utEkcBgkaBtPuvCgUnUfhvWgjBioKqFKmzXuYpxTl/eQshPPO2ShJRza2dD8dmfb8nMrEf/mI9cczhuFgqAQhsyhVlS50UbeZhXJw12E90H4zEaXeyEpzm1hL9S8p8IDmB3Uoe0SMkyiamhaFiUZRkxc/jhjIoYNyQNaQfNBIVzUIyF2vZUKndnGxeMRUKB8atHpXwjJENI834Aua3xE9HrDApxJwLZAABnp544Cu6gTzDanTXSRBCgWnZa1TIFQX/aCR3IJnEahlwKxX5PoZ2xzJv1FDSTHR2I/yJ5bIE+PfISQqkGpHdqMYFqq1uu8F/1n8izQPIr5lhztexUKSUDfKYvHn8KA6E7wzR1wtru04SeGJVKUgRZzL9yofVU7H6QEpk7p/0zasYFQpSSG90K2fcl64K5m79bFoTBb91AYHjv+/uSLhYRe6bvajej/vvKkVHJ0TPF4buZAoev8WpEDemJctMADcTzd4GkafL0juiyEKwG0XETEBfR4bioCLBmZlDprvZuGtR/zHJPHinE9Ok5/YQ3yYCfrV8iOC1oAVOgDBDksbjH9wOmwIuBPo5icdgiwS1wbND9YU/UHbRZBMgo0IV1jpSUKhQlaYrnkehdAkrI/jgs7JwVWXutTfHbKGdLO6gSFyCyp2j738tB41BgTSDRFYZZQCTKx0bOZkVEiuHFbhtecqYjkv107p0VeeJ6GFqZ+UMrS5tr5BQKz3toOfxbe3a1dtvW+oRnvdOiOWQK+fRFWJgk9hWwgNBvX6peddODKw713i8VM+1Bw+zzXE80FMMd0LY9XoxN0P/Nty75bP4xRkTPHvFMwzuwKeBW3l38aB4uaPlBEG8s8HGwhv/x9y/hPOIdIfHx3GqQAAAYRpQ0NQSUNDIHByb2ZpbGUAAHicfZE9SMNQFIVPU0tFKh3sUMQhQ3WyIFrEUatQhAqhVmjVweSlf9CkJUlxcRRcCw7+LFYdXJx1dXAVBMEfEFcXJ0UXKfG+pNAixgeX93HeO4f77gOEVpVpZt8EoOmWkUklxVx+VQy+IoAowlQJmZn1OUlKw3N93cPH97s4z/K+9+caVAsmA3wi8SyrGxbxBvH0plXnvE8cYWVZJT4nHjeoQeJHrisuv3EuOSzwzIiRzcwTR4jFUg8rPczKhkacII6pmk75Qs5llfMWZ63aYJ0++QtDBX1lmetUI0hhEUuQIEJBAxVUYSFOu06KiQydJz38w45fIpdCrgoYORZQgwbZ8YP/we/ZmsWpSTcplAQCL7b9MQoEd4F207a/j227fQL4n4ErveuvtYCZT9KbXS12BIS3gYvrrqbsAZc7QPSpLhuyI/mphGIReD+jb8oDQ7fAwJo7t845Th+ALM0qfQMcHAJjJcpe93h3f+/c/r3Tmd8PnXByuOaabnkAAA0aaVRYdFhNTDpjb20uYWRvYmUueG1wAAAAAAA8P3hwYWNrZXQgYmVnaW49Iu+7vyIgaWQ9Ilc1TTBNcENlaGlIenJlU3pOVGN6a2M5ZCI/Pgo8eDp4bXBtZXRhIHhtbG5zOng9ImFkb2JlOm5zOm1ldGEvIiB4OnhtcHRrPSJYTVAgQ29yZSA0LjQuMC1FeGl2MiI+CiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPgogIDxyZGY6RGVzY3JpcHRpb24gcmRmOmFib3V0PSIiCiAgICB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIKICAgIHhtbG5zOnN0RXZ0PSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VFdmVudCMiCiAgICB4bWxuczpkYz0iaHR0cDovL3B1cmwub3JnL2RjL2VsZW1lbnRzLzEuMS8iCiAgICB4bWxuczpHSU1QPSJodHRwOi8vd3d3LmdpbXAub3JnL3htcC8iCiAgICB4bWxuczp0aWZmPSJodHRwOi8vbnMuYWRvYmUuY29tL3RpZmYvMS4wLyIKICAgIHhtbG5zOnhtcD0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wLyIKICAgeG1wTU06RG9jdW1lbnRJRD0iZ2ltcDpkb2NpZDpnaW1wOjIxNDZjMzUzLWIxZjItNGVjOC04NzQ3LTIwMGEyYWExM2ViMyIKICAgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDo2NGViNmI2Ni03Y2I2LTRkZGUtYTI3OS01MGY0ZWFiZGFhODAiCiAgIHhtcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD0ieG1wLmRpZDo1ODRhM2VjZC1kNGFmLTQ3NjItYjA1ZS04ODk2MGQ4ZTk0Y2MiCiAgIGRjOkZvcm1hdD0iaW1hZ2UvcG5nIgogICBHSU1QOkFQST0iMi4wIgogICBHSU1QOlBsYXRmb3JtPSJMaW51eCIKICAgR0lNUDpUaW1lU3RhbXA9IjE2ODQ5NDE5MDM3ODI2MTQiCiAgIEdJTVA6VmVyc2lvbj0iMi4xMC4zMCIKICAgdGlmZjpPcmllbnRhdGlvbj0iMSIKICAgeG1wOkNyZWF0b3JUb29sPSJHSU1QIDIuMTAiPgogICA8eG1wTU06SGlzdG9yeT4KICAgIDxyZGY6U2VxPgogICAgIDxyZGY6bGkKICAgICAgc3RFdnQ6YWN0aW9uPSJzYXZlZCIKICAgICAgc3RFdnQ6Y2hhbmdlZD0iLyIKICAgICAgc3RFdnQ6aW5zdGFuY2VJRD0ieG1wLmlpZDoxYzNjOGRkZi1kMjVkLTQ4YzQtYTAwYS0yMmU3ZDYwMzg1YjY
89iCiAgICAgIHN0RXZ0OnNvZnR3YXJlQWdlbnQ9IkdpbXAgMi4xMCAoTGludXgpIgogICAgICBzdEV2dDp3aGVuPSIyMDIzLTA1LTI0VDE3OjI1OjAzKzAyOjAwIi8+CiAgICA8L3JkZjpTZXE+CiAgIDwveG1wTU06SGlzdG9yeT4KICA8L3JkZjpEZXNjcmlwdGlvbj4KIDwvcmRmOlJERj4KPC94OnhtcG1ldGE+CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAKPD94cGFja2V0IGVuZD0idyI/PuhCAHgAAAAGYktHRAD/AP8A/6C9p5MAAAAJcEhZcwAADdcAAA3XAUIom3gAAAAHdElNRQfnBRgPGQOTjc4FAAAFdklEQVRYw82YW2gcZRTHf+eb2dlkc9lsrFYr2notfSgWxKKiog8VvIFI9UFQEaWtYPFJfREfRRSEeqlttViLD/WGisYXrShWpfWC1WpSN5eN3cZumkuTzWY3c/mOD9lI0WSTTXbVA8M8zMz3n//5zvl/5xyhxqb3ewYvaERpAvUAFzCABUIQH6GAHyvKa76tJbbUjMRW4+LbC7GsQbgCWA+sAs4AWoA8MAxkgEMo32LoxDO98oIN/xdk9IGUYEYvRrgduAW4Gogt4NMA+BroQHkfm+qW3aP6n5HRTSYG9hZga5lEwyKWKZVJvQCmQ3bZ4F8no5skAXov8BiwspwXizUL9APPgOyVXTr5r5HRzdKI1TsRngHOqlHuKTCI8hhG3padWqw7GX3IddDwcixvAefXUkTKhH7HcBfifi8vh1E1H1cfGkGYxPI4cM68RGw5zf3y3S7IuedgeZwgTNZ1Z3Sz46LRNcA7Zcmd25yGgPWP/M7q65toTLZSHBvn6OcFDm07n6g0n9oNAxsR54DsjBYs2251QWAbgFuBREX/tF3rc9+zA6xa3U5jSxwxHmpbueyqOOvvOM7rj67g1JfedFTNagngVtR+B0zUK8xiwLqKTmhcE3Dblk4uXbecRDKFmATgIiZBIpni0nXLuW1LJ41rgnmcvG6B59WiyRhgBeDM+UZipWHthnbcmDf7b8Y81m5oJ7GyErZTxjH1JCPzesu4ghtvBpkjH2X6uXFlAVEg9SMjhEAamFsyp4Yjcuks1s6uXdZacuksU8OVZDcC0mW8OpFRQqBruvqdwwpdDh+9cjaF0QHQv/2wRhRGB6afdzkVkKZxtDoyVaqZBKCHEXygcXafjhi63l3G9tIEGzYe4ZKrksSbzmCqMEz6mzE+eedC+juaiUYqhZCPchgkqKB4SzxntqQEO7oceBu4srIzHIitsMTOBOMJ1leCkxAMmEpRWt6Vg8BGTConOxZeSVdfzmwxHmpvRtkJnFmHcuYksBkxH8tO69e1nJEd1sdhP/B
89BuUippfnA+3jsr5ZI9TnzV33mFcB/DuEi4LpFr/PPZu3LkanES08fOltWnxe2Ba5xCEPXiHEAVG2oMS9UNFTVINOXKdamn3nQdSC8HMMeYPVS+hkFzQdObl9m2Zu7+xt6hkKx5fXktGumdNXyZQUKiPZGkDbGnFxqp+kh9kaUHeUTezHr6WRkxt/oa/toT39Lby6QqMoci4BJDB8vpTtEdlkflf3A08AQ1ejoTM8cyeRnudYD72Zb+qokMhNZLuCJaqtZaqDLLi0i7EHYDVTV7oZW/J9PNf3wanfycLoki5nQSFnKewKrnW5NNMhtKRDlt6EsB+4G4vM2/UrUNd5w5Pl028FfiuJL9SQUyKrqEXXkaNyLF2o3N9vUYKB0AbAduKFSQWqVKFv0+rYfXdbx4aB3qqQLDk8VKCKaUSQNmi0F/ujAwB9RTYeAMwoXabg2QvZ5jl4ym8Ip6FjgDm7/bdl7bw3Ec/lItEJyWyAS0RJWsmC7I9WM45hJHCfo6e21dZlozlju3pjnSnRT0tMXHdFzT8dQ0EJoTr2eSXXs7W/uG/pnwiswBZQw5NXaYw5knJKXVY8p8VSP9vZo3cezp1v2nniDK9FD7V70RMxoaganGJmJT0+0frbtt+RPfVN/EQnLo9sxYEREB6wxxweHhwYL4/mo2kSqi43c5zRH8GS7Fz1shMZQJTg41PzVU7+2fdNZNHlBTgI5ER20qkPG2qGebHZsSTpULzJH8slCe6ywrWTlrGTM3tw9Ef/xjUzLvp6idIlwQtBxa2Sit6+/VCvMuu0MwIE726RBSqlViaDli6Gm4t6e1MQveet3Z4+F9cD7Ewo4WRJBbaaSAAAAAElFTkSuQmCC",red:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADMAAAAgCAYAAAC/40AfAAATbHpUWHRSYXcgcHJvZmlsZSB0eXBlIGV4aWYAAHjapZppchuxEUb/4xQ5AvYGjgOgG1W5QY6f10NKtmW5EieiTVLDIQbo5VswCvavf97wD37qyD3UJqPP3iM/ddaZF29GfP2s5znF+jw/P6W8P0u/Hg/5fTxmDvlJ7xNHf5//cTx9DvB6WbxrPw00zvuD/esHs77HH18Gel+o+Ix8FvoeaL4HKvn1QXoPsF7Lin0O+XkJ216v+rGS8fof/Ol+xEReL19/r0L0tHGdkrOVVCLP72CVXPx/CWXxpvGcS+XEVOR5H3mu5SMmBOS7OH3+TGZ0far125N+ycrnuy/ZekeApX3JVs3vU8qXIPfP12+Ph9S+z8oT+p+uXMf7Xf71+NgpvWb0JfpP8K+O+6yZVazaCXV/L+ozak9Srm4u4Zcegal1stOpocGrPyaPweIPpaDxxM3jpJky6bqpJk0r3WTP60mHKdZsIQtvcj65PAdHkTzzKZ6/6o90s5RZtAxyeZ6015I/55Key854wnO1wZU1cWpODJb4yl8/wt9+4V5vBQI8ntSnV35z9mAzDc+cP3MaGUn3HdT2BPjj8fXH81rIYPMoe4tMht6vIXZLP5CgPIkunNh4ffVgEn0PQIi4dGMyqZABspZKSz1FyVlSIpCDBC2m7j2zyUBqLSuTzLWUTm5G9kvzFUnPqbllDgeOA2ZkopVOnw0ytEhWrY36kTqoodVKq6213qSNNtvqpdfeeu/SHRSXFKlBmnQRGTJljTLqaKMPGWPMsWaeBdBss0+ZY865FtdcjLz49uKEtXbeZdfdwu5b9thzr0P5nHra6UfOOPMszVoU/NCuokOnLktGKVm1Zt3Ehk1bl1K7Jdx62+1X7rjzrs+svdP62+MvspbeWctPpvxE+cwaR0U+hkgOJ81zRsJyqImMi6eAgs6eszhSrdkz5zmLE/grLTPJ5jnT5Bkjg9VSbjd95C7kV0Y9c/9X3oLUX/KW/9fMBU/dX2bu97x9lzV1ED5Pxl5d6EGNhe7jnJUH/+jW31/D+83KPiEmlrd0ZremEblUT7eZm0BzexaimmXYgubnuEPvkbQGa9wthiOWrraVZNfSbR0D3dM5e18pXeZJJmnLWKdvldHSuKUOsxOt3bbTboUw2gyslJWdOaVdy9qByFHOHqbkHGo8yhf7pMzaZaS57phW01Jel0mrG5SmjUNddDez7oydWuXyM2lNdiFWXboPJVg7FGLzCt/lNwpH8zahiOZobe1kVcJOl4zlA+HOkZfx6ZCqda7d110dOqk5j555J51FiWZST5Qtdd1klCVRBYFSJPLQBhVUm0uIVsH9rLkAPGR3mNdLnms6F9jxCstcglo/til6U1v7hJm27l3rQ7HE7SzZVqiFqgKlzQ0BSa17KIOX6mWnnHzLOfToTkNLH9lgkXjuufNIsdmoM5nGyaSbACl51ihnS4t7TBrI9uikqdFIpLPGdaGkO4e2QBHMZEe8Ls6U6DWk+dBZ9VLGu98lM11aIjXjakwmrUP6KF24IvLlTbBSMKXAz7ibZFg6JtIZFqmoicKJlpnItETwSSfBphrjGTYkkzzqgArxS9wA7/o/amHMG4VpUQ4naZO6llRb63b19J1i3g9Lqy/ptx4Jf2yej95JmyqnPp40nD1FZ6eEE5GkmCLLXyizGgweEiqMDJ59WrKiWnajjLNcFMFdh/WCApcKnDU3Ymiqex46z4jy0O5rCny1U8sU44naDrlFlpBoiqK2FSlQEkHj0YlVtbmq2OSJIt9n3XKPnkuWEFrHx1cmu67wCdWWb26RPgIq6cbWQSCh7ae1mavXCLiYj//UCeia5L5SWHfOUy1nmsah0qgDFAnlMSvhAGM7iEUB9aZX4xO7Zb2Agc/b+D4UPt78/jq64wBC6Jaup8vuDiT7JCo/slSKKILbA1xMusPOqh2o3McIKmivFJLa3bxx2ChgFek5k49tFcrJazxJPZAlqmxVaMSQfstACssdyhDQIDJr+rfDSzfXCzFsBrte200pvE5xAkmDNjbIohNm5klmgx9YnSeanMqY5A/FTwObIRibOeDRqguEXKfVlYUsDBao9WTlykDd1C2A/6v6HDLrn8L19fWACeBm7jfSqwkmzehsIIaOBraQNtfrp43aAEzqpEvhK1NPFeC4qG2jkWBXunMnuOISRcCYsAdsF3O7fUNnujpInQp4DZ8KwV2FmvtIOsh0MU0/t5EmSrcCsRpAyod4KFVKDYGfrdIxkSyVp42oJ1W+RLmRdmi0Esc0V7UIzJJ//A+4FBq6GJDSNahvqK0ceqdOtLOlCY7I3aUpxTsUdtOZL6m/rVwjKAPk2qwfngswTfY1DlqXBA1y3zIyIc/qRPHoW5SIy37K
89pWFJjHxD3I6/c2bOA3y2hQ4pYTZgbjokXWhk5NuoOmZiZwI/XVUnUEJFcawCmm1Ta/tw3ZnakHNtNGbUWEmVz6sXlxuq5lNV4lOqIJuQU5QHEMeyooAIrnXphlkdMea0QBdhgMjIKxu4ijyOJsAkNkSA4nW3zegoRhLwGvsiwsZFjaA+vJ+Pgl41LFqKTBzKJzeY4y4K5XoNc7nis0wgQnLKo12glDFaehPgz6/h64EaExPNTwJAe1DE3wFUMBxd4DV7naTKl3PCl5MMxeG/EgQoy39r+w5UIWwAZ7wmNqNo/ZhYKgiEmkMjJViEcWAN4ggPgzAdfloCgu4iHEgRDTcRcXnedsSBlODF7lLlgOpER4KNup9IZKHakS9TXDhct95PHzZaH3cFI3KsEcHSDhw4pxZUZEFXqYrF0L1DQXjKGS3CVVwx8nDWQ8lEU9eXCBiEat99LPSlgWplOVQDS2NDg3WSNSQYde+YyYCuVZNkYNUgND126YEyidh4loQEG2DBs/cx8KWQNz0yTgqCTkMLmclevB/oQSuswMNCWvYAHh277jmLiswGO2w9Q1IplD35KTr5Hkwr71QA1z9KYTfXDe9ie6JJUVGMgMsSH6YhBvcTN5Z+bw/6BkhdiOf4X0Pk+Qpv4YVvn/BmtOy3CPg+A8gw+v/J82EJl0ikfsma0i508WtNQFu6GJ5nsZ7sTacCgBfB1FmObYVEFLW3GkrRWXPP3mc5A+7fEinK4mqRU5D8gGpdNjZaTx7lfU3nAo5S7q6ZuzncQWjEbqGSyCJeBLuCbu5dB2B0NAvwQyBz0dO4KqIKUmzL6q2DRavRClhgVIC4xaAFJtpuxYBysKndvZhDL1fAUIGdSPVI1pj/IDsdOKzaO8oQp+O6V3E/4NI4XnZr1TBg9+zyic6BWbfzLUlOLB6VgvGd9dJlG2R3DQsnLrRb6tTGFEK3xB7SD1RT3S59Z7c2jisR42rokoQEIGggP4WMs4k1IYD3cOfVdnNjhiKwU8dM8YaSfVVYkKt2aOTuqsgBZY7jUazQPnqrocQgNSYPRF9E+SvLGIzVnyRDRzT5U7xUMb2wAFgAhqoHIja8Y7WQRurG2vHdnqeq6N53vShmnb5r4SmYj8L506vjGsLOMErgHKOchXNdCpdq3QKvrjCj24kXD1E11zUiyyQP1MMjC1GiLD4NtFbhbGXGdkY8i7TXDL5BETfhadPCzeugxtwL4lmKYfiQ+XpIzLxwA9hIky+ggMIqYFfDmiPa8AX7XMRUP+GAPciSQmZh4Q3ckRH3wIhZAsCijAbKl3J+pBtLw3pYK7n4IYHuIwk8Qdyjb+veV3i3lQFXjE95i470ifEZ34URpc53BJVKlIXJwbJgCB41Ag71DFpSqxtLXgf2MW3cvBmvhAaOZEiIFY4AVBNM8UITXn7AS1iF7J6pAoWAjmh4y5Wmx51o7qBVgkfol4MYBDQ6qnu60cLlwDyLZYLAnBUqs8u49IqKPjh1RKKDN4iOh8DC90kXJ3xR8Z3IXSKZY8wTHxaiwMkIazyh4r9Gh4PQgzQ5mi1l/HgDodGAEMOgPtzPUKjxDvqs3BfQ2QO0J2IC73XMhu3pL5h3OK0uF1GF9tgFiBzAEbEjPTfS0cXuhVAaV2toiWcgvopYcMpGI0r0rdl00vNRBbx+vXb6+do4CCDx7s8BhYZKAbGVsYEF33o6xfVwbB6PDhm42oxaeA0Pis6BgJjTlTqIdcdjI5CuK9YAEKmrYea3ZUCxeBgkMLVzXT48dD4WLX4TigKZ1x4yfWTZoIw5Yfj9Abj/j9QD9LCQRHR8r8ZAtosh4YsTZzwE6+t04rsoc2+g1h5gIHF4+O1J7Vg+NGbz7SfwOlPzvqVFhJCQ4mnAXHYqSrG5AGNBbEqAGmFR7CdXyA2PXUBbZDh04fz6OMUM3MHoVfGpA62Ch3LlCzVgC7l8h8oDzdHdYxXflJvm2zGM3fYpvodExdcdIZQVxzzLN/gLhzHDXBEgfgFpqgumRYc6Z2AyvCqVChakJ3UFShQaws6WkvrLRGBZ2vdBDT8fmO5ZrS1WV7AY6aEvuGNBCy6dENU+H7cj+IjURXxTlPiK5oBpiACdbw2ydEwhPeXgVeb0ZnPzCSk4aFIe3c7D+pQqdIRsEnklqk/0kTRiCrR5Cwx7NlvcKcK/+C842Hscz4SUBV8uHsfcFaHWDgNiVHyPq2tg2I0GwSGsCArBXY9aaonlIA/89/xSTMxu0YksrZC3USmjxhTd1OydAjy7HAWjs35LiSTJJGK+1fLY/jYha/Vtoc6KLD7NAwjBqov6ivQQKv+1N5Lit2LeX0kyrAOWwx4Y324Y6Ta1Pfe28KB+o20SyxGKged8rR68DLyOIPFZ8CylJuyKu1OIFtC7cUjNvv1wXNFyGgVX0BpryQgwPEYaTYyRPB4XzBaiaPdjDIqGRRW4knDdjsiAkxdzpWuOpxqgQMMzl0uLjOmW/UD7ziKzeymC3sVo9mXbwe1RmQix8c2+EFYJ2pqhsAx6apOdEn2fGXY9rvHJmE1Ae+fyqD0sH6o6dwh1wtUz6c6+XccvEf4MCg1gEJAu+DwazG+DVNf1RCkDYkgs37VXmFBbf21t9YRme7YS1HcXi284Q9kfNGWse323t0VlvTrImQsPsQe6oMLeHd2EbPNN6ub3aUuCjRDEcgcWHxX+kvCkf/xHvW1E1jcoJZxauvcKydiCv48V37kWZQxtw4qJNODPVsIU+R44zQtroi0Be+hQX63ZyRriAqWJJEBGzKI6HJPsdjpG3Vc3onja7pSJW3QaDu/lW8PjGISJQeEi9QZyj2GseK/BcVrkzo6CmB6a4tMCg2mQY5Ir7qkXBGGv51Yy496L2SD5l4UJHQG9D4NFJC5gLAA8HHMB1ULcWPqjb/FcfCK03wHQM64NAO9+x/lQNAHAAX2YIPJ5gjLOmy259gcgyvU7L8idDkJ2yr1iWAUkKo7aIk9uF+QrKQAFiq4u8yDdIZJNQ+Ts+x2oKKSDb5VtVDdyAHQi/ANtRPG4NK/Z8W1ilCdNK4egJtQD80GKITglgrcAvDm7GAgUvenMrdOOvrlEwcpEut/RfSe/eJeHm6vvwhdX3gi1lwnEsNAm/jZX13mIJM+UrhGdBlhhvig38IwcJ8W9zsAUzqpRN4VOZ6jfC6b+sS/Y0+VtHOmH6PwKZYMjbnwus9HtO0/IURgRkxFYTHJapCqYIzWFN4BpySEpeKAeD6PzeaflxfmdVkq7ynBzOtqlqAW/BkrR0Y7mINvwbWv4iO6GSDPJHdmbG+xH+UW+DEnHia4hqdQ2ohfBna6CR8CN+u0CFILsuJOLZ99dv72NlBM1hBDGM8IP5TFZ/QAQhDXKyVAIySckQWg/67gP6hDcqVNQlTt3Z3Bp5Ksj2JAxfs+OKrZqmi8nKzhDDVK6ie+cEli83+7BM4qzhKseI23xey7482t4xHg1VjMBA+zFo89895p+Rfr4Ni6Ek+j4+ayNAovkBd00m7iCQrQSvXB97wCkxqsPopP00DnR7zR
89QIHs2uowUsjA8dPG/jrjS/UYoEgyM9Xs/FSUpLaAjORmgMNyebyyd3G82egkJ4rfESLTf/Lfie7SAK4GFZyh/GrsDyRW3gxoNiJjVkPK++Ygp9T1h3BB4xirxqpZXj7YAtoUcBcCwBRv9j0xh9EFhGOyOMwoO4rmNW/1GTWx0/FnUAZN0P19SxougYiS7BzkOfe63MH3Nd29lMhC6UvG0g7Pwn4sCXag3v1t6XXfn5RrBnc4hwNv3CiYVAk75nhTtZy6QhgFusIEE1Gf1sTiISULf0Q1Ukd8PtZuzAzk1bA2fbRAJUoZT0iWiKGNFpKKLerkngI3DN5P83tEsCCValn5tCSSoAFZ8NE5iZCGOFvnI2+fc0hSMyOP6hgheBC/JqM0XtzPY4ff3CcRZGFPQp+eT9FGVEXZAx5l6MPfTxBAh6p9mAdsCes1v4slb46vGhDSdrI7iP3whocfnC9FXoxzU/6gk3T51NDqRmqXEDBZpfvMByw0xUJeUSzQ5viPcMHg1uzxlzOnc9szCN1b5NBH44/uD8eVHwoMzBAdw5t/eZ7uSp4CG3yd2DETwEdbr9O8QEP3Wg28roCeRYRkHdKL6HzKxMGDwGRf0vRjBi75j7X6nFNW/ckp20Z7t7ZL6fRp0CBMDCbLfwU4hteMuyDWR35qZvpvj1ZDwnfkxnjWhUnmmRRqK67v2d+On/kdI/wa+GQTprDiGjAAAAYRpQ0NQSUNDIHByb2ZpbGUAAHicfZE9SMNAHMVfU0tFKh0MUsQhQ3WyICriqFUoQoVQK7TqYD76BU0akhQXR8G14ODHYtXBxVlXB1dBEPwAcXVxUnSREv+XFFrEeHDcj3f3HnfvAK5ZVTSrZxzQdNvMpJJCLr8qhF8RQgxR8BiUFMuYE8U0fMfXPQJsvUuwLP9zf45+tWApQEAgnlUM0ybeIJ7etA3G+8S8UpZU4nPiMZMuSPzIdNnjN8YllzmWyZvZzDwxTyyUuljuYqVsasRTxHFV0ymfy3msMt5irFXrSvue7IWRgr6yzHSaw0hhEUsQIUBGHRVUYSNBq06KhQztJ338Q65fJJdMrgoUciygBg2S6wf7g9/dWsXJCS8pkgRCL47zMQKEd4FWw3G+jx2ndQIEn4ErveOvNYGZT9IbHS1+BES3gYvrjibvAZc7QOzJkEzJlYI0uWIReD+jb8oDA7dA35rXW3sfpw9AlrpK3wAHh8BoibLXfd7d293bv2fa/f0ASM5yljz/NiUAAA0aaVRYdFhNTDpjb20uYWRvYmUueG1wAAAAAAA8P3hwYWNrZXQgYmVnaW49Iu+7vyIgaWQ9Ilc1TTBNcENlaGlIenJlU3pOVGN6a2M5ZCI/Pgo8eDp4bXBtZXRhIHhtbG5zOng9ImFkb2JlOm5zOm1ldGEvIiB4OnhtcHRrPSJYTVAgQ29yZSA0LjQuMC1FeGl2MiI+CiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPgogIDxyZGY6RGVzY3JpcHRpb24gcmRmOmFib3V0PSIiCiAgICB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIKICAgIHhtbG5zOnN0RXZ0PSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VFdmVudCMiCiAgICB4bWxuczpkYz0iaHR0cDovL3B1cmwub3JnL2RjL2VsZW1lbnRzLzEuMS8iCiAgICB4bWxuczpHSU1QPSJodHRwOi8vd3d3LmdpbXAub3JnL3htcC8iCiAgICB4bWxuczp0aWZmPSJodHRwOi8vbnMuYWRvYmUuY29tL3RpZmYvMS4wLyIKICAgIHhtbG5zOnhtcD0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wLyIKICAgeG1wTU06RG9jdW1lbnRJRD0iZ2ltcDpkb2NpZDpnaW1wOmI5YjA2YTAwLWZkOTQtNDc5MC1hNzIzLTlkMGUwNGRiNTRlNyIKICAgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDo1MTQ3ZGU5Yi1kOTA0LTRlNWYtYjIyYy0wZmMzOGRmMWI3ZGEiCiAgIHhtcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD0ieG1wLmRpZDo4YzBjNTI2YS1lYTkyLTQxYWItODM5Yy05OWFhYTM0YjdlYzciCiAgIGRjOkZvcm1hdD0iaW1hZ2UvcG5nIgogICBHSU1QOkFQST0iMi4wIgogICBHSU1QOlBsYXRmb3JtPSJMaW51eCIKICAgR0lNUDpUaW1lU3RhbXA9IjE2ODQ5NDE2NDAxNTU0MjYiCiAgIEdJTVA6VmVyc2lvbj0iMi4xMC4zMCIKICAgdGlmZjpPcmllbnRhdGlvbj0iMSIKICAgeG1wOkNyZWF0b3JUb29sPSJHSU1QIDIuMTAiPgogICA8eG1wTU06SGlzdG9yeT4KICAgIDxyZGY6U2VxPgogICAgIDxyZGY6bGkKICAgICAgc3RFdnQ6YWN0aW9uPSJzYXZlZCIKICAgICAgc3RFdnQ6Y2hhbmdlZD0iLyIKICAgICAgc3RFdnQ6aW5zdGFuY2VJRD0ieG1wLmlpZDowMjQ4MDc5ZS1kMTYyLTQxZmItOGViYS1lMzY2NTRiNGRjMjYiCiAgICAgIHN0RXZ0OnNvZnR3YXJlQWdlbnQ9IkdpbXAgMi4xMCAoTGludXgpIgogICAgICBzdEV2dDp3aGVuPSIyMDIzLTA1LTI0VDE3OjIwOjQwKzAyOjAwIi8+CiAgICA8L3JkZjpTZXE+CiAgIDwveG1wTU06SGlzdG9yeT4KICA8L3JkZjpEZXNjcmlwdGlvbj4KIDwvcmRmOlJERj4KPC94OnhtcG1ldGE+CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAKPD94cGFja2V0IGVuZD0idyI/PkaovgIAAAAGYktHRAD/AP8A/6C9p5MAAAAJcEhZcwAADdcAAA3XAUIom3gAAAAHdElNRQfnB
89RgPFCiKn0kIAAAFfUlEQVRYw82YTWxc1RXHf+e+N2/GH+Px2IEEV02AgqIsIkwgoYS2ahepVGCBUOiCRRdsAAnECthErBBCICGFj4gqRQqBRSABUrVm1URtCSATJ5ASZCPHH0kGgx1/xJl5nvH7uIcFY4iIM/GzZyhHenqL994993/u+f/fOUeos+nNnkHCJoQWRD0UFzCARYhQCVB8NFWWTwNbT99SNxC3GZfIXg9sADYDWxCuRekEskARYQplFPgEOAr045ph6bXRzwKM3pEX5mduQLkHuAvYCqSW8GkIfAT0IBwknT8lH87o/w2M3mpSqL0LeLQKIrOMZSpVUC8hpkf6bPiTg9FbpBn0L8ATwLoqL5ZrFjgNPAeyV47p3E8GRjdLE6r3oTwHXF0n7ikwgfAEIvvlqJYbDkY3uw4a3YLyNrC2niJSBXQG4c+Ie0yORnGSj5OnRhzlUJ4ErrkikBAoAjPVe7ik4F6D8iRxlGvoyegmx4X4NwgHgM6a8fUyIfc8doZbf99Ca66N0uwF+v7tc3DnWoJK6gqep1C2g3NEjsdLlm03GXSbAe4GmmvGZ91vA3Y8P8aN6ztoyaYxxsPaNrbcnmbbvV/x9ONdnPnA+w71otaMcDfYPqDUmDQTUgjdNYPQsSHkgYf62di9mmwujzHNgIsxzWRzeTZ2r+aBh/rp2BDWDLLQjSzpf7VMMIpB6QKcy77Tuc6wdVsHbspbfJspj63bOuhcV8u3g9KFJtufWQbHakfLdQUv3YrI4qwQ+e65616Jr6mknE4KJgIGgctLZnEq5vRgAWsXLyKttZweLFCcqiW7cdVP1DgwQoQwUNPJxIDDG7vXMDszBvqjDWvM7MwYb+xew8SAUzNowgCSDEwyNVMJQU8AAdC06DvBtOG/76xirlLi3u0nufn2HJmWTir+FJ9+PMu7B66nr6eVYLpWCgUoJ0DCGoq3wv/MbXkhmlkN7Ad+XTMY4kBTl6XlKnA8IQ4U/xyUx8wlB3ZpKvcC23Hz49K79Ep6GeWM8VB7J8pfgasaUM6cAx5EzPvSZ4OGljNy1AYIh4C/L6lASWYBcBCHQ0mBJOfM94rk+WjwAsKvgN8te51LK7kPpm3zK89OrZH1v4zaQ9c4RJFrxDgAqjbSlBcpGqlqODoyWq5TP1OtnoU9wPqV9DMKWlRnfJ+/6q3XKpmhSRVbXU8uuhb6Hq1eVsBHdDiGQWPMuZV1mpuMB/aPCK8CXcsMjs6pufCm3/7PPZXs8LhKnJBjMTCH4f2VdIfIcRsgcgh4FpgkiY4u9Mwqc4fn2468M58dSQhkIbNcwBPVNrPSRJdjWgb2AK8BidrdSCX4PGw5/re53IlBK8uZ0EhVyodCq/1uXTTIzfrExZ0oq4H7gfQSmv54IMqcfNFv7/0ilkCSg1CgoKon1ZEv017ar9/cbEvGEFeuQ9mF8IdaBamFuBB7I7tKq3r+EXjnK0tPTxUoIzqqyCBooRIGM2NjX8d1HQIuKFys0cYY2eeJ3riYwinorHUndvmr3nt7Pj1eVNEa5LZALKIVrBTAnopVRx3HzOE44dDwsG3IRHPBxrtTnkv8p5yjLzvoLy72oaC+mvOvz+V79pZbRyYvJbwC80AFQ1GtPevAqFPxCuoxL57ql8ND2vDx7MVW2JTOuMQPdxDvSInmF/yU1ZT+Nd92eGcp97+RH4BE1XHHLDAtomPWmK8mpiYn/AvFOCmRGmLTm53WOOKpDhM/YqApQsLe+dYPnym1f9xvTVGQc8C4iE5Y1Ulj7eRQoTC7Ih1qFJiTQc7vwN9ZUbk6Z+ydp6L0Z2+Ws/uGrAyI8I2gF6yR0vDI6Uq9fDbsZACO3NQuGa3kr3XC7H+ClvJeP1/6IrbBqbNno0b4+xbMlmARngcRbAAAAABJRU5ErkJggg==",turquoiseBlue:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADMAAAAgCAYAAAC/40AfAAAQDHpUWHRSYXcgcHJvZmlsZSB0eXBlIGV4aWYAAHjapZlrciO5joX/cxWzhCRB8LEckiAjZgez/PnAlD1drrpxu+/YUZJKSmWSwMF5pMP+n/8+4b/4yTHmkLW20kt5+Mk99zR40Z73Z9zH+OT7eH9EPp/FX98P6fP+k3jLD/oc2Mrn+K/34/cJ3qfBK/3Lidr6fDB//aDnz/nbjxN9LiS+Il+FfU7UPyeS9H4QPycY77ae0lv96xbmfp/tayft/Rf84XzVpL5PP/+fK9Uz5TqS0pYoD4+fYkkS/ydBBi+UxySZA6PU9/V9LJ+VUJA/1en7p7Oi40vNfzzol658v/rRrU8F2NqPbuX0OUR+FLl8P//x/RD1z125pf/LlXP7vEq/vr/k2e+KflT/Fv9YO3fP7GLkQqnLZ1NfW7yvOG5yCb90Cyyt0J0ChhrP/tv5bWx+AQV71jP5XbHHRLtOzNHiiCfu+7ziYok57ZAqL1JaSe6bTWrqifXSv+y/8aQqXUwaXVy37VnS91rivWx/VrhXa1zZIoemyMkiX/nHv+GffuEcH4UYvZbjrRXrSsmLzTK8c/7IYXQknk9R9Rb46/fnj/dV6KB6lX1EOqee7ymmxv9jArmNFg5Unt8ZjNU+J6BEXFpZTBQ6QNeiaCzxqSlVCEpSo0GDpfvMTDoQVZOxyJRFCr1pyS/NV2q8hyZNvB14HzKjEyqFOWt0aNCsnBX81NzA0FDRrKpFqzbtOoqUXLSUUouT4qhSc6haS6211V5Hk5abttJqa6230VMXSFN76bW33vsYXHNw5sG3BweMMdOUmaeGWWadbfY5FvBZeekqq662+hqWTAz+sGLVmnUbO26gtPPWXXbdbfc9DlA7Ek4+esqpp51+xnfXPm397fcfdC1+upZup/zA+t013q316xTR6US9ZzQshRzpePUWAOjkPXtazDl557xnT4f+RBOLVO+ZRe8YHcw7Jj3xq3chvR31zv2/+hZq/qVv6T/tXPDW/cPO/d63P3XNnITX7dg7hV7UR5g+Pt9tpDZc7H57Dl8vmBBZjQJKZuNivLe6qJ0KRa10Ri3sSNYUdlTSNhm2fHrW3q2WHUz5Uoy2+qhR1zpd42Kfqyg8pnJK5+GxtfY5jWIPR8pZTsbIJJvx55WD1SrglQsUYzWZesXZ6EkvyWy2BWNz5ii8eI4Oy0Oimkb6skc7bSy6pxpOdJYYfF/3mc9YVbJGen163LX5y4iCvNVAAtgR2sr6lTeca5byylbY04Zy0lkYmkRfF1ReNGUqriVaiyxjp7FhRh2DtvV1qia+03tuAKqzuDlD4XICE9HCqRXrsGVorgIPmcFOOteac6Su7GnsGruyokw9o4BjmR0ARLQ/jwP6BpXm2fXsKYML5BPnaTWtkxc79oIWNTBfe9+FB/A3Oe2s0XJfVYMAPuF6JY3l7goPEzen6iXzT9eoNnwSlc5YYkriFIq5D4N668YUQbg5qBuit6R/55niMfQdTow+0WNvrlaf1sLs3mChUH0c5PChozp06pmlnrJKn4+UbX1r7SOmvPuc0vZs2/wMjDgk0VtYqxjIM1dYscoJtGQYvTb2n5n30Tkf6BursV16Av77ZMB90ucZjDxYsOCHFZuw/1vDvlhJ2YKlPEbd6M9gX8Of00jJTeEY176YG8UDIkBnDqWu7YSyZCM+pjMmOzPXqic9Xsw0s7SV/vW4vs+h3T69/xsRhPcJA/Sdzz51OUPUep69F73eWyzNJidiM5NDYiJEZ04GNnB1WcvGinPN48iEv549+ZStTUt7SN8AY5cIG9bWk7bOPPaUgcRz+LSVmWDI8kBTtZh2O42TplnioNGx7n0YJGe0/MGpMZq1AeLCRxkQIcHZWtMZWkOYa88AP85ZhWvSFmu7zEatE3LewfssC3ZnGhI96iseCHaPafkLlUH/LhpjPVm8LgypZPNX44wGO2V4BWJzCQCLcAzitjMDL/VsLue27FlaJ3tjC3UIVH0aX20MX/5u6a6/UK2/lR05de6JOMTWtzzmBhEZYzQ5Tc+QRtkKC9YEqcF9A/RZKmUGwysy8sNYYWlXNWiILrihT3uAes1rQlP7OTTjHJGzo8IDA+YjV1BReKcFo2UGWgBGbZy/l2nQtwGauIVsUNEpOtFTNdaky7kYApqIyuqMhM7HAEsYYApVU0e+i1uMrCdDT3PpQT+o20OXgEPZwBKiy8REeBwv22wNhA5Bw0S4okzNG35mqDMMaVTl0jZunyl6QV/5IMFkSB8EhX0DGTOBi1E3FHh6YICd/fbZ4/06lbX8tzHBVIELRJmYhTI5dvUigxWcYq4Df0CDx70vPGi03hkp6OEsbTWM9+TQzpH22dKT0T0MjdSiEHJh5OJZggTYdLMzQTrDW3BGMmGpBZcF9X0z4AtKWwK71Mlw8mpfgj5HYVNo7UEJEzPBtxjkTEBt6xiDdAYsVyTggptVF
89BK7tJCwXhycUQBHmk9VZ/3J+pb3qKMXk1kDsJQHfRGmOO1mD64WS8OJ0Eeqv1D4zfekuw8Alrkkx9LjBMkc3TpyalBHtw5Xm1+VDScVdJByj0tUsFq2crIXUjrAbSZdLdHUDWjevuKdTvvuH+xOA8I2f1EAKCEsU6bqJ4QXzzao7UMTENho75h6mPnDc/jLGx7P0oco6u9EYdiMpB/YXNQAhxc37C0AG5j2d1zgmN99oAv7G39lrE2WwVFQSAFzbnfZdi/BBwI23hOlS9XNbWHOC2yaHOWQ9oTRCrS1eQCsRiZNyb0OeIoHcMQ9FRzlZgfXBoPgG/YqcPO5y4YO8EsTN94fJ4UOxYCqOfjFF1d8ImG042Oa7BbE+CgSfPkaACzizdHSzO8HQQSivWFjk/uYPAm08ML0Oxlj5EZNYNeJky5h4/oWxdnIP68xUhgQCmDb/TYGDPUfczW4nmnWYhgam4adQQ9nq24MODXIPlg1aQgIBmG4KYBBB/XDdGW3ZoYLVazkgYAIVFTlwK4oWesYQAwzSyS9Bwwc9beJo2LIKe9nhuPWn5j7E+S+ARf+NuJ+AI5xvnBboOjArMH78+INjoT6cnMQWNkJokBBi1tjvoBTcpOw0GLGKTvF6zLyB5RSqzEiWyhCQviNkiMvIpQOx4LrwlWnOuDTzs49wpNvcMOgHkfsdhrCByEJeJQAQAYxI/9cPgrQYWbsg7iGRgjlDKlb4Xckeidy0ioTqwt/kXRC58hFGsNjt4ovxYBjL5W8R/hT7XnW99wkrPYXxgYc+FmK293mkftBSbYluHaDfDay1ODagSwdcVET7CMc1zkXWy7L8wYA5IChD6II2pNLesCUUOmHHDST05V6iKiQq8PmoDmMeNcbZK6FWBVCpawscajPgdd3bJw/1UBI8UH1ysPGVCYlDDnj6tmki5t/5Jb7oL554rFh39P35a524lgrMIZUxqLORIcNkO7x/RXcZPyxGhIwZcMpmacKIm3vHoF2AEv6TCwP0XopjZ/uAeBiPC7ChlawzcowIPcoBGrObFFLl9TmbeE0fk8y/Abey4xQX2OPm2TjWefgu434eMCaE7EJlhrXcpAJ5sr1MLB+qkP21oEJngtlRWw20WXjJTHJfIOMRjlLYYc7ERNIxcL2ngjaKRDb3zm4D0JVkQ76ZejoBgasfHm8w+27PrWH/0ZoMvZ9PDrgEzzjEkOQzDnJbkQI1HJBrBNpg1bh54gCP57oSZoZzBG/1hJscm+5OwOcymQAn3kqafWSBWYU7/MR/H/57Gk5ne7UuGEn0+RqeW0SRBrZ8rM2bkQBoHtdbCbaCiHS3GevBXYqChEHkZM98k4io4Fq0ihehV0el5yi7vcsRCzHvmBbM4Oo4a4x9YohJUqwb6FgdoRVVSNIMP8kIi3drSHjMD0erTpCd1qn2+IAyR4Xn+OxoVV4EW9CcmBAS3FzARHEKOWgUXZ3TSn9Bpt/xqxBOeJI1a6CyMAwjRiF3/e/JahO+ALcwOUv1OKf3VvwF9jMhkhgPI3gb9uQQhJJzbXjfvMaxLbtaRxOwNgCb3X4uRYOiz7osgKpTT2ZiC2mA9JthP7l4XQXDvNIZH6Nx/1KvNcgGfl9pfVeY7x3uIN7qsn6VckwqA/DCE/hAwWjS0bT5PMFh6KIU2K5UgGJ/Ix+4YFxAUUpGO0Me16HlBLJ7N7AQusY3EcIWpSY/uKmPCBwIAFCvQYH4Sq0P7IYOMwnxzWcdIWHncQITB62vKWGnQbwwIIh89FHLkkihUyJojCjWwnCoSMnqNp+Ch1HL15exsqP9K8hT6ZgXSU7pmveB8AGGhsxIxlEyHRUR3cGFd8hfjvtNrz92ygnOfjoHMkd29zd1JwEFSO/SCM5lh17sqkGRs7usAhuExZRQktLhdkDmdiGOJg1RK3xBb/1jrvVxQA0D7/QbBloVoU3K/pM/Ohk1Qaj8QVcNmkrI0FV3QSH6Dcw8A5GhK24M4zXqUJ92Tk05ARIVVudK89Xbcltox5yHiNKxriMivWDmO/UTi/bMKIGLoOeM0TEp1z9htwS1HXZ5c5l8EYb+G+mFgEnw/UmWgJenLHN08Coma6DCSK7em/xWlxCM3XiubnDtT08jiIgBFVwljwbIIS6gjMmRtygIiwfowtA/G9kD21jsjGMrXa/fSBQYuxsTByznPXeSirOK3q7VisGrAOqjgQwRMAcYSSn5ERQfKN0QqVcZ5YyKPgX9sls0HlmaeJ8KromfhsYSNjoiZHmlExMo4iwUqrYCl+y3HtnfmNQi9f5yJWlV4OH5YUc0dd7/39TXvB8ovgND7Sdo/e9twbhx/fmZU7YeMcrEsCM0TDfzGyM9AxM+IgMBLI9JsPKaY+TeInkhPeW30IgFsQJbPrUODmW2UTFoTGuACs4sW1K0akJGvg1Cf/+ZtHnmbX67RbAU2uwXvYoDS8GzzKM5LRNYql+H/NQs4gJEjDb88GPp/sXRsyH39RdW+vohMhra6bf0T0EU4pL1EBKRvV8yMCw/e5BHtJwrJAeico3PhZTupL9jk71O511WcC+53vPadEifNmqD/6+Ca1a+B57arkpfxFk/S4oBApPH1aOizMC7lK/D7cCm8Gpmdv8LMsTKPbUoy1mXBbBt/uYUu7kt8X4iEBJVtkKezRr12rliBml/GgfMnphhinBrj0+tkwZfgmFOlagbcwpjomMXOgZY+i+WTBVpb6OMbB3ZnOgIMktAhxTMxLpZXCJvwYdgJdOAiLLEXEflQefJrV5ANNaUX5MRN1kPYPqoWe/TcPEkUmoDPyNRmNehZrh+bo7Yohe/P4KKbNMwW7XxCDD7hYmLI3RhiJ8hjBiC6vitzy3/9nFcwD2X+tecsqjzW1bh3oWs0z623xJIO5TgydMFMUaXh1X4RiCLcheaIZHJKDKqm4NMcBcTmjxGP3GAdIIVtIepjocEsqDaI07Tyi2npk9YovfGDpzY4E8CST/O91aOT5FPS24MRIS9Ze+hF+Ehmaa/4H7fwGCg3GYVGiblAAAAYRpQ0NQSUNDIHByb2ZpbGUAAHicfZE9SMNQFIVPW0tFKx3sUMQhQ3WyICriqFUoQoVQK7TqYPLSP2jSkKS4OAquBQd/FqsOLs66OrgKguAPiKuLk6KLlHhfUmgR44PL+zjvncN99wH+ZpWpZs84oGqWkUklhVx+VQi9IogYIlT9EjP1OVFMw3N93cPH97sEz/K+9+caUAomA3wC8SzTDYt4g3h609I57xNHWVlSiM+JxwxqkPiR67LLb5xLDvt5ZtTIZuaJo8RCqYvlLmZlQyWeIo4rqkb5/pzLCuctzmq1ztp98heGC9rKMtephpHCIpYgQoCMOiqowkKCdo0UExk6T3r4hxy/SC6ZXBUwciygBhWS4wf/g9+zNYuTE25SOAkEX2z7YwQI7QKthm1/H9t26wQIPANXWsdfawIzn6Q3Olr8CIhsAxfXHU3eAy53gNiTLhmSIwWo/MUi8H5G35QHBm+BvjV3bu1znD4AWZpV+gY4OARGS5S97vHu3u65/XunPb8fN2tyj8UDOK0AAA0aaVRYdFhNTDpjb20uYWRvYmUueG1wAAAAAAA8P3hwYWNrZXQgYmVnaW49Iu+7vyIgaWQ9Ilc1TTBNcENlaGlIenJlU3pOVGN6a2M5ZCI/Pgo8eDp4bXBtZXRhIHhtbG5zOng9ImFkb2JlOm5zOm1ldGEvIiB4OnhtcHRrPSJYTVAgQ29yZSA0LjQuMC1FeGl2MiI+CiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPgogIDxyZGY6RGVzY3JpcHRpb24gcmRmOmFib3V0PSIiCiAgICB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIKICAgIHhtbG5zOnN0RXZ0PSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VFdmVudCMiCiAgICB4bWxuczpkYz0iaHR0cDovL3B1cmwub3JnL2RjL2VsZW1lbnRzLzEuMS8iCiAgICB4bWxuczpHSU1QPSJodHRwOi8vd3d3LmdpbXAub3JnL3htcC8iCiAgICB4bWxuczp0aWZmPSJodHRwOi8vbnMuYWRvYmUuY29tL3RpZmYvMS4wLyIKICAgIHhtbG5zOnhtcD0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wLyIKICAgeG1wTU06RG9jdW1lbnRJRD0iZ2ltcDpkb2NpZDpnaW1wOjEwNGNlNWFhLTE1YzctNGI4Yi1iOGU1LTFmYWQyNWFiYzBhZCIKICAgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDpkNDMyZTY1Zi0xOThhLTQxM2EtYWYyMy1jNzhlNzczNGRlN2QiCiAgIHhtcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD0ieG1wLmRpZDoyNzExODVkMi03MWZiLTRhZDMtYTJmMi1iNjM3OWU3MDc1OTEiCiAgIGRjOkZvcm1hdD0iaW1hZ2UvcG5nIgogICBHSU1QOkFQST0iMi4wIgogICBHSU1QOlBsYXRmb3JtPSJMaW51eCIKICAgR0lNUDpUaW1lU3RhbXA9IjE2ODQ5NDE4NjYyMzgzMjQiCiAgIEdJTVA6VmVyc2lvbj0iMi4xMC4zMCIKICAgdGlmZjpPcmllbnRhdGlvbj0iMSIKICAgeG1wOkNyZWF0b3JUb29sPSJHSU1QIDIuMTAiPgogICA8eG1wTU06SGlzdG9yeT4KICAgIDxyZGY6U2VxPgogICAgIDxyZGY6bGkKICAgICAgc3RFdnQ6YWN0aW9uPSJzYXZlZCIKICAgICAgc3RFdnQ6Y2hhbmdlZD0iLyIKICAgICAgc3RFdnQ6aW5zdGFuY2VJRD0ieG1wLmlpZDo1NGFiYzNkYS1lZWJiLTRlZjctYjdjNS04ZDRjODY5OGVjODMiCiAgICAgI
89HN0RXZ0OnNvZnR3YXJlQWdlbnQ9IkdpbXAgMi4xMCAoTGludXgpIgogICAgICBzdEV2dDp3aGVuPSIyMDIzLTA1LTI0VDE3OjI0OjI2KzAyOjAwIi8+CiAgICA8L3JkZjpTZXE+CiAgIDwveG1wTU06SGlzdG9yeT4KICA8L3JkZjpEZXNjcmlwdGlvbj4KIDwvcmRmOlJERj4KPC94OnhtcG1ldGE+CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAKPD94cGFja2V0IGVuZD0idyI/Pj0tlUwAAAAJcEhZcwAADdcAAA3XAUIom3gAAAAHdElNRQfnBRgPGBru/VeEAAAABmJLR0QA/wD/AP+gvaeTAAAFO0lEQVRYw9WYe2xTVRzHTx97dYS5B1UHa+/tY12dDoOKWyIGlfgHkCkSNTHGwHxA3NiAP/A5x4CMKEzdYL29YyAyBxKQZbI+NvYIaowaH9Ogi2GRbGjcFrbBNrq2a2/9nq5LCFnbbfSOeZJPTs/t6Tm/7/39zu+cU0IiXc7WSImNX0BsZiVYAhigmah5tHklsZrjSYtJSuZtaeSiiJU3gHUwfC9oARfBIHBP1DzaPH1eRuzmp0E6aTgSNX9EWMwSvOkMGPgG+CpguG8a0H7nA78zkMYqye0V0lYXDSHrYUw7cE5TxM04/b+38+vJ+RPRt0eIjVeAAhhyCQizFDKJEBjndaCY49Di4+CRlzFxfwSE3Ciol9i4DSBujoRUy7HIszFxdwSF3CioBy8qm1g5ufhirHwyJqwHrrDGWTlg8hFL1URN2+EF0XFPkyYuSWwhUVgnT2CygXBG3dFcM7bz1/au1u7OK9/93eWidUlHe1dCc810EsUAsXOPQZCI3rGZ6Wb4EXAEM0SCUFnZduz6T/09l4bHXYOCz+f0+XxeWg+7XYM/4vnKtlqHJHSIOrAHlYMFYmawRNCKycaDGZLVfMRdf/nPDpfXM+abotDnpy93dtzXfNgdZg+im2uimJ6h66UTeIMZsrat1jvkdPRRb/imLt4hl6N3DfqFEIPvOMzDJYspJsWfbUKEyFNttcKoyzkKo4UgYoRRt3OE9guT1br984nsmQ7gCWbIipaj4xeu9v/hFQTPlG7B89+u9v9O+4UQQ8f/BSlaVM8kgBOhji4p9mpvwQ+Wfwddjp6bQw2u8g44HT3535/tTUa/0Eccvg4sFDE1m2PBZkx2LVRqVcLQvG/PDDX1/tVxze38x+UZH6O1He28b764qgwtxOcf327eBGLFE9NikiD3qzDZhVBJgCJH3KubDnkfbD4s5Jw74qM1bcvDnxq8/vHt1SrS9InIJ2m7OQ4UYsKhCB9lJqHj0gPsHJzPvsS9w8rRRPDptI40M8PlH9fOJ5M5K008rsZmIwi5gc4QN9Zja8zn+5epch9PTFepU1iGuVunVqeyS9g0iv8zy96l0WiSjIsXx28iJEJhaONkMGB5YP14bkmI1SzIz1T0pRa9VKnNzCjUMcwWUAS2BtgWYLJN+xTo1OyrOhW7xsAwqnSGkd3i+uGjkT5Xw6DLt3AdEKQNB4YXbdtwQpuVuRtG7pwhxWA7vJgRib0nDuSDvtkIkjYcHE3aVWjRLL9/zyyETPK2Vq3OidAaOhiPDLcbxo3MRIik0eReWPnO15pHHiqbpYhS6hkNw7wAz0To6GM5hAzH3wkDa6b7x4bEwnkUfMnP6idX7Nex7GxElIDNerV6hU6jSdbp9RHck2w0w/FaGGoJm7KtnCfmWNlF1fOrK3Q6be
89kMRFABO7QM8yxewFLUi+5JSxPpAmcxy0gjt1Rytir4NcHKCfJTH/al5j1j1hr0pWEML55YD+x2GP6cVqNZZjQYEvUsG4vP4v8jKju5L1p6qnytxGKa6qogyOorBpVbXvxMe69xdxABb9I0DAGvIIRWp7NsBsJIoWVZKfaXuf+jMKp2b6z8+Adb4aErNwpCCh5J2pnfoH0ga08g7invBfaQjXjjuQifhyEgLdNolJP5UqR17y+QnSwvk1i565OZK6F8RzubvWwvDH8LvKZnmHXY8HKws+sNLJtI5muJ/7hYElOzJ1V+fN9R7CVDClPJOVXuqo06vS4HQjTwgDKDZRXk/1JiD7wrieFLk6T1lczCXUVK7aPZinS9XrTw+Q+Tql7SUmvGuQAAAABJRU5ErkJggg==",defaultOffset:[-25.5,-32]};const XML_SCHEMA_INSTANCE_URI="http://www.w3.org/2001/XMLSchema-instance";function createElementNS(ne,ee){return getDocument().createElementNS(ne,ee)}function getAllTextContent(ne,ee){return getAllTextContent_(ne,ee,[]).join("")}function getAllTextContent_(ne,ee,te){if(ne.nodeType==Node.CDATA_SECTION_NODE||ne.nodeType==Node.TEXT_NODE)te.push(ne.nodeValue);else{let st;for(st=ne.firstChild;st;st=st.nextSibling)getAllTextContent_(st,ee,te)}return te}function isDocument(ne){return"documentElement"in ne}function parse$1(ne){return new DOMParser().parseFromString(ne,"application/xml")}function makeArrayExtender(ne,ee){return(function(te,st){const ot=ne.call(ee??this,te,st);if(ot!==void 0){const ct=st[st.length-1];extend$3(ct,ot)}})}function makeArrayPusher(ne,ee){return(function(te,st){const ot=ne.call(ee??this,te,st);ot!==void 0&&st[st.length-1].push(ot)})}function makeReplacer(ne,ee){return(function(te,st){const ot=ne.call(this,te,st);ot!==void 0&&(st[st.length-1]=ot)})}function makeObjectPropertyPusher(ne,ee,te){return(function(st,ot){const ct=ne.call(this,st,ot);if(ct!==void 0){const ut=ot[ot.length-1],dt=st.localName;let ht;dt in ut?ht=ut[dt]:(ht=[],ut[dt]=ht),ht.push(ct)}})}function makeObjectPropertySetter(ne,ee,te){return(function(st,ot){const ct=ne.call(this,st,ot);if(ct!==void 0){const ut=ot[ot.length-1],dt=ee!==void 0?ee:st.localName;ut[dt]=ct}})}function makeChildAppender(ne,ee){return(function(te,st,ot){ne.call(this,te,st,ot),ot[ot.length-1].node.appendChild(te)})}function makeArraySerializer(ne,ee){let te,st;return function(ot,ct,ut){if(te===void 0){te={};const dt={};dt[ot.localName]=ne,te[ot.namespaceURI]=dt,st=makeSimpleNodeFactory(ot.localName)}serialize(te,st,ct,ut)}}function makeSimpleNodeFactory(ne,ee){return(function(te,st,ot){const ut=st[st.length-1].node;let dt=ne;dt===void 0&&(dt=ot);const ht=ut.namespaceURI;return createElementNS(ht,dt)})}const OBJECT_PROPERTY_NODE_FACTORY=makeSimpleNodeFactory();function makeSequence(ne,ee){const te=ee.length,st=new Array(te);for(let ot=0;ot<te;++ot)st[ot]=ne[ee[ot]];return st}function makeStructureNS(ne,ee,te){te=te!==void 0?te:{};let st,ot;for(st=0,ot=ne.length;st<ot;++st)te[ne[st]]=ee;return te}function parseNode(ne,ee,te,st){let ot;for(ot=ee.firstElementChild;ot;ot=ot.nextElementSibling){const ct=ne[ot.namespaceURI];if(ct!==void 0){const ut=ct[ot.localName];ut!==void 0&&ut.call(st,ot,te)}}}function pushParseAndPop(ne,ee,te,st,ot){return st.push(ne),parseNode(ee,te,st,ot),st.pop()}function serialize(ne,ee,te,st,ot,ct){const ut=(ot!==void 0?ot:te).length;let dt,ht;for(let ft=0;ft<ut;++ft)dt=te[ft],dt!==void 0&&(ht=ee.call(ct,dt,st,ot!==void 0?ot[ft]:void 0),ht!==void 0&&ne[ht.namespaceURI][ht.localName].call(ct,ht,dt,st))}function pushSerializeAndPop(ne,ee,te,st,ot,ct,ut){return ot.push(ne),serialize(ee,te,st,ot,ct,ut),ot.pop()}let xmlSerializer_;function getXMLSerializer(){return xmlSerializer_===void 0&&typeof XMLSerializer<"u"&&(xmlSerializer_=new XMLSerializer),xmlSerializer_}let document_;function getDocument(){return document_===void 0&&typeof document<"u"&&(document_=document.implementation.createDocument("","",null)),document_}class FeatureFormat{constructor(){this.dataProjection=void 0,this.defaultFeatureProjection=void 0,this.featureClass=Feature,this.supportedMediaTypes=null}getReadOptions(ee,te){if(te){let st=te.dataProjection?get$3(te.dataProjection):this.readProjection(ee);te.extent&&st&&st.getUnits()==="tile-pixels"&&(st=get$3(st),st.setWorldExtent(te.extent)),te={dataProjection:st,featureProjection:te.featureProjection}}return this.adaptOptions(te)}adaptOptions(ee){return Object.assign({dataProjection:this.dataProjection,featureProjection:this.defaultFeatureProjection,featureClass:this.featureClass},ee)}getType(){return abstract()}readFeature(ee,te){return abstract()}readFeatures(ee,te){return abstract()}readGeometry(ee,te){return abstract()}readProjection(ee){return abstract()}
89writeFeature(ee,te){return abstract()}writeFeatures(ee,te){return abstract()}writeGeometry(ee,te){return abstract()}}function transformGeometryWithOptions(ne,ee,te){const st=te?get$3(te.featureProjection):null,ot=te?get$3(te.dataProjection):null;let ct=ne;if(st&&ot&&!equivalent$1(st,ot)){ee&&(ct=ne.clone());const ut=ee?st:ot,dt=ee?ot:st;ut.getUnits()==="tile-pixels"?ct.transform(ut,dt):ct.applyTransform(getTransform(ut,dt))}if(ee&&te&&te.decimals!==void 0){const ut=Math.pow(10,te.decimals),dt=function(ht){for(let ft=0,pt=ht.length;ft<pt;++ft)ht[ft]=Math.round(ht[ft]*ut)/ut;return ht};ct===ne&&(ct=ne.clone()),ct.applyTransform(dt)}return ct}const GeometryConstructor={Point:Point$1,LineString,Polygon,MultiPoint,MultiLineString,MultiPolygon};function orientFlatCoordinates(ne,ee,te){return Array.isArray(ee[0])?(linearRingssAreOriented(ne,0,ee,te)||(ne=ne.slice(),orientLinearRingsArray(ne,0,ee,te)),ne):(linearRingsAreOriented(ne,0,ee,te)||(ne=ne.slice(),orientLinearRings(ne,0,ee,te)),ne)}function createRenderFeature(ne,ee){var ct;const te=ne.geometry;if(!te)return[];if(Array.isArray(te))return te.map(ut=>createRenderFeature({...ne,geometry:ut})).flat();const st=te.type==="MultiPolygon"?"Polygon":te.type;if(st==="GeometryCollection"||st==="Circle")throw new Error("Unsupported geometry type: "+st);const ot=te.layout.length;return transformGeometryWithOptions(new RenderFeature(st,st==="Polygon"?orientFlatCoordinates(te.flatCoordinates,te.ends,ot):te.flatCoordinates,(ct=te.ends)==null?void 0:ct.flat(),ot,ne.properties||{},ne.id).enableSimplifyTransformed(),!1,ee)}function createGeometry(ne,ee){if(!ne)return null;if(Array.isArray(ne)){const st=ne.map(ot=>createGeometry(ot,ee));return new GeometryCollection(st)}const te=GeometryConstructor[ne.type];return transformGeometryWithOptions(new te(ne.flatCoordinates,ne.layout||"XY",ne.ends),!1,ee)}class XMLFeature extends FeatureFormat{constructor(){super(),this.xmlSerializer_=getXMLSerializer()}getType(){return"xml"}readFeature(ee,te){if(!ee)return null;if(typeof ee=="string"){const st=parse$1(ee);return this.readFeatureFromDocument(st,te)}return isDocument(ee)?this.readFeatureFromDocument(ee,te):this.readFeatureFromNode(ee,te)}readFeatureFromDocument(ee,te){const st=this.readFeaturesFromDocument(ee,te);return st.length>0?st[0]:null}readFeatureFromNode(ee,te){return null}readFeatures(ee,te){if(!ee)return[];if(typeof ee=="string"){const st=parse$1(ee);return this.readFeaturesFromDocument(st,te)}return isDocument(ee)?this.readFeaturesFromDocument(ee,te):this.readFeaturesFromNode(ee,te)}readFeaturesFromDocument(ee,te){const st=[];for(let ot=ee.firstChild;ot;ot=ot.nextSibling)ot.nodeType==Node.ELEMENT_NODE&&extend$3(st,this.readFeaturesFromNode(ot,te));return st}readFeaturesFromNode(ee,te){return abstract()}readGeometry(ee,te){if(!ee)return null;if(typeof ee=="string"){const st=parse$1(ee);return this.readGeometryFromDocument(st,te)}return isDocument(ee)?this.readGeometryFromDocument(ee,te):this.readGeometryFromNode(ee,te)}readGeometryFromDocument(ee,te){return null}readGeometryFromNode(ee,te){return null}readProjection(ee){if(!ee)return null;if(typeof ee=="string"){const te=parse$1(ee);return this.readProjectionFromDocument(te)}return isDocument(ee)?this.readProjectionFromDocument(ee):this.readProjectionFromNode(ee)}readProjectionFromDocument(ee){return this.dataProjection}readProjectionFromNode(ee){return this.dataProjection}writeFeature(ee,te){const st=this.writeFeatureNode(ee,te);return this.xmlSerializer_.serializeToString(st)}writeFeatureNode(ee,te){return null}writeFeatures(ee,te){const st=this.writeFeaturesNode(ee,te);return this.xmlSerializer_.serializeToString(st)}writeFeaturesNode(ee,te){return null}writeGeometry(ee,te){const st=this.writeGeometryNode(ee,te);return this.xmlSerializer_.serializeToString(st)}writeGeometryNode(ee,te){return null}}function readBoolean(ne){const ee=getAllTextContent(ne,!1);return readBooleanString(ee)}function readBooleanString(ne){const ee=/^\s*(true|1)|(false|0)\s*$/.exec(ne);if(ee)return ee[1]!==void 0||!1}function readDateTime(ne){const ee=getAllTextContent(ne,!1),te=Date.parse(ee);return isNaN(te)?void 0:te/1e3}function readDecimal(ne){const ee=getAllTextContent(ne,!1);return readDecimalString(ee)}function readDecimalString(ne){const ee=/^\s*([+\-]?\d*\.?\d+(?:e[+\-]?\d+)?)\s*$/i.exec(ne);if(ee)return parseFloat(ee[1])}function readPositiveInteger(ne){const ee=getAllTextContent(ne,!1);return readNonNegativeIntegerString(ee)}function readNonNegativeIntegerString(ne){const ee=/^\s*(\d+)\s*$/.exec(ne);if(ee)return parseInt(ee[1],10)}function readString(ne){return getAllTextContent(ne,!1).trim()}function writeBooleanTextNode(ne,ee){writeStringTextNode(ne,ee?"1":"0")}function writeCDATASection(ne,ee){ne.appendChild(getDocument().createCDATASection(ee))}function writeDateTimeTextNode(ne,ee){const te=new Date(ee*1e3),st=te.getUTCFullYear()+"-"+padNumber(te.getUTCMonth()+1,2)+"-"+padNumber(te.getUTCDate(),2)+"T"+padNumber(te.getUTCHours(),2)+":"+padNumber(te.getUTCMinutes(),2)+":"+padNumber(te.getUTCSeconds(),2)+"Z";ne.appendChild(getDocument().createTextNode(st))}function writeDecimalTextNode(ne,ee){const te=ee.toPrecision();ne.appendChild(getDocument().createTextNode(te))}function writeNonNegativeIntegerTextNode(ne,ee){const te=ee.toString();ne.appendChild(getDocument().createTextNode(te))}const whiteSpaceStart=/^\s/,whiteSpaceEnd=/\s$/,cdataCharacters=/(\n|\t|\r|<|&| {2})/;function writeStringTextNode(ne,ee){typeof ee=="string"&&(whiteSpaceStart.test(ee)||whiteSpaceEnd.test(ee)||cdataCharacters.test(ee))?ee.split("]]>").forEach((te,st,ot)=>{st<ot.length-1&&(te+="]]"),st>0&&(te=">"+te),writeCDATASection(ne,te)}):ne.appendChild(getDocument().createTextNode(ee))}const GX_NAMESPACE_URIS=["http://www.google.com/kml/ext/2.2"],NAMESPACE_URIS$4=[null,"http://earth.google.com/kml/2.0","http://earth.google.com/kml/2.1","http://earth.google.com/kml/2.2","http://www.opengis.net/kml/2.2"],SCHEMA_LOCATION$1="http://www.opengis.net/kml/2.2 https://developers.google.com/kml/schema/kml22gx.xsd",ICON_ANCHOR_UNITS_MAP={fraction:"fraction",pixels:"pixels",insetPixels:"pixels"},PLACEMARK_PARSERS=makeStructureNS(NAMESPACE_URIS$4,{ExtendedData:extendedDataParser,Region:regionParser,MultiGeometry:makeObjectPropertySetter(readMultiGeometry,"geometry"),LineString:makeObjectPropertySetter(readLineString,"geometry"),LinearRing:makeObjectPropertySetter(readLinearRing,"geometry"),Point:makeObjectPropertySetter(readPoint,"geometry"),Polygon:makeObjectPropertySetter(readPolygon,"geometry"),Style:makeObjectPropertySetter(readStyle$2),StyleMap:placemarkStyleMapParser,address:makeObjectPropertySetter(readString),description:makeObjectPropertySetter(readString),name:makeObjectPropertySetter(readString),open:makeObjectPropertySetter(readBoolean),phoneNumber:makeObjectPropertySetter(readString),styleUrl:makeObjectPropertySetter(readStyleURL),visibility:makeObjectPropertySetter(readBoolean)},makeStructureNS(GX_NAMESPACE_URIS,{MultiTrack:makeObjectPropertySetter(readGxMultiTrack,"geometry"),Track:makeObjectPropertySetter(readGxTrack,"geometry")})),NETWORK_LINK_PARSERS=makeStructureNS(NAMESPACE_URIS$4,{ExtendedData:extendedDataParser,Region:regionParser,Link:linkParser,address:makeObjectPropertySetter(readString),description:makeObjectPropertySetter(readString),name:makeObjectPropertySetter(readString),open:makeObjectPropertySetter(readBoolean),phoneNumber:makeObjectPropertySetter(readString),visibility:makeObjectPropertySetter(readBoolean)}),LINK_PARSERS$1=makeStructureNS(NAMESPACE_URIS$4,{href:makeObjectPropertySetter(readURI)}),CAMERA_PARSERS=makeStructureNS(NAMESPACE_URIS$4,{Altitude:makeObjectPropertySetter(readDecimal),Longitude:makeObjectPropertySetter(readDecimal),Latitude:makeObjectPropertySetter(readDecimal),Tilt:makeObjectPropertySetter(readDecimal),AltitudeMode:makeObjectPropertySetter(readString),Heading:makeObjectPropertySetter(readDecimal),Roll:makeObjectPropertySetter(readDecimal)}),REGION_PARSERS=makeStructureNS(NAMESPACE_URIS$4,{LatLonAltBox:latLonAltBoxParser,Lod:lodParser}),KML_SEQUENCE=makeStructureNS(NAMESPACE_URIS$4,["Document","Placemark"]),KML_SERIALIZERS=makeStructureNS(NAMESPACE_URIS$4,{Document:makeChildAppender(writeDocument),Placemark:makeChildAppender(writePlacemark)});let DEFAULT_COLOR,DEFAULT_FILL_STYLE=null,DEFAULT_IMAGE_STYLE_ANCHOR,DEFAULT_IMAGE_STYLE_ANCHOR_X_UNITS,DEFAULT_IMAGE_STYLE_ANCHOR_Y_UNITS,DEFAULT_IMAGE_STYLE_SIZE,DEFAULT_IMAGE_STYLE_SRC,DEFAULT_IMAGE_STYLE=null,DEFAULT_NO_IMAGE_STYLE,DEFAULT_STROKE_STYLE=null,DEFAULT_TEXT_STROKE_STYLE,DEFAULT_TEXT_STYLE=null,DEFAULT_STYLE=null,DEFAULT_STYLE_ARRAY=null;function scaleForSize(ne){return 32/Math.min(ne[0],ne[1])}function createStyleDefaults(){DEFAULT_COLOR=[255,255,255,1],DEFAULT_FILL_STYLE=new Fill({color:DEFAULT_COLOR}),DEFAULT_IMAGE_STYLE_ANCHOR=[20,2],DEFAULT_IMAGE_STYLE_ANCHOR_X_UNITS="pixels",DEFAULT_IMAGE_STYLE_ANCHOR_Y_UNITS="pixels",DEFAULT_IMAGE_STYLE_SIZE=[64,64],DEFAULT_IMAGE_STYLE_SRC="https://maps.google.com/mapfiles/kml/pushpin/ylw-pushpin.png",DEFAULT_IMAGE_STYLE=new Icon({anchor:DEFAULT_IMAGE_STYLE_ANCHOR,anchorOrigin:"bottom-left",anchorXUnits:DEFAULT_IMAGE_STYLE_ANCHOR_X_UNITS,anchorYUnits:DEFAULT_IMAGE_STYLE_ANCHOR_Y_UNITS,crossOrigin:"anonymous",rotation:0,scale:scaleForSize(DEFAULT_IMAGE_STYLE_SIZE),size:DEFAULT_IMAGE_STYLE_SIZE,src:DEFAULT_IMAGE_STYLE_SRC}),DEFAULT_NO_IMAGE_STYLE="NO_IMAGE",DEFAULT_STROKE_STYLE=new Stroke({color:DEFAULT_COLOR,width:1}),DEFAULT_TEXT_STROKE_STYLE=new Stroke({color:[51,51,51,1],width:2}
89),DEFAULT_TEXT_STYLE=new Text({font:"bold 16px Helvetica",fill:DEFAULT_FILL_STYLE,stroke:DEFAULT_TEXT_STROKE_STYLE,scale:.8}),DEFAULT_STYLE=new Style$1({fill:DEFAULT_FILL_STYLE,image:DEFAULT_IMAGE_STYLE,text:DEFAULT_TEXT_STYLE,stroke:DEFAULT_STROKE_STYLE,zIndex:0}),DEFAULT_STYLE_ARRAY=[DEFAULT_STYLE]}let TEXTAREA;function defaultIconUrlFunction(ne){return ne}let KML$1=class extends XMLFeature{constructor(ee){super(),ee=ee||{},DEFAULT_STYLE_ARRAY||createStyleDefaults(),this.dataProjection=get$3("EPSG:4326"),this.defaultStyle_=ee.defaultStyle?ee.defaultStyle:DEFAULT_STYLE_ARRAY,this.extractStyles_=ee.extractStyles!==void 0?ee.extractStyles:!0,this.writeStyles_=ee.writeStyles!==void 0?ee.writeStyles:!0,this.sharedStyles_={},this.showPointNames_=ee.showPointNames!==void 0?ee.showPointNames:!0,this.crossOrigin_=ee.crossOrigin!==void 0?ee.crossOrigin:"anonymous",this.referrerPolicy_=ee.referrerPolicy,this.iconUrlFunction_=ee.iconUrlFunction?ee.iconUrlFunction:defaultIconUrlFunction,this.supportedMediaTypes=["application/vnd.google-earth.kml+xml"]}readDocumentOrFolder_(ee,te){const st=makeStructureNS(NAMESPACE_URIS$4,{Document:makeArrayExtender(this.readDocumentOrFolder_,this),Folder:makeArrayExtender(this.readDocumentOrFolder_,this),Placemark:makeArrayPusher(this.readPlacemark_,this),Style:this.readSharedStyle_.bind(this),StyleMap:this.readSharedStyleMap_.bind(this)}),ot=pushParseAndPop([],st,ee,te,this);if(ot)return ot}readPlacemark_(ee,te){const st=pushParseAndPop({geometry:null},PLACEMARK_PARSERS,ee,te,this);if(!st)return;const ot=new Feature,ct=ee.getAttribute("id");ct!==null&&ot.setId(ct);const ut=te[0],dt=st.geometry;if(dt&&transformGeometryWithOptions(dt,!1,ut),ot.setGeometry(dt),delete st.geometry,this.extractStyles_){const ht=st.Style,ft=st.styleUrl,pt=createFeatureStyleFunction(ht,ft,this.defaultStyle_,this.sharedStyles_,this.showPointNames_);ot.setStyle(pt)}return delete st.Style,ot.setProperties(st,!0),ot}readSharedStyle_(ee,te){const st=ee.getAttribute("id");if(st!==null){const ot=readStyle$2.call(this,ee,te);if(ot){let ct,ut=ee.baseURI;(!ut||ut=="about:blank")&&(ut=window.location.href),ut?ct=new URL("#"+st,ut).href:ct="#"+st,this.sharedStyles_[ct]=ot}}}readSharedStyleMap_(ee,te){const st=ee.getAttribute("id");if(st===null)return;const ot=readStyleMapValue.call(this,ee,te);if(!ot)return;let ct,ut=ee.baseURI;(!ut||ut=="about:blank")&&(ut=window.location.href),ut?ct=new URL("#"+st,ut).href:ct="#"+st,this.sharedStyles_[ct]=ot}readFeatureFromNode(ee,te){if(!NAMESPACE_URIS$4.includes(ee.namespaceURI))return null;const st=this.readPlacemark_(ee,[this.getReadOptions(ee,te)]);return st||null}readFeaturesFromNode(ee,te){if(!NAMESPACE_URIS$4.includes(ee.namespaceURI))return[];let st;const ot=ee.localName;if(ot=="Document"||ot=="Folder")return st=this.readDocumentOrFolder_(ee,[this.getReadOptions(ee,te)]),st||[];if(ot=="Placemark"){const ct=this.readPlacemark_(ee,[this.getReadOptions(ee,te)]);return ct?[ct]:[]}if(ot=="kml"){st=[];for(let ct=ee.firstElementChild;ct;ct=ct.nextElementSibling){const ut=this.readFeaturesFromNode(ct,te);ut&&extend$3(st,ut)}return st}return[]}readName(ee){if(ee){if(typeof ee=="string"){const te=parse$1(ee);return this.readNameFromDocument(te)}return isDocument(ee)?this.readNameFromDocument(ee):this.readNameFromNode(ee)}}readNameFromDocument(ee){for(let te=ee.firstChild;te;te=te.nextSibling)if(te.nodeType==Node.ELEMENT_NODE){const st=this.readNameFromNode(te);if(st)return st}}readNameFromNode(ee){for(let te=ee.firstElementChild;te;te=te.nextElementSibling)if(NAMESPACE_URIS$4.includes(te.namespaceURI)&&te.localName=="name")return readString(te);for(let te=ee.firstElementChild;te;te=te.nextElementSibling){const st=te.localName;if(NAMESPACE_URIS$4.includes(te.namespaceURI)&&(st=="Document"||st=="Folder"||st=="Placemark"||st=="kml")){const ot=this.readNameFromNode(te);if(ot)return ot}}}readNetworkLinks(ee){const te=[];if(typeof ee=="string"){const st=parse$1(ee);extend$3(te,this.readNetworkLinksFromDocument(st))}else isDocument(ee)?extend$3(te,this.readNetworkLinksFromDocument(ee)):extend$3(te,this.readNetworkLinksFromNode(ee));return te}
89readNetworkLinksFromDocument(ee){const te=[];for(let st=ee.firstChild;st;st=st.nextSibling)st.nodeType==Node.ELEMENT_NODE&&extend$3(te,this.readNetworkLinksFromNode(st));return te}readNetworkLinksFromNode(ee){const te=[];for(let st=ee.firstElementChild;st;st=st.nextElementSibling)if(NAMESPACE_URIS$4.includes(st.namespaceURI)&&st.localName=="NetworkLink"){const ot=pushParseAndPop({},NETWORK_LINK_PARSERS,st,[]);te.push(ot)}for(let st=ee.firstElementChild;st;st=st.nextElementSibling){const ot=st.localName;NAMESPACE_URIS$4.includes(st.namespaceURI)&&(ot=="Document"||ot=="Folder"||ot=="kml")&&extend$3(te,this.readNetworkLinksFromNode(st))}return te}readRegion(ee){const te=[];if(typeof ee=="string"){const st=parse$1(ee);extend$3(te,this.readRegionFromDocument(st))}else isDocument(ee)?extend$3(te,this.readRegionFromDocument(ee)):extend$3(te,this.readRegionFromNode(ee));return te}readRegionFromDocument(ee){const te=[];for(let st=ee.firstChild;st;st=st.nextSibling)st.nodeType==Node.ELEMENT_NODE&&extend$3(te,this.readRegionFromNode(st));return te}readRegionFromNode(ee){const te=[];for(let st=ee.firstElementChild;st;st=st.nextElementSibling)if(NAMESPACE_URIS$4.includes(st.namespaceURI)&&st.localName=="Region"){const ot=pushParseAndPop({},REGION_PARSERS,st,[]);te.push(ot)}for(let st=ee.firstElementChild;st;st=st.nextElementSibling){const ot=st.localName;NAMESPACE_URIS$4.includes(st.namespaceURI)&&(ot=="Document"||ot=="Folder"||ot=="kml")&&extend$3(te,this.readRegionFromNode(st))}return te}readCamera(ee){const te=[];if(typeof ee=="string"){const st=parse$1(ee);extend$3(te,this.readCameraFromDocument(st))}else isDocument(ee)?extend$3(te,this.readCameraFromDocument(ee)):extend$3(te,this.readCameraFromNode(ee));return te}readCameraFromDocument(ee){const te=[];for(let st=ee.firstChild;st;st=st.nextSibling)st.nodeType===Node.ELEMENT_NODE&&extend$3(te,this.readCameraFromNode(st));return te}readCameraFromNode(ee){const te=[];for(let st=ee.firstElementChild;st;st=st.nextElementSibling)if(NAMESPACE_URIS$4.includes(st.namespaceURI)&&st.localName==="Camera"){const ot=pushParseAndPop({},CAMERA_PARSERS,st,[]);te.push(ot)}for(let st=ee.firstElementChild;st;st=st.nextElementSibling){const ot=st.localName;NAMESPACE_URIS$4.includes(st.namespaceURI)&&(ot==="Document"||ot==="Folder"||ot==="Placemark"||ot==="kml")&&extend$3(te,this.readCameraFromNode(st))}return te}writeFeaturesNode(ee,te){te=this.adaptOptions(te);const st=createElementNS(NAMESPACE_URIS$4[4],"kml"),ot="http://www.w3.org/2000/xmlns/";st.setAttributeNS(ot,"xmlns:gx",GX_NAMESPACE_URIS[0]),st.setAttributeNS(ot,"xmlns:xsi",XML_SCHEMA_INSTANCE_URI),st.setAttributeNS(XML_SCHEMA_INSTANCE_URI,"xsi:schemaLocation",SCHEMA_LOCATION$1);const ct={node:st},ut={};ee.length>1?ut.Document=ee:ee.length==1&&(ut.Placemark=ee[0]);const dt=KML_SEQUENCE[st.namespaceURI],ht=makeSequence(ut,dt);return pushSerializeAndPop(ct,KML_SERIALIZERS,OBJECT_PROPERTY_NODE_FACTORY,ht,[te],dt,this),st}};function createNameStyleFunction(ne,ee){const te=[0,0];let st="start";const ot=ne.getImage();if(ot){const dt=ot.getSize();if(dt&&dt.length==2){const ht=ot.getScaleArray(),ft=ot.getAnchor();te[0]=ht[0]*(dt[0]-ft[0]),te[1]=ht[1]*(dt[1]/2-ft[1]),st="left"}}let ct=ne.getText();return ct?(ct=ct.clone(),ct.setFont(ct.getFont()||DEFAULT_TEXT_STYLE.getFont()),ct.setScale(ct.getScale()||DEFAULT_TEXT_STYLE.getScale()),ct.setFill(ct.getFill()||DEFAULT_TEXT_STYLE.getFill()),ct.setStroke(ct.getStroke()||DEFAULT_TEXT_STROKE_STYLE)):ct=DEFAULT_TEXT_STYLE.clone(),ct.setText(ee),ct.setOffsetX(te[0]),ct.setOffsetY(te[1]),ct.setTextAlign(st),new Style$1({image:ot,text:ct})}function createFeatureStyleFunction(ne,ee,te,st,ot){return(function(ct,ut){let dt=ot,ht="",ft=[];if(dt){const mt=ct.getGeometry();if(mt)if(mt instanceof GeometryCollection)ft=mt.getGeometriesArrayRecursive().filter(function(yt){const vt=yt.getType();return vt==="Point"||vt==="MultiPoint"}),dt=ft.length>0;else{const yt=mt.getType();dt=yt==="Point"||yt==="MultiPoint"}}dt&&(ht=ct.get("name"),dt=dt&&!!ht,dt&&/&[^&]+;/.test(ht)&&(TEXTAREA||(TEXTAREA=document.createElement("textarea")),TEXTAREA.innerHTML=ht,ht=TEXTAREA.value));let pt=te;if(ne?pt=ne:ee&&(pt=findStyle(ee,te,st)),dt){const mt=createNameStyleFunction(pt[0],ht);if(ft.length>0){mt.setGeometry(new GeometryCollection(ft));const yt=new Style$1({geometry:pt[0].getGeometry(),image:null,fill:pt[0].getFill(),stroke:pt[0].getStroke(),text:null});return[mt,yt].concat(pt.slice(1))}return mt}return pt})}function findStyle(ne,ee,te){return Array.isArray(ne)?ne:typeof ne=="string"?findStyle(te[ne],ee,te):ee}function readColor(ne){const ee=getAllTextContent(ne,!1),te=/^\s*#?\s*([0-9A-Fa-f]{8})\s*$/.exec(ee);if(te){const st=te[1];return[parseInt(st.substr(6,2),16),parseInt(st.substr(4,2),16),parseInt(st.substr(2,2),16),parseInt(st.substr(0,2),16)/255]}}function readFlatCoordinates(ne){let ee=getAllTextContent(ne,!1);const te=[];ee=ee.replace(/\s*,\s*/g,",");const st=/^\s*([+\-]?\d*\.?\d+(?:e[+\-]?\d+)?),([+\-]?\d*\.?\d+(?:e[+\-]?\d+)?)(?:\s+|,|$)(?:([+\-]?\d*\.?\d+(?:e[+\-]?\d+)?)(?:\s+|$))?\s*/i;let ot;
89for(;ot=st.exec(ee);){const ct=parseFloat(ot[1]),ut=parseFloat(ot[2]),dt=ot[3]?parseFloat(ot[3]):0;te.push(ct,ut,dt),ee=ee.substr(ot[0].length)}if(ee==="")return te}function readURI(ne){const ee=getAllTextContent(ne,!1).trim();let te=ne.baseURI;return(!te||te=="about:blank")&&(te=window.location.href),te?new URL(ee,te).href:ee}function readStyleURL(ne){const ee=getAllTextContent(ne,!1).trim().replace(/^(?!.*#)/,"#");let te=ne.baseURI;return(!te||te=="about:blank")&&(te=window.location.href),te?new URL(ee,te).href:ee}function readVec2(ne){const ee=ne.getAttribute("xunits"),te=ne.getAttribute("yunits");let st;return ee!=="insetPixels"?te!=="insetPixels"?st="bottom-left":st="top-left":te!=="insetPixels"?st="bottom-right":st="top-right",{x:parseFloat(ne.getAttribute("x")),xunits:ICON_ANCHOR_UNITS_MAP[ee],y:parseFloat(ne.getAttribute("y")),yunits:ICON_ANCHOR_UNITS_MAP[te],origin:st}}function readScale(ne){return readDecimal(ne)}const STYLE_MAP_PARSERS=makeStructureNS(NAMESPACE_URIS$4,{Pair:pairDataParser});function readStyleMapValue(ne,ee){return pushParseAndPop(void 0,STYLE_MAP_PARSERS,ne,ee,this)}const ICON_STYLE_PARSERS=makeStructureNS(NAMESPACE_URIS$4,{Icon:makeObjectPropertySetter(readIcon),color:makeObjectPropertySetter(readColor),heading:makeObjectPropertySetter(readDecimal),hotSpot:makeObjectPropertySetter(readVec2),scale:makeObjectPropertySetter(readScale)});function iconStyleParser(ne,ee){const te=pushParseAndPop({},ICON_STYLE_PARSERS,ne,ee);if(!te)return;const st=ee[ee.length-1],ot="Icon"in te?te.Icon:{},ct=!("Icon"in te)||Object.keys(ot).length>0;let ut;const dt=ot.href;dt?ut=dt:ct&&(ut=DEFAULT_IMAGE_STYLE_SRC);let ht,ft,pt,mt="bottom-left";const yt=te.hotSpot;yt?(ht=[yt.x,yt.y],ft=yt.xunits,pt=yt.yunits,mt=yt.origin):/^https?:\/\/maps\.(?:google|gstatic)\.com\//.test(ut)&&(ut.includes("pushpin")?(ht=DEFAULT_IMAGE_STYLE_ANCHOR,ft=DEFAULT_IMAGE_STYLE_ANCHOR_X_UNITS,pt=DEFAULT_IMAGE_STYLE_ANCHOR_Y_UNITS):ut.includes("arrow-reverse")?(ht=[54,42],ft=DEFAULT_IMAGE_STYLE_ANCHOR_X_UNITS,pt=DEFAULT_IMAGE_STYLE_ANCHOR_Y_UNITS):ut.includes("paddle")&&(ht=[32,1],ft=DEFAULT_IMAGE_STYLE_ANCHOR_X_UNITS,pt=DEFAULT_IMAGE_STYLE_ANCHOR_Y_UNITS));let vt;const _t=ot.x,bt=ot.y;_t!==void 0&&bt!==void 0&&(vt=[_t,bt]);let xt;const Mt=ot.w,Ot=ot.h;Mt!==void 0&&Ot!==void 0&&(xt=[Mt,Ot]);let kt;const Nt=te.heading;Nt!==void 0&&(kt=toRadians(Nt));const Gt=te.scale,Bt=te.color;if(ct){ut==DEFAULT_IMAGE_STYLE_SRC&&(xt=DEFAULT_IMAGE_STYLE_SIZE);const Ut=new Icon({anchor:ht,anchorOrigin:mt,anchorXUnits:ft,anchorYUnits:pt,crossOrigin:this.crossOrigin_,referrerPolicy:this.referrerPolicy_,offset:vt,offsetOrigin:"bottom-left",rotation:kt,scale:Gt,size:xt,src:this.iconUrlFunction_(ut),color:Bt}),Vt=Ut.getScaleArray()[0],Ht=Ut.getSize();if(Ht===null){const zt=Ut.getImageState();if(zt===ImageState.IDLE||zt===ImageState.LOADING){const jt=function(){const Wt=Ut.getImageState();if(!(Wt===ImageState.IDLE||Wt===ImageState.LOADING)){const Jt=Ut.getSize();if(Jt&&Jt.length==2){const Qt=scaleForSize(Jt);Ut.setScale(Vt*Qt)}Ut.unlistenImageChange(jt)}};Ut.listenImageChange(jt),zt===ImageState.IDLE&&Ut.load()}}else if(Ht.length==2){const zt=scaleForSize(Ht);Ut.setScale(Vt*zt)}st.imageStyle=Ut}else st.imageStyle=DEFAULT_NO_IMAGE_STYLE}const LABEL_STYLE_PARSERS=makeStructureNS(NAMESPACE_URIS$4,{color:makeObjectPropertySetter(readColor),scale:makeObjectPropertySetter(readScale)});function labelStyleParser(ne,ee){const te=pushParseAndPop({},LABEL_STYLE_PARSERS,ne,ee);if(!te)return;const st=ee[ee.length-1],ot=new Text({fill:new Fill({color:"color"in te?te.color:DEFAULT_COLOR}),scale:te.scale});st.textStyle=ot}const LINE_STYLE_PARSERS=makeStructureNS(NAMESPACE_URIS$4,{color:makeObjectPropertySetter(readColor),width:makeObjectPropertySetter(readDecimal)});function lineStyleParser(ne,ee){const te=pushParseAndPop({},LINE_STYLE_PARSERS,ne,ee);if(!te)return;const st=ee[ee.length-1],ot=new Stroke({color:"color"in te?te.color:DEFAULT_COLOR,width:"width"in te?te.width:1});st.strokeStyle=ot}const POLY_STYLE_PARSERS=makeStructureNS(NAMESPACE_URIS$4,{color:makeObjectPropertySetter(readColor),fill:makeObjectPropertySetter(readBoolean),outline:makeObjectPropertySetter(readBoolean)});function polyStyleParser(ne,ee){const te=pushParseAndPop({},POLY_STYLE_PARSERS,ne,ee);if(!te)return;const st=ee[ee.length-1],ot=new Fill({color:"color"in te?te.color:DEFAULT_COLOR});st.fillStyle=ot;const ct=te.fill;ct!==void 0&&(st.fill=ct);const ut=te.outline;ut!==void 0&&(st.outline=ut)}const FLAT_LINEAR_RING_PARSERS=makeStructureNS(NAMESPACE_URIS$4,{coordinates:makeReplacer(readFlatCoordinates)});function readFlatLinearRing(ne,ee){return pushParseAndPop(null,FLAT_LINEAR_RING_PARSERS,ne,ee)}function gxCoordParser(ne,ee){const st=ee[ee.length-1].coordinates,ot=getAllTextContent(ne,!1),ut=/^\s*([+\-]?\d+(?:\.\d*)?(?:e[+\-]?\d*)?)\s+([+\-]?\d+(?:\.\d*)?(?:e[+\-]?\d*)?)\s+([+\-]?\d+(?:\.\d*)?(?:e[+\-]?\d*)?)\s*$/i.exec(ot);if(ut){const dt=parseFloat(ut[1]),ht=parseFloat(ut[2]),ft=parseFloat(ut[3]);st.push([dt,ht,ft])}else st.push([])}const GX_MULTITRACK_GEOMETRY_PARSERS=makeStructureNS(GX_NAMESPACE_URIS,{Track:makeArrayPusher(readGxTrack)});function readGxMultiTrack(ne,ee){const te=pushParseAndPop([],GX_MULTITRACK_GEOMETRY_PARSERS,ne,ee);if(te)return new MultiLineString(te)}const GX_TRACK_PARSERS=makeStructureNS(NAMESPACE_URIS$4,{when:whenParser},makeStructureNS(GX_NAMESPACE_URIS,{coord:gxCoordParser}));function readGxTrack(ne,ee){const te=pushParseAndPop({coordinates:[],whens:[]},GX_TRACK_PARSERS,ne,ee);if(!te)return;const st=[],ot=te.coordinates,ct=te.whens;for(let ut=0,dt=Math.min(ot.length,ct.length);ut<dt;++ut)ot[ut].length==3&&st.push(ot[ut][0],ot[ut][1],ot[ut][2],ct[ut]);return new LineString(st,"XYZM")}const ICON_PARSERS=makeStructureNS(NAMESPACE_URIS$4,{href:makeObjectPropertySetter(readURI)},makeStructureNS(GX_NAMESPACE_URIS,{x:makeObjectPropertySetter(readDecimal),y:makeObjectPropertySetter(readDecimal),w:makeObjectPropertySetter(readDecimal),h:makeObjectPropertySetter(readDecimal)}));function readIcon(ne,ee){const te=pushParseAndPop({},ICON_PARSERS,ne,ee);return te||null}const GEOMETRY_FLAT_COORDINATES_PARSERS=makeStructureNS(NAMESPACE_URIS$4,{coordinates:makeReplacer(readFlatCoordinates)});function readFlatCoordinatesFromNode(ne,ee){return pushParseAndPop(null,GEOMETRY_FLAT_COORDINATES_PARSERS,ne,ee)}const EXTRUDE_AND_ALTITUDE_MODE_PARSERS=makeStructureNS(NAMESPACE_URIS$4,{extrude:makeObjectPropertySetter(readBoolean),tessellate:makeObjectPropertySetter(readBoolean),altitudeMode:makeObjectPropertySetter(readString)});function readLineString(ne,ee){const te=pushParseAndPop({},EXTRUDE_AND_ALTITUDE_MODE_PARSERS,ne,ee),st=readFlatCoordinatesFromNode(ne,ee);if(st){const ot=new LineString(st,"XYZ");return ot.setProperties(te,!0),ot}}function readLinearRing(ne,ee){const te=pushParseAndPop({},EXTRUDE_AND_ALTITUDE_MODE_PARSERS,ne,ee),st=readFlatCoordinatesFromNode(ne,ee);if(st){const ot=new Polygon(st,"XYZ",[st.length]);return ot.setProperties(te,!0),ot}}const MULTI_GEOMETRY_PARSERS=makeStructureNS(NAMESPACE_URIS$4,{LineString:makeArrayPusher(readLineString),LinearRing:makeArrayPusher(readLinearRing),MultiGeometry:makeArrayPusher(readMultiGeometry),Point:makeArrayPusher(readPoint),Polygon:makeArrayPusher(readPolygon)});function readMultiGeometry(ne,ee){const te=pushParseAndPop([],MULTI_GEOMETRY_PARSERS,ne,ee);if(!te)return null;if(te.length===0)return new GeometryCollection(te);let st,ot=!0;const ct=te[0].getType();let ut;for(let dt=1,ht=te.length;dt<ht;++dt)if(ut=te[dt],ut.getType()!=ct){ot=!1;break}if(ot){let dt,ht;
89if(ct=="Point"){const ft=te[0];dt=ft.getLayout(),ht=ft.getFlatCoordinates();for(let pt=1,mt=te.length;pt<mt;++pt)ut=te[pt],extend$3(ht,ut.getFlatCoordinates());st=new MultiPoint(ht,dt),setCommonGeometryProperties(st,te)}else if(ct=="LineString")st=new MultiLineString(te),setCommonGeometryProperties(st,te);else if(ct=="Polygon")st=new MultiPolygon(te),setCommonGeometryProperties(st,te);else if(ct=="GeometryCollection"||ct.startsWith("Multi"))st=new GeometryCollection(te);else throw new Error("Unknown geometry type found")}else st=new GeometryCollection(te);return st}function readPoint(ne,ee){const te=pushParseAndPop({},EXTRUDE_AND_ALTITUDE_MODE_PARSERS,ne,ee),st=readFlatCoordinatesFromNode(ne,ee);if(st){const ot=new Point$1(st,"XYZ");return ot.setProperties(te,!0),ot}}const FLAT_LINEAR_RINGS_PARSERS=makeStructureNS(NAMESPACE_URIS$4,{innerBoundaryIs:innerBoundaryIsParser,outerBoundaryIs:outerBoundaryIsParser});function readPolygon(ne,ee){const te=pushParseAndPop({},EXTRUDE_AND_ALTITUDE_MODE_PARSERS,ne,ee),st=pushParseAndPop([null],FLAT_LINEAR_RINGS_PARSERS,ne,ee);if(st&&st[0]){const ot=st[0],ct=[ot.length];for(let dt=1,ht=st.length;dt<ht;++dt)extend$3(ot,st[dt]),ct.push(ot.length);const ut=new Polygon(ot,"XYZ",ct);return ut.setProperties(te,!0),ut}}const STYLE_PARSERS$2=makeStructureNS(NAMESPACE_URIS$4,{IconStyle:iconStyleParser,LabelStyle:labelStyleParser,LineStyle:lineStyleParser,PolyStyle:polyStyleParser});function readStyle$2(ne,ee){const te=pushParseAndPop({},STYLE_PARSERS$2,ne,ee,this);if(!te)return null;let st="fillStyle"in te?te.fillStyle:DEFAULT_FILL_STYLE;const ot=te.fill;ot!==void 0&&!ot&&(st=null);let ct;"imageStyle"in te?te.imageStyle!=DEFAULT_NO_IMAGE_STYLE&&(ct=te.imageStyle):ct=DEFAULT_IMAGE_STYLE;const ut="textStyle"in te?te.textStyle:DEFAULT_TEXT_STYLE,dt="strokeStyle"in te?te.strokeStyle:DEFAULT_STROKE_STYLE,ht=te.outline;return ht!==void 0&&!ht?[new Style$1({geometry:function(ft){const pt=ft.getGeometry(),mt=pt.getType();if(mt==="GeometryCollection"){const yt=pt;return new GeometryCollection(yt.getGeometriesArrayRecursive().filter(function(vt){const _t=vt.getType();return _t!=="Polygon"&&_t!=="MultiPolygon"}))}if(mt!=="Polygon"&&mt!=="MultiPolygon")return pt},fill:st,image:ct,stroke:dt,text:ut,zIndex:void 0}),new Style$1({geometry:function(ft){const pt=ft.getGeometry(),mt=pt.getType();if(mt==="GeometryCollection"){const yt=pt;return new GeometryCollection(yt.getGeometriesArrayRecursive().filter(function(vt){const _t=vt.getType();return _t==="Polygon"||_t==="MultiPolygon"}))}if(mt==="Polygon"||mt==="MultiPolygon")return pt},fill:st,stroke:null,zIndex:void 0})]:[new Style$1({fill:st,image:ct,stroke:dt,text:ut,zIndex:void 0})]}function setCommonGeometryProperties(ne,ee){const te=ee.length,st=new Array(ee.length),ot=new Array(ee.length),ct=new Array(ee.length);let ut,dt,ht;ut=!1,dt=!1,ht=!1;for(let ft=0;ft<te;++ft){const pt=ee[ft];st[ft]=pt.get("extrude"),ot[ft]=pt.get("tessellate"),ct[ft]=pt.get("altitudeMode"),ut=ut||st[ft]!==void 0,dt=dt||ot[ft]!==void 0,ht=ht||ct[ft]}ut&&ne.set("extrude",st),dt&&ne.set("tessellate",ot),ht&&ne.set("altitudeMode",ct)}const DATA_PARSERS=makeStructureNS(NAMESPACE_URIS$4,{displayName:makeObjectPropertySetter(readString),value:makeObjectPropertySetter(readString)});function dataParser(ne,ee){const te=ne.getAttribute("name");parseNode(DATA_PARSERS,ne,ee);const st=ee[ee.length-1];te&&st.displayName?st[te]={value:st.value,displayName:st.displayName,toString:function(){return st.value}}:te!==null?st[te]=st.value:st.displayName!==null&&(st[st.displayName]=st.value),delete st.value}const EXTENDED_DATA_PARSERS=makeStructureNS(NAMESPACE_URIS$4,{Data:dataParser,SchemaData:schemaDataParser});function extendedDataParser(ne,ee){parseNode(EXTENDED_DATA_PARSERS,ne,ee)}function regionParser(ne,ee){parseNode(REGION_PARSERS,ne,ee)}const PAIR_PARSERS=makeStructureNS(NAMESPACE_URIS$4,{Style:makeObjectPropertySetter(readStyle$2),key:makeObjectPropertySetter(readString),styleUrl:makeObjectPropertySetter(readStyleURL)});function pairDataParser(ne,ee){const te=pushParseAndPop({},PAIR_PARSERS,ne,ee,this);if(!te)return;const st=te.key;if(st&&st=="normal"){const ot=te.styleUrl;ot&&(ee[ee.length-1]=ot);const ct=te.Style;ct&&(ee[ee.length-1]=ct)}}function placemarkStyleMapParser(ne,ee){const te=readStyleMapValue.call(this,ne,ee);if(!te)return;const st=ee[ee.length-1];if(Array.isArray(te))st.Style=te;else if(typeof te=="string")st.styleUrl=te;else throw new Error("`styleMapValue` has an unknown type")}const SCHEMA_DATA_PARSERS=makeStructureNS(NAMESPACE_URIS$4,{SimpleData:simpleDataParser});function schemaDataParser(ne,ee){parseNode(SCHEMA_DATA_PARSERS,ne,ee)}function simpleDataParser(ne,ee){const te=ne.getAttribute("name");if(te!==null){const st=readString(ne),ot=ee[ee.length-1];ot[te]=st}}const LAT_LON_ALT_BOX_PARSERS=makeStructureNS(NAMESPACE_URIS$4,{altitudeMode:makeObjectPropertySetter(readString),minAltitude:makeObjectPropertySetter(readDecimal),maxAltitude:makeObjectPropertySetter(readDecimal),north:makeObjectPropertySetter(readDecimal),south:makeObjectPropertySetter(readDecimal),east:makeObjectPropertySetter(readDecimal),west:makeObjectPropertySetter(readDecimal)});function latLonAltBoxParser(ne,ee){const te=pushParseAndPop({},LAT_LON_ALT_BOX_PARSERS,ne,ee);if(!te)return;const st=ee[ee.length-1],ot=[parseFloat(te.west),parseFloat(te.south),parseFloat(te.east),parseFloat(te.north)];st.extent=ot,st.altitudeMode=te.altitudeMode,st.minAltitude=parseFloat(te.minAltitude),st.maxAltitude=parseFloat(te.maxAltitude)}const LOD_PARSERS=makeStructureNS(NAMESPACE_URIS$4,{minLodPixels:makeObjectPropertySetter(readDecimal),maxLodPixels:makeObjectPropertySetter(readDecimal),minFadeExtent:makeObjectPropertySetter(readDecimal),maxFadeExtent:makeObjectPropertySetter(readDecimal)});function lodParser(ne,ee){const te=pushParseAndPop({},LOD_PARSERS,ne,ee);if(!te)return;const st=ee[ee.length-1];st.minLodPixels=parseFloat(te.minLodPixels),st.maxLodPixels=parseFloat(te.maxLodPixels),st.minFadeExtent=parseFloat(te.minFadeExtent),st.maxFadeExtent=parseFloat(te.maxFadeExtent)}const INNER_BOUNDARY_IS_PARSERS=makeStructureNS(NAMESPACE_URIS$4,{LinearRing:makeArrayPusher(readFlatLinearRing)});function innerBoundaryIsParser(ne,ee){const te=pushParseAndPop([],INNER_BOUNDARY_IS_PARSERS,ne,ee);te.length>0&&ee[ee.length-1].push(...te)}const OUTER_BOUNDARY_IS_PARSERS=makeStructureNS(NAMESPACE_URIS$4,{LinearRing:makeReplacer(readFlatLinearRing)});function outerBoundaryIsParser(ne,ee){const te=pushParseAndPop(void 0,OUTER_BOUNDARY_IS_PARSERS,ne,ee);if(te){const st=ee[ee.length-1];st[0]=te}}function linkParser(ne,ee){parseNode(LINK_PARSERS$1,ne,ee)}function whenParser(ne,ee){const st=ee[ee.length-1].whens,ot=getAllTextContent(ne,!1),ct=Date.parse(ot);st.push(isNaN(ct)?0:ct)}function writeColorTextNode(ne,ee){const te=asArray(ee),ot=[(te.length==4?te[3]:1)*255,te[2],te[1],te[0]];for(let ct=0;ct<4;++ct){const ut=Math.floor(ot[ct]).toString(16);
89ot[ct]=ut.length==1?"0"+ut:ut}writeStringTextNode(ne,ot.join(""))}function writeCoordinatesTextNode(ne,ee,te){const st=te[te.length-1],ot=st.layout,ct=st.stride;let ut;if(ot=="XY"||ot=="XYM")ut=2;else if(ot=="XYZ"||ot=="XYZM")ut=3;else throw new Error("Invalid geometry layout");const dt=ee.length;let ht="";if(dt>0){ht+=ee[0];for(let ft=1;ft<ut;++ft)ht+=","+ee[ft];for(let ft=ct;ft<dt;ft+=ct){ht+=" "+ee[ft];for(let pt=1;pt<ut;++pt)ht+=","+ee[ft+pt]}}writeStringTextNode(ne,ht)}const EXTENDEDDATA_NODE_SERIALIZERS=makeStructureNS(NAMESPACE_URIS$4,{Data:makeChildAppender(writeDataNode),value:makeChildAppender(writeDataNodeValue),displayName:makeChildAppender(writeDataNodeName)});function writeDataNode(ne,ee,te){ne.setAttribute("name",ee.name);const st={node:ne},ot=ee.value;typeof ot=="object"?(ot!==null&&ot.displayName&&pushSerializeAndPop(st,EXTENDEDDATA_NODE_SERIALIZERS,OBJECT_PROPERTY_NODE_FACTORY,[ot.displayName],te,["displayName"]),ot!==null&&ot.value&&pushSerializeAndPop(st,EXTENDEDDATA_NODE_SERIALIZERS,OBJECT_PROPERTY_NODE_FACTORY,[ot.value],te,["value"])):pushSerializeAndPop(st,EXTENDEDDATA_NODE_SERIALIZERS,OBJECT_PROPERTY_NODE_FACTORY,[ot],te,["value"])}function writeDataNodeName(ne,ee){writeStringTextNode(ne,ee)}function writeDataNodeValue(ne,ee){writeStringTextNode(ne,ee)}const DOCUMENT_SERIALIZERS=makeStructureNS(NAMESPACE_URIS$4,{Placemark:makeChildAppender(writePlacemark)}),DOCUMENT_NODE_FACTORY=function(ne,ee,te){const st=ee[ee.length-1].node;return createElementNS(st.namespaceURI,"Placemark")};function writeDocument(ne,ee,te){pushSerializeAndPop({node:ne},DOCUMENT_SERIALIZERS,DOCUMENT_NODE_FACTORY,ee,te,void 0,this)}const DATA_NODE_FACTORY=makeSimpleNodeFactory("Data");function writeExtendedData(ne,ee,te){const st={node:ne},ot=ee.names,ct=ee.values,ut=ot.length;for(let dt=0;dt<ut;dt++)pushSerializeAndPop(st,EXTENDEDDATA_NODE_SERIALIZERS,DATA_NODE_FACTORY,[{name:ot[dt],value:ct[dt]}],te)}const ICON_SEQUENCE=makeStructureNS(NAMESPACE_URIS$4,["href"],makeStructureNS(GX_NAMESPACE_URIS,["x","y","w","h"])),ICON_SERIALIZERS=makeStructureNS(NAMESPACE_URIS$4,{href:makeChildAppender(writeStringTextNode)},makeStructureNS(GX_NAMESPACE_URIS,{x:makeChildAppender(writeDecimalTextNode),y:makeChildAppender(writeDecimalTextNode),w:makeChildAppender(writeDecimalTextNode),h:makeChildAppender(writeDecimalTextNode)})),GX_NODE_FACTORY=function(ne,ee,te){return createElementNS(GX_NAMESPACE_URIS[0],"gx:"+te)};function writeIcon(ne,ee,te){const st={node:ne},ot=te[te.length-1].node;let ct=ICON_SEQUENCE[ot.namespaceURI],ut=makeSequence(ee,ct);pushSerializeAndPop(st,ICON_SERIALIZERS,OBJECT_PROPERTY_NODE_FACTORY,ut,te,ct),ct=ICON_SEQUENCE[GX_NAMESPACE_URIS[0]],ut=makeSequence(ee,ct),pushSerializeAndPop(st,ICON_SERIALIZERS,GX_NODE_FACTORY,ut,te,ct)}const ICON_STYLE_SEQUENCE=makeStructureNS(NAMESPACE_URIS$4,["scale","heading","Icon","color","hotSpot"]),ICON_STYLE_SERIALIZERS=makeStructureNS(NAMESPACE_URIS$4,{Icon:makeChildAppender(writeIcon),color:makeChildAppender(writeColorTextNode),heading:makeChildAppender(writeDecimalTextNode),hotSpot:makeChildAppender(writeVec2),scale:makeChildAppender(writeScaleTextNode)});function writeIconStyle(ne,ee,te){const st={node:ne},ot={},ct=ee.getSrc(),ut=ee.getSize(),dt=ee.getImageSize(),ht={href:ct};if(ut){ht.w=ut[0],ht.h=ut[1];const xt=ee.getAnchor(),Mt=ee.getOrigin();if(Mt&&dt&&Mt[0]!==0&&Mt[1]!==ut[1]&&(ht.x=Mt[0],ht.y=dt[1]-(Mt[1]+ut[1])),xt&&(xt[0]!==ut[0]/2||xt[1]!==ut[1]/2)){const Ot={x:xt[0],xunits:"pixels",y:ut[1]-xt[1],yunits:"pixels"};ot.hotSpot=Ot}}ot.Icon=ht;let ft=ee.getScaleArray()[0],pt=ut;if(pt===null&&(pt=DEFAULT_IMAGE_STYLE_SIZE),pt.length==2){const xt=scaleForSize(pt);ft=ft/xt}ft!==1&&(ot.scale=ft);const mt=ee.getRotation();mt!==0&&(ot.heading=mt);const yt=ee.getColor();yt&&(ot.color=yt);const vt=te[te.length-1].node,_t=ICON_STYLE_SEQUENCE[vt.namespaceURI],bt=makeSequence(ot,_t);pushSerializeAndPop(st,ICON_STYLE_SERIALIZERS,OBJECT_PROPERTY_NODE_FACTORY,bt,te,_t)}const LABEL_STYLE_SEQUENCE=makeStructureNS(NAMESPACE_URIS$4,["color","scale"]),LABEL_STYLE_SERIALIZERS=makeStructureNS(NAMESPACE_URIS$4,{color:makeChildAppender(writeColorTextNode),scale:makeChildAppender(writeScaleTextNode)});function writeLabelStyle(ne,ee,te){const st={node:ne},ot={}
89,ct=ee.getFill();ct&&(ot.color=ct.getColor());const ut=ee.getScale();ut&&ut!==1&&(ot.scale=ut);const dt=te[te.length-1].node,ht=LABEL_STYLE_SEQUENCE[dt.namespaceURI],ft=makeSequence(ot,ht);pushSerializeAndPop(st,LABEL_STYLE_SERIALIZERS,OBJECT_PROPERTY_NODE_FACTORY,ft,te,ht)}const LINE_STYLE_SEQUENCE=makeStructureNS(NAMESPACE_URIS$4,["color","width"]),LINE_STYLE_SERIALIZERS=makeStructureNS(NAMESPACE_URIS$4,{color:makeChildAppender(writeColorTextNode),width:makeChildAppender(writeDecimalTextNode)});function writeLineStyle(ne,ee,te){const st={node:ne},ot={color:ee.getColor(),width:Number(ee.getWidth())||1},ct=te[te.length-1].node,ut=LINE_STYLE_SEQUENCE[ct.namespaceURI],dt=makeSequence(ot,ut);pushSerializeAndPop(st,LINE_STYLE_SERIALIZERS,OBJECT_PROPERTY_NODE_FACTORY,dt,te,ut)}const GEOMETRY_TYPE_TO_NODENAME$1={Point:"Point",LineString:"LineString",LinearRing:"LinearRing",Polygon:"Polygon",MultiPoint:"MultiGeometry",MultiLineString:"MultiGeometry",MultiPolygon:"MultiGeometry",GeometryCollection:"MultiGeometry"},GEOMETRY_NODE_FACTORY=function(ne,ee,te){if(ne){const st=ee[ee.length-1].node;return createElementNS(st.namespaceURI,GEOMETRY_TYPE_TO_NODENAME$1[ne.getType()])}},POINT_NODE_FACTORY=makeSimpleNodeFactory("Point"),LINE_STRING_NODE_FACTORY=makeSimpleNodeFactory("LineString"),LINEAR_RING_NODE_FACTORY=makeSimpleNodeFactory("LinearRing"),POLYGON_NODE_FACTORY=makeSimpleNodeFactory("Polygon"),MULTI_GEOMETRY_SERIALIZERS=makeStructureNS(NAMESPACE_URIS$4,{LineString:makeChildAppender(writePrimitiveGeometry),Point:makeChildAppender(writePrimitiveGeometry),Polygon:makeChildAppender(writePolygon),GeometryCollection:makeChildAppender(writeMultiGeometry)});function writeMultiGeometry(ne,ee,te){const st={node:ne},ot=ee.getType();let ct=[],ut;if(ot==="GeometryCollection")ee.getGeometriesArrayRecursive().forEach(function(dt){const ht=dt.getType();if(ht==="MultiPoint")ct=ct.concat(dt.getPoints());else if(ht==="MultiLineString")ct=ct.concat(dt.getLineStrings());else if(ht==="MultiPolygon")ct=ct.concat(dt.getPolygons());else if(ht==="Point"||ht==="LineString"||ht==="Polygon")ct.push(dt);else throw new Error("Unknown geometry type")}),ut=GEOMETRY_NODE_FACTORY;else if(ot==="MultiPoint")ct=ee.getPoints(),ut=POINT_NODE_FACTORY;else if(ot==="MultiLineString")ct=ee.getLineStrings(),ut=LINE_STRING_NODE_FACTORY;else if(ot==="MultiPolygon")ct=ee.getPolygons(),ut=POLYGON_NODE_FACTORY;else throw new Error("Unknown geometry type");pushSerializeAndPop(st,MULTI_GEOMETRY_SERIALIZERS,ut,ct,te)}const BOUNDARY_IS_SERIALIZERS=makeStructureNS(NAMESPACE_URIS$4,{LinearRing:makeChildAppender(writePrimitiveGeometry)});function writeBoundaryIs(ne,ee,te){pushSerializeAndPop({node:ne},BOUNDARY_IS_SERIALIZERS,LINEAR_RING_NODE_FACTORY,[ee],te)}const PLACEMARK_SERIALIZERS=makeStructureNS(NAMESPACE_URIS$4,{ExtendedData:makeChildAppender(writeExtendedData),MultiGeometry:makeChildAppender(writeMultiGeometry),LineString:makeChildAppender(writePrimitiveGeometry),LinearRing:makeChildAppender(writePrimitiveGeometry),Point:makeChildAppender(writePrimitiveGeometry),Polygon:makeChildAppender(writePolygon),Style:makeChildAppender(writeStyle),address:makeChildAppender(writeStringTextNode),description:makeChildAppender(writeStringTextNode),name:makeChildAppender(writeStringTextNode),open:makeChildAppender(writeBooleanTextNode),phoneNumber:makeChildAppender(writeStringTextNode),styleUrl:makeChildAppender(writeStringTextNode),visibility:makeChildAppender(writeBooleanTextNode)}),PLACEMARK_SEQUENCE=makeStructureNS(NAMESPACE_URIS$4,["name","open","visibility","address","phoneNumber","description","styleUrl","Style"]),EXTENDEDDATA_NODE_FACTORY=makeSimpleNodeFactory("ExtendedData");function writePlacemark(ne,ee,te){const st={node:ne};ee.getId()&&ne.setAttribute("id",ee.getId());const ot=ee.getProperties(),ct={address:1,description:1,name:1,open:1,phoneNumber:1,styleUrl:1,visibility:1};ct[ee.getGeometryName()]=1;const ut=Object.keys(ot||{}).sort().filter(function(vt){return!ct[vt]}),dt=ee.getStyleFunction();if(dt){const vt=dt(ee,0);if(vt){const _t=Array.isArray(vt)?vt:[vt];let bt=_t;if(ee.getGeometry()&&(bt=_t.filter(function(xt){const Mt=xt.getGeometryFunction()(ee);if(Mt){const Ot=Mt.getType();return Ot==="GeometryCollection"?Mt.getGeometriesArrayRecursive().filter(function(kt){const Nt=kt.getType();return Nt==="Point"||Nt==="MultiPoint"}).length:Ot==="Point"||Ot==="MultiPoint"}})),this.writeStyles_){let xt=_t,Mt=_t;ee.getGeometry()&&(xt=_t.filter(function(Ot){const kt=Ot.getGeometryFunction()(ee);if(kt){const Nt=kt.getType();return Nt==="GeometryCollection"?kt.getGeometriesArrayRecursive().filter(function(Gt){const Bt=Gt.getType();return Bt==="LineString"||Bt==="MultiLineString"}).length:Nt==="LineString"||Nt==="MultiLineString"}}),Mt=_t.filter(function(Ot){const kt=Ot.getGeometryFunction()(ee);if(kt){const Nt=kt.getType();return Nt==="GeometryCollection"?kt.getGeometriesArrayRecursive().filter(function(Gt){const Bt=Gt.getType();return Bt==="Polygon"||Bt==="MultiPolygon"}).length:Nt==="Polygon"||Nt==="MultiPolygon"}})),ot.Style={pointStyles:bt,lineStyles:xt,polyStyles:Mt}}if(bt.length&&ot.name===void 0){const xt=bt[0].getText();xt&&(ot.name=xt.getText())}}}const ht=te[te.length-1].node,ft=PLACEMARK_SEQUENCE[ht.namespaceURI],pt=makeSequence(ot,ft);if(pushSerializeAndPop(st,PLACEMARK_SERIALIZERS,OBJECT_PROPERTY_NODE_FACTORY,pt,te,ft),ut.length>0){const vt=makeSequence(ot,ut);pushSerializeAndPop(st,PLACEMARK_SERIALIZERS,EXTENDEDDATA_NODE_FACTORY,[{names:ut,values:vt}],te)}const mt=te[0];let yt=ee.getGeometry();yt&&(yt=transformGeometryWithOptions(yt,!0,mt)),pushSerializeAndPop(st,PLACEMARK_SERIALIZERS,GEOMETRY_NODE_FACTORY,[yt],te)}const PRIMITIVE_GEOMETRY_SEQUENCE=makeStructureNS(NAMESPACE_URIS$4,["extrude","tessellate","altitudeMode","coordinates"]),PRIMITIVE_GEOMETRY_SERIALIZERS=makeStructureNS(NAMESPACE_URIS$4,{extrude:makeChildAppender(writeBooleanTextNode),tessellate:makeChildAppender(writeBooleanTextNode),altitudeMode:makeChildAppender(writeStringTextNode),coordinates:makeChildAppender(writeCoordinatesTextNode)});function writePrimitiveGeometry(ne,ee,te){const st=ee.getFlatCoordinates(),ot={node:ne};ot.layout=ee.getLayout(),ot.stride=ee.getStride();const ct=ee.getProperties();ct.coordinates=st;const ut=te[te.length-1].node,dt=PRIMITIVE_GEOMETRY_SEQUENCE[ut.namespaceURI],ht=makeSequence(ct,dt);pushSerializeAndPop(ot,PRIMITIVE_GEOMETRY_SERIALIZERS,OBJECT_PROPERTY_NODE_FACTORY,ht,te,dt)}const POLY_STYLE_SEQUENCE=makeStructureNS(NAMESPACE_URIS$4,["color","fill","outline"]),POLYGON_SERIALIZERS=makeStructureNS(NAMESPACE_URIS$4,{outerBoundaryIs:makeChildAppender(writeBoundaryIs),innerBoundaryIs:makeChildAppender(writeBoundaryIs)}),INNER_BOUNDARY_NODE_FACTORY=makeSimpleNodeFactory("innerBoundaryIs"),OUTER_BOUNDARY_NODE_FACTORY=makeSimpleNodeFactory("outerBoundaryIs");function writePolygon(ne,ee,te){const st=ee.getLinearRings(),ot=st.shift(),ct={node:ne};pushSerializeAndPop(ct,POLYGON_SERIALIZERS,INNER_BOUNDARY_NODE_FACTORY,st,te),pushSerializeAndPop(ct,POLYGON_SERIALIZERS,OUTER_BOUNDARY_NODE_FACTORY,[ot],te)}const POLY_STYLE_SERIALIZERS=makeStructureNS(NAMESPACE_URIS$4,{color:makeChildAppender(writeColorTextNode),fill:makeChildAppender(writeBooleanTextNode),outline:makeChildAppender(writeBooleanTextNode)});function writePolyStyle(ne,ee,te){const st={node:ne}
89,ot=ee.getFill(),ct=ee.getStroke(),ut={color:ot?ot.getColor():void 0,fill:ot?void 0:!1,outline:ct?void 0:!1},dt=te[te.length-1].node,ht=POLY_STYLE_SEQUENCE[dt.namespaceURI],ft=makeSequence(ut,ht);pushSerializeAndPop(st,POLY_STYLE_SERIALIZERS,OBJECT_PROPERTY_NODE_FACTORY,ft,te,ht)}function writeScaleTextNode(ne,ee){writeDecimalTextNode(ne,Math.round(ee*1e6)/1e6)}const STYLE_SEQUENCE=makeStructureNS(NAMESPACE_URIS$4,["IconStyle","LabelStyle","LineStyle","PolyStyle"]),STYLE_SERIALIZERS=makeStructureNS(NAMESPACE_URIS$4,{IconStyle:makeChildAppender(writeIconStyle),LabelStyle:makeChildAppender(writeLabelStyle),LineStyle:makeChildAppender(writeLineStyle),PolyStyle:makeChildAppender(writePolyStyle)});function writeStyle(ne,ee,te){const st={node:ne},ot={};if(ee.pointStyles.length){const ht=ee.pointStyles[0].getText();ht&&(ot.LabelStyle=ht);const ft=ee.pointStyles[0].getImage();ft&&typeof ft.getSrc=="function"&&(ot.IconStyle=ft)}if(ee.lineStyles.length){const ht=ee.lineStyles[0].getStroke();ht&&(ot.LineStyle=ht)}if(ee.polyStyles.length){const ht=ee.polyStyles[0].getStroke();ht&&!ot.LineStyle&&(ot.LineStyle=ht),ot.PolyStyle=ee.polyStyles[0]}const ct=te[te.length-1].node,ut=STYLE_SEQUENCE[ct.namespaceURI],dt=makeSequence(ot,ut);pushSerializeAndPop(st,STYLE_SERIALIZERS,OBJECT_PROPERTY_NODE_FACTORY,dt,te,ut)}function writeVec2(ne,ee){ne.setAttribute("x",String(ee.x)),ne.setAttribute("y",String(ee.y)),ne.setAttribute("xunits",ee.xunits),ne.setAttribute("yunits",ee.yunits)}var ColorUtils={hex:function(ne){if(ne>255)throw new Error("'"+ne+"'' is greater than 255(0xff);");var ee=Number(ne).toString(16);return("0"+ee).slice(-2)},num:function(ne){return parseInt(ne,16)},arrayToRgba:function(ne){if(!Array.isArray(ne))throw new Error("Not an array !");var ee=ne[0],te=ne[1],st=ne[2],ot=ne[3]||1,ct="rgba("+ee+", "+te+", "+st+", "+parseFloat(ot)+")";return ct},arrayToHex:function(ne){if(!Array.isArray(ne))throw new Error("Not an array !");var ee=ne[0],te=ne[1],st=ne[2],ot=ne[3],ct=[this.hex(ee),this.hex(te),this.hex(st)],ut={};return ut.hex="#"+ct.join(""),ot&&(ut.opacity=parseFloat(ot)),ut},rgbaToHex:function(ne){var ee=/rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(0?.?\d+)\s*)?\)/,te=ee.exec(ne);if(!te)throw new Error("Invalid format: "+ne);var st=te[1],ot=te[2],ct=te[3],ut=te[4],dt=[this.hex(st),this.hex(ot),this.hex(ct)],ht={};return ht.hex="#"+dt.join(""),ut&&(ht.opacity=parseFloat(ut)),ht},hexToRgba:function(ne,ee){var te=/^#?([a-f\d])([a-f\d])([a-f\d])$/i;if(!ne)throw new Error("Invalid format");ne=ne.replace(te,function(ct,ut,dt,ht){return ut+ut+dt+dt+ht+ht});var st=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(ne);st=st?{r:parseInt(st[1],16),g:parseInt(st[2],16),b:parseInt(st[3],16)}:null;var ot=st?"rgba("+st.r+", "+st.g+", "+st.b+", "+ee+")":null;return ot},isHex:function(ne){if(!ne||ne.charAt(0)!=="#")return!1;var ee=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i,te=ee.exec(ne);return!!te},isRGB:function(ne){if(!ne)return!1;var ee=/rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(0?.?\d+)\s*)?\)/,te=ee.exec(ne);return!!te}},logger$H=LoggerByDefault.getLogger("styling");Feature.prototype.setPropertyFill=function(){var ne=this.getStyle();if(ne&&!(Array.isArray(ne)&&ne.length===0)){var ee=ne.getFill();if(ee){var te=ee.getColor();if(Array.isArray(te)){var st="rgba(";st+=te[0]+",",st+=te[1]+",",st+=te[2]+",",st+=te[3]+")",te=st}if(ColorUtils.isRGB(te)){var ot=ColorUtils.rgbaToHex(te);this.set("fill",ot.hex),this.set("fill-opacity",ot.opacity)}else this.set("fill",te),this.set("fill-opacity",1)}}};Feature.prototype.setPropertyStroke=function(){var ne=this.getStyle();if(ne&&!(Array.isArray(ne)&&ne.length===0)){var ee=ne.getStroke();if(ee){var te=ee.getColor();if(Array.isArray(te)){var st="rgba(";st+=te[0]+",",st+=te[1]+",",st+=te[2]+",",st+=te[3]+")",te=st}if(ColorUtils.isRGB(te)){var ot=ColorUtils.rgbaToHex(te);this.set("stroke",ot.hex),this.set("stroke-opacity",ot.opacity)}else this.set("stroke",te),this.set("stroke-opacity",1);this.set("stroke-width",ee.getWidth())}}};Feature.prototype.setPropertyLabel=function(){var ne=this.getStyle();if(ne&&!(Array.isArray(ne)&&ne.length===0)){var ee=this.get("name")!==void 0,te=ne.getText();if(te&&ee){var st=ne.getText().getFill();if(st){var ot=st.getColor();if(Array.isArray(ot)){var ct="rgba(";ct+=ot[0]+",",ct+=ot[1]+",",ct+=ot[2]+",",ct+=ot[3]+")",ot=ct}if(ColorUtils.isRGB(ot)){var ut=ColorUtils.rgbaToHex(ot);this.set("label-fill",ut.hex),this.set("label-fill-opacity",ut.opacity)}else this.set("label-fill",ot),this.set("label-fill-opacity",1)}var dt=ne.getText().getStroke();if(dt){var ht=dt.getColor();if(Array.isArray(ht)){var ft="rgba(";ft+=ht[0]+",",ft+=ht[1]+",",ft+=ht[2]+",",ft+=ht[3]+")",ht=ft}if(ColorUtils.isRGB(ht)){var pt=ColorUtils.rgbaToHex(ht);this.set("label-stroke",pt.hex),this.set("label-stroke-opacity",pt.opacity)}else this.set("label-stroke",ht),this.set("label-stroke-opacity",1);this.set("label-stroke-width",dt.getWidth())}this.set("label-font",ne.getText().getFont()||Styling.DEFAULT_TEXT.font),this.set("label-textAlign",ne.getText().getTextAlign()||Styling.DEFAULT_TEXT.textAlign)}}};Feature.prototype.setPropertyMarker=function(){var ne=this.getStyle();if(ne&&!(Array.isArray(ne)&&ne.length===0)){var ee=ne.getImage();if(ee)if(ee instanceof Icon){var te=ee.getColor();if(Array.isArray(te)){var st="rgba(";st+=te[0]+",",st+=te[1]+",",st+=te[2]+",",st+=te[3]+")",te=st}if(te){var ot=ColorUtils.rgbaToHex(te);this.set("marker-color",ot.hex)}var ct=ee.getScale();switch(Math.round(ct*2)/2){case 0:case .5:this.set("marker-size","small");break;case 1:this.set("marker-size","medium");break;case 1.5:case 2:this.set("marker-size","large");break}var ut=ee.getSrc();ut&&this.set("marker-symbol",ut),this.unset("circle-fill"),this.unset("circle-fill-opacity"),this.unset("circle-stroke"),this.unset("circle-stroke-width"),this.unset("circle-stroke-opacity"),this.unset("circle-radius")}
89else{var dt=ee.getFill();if(dt){var ht=dt.getColor();if(Array.isArray(ht)){var ft="rgba(";ft+=ht[0]+",",ft+=ht[1]+",",ft+=ht[2]+",",ft+=ht[3]+")",ht=ft}if(ColorUtils.isRGB(ht)){var pt=ColorUtils.rgbaToHex(ht);this.set("circle-fill",pt.hex),this.set("circle-fill-opacity",pt.opacity)}else this.set("circle-fill",ht),this.set("circle-fill-opacity",1)}var mt=ee.getStroke();if(mt){var yt=mt.getColor();if(Array.isArray(yt)){var vt="rgba(";vt+=yt[0]+",",vt+=yt[1]+",",vt+=yt[2]+",",vt+=yt[3]+")",yt=vt}if(ColorUtils.isRGB(yt)){var _t=ColorUtils.rgbaToHex(yt);this.set("circle-stroke",_t.hex),this.set("circle-stroke-opacity",_t.opacity)}else this.set("circle-stroke",yt),this.set("circle-stroke-opacity",1);this.set("circle-stroke-width",mt.getWidth())}var bt=ee.getRadius();this.set("circle-radius",bt)}}};var Styling={APPLY_CONVERT_GEOM_GPX:!0,DEFAULT_ICON:{src:Marker.lightOrange,anchor:[.5,1],scale:1},DEFAULT_CIRCLE:{radius:10,fill:{opacity:1,color:[0,0,0,1]},stroke:{width:1,opacity:1,color:[0,0,0,1]}},DEFAULT_STROKE:{width:5,opacity:1,color:[250,250,250,1]},DEFAULT_FILL:{opacity:1,color:[0,0,0,1]},DEFAULT_TEXT:{font:"16px sans",textAlign:"left",stroke:{color:[250,250,250,1],width:5,opactity:1},fill:{opacity:1,color:[0,0,0,1]}},getListTags:function(){return["type","fill","fill-opacity","stroke","stroke-opacity","stroke-width","circle-fill","circle-fill-opacity","circle-stroke","circle-stroke-opacity","circle-stroke-width","circle-radius","marker-symbol","marker-color","marker-size","label-fill","label-fill-opacity","label-stroke","label-stroke-width","label-stroke-opacity","label-font","label-textAlign"]},defineStyleFromProperties:function(ne){var ee=null,te={},st=null;if(ne.get("marker-color")||ne.get("marker-size")||ne.get("marker-symbol")){st={},st.src=this.DEFAULT_ICON.src,st.anchor=this.DEFAULT_ICON.anchor;var ot=ne.get("marker-symbol");ot&&ot.search("data:image/png;base64")!==-1&&(st.src=ot);var ct=ne.get("marker-color");ColorUtils.isHex(ct)&&(st.color=ColorUtils.hexToRgba(ct,1));var ut=ne.get("marker-size");if(ut)switch(ut){case"small":st.scale=.5;break;case"medium":st.scale=1;break;case"large":st.scale=1.5;break;default:st.scale=this.DEFAULT_ICON.scale;break}}var dt=null;(ne.get("stroke")||ne.get("stroke-opacity")||ne.get("stroke-width"))&&(dt={},dt.color=ColorUtils.hexToRgba(ne.get("stroke"),+ne.get("stroke-opacity")||this.DEFAULT_STROKE.opacity),dt.width=+ne.get("stroke-width")||this.DEFAULT_STROKE.width);var ht=null;(ne.get("fill")||ne.get("fill-opacity"))&&(ht={},ht.color=ColorUtils.hexToRgba(ne.get("fill"),+ne.get("fill-opacity")||this.DEFAULT_FILL.opacity));var ft=null,pt=null,mt=ne.get("name")!=="";mt&&((ne.get("label-fill")||ne.get("label-fill-opacity"))&&(pt={},pt.color=ColorUtils.hexToRgba(ne.get("label-fill"),+ne.get("label-fill-opacity")||this.DEFAULT_TEXT.fill.opacity)),(ne.get("label-stroke")||ne.get("label-stroke-opacity")||ne.get("label-stroke-width"))&&(ft={},ft.color=ColorUtils.hexToRgba(ne.get("label-stroke"),+ne.get("label-stroke-opacity")||this.DEFAULT_TEXT.stroke.opacity),ft.width=+ne.get("label-stroke-width")||this.DEFAULT_TEXT.stroke.width));
89var yt=ne.get("circle-radius")||this.DEFAULT_CIRCLE.radius,vt=null;(ne.get("circle-stroke")||ne.get("circle-stroke-opacity")||ne.get("circle-stroke-width"))&&(vt={},vt.color=ColorUtils.hexToRgba(ne.get("circle-stroke"),+ne.get("circle-stroke-opacity")||this.DEFAULT_CIRCLE.stroke.opacity),vt.width=+ne.get("circle-stroke-width")||this.DEFAULT_CIRCLE.stroke.width);var _t=null;if((ne.get("circle-fill")||ne.get("circle-fill-opacity"))&&(_t={},_t.color=ColorUtils.hexToRgba(ne.get("circle-fill"),+ne.get("circle-fill-opacity")||this.DEFAULT_CIRCLE.fill.opacity)),ne.getGeometry()){var bt=ne.getGeometry().getType();switch(bt){case"Circle":case"Point":case"MultiPoint":var xt=!1,Mt={};if(vt&&(Mt.stroke=new Stroke(vt)),_t&&(Mt.fill=new Fill(_t)),Object.keys(Mt).length!==0&&(xt=!0,Mt.radius=+yt,te.image=new CircleStyle(Mt)),st&&(te.image=new Icon(st)),mt){var Ot={};if(ft&&(Ot.stroke=new Stroke(ft)),pt&&(Ot.fill=new Fill(pt)),Object.keys(Ot).length!==0)Ot.text=ne.get("name"),Ot.textAlign=ne.get("label-textAlign")||this.DEFAULT_TEXT.textAlign,Ot.font=ne.get("label-font")||this.DEFAULT_TEXT.font,te.text=new Text(Object.assign({},this.DEFAULT_TEXT,Ot));else if(st||xt){var kt=new Text(Object.assign({},this.DEFAULT_TEXT,{fill:new Fill(this.DEFAULT_TEXT.fill),stroke:new Stroke(this.DEFAULT_TEXT.stroke)}));if(kt){var Nt=kt.clone();Nt.setText(ne.get("name")),te.text=Nt}}}break;case"Polygon":case"MultiPolygon":dt&&(te.stroke=new Stroke(dt)),ht&&(te.fill=new Fill(ht));break;case"LineString":case"MultiLineString":if(dt&&(te.stroke=new Stroke(dt)),this.APPLY_CONVERT_GEOM_GPX&&ht){var Gt=ne.get("type");if(Gt&&(Gt==="Polygon"||Gt==="MultiPolygon")){te.fill=new Fill(ht);var Bt=ne.clone(),Ut=bt==="LineString"?Polygon:MultiPolygon;ne.setGeometry(new Ut([Bt.getGeometry().getCoordinates()]))}}break}}return Object.keys(te).length!==0&&(ee=new Style$1(te)),ee},defineStyleFunctionByDefault:function(ne){if(!ne)return[];if(Object.keys(ne).length===0)return[];var ee=(te,st)=>{if(te.getGeometry()){var ot=null,ct=te.getGeometry().getType();switch(ct){case"Point":case"MultiPoint":var ut={};if(ne.getImage()&&(ut.image=ne.getImage()),ne.getText()&&te.get("name")){var dt=ne.getText().clone();dt.setText(te.get("name")),ut.text=dt}ot=new Style$1(ut);break;case"Circle":var ht={},ft={};if(ne.getFill()&&(ft.fill=ne.getFill()),ne.getStroke()&&(ft.stroke=ne.getStroke()),ne.getText()&&te.get("name")){var pt=ne.getText().clone();pt.setText(te.get("name")),ht.text=pt}Object.keys(ft).length!==0&&(ft.radius=3,ht.image=new CircleStyle(ft)),ot=new Style$1(ht);break;case"Polygon":case"MultiPolygon":var mt={};ne.getFill()&&(mt.fill=ne.getFill()),ne.getStroke()&&(mt.stroke=ne.getStroke()),ot=new Style$1(mt);break;case"LineString":case"LinearRing":case"MultiLineString":var yt={};ne.getStroke()&&(yt.stroke=ne.getStroke()),ot=new Style$1(yt);break}return[ot]}};return ee},definePropertiesFromStyleByType:function(ne){if(ne.getGeometry()){var ee=ne.getGeometry().getType();switch(ee){case"Point":case"MultiPoint":ne.setPropertyMarker(),ne.setPropertyLabel();break;case"LineString":case"MultiLineString":ne.setPropertyStroke();break;case"Polygon":case"MultiPolygon":ne.setPropertyStroke(),ne.setPropertyFill();break}}},definePropertiesFromStyle:function(ne){var ee=ne.getStyle()||ne.getStyleFunction();if(ee){if(typeof ee=="function"){var te=ee.call(this,ne,0);if(te&&te.length!==0)ee=Array.isArray(te)?te[0]:te,ne.setStyle(ee);else return}this.definePropertiesFromStyleByType(ne)}},defineTagFromStyle:function(ne,ee){return logger$H.trace("todo..."),null}},logger$G=LoggerByDefault.getLogger("parser"),Parser$1={parse:function(ne){var ee=null,te=null,st=typeof window<"u"?window:null;if(typeof exports=="object"&&window===null){var ot=require("@xmldom/xmldom").DOMParser;te=new ot,ee=te.parseFromString(ne,"text/xml")}else st.DOMParser?(te=new st.DOMParser,ee=te.parseFromString(ne,"text/xml")):st.ActiveXObject?(ee=new st.ActiveXObject("Microsoft.XMLDOM"),ee.async=!1,ee.loadXML(ne)):logger$G.log("Incompatible environment for DOM Parser !");var ct=ee.querySelector("parsererror");return ct?(console.error(ct),null):(logger$G.trace(ee),ee)},toString:function(ne){var ee=new XMLSerializer,te=ee.serializeToString(ne);return logger$G.trace(te),te},format:function(ne){var ee=/(>)\s*(<)(\/*)/g,te=/ *(.*) +\n/g,st=/(<.+>)(.+\n)/g;ne=ne.replace(ee,`$1
90$2$3`).replace(te,`$1
91`).replace(st,`$1
92$2`);for(var ot="",ct=ne.split(`
93`),ut=0,dt="other",ht={"single->single":0,"single->closing":-1,"single->opening":0,"single->other":0,"closing->single":0,"closing->closing":-1,"closing->opening":0,"closing->other":0,"opening->single":1,"opening->closing":0,"opening->opening":1,"opening->other":1,"other->single":0,"other->closing":-1,"other->opening":0,"other->other":0},ft=0;ft<ct.length;ft++){var pt=ct[ft],mt=!!pt.match(/<.+\/>/),yt=!!pt.match(/<\/.+>/),vt=!!pt.match(/<[^!].*>/),_t=mt?"single":yt?"closing":vt?"opening":"other",bt=dt+"->"+_t;dt=_t;var xt="";ut+=ht[bt];for(var Mt=0;Mt<ut;Mt++)xt+="	";bt==="opening->closing"?ot=ot.substr(0,ot.length-1)+pt+`
94`:ot+=xt+pt+`
95`}return logger$G.trace(ot),ot}},logger$F=LoggerByDefault.getLogger("extended KML format");class KML extends KML$1{constructor(ee){if(super(ee),!(this instanceof KML))throw new TypeError("ERROR CLASS_CONSTRUCTOR");return ee=ee||{},this.source=null,this.extensions=ee.extensions||null,ee.defaultStyle&&!Array.isArray(ee.defaultStyle)&&(ee.defaultStyle=[ee.defaultStyle]),(ee.defaultStyle===null||typeof ee.defaultStyle>"u")&&(ee.defaultStyle=[]),this}_processKml(ee,te,st){for(var ot=ee.nodeName==="#document"?ee.childNodes[0].childNodes:ee.childNodes,ct=ot,ut=0;ut<ot.length;ut++){const ni=ot[ut];if(ni.nodeName==="Document"){ct=ni.childNodes;break}if(ni.nodeName==="Placemark"){ct=[ni];break}}for(var dt={},ht=-1,ft=0;ft<ct.length;ft++){var pt=ct[ft];switch(pt.nodeName){case"Style":var mt=pt.attributes[0];if(mt&&mt.nodeName==="id"){var yt=mt.nodeValue,vt=pt;dt[yt]=vt}break;case"Placemark":ht++;for(var _t=pt.childNodes,bt=!1,xt=!1,Mt=!1,Ot=null,kt=null,Nt=null,Gt=pt,Bt=0;Bt<_t.length;Bt++)switch(_t[Bt].nodeName){case"Polygon":Mt=!0;break;case"LineString":xt=!0;break;case"Point":bt=!0;break;case"Style":kt=_t[Bt],Ot=_t[Bt].childNodes;break;case"styleUrl":var Ut=_t[Bt].textContent.slice(1);dt[Ut]&&(Ot=dt[Ut].childNodes);break;case"ExtendedData":Nt=_t[Bt].childNodes;break;case"name":Gt=null;break}if(Nt){logger$F.log("ExtendedData :",Nt);var Vt=st.extendedData;Vt&&typeof Vt=="function"&&Vt(te[ht],Nt)}if(Gt){logger$F.log("Name :",Gt);var Ht=st.nameData;Ht&&typeof Ht=="function"&&Ht(te[ht],Gt)}if(bt&&Ot&&Ot.length!==0){for(var zt=null,jt=null,Wt=0;Wt<Ot.length;Wt++)switch(Ot[Wt].nodeName){case"LabelStyle":zt=Ot[Wt];break;case"IconStyle":jt=Ot[Wt];break}var Jt=te[ht].getProperties().name,Qt=te[ht].getProperties().description,oi=Jt||Qt;if(logger$F.trace(oi),!jt&&zt){var ai=st.labelStyle;ai&&typeof ai=="function"&&ai(te[ht],zt)}else if(jt&&!zt){var xn=st.iconStyle;xn&&typeof xn=="function"&&xn(te[ht],jt)}else if(jt&&zt){var An=st.iconLabelStyle;An&&typeof An=="function"&&An(te[ht],jt,zt)}}else{var Nn=te[ht],Xt=Nn.getStyle();if(Xt&&typeof Xt=="function"){var Zt=Xt.call(this,Nn,0);Zt&&Zt.length!==0&&(Xt=Zt[0])}if(Mt){var Kt=st.polygonStyle;Kt&&typeof Kt=="function"&&Kt(te[ht],Ot)}if(xt){var ti=st.lineStringStyle;ti&&typeof ti=="function"&&ti(te[ht],Ot)}if(bt&&Xt){var qt=Xt.getImage();if(qt&&qt instanceof CircleStyle){var ii=st.circleStyle;ii&&typeof ii=="function"&&ii(te[ht],kt)}else if(qt&&qt instanceof Icon){var wn=st.pointStyle;wn&&typeof wn=="function"&&wn(te[ht],kt)}}}break;default:logger$F.trace("tag is not processing !")}}}writeFeatures(ee,te){logger$F.log("overload : ol.format.KML.writeFeatures");var st=super.writeFeaturesNode(ee,te);if(st===null)return null;this.hasOwnProperty("extensions")&&this._writeRootExtensions(st,this.extensions);var ot=this._writeExtendStylesFeatures(st,ee,te),ct=Parser$1.format(
95ot);return ct===""?null:ct}_writeExtendStylesFeatures(ee,te,st){function ot(vt,_t){var bt=vt.toString(16);bt.charAt(0)==="#"&&(bt=bt.slice(1)),_t=_t||1,_t=parseInt(_t*255,10),_t=_t.toString(16);var xt=_t;return xt=xt+bt.substr(4,2),xt=xt+bt.substr(2,2),xt=xt+bt.substr(0,2),xt.toLowerCase()}var ct=function(vt,_t){if(logger$F.trace("label with style :",_t),!!vt&&vt.getStyle()instanceof Style$1){var bt=vt.getStyle().getText();if(!bt)return;var xt="Sans",Mt="16px",Ot=bt.getFont();if(Ot){var kt=Ot.split(" ",2);Mt=kt[0],xt=kt[1]}var Nt=vt.getStyle().getText().getStroke();if(!Nt)return;if(Nt instanceof Stroke){var Gt=ot("#FFFFFF"),Bt=Nt.getColor();if(Array.isArray(Bt)){var Ut="rgba(";Ut+=Bt[0]+",",Ut+=Bt[1]+",",Ut+=Bt[2]+",",Ut+=Bt[3]+")",Bt=Ut}if(ColorUtils.isRGB(Bt)){var Vt=ColorUtils.rgbaToHex(Bt);Gt=ot(Vt.hex,Vt.opacity)}else Gt=ot(Bt);var Ht=Nt.getWidth()||"0",zt="1";if(_t&&_t.getElementsByTagName("LabelStyleSimpleExtensionGroup").length===0){var jt=document.createElementNS(ee.namespaceURI,"LabelStyleSimpleExtensionGroup");jt.setAttribute("fontSize",Mt),jt.setAttribute("fontFamily",xt),jt.setAttribute("haloColor",Gt),jt.setAttribute("haloRadius",Ht),jt.setAttribute("haloOpacity",zt),_t.appendChild(jt)}}var Wt=vt.getStyle().getImage();if(!Wt)return;if(Wt instanceof CircleStyle){var Jt=null,Qt=null;if(Wt.getStroke()){if(Qt=Wt.getStroke().getWidth(),Jt=Wt.getStroke().getColor(),Array.isArray(Jt)){var oi="rgba(";oi+=Jt[0]+",",oi+=Jt[1]+",",oi+=Jt[2]+",",oi+=Jt[3]+")",Jt=oi}if(ColorUtils.isRGB(Jt)){var ai=ColorUtils.rgbaToHex(Jt);Jt=ot(ai.hex,ai.opacity)}else Jt=ot(Jt)}var xn=null;if(Wt.getFill()){if(xn=Wt.getFill().getColor(),Array.isArray(xn)){var An="rgba(";An+=xn[0]+",",An+=xn[1]+",",An+=xn[2]+",",An+=xn[3]+")",xn=An}if(ColorUtils.isRGB(xn)){var Nn=ColorUtils.rgbaToHex(xn);xn=ot(Nn.hex,Nn.opacity)}else xn=ot(xn)}if(_t&&_t.getElementsByTagName("ObjectSimpleExtensionGroup").length===0){var Xt=document.createElementNS(ee.namespaceURI,"ObjectSimpleExtensionGroup");Xt.setAttribute("type","circle"),Xt.setAttribute("radius",Wt.getRadius()),Xt.setAttribute("fillColor",xn),Xt.setAttribute("strokeColor",Jt),Xt.setAttribute("strokeWidth",Qt),_t.appendChild(Xt)}}}},ut=function(vt,_t){if(logger$F.trace("marker with style (hotspot):",_t),!!vt&&vt.getStyle()instanceof Style$1){var bt=vt.getStyle().getImage();if(!bt)return;if(bt instanceof Icon){var xt=0,Mt=0,Ot="pixels",kt="pixels",Nt=bt.getSize(),Gt=bt.getAnchor();if(Gt.length&&(xt=Gt[0],Mt=Gt[1],kt==="fraction"?Mt=Mt===1?0:1-Mt:Mt=kt==="pixels"&&Mt===Nt[1]?0:Nt[1]-Mt),_t&&_t.getElementsByTagName("hotSpot").length===0){var Bt=document.createElementNS(ee.namespaceURI,"hotSpot");Bt.setAttribute("x",xt),Bt.setAttribute("y",Mt),Bt.setAttribute("xunits",Ot),Bt.setAttribute("yunits",kt),_t.appendChild(Bt)}}}},dt=function(vt,_t){if(vt&&vt.getStyle()instanceof Style$1){var bt=vt.getStyle().getImage();if(!bt)return;if(bt instanceof CircleStyle){var xt=null,Mt=null;if(bt.getStroke()){if(Mt=bt.getStroke().getWidth(),xt=bt.getStroke().getColor(),Array.isArray(xt)){var Ot="rgba(";Ot+=xt[0]+",",Ot+=xt[1]+",",Ot+=xt[2]+",",Ot+=xt[3]+")",xt=Ot}if(ColorUtils.isRGB(xt)){var kt=ColorUtils.rgbaToHex(xt);xt=ot(kt.hex,kt.opacity)}else xt=ot(xt)}var Nt=null;if(bt.getFill()){if(Nt=bt.getFill().getColor(),Array.isArray(Nt)){var Gt="rgba(";Gt+=Nt[0]+",",Gt+=Nt[1]+",",Gt+=Nt[2]+",",Gt+=Nt[3]+")",Nt=Gt}if(ColorUtils.isRGB(Nt)){var Bt=ColorUtils.rgbaToHex(Nt);Nt=ot(Bt.hex,Bt.opacity)}else Nt=ot(Nt)}if(_t&&_t.getElementsByTagName("ObjectSimpleExtensionGroup").length===0){var Ut=document.createElementNS(ee.namespaceURI,"LabelStyle"),Vt=document.createElementNS(ee.namespaceURI,"ObjectSimpleExtensionGroup");Vt.setAttribute("type","circle"),Vt.setAttribute("radius",bt.getRadius()),Vt.setAttribute("fillColor",Nt),Vt.setAttribute("strokeColor",xt),Vt.setAttribute("strokeWidth",Mt),Ut.appendChild(Vt),_t.appendChild(Ut)}}}},ht=function(vt,_t){},ft=function(vt,_t,bt){logger$F.trace("write an icon with a label"),ut(vt,_t),ct(vt,bt)},pt=function(vt,_t){for(var bt=0;bt<_t.length;bt++){var xt=_t[bt];if(xt.nodeName==="name")return}var Mt=vt.getProperties().name;if(Mt){var Ot=document.createElement("name");Ot.innerHTML=Mt,_t.appendChild(Ot)}},mt=function(vt,_t){if(_t&&_t.length){for(var bt=[],xt=0;xt<_t.length;xt++){const Ot=_t[xt];if(Ot.nodeName==="Data"){var Mt=Ot.getAttribute("name");Styling.getListTags().includes(Mt)&&bt.push(Ot)}}bt&&bt.length&&bt.forEach(Ot=>{Ot.remove()})}};this._processKml(ee,te,{labelStyle:ct,iconStyle:ut,iconLabelStyle:ft,circleStyle:dt,pointStyle:ht,nameData:pt,extendedData:mt});var yt=Parser$1.toString(ee);return yt||null}_writeRootExtensions(ee,te){var st=document.createElementNS(ee.namespaceURI,"ExtendedData");for(const dt in te)if(Object.hasOwnProperty.call(te,dt)){const ht=te[dt];var ot=document.createElementNS(ee.namespaceURI,"Data");ot.setAttribute("name",dt);var ct=document.createTextNode(JSON.stringify(ht));ot.appendChild(ct),st.appendChild(ot)}var ut=ee.firstChild;ee.insertBefore(st,ut)}readFeatures(ee,te){logger$F.log("overload : ol.format.KML.readFeatures"),typeof ee=="string"?this.source=Parser$1.parse(ee):ee!==null&&(this.source=ee);var st=this._readExtendStylesFeatures(ee,te);return logger$F.trace("Styles étendus",st),st.forEach(ot=>{Styling.definePropertiesFromStyle(ot)}),st}_readExtendStylesFeatures(ee,te){var st=super.readFeatures(ee,te),ot=null,ct="";if(typeof ee=="string"?ct=ee:ct=ee.documentElement.outerHTML,ct=ct.replace(/\n/g,""),ct=ct.replace(/(>)\s*(<)/g,"$1$2"),ot=Parser$1.parse(ct),ot===null)return st;function ut(yt){var vt="";vt=vt+yt.substr(6,2),vt=vt+yt.substr(4,2),vt=vt+yt.substr(2,2);for(var _t=parseInt(vt,16).toString(16),bt="",xt=_t.length||0,Mt=0;Mt<6-xt;Mt++)bt+="0";return _t="#"+bt+_t,_t}var dt=function(yt,vt){if(logger$F.trace("label with style :",vt),!!yt){for(var _t=yt.getProperties().name,bt=ut("ff000000"),xt="#FFFFFF",Mt=0,Ot="Sans",kt="16px",Nt=null,Gt=5,Bt="#000000",Ut="#ffffff",Vt=1,Ht=!1,zt=!1,jt=vt.childNodes,Wt=0;Wt<jt.length;Wt++)switch(jt[Wt].nodeName){case"scale":break;case"colorMode":break;case"color":bt=ut(jt[Wt].textContent);break;case"LabelStyleSimpleExtensionGroup":Ht=!0;for(var Jt=jt[Wt].attributes,Qt=0;Qt<Jt.length;Qt++)switch(Jt[Qt].nodeName){case"fontFamily":Ot=Jt[Qt].nodeValue;break;case"fontSize":kt=Jt[Qt].nodeValue;break;case"haloColor":xt=ut(Jt[Qt].nodeValue);break;case"haloRadius":Mt=parseInt(Jt[Qt].nodeValue,10);break}break;case"ObjectSimpleExtensionGroup":zt=!0;for(var oi=jt[Wt].attributes,ai=0;ai<oi.length;ai++)switch(oi[ai].nodeName){case"type":Nt=oi[ai].nodeValue;break;case"radius":Gt=parseInt(oi[ai].nodeValue,10);break;case"fillColor":var xn=oi[ai].nodeValue,An=Math.round(ColorUtils.num(xn.substr(0,2))/255*10)/10,Nn=ut(xn);Bt=ColorUtils.hexToRgba(Nn,An);break;case"strokeColor":var Xt=oi[ai].nodeValue,Zt=Math.round(ColorUtils.num(Xt.substr(0,2))/255*10)/10,Kt=ut(Xt);Ut=ColorUtils.hexToRgba(Kt,Zt);break;case"strokeWidth":Vt=parseInt(oi[ai].nodeValue,10);break}break}var ti=null;zt&&Nt==="circle"?ti=new CircleStyle({radius:Gt,fill:new Fill({color:Bt}),stroke:new Stroke({color:Ut,width:Vt})}):Ht&&(ti=new Icon({src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR4nGNiYAAAAAkAAxkR2eQAAAAASUVORK5CYII=",size:[51,38],anch
95or:[25.5,38],anchorOrigin:"top-left",anchorXUnits:"pixels",anchorYUnits:"pixels"})),yt.setStyle(new Style$1({image:ti,text:new Text({font:kt+" "+Ot,textAlign:"left",text:_t,fill:new Fill({color:bt}),stroke:new Stroke({color:xt,width:Mt})})}))}},ht=function(yt,vt){logger$F.trace("hotspot :",vt);for(var _t=null,bt=null,xt=ut("ffffffff"),Mt=!1,Ot=51,kt=38,Nt=!1,Gt=25.5,Bt="pixels",Ut=38,Vt="pixels",Ht=vt.childNodes,zt=!1,jt=0;jt<Ht.length;jt++)switch(Ht[jt].nodeName){case"Icon":zt=!0;for(var Wt=Ht[jt].childNodes,Jt=0;Jt<Wt.length;Jt++)switch(Wt[Jt].nodeName){case"href":_t=Wt[Jt].textContent;break;case"gx:w":Mt=!0,Ot=parseFloat(Wt[Jt].textContent);break;case"gx:h":Mt=!0,kt=parseFloat(Wt[Jt].textContent);break}break;case"hotSpot":Nt=!0;for(var Qt=Ht[jt].attributes,oi=0;oi<Qt.length;oi++)switch(Qt[oi].nodeName){case"x":Gt=parseFloat(Qt[oi].nodeValue);break;case"y":Ut=parseFloat(Qt[oi].nodeValue);break;case"yunits":Bt=Qt[oi].nodeValue;break;case"xunits":Vt=Qt[oi].nodeValue;break}break;case"scale":bt=parseFloat(Ht[jt].textContent);break;case"color":xt=ut(Ht[jt].textContent);break}var ai=null;if(zt){var xn={src:_t||"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR4nGNiYAAAAAkAAxkR2eQAAAAASUVORK5CYII=",color:xt,crossOrigin:"anonymous",scale:bt||1};Mt&&Helper.mergeParams(xn,{size:[Ot,kt]}),Nt&&Helper.mergeParams(xn,{anchor:[Gt,Ut],anchorOrigin:"bottom-left",anchorXUnits:Bt||"pixels",anchorYUnits:Vt||"pixels"}),ai=new Icon(xn)}var An=yt.getStyleFunction();if(An){var Nn=An(yt,0);if(Nn&&!Array.isArray(Nn)&&(Nn=[Nn]),Nn&&Nn.length!==0){var Xt=Nn.length===1?Nn[0]:Nn[Nn.length-1];yt.setStyle(new Style$1({image:ai,text:Xt.getText()}))}}},ft=function(yt,vt){if(logger$F.trace("extendData :",vt),!!yt){for(var _t={},bt=yt.get("name")||"",xt=yt.get("description")||"",Mt=null,Ot=0;Ot<vt.length;Ot++){var kt=vt[Ot],Nt=kt.attributes[0],Gt=kt.childNodes;if(Nt.nodeName==="name")switch(Nt.nodeValue){case"label":bt=kt.textContent,_t.name=bt;break;case"title":case"attributetitle":for(var Bt=0;Bt<Gt.length;Bt++)Gt[Bt].nodeName==="value"&&(Mt=Gt[Bt].textContent);break;default:_t[Nt.nodeValue]=kt.textContent;break}}Mt&&(xt=xt?Mt+" : "+xt:Mt,_t.description=xt),Object.keys(_t).length&&yt.setProperties(_t,!0)}},pt=function(yt,vt,_t){logger$F.trace("display icon and label"),dt(yt,_t),ht(yt,vt)},mt=function(yt,vt){};return this._processKml(ot,st,{lineStringStyle:mt,polygonStyle:mt,pointStyle:mt,labelStyle:this.showPointNames_?dt:null,iconStyle:ht,iconLabelStyle:this.showPointNames_?pt:ht,extendedData:ft}),st}readRootExtensions(ee){for(var te={},st=this.source.nodeName==="#document"?this.source.childNodes[0]:this.source,ot=st.childNodes,ct=0;ct<ot.length;ct++){var ut=ot[ct];if(ut.nodeName==="ExtendedData")for(var dt=ut.childNodes,ht=0;ht<dt.length;ht++){var ft=dt[ht];if(ft.nodeName==="Data"){var pt=ft.attributes[0];if(pt&&pt.nodeName==="name"&&pt.nodeValue===ee){te=JSON.parse(ft.textContent);break}}}}return te}}window.ol&&window.ol.format&&(window.ol.format.KMLExtended=KML);const NAMESPACE_URIS$3=[null,"http://www.topografix.com/GPX/1/0","http://www.topografix.com/GPX/1/1"],SCHEMA_LOCATION="http://www.topografix.com/GPX/1/1 http://www.topografix.com/GPX/1/1/gpx.xsd",FEATURE_READER={rte:readRte,trk:readTrk,wpt:readWpt},GPX_PARSERS=makeStructureNS(NAMESPACE_URIS$3,{rte:makeArrayPusher(readRte),trk:makeArrayPusher(readTrk),wpt:makeArrayPusher(readWpt)}),LINK_PARSERS=makeStructureNS(NAMESPACE_URIS$3,{text:makeObjectPropertySetter(readString,"linkText"),type:makeObjectPropertySetter(readString,"linkType")}),AUTHOR_PARSERS=makeStructureNS(NAMESPACE_URIS$3,{name:makeObjectPropertySetter(readString),email:parseEmail,link:parseLink}),METADATA_PARSERS=makeStructureNS(NAMESPACE_URIS$3,{name:makeObjectPropertySetter(readString),desc:makeObjectPropertySetter(readString),author:makeObjectPropertySetter(readAuthor),copyright:makeObjectPropertySetter(readCopyright),link:parseLink,time:makeObjectPropertySetter(readDateTime),keywords:makeObjectPropertySetter(readString),bounds:parseBounds,extensions:parseExtensions}),COPYRIGHT_PARSERS=makeStructureNS(NAMESPACE_URIS$3,{year:makeObjectPropertySetter(readPositiveInteger),license:makeObjectPropertySetter(readString)}),GPX_SERIALIZERS=makeStructureNS(NAMESPACE_URIS$3,{rte:makeChildAppender(writeRte),trk:makeChildAppender(writeTrk),wpt:makeChildAppender(writeWpt)});let GPX$1=class extends XMLFeature{constructor(ee){super(),ee=ee||{},this.dataProjection=get$3("EPSG:4326"),this.readExtensions_=ee.readExtensions}handleReadExtensions_(ee){ee||(ee=[]);for(let te=0,st=ee.length;te<st;++te){const ot=ee[te];if(this.readExtensions_){const ct=ot.get("extensionsNode_")||null;this.readExtensions_(ot,ct)}ot.set("extensionsNode_",void 0)}}readMetadata(ee){return ee?typeof ee=="string"?this.readMetadataFromDocument(parse$1(ee)):isDocument(ee)?this.readMetadataFromDocument(ee):this.readMetadataFromNode(ee):null}readMetadataFromDocument(ee){for(let te=ee.firstChild;te;te=te.nextSibling)if(te.nodeType===Node.ELEMENT_NODE){const st=this.readMetadataFromNode(te);if(st)return st}return null}readMetadataFromNode(ee){if(!NAMESPACE_URIS$3.includes(ee.namespaceURI))return null;for(let te=ee.firstElementChild;te;te=te.nextElementSibling)if(NAMESPACE_URIS$3.includes(te.namespaceURI)&&te.localName==="metadata"){const st=pushParseAndPop({},METADATA_PARSERS,te,[]);return Object.keys(st).length>0?st:null}return null}readFeatureFromNode(ee,te){if(!NAMESPACE_URIS$3.includes(ee.namespaceURI))return null;const st=FEATURE_READER[ee.localName];if(!st)return null;const ot=st(ee,[this.getReadOptions(ee,te)]);return ot?(this.handleReadExtensions_([ot]),ot):null}
95readFeaturesFromNode(ee,te){if(!NAMESPACE_URIS$3.includes(ee.namespaceURI))return[];if(ee.localName=="gpx"){const st=pushParseAndPop([],GPX_PARSERS,ee,[this.getReadOptions(ee,te)]);return st?(this.handleReadExtensions_(st),st):[]}return[]}writeFeaturesNode(ee,te){te=this.adaptOptions(te);const st=createElementNS("http://www.topografix.com/GPX/1/1","gpx");return st.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xsi",XML_SCHEMA_INSTANCE_URI),st.setAttributeNS(XML_SCHEMA_INSTANCE_URI,"xsi:schemaLocation",SCHEMA_LOCATION),st.setAttribute("version","1.1"),st.setAttribute("creator","OpenLayers"),pushSerializeAndPop({node:st},GPX_SERIALIZERS,GPX_NODE_FACTORY,ee,[te]),st}};const RTE_PARSERS=makeStructureNS(NAMESPACE_URIS$3,{name:makeObjectPropertySetter(readString),cmt:makeObjectPropertySetter(readString),desc:makeObjectPropertySetter(readString),src:makeObjectPropertySetter(readString),link:parseLink,number:makeObjectPropertySetter(readPositiveInteger),extensions:parseExtensions,type:makeObjectPropertySetter(readString),rtept:parseRtePt}),RTEPT_PARSERS=makeStructureNS(NAMESPACE_URIS$3,{ele:makeObjectPropertySetter(readDecimal),time:makeObjectPropertySetter(readDateTime)}),TRK_PARSERS=makeStructureNS(NAMESPACE_URIS$3,{name:makeObjectPropertySetter(readString),cmt:makeObjectPropertySetter(readString),desc:makeObjectPropertySetter(readString),src:makeObjectPropertySetter(readString),link:parseLink,number:makeObjectPropertySetter(readPositiveInteger),type:makeObjectPropertySetter(readString),extensions:parseExtensions,trkseg:parseTrkSeg}),TRKSEG_PARSERS=makeStructureNS(NAMESPACE_URIS$3,{trkpt:parseTrkPt}),TRKPT_PARSERS=makeStructureNS(NAMESPACE_URIS$3,{ele:makeObjectPropertySetter(readDecimal),time:makeObjectPropertySetter(readDateTime)}),WPT_PARSERS=makeStructureNS(NAMESPACE_URIS$3,{ele:makeObjectPropertySetter(readDecimal),time:makeObjectPropertySetter(readDateTime),magvar:makeObjectPropertySetter(readDecimal),geoidheight:makeObjectPropertySetter(readDecimal),name:makeObjectPropertySetter(readString),cmt:makeObjectPropertySetter(readString),desc:makeObjectPropertySetter(readString),src:makeObjectPropertySetter(readString),link:parseLink,sym:makeObjectPropertySetter(readString),type:makeObjectPropertySetter(readString),fix:makeObjectPropertySetter(readString),sat:makeObjectPropertySetter(readPositiveInteger),hdop:makeObjectPropertySetter(readDecimal),vdop:makeObjectPropertySetter(readDecimal),pdop:makeObjectPropertySetter(readDecimal),ageofdgpsdata:makeObjectPropertySetter(readDecimal),dgpsid:makeObjectPropertySetter(readPositiveInteger),extensions:parseExtensions}),LINK_SEQUENCE=["text","type"],LINK_SERIALIZERS=makeStructureNS(NAMESPACE_URIS$3,{text:makeChildAppender(writeStringTextNode),type:makeChildAppender(writeStringTextNode)}),RTE_SEQUENCE=makeStructureNS(NAMESPACE_URIS$3,["name","cmt","desc","src","link","number","type","rtept"]),RTE_SERIALIZERS=makeStructureNS(NAMESPACE_URIS$3,{name:makeChildAppender(writeStringTextNode),cmt:makeChildAppender(writeStringTextNode),desc:makeChildAppender(writeStringTextNode),src:makeChildAppender(writeStringTextNode),link:makeChildAppender(writeLink),number:makeChildAppender(writeNonNegativeIntegerTextNode),type:makeChildAppender(writeStringTextNode),rtept:makeArraySerializer(makeChildAppender(writeWptType))}),RTEPT_TYPE_SEQUENCE=makeStructureNS(NAMESPACE_URIS$3,["ele","time"]),TRK_SEQUENCE=makeStructureNS(NAMESPACE_URIS$3,["name","cmt","desc","src","link","number","type","trkseg"]),TRK_SERIALIZERS=makeStructureNS(NAMESPACE_URIS$3,{name:makeChildAppender(writeStringTextNode),cmt:makeChildAppender(writeStringTextNode),desc:makeChildAppender(writeStringTextNode),src:makeChildAppender(writeStringTextNode),link:makeChildAppender(writeLink),number:makeChildAppender(writeNonNegativeIntegerTextNode),type:makeChildAppender(writeStringTextNode),trkseg:makeArraySerializer(makeChildAppender(writeTrkSeg))}),TRKSEG_NODE_FACTORY=makeSimpleNodeFactory("trkpt"),TRKSEG_SERIALIZERS=makeStructureNS(NAMESPACE_URIS$3,{trkpt:makeChildAppender(writeWptType)}),WPT_TYPE_SEQUENCE=makeStructureNS(NAMESPACE_URIS$3,["ele","time","magvar","geoidheight","name","cmt","desc","src","link","sym","type","fix","sat","hdop","vdop","pdop","ageofdgpsdata","dgpsid"]),WPT_TYPE_SERIALIZERS=makeStructureNS(NAMESPACE_URIS$3,{ele:makeChildAppender(writeDecimalTextNode),time:makeChildAppender(writeDateTimeTextNode),magvar:makeChildAppender(writeDecimalTextNode),geoidheight:makeChildAppender(writeDecimalTextNode),name:makeChildAppender(writeStringTextNode),cmt:makeChildAppender(writeStringTextNode),desc:makeChildAppender(writeStringTextNode),src:makeChildAppender(writeStringTextNode),link:makeChildAppender(writeLink),sym:makeChildAppender(writeStringTextNode),type:makeChildAppender(writeStringTextNode),fix:makeChildAppender(writeStringTextNode),sat:makeChildAppender(writeNonNegativeIntegerTextNode),hdop:makeChildAppender(writeDecimalTextNode),vdop:makeChildAppender(writeDecimalTextNode),pdop:makeChildAppender(writeDecimalTextNode),ageofdgpsdata:makeChildAppender(writeDecimalTextNode),dgpsid:makeChildAppender(writeNonNegativeIntegerTextNode)}),GEOMETRY_TYPE_TO_NODENAME={Point:"wpt",LineString:"rte",MultiLineString:"trk"};function GPX_NODE_FACTORY(ne,ee,te){const st=ne.getGeometry();if(st){const ot=GEOMETRY_TYPE_TO_NODENAME[st.getType()];if(ot){const ct=ee[ee.length-1].node;return createElementNS(ct.namespaceURI,ot)}}}function appendCoordinate(ne,ee,te,st){return ne.push(parseFloat(te.getAttribute("lon")),parseFloat(te.getAttribute("lat"))),"ele"in st?(ne.push(st.ele),delete st.ele,ee.hasZ=!0):ne.push(0),"time"in st?(ne.push(st.time),delete st.time,ee.hasM=!0):ne.push(0),ne}function applyLayoutOptions(ne,ee,te){let st="XY",ot=2;if(ne.hasZ&&ne.hasM?(st="XYZM",ot=4):ne.hasZ?(st="XYZ",ot=3):ne.hasM&&(st="XYM",ot=3),ot!==4){for(let ct=0,ut=ee.length/4;ct<ut;ct++)ee[ct*ot]=ee[ct*4],ee[ct*ot+1]=ee[ct*4+1],ne.hasZ&&(ee[ct*ot+2]=ee[ct*4+2]),ne.hasM&&(ee[ct*ot+2]=ee[ct*4+3]);if(ee.length=ee.length/4*ot,te)for(let ct=0,ut=te.length;ct<ut;ct++)te[ct]=te[ct]/4*ot}return st}function readAuthor(ne,ee){const te=pushParseAndPop({},AUTHOR_PARSERS,ne,ee);if(te)return te}function readCopyright(ne,ee){const te=pushParseAndPop({},COPYRIGHT_PARSERS,ne,ee);if(te){const st=ne.getAttribute("author");return st!==null&&(te.author=st),te}}function parseBounds(ne,ee){const te=ee[ee.length-1],st=ne.getAttribute("minlat"),ot=ne.getAttribute("minlon"),ct=ne.getAttribute("maxlat"),ut=ne.getAttribute("maxlon");ot!==null&&st!==null&&ut!==null&&ct!==null&&(te.bounds=[[parseFloat(ot),parseFloat(st)],[parseFloat(ut),parseFloat(ct)]])}function parseEmail(ne,ee){const te=ee[ee.length-1],st=ne.getAttribute("id"),ot=ne.getAttribute("domain");st!==null&&ot!==null&&(te.email=`${st}@${ot}`)}function parseLink(ne,ee){const te=ee[ee.length-1],st=ne.getAttribute("href");st!==null&&(te.link=st),parseNode(LINK_PARSERS,ne,ee)}function parseExtensions(ne,ee){const te=ee[ee.length-1];te.extensionsNode_=ne}function parseRtePt(ne,ee){const te=pushParseAndPop({},RTEPT_PARSERS,ne,ee);if(te){const st=ee[ee.length-1],ot=st.flatCoordinates,ct=st.layoutOptions;appendCoordinate(ot,ct,ne,te)}}function parseTrkPt(ne,ee){const te=pushParseAndPop({},TRKPT_PARSERS,ne,ee);if(te){const st=ee[ee.length-1],ot=st.flatCoordinates,ct=st.layoutOptions;appendCoordinate(ot,ct,ne,te)}}function parseTrkSeg(ne,ee){const te=ee[ee.length-1];parseNode(TRKSEG_PARSERS,ne,ee);const st=te.flatCoordinates;te.ends.push(st.length)}function readRte(ne,ee){const te=ee[0],st=pushParseAndPop({flatCoordinates:[],layoutOptions:{}},RTE_PARSERS,ne,ee);if(!st)return;const ot=st.flatCoordinates;delete st.flatCoordinates;const ct=st.layoutOptions;delete st.layoutOptions;
95const ut=applyLayoutOptions(ct,ot),dt=new LineString(ot,ut);transformGeometryWithOptions(dt,!1,te);const ht=new Feature(dt);return ht.setProperties(st,!0),ht}function readTrk(ne,ee){const te=ee[0],st=pushParseAndPop({flatCoordinates:[],ends:[],layoutOptions:{}},TRK_PARSERS,ne,ee);if(!st)return;const ot=st.flatCoordinates;delete st.flatCoordinates;const ct=st.ends;delete st.ends;const ut=st.layoutOptions;delete st.layoutOptions;const dt=applyLayoutOptions(ut,ot,ct),ht=new MultiLineString(ot,dt,ct);transformGeometryWithOptions(ht,!1,te);const ft=new Feature(ht);return ft.setProperties(st,!0),ft}function readWpt(ne,ee){const te=ee[0],st=pushParseAndPop({},WPT_PARSERS,ne,ee);if(!st)return;const ot={},ct=appendCoordinate([],ot,ne,st),ut=applyLayoutOptions(ot,ct),dt=new Point$1(ct,ut);transformGeometryWithOptions(dt,!1,te);const ht=new Feature(dt);return ht.setProperties(st,!0),ht}function writeLink(ne,ee,te){ne.setAttribute("href",ee);const ot=te[te.length-1].properties,ct=[ot.linkText,ot.linkType];pushSerializeAndPop({node:ne},LINK_SERIALIZERS,OBJECT_PROPERTY_NODE_FACTORY,ct,te,LINK_SEQUENCE)}function writeWptType(ne,ee,te){const st=te[te.length-1],ct=st.node.namespaceURI,ut=st.properties;switch(ne.setAttributeNS(null,"lat",String(ee[1])),ne.setAttributeNS(null,"lon",String(ee[0])),st.geometryLayout){case"XYZM":ee[3]!==0&&(ut.time=ee[3]);case"XYZ":ee[2]!==0&&(ut.ele=ee[2]);break;case"XYM":ee[2]!==0&&(ut.time=ee[2]);break}const ht=ne.nodeName=="rtept"?RTEPT_TYPE_SEQUENCE[ct]:WPT_TYPE_SEQUENCE[ct],ft=makeSequence(ut,ht);pushSerializeAndPop({node:ne,properties:ut},WPT_TYPE_SERIALIZERS,OBJECT_PROPERTY_NODE_FACTORY,ft,te,ht)}function writeRte(ne,ee,te){const st=te[0],ot=ee.getProperties(),ct={node:ne};ct.properties=ot;const ut=ee.getGeometry();if(ut.getType()=="LineString"){const pt=transformGeometryWithOptions(ut,!0,st);ct.geometryLayout=pt.getLayout(),ot.rtept=pt.getCoordinates()}const dt=te[te.length-1].node,ht=RTE_SEQUENCE[dt.namespaceURI],ft=makeSequence(ot,ht);pushSerializeAndPop(ct,RTE_SERIALIZERS,OBJECT_PROPERTY_NODE_FACTORY,ft,te,ht)}function writeTrk(ne,ee,te){const st=te[0],ot=ee.getProperties(),ct={node:ne};ct.properties=ot;const ut=ee.getGeometry();if(ut.getType()=="MultiLineString"){const pt=transformGeometryWithOptions(ut,!0,st);ot.trkseg=pt.getLineStrings()}const dt=te[te.length-1].node,ht=TRK_SEQUENCE[dt.namespaceURI],ft=makeSequence(ot,ht);pushSerializeAndPop(ct,TRK_SERIALIZERS,OBJECT_PROPERTY_NODE_FACTORY,ft,te,ht)}function writeTrkSeg(ne,ee,te){const st={node:ne};st.geometryLayout=ee.getLayout(),st.properties={},pushSerializeAndPop(st,TRKSEG_SERIALIZERS,TRKSEG_NODE_FACTORY,ee.getCoordinates(),te)}function writeWpt(ne,ee,te){const st=te[0],ot=te[te.length-1];ot.properties=ee.getProperties();const ct=ee.getGeometry();if(ct.getType()=="Point"){const ut=transformGeometryWithOptions(ct,!0,st);ot.geometryLayout=ut.getLayout(),writeWptType(ne,ut.getCoordinates(),te)}}class GPX extends GPX$1{constructor(ee){if(super(ee),!(this instanceof GPX))throw new TypeError("ERROR CLASS_CONSTRUCTOR");if(this.options=ee||{},this.options.readExtensions&&typeof this.options.readExtensions=="function"){var te=this.options.readExtensions;this.options.readExtensions=function(st,ot){this.readExtensions(st,ot),te.call(this,st,ot)}}else this.options.readExtensions=this.readExtensions;return(this.options.defaultStyle===null||typeof this.options.defaultStyle>"u")&&(this.options.defaultStyle={}),this.source=null,this}readFeatures(ee,te){var st=super.readFeatures(ee,te);typeof ee=="string"?this.source=Parser$1.parse(ee):ee!==null&&(this.source=ee);var ot=this;return st.forEach(function(ct,ut,dt){ct.setId(ut+1);var ht=ct.getProperties().desc;ht&&ct.setProperties({description:ht});var ft=ct.getStyleFunction();if(!ft){var pt=Styling.defineStyleFunctionByDefault(ot.options.defaultStyle);pt&&ct.setStyle(pt)}}),st}writeFeatures(ee,te){if(ee.forEach(function(ht,ft,pt){var mt=ht.getProperties().description;mt&&ht.setProperties({desc:mt}),Styling.definePropertiesFromStyle(ht);var yt=ht.getGeometry().getType();if(yt==="Polygon"){var vt=ht.clone();vt.set("type",yt),vt.setGeometry(new LineString(ht.getGeometry().getCoordinates())),ee.push(vt),pt.splice(ft,1)}else if(yt==="MultiPolygon"){var _t=ht.clone();_t.set("type",yt),_t.setGeometry(new MultiLineString(ht.getGeometry().getCoordinates())),ee.push(_t),pt.splice(ft,1)}}),this.options.orderBy!==void 0){var st=this.options.orderBy;if(st){var ot=function(ht,ft){var pt=ht.get(st)||0,mt=ft.get(st)||0;return pt.toString().localeCompare(mt.toString(),void 0,{numeric:!0})};ee.sort(ot)}}var ct=super.writeFeaturesNode(ee,te);if(ct===null)return null;this.options.hasOwnProperty("extensions")&&this.writeRootExtensions_(ct,this.options.extensions),this.processExtensions_(ct,ee,{extensions:this.writeE
95xtensions_});var ut=Parser$1.toString(ct);if(!ut)return null;var dt=Parser$1.format(ut);return dt===""?null:dt}readExtensions(ee,te){var st=te;if(!te){var ot=ee.getProperties();for(const ht in ot)if(Object.hasOwnProperty.call(ot,ht)){const ft=ot[ht];if(ft instanceof Node){st=ft;break}}}if(!st){console.warn("node not found !");return}for(var ct=0;ct<st.childNodes.length;ct++){var ut=st.childNodes[ct];ut.nodeType===1&&ee.set(ut.nodeName,ut.textContent)}Styling.APPLY_CONVERT_GEOM_GPX=!0;var dt=Styling.defineStyleFromProperties(ee);dt&&ee.setStyle(dt)}readRootExtensions(ee){for(var te={},st=this.source.childNodes[0],ot=st.childNodes,ct=0;ct<ot.length;ct++){var ut=ot[ct];if(ut.nodeName==="metadata")for(var dt=ut.childNodes,ht=0;ht<dt.length;ht++){var ft=dt[ht];if(ft.nodeName==="extensions")for(var pt=ft.childNodes,mt=0;mt<pt.length;mt++){var yt=pt[mt];if(yt.nodeName==="data"){var vt=yt.attributes[0];if(vt&&vt.nodeName==="name"&&vt.nodeValue===ee){te=JSON.parse(yt.textContent);break}}}}}return te}writeRootExtensions_(ee,te,st){var ot=document.createElement("metadata"),ct=document.createElement("extensions");function ut(pt,mt){for(const Ot in mt)if(Object.hasOwnProperty.call(mt,Ot)){var yt=mt[Ot]||"",vt=document.createElement(Ot);if(typeof yt=="string"||typeof yt=="number")vt.innerHTML=yt,pt.appendChild(vt);else if(yt instanceof Array){vt.setAttribute("type","array"),vt.setAttribute("index",yt.length);for(let kt=0;kt<yt.length;kt++){var _t=yt[kt]||"",bt=document.createElement("value");if(typeof _t=="string"||typeof _t=="number")bt.innerHTML=_t,vt.appendChild(bt);else if(_t instanceof Array){bt.setAttribute("type","array"),bt.setAttribute("index",_t.length);for(let Nt=0;Nt<_t.length;Nt++){var xt=_t[Nt]||"",Mt=document.createElement("value");(typeof xt=="string"||typeof xt=="number")&&(Mt.innerHTML=xt,bt.appendChild(Mt))}vt.appendChild(bt)}else _t instanceof Object&&vt.appendChild(ut(bt,_t))}pt.appendChild(vt)}else yt instanceof Object&&pt.appendChild(ut(vt,yt))}return pt}if(st)ut(ct,te);else for(const pt in te)if(Object.hasOwnProperty.call(te,pt)){const mt=te[pt];var dt=document.createElement("data");dt.setAttribute("name",pt);var ht=document.createTextNode(JSON.stringify(mt));dt.appendChild(ht),ct.appendChild(dt)}ot.appendChild(ct);var ft=ee.firstChild;ee.insertBefore(ot,ft)}writeExtensions_(ee,te){var st=document.createElementNS(te.parentNode.namespaceURI,"extensions");
95Styling.getListTags().forEach(ot=>{if(ee.get(ot)){var ct=document.createElementNS(te.parentNode.namespaceURI,ot);ct.innerHTML=ee.get(ot),st.appendChild(ct)}}),te.appendChild(st)}processExtensions_(ee,te,st){for(var ot=-1,ct=ee.childNodes,ut=0;ut<ct.length;ut++){var dt=ct[ut];switch(dt.nodeName){case"wpt":case"rte":case"trk":ot++;var ht=te[ot],ft=ht.getStyle();if(ft){var pt=st.extensions;pt&&typeof pt=="function"&&pt(ht,dt)}break;case"metadata":break;default:console.warn("nodename unknown :",dt.nodeName);break}}}}window.ol&&window.ol.format&&(window.ol.format.GPXExtended=GPX);class JSONFeature extends FeatureFormat{constructor(){super()}getType(){return"json"}readFeature(ee,te){return this.readFeatureFromObject(getObject(ee),this.getReadOptions(ee,te))}readFeatures(ee,te){return this.readFeaturesFromObject(getObject(ee),this.getReadOptions(ee,te))}readFeatureFromObject(ee,te){return abstract()}readFeaturesFromObject(ee,te){return abstract()}readGeometry(ee,te){return this.readGeometryFromObject(getObject(ee),this.getReadOptions(ee,te))}readGeometryFromObject(ee,te){return abstract()}readProjection(ee){return this.readProjectionFromObject(getObject(ee))}readProjectionFromObject(ee){return abstract()}writeFeature(ee,te){return JSON.stringify(this.writeFeatureObject(ee,te))}writeFeatureObject(ee,te){return abstract()}writeFeatures(ee,te){return JSON.stringify(this.writeFeaturesObject(ee,te))}writeFeaturesObject(ee,te){return abstract()}writeGeometry(ee,te){return JSON.stringify(this.writeGeometryObject(ee,te))}writeGeometryObject(ee,te){return abstract()}}function getObject(ne){if(typeof ne=="string"){const ee=JSON.parse(ne);return ee||null}return ne!==null?ne:null}let GeoJSON$1=class extends JSONFeature{constructor(ee){ee=ee||{},super(),this.dataProjection=get$3(ee.dataProjection?ee.dataProjection:"EPSG:4326"),ee.featureProjection&&(this.defaultFeatureProjection=get$3(ee.featureProjection)),ee.featureClass&&(this.featureClass=ee.featureClass),this.geometryName_=ee.geometryName,this.extractGeometryName_=ee.extractGeometryName,this.supportedMediaTypes=["application/geo+json","application/vnd.geo+json"]}readFeatureFromObject(ee,te){let st=null;ee.type==="Feature"?st=ee:st={type:"Feature",geometry:ee,properties:null};const ot=readGeometryInternal(st.geometry);if(this.featureClass===RenderFeature)return createRenderFeature({geometry:ot,id:st.id,properties:st.properties},te);const ct=this.featureClass,ut=new ct;return this.geometryName_?ut.setGeometryName(this.geometryName_):this.extractGeometryName_&&st.geometry_name&&ut.setGeometryName(st.geometry_name),ut.setGeometry(createGeometry(ot,te)),"id"in st&&ut.setId(st.id),st.properties&&ut.setProperties(st.properties,!0),ut}readFeaturesFromObject(ee,te){const st=ee;let ot=null;if(st.type==="FeatureCollection"){const ct=ee;ot=[];const ut=ct.features;for(let dt=0,ht=ut.length;dt<ht;++dt){const ft=this.readFeatureFromObject(ut[dt],te);ft&&ot.push(ft)}}else ot=[this.readFeatureFromObject(ee,te)];return ot.flat()}readGeometryFromObject(ee,te){return readGeometry(ee,te)}readProjectionFromObject(ee){const te=ee.crs;let st;if(te)if(te.type=="name")st=get$3(te.properties.name);else if(te.type==="EPSG")st=get$3("EPSG:"+te.properties.code);else throw new Error("Unknown SRS type");else st=this.dataProjection;return st}writeFeatureObject(ee,te){te=this.adaptOptions(te);const st={type:"Feature",geometry:null,properties:null},ot=ee.getId();if(ot!==void 0&&(st.id=ot),!ee.hasProperties())return st;const ct=ee.getProperties(),ut=ee.getGeometry();return ut&&(st.geometry=writeGeometry(ut,te),delete ct[ee.getGeometryName()]),isEmpty(ct)||(st.properties=ct),st}writeFeaturesObject(ee,te){te=this.adaptOptions(te);const st=[];for(let ot=0,ct=ee.length;ot<ct;++ot)st.push(this.writeFeatureObject(ee[ot],te));return{type:"FeatureCollection",features:st}}writeGeometryObject(ee,te){return writeGeometry(ee,this.adaptOptions(te))}};function readGeometryInternal(ne,ee){if(!ne)return null;let te;switch(ne.type){case"Point":{te=readPointGeometry(ne);break}case"LineString":{te=readLineStringGeometry(ne);break}case"Polygon":{te=readPolygonGeometry(ne);break}case"MultiPoint":{te=readMultiPointGeometry(ne);break}case"MultiLineString":{te=readMultiLineStringGeometry(ne);break}case"MultiPolygon":{te=readMultiPolygonGeometry(ne);break}case"GeometryCollection":{te=readGeometryCollectionGeometry(ne);break}default:throw new Error("Unsupported GeoJSON type: "+ne.type)}return te}function readGeometry(ne,ee){const te=readGeometryInternal(ne);return createGeometry(te,ee)}function readGeometryCollectionGeometry(ne,ee){return ne.geometries.map(function(st){return readGeometryInternal(st)})}function readPointGeometry(ne){const ee=ne.coordinates;return{type:"Point",flatCoordinates:ee,layout:getLayoutForStride(ee.length)}}function readLineStringGeometry(ne){var st;const ee=ne.coordinates,te=ee.flat();return{type:"LineString",flatCoordinates:te,ends:[te.length],layout:getLayoutForStride(((st=ee[0])==null?void 0:st.length)||2)}}function readMultiLineStringGeometry(ne){var ct,ut;const ee=ne.coordinates,te=((ut=(ct=ee[0])==null?void 0:ct[0])==null?void 0:ut.length)||2,st=[],ot=deflateCoordinatesArray(st,0,ee,te);return{type:"MultiLineString",flatCoordinates:st,ends:ot,layout:getLayoutForStride(te)}}function readMultiPointGeometry(ne){var te;const ee=ne.coordinates;return{type:"MultiPoint",flatCoordinates:ee.flat(),layout:getLayoutForStride(((te=ee[0])==null?void 0:te.length)||2)}}function readMultiPolygonGeometry(ne){var ct,ut;const ee=ne.coordinates,te=[],st=((ut=(ct=ee[0])==null?void 0:ct[0])==null?void 0:ut[0].length)||2,ot=deflateMultiCoordinatesArray(te,0,ee,st);return{type:"MultiPolygon",flatCoordinates:te,ends:ot,layout:getLayoutForStride(st)}}function readPolygonGeometry(ne){var ct,ut;const ee=ne.coordinates,te=[],st=(ut=(ct=ee[0])==null?void 0:ct[0])==null?void 0:ut.length,ot=deflateCoordinatesArray(te,0,ee,st);return{type:"Polygon",flatCoordinates:te,ends:ot,layout:getLayoutForStride(st)}}function writeGeometry(ne,ee){ne=transformGeometryWithOptions(ne,!0,ee);const te=ne.getType();let st;switch(te){case"Point":{st=writePointGeometry(ne);break}case"LineString":{st=writeLineStringGeometry(ne);break}case"Polygon":{st=writePolygonGeometry(ne,ee);break}case"MultiPoint":{st=writeMultiPointGeometry(ne);break}case"MultiLineString":{st=writeMultiLineStringGeometry(ne);break}case"MultiPolygon":{st=writeMultiPolygonGeometry(ne,ee);break}case"GeometryCollection":{st=writeGeometryCollectionGeometry(ne,ee);break}
95case"Circle":{st={type:"GeometryCollection",geometries:[]};break}default:throw new Error("Unsupported geometry type: "+te)}return st}function writeGeometryCollectionGeometry(ne,ee){return ee=Object.assign({},ee),delete ee.featureProjection,{type:"GeometryCollection",geometries:ne.getGeometriesArray().map(function(st){return writeGeometry(st,ee)})}}function writeLineStringGeometry(ne,ee){return{type:"LineString",coordinates:ne.getCoordinates()}}function writeMultiLineStringGeometry(ne,ee){return{type:"MultiLineString",coordinates:ne.getCoordinates()}}function writeMultiPointGeometry(ne,ee){return{type:"MultiPoint",coordinates:ne.getCoordinates()}}function writeMultiPolygonGeometry(ne,ee){let te;return ee&&(te=ee.rightHanded),{type:"MultiPolygon",coordinates:ne.getCoordinates(te)}}function writePointGeometry(ne,ee){return{type:"Point",coordinates:ne.getCoordinates()}}function writePolygonGeometry(ne,ee){let te;return ee&&(te=ee.rightHanded),{type:"Polygon",coordinates:ne.getCoordinates(te)}}class GeoJSON extends GeoJSON$1{constructor(ee){if(super(ee),!(this instanceof GeoJSON))throw new TypeError("ERROR CLASS_CONSTRUCTOR");return this.options=ee||{},(this.options.defaultStyle===null||typeof this.options.defaultStyle>"u")&&(this.options.defaultStyle={}),this.source=null,this}readFeatures(ee,te){var st=super.readFeatures(ee,te);return typeof ee=="string"?this.source=JSON.parse(ee):ee!==null&&(this.source=ee),st.forEach(ot=>{var ct=ot.getStyleFunction();if(ct){var ut=ct.call(this,ot,0);ut&&ut.length!==0&&ot.setStyle(ut[0])}else{var dt=Styling.defineStyleFromProperties(ot);if(dt)ot.setStyle(dt);else{var ht=Styling.defineStyleFunctionByDefault(this.options.defaultStyle);ht&&(ot.setStyle(ht),Styling.definePropertiesFromStyle(ot))}}}),st}writeFeatures(ee,te){ee.forEach(function(ot){Styling.definePropertiesFromStyle(ot)});var st=this.writeFeaturesObject(ee,te);return this.options.hasOwnProperty("extensions")&&Object.assign(st,this.options.extensions),JSON.stringify(st)}readRootExtensions(ee){return this.source[ee]}}window.ol&&window.ol.format&&(window.ol.format.GeoJSONExtended=GeoJSON);class WMTS extends WMTS$1{constructor(ee){super(ee)}getFeatureInfoUrl(ee,te,st,ot){var ct=this.options&&this.options.tilePixelRatio?this.options.tilePixelRatio:1,ut=this.tileGrid,dt=this.tileGrid.getTileCoordForCoordAndResolution(ee,te),ht=function(kt,Nt,Gt){var Bt=[0,0,0],Ut=createEmpty(),Vt=kt[1],Ht=kt[2],zt=Nt.getTileCoordExtent(kt),jt=Gt.getExtent();if(jt!=null&&Gt.isGlobal()){var Wt=Math.ceil(getWidth(jt)/getWidth(zt));Vt=Vt%Wt,Bt[0]=kt[0],Bt[1]=Vt,Bt[2]=kt[2],zt=Nt.getTileCoordExtent(Bt,Ut)}return intersects$1(zt,jt)?[kt[0],Vt,Ht]:null},ft=ut.getTileCoordExtent(dt),pt=ht(dt,ut,st);if(!(ut.getResolutions().length<=dt[0])){var mt=ut.getResolution(dt[0]),yt=ut.getMatrixIds()[dt[0]],vt={SERVICE:"WMTS",VERSION:"1.0.0",REQUEST:"GetFeatureInfo",LAYER:this.getLayer(),TILECOL:pt[1],TILEROW:pt[2],TILEMATRIX:yt,TILEMATRIXSET:this.getMatrixSet(),FORMAT:this.getFormat()||"image/png",STYLE:this.getStyle()||"normal"};Helper.assign(vt,ot);var _t=Math.floor((ee[0]-ft[0])/(mt/ct)),bt=Math.floor((ft[3]-ee[1])/(mt/ct)),xt=ut.getTileSize(dt[0]);_t=Math.min(_t,(xt[0]|xt)-1),bt=Math.max(bt,0),vt.I=_t,vt.J=bt;var Mt=this.urls[0],Ot=Gp.Helper.normalyzeUrl(Mt,vt);return Ot}}}window.ol&&window.ol.source&&(window.ol.source.WMTSExtended=WMTS);var LayerUtils={getZoomLevelFromScaleDenominator:function(ne,ee){var te={};switch(ee){case"EPSG:2154":te={0:104579.224549894,1:52277.5323537905,2:26135.4870785954,3:13066.8913818,4:6533.2286041135,5:3266.5595244627,6:1633.2660045974,7:816.629554986,8:408.3139146768,9:204.1567415109,10:102.0783167832,11:51.0391448966,12:25.5195690743,13:12.7597836936,14:6.379891636,15:3.1899457653,16:1.5949728695,17:.7974864315,18:.3987432149,19:.1993716073,20:.0996858037,21:.0498429018};break;default:te={0:156543.033928041,1:78271.51696402048,2:39135.758482010235,3:19567.87924100512,4:9783.93962050256,5:4891.96981025128,6:2445.98490512564,7:1222.99245256282,8:611.49622628141,9:305.7481131407048,10:152.8740565703525,11:76.43702828517624,12:38.21851414258813,13:19.10925707129406,14:9.554628535647032,15:4.777314267823516,16:2.3886571339
9511758,17:1.194328566955879,18:.5971642834779395,19:.2985821417389697,20:.1492910708694849,21:.0746455354347424};break}var st=ne*28e-5;for(var ot in te)if(te.hasOwnProperty(ot)&&te[ot]<=st)return ot=parseInt(ot,10),ot;return 0},getAttributions:function(ne){var ee=ne.zoom,te=[];if(ne.originators!=null&&ne.visibility)for(var st,ot=0,ct=ne.originators.length;ot<ct;ot++){st=!0;for(var ut=ne.originators[ot],dt=ne.originators[ot].constraints||[],ht=0,ft=dt.length;ht<ft;ht++){var pt=dt[ht];st=!0;var mt=this.getZoomLevelFromScaleDenominator(pt.maxScaleDenominator,ne.crs),yt=this.getZoomLevelFromScaleDenominator(pt.minScaleDenominator,ne.crs)||21;mt&&mt>ee&&(st=!1),st&&yt&&yt<ee&&(st=!1);var vt=pt.bbox;if(st&&vt){st=!1;var _t=ne.extent;if(_t){var bt=[vt.top,vt.left,vt.bottom,vt.right];if(this.intersects(_t,bt)){st=!0;break}}}}if(st){var xt=ut.logo,Mt=ut.url,Ot=ut.name?ut.name:"",kt=ut.attribution,Nt=document.createElement("div");Nt.className="gp-control-attribution";var Gt=null;Gt=document.createElement("a"),Gt.className="gp-control-attribution-link",Gt.target="_blank",Nt.appendChild(Gt),Mt&&(Gt.href=Mt);var Bt=!!xt,Ut=null;Bt?(Ut=document.createElement("img"),Gt?(Ut.className="gp-control-attribution-image",Gt.appendChild(Ut)):(Ut.className="",Nt.appendChild(Ut)),Ut.src=xt,Ut.title=kt||Ot,Ut.style.height="30px",Ut.style.width="30px"):Ot?Gt.textContent=Ot:kt?Gt.textContent=kt:
95Mt?Gt.textContent=Mt:Gt.textContent="",te.push(Nt.innerHTML+" ")}}return te},intersects:function(ne,ee){var te=ne[1]<=ee[3]&&ee[1]<=ne[3],st=ne[2]<=ee[0]&&ee[2]<=ne[0];return te&&st}},Config={configuration:{},isConfigLoaded:function(){if(this.configuration&&Object.keys(this.configuration).length!==0)return!0;var ne=typeof window<"u"?window:typeof self<"u"?self:typeof global<"u"?global:{};return ne.Gp&&ne.Gp.Config&&ne.Gp.Config.layers&&Object.keys(ne.Gp.Config.layers).length!==0?(this.configuration=ne.Gp.Config,!0):!1}};LoggerByDefault.getLogger("sourcewmts");class SourceWMTS extends WMTS{constructor(ee){if(!ee.layer)throw new Error("ERROR PARAM_MISSING : layer");if(typeof ee.layer!="string")throw new Error("ERROR WRONG TYPE : layer");typeof ee.ssl>"u"&&(ee.ssl=!0);var te=ee.configuration,st=te?te.params:null,ot=ee.apiKey;if(!te){if(!Config.isConfigLoaded())throw new Error("ERROR : contract key configuration has to be loaded to load Geoportal layers.");var ct=Config.configuration.getLayerId(ee.layer,"WMTS");if(!ct)throw new Error(`ERROR : WMTS Layer ID ${ee.layer} cannot be found in Geoportal Configuration. Make sure that this resource is included in your contract key.`);if(te=Config.configuration.getLayerConf(ct),!te)throw new Error("ERROR : WMTS Layer configuration cannot be found in Geoportal.");ot=Config.configuration.getLayerKey(ct)[0],st=Config.configuration.getLayerParams(ee.layer,"WMTS")}var ut=ee.ssl===!1?"http://":"https://",dt={"gp-ol-ext":Pkg$1.olExtVersion||Pkg$1.version};if(st.url.includes("/private/")){var ht=ee.apiKey||ot;if(!ht)throw new Error("ERROR : WMS Layer apiKey cannot be found in Geoportal Configuration.");dt.apikey=ht}var ft={url:Gp.Helper.normalyzeUrl(st.url.replace(/(http|https):\/\//,ut),dt,!1),version:st.version,style:st.styles,format:st.format,projection:st.projection,maxZoom:LayerUtils.getZoomLevelFromScaleDenominator(st.minScale),layer:ee.layer,matrixSet:st.TMSLink,tileGrid:new WMTSTileGrid({resolutions:st.nativeResolutions,matrixIds:st.matrixIds,origin:[Object.values(st.tileMatrices)[0].topLeftCorner.x,Object.values(st.tileMatrices)[0].topLeftCorner.y]}),crossOrigin:"anonymous"};return Helper.mergeParams(ft,ee.olParams),ee.olParams&&!st.originators&&(st.originators=ee.olParams.attributions),super(ft),this._originators=st.originators,this._legends=ee.legends||te.legends,this._metadata=ee.metadata||te.metadata||te.metadata_urls,this._description=ee.description||te.description,this._title=ee.title||te.title,this._quicklookUrl=ee.quicklookUrl||te.quicklookUrl,this._thumbnail=ee.thumbnail||te.thumbnail,this._producer=ee.producer||te.producer,this.name=ee.layer,this.service="WMTS",this}}window.ol&&window.ol.source&&(window.ol.source.GeoportalWMTS=SourceWMTS);LoggerByDefault.getLogger("sourcewms");class SourceWMS extends TileWMS{constructor(ee){if(!ee.layer)throw new Error("ERROR PARAM_MISSING : layer");if(typeof ee.layer!="string")throw new Error("ERROR WRONG TYPE : layer");typeof ee.ssl>"u"&&(ee.ssl=!0);var te=ee.configuration,st=te?te.params:null,ot=ee.apiKey;if(!te){if(!Config.isConfigLoaded())throw new Error("ERROR : contract key configuration has to be loaded to load Geoportal layers.");var ct=Config.configuration.getLayerId(ee.layer,"WMS");if(!ct)throw new Error(`ERROR : WMS Layer ID ${ee.layer} cannot be found in Geoportal Configuration. Make sure that this resource is included in your contract key.`);if(te=Config.configuration.getLayerConf(ct),!te)throw new Error("ERROR : WMS Layer configuration cannot be found in Geoportal.");ot=Config.configuration.getLayerKey(ct)[0],st=Config.configuration.getLayerParams(ee.layer,"WMS")}var ut=ee.ssl===!1?"http://":"https://",dt={"gp-ol-ext":Pkg$1.olExtVersion||Pkg$1.version};if(st.url.includes("/private/")){var ht=ee.apiKey||ot;if(!ht)throw new Error("ERROR : WMS Layer apiKey cannot be found in Geoportal Configuration.");dt.apikey=ht}var ft={url:Gp.Helper.normalyzeUrl(st.url.replace(/(http|https):\/\//,ut),dt,!1),params:{SERVICE:"WMS",LAYERS:ee.layer,VERSION:st.version,STYLES:st.styles,FORMAT:st.format},crossOrigin:"anonymous"};
95return Helper.mergeParams(ft,ee.olParams),ee.olParams&&!st.originators&&(st.originators=ee.olParams.attributions),super(ft),this._originators=st.originators,this._legends=ee.legends||te.legends,this._metadata=ee.metadata||te.metadata||te.metadata_urls,this._title=ee.title||te.title,this._description=ee.description||te.description,this._quicklookUrl=ee.quicklookUrl||te.quicklookUrl,this._thumbnail=ee.thumbnail||te.thumbnail,this._producer=ee.producer||te.producer,this.name=ee.layer,this.service="WMS",this}}window.ol&&window.ol.source&&(window.ol.source.GeoportalWMS=SourceWMS);LoggerByDefault.getLogger("sourcewfs");class SourceWFS extends VectorSource{constructor(ee){if(!ee.layer)throw new Error("ERROR PARAM_MISSING : layer");if(typeof ee.layer!="string")throw new Error("ERROR WRONG TYPE : layer");typeof ee.ssl>"u"&&(ee.ssl=!0);var te=ee.configuration,st=te?te.params:null,ot=ee.apiKey;if(!te){if(!Config.isConfigLoaded())throw new Error("ERROR : contract key configuration has to be loaded to load Geoportal layers.");var ct=Config.configuration.getLayerId(ee.layer,"WFS");if(!ct)throw new Error(`ERROR : WFS Layer ID ${ee.layer} cannot be found in Geoportal Configuration. Make sure that this resource is included in your contract key.`);if(te=Config.configuration.getLayerConf(ct),!te)throw new Error("ERROR : WFS Layer configuration cannot be found in Geoportal.");ot=Config.configuration.getLayerKey(ct)[0],st=Config.configuration.getLayerParams(ee.layer,"WFS")}var ut=ee.ssl===!1?"http://":"https://",dt={"gp-ol-ext":Pkg$1.olExtVersion||Pkg$1.version};if(st.url.includes("/private/")){var ht=ee.apiKey||ot;if(!ht)throw new Error("ERROR : WFS Layer apiKey cannot be found in Geoportal Configuration.");dt.apikey=ht}var ft=(mt,yt,vt,_t,bt)=>{const xt=new XMLHttpRequest;xt.open("GET",yt);const Mt=function(){mt.removeLoadedExtent(vt),bt()};xt.onerror=Mt,xt.onload=function(){if(xt.status==200){var Ot=JSON.parse(xt.responseText);const kt=mt.getFormat().readFeatures(Ot);if(mt.addFeatures(kt),_t(kt),Ot.links)for(let Nt=0;Nt<Ot.links.length;Nt++){const Gt=Ot.links[Nt];Gt.rel==="next"&&ft(mt,Gt.href,vt,_t,bt)}}else Mt()},xt.send()},pt={format:new GeoJSON$1,loader:function(mt,yt,vt,_t,bt){var xt=this;const Mt=ee.maxFeatures,Ot=ee.layer,kt=vt.getCode(),Nt=Gp.Helper.normalyzeUrl(st.url.replace(/(http|https):\/\//,ut),dt,!1)+"&SERVICE=WFS&VERSION=2.0.0&REQUEST=GetFeature&typename="+Ot+"&outputFormat=application/json&srsname="+kt+"&bbox="+mt.join(",")+","+kt+"&maxFeatures="+Mt+"&count="+Mt+"&startIndex=0";ft(xt,Nt,mt,_t,bt)},strategy:tile(createXYZ({minZoom:ee.olParams.minZoom||15,maxZoom:ee.olParams.maxZoom||21,tileSize:512})),crossOrigin:"anonymous"};return Helper.mergeParams(pt,ee.olParams),ee.olParams&&!st.originators&&(st.originators=ee.olParams.attributions),super(pt),this._originators=st.originators,this._legends=ee.legends||te.legends,this._metadata=ee.metadata||te.metadata||te.metadata_urls,this._title=ee.title||te.title,this._description=ee.description||te.description,this._quicklookUrl=ee.quicklookUrl||te.quicklookUrl,this._thumbnail=ee.thumbnail||te.thumbnail,this._producer=ee.producer||te.producer,this.name=ee.layer,this.service="WFS",this}}window.ol&&window.ol.source&&(window.ol.source.GeoportalWFS=SourceWFS);function asImageLike(ne){return ne instanceof Image||ne instanceof HTMLCanvasElement||ne instanceof HTMLVideoElement||ne instanceof ImageBitmap?ne:null}const disposedError=new Error("disposed"),defaultSize=[256,256];class DataTile extends Tile{constructor(ee){const te=TileState.IDLE;super(ee.tileCoord,te,{transition:ee.transition,interpolate:ee.interpolate}),this.loader_=ee.loader,this.data_=null,this.error_=null,this.size_=ee.size||null,this.controller_=ee.controller||null}getSize(){if(this.size_)return this.size_;const ee=asImageLike(this.data_);return ee?[ee.width,ee.height]:defaultSize}getData(){return this.data_}getError(){return this.error_}load(){if(this.state!==TileState.IDLE&&this.state!==TileState.ERROR)return;this.state=TileState.LOADING,this.changed();const ee=this;this.loader_().then(function(te){ee.data_=te,ee.state=TileState.LOADED,ee.changed()}).catch(function(te){ee.error_=te,ee.state=TileState.ERROR,ee.changed()})}disposeInternal(){this.controller_&&(this.controller_.abort(disposedError),this.controller_=null),super.disposeInternal()}}class LRUCache{constructor(ee){this.highWaterMark=ee!==void 0?ee:2048,this.count_=0,this.entries_={},this.oldest_=null,this.newest_=null}deleteOldest(){const ee=this.pop();ee instanceof Disposable&&ee.dispose()}canExpireCache(){return this.highWaterMark>0&&this.getCount()>this.highWaterMark}expireCache(ee){for(;this.canExpireCache();)this.deleteOldest()}clear(){for(;this.oldest_;)this.deleteOldest()}containsKey(ee){return this.entries_.hasOwnProperty(ee)}forEach(ee){let te=this.oldest_;for(;te;)ee(te.value_,te.key_,this),te=te.newer}get(ee,te){const st=this.entries_[ee];return assert(st!==void 0,"Tried to get a value for a key that does not exist in the cache"),st===this.newest_||(st===this.oldest_?(this.oldest_=this.oldest_.newer,this.oldest_.older=null):(st.newer.older=st.older,st.older.newer=st.newer),st.newer=null,st.older=this.newest_,this.newest_.newer=st,this.newest_=st),st.value_}remove(ee){const te=this.entries_[ee];return assert(te!==void 0,"Tried to get a value for a key that does not exist in the cache"),te===this.newest_?(this.newest_=te.older,this.newest_&&(this.newest_.newer=null)):te===this.oldest_?(this.oldest_=te.newer,this.oldest_&&(this.oldest_.older=null)):(te.newer.older=te.older,te.older.newer=te.newer),delete this.entries_[ee],--this.count_,te.value_}getCount(){return this.count_}getKeys(){const ee=new Array(this.count_);let te=0,st;for(st=this.newest_;st;st=st.older)ee[te++]=st.key_;return ee}getValues(){const ee=new Array(this.count_);let te=0,st;for(st=this.newest_;st;st=st.older)ee[te++]=st.value_;return ee}peekLast(){return this.oldest_.value_}peekLastKey(){return this.oldest_.key_}peekFirstKey(){return this.newest_.key_}peek(ee){var te;return(te=this.entries_[ee])==null?void 0:te.value_}pop(){const ee=this.oldest_;return delete this.entries_[ee.key_],ee.newer&&(ee.newer.older=null),this.oldest_=ee.newer,this.oldest_||(this.newest_=null),--this.count_,ee.value_}replace(ee,te){this.get(ee),this.entries_[ee].value_=te}set(ee,te){assert(!(ee in this.entries_),"Tried to set a value for a key that is used already");const st={key_:ee,newer:null,older:this.newest_,value_:te};this.newest_?this.newest_.newer=st:this.oldest_=st,this.newest_=st,this.entries_[ee]=st,++this.count_}setSize(ee){this.highWaterMark=ee}}function addTileToLookup(ne,ee,te){if(!(te in ne))return ne[te]=new Set([ee]),!0;const st=ne[te],ot=st.has(ee);return ot||st.add(ee),!ot}function removeTileFromLookup(ne,ee,te){const st=ne[te];return st?st.delete(ee):!1}function getRenderExtent(ne,ee){const te=ne.layerStatesArray[ne.layerIndex];te.extent&&(ee=getIntersection(ee,fromUserExtent(te.extent,ne.viewState.projection)));const st=te.layer.getRenderSource();if(!st.getWrapX()){const ot=st.getTileGridForProjection(ne.viewState.projection).getExtent();ot&&(ee=getIntersection(ee,ot))}return ee}class CanvasTileLayerRenderer extends CanvasLayerRenderer{constructor(ee,te){super(ee),te=te||{},this.extentChanged=!0,this.renderComplete=!1,this.renderedExtent_=null,this.renderedPixelRatio,this.renderedProjection=null,this.renderedTiles=[],this.renderedSourceRevision_,this.tempExtent=createEmpty(),this.tempTileRange_=new TileRange(0,0,0,0),this.tempTileCoord_=createOrUpdate(0,0,0);const st=te.cacheSize!==void 0?te.cacheSize:512;this.tileCache_=new LRUCache(st),this.sourceTileCache_=null,this.layerExtent=null,this.maxStaleKeys=st*.5}getTileCache(){return this.tileCache_}getSourceTileCache(){return this.sourceTileCache_||(this.sourceTileCache_=new LRUCache(512)),this.sourceTileCache_}getOrCreateTile(ee,te,st,ot){const ct=this.tileCache_,dt=this.getLayer().getSource(),ht=getCacheKey$1(dt,dt.getKey(),ee,te,st);let ft;if(ct.containsKey(ht))ft=ct.get(ht);else{const pt=ot.viewState.projection,mt=dt.getProjection();if(ft=dt.getTile(ee,te,st,ot.pixelRatio,pt,!mt||equivalent$1(mt,pt)?void 0:this.getSourceTileCache()),!ft)return null;ct.set(ht,ft)}return ft}getTile(ee,te,st,ot){const ct=this.getOrCreateTile(ee,te,st,ot);return ct||null}getData(ee){const te=this.frameState;if(!te)return null;
95const st=this.getLayer(),ot=apply$1(te.pixelToCoordinateTransform,ee.slice()),ct=st.getExtent();if(ct&&!containsCoordinate(ct,ot))return null;const ut=te.viewState,dt=st.getRenderSource(),ht=dt.getTileGridForProjection(ut.projection),ft=dt.getTilePixelRatio(te.pixelRatio);for(let pt=ht.getZForResolution(ut.resolution);pt>=ht.getMinZoom();--pt){const mt=ht.getTileCoordForCoordAndZ(ot,pt),yt=this.getTile(pt,mt[1],mt[2],te);if(!yt||yt.getState()!==TileState.LOADED)continue;const vt=ht.getOrigin(pt),_t=toSize(ht.getTileSize(pt)),bt=ht.getResolution(pt);let xt;if(yt instanceof ImageTile||yt instanceof ReprojTile)xt=yt.getImage();else if(yt instanceof DataTile){if(xt=asImageLike(yt.getData()),!xt)continue}else continue;const Mt=Math.floor(ft*((ot[0]-vt[0])/bt-mt[1]*_t[0])),Ot=Math.floor(ft*((vt[1]-ot[1])/bt-mt[2]*_t[1])),kt=Math.round(ft*dt.getGutterForProjection(ut.projection));return this.getImageData(xt,Mt+kt,Ot+kt)}return null}prepareFrame(ee){var ot;this.renderedProjection?ee.viewState.projection!==this.renderedProjection&&(this.tileCache_.clear(),this.renderedProjection=ee.viewState.projection):this.renderedProjection=ee.viewState.projection;const te=this.getLayer().getSource();if(!te)return!1;const st=te.getRevision();return this.renderedSourceRevision_?this.renderedSourceRevision_!==st&&(this.renderedSourceRevision_=st,this.renderedSourceKey_===te.getKey()&&(this.tileCache_.clear(),(ot=this.sourceTileCache_)==null||ot.clear())):this.renderedSourceRevision_=st,!0}enqueueTilesForNextExtent(){return!0}enqueueTiles(ee,te,st,ot,ct){const ut=ee.viewState,dt=this.getLayer(),ht=dt.getRenderSource(),ft=ht.getTileGridForProjection(ut.projection),pt=getUid(ht);pt in ee.wantedTiles||(ee.wantedTiles[pt]={});const mt=ee.wantedTiles[pt],yt=dt.getMapInternal(),vt=Math.max(st-ct,ft.getMinZoom(),ft.getZForResolution(Math.min(dt.getMaxResolution(),yt?yt.getView().getResolutionForZoom(Math.max(dt.getMinZoom(),0)):ft.getResolution(0)),ht.zDirection)),_t=ut.rotation,bt=_t?getRotatedViewport(ut.center,ut.resolution,_t,ee.size):void 0;for(let xt=st;xt>=vt;--xt){const Mt=ft.getTileRangeForExtentAndZ(te,xt,this.tempTileRange_),Ot=ft.getResolution(xt);for(let kt=Mt.minX;kt<=Mt.maxX;++kt)for(let Nt=Mt.minY;Nt<=Mt.maxY;++Nt){if(_t&&!ft.tileCoordIntersectsViewport([xt,kt,Nt],bt))continue;const Gt=this.getTile(xt,kt,Nt,ee);if(!Gt||!addTileToLookup(ot,Gt,xt))continue;const Ut=Gt.getKey();if(mt[Ut]=!0,Gt.getState()===TileState.IDLE&&!ee.tileQueue.isKeyQueued(Ut)){const Vt=createOrUpdate(xt,kt,Nt,this.tempTileCoord_);ee.tileQueue.enqueue([Gt,pt,ft.getTileCoordCenter(Vt),Ot])}}}}findStaleTile_(ee,te){const st=this.tileCache_,ot=ee[0],ct=ee[1],ut=ee[2],dt=this.getStaleKeys();for(let ht=0;ht<dt.length;++ht){const ft=getCacheKey$1(this.getLayer().getSource(),dt[ht],ot,ct,ut);if(st.containsKey(ft)){const pt=st.peek(ft);if(pt.getState()===TileState.LOADED)return pt.endTransition(getUid(this)),addTileToLookup(te,pt,ot),!0}}return!1}findAltTiles_(ee,te,st,ot){const ct=ee.getTileRangeForTileCoordAndZ(te,st,this.tempTileRange_);if(!ct)return!1;let ut=!0;const dt=this.tileCache_,ht=this.getLayer().getRenderSource(),ft=ht.getKey();for(let pt=ct.minX;pt<=ct.maxX;++pt)for(let mt=ct.minY;mt<=ct.maxY;++mt){const yt=getCacheKey$1(ht,ft,st,pt,mt);let vt=!1;if(dt.containsKey(yt)){const _t=dt.peek(yt);_t.getState()===TileState.LOADED&&(addTileToLookup(ot,_t,st),vt=!0)}vt||(ut=!1)}return ut}renderFrame(ee,te){this.renderComplete=!0;const st=ee.layerStatesArray[ee.layerIndex],ot=ee.viewState,ct=ot.projection,ut=ot.resolution,dt=ot.center,ht=ee.pixelRatio,ft=this.getLayer(),pt=ft.getSource(),mt=pt.getTileGridForProjection(ct),yt=mt.getZForResolution(ut,pt.zDirection),vt=mt.getResolution(yt);this.updateStaleKeys(pt.getKey());let _t=ee.extent;const bt=pt.getTilePixelRatio(ht);this.prepareContainer(ee,te);const xt=this.context.canvas.width,Mt=this.context.canvas.height;this.layerExtent=st.extent?fromUserExtent(st.extent):null,this.layerExtent&&(_t=getIntersection(_t,this.layerExtent));const Ot=vt*xt/2/bt,kt=vt*Mt/2/bt,Nt=[dt[0]-Ot,dt[1]-kt,dt[0]+Ot,dt[1]+kt],Gt={};this.renderedTiles.length=0;const Bt=ft.getPreload();
95if(ee.nextExtent&&this.enqueueTilesForNextExtent()){const ai=mt.getZForResolution(ot.nextResolution,pt.zDirection),xn=getRenderExtent(ee,ee.nextExtent);this.enqueueTiles(ee,xn,ai,Gt,Bt)}const Ut=getRenderExtent(ee,_t);if(this.enqueueTiles(ee,Ut,yt,Gt,0),Bt>0&&setTimeout(()=>{this.enqueueTiles(ee,Ut,yt-1,Gt,Bt-1)},0),!(yt in Gt))return this.container;const Vt=getUid(this),Ht=ee.time;for(const ai of Gt[yt]){const xn=ai.getState();if(xn===TileState.EMPTY)continue;const An=ai.tileCoord;if(xn===TileState.LOADED&&ai.getAlpha(Vt,Ht)===1){ai.endTransition(Vt);continue}if(xn!==TileState.ERROR&&(this.renderComplete=!1),this.findStaleTile_(An,Gt)){removeTileFromLookup(Gt,ai,yt),ee.animate=!0;continue}if(this.findAltTiles_(mt,An,yt+1,Gt))continue;const Zt=mt.getMinZoom();for(let Kt=yt-1;Kt>=Zt&&!this.findAltTiles_(mt,An,Kt,Gt);--Kt);}const zt=vt/ut*ht/bt,jt=this.getRenderContext(ee);compose(this.tempTransform,xt/2,Mt/2,zt,zt,0,-xt/2,-Mt/2),this.layerExtent&&this.clipUnrotated(jt,ee,this.layerExtent),pt.getInterpolate()||(jt.imageSmoothingEnabled=!1),this.preRender(jt,ee);const Wt=Object.keys(Gt).map(Number);Wt.sort(ascending);const Jt=[],Qt=[],oi=[];for(let ai=Wt.length-1;ai>=0;--ai){const xn=Wt[ai],An=pt.getTilePixelSize(xn,ht,ct),Xt=mt.getResolution(xn)/vt,Zt=An[0]*Xt*zt,Kt=An[1]*Xt*zt,ti=mt.getTileCoordForCoordAndZ(getTopLeft(Nt),xn),qt=mt.getTileCoordExtent(ti),ii=apply$1(this.tempTransform,[bt*(qt[0]-Nt[0])/vt,bt*(Nt[3]-qt[3])/vt]),wn=bt*pt.getGutterForProjection(ct);for(const ni of Gt[xn]){if(ni.getState()!==TileState.LOADED)continue;const Cn=ni.tileCoord,Ln=ti[1]-Cn[1],Un=Math.round(ii[0]-(Ln-1)*Zt),Pn=ti[2]-Cn[2],Mn=Math.round(ii[1]-(Pn-1)*Kt),Yt=Math.round(ii[0]-Ln*Zt),ri=Math.round(ii[1]-Pn*Kt),Sn=Un-Yt,On=Mn-ri,Rn=xn===yt;if(Rn&&ni.inTransition(Vt)){oi.push({tile:ni,x:Yt,y:ri,w:Sn,h:On,gutter:wn}),this.renderedTiles.unshift(ni),this.updateUsedTiles(ee.usedTiles,pt,ni);continue}const Bn=[Yt,ri,Yt+Sn,ri+On],Vn=[];for(let Gn=0,Hn=Jt.length;Gn<Hn;++Gn)xn<Qt[Gn]&&intersects$1(Bn,Jt[Gn])&&Vn.push(Jt[Gn]);let Wn;Vn.length>0&&(Wn=subtractExtents(Bn,Vn)),Jt.push(Bn),Qt.push(xn),this.drawTile(ni,ee,Yt,ri,Sn,On,wn,Rn,Wn),this.renderedTiles.unshift(ni),this.updateUsedTiles(ee.usedTiles,pt,ni)}}for(let ai=0,xn=oi.length;ai<xn;++ai){const{tile:An,x:Nn,y:Xt,w:Zt,h:Kt,gutter:ti}=oi[ai];this.drawTile(An,ee,Nn,Xt,Zt,Kt,ti,!0,void 0)}if(this.renderedResolution=vt,this.extentChanged=!this.renderedExtent_||!equals$2(this.renderedExtent_,Nt),this.renderedExtent_=Nt,this.renderedPixelRatio=ht,this.postRender(this.context,ee),this.layerExtent&&jt.restore(),jt.imageSmoothingEnabled=!0,this.renderComplete){const ai=(xn,An)=>{var Kt;const Nn=getUid(pt),Xt=An.wantedTiles[Nn],Zt=Xt?Object.keys(Xt).length:0;this.updateCacheSize(Zt),this.tileCache_.expireCache(),(Kt=this.sourceTileCache_)==null||Kt.expireCache()};ee.postRenderFunctions.push(ai)}return this.container}updateCacheSize(ee){this.tileCache_.highWaterMark=Math.max(this.tileCache_.highWaterMark,ee*2)}drawTile(ee,te,st,ot,ct,ut,dt,ht,ft){let pt;if(ee instanceof DataTile){if(pt=asImageLike(ee.getData()),!pt)throw new Error("Rendering array data is not yet supported")}else pt=this.getTileImage(ee);if(!pt)return;const mt=this.getRenderContext(te),yt=getUid(this),vt=te.layerStatesArray[te.layerIndex],_t=vt.opacity*(ht?ee.getAlpha(yt,te.time):1),bt=_t!==mt.globalAlpha;bt&&(mt.save(),mt.globalAlpha=_t);const xt=pt.width-2*dt,Mt=pt.height-2*dt;if(ft){const Ot=xt/ct,kt=Mt/ut;for(let Nt=0,Gt=ft.length;Nt<Gt;++Nt){const Bt=ft[Nt],Ut=Bt[0],Vt=Bt[1],Ht=Bt[2]-Bt[0],zt=Bt[3]-Bt[1];mt.drawImage(pt,dt+(Ut-st)*Ot,dt+(Vt-ot)*kt,Ht*Ot,zt*kt,Ut,Vt,Ht,zt)}}else mt.drawImage(pt,dt,dt,xt,Mt,st,ot,ct,ut);bt&&mt.restore(),_t!==vt.opacity?te.animate=!0:ht&&ee.endTransition(yt)}getImage(){const ee=this.context;return ee?ee.canvas:null}getTileImage(ee){return ee.getImage()}updateUsedTiles(ee,te,st){const ot=getUid(te);ot in ee||(ee[ot]={}),ee[ot][st.getKey()]=!0}}const TileProperty={PRELOAD:"preload",USE_INTERIM_TILES_ON_ERROR:"useInterimTilesOnError"};class BaseTileLayer extends Layer$1{constructor(ee){ee=ee||{};const te=Object.assign({},ee),st=ee.cacheSize;delete ee.cacheSize,delete te.preload,delete te.useInterimTilesOnError,super(te),this.on,this.once,this.un,this.cacheSize_=st,this.setPreload(ee.preload!==void 0?ee.preload:0),this.setUseInterimTilesOnError(ee.useInterimTilesOnError!==void 0?ee.useInterimTilesOnError:!0)}getCacheSize(){return this.cacheSize_}getPreload(){return this.get(TileProperty.PRELOAD)}setPreload(ee){this.set(TileProperty.PRELOAD,ee)}getUseInterimTilesOnError(){return this.get(TileProperty.USE_INTERIM_TILES_ON_ERROR)}setUseInterimTilesOnError(ee){this.set(TileProperty.USE_INTERIM_TILES_ON_ERROR,ee)}getData(ee){return super.getData(ee)}}class TileLayer extends BaseTileLayer{constructor(ee){super(ee)}createRenderer(){return new CanvasTileLayerRenderer(this,{cacheSize:this.getCacheSize()})}}class LayerWMTS extends TileLayer{constructor(ee){if(!ee.layer)throw new Error("ERROR PARAM_MISSING : layer");if(typeof ee.layer!="string")throw new Error("ERROR WRONG TYPE : layer");typeof ee.ssl>"u"&&(ee.ssl=!0),typeof ee.noConstraint>"u"&&(ee.noConstraint=!1);var te=ee.configuration;if(!te){if(!Config.isConfigLoaded())throw new Error("ERROR : contract key configuration has to be loaded to load Geoportal layers.");var st=Config.configuration.getLayerId(ee.layer,"WMTS");if(te=Config.configuration.getLayerConf(st),!te)throw new Error("ERROR : Layer ID not found into the catalogue !?")}var ot;ee.olParams&&ee.olParams.sourceParams&&(ot=ee.olParams.sourceParams);var ct=new SourceWMTS({layer:ee.layer,configuration:ee.configuration,ssl:ee.ssl,apiKey:ee.apiKey,olParams:ot}),ut={source:ct};if(ct.getLayer()!==void 0&&te.globalConstraint){var dt=[te.globalConstraint.bbox.left,te.globalConstraint.bbox.bottom,te.globalConstraint.bbox.right,te.globalConstraint.bbox.top];ut.extent=transformExtent(dt,"EPSG:4326",te.globalConstraint.projection||"EPSG:3857");var ht;
95typeof te.globalConstraint.projection=="string"?ht=get$3(te.globalConstraint.projection):ht=get$3("EPSG:3857"),ee.noConstraint!==!0&&te.globalConstraint.noConstraint!==!0&&ht&&ht.getUnits()&&(ht.getUnits()==="m"?(ut.minResolution=(te.globalConstraint.minScaleDenominator-1)*28e-5,ut.maxResolution=(te.globalConstraint.maxScaleDenominator+1)*28e-5):ht.getUnits()==="degrees"&&(ut.minResolution=(te.globalConstraint.minScaleDenominator-1)*28e-5*180/(Math.PI*6378137),ut.maxResolution=(te.globalConstraint.maxScaleDenominator+1)*28e-5*180/(Math.PI*6378137)))}return Helper.mergeParams(ut,ee.olParams),super(ut),this.name=ee.layer,this.service="WMTS",this.config=te,this}getConfiguration(){return this.config}getLegends(){return this.getSource()._legends}getMetadata(){return this.getSource()._metadata}getDescription(){return this.getSource()._description}getTitle(){return this.getSource()._title}getQuicklookUrl(){return this.getSource()._quicklookUrl}getOriginators(){return this.getSource()._originators}getThumbnailUrl(){return this.getSource()._thumbnail}getProducer(){return this.getSource()._producer}}window.ol&&window.ol.layer&&(window.ol.layer.GeoportalWMTS=LayerWMTS);class LayerWMS extends TileLayer{constructor(ee){if(!ee.layer)throw new Error("ERROR PARAM_MISSING : layer");if(typeof ee.layer!="string")throw new Error("ERROR WRONG TYPE : layer");typeof ee.ssl>"u"&&(ee.ssl=!0),typeof ee.noConstraint>"u"&&(ee.noConstraint=!1);var te=ee.configuration;if(!te){if(!Config.isConfigLoaded())throw new Error("ERROR : contract key configuration has to be loaded to load Geoportal layers.");var st=Config.configuration.getLayerId(ee.layer,"WMS");if(te=Config.configuration.getLayerConf(st),!te)throw new Error("ERROR : Layer ID not found into the catalogue !?")}var ot;ee.olParams&&ee.olParams.sourceParams&&(ot=ee.olParams.sourceParams);var ct=new SourceWMS({layer:ee.layer,configuration:ee.configuration,ssl:ee.ssl,apiKey:ee.apiKey,olParams:ot}),ut={source:ct};if(ct.getParams().LAYERS!==void 0&&ot&&ot.projection){var dt=[te.globalConstraint.bbox.left,te.globalConstraint.bbox.bottom,te.globalConstraint.bbox.right,te.globalConstraint.bbox.top];ut.extent=transformExtent(dt,"EPSG:4326",ot.projection);var ht;typeof ot.projection=="string"?ht=get$3(ot.projection):typeof ot.projection=="object"&&ot.projection.getCode()&&(ht=get$3(ot.projection.getCode())),ee.noConstraint!==!0&&te.globalConstraint.noConstraint!==!0&&ht&&ht.getUnits()&&(ht.getUnits()==="m"?(ut.minResolution=(te.globalConstraint.minScaleDenominator-1)*28e-5,ut.maxResolution=(te.globalConstraint.maxScaleDenominator+1)*28e-5):ht.getUnits()==="degrees"&&(ut.minResolution=(te.globalConstraint.minScaleDenominator-1)*28e-5*180/(Math.PI*6378137),ut.maxResolution=(te.globalConstraint.maxScaleDenominator+1)*28e-5*180/(Math.PI*6378137)))}return Helper.mergeParams(ut,ee.olParams),super(ut),this.name=ee.layer,this.service="WMS",this.config=te,this}getConfiguration(){return this.config}getLegends(){return this.getSource()._legends}getMetadata(){return this.getSource()._metadata}getDescription(){return this.getSource()._description}getTitle(){return this.getSource()._title}getQuicklookUrl(){return this.getSource()._quicklookUrl}getOriginators(){return this.getSource()._originators}getThumbnailUrl(){return this.getSource()._thumbnail}getProducer(){return this.getSource()._producer}}window.ol&&window.ol.layer&&(window.ol.layer.GeoportalWMS=LayerWMS);const MAXFEATURES=500,MINZOOMDEFAULT=15,MAXZOOMDEFAULT=21,STYLEBYDEFAULT=new Style$1({stroke:new Stroke({color:"rgba(0, 0, 255, 1.0)",width:2}),fill:new Fill({color:"rgba(0, 0, 255, 0.5)"})});class LayerWFS extends VectorLayer{constructor(ee){if(!ee.layer)throw new Error("ERROR PARAM_MISSING : layer");if(typeof ee.layer!="string")throw new Error("ERROR WRONG TYPE : layer");typeof ee.ssl>"u"&&(ee.ssl=!0);var te=ee.configuration;if(!te){if(!Config.isConfigLoaded())throw new Error("ERROR : contract key configuration has to be loaded to load Geoportal layers.");var st=Config.configuration.getLayerId(ee.layer,"WFS");if(te=Config.configuration.getLayerConf(st),!te)throw new Error("ERROR : Layer ID not found into the catalogue !?")}var ot;ee.olParams&&ee.olParams.sourceParams&&(ot=ee.olParams.sourceParams);var ct=new SourceWFS({layer:ee.layer,configuration:ee.configuration,maxFeatures:ee.maxFeatures||MAXFEATURES,ssl:ee.ssl,apiKey:ee.apiKey,olParams:ot||{minZoom:MINZOOMDEFAULT,maxZoom:MAXZOOMDEFAULT}}),ut={source:ct};
95return ee.olParams?Helper.mergeParams({minZoom:MINZOOMDEFAULT,maxZoom:MAXZOOMDEFAULT,style:STYLEBYDEFAULT},ee.olParams):ee.olParams={minZoom:MINZOOMDEFAULT,maxZoom:MAXZOOMDEFAULT,style:STYLEBYDEFAULT},Helper.mergeParams(ut,ee.olParams),super(ut),this.name=ee.layer,this.service="WFS",this.config=te,this}getConfiguration(){return this.config}getLegends(){return this.getSource()._legends}getMetadata(){return this.getSource()._metadata}getDescription(){return this.getSource()._description}getTitle(){return this.getSource()._title}getQuicklookUrl(){return this.getSource()._quicklookUrl}getOriginators(){return this.getSource()._originators}getThumbnailUrl(){return this.getSource()._thumbnail}getProducer(){return this.getSource()._producer}}window.ol&&window.ol.layer&&(window.ol.layer.GeoportalWFS=LayerWFS);const IMAGE_REPLAYS={image:["Polygon","Circle","LineString","Image","Text"],hybrid:["Polygon","LineString"],vector:[]},VECTOR_REPLAYS={hybrid:["Image","Text","Default"],vector:["Polygon","Circle","LineString","Image","Text","Default"]};class CanvasVectorTileLayerRenderer extends CanvasTileLayerRenderer{constructor(ee,te){super(ee,te),this.boundHandleStyleImageChange_=this.handleStyleImageChange_.bind(this),this.renderedLayerRevision_,this.renderedPixelToCoordinateTransform_=null,this.renderedRotation_,this.renderedOpacity_=1,this.tmpTransform_=create$1(),this.tileClipContexts_=null}enqueueTilesForNextExtent(){return this.getLayer().getRenderMode()!=="vector"}drawTile(ee,te,st,ot,ct,ut,dt,ht,ft){this.updateExecutorGroup_(ee,te.pixelRatio,te.viewState.projection),this.tileImageNeedsRender_(ee)&&this.renderTileImage_(ee,te),super.drawTile(ee,te,st,ot,ct,ut,dt,ht,ft)}getTile(ee,te,st,ot){const ct=this.getOrCreateTile(ee,te,st,ot);if(!ct)return null;const ut=ot.viewState,dt=ut.resolution,ht=ot.viewHints,ft=this.getLayer().getSource(),pt=ft.getTileGridForProjection(ut.projection),mt=!(ht[ViewHint.ANIMATING]||ht[ViewHint.INTERACTING]),yt=pt.getZForResolution(dt,ft.zDirection)===ee;return mt&&yt?ct.wantedResolution=dt:ct.wantedResolution||(ct.wantedResolution=pt.getResolution(ee)),ct}prepareFrame(ee){const te=this.getLayer().getRevision();return this.renderedLayerRevision_!==te&&(this.renderedLayerRevision_=te,this.renderedTiles.length=0),super.prepareFrame(ee)}updateExecutorGroup_(ee,te,st){const ot=this.getLayer(),ct=ot.getRevision(),ut=ot.getRenderOrder()||null,dt=ee.wantedResolution,ht=ee.getReplayState(ot);if(!ht.dirty&&ht.renderedResolution===dt&&ht.renderedRevision==ct&&ht.renderedPixelRatio===te&&ht.renderedRenderOrder==ut)return;const ft=ot.getSource(),pt=!!ot.getDeclutter(),mt=ft.getTileGrid(),vt=ft.getTileGridForProjection(st).getTileCoordExtent(ee.wrappedTileCoord),_t=ft.getSourceTiles(te,st,ee),bt=getUid(ot);delete ee.hitDetectionImageData[bt],ee.executorGroups[bt]=[],ht.dirty=!1;for(let xt=0,Mt=_t.length;xt<Mt;++xt){const Ot=_t[xt];if(Ot.getState()!=TileState.LOADED)continue;const kt=ft.getProjection(),Nt=Ot.tileCoord;let Gt=mt.getTileCoordExtent(Nt);st&&kt&&!equivalent$1(st,kt)&&(Gt=transformExtent(Gt,kt,st,32));const Bt=getIntersection(vt,Gt),Ut=buffer(Bt,ot.getRenderBuffer()*dt,this.tempExtent),Vt=equals$2(Gt,Bt)?null:Ut,Ht=new BuilderGroup(0,Bt,dt,te),zt=getSquaredTolerance(dt,te),jt=function(ai,xn){let An;const Nn=ai.getStyleFunction()||ot.getStyleFunction();if(Nn&&(An=Nn(ai,dt)),An){const Xt=this.renderFeature(ai,zt,An,Ht,pt,xn);ht.dirty=ht.dirty||Xt}},Wt=Ot.getFeatures();ut&&ut!==ht.renderedRenderOrder&&Wt.sort(ut);for(let ai=0,xn=Wt.length;ai<xn;++ai){let An=Wt[ai];st&&Ot.projection&&!equivalent$1(st,Ot.projection)&&(An=An.clone(),An.getGeometry().applyTransform(getTransform(Ot.projection,st))),(!Vt||intersects$1(Vt,An.getGeometry().getExtent()))&&jt.call(this,An,ai)}const Jt=Ht.finish(),Qt=ot.getRenderMode()!=="vector"&&pt&&_t.length===1?null:Bt,oi=new ExecutorGroup(Qt,dt,te,ft.getOverlaps(),Jt,ot.getRenderBuffer(),!0);ee.executorGroups[bt].push(oi)}ht.renderedRevision=ct,ht.renderedPixelRatio=te,ht.renderedRenderOrder=ut,ht.renderedResolution=dt}forEachFeatureAtCoordinate(ee,te,st,ot,ct){var Nt,Gt;const ut=te.viewState.resolution,dt=te.viewState.rotation;st=st??0;const ht=this.getLayer(),pt=ht.getSource().getTileGridForProjection(te.viewState.projection),mt=ht.getRenderBuffer(),yt=boundingExtent([ee]);buffer(yt,ut*(mt+st),yt);const vt={},_t=function(Bt,Ut,Vt){let Ht=Bt.getId();Ht===void 0&&(Ht=getUid(Bt));
95const zt=vt[Ht];if(zt){if(zt!==!0&&Vt<zt.distanceSq){if(Vt===0)return vt[Ht]=!0,ct.splice(ct.lastIndexOf(zt),1),ot(Bt,ht,Ut);zt.geometry=Ut,zt.distanceSq=Vt}}else{if(Vt===0)return vt[Ht]=!0,ot(Bt,ht,Ut);ct.push(vt[Ht]={feature:Bt,layer:ht,geometry:Ut,distanceSq:Vt,callback:ot})}},bt=this.renderedTiles,xt=getUid(ht),Mt=ht.getDeclutter(),Ot=Mt?(Gt=(Nt=te.declutter)==null?void 0:Nt[Mt])==null?void 0:Gt.all().map(Bt=>Bt.value):null;let kt;e:for(let Bt=bt.length-1;Bt>=0;--Bt){const Ut=bt[Bt],Vt=pt.getTileCoordExtent(Ut.wrappedTileCoord);if(!intersects$1(Vt,yt))continue;const Ht=Ut.executorGroups[xt];for(let zt=0,jt=Ht.length;zt<jt;++zt)if(kt=Ht[zt].forEachFeatureAtCoordinate(ee,ut,dt,st,_t,Ot),kt)break e}return kt}getFeatures(ee){return this.renderedTiles.length===0?Promise.resolve([]):new Promise((te,st)=>{const ot=this.getLayer(),ct=ot.getSource(),ut=this.renderedProjection,dt=ut.getExtent(),ht=this.renderedResolution,ft=ct.getTileGridForProjection(ut),pt=apply$1(this.renderedPixelToCoordinateTransform_,ee.slice()),mt=ft.getTileCoordForCoordAndResolution(pt,ht).toString(),yt=this.renderedTiles.find(kt=>kt.tileCoord.toString()===mt&&kt.getState()===TileState.LOADED);if(!yt||yt.loadingSourceTiles>0){te([]);return}ct.getWrapX()&&ut.canWrapX()&&!containsExtent(dt,ft.getTileCoordExtent(yt.tileCoord))&&wrapX$1(pt,ut);const vt=getUid(ot),_t=ft.getTileCoordExtent(yt.wrappedTileCoord),bt=getTopLeft(_t),xt=[(pt[0]-bt[0])/ht,(bt[1]-pt[1])/ht],Mt=yt.getSourceTiles().reduce((kt,Nt)=>kt.concat(Nt.getFeatures()),[]);let Ot=yt.hitDetectionImageData[vt];if(!Ot){const kt=toSize(ft.getTileSize(ft.getZForResolution(ht,ct.zDirection))),Nt=this.renderedRotation_,Gt=[this.getRenderTransform(ft.getTileCoordCenter(yt.wrappedTileCoord),ht,0,HIT_DETECT_RESOLUTION,kt[0]*HIT_DETECT_RESOLUTION,kt[1]*HIT_DETECT_RESOLUTION,0)];Ot=createHitDetectionImageData(kt,Gt,Mt,ot.getStyleFunction(),ft.getTileCoordExtent(yt.wrappedTileCoord),yt.getReplayState(ot).renderedResolution,Nt),yt.hitDetectionImageData[vt]=Ot}te(hitDetect(xt,Mt,Ot))})}getFeaturesInExtent(ee){const te=[],st=this.getTileCache();if(st.getCount()===0)return te;const ct=this.getLayer().getSource().getTileGridForProjection(this.frameState.viewState.projection),ut=ct.getZForResolution(this.renderedResolution),dt={};return st.forEach(ht=>{if(ht.tileCoord[0]!==ut||ht.getState()!==TileState.LOADED)return;const ft=ht.getSourceTiles();for(let pt=0,mt=ft.length;pt<mt;++pt){const yt=ft[pt],vt=yt.getKey();if(vt in dt)continue;dt[vt]=!0;const _t=yt.tileCoord;if(intersects$1(ee,ct.getTileCoordExtent(_t))){const bt=yt.getFeatures();if(bt)for(let xt=0,Mt=bt.length;xt<Mt;++xt){const Ot=bt[xt],kt=Ot.getGeometry();intersects$1(ee,kt.getExtent())&&te.push(Ot)}}}}),te}handleFontsChanged(){const ee=this.getLayer();ee.getVisible()&&this.renderedLayerRevision_!==void 0&&ee.changed()}handleStyleImageChange_(ee){this.renderIfReadyAndVisible()}renderDeclutter(ee,te){var yt;const st=this.context,ot=st.globalAlpha;st.globalAlpha=te.opacity;const ct=ee.viewHints,ut=!(ct[ViewHint.ANIMATING]||ct[ViewHint.INTERACTING]),dt=[this.context.canvas.width,this.context.canvas.height],ht=this.getLayer().getDeclutter(),ft=ht?(yt=ee.declutter)==null?void 0:yt[ht]:void 0,pt=getUid(this.getLayer()),mt=this.renderedTiles;for(let vt=0,_t=mt.length;vt<_t;++vt){const bt=mt[vt],xt=bt.executorGroups[pt];if(xt)for(let Mt=xt.length-1;Mt>=0;--Mt)xt[Mt].execute(this.context,dt,this.getTileRenderTransform(bt,ee),ee.viewState.rotation,ut,DECLUTTER,ft)}st.globalAlpha=ot}renderDeferredInternal(ee){const te=this.renderedTiles,st=getUid(this.getLayer()),ot=te.reduce((ht,ft,pt)=>(ft.executorGroups[st].forEach(mt=>ht.push({executorGroup:mt,index:pt})),ht),[]),ct=ot.map(({executorGroup:ht})=>ht.getDeferredZIndexContexts()),ut={};for(let ht=0,ft=ot.length;ht<ft;++ht){const pt=ot[ht].executorGroup.getDeferredZIndexContexts();for(const mt in pt)ut[mt]=!0}const dt=Object.keys(ut).map(Number).sort(ascending);this.layerExtent&&this.clipUnrotated(this.context,ee,this.layerExtent),dt.forEach(ht=>{ct.forEach((ft,pt)=>{ft[ht]&&(ft[ht].forEach(mt=>{const{executorGroup:yt,index:vt}=ot[pt],_t=yt.getRenderedContext(),bt=_t.globalAlpha;_t.globalAlpha=this.renderedOpacity_;const xt=this.tileClipContexts_[vt];
95xt&&xt.draw(_t),mt.draw(_t),xt&&_t.restore(),_t.globalAlpha=bt,mt.clear()}),ft[ht].length=0)})}),this.layerExtent&&this.context.restore()}getTileRenderTransform(ee,te){const st=te.pixelRatio,ot=te.viewState,ct=ot.center,ut=ot.resolution,dt=ot.rotation,ht=te.size,ft=Math.round(ht[0]*st),pt=Math.round(ht[1]*st),yt=this.getLayer().getSource().getTileGridForProjection(te.viewState.projection),vt=ee.tileCoord,_t=yt.getTileCoordExtent(ee.wrappedTileCoord),bt=yt.getTileCoordExtent(vt,this.tempExtent)[0]-_t[0];return multiply(scale$1(this.inversePixelTransform.slice(),1/st,1/st),this.getRenderTransform(ct,ut,dt,st,ft,pt,bt))}clipTileContext_(ee,te,st,ot,ct,ut){const dt=[];for(let ft=0,pt=st.length;ft<pt;++ft)ct<ot[ft]&&intersects$1(te,st[ft])&&dt.push(st[ft]);if(dt.length===0)return!1;const ht=subtractExtents(te,dt);ee.save(),ee.beginPath();for(let ft=0,pt=ht.length;ft<pt;++ft){const mt=ht[ft],yt=apply$1(ut,[mt[0],mt[1]]),vt=apply$1(ut,[mt[0],mt[3]]),_t=apply$1(ut,[mt[2],mt[3]]),bt=apply$1(ut,[mt[2],mt[1]]);ee.moveTo(yt[0],yt[1]),ee.lineTo(vt[0],vt[1]),ee.lineTo(_t[0],_t[1]),ee.lineTo(bt[0],bt[1]),ee.closePath()}return ee.clip(),!0}postRender(ee,te){var Gt;const st=te.viewHints,ot=!(st[ViewHint.ANIMATING]||st[ViewHint.INTERACTING]);this.renderedPixelToCoordinateTransform_=te.pixelToCoordinateTransform.slice(),this.renderedRotation_=te.viewState.rotation,this.renderedOpacity_=te.layerStatesArray[te.layerIndex].opacity;const ct=this.getLayer(),ut=ct.getRenderMode(),dt=ee.globalAlpha;ee.globalAlpha=this.renderedOpacity_;const ht=ct.getDeclutter(),ft=ht?VECTOR_REPLAYS[ut].filter(Bt=>!DECLUTTER.includes(Bt)):VECTOR_REPLAYS[ut],pt=te.viewState,mt=pt.rotation;this.layerExtent&&this.clipUnrotated(ee,te,this.layerExtent);const yt=ct.getSource(),_t=yt.getTileGridForProjection(pt.projection).getZForResolution(pt.resolution,yt.zDirection),bt=this.renderedTiles,xt=[],Mt=[],Ot=[],kt=getUid(ct);let Nt=!0;for(let Bt=bt.length-1;Bt>=0;--Bt){const Ut=bt[Bt];Nt=Nt&&!Ut.getReplayState(ct).dirty;const Vt=Ut.executorGroups[kt].filter(oi=>oi.hasExecutors(ft));if(Vt.length===0)continue;const Ht=this.getTileRenderTransform(Ut,te),zt=Ut.tileCoord[0];let jt=!1;const Wt=Vt[0].getClipCoords(IDENTITY_TRANSFORM);let Jt=ee,Qt;if(Wt){const oi=[Wt[0],Wt[1],Wt[4],Wt[5]];Qt=new ZIndexContext,Jt=Qt.getContext(),_t!==zt&&(jt=this.clipTileContext_(Jt,oi,xt,Mt,zt,Ht)),xt.push(oi),Mt.push(zt)}for(let oi=0,ai=Vt.length;oi<ai;++oi)Vt[oi].execute(ee,[ee.canvas.width,ee.canvas.height],Ht,mt,ot,ft,(Gt=te.declutter)==null?void 0:Gt[ht]);jt&&(Jt===ee?Jt.restore():Ot[Bt]=Qt)}this.layerExtent&&ee.restore(),ee.globalAlpha=dt,this.ready=Nt,this.tileClipContexts_=Ot,te.declutter||this.renderDeferredInternal(te),super.postRender(ee,te)}renderFeature(ee,te,st,ot,ct,ut){if(!st)return!1;let dt=!1;if(Array.isArray(st))for(let ht=0,ft=st.length;ht<ft;++ht)dt=renderFeature$1(ot,ee,st[ht],te,this.boundHandleStyleImageChange_,void 0,ct,ut)||dt;else dt=renderFeature$1(ot,ee,st,te,this.boundHandleStyleImageChange_,void 0,ct,ut);return dt}tileImageNeedsRender_(ee){const te=this.getLayer();if(te.getRenderMode()==="vector")return!1;const st=ee.getReplayState(te),ot=te.getRevision(),ct=ee.wantedResolution;return st.renderedTileResolution!==ct||st.renderedTileRevision!==ot}renderTileImage_(ee,te){const st=this.getLayer(),ot=ee.getReplayState(st),ct=st.getRevision(),ut=ee.executorGroups[getUid(st)];ot.renderedTileRevision=ct;const dt=ee.wrappedTileCoord,ht=dt[0],ft=st.getSource();let pt=te.pixelRatio;const yt=te.viewState.projection,vt=ft.getTileGridForProjection(yt),_t=vt.getResolution(ee.tileCoord[0]),bt=te.pixelRatio/ee.wantedResolution*_t,xt=vt.getResolution(ht),Mt=ee.getContext();pt=Math.round(Math.max(pt,bt/pt));const Ot=ft.getTilePixelSize(ht,pt,yt);Mt.canvas.width=Ot[0],Mt.canvas.height=Ot[1];const kt=pt/bt;if(kt!==1){const Ut=reset(this.tmpTransform_);scale$1(Ut,kt,kt),Mt.setTransform.apply(Mt,Ut)}const Nt=vt.getTileCoordExtent(dt,this.tempExtent),Gt=bt/xt,Bt=reset(this.tmpTransform_);scale$1(Bt,Gt,-Gt),translate$1(Bt,-Nt[0],-Nt[3]);for(let Ut=0,Vt=ut.length;Ut<Vt;++Ut)ut[Ut].execute(Mt,[Mt.canvas.width*kt,Mt.canvas.height*kt],Bt,0,!0,IMAGE_REPLAYS[st.getRenderMode()],null);ot.renderedTileResolution=ee.wantedResolution}}class VectorTileLayer extends BaseVectorLayer{constructor(ee){ee=ee||{};const te=Object.assign({},ee);delete te.preload;const st=ee.cacheSize===void 0?0:ee.cacheSize;delete ee.cacheSize,delete te.useInterimTilesOnError,super(te),this.on,this.once,this.un,this.cacheSize_=st;const ot=ee.renderMode||"hybrid";assert(ot=="hybrid"||ot=="vector","`renderMode` must be `'hybrid'` or `'vector'`"),this.renderMode_=ot,this.setPreload(ee.preload?ee.preload:0),this.setUseInterimTilesOnError(ee.useInterimTilesOnError!==void 0?ee.useInterimTilesOnError:!0),this.getBackgroun
95d,this.setBackground}createRenderer(){return new CanvasVectorTileLayerRenderer(this,{cacheSize:this.cacheSize_})}getFeatures(ee){return super.getFeatures(ee)}getFeaturesInExtent(ee){return this.getRenderer().getFeaturesInExtent(ee)}getRenderMode(){return this.renderMode_}getPreload(){return this.get(TileProperty.PRELOAD)}getUseInterimTilesOnError(){return this.get(TileProperty.USE_INTERIM_TILES_ON_ERROR)}setPreload(ee){this.set(TileProperty.PRELOAD,ee)}setUseInterimTilesOnError(ee){this.set(TileProperty.USE_INTERIM_TILES_ON_ERROR,ee)}}function jsonp(ne,ee,te,st){const ot=document.createElement("script"),ct="olc_"+getUid(ee);function ut(){delete window[ct],ot.parentNode.removeChild(ot)}ot.async=!0,ot.src=ne+(ne.includes("?")?"&":"?")+"callback="+ct;const dt=setTimeout(function(){ut(),te&&te()},1e4);window[ct]=function(ht){clearTimeout(dt),ut(),ee(ht)},document.head.appendChild(ot)}class TileJSON extends TileImage{constructor(ee){if(super({attributions:ee.attributions,cacheSize:ee.cacheSize,crossOrigin:ee.crossOrigin,interpolate:ee.interpolate,projection:get$3("EPSG:3857"),reprojectionErrorThreshold:ee.reprojectionErrorThreshold,state:"loading",tileLoadFunction:ee.tileLoadFunction,wrapX:ee.wrapX!==void 0?ee.wrapX:!0,transition:ee.transition,zDirection:ee.zDirection}),this.tileJSON_=null,this.tileSize_=ee.tileSize,ee.url)if(ee.jsonp)jsonp(ee.url,this.handleTileJSONResponse.bind(this),this.handleTileJSONError.bind(this));else{const te=new XMLHttpRequest;te.addEventListener("load",this.onXHRLoad_.bind(this)),te.addEventListener("error",this.onXHRError_.bind(this)),te.open("GET",ee.url),te.send()}else if(ee.tileJSON)this.handleTileJSONResponse(ee.tileJSON);else throw new Error("Either `url` or `tileJSON` options must be provided")}onXHRLoad_(ee){const te=ee.target;if(!te.status||te.status>=200&&te.status<300){let st;try{st=JSON.parse(te.responseText)}catch{this.handleTileJSONError();return}this.handleTileJSONResponse(st)}else this.handleTileJSONError()}onXHRError_(ee){this.handleTileJSONError()}getTileJSON(){return this.tileJSON_}handleTileJSONResponse(ee){const te=get$3("EPSG:4326"),st=this.getProjection();let ot;
95if(ee.bounds!==void 0){const ft=getTransformFromProjections(te,st);ot=applyTransform(ee.bounds,ft)}const ct=extentFromProjection(st),ut=ee.minzoom||0,dt=ee.maxzoom||22,ht=createXYZ({extent:ct,maxZoom:dt,minZoom:ut,tileSize:this.tileSize_});if(this.tileGrid=ht,this.tileUrlFunction=createFromTemplates(ee.tiles,ht),ee.attribution&&!this.getAttributions()){const ft=ot!==void 0?ot:ct;this.setAttributions(function(pt){return intersects$1(ft,pt.extent)?[ee.attribution]:null})}this.tileJSON_=ee,this.setState("ready")}handleTileJSONError(){this.setState("error")}}const SHIFT_LEFT_32=65536*65536,TEXT_DECODER_MIN_LENGTH=12,utf8TextDecoder=typeof TextDecoder>"u"?null:new TextDecoder("utf-8"),PBF_VARINT=0,PBF_FIXED64=1,PBF_BYTES=2,PBF_FIXED32=5;class PbfReader{constructor(ee){this.buf=ArrayBuffer.isView(ee)?ee:new Uint8Array(ee),this.dataView=new DataView(this.buf.buffer,this.buf.byteOffset,this.buf.byteLength),this.pos=0,this.type=0,this._valueStart=-1,this.length=this.buf.length}readFields(ee,te,st=this.length){let ot;for(;ot=this.nextField(st);)ee(ot,te,this);return te}readMessage(ee,te){return this.readFields(ee,te,this.readVarint()+this.pos)}readFixed32(){const ee=this.dataView.getUint32(this.pos,!0);return this.pos+=4,ee}readSFixed32(){const ee=this.dataView.getInt32(this.pos,!0);return this.pos+=4,ee}readFixed64(){const ee=this.dataView.getUint32(this.pos,!0)+this.dataView.getUint32(this.pos+4,!0)*SHIFT_LEFT_32;return this.pos+=8,ee}readSFixed64(){const ee=this.dataView.getUint32(this.pos,!0)+this.dataView.getInt32(this.pos+4,!0)*SHIFT_LEFT_32;return this.pos+=8,ee}readFloat(){const ee=this.dataView.getFloat32(this.pos,!0);return this.pos+=4,ee}readDouble(){const ee=this.dataView.getFloat64(this.pos,!0);return this.pos+=8,ee}readVarint(ee){const te=this.buf,st=te[this.pos++];if(st<128)return st;let ot=st&127,ct;return ct=te[this.pos++],ot|=(ct&127)<<7,ct<128||(ct=te[this.pos++],ot|=(ct&127)<<14,ct<128)||(ct=te[this.pos++],ot|=(ct&127)<<21,ct<128)?ot:(ct=te[this.pos],ot|=(ct&15)<<28,readVarintRemainder(ot,ee,this))}readSVarint(){const ee=this.readVarint();return ee%2===1?(ee+1)/-2:ee/2}readBoolean(){return!!this.readVarint()}readString(){const ee=this.readVarint()+this.pos,te=this.pos;return this.pos=ee,ee-te>=TEXT_DECODER_MIN_LENGTH&&utf8TextDecoder?utf8TextDecoder.decode(this.buf.subarray(te,ee)):readUtf8(this.buf,te,ee)}readBytes(){const ee=this.readVarint()+this.pos,te=this.buf.subarray(this.pos,ee);return this.pos=ee,te}readPackedVarint(ee=[],te){const st=this.readPackedEnd();for(;this.pos<st;)ee.push(this.readVarint(te));return ee}readPackedSVarint(ee=[]){const te=this.readPackedEnd();for(;this.pos<te;)ee.push(this.readSVarint());return ee}readPackedBoolean(ee=[]){const te=this.readPackedEnd();for(;this.pos<te;)ee.push(this.readBoolean());return ee}readPackedFloat(ee=[]){const te=this.readPackedEnd();for(;this.pos<te;)ee.push(this.readFloat());return ee}readPackedDouble(ee=[]){const te=this.readPackedEnd();for(;this.pos<te;)ee.push(this.readDouble());return ee}readPackedFixed32(ee=[]){const te=this.readPackedEnd();for(;this.pos<te;)ee.push(this.readFixed32());return ee}readPackedSFixed32(ee=[]){const te=this.readPackedEnd();for(;this.pos<te;)ee.push(this.readSFixed32());return ee}readPackedFixed64(ee=[]){const te=this.readPackedEnd();for(;this.pos<te;)ee.push(this.readFixed64());return ee}readPackedSFixed64(ee=[]){const te=this.readPackedEnd();for(;this.pos<te;)ee.push(this.readSFixed64());return ee}readPackedEnd(){return this.type===PBF_BYTES?this.readVarint()+this.pos:this.pos+1}nextField(ee=this.length){if(this.pos===this._valueStart&&this.skip(this.type),this.pos>=ee)return 0;const te=this.readVarint();return this.type=te&7,this._valueStart=this.pos,te>>>3}skip(ee){const te=ee&7;if(te===PBF_VARINT)for(;this.buf[this.pos++]>127;);else if(te===PBF_BYTES)this.pos=this.readVarint()+this.pos;else if(te===PBF_FIXED32)this.pos+=4;else if(te===PBF_FIXED64)this.pos+=8;else throw new Error(`Unimplemented type: ${te}`)}}function readVarintRemainder(ne,ee,te){const st=te.buf;let ot,ct;if(ct=st[te.pos++],ot=(ct&112)>>4,ct<128||(ct=st[te.pos++],ot|=(ct&127)<<3,ct<128)||(ct=st[te.pos++],ot|=(ct&127)<<10,ct<128)||(ct=st[te.pos++],ot|=(ct&127)<<17,ct<128)||(ct=st[te.pos++],ot|=(ct&127)<<24,ct<128)||(ct=st[te.pos++],ot|=(ct&1)<<31,ct<128))return toNum(ne,ot,ee);throw new Error("Expected varint not more than 10 bytes")}function toNum(ne,ee,te){return te?ee*4294967296+(ne>>>0):(ee>>>0)*4294967296+(ne>>>0)}function readUtf8(ne,ee,te){let st="",ot=ee;for(;ot<te;){const ct=ne[ot];let ut=null,dt=ct>239?4:ct>223?3:ct>191?2:1;if(ot+dt>te)break;let ht,ft,pt;
95dt===1?ct<128&&(ut=ct):dt===2?(ht=ne[ot+1],(ht&192)===128&&(ut=(ct&31)<<6|ht&63,ut<=127&&(ut=null))):dt===3?(ht=ne[ot+1],ft=ne[ot+2],(ht&192)===128&&(ft&192)===128&&(ut=(ct&15)<<12|(ht&63)<<6|ft&63,(ut<=2047||ut>=55296&&ut<=57343)&&(ut=null))):dt===4&&(ht=ne[ot+1],ft=ne[ot+2],pt=ne[ot+3],(ht&192)===128&&(ft&192)===128&&(pt&192)===128&&(ut=(ct&15)<<18|(ht&63)<<12|(ft&63)<<6|pt&63,(ut<=65535||ut>=1114112)&&(ut=null))),ut===null?(ut=65533,dt=1):ut>65535&&(ut-=65536,st+=String.fromCharCode(ut>>>10&1023|55296),ut=56320|ut&1023),st+=String.fromCharCode(ut),ot+=dt}return st}class MVT extends FeatureFormat{constructor(ee){super(),ee=ee||{},this.dataProjection=new Projection$1({code:"",units:"tile-pixels"}),this.featureClass=ee.featureClass?ee.featureClass:RenderFeature,this.geometryName_=ee.geometryName,this.layerName_=ee.layerName?ee.layerName:"layer",this.layers_=ee.layers?ee.layers:null,this.idProperty_=ee.idProperty,this.supportedMediaTypes=["application/vnd.mapbox-vector-tile","application/x-protobuf"]}readRawGeometry_(ee,te,st,ot){ee.pos=te.geometry;const ct=ee.readVarint()+ee.pos;let ut=1,dt=0,ht=0,ft=0,pt=0,mt=0;for(;ee.pos<ct;){if(!dt){const yt=ee.readVarint();ut=yt&7,dt=yt>>3}if(dt--,ut===1||ut===2)ht+=ee.readSVarint(),ft+=ee.readSVarint(),ut===1&&pt>mt&&(ot.push(pt),mt=pt),st.push(ht,ft),pt+=2;else if(ut===7)pt>mt&&(st.push(st[mt],st[mt+1]),pt+=2);else throw new Error("Invalid command found in the PBF")}pt>mt&&(ot.push(pt),mt=pt)}createFeature_(ee,te,st){const ot=te.type;if(ot===0)return null;let ct;const ut=te.properties;let dt;this.idProperty_?(dt=ut[this.idProperty_],delete ut[this.idProperty_]):dt=te.id,ut[this.layerName_]=te.layer.name;const ht=[],ft=[];this.readRawGeometry_(ee,te,ht,ft);const pt=getGeometryType(ot,ft.length);if(this.featureClass===RenderFeature)ct=new this.featureClass(pt,ht,ft,2,ut,dt),ct.transform(st.dataProjection);else{let mt;if(pt=="Polygon"){const _t=inflateEnds(ht,ft);mt=_t.length>1?new MultiPolygon(ht,"XY",_t):new Polygon(ht,"XY",ft)}else mt=pt==="Point"?new Point$1(ht,"XY"):pt==="LineString"?new LineString(ht,"XY"):pt==="MultiPoint"?new MultiPoint(ht,"XY"):pt==="MultiLineString"?new MultiLineString(ht,"XY",ft):null;const yt=this.featureClass;ct=new yt,this.geometryName_&&ct.setGeometryName(this.geometryName_);const vt=transformGeometryWithOptions(mt,!1,st);ct.setGeometry(vt),dt!==void 0&&ct.setId(dt),ct.setProperties(ut,!0)}return ct}getType(){return"arraybuffer"}readFeatures(ee,te){const st=this.layers_;te=this.adaptOptions(te);const ot=get$3(te.dataProjection);ot.setWorldExtent(te.extent),te.dataProjection=ot;const ct=new PbfReader(ee),ut=ct.readFields(layersPBFReader,{}),dt=[];for(const ht in ut){if(st&&!st.includes(ht))continue;const ft=ut[ht],pt=ft?[0,0,ft.extent,ft.extent]:null;ot.setExtent(pt);for(let mt=0,yt=ft.length;mt<yt;++mt){const vt=readRawFeature(ct,ft,mt),_t=this.createFeature_(ct,vt,te);_t!==null&&dt.push(_t)}}return dt}readProjection(ee){return this.dataProjection}setLayers(ee){this.layers_=ee}}function layersPBFReader(ne,ee,te){if(ne===3){const st={keys:[],values:[],features:[]},ot=te.readVarint()+te.pos;te.readFields(layerPBFReader,st,ot),st.length=st.features.length,st.length&&(ee[st.name]=st)}}function layerPBFReader(ne,ee,te){if(ne===15)ee.version=te.readVarint();else if(ne===1)ee.name=te.readString();else if(ne===5)ee.extent=te.readVarint();else if(ne===2)ee.features.push(te.pos);else if(ne===3)ee.keys.push(te.readString());else if(ne===4){let st=null;const ot=te.readVarint()+te.pos;for(;te.pos<ot;)ne=te.readVarint()>>3,st=ne===1?te.readString():ne===2?te.readFloat():ne===3?te.readDouble():ne===4?te.readVarint(!0):ne===5?te.readVarint():ne===6?te.readSVarint():ne===7?te.readBoolean():null;ee.values.push(st)}}function featurePBFReader(ne,ee,te){if(ne==1)ee.id=te.readVarint();else if(ne==2){const st=te.readVarint()+te.pos;for(;te.pos<st;){const ot=ee.layer.keys[te.readVarint()],ct=ee.layer.values[te.readVarint()];ee.properties[ot]=ct}}else ne==3?ee.type=te.readVarint():ne==4&&(ee.geometry=te.pos)}function readRawFeature(ne,ee,te){ne.pos=ee.features[te];const st=ne.readVarint()+ne.pos,ot={layer:ee,type:0,properties:{}};return ne.readFields(featurePBFReader,ot,st),ot}function getGeometryType(ne,ee){let te;return ne===1?te=ee===1?"Point":"MultiPoint":ne===2?te=ee===1?"LineString":"MultiLineString":ne===3&&(te="Polygon"),te}var v8_default={$version:8,$root:{version:{required:!0,type:"enum",values:[8]},name:{type:"string"},metadata:{type:"*"},center:{type:"array",value:"number",length:2},centerAltitude:{type:"number"},zoom:{type:"number"}
vendor: 34,748 bytes, line 95
95,bearing:{type:"number",default:0,period:360,units:"degrees"},pitch:{type:"number",default:0,units:"degrees"},roll:{type:"number",default:0,units:"degrees"},state:{type:"state",default:{}},light:{type:"light"},sky:{type:"sky"},projection:{type:"projection"},terrain:{type:"terrain"},sources:{required:!0,type:"sources"},sprite:{type:"sprite"},glyphs:{type:"string"},"font-faces":{type:"fontFaces"},transition:{type:"transition"},layers:{required:!0,type:"array",value:"layer"}},sources:{"*":{type:"source"}},source:["source_vector","source_raster","source_raster_dem","source_geojson","source_video","source_image"],source_vector:{type:{required:!0,type:"enum",values:{vector:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},attribution:{type:"string"},promoteId:{type:"promoteId"},volatile:{type:"boolean",default:!1},encoding:{type:"enum",values:{mvt:{},mlt:{}},default:"mvt"},"*":{type:"*"}},source_raster:{type:{required:!0,type:"enum",values:{raster:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},attribution:{type:"string"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_raster_dem:{type:{required:!0,type:"enum",values:{"raster-dem":{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},attribution:{type:"string"},encoding:{type:"enum",values:{terrarium:{},mapbox:{},custom:{}},default:"mapbox"},redFactor:{type:"number",default:1},blueFactor:{type:"number",default:1},greenFactor:{type:"number",default:1},baseShift:{type:"number",default:0},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_geojson:{type:{required:!0,type:"enum",values:{geojson:{}}},data:{required:!0,type:"*"},maxzoom:{type:"number",default:18},attribution:{type:"string"},buffer:{type:"number",default:128,maximum:512,minimum:0},filter:{type:"filter"},tolerance:{type:"number",default:.375},cluster:{type:"boolean",default:!1},clusterRadius:{type:"number",default:50,minimum:0},clusterMaxZoom:{type:"number"},clusterMinPoints:{type:"number"},clusterProperties:{type:"*"},lineMetrics:{type:"boolean",default:!1},generateId:{type:"boolean",default:!1},promoteId:{type:"promoteId"}},source_video:{type:{required:!0,type:"enum",values:{video:{}}},urls:{required:!0,type:"array",value:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},source_image:{type:{required:!0,type:"enum",values:{image:{}}},url:{type:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},layer:{id:{type:"string",required:!0},type:{type:"enum",values:{fill:{},line:{},symbol:{},circle:{},heatmap:{},"fill-extrusion":{},raster:{},hillshade:{},"color-relief":{},background:{}},required:!0},metadata:{type:"*"},source:{type:"string"},"source-layer":{type:"string"},minzoom:{type:"number",minimum:0,maximum:24},maxzoom:{type:"number",minimum:0,maximum:24},filter:{type:"filter"},layout:{type:"layout"},paint:{type:"paint"}},layout:["layout_fill","layout_line","layout_circle","layout_heatmap","layout_fill-extrusion","layout_symbol","layout_raster","layout_hillshade","layout_color-relief","layout_background"],layout_background:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},layout_fill:{"fill-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},layout_circle:{"circle-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},layout_heatmap:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},"layout_fill-extrusion":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"},"fill-extrusion-rounded-corner-distance":{type:"number",default:0,minimum:0,units:"meters","property-type":"constant"}},layout_line:{"line-cap":{type:"enum",values:{butt:{},round:{},square:{}},default:"butt",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-join":{type:"enum",values:{bevel:{},round:{},miter:{}},default:"miter",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-miter-limit":{type:"number",default:2,requires:[{"line-join":"miter"}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-round-limit":{type:"number",default:1.05,requires:[{"line-join":"round"}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},layout_symbol:{"symbol-placement":{type:"enum",values:{point:{},line:{},"line-center":{}},default:"point",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-spacing":{type:"number",default:250,minimum:1,units:"pixels",requires:[{"symbol-placement":"line"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"symbol-avoid-edges":{type:"boolean",default:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"symbol-z-order":{type:"enum",values:{auto:{},"viewport-y":{},source:{}},default:"auto",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-allow-overlap":{type:"boolean",default:!1,requires:["icon-image",{"!":"icon-overlap"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-overlap":{type:"enum",values:{never:{},always:{},cooperative:{}},requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-ignore-placement":{type:"boolean",default:!1,requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-optional":{type:"boolean",default:!1,requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-rotation-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-size":{type:"number",default:1,minimum:0,units:"factor of the original icon size",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-text-fit":{type:"enum",values:{none:{},width:{},height:{},both:{}},default:"none",requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-text-fit-padding":{type:"array",value:"number",length:4,default:[0,0,0,0],units:"pixels",requires:["icon-image","text-field",{"icon-text-fit":["both","width","height"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-image":{type:"resolvedImage",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-padding":{type:"padding",default:[2],units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-keep-upright":{type:"boolean",default:!1,requires:["icon-image",{"icon-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-offset":{type:"array",value:"number",length:2,default:[0,0],requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotation-alignment":{type:"enum",values:{map:{},viewport:{},"viewport-glyph":{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-field":{type:"formatted",default:"",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-font":{type:"array",value:"string",default:["Open Sans Regular","Arial Unicode MS Regular"],requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-size":{type:"number",default:16,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-width":{type:"number",default:10,minimum:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-line-height":{type:"number",default:1.2,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-letter-spacing":{type:"number",default:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-justify":{type:"enum",values:{auto:{},left:{},center:{},right:{}},default:"center",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-radial-offset":{type:"number",units:"ems",default:0,requires:["text-field"],"property-type":"data-driven",expression:{interpolated:!0,parameters:["zoom","feature"]}},"text-variable-anchor":{type:"array",value:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-variable-anchor-offset":{type:"variableAnchorOffsetCollection",requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["text-field",{"!":"text-variable-anchor"}],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-angle":{type:"number",default:45,units:"degrees",requires:["text-field",{"symbol-placement":["line","line-center"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-writing-mode":{type:"array",value:"enum",values:{horizontal:{},vertical:{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-padding":{type:"number",default:2,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-keep-upright":{type:"boolean",default:!0,requires:["text-field",{"text-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-transform":{type:"enum",values:{none:{},uppercase:{},lowercase:{}},default:"none",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-offset":{type:"array",value:"number",units:"ems",length:2,default:[0,0],requires:["text-field",{"!":"text-radial-offset"}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-allow-overlap":{type:"boolean",default:!1,requires:["text-field",{"!":"text-overlap"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-overlap":{type:"enum",values:{never:{},always:{},cooperative:{}},requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-ignore-placement":{type:"boolean",default:!1,requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-optional":{type:"boolean",default:!1,requires:["text-field","icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-height-offset":{type:"number",default:0,units:"meters",requires:[{"symbol-placement":["point"]}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"symbol-height-anchor":{type:"enum",values:{ground:{},absolute:{}},default:"ground",requires:["symbol-height-offset"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},layout_raster:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},layout_hillshade:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},"layout_color-relief":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},filter:{type:"boolean",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},filter_operator:{type:"enum",values:{"==":{},"!=":{},">":{},">=":{},"<":{},"<=":{},in:{},"!in":{},all:{},any:{},none:{},has:{},"!has":{}}},geometry_type:{type:"enum",values:{Point:{},LineString:{},Polygon:{}}},function:{expression:{type:"expression"},stops:{type:"array",value:"function_stop"},base:{type:"number",default:1,minimum:0},property:{type:"string",default:"$zoom"},type:{type:"enum",values:{identity:{},exponential:{},interval:{},categorical:{}},default:"exponential"},colorSpace:{type:"enum",values:{rgb:{},lab:{},hcl:{}},default:"rgb"},default:{type:"*",required:!1}},function_stop:{type:"array",minimum:0,maximum:24,value:["number","color"],length:2},expression:{type:"array",value:"expression_name",minimum:1},light:{anchor:{type:"enum",default:"viewport",values:{map:{},viewport:{}},"property-type":"data-constant",transition:!1,expression:{interpolated:!1,parameters:["zoom"]}},position:{type:"array",default:[1.15,210,30],length:3,value:"number","property-type":"data-constant",transition:!0,expression:{interpolated:!0,parameters:["zoom"]}},color:{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},intensity:{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},sky:{"sky-color":{type:"color","property-type":"data-constant",default:"#88C6FC",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"horizon-color":{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"fog-color":{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"fog-ground-blend":{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"horizon-fog-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"sky-horizon-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"atmosphere-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},terrain:{source:{type:"string",required:!0},exaggeration:{type:"number",minimum:0,default:1}},projection:{type:{type:"projectionDefinition",default:"mercator","property-type":"data-constant",transition:!1,expression:{interpolated:!0,parameters:["zoom"]}}},paint:["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_color-relief","paint_background"],paint_fill:{"fill-antialias":{type:"boolean",default:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-layer-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","global-state"]},"property-type":"data-constant"},"fill-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-outline-color":{type:"color",transition:!0,requires:[{"!":"fill-pattern"},{"fill-antialias":!0}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"}},"paint_fill-extrusion":{"fill-extrusion-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-extrusion-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-extrusion-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"fill-extrusion-height":{type:"number",default:0,units:"meters",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-base":{type:"number",default:0,units:"meters",transition:!0,requires:["fill-extrusion-height"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-vertical-gradient":{type:"boolean",default:!0,transition:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_line:{"line-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-layer-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","global-state"]},"property-type":"data-constant"},"line-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"line-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["line-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-width":{type:"number",default:1,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-gap-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-offset":{type:"number",default:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-dasharray":{type:"array",value:"number",minimum:0,transition:!0,units:"line widths",requires:[{"!":"line-pattern"}],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"line-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"line-gradient":{type:"color",transition:!1,requires:[{"!":"line-dasharray"},{"!":"line-pattern"},{source:"geojson",has:{lineMetrics:!0}}],expression:{interpolated:!0,parameters:["line-progress"]},"property-type":"color-ramp"}},paint_circle:{"circle-radius":{type:"number",default:5,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-blur":{type:"number",default:0,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"circle-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["circle-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-scale":{type:"enum",values:{map:{},viewport:{}},default:"map",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-alignment":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-stroke-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"}},paint_heatmap:{"heatmap-radius":{type:"number",default:30,minimum:1,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-weight":{type:"number",default:1,minimum:0,transition:!1,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-intensity":{type:"number",default:1,minimum:0,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"heatmap-color":{type:"color",default:["interpolate",["linear"],["heatmap-density"],0,"rgba(0, 0, 255, 0)",.1,"royalblue",.3,"cyan",.5,"lime",.7,"yellow",1,"red"],transition:!1,expression:{interpolated:!0,parameters:["heatmap-density"]},"property-type":"color-ramp"},"heatmap-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_symbol:{"icon-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-color":{type:"color",default:"#000000",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["icon-image","icon-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-color":{type:"color",default:"#000000",transition:!0,overridable:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["text-field","text-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_raster:{"raster-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-hue-rotate":{type:"number",default:0,period:360,transition:!0,units:"degrees",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-min":{type:"number",default:0,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-max":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-saturation":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-contrast":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},resampling:{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"raster-resampling":{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"raster-fade-duration":{type:"number",default:300,minimum:0,transition:!1,units:"milliseconds",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_hillshade:{"hillshade-illumination-direction":{type:"numberArray",default:335,minimum:0,maximum:359,transition:!1,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-illumination-altitude":{type:"numberArray",default:45,minimum:0,maximum:90,transition:!1,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-illumination-anchor":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-exaggeration":{type:"number",default:.5,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-shadow-color":{type:"colorArray",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-highlight-color":{type:"colorArray",default:"#FFFFFF",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-accent-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-method":{type:"enum",values:{standard:{},basic:{},combined:{},igor:{},multidirectional:{}},default:"standard",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},resampling:{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},"paint_color-relief":{"color-relief-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"color-relief-color":{type:"color",transition:!1,expression:{interpolated:!0,parameters:["elevation"]},"property-type":"color-ramp"},resampling:{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_background:{"background-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"background-pattern"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"background-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"background-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},transition:{duration:{type:"number",default:300,minimum:0,units:"milliseconds"},delay:{type:"number",default:0,minimum:0,units:"milliseconds"}},"property-type":{"data-driven":{type:"property-type"},"cross-faded":{type:"property-type"},"cross-faded-data-driven":{type:"property-type"},"color-ramp":{type:"property-type"},"data-constant":{type:"property-type"},constant:{type:"property-type"}},promoteId:{"*":{type:"string"}},interpolation:{type:"array",value:"interpolation_name",minimum:1},interpolation_name:{type:"enum",values:{linear:{syntax:{overloads:[{parameters:[],"output-type":"interpolation"}],parameters:[]}},exponential:{syntax:{overloads:[{parameters:["base"],"output-type":"interpolation"}],parameters:[{name:"base",type:"number literal"}]}},"cubic-bezier":{syntax:{overloads:[{parameters:["x1","y1","x2","y2"],"output-type":"interpolation"}],parameters:[{name:"x1",type:"number literal"},{name:"y1",type:"number literal"},{name:"x2",type:"number literal"},{name:"y2",type:"number literal"}]}}}}};const latest=v8_default,refProperties=["type","source","source-layer","minzoom","maxzoom","filter","layout"];function deref(ne,ee){const te={};for(const st in ne)st!=="ref"&&(te[st]=ne[st]);
95return refProperties.forEach(st=>{st in ee&&(te[st]=ee[st])}),te}function derefLayers(ne){ne=ne.slice();const ee=Object.create(null);for(let te=0;te<ne.length;te++)ee[ne[te].id]=ne[te];for(let te=0;te<ne.length;te++)"ref"in ne[te]&&(ne[te]=deref(ne[te],ee[ne[te].ref]));return ne}const NullType={kind:"null"},NumberType={kind:"number"},StringType={kind:"string"},BooleanType={kind:"boolean"},ColorType={kind:"color"},ProjectionDefinitionType={kind:"projectionDefinition"},ObjectType={kind:"object"},ValueType={kind:"value"},ErrorType={kind:"error"},CollatorType={kind:"collator"},FormattedType={kind:"formatted"},PaddingType={kind:"padding"},ColorArrayType={kind:"colorArray"},NumberArrayType={kind:"numberArray"},ResolvedImageType={kind:"resolvedImage"},VariableAnchorOffsetCollectionType={kind:"variableAnchorOffsetCollection"};function array(ne,ee){return{kind:"array",itemType:ne,N:ee}}function typeToString(ne){if(ne.kind==="array"){const ee=typeToString(ne.itemType);return typeof ne.N=="number"?`array<${ee}, ${ne.N}>`:ne.itemType.kind==="value"?"array":`array<${ee}>`}else return ne.kind}const valueMemberTypes=[NullType,NumberType,StringType,BooleanType,ColorType,ProjectionDefinitionType,FormattedType,ObjectType,array(ValueType),PaddingType,NumberArrayType,ColorArrayType,ResolvedImageType,VariableAnchorOffsetCollectionType];function checkSubtype(ne,ee){if(ee.kind==="error")return null;if(ne.kind==="array"){if(ee.kind==="array"&&(ee.N===0&&ee.itemType.kind==="value"||!checkSubtype(ne.itemType,ee.itemType))&&(typeof ne.N!="number"||ne.N===ee.N))return null}else{if(ne.kind===ee.kind)return null;if(ne.kind==="value"){for(const te of valueMemberTypes)if(!checkSubtype(te,ee))return null}}return`Expected ${typeToString(ne)} but found ${typeToString(ee)} instead.`}function isValidType(ne,ee){return ee.some(te=>te.kind===ne.kind)}function isValidNativeType(ne,ee){return ee.some(te=>te==="null"?ne===null:te==="array"?Array.isArray(ne):te==="object"?ne&&!Array.isArray(ne)&&typeof ne=="object":te===typeof ne)}function verifyType(ne,ee){return ne.kind==="array"&&ee.kind==="array"?ne.itemType.kind===ee.itemType.kind&&typeof ne.N=="number":ne.kind===ee.kind}const Xn=.96422,Yn=1,Zn=.82521,t0=4/29,t1=6/29,t2=3*t1*t1,t3=t1*t1*t1,deg2rad$1=Math.PI/180,rad2deg=180/Math.PI;function constrainAngle(ne){return ne=ne%360,ne<0&&(ne+=360),ne}function rgbToLab([ne,ee,te,st]){ne=rgb2xyz(ne),ee=rgb2xyz(ee),te=rgb2xyz(te);let ot,ct;const ut=xyz2lab((.2225045*ne+.7168786*ee+.0606169*te)/Yn);ne===ee&&ee===te?ot=ct=ut:(ot=xyz2lab((.4360747*ne+.3850649*ee+.1430804*te)/Xn),ct=xyz2lab((.0139322*ne+.0971045*ee+.7141733*te)/Zn));const dt=116*ut-16;return[dt<0?0:dt,500*(ot-ut),200*(ut-ct),st]}function rgb2xyz(ne){return ne<=.04045?ne/12.92:Math.pow((ne+.055)/1.055,2.4)}function xyz2lab(ne){return ne>t3?Math.pow(ne,1/3):ne/t2+t0}function labToRgb([ne,ee,te,st]){let ot=(ne+16)/116,ct=isNaN(ee)?ot:ot+ee/500,ut=isNaN(te)?ot:ot-te/200;return ot=Yn*lab2xyz(ot),ct=Xn*lab2xyz(ct),ut=Zn*lab2xyz(ut),[xyz2rgb(3.1338561*ct-1.6168667*ot-.4906146*ut),xyz2rgb(-.9787684*ct+1.9161415*ot+.033454*ut),xyz2rgb(.0719453*ct-.2289914*ot+1.4052427*ut),st]}function xyz2rgb(ne){return ne=ne<=.00304?12.92*ne:1.055*Math.pow(ne,1/2.4)-.055,ne<0?0:ne>1?1:ne}function lab2xyz(ne){return ne>t1?ne*ne*ne:t2*(ne-t0)}function rgbToHcl(ne){const[ee,te,st,ot]=rgbToLab(ne),ct=Math.sqrt(te*te+st*st);return[Math.round(ct*1e4)?constrainAngle(Math.atan2(st,te)*rad2deg):NaN,ct,ee,ot]}function hclToRgb([ne,ee,te,st]){return ne=isNaN(ne)?0:ne*deg2rad$1,labToRgb([te,Math.cos(ne)*ee,Math.sin(ne)*ee,st])}function hslToRgb([ne,ee,te,st]){ne=constrainAngle(ne),ee/=100,te/=100;function ot(ct){const ut=(ct+ne/30)%12,dt=ee*Math.min(te,1-te);return te-dt*Math.max(-1,Math.min(ut-3,9-ut,1))}return[ot(0),ot(8),ot(4),st]}const hasOwnProperty=Object.hasOwn||function(ee,te){return Object.prototype.hasOwnProperty.call(ee,te)};function getOwn(ne,ee){return hasOwnProperty(ne,ee)?ne[ee]:void 0}function parseCssColor(ne){if(ne=ne.toLowerCase().trim(),ne==="transparent")return[0,0,0,0];const ee=getOwn(namedColors,ne);if(ee){const[st,ot,ct]=ee;return[st/255,ot/255,ct/255,1]}if(ne.startsWith("#")&&/^#(?:[0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/.test(ne)){const st=ne.length<6?1:2;let ot=1;return[parseHex(ne.slice(ot,ot+=st)),parseHex(ne.slice(ot,ot+=st)),parseHex(ne.slice(ot,ot+=st)),parseHex(ne.slice(ot,ot+st)||"ff")]}if(ne.startsWith("rgb")){const st=ne.match(/^rgba?\(\s*([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/);if(st){const[ot,ct,ut,dt,ht,ft,pt,mt,yt,vt,_t,bt]=st,xt=[dt||" ",pt||" ",vt].join("");if(xt==="  "||xt==="  /"||xt===",,"||xt===",,,"){const Mt=[ut,ft,yt].join(""),Ot=Mt==="%%%"?100:Mt===""?255:0;if(Ot){const kt=[clamp(+ct/Ot,0,1),clamp(+ht/Ot,0,1),clamp(+mt/Ot,0,1),_t?parseAlpha(+_t,bt):1];if(validateNumbers(kt))return kt}}return}}const te=ne.match(/^hsla?\(\s*([\de.+-]+)(?:deg)?(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/);if(te){const[st,ot,ct,ut,dt,ht,ft,pt,mt]=te,yt=[ct||" ",dt||" ",ft].join("");if(yt==="  "||yt==="  /"||yt===",,"||yt===",,,"){const vt=[+ot,clamp(+ut,0,100),clamp(+ht,0,100),pt?parseAlpha(+pt,mt):1];if(validateNumbers(vt))return hslToRgb(vt)}}}function parseHex(ne){return parseInt(ne.padEnd(2,ne),16)/255}function parseAlpha(ne,ee){return clamp(ee?ne/100:ne,0,1)}function clamp(ne,ee,te){return Math.min(Math.max(ee,ne),te)}
95function validateNumbers(ne){return!ne.some(Number.isNaN)}const namedColors={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]};function interpolateNumber(ne,ee,te){return ne+te*(ee-ne)}function interpolateArray(ne,ee,te){return ne.map((st,ot)=>interpolateNumber(st,ee[ot],te))}var Po,Color=(Po=class{constructor(ee,te,st,ot=1,ct=!0){this.r=ee,this.g=te,this.b=st,this.a=ot,ct||(this.r*=ot,this.g*=ot,this.b*=ot,ot||this.overwriteGetter("rgb",[ee,te,st,ot]))}static parse(ee){if(ee instanceof Po)return ee;if(typeof ee!="string")return;const te=parseCssColor(ee);if(te)return new Po(...te,!1)}get rgb(){const{r:ee,g:te,b:st,a:ot}=this,ct=ot||1/0;return this.overwriteGetter("rgb",[ee/ct,te/ct,st/ct,ot])}get hcl(){return this.overwriteGetter("hcl",rgbToHcl(this.rgb))}get lab(){return this.overwriteGetter("lab",rgbToLab(this.rgb))}overwriteGetter(ee,te){return Object.defineProperty(this,ee,{value:te}),te}toString(){const[ee,te,st,ot]=this.rgb;return`rgba(${[ee,te,st].map(ct=>Math.round(ct*255)).join(",")},${ot})`}static interpolate(ee,te,st,ot="rgb"){switch(ot){case"rgb":{const[ct,ut,dt,ht]=interpolateArray(ee.rgb,te.rgb,st);return new Po(ct,ut,dt,ht,!1)}case"hcl":{const[ct,ut,dt,ht]=ee.hcl,[ft,pt,mt,yt]=te.hcl;let vt,_t;if(!isNaN(ct)&&!isNaN(ft)){let kt=ft-ct;ft>ct&&kt>180?kt-=360:ft<ct&&ct-ft>180&&(kt+=360),vt=ct+st*kt}else isNaN(ct)?isNaN(ft)?vt=NaN:(vt=ft,(dt===1||dt===0)&&(_t=pt)):(vt=ct,(mt===1||mt===0)&&(_t=ut));const[bt,xt,Mt,Ot]=hclToRgb([vt,_t??interpolateNumber(ut,pt,st),interpolateNumber(dt,mt,st),interpolateNumber(ht,yt,st)]);return new Po(bt,xt,Mt,Ot,!1)}case"lab":{const[ct,ut,dt,ht]=labToRgb(interpolateArray(ee.lab,te.lab,st));return new Po(ct,ut,dt,ht,!1)}}}},Po.black=new Po(0,0,0,1),Po.white=new Po(1,1,1,1),Po.transparent=new Po(0,0,0,0),Po.red=new Po(1,0,0,1),Po);const VERTICAL_ALIGN_OPTIONS=["bottom","center","top"];var FormattedSection=class{constructor(ne,ee,te,st,ot,ct){this.text=ne,this.image=ee,this.scale=te,this.fontStack=st,this.textColor=ot,this.verticalAlign=ct}},Formatted=class jl{constructor(ee){this.sections=ee}static fromString(ee){return new jl([new FormattedSection(ee,null,null,null,null,null)])}isEmpty(){return this.sections.length===0?!0:!this.sections.some(ee=>ee.text.length!==0||ee.image&&ee.image.name.length!==0)}static factory(ee){return ee instanceof jl?ee:jl.fromString(ee)}toString(){return this.sections.length===0?"":this.sections.map(ee=>ee.text).join("")}},Padding=class Pl{constructor(ee){this.values=ee.slice()}static parse(ee){if(ee instanceof Pl)return ee;if(typeof ee=="number")return new Pl([ee,ee,ee,ee]);if(Array.isArray(ee)&&!(ee.length<1||ee.length>4)){for(const te of ee)if(typeof te!="number")return;switch(ee.length){case 1:ee=[ee[0],ee[0],ee[0],ee[0]];break;case 2:ee=[ee[0],ee[1],ee[0],ee[1]];break;case 3:ee=[ee[0],ee[1],ee[2],ee[1]]}return new Pl(ee)}}toString(){return JSON.stringify(this.values)}static interpolate(ee,te,st){return new Pl(interpolateArray(ee.values,te.values,st))}},NumberArray=class xl{constructor(ee){this.values=ee.slice()}static parse(ee){if(ee instanceof xl)return ee;if(typeof ee=="number")return new xl([ee]);if(Array.isArray(ee)){for(const te of ee)if(typeof te!="number")return;return new xl(ee)}}toString(){return JSON.stringify(this.values)}static interpolate(ee,te,st){return new xl(interpolateArray(ee.values,te.values,st))}},ColorArray=class wl{constructor(ee){this.values=ee.slice()}static parse(ee){if(ee instanceof wl)return ee;if(typeof ee=="string"){const st=Color.parse(ee);return st?new wl([st]):void 0}if(!Array.isArray(ee))return;const te=[];for(const st of ee){if(typeof st!="string")return;const ot=Color.parse(st);if(!ot)return;te.push(ot)}return new wl(te)}toString(){return JSON.stringify(this.values)}static interpolate(ee,te,st,ot="rgb"){const ct=[];if(ee.values.length!=te.values.length)throw new Error(`colorArray: Arrays have mismatched length (${ee.values.length} vs. ${te.values.length}), cannot interpolate.`);for(let ut=0;ut<ee.values.length;ut++)ct.push(Color.interpolate(ee.values[ut],te.values[ut],st,ot));return new wl(ct)}}
95,RuntimeError=class extends Error{constructor(ne,ee){super(ne),this.name="RuntimeError",this.path=ee}toJSON(){return this.message}};const anchors=new Set(["center","left","right","top","bottom","top-left","top-right","bottom-left","bottom-right"]);var VariableAnchorOffsetCollection=class zl{constructor(ee){this.values=ee.slice()}static parse(ee){if(ee instanceof zl)return ee;if(!(!Array.isArray(ee)||ee.length<1||ee.length%2!==0)){for(let te=0;te<ee.length;te+=2){const st=ee[te],ot=ee[te+1];if(typeof st!="string"||!anchors.has(st)||!Array.isArray(ot)||ot.length!==2||typeof ot[0]!="number"||typeof ot[1]!="number")return}return new zl(ee)}}toString(){return JSON.stringify(this.values)}static interpolate(ee,te,st,ot){const ct=ee.values,ut=te.values;if(ct.length!==ut.length)throw new RuntimeError(`Cannot interpolate values of different length. from: ${ee.toString()}, to: ${te.toString()}`,ot);const dt=[];for(let ht=0;ht<ct.length;ht+=2){if(ct[ht]!==ut[ht])throw new RuntimeError(`Cannot interpolate values containing mismatched anchors. from[${ht}]: ${ct[ht]}, to[${ht}]: ${ut[ht]}`,ot);dt.push(ct[ht]);const[ft,pt]=ct[ht+1],[mt,yt]=ut[ht+1];dt.push([interpolateNumber(ft,mt,st),interpolateNumber(pt,yt,st)])}return new zl(dt)}},ResolvedImage=class _u{constructor(ee){this.name=ee.name,this.available=ee.available}toString(){return this.name}static fromString(ee){return ee?new _u({name:ee,available:!1}):null}},ProjectionDefinition=class gl{constructor(ee,te,st){this.from=ee,this.to=te,this.transition=st}toString(){return this.from===this.to&&this.transition===1?this.from:JSON.stringify([this.from,this.to,this.transition])}static interpolate(ee,te,st){return new gl(ee,te,st)}static parse(ee){if(ee instanceof gl)return ee;if(Array.isArray(ee)&&ee.length===3&&typeof ee[0]=="string"&&typeof ee[1]=="string"&&typeof ee[2]=="number")return new gl(ee[0],ee[1],ee[2]);if(typeof ee=="object"&&typeof ee.from=="string"&&typeof ee.to=="string"&&typeof ee.transition=="number")return new gl(ee.from,ee.to,ee.transition);if(typeof ee=="string")return new gl(ee,ee,1)}},Collator=class{constructor(ne,ee,te){ne?this.sensitivity=ee?"variant":"case":this.sensitivity=ee?"accent":"base",this.locale=te,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})}compare(ne,ee){return this.collator.compare(ne,ee)}resolvedLocale(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale}};function validateRGBA(ne,ee,te,st){return typeof ne=="number"&&ne>=0&&ne<=255&&typeof ee=="number"&&ee>=0&&ee<=255&&typeof te=="number"&&te>=0&&te<=255?typeof st>"u"||typeof st=="number"&&st>=0&&st<=1?null:`Invalid rgba value [${[ne,ee,te,st].join(", ")}]: 'a' must be between 0 and 1.`:`Invalid rgba value [${(typeof st=="number"?[ne,ee,te,st]:[ne,ee,te]).join(", ")}]: 'r', 'g', and 'b' must be between 0 and 255.`}function isValue(ne){if(ne===null||typeof ne=="string"||typeof ne=="boolean"||typeof ne=="number"||ne instanceof ProjectionDefinition||ne instanceof Color||ne instanceof Collator||ne instanceof Formatted||ne instanceof Padding||ne instanceof NumberArray||ne instanceof ColorArray||ne instanceof VariableAnchorOffsetCollection||ne instanceof ResolvedImage)return!0;if(Array.isArray(ne)){for(const ee of ne)if(!isValue(ee))return!1;return!0}else if(typeof ne=="object"){for(const ee in ne)if(!isValue(ne[ee]))return!1;return!0}else return!1}function typeOf(ne){if(ne===null)return NullType;if(typeof ne=="string")return StringType;if(typeof ne=="boolean")return BooleanType;if(typeof ne=="number")return NumberType;if(ne instanceof Color)return ColorType;if(ne instanceof ProjectionDefinition)return ProjectionDefinitionType;if(ne instanceof Collator)return CollatorType;if(ne instanceof Formatted)return FormattedType;if(ne instanceof Padding)return PaddingType;if(ne instanceof NumberArray)return NumberArrayType;if(ne instanceof ColorArray)return ColorArrayType;if(ne instanceof VariableAnchorOffsetCollection)return VariableAnchorOffsetCollectionType;if(ne instanceof ResolvedImage)return ResolvedImageType;if(Array.isArray(ne)){const ee=ne.length;let te;for(const st of ne){const ot=typeOf(st);if(!te)te=ot;else{if(te===ot)continue;te=ValueType;break}}return array(te||ValueType,ee)}else return ObjectType}function valueToString(ne){const ee=typeof ne;return ne===null?"":ee==="string"||ee==="number"||ee==="boolean"?String(ne):ne instanceof Color||ne instanceof ProjectionDefinition||ne instanceof Formatted||ne instanceof Padding||ne instanceof NumberArray||ne instanceof ColorArray||ne instanceof VariableAnchorOffsetCollection||ne instanceof ResolvedImage?ne.toString():JSON.stringify(ne)}var Literal=class Eu{constructor(ee,te){this.type=ee,this.value=te}static parse(ee,te){if(ee.length!==2)return te.error(`'literal' expression requires exactly one argument, but found ${ee.length-1} instead.`);if(!isValue(ee[1]))return te.error(`invalid value of type "${typeof ee[1]}"`);const st=ee[1];let ot=typeOf(st);const ct=te.expectedType;return ot.kind==="array"&&ot.N===0&&ct&&ct.kind==="array"&&(typeof ct.N!="number"||ct.N===0)&&(ot=ct),new Eu(ot,st)}evaluate(){return this.value}eachChild(){}outputDefined(){return!0}};const geometryTypes=["Unknown","Point","LineString","Polygon"];var EvaluationContext=class{constructor(){this.globals=null,this.feature=null,this.featureState=null,this.formattedSection=null,this._parseColorCache=new Map,this.availableImages=null,this.canonical=null}id(){return this.feature&&"id"in this.feature?this.feature.id:null}geometryType(){return this.feature?typeof this.feature.type=="number"?geometryTypes[this.feature.type]:this.feature.type:null}geometry(){return this.feature&&"geometry"in this.feature?this.feature.geometry:null}canonicalID(){return this.canonical}properties(){return this.feature&&this.feature.properties||{}}parseColor(ne){let ee=this._parseColorCache.get(ne);return ee||(ee=Color.parse(ne),this._parseColorCache.set(ne,ee)),ee}};function findStopLessThanOrEqualTo(ne,ee,te){const st=ne.length-1;let ot=0,ct=st,ut=0,dt,ht;
95for(;ot<=ct;)if(ut=Math.floor((ot+ct)/2),dt=ne[ut],ht=ne[ut+1],dt<=ee){if(ut===st||ee<ht)return ut;ot=ut+1}else if(dt>ee)ct=ut-1;else throw new RuntimeError("Input is not a number.",te);return 0}var Step=class Cu{constructor(ee,te,st,ot){this.type=ee,this.input=te,this.key=ot,this.labels=[],this.outputs=[];for(const[ct,ut]of st)this.labels.push(ct),this.outputs.push(ut)}static parse(ee,te){if(ee.length-1<4)return te.error(`Expected at least 4 arguments, but found only ${ee.length-1}.`);if((ee.length-1)%2!==0)return te.error("Expected an even number of arguments.");const st=te.parse(ee[1],1,NumberType);if(!st)return null;const ot=[];let ct=null;te.expectedType&&te.expectedType.kind!=="value"&&(ct=te.expectedType);for(let ut=1;ut<ee.length;ut+=2){const dt=ut===1?-1/0:ee[ut],ht=ee[ut+1],ft=ut,pt=ut+1;if(typeof dt!="number")return te.error('Input/output pairs for "step" expressions must be defined using literal numeric values (not computed expressions) for the input values.',ft);if(ot.length&&ot[ot.length-1][0]>=dt)return te.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',ft);const mt=te.parse(ht,pt,ct);if(!mt)return null;ct=ct||mt.type,ot.push([dt,mt])}return new Cu(ct,st,ot,te.key)}evaluate(ee){const te=this.labels,st=this.outputs;if(te.length===1)return st[0].evaluate(ee);const ot=this.input.evaluate(ee);if(ot<=te[0])return st[0].evaluate(ee);const ct=te.length;return ot>=te[ct-1]?st[ct-1].evaluate(ee):st[findStopLessThanOrEqualTo(te,ot,this.key)].evaluate(ee)}eachChild(ee){ee(this.input);for(const te of this.outputs)ee(te)}outputDefined(){return this.outputs.every(ee=>ee.outputDefined())}};function unitBezier(ne,ee,te,st){const ot=3*ne,ct=3*(te-ne)-ot,ut=1-ot-ct,dt=3*ee,ht=3*(st-ee)-dt,ft=1-dt-ht;return function(mt,yt=1e-6){if(mt<=0)return 0;if(mt>=1)return 1;let vt=mt;for(let xt=0;xt<8;xt++){const Mt=((ut*vt+ct)*vt+ot)*vt-mt;if(Math.abs(Mt)<yt)return((ft*vt+ht)*vt+dt)*vt;const Ot=(3*ut*vt+2*ct)*vt+ot;if(Math.abs(Ot)<1e-6)break;vt-=Mt/Ot}let _t=0,bt=1;vt=mt;for(let xt=0;xt<20;xt++){const Mt=((ut*vt+ct)*vt+ot)*vt;if(Math.abs(Mt-mt)<yt)break;mt>Mt?_t=vt:bt=vt,vt=(_t+bt)*.5}return((ft*vt+ht)*vt+dt)*vt}}var Interpolate=class Lc{constructor(ee,te,st,ot,ct,ut){this.type=ee,this.operator=te,this.interpolation=st,this.input=ot,this.key=ut,this.labels=[],this.outputs=[];for(const[dt,ht]of ct)this.labels.push(dt),this.outputs.push(ht)}static interpolationFactor(ee,te,st,ot){let ct=0;if(ee.name==="exponential")ct=exponentialInterpolation(te,ee.base,st,ot);else if(ee.name==="linear")ct=exponentialInterpolation(te,1,st,ot);else if(ee.name==="cubic-bezier"){const ut=ee.controlPoints;ct=unitBezier(ut[0],ut[1],ut[2],ut[3])(exponentialInterpolation(te,1,st,ot))}return ct}static parse(ee,te){let[st,ot,ct,...ut]=ee;if(!Array.isArray(ot)||ot.length===0)return te.error("Expected an interpolation type expression.",1);if(ot[0]==="linear")ot={name:"linear"};
95else if(ot[0]==="exponential"){const ft=ot[1];if(typeof ft!="number")return te.error("Exponential interpolation requires a numeric base.",1,1);ot={name:"exponential",base:ft}}else if(ot[0]==="cubic-bezier"){const ft=ot.slice(1);if(ft.length!==4||ft.some(pt=>typeof pt!="number"||pt<0||pt>1))return te.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);ot={name:"cubic-bezier",controlPoints:ft}}else return te.error(`Unknown interpolation type ${String(ot[0])}`,1,0);if(ee.length-1<4)return te.error(`Expected at least 4 arguments, but found only ${ee.length-1}.`);if((ee.length-1)%2!==0)return te.error("Expected an even number of arguments.");if(ct=te.parse(ct,2,NumberType),!ct)return null;const dt=[];let ht=null;(st==="interpolate-hcl"||st==="interpolate-lab")&&te.expectedType!=ColorArrayType?ht=ColorType:te.expectedType&&te.expectedType.kind!=="value"&&(ht=te.expectedType);for(let ft=0;ft<ut.length;ft+=2){const pt=ut[ft],mt=ut[ft+1],yt=ft+3,vt=ft+4;if(typeof pt!="number")return te.error('Input/output pairs for "interpolate" expressions must be defined using literal numeric values (not computed expressions) for the input values.',yt);if(dt.length&&dt[dt.length-1][0]>=pt)return te.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',yt);const _t=te.parse(mt,vt,ht);if(!_t)return null;ht=ht||_t.type,dt.push([pt,_t])}return!verifyType(ht,NumberType)&&!verifyType(ht,ProjectionDefinitionType)&&!verifyType(ht,ColorType)&&!verifyType(ht,PaddingType)&&!verifyType(ht,NumberArrayType)&&!verifyType(ht,ColorArrayType)&&!verifyType(ht,VariableAnchorOffsetCollectionType)&&!verifyType(ht,array(NumberType))?te.error(`Type ${typeToString(ht)} is not interpolatable.`):new Lc(ht,st,ot,ct,dt,te.key)}evaluate(ee){const te=this.labels,st=this.outputs;if(te.length===1)return st[0].evaluate(ee);const ot=this.input.evaluate(ee);if(ot<=te[0])return st[0].evaluate(ee);const ct=te.length;if(ot>=te[ct-1])return st[ct-1].evaluate(ee);const ut=findStopLessThanOrEqualTo(te,ot,this.key),dt=te[ut],ht=te[ut+1],ft=Lc.interpolationFactor(this.interpolation,ot,dt,ht),pt=st[ut].evaluate(ee),mt=st[ut+1].evaluate(ee);switch(this.operator){case"interpolate":switch(this.type.kind){case"number":return interpolateNumber(pt,mt,ft);case"color":return Color.interpolate(pt,mt,ft);case"padding":return Padding.interpolate(pt,mt,ft);case"colorArray":return ColorArray.interpolate(pt,mt,ft);case"numberArray":return NumberArray.interpolate(pt,mt,ft);case"variableAnchorOffsetCollection":return VariableAnchorOffsetCollection.interpolate(pt,mt,ft,this.key);case"array":return interpolateArray(pt,mt,ft);case"projectionDefinition":return ProjectionDefinition.interpolate(pt,mt,ft)}case"interpolate-hcl":switch(this.type.kind){case"color":return Color.interpolate(pt,mt,ft,"hcl");case"colorArray":return ColorArray.interpolate(pt,mt,ft,"hcl")}case"interpolate-lab":switch(this.type.kind){case"color":return Color.interpolate(pt,mt,ft,"lab");case"colorArray":return ColorArray.interpolate(pt,mt,ft,"lab")}}}eachChild(ee){ee(this.input);for(const te of this.outputs)ee(te)}outputDefined(){return this.outputs.every(ee=>ee.outputDefined())}};function exponentialInterpolation(ne,ee,te,st){const ot=st-te,ct=ne-te;return ot===0?0:ee===1?ct/ot:(Math.pow(ee,ct)-1)/(Math.pow(ee,ot)-1)}var FormatExpression=class Su{constructor(ee){this.type=FormattedType,this.sections=ee}static parse(ee,te){if(ee.length<2)return te.error("Expected at least one argument.");const st=ee[1];if(!Array.isArray(st)&&typeof st=="object")return te.error("First argument must be an image or text section.");const ot=[];let ct=!1;for(let ut=1;ut<=ee.length-1;++ut){const dt=ee[ut];if(ct&&typeof dt=="object"&&!Array.isArray(dt)){ct=!1;let ht=null;if(dt["font-scale"]&&(ht=te.parse(dt["font-scale"],1,NumberType),!ht))return null;let ft=null;if(dt["text-font"]&&(ft=te.parse(dt["text-font"],1,array(StringType)),!ft))return null;let pt=null;if(dt["text-color"]&&(pt=te.parse(dt["text-color"],1,ColorType),!pt))return null;let mt=null;if(dt["vertical-align"]){if(typeof dt["vertical-align"]=="string"&&!VERTICAL_ALIGN_OPTIONS.includes(dt["vertical-align"]))return te.error(`'vertical-align' must be one of: 'bottom', 'center', 'top' but found '${dt["vertical-align"]}' instead.`);if(mt=te.parse(dt["vertical-align"],1,StringType),!mt)return null}const yt=ot[ot.length-1];yt.scale=ht,yt.font=ft,yt.textColor=pt,yt.verticalAlign=mt}else{const ht=te.parse(ee[ut],1,ValueType);if(!ht)return null;
95const ft=ht.type.kind;if(ft!=="string"&&ft!=="value"&&ft!=="null"&&ft!=="resolvedImage")return te.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");ct=!0,ot.push({content:ht,scale:null,font:null,textColor:null,verticalAlign:null})}}return new Su(ot)}evaluate(ee){const te=st=>{const ot=st.content.evaluate(ee);return typeOf(ot)===ResolvedImageType?new FormattedSection("",ot,null,null,null,st.verticalAlign?st.verticalAlign.evaluate(ee):null):new FormattedSection(valueToString(ot),null,st.scale?st.scale.evaluate(ee):null,st.font?st.font.evaluate(ee).join(","):null,st.textColor?st.textColor.evaluate(ee):null,st.verticalAlign?st.verticalAlign.evaluate(ee):null)};return new Formatted(this.sections.map(te))}eachChild(ee){for(const te of this.sections)ee(te.content),te.scale&&ee(te.scale),te.font&&ee(te.font),te.textColor&&ee(te.textColor),te.verticalAlign&&ee(te.verticalAlign)}outputDefined(){return!1}};function classifyRings(ne,ee){if(ne.length<=1)return[ne];const te=[];let st,ot;for(const ct of ne){const ut=calculateSignedArea(ct);ut!==0&&(ct.area=Math.abs(ut),ot===void 0&&(ot=ut<0),ot===ut<0?(st&&te.push(st),st=[ct]):st.push(ct))}return st&&te.push(st),te}function calculateSignedArea(ne){let ee=0;for(let te=0,st=ne.length,ot=st-1,ct,ut;te<st;ot=te++)ct=ne[te],ut=ne[ot],ee+=(ut.x-ct.x)*(ct.y+ut.y);return ee}const types$3={string:StringType,number:NumberType,boolean:BooleanType,object:ObjectType};var Assertion=class bu{constructor(ee,te,st){this.type=ee,this.args=te,this.key=st}static parse(ee,te){if(ee.length<2)return te.error("Expected at least one argument.");let st=1,ot;const ct=ee[0];if(ct==="array"){let dt;if(ee.length>2){const ft=ee[1];if(typeof ft!="string"||!(ft in types$3)||ft==="object")return te.error('The item type argument of "array" must be one of string, number, boolean',1);dt=types$3[ft],st++}else dt=ValueType;let ht;if(ee.length>3){if(ee[2]!==null&&(typeof ee[2]!="number"||ee[2]<0||ee[2]!==Math.floor(ee[2])))return te.error('The length argument to "array" must be a positive integer literal',2);ht=ee[2],st++}ot=array(dt,ht)}else{if(!types$3[ct])throw new Error(`Types doesn't contain name = ${ct}`);ot=types$3[ct]}const ut=[];for(;st<ee.length;st++){const dt=te.parse(ee[st],st,ValueType);if(!dt)return null;ut.push(dt)}return new bu(ot,ut,te.key)}evaluate(ee){for(let te=0;te<this.args.length;te++){const st=this.args[te].evaluate(ee);if(checkSubtype(this.type,typeOf(st))){if(te===this.args.length-1)throw new RuntimeError(`Expected value to be of type ${typeToString(this.type)}, but found ${typeToString(typeOf(st))} instead.`,this.key)}else return st}throw new Error}eachChild(ee){this.args.forEach(ee)}outputDefined(){return this.args.every(ee=>ee.outputDefined())}};const types$2={"to-boolean":BooleanType,"to-color":ColorType,"to-number":NumberType,"to-string":StringType};var Coercion=class Iu{constructor(ee,te,st){this.type=ee,this.args=te,this.key=st}static parse(ee,te){if(ee.length<2)return te.error("Expected at least one argument.");const st=ee[0];if(!types$2[st])throw new Error(`Can't parse ${st} as it is not part of the known types`);if((st==="to-boolean"||st==="to-string")&&ee.length!==2)return te.error("Expected one argument.");const ot=types$2[st],ct=[];for(let ut=1;ut<ee.length;ut++){const dt=te.parse(ee[ut],ut,ValueType);if(!dt)return null;ct.push(dt)}return new Iu(ot,ct,te.key)}evaluate(ee){switch(this.type.kind){case"boolean":return!!this.args[0].evaluate(ee);case"color":{let te,st;for(const ot of this.args){if(te=ot.evaluate(ee),st=null,te instanceof Color)return te;if(typeof te=="string"){const ct=ee.parseColor(te);if(ct)return ct}else if(Array.isArray(te)&&(te.length<3||te.length>4?st=`Invalid rgba value ${JSON.stringify(te)}: expected an array containing either three or four numeric values.`:st=validateRGBA(te[0],te[1],te[2],te[3]),!st))return new Color(te[0]/255,te[1]/255,te[2]/255,te[3])}throw new RuntimeError(st||`Could not parse color from value '${typeof te=="string"?te:JSON.stringify(te)}'`,this.key)}case"padding":{let te;for(const st of this.args){te=st.evaluate(ee);const ot=Padding.parse(te);if(ot)return ot}throw new RuntimeError(`Could not parse padding from value '${typeof te=="string"?te:JSON.stringify(te)}'`,this.key)}case"numberArray":{let te;for(const st of this.args){te=st.evaluate(ee);const ot=NumberArray.parse(te);if(ot)return ot}throw new RuntimeError(`Could not parse numberArray from value '${typeof te=="string"?te:JSON.stringify(te)}'`,this.key)}case"colorArray":{let te;for(const st of this.args){te=st.evaluate(ee);const ot=ColorArray.parse(te);if(ot)return ot}throw new RuntimeError(`Could not parse colorArray from value '${typeof te=="string"?te:JSON.stringify(te)}'`,this.key)}case"variableAnchorOffsetCollection":{let te;for(const st of this.args){te=st.evaluate(ee);const ot=VariableAnchorOffsetCollection.parse(te);if(ot)return ot}throw new RuntimeError(`Could not parse variableAnchorOffsetCollection from value '${typeof te=="string"?te:JSON.stringify(te)}'`,this.key)}case"number":{let te=null;for(const st of this.args){if(te=st.evaluate(ee),te===null)return 0;const ot=Number(te);if(!isNaN(ot))return ot}throw new RuntimeError(`Could not convert ${JSON.stringify(te)} to number.`,this.key)}case"formatted":return Formatted.fromString(valueToString(this.args[0].evaluate(ee)));case"resolvedImage":return ResolvedImage.fromString(valueToString(this.args[0].evaluate(ee)));case"projectionDefinition":{const te=this.args[0].evaluate(ee);if(ProjectionDefinition.parse(te))return te;throw new RuntimeError(`Could not parse projectionDefinition from value '${typeof te=="string"?te:JSON.stringify(te)}'`,this.key)}default:return valueToString(this.args[0].evaluate(ee))}}
95eachChild(ee){this.args.forEach(ee)}outputDefined(){return this.args.every(ee=>ee.outputDefined())}},Let=class Pu{constructor(ee,te){this.type=te.type,this.bindings=[].concat(ee),this.result=te}evaluate(ee){return this.result.evaluate(ee)}eachChild(ee){for(const te of this.bindings)ee(te[1]);ee(this.result)}static parse(ee,te){if(ee.length<4)return te.error(`Expected at least 3 arguments, but found ${ee.length-1} instead.`);const st=[];for(let ct=1;ct<ee.length-1;ct+=2){const ut=ee[ct];if(typeof ut!="string")return te.error(`Expected string, but found ${typeof ut} instead.`,ct);if(/[^a-zA-Z0-9_]/.test(ut))return te.error("Variable names must contain only alphanumeric characters or '_'.",ct);const dt=te.parse(ee[ct+1],ct+1);if(!dt)return null;st.push([ut,dt])}const ot=te.parse(ee[ee.length-1],ee.length-1,te.expectedType,st);return ot?new Pu(st,ot):null}outputDefined(){return this.result.outputDefined()}},Var=class xu{constructor(ee,te){this.type=te.type,this.name=ee,this.boundExpression=te}static parse(ee,te){if(ee.length!==2||typeof ee[1]!="string")return te.error("'var' expression requires exactly one string literal argument.");const st=ee[1];return te.scope.has(st)?new xu(st,te.scope.get(st)):te.error(`Unknown variable "${st}". Make sure "${st}" has been bound in an enclosing "let" expression before using it.`,1)}evaluate(ee){return this.boundExpression.evaluate(ee)}eachChild(){}outputDefined(){return!1}},At=class wu{constructor(ee,te,st,ot){this.type=ee,this.index=te,this.input=st,this.key=ot}static parse(ee,te){if(ee.length!==3)return te.error(`Expected 2 arguments, but found ${ee.length-1} instead.`);const st=te.parse(ee[1],1,NumberType),ot=te.parse(ee[2],2,array(te.expectedType||ValueType));if(!st||!ot)return null;const ct=ot.type;return new wu(ct.itemType,st,ot,te.key)}evaluate(ee){const te=this.index.evaluate(ee),st=this.input.evaluate(ee);if(te<0)throw new RuntimeError(`Array index out of bounds: ${te} < 0.`,this.key);if(te>=st.length)throw new RuntimeError(`Array index out of bounds: ${te} > ${st.length-1}.`,this.key);if(te!==Math.floor(te))throw new RuntimeError(`Array index must be an integer, but found ${te} instead.`,this.key);return st[te]}eachChild(ee){ee(this.index),ee(this.input)}outputDefined(){return!1}},In=class Tu{constructor(ee,te,st){this.needle=ee,this.haystack=te,this.key=st,this.type=BooleanType}static parse(ee,te){if(ee.length!==3)return te.error(`Expected 2 arguments, but found ${ee.length-1} instead.`);const st=te.parse(ee[1],1,ValueType),ot=te.parse(ee[2],2,ValueType);return!st||!ot?null:isValidType(st.type,[BooleanType,StringType,NumberType,NullType,ValueType])?new Tu(st,ot,te.key):te.error(`Expected first argument to be of type boolean, string, number or null, but found ${typeToString(st.type)} instead`)}evaluate(ee){const te=this.needle.evaluate(ee),st=this.haystack.evaluate(ee);if(!st)return!1;if(!isValidNativeType(te,["boolean","string","number","null"]))throw new RuntimeError(`Expected first argument to be of type boolean, string, number or null, but found ${typeToString(typeOf(te))} instead.`,this.key);if(!isValidNativeType(st,["string","array"]))throw new RuntimeError(`Expected second argument to be of type array or string, but found ${typeToString(typeOf(st))} instead.`,this.key);return st.indexOf(te)>=0}eachChild(ee){ee(this.needle),ee(this.haystack)}outputDefined(){return!0}},IndexOf=class Mc{constructor(ee,te,st,ot){this.needle=ee,this.haystack=te,this.key=st,this.fromIndex=ot,this.type=NumberType}static parse(ee,te){if(ee.length<=2||ee.length>=5)return te.error(`Expected 2 or 3 arguments, but found ${ee.length-1} instead.`);const st=te.parse(ee[1],1,ValueType),ot=te.parse(ee[2],2,ValueType);if(!st||!ot)return null;if(!isValidType(st.type,[BooleanType,StringType,NumberType,NullType,ValueType]))return te.error(`Expected first argument to be of type boolean, string, number or null, but found ${typeToString(st.type)} instead`);if(ee.length===4){const ct=te.parse(ee[3],3,NumberType);return ct?new Mc(st,ot,te.key,ct):null}else return new Mc(st,ot,te.key)}evaluate(ee){const te=this.needle.evaluate(ee),st=this.haystack.evaluate(ee);if(!isValidNativeType(te,["boolean","string","number","null"]))throw new RuntimeError(`Expected first argument to be of type boolean, string, number or null, but found ${typeToString(typeOf(te))} instead.`,this.key);let ot;if(this.fromIndex&&(ot=this.fromIndex.evaluate(ee)),isValidNativeType(st,["string"])){const ct=st.indexOf(te,ot);return ct===-1?-1:[...st.slice(0,ct)].length}else{if(isValidNativeType(st,["array"]))return st.indexOf(te,ot);throw new RuntimeError(`Expected second argument to be of type array or string, but found ${typeToString(typeOf(st))} instead.`,this.key)}}eachChild(ee){ee(this.needle),ee(this.haystack),this.fromIndex&&ee(this.fromIndex)}outputDefined(){return!1}},Match=class Ru{constructor(ee,te,st,ot,ct,ut){this.inputType=ee,this.type=te,this.input=st,this.cases=ot,this.outputs=ct,this.otherwise=ut}static parse(ee,te){if(ee.length<5)return te.error(`Expected at least 4 arguments, but found only ${ee.length-1}.`);if(ee.length%2!==1)return te.error("Expected an even number of arguments.");let st,ot;te.expectedType&&te.expectedType.kind!=="value"&&(ot=te.expectedType);const ct={},ut=[];for(let ft=2;ft<ee.length-1;ft+=2){let pt=ee[ft];const mt=ee[ft+1];Array.isArray(pt)||(pt=[pt]);const yt=te.concat(ft);if(pt.length===0)return yt.error("Expected at least one branch label.");for(const _t of pt){if(typeof _t!="number"&&typeof _t!="string")return yt.error("Branch labels must be numbers or strings.");if(typeof _t=="number"&&Math.abs(_t)>Number.MAX_SAFE_INTEGER)return yt.error(`Branch labels must be integers no larger than ${Number.MAX_SAFE_INTEGER}.`);if(typeof _t=="number"&&Math.floor(_t)!==_t)return yt.error("Numeric branch labels must be integer values.");if(!st)st=typeOf(_t);else if(yt.checkSubtype(st,typeOf(_t)))return null;if(typeof ct[String(_t)]<"u")return yt.error("Branch labels must be unique.");ct[String(_t)]=ut.length}const vt=te.parse(mt,ft,ot);if(!vt)return null;
95ot=ot||vt.type,ut.push(vt)}const dt=te.parse(ee[1],1,ValueType);if(!dt)return null;const ht=te.parse(ee[ee.length-1],ee.length-1,ot);return!ht||dt.type.kind!=="value"&&te.concat(1).checkSubtype(st,dt.type)?null:new Ru(st,ot,dt,ct,ut,ht)}evaluate(ee){const te=this.input.evaluate(ee);return(typeOf(te)===this.inputType&&this.outputs[this.cases[te]]||this.otherwise).evaluate(ee)}eachChild(ee){ee(this.input),this.outputs.forEach(ee),ee(this.otherwise)}outputDefined(){return this.outputs.every(ee=>ee.outputDefined())&&this.otherwise.outputDefined()}},Case=class Lu{constructor(ee,te,st){this.type=ee,this.branches=te,this.otherwise=st}static parse(ee,te){if(ee.length<4)return te.error(`Expected at least 3 arguments, but found only ${ee.length-1}.`);if(ee.length%2!==0)return te.error("Expected an odd number of arguments.");let st;te.expectedType&&te.expectedType.kind!=="value"&&(st=te.expectedType);const ot=[];for(let ut=1;ut<ee.length-1;ut+=2){const dt=te.parse(ee[ut],ut,BooleanType);if(!dt)return null;const ht=te.parse(ee[ut+1],ut+1,st);if(!ht)return null;ot.push([dt,ht]),st=st||ht.type}const ct=te.parse(ee[ee.length-1],ee.length-1,st);if(!ct)return null;if(!st)throw new Error("Can't infer output type");return new Lu(st,ot,ct)}evaluate(ee){for(const[te,st]of this.branches)if(te.evaluate(ee))return st.evaluate(ee);return this.otherwise.evaluate(ee)}eachChild(ee){for(const[te,st]of this.branches)ee(te),ee(st);ee(this.otherwise)}outputDefined(){return this.branches.every(([ee,te])=>te.outputDefined())&&this.otherwise.outputDefined()}},Slice=class Oc{constructor(ee,te,st,ot,ct){this.type=ee,this.input=te,this.beginIndex=st,this.key=ot,this.endIndex=ct}static parse(ee,te){if(ee.length<=2||ee.length>=5)return te.error(`Expected 2 or 3 arguments, but found ${ee.length-1} instead.`);const st=te.parse(ee[1],1,ValueType),ot=te.parse(ee[2],2,NumberType);if(!st||!ot)return null;if(!isValidType(st.type,[array(ValueType),StringType,ValueType]))return te.error(`Expected first argument to be of type array or string, but found ${typeToString(st.type)} instead`);if(ee.length===4){const ct=te.parse(ee[3],3,NumberType);return ct?new Oc(st.type,st,ot,te.key,ct):null}else return new Oc(st.type,st,ot,te.key)}evaluate(ee){const te=this.input.evaluate(ee),st=this.beginIndex.evaluate(ee);let ot;if(this.endIndex&&(ot=this.endIndex.evaluate(ee)),isValidNativeType(te,["string"]))return[...te].slice(st,ot).join("");if(isValidNativeType(te,["array"]))return te.slice(st,ot);throw new RuntimeError(`Expected first argument to be of type array or string, but found ${typeToString(typeOf(te))} instead.`,this.key)}eachChild(ee){ee(this.input),ee(this.beginIndex),this.endIndex&&ee(this.endIndex)}outputDefined(){return!1}},Coalesce=class kc{constructor(ee,te){this.type=ee,this.args=te}static parse(ee,te){if(ee.length<2)return te.error("Expected at least one argument.");let st=null;const ot=te.expectedType;ot&&ot.kind!=="value"&&(st=ot);const ct=[];for(const ut of ee.slice(1)){const dt=te.parse(ut,1+ct.length,st,void 0,{typeAnnotation:"omit"});if(!dt)return null;st=st||dt.type,ct.push(dt)}if(!st)throw new Error("No output type");return ot&&ct.some(ut=>checkSubtype(ot,ut.type))?new kc(ValueType,ct):new kc(st,ct)}evaluate(ee){let te=null,st=0,ot;for(const ct of this.args)if(st++,te=ct.evaluate(ee),te&&te instanceof ResolvedImage&&!te.available&&(ot||(ot=te.name),te=null,st===this.args.length&&(te=ot)),te!==null)break;return te}eachChild(ee){this.args.forEach(ee)}outputDefined(){return this.args.every(ee=>ee.outputDefined())}};function isComparableType(ne,ee){return ne==="=="||ne==="!="?ee.kind==="boolean"||ee.kind==="string"||ee.kind==="number"||ee.kind==="null"||ee.kind==="value":ee.kind==="string"||ee.kind==="number"||ee.kind==="value"}function eq(ne,ee,te){return ee===te}function neq(ne,ee,te){return ee!==te}function lt(ne,ee,te){return ee<te}function gt(ne,ee,te){return ee>te}function lteq(ne,ee,te){return ee<=te}function gteq(ne,ee,te){return ee>=te}function eqCollate(ne,ee,te,st){return st.compare(ee,te)===0}function neqCollate(ne,ee,te,st){return!eqCollate(ne,ee,te,st)}function ltCollate(ne,ee,te,st){return st.compare(ee,te)<0}function gtCollate(ne,ee,te,st){return st.compare(ee,te)>0}function lteqCollate(ne,ee,te,st){return st.compare(ee,te)<=0}function gteqCollate(ne,ee,te,st){return st.compare(ee,te)>=0}function makeComparison(ne,ee,te){const st=ne!=="=="&&ne!=="!=";return class Ou{constructor(ct,ut,dt,ht){this.lhs=ct,this.rhs=ut,this.key=dt,this.collator=ht,this.type=BooleanType,this.hasUntypedArgument=ct.type.kind==="value"||ut.type.kind==="value"}static parse(ct,ut){if(ct.length!==3&&ct.length!==4)return ut.error("Expected two or three arguments.");const dt=ct[0];let ht=ut.parse(ct[1],1,ValueType);if(!ht)return null;if(!isComparableType(dt,ht.type))return ut.concat(1).error(`"${dt}" comparisons are not supported for type '${typeToString(ht.type)}'.`);let ft=ut.parse(ct[2],2,ValueType);if(!ft)return null;if(!isComparableType(dt,ft.type))return ut.concat(2).error(`"${dt}" comparisons are not supported for type '${typeToString(ft.type)}'.`);if(ht.type.kind!==ft.type.kind&&ht.type.kind!=="value"&&ft.type.kind!=="value")return ut.error(`Cannot compare types '${typeToString(ht.type)}' and '${typeToString(ft.type)}'.`);st&&(ht.type.kind==="value"&&ft.type.kind!=="value"?ht=new Assertion(ft.type,[ht],ut.key):ht.type.kind!=="value"&&ft.type.kind==="value"&&(ft=new Assertion(ht.type,[ft],ut.key)));let pt=null;if(ct.length===4){if(ht.type.kind!=="string"&&ft.type.kind!=="string"&&ht.type.kind!=="value"&&ft.type.kind!=="value")return ut.error("Cannot use collator to compare non-string types.");if(pt=ut.parse(ct[3],3,CollatorType),!pt)return null}return new Ou(ht,ft,ut.key,pt)}evaluate(ct){const ut=this.lhs.evaluate(ct),dt=this.rhs.evaluate(ct);if(st&&this.hasUntypedArgument){const ht=typeOf(ut),ft=typeOf(dt);
95if(ht.kind!==ft.kind||!(ht.kind==="string"||ht.kind==="number"))throw new RuntimeError(`Expected arguments for "${ne}" to be (string, string) or (number, number), but found (${ht.kind}, ${ft.kind}) instead.`,this.key)}if(this.collator&&!st&&this.hasUntypedArgument){const ht=typeOf(ut),ft=typeOf(dt);if(ht.kind!=="string"||ft.kind!=="string")return ee(ct,ut,dt)}return this.collator?te(ct,ut,dt,this.collator.evaluate(ct)):ee(ct,ut,dt)}eachChild(ct){ct(this.lhs),ct(this.rhs),this.collator&&ct(this.collator)}outputDefined(){return!0}}}const Equals=makeComparison("==",eq,eqCollate),NotEquals=makeComparison("!=",neq,neqCollate),LessThan=makeComparison("<",lt,ltCollate),GreaterThan=makeComparison(">",gt,gtCollate),LessThanOrEqual=makeComparison("<=",lteq,lteqCollate),GreaterThanOrEqual=makeComparison(">=",gteq,gteqCollate);var CollatorExpression=class Du{constructor(ee,te,st){this.type=CollatorType,this.locale=st,this.caseSensitive=ee,this.diacriticSensitive=te}static parse(ee,te){if(ee.length!==2)return te.error("Expected one argument.");const st=ee[1];if(typeof st!="object"||Array.isArray(st))return te.error("Collator options argument must be an object.");const ot=te.parse(st["case-sensitive"]===void 0?!1:st["case-sensitive"],1,BooleanType);if(!ot)return null;const ct=te.parse(st["diacritic-sensitive"]===void 0?!1:st["diacritic-sensitive"],1,BooleanType);if(!ct)return null;let ut=null;return st.locale&&(ut=te.parse(st.locale,1,StringType),!ut)?null:new Du(ot,ct,ut)}evaluate(ee){return new Collator(this.caseSensitive.evaluate(ee),this.diacriticSensitive.evaluate(ee),this.locale?this.locale.evaluate(ee):null)}eachChild(ee){ee(this.caseSensitive),ee(this.diacriticSensitive),this.locale&&ee(this.locale)}outputDefined(){return!1}},NumberFormat=class Gu{constructor(ee,te,st,ot,ct,ut){this.type=StringType,this.number=ee,this.locale=te,this.currency=st,this.unit=ot,this.minFractionDigits=ct,this.maxFractionDigits=ut}static parse(ee,te){if(ee.length!==3)return te.error("Expected two arguments.");const st=te.parse(ee[1],1,NumberType);if(!st)return null;const ot=ee[2];if(typeof ot!="object"||Array.isArray(ot))return te.error("NumberFormat options argument must be an object.");let ct=null;if(ot.locale&&(ct=te.parse(ot.locale,1,StringType),!ct))return null;let ut=null;if(ot.currency&&(ut=te.parse(ot.currency,1,StringType),!ut))return null;let dt=null;if(ot.unit&&(dt=te.parse(ot.unit,1,StringType),!dt))return null;if(ut&&dt)return te.error("NumberFormat options `currency` and `unit` are mutually exclusive");let ht=null;if(ot["min-fraction-digits"]&&(ht=te.parse(ot["min-fraction-digits"],1,NumberType),!ht))return null;let ft=null;return ot["max-fraction-digits"]&&(ft=te.parse(ot["max-fraction-digits"],1,NumberType),!ft)?null:new Gu(st,ct,ut,dt,ht,ft)}evaluate(ee){return new Intl.NumberFormat(this.locale?this.locale.evaluate(ee):[],{style:this.currency?"currency":this.unit?"unit":"decimal",currency:this.currency?this.currency.evaluate(ee):void 0,unit:this.unit?this.unit.evaluate(ee):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(ee):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(ee):void 0}).format(this.number.evaluate(ee))}eachChild(ee){ee(this.number),this.locale&&ee(this.locale),this.currency&&ee(this.currency),this.unit&&ee(this.unit),this.minFractionDigits&&ee(this.minFractionDigits),this.maxFractionDigits&&ee(this.maxFractionDigits)}outputDefined(){return!1}},ImageExpression=class Fu{constructor(ee){this.type=ResolvedImageType,this.input=ee}static parse(ee,te){if(ee.length!==2)return te.error("Expected two arguments.");const st=te.parse(ee[1],1,StringType);return st?new Fu(st):te.error("No image name provided.")}evaluate(ee){const te=this.input.evaluate(ee),st=ResolvedImage.fromString(te);return st&&ee.availableImages&&(st.available=ee.availableImages.indexOf(te)>-1),st}eachChild(ee){ee(this.input)}outputDefined(){return!1}},Length=class $u{constructor(ee,te){this.input=ee,this.key=te,this.type=NumberType}static parse(ee,te){if(ee.length!==2)return te.error(`Expected 1 argument, but found ${ee.length-1} instead.`);const st=te.parse(ee[1],1);return st?st.type.kind!=="array"&&st.type.kind!=="string"&&st.type.kind!=="value"?te.error(`Expected argument of type string or array, but found ${typeToString(st.type)} instead.`):new $u(st,te.key):null}evaluate(ee){const te=this.input.evaluate(ee);if(typeof te=="string")return[...te].length;if(Array.isArray(te))return te.length;throw new RuntimeError(`Expected value to be of type string or array, but found ${typeToString(typeOf(te))} instead.`,this.key)}eachChild(ee){ee(this.input)}outputDefined(){return!1}};const EXTENT=8192;function getTileCoordinates(ne,ee){const te=mercatorXfromLng(ne[0]),st=mercatorYfromLat(ne[1]),ot=Math.pow(2,ee.z);return[Math.round(te*ot*EXTENT),Math.round(st*ot*EXTENT)]}function getLngLatFromTileCoord(ne,ee){const te=Math.pow(2,ee.z),st=(ne[0]/EXTENT+ee.x)/te,ot=(ne[1]/EXTENT+ee.y)/te;return[lngFromMercatorXfromLng(st),latFromMercatorY(ot)]}function mercatorXfromLng(ne){return(180+ne)/360}function lngFromMercatorXfromLng(ne){return ne*360-180}function mercatorYfromLat(ne){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+ne*Math.PI/360)))/360}function latFromMercatorY(ne){return 360/Math.PI*Math.atan(Math.exp((180-ne*360)*Math.PI/180)
95)-90}function updateBBox(ne,ee){ne[0]=Math.min(ne[0],ee[0]),ne[1]=Math.min(ne[1],ee[1]),ne[2]=Math.max(ne[2],ee[0]),ne[3]=Math.max(ne[3],ee[1])}function boxWithinBox(ne,ee){return!(ne[0]<=ee[0]||ne[2]>=ee[2]||ne[1]<=ee[1]||ne[3]>=ee[3])}function rayIntersect(ne,ee,te){return ee[1]>ne[1]!=te[1]>ne[1]&&ne[0]<(te[0]-ee[0])*(ne[1]-ee[1])/(te[1]-ee[1])+ee[0]}function pointOnBoundary(ne,ee,te){const st=ne[0]-ee[0],ot=ne[1]-ee[1],ct=ne[0]-te[0],ut=ne[1]-te[1];return st*ut-ct*ot===0&&st*ct<=0&&ot*ut<=0}function segmentIntersectSegment(ne,ee,te,st){const ot=[ee[0]-ne[0],ee[1]-ne[1]];return perp([st[0]-te[0],st[1]-te[1]],ot)===0?!1:!!(twoSided(ne,ee,te,st)&&twoSided(te,st,ne,ee))}function lineIntersectPolygon(ne,ee,te){for(const st of te)for(let ot=0;ot<st.length-1;++ot)if(segmentIntersectSegment(ne,ee,st[ot],st[ot+1]))return!0;return!1}function pointWithinPolygon(ne,ee,te=!1){let st=!1;for(const ot of ee)for(let ct=0;ct<ot.length-1;ct++){if(pointOnBoundary(ne,ot[ct],ot[ct+1]))return te;rayIntersect(ne,ot[ct],ot[ct+1])&&(st=!st)}return st}function pointWithinPolygons(ne,ee){for(const te of ee)if(pointWithinPolygon(ne,te))return!0;return!1}function lineStringWithinPolygon(ne,ee){for(const te of ne)if(!pointWithinPolygon(te,ee))return!1;for(let te=0;te<ne.length-1;++te)if(lineIntersectPolygon(ne[te],ne[te+1],ee))return!1;return!0}function lineStringWithinPolygons(ne,ee){for(const te of ee)if(lineStringWithinPolygon(ne,te))return!0;return!1}function perp(ne,ee){return ne[0]*ee[1]-ne[1]*ee[0]}function twoSided(ne,ee,te,st){const ot=ne[0]-te[0],ct=ne[1]-te[1],ut=ee[0]-te[0],dt=ee[1]-te[1],ht=st[0]-te[0],ft=st[1]-te[1],pt=ot*ft-ht*ct,mt=ut*ft-ht*dt;return pt>0&&mt<0||pt<0&&mt>0}function getTilePolygon(ne,ee,te){const st=[];for(let ot=0;ot<ne.length;ot++){const ct=[];for(let ut=0;ut<ne[ot].length;ut++){const dt=getTileCoordinates(ne[ot][ut],te);updateBBox(ee,dt),ct.push(dt)}st.push(ct)}return st}function getTilePolygons(ne,ee,te){const st=[];for(let ot=0;ot<ne.length;ot++){const ct=getTilePolygon(ne[ot],ee,te);st.push(ct)}return st}function updatePoint(ne,ee,te,st){if(ne[0]<te[0]||ne[0]>te[2]){const ot=st*.5;let ct=ne[0]-te[0]>ot?-st:te[0]-ne[0]>ot?st:0;ct===0&&(ct=ne[0]-te[2]>ot?-st:te[2]-ne[0]>ot?st:0),ne[0]+=ct}updateBBox(ee,ne)}function resetBBox(ne){ne[0]=ne[1]=1/0,ne[2]=ne[3]=-1/0}function getTilePoints(ne,ee,te,st){const ot=Math.pow(2,st.z)*EXTENT,ct=[st.x*EXTENT,st.y*EXTENT],ut=[];for(const dt of ne)for(const ht of dt){const ft=[ht.x+ct[0],ht.y+ct[1]];updatePoint(ft,ee,te,ot),ut.push(ft)}return ut}function getTileLines(ne,ee,te,st){const ot=Math.pow(2,st.z)*EXTENT,ct=[st.x*EXTENT,st.y*EXTENT],ut=[];for(const dt of ne){const ht=[];for(const ft of dt){const pt=[ft.x+ct[0],ft.y+ct[1]];updateBBox(ee,pt),ht.push(pt)}ut.push(ht)}if(ee[2]-ee[0]<=ot/2){resetBBox(ee);for(const dt of ut)for(const ht of dt)updatePoint(ht,ee,te,ot)}return ut}function pointsWithinPolygons(ne,ee){const te=[1/0,1/0,-1/0,-1/0],st=[1/0,1/0,-1/0,-1/0],ot=ne.canonicalID();if(ee.type==="Polygon"){const ct=getTilePolygon(ee.coordinates,st,ot),ut=getTilePoints(ne.geometry(),te,st,ot);if(!boxWithinBox(te,st))return!1;for(const dt of ut)if(!pointWithinPolygon(dt,ct))return!1}if(ee.type==="MultiPolygon"){const ct=getTilePolygons(ee.coordinates,st,ot),ut=getTilePoints(ne.geometry(),te,st,ot);if(!boxWithinBox(te,st))return!1;for(const dt of ut)if(!pointWithinPolygons(dt,ct))return!1}return!0}function linesWithinPolygons(ne,ee){const te=[1/0,1/0,-1/0,-1/0],st=[1/0,1/0,-1/0,-1/0],ot=ne.canonicalID();if(ee.type==="Polygon"){const ct=getTilePolygon(ee.coordinates,st,ot),ut=getTileLines(ne.geometry(),te,st,ot);if(!boxWithinBox(te,st))return!1;for(const dt of ut)if(!lineStringWithinPolygon(dt,ct))return!1}if(ee.type==="MultiPolygon"){const ct=getTilePolygons(ee.coordinates,st,ot),ut=getTileLines(ne.geometry(),te,st,ot);if(!boxWithinBox(te,st))return!1;for(const dt of ut)if(!lineStringWithinPolygons(dt,ct))return!1}return!0}var Within=class Wl{constructor(ee,te){this.type=BooleanType,this.geojson=ee,this.geometries=te}static parse(ee,te){if(ee.length!==2)return te.error(`'within' expression requires exactly one argument, but found ${ee.length-1} instead.`);if(isValue(ee[1])){const st=ee[1];if(st.type==="FeatureCollection"){const ot=[];for(const ct of st.features){const{type:ut,coordinates:dt}=ct.geometry;ut==="Polygon"&&ot.push(dt),ut==="MultiPolygon"&&ot.push(...dt)}if(ot.length)return new Wl(st,{type:"MultiPolygon",coordinates:ot})}else if(st.type==="Feature"){const ot=st.geometry.type;if(ot==="Polygon"||ot==="MultiPolygon")return new Wl(st,st.geometry)}else if(st.type==="Polygon"||st.type==="MultiPolygon")return new Wl(st,st)}return te.error("'within' expression requires valid geojson object that contains polygon geometry type.")}evaluate(ee){if(ee.geometry()!=null&&ee.canonicalID()!=null){if(ee.geometryType()==="Point")return pointsWithinPolygons(ee,this.geometries);if(ee.geometryType()==="LineString")return linesWithinPolygons(ee,this.geometries)}return!1}eachChild(){}outputDefined(){return!0}},TinyQueue=class{constructor(ne=[],ee=(te,st)=>te<st?-1:te>st?1:0){if(this.data=ne,this.length=this.data.length,this.compare=ee,this.length>0)for(let te=(this.length>>1)-1;te>=0;te--)this._down(te)}push(ne){this.data.push(ne),this._up(this.length++)}pop(){if(this.length===0)return;const ne=this.data[0],ee=this.data.pop();return--this.length>0&&(this.data[0]=ee,this._down(0)),ne}peek(){return this.data[0]}_up(ne){const{data:ee,compare:te}=this,st=ee[ne];for(;ne>0;){const ot=ne-1>>1,ct=ee[ot];if(te(st,ct)>=0)break;ee[ne]=ct,ne=ot}ee[ne]=st}_down(ne){const{data:ee,compare:te}=this,st=this.length>>1,ot=ee[ne];for(;ne<st;){let ct=(ne<<1)+1;const ut=ct+1;if(ut<this.length&&te(ee[ut],ee[ct])<0&&(ct=ut),te(ee[ct],ot)>=0)break;ee[ne]=ee[ct],ne=ct}ee[ne]=ot}};const RE=6378.137,E2=.0066943799901413165,RAD=Math.PI/180;
95var CheapRuler=class{constructor(ne){const ee=RAD*RE*1e3,te=Math.cos(ne*RAD),st=1/(1-E2*(1-te*te)),ot=Math.sqrt(st);this.kx=ee*ot*te,this.ky=ee*ot*st*.9933056200098587}distance(ne,ee){const te=this.wrap(ne[0]-ee[0])*this.kx,st=(ne[1]-ee[1])*this.ky;return Math.sqrt(te*te+st*st)}pointOnLine(ne,ee){let te=1/0,st,ot,ct,ut;for(let dt=0;dt<ne.length-1;dt++){let ht=ne[dt][0],ft=ne[dt][1],pt=this.wrap(ne[dt+1][0]-ht)*this.kx,mt=(ne[dt+1][1]-ft)*this.ky,yt=0;(pt!==0||mt!==0)&&(yt=(this.wrap(ee[0]-ht)*this.kx*pt+(ee[1]-ft)*this.ky*mt)/(pt*pt+mt*mt),yt>1?(ht=ne[dt+1][0],ft=ne[dt+1][1]):yt>0&&(ht+=pt/this.kx*yt,ft+=mt/this.ky*yt)),pt=this.wrap(ee[0]-ht)*this.kx,mt=(ee[1]-ft)*this.ky;const vt=pt*pt+mt*mt;vt<te&&(te=vt,st=ht,ot=ft,ct=dt,ut=yt)}return{point:[st,ot],index:ct,t:Math.max(0,Math.min(1,ut))}}wrap(ne){for(;ne<-180;)ne+=360;for(;ne>180;)ne-=360;return ne}};const MinPointsSize=100,MinLinePointsSize=50;function compareDistPair(ne,ee){return ee[0]-ne[0]}function getRangeSize(ne){return ne[1]-ne[0]+1}function isRangeSafe(ne,ee){return ne[1]>=ne[0]&&ne[1]<ee}function splitRange(ne,ee){if(ne[0]>ne[1])return[null,null];const te=getRangeSize(ne);if(ee){if(te===2)return[ne,null];const ot=Math.floor(te/2);return[[ne[0],ne[0]+ot],[ne[0]+ot,ne[1]]]}if(te===1)return[ne,null];const st=Math.floor(te/2)-1;return[[ne[0],ne[0]+st],[ne[0]+st+1,ne[1]]]}function getBBox(ne,ee){if(!isRangeSafe(ee,ne.length))return[1/0,1/0,-1/0,-1/0];const te=[1/0,1/0,-1/0,-1/0];for(let st=ee[0];st<=ee[1];++st)updateBBox(te,ne[st]);return te}function getPolygonBBox(ne){const ee=[1/0,1/0,-1/0,-1/0];for(const te of ne)for(const st of te)updateBBox(ee,st);return ee}function isValidBBox(ne){return ne[0]!==-1/0&&ne[1]!==-1/0&&ne[2]!==1/0&&ne[3]!==1/0}function bboxToBBoxDistance(ne,ee,te){if(!isValidBBox(ne)||!isValidBBox(ee))return NaN;let st=0,ot=0;return ne[2]<ee[0]&&(st=ee[0]-ne[2]),ne[0]>ee[2]&&(st=ne[0]-ee[2]),ne[1]>ee[3]&&(ot=ne[1]-ee[3]),ne[3]<ee[1]&&(ot=ee[1]-ne[3]),te.distance([0,0],[st,ot])}function pointToLineDistance(ne,ee,te){const st=te.pointOnLine(ee,ne);return te.distance(ne,st.point)}function segmentToSegmentDistance(ne,ee,te,st,ot){const ct=Math.min(pointToLineDistance(ne,[te,st],ot),pointToLineDistance(ee,[te,st],ot)),ut=Math.min(pointToLineDistance(te,[ne,ee],ot),pointToLineDistance(st,[ne,ee],ot));return Math.min(ct,ut)}function lineToLineDistance(ne,ee,te,st,ot){if(!(isRangeSafe(ee,ne.length)&&isRangeSafe(st,te.length)))return 1/0;let ct=1/0;for(let ut=ee[0];ut<ee[1];++ut){const dt=ne[ut],ht=ne[ut+1];for(let ft=st[0];ft<st[1];++ft){const pt=te[ft],mt=te[ft+1];if(segmentIntersectSegment(dt,ht,pt,mt))return 0;ct=Math.min(ct,segmentToSegmentDistance(dt,ht,pt,mt,ot))}}return ct}function pointsToPointsDistance(ne,ee,te,st,ot){if(!(isRangeSafe(ee,ne.length)&&isRangeSafe(st,te.length)))return NaN;let ct=1/0;for(let ut=ee[0];ut<=ee[1];++ut)for(let dt=st[0];dt<=st[1];++dt)if(ct=Math.min(ct,ot.distance(ne[ut],te[dt])),ct===0)return ct;return ct}function pointToPolygonDistance(ne,ee,te){if(pointWithinPolygon(ne,ee,!0))return 0;let st=1/0;for(const ot of ee){const ct=ot[0],ut=ot[ot.length-1];if(ct!==ut&&(st=Math.min(st,pointToLineDistance(ne,[ut,ct],te)),st===0))return st;const dt=te.pointOnLine(ot,ne);if(st=Math.min(st,te.distance(ne,dt.point)),st===0)return st}return st}function lineToPolygonDistance(ne,ee,te,st){if(!isRangeSafe(ee,ne.length))return NaN;for(let ct=ee[0];ct<=ee[1];++ct)if(pointWithinPolygon(ne[ct],te,!0))return 0;let ot=1/0;for(let ct=ee[0];ct<ee[1];++ct){const ut=ne[ct],dt=ne[ct+1];for(const ht of te)for(let ft=0,pt=ht.length,mt=pt-1;ft<pt;mt=ft++){const yt=ht[mt],vt=ht[ft];if(segmentIntersectSegment(ut,dt,yt,vt))return 0;ot=Math.min(ot,segmentToSegmentDistance(ut,dt,yt,vt,st))}}return ot}function polygonIntersect(ne,ee){for(const te of ne)for(const st of te)if(pointWithinPolygon(st,ee,!0))return!0;return!1}function polygonToPolygonDistance(ne,ee,te,st=1/0){const ot=getPolygonBBox(ne),ct=getPolygonBBox(ee);if(st!==1/0&&bboxToBBoxDistance(ot,ct,te)>=st)return st;if(boxWithinBox(ot,ct)){if(polygonIntersect(ne,ee))return 0}else if(polygonIntersect(ee,ne))return 0;let ut=1/0;for(const dt of ne)for(let ht=0,ft=dt.length,pt=ft-1;ht<ft;pt=ht++){const mt=dt[pt],yt=dt[ht];for(const vt of ee)for(let _t=0,bt=vt.length,xt=bt-1;_t<bt;xt=_t++){const Mt=vt[xt],Ot=vt[_t];if(segmentIntersectSegment(mt,yt,Mt,Ot))return 0;ut=Math.min(ut,segmentToSegmentDistance(mt,yt,Mt,Ot,te))}}return ut}function updateQueue(ne,ee,te,st,ot,ct){if(!ct)return;const ut=bboxToBBoxDistance(getBBox(st,ct),ot,te);ut<ee&&ne.push([ut,ct,[0,0]])}function updateQueueTwoSets(ne,ee,te,st,ot,ct,ut){if(!ct||!ut)return;const dt=bboxToBBoxDistance(getBBox(st,ct),getBBox(ot,ut),te);dt<ee&&ne.push([dt,ct,ut])}function pointsToPolygonDistance(ne,ee,te,st,ot=1/0){let ct=Math.min(st.distance(ne[0],te[0][0]),ot);if(ct===0)return ct;const ut=new TinyQueue([[0,[0,ne.length-1],[0,0]]],compareDistPair),dt=getPolygonBBox(te);for(;ut.length>0;){const ht=ut.pop();if(ht[0]>=ct)continue;
95const ft=ht[1],pt=ee?MinLinePointsSize:MinPointsSize;if(getRangeSize(ft)<=pt){if(!isRangeSafe(ft,ne.length))return NaN;if(ee){const mt=lineToPolygonDistance(ne,ft,te,st);if(isNaN(mt)||mt===0)return mt;ct=Math.min(ct,mt)}else for(let mt=ft[0];mt<=ft[1];++mt){const yt=pointToPolygonDistance(ne[mt],te,st);if(ct=Math.min(ct,yt),ct===0)return 0}}else{const mt=splitRange(ft,ee);updateQueue(ut,ct,st,ne,dt,mt[0]),updateQueue(ut,ct,st,ne,dt,mt[1])}}return ct}function pointSetToPointSetDistance(ne,ee,te,st,ot,ct=1/0){let ut=Math.min(ct,ot.distance(ne[0],te[0]));if(ut===0)return ut;const dt=new TinyQueue([[0,[0,ne.length-1],[0,te.length-1]]],compareDistPair);for(;dt.length>0;){const ht=dt.pop();if(ht[0]>=ut)continue;const ft=ht[1],pt=ht[2],mt=ee?MinLinePointsSize:MinPointsSize,yt=st?MinLinePointsSize:MinPointsSize;if(getRangeSize(ft)<=mt&&getRangeSize(pt)<=yt){if(!isRangeSafe(ft,ne.length)&&isRangeSafe(pt,te.length))return NaN;let vt;if(ee&&st)vt=lineToLineDistance(ne,ft,te,pt,ot),ut=Math.min(ut,vt);else if(ee&&!st){const _t=ne.slice(ft[0],ft[1]+1);for(let bt=pt[0];bt<=pt[1];++bt)if(vt=pointToLineDistance(te[bt],_t,ot),ut=Math.min(ut,vt),ut===0)return ut}else if(!ee&&st){const _t=te.slice(pt[0],pt[1]+1);for(let bt=ft[0];bt<=ft[1];++bt)if(vt=pointToLineDistance(ne[bt],_t,ot),ut=Math.min(ut,vt),ut===0)return ut}else vt=pointsToPointsDistance(ne,ft,te,pt,ot),ut=Math.min(ut,vt)}else{const vt=splitRange(ft,ee),_t=splitRange(pt,st);updateQueueTwoSets(dt,ut,ot,ne,te,vt[0],_t[0]),updateQueueTwoSets(dt,ut,ot,ne,te,vt[0],_t[1]),updateQueueTwoSets(dt,ut,ot,ne,te,vt[1],_t[0]),updateQueueTwoSets(dt,ut,ot,ne,te,vt[1],_t[1])}}return ut}function pointToGeometryDistance(ne,ee){const te=ne.geometry(),st=te.flat().map(ut=>getLngLatFromTileCoord([ut.x,ut.y],ne.canonical));if(te.length===0)return NaN;const ot=new CheapRuler(st[0][1]);let ct=1/0;for(const ut of ee){switch(ut.type){case"Point":ct=Math.min(ct,pointSetToPointSetDistance(st,!1,[ut.coordinates],!1,ot,ct));break;case"LineString":ct=Math.min(ct,pointSetToPointSetDistance(st,!1,ut.coordinates,!0,ot,ct));break;case"Polygon":ct=Math.min(ct,pointsToPolygonDistance(st,!1,ut.coordinates,ot,ct))}if(ct===0)return ct}return ct}function lineStringToGeometryDistance(ne,ee){const te=ne.geometry(),st=te.flat().map(ut=>getLngLatFromTileCoord([ut.x,ut.y],ne.canonical));if(te.length===0)return NaN;const ot=new CheapRuler(st[0][1]);let ct=1/0;for(const ut of ee){switch(ut.type){case"Point":ct=Math.min(ct,pointSetToPointSetDistance(st,!0,[ut.coordinates],!1,ot,ct));break;case"LineString":ct=Math.min(ct,pointSetToPointSetDistance(st,!0,ut.coordinates,!0,ot,ct));break;case"Polygon":ct=Math.min(ct,pointsToPolygonDistance(st,!0,ut.coordinates,ot,ct))}if(ct===0)return ct}return ct}function polygonToGeometryDistance(ne,ee){const te=ne.geometry();if(te.length===0||te[0].length===0)return NaN;const st=classifyRings(te).map(ut=>ut.map(dt=>dt.map(ht=>getLngLatFromTileCoord([ht.x,ht.y],ne.canonical)))),ot=new CheapRuler(st[0][0][0][1]);let ct=1/0;for(const ut of ee)for(const dt of st){switch(ut.type){case"Point":ct=Math.min(ct,pointsToPolygonDistance([ut.coordinates],!1,dt,ot,ct));break;case"LineString":ct=Math.min(ct,pointsToPolygonDistance(ut.coordinates,!0,dt,ot,ct));break;case"Polygon":ct=Math.min(ct,polygonToPolygonDistance(dt,ut.coordinates,ot,ct))}if(ct===0)return ct}return ct}function toSimpleGeometry(ne){return ne.type==="MultiPolygon"?ne.coordinates.map(ee=>({type:"Polygon",coordinates:ee})):ne.type==="MultiLineString"?ne.coordinates.map(ee=>({type:"LineString",coordinates:ee})):ne.type==="MultiPoint"?ne.coordinates.map(ee=>({type:"Point",coordinates:ee})):[ne]}var Distance=class ql{constructor(ee,te){this.type=NumberType,this.geojson=ee,this.geometries=te}static parse(ee,te){if(ee.length!==2)return te.error(`'distance' expression requires exactly one argument, but found ${ee.length-1} instead.`);if(isValue(ee[1])){const st=ee[1];if(st.type==="FeatureCollection")return new ql(st,st.features.map(ot=>toSimpleGeometry(ot.geometry)).flat());if(st.type==="Feature")return new ql(st,toSimpleGeometry(st.geometry));if("type"in st&&"coordinates"in st)return new ql(st,toSimpleGeometry(st))}return te.error("'distance' expression requires valid geojson object that contains polygon geometry type.")}evaluate(ee){if(ee.geometry()!=null&&ee.canonicalID()!=null){if(ee.geometryType()==="Point")return pointToGeometryDistance(ee,this.geometries);if(ee.geometryType()==="LineString")return lineStringToGeometryDistance(ee,this.geometries);if(ee.geometryType()==="Polygon")return polygonToGeometryDistance(ee,this.geometries)}return NaN}eachChild(){}outputDefined(){return!0}},Semiliteral=class Bu{constructor(ee){let te=null;for(const st of ee)if(!te)te=st.type;else{if(te===st.type)continue;te=ValueType;break}
95this.type=array(te??ValueType,ee.length),this.arr=ee}static parse(ee,te){if(ee.length!==2)return te.error(`'semiliteral' expression requires exactly one argument, but found ${ee.length-1} instead.`);if(!isValue(ee[1]))return te.error(`invalid value of type "${typeof ee[1]}"`);const st=ee[1],ot=typeOf(st);if(ot.kind==="array"){const ct=st,ut=te.concat(1),dt=[];for(let ht=0;ht<ct.length;ht++){const ft=ut.parse(ct[ht],ht,ValueType);if(!ft)return null;dt.push(ft)}return new Bu(dt)}else return new Literal(ot,st)}evaluate(ee){return this.arr.map(te=>te.evaluate(ee))}eachChild(ee){this.arr.forEach(ee)}outputDefined(){return this.arr.every(ee=>ee.outputDefined())}},GlobalState=class Uu{constructor(ee){this.key=ee,this.type=ValueType}static parse(ee,te){if(ee.length!==2)return te.error(`Expected 1 argument, but found ${ee.length-1} instead.`);const st=ee[1];return st==null?te.error("Global state property must be defined."):typeof st!="string"?te.error(`Global state property must be string, but found ${typeof ee[1]} instead.`):new Uu(st)}evaluate(ee){var st;const te=(st=ee.globals)==null?void 0:st.globalState;return!te||Object.keys(te).length===0?null:getOwn(te,this.key)??null}eachChild(){}outputDefined(){return!1}};const expressions={"==":Equals,"!=":NotEquals,">":GreaterThan,"<":LessThan,">=":GreaterThanOrEqual,"<=":LessThanOrEqual,array:Assertion,at:At,boolean:Assertion,case:Case,coalesce:Coalesce,collator:CollatorExpression,format:FormatExpression,image:ImageExpression,in:In,"index-of":IndexOf,interpolate:Interpolate,"interpolate-hcl":Interpolate,"interpolate-lab":Interpolate,length:Length,let:Let,literal:Literal,match:Match,number:Assertion,"number-format":NumberFormat,object:Assertion,semiliteral:Semiliteral,slice:Slice,step:Step,string:Assertion,"to-boolean":Coercion,"to-color":Coercion,"to-number":Coercion,"to-string":Coercion,var:Var,within:Within,distance:Distance,"global-state":GlobalState};var ExpressionParsingError=class extends Error{constructor(ne,ee){super(ee),this.message=ee,this.key=ne}},Scope=class Vu{constructor(ee,te=[]){this.parent=ee,this.bindings={};for(const[st,ot]of te)this.bindings[st]=ot}concat(ee){return new Vu(this,ee)}get(ee){if(this.bindings[ee])return this.bindings[ee];if(this.parent)return this.parent.get(ee);throw new Error(`${ee} not found in scope.`)}has(ee){return this.bindings[ee]?!0:this.parent?this.parent.has(ee):!1}},ParsingContext=class Hu{constructor(ee,te,st=[],ot,ct=new Scope,ut=[]){this.registry=ee,this.path=st,this.key=st.map(dt=>`[${dt}
95]`).join(""),this.scope=ct,this.errors=ut,this.expectedType=ot,this._isConstant=te}parse(ee,te,st,ot,ct={}){return te!=null?this.concat(te,st,ot)._parse(ee,ct):this._parse(ee,ct)}_parse(ee,te){(ee===null||typeof ee=="string"||typeof ee=="boolean"||typeof ee=="number")&&(ee=["literal",ee]);const st=this.key;function ot(ct,ut,dt){return dt==="assert"?new Assertion(ut,[ct],st):dt==="coerce"?new Coercion(ut,[ct],st):ct}if(Array.isArray(ee)){if(ee.length===0)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');const ct=ee[0];if(typeof ct!="string")return this.error(`Expression name must be a string, but found ${typeof ct} instead. If you wanted a literal array, use ["literal", [...]].`,0),null;const ut=this.registry[ct];if(ut){let dt=ut.parse(ee,this);if(!dt)return null;if(this.expectedType){const ht=this.expectedType,ft=dt.type;if((ht.kind==="string"||ht.kind==="number"||ht.kind==="boolean"||ht.kind==="object"||ht.kind==="array")&&ft.kind==="value")dt=ot(dt,ht,te.typeAnnotation||"assert");else if(ht.kind==="projectionDefinition"&&["string","array","value"].includes(ft.kind)||["color","formatted","resolvedImage"].includes(ht.kind)&&["value","string"].includes(ft.kind)||["padding","numberArray"].includes(ht.kind)&&["value","number","array"].includes(ft.kind)||ht.kind==="colorArray"&&["value","string","array"].includes(ft.kind)||ht.kind==="variableAnchorOffsetCollection"&&["value","array"].includes(ft.kind))dt=ot(dt,ht,te.typeAnnotation||"coerce");else if(this.checkSubtype(ht,ft))return null}if(!(dt instanceof Literal)&&dt.type.kind!=="resolvedImage"&&this._isConstant(dt)){const ht=new EvaluationContext;try{dt=new Literal(dt.type,dt.evaluate(ht))}catch(ft){return this.error(ft.message),null}}return dt}return this.error(`Unknown expression "${ct}". If you wanted a literal array, use ["literal", [...]].`,0)}else return typeof ee>"u"?this.error("'undefined' value invalid. Use null instead."):typeof ee=="object"?this.error('Bare objects invalid. Use ["literal", {...}] instead.'):this.error(`Expected an array, but found ${typeof ee} instead.`)}concat(ee,te,st){const ot=typeof ee=="number"?this.path.concat(ee):this.path,ct=st?this.scope.concat(st):this.scope;return new Hu(this.registry,this._isConstant,ot,te||null,ct,this.errors)}error(ee,...te){const st=`${this.key}${te.map(ot=>`[${ot}]`).join("")}`;this.errors.push(new ExpressionParsingError(st,ee))}checkSubtype(ee,te){const st=checkSubtype(ee,te);return st&&this.error(st),st}},CompoundExpression=class Tl{constructor(ee,te,st,ot,ct){this.name=ee,this.type=te,this._evaluate=st,this.args=ot,this.key=ct}evaluate(ee){return this._evaluate(ee,this.args,this.key)}eachChild(ee){this.args.forEach(ee)}outputDefined(){return!1}static parse(ee,te){const st=ee[0],ot=Tl.definitions[st];if(!ot)return te.error(`Unknown expression "${st}". If you wanted a literal array, use ["literal", [...]].`,0);const ct=Array.isArray(ot)?ot[0]:ot.type,ut=Array.isArray(ot)?[[ot[1],ot[2]]]:ot.overloads,dt=ut.filter(([ft])=>!Array.isArray(ft)||ft.length===ee.length-1);let ht=null;for(const[ft,pt]of dt){ht=new ParsingContext(te.registry,isExpressionConstant,te.path,null,te.scope);const mt=[];let yt=!1;for(let vt=1;vt<ee.length;vt++){const _t=ee[vt],bt=Array.isArray(ft)?ft[vt-1]:ft.type,xt=ht.parse(_t,1+mt.length,bt);if(!xt){yt=!0;break}mt.push(xt)}if(!yt){if(Array.isArray(ft)&&ft.length!==mt.length){ht.error(`Expected ${ft.length} arguments, but found ${mt.length} instead.`);continue}for(let vt=0;vt<mt.length;vt++){const _t=Array.isArray(ft)?ft[vt]:ft.type,bt=mt[vt];ht.concat(vt+1).checkSubtype(_t,bt.type)}if(ht.errors.length===0)return new Tl(st,ct,pt,mt,te.key)}}if(dt.length===1)te.errors.push(...ht.errors);else{const ft=(dt.length?dt:ut).map(([mt])=>stringifySignature(mt)).join(" | "),pt=[];for(let mt=1;mt<ee.length;mt++){const yt=te.parse(ee[mt],1+pt.length);if(!yt)return null;pt.push(typeToString(yt.type))}te.error(`Expected arguments of type ${ft}, but found (${pt.join(", ")}) instead.`)}return null}static register(ee,te){Tl.definitions=te;for(const st in te)ee[st]=Tl}};function rgba(ne,[ee,te,st,ot],ct){ee=ee.evaluate(ne),te=te.evaluate(ne),st=st.evaluate(ne);const ut=ot?ot.evaluate(ne):1,dt=validateRGBA(ee,te,st,ut);if(dt)throw new RuntimeError(dt,ct);return new Color(ee/255,te/255,st/255,ut,!1)}function has(ne,ee){return ne in ee&&ee[ne]!==void 0}function get$1(ne,ee){const te=ee[ne];return typeof te>"u"?null:te}function binarySearch(ne,ee,te,st){for(;te<=st;){const ot=te+st>>1;if(ee[ot]===ne)return!0;ee[ot]>ne?st=ot-1:te=ot+1}return!1}function varargs(ne){return{type:ne}}CompoundExpression.register(expressions,{error:[ErrorType,[StringType],(ne,[ee],te)=>{throw new RuntimeError(ee.evaluate(ne),te)}],typeof:[StringType,[ValueType],(ne,[ee])=>typeToString(typeOf(ee.evaluate(ne)))],"to-rgba":[array(NumberType,4),[ColorType],(ne,[ee])=>{const[te,st,ot,ct]=ee.evaluate(ne).rgb;return[te*255,st*255,ot*255,ct]}],rgb:[ColorType,[NumberType,NumberType,NumberType],rgba],rgba:[ColorType,[NumberType,NumberType,NumberType,NumberType],rgba],has:{type:BooleanType,overloads:[[[StringType],(ne,[ee])=>has(ee.evaluate(ne),ne.properties())],[[StringType,ObjectType],(ne,[ee,te])=>has(ee.evaluate(ne),te.evaluate(ne))]]},get:{type:ValueType,overloads:[[[StringType],(ne,[ee])=>get$1(ee.evaluate(ne),ne.properties())],[[StringType,ObjectType],(ne,[ee,te])=>get$1(ee.evaluate(ne),te.evaluate(ne))]]},"feature-state":[ValueType,[StringType],(ne,[ee])=>get$1(ee.evaluate(ne),ne.featureState||{})],properties:[ObjectType,[],ne=>ne.properties()],"geometry-type":[StringType,[],ne=>ne.geometryType()],id:[ValueType,[],ne=>ne.id()],zoom:[NumberType,[],ne=>ne.globals.zoom],"heatmap-density":[NumberType,[],ne=>ne.globals.heatmapDensity||0],elevation:[NumberType,[],ne=>ne.globals.elevation||0],"line-progress":[NumberType,[],ne=>ne.globals.lineProgress||0],accumulated:[ValueType,[],ne=>ne.globals.accumulated===void 0?null:ne.globals.accumulated],"+":[NumberType,varargs(NumberType),(ne,ee)=>{let te=0;for(const st of ee)te+=st.evaluate(ne);return te}],"*":[NumberType,varargs(NumberType),(ne,ee)=>{let te=1;for(const st of ee)te*=st.evaluate(ne);return te}],"-":{type:NumberType,overloads:[[[NumberType,NumberType],(ne,[ee,te])=>ee.evaluate(ne)-te.evaluate(ne)],[[NumberType],(ne,[ee])=>-ee.evaluate(ne)]]},"/":[NumberType,[NumberType,NumberType],(ne,[ee,te])=>ee.evaluate(ne)/te.evaluate(ne)],"%":[NumberType,[NumberType,NumberType],(ne,[ee,te])=>ee.evaluate(ne)%te.evaluate(ne)],ln2:[NumberType,[],()=>Math.LN2],pi:[NumberType,[],()=>Math.PI],e:[NumberType,[],()=>Math.E],"^":[NumberType,[NumberType,NumberType],(ne,[ee,te])=>Math.pow(ee.evaluate(ne),te.evaluate(ne))],sqrt:[NumberType,[NumberType],(ne,[ee])=>Math.sqrt(ee.evaluate(ne))],log10:[NumberType,[NumberType],(ne,[ee])=>Math.log(ee.evaluate(ne))/Math.LN10],ln:[NumberType,[NumberType],(ne,[ee])=>Math.log(ee.evaluate(ne))],log2:[NumberType,[NumberType],(ne,[ee])=>Math.log(ee.evaluate(ne))/Math.LN2],sin:[NumberType,[NumberType],(ne,[ee])=>Math.sin(ee.evaluate(ne))],cos:[NumberType,[NumberType],(ne,[ee])=>Math.cos(ee.evaluate(ne))],tan:[NumberType,[NumberType],(ne,[ee])=>Math.tan(ee.evaluate(ne))],asin:[NumberType,[NumberType],(ne,[ee])=>Math.asin(ee.evaluate(ne))],acos:[NumberType,[NumberType],(ne,[ee])=>Math.acos(ee.evaluate(ne))],atan:[NumberType,[NumberType],(ne,[ee])=>Math.atan(ee.evaluate(ne))],min:[NumberType,varargs(NumberType),(ne,ee)=>Math.min(...ee.map(te=>te.evaluate(ne)))],max:[NumberType,varargs(NumberType),(ne,ee)=>Math.max(...ee.map(te=>te.evaluate(ne)))],abs:[NumberType,[NumberType],(ne,[ee])=>Math.abs(ee.evaluate(ne))],round:[NumberType,[NumberType],(ne,[ee])=>{const te=ee.evaluate(ne);return te<0?-Math.round(-te):Math.round(te)}],floor:[NumberType,[NumberType],(ne,[ee])=>Math.floor(ee.evaluate(ne))],ceil:[NumberType,[NumberType],(ne,[ee])=>Math.ceil(ee.evaluate(ne))],"filter-==":[BooleanType,[StringType,ValueType],(ne,[ee,te])=>ne.properties()[ee.value]===te.value],"filter-id-==":[BooleanType,[ValueType],(ne,[ee])=>ne.id()===ee.value],"filter-type-==":[BooleanType,[StringType],(ne,[ee])=>ne.geometryType()===ee.value],"filter-<":[BooleanType,[StringType,ValueType],(ne,[ee,te])=>{const st=ne.properties()[ee.value],ot=te.value;return typeof st==typeof ot&&st<ot}],"filter-id-<":[BooleanType,[ValueType],(ne,[ee])=>{const te=ne.id(),st=ee.value;return typeof te==typeof st&&te<st}
95],"filter->":[BooleanType,[StringType,ValueType],(ne,[ee,te])=>{const st=ne.properties()[ee.value],ot=te.value;return typeof st==typeof ot&&st>ot}],"filter-id->":[BooleanType,[ValueType],(ne,[ee])=>{const te=ne.id(),st=ee.value;return typeof te==typeof st&&te>st}],"filter-<=":[BooleanType,[StringType,ValueType],(ne,[ee,te])=>{const st=ne.properties()[ee.value],ot=te.value;return typeof st==typeof ot&&st<=ot}],"filter-id-<=":[BooleanType,[ValueType],(ne,[ee])=>{const te=ne.id(),st=ee.value;return typeof te==typeof st&&te<=st}],"filter->=":[BooleanType,[StringType,ValueType],(ne,[ee,te])=>{const st=ne.properties()[ee.value],ot=te.value;return typeof st==typeof ot&&st>=ot}],"filter-id->=":[BooleanType,[ValueType],(ne,[ee])=>{const te=ne.id(),st=ee.value;return typeof te==typeof st&&te>=st}],"filter-has":[BooleanType,[ValueType],(ne,[ee])=>{const te=ee.value,st=ne.properties();return te in st&&st[te]!==void 0}],"filter-has-id":[BooleanType,[],ne=>ne.id()!==null&&ne.id()!==void 0],"filter-type-in":[BooleanType,[array(StringType)],(ne,[ee])=>ee.value.indexOf(ne.geometryType())>=0],"filter-id-in":[BooleanType,[array(ValueType)],(ne,[ee])=>ee.value.indexOf(ne.id())>=0],"filter-in-small":[BooleanType,[StringType,array(ValueType)],(ne,[ee,te])=>te.value.indexOf(ne.properties()[ee.value])>=0],"filter-in-large":[BooleanType,[StringType,array(ValueType)],(ne,[ee,te])=>binarySearch(ne.properties()[ee.value],te.value,0,te.value.length-1)],all:{type:BooleanType,overloads:[[[BooleanType,BooleanType],(ne,[ee,te])=>ee.evaluate(ne)&&te.evaluate(ne)],[varargs(BooleanType),(ne,ee)=>{for(const te of ee)if(!te.evaluate(ne))return!1;return!0}]]},any:{type:BooleanType,overloads:[[[BooleanType,BooleanType],(ne,[ee,te])=>ee.evaluate(ne)||te.evaluate(ne)],[varargs(BooleanType),(ne,ee)=>{for(const te of ee)if(te.evaluate(ne))return!0;return!1}]]},"!":[BooleanType,[BooleanType],(ne,[ee])=>!ee.evaluate(ne)],"is-supported-script":[BooleanType,[StringType],(ne,[ee])=>{const te=ne.globals&&ne.globals.isSupportedScript;return te?te(ee.evaluate(ne)):!0}],upcase:[StringType,[StringType],(ne,[ee])=>ee.evaluate(ne).toUpperCase()],downcase:[StringType,[StringType],(ne,[ee])=>ee.evaluate(ne).toLowerCase()],concat:[StringType,varargs(ValueType),(ne,ee)=>ee.map(te=>valueToString(te.evaluate(ne))).join("")],split:[array(StringType),[StringType,StringType],(ne,[ee,te])=>ee.evaluate(ne).split(te.evaluate(ne))],join:[StringType,[array(StringType),StringType],(ne,[ee,te])=>ee.evaluate(ne).join(te.evaluate(ne))],"resolved-locale":[StringType,[CollatorType],(ne,[ee])=>ee.evaluate(ne).resolvedLocale()]});function stringifySignature(ne){return Array.isArray(ne)?`(${ne.map(typeToString).join(", ")})`:`(${typeToString(ne.type)}...)`}function isExpressionConstant(ne){if(ne instanceof Var)return isExpressionConstant(ne.boundExpression);if(ne instanceof CompoundExpression&&ne.name==="error")return!1;if(ne instanceof CollatorExpression)return!1;if(ne instanceof Within)return!1;if(ne instanceof Distance)return!1;if(ne instanceof GlobalState)return!1;const ee=ne instanceof Coercion||ne instanceof Assertion;let te=!0;return ne.eachChild(st=>{ee?te=te&&isExpressionConstant(st):te=te&&st instanceof Literal}),te?isFeatureConstant(ne)&&isGlobalPropertyConstant(ne,["zoom","heatmap-density","elevation","line-progress","accumulated","is-supported-script"]):!1}function isFeatureConstant(ne){if(ne instanceof CompoundExpression){if(ne.name==="get"&&ne.args.length===1)return!1;if(ne.name==="feature-state")return!1;if(ne.name==="has"&&ne.args.length===1)return!1;if(ne.name==="properties"||ne.name==="geometry-type"||ne.name==="id")return!1;if(/^filter-/.test(ne.name))return!1}if(ne instanceof Within||ne instanceof Distance)return!1;let ee=!0;return ne.eachChild(te=>{ee&&!isFeatureConstant(te)&&(ee=!1)}),ee}function isStateConstant(ne){if(ne instanceof CompoundExpression&&ne.name==="feature-state")return!1;let ee=!0;return ne.eachChild(te=>{ee&&!isStateConstant(te)&&(ee=!1)}),ee}function isGlobalPropertyConstant(ne,ee){if(ne instanceof CompoundExpression&&ee.indexOf(ne.name)>=0)return!1;let te=!0;return ne.eachChild(st=>{te&&!isGlobalPropertyConstant(st,ee)&&(te=!1)}),te}function supportsPropertyExpression(ne){return ne["property-type"]==="data-driven"||ne["property-type"]==="cross-faded-data-driven"}function supportsZoomExpression(ne){return!!ne.expression&&ne.expression.parameters.indexOf("zoom")>-1}function supportsInterpolation(ne){return!!ne.expression&&ne.expression.interpolated}function isFunction(ne){return typeof ne=="object"&&ne!==null&&!Array.isArray(ne)&&typeOf(ne)===ObjectType}function success(ne){return{result:"success",value:ne}}function error(ne){return{result:"error",value:ne}}var StyleExpression=class{constructor(ne,ee,te,st){this.expression=ne,this._warningHistory={},this._evaluator=new EvaluationContext,this._defaultValue=te?getDefaultValue(te):null,this._enumValues=te&&te.type==="enum"?te.values:null,this._globalState=st,this._rootKey=ee}evaluateWithoutErrorHandling(ne,ee,te,st,ot,ct){return this._globalState&&(ne=addGlobalState(ne,this._globalState)),this._evaluator.globals=ne,this._evaluator.feature=ee,this._evaluator.featureState=te,this._evaluator.canonical=st,this._evaluator.availableImages=ot||null,this._evaluator.formattedSection=ct,this.expression.evaluate(this._evaluator)}evaluate(ne,ee,te,st,ot,ct){this._globalState&&(ne=addGlobalState(ne,this._globalState)),this._evaluator.globals=ne,this._evaluator.feature=ee||null,this._evaluator.featureState=te||null,this._evaluator.canonical=st,this._evaluator.availableImages=ot||null,this._evaluator.formattedSection=ct||null;try{const ut=this.expression.evaluate(this._evaluator);if(ut==null||typeof ut=="number"&&ut!==ut)return this._defaultValue;if(this._enumValues&&!(ut in this._enumValues))throw new RuntimeError(`Expected value to be one of ${Object.keys(this._enumValues).map(dt=>JSON.stringify(dt)).join(", ")}, but found ${JSON.stringify(ut)} instead.`,"");return ut}catch(ut){const dt=ut instanceof RuntimeError?ut.path:"",ht=`${dt}|${ut.message}`;return this._warningHistory[ht]||(this._warningHistory[ht]=!0,typeof console<"u"&&console.warn(formatRuntimeWarning(this._rootKey,dt,ut.message,this._defaultValue))),this._defaultValue}}};function formatRuntimeWarning(ne,ee,te,st){return`${ne}${ee}: ${te}${st==null?"":` Falling back to ${String(st)}.`}`}function assertRootKey(ne){if(!ne)throw new Error('rootKey must identify the location of the expression in the style JSON, e.g. "layers[3].paint.line-width".')}function isExpression(ne){return Array.isArray(ne)&&ne.length>0&&typeof ne[0]=="string"&&ne[0]in expressions}function createExpression(ne,ee,te,st){assertRootKey(ee);const ot=new ParsingContext(expressions,isExpressionConstant,[],te?getExpectedType(te):void 0),ct=ot.parse(ne,void 0,void 0,void 0,te&&te.type==="string"?{typeAnnotation:"coerce"}:void 0);return ct?success(new StyleExpression(ct,ee,te,st)):error(ot.errors)}var ZoomConstantExpression=class{constructor(ne,ee,te){this.kind=ne,this._styleExpression=ee,this.isStateDependent=ne!=="constant"&&!isStateConstant(ee.expression),this.globalStateRefs=findGlobalStateRefs(ee.expression),this._globalState=te}evaluateWithoutErrorHandling(ne,ee,te,st,ot,ct){return this._globalState&&(ne=addGlobalState(ne,this._globalState)),this._styleExpression.evaluateWithoutErrorHandling(ne,ee,te,st,ot,ct)}evaluate(ne,ee,te,st,ot,ct){return this._globalState&&(ne=addGlobalState(ne,this._globalState)),this._styleExpression.evaluate(ne,ee,te,st,ot,ct)}},ZoomDependentExpression=class{constructor(ne,ee,te,st,ot){this.kind=ne,this.zoomStops=te,this._styleExpression=ee,this.isStateDependent=ne!=="camera"&&!isStateConstant(ee.expression),this.globalStateRefs=findGlobalStateRefs(ee.expression),this.interpolationType=st,this._globalState=ot}evaluateWithoutErrorHandling(ne,ee,te,st,ot,ct){return this._globalState&&(ne=addGlobalState(ne,this._globalState)),this._styleExpression.evaluateWithoutErrorHandling(ne,ee,te,st,ot,ct)}evaluate(ne,ee,te,st,ot,ct){return this._globalState&&(ne=addGlobalState(ne,this._globalState)),this._styleExpression.evaluate(ne,ee,te,st,ot,ct)}interpolationFactor(ne,ee,te){return this.interpolationType?Interpolate.interpolationFactor(this.interpolationType,ne,ee,te):0}};function createPropertyExpression(ne,ee,te,st){const ot=createExpression(ne,ee,te,st);if(ot.result==="error")return ot;const ct=ot.value.expression,ut=isFeatureConstant(ct);if(!ut&&!supportsPropertyExpression(te))return error([new ExpressionParsingError("","data expressions not supported")]);const dt=isGlobalPropertyConstant(ct,["zoom"]);if(!dt&&!supportsZoomExpression(te))return error([new ExpressionParsingError("","zoom expressions not supported")]);const ht=findZoomCurve(ct);
95if(!ht&&!dt)return error([new ExpressionParsingError("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')]);if(ht instanceof ExpressionParsingError)return error([ht]);if(ht instanceof Interpolate&&!supportsInterpolation(te))return error([new ExpressionParsingError("",'"interpolate" expressions cannot be used with this property')]);if(!ht)return success(ut?new ZoomConstantExpression("constant",ot.value,st):new ZoomConstantExpression("source",ot.value,st));const ft=ht instanceof Interpolate?ht.interpolation:void 0;return success(ut?new ZoomDependentExpression("camera",ot.value,ht.labels,ft,st):new ZoomDependentExpression("composite",ot.value,ht.labels,ft,st))}function findZoomCurve(ne){let ee=null;if(ne instanceof Let)ee=findZoomCurve(ne.result);else if(ne instanceof Coalesce){for(const te of ne.args)if(ee=findZoomCurve(te),ee)break}else(ne instanceof Step||ne instanceof Interpolate)&&ne.input instanceof CompoundExpression&&ne.input.name==="zoom"&&(ee=ne);return ee instanceof ExpressionParsingError||ne.eachChild(te=>{const st=findZoomCurve(te);st instanceof ExpressionParsingError?ee=st:!ee&&st?ee=new ExpressionParsingError("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):ee&&st&&ee!==st&&(ee=new ExpressionParsingError("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))}),ee}function findGlobalStateRefs(ne,ee=new Set){return ne instanceof GlobalState&&ee.add(ne.ke
95y),ne.eachChild(te=>{findGlobalStateRefs(te,ee)}),ee}function getExpectedType(ne){const ee={color:ColorType,string:StringType,number:NumberType,enum:StringType,boolean:BooleanType,formatted:FormattedType,padding:PaddingType,numberArray:NumberArrayType,colorArray:ColorArrayType,projectionDefinition:ProjectionDefinitionType,resolvedImage:ResolvedImageType,variableAnchorOffsetCollection:VariableAnchorOffsetCollectionType};return ne.type==="array"?array(ee[ne.value]||ValueType,ne.length):ee[ne.type]}function getDefaultValue(ne){if(ne.type==="color"&&isFunction(ne.default))return new Color(0,0,0,0);switch(ne.type){case"color":return Color.parse(ne.default)||null;case"padding":return Padding.parse(ne.default)||null;case"numberArray":return NumberArray.parse(ne.default)||null;case"colorArray":return ColorArray.parse(ne.default)||null;case"variableAnchorOffsetCollection":return VariableAnchorOffsetCollection.parse(ne.default)||null;case"projectionDefinition":return ProjectionDefinition.parse(ne.default)||null;default:return ne.default===void 0?null:ne.default}}function addGlobalState(ne,ee){const{zoom:te,heatmapDensity:st,elevation:ot,lineProgress:ct,isSupportedScript:ut,accumulated:dt}=ne??{};return{zoom:te,heatmapDensity:st,elevation:ot,lineProgress:ct,isSupportedScript:ut,accumulated:dt,globalState:ee}}function classifyChildren(ne){let ee=!1;for(const te of ne){const st=classifyFilter(te);if(st==="expression")return"expression";st==="legacy"&&(ee=!0)}return ee?"legacy":"neutral"}function classifyFilter(ne){if(typeof ne=="boolean")return"neutral";if(!Array.isArray(ne)||ne.length===0)return"legacy";switch(ne[0]){case"has":return ne.length<2||ne[1]==="$id"||ne[1]==="$type"?"legacy":ne.length===2?"neutral":"expression";case"in":return ne.length>=3&&(typeof ne[1]!="string"||Array.isArray(ne[2]))?"expression":"legacy";case"!in":case"!has":return"legacy";case"==":case"!=":case">":case">=":case"<":case"<=":return ne.length!==3||Array.isArray(ne[1])||Array.isArray(ne[2])?"expression":"legacy";case"none":return"legacy";case"any":case"all":return classifyChildren(ne.slice(1));default:return"expression"}}function isExpressionFilter(ne){return classifyFilter(ne)!=="legacy"}function getFilterPropertyExpression(ne){return ne==="$type"?["geometry-type"]:ne==="$id"?["id"]:["get",ne]}function getLegacyFilterExpressionSuggestion(ne){switch(ne[0]){case"==":case"!=":case"<":case"<=":case">":case">=":return ne.length!==3||typeof ne[1]!="string"?null:[ne[0],getFilterPropertyExpression(ne[1]),ne[2]];case"in":case"!in":{if(ne.length<2||typeof ne[1]!="string")return null;const ee=["in",getFilterPropertyExpression(ne[1]),["literal",ne.slice(2)]];return ne[0]==="!in"?["!",ee]:ee}case"has":case"!has":{if(ne.length!==2||typeof ne[1]!="string"||ne[1]==="$type"||ne[1]==="$id")return null;const ee=["has",ne[1]];return ne[0]==="!has"?["!",ee]:ee}default:return null}}function getMixedFilterMessage(ne){if((ne[0]==="<"||ne[0]==="<="||ne[0]===">"||ne[0]===">=")&&ne[1]==="$type")return`"$type" cannot be use with operator "${ne[0]}"`;const ee=getLegacyFilterExpressionSuggestion(ne);return ee?`Mixing deprecated filter syntax with expression syntax is not supported. Replace ${JSON.stringify(ne)} with ${JSON.stringify(ee)}.`:`Mixing deprecated filter syntax with expression syntax is not supported. Convert ${JSON.stringify(ne)} to expression syntax.`}function checkChild(ne,ee,te){const st=te[ne];return Array.isArray(st)?isExpressionFilter(st)?findMixedLegacyFilter(st,ee.concat(ne)):{path:ee.concat(ne),legacyFilter:st}:null}function findMixedLegacyFilter(ne,ee=[]){if(!Array.isArray(ne)||ne.length<1)return null;switch(ne[0]){case"all":case"any":case"none":for(let te=1;te<ne.length;te++){const st=checkChild(te,ee,ne);if(st)return st}break;case"!":{const te=checkChild(1,ee,ne);if(te)return te;break}case"case":for(let te=1;te<ne.length-1;te+=2){const st=checkChild(te,ee,ne);if(st)return st}}return null}function warnAboutMixedLegacyFilter(ne,ee){const te=findMixedLegacyFilter(ne);if(!te||typeof console>"u")return;const st=te.path.map(ot=>`[${ot}]`).join("");console.warn(`${ee}${st}: ${getMixedFilterMessage(te.legacyFilter)}`)}const filterSpec={type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}};function featureFilter(ne,ee,te){if(ne==null)return{filter:()=>!0,needGeometry:!1,getGlobalStateRefs:()=>new Set};isExpressionFilter(ne)?warnAboutMixedLegacyFilter(ne,ee):ne=convertFilter(ne);const st=createExpression(ne,ee,filterSpec,te);if(st.result==="error")throw new Error(st.value.map(ot=>`${ot.key}: ${ot.message}`).join(", "));return{filter:(ot,ct,ut)=>st.value.evaluate(ot,ct,{},ut),needGeometry:geometryNeeded(ne),getGlobalStateRefs:()=>findGlobalStateRefs(st.value.expression)}}function compare(ne,ee){return ne<ee?-1:ne>ee?1:0}function geometryNeeded(ne){if(!Array.isArray(ne))return!1;if(ne[0]==="within"||ne[0]==="distance")return!0;for(let ee=1;ee<ne.length;ee++)if(geometryNeeded(ne[ee]))return!0;return!1}function convertFilter(ne){if(!ne)return!0;const ee=ne[0];return ne.length<=1?ee!=="any":ee==="=="?convertComparisonOp(ne[1],ne[2],"=="):ee==="!="?convertNegation(convertComparisonOp(ne[1],ne[2],"==")):ee==="<"||ee===">"||ee==="<="||ee===">="?convertComparisonOp(ne[1],ne[2],ee):ee==="any"?convertDisjunctionOp(ne.slice(1)):ee==="all"?["all"].concat(ne.slice(1).map(convertFilter)):ee==="none"?["all"].concat(ne.slice(1).map(convertFilter).map(convertNegation)):ee==="in"?convertInOp(ne[1],ne.slice(2)):ee==="!in"?convertNegation(convertInOp(ne[1],ne.slice(2))):ee==="has"?convertHasOp(ne[1]):ee==="!has"?convertNegation(convertHasOp(ne[1])):!0}function convertComparisonOp(ne,ee,te){switch(ne){case"$type":return[`filter-type-${te}`,ee];case"$id":return[`filter-id-${te}`,ee];default:return[`filter-${te}`,ne,ee]}}function convertDisjunctionOp(ne){return["any"].concat(ne.map(convertFilter))}function convertInOp(ne,ee){if(ee.length===0)return!1;switch(ne){case"$type":return["filter-type-in",["literal",ee]];case"$id":return["filter-id-in",["literal",ee]];default:return ee.length>200&&!ee.some(te=>typeof te!=typeof ee[0])?["filter-in-large",ne,["literal",ee.sort(compare)]]:["filter-in-small",ne,["literal",ee]]}}function convertHasOp(ne){switch(ne){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",ne]}}function convertNegation(ne){return["!",ne]}function convertLiteral(ne){return typeof ne=="object"?["literal",ne]:ne}function convertFunction(ne,ee){let te=ne.stops;if(!te)return convertIdentityFunction(ne,ee);const st=te&&typeof te[0][0]=="object",ot=st||ne.property!==void 0,ct=st||!ot;return te=te.map(ut=>!ot&&ee.tokens&&typeof ut[1]=="string"?[ut[0],convertTokenString(ut[1])]:[ut[0],convertLiteral(ut[1])]),st?convertZoomAndPropertyFunction(ne,ee,te):ct?convertZoomFunction(ne,ee,te):convertPropertyFunction(ne,ee,te)}function convertIdentityFunction(ne,ee){const te=["get",ne.property];if(ne.default===void 0)return ee.type==="string"?["string",te]:te;if(ee.type==="enum")return["match",te,Object.keys(ee.values),te,ne.default];{const st=[ee.type==="color"?"to-color":ee.type,te,convertLiteral(ne.default)];return ee.type==="array"&&st.splice(1,0,ee.value,ee.length||null),st}}function getInterpolateOperator(ne){switch(ne.colorSpace){case"hcl":return"interpolate-hcl";case"lab":return"interpolate-lab";default:return"interpolate"}}function convertZoomAndPropertyFunction(ne,ee,te){const st={},ot={},ct=[];for(let ut=0;ut<te.length;ut++){const dt=te[ut],ht=dt[0].zoom;st[ht]===void 0&&(st[ht]={zoom:ht,type:ne.type,property:ne.property,default:ne.default},ot[ht]=[],ct.push(ht)),ot[ht].push([dt[0].value,dt[1]])}if(getFunctionType({},ee)==="exponential"){const ut=[getInterpolateOperator(ne),["linear"],["zoom"]];for(const dt of ct)appendStopPair(ut,dt,convertPropertyFunction(st[dt],ee,ot[dt]),!1);return ut}else{const ut=["step",["zoom"]];for(const dt of ct)appendStopPair(ut,dt,convertPropertyFunction(st[dt],ee,ot[dt]),!0);return fixupDegenerateStepCurve(ut),ut}}function coalesce(ne,ee){if(ne!==void 0)return ne;if(ee!==void 0)return ee}function getFallback(ne,ee){const te=convertLiteral(coalesce(ne.default,ee.default));return te===void 0&&ee.type==="resolvedImage"?"":te}function convertPropertyFunction(ne,ee,te){const st=getFunctionType(ne,ee),ot=["get",ne.property];if(st==="categorical"&&typeof te[0][0]=="boolean"){const ct=["case"];for(const ut of te)ct.push(["==",ot,ut[0]],ut[1]);return ct.push(getFallback(ne,ee)),ct}else if(st==="categorical"){const ct=["match",ot];for(const ut of te)appendStopPair(ct,ut[0],ut[1],!1);return ct.push(getFallback(ne,ee)),ct}else if(st==="interval"){const ct=["step",["number",ot]];for(const ut of te)appendStopPair(ct,ut[0],ut[1],!0);return fixupDegenerateStepCurve(ct),ne.default===void 0?ct:["case",["==",["typeof",ot],"number"],ct,convertLiteral(ne.default)]}else if(st==="exponential"){const ct=ne.base!==void 0?ne.base:1,ut=[getInterpolateOperator(ne),ct===1?["linear"]:["exponential",ct],["number",ot]];for(const dt of te)appendStopPair(ut,dt[0],dt[1],!1);return ne.default===void 0?ut:["case",["==",["typeof",ot],"number"],ut,convertLiteral(ne.default)]}else throw new Error(`Unknown property function type ${st}`)}function convertZoomFunction(ne,ee,te,st=["zoom"]){const ot=getFunctionType(ne,ee);let ct,ut=!1;if(ot==="interval")ct=["step",st],ut=!0;else if(ot==="exponential"){const dt=ne.base!==void 0?ne.base:1;ct=[getInterpolateOperator(ne),dt===1?["linear"]:["exponential",dt],st]}else throw new Error(`Unknown zoom function type "${ot}"`);for(const dt of te)appendStopPair(ct,dt[0],dt[1],ut);return fixupDegenerateStepCurve(ct),ct}function fixupDegenerateStepCurve(ne){ne[0]==="step"&&ne.length===3&&(ne.push(0),ne.push(ne[3]))}function appendStopPair(ne,ee,te,st){ne.length>3&&ee===ne[ne.length-2]||(st&&ne.length===2||ne.push(ee),ne.push(te))}function getFunctionType(ne,ee){return ne.type?ne.type:ee.expression.interpolated?"exponential":"interval"}function convertTokenString(ne){const ee=["concat"],te=/{([^{}]+)}/g;let st=0;for(let ot=te.exec(ne);ot!==null;ot=te.exec(ne)){const ct=ne.slice(st,te.lastIndex-ot[0].length);st=te.lastIndex,ct.length>0&&ee.push(ct),ee.push(["get",ot[1]])}if(ee.length===1)return ne;if(st<ne.length)ee.push(ne.slice(st));else if(ee.length===2)return["to-string",ee[1]];return ee}const PointerEventType={POINTERMOVE:"pointermove",POINTERDOWN:"pointerdown"};class MapBrowserEventHandler extends Target{constructor(ee,te){super(ee),this.map_=ee,this.clickTimeoutId_,this.emulateClicks_=!1,this.dragging_=!1,this.dragListenerKeys_=[],this.moveTolerance_=te===void 0?1:te,this.down_=null;const st=this.map_.getViewport();this.activePointers_=[],this.trackedTouches_={},this.element_=st,this.pointerdownListenerKey_=listen(st,PointerEventType.POINTERDOWN,this.handlePointerDown_,this),this.originalPointerMoveEvent_,this.relayedListenerKey_=listen(st,PointerEventType.POINTERMOVE,this.relayMoveEvent_,this),this.boundHandleTouchMove_=this.handleTouchMove_.bind(this),this.element_.addEventListener(EventType.TOUCHMOVE,this.boundHandleTouchMove_,PASSIVE_EVENT_LISTENERS?{passive:!1}:!1)}emulateClick_(ee){let te=new MapBrowserEvent(MapBrowserEventType.CLICK,this.map_,ee);this.dispatchEvent(te),this.clickTimeoutId_!==void 0?(clearTimeout(this.clickTimeoutId_),this.clickTimeoutId_=void 0,te=new MapBrowserEvent(MapBrowserEventType.DBLCLICK,this.map_,ee),this.dispatchEvent(te)):this.clickTimeoutId_=setTimeout(()=>{this.clickTimeoutId_=void 0;const st=new MapBrowserEvent(MapBrowserEventType.SINGLECLICK,this.map_,ee);this.dispatchEvent(st)},250)}updateActivePointers_(ee){const te=ee,st=te.pointerId;if(te.type==MapBrowserEventType.POINTERUP||te.type==MapBrowserEventType.POINTERCANCEL){delete this.trackedTouches_[st];for(const ot in this.trackedTouches_)if(this.trackedTouches_[ot].target!==te.target){delete this.trackedTouches_[ot];break}}else(te.type==MapBrowserEventType.POINTERDOWN||te.type==MapBrowserEventType.POINTERMOVE)&&(this.trackedTouches_[st]=te);this.activePointers_=Object.values(this.trackedTouches_)}handlePointerUp_(ee){this.updateActivePointers_(ee);const te=new MapBrowserEvent(MapBrowserEventType.POINTERUP,this.map_,ee,void 0,void 0,this.activePointers_);this.dispatchEvent(te),this.emulateClicks_&&!te.defaultPrevented&&!this.dragging_&&this.isMouseActionButton_(ee)&&this.emulateClick_(this.down_),this.activePointers_.length===0&&(this.dragListenerKeys_.forEach(unlistenByKey),this.dragListenerKeys_.length=0,this.dragging_=!1,this.down_=null)}isMouseActionButton_(ee){return ee.button===0}handlePointerDown_(ee){this.emulateClicks_=this.activePointers_.length===0,this.updateActivePointers_(ee);const te=new MapBrowserEvent(MapBrowserEventType.POINTERDOWN,this.map_,ee,void 0,void 0,this.activePointers_);
95if(this.dispatchEvent(te),this.down_=new PointerEvent(ee.type,ee),Object.defineProperty(this.down_,"target",{writable:!1,value:ee.target}),this.dragListenerKeys_.length===0){const st=this.map_.getOwnerDocument();this.dragListenerKeys_.push(listen(st,MapBrowserEventType.POINTERMOVE,this.handlePointerMove_,this),listen(st,MapBrowserEventType.POINTERUP,this.handlePointerUp_,this),listen(this.element_,MapBrowserEventType.POINTERCANCEL,this.handlePointerUp_,this)),this.element_.getRootNode&&this.element_.getRootNode()!==st&&this.dragListenerKeys_.push(listen(this.element_.getRootNode(),MapBrowserEventType.POINTERUP,this.handlePointerUp_,this))}}handlePointerMove_(ee){if(this.isMoving_(ee)){this.updateActivePointers_(ee),this.dragging_=!0;const te=new MapBrowserEvent(MapBrowserEventType.POINTERDRAG,this.map_,ee,this.dragging_,void 0,this.activePointers_);this.dispatchEvent(te)}}relayMoveEvent_(ee){this.originalPointerMoveEvent_=ee;const te=!!(this.down_&&this.isMoving_(ee));this.dispatchEvent(new MapBrowserEvent(MapBrowserEventType.POINTERMOVE,this.map_,ee,te))}handleTouchMove_(ee){const te=this.originalPointerMoveEvent_;(!te||te.defaultPrevented)&&(typeof ee.cancelable!="boolean"||ee.cancelable===!0)&&ee.preventDefault()}isMoving_(ee){return this.dragging_||Math.abs(ee.clientX-this.down_.clientX)>this.moveTolerance_||Math.abs(ee.clientY-this.down_.clientY)>this.moveTolerance_}disposeInternal(){this.relayedListenerKey_&&(unlistenByKey(this.relayedListenerKey_),this.relayedListenerKey_=null),this.element_.removeEventListener(EventType.TOUCHMOVE,this.boundHandleTouchMove_),this.pointerdownListenerKey_&&(unlistenByKey(this.pointerdownListenerKey_),this.pointerdownListenerKey_=null),this.dragListenerKeys_.forEach(unlistenByKey),this.dragListenerKeys_.length=0,this.element_=null,super.disposeInternal()}}const MapProperty={LAYERGROUP:"layergroup",SIZE:"size",TARGET:"target",VIEW:"view"},DROP=1/0;class PriorityQueue{constructor(ee,te){this.priorityFunction_=ee,this.keyFunction_=te,this.elements_=[],this.priorities_=[],this.queuedElements_={}}clear(){this.elements_.length=0,this.priorities_.length=0,clear$1(this.queuedElements_)}dequeue(){const ee=this.elements_,te=this.priorities_,st=ee[0];ee.length==1?(ee.length=0,te.length=0):(ee[0]=ee.pop(),te[0]=te.pop(),this.siftUp_(0));const ot=this.keyFunction_(st);return delete this.queuedElements_[ot],st}enqueue(ee){assert(!(this.keyFunction_(ee)in this.queuedElements_),"Tried to enqueue an `element` that was already added to the queue");const te=this.priorityFunction_(ee);return te!=DROP?(this.elements_.push(ee),this.priorities_.push(te),this.queuedElements_[this.keyFunction_(ee)]=!0,this.siftDown_(0,this.elements_.length-1),!0):!1}getCount(){return this.elements_.length}getLeftChildIndex_(ee){return ee*2+1}getRightChildIndex_(ee){return ee*2+2}getParentIndex_(ee){return ee-1>>1}heapify_(){let ee;for(ee=(this.elements_.length>>1)-1;ee>=0;ee--)this.siftUp_(ee)}isEmpty(){return this.elements_.length===0}isKeyQueued(ee){return ee in this.queuedElements_}isQueued(ee){return this.isKeyQueued(this.keyFunction_(ee))}siftUp_(ee){const te=this.elements_,st=this.priorities_,ot=te.length,ct=te[ee],ut=st[ee],dt=ee;for(;ee<ot>>1;){const ht=this.getLeftChildIndex_(ee),ft=this.getRightChildIndex_(ee),pt=ft<ot&&st[ft]<st[ht]?ft:ht;te[ee]=te[pt],st[ee]=st[pt],ee=pt}te[ee]=ct,st[ee]=ut,this.siftDown_(dt,ee)}siftDown_(ee,te){const st=this.elements_,ot=this.priorities_,ct=st[te],ut=ot[te];for(;te>ee;){const dt=this.getParentIndex_(te);if(ot[dt]>ut)st[te]=st[dt],ot[te]=ot[dt],te=dt;else break}st[te]=ct,ot[te]=ut}reprioritize(){const ee=this.priorityFunction_,te=this.elements_,st=this.priorities_;let ot=0;const ct=te.length;let ut,dt,ht;for(dt=0;dt<ct;++dt)ut=te[dt],ht=ee(ut),ht==DROP?delete this.queuedElements_[this.keyFunction_(ut)]:(st[ot]=ht,te[ot++]=ut);te.length=ot,st.length=ot,this.heapify_()}}class TileQueue extends PriorityQueue{constructor(ee,te){super(st=>ee.apply(null,st),st=>st[0].getKey()),this.boundHandleTileChange_=this.handleTileChange.bind(this),this.tileChangeCallback_=te,this.tilesLoading_=0,this.tilesLoadingKeys_={}}enqueue(ee){const te=super.enqueue(ee);return te&&ee[0].addEventListener(EventType.CHANGE,this.boundHandleTileChange_),te}getTilesLoading(){return this.tilesLoading_}handleTileChange(ee){const te=ee.target,st=te.getState();if(st===TileState.LOADED||st===TileState.ERROR||st===TileState.EMPTY){st!==TileState.ERROR&&te.removeEventListener(EventType.CHANGE,this.boundHandleTileChange_);const ot=te.getKey();ot in this.tilesLoadingKeys_&&(delete this.tilesLoadingKeys_[ot],--this.tilesLoading_),this.tileChangeCallback_()}}loadMoreTiles(ee,te){let st=0;for(;this.tilesLoading_<ee&&st<te&&this.getCount()>0;){const ot=this.dequeue()[0],ct=ot.getKey();ot.getState()===TileState.IDLE&&!(ct in this.tilesLoadingKeys_)&&(this.tilesLoadingKeys_[ct]=!0,++this.tilesLoading_,++st,ot.load())}}}function getTilePriority(ne,ee,te,st,ot){if(!ne||!(te in ne.wantedTiles)||!ne.wantedTiles[te][ee.getKey()])return DROP;const ct=ne.viewState.center,ut=st[0]-ct[0],dt=st[1]-ct[1];return 65536*Math.log(ot)+Math.sqrt(ut*ut+dt*dt)/ot}class Attribution extends Control{constructor(ee){ee=ee||{},super({element:document.createElement("div"),render:ee.render,target:ee.target}),this.ulElement_=document.createElement("ul"),this.collapsed_=ee.collapsed!==void 0?ee.collapsed:!0,this.userCollapsed_=this.collapsed_,this.overrideCollapsible_=ee.collapsible!==void 0,this.collapsible_=ee.collapsible!==void 0?ee.collapsible:!0,this.collapsible_||(this.collapsed_=!1),this.attributions_=ee.attributions;const te=ee.className!==void 0?ee.className:"ol-attribution",st=ee.tipLabel!==void 0?ee.tipLabel:"Attributions",ot=ee.expandClassName!==void 0?ee.expandClassName:te+"-expand",ct=ee.collapseLabel!==void 0?ee.collapseLabel:"›",ut=ee.collapseClassName!==void 0?ee.collapseClassName:te+"-collapse";typeof ct=="string"?(this.collapseLabel_=document.createElement("span"),this.collapseLabel_.textContent=ct,this.collapseLabel_.className=ut):this.collapseLabel_=ct;const dt=ee.label!==void 0?ee.label:"i";typeof dt=="string"?(this.label_=document.createElement("span"),this.label_.textContent=dt,this.label_.className=ot):this.label_=dt;const ht=this.collapsible_&&!this.collapsed_?this.collapseLabel_:this.label_;this.toggleButton_=document.createElement("button"),this.toggleButton_.setAttribute("type","button"),this.toggleButton_.setAttribute("aria-expanded",String(!this.collapsed_)),this.toggleButton_.title=st,this.toggleButton_.appendChild(ht),this.toggleButton_.addEventListener(EventType.CLICK,this.handleClick_.bind(this),!1);
95const ft=te+" "+CLASS_UNSELECTABLE+" "+CLASS_CONTROL+(this.collapsed_&&this.collapsible_?" "+CLASS_COLLAPSED:"")+(this.collapsible_?"":" ol-uncollapsible"),pt=this.element;pt.className=ft,pt.appendChild(this.toggleButton_),pt.appendChild(this.ulElement_),this.renderedAttributions_=[],this.renderedVisible_=!0}collectSourceAttributions_(ee){const te=this.getMap().getAllLayers(),st=new Set(te.flatMap(ot=>ot.getAttributions(ee)));if(this.attributions_!==void 0&&(Array.isArray(this.attributions_)?this.attributions_.forEach(ot=>st.add(ot)):st.add(this.attributions_)),!this.overrideCollapsible_){const ot=!te.some(ct=>{var ut;return((ut=ct.getSource())==null?void 0:ut.getAttributionsCollapsible())===!1});this.setCollapsible(ot)}return Array.from(st)}async updateElement_(ee){if(!ee){this.renderedVisible_&&(this.element.style.display="none",this.renderedVisible_=!1);return}const te=await Promise.all(this.collectSourceAttributions_(ee).map(ot=>toPromise(()=>ot))),st=te.length>0;if(this.renderedVisible_!=st&&(this.element.style.display=st?"":"none",this.renderedVisible_=st),!equals(te,this.renderedAttributions_)){removeChildren(this.ulElement_);for(let ot=0,ct=te.length;ot<ct;++ot){const ut=document.createElement("li");ut.innerHTML=te[ot],this.ulElement_.appendChild(ut)}this.renderedAttributions_=te}}handleClick_(ee){ee.preventDefault(),this.handleToggle_(),this.userCollapsed_=this.collapsed_}handleToggle_(){this.element.classList.toggle(CLASS_COLLAPSED),this.collapsed_?replaceNode(this.collapseLabel_,this.label_):replaceNode(this.label_,this.collapseLabel_),this.collapsed_=!this.collapsed_,this.toggleButton_.setAttribute("aria-expanded",String(!this.collapsed_))}getCollapsible(){return this.collapsible_}setCollapsible(ee){this.collapsible_!==ee&&(this.collapsible_=ee,this.element.classList.toggle("ol-uncollapsible"),this.userCollapsed_&&this.handleToggle_())}setCollapsed(ee){this.userCollapsed_=ee,!(!this.collapsible_||this.collapsed_===ee)&&this.handleToggle_()}getCollapsed(){return this.collapsed_}render(ee){this.updateElement_(ee.frameState)}}class Rotate extends Control{constructor(ee){ee=ee||{},super({element:document.createElement("div"),render:ee.render,target:ee.target});const te=ee.className!==void 0?ee.className:"ol-rotate",st=ee.label!==void 0?ee.label:"⇧",ot=ee.compassClassName!==void 0?ee.compassClassName:"ol-compass";this.label_=null,typeof st=="string"?(this.label_=document.createElement("span"),this.label_.className=ot,this.label_.textContent=st):(this.label_=st,this.label_.classList.add(ot));const ct=ee.tipLabel?ee.tipLabel:"Reset rotation",ut=document.createElement("button");ut.className=te+"-reset",ut.setAttribute("type","button"),ut.title=ct,ut.appendChild(this.label_),ut.addEventListener(EventType.CLICK,this.handleClick_.bind(this),!1);const dt=te+" "+CLASS_UNSELECTABLE+" "+CLASS_CONTROL,ht=this.element;ht.className=dt,ht.appendChild(ut),this.callResetNorth_=ee.resetNorth?ee.resetNorth:void 0,this.duration_=ee.duration!==void 0?ee.duration:250,this.autoHide_=ee.autoHide!==void 0?ee.autoHide:!0,this.rotation_=void 0,this.autoHide_&&this.element.classList.add(CLASS_HIDDEN)}handleClick_(ee){ee.preventDefault(),this.callResetNorth_!==void 0?this.callResetNorth_():this.resetNorth_()}resetNorth_(){const te=this.getMap().getView();if(!te)return;const st=te.getRotation();st!==void 0&&(this.duration_>0&&st%(2*Math.PI)!==0?te.animate({rotation:0,duration:this.duration_,easing:easeOut}):te.setRotation(0))}render(ee){const te=ee.frameState;if(!te)return;const st=te.viewState.rotation;if(st!=this.rotation_){const ot="rotate("+st+"rad)";if(this.autoHide_){const ct=this.element.classList.contains(CLASS_HIDDEN);!ct&&st===0?this.element.classList.add(CLASS_HIDDEN):ct&&st!==0&&this.element.classList.remove(CLASS_HIDDEN)}this.label_.style.transform=ot}this.rotation_=st}}class Zoom extends Control{constructor(ee){ee=ee||{},super({element:document.createElement("div"),target:ee.target});const te=ee.className!==void 0?ee.className:"ol-zoom",st=ee.delta!==void 0?ee.delta:1,ot=ee.zoomInClassName!==void 0?ee.zoomInClassName:te+"-in",ct=ee.zoomOutClassName!==void 0?ee.zoomOutClassName:te+"-out",ut=ee.zoomInLabel!==void 0?ee.zoomInLabel:"+",dt=ee.zoomOutLabel!==void 0?ee.zoomOutLabel:"–",ht=ee.zoomInTipLabel!==void 0?ee.zoomInTipLabel:"Zoom in",ft=ee.zoomOutTipLabel!==void 0?ee.zoomOutTipLabel:"Zoom out",pt=document.createElement("button");pt.className=ot,pt.setAttribute("type","button"),pt.title=ht,pt.appendChild(typeof ut=="string"?document.createTextNode(ut):ut),pt.addEventListener(EventType.CLICK,this.handleClick_.bind(this,st),!1);const mt=document.createElement("button");mt.className=ct,mt.setAttribute("type","button"),mt.title=ft,mt.appendChild(typeof dt=="string"?document.createTextNode(dt):dt),mt.addEventListener(EventType.CLICK,this.handleClick_.bind(this,-st),!1);const yt=te+" "+CLASS_UNSELECTABLE+" "+CLASS_CONTROL,vt=this.element;vt.className=yt,vt.appendChild(pt),vt.appendChild(mt),this.duration_=ee.duration!==void 0?ee.duration:250}handleClick_(ee,te){te.preventDefault(),this.zoomByDelta_(ee)}zoomByDelta_(ee){const st=this.getMap().getView();if(!st)return;const ot=st.getZoom();if(ot!==void 0){const ct=st.getConstrainedZoom(ot+ee);this.duration_>0?(st.getAnimating()&&st.cancelAnimations(),st.animate({zoom:ct,duration:this.duration_,easing:easeOut})):st.setZoom(ct)}}}function defaults$2(ne){ne=ne||{};const ee=new Collection;return(ne.zoom!==void 0?ne.zoom:!0)&&ee.push(new Zoom(ne.zoomOptions)),(ne.rotate!==void 0?ne.rotate:!0)&&ee.push(new Rotate(ne.rotateOptions)),(ne.attribution!==void 0?ne.attribution:!0)&&ee.push(new Attribution(ne.attributionOptions)),ee}const GroupEventType={ADDLAYER:"addlayer",REMOVELAYER:"removelayer"};class GroupEvent extends BaseEvent{constructor(ee,te){super(ee),this.layer=te}}const Property$1={LAYERS:"layers"};class LayerGroup extends BaseLayer{constructor(ee){ee=ee||{};const te=Object.assign({},ee);delete te.layers;let st=ee.layers;super(te),this.on,this.once,this.un,this.layersListenerKeys_=[],this.listenerKeys_={},this.addChangeListener(Property$1.LAYERS,this.handleLayersChanged_),st?Array.isArray(st)?st=new Collection(st.slice(),{unique:!0}):assert(typeof st.getArray=="function","Expected `layers` to be an array or a `Collection`"):st=new Collection(void 0,{unique:!0}),this.setLayers(st)}handleLayerChange_(){this.changed()}handleLayersChanged_(){this.layersListenerKeys_.forEach(unlistenByKey),this.layersListenerKeys_.length=0;const ee=this.getLayers();this.layersListenerKeys_.push(listen(ee,CollectionEventType.ADD,this.handleLayersAdd_,this),listen(ee,CollectionEventType.REMOVE,this.handleLayersRemove_,this));for(const st in this.listenerKeys_)this.listenerKeys_[st].forEach(unlistenByKey);clear$1(this.listenerKeys_);const te=ee.getArray();for(let st=0,ot=te.length;
95st<ot;st++){const ct=te[st];this.registerLayerListeners_(ct),this.dispatchEvent(new GroupEvent(GroupEventType.ADDLAYER,ct))}this.changed()}registerLayerListeners_(ee){const te=[listen(ee,ObjectEventType.PROPERTYCHANGE,this.handleLayerChange_,this),listen(ee,EventType.CHANGE,this.handleLayerChange_,this)];ee instanceof LayerGroup&&te.push(listen(ee,GroupEventType.ADDLAYER,this.handleLayerGroupAdd_,this),listen(ee,GroupEventType.REMOVELAYER,this.handleLayerGroupRemove_,this)),this.listenerKeys_[getUid(ee)]=te}handleLayerGroupAdd_(ee){this.dispatchEvent(new GroupEvent(GroupEventType.ADDLAYER,ee.layer))}handleLayerGroupRemove_(ee){this.dispatchEvent(new GroupEvent(GroupEventType.REMOVELAYER,ee.layer))}handleLayersAdd_(ee){const te=ee.element;this.registerLayerListeners_(te),this.dispatchEvent(new GroupEvent(GroupEventType.ADDLAYER,te)),this.changed()}handleLayersRemove_(ee){const te=ee.element,st=getUid(te);this.listenerKeys_[st].forEach(unlistenByKey),delete this.listenerKeys_[st],this.dispatchEvent(new GroupEvent(GroupEventType.REMOVELAYER,te)),this.changed()}getLayers(){return this.get(Property$1.LAYERS)}setLayers(ee){const te=this.getLayers();if(te){const st=te.getArray();for(let ot=0,ct=st.length;ot<ct;++ot)this.dispatchEvent(new GroupEvent(GroupEventType.REMOVELAYER,st[ot]))}this.set(Property$1.LAYERS,ee)}getLayersArray(ee){return ee=ee!==void 0?ee:[],this.getLayers().forEach(function(te){te.getLayersArray(ee)}),ee}getLayerStatesArray(ee){const te=ee!==void 0?ee:[],st=te.length;this.getLayers().forEach(function(ut){ut.getLayerStatesArray(te)});const ot=this.getLayerState();let ct=ot.zIndex;!ee&&ot.zIndex===void 0&&(ct=0);for(let ut=st,dt=te.length;ut<dt;ut++){const ht=te[ut];ht.opacity*=ot.opacity,ht.visible=ht.visible&&ot.visible,ht.maxResolution=Math.min(ht.maxResolution,ot.maxResolution),ht.minResolution=Math.max(ht.minResolution,ot.minResolution),ht.minZoom=Math.max(ht.minZoom,ot.minZoom),ht.maxZoom=Math.min(ht.maxZoom,ot.maxZoom),ot.extent!==void 0&&(ht.extent!==void 0?ht.extent=getIntersection(ht.extent,ot.extent):ht.extent=ot.extent),ht.zIndex===void 0&&(ht.zIndex=ct)}return te}getSourceState(){return"ready"}}class MapRenderer extends Disposable{constructor(ee){super(),this.map_=ee}dispatchRenderEvent(ee,te){abstract()}calculateMatrices2D(ee){const te=ee.viewState,st=ee.coordinateToPixelTransform,ot=ee.pixelToCoordinateTransform;compose(st,ee.size[0]/2,ee.size[1]/2,1/te.resolution,-1/te.resolution,-te.rotation,-te.center[0],-te.center[1]),makeInverse(ot,st)}forEachFeatureAtCoordinate(ee,te,st,ot,ct,ut,dt,ht){let ft;const pt=te.viewState;function mt(Nt,Gt,Bt,Ut){return ct.call(ut,Gt,Nt?Bt:null,Ut)}const yt=pt.projection,vt=wrapX$1(ee.slice(),yt),_t=[[0,0]];if(yt.canWrapX()&&ot){const Nt=yt.getExtent(),Gt=getWidth(Nt);_t.push([-Gt,0],[Gt,0])}const bt=te.layerStatesArray,xt=bt.length,Mt=[],Ot=[];for(let Nt=0;Nt<_t.length;Nt++)for(let Gt=xt-1;Gt>=0;--Gt){const Bt=bt[Gt],Ut=Bt.layer;if(Ut.hasRenderer()&&inView(Bt,pt)&&dt.call(ht,Ut)){const Vt=Ut.getRenderer(),Ht=Ut.getSource();if(Vt&&Ht){const zt=Ht.getWrapX()?vt:ee,jt=mt.bind(null,Bt.managed);Ot[0]=zt[0]+_t[Nt][0],Ot[1]=zt[1]+_t[Nt][1],ft=Vt.forEachFeatureAtCoordinate(Ot,te,st,jt,Mt)}if(ft)return ft}}if(Mt.length===0)return;const kt=1/Mt.length;return Mt.forEach((Nt,Gt)=>Nt.distanceSq+=Gt*kt),Mt.sort((Nt,Gt)=>Nt.distanceSq-Gt.distanceSq),Mt.some(Nt=>ft=Nt.callback(Nt.feature,Nt.layer,Nt.geometry)),ft}hasFeatureAtCoordinate(ee,te,st,ot,ct,ut){return this.forEachFeatureAtCoordinate(ee,te,st,ot,TRUE,this,ct,ut)!==void 0}getMap(){return this.map_}renderFrame(ee){abstract()}scheduleExpireIconCache(ee){shared.canExpireCache()&&ee.postRenderFunctions.push(expireIconCache)}}function expireIconCache(ne,ee){shared.expire()}class CompositeMapRenderer extends MapRenderer{constructor(ee){super(ee),this.fontChangeListenerKey_=listen(checkedFonts,ObjectEventType.PROPERTYCHANGE,ee.redrawText,ee),this.element_=WORKER_OFFSCREEN_CANVAS?createMockDiv():document.createElement("div");const te=this.element_.style;te.position="absolute",te.width="100%",te.height="100%",te.zIndex="0",this.element_.className=CLASS_UNSELECTABLE+" ol-layers";const st=ee.getViewport();
95st&&st.insertBefore(this.element_,st.firstChild||null),this.children_=[],this.renderedVisible_=!0}dispatchRenderEvent(ee,te){const st=this.getMap();if(st.hasListener(ee)){const ot=new RenderEvent(ee,void 0,te);st.dispatchEvent(ot)}}disposeInternal(){unlistenByKey(this.fontChangeListenerKey_),this.element_.remove(),super.disposeInternal()}renderFrame(ee){if(!ee){this.renderedVisible_&&(this.element_.style.display="none",this.renderedVisible_=!1);return}this.calculateMatrices2D(ee),this.dispatchRenderEvent(RenderEventType.PRECOMPOSE,ee);const te=ee.layerStatesArray.sort((pt,mt)=>pt.zIndex-mt.zIndex);te.some(pt=>pt.layer instanceof BaseVectorLayer&&pt.layer.getDeclutter())&&(ee.declutter={});const ot=ee.viewState;this.children_.length=0;const ut=this.getMap().getTargetElement();let dt;isCanvas(ut)&&(dt=ut.getContext("2d"),dt.setTransform(1,0,0,1,0,0),dt.clearRect(0,0,ut.width,ut.height));const ht=[];let ft=dt?ut:null;for(let pt=0,mt=te.length;pt<mt;++pt){const yt=te[pt];ee.layerIndex=pt;const vt=yt.layer,_t=vt.getSourceState();if(!inView(yt,ot)||_t!="ready"&&_t!="undefined"){vt.unrender();continue}const bt=vt.render(ee,ft);bt&&(bt!==ft&&(this.children_.push(bt),ft=bt),ht.push(yt))}this.declutter(ee,ht),replaceChildren(this.element_,this.children_);for(const pt of dt?this.children_:[]){const mt=pt.firstElementChild||pt,yt=pt.style.backgroundColor;if(yt&&(!isCanvas(mt)||mt.width>0)&&(dt.fillStyle=yt,dt.fillRect(0,0,dt.canvas.width,dt.canvas.height)),!isCanvas(mt)||mt.width===0)continue;dt.save();const vt=pt.style.opacity||mt.style.opacity;dt.globalAlpha=vt===""?1:Number(vt);const _t=mt.style.transform;if(_t)dt.transform(...fromString$1(_t));else{const bt=parseFloat(mt.style.width)/mt.width,xt=parseFloat(mt.style.height)/mt.height;dt.transform(bt,0,0,xt,0,0)}dt.drawImage(mt,0,0),dt.restore()}this.dispatchRenderEvent(RenderEventType.POSTCOMPOSE,ee),this.renderedVisible_||(this.element_.style.display="",this.renderedVisible_=!0),this.scheduleExpireIconCache(ee)}declutter(ee,te){if(ee.declutter){for(let st=te.length-1;st>=0;--st){const ot=te[st],ct=ot.layer;ct.getDeclutter()&&ct.renderDeclutter(ee,ot)}te.forEach(st=>st.layer.renderDeferred(ee))}}}function removeLayerMapProperty(ne){if(ne instanceof Layer$1){ne.setMapInternal(null);return}ne instanceof LayerGroup&&ne.getLayers().forEach(removeLayerMapProperty)}function setLayerMapProperty(ne,ee){if(ne instanceof Layer$1){ne.setMapInternal(ee);return}if(ne instanceof LayerGroup){const te=ne.getLayers().getArray();for(let st=0,ot=te.length;st<ot;++st)setLayerMapProperty(te[st],ee)}}let Map$1=class extends BaseObject{constructor(ee){super(),ee=ee||{},this.on,this.once,this.un;const te=createOptionsInternal(ee);this.renderComplete_=!1,this.loaded_=!0,this.boundHandleBrowserEvent_=this.handleBrowserEvent.bind(this),this.maxTilesLoading_=ee.maxTilesLoading!==void 0?ee.maxTilesLoading:16,this.pixelRatio_=ee.pixelRatio!==void 0?ee.pixelRatio:DEVICE_PIXEL_RATIO,this.postRenderTimeoutHandle_,this.animationDelayKey_,this.animationDelay_=this.animationDelay_.bind(this),this.coordinateToPixelTransform_=create$1(),this.pixelToCoordinateTransform_=create$1(),this.frameIndex_=0,this.frameState_=null,this.previousExtent_=null,this.viewPropertyListenerKey_=null,this.viewChangeListenerKey_=null,this.layerGroupPropertyListenerKeys_=null,WORKER_OFFSCREEN_CANVAS||(this.viewport_=document.createElement("div"),this.viewport_.className="ol-viewport"+("ontouchstart"in window?" ol-touch":""),this.viewport_.style.position="relative",this.viewport_.style.overflow="hidden",this.viewport_.style.width="100%",this.viewport_.style.height="100%",this.overlayContainer_=document.createElement("div"),this.overlayContainer_.style.position="absolute",this.overlayContainer_.style.zIndex="0",this.overlayContainer_.style.width="100%",this.overlayContainer_.style.height="100%",this.overlayContainer_.style.pointerEvents="none",this.overlayContainer_.className="ol-overlaycontainer",this.viewport_.appendChild(this.overlayContainer_),this.overlayContainerStopEvent_=document.createElement("div"),this.overlayContainerStopEvent_.style.position="absolute",this.overlayContainerStopEvent_.style.zIndex="0",this.overlayContainerStopEvent_.style.width="100%",this.overlayContainerStopEvent_.style.height="100%",this.overlayContainerStopEvent_.style.pointerEvents="none",this.overlayContainerStopEvent_.className="ol-overlaycontainer-stopevent",this.viewport_.appendChild(this.overlayContainerStopEvent_)),this.mapBrowserEventHandler_=null,this.moveTolerance_=ee.moveTolerance,this.keyboardEventTarget_=te.keyboardEventTarget,this.targetChangeHandlerKeys_=null,this.targetElement_=null,WORKER_OFFSCREEN_CANVAS||
95(this.resizeObserver_=new ResizeObserver(()=>this.updateSize())),this.controls=te.controls||(WORKER_OFFSCREEN_CANVAS?new Collection:defaults$2()),this.interactions=te.interactions||(WORKER_OFFSCREEN_CANVAS?new Collection:defaults$3({onFocusOnly:!0})),this.overlays_=te.overlays,this.overlayIdIndex_={},this.renderer_=null,this.postRenderFunctions_=[],this.tileQueue_=new TileQueue(this.getTilePriority.bind(this),this.handleTileChange_.bind(this)),this.addChangeListener(MapProperty.LAYERGROUP,this.handleLayerGroupChanged_),this.addChangeListener(MapProperty.VIEW,this.handleViewChanged_),this.addChangeListener(MapProperty.SIZE,this.handleSizeChanged_),this.addChangeListener(MapProperty.TARGET,this.handleTargetChanged_),this.setProperties(te.values);const st=this;ee.view&&!(ee.view instanceof View)&&ee.view.then(function(ot){st.setView(new View(ot))}),this.controls.addEventListener(CollectionEventType.ADD,ot=>{ot.element.setMap(this)}),this.controls.addEventListener(CollectionEventType.REMOVE,ot=>{ot.element.setMap(null)}),this.interactions.addEventListener(CollectionEventType.ADD,ot=>{ot.element.setMap(this)}),this.interactions.addEventListener(CollectionEventType.REMOVE,ot=>{ot.element.setMap(null)}),this.overlays_.addEventListener(CollectionEventType.ADD,ot=>{this.addOverlayInternal_(ot.element)}),this.overlays_.addEventListener(CollectionEventType.REMOVE,ot=>{const ct=ot.element.getId();ct!==void 0&&delete this.overlayIdIndex_[ct.toString()],ot.element.setMap(null)}),this.controls.forEach(ot=>{ot.setMap(this)}),this.interactions.forEach(ot=>{ot.setMap(this)}),this.overlays_.forEach(this.addOverlayInternal_.bind(this))}addControl(ee){this.getControls().push(ee)}addInteraction(ee){this.getInteractions().push(ee)}addLayer(ee){this.getLayerGroup().getLayers().push(ee)}handleLayerAdd_(ee){setLayerMapProperty(ee.layer,this)}addOverlay(ee){this.getOverlays().push(ee)}addOverlayInternal_(ee){const te=ee.getId();te!==void 0&&(this.overlayIdIndex_[te.toString()]=ee),ee.setMap(this)}disposeInternal(){var ee;this.controls.clear(),this.interactions.clear(),this.overlays_.clear(),(ee=this.resizeObserver_)==null||ee.disconnect(),this.setTarget(null),super.disposeInternal()}forEachFeatureAtPixel(ee,te,st){if(!this.frameState_||!this.renderer_)return;const ot=this.getCoordinateFromPixelInternal(ee);st=st!==void 0?st:{};const ct=st.hitTolerance!==void 0?st.hitTolerance:0,ut=st.layerFilter!==void 0?st.layerFilter:TRUE,dt=st.checkWrapped!==!1;return this.renderer_.forEachFeatureAtCoordinate(ot,this.frameState_,ct,dt,te,null,ut,null)}getFeaturesAtPixel(ee,te){const st=[];return this.forEachFeatureAtPixel(ee,function(ot){st.push(ot)},te),st}getAllLayers(){const ee=[];function te(st){st.forEach(function(ot){ot instanceof LayerGroup?te(ot.getLayers()):ee.push(ot)})}return te(this.getLayers()),ee}hasFeatureAtPixel(ee,te){if(!this.frameState_||!this.renderer_)return!1;const st=this.getCoordinateFromPixelInternal(ee);te=te!==void 0?te:{};const ot=te.layerFilter!==void 0?te.layerFilter:TRUE,ct=te.hitTolerance!==void 0?te.hitTolerance:0,ut=te.checkWrapped!==!1;return this.renderer_.hasFeatureAtCoordinate(st,this.frameState_,ct,ut,ot,null)}getEventCoordinate(ee){return this.getCoordinateFromPixel(this.getEventPixel(ee))}getEventCoordinateInternal(ee){return this.getCoordinateFromPixelInternal(this.getEventPixel(ee))}getEventPixel(ee){const st=this.viewport_.getBoundingClientRect(),ot=this.getSize(),ct=st.width/ot[0],ut=st.height/ot[1],dt="changedTouches"in ee?ee.changedTouches[0]:ee;return[(dt.clientX-st.left)/ct,(dt.clientY-st.top)/ut]}getTarget(){return this.get(MapProperty.TARGET)}getTargetElement(){return this.targetElement_}getCoordinateFromPixel(ee){return toUserCoordinate(this.getCoordinateFromPixelInternal(ee),this.getView().getProjection())}getCoordinateFromPixelInternal(ee){const te=this.frameState_;return te?apply$1(te.pixelToCoordinateTransform,ee.slice()):null}getControls(){return this.controls}getOverlays(){return this.overlays_}getOverlayById(ee){const te=this.overlayIdIndex_[ee.toString()];return te!==void 0?te:null}getInteractions(){return this.interactions}getLayerGroup(){return this.get(MapProperty.LAYERGROUP)}setLayers(ee){const te=this.getLayerGroup();if(ee instanceof Collection){te.setLayers(ee);return}const st=te.getLayers();st.clear(),st.extend(ee)}getLayers(){return this.getLayerGroup().getLayers()}getLoadingOrNotReady(){const ee=this.getLayerGroup().getLayerStatesArray();for(let te=0,st=ee.length;te<st;++te){const ot=ee[te];if(!ot.visible)continue;const ct=ot.layer.getRenderer();if(ct&&!ct.ready)return!0;const ut=ot.layer.getSource();if(ut&&ut.loading)return!0}return!1}
95getPixelFromCoordinate(ee){const te=fromUserCoordinate(ee,this.getView().getProjection());return this.getPixelFromCoordinateInternal(te)}getPixelFromCoordinateInternal(ee){const te=this.frameState_;return te?apply$1(te.coordinateToPixelTransform,ee.slice(0,2)):null}getPixelRatio(){return this.pixelRatio_}setPixelRatio(ee){this.pixelRatio_!==ee&&(this.pixelRatio_=ee,this.render())}getRenderer(){return this.renderer_}getSize(){return this.get(MapProperty.SIZE)}getView(){return this.get(MapProperty.VIEW)}getViewport(){return this.viewport_}getOverlayContainer(){return this.overlayContainer_}getOverlayContainerStopEvent(){return this.overlayContainerStopEvent_}getOwnerDocument(){const ee=this.getTargetElement();return ee?ee.ownerDocument:document}getTilePriority(ee,te,st,ot){return getTilePriority(this.frameState_,ee,te,st,ot)}handleBrowserEvent(ee,te){te=te||ee.type;const st=new MapBrowserEvent(te,this,ee);this.handleMapBrowserEvent(st)}handleMapBrowserEvent(ee){if(!this.frameState_)return;const te=ee.originalEvent,st=te.type;if(st===PointerEventType.POINTERDOWN||st===EventType.WHEEL||st===EventType.KEYDOWN){const ot=this.getOwnerDocument(),ct=this.viewport_.getRootNode?this.viewport_.getRootNode():ot,ut=te.target,dt=ct instanceof ShadowRoot?ct.host===ut?ct.host.ownerDocument:ct:ct===ot?ot.documentElement:ct;if(this.overlayContainerStopEvent_.contains(ut)||!dt.contains(ut))return}if(ee.frameState=this.frameState_,this.dispatchEvent(ee)!==!1){const ot=this.getInteractions().getArray().slice();for(let ct=ot.length-1;ct>=0;ct--){const ut=ot[ct];if(ut.getMap()!==this||!ut.getActive()||!this.getTargetElement())continue;if(!ut.handleEvent(ee)||ee.propagationStopped)break}}}handlePostRender(){const ee=this.frameState_,te=this.tileQueue_;if(!te.isEmpty()){let ot=this.maxTilesLoading_,ct=ot;const ut=ee?ee.viewHints:void 0,dt=ut?ut[ViewHint.ANIMATING]||ut[ViewHint.INTERACTING]:!1;if(dt){const ht=Date.now()-ee.time>8;ot=ht?0:8,ct=ht?0:2}te.getTilesLoading()<ot&&(dt&&te.reprioritize(),te.loadMoreTiles(ot,ct))}ee&&this.renderer_&&!ee.animate&&(this.renderComplete_?(this.hasListener(RenderEventType.RENDERCOMPLETE)&&this.renderer_.dispatchRenderEvent(RenderEventType.RENDERCOMPLETE,ee),this.loaded_===!1&&(this.loaded_=!0,this.dispatchEvent(new MapEvent(MapEventType.LOADEND,this,ee)))):this.loaded_===!0&&(this.loaded_=!1,this.dispatchEvent(new MapEvent(MapEventType.LOADSTART,this,ee))));const st=this.postRenderFunctions_;if(ee)for(let ot=0,ct=st.length;ot<ct;++ot)st[ot](this,ee);st.length=0}handleSizeChanged_(){this.getView()&&!this.getView().getAnimating()&&this.getView().resolveConstraints(0),this.render()}handleTargetChanged_(){var st,ot;if(this.mapBrowserEventHandler_){for(let ct=0,ut=this.targetChangeHandlerKeys_.length;ct<ut;++ct)unlistenByKey(this.targetChangeHandlerKeys_[ct]);this.targetChangeHandlerKeys_=null,this.viewport_.removeEventListener(EventType.CONTEXTMENU,this.boundHandleBrowserEvent_),this.viewport_.removeEventListener(EventType.WHEEL,this.boundHandleBrowserEvent_),this.mapBrowserEventHandler_.dispose(),this.mapBrowserEventHandler_=null,this.viewport_.remove()}if(this.targetElement_&&!isCanvas(this.targetElement_)){(st=this.resizeObserver_)==null||st.unobserve(this.targetElement_);const ct=this.targetElement_.getRootNode();ct instanceof ShadowRoot&&this.resizeObserver_.unobserve(ct.host),this.setSize(void 0)}const ee=this.getTarget(),te=typeof ee=="string"?document.getElementById(ee):ee;if(this.targetElement_=te,!te)this.renderer_&&(clearTimeout(this.postRenderTimeoutHandle_),this.postRenderTimeoutHandle_=void 0,this.postRenderFunctions_.length=0,this.renderer_.dispose(),this.renderer_=null),this.animationDelayKey_&&(cancelAnimationFrame(this.animationDelayKey_),this.animationDelayKey_=void 0);else{if(isCanvas(te)||te.appendChild(this.viewport_),this.renderer_||(this.renderer_=new CompositeMapRenderer(this)),!isCanvas(te)){this.mapBrowserEventHandler_=new MapBrowserEventHandler(this,this.moveTolerance_);for(const ut in MapBrowserEventType)this.mapBrowserEventHandler_.addEventListener(MapBrowserEventType[ut],this.handleMapBrowserEvent.bind(this));this.viewport_.addEventListener(EventType.CONTEXTMENU,this.boundHandleBrowserEvent_,!1),this.viewport_.addEventListener(EventType.WHEEL,this.boundHandleBrowserEvent_,PASSIVE_EVENT_LISTENERS?{passive:!1}:!1);let ct;if(this.keyboardEventTarget_)ct=this.keyboardEventTarget_;else{const ut=te.getRootNode();ct=ut instanceof ShadowRoot?ut.host:te}if(this.targetChangeHandlerKeys_=[listen(ct,EventType.KEYDOWN,this.handleBrowserEvent,this),listen(ct,EventType.KEYPRESS,this.handleBrowserEvent,this)],!isCanvas(te)){const ut=te.getRootNode();ut instanceof ShadowRoot&&this.resizeObserver_.observe(ut.host),(ot=this.resizeObserver_)==null||ot.observe(te)}}this.updateSize()}}handleTileChange_(){this.render()}handleViewPropertyChanged_(){this.render()}handleViewChanged_(){this.viewPropertyListenerKey_&&(unlistenByKey(this.viewPropertyListenerKey_),this.viewPropertyListenerKey_=null),this.viewChangeListenerKey_&&(unlistenByKey(this.viewChangeListenerKey_),this.viewChangeListenerKey_=null);const ee=this.getView();ee&&(this.updateViewportSize_(this.getSize()),this.viewPropertyListenerKey_=listen(ee,ObjectEventType.PROPERTYCHANGE,this.handleViewPropertyChanged_,this),this.viewChangeListenerKey_=listen(ee,EventType.CHANGE,this.handleViewPropertyChanged_,this),ee.resolve
95Constraints(0)),this.render()}handleLayerGroupChanged_(){this.layerGroupPropertyListenerKeys_&&(this.layerGroupPropertyListenerKeys_.forEach(unlistenByKey),this.layerGroupPropertyListenerKeys_=null);const ee=this.getLayerGroup();ee&&(this.handleLayerAdd_(new GroupEvent("addlayer",ee)),this.layerGroupPropertyListenerKeys_=[listen(ee,ObjectEventType.PROPERTYCHANGE,this.render,this),listen(ee,EventType.CHANGE,this.render,this),listen(ee,"addlayer",this.handleLayerAdd_,this),listen(ee,"removelayer",this.handleLayerRemove_,this)]),this.render()}isRendered(){return!!this.frameState_}animationDelay_(){this.animationDelayKey_=void 0,this.renderFrame_(Date.now())}renderSync(){this.animationDelayKey_&&cancelAnimationFrame(this.animationDelayKey_),this.animationDelay_()}redrawText(){if(!this.frameState_)return;const ee=this.frameState_.layerStatesArray;for(let te=0,st=ee.length;te<st;++te){const ot=ee[te].layer;ot.hasRenderer()&&ot.getRenderer().handleFontsChanged()}}render(){this.renderer_&&this.animationDelayKey_===void 0&&(this.animationDelayKey_=requestAnimationFrame(this.animationDelay_))}removeControl(ee){return this.getControls().remove(ee)}removeInteraction(ee){return this.getInteractions().remove(ee)}removeLayer(ee){return this.getLayerGroup().getLayers().remove(ee)}handleLayerRemove_(ee){removeLayerMapProperty(ee.layer)}removeOverlay(ee){return this.getOverlays().remove(ee)}renderFrame_(ee){const te=this.getSize(),st=this.getView(),ot=this.frameState_;let ct=null;if(te!==void 0&&hasArea(te)&&st&&st.isDef()){const ut=st.getHints(this.frameState_?this.frameState_.viewHints:void 0),dt=st.getState();if(ct={animate:!1,coordinateToPixelTransform:this.coordinateToPixelTransform_,declutter:null,extent:getForViewAndSize(dt.center,dt.resolution,dt.rotation,te),index:this.frameIndex_++,layerIndex:0,layerStatesArray:this.getLayerGroup().getLayerStatesArray(),pixelRatio:this.pixelRatio_,pixelToCoordinateTransform:this.pixelToCoordinateTransform_,postRenderFunctions:[],size:te,tileQueue:this.tileQueue_,time:ee,usedTiles:{},viewState:dt,viewHints:ut,wantedTiles:{},mapId:getUid(this),renderTargets:{}},dt.nextCenter&&dt.nextResolution){const ht=isNaN(dt.nextRotation)?dt.rotation:dt.nextRotation;ct.nextExtent=getForViewAndSize(dt.nextCenter,dt.nextResolution,ht,te)}}this.frameState_=ct,this.renderer_.renderFrame(ct),ct&&(ct.animate&&this.render(),Array.prototype.push.apply(this.postRenderFunctions_,ct.postRenderFunctions),ot&&(!this.previousExtent_||!isEmpty$1(this.previousExtent_)&&!equals$2(ct.extent,this.previousExtent_))&&(this.dispatchEvent(new MapEvent(MapEventType.MOVESTART,this,ot)),this.previousExtent_=createOrUpdateEmpty(this.previousExtent_)),this.previousExtent_&&!ct.viewHints[ViewHint.ANIMATING]&&!ct.viewHints[ViewHint.INTERACTING]&&!equals$2(ct.extent,this.previousExtent_)&&(this.dispatchEvent(new MapEvent(MapEventType.MOVEEND,this,ct)),clone$2(ct.extent,this.previousExtent_))),this.dispatchEvent(new MapEvent(MapEventType.POSTRENDER,this,ct)),this.renderComplete_=(this.hasListener(MapEventType.LOADSTART)||this.hasListener(MapEventType.LOADEND)||this.hasListener(RenderEventType.RENDERCOMPLETE))&&!this.tileQueue_.getTilesLoading()&&!this.tileQueue_.getCount()&&!this.getLoadingOrNotReady(),this.postRenderTimeoutHandle_||(this.postRenderTimeoutHandle_=setTimeout(()=>{this.postRenderTimeoutHandle_=void 0,this.handlePostRender()},0))}setLayerGroup(ee){const te=this.getLayerGroup();te&&this.handleLayerRemove_(new GroupEvent("removelayer",te)),this.set(MapProperty.LAYERGROUP,ee)}setSize(ee){this.set(MapProperty.SIZE,ee)}setTarget(ee){this.set(MapProperty.TARGET,ee)}setView(ee){if(!ee||ee instanceof View){this.set(MapProperty.VIEW,ee);return}this.set(MapProperty.VIEW,new View);const te=this;ee.then(function(st){te.setView(new View(st))})}updateSize(){const ee=this.getTargetElement();let te;if(ee){let ot,ct;if(isCanvas(ee)){const ut=ee.getContext("2d").getTransform();ot=ee.width/ut.a,ct=ee.height/ut.d}else{const ut=getComputedStyle(ee);ot=ee.offsetWidth-parseFloat(ut.borderLeftWidth)-parseFloat(ut.paddingLeft)-parseFloat(ut.paddingRight)-parseFloat(ut.borderRightWidth),ct=ee.offsetHeight-parseFloat(ut.borderTopWidth)-parseFloat(ut.paddingTop)-parseFloat(ut.paddingBottom)-parseFloat(ut.borderBottomWidth)}!isNaN(ot)&&!isNaN(ct)&&(te=[Math.max(0,ot),Math.max(0,ct)],!hasArea(te)&&(ee.offsetWidth||ee.offsetHeight||ee.getClientRects().length)&&warn("No map visible because the map container's width or height are 0."))}const st=this.getSize();te&&(!st||!equals(te,st))&&(this.updateViewportSize_(te),this.setSize(te))}updateViewportSize_(ee){const te=this.getView();te&&te.setViewportSize(ee)}};function createOptionsInternal(ne){let ee=null;ne.keyboardEventTarget!==void 0&&(ee=typeof ne.keyboardEventTarget=="string"?document.getElementById(ne.ke
95yboardEventTarget):ne.keyboardEventTarget);const te={},st=ne.layers&&typeof ne.layers.getLayers=="function"?ne.layers:new LayerGroup({layers:ne.layers});te[MapProperty.LAYERGROUP]=st,te[MapProperty.TARGET]=ne.target,te[MapProperty.VIEW]=ne.view instanceof View?ne.view:new View;let ot;ne.controls!==void 0&&(Array.isArray(ne.controls)?ot=new Collection(ne.controls.slice()):(assert(typeof ne.controls.getArray=="function","Expected `controls` to be an array or an `ol/Collection.js`"),ot=ne.controls));let ct;ne.interactions!==void 0&&(Array.isArray(ne.interactions)?ct=new Collection(ne.interactions.slice()):(assert(typeof ne.interactions.getArray=="function","Expected `interactions` to be an array or an `ol/Collection.js`"),ct=ne.interactions));let ut;return ne.overlays!==void 0?Array.isArray(ne.overlays)?ut=new Collection(ne.overlays.slice()):(assert(typeof ne.overlays.getArray=="function","Expected `overlays` to be an array or an `ol/Collection.js`"),ut=ne.overlays):ut=new Collection,{controls:ot,interactions:ct,keyboardEventTarget:ee,overlays:ut,values:te}}function hsla(ne,ee){const te=ee[0].evaluate(ne),st=ee[1].evaluate(ne),ot=ee[2].evaluate(ne),ct=ee[3]?ee[3].evaluate(ne):1;return Color.parse(`hsla(${te}, ${st}%, ${ot}%, ${ct})`)}function rgbaToHsla(ne){const ee=ne[0]/255,te=ne[1]/255,st=ne[2]/255,ot=ne[3],ct=Math.max(ee,te,st),ut=Math.min(ee,te,st),dt=(ct+ut)/2;let ht,ft;if(ct===ut)ht=0,ft=0;else{const pt=ct-ut;switch(ft=dt>.5?pt/(2-ct-ut):pt/(ct+ut),ct){case ee:ht=(te-st)/pt+(te<st?6:0);break;case te:ht=(st-ee)/pt+2;break;case st:ht=(ee-te)/pt+4;break;default:ht=0}ht/=6}return[ht*360,ft*100,dt*100,ot]}function wrapImageExtraArgs(ne){if(Array.isArray(ne)){if(ne.length===0)return ne;const ee=ne[0];if(ee==="literal")return ne;if(ee==="image"&&ne.length===3&&typeof ne[2]=="object"&&ne[2]!==null&&!Array.isArray(ne[2]))return["image-config",wrapImageExtraArgs(ne[1]),["literal",ne[2]]];const te=ne.length;for(let st=1;st<te;++st){const ot=ne[st],ct=wrapImageExtraArgs(ot);if(ct!==ot){const ut=[ee];for(let dt=1;dt<st;++dt)ut.push(ne[dt]);ut.push(ct);for(let dt=st+1;dt<te;++dt)ut.push(wrapImageExtraArgs(ne[dt]));return ut}}}return ne}const styleConfig={},cameraObj={zoom:0,distanceFromCenter:0};CompoundExpression.register(expressions,{...CompoundExpression.definitions,pitch:[{kind:"number"},[],ne=>cameraObj.pitch||0],"distance-from-center":[{kind:"number"},[],ne=>cameraObj.distanceFromCenter||0],"to-hsla":[{kind:"array",itemType:{kind:"number"},N:4},[{kind:"string"}],(ne,[ee])=>rgbaToHsla(fromString(ee.evaluate(ne)))],hsl:[{kind:"color"},[{kind:"number"},{kind:"number"},{kind:"number"}],hsla],hsla:[{kind:"color"},[{kind:"number"},{kind:"number"},{kind:"number"},{kind:"number"}],hsla],"image-config":[{kind:"value"},[{kind:"string"},{kind:"value"}],(ne,[ee,te])=>ee.evaluate(ne)],"measure-light":[{kind:"number"},[{kind:"value"}],()=>1],config:[{kind:"value"},[{kind:"string"}],(ne,[ee])=>{const te=styleConfig[ee.evaluate(ne)];return te===void 0?{}:te}]});const mapboxBaseUrl="https://api.mapbox.com";function getMapboxPath(ne){const ee="mapbox://";return ne.indexOf(ee)!==0?"":ne.slice(ee.length)}function normalizeSpriteDefinition(ne,ee,te){if(typeof ne=="string")return[{id:"default",url:normalizeSpriteUrl(ne,ee,te)}];for(const st of ne)st.url=normalizeSpriteUrl(st.url,ee,te);return ne}function normalizeSpriteUrl(ne,ee,te){const st=getMapboxPath(ne);if(!ee||!st)return decodeURI(new URL(ne,te).href);const ot="sprites/";if(st.indexOf(ot)!==0)throw new Error(`unexpected sprites url: ${ne}`);const ct=st.slice(ot.length);return`${mapboxBaseUrl}/styles/v1/${ct}/sprite?access_token=${ee}`}function normalizeStyleUrl(ne,ee){const te=getMapboxPath(ne);if(!te||!ee)return decodeURI(new URL(ne,location.href).href);const st="styles/";if(te.indexOf(st)!==0)throw new Error(`unexpected style url: ${ne}`);const ot=te.slice(st.length);return`${mapboxBaseUrl}/styles/v1/${ot}?&access_token=${ee}`}const mapboxSubdomains=["a","b","c","d"];function normalizeSourceUrl(ne,ee,te,st){const ot=new URL(ne,st||location.href),ct=getMapboxPath(ne);if(!ct)return ee?(ot.searchParams.has(te)||ot.searchParams.set(te,ee),[decodeURI(ot.href)]):[decodeURI(ot.href)];if(ct==="mapbox.satellite"){const ut=window.devicePixelRatio>=1.5?"@2x":"";return[`https://api.mapbox.com/v4/${ct}/{z}/{x}/{y}${ut}.webp?access_token=${ee}`]}return mapboxSubdomains.map(ut=>`https://${ut}.tiles.mapbox.com/v4/${ct}/{z}/{x}/{y}.vector.pbf?access_token=${ee}`)}const fontWeights={thin:100,hairline:100,"ultra-light":200,"extra-light":200,light:300,book:300,regular:400,normal:400,plain:400,roman:400,standard:400,medium:500,"semi-bold":600,"demi-bold":600,bold:700,"extra-bold":800,"ultra-bold":800,heavy:900,black:900,"heavy-black":900,fat:900,poster:900,"ultra-black":950,"extra-black":950},sp=" ",italicRE=/(italic|oblique)$/i,fontCache={};function mb2css(ne,ee,te){let st=fontCache[ne];if(!st){Array.isArray(ne)||(ne=[ne]);let ot=400,ct="normal";const ut=[];let dt,ht;
95for(let ft=0,pt=ne.length;ft<pt;++ft){const yt=ne[ft].split(" ");let vt=yt[yt.length-1].toLowerCase();vt=="normal"||vt=="italic"||vt=="oblique"?(ct=ht?ct:vt,ht=!0,yt.pop(),vt=yt[yt.length-1].toLowerCase()):italicRE.test(vt)&&(vt=vt.replace(italicRE,""),ct=ht?ct:yt[yt.length-1].replace(vt,""),ht=!0);for(const bt in fontWeights){const xt=yt.length>1?yt[yt.length-2].toLowerCase():"";if(vt==bt||vt==bt.replace("-","")||xt+"-"+vt==bt){ot=dt?ot:fontWeights[bt],yt.pop(),xt&&bt.startsWith(xt)&&yt.pop();break}}!dt&&typeof vt=="number"&&(ot=vt,dt=!0);let _t=yt.join(sp).replace("Klokantech Noto Sans","Noto Sans").replace("DIN Pro","Barlow").replace("Arial Unicode MS","Arial");_t.indexOf(sp)!==-1&&(_t='"'+_t+'"'),ut.push(_t)}st=[ct,ot,ut],fontCache[ne]=st}return st[0]+sp+st[1]+sp+ee+"px"+(te?"/"+te:"")+sp+st[2]}const Property={ACCURACY:"accuracy",ACCURACY_GEOMETRY:"accuracyGeometry",ALTITUDE:"altitude",ALTITUDE_ACCURACY:"altitudeAccuracy",HEADING:"heading",POSITION:"position",PROJECTION:"projection",SPEED:"speed",TRACKING:"tracking",TRACKING_OPTIONS:"trackingOptions"},GeolocationErrorType={ERROR:"error"};class GeolocationError extends BaseEvent{constructor(ee){super(GeolocationErrorType.ERROR),this.code=ee.code,this.message=ee.message}}class Geolocation extends BaseObject{constructor(ee){super(),this.on,this.once,this.un,ee=ee||{},this.position_=null,this.transform_=identityTransform,this.watchId_=void 0,this.addChangeListener(Property.PROJECTION,this.handleProjectionChanged_),this.addChangeListener(Property.TRACKING,this.handleTrackingChanged_),ee.projection!==void 0&&this.setProjection(ee.projection),ee.trackingOptions!==void 0&&this.setTrackingOptions(ee.trackingOptions),this.setTracking(ee.tracking!==void 0?ee.tracking:!1)}disposeInternal(){this.setTracking(!1),super.disposeInternal()}handleProjectionChanged_(){const ee=this.getProjection();ee&&(this.transform_=getTransformFromProjections(get$3("EPSG:4326"),ee),this.position_&&this.set(Property.POSITION,this.transform_(this.position_)))}handleTrackingChanged_(){if("geolocation"in navigator){const ee=this.getTracking();ee&&this.watchId_===void 0?this.watchId_=navigator.geolocation.watchPosition(this.positionChange_.bind(this),this.positionError_.bind(this),this.getTrackingOptions()):!ee&&this.watchId_!==void 0&&(navigator.geolocation.clearWatch(this.watchId_),this.watchId_=void 0)}}positionChange_(ee){const te=ee.coords;this.set(Property.ACCURACY,te.accuracy),this.set(Property.ALTITUDE,te.altitude===null?void 0:te.altitude),this.set(Property.ALTITUDE_ACCURACY,te.altitudeAccuracy===null?void 0:te.altitudeAccuracy),this.set(Property.HEADING,te.heading===null?void 0:toRadians(te.heading)),this.position_?(this.position_[0]=te.longitude,this.position_[1]=te.latitude):this.position_=[te.longitude,te.latitude];const st=this.transform_(this.position_);this.set(Property.POSITION,st.slice()),this.set(Property.SPEED,te.speed===null?void 0:te.speed);const ot=circular(this.position_,te.accuracy);ot.applyTransform(this.transform_),this.set(Property.ACCURACY_GEOMETRY,ot),this.changed()}positionError_(ee){this.dispatchEvent(new GeolocationError(ee))}getAccuracy(){return this.get(Property.ACCURACY)}getAccuracyGeometry(){return this.get(Property.ACCURACY_GEOMETRY)||null}getAltitude(){return this.get(Property.ALTITUDE)}getAltitudeAccuracy(){return this.get(Property.ALTITUDE_ACCURACY)}getHeading(){return this.get(Property.HEADING)}getPosition(){return this.get(Property.POSITION)}getProjection(){return this.get(Property.PROJECTION)}getSpeed(){return this.get(Property.SPEED)}getTracking(){return this.get(Property.TRACKING)}getTrackingOptions(){return this.get(Property.TRACKING_OPTIONS)}setProjection(ee){this.set(Property.PROJECTION,get$3(ee))}setTracking(ee){this.set(Property.TRACKING,ee)}setTrackingOptions(ee){this.set(Property.TRACKING_OPTIONS,ee)}}const emptyObj=Object.freeze({}),functionCacheByStyleId={},filterCacheByStyleId={};let styleId=0;function getStyleId(ne){return ne.id||(ne.id=styleId++),ne.id}function getStyleFunctionKey(ne,ee){return getStyleId(ne)+"."+getUid(ee)}function getFunctionCache(ne){let ee=functionCacheByStyleId[ne.id];return ee||(ee={},functionCacheByStyleId[getStyleId(ne)]=ee),ee}function getFilterCache(ne){let ee=filterCacheByStyleId[ne.id];return ee||(ee={},filterCacheByStyleId[getStyleId(ne)]=ee),ee}function deg2rad(ne){return ne*Math.PI/180}const defaultResolutions=(function(){const ne=[];for(let ee=78271.51696402048;ne.length<=24;ee/=2)ne.push(ee);return ne})();function createCanvas(ne,ee){if(typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof OffscreenCanvas<"u")return new OffscreenCanvas(ne,ee);const te=document.createElement("canvas");return te.width=ne,te.height=ee,te}function getZoomForResolution(ne,ee){let te=0;const st=ee.length;for(;te<st;++te)if(ee[te]<ne&&te+1<st){const ct=ee[te]/ee[te+1];return te+Math.log(ee[te]/ne)/Math.log(ct)}return st-1}function getResolutionForZoom(ne,ee){const te=Math.floor(ne),st=Math.pow(2,ne-te);return ee[te]/st}const pendingRequests={};function fetchResource(ne,ee,te={},st){if(ee in pendingRequests)return st&&(st.url=pendingRequests[ee][0].url),pendingRequests[ee][1];const ot=te.transformRequest&&te.transformRequest(ee,ne)||ee,ct=function(ht){return delete pe
95ndingRequests[ee],Promise.reject(new Error("Error fetching source "+ee))},ut=function(ht){return delete pendingRequests[ee],ht.ok?ht.json():Promise.reject(new Error("Error fetching source "+ee))},dt=toPromise(()=>ot).then(ht=>ht instanceof Response?(st&&(st.url=ht.url),ut(ht)):(ht instanceof Request||(ht=new Request(ht)),ht.headers.get("Accept")||ht.headers.set("Accept","application/json"),st&&(st.url=ht.url),fetch(ht).then(ut).catch(ct))).catch(ct);return pendingRequests[ee]=[ot,dt],dt}function getGlStyle(ne,ee){if(typeof ne=="string")if(ne.trim().startsWith("{"))try{const te=JSON.parse(ne);return Promise.resolve(te)}catch(te){return Promise.reject(te)}else return ne=normalizeStyleUrl(ne,ee.accessToken),fetchResource("Style",ne,ee);else return Promise.resolve(ne)}const tilejsonCache={};function getTileJson(ne,ee,te={}){const st=[ee,JSON.stringify(ne)].toString();let ot=tilejsonCache[st];if(!ot||te.transformRequest){let ct;te.transformRequest&&(ct=(dt,ht)=>{const ft=te.transformRequest&&te.transformRequest(ht,"Tiles")||ht;if(dt instanceof VectorTile$1)dt.setLoader((pt,mt,yt)=>{const vt=function(_t){_t.arrayBuffer().then(bt=>{const Mt=dt.getFormat().readFeatures(bt,{extent:pt,featureProjection:yt});dt.setFeatures(Mt)})};toPromise(()=>ft).then(_t=>{if(_t instanceof Response)return vt(_t);fetch(_t).then(vt).catch(bt=>dt.setState(TileState.ERROR))}).catch(_t=>dt.setState(TileState.ERROR))});else{const pt=dt.getImage();toPromise(()=>ft).then(mt=>{if(typeof mt=="string"){pt.src=mt;return}const yt=vt=>vt.blob().then(_t=>{const bt=URL.createObjectURL(_t);pt.addEventListener("load",()=>URL.revokeObjectURL(bt)),pt.addEventListener("error",()=>URL.revokeObjectURL(bt)),pt.src=bt});if(mt instanceof Response)return yt(mt);fetch(mt).then(yt).catch(vt=>dt.setState(TileState.ERROR))}).catch(mt=>dt.setState(TileState.ERROR))}});const ut=ne.url;if(ut&&!ne.tiles){const dt=normalizeSourceUrl(ut,te.accessToken,te.accessTokenParam||"access_token",ee||location.href);if(ut.startsWith("mapbox://"))ot=Promise.resolve({tileJson:Object.assign({},ne,{url:void 0,tiles:dt}),tileLoadFunction:ct});else{const ht={};ot=fetchResource("Source",dt[0],te,ht).then(function(ft){return ft.tiles=ft.tiles.map(function(pt){return ft.scheme==="tms"&&(pt=pt.replace("{y}","{-y}")),normalizeSourceUrl(pt,te.accessToken,te.accessTokenParam||"access_token",ht.url)[0]}),Promise.resolve({tileJson:ft,tileLoadFunction:ct})})}}else ne.tiles?(ne=Object.assign({},ne,{tiles:ne.tiles.map(function(dt){return ne.scheme==="tms"&&(dt=dt.replace("{y}","{-y}")),normalizeSourceUrl(dt,te.accessToken,te.accessTokenParam||"access_token",ee||location.href)[0]})}),ot=Promise.resolve({tileJson:Object.assign({},ne),tileLoadFunction:ct})):ot=Promise.reject(new Error("source has no `tiles` nor `url`"));tilejsonCache[st]=ot}return ot}function drawIconHalo(ne,ee,te,st){const ot=[2*te*ee.pixelRatio+ee.width,2*te*ee.pixelRatio+ee.height],ct=createCanvas(ot[0],ot[1]),ut=ct.getContext("2d");ut.drawImage(ne,ee.x,ee.y,ee.width,ee.height,te*ee.pixelRatio,te*ee.pixelRatio,ee.width,ee.height);const dt=ut.getImageData(0,0,ot[0],ot[1]);ut.globalCompositeOperation="destination-over",ut.fillStyle=`rgba(${st.r*255},${st.g*255},${st.b*255},${st.a})`;const ht=dt.data;for(let ft=0,pt=dt.width;ft<pt;++ft)for(let mt=0,yt=dt.height;mt<yt;++mt){const vt=(mt*pt+ft)*4;ht[vt+3]>0&&ut.arc(ft,mt,te*ee.pixelRatio,0,2*Math.PI)}return ut.fill(),ct}function smoothstep(ne,ee,te){const st=Math.max(0,Math.min(1,(te-ne)/(ee-ne)));return st*st*(3-2*st)}function drawSDF(ne,ee,te){const st=createCanvas(ee.width,ee.height),ot=st.getContext("2d");ot.drawImage(ne,ee.x,ee.y,ee.width,ee.height,0,0,ee.width,ee.height);const ct=ot.getImageData(0,0,ee.width,ee.height),ut=ct.data;for(let dt=0,ht=ct.width;dt<ht;++dt)for(let ft=0,pt=ct.height;ft<pt;++ft){const mt=(ft*ht+dt)*4,yt=ut[mt+3]/255,vt=.75,_t=.1,bt=smoothstep(vt-_t,vt+_t,yt);bt>0?(ut[mt+0]=Math.round(255*te.r*bt),ut[mt+1]=Math.round(255*te.g*bt),ut[mt+2]=Math.round(255*te.b*bt),ut[mt+3]=Math.round(255*bt)):ut[mt+3]=0}return ot.putImageData(ct,0,0),st}const hairSpacePool=Array(256).join(" ");function applyLetterSpacing(ne,ee){if(ee>=.05){let te="";const st=ne.split(`
96`),ot=hairSpacePool.slice(0,Math.round(ee/.1));for(let ct=0,ut=st.length;ct<ut;++ct)ct>0&&(te+=`
97`),te+=st[ct].split("").join(ot);return te}return ne}let measureContext;function getMeasureContext(){return measureContext||(measureContext=createCanvas(1,1).getContext("2d")),measureContext}function fitWeight(ne,ee){if(/\d+ \d+/.test(ne)){const[te,st]=ne.split(" ").map(Number);return te<=ee&&ee<=st}return ne==ee}function measureText(ne,ee){return getMeasureContext().measureText(ne).width+(ne.length-1)*ee}const measureCache={};checkedFonts.on("propertychange",()=>{for(const ne in measureCache)delete measureCache[ne]});function wrapText(ne,ee,te,st){if(ne.indexOf(`
98`)!==-1){const ut=ne.split(`
99`),dt=[];for(let ht=0,ft=ut.length;ht<ft;++ht)dt.push(wrapText(ut[ht],ee,te,st));return dt.join(`
100`)}const ot=te+","+ee+","+ne+","+st;let ct=measureCache[ot];if(!ct){const ut=ne.split(" ");if(ut.length>1){const dt=getMeasureContext();dt.font=ee;
100const ft=dt.measureText("M").width*te;let pt="";const mt=[];for(let yt=0,vt=ut.length;yt<vt;++yt){const _t=ut[yt],bt=pt+(pt?" ":"")+_t;measureText(bt,st)<=ft?pt=bt:(pt&&mt.push(pt),pt=_t)}pt&&mt.push(pt);for(let yt=0,vt=mt.length;yt<vt&&vt>1;++yt){const _t=mt[yt];if(measureText(_t,st)<ft*.35){const bt=yt>0?measureText(mt[yt-1],st):1/0,xt=yt<vt-1?measureText(mt[yt+1],st):1/0;mt.splice(yt,1),vt-=1,bt<xt?(mt[yt-1]+=" "+_t,yt-=1):mt[yt]=_t+" "+mt[yt]}}for(let yt=0,vt=mt.length-1;yt<vt;++yt){const _t=mt[yt],bt=mt[yt+1];if(measureText(_t,st)>ft*.7&&measureText(bt,st)<ft*.6){const xt=_t.split(" "),Mt=xt.pop();measureText(Mt,st)<ft*.2&&(mt[yt]=xt.join(" "),mt[yt+1]=Mt+" "+bt),vt-=1}}ct=mt.join(`
101`)}else ct=ne;ct=applyLetterSpacing(ct,st),measureCache[ot]=ct}return ct}const webSafeFonts=["Arial","Courier New","Times New Roman","Verdana","sans-serif","serif","monospace","cursive","fantasy"],processedFontFamilies={};function getFonts(ne,ee="https://cdn.jsdelivr.net/npm/@fontsource/{font-family}/{fontweight}{-fontstyle}.css"){if(WORKER_OFFSCREEN_CANVAS)return ne;let te;for(let st=0,ot=ne.length;st<ot;++st){const ct=ne[st];if(ct in processedFontFamilies)continue;processedFontFamilies[ct]=!0;const dt=mb2css(ct,16).split(" ");te||(te=[]),te.push([dt.slice(3).join(" ").replace(/"/g,""),dt[1],dt[0]])}return te&&(async()=>{await document.fonts.ready;for(let st=0,ot=te.length;st<ot;++st){const ct=te[st],ut=ct[0];if(webSafeFonts.includes(ut))continue;const dt=ct[1],ht=ct[2];if(!(await document.fonts.load(`${ht} ${dt} 16px "${ut}"`)).some(pt=>pt.family.replace(/^['"]|['"]$/g,"").toLowerCase()===ut.toLowerCase()&&fitWeight(pt.weight,dt)&&pt.style===ht)){const pt=ee.replace("{font-family}",ut.replace(/ /g,"-").toLowerCase()).replace("{Font+Family}",ut.replace(/ /g,"+")).replace("{fontweight}",dt).replace("{-fontstyle}",ht.replace("normal","").replace(/(.+)/,"-$1")).replace("{fontstyle}",ht);if(!document.querySelector('link[href="'+pt+'"]')){const mt=document.createElement("link");mt.href=pt,mt.rel="stylesheet",document.head.appendChild(mt)}}}})(),ne}const types$1={Point:1,MultiPoint:1,LineString:2,MultiLineString:2,Polygon:3,MultiPolygon:3},anchor={center:[.5,.5],left:[0,.5],right:[1,.5],top:[.5,0],bottom:[.5,1],"top-left":[0,0],"top-right":[1,0],"bottom-left":[0,1],"bottom-right":[1,1]},expressionData=function(ne,ee,te){let st=createPropertyExpression(ne,ee,te);if(st.result==="error"){const ot=wrapImageExtraArgs(ne);ot!==ne&&(st=createPropertyExpression(ot,ee,te))}if(st.result==="error"){const ot=st.value[0];return console.error("Error parsing expression:",ne,ot.key,ot.message),{evaluate:()=>te.default}}return st.value};let renderFeatureCoordinates,renderFeature;function getValue(ne,ee,te,st,ot,ct){const ut=ne.id;ot||(ot={},console.warn("No functionCache provided to getValue()")),ot[ut]||(ot[ut]={});const dt=ot[ut];if(!dt[te]){let ht=(ne[ee]||emptyObj)[te];const ft=`layers[${ut}].${ee}.${te}`,pt=latest,mt=pt[`${ee}_${ne.type}`]&&pt[`${ee}_${ne.type}`][te];ht===void 0&&mt&&(ht=mt.default);let yt=isExpression(ht);if(!yt&&isFunction(ht)&&(ht=convertFunction(ht,mt),yt=!0),yt){const vt=expressionData(ht,ft,mt);dt[te]=vt.evaluate.bind(vt)}else{const vt=mt?mt.type:typeof ht;(vt==="color"||vt==="colorArray")&&(ht=Color.parse(ht));let _t=!1;if(vt==="array")for(let bt=0;bt<ht.length;++bt){const xt=ht[bt];if(isExpression(xt)||isFunction(xt)){_t=!0;break}}if(_t){const bt=Object.assign({},mt,{type:mt.value}),xt=[];for(let Mt=0;Mt<ht.length;++Mt){let Ot=ht[Mt];if(!isExpression(Ot)&&isFunction(Ot)&&(Ot=convertFunction(Ot,bt)),isExpression(Ot)){const kt=expressionData(Ot,`${ft}[${Mt}]`,bt);xt.push(kt.evaluate.bind(kt))}else xt.push(function(){return Ot})}dt[te]=function(Mt,Ot,kt){const Nt=[];for(let Gt=0;Gt<xt.length;++Gt)Nt[Gt]=xt[Gt](Mt,Ot,kt);return Nt}}else dt[te]=function(){return ht}}}return dt[te](cameraObj,st,ct)}function getDeclutterMode(ne,ee,te,st){return getValue(ne,"layout",`${te}-allow-overlap`,ee,st)?getValue(ne,"layout",`${te}-ignore-placement`,ee,st)?"none":"obstacle":"declutter"}function evaluateFilter(ne,ee,te,st){if(st||console.warn("No filterCache provided to evaluateFilter()"),!(ne in st))try{st[ne]=featureFilter(ee,`layers[${ne}].filter`).filter}catch(ot){console.warn("Filter will evaluate to false: "+ot.message),st[ne]=function(){return!1}}return st[ne](cameraObj,te)}function colorWithOpacity(ne,ee){if(ne){if(ne.a===0||ee===0)return;const te=ne.a;return ee=ee===void 0?1:ee,te===0?"transparent":"rgba("+Math.round(ne.r*255/te)+","+Math.round(ne.g*255/te)+","+Math.round(ne.b*255/te)+","+te*ee+")"}return ne}const templateRegEx=/\{[^{}}]*\}/g;function fromTemplate(ne,ee){return ne.replace(templateRegEx,function(te){return ee[te.slice(1,-1)]||""})}function getSpriteImageForIcon(ne,ee){let te=ne.split(":")[0];return te===ne&&(te="default"),ee[te]}const styleFunctionArgs={};function stylefunction(ne,ee,te,st=defaultResolutions,ot=void 0,ct=void 0,ut=void 0,dt=void 0){if(typeof ee=="string"&&(ee=JSON.parse(ee)),ee.schema)for(const kt in ee.schema){const Nt=ee.schema[kt];"default"in Nt&&(styleConfig[kt]=Nt.default)}if(ee.version!=8)throw new Error("glStyle version 8 required.");styleFunctionArgs[getStyleFunctionKey(ee,ne)]=Array.from(arguments);const ht={};(typeof ct=="string"||ct instanceof Request||ct instanceof Response||ct instanceof Promise)&&(ct={default:ct});for(const kt in ct){const Nt=ct[kt];toPromise(()=>Nt).then(async Gt=>{let Bt;
101if(typeof Image<"u"){const Ut=new Image;if(typeof Gt=="string")Ut.crossOrigin="anonymous",Ut.src=Gt;else{let Vt;Gt instanceof Request?Vt=await fetch(Gt):Gt instanceof Response&&(Vt=Gt);const Ht=await Vt.blob();Bt=URL.createObjectURL(Ht),Ut.src=Bt}Ut.addEventListener("load",function Vt(){Ut.removeEventListener("load",Vt),ht[kt]={image:Ut,size:[Ut.width,Ut.height]},ne.changed(),Bt&&URL.revokeObjectURL(Bt)}),Ut.addEventListener("error",function Vt(){URL.revokeObjectURL(Bt),Ut.removeEventListener("error",Vt)})}else if(typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope){const Ut=self;Ut.postMessage({action:"loadImage",src:Gt}),Ut.addEventListener("message",function(Ht){Ht.data.action==="imageLoaded"&&Ht.data.src===Gt&&(ht[kt]={image:Ht.data.image,size:[Ht.data.image.width,Ht.data.image.height]})})}})}const ft=derefLayers(ee.layers),pt={},mt=[],yt={},vt={},_t=getFunctionCache(ee),bt=getFilterCache(ee);let xt;for(let kt=0,Nt=ft.length;kt<Nt;++kt){const Gt=ft[kt],Bt=Gt.id;if(typeof te=="string"&&Gt.source==te||Array.isArray(te)&&te.indexOf(Bt)!==-1){const Ut=Gt["source-layer"];if(xt){if(Gt.source!==xt)throw new Error(`Layer "${Bt}" does not use source "${xt}`)}else{xt=Gt.source;const Ht=ee.sources[xt];if(!Ht)throw new Error(`Source "${xt}" is not defined`);const zt=Ht.type;if(zt!=="vector"&&zt!=="geojson")throw new Error(`Source "${xt}" is not of type "vector" or "geojson", but "${zt}"`)}let Vt=pt[Ut];Vt||(Vt=[],pt[Ut]=Vt),Vt.push({layer:Gt,index:kt}),mt.push(Bt)}}const Mt=[],Ot=function(kt,Nt,Gt){var ai,xn,An;const Bt=((An=(xn=(ai=ne.getSource)==null?void 0:ai.call(ne))==null?void 0:xn.format_)==null?void 0:An.layerName_)??"mvt:layer",Ut=kt.getProperties(),Vt=pt[Ut[Bt]];if(!Vt)return;let Ht=st.indexOf(Nt);Ht==-1&&(Ht=getZoomForResolution(Nt,st)),cameraObj.zoom=Ht,cameraObj.distanceFromCenter=0;const zt=kt.getGeometry(),jt=types$1[zt.getType()],Wt=ne.get("map");if(Wt&&Wt instanceof Map$1&&jt===1){const Nn=Wt.getSize();if(Nn){const Xt=Wt.getView().getCenter(),Zt=getCenter(zt.getExtent());cameraObj.distanceFromCenter=distance(Xt,Zt)/Nt/Nn[1]}}const Jt={id:kt.getId(),properties:Ut,type:jt},Qt=ne.get("mapbox-featurestate")[kt.getId()];let oi=-1;for(let Nn=0,Xt=Vt.length;Nn<Xt;++Nn){const Zt=Vt[Nn],Kt=Zt.layer,ti=Kt.id;if(Gt!==void 0&&Gt!==ti)continue;const qt=Kt.layout||emptyObj,ii=Kt.paint||emptyObj;if(getValue(Kt,"layout","visibility",Jt,_t,Qt)==="none"||"minzoom"in Kt&&Ht<Kt.minzoom||"maxzoom"in Kt&&Ht>=Kt.maxzoom)continue;const ni=Kt.filter;if(!ni||evaluateFilter(ti,ni,Jt,bt)){let Cn,Ln,Un,Pn,Mn,Yt;const ri=Zt.index;if(jt==3&&(Kt.type=="fill"||Kt.type=="fill-extrusion")){if(Ln=getValue(Kt,"paint",`${Kt.type}-opacity`,Jt,_t,Qt),Kt.type+"-pattern"in ii){const $n=getValue(Kt,"paint",`${Kt.type}-pattern`,Jt,_t,Qt);if($n){const jn=typeof $n=="string"?fromTemplate($n,Ut):$n.toString(),zn=getSpriteImageForIcon(jn,ht);if(ot&&ot[jn]&&zn){++oi,Yt=Mt[oi],(!Yt||!Yt.getFill()||Yt.getStroke()||Yt.getText())&&(Yt=new Style$1({fill:new Fill}),Mt[oi]=Yt),Un=Yt.getFill(),Yt.setZIndex(ri);const Jn=jn+"."+Ln;let rs=vt[Jn];if(!rs){const os=ot[jn],ls=createCanvas(os.width,os.height),cs=ls.getContext("2d");cs.globalAlpha=Ln,cs.drawImage(zn.image,os.x,os.y,os.width,os.height,0,0,os.width,os.height),rs=cs.createPattern(ls,"repeat"),vt[Jn]=rs}Un.setColor(rs)}}}else if(Cn=colorWithOpacity(getValue(Kt,"paint",`${Kt.type}-color`,Jt,_t,Qt),Ln),Kt.type+"-outline-color"in ii&&(Mn=colorWithOpacity(getValue(Kt,"paint",`${Kt.type}-outline-color`,Jt,_t,Qt),Ln)),Mn||(Mn=Cn),Cn||Mn){if(++oi,Yt=Mt[oi],(!Yt||Cn&&!Yt.getFill()||!Cn&&Yt.getFill()||Mn&&!Yt.getStroke()||!Mn&&Yt.getStroke()||Yt.getText())&&(Yt=new Style$1({fill:Cn?new Fill:void 0,stroke:Mn?new Stroke:void 0}),Mt[oi]=Yt),Cn&&(Un=Yt.getFill(),Un.setColor(Cn)),Kt.type==="fill-extrusion"){const $n=getValue(Kt,"paint","fill-extrusion-height",Jt,_t,Qt);if($n>0){const jn=Math.max(.1,.9-Math.min($n,225)/280);if(Mn&&Mn!=="transparent"){const zn=Color.parse(Mn);Mn=`rgba(${Math.round(zn.r*255*jn)},${Math.round(zn.g*255*jn)},${Math.round(zn.b*255*jn)},${zn.a})`}}}Mn&&(Pn=Yt.getStroke(),Pn.setColor(Mn),Pn.setWidth(.5)),Yt.setZIndex(ri)}}if(jt!=1&&Kt.type=="line"){"line-pattern"in ii?Cn=void 0:Cn=colorWithOpacity(getValue(Kt,"paint","line-color",Jt,_t,Qt),getValue(Kt,"paint","line-opacity",Jt,_t,Qt));const $n=getValue(Kt,"paint","line-width",Jt,_t,Qt);Cn&&$n>
1010&&(++oi,Yt=Mt[oi],(!Yt||!Yt.getStroke()||Yt.getFill()||Yt.getText())&&(Yt=new Style$1({stroke:new Stroke}),Mt[oi]=Yt),Pn=Yt.getStroke(),Pn.setLineCap(getValue(Kt,"layout","line-cap",Jt,_t,Qt)),Pn.setLineJoin(getValue(Kt,"layout","line-join",Jt,_t,Qt)),Pn.setMiterLimit(getValue(Kt,"layout","line-miter-limit",Jt,_t,Qt)),Pn.setColor(Cn),Pn.setWidth($n),Pn.setLineDash(ii["line-dasharray"]?getValue(Kt,"paint","line-dasharray",Jt,_t,Qt).map(function(jn){return jn*$n}):null),typeof Pn.setOffset=="function"&&Pn.setOffset(getValue(Kt,"paint","line-offset",Jt,_t,Qt)),Yt.setZIndex(ri))}let Sn=!1,On=null,Rn=0,Bn,Vn,Wn;if((jt==1||jt==2)&&"icon-image"in qt){const $n=getValue(Kt,"layout","icon-image",Jt,_t,Qt);if($n){Bn=typeof $n=="string"?fromTemplate($n,Ut):$n.toString();let jn;const zn=dt?dt(ne,Bn):void 0,Jn=getSpriteImageForIcon(Bn,ht);if(ot&&ot[Bn]&&Jn||zn){const rs=getValue(Kt,"layout","symbol-placement",Jt,_t,Qt),os=getValue(Kt,"layout","icon-rotation-alignment",Jt,_t,Qt),ls=os==="auto"?rs!=="point":os==="map";if(jt==2){const cs=kt.getGeometry();if(cs.getFlatMidpoint||cs.getFlatMidpoints){const vs=cs.getExtent();if(Math.sqrt(Math.max(Math.pow((vs[2]-vs[0])/Nt,2),Math.pow((vs[3]-vs[1])/Nt,2)))>150){const fs=cs.getType()==="MultiLineString"?cs.getFlatMidpoints():cs.getFlatMidpoint();if(renderFeature||(renderFeatureCoordinates=[NaN,NaN],renderFeature=new RenderFeature("Point",renderFeatureCoordinates,[],2,{},void 0)),jn=renderFeature,renderFeatureCoordinates[0]=fs[0],renderFeatureCoordinates[1]=fs[1],rs==="line"&&ls){const _s=cs.getStride(),ms=cs.getFlatCoordinates();for(let Zs=0,ao=ms.length-_s;Zs<ao;Zs+=_s){const us=ms[Zs],ps=ms[Zs+1],gs=ms[Zs+_s],bs=ms[Zs+_s+1],Bo=Math.min(us,gs),qo=Math.max(us,gs),Lo=fs[0],ys=fs[1],Co=(bs-ps)*(Lo-us)-(gs-us)*(ys-ps);if(Math.abs(Co)<.001&&Lo<=qo&&Lo>=Bo){Rn=Math.atan2(ps-bs,gs-us);break}}}}}}if(jt!==2||jn){const cs=getValue(Kt,"layout","icon-size",Jt,_t,Qt),vs=ii["icon-color"]!==void 0?getValue(Kt,"paint","icon-color",Jt,_t,Qt):null;if(!vs||vs.a!==0){const hs=getValue(Kt,"paint","icon-halo-color",Jt,_t,Qt),fs=getValue(Kt,"paint","icon-halo-width",Jt,_t,Qt);let _s=`${Bn}.${cs}.${fs}.${hs}.${ls}`;if(vs!==null&&(_s+=`.${vs}`),Vn=yt[_s],!Vn){const ms=getDeclutterMode(Kt,Jt,"icon",_t);let Zs;"icon-offset"in qt&&(Zs=getValue(Kt,"layout","icon-offset",Jt,_t,Qt).slice(0),Zs[0]*=cs,Zs[1]*=-cs);let ao=vs?[vs.r*255,vs.g*255,vs.b*255,vs.a]:void 0;if(zn){const us={color:ao,rotateWithView:ls,displacement:Zs,declutterMode:ms,scale:cs};typeof zn=="string"?us.src=zn:(us.img=zn,us.imgSize=[zn.width,zn.height]),Vn=new Icon(us)}else{const us=ot[Bn];let ps,gs,bs;if(fs)us.sdf?(ps=drawIconHalo(drawSDF(Jn.image,us,vs||[0,0,0,1]),{x:0,y:0,width:us.width,height:us.height,pixelRatio:us.pixelRatio},fs,hs),ao=void 0):ps=drawIconHalo(Jn.image,us,fs,hs);else{if(us.sdf&&!Jn.unSDFed){const Bo=drawSDF(Jn.image,{x:0,y:0,width:Jn.size[0],height:Jn.size[1]},{r:1,g:1,b:1});Jn.image=Bo,Jn.unSDFed=!0}ps=Jn.image,gs=[us.width,us.height],bs=[us.x,us.y]}Vn=new Icon({color:ao,img:ps,imgSize:Jn.size,size:gs,offset:bs,rotateWithView:ls,scale:cs/us.pixelRatio,displacement:Zs,declutterMode:ms})}yt[_s]=Vn}}Vn&&(++oi,Yt=Mt[oi],(!Yt||!Yt.getImage()||Yt.getFill()||Yt.getStroke())&&(Yt=new Style$1,Mt[oi]=Yt),Yt.setGeometry(jn),Vn.setRotation(Rn+deg2rad(getValue(Kt,"layout","icon-rotate",Jt,_t,Qt))),Vn.setOpacity(getValue(Kt,"paint","icon-opacity",Jt,_t,Qt)),Vn.setAnchor(anchor[getValue(Kt,"layout","icon-anchor",Jt,_t,Qt)]),Yt.setImage(Vn),On=Yt.getText(),Yt.setText(void 0),Yt.setZIndex(ri),Sn=!0,Wn=!1)}else Wn=!0}}}if(jt==1&&Kt.type==="circle"){++oi,Yt=Mt[oi],(!Yt||!Yt.getImage()||Yt.getFill()||Yt.getStroke())&&(Yt=new Style$1,Mt[oi]=Yt);const $n="circle-radius"in ii?getValue(Kt,"paint","circle-radius",Jt,_t,Qt):5,jn=colorWithOpacity(getValue(Kt,"paint","circle-stroke-color",Jt,_t,Qt),getValue(Kt,"paint","circle-stroke-opacity",Jt,_t,Qt)),zn=getValue(Kt,"paint","circle-translate",Jt,_t,Qt),Jn=colorWithOpacity(getValue(Kt,"paint","circle-color",Jt,_t,Qt),getValue(Kt,"paint","circle-opacity",Jt,_t,Qt)),rs=getValue(Kt,"paint","circle-stroke-width",Jt,_t,Qt),os=$n+"."+jn+"."+Jn+"."+rs+"."+zn[0]+"."+zn[1];Vn=yt[os],Vn||(Vn=new CircleStyle({radius:$n,displacement:[zn[0],-zn[1]],stroke:jn&&rs>0?new Stroke({width:rs,color:jn}):void 0,fill:Jn?new Fill({color:Jn}):void 0,declutterMode:"none"}),yt[os]=Vn),Yt.setImage(Vn),On=Yt.getText(),Yt.setText(void 0),Yt.setGeometry(void 0),Yt.setZIndex(ri),Sn=!0}let Gn,Hn,kn,er,Tn,Dn;if("text-field"in qt){er=Math.round(getValue(Kt,"layout","text-size",Jt,_t,Qt));const $n=getValue(Kt,"layout","text-font",Jt,_t,Qt);kn=getValue(Kt,"layout","text-line-height",Jt,_t,Qt),Hn=mb2css(ut?ut($n,ee.metadata?ee.metadata["ol:webfonts"]:void 0):$n,er,kn),Hn.includes("sans-serif")||(Hn+=",sans-serif"),Tn=getValue(Kt,"layout","text-letter-spacing",Jt,_t,Qt),Dn=getValue(Kt,"layout","text-max-width",Jt,_t,Qt);const jn=getValue(Kt,"layout","text-field",Jt,_t,Qt);typeof jn=="object"&&jn.sections?jn.sections.length===1?Gn=jn.toString():Gn=jn.sections.reduce((zn,Jn,rs)=>{const os=Jn.fontStack?Jn.fontStack.split(","):$n,ls=mb2css(ut?ut(os):os,er*(Jn.scale||1),kn);let cs=Jn.text;if(cs===`
102`)return zn.push(`
103`,""),zn;if(jt==2)return zn.push(applyLetterSpacing(cs,Tn),ls),zn;cs=wrapText(cs,ls,Dn,Tn).split(`
104`);for(let vs=0,hs=cs.length;vs<hs;++vs)vs>0&&zn.push(`
105`,""),zn.push(cs[vs],ls);return zn},[]):Gn=fromTemplate(jn,Ut).trim(),Ln=getValue(Kt,"paint","text-opacity",Jt,_t,Qt)}if(Gn&&Ln&&!Wn){Sn||(++oi,Yt=Mt[oi],(!Yt||!Yt.getText()||Yt.getFill
105()||Yt.getStroke())&&(Yt=new Style$1,Mt[oi]=Yt),Yt.setImage(void 0),Yt.setGeometry(void 0));const $n=getDeclutterMode(Kt,Jt,"text",_t);Yt.getText()||Yt.setText(On),On=Yt.getText(),(!On||"getDeclutterMode"in On&&On.getDeclutterMode()!==$n)&&(On=new Text({padding:[2,2,2,2],declutterMode:$n}),Yt.setText(On));const jn=getValue(Kt,"layout","text-transform",Jt,_t,Qt);jn=="uppercase"?Gn=Array.isArray(Gn)?Gn.map((gs,bs)=>bs%2?gs:gs.toUpperCase()):Gn.toUpperCase():jn=="lowercase"&&(Gn=Array.isArray(Gn)?Gn.map((gs,bs)=>bs%2?gs:gs.toLowerCase()):Gn.toLowerCase());const zn=Array.isArray(Gn)?Gn:jt==2?applyLetterSpacing(Gn,Tn):wrapText(Gn,Hn,Dn,Tn);if(On.setText(zn),On.setFont(Hn),On.setRotation(deg2rad(getValue(Kt,"layout","text-rotate",Jt,_t,Qt))),typeof On.setKeepUpright=="function"){const gs=getValue(Kt,"layout","text-keep-upright",Jt,_t,Qt);On.setKeepUpright(gs)}const Jn=getValue(Kt,"layout","text-anchor",Jt,_t,Qt),rs=Sn||jt==1?"point":getValue(Kt,"layout","symbol-placement",Jt,_t,Qt);let os;if(rs==="line-center"?(On.setPlacement("line"),os="center"):On.setPlacement(rs),rs==="line"&&typeof On.setRepeat=="function"){const gs=getValue(Kt,"layout","symbol-spacing",Jt,_t,Qt);On.setRepeat(gs*2)}On.setOverflow(rs==="point");let ls=getValue(Kt,"paint","text-halo-width",Jt,_t,Qt);const cs=getValue(Kt,"layout","text-offset",Jt,_t,Qt),vs=getValue(Kt,"paint","text-translate",Jt,_t,Qt);let hs=0,fs=0;if(rs=="point"){os="center",Jn.indexOf("left")!==-1?(os="left",fs=ls):Jn.indexOf("right")!==-1&&(os="right",fs=-ls);const gs=getValue(Kt,"layout","text-rotation-alignment",Jt,_t,Qt);On.setRotateWithView(gs=="map")}else On.setMaxAngle(deg2rad(getValue(Kt,"layout","text-max-angle",Jt,_t,Qt))*Gn.length/zn.length),On.setRotateWithView(!1);On.setTextAlign(os);let _s="middle";Jn.indexOf("bottom")==0?(_s="bottom",hs=-ls-.5*(kn-1)*er):Jn.indexOf("top")==0&&(_s="top",hs=ls+.5*(kn-1)*er),On.setTextBaseline(_s);const ms=getValue(Kt,"layout","text-justify",Jt,_t,Qt);On.setJustify(ms==="auto"?void 0:ms),On.setOffsetX(cs[0]*er+fs+vs[0]),On.setOffsetY(cs[1]*er+hs+vs[1]);const Zs=On.getFill()||new Fill;Zs.setColor(colorWithOpacity(getValue(Kt,"paint","text-color",Jt,_t,Qt),Ln)),On.setFill(Zs);const ao=colorWithOpacity(getValue(Kt,"paint","text-halo-color",Jt,_t,Qt),Ln);if(ao&&ls>0){const gs=On.getStroke()||new Stroke;gs.setColor(ao),ls*=2;const bs=.5*er;gs.setWidth(ls<=bs?ls:bs),On.setStroke(gs)}else On.setStroke(void 0);const us=getValue(Kt,"layout","text-padding",Jt,_t,Qt),ps=On.getPadding();us!==ps[0]&&(ps[0]=us,ps[1]=us,ps[2]=us,ps[3]=us),Yt.setZIndex(ri)}}}if(oi>-1)return Mt.length=oi+1,Mt};return ne.setStyle(Ot),ne.set("mapbox-layers",mt),ne.set("mapbox-source",xt),ne.set("mapbox-featurestate",ne.get("mapbox-featurestate")||{}),Ot}Color.parse("#000000");Color.parse("#FFFFFF");Color.parse("#000000");function getTileResolutions(ne,ee=512){return ne.getExtent()?createXYZ({extent:ne.getExtent(),tileSize:ee,maxZoom:22}).getResolutions():defaultResolutions}function completeOptions(ne,ee){return ee.accessToken||(ee=Object.assign({},ee),new URL(ne).searchParams.forEach((st,ot)=>{ee.accessToken=st,ee.accessTokenParam=ot})),ee}function applyStyle(ne,ee,te="",st={},ot=void 0){let ct,ut,dt,ht,ft=!0;return typeof te!="string"&&!Array.isArray(te)?(dt=te,ht=dt.source||dt.layers,st=dt):ht=te,typeof st=="string"?(ct=st,dt={}):(ct=st.styleUrl,dt=st),dt.updateSource===!1&&(ft=!1),ot||(ot=dt.resolutions),!ct&&typeof ee=="string"&&!ee.trim().startsWith("{")&&(ct=ee),ct&&(ct=ct.startsWith("data:")?location.href:normalizeStyleUrl(ct,dt.accessToken),dt=completeOptions(ct,dt)),new Promise(function(pt,mt){getGlStyle(ee,dt).then(function(yt){if(yt.version!=8)return mt(new Error("glStyle version 8 required."));if(!(ne instanceof VectorLayer||ne instanceof VectorTileLayer))return mt(new Error("Can only apply to VectorLayer or VectorTileLayer"));const vt=ne instanceof VectorTileLayer?"vector":"geojson";if(ht?Array.isArray(ht)?ut=yt.layers.find(function(Nt){return Nt.id===ht[0]}).source:ut=ht:(ut=yt.layers.find(function(Nt){return Nt.source&&yt.sources[Nt.source].type===vt}).source,ht=ut),!ut)return mt(new Error(`No ${vt} source found in the glStyle.`));
105function _t(){if(!ft)return Promise.resolve();if(ne instanceof VectorTileLayer)return setupVectorSource(yt.sources[ut],ct,dt).then(function(Ut){const Vt=ne.getSource();Vt?Ut!==Vt&&(Vt.setTileUrlFunction(Ut.getTileUrlFunction()),typeof Vt.setUrls=="function"&&typeof Ut.getUrls=="function"&&Vt.setUrls(Ut.getUrls()),Vt.format_||(Vt.format_=Ut.format_),Vt.getAttributions()||Vt.setAttributions(Ut.getAttributions()),Vt.getTileLoadFunction()===defaultLoadFunction&&Vt.setTileLoadFunction(Ut.getTileLoadFunction()),equivalent$1(Vt.getProjection(),Ut.getProjection())&&(Vt.tileGrid=Ut.getTileGrid())):ne.setSource(Ut);const Ht=ne.getSource().getTileGrid();!isFinite(ne.getMaxResolution())&&!isFinite(ne.getMinZoom())&&Ht.getMinZoom()>0&&ne.setMaxResolution(getResolutionForZoom(Math.max(0,Ht.getMinZoom()-1e-12),Ht.getResolutions()))});const Nt=yt.sources[ut];let Gt=ne.getSource();(!Gt||Gt.get("mapbox-source")!==Nt)&&(Gt=setupGeoJSONSource(Nt,ct,dt));const Bt=ne.getSource();return Bt?Gt!==Bt&&(Bt.getAttributions()||Bt.setAttributions(Gt.getAttributions()),Bt.format_||(Bt.format_=Gt.getFormat()),Bt.url_=Gt.getUrl()):ne.setSource(Gt),Promise.resolve()}let bt,xt;const Mt={},Ot={};function kt(){if(!xt&&(!yt.sprite||Mt)){if(dt.projection&&!ot){const Ut=get$3(dt.projection).getUnits();Ut!=="m"&&(ot=defaultResolutions.map(Vt=>Vt/METERS_PER_UNIT$1[Ut]))}let Nt;const Gt=ne.getSource();Gt instanceof VectorTile&&Gt.format_ instanceof MVT&&(Nt=Gt.format_.layerName_),xt=stylefunction(ne,yt,ht,ot,Mt,Ot,(Bt,Ut=dt.webfonts)=>getFonts(Bt,Ut),dt.getImage,Nt),ne.getStyle()?_t().then(pt).catch(mt):mt(new Error(`Nothing to show for source [${ut}]`))}else xt?(ne.setStyle(xt),_t().then(pt).catch(mt)):mt(new Error("Something went wrong trying to apply style."))}if(yt.sprite){const Nt=normalizeSpriteDefinition(yt.sprite,dt.accessToken,ct||location.href);bt=WORKER_OFFSCREEN_CANVAS?1:window.devicePixelRatio>=1.5?.5:1;const Gt=bt==.5?"@2x":"";Promise.all(Nt.map(function(Bt){const Ut=new URL(Bt.url);let Vt=Ut.origin+Ut.pathname+Gt+".json"+Ut.search;return new Promise(function(Ht,zt){fetchResource("Sprite",Vt,dt).then(Ht).catch(function(jt){Vt=Ut.origin+Ut.pathname+".json"+Ut.search,fetchResource("Sprite",Vt,dt).then(Ht).catch(zt)})}).then(function(Ht){Ht===void 0&&mt(new Error("No sprites found."));let zt;if(zt=Ut.origin+Ut.pathname+Gt+".png"+Ut.search,dt.transformRequest){const jt=dt.transformRequest(zt,"SpriteImage")||zt;(jt instanceof Request||jt instanceof Promise)&&(zt=jt)}Ot[Bt.id]=zt;for(const jt in Ht){const Wt=Bt.id=="default"?jt:`${Bt.id}:${jt}`;Mt[Wt]=Ht[jt]}}).catch(function(Ht){mt(new Error(`Sprites cannot be loaded: ${Vt}: ${Ht.message}`))})})).then(kt).catch(mt)}else kt()}).catch(mt)})}function setFirstBackground(ne,ee,te){ee.layers.some(function(st){if(st.type==="background"){if(ne instanceof Layer$1)return ne.setBackground(function(ot){return getBackgroundColor(st,ot,te,{})}),!0;if(ne instanceof Map$1||ne instanceof LayerGroup)return ne.getLayers().insertAt(0,setupBackgroundLayer(st,te,{})),!0}})}function applyBackground(ne,ee,te={}){return getGlStyle(ee,te).then(function(st){setFirstBackground(ne,st,te)})}function extentFromTileJSON(ne,ee){const te=ne.bounds;if(te){const st=fromLonLat([te[0],te[1]],ee),ot=fromLonLat([te[2],te[3]],ee);return[st[0],st[1],ot[0],ot[1]]}return get$3(ee).getExtent()}function sourceOptionsFromTileJSON(ne,ee,te){const st=new TileJSON({tileJSON:ee,tileSize:ne.tileSize||ee.tileSize||512}),ot=st.getTileJSON(),ct=st.getTileGrid(),ut=get$3(te.projection||"EPSG:3857"),dt=extentFromTileJSON(ot,ut),ht=ut.getExtent(),ft=ot.minzoom||0,pt=ot.maxzoom||22,mt={attributions:st.getAttributions(),projection:ut,tileGrid:new TileGrid({origin:ht?getTopLeft(ht):ct.getOrigin(0),extent:dt||ct.getExtent(),minZoom:ft,resolutions:getTileResolutions(ut,ee.tileSize).slice(0,pt+1),tileSize:ct.getTileSize(0)})};return Array.isArray(ot.tiles)?mt.urls=ot.tiles:mt.url=ot.tiles,mt}function getBackgroundColor(ne,ee,te,st){const ot={id:ne.id,type:ne.type},ct=ne.paint||{};ot.paint=ct,cameraObj.zoom=getZoomForResolution(ee,te.resolutions||defaultResolutions),cameraObj.distanceFromCenter=0;let ut;const dt=getValue(ot,"paint","background-color",emptyObj,st);return ct["background-opacity"]!==void 0&&(ut=getValue(ot,"paint","background-opacity",emptyObj,st)),getValue(ot,"layout","visibility",emptyObj,st)==="none"?void 0:colorWithOpacity(dt,ut)}
105function setupBackgroundLayer(ne,ee,te){const st=WORKER_OFFSCREEN_CANVAS?{style:{}}:document.createElement("div");return st.className="ol-mapbox-style-background",st.style.position="absolute",st.style.width="100%",st.style.height="100%",new Layer$1({source:new Source({}),render(ot){const ct=getBackgroundColor(ne,ot.viewState.resolution,ee,te);return st.style.backgroundColor=ct,st}})}function setupVectorSource(ne,ee,te){return new Promise(function(st,ot){getTileJson(ne,ee,te).then(function({tileJson:ct,tileLoadFunction:ut}){const dt=sourceOptionsFromTileJSON(ne,ct,te);dt.tileLoadFunction=ut,dt.format=new MVT({layerName:"mvt:layer"});const ht=new VectorTile(dt);ht.set("mapbox-source",ne),st(ht)}).catch(ot)})}function getBboxTemplate(ne){return`{bbox-${(ne?ne.getCode():"EPSG:3857").toLowerCase().replace(/[^a-z0-9]/g,"-")}}`}function setupGeoJSONSource(ne,ee,te){const st=te.projection?new GeoJSON$1({dataProjection:te.projection}):new GeoJSON$1,ot=ne.data,ct={};if(typeof ot=="string"){const[dt]=normalizeSourceUrl(ot,te.accessToken,te.accessTokenParam||"access_token",ee||location.href);if(/\{bbox-[0-9a-z-]+\}/.test(dt)){const ft=(mt,yt,vt)=>{const _t=getBboxTemplate(vt);return dt.replace(_t,`${mt.join(",")}`)},pt=new VectorSource({attributions:ne.attribution,format:st,loader:(mt,yt,vt,_t,bt)=>{const xt=typeof ft=="function"?ft(mt,yt,vt):ft;fetchResource("GeoJSON",xt,te).then(Mt=>{const Ot=pt.getFormat().readFeatures(Mt,{featureProjection:vt});pt.addFeatures(Ot),_t(Ot)}).catch(Mt=>{pt.removeLoadedExtent(mt),bt()})},strategy:bbox});return pt.set("mapbox-source",ne),pt}const ht=new VectorSource({attributions:ne.attribution,format:st,url:dt,loader:(ft,pt,mt,yt,vt)=>{fetchResource("GeoJSON",dt,te).then(_t=>{const bt=ht.getFormat().readFeatures(_t,{featureProjection:mt});ht.addFeatures(bt),yt(bt)}).catch(_t=>{ht.removeLoadedExtent(ft),vt()})}});return ht}ct.features=st.readFeatures(ot,{featureProjection:"EPSG:3857"});const ut=new VectorSource(Object.assign({attributions:ne.attribution,format:st},ct));return ut.set("mapbox-source",ne),ut}class ErrorEvent extends BaseEvent{constructor(ee){super(EventType.ERROR),this.error=ee}}class MapboxVectorLayer extends VectorTileLayer{constructor(ee){const te="declutter"in ee?ee.declutter:!0,st=new VectorTile({state:"loading",format:new MVT({layerName:"mvt:layer"})});super({source:st,background:ee.background===!1?null:ee.background,declutter:te,extent:ee.extent,className:ee.className,opacity:ee.opacity,visible:ee.visible,zIndex:ee.zIndex,minResolution:ee.minResolution,maxResolution:ee.maxResolution,minZoom:ee.minZoom,maxZoom:ee.maxZoom,renderOrder:ee.renderOrder,renderBuffer:ee.renderBuffer,renderMode:ee.renderMode,map:ee.map,updateWhileAnimating:ee.updateWhileAnimating,updateWhileInteracting:ee.updateWhileInteracting,preload:ee.preload,useInterimTilesOnError:ee.useInterimTilesOnError,properties:ee.properties}),ee.accessToken&&(this.accessToken=ee.accessToken);const ot=ee.styleUrl,ct=[applyStyle(this,ot,ee.layers||ee.source,{accessToken:this.accessToken})];this.getBackground()===void 0&&ct.push(applyBackground(this,ee.styleUrl,{accessToken:this.accessToken})),Promise.all(ct).then(()=>{st.setState("ready")}).catch(ut=>{this.dispatchEvent(new ErrorEvent(ut)),this.getSource().setState("error")})}}class LayerMapBox extends VectorTileLayer{constructor(ee,te){if(!ee.layer)throw new Error("ERROR PARAM_MISSING : layer");if(typeof ee.layer!="string")throw new Error("ERROR WRONG TYPE : layer");typeof ee.ssl>"u"&&(ee.ssl=!0);var st=ee.ssl===!1?"http://":"https://",ot=ee.configuration;if(!ot){if(!Config.isConfigLoaded())throw new Error("ERROR : contract key configuration has to be loaded to load Geoportal layers.");var ct=ee.layer+"$GEOPORTAIL:GPP:TMS";if(ot=Config.configuration.getLayerConf(ct),!ot)throw new Error("ERROR : Layer ID not found into the catalogue !?")}for(var ut=null,dt="",ht=ee.style,ft=0;ft<ot.styles.length;ft++){var pt=ot.styles[ft];if(ht&&pt.name===ht){ut=pt.url,dt=pt.title;break}else if(!ht&&pt.current){ht=pt.name,ut=pt.url,dt=pt.title;break}}if(!ut)throw new Error("ERROR : Style URL not found !?");ut.replace(/(http|https):\/\//,st);var mt=new VectorTile({state:"loading",format:new MVT});mt._originators=ot.originators,mt._legends=ot.legends,mt._metadata=ot.metadata,mt._description=ot.description,mt._title=ot.title+" ("+dt+")",mt._quicklookUrl=ot.quicklookUrl,mt._thumbnail=ot.thumbnail,mt._producer=ot.producer;var yt={source:mt};
105return Helper.mergeParams(yt,te),ee.olParams&&!ot.originators&&(mt._originators=ee.olParams.attributions),super(yt),this.name=ee.layer,this.service="TMS",this.protocol=st,this.sourceId=ee.source,this.styleUrl=ut,this.styleName=ht,this.styleTitle=dt,this.config=ot,this.setStyleMapBox(),this}setStyleMapBox(){var ee=this;return fetch(this.styleUrl,{credentials:"same-origin"}).then(function(te){if(te.ok)return te.json().then(function(st){ee.onStyleMapBoxLoad(st)})}).then(()=>{var te=ee.getSource();te.getState()!=="ready"&&te.setState("loading");var st=ee.config.title,ot=ee.styleName||ee.styleTitle;te._title=st+" ("+ot+")"}).catch(function(te){ee.onStyleMapBoxError(te)})}onStyleMapBoxLoad(ee){this.sourceId||(this.sourceId=Object.keys(ee.sources)[0]);var te=ee.sources[this.sourceId];if(!te){this.onStyleMapBoxError({message:"ERROR : Source ID not found !? !"});return}if(te.type!=="vector"){this.onStyleMapBoxError({message:"ERROR : Source TYPE not permitted !"});return}var st=this.getSource();if(te.url){te.url.replace(/(http|https):\/\//,this.protocol);var ot=new TileJSON({url:te.url}),ct=this,ut=ot.on("change",function(){if(ot.getState()==="ready"){var ht=ot.getTileJSON();if(!ht)return;ct.set("mapbox-extensions",ht);for(var ft=Array.isArray(ht.tiles)?ht.tiles:[ht.tiles],pt=0;pt<te.tiles.length;pt++)ft[pt].replace(/(http|https):\/\//,this.protocol);st.setUrls(ft),unByKey(ut)}})}if(te.tiles){for(var dt=0;dt<te.tiles.length;dt++)te.tiles[dt].replace(/(http|https):\/\//,this.protocol);st.setUrls(te.tiles)}applyStyle(this,ee,this.sourceId).then(()=>{st.setState("ready"),this.set("mapbox-styles",ee)}).then(()=>{this.dispatchEvent({type:"mapbox:style:loaded",style:this.styleUrl,name:this.styleName})}).catch(ht=>{this.onStyleMapBoxError(ht)})}onStyleMapBoxError(ee){var te=this.getSource();te.setState("error"),console.error(ee.message)}getConfiguration(){return this.config}getLegends(){return this.getSource()._legends}getMetadata(){return this.getSource()._metadata}getDescription(){return this.getSource()._description}getTitle(){return this.getSource()._title}getQuicklookUrl(){return this.getSource()._quicklookUrl}getOriginators(){return this.getSource()._originators}getThumbnailUrl(){return this.getSource()._thumbnail}getProducer(){return this.getSource()._producer}}window.ol&&window.ol.layer&&(window.ol.layer.GeoportalMapBox=LayerMapBox);const exceptions$1=["GPoverviewMap","GPfullScreen"],gfiIncompatiblePanels=["GPdrawing","GPisochron","GPmeasureArea","GPmeasureAzimuth","GPmeasureLength","GProute","GPelevationPath","GPpanoramax","GPreporting"];var gfiActiveBeforePanel=!1;function getGetFeatureInfoControl(ne){var ee=ne&&typeof ne.getMap=="function"?ne.getMap():null;return ee&&ee.getControls().getArray().filter(te=>te.CLASSNAME==="GetFeatureInfo")[0]||null}function getSameSideOpenedPanel(ne,ee){var te=[...exceptions$1,ee],st=[];if(ne&&ne.includes("left")){var ot=document.getElementById("position-container-bottom-left"),ct=document.getElementById("position-container-top-left");st=[...ot.children,...ct.children]}if(ne&&ne.includes("right")){var ut=document.getElementById("position-container-bottom-right"),dt=document.getElementById("position-container-top-right");st=[...ut.children,...dt.children]}return st.filter(ht=>{var ft=ht.id.match(/(\w+)-[0-9]+/)[1],pt=te.includes(ft),mt=ht.getElementsByTagName("button")[0].getAttribute("aria-pressed");if(mt==="true"&&!pt)return ht})}var PanelManager=function(ne,ee,te){var st=getSameSideOpenedPanel(ne,ee);if(st.forEach(ct=>{var ut=ct.querySelector(".GPcloseGetFeatureInfo")||ct.getElementsByTagName("button")[0];ut.click()}),gfiIncompatiblePanels.includes(ee)){var ot=getGetFeatureInfoControl(te);ot&&(gfiActiveBeforePanel=ot.getActive(),ot.setActive(!1))}},PanelManagerClose=function(ne,ee){if(gfiIncompatiblePanels.includes(ne)){var te=getGetFeatureInfoControl(ee);te&&gfiActiveBeforePanel&&te.setActive(!0),gfiActiveBeforePanel=!1}},Widget={onPanelOpen:function(){PanelManager(this.options.position,this.element.id.match(/(\w+)-[0-9]+/)[1],this)},onPanelClose:function(){PanelManagerClose(this.element.id.match(/(\w+)-[0-9]+/)[1],this)}},checkDsfr=function(){var ne=getComputedStyle(document.documentElement),ee=ne.getPropertyValue("--blue-france-sun-113-625");return ee!==""};class ControlExtended extends Control{constructor(ee){ee=ee||{},super({element:ee.element,target:ee.target,render:ee.render}),ee&&ee.listable?this.listable=!0:this.listable=!1,ee&&ee.description?this.description=ee.description:this.description=""}setPosition(ee){if(this.getMap()){var te=new PositionFactory(this);te.set(ee)}}updatePosition(ee){if(this.getMap()){var te=new PositionFactory(this);te.update(ee)}}}const ANCHORS=["top-left","top-right","bottom-left","bottom-right"];var Fo,zu,Rl,Nc;class PositionFactory{constructor(ee){fo(this,Fo);return this.caller=ee,this.container=null,es(this,Fo,Rl).call(this,"top-left"),es(this,Fo,Rl).call(this,"top-right"),es(this,Fo,Rl).call(this,"bottom-left"),es(this,Fo,Rl).call(this,"bottom-right"),this}set(ee){ANCHORS.includes(ee.toLowerCase())&&(es(this,Fo,Nc).call(this,ee,!1),ee.includes("bottom")?this.container.children["position-container-"+ee].prepend(this.caller.element):this.container.children["position-container-"+ee].appendChild(this.caller.element))}update(ee){ANCHORS.includes(ee.toLowerCase())&&es(this,Fo,Nc).call(this,ee,!0)}}Fo=new WeakSet,zu=function(ee){var te=this.container.children["position-container-"+ee];return!!te},Rl=function(ee){if(this.container=this.caller.getMap().getOverlayContainerStopEvent(),!es(this,Fo,zu).call(this,ee)){var te=document.createElement("div");te.id="position-container-"+ee,te.className="position position-container-"+ee,this.container.appendChild(te)}},Nc=function(ee,te){var st=this;const ot=pt=>{var mt=st.container.children["position-container-"+pt];return mt.children.length},ct=pt=>{var mt=st.container.children["position-container-"+pt],yt=mt.offsetWidth;return yt},ut=pt=>{var mt=st.container.children["position-container-"+pt],yt=mt.offsetHeight;if(te){pt.includes("top")&&(yt=0);for(let vt=0;vt<mt.children.length;
105vt++){if(mt.children[vt].id===st.caller.element.id){yt=pt.includes("bottom")?yt-st.caller.element.offsetHeight:yt*-1;break}yt-=mt.children[vt].offsetHeight}}return yt},dt=pt=>{pt.style.top="unset",pt.style.bottom="unset",pt.style.left="unset",pt.style.right="unset"};dt(this.caller.element),this.caller.element.style.position="unset";var ht=Array.from(this.caller.element.getElementsByClassName("GPpanel"));if(ht.length!==0){var ft=0;ht.forEach(pt=>{if(pt.nodeName.toLowerCase()==="dialog"){switch(dt(pt),ee.toLowerCase()){case"top-left":checkDsfr()?pt.style.top="0px":pt.style.top=ot(ee)?ut(ee)+"px":"0px",pt.style.left=ct(ee)+ft+"px";break;case"bottom-left":checkDsfr()?pt.style.top="0px":pt.style.bottom=ot(ee)?ut(ee)+"px":"0px",pt.style.left=ct(ee)+ft+"px";break;case"top-right":checkDsfr()?pt.style.top="0px":pt.style.top=ot(ee)?ut(ee)+"px":"0px",pt.style.right=ct(ee)+ft+"px";break;case"bottom-right":checkDsfr()?pt.style.top="0px":pt.style.bottom=ot(ee)?ut(ee)+"px":"0px",pt.style.right=ct(ee)+ft+"px";break}ft+=pt.offsetWidth}})}};var SelectorID={generate:(function(){var ne=Math.floor(Date.now());return function(){return ne++}})(),name:function(ne){var ee=null,te=ne.lastIndexOf("-");return te===-1?ee=ne:ee=ne.substring(0,te),ee},index:function(ne){var ee=null,te=this.name(ne),st=te.lastIndexOf("_");return st!==-1&&(ee=te.substring(st+1)),ee},uuid:function(ne){var ee=null,te=ne.lastIndexOf("-");return te!==-1&&(ee=parseInt(ne.substring(te+1),10)),ee}},ToolTips={id:"gpf-tooltips-html",init:function(ne={}){if(document.getElementById(this.id))return;const ee=document.createElement("div");ee.id=this.id,Object.assign(ee.style,ne),document.body.appendChild(ee)},active:function(ne){var ee=this,te=ne.getAttribute("data-tooltip");te&&(ne.addEventListener("mouseenter",st=>{var ot=document.getElementById(ee.id);if(!ot)return;ot.innerHTML=te;const ct=ne.getBoundingClientRect();ot.style.top=`${ct.bottom+10}px`,ot.style.left=`${ct.left+ct.width/2}px`,ot.style.transform="translateX(-50%)",ot.style.transitionDelay="500ms",ot.style.transitionDuration="250ms",ot.style.opacity="1"}),ne.addEventListener("mouseleave",()=>{var st=document.getElementById(ee.id);st&&(st.style.transitionDelay="0ms",st.style.transitionDuration="0ms",st.style.opacity="0")}))}};/**!
106 * Sortable 1.15.3
107 * @author	RubaXa   <[email protected]>
108 * @author	owenm    <[email protected]>
109 * @license MIT
110 */function ownKeys(ne,ee){var te=Object.keys(ne);if(Object.getOwnPropertySymbols){var st=Object.getOwnPropertySymbols(ne);ee&&(st=st.filter(function(ot){return Object.getOwnPropertyDescriptor(ne,ot).enumerable})),te.push.apply(te,st)}return te}function _objectSpread2(ne){for(var ee=1;ee<arguments.length;ee++){var te=arguments[ee]!=null?arguments[ee]:{};ee%2?ownKeys(Object(te),!0).forEach(function(st){_defineProperty(ne,st,te[st])}):Object.getOwnPropertyDescriptors?Object.defineProperties(ne,Object.getOwnPropertyDescriptors(te)):ownKeys(Object(te)).forEach(function(st){Object.defineProperty(ne,st,Object.getOwnPropertyDescriptor(te,st))})}return ne}function _typeof(ne){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_typeof=function(ee){return typeof ee}:_typeof=function(ee){return ee&&typeof Symbol=="function"&&ee.constructor===Symbol&&ee!==Symbol.prototype?"symbol":typeof ee},_typeof(ne)}function _defineProperty(ne,ee,te){return ee in ne?Object.defineProperty(ne,ee,{value:te,enumerable:!0,configurable:!0,writable:!0}):ne[ee]=te,ne}function _extends(){return _extends=Object.assign||function(ne){for(var ee=1;ee<arguments.length;ee++){var te=arguments[ee];for(var st in te)Object.prototype.hasOwnProperty.call(te,st)&&(ne[st]=te[st])}return ne},_extends.apply(this,arguments)}function _objectWithoutPropertiesLoose(ne,ee){if(ne==null)return{};var te={},st=Object.keys(ne),ot,ct;for(ct=0;ct<st.length;ct++)ot=st[ct],!(ee.indexOf(ot)>=0)&&(te[ot]=ne[ot]);return te}function _objectWithoutProperties(ne,ee){if(ne==null)return{};var te=_objectWithoutPropertiesLoose(ne,ee),st,ot;if(Object.getOwnPropertySymbols){var ct=Object.getOwnPropertySymbols(ne);for(ot=0;ot<ct.length;ot++)st=ct[ot],!(ee.indexOf(st)>=0)&&Object.prototype.propertyIsEnumerable.call(ne,st)&&(te[st]=ne[st])}return te}var version="1.15.3";function userAgent(ne){if(typeof window<"u"&&window.navigator)return!!navigator.userAgent.match(ne)}
vendor: 45,992 bytes, line 110
110var IE11OrLess=userAgent(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),Edge=userAgent(/Edge/i),FireFox=userAgent(/firefox/i),Safari=userAgent(/safari/i)&&!userAgent(/chrome/i)&&!userAgent(/android/i),IOS=userAgent(/iP(ad|od|hone)/i),ChromeForAndroid=userAgent(/chrome/i)&&userAgent(/android/i),captureMode={capture:!1,passive:!1};function on$1(ne,ee,te){ne.addEventListener(ee,te,!IE11OrLess&&captureMode)}function off(ne,ee,te){ne.removeEventListener(ee,te,!IE11OrLess&&captureMode)}function matches(ne,ee){if(ee){if(ee[0]===">"&&(ee=ee.substring(1)),ne)try{if(ne.matches)return ne.matches(ee);if(ne.msMatchesSelector)return ne.msMatchesSelector(ee);if(ne.webkitMatchesSelector)return ne.webkitMatchesSelector(ee)}catch{return!1}return!1}}function getParentOrHost(ne){return ne.host&&ne!==document&&ne.host.nodeType?ne.host:ne.parentNode}function closest(ne,ee,te,st){if(ne){te=te||document;do{if(ee!=null&&(ee[0]===">"?ne.parentNode===te&&matches(ne,ee):matches(ne,ee))||st&&ne===te)return ne;if(ne===te)break}while(ne=getParentOrHost(ne))}return null}var R_SPACE=/\s+/g;function toggleClass(ne,ee,te){if(ne&&ee)if(ne.classList)ne.classList[te?"add":"remove"](ee);else{var st=(" "+ne.className+" ").replace(R_SPACE," ").replace(" "+ee+" "," ");ne.className=(st+(te?" "+ee:"")).replace(R_SPACE," ")}}function css(ne,ee,te){var st=ne&&ne.style;if(st){if(te===void 0)return document.defaultView&&document.defaultView.getComputedStyle?te=document.defaultView.getComputedStyle(ne,""):ne.currentStyle&&(te=ne.currentStyle),ee===void 0?te:te[ee];!(ee in st)&&ee.indexOf("webkit")===-1&&(ee="-webkit-"+ee),st[ee]=te+(typeof te=="string"?"":"px")}}function matrix(ne,ee){var te="";if(typeof ne=="string")te=ne;else do{var st=css(ne,"transform");st&&st!=="none"&&(te=st+" "+te)}while(!ee&&(ne=ne.parentNode));var ot=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return ot&&new ot(te)}function find(ne,ee,te){if(ne){var st=ne.getElementsByTagName(ee),ot=0,ct=st.length;if(te)for(;ot<ct;ot++)te(st[ot],ot);return st}return[]}function getWindowScrollingElement(){var ne=document.scrollingElement;return ne||document.documentElement}function getRect(ne,ee,te,st,ot){if(!(!ne.getBoundingClientRect&&ne!==window)){var ct,ut,dt,ht,ft,pt,mt;if(ne!==window&&ne.parentNode&&ne!==getWindowScrollingElement()?(ct=ne.getBoundingClientRect(),ut=ct.top,dt=ct.left,ht=ct.bottom,ft=ct.right,pt=ct.height,mt=ct.width):(ut=0,dt=0,ht=window.innerHeight,ft=window.innerWidth,pt=window.innerHeight,mt=window.innerWidth),(ee||te)&&ne!==window&&(ot=ot||ne.parentNode,!IE11OrLess))do if(ot&&ot.getBoundingClientRect&&(css(ot,"transform")!=="none"||te&&css(ot,"position")!=="static")){var yt=ot.getBoundingClientRect();ut-=yt.top+parseInt(css(ot,"border-top-width")),dt-=yt.left+parseInt(css(ot,"border-left-width")),ht=ut+ct.height,ft=dt+ct.width;break}while(ot=ot.parentNode);if(st&&ne!==window){var vt=matrix(ot||ne),_t=vt&&vt.a,bt=vt&&vt.d;vt&&(ut/=bt,dt/=_t,mt/=_t,pt/=bt,ht=ut+pt,ft=dt+mt)}return{top:ut,left:dt,bottom:ht,right:ft,width:mt,height:pt}}}function isScrolledPast(ne,ee,te){for(var st=getParentAutoScrollElement(ne,!0),ot=getRect(ne)[ee];st;){var ct=getRect(st)[te],ut=void 0;if(ut=ot>=ct,!ut)return st;if(st===getWindowScrollingElement())break;st=getParentAutoScrollElement(st,!1)}return!1}function getChild(ne,ee,te,st){for(var ot=0,ct=0,ut=ne.children;ct<ut.length;){if(ut[ct].style.display!=="none"&&ut[ct]!==Sortable.ghost&&(st||ut[ct]!==Sortable.dragged)&&closest(ut[ct],te.draggable,ne,!1)){if(ot===ee)return ut[ct];ot++}ct++}return null}function lastChild(ne,ee){for(var te=ne.lastElementChild;te&&(te===Sortable.ghost||css(te,"display")==="none"||ee&&!matches(te,ee));)te=te.previousElementSibling;return te||null}function index(ne,ee){var te=0;if(!ne||!ne.parentNode)return-1;for(;ne=ne.previousElementSibling;)ne.nodeName.toUpperCase()!=="TEMPLATE"&&ne!==Sortable.clone&&(!ee||matches(ne,ee))&&te++;return te}function getRelativeScrollOffset(ne){var ee=0,te=0,st=getWindowScrollingElement();if(ne)do{var ot=matrix(ne),ct=ot.a,ut=ot.d;ee+=ne.scrollLeft*ct,te+=ne.scrollTop*ut}while(ne!==st&&(ne=ne.parentNode));return[ee,te]}function indexOfObject(ne,ee){for(var te in ne)if(ne.hasOwnProperty(te)){for(var st in ee)if(ee.hasOwnProperty(st)&&ee[st]===ne[te][st])return Number(te)}return-1}function getParentAutoScrollElement(ne,ee){if(!ne||!ne.getBoundingClientRect)return getWindowScrollingElement();var te=ne,st=!1;do if(te.clientWidth<te.scrollWidth||te.clientHeight<te.scrollHeight){var ot=css(te);if(te.clientWidth<te.scrollWidth&&(ot.overflowX=="auto"||ot.overflowX=="scroll")||te.clientHeight<te.scrollHeight&&(ot.overflowY=="auto"||ot.overflowY=="scroll")){if(!te.getBoundingClientRect||te===document.body)return getWindowScrollingElement();if(st||ee)return te;st=!0}}while(te=te.parentNode);return getWindowScrollingElement()}function extend$1(ne,ee){if(ne&&ee)for(var te in ee)ee.hasOwnProperty(te)&&(ne[te]=ee[te]);return ne}function isRectEqual(ne,ee){return Math.round(ne.top)===Math.round(ee.top)&&Math.round(ne.left)===Math.round(ee.left)&&Math.round(ne.height)===Math.round(ee.height)&&Math.round(ne.width)===Math.round(ee.width)}var _throttleTimeout;function throttle(ne,ee){return function(){if(!_throttleTimeout){var te=arguments,st=this;te.length===1?ne.call(st,te[0]):ne.apply(st,te),_throttleTimeout=setTimeout(function(){_throttleTimeout=void 0},ee)}}}function cancelThrottle(){clearTimeout(_throttleTimeout),_throttleTimeout=void 0}function scrollBy(ne,ee,te){ne.scrollLeft+=ee,ne.scrollTop+=te}function clone$1(ne){var ee=window.Polymer,te=window.jQuery||window.Zepto;return ee&&ee.dom?ee.dom(ne).cloneNode(!0):te?te(ne).clone(!0)[0]:ne.cloneNode(!0)}function getChildContainingRectFromElement(ne,ee,te){var st={};return Array.from(ne.children).forEach(function(ot){var ct,ut,dt,ht;if(!(!closest(ot,ee.draggable,ne,!1)||ot.animated||ot===te)){var ft=getRect(ot);st.left=Math.min((ct=st.left)!==null&&ct!==void 0?ct:1/0,ft.left),st.top=Math.min((ut=st.top)!==null&&ut!==void 0?ut:1/0,ft.top),st.right=Math.max((dt=st.right)!==null&&dt!==void 0?dt:-1/0,ft.right),st.bottom=Math.max((ht=st.bottom)!==null&&ht!==void 0?ht:-1/0,ft.bottom)}}),st.width=st.right-st.left,st.height=st.bottom-st.top,st.x=st.left,st.y=st.top,st}var expando="Sortable"+new Date().getTime();function AnimationStateManager(){var ne=[],ee;return{captureAnimationState:function(){if(ne=[],!!this.options.animation){var st=[].slice.call(this.el.children);st.forEach(function(ot){if(!(css(ot,"display")==="none"||ot===Sortable.ghost)){ne.push({target:ot,rect:getRect(ot)});var ct=_objectSpread2({},ne[ne.length-1].rect);if(ot.thisAnimationDuration){var ut=matrix(ot,!0);ut&&(ct.top-=ut.f,ct.left-=ut.e)}ot.fromRect=ct}})}},addAnimationState:function(st){ne.push(st)},removeAnimationState:function(st){ne.splice(indexOfObject(ne,{target:st}),1)},animateAll:function(st){var ot=this;if(!this.options.animation){clearTimeout(ee),typeof st=="function"&&st();return}var ct=!1,ut=0;ne.forEach(function(dt){var ht=0,ft=dt.target,pt=ft.fromRect,mt=getRect(ft),yt=ft.prevFromRect,vt=ft.prevToRect,_t=dt.rect,bt=matrix(ft,!0);bt&&(mt.top-=bt.f,mt.left-=bt.e),ft.toRect=mt,ft.thisAnimationDuration&&isRectEqual(yt,mt)&&!isRectEqual(pt,mt)&&(_t.top-mt.top)/(_t.left-mt.left)===(pt.top-mt.top)/(pt.left-mt.left)&&(ht=calculateRealTime(_t,yt,vt,ot.options)),isRectEqual(mt,pt)||(ft.prevFromRect=pt,ft.prevToRect=mt,ht||(ht=ot.options.animation),ot.animate(ft,_t,mt,ht)),ht&&(ct=!0,ut=Math.max(ut,ht),clearTimeout(ft.animationResetTimer),ft.animationResetTimer=setTimeout(function(){ft.animationTime=0,ft.prevFromRect=null,ft.fromRect=null,ft.prevToRect=null,ft.thisAnimationDuration=null},ht),ft.thisAnimationDuration=ht)}),clearTimeout(ee),ct?ee=setTimeout(function(){typeof st=="function"&&st()},ut):typeof st=="function"&&st(),ne=[]},animate:function(st,ot,ct,ut){if(ut){css(st,"transition",""),css(st,"transform","");var dt=matrix(this.el),ht=dt&&dt.a,ft=dt&&dt.d,pt=(ot.left-ct.left)/(ht||1),mt=(ot.top-ct.top)/(ft||1);st.animatingX=!!pt,st.animatingY=!!mt,css(st,"transform","translate3d("+pt+"px,"+mt+"px,0)"),this.forRepaintDummy=repaint(st),css(st,"transition","transform "+ut+"ms"+(this.options.easing?" "+this.options.easing:"")),css(st,"transform","translate3d(0,0,0)"),typeof st.animated=="number"&&clearTimeout(st.animated),st.animated=setTimeout(function(){css(st,"transition",""),css(st,"transform",""),st.animated=!1,st.animatingX=!1,st.animatingY=!1},ut)}}}}function repaint(ne){return ne.offsetWidth}function calculateRealTime(ne,ee,te,st){return Math.sqrt(Math.pow(ee.top-ne.top,2)+Math.pow(ee.left-ne.left,2))/Math.sqrt(Math.pow(ee.top-te.top,2)+Math.pow(ee.left-te.left,2))*st.animation}var plugins=[],defaults$1={initializeByDefault:!0},PluginManager={mount:function(ee){for(var te in defaults$1)defaults$1.hasOwnProperty(te)&&!(te in ee)&&(ee[te]=defaults$1[te]);plugins.forEach(function(st){if(st.pluginName===ee.pluginName)throw"Sortable: Cannot mount plugin ".concat(ee.pluginName," more than once")}),plugins.push(ee)},pluginEvent:function(ee,te,st){var ot=this;this.eventCanceled=!1,st.cancel=function(){ot.eventCanceled=!0};var ct=ee+"Global";plugins.forEach(function(ut){te[ut.pluginName]&&(te[ut.pluginName][ct]&&te[ut.pluginName][ct](_objectSpread2({sortable:te},st)),te.options[ut.pluginName]&&te[ut.pluginName][ee]&&te[ut.pluginName][ee](_objectSpread2({sortable:te},st)))})},initializePlugins:function(ee,te,st,ot){plugins.forEach(function(dt){var ht=dt.pluginName;if(!(!ee.options[ht]&&!dt.initializeByDefault)){var ft=new dt(ee,te,ee.options);ft.sortable=ee,ft.options=ee.options,ee[ht]=ft,_extends(st,ft.defaults)}});for(var ct in ee.options)if(ee.options.hasOwnProperty(ct)){var ut=this.modifyOption(ee,ct,ee.options[ct]);typeof ut<"u"&&(ee.options[ct]=ut)}},getEventProperties:function(ee,te){var st={};return plugins.forEach(function(ot){typeof ot.eventProperties=="function"&&_extends(st,ot.eventProperties.call(te[ot.pluginName],ee))}),st},modifyOption:function(ee,te,st){var ot;return plugins.forEach(function(ct){ee[ct.pluginName]&&ct.optionListeners&&typeof ct.optionListeners[te]=="function"&&(ot=ct.optionListeners[te].call(ee[ct.pluginName],st))}),ot}};function dispatchEvent(ne){var ee=ne.sortable,te=ne.rootEl,st=ne.name,ot=ne.targetEl,ct=ne.cloneEl,ut=ne.toEl,dt=ne.fromEl,ht=ne.oldIndex,ft=ne.newIndex,pt=ne.oldDraggableIndex,mt=ne.newDraggableIndex,yt=ne.originalEvent,vt=ne.putSortable,_t=ne.extraEventProperties;if(ee=ee||te&&te[expando],!!ee){var bt,xt=ee.options,Mt="on"+st.charAt(0).toUpperCase()+st.substr(1);window.CustomEvent&&!IE11OrLess&&!Edge?bt=new CustomEvent(st,{bubbles:!0,cancelable:!0}):(bt=document.createEvent("Event"),bt.initEvent(st,!0,!0)),bt.to=ut||te,bt.from=dt||te,bt.item=ot||te,bt.clone=ct,bt.oldIndex=ht,bt.newIndex=ft,bt.oldDraggableIndex=pt,bt.newDraggableIndex=mt,bt.originalEvent=yt,bt.pullMode=vt?vt.lastPutMode:void 0;var Ot=_objectSpread2(_objectSpread2({},_t),PluginManager.getEventProperties(st,ee));for(var kt in Ot)bt[kt]=Ot[kt];te&&te.dispatchEvent(bt),xt[Mt]&&xt[Mt].call(ee,bt)}}var _excluded=["evt"],pluginEvent=function(ee,te){var st=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},ot=st.evt,ct=_objectWithoutProperties(st,_excluded);PluginManager.pluginEvent.bind(Sortable)(ee,te,_objectSpread2({dragEl,parentEl,ghostEl,rootEl,nextEl,lastDownEl,cloneEl,cloneHidden,dragStarted:moved,putSortable,activeSortable:Sortable.active,originalEvent:ot,oldIndex,oldDraggableIndex,newIndex,newDraggableIndex,hideGhostForTarget:_hideGhostForTarget,unhideGhostForTarget:_unhideGhostForTarget,cloneNowHidden:function(){cloneHidden=!0},cloneNowShown:function(){cloneHidden=!1},dispatchSortableEvent:function(dt){_dispatchEvent({sortable:te,name:dt,originalEvent:ot})}},ct))};function _dispatchEvent(ne){dispatchEvent(_objectSpread2({putSortable,cloneEl,targetEl:dragEl,rootEl,oldIndex,oldDraggableIndex,newIndex,newDraggableIndex},ne))}var dragEl,parentEl,ghostEl,rootEl,nextEl,lastDownEl,cloneEl,cloneHidden,oldIndex,newIndex,oldDraggableIndex,newDraggableIndex,activeGroup,putSortable,awaitingDragStarted=!1,ignoreNextClick=!1,sortables=[],tapEvt,touchEvt,lastDx,lastDy,tapDistanceLeft,tapDistanceTop,moved,lastTarget,lastDirection,pastFirstInvertThresh=!1,isCircumstantialInvert=!1,targetMoveDistance,ghostRelativeParent,ghostRelativeParentInitialScroll=[],_silent=!1,savedInputChecked=[],documentExists=typeof document<"u",PositionGhostAbsolutely=IOS,CSSFloatProperty=Edge||IE11OrLess?"cssFloat":"float",supportDraggable=documentExists&&!ChromeForAndroid&&!IOS&&"draggable"in document.createElement("div"),supportCssPointerEvents=(function(){if(documentExists){if(IE11OrLess)return!1;var ne=document.createElement("x");return ne.style.cssText="pointer-events:auto",ne.style.pointerEvents==="auto"}})(),_detectDirection=function(ee,te){var st=css(ee),ot=parseInt(st.width)-parseInt(st.paddingLeft)-parseInt(st.paddingRight)-parseInt(st.borderLeftWidth)-parseInt(st.borderRightWidth),ct=getChild(ee,0,te),ut=getChild(ee,1,te),dt=ct&&css(ct),ht=ut&&css(ut),ft=dt&&parseInt(dt.marginLeft)+parseInt(dt.marginRight)+getRect(ct).width,pt=ht&&parseInt(ht.marginLeft)+parseInt(ht.marginRight)+getRect(ut).width;if(st.display==="flex")return st.flexDirection==="column"||st.flexDirection==="column-reverse"?"vertical":"horizontal";if(st.display==="grid")return st.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(ct&&dt.float&&dt.float!=="none"){var mt=dt.float==="left"?"left":"right";return ut&&(ht.clear==="both"||ht.clear===mt)?"vertical":"horizontal"}return ct&&(dt.display==="block"||dt.display==="flex"||dt.display==="table"||dt.display==="grid"||ft>=ot&&st[CSSFloatProperty]==="none"||ut&&st[CSSFloatProperty]==="none"&&ft+pt>ot)?"vertical":"horizontal"},_dragElInRowColumn=function(ee,te,st){var ot=st?ee.left:ee.top,ct=st?ee.right:ee.bottom,ut=st?ee.width:ee.height,dt=st?te.left:te.top,ht=st?te.right:te.bottom,ft=st?te.width:te.height;return ot===dt||ct===ht||ot+ut/2===dt+ft/2},_detectNearestEmptySortable=function(ee,te){var st;return sortables.some(function(ot){var ct=ot[expando].options.emptyInsertThreshold;if(!(!ct||lastChild(ot))){var ut=getRect(ot),dt=ee>=ut.left-ct&&ee<=ut.right+ct,ht=te>=ut.top-ct&&te<=ut.bottom+ct;if(dt&&ht)return st=ot}}),st},_prepareGroup=function(ee){function te(ct,ut){return function(dt,ht,ft,pt){var mt=dt.options.group.name&&ht.options.group.name&&dt.options.group.name===ht.options.group.name;if(ct==null&&(ut||mt))return!0;if(ct==null||ct===!1)return!1;if(ut&&ct==="clone")return ct;if(typeof ct=="function")return te(ct(dt,ht,ft,pt),ut)(dt,ht,ft,pt);var yt=(ut?dt:ht).options.group.name;return ct===!0||typeof ct=="string"&&ct===yt||ct.join&&ct.indexOf(yt)>-1}}var st={},ot=ee.group;(!ot||_typeof(ot)!="object")&&(ot={name:ot}),st.name=ot.name,st.checkPull=te(ot.pull,!0),st.checkPut=te(ot.put),st.revertClone=ot.revertClone,ee.group=st},_hideGhostForTarget=function(){!supportCssPointerEvents&&ghostEl&&css(ghostEl,"display","none")},_unhideGhostForTarget=function(){!supportCssPointerEvents&&ghostEl&&css(ghostEl,"display","")};documentExists&&!ChromeForAndroid&&document.addEventListener("click",function(ne){if(ignoreNextClick)return ne.preventDefault(),ne.stopPropagation&&ne.stopPropagation(),ne.stopImmediatePropagation&&ne.stopImmediatePropagation(),ignoreNextClick=!1,!1},!0);var nearestEmptyInsertDetectEvent=function(ee){if(dragEl){ee=ee.touches?ee.touches[0]:ee;var te=_detectNearestEmptySortable(ee.clientX,ee.clientY);if(te){var st={};for(var ot in ee)ee.hasOwnProperty(ot)&&(st[ot]=ee[ot]);st.target=st.rootEl=te,st.preventDefault=void 0,st.stopPropagation=void 0,te[expando]._onDragOver(st)}}},_checkOutsideTargetEl=function(ee){dragEl&&dragEl.parentNode[expando]._isOutsideThisEl(ee.target)};function Sortable(ne,ee){if(!(ne&&ne.nodeType&&ne.nodeType===1))throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(ne));this.el=ne,this.options=ee=_extends({},ee),ne[expando]=this;var te={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(ne.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return _detectDirection(ne,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(ut,dt){ut.setData("Text",dt.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:Sortable.supportPointer!==!1&&"PointerEvent"in window&&!Safari,emptyInsertThreshold:5};PluginManager.initializePlugins(this,ne,te);for(var st in te)!(st in ee)&&(ee[st]=te[st]);_prepareGroup(ee);for(var ot in this)ot.charAt(0)==="_"&&typeof this[ot]=="function"&&(this[ot]=this[ot].bind(this));this.nativeDraggable=ee.forceFallback?!1:supportDraggable,this.nativeDraggable&&(this.options.touchStartThreshold=1),ee.supportPointer?on$1(ne,"pointerdown",this._onTapStart):(on$1(ne,"mousedown",this._onTapStart),on$1(ne,"touchstart",this._onTapStart)),this.nativeDraggable&&(on$1(ne,"dragover",this),on$1(ne,"dragenter",this)),sortables.push(this.el),ee.store&&ee.store.get&&this.sort(ee.store.get(this)||[]),_extends(this,AnimationStateManager())}Sortable.prototype={constructor:Sortable,_isOutsideThisEl:function(ee){!this.el.contains(ee)&&ee!==this.el&&(lastTarget=null)},_getDirection:function(ee,te){return typeof this.options.direction=="function"?this.options.direction.call(this,ee,te,dragEl):this.options.direction},_onTapStart:function(ee){if(ee.cancelable){var te=this,st=this.el,ot=this.options,ct=ot.preventOnFilter,ut=ee.type,dt=ee.touches&&ee.touches[0]||ee.pointerType&&ee.pointerType==="touch"&&ee,ht=(dt||ee).target,ft=ee.target.shadowRoot&&(ee.path&&ee.path[0]||ee.composedPath&&ee.composedPath()[0])||ht,pt=ot.filter;if(_saveInputCheckedState(st),!dragEl&&!(/mousedown|pointerdown/.test(ut)&&ee.button!==0||ot.disabled)&&!ft.isContentEditable&&!(!this.nativeDraggable&&Safari&&ht&&ht.tagName.toUpperCase()==="SELECT")&&(ht=closest(ht,ot.draggable,st,!1),!(ht&&ht.animated)&&lastDownEl!==ht)){if(oldIndex=index(ht),oldDraggableIndex=index(ht,ot.draggable),typeof pt=="function"){if(pt.call(this,ee,ht,this)){_dispatchEvent({sortable:te,rootEl:ft,name:"filter",targetEl:ht,toEl:st,fromEl:st}),pluginEvent("filter",te,{evt:ee}),ct&&ee.cancelable&&ee.preventDefault();return}}else if(pt&&(pt=pt.split(",").some(function(mt){if(mt=closest(ft,mt.trim(),st,!1),mt)return _dispatchEvent({sortable:te,rootEl:mt,name:"filter",targetEl:ht,fromEl:st,toEl:st}),pluginEvent("filter",te,{evt:ee}),!0}),pt)){ct&&ee.cancelable&&ee.preventDefault();return}ot.handle&&!closest(ft,ot.handle,st,!1)||this._prepareDragStart(ee,dt,ht)}}},_prepareDragStart:function(ee,te,st){var ot=this,ct=ot.el,ut=ot.options,dt=ct.ownerDocument,ht;if(st&&!dragEl&&st.parentNode===ct){var ft=getRect(st);if(rootEl=ct,dragEl=st,parentEl=dragEl.parentNode,nextEl=dragEl.nextSibling,lastDownEl=st,activeGroup=ut.group,Sortable.dragged=dragEl,tapEvt={target:dragEl,clientX:(te||ee).clientX,clientY:(te||ee).clientY},tapDistanceLeft=tapEvt.clientX-ft.left,tapDistanceTop=tapEvt.clientY-ft.top,this._lastX=(te||ee).clientX,this._lastY=(te||ee).clientY,dragEl.style["will-change"]="all",ht=function(){if(pluginEvent("delayEnded",ot,{evt:ee}),Sortable.eventCanceled){ot._onDrop();return}ot._disableDelayedDragEvents(),!FireFox&&ot.nativeDraggable&&(dragEl.draggable=!0),ot._triggerDragStart(ee,te),_dispatchEvent({sortable:ot,name:"choose",originalEvent:ee}),toggleClass(dragEl,ut.chosenClass,!0)},ut.ignore.split(",").forEach(function(pt){find(dragEl,pt.trim(),_disableDraggable)}),on$1(dt,"dragover",nearestEmptyInsertDetectEvent),on$1(dt,"mousemove",nearestEmptyInsertDetectEvent),on$1(dt,"touchmove",nearestEmptyInsertDetectEvent),on$1(dt,"mouseup",ot._onDrop),on$1(dt,"touchend",ot._onDrop),on$1(dt,"touchcancel",ot._onDrop),FireFox&&this.nativeDraggable&&(this.options.touchStartThreshold=4,dragEl.draggable=!0),pluginEvent("delayStart",this,{evt:ee}),ut.delay&&(!ut.delayOnTouchOnly||te)&&(!this.nativeDraggable||!(Edge||IE11OrLess))){if(Sortable.eventCanceled){this._onDrop();return}on$1(dt,"mouseup",ot._disableDelayedDrag),on$1(dt,"touchend",ot._disableDelayedDrag),on$1(dt,"touchcancel",ot._disableDelayedDrag),on$1(dt,"mousemove",ot._delayedDragTouchMoveHandler),on$1(dt,"touchmove",ot._delayedDragTouchMoveHandler),ut.supportPointer&&on$1(dt,"pointermove",ot._delayedDragTouchMoveHandler),ot._dragStartTimer=setTimeout(ht,ut.delay)}else ht()}},_delayedDragTouchMoveHandler:function(ee){var te=ee.touches?ee.touches[0]:ee;Math.max(Math.abs(te.clientX-this._lastX),Math.abs(te.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){dragEl&&_disableDraggable(dragEl),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var ee=this.el.ownerDocument;off(ee,"mouseup",this._disableDelayedDrag),off(ee,"touchend",this._disableDelayedDrag),off(ee,"touchcancel",this._disableDelayedDrag),off(ee,"mousemove",this._delayedDragTouchMoveHandler),off(ee,"touchmove",this._delayedDragTouchMoveHandler),off(ee,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(ee,te){te=te||ee.pointerType=="touch"&&ee,!this.nativeDraggable||te?this.options.supportPointer?on$1(document,"pointermove",this._onTouchMove):te?on$1(document,"touchmove",this._onTouchMove):on$1(document,"mousemove",this._onTouchMove):(on$1(dragEl,"dragend",this),on$1(rootEl,"dragstart",this._onDragStart));try{document.selection?_nextTick(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch{}},_dragStarted:function(ee,te){if(awaitingDragStarted=!1,rootEl&&dragEl){pluginEvent("dragStarted",this,{evt:te}),this.nativeDraggable&&on$1(document,"dragover",_checkOutsideTargetEl);var st=this.options;!ee&&toggleClass(dragEl,st.dragClass,!1),toggleClass(dragEl,st.ghostClass,!0),Sortable.active=this,ee&&this._appendGhost(),_dispatchEvent({sortable:this,name:"start",originalEvent:te})}else this._nulling()},_emulateDragOver:function(){if(touchEvt){this._lastX=touchEvt.clientX,this._lastY=touchEvt.clientY,_hideGhostForTarget();for(var ee=document.elementFromPoint(touchEvt.clientX,touchEvt.clientY),te=ee;ee&&ee.shadowRoot&&(ee=ee.shadowRoot.elementFromPoint(touchEvt.clientX,touchEvt.clientY),ee!==te);)te=ee;if(dragEl.parentNode[expando]._isOutsideThisEl(ee),te)do{if(te[expando]){var st=void 0;if(st=te[expando]._onDragOver({clientX:touchEvt.clientX,clientY:touchEvt.clientY,target:ee,rootEl:te}),st&&!this.options.dragoverBubble)break}ee=te}while(te=getParentOrHost(te));_unhideGhostForTarget()}},_onTouchMove:function(ee){if(tapEvt){var te=this.options,st=te.fallbackTolerance,ot=te.fallbackOffset,ct=ee.touches?ee.touches[0]:ee,ut=ghostEl&&matrix(ghostEl,!0),dt=ghostEl&&ut&&ut.a,ht=ghostEl&&ut&&ut.d,ft=PositionGhostAbsolutely&&ghostRelativeParent&&getRelativeScrollOffset(ghostRelativeParent),pt=(ct.clientX-tapEvt.clientX+ot.x)/(dt||1)+(ft?ft[0]-ghostRelativeParentInitialScroll[0]:0)/(dt||1),mt=(ct.clientY-tapEvt.clientY+ot.y)/(ht||1)+(ft?ft[1]-ghostRelativeParentInitialScroll[1]:0)/(ht||1);if(!Sortable.active&&!awaitingDragStarted){if(st&&Math.max(Math.abs(ct.clientX-this._lastX),Math.abs(ct.clientY-this._lastY))<st)return;this._onDragStart(ee,!0)}if(ghostEl){ut?(ut.e+=pt-(lastDx||0),ut.f+=mt-(lastDy||0)):ut={a:1,b:0,c:0,d:1,e:pt,f:mt};var yt="matrix(".concat(ut.a,",").concat(ut.b,",").concat(ut.c,",").concat(ut.d,",").concat(ut.e,",").concat(ut.f,")");css(ghostEl,"webkitTransform",yt),css(ghostEl,"mozTransform",yt),css(ghostEl,"msTransform",yt),css(ghostEl,"transform",yt),lastDx=pt,lastDy=mt,touchEvt=ct}ee.cancelable&&ee.preventDefault()}},_appendGhost:function(){if(!ghostEl){var ee=this.options.fallbackOnBody?document.body:rootEl,te=getRect(dragEl,!0,PositionGhostAbsolutely,!0,ee),st=this.options;if(PositionGhostAbsolutely){for(ghostRelativeParent=ee;css(ghostRelativeParent,"position")==="static"&&css(ghostRelativeParent,"transform")==="none"&&ghostRelativeParent!==document;)ghostRelativeParent=ghostRelativeParent.parentNode;ghostRelativeParent!==document.body&&ghostRelativeParent!==document.documentElement?(ghostRelativeParent===document&&(ghostRelativeParent=getWindowScrollingElement()),te.top+=ghostRelativeParent.scrollTop,te.left+=ghostRelativeParent.scrollLeft):ghostRelativeParent=getWindowScrollingElement(),ghostRelativeParentInitialScroll=getRelativeScrollOffset(ghostRelativeParent)}ghostEl=dragEl.cloneNode(!0),toggleClass(ghostEl,st.ghostClass,!1),toggleClass(ghostEl,st.fallbackClass,!0),toggleClass(ghostEl,st.dragClass,!0),css(ghostEl,"transition",""),css(ghostEl,"transform",""),css(ghostEl,"box-sizing","border-box"),css(ghostEl,"margin",0),css(ghostEl,"top",te.top),css(ghostEl,"left",te.left),css(ghostEl,"width",te.width),css(ghostEl,"height",te.height),css(ghostEl,"opacity","0.8"),css(ghostEl,"position",PositionGhostAbsolutely?"absolute":"fixed"),css(ghostEl,"zIndex","100000"),css(ghostEl,"pointerEvents","none"),Sortable.ghost=ghostEl,ee.appendChild(ghostEl),css(ghostEl,"transform-origin",tapDistanceLeft/parseInt(ghostEl.style.width)*100+"% "+tapDistanceTop/parseInt(ghostEl.style.height)*100+"%")}},_onDragStart:function(ee,te){var st=this,ot=ee.dataTransfer,ct=st.options;if(pluginEvent("dragStart",this,{evt:ee}),Sortable.eventCanceled){this._onDrop();return}pluginEvent("setupClone",this),Sortable.eventCanceled||(cloneEl=clone$1(dragEl),cloneEl.removeAttribute("id"),cloneEl.draggable=!1,cloneEl.style["will-change"]="",this._hideClone(),toggleClass(cloneEl,this.options.chosenClass,!1),Sortable.clone=cloneEl),st.cloneId=_nextTick(function(){pluginEvent("clone",st),!Sortable.eventCanceled&&(st.options.removeCloneOnHide||rootEl.insertBefore(cloneEl,dragEl),st._hideClone(),_dispatchEvent({sortable:st,name:"clone"}))}),!te&&toggleClass(dragEl,ct.dragClass,!0),te?(ignoreNextClick=!0,st._loopId=setInterval(st._emulateDragOver,50)):(off(document,"mouseup",st._onDrop),off(document,"touchend",st._onDrop),off(document,"touchcancel",st._onDrop),ot&&(ot.effectAllowed="move",ct.setData&&ct.setData.call(st,ot,dragEl)),on$1(document,"drop",st),css(dragEl,"transform","translateZ(0)")),awaitingDragStarted=!0,st._dragStartId=_nextTick(st._dragStarted.bind(st,te,ee)),on$1(document,"selectstart",st),moved=!0,Safari&&css(document.body,"user-select","none")},_onDragOver:function(ee){var te=this.el,st=ee.target,ot,ct,ut,dt=this.options,ht=dt.group,ft=Sortable.active,pt=activeGroup===ht,mt=dt.sort,yt=putSortable||ft,vt,_t=this,bt=!1;if(_silent)return;function xt(An,Nn){pluginEvent(An,_t,_objectSpread2({evt:ee,isOwner:pt,axis:vt?"vertical":"horizontal",revert:ut,dragRect:ot,targetRect:ct,canSort:mt,fromSortable:yt,target:st,completed:Ot,onMove:function(Zt,Kt){return _onMove(rootEl,te,dragEl,ot,Zt,getRect(Zt),ee,Kt)},changed:kt},Nn))}function Mt(){xt("dragOverAnimationCapture"),_t.captureAnimationState(),_t!==yt&&yt.captureAnimationState()}function Ot(An){return xt("dragOverCompleted",{insertion:An}),An&&(pt?ft._hideClone():ft._showClone(_t),_t!==yt&&(toggleClass(dragEl,putSortable?putSortable.options.ghostClass:ft.options.ghostClass,!1),toggleClass(dragEl,dt.ghostClass,!0)),putSortable!==_t&&_t!==Sortable.active?putSortable=_t:_t===Sortable.active&&putSortable&&(putSortable=null),yt===_t&&(_t._ignoreWhileAnimating=st),_t.animateAll(function(){xt("dragOverAnimationComplete"),_t._ignoreWhileAnimating=null}),_t!==yt&&(yt.animateAll(),yt._ignoreWhileAnimating=null)),(st===dragEl&&!dragEl.animated||st===te&&!st.animated)&&(lastTarget=null),!dt.dragoverBubble&&!ee.rootEl&&st!==document&&(dragEl.parentNode[expando]._isOutsideThisEl(ee.target),!An&&nearestEmptyInsertDetectEvent(ee)),!dt.dragoverBubble&&ee.stopPropagation&&ee.stopPropagation(),bt=!0}function kt(){newIndex=index(dragEl),newDraggableIndex=index(dragEl,dt.draggable),_dispatchEvent({sortable:_t,name:"change",toEl:te,newIndex,newDraggableIndex,originalEvent:ee})}if(ee.preventDefault!==void 0&&ee.cancelable&&ee.preventDefault(),st=closest(st,dt.draggable,te,!0),xt("dragOver"),Sortable.eventCanceled)return bt;if(dragEl.contains(ee.target)||st.animated&&st.animatingX&&st.animatingY||_t._ignoreWhileAnimating===st)return Ot(!1);if(ignoreNextClick=!1,ft&&!dt.disabled&&(pt?mt||(ut=parentEl!==rootEl):putSortable===this||(this.lastPutMode=activeGroup.checkPull(this,ft,dragEl,ee))&&ht.checkPut(this,ft,dragEl,ee))){if(vt=this._getDirection(ee,st)==="vertical",ot=getRect(dragEl),xt("dragOverValid"),Sortable.eventCanceled)return bt;if(ut)return parentEl=rootEl,Mt(),this._hideClone(),xt("revert"),Sortable.eventCanceled||(nextEl?rootEl.insertBefore(dragEl,nextEl):rootEl.appendChild(dragEl)),Ot(!0);var Nt=lastChild(te,dt.draggable);if(!Nt||_ghostIsLast(ee,vt,this)&&!Nt.animated){if(Nt===dragEl)return Ot(!1);if(Nt&&te===ee.target&&(st=Nt),st&&(ct=getRect(st)),_onMove(rootEl,te,dragEl,ot,st,ct,ee,!!st)!==!1)return Mt(),Nt&&Nt.nextSibling?te.insertBefore(dragEl,Nt.nextSibling):te.appendChild(dragEl),parentEl=te,kt(),Ot(!0)}else if(Nt&&_ghostIsFirst(ee,vt,this)){var Gt=getChild(te,0,dt,!0);if(Gt===dragEl)return Ot(!1);if(st=Gt,ct=getRect(st),_onMove(rootEl,te,dragEl,ot,st,ct,ee,!1)!==!1)return Mt(),te.insertBefore(dragEl,Gt),parentEl=te,kt(),Ot(!0)}else if(st.parentNode===te){ct=getRect(st);var Bt=0,Ut,Vt=dragEl.parentNode!==te,Ht=!_dragElInRowColumn(dragEl.animated&&dragEl.toRect||ot,st.animated&&st.toRect||ct,vt),zt=vt?"top":"left",jt=isScrolledPast(st,"top","top")||isScrolledPast(dragEl,"top","top"),Wt=jt?jt.scrollTop:void 0;lastTarget!==st&&(Ut=ct[zt],pastFirstInvertThresh=!1,isCircumstantialInvert=!Ht&&dt.invertSwap||Vt),Bt=_getSwapDirection(ee,st,ct,vt,Ht?1:dt.swapThreshold,dt.invertedSwapThreshold==null?dt.swapThreshold:dt.invertedSwapThreshold,isCircumstantialInvert,lastTarget===st);var Jt;if(Bt!==0){var Qt=index(dragEl);do Qt-=Bt,Jt=parentEl.children[Qt];while(Jt&&(css(Jt,"display")==="none"||Jt===ghostEl))}if(Bt===0||Jt===st)return Ot(!1);lastTarget=st,lastDirection=Bt;var oi=st.nextElementSibling,ai=!1;ai=Bt===1;var xn=_onMove(rootEl,te,dragEl,ot,st,ct,ee,ai);if(xn!==!1)return(xn===1||xn===-1)&&(ai=xn===1),_silent=!0,setTimeout(_unsilent,30),Mt(),ai&&!oi?te.appendChild(dragEl):st.parentNode.insertBefore(dragEl,ai?oi:st),jt&&scrollBy(jt,0,Wt-jt.scrollTop),parentEl=dragEl.parentNode,Ut!==void 0&&!isCircumstantialInvert&&(targetMoveDistance=Math.abs(Ut-getRect(st)[zt])),kt(),Ot(!0)}if(te.contains(dragEl))return Ot(!1)}return!1},_ignoreWhileAnimating:null,_offMoveEvents:function(){off(document,"mousemove",this._onTouchMove),off(document,"touchmove",this._onTouchMove),off(document,"pointermove",this._onTouchMove),off(document,"dragover",nearestEmptyInsertDetectEvent),off(document,"mousemove",nearestEmptyInsertDetectEvent),off(document,"touchmove",nearestEmptyInsertDetectEvent)},_offUpEvents:function(){var ee=this.el.ownerDocument;off(ee,"mouseup",this._onDrop),off(ee,"touchend",this._onDrop),off(ee,"pointerup",this._onDrop),off(ee,"touchcancel",this._onDrop),off(document,"selectstart",this)},_onDrop:function(ee){var te=this.el,st=this.options;if(newIndex=index(dragEl),newDraggableIndex=index(dragEl,st.draggable),pluginEvent("drop",this,{evt:ee}),parentEl=dragEl&&dragEl.parentNode,newIndex=index(dragEl),newDraggableIndex=index(dragEl,st.draggable),Sortable.eventCanceled){this._nulling();return}awaitingDragStarted=!1,isCircumstantialInvert=!1,pastFirstInvertThresh=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),_cancelNextTick(this.cloneId),_cancelNextTick(this._dragStartId),this.nativeDraggable&&(off(document,"drop",this),off(te,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),Safari&&css(document.body,"user-select",""),css(dragEl,"transform",""),ee&&(moved&&(ee.cancelable&&ee.preventDefault(),!st.dropBubble&&ee.stopPropagation()),ghostEl&&ghostEl.parentNode&&ghostEl.parentNode.removeChild(ghostEl),(rootEl===parentEl||putSortable&&putSortable.lastPutMode!=="clone")&&cloneEl&&cloneEl.parentNode&&cloneEl.parentNode.removeChild(cloneEl),dragEl&&(this.nativeDraggable&&off(dragEl,"dragend",this),_disableDraggable(dragEl),dragEl.style["will-change"]="",moved&&!awaitingDragStarted&&toggleClass(dragEl,putSortable?putSortable.options.ghostClass:this.options.ghostClass,!1),toggleClass(dragEl,this.options.chosenClass,!1),_dispatchEvent({sortable:this,name:"unchoose",toEl:parentEl,newIndex:null,newDraggableIndex:null,originalEvent:ee}),rootEl!==parentEl?(newIndex>=0&&(_dispatchEvent({rootEl:parentEl,name:"add",toEl:parentEl,fromEl:rootEl,originalEvent:ee}),_dispatchEvent({sortable:this,name:"remove",toEl:parentEl,originalEvent:ee}),_dispatchEvent({rootEl:parentEl,name:"sort",toEl:parentEl,fromEl:rootEl,originalEvent:ee}),_dispatchEvent({sortable:this,name:"sort",toEl:parentEl,originalEvent:ee})),putSortable&&putSortable.save()):newIndex!==oldIndex&&newIndex>=0&&(_dispatchEvent({sortable:this,name:"update",toEl:parentEl,originalEvent:ee}),_dispatchEvent({sortable:this,name:"sort",toEl:parentEl,originalEvent:ee})),Sortable.active&&((newIndex==null||newIndex===-1)&&(newIndex=oldIndex,newDraggableIndex=oldDraggableIndex),_dispatchEvent({sortable:this,name:"end",toEl:parentEl,originalEvent:ee}),this.save()))),this._nulling()},_nulling:function(){pluginEvent("nulling",this),rootEl=dragEl=parentEl=ghostEl=nextEl=cloneEl=lastDownEl=cloneHidden=tapEvt=touchEvt=moved=newIndex=newDraggableIndex=oldIndex=oldDraggableIndex=lastTarget=lastDirection=putSortable=activeGroup=Sortable.dragged=Sortable.ghost=Sortable.clone=Sortable.active=null,savedInputChecked.forEach(function(ee){ee.checked=!0}),savedInputChecked.length=lastDx=lastDy=0},handleEvent:function(ee){switch(ee.type){case"drop":case"dragend":this._onDrop(ee);break;case"dragenter":case"dragover":dragEl&&(this._onDragOver(ee),_globalDragOver(ee));break;case"selectstart":ee.preventDefault();break}},toArray:function(){for(var ee=[],te,st=this.el.children,ot=0,ct=st.length,ut=this.options;ot<ct;ot++)te=st[ot],closest(te,ut.draggable,this.el,!1)&&ee.push(te.getAttribute(ut.dataIdAttr)||_generateId(te));return ee},sort:function(ee,te){var st={},ot=this.el;this.toArray().forEach(function(ct,ut){var dt=ot.children[ut];closest(dt,this.options.draggable,ot,!1)&&(st[ct]=dt)},this),te&&this.captureAnimationState(),ee.forEach(function(ct){st[ct]&&(ot.removeChild(st[ct]),ot.appendChild(st[ct]))}),te&&this.animateAll()},save:function(){var ee=this.options.store;ee&&ee.set&&ee.set(this)},closest:function(ee,te){return closest(ee,te||this.options.draggable,this.el,!1)},option:function(ee,te){var st=this.options;if(te===void 0)return st[ee];var ot=PluginManager.modifyOption(this,ee,te);typeof ot<"u"?st[ee]=ot:st[ee]=te,ee==="group"&&_prepareGroup(st)},destroy:function(){pluginEvent("destroy",this);var ee=this.el;ee[expando]=null,off(ee,"mousedown",this._onTapStart),off(ee,"touchstart",this._onTapStart),off(ee,"pointerdown",this._onTapStart),this.nativeDraggable&&(off(ee,"dragover",this),off(ee,"dragenter",this)),Array.prototype.forEach.call(ee.querySelectorAll("[draggable]"),function(te){te.removeAttribute("draggable")}),this._onDrop(),this._disableDelayedDragEvents(),sortables.splice(sortables.indexOf(this.el),1),this.el=ee=null},_hideClone:function(){if(!cloneHidden){if(pluginEvent("hideClone",this),Sortable.eventCanceled)return;css(cloneEl,"display","none"),this.options.removeCloneOnHide&&cloneEl.parentNode&&cloneEl.parentNode.removeChild(cloneEl),cloneHidden=!0}},_showClone:function(ee){if(ee.lastPutMode!=="clone"){this._hideClone();return}if(cloneHidden){if(pluginEvent("showClone",this),Sortable.eventCanceled)return;dragEl.parentNode==rootEl&&!this.options.group.revertClone?rootEl.insertBefore(cloneEl,dragEl):nextEl?rootEl.insertBefore(cloneEl,nextEl):rootEl.appendChild(cloneEl),this.options.group.revertClone&&this.animate(dragEl,cloneEl),css(cloneEl,"display",""),cloneHidden=!1}}};function _globalDragOver(ne){ne.dataTransfer&&(ne.dataTransfer.dropEffect="move"),ne.cancelable&&ne.preventDefault()}function _onMove(ne,ee,te,st,ot,ct,ut,dt){var ht,ft=ne[expando],pt=ft.options.onMove,mt;return window.CustomEvent&&!IE11OrLess&&!Edge?ht=new CustomEvent("move",{bubbles:!0,cancelable:!0}):(ht=document.createEvent("Event"),ht.initEvent("move",!0,!0)),ht.to=ee,ht.from=ne,ht.dragged=te,ht.draggedRect=st,ht.related=ot||ee,ht.relatedRect=ct||getRect(ee),ht.willInsertAfter=dt,ht.originalEvent=ut,ne.dispatchEvent(ht),pt&&(mt=pt.call(ft,ht,ut)),mt}function _disableDraggable(ne){ne.draggable=!1}function _unsilent(){_silent=!1}function _ghostIsFirst(ne,ee,te){var st=getRect(getChild(te.el,0,te.options,!0)),ot=getChildContainingRectFromElement(te.el,te.options,ghostEl),ct=10;return ee?ne.clientX<ot.left-ct||ne.clientY<st.top&&ne.clientX<st.right:ne.clientY<ot.top-ct||ne.clientY<st.bottom&&ne.clientX<st.left}function _ghostIsLast(ne,ee,te){var st=getRect(lastChild(te.el,te.options.draggable)),ot=getChildContainingRectFromElement(te.el,te.options,ghostEl),ct=10;return ee?ne.clientX>ot.right+ct||ne.clientY>st.bottom&&ne.clientX>st.left:ne.clientY>ot.bottom+ct||ne.clientX>st.right&&ne.clientY>st.top}function _getSwapDirection(ne,ee,te,st,ot,ct,ut,dt){var ht=st?ne.clientY:ne.clientX,ft=st?te.height:te.width,pt=st?te.top:te.left,mt=st?te.bottom:te.right,yt=!1;if(!ut){if(dt&&targetMoveDistance<ft*ot){if(!pastFirstInvertThresh&&(lastDirection===1?ht>pt+ft*ct/2:ht<mt-ft*ct/2)&&(pastFirstInvertThresh=!0),pastFirstInvertThresh)yt=!0;else if(lastDirection===1?ht<pt+targetMoveDistance:ht>mt-targetMoveDistance)return-lastDirection}else if(ht>pt+ft*(1-ot)/2&&ht<mt-ft*(1-ot)/2)return _getInsertDirection(ee)}return yt=yt||ut,yt&&(ht<pt+ft*ct/2||ht>mt-ft*ct/2)?ht>pt+ft/2?1:-1:0}function _getInsertDirection(ne){return index(dragEl)<index(ne)?1:-1}function _generateId(ne){for(var ee=ne.tagName+ne.className+ne.src+ne.href+ne.textContent,te=ee.length,st=0;te--;)st+=ee.charCodeAt(te);return st.toString(36)}function _saveInputCheckedState(ne){savedInputChecked.length=0;for(var ee=ne.getElementsByTagName("input"),te=ee.length;te--;){var st=ee[te];st.checked&&savedInputChecked.push(st)}}function _nextTick(ne){return setTimeout(ne,0)}function _cancelNextTick(ne){return clearTimeout(ne)}documentExists&&on$1(document,"touchmove",function(ne){(Sortable.active||awaitingDragStarted)&&ne.cancelable&&ne.preventDefault()});Sortable.utils={on:on$1,off,css,find,is:function(ee,te){return!!closest(ee,te,ee,!1)},extend:extend$1,throttle,closest,toggleClass,clone:clone$1,index,nextTick:_nextTick,cancelNextTick:_cancelNextTick,detectDirection:_detectDirection,getChild,expando};Sortable.get=function(ne){return ne[expando]};Sortable.mount=function(){for(var ne=arguments.length,ee=new Array(ne),te=0;te<ne;te++)ee[te]=arguments[te];ee[0].constructor===Array&&(ee=ee[0]),ee.forEach(function(st){if(!st.prototype||!st.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(st));st.utils&&(Sortable.utils=_objectSpread2(_objectSpread2({},Sortable.utils),st.utils)),PluginManager.mount(st)})};Sortable.create=function(ne,ee){return new Sortable(ne,ee)};Sortable.version=version;var autoScrolls=[],scrollEl,scrollRootEl,scrolling=!1,lastAutoScrollX,lastAutoScrollY,touchEvt$1,pointerElemChangedInterval;function AutoScrollPlugin(){function ne(){this.defaults={scroll:!0,forceAutoScrollFallback:!1,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0};for(var ee in this)ee.charAt(0)==="_"&&typeof this[ee]=="function"&&(this[ee]=this[ee].bind(this))}return ne.prototype={dragStarted:function(te){var st=te.originalEvent;this.sortable.nativeDraggable?on$1(document,"dragover",this._handleAutoScroll):this.options.supportPointer?on$1(document,"pointermove",this._handleFallbackAutoScroll):st.touches?on$1(document,"touchmove",this._handleFallbackAutoScroll):on$1(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(te){var st=te.originalEvent;!this.options.dragOverBubble&&!st.rootEl&&this._handleAutoScroll(st)},drop:function(){this.sortable.nativeDraggable?off(document,"dragover",this._handleAutoScroll):(off(document,"pointermove",this._handleFallbackAutoScroll),off(document,"touchmove",this._handleFallbackAutoScroll),off(document,"mousemove",this._handleFallbackAutoScroll)),clearPointerElemChangedInterval(),clearAutoScrolls(),cancelThrottle()},nulling:function(){touchEvt$1=scrollRootEl=scrollEl=scrolling=pointerElemChangedInterval=lastAutoScrollX=lastAutoScrollY=null,autoScrolls.length=0},_handleFallbackAutoScroll:function(te){this._handleAutoScroll(te,!0)},_handleAutoScroll:function(te,st){var ot=this,ct=(te.touches?te.touches[0]:te).clientX,ut=(te.touches?te.touches[0]:te).clientY,dt=document.elementFromPoint(ct,ut);if(touchEvt$1=te,st||this.options.forceAutoScrollFallback||Edge||IE11OrLess||Safari){autoScroll(te,this.options,dt,st);var ht=getParentAutoScrollElement(dt,!0);scrolling&&(!pointerElemChangedInterval||ct!==lastAutoScrollX||ut!==lastAutoScrollY)&&(pointerElemChangedInterval&&clearPointerElemChangedInterval(),pointerElemChangedInterval=setInterval(function(){var ft=getParentAutoScrollElement(document.elementFromPoint(ct,ut),!0);ft!==ht&&(ht=ft,clearAutoScrolls()),autoScroll(te,ot.options,ft,st)},10),lastAutoScrollX=ct,lastAutoScrollY=ut)}else{if(!this.options.bubbleScroll||getParentAutoScrollElement(dt,!0)===getWindowScrollingElement()){clearAutoScrolls();return}autoScroll(te,this.options,getParentAutoScrollElement(dt,!1),!1)}}},_extends(ne,{pluginName:"scroll",initializeByDefault:!0})}function clearAutoScrolls(){autoScrolls.forEach(function(ne){clearInterval(ne.pid)}),autoScrolls=[]}function clearPointerElemChangedInterval(){clearInterval(pointerElemChangedInterval)}var autoScroll=throttle(function(ne,ee,te,st){if(ee.scroll){var ot=(ne.touches?ne.touches[0]:ne).clientX,ct=(ne.touches?ne.touches[0]:ne).clientY,ut=ee.scrollSensitivity,dt=ee.scrollSpeed,ht=getWindowScrollingElement(),ft=!1,pt;scrollRootEl!==te&&(scrollRootEl=te,clearAutoScrolls(),scrollEl=ee.scroll,pt=ee.scrollFn,scrollEl===!0&&(scrollEl=getParentAutoScrollElement(te,!0)));var mt=0,yt=scrollEl;do{var vt=yt,_t=getRect(vt),bt=_t.top,xt=_t.bottom,Mt=_t.left,Ot=_t.right,kt=_t.width,Nt=_t.height,Gt=void 0,Bt=void 0,Ut=vt.scrollWidth,Vt=vt.scrollHeight,Ht=css(vt),zt=vt.scrollLeft,jt=vt.scrollTop;vt===ht?(Gt=kt<Ut&&(Ht.overflowX==="auto"||Ht.overflowX==="scroll"||Ht.overflowX==="visible"),Bt=Nt<Vt&&(Ht.overflowY==="auto"||Ht.overflowY==="scroll"||Ht.overflowY==="visible")):(Gt=kt<Ut&&(Ht.overflowX==="auto"||Ht.overflowX==="scroll"),Bt=Nt<Vt&&(Ht.overflowY==="auto"||Ht.overflowY==="scroll"));var Wt=Gt&&(Math.abs(Ot-ot)<=ut&&zt+kt<Ut)-(Math.abs(Mt-ot)<=ut&&!!zt),Jt=Bt&&(Math.abs(xt-ct)<=ut&&jt+Nt<Vt)-(Math.abs(bt-ct)<=ut&&!!jt);if(!autoScrolls[mt])for(var Qt=0;Qt<=mt;Qt++)autoScrolls[Qt]||(autoScrolls[Qt]={});(autoScrolls[mt].vx!=Wt||autoScrolls[mt].vy!=Jt||autoScrolls[mt].el!==vt)&&(autoScrolls[mt].el=vt,autoScrolls[mt].vx=Wt,autoScrolls[mt].vy=Jt,clearInterval(autoScrolls[mt].pid),(Wt!=0||Jt!=0)&&(ft=!0,autoScrolls[mt].pid=setInterval((function(){st&&this.layer===0&&Sortable.active._onTouchMove(touchEvt$1);var oi=autoScrolls[this.layer].vy?autoScrolls[this.layer].vy*dt:0,ai=autoScrolls[this.layer].vx?autoScrolls[this.layer].vx*dt:0;typeof pt=="function"&&pt.call(Sortable.dragged.parentNode[expando],ai,oi,ne,touchEvt$1,autoScrolls[this.layer].el)!=="continue"||scrollBy(autoScrolls[this.layer].el,ai,oi)}).bind({layer:mt}),24))),mt++}while(ee.bubbleScroll&&yt!==ht&&(yt=getParentAutoScrollElement(yt,!1)));scrolling=ft}},30),drop=function(ee){var te=ee.originalEvent,st=ee.putSortable,ot=ee.dragEl,ct=ee.activeSortable,ut=ee.dispatchSortableEvent,dt=ee.hideGhostForTarget,ht=ee.unhideGhostForTarget;if(te){var ft=st||ct;dt();var pt=te.changedTouches&&te.changedTouches.length?te.changedTouches[0]:te,mt=document.elementFromPoint(pt.clientX,pt.clientY);ht(),ft&&!ft.el.contains(mt)&&(ut("spill"),this.onSpill({dragEl:ot,putSortable:st}))}};function Revert(){}Revert.prototype={startIndex:null,dragStart:function(ee){var te=ee.oldDraggableIndex;this.startIndex=te},onSpill:function(ee){var te=ee.dragEl,st=ee.putSortable;this.sortable.captureAnimationState(),st&&st.captureAnimationState();var ot=getChild(this.sortable.el,this.startIndex,this.options);ot?this.sortable.el.insertBefore(te,ot):this.sortable.el.appendChild(te),this.sortable.animateAll(),st&&st.animateAll()},drop};_extends(Revert,{pluginName:"revertOnSpill"});function Remove(){}Remove.prototype={onSpill:function(ee){var te=ee.dragEl,st=ee.putSortable,ot=st||this.sortable;ot.captureAnimationState(),te.parentNode&&te.parentNode.removeChild(te),ot.animateAll()},drop};_extends(Remove,{pluginName:"removeOnSpill"});Sortable.mount(new AutoScrollPlugin);Sortable.mount(Remove,Revert);/*! @license DOMPurify 3.4.15 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.4.15/LICENSE */function _arrayLikeToArray(ne,ee){(ee==null||ee>ne.length)&&(ee=ne.length);for(var te=0,st=Array(ee);te<ee;te++)st[te]=ne[te];return st}function _arrayWithHoles(ne){if(Array.isArray(ne))return ne}function _iterableToArrayLimit(ne,ee){var te=ne==null?null:typeof Symbol<"u"&&ne[Symbol.iterator]||ne["@@iterator"];if(te!=null){var st,ot,ct,ut,dt=[],ht=!0,ft=!1;try{if(ct=(te=te.call(ne)).next,ee!==0)for(;!(ht=(st=ct.call(te)).done)&&(dt.push(st.value),dt.length!==ee);ht=!0);}catch(pt){ft=!0,ot=pt}finally{try{if(!ht&&te.return!=null&&(ut=te.return(),Object(ut)!==ut))return}finally{if(ft)throw ot}}return dt}}function _nonIterableRest(){throw new TypeError(`Invalid attempt to de
110structure non-iterable instance.
111In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _slicedToArray(ne,ee){return _arrayWithHoles(ne)||_iterableToArrayLimit(ne,ee)||_unsupportedIterableToArray(ne,ee)||_nonIterableRest()}function _unsupportedIterableToArray(ne,ee){if(ne){if(typeof ne=="string")return _arrayLikeToArray(ne,ee);var te={}.toString.call(ne).slice(8,-1);return te==="Object"&&ne.constructor&&(te=ne.constructor.name),te==="Map"||te==="Set"?Array.from(ne):te==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(te)?_arrayLikeToArray(ne,ee):void 0}}const entries=Object.entries,setPrototypeOf=Object.setPrototypeOf,isFrozen=Object.isFrozen,getPrototypeOf=Object.getPrototypeOf,getOwnPropertyDescriptor=Object.getOwnPropertyDescriptor;let freeze=Object.freeze,seal=Object.seal,create=Object.create,_ref=typeof Reflect<"u"&&Reflect,apply=_ref.apply,construct=_ref.construct;freeze||(freeze=function(ee){return ee});seal||(seal=function(ee){return ee});apply||(apply=function(ee,te){for(var st=arguments.length,ot=new Array(st>2?st-2:0),ct=2;ct<st;ct++)ot[ct-2]=arguments[ct];return ee.apply(te,ot)});construct||(construct=function(ee){for(var te=arguments.length,st=new Array(te>1?te-1:0),ot=1;ot<te;ot++)st[ot-1]=arguments[ot];return new ee(...st)});const arrayForEach=unapply(Array.prototype.forEach),arrayLastIndexOf=unapply(Array.prototype.lastIndexOf),arrayPop=unapply(Array.prototype.pop),arrayPush=unapply(Array.prototype.push),arraySplice=unapply(Array.prototype.splice),arrayIsArray=Array.isArray,stringToLowerCase=unapply(String.prototype.toLowerCase),stringToString=unappl
vendor: 6,114 bytes, line 111
111y(String.prototype.toString),stringMatch=unapply(String.prototype.match),stringReplace=unapply(String.prototype.replace),stringIndexOf=unapply(String.prototype.indexOf),stringTrim=unapply(String.prototype.trim),numberToString=unapply(Number.prototype.toString),booleanToString=unapply(Boolean.prototype.toString),bigintToString=typeof BigInt>"u"?null:unapply(BigInt.prototype.toString),symbolToString=typeof Symbol>"u"?null:unapply(Symbol.prototype.toString),objectHasOwnProperty=unapply(Object.prototype.hasOwnProperty),objectToString=unapply(Object.prototype.toString),regExpTest=unapply(RegExp.prototype.test),typeErrorCreate=unconstruct(TypeError);function unapply(ne){return function(ee){ee instanceof RegExp&&(ee.lastIndex=0);for(var te=arguments.length,st=new Array(te>1?te-1:0),ot=1;ot<te;ot++)st[ot-1]=arguments[ot];return apply(ne,ee,st)}}function unconstruct(ne){return function(){for(var ee=arguments.length,te=new Array(ee),st=0;st<ee;st++)te[st]=arguments[st];return construct(ne,te)}}function addToSet(ne,ee){let te=arguments.length>2&&arguments[2]!==void 0?arguments[2]:stringToLowerCase;if(setPrototypeOf&&setPrototypeOf(ne,null),!arrayIsArray(ee))return ne;let st=ee.length;for(;st--;){let ot=ee[st];if(typeof ot=="string"){const ct=te(ot);ct!==ot&&(isFrozen(ee)||(ee[st]=ct),ot=ct)}ne[ot]=!0}return ne}function cleanArray(ne){for(let ee=0;ee<ne.length;ee++)objectHasOwnProperty(ne,ee)||(ne[ee]=null);return ne}function clone(ne){const ee=create(null);for(const st of entries(ne)){var te=_slicedToArray(st,2);const ot=te[0],ct=te[1];objectHasOwnProperty(ne,ot)&&(arrayIsArray(ct)?ee[ot]=cleanArray(ct):ct&&typeof ct=="object"&&ct.constructor===Object?ee[ot]=clone(ct):ee[ot]=ct)}return ee}function stringifyValue(ne){switch(typeof ne){case"string":return ne;case"number":return numberToString(ne);case"boolean":return booleanToString(ne);case"bigint":return bigintToString?bigintToString(ne):"0";case"symbol":return symbolToString?symbolToString(ne):"Symbol()";case"undefined":return objectToString(ne);case"function":case"object":{if(ne===null)return objectToString(ne);const ee=ne,te=lookupGetter(ee,"toString");if(typeof te=="function"){const st=te(ee);return typeof st=="string"?st:objectToString(st)}return objectToString(ne)}default:return objectToString(ne)}}function lookupGetter(ne,ee){for(;ne!==null;){const st=getOwnPropertyDescriptor(ne,ee);if(st){if(st.get)return unapply(st.get);if(typeof st.value=="function")return unapply(st.value)}ne=getPrototypeOf(ne)}function te(){return null}return te}function isRegex(ne){try{return regExpTest(ne,""),!0}catch{return!1}}const html$1=freeze(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),svg$1=freeze(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),svgFilters=freeze(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),svgDisallowed=freeze(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),mathMl$1=freeze(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),mathMlDisallowed=freeze(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),text=freeze(["#text"]),html=freeze(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","command","commandfor","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","
111spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns"]),svg=freeze(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dominant-baseline","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","pointer-events","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-orientation","text-rendering","textlength","type","u1","u2","unicode","values","vector-effect","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),mathMl=freeze(["accent","accentunder","align","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lquote","lspace","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),xml=freeze(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),MUSTACHE_EXPR=seal(/{{[\w\W]*|^[\w\W]*}}/g),ERB_EXPR=seal(/<%[\w\W]*|^[\w\W]*%>/g),TMPLIT_EXPR=seal(/\${[\w\W]*/g),DATA_ATTR=seal(/^data-[\-\w.\u00B7-\uFFFF]+$/),ARIA_ATTR=seal(/^aria-[\-\w]+$/),IS_ALLOWED_URI=seal(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),IS_SCRIPT_OR_DATA=seal(/^(?:\w+script|data):/i),ATTR_WHITESPACE=seal(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),DOCTYPE_NAME=seal(/^html$/i),CUSTOM_ELEMENT=seal(/^[a-z][.\w]*(-[.\w]+)+$/i),ELEMENT_MARKUP_PROBE=seal(/<[/\w!]/g),COMMENT_MARKUP_PROBE=seal(/<[/\w]/g),FALLBACK_TAG_CLOSE=seal(/<\/no(script|embed|frames)/i),SELF_CLOSING_TAG=seal(/\/>/i),NODE_TYPE={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},LITERAL_TEXT_ELEMENT_NAMES=["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"],LITERAL_TEXT_ELEMENTS=freeze(addToSet({},LITERAL_TEXT_ELEMENT_NAMES)),LITERAL_TEXT_CLOSE=(function(){const ne={};return arrayForEach(LITERAL_TEXT_ELEMENT_NAMES,ee=>{ne[ee]=seal(new RegExp("</"+ee+"(?=[\\t\\n\\f\\r />])","i"))}),freeze(ne)})(),getGlobal=function(){return typeof window>"u"?null:window},_createTrustedTypesPolicy=function(ee,te){if(typeof ee!="object"||typeof ee.createPolicy!="function")return null;let st=null;
vendor: 13,398 bytes, line 111
111const ot="data-tt-policy-suffix";te&&te.hasAttribute(ot)&&(st=te.getAttribute(ot));const ct="dompurify"+(st?"#"+st:"");try{return ee.createPolicy(ct,{createHTML(ut){return ut},createScriptURL(ut){return ut}})}catch{return console.warn("TrustedTypes policy "+ct+" could not be created."),null}},_createHooksMap=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},_resolveSetOption=function(ee,te,st,ot){return objectHasOwnProperty(ee,te)&&arrayIsArray(ee[te])?addToSet(ot.base?clone(ot.base):{},ee[te],ot.transform):st},_resolveObjectOption=function(ee,te,st){const ot=objectHasOwnProperty(ee,te)?ee[te]:void 0;return ot&&typeof ot=="object"?clone(ot):st()};function createDOMPurify(){let ne=arguments.length>0&&arguments[0]!==void 0?arguments[0]:getGlobal();const ee=Qn=>createDOMPurify(Qn);if(ee.version="3.4.15",ee.removed=[],!ne||!ne.document||ne.document.nodeType!==NODE_TYPE.document||!ne.Element)return ee.isSupported=!1,ee;let te=ne.document;const st=te,ot=st.currentScript;ne.DocumentFragment;const ct=ne.HTMLTemplateElement,ut=ne.Node,dt=ne.Element,ht=ne.NodeFilter,ft=ne.NamedNodeMap;ft===void 0&&(ne.NamedNodeMap||ne.MozNamedAttrMap),ne.HTMLFormElement;const pt=ne.DOMParser,mt=ne.trustedTypes,yt=dt.prototype,vt=lookupGetter(yt,"cloneNode"),_t=lookupGetter(yt,"remove"),bt=lookupGetter(yt,"removeAttributeNode"),xt=lookupGetter(yt,"nextSibling"),Mt=lookupGetter(yt,"childNodes"),Ot=lookupGetter(yt,"parentNode"),kt=lookupGetter(yt,"shadowRoot"),Nt=lookupGetter(yt,"attributes"),Gt=ut&&ut.prototype?lookupGetter(ut.prototype,"nodeType"):null,Bt=ut&&ut.prototype?lookupGetter(ut.prototype,"nodeName"):null,Ut=ut&&ut.prototype?lookupGetter(ut.prototype,"ownerDocument"):null,Vt=function(En){return Gt?Gt(En):En.nodeType},Ht=function(En){return Bt?Bt(En):En.nodeName};if(typeof ct=="function"){const Qn=te.createElement("template");Qn.content&&Qn.content.ownerDocument&&(te=Qn.content.ownerDocument)}let zt,jt="",Wt,Jt=!1,Qt=0;const oi=function(){if(Qt>0)throw typeErrorCreate('A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.')},ai=function(En){oi(),Qt++;try{return zt.createHTML(En)}finally{Qt--}},xn=function(En){oi(),Qt++;try{return zt.createScriptURL(En)}finally{Qt--}},An=function(){return Jt||(Wt=_createTrustedTypesPolicy(mt,ot),Jt=!0),Wt},Nn=te,Xt=Nn.implementation,Zt=Nn.createNodeIterator,Kt=Nn.createDocumentFragment,ti=Nn.getElementsByTagName,qt=st.importNode;let ii=_createHooksMap();ee.isSupported=typeof entries=="function"&&typeof Ot=="function"&&Xt&&Xt.createHTMLDocument!==void 0;const wn=MUSTACHE_EXPR,ni=ERB_EXPR,Cn=TMPLIT_EXPR,Ln=DATA_ATTR,Un=ARIA_ATTR,Pn=IS_SCRIPT_OR_DATA,Mn=ATTR_WHITESPACE,Yt=CUSTOM_ELEMENT;let ri=IS_ALLOWED_URI,Sn=null;const On=addToSet({},[...html$1,...svg$1,...svgFilters,...mathMl$1,...text]);let Rn=null;const Bn=addToSet({},[...html,...svg,...mathMl,...xml]);let Vn=Object.seal(create(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Wn=null,Gn=null;const Hn=Object.seal(create(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let kn=!0,er=!0,Tn=!1,Dn=!0,$n=!1,jn=!0,zn=!1,Jn=!1,rs=null,os=null,ls=!1,cs=!1,vs=!1,hs=!1,fs=!0,_s=!1;const ms="user-content-";let Zs=!0,ao=!1,us={},ps=null;const gs=addToSet({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","selectedcontent","style","svg","template","thead","title","video","xmp"]);let bs=null;const Bo=addToSet({},["audio","video","img","source","image","track"]);let qo=null;const Lo=addToSet({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),ys="http://www.w3.org/1998/Math/MathML",Co="http://www.w3.org/2000/svg",Ss="http://www.w3.org/1999/xhtml";let lo=Ss,Ao=!1,wo=null;const To=addToSet({},[ys,Co,Ss],stringToString),io=freeze(["mi","mo","mn","ms","mtext"]);let So=addToSet({},io);const xs=freeze(["annotation-xml"]);let oo=addToSet({},xs);const Go=addToSet({},["title","style","font","a","script"]);let Vo=null;const Jo=["application/xhtml+xml","text/html"],hl="text/html";let co=null,fl=null;const Ju=te.createElement("form"),Bc=function(En){return En instanceof RegExp||En instanceof Function},Jl=function(){let En=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(fl&&fl===En)return;(!En||typeof En!="object")&&(En={}),En=clone(En),Vo=Jo.indexOf(En.PARSER_MEDIA_TYPE)===-1?hl:En.PARSER_MEDIA_TYPE,co=Vo==="application/xhtml+xml"?stringToString:stringToLowerCase,Sn=_resolveSetOption(En,"ALLOWED_TAGS",On,{transform:co}),Rn=_resolveSetOption(En,"ALLOWED_ATTR",Bn,{transform:co}),wo=_resolveSetOption(En,"ALLOWED_NAMESPACES",To,{transform:stringToString}),qo=_resolveSetOption(En,"ADD_URI_SAFE_ATTR",Lo,{transform:co,base:Lo}),bs=_resolveSetOption(En,"ADD_DATA_URI_TAGS",Bo,{transform:co,base:Bo}),ps=_resolveSetOption(En,"FORBID_CONTENTS",gs,{transform:co}),Wn=_resolveSetOption(En,"FORBID_TAGS",clone({}),{transform:co}),Gn=_resolveSetOption(En,"FORBID_ATTR",clone({}),{transform:co}),us=objectHasOwnProperty(En,"USE_PROFILES")?En.USE_PROFILES&&typeof En.USE_PROFILES=="object"?clone(En.USE_PROFILES):En.USE_PROFILES:!1,kn=En.ALLOW_ARIA_ATTR!==!1,er=En.ALLOW_DATA_ATTR!==!1,Tn=En.ALLOW_UNKNOWN_PROTOCOLS||!1,Dn=En.ALLOW_SELF_CLOSE_IN_ATTR!==!1,$n=En.SAFE_FOR_TEMPLATES||!1,jn=En.SAFE_FOR_XML!==!1,zn=En.WHOLE_DOCUMENT||!1,cs=En.RETURN_DOM||!1,vs=En.RETURN_DOM_FRAGMENT||!1,hs=En.RETURN_TRUSTED_TYPE||!1,ls=En.FORCE_BODY||!1,fs=En.SANITIZE_DOM!==!1,_s=En.SANITIZE_NAMED_PROPS||!1,Zs=En.KEEP_CONTENT!==!1,ao=En.IN_PLACE||!1,ri=isRegex(En.ALLOWED_URI_REGEXP)?En.ALLOWED_URI_REGEXP:IS_ALLOWED_URI,lo=typeof En.NAMESPACE=="string"?En.NAMESPACE:Ss,So=_resolveObjectOption(En,"MATHML_TEXT_INTEGRATION_POINTS",()=>addToSet({},io)),oo=_resolveObjectOption(En,"HTML_INTEGRATION_POINTS",()=>addToSet({},xs));const Fn=_resolveObjectOption(En,"CUSTOM_ELEMENT_HANDLING",()=>create(null));if(Vn=create(null),objectHasOwnProperty(Fn,"tagNameCheck")&&Bc(Fn.tagNameCheck)&&(Vn.tagNameCheck=Fn.tagNameCheck),objectHasOwnProperty(Fn,"attributeNameCheck")&&Bc(Fn.attributeNameCheck)&&(Vn.attributeNameCheck=Fn.attributeNameCheck),objectHasOwnProperty(Fn,"allowCustomizedBuiltInElements")&&typeof Fn.allowCustomizedBuiltInElements=="boolean"&&(Vn.allowCustomizedBuiltInElements=Fn.allowCustomizedBuiltInElements),seal(Vn),$n&&(er=!1),vs&&(cs=!0),us&&(Sn=addToSet({},text),Rn=create(null),us.html===!0&&(addToSet(Sn,html$1),addToSet(Rn,html)),us.svg===!0&&(addToSet(Sn,svg$1),addToSet(Rn,svg),addToSet(Rn,xml)),us.svgFilters===!0&&(addToSet(Sn,svgFilters),addToSet(Rn,svg),addToSet(Rn,xml)),us.mathMl===!0&&(addToSet(Sn,mathMl$1),addToSet(Rn,mathMl),addToSet(Rn,xml))),Hn.tagCheck=null,Hn.attributeCheck=null,objectHasOwnProperty(En,"ADD_TAGS")&&(typeof En.ADD_TAGS=="function"?Hn.tagCheck=En.ADD_TAGS:arrayIsArray(En.ADD_TAGS)&&(Sn===On&&(Sn=clone(Sn)),addToSet(Sn,En.ADD_TAGS,co))),objectHasOwnProperty(En,"ADD_ATTR")&&(typeof En.ADD_ATTR=="function"?Hn.attributeCheck=En.ADD_ATTR:arrayIsArray(En.ADD_ATTR)&&(Rn===Bn&&(Rn=clone(Rn)),addToSet(Rn,En.ADD_ATTR,co))),objectHasOwnProperty(En,"ADD_FORBID_CONTENTS")&&arrayIsArray(En.ADD_FORBID_CONTENTS)&&(ps===gs&&(ps=clone(ps)),addToSet(ps,En.ADD_FORBID_CONTENTS,co)),Zs&&(Sn["#text"]=!0),zn&&addToSet(Sn,["html","head","body"]),Sn.table&&(addToSet(Sn,["tbody"]),delete Wn.tbody),En.TRUSTED_TYPES_POLICY){if(typeof En.TRUSTED_TYPES_POLICY.createHTML!="function")throw typeErrorCreate('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof En.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw typeErrorCreate('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');const qn=zt;zt=En.TRUSTED_TYPES_POLICY;try{jt=ai("")}catch(ss){throw zt=qn,ss}}else En.TRUSTED_TYPES_POLICY===null?(zt=void 0,jt=""):(zt===void 0&&(zt=An()),zt&&typeof jt=="string"&&(jt=ai("")));freeze&&freeze(En),fl=En},Uc=addToSet({},[...svg$1,...svgFilters,...svgDisallowed]),Vc=addToSet({},[...mathMl$1,...mathMlDisallowed]),Qu=function(En,Fn,qn){return Fn.namespaceURI===Ss?En==="svg":Fn.namespaceURI===ys?En==="svg"&&(qn==="annotation-xml"||So[qn]):!!Uc[En]},ed=function(En,Fn,qn){return Fn.namespaceURI===Ss?En==="math":Fn.namespaceURI===Co?En==="math"&&oo[qn]:!!Vc[En]},td=function(En,Fn,qn){return Fn.namespaceURI===Co&&!oo[qn]||Fn.namespaceURI===ys&&!So[qn]?!1:!Vc[En]&&(Go[En]||!Uc[En])},nd=function(En){let Fn=Ot(En);(!Fn||!Fn.tagName)&&(Fn={namespaceURI:lo,tagName:"template"});const qn=stringToLowerCase(En.tagName),ss=stringToLowerCase(Fn.tagName);return wo[En.namespaceURI]?En.namespaceURI===Co?Qu(qn,Fn,ss):En.namespaceURI===ys?ed(qn,Fn,ss):En.namespaceURI===Ss?td(qn,Fn,ss):!!(Vo==="application/xhtml+xml"&&wo[En.namespaceURI]):!1},el=function(En){arrayPush(ee.removed,{element:En});try{Ot(En).removeChild(En)}catch{if(_t(En),!Ot(En))throw typeErrorCreate("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},Hc=function(En,Fn,qn){try{bt(En,Fn)}catch{try{En.removeAttribute(qn)}catch{}}},Ll=function(En){Ml(En);const Fn=Mt(En);if(Fn){const ss=[];arrayForEach(Fn,as=>{arrayPush(ss,as)}),arrayForEach(ss,as=>{try{_t(as)}catch{}})}const qn=Nt(En);if(qn)for(let ss=qn.length-1;ss>=0;--ss){const as=qn[ss],ds=as&&as.name;typeof ds=="string"&&Hc(En,as,ds)}},dl=function(En,Fn,qn){if(!qn)try{qn=Fn.getAttributeNode(En)}catch{qn=null}arrayPush(ee.removed,{attribute:qn||null,from:Fn});try{qn?bt(Fn,qn):Fn.removeAttribute(En)}catch{try{Fn.removeAttribute(En)}catch{}}if(En==="is")if(cs||vs)try{el(Fn)}catch{}else try{Fn.setAttribute(En,"")}catch{}},ld=function(En){const Fn=Nt(En);if(Fn)for(let qn=Fn.length-1;qn>=0;--qn){const ss=Fn[qn],as=ss&&ss.name;typeof as!="string"||Rn[co(as)]||Hc(En,ss,as)}},Ml=function(En){const Fn=[En];for(;Fn.length>0;){const qn=Fn.pop();Vt(qn)===NODE_TYPE.element&&ld(qn);const as=Mt(qn);if(as)for(let ds=as.length-1;ds>=0;--ds)Fn.push(as[ds])}},jc=function(En,Fn){return jn?En==="patchsrc"?!0:En==="for"&&Fn!=="label"&&Fn!=="output":!1},cd=function(En){if(!jn)return;const Fn=[En];for(;Fn.length>0;){const qn=Fn.pop(),ss=Vt(qn);if(ss===NODE_TYPE.processingInstruction||ss===NODE_TYPE.comment&&regExpTest(COMMENT_MARKUP_PROBE,qn.data)){try{_t(qn)}catch{}continue}if(ss===NODE_TYPE.element){const ds=qn,Qs=co(Ht(qn));try{ds.hasAttribute&&ds.hasAttribute("patchsrc")&&ds.removeAttribute("patchsrc"),ds.hasAttribute&&ds.hasAttribute("for")&&jc("for",Qs)&&ds.removeAttribute("for")}catch{}}const as=Mt(qn);if(as)for(let ds=as.length-1;ds>=0;--ds)Fn.push(as[ds])}},zc=function(En){let Fn=null,qn=null;if(ls)En="<remove></remove>"+En;else{const ds=stringMatch(En,/^[\r\n\t ]+/);qn=ds&&ds[0]}Vo==="application/xhtml+xml"&&lo===Ss&&(En='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+En+"</body></html>");const ss=zt?ai(En):En;if(lo===Ss)try{Fn=new pt().parseFromString(ss,Vo)}catch{}if(!Fn||!Fn.documentElement){Fn=Xt.createDocument(lo,"template",null);try{Fn.documentElement.innerHTML=Ao?jt:ss}catch{}}const as=Fn.body||Fn.documentElement;return En&&qn&&as.insertBefore(te.createTextNode(qn),as.childNodes[0]||null),lo===Ss?ti.call(Fn,zn?"html":"body")[0]:zn?Fn.documentElement:as},Wc=function(En){const Fn=Ut?Ut(En):En.ownerDocument;return Zt.call(Fn||En,En,ht.SHOW_ELEMENT|ht.SHOW_COMMENT|ht.SHOW_TEXT|ht.SHOW_PROCESSING_INSTRUCTION|ht.SHOW_CDATA_SECTION,null)},kl=function(En){return En=stringReplace(En,wn," "),En=stringReplace(En,ni," "),En=stringReplace(En,Cn," "),En},ec=function(En){var Fn;En.normalize();const qn=Ut?Ut(En):En.ownerDocument,ss=Zt.call(qn||En,En,ht.SHOW_TEXT|ht.SHOW_COMMENT|ht.SHOW_CDATA_SECTION|ht.SHOW_PROCESSING_INSTRUCTION,null);let as=ss.nextNode();for(;as;)as.data=kl(as.data),as=ss.nextNode();const ds=(Fn=En.querySelectorAll)===null||Fn===void 0?void 0:Fn.call(En,"template");ds&&arrayForEach(ds,Qs=>{pl(Qs.content)&&ec(Qs.content)})},Nl=function(En){const Fn=Bt?Bt(En):null;return typeof Fn!="string"||co(Fn)!=="form"?!1:typeof En.nodeName!="string"||typeof En.textContent!="string"||typeof En.removeChild!="function"||En.attributes!==Nt(En)||typeof En.removeAttribute!="function"||typeof En.removeAttributeNode!="function"||typeof En.getAttributeNode!="function"||typeof En.setAttribute!="function"||typeof En.namespaceURI!="string"||typeof En.insertBefore!="function"||typeof En.hasChildNodes!="function"||En.nodeType!==Gt(En)||En.childNodes!==Mt(En)},pl=function(En){if(!Gt||typeof En!="object"||En===null)return!1;try{return Gt(En)===NODE_TYPE.documentFragment}catch{return!1}},Sl=function(En){if(!Gt||typeof En!="object"||En===null)return!1;try{return typeof Gt(En)=="number"}catch{return!1}};function Ho(Qn,En,Fn){Qn.length!==0&&arrayForEach(Qn,qn=>
111{qn.call(ee,En,Fn,fl)})}const ud=function(En,Fn){return!!(jn&&En.hasChildNodes()&&!Sl(En.firstElementChild)&&regExpTest(ELEMENT_MARKUP_PROBE,En.textContent)&&regExpTest(ELEMENT_MARKUP_PROBE,En.innerHTML)||jn&&En.namespaceURI===Ss&&LITERAL_TEXT_ELEMENTS[Fn]&&(Sl(En.firstElementChild)||typeof En.textContent=="string"&&regExpTest(LITERAL_TEXT_CLOSE[Fn],En.textContent))||En.nodeType===NODE_TYPE.processingInstruction||jn&&En.nodeType===NODE_TYPE.comment&&regExpTest(COMMENT_MARKUP_PROBE,En.data))},Gl=function(En,Fn){if(En instanceof RegExp)return regExpTest(En,Fn);if(En instanceof Function){for(var qn=arguments.length,ss=new Array(qn>2?qn-2:0),as=2;as<qn;as++)ss[as-2]=arguments[as];return!!En(Fn,...ss)}return!1},dd=function(En,Fn,qn){if(!Wn[Fn]&&Zc(Fn)&&Gl(Vn.tagNameCheck,Fn))return!1;if(Zs&&!ps[Fn]){const ss=Ot(En),as=Mt(En);if(as&&ss){const ds=as.length;for(let Qs=ds-1;Qs>=0;--Qs){const so=En===qn?vt(as[Qs],!0):as[Qs];ss.insertBefore(so,xt(En))}}}return el(En),!0},qc=function(En,Fn,qn,ss){return En.length===0?Fn:Fn===qn||Fn===ss?clone(Fn):Fn},Kc=function(En,Fn){return En===Fn||Ot(En)!==null?!1:(ao&&Ml(En),!0)},Yc=function(En,Fn){if(Ho(ii.beforeSanitizeElements,En,null),Kc(En,Fn))return!0;if(Nl(En))return el(En),!0;const qn=co(Ht(En));if(Sn=qc(ii.uponSanitizeElement,Sn,On,rs),Ho(ii.uponSanitizeElement,En,{tagName:qn,allowedTags:Sn}),Kc(En,Fn))return!0;if(ud(En,qn))return el(En),!0;if(Wn[qn]||!(Hn.tagCheck instanceof Function&&Hn.tagCheck(qn))&&!Sn[qn]){const as=dd(En,qn,Fn);return as===!1&&Ho(ii.afterSanitizeElements,En,null),as}if(Vt(En)===NODE_TYPE.element&&!nd(En)||(qn==="noscript"||qn==="noembed"||qn==="noframes")&&regExpTest(FALLBACK_TAG_CLOSE,En.innerHTML))return el(En),!0;if($n&&En.nodeType===NODE_TYPE.text){const as=kl(En.textContent);En.textContent!==as&&(arrayPush(ee.removed,{element:En.cloneNode()}),En.textContent=as)}return Ho(ii.afterSanitizeElements,En,null),!1},Xc=function(En,Fn,qn){if(Gn[Fn]||jc(Fn,En)||fs&&(Fn==="id"||Fn==="name")&&(qn in te||qn in Ju))return!1;const ss=Rn[Fn]||Hn.attributeCheck instanceof Function&&Hn.attributeCheck(Fn,En);return er&&regExpTest(Ln,Fn)||kn&&regExpTest(Un,Fn)?!0:ss?qo[Fn]||regExpTest(ri,stringReplace(qn,Mn,""))||(Fn==="src"||Fn==="xlink:href"||Fn==="href")&&En!=="script"&&stringIndexOf(qn,"data:")===0&&bs[En]||Tn&&!regExpTest(Pn,stringReplace(qn,Mn,""))?!0:!qn:Zc(En)&&Gl(Vn.tagNameCheck,En)&&Gl(Vn.attributeNameCheck,Fn,En)||Fn==="is"&&Vn.allowCustomizedBuiltInElements&&Gl(Vn.tagNameCheck,qn)},hd=addToSet({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),Zc=function(En){return!hd[stringToLowerCase(En)]&&regExpTest(Yt,En)},fd=function(En,Fn,qn,ss){if(zt&&typeof mt=="object"&&typeof mt.getAttributeType=="function"&&!qn)switch(mt.getAttributeType(En,Fn)){case"TrustedHTML":return ai(ss);case"TrustedScriptURL":return xn(ss)}return ss},pd=function(En,Fn,qn,ss){try{return qn?En.setAttributeNS(qn,Fn,ss):En.setAttribute(Fn,ss),Nl(En)?(el(En),!1):!0}catch{return dl(Fn,En),!1}},Jc=function(En){Ho(ii.beforeSanitizeAttributes,En,null);const Fn=En.attributes;if(!Fn||Nl(En))return;Rn=qc(ii.uponSanitizeAttribute,Rn,Bn,os);const qn={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Rn,forceKeepAttr:void 0};let ss=Fn.length;const as=co(En.nodeName);for(;ss--;){const ds=Fn[ss],Qs=ds.name,so=ds.namespaceURI,Oo=ds.value,ko=co(Qs),ic=Oo;let Mo=Qs==="value"?ic:stringTrim(ic),Qc=!1;if(qn.attrName=ko,qn.attrValue=Mo,qn.keepAttr=!0,qn.forceKeepAttr=void 0,Ho(ii.uponSanitizeAttribute,En,qn),Mo=qn.attrValue,_s&&(ko==="id"||ko==="name")&&stringIndexOf(Mo,ms)!==0&&(dl(Qs,En,ds),Mo=ms+Mo,Qc=!0),jn&&regExpTest(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,Mo)){dl(Qs,En,ds);continue}if(ko==="attributename"&&stringMatch(Mo,"href")){dl(Qs,En,ds);continue}if(!qn.forceKeepAttr){if(!qn.keepAttr){dl(Qs,En,ds);continue}if(!Dn&&regExpTest(SELF_CLOSING_TAG,Mo)){dl(Qs,En,ds);continue}if($n&&(Mo=kl(Mo)),!Xc(as,ko,Mo)){dl(Qs,En,ds);continue}Mo=fd(as,ko,so,Mo),Mo!==ic&&pd(En,Qs,so,Mo)&&Qc&&arrayPop(ee.removed)}}Ho(ii.afterSanitizeAttributes,En,null)},Fl=function(En){let Fn=null;const qn=Wc(En);for(Ho(ii.beforeSanitizeShadowDOM,En,null);Fn=qn.nextNode();)if(Ho(ii.uponSanitizeShadowNode,Fn,null),Yc(Fn,En),Jc(Fn),pl(Fn.content)&&Fl(Fn.content),Vt(Fn)===NODE_TYPE.element){const ss=kt(Fn);pl(ss)&&(tc(ss),Fl(ss))}Ho(ii.afterSanitizeShadowDOM,En,null)},tc=function(En){const Fn=[{node:En,shadow:null}];for(;Fn.length>0;){const qn=Fn.pop();if(qn.shadow){Fl(qn.shadow);continue}const ss=qn.node,ds=Vt(ss)===NODE_TYPE.element,Qs=Mt(ss);if(Qs)for(let so=Qs.length-1;so>=0;--so)Fn.push({node:Qs[so],shadow:null});if(ds){const so=Bt?Bt(ss):null;if(typeof so=="string"&&co(so)==="template"){const Oo=ss.content;pl(Oo)&&Fn.push({node:Oo,shadow:null})}}if(ds){const so=kt(ss);pl(so)&&Fn.push({node:null,shadow:so},{node:so,shadow:null})}}};return ee.sanitize=function(Qn){let En=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Fn=null,qn=null,ss=null,as=null;if(Ao=!Qn,Ao&&(Qn="<!-->"),typeof Qn!="string"&&!Sl(Qn)&&(Qn=stringifyValue(Qn),typeof Qn!="string"))throw typeErrorCreate("dirty is not a string, aborting");if(!ee.isSupported)return Qn;Jn?(Sn=rs,Rn=os):Jl(En),(ii.uponSanitizeElement.length>0||ii.uponSanitizeAttribute.length>0)&&(Sn=clone(Sn)),ii.uponSanitizeAttribute.length>0&&(Rn=clone(Rn)),ee.removed=[];const ds=ao&&typeof Qn!="string"&&Sl(Qn);if(ds){cd(Qn);const Oo=Ht(Qn);if(typeof Oo=="string"){const ko=co(Oo);if(!Sn[ko]||Wn[ko])throw Ll(Qn),typeErrorCreate("root node is forbidden and cannot be sanitized in-place")}if(Nl(Qn))throw Ll(Qn),typeErrorCreate("root node is clobbered and cannot be sanitized in-place");try{tc(Qn)}catch(ko){throw Ll(Qn),ko}}else if(Sl(Qn))Fn=zc("<!---->"),qn=Fn.ownerDocument.importNode(Qn,!0),qn.nodeType===NODE_TYPE.element&&qn.nodeName==="BODY"||qn.nodeName==="HTML"?Fn=qn:Fn.appendChild(qn),tc(Fn);else{if(!cs&&!$n&&!zn&&Qn.indexOf("<")===-1)return zt&&hs?ai(Qn):Qn;if(Fn=zc(Qn),!Fn)return cs?null:hs?jt:""}Fn&&ls&&el(Fn.firstChild);const Qs=ds?Qn:Fn;try{const Oo=Wc(Qs);for(;ss=Oo.nextNode();)Yc(ss,Qs),Jc(ss),pl(ss.content)&&Fl(ss.content)}catch(Oo){throw ds&&(Ll(Qn),arrayForEach(ee.removed,ko=>{ko.element&&Ml(ko.element)})),Oo}if(ds)return arrayForEach(ee.removed,Oo=>{Oo.element&&Ml(Oo.element)}),$n&&ec(Qn),Qn;if(cs){if($n&&ec(Fn),vs)for(as=Kt.call(Fn.ownerDocument);Fn.firstChild;)as.appendChild(Fn.firstChild);else as=Fn;return(Rn.shadowroot||Rn.shadowrootmode)&&(as=qt.call(st,as,!0)),as}let so=zn?Fn.outerHTML:Fn.innerHTML;return zn&&Sn["!doctype"]&&Fn.ownerDocument&&Fn.ownerDocument.doctype&&Fn.ownerDocument.doctype.name&&regExpTest(DOCTYPE_NAME,Fn.ownerDocument.doctype.name)&&(so="<!DOCTYPE "+Fn.ownerDocument.doctype.name+`>
112`+so),$n&&(so=kl(so)),zt&&hs?ai(so):so},ee.setConfig=function(){let Qn=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Jl(Qn),Jn=!0,rs=Sn,os=Rn},ee.clearConfig=function(){fl=null,Jn=!1,rs=null,os=null,zt=Wt,jt=""},ee.isValidAttribute=function(Qn,En,Fn){fl||Jl({});const qn=co(Qn),ss=co(En);return Xc(qn,ss,Fn)},ee.addHook=function(Qn,En){typeof En=="function"&&objectHasOwnProperty(ii,Qn)&&arrayPush(ii[Qn],En)},ee.removeHook=function(Qn,En){if(objectHasOwnProperty(ii,Qn)){if(En!==void 0){const Fn=arrayLastIndexOf(ii[Qn],En);return Fn===-1?void 0:arraySplice(ii[Qn],Fn,1)[0]}return arrayPop(ii[Qn])}},ee.removeHooks=function(Qn){objectHasOwnProperty(ii,Qn)&&(ii[Qn]=[])},ee.removeAllHooks=function(){ii=_createHooksMap()},ee}var purify=createDOMPurify();const purify_es=Object.freeze(Object.defineProperty({__proto__:null,default:purify},Symbol.toStringTag,{value:"Module"})),DEFAULT_CONFIG={ALLOWED_TAGS:["b","strong","i","em","u","s","br","p","ul","ol","li","a","span","small","sup","sub"],ALLOWED_ATTR:["href","title","target","rel"],FORCE_BODY:!0,ALLOW_DATA_ATTR:!1,RETURN_DOM:!1,RETURN_DOM_FRAGMENT:!1},STRICT_CONFIG={ALLOWED_TAGS:[],ALLOWED_ATTR:[],KEEP_CONTENT:!0,FORCE_BODY:!0,ALLOW_DATA_ATTR:!1,RETURN_DOM:!1,RETURN_DOM_FRAGMENT:!1};function sanitizeHtml(ne,ee={}){if(typeof ne!="string")return ne;const{strict:te=!1,config:st={},purify:ot=purify}=ee,ut={...te?STRICT_CONFIG:DEFAULT_CONFIG,...st};return ot.sanitize(ne,ut)}purify.addHook("afterSanitizeAttributes",ne=>{if(ne.tagName==="A"){const ee=ne.getAttribute("href")||"";/^\s*(javascript|data|vbscript):/i.test(ee)&&ne.removeAttribute("href"),ee.startsWith("http")&&(ne.setAttribute("target","_blank"),ne.setAttribute("rel","noopener noreferrer"))}});var LayerSwitcherDOM={_createDraggableElement:function(ne,ee){let te=[".GPtitle"];checkDsfr()&&te.push(".GPlayerDragNDrop"),ee._sortables=[],te.forEach(st=>{const ot=Sortable.create(ne,{handle:st,dataIdAttr:"data-sortable-id",draggable:".draggable-layer",ghostClass:"GPghostLayer",animation:200,onEnd:function(ct){ee._onEndDragAndDropLayerClick(ct)}});ee._sortables.push(ot)})},_moveElement:function(ne,ee){const te=this._sortables[0];if(["up","down"].includes(ee)==!1||typeof ne.dataset.sortableId>"u")return!1;let st=ne.dataset.sortableId,ot=te.toArray(),ct=ot.indexOf(st);return ot.splice(ct,1),ee=="down"?ot.splice(ct+1,0,st):ee=="up"&&ot.splice(ct-1,0,st),te.sort(ot,!0),this._onEndDragAndDropLayerClick({newIndex:ot.indexOf(st)}),!0},_onMoveElement:function(ne,ee){if(["Enter","Space"].includes(ee.code)){const te=ne?"up":"down",st=ne?"down":"up";ee.stopPropagation(),ee.preventDefault(),this._moveElement(ee.currentTarget.closest(".draggable-layer"),te),window.getComputedStyle(ee.currentTarget).visibility=="hidden"?ee.currentTarget.parentNode.querySelector(`[data-direction=${st}
112]`).focus():ee.currentTarget.focus()}},_addUID:function(ne){var ee=this._uid?ne+"-"+this._uid:ne;return ee},_createMainContainerElement:function(){var ne=document.createElement("div");return ne.id=this._addUID("GPlayerSwitcher"),ne.className="GPwidget gpf-widget gpf-mobile-fullscreen gpf-widget-button",ne},_createMainLayersShowElement:function(){var ne=document.createElement("input");return ne.id=this._addUID("GPshowLayersList"),ne.type="checkbox",ne},_createMainLayersElement:function(){var ne=document.createElement("dialog");return ne.id=this._addUID("GPlayersList"),ne.className="GPpanel gpf-panel fr-modal",ne},_createMainLayersDivElement:function(){var ne=document.createElement("div");return ne.className="GPpanelBody gpf-panel__body_ls fr-modal__body",ne},_createMainLayerListElement:function(){var ne=document.createElement("div");return ne.className="GPLayerListBody",ne.setAttribute("role","list"),ne},_createMainPictoElement:function(){var ne=this,ee=document.createElement("button"),te=document.createElement("span");return ee.appendChild(te),ee.id=this._addUID("GPshowLayersListPicto"),ee.classList.add("GPshowOpen","GPshowAdvancedToolPicto","GPshowLayersListPicto"),ee.classList.add("gpf-btn","gpf-btn--tertiary","gpf-btn-icon","gpf-btn-icon-layerswitcher"),ee.classList.add("fr-btn","fr-btn--tertiary"),ee.htmlFor=this._addUID("GPshowLayersList"),ee.setAttribute("aria-label","Ma sélection de cartes"),ee.setAttribute("tabindex","0"),ee.setAttribute("aria-pressed",!1),ee.setAttribute("type","button"),ee.addEventListener?ee.addEventListener("click",function(st){var ot=st.target.ariaPressed==="true";st.target.setAttribute("aria-pressed",!ot),document.getElementById(ne._addUID("GPshowLayersList")).checked=ot,document.getElementById(ne._addUID("GPshowLayersList")).checked&&(document.getElementById(ne._addUID("GPlayerInfoPanel")).classList.remove("GPlayerInfoPanelOpened","gpf-visible"),document.getElementById(ne._addUID("GPlayerInfoPanel")).classList.add("GPlayerInfoPanelClosed","gpf-hidden"),document.getElementById(ne._addUID("GPlayerStylePanel")).classList.add("GPlayerStylePanelClosed","gpf-hidden"),document.getElementById(ne._addUID("GPlayerStylePanel")).classList.remove("GPlayerStylePanelOpened","gpf-visible")),ne.onShowLayerSwitcherClick(st)}):ee.attachEvent&&ee.attachEvent("onclick",function(st){var ot=st.target.ariaPressed==="true";st.target.setAttribute("aria-pressed",!ot),document.getElementById(ne._addUID("GPshowLayersList")).checked&&(document.getElementById(ne._addUID("GPlayerInfoPanel")).classList.remove("GPlayerInfoPanelOpened","gpf-visible"),document.getElementById(ne._addUID("GPlayerInfoPanel")).classList.add("GPlayerInfoPanelClosed","gpf-hidden"),document.getElementById(ne._addUID("GPlayerStylePanel")).classList.add("GPlayerStylePanelClosed","gpf-hidden"),document.getElementById(ne._addUID("GPlayerStylePanel")).classList.remove("GPlayerStylePanelOpened","gpf-visible")),ne.onShowLayerSwitcherClick(st)}),ee},_createMainCounterLayersElement:function(){var ne=document.createElement("span");return ne.id=this._addUID("GPlayerCounter"),ne.className="GPlayerCounter",ne.innerHTML="0",ne},_createMainInfoElement:function(){var ne=document.createElement("dialog");return ne.id=this._addUID("GPlayerInfoPanel"),ne.className="GPpanel GPlayerInfoPanelClosed gpf-panel fr-modal",ne},_createMainInfoDivElement:function(){var ne=document.createElement("div");return ne.className="gpf-panel__body fr-modal__body",ne},_createMainStyleElement:function(){var ne=document.createElement("dialog");return ne.id=this._addUID("GPlayerStylePanel"),ne.className="GPpanel GPlayerStylePanelClosed gpf-panel fr-modal",ne},_createMainStyleDivElement:function(){var ne=document.createElement("div");return ne.className="gpf-panel__body fr-modal__body",ne},_createHeaderButtonsDivElement:function(){var ne=document.createElement("div");return ne.className="GPbodyHeader",ne.id=this._addUID("GPbodyHeader"),ne},_createButtonsGroupElement:function(ne){ne=ne||{};
112let ee=ne.className?ne.className:"",te=ne.left?"left":"right",st="";switch(ne.size=ne.size?ne.size:"",ne.size.toLowerCase()){case"sm":st="fr-btns-group--sm";break;case"lg":st="fr-btns-group--lg";break}var ot=document.createElement("div");ot.className=`${ee} GPbtnsGroup GPbtnsGroup--${te} fr-btns-group fr-btns-group--${te} fr-btns-group--inline-reverse fr-btns-group--inline ${st} fr-btns-group--icon-left`;let ct=ne.id!==null?`${ee}_ID_${ne.id}`:ee;return ot.id=this._addUID(ct),ot},_createButtonHeaderElement:function(ne){let ee=document.createElement("button");if(ee.className="fr-btn fr-btn--tertiary gpf-btn ",ne.className&&(ee.className+=ne.className),ne.icon&&(ee.className+=ne.icon),ne.label&&(ee.innerHTML=ne.label),ne.title&&(ee.title=ne.title,ee.ariaLabel=ne.title),ee.id=ne.id?ne.id:this._addUID("GPtools-"+ne.label.toLowerCase()),ne.attributes)for(const st in ne.attributes){if(!Object.hasOwn(ne.attributes,st))continue;const ot=ne.attributes[st];ee.setAttribute(st,ot)}let te=this;return ee.addEventListener("click",st=>{te._onClickHeaderButtons(st,ne.label,ne.cb)}),ee},_createContainerLayerElement:function(ne,ee){var te=document.createElement("div");return te.id=this._addUID("GPlayerSwitcher_ID_"+ne.id),te.className="GPlayerSwitcher_layer draggable-layer",te.ondragstart=st=>{if(st.target.draggable===!1)return st.preventDefault(),st.stopImmediatePropagation(),st.stopPropagation(),!1},te.appendChild(this._createBasicToolElement(ne,ee)),te.appendChild(this._createAdvancedToolDivElement(ne)),te.setAttribute("tabindex",0),te.setAttribute("role","listitem"),["click","keydown"].forEach(st=>{te.addEventListener(st,ot=>{this._onSelectLayer(ot)})}),te},_createBasicToolElement:function(ne,ee){var te=document.createElement("div");return te.id=this._addUID("GPbasicTools_ID_"+ne.id),te.className="GPlayerBasicTools",te.appendChild(this._createBasicToolButtons(ne)),te.appendChild(this._createBasicToolTitleElement(ne,ee)),ne.draggable&&te.appendChild(this._createDragNDropElement(ne)),te},_createBasicToolButtons:function(ne){let ee=document.createElement("div");return ee.id=this._addUID("GPbasicToolButtons_ID_"+ne.id),ee.className="GPbasicToolButtons",ee.appendChild(this._createAdvancedToolShowElement(ne)),ee.appendChild(this._createVisibilityElement(ne)),ne.deletable&&ee.appendChild(this._createDeleteElement(ne.id)),ee},_createBasicToolTitleElement:function(ne,ee){let te=document.createElement("div");return te.id=this._addUID("GPtitle_ID_"+ne.id),te.className="GPtitle",te.appendChild(this._createLayerThumbnailElement(ne)),te.appendChild(this._createLayerNameDivElement(ne,ee)),te},_createLayerNameDivElement:function(ne,ee){let te=document.createElement("div");return te.id=this._addUID("GPlayerTitle_ID_"+ne.id),te.className="GPlayerTitle",te.appendChild(this._createLayerNameElement(ne,ee)),te.appendChild(this._createLayerProducerElement(ne,ee)),te},_createLayerThumbnailElement:function(ne){let ee=document.createElement("img");return ee.id=this._addUID("GPtitleImage_ID_"+ne.id),ee.className="GPtitleImage GPtitleDefaultImage",ee.alt="",ne.thumbnail&&typeof ne.thumbnail=="string"&&ne.thumbnail!=="default"&&(ee.classList.remove("GPtitleDefaultImage"),ee.src=ne.thumbnail),ee},_createLayerNameElement:function(ne,ee){var te=document.createElement("div");return te.id=this._addUID("GPname_ID_"+ne.id),te.className="GPlayerName",te.title=ne.title||ne.description,ee&&(te.dataset.tooltip=sanitizeHtml(ne.title||ne.description),ToolTips.active(te),te.removeAttribute("title")),te.innerHTML=ne.title,ne.layer.config&&ne.layer.config.serviceParams.id==="GPP:TMS"&&(te.innerHTML=sanitizeHtml(ne.title||ne.description)),te},_createLayerProducerElement:function(ne,ee){let te=document.createElement("div");return te.id=this._addUID("GPlayerProducer_ID_"+ne.id),te.className="GPlayerProducer",te.innerHTML=ne.producer,ee&&(te.dataset.tooltip=sanitizeHtml(ne.producer)),te},_createDragNDropElement:function(ne){let ee=document.createElement("div");ee.id=this._addUID("GPdragndropPicto_ID_"+ne.id),ee.className="GPelementHidden GPlayerDragNDrop gpf-btn gpf-btn-icon-ls-draggable gpf-btn--tertiary",ee.title="Deplacer la couche";let te=this,st=document.createElement("div");st.className="keyboard-navigation";let ot=document.createElement("span");ot.tabIndex=0,ot.dataset.direction="up",ot.title=ot.ariaLabel="Déplacer la couche vers le haut",ot.className="fr-icon-arrow-up-line fr-icon--sm",ot.onkeydown=this._onMoveElement.bind(this,!0);let ct=document.createElement("span");return ct.tabIndex=0,ct.dataset.direction="down",ct.title=ct.ariaLabel="Déplacer la couche vers le bas",ct.className="fr-icon-arrow-down-line fr-icon--sm",ct.onkeydown=this._onMoveElement.bind(this,!1),st.appendChild(ct),st.appendChild(ot),ee.appendChild(st),ee.addEventListener?ee.addEventListener("click",function(ut){te._onStartDragAndDropLayerClick(ut)}):ee.attachEvent&&ee.attachEvent("onclick",function(ut){te._onStartDragAndDropLayerClick(ut)}),ee},_createVisibilityElement:function(ne){var ee=typeof ne.visibility<"u"?ne.visibility:!0;let te=document.createElement("button");te.id=this._addUID("GPvisibilityPicto_ID_"+ne.id);let st="gpf-btn-icon-ls-visibility gpf-btn-icon";checkDsfr()&&(st=ee?"fr-icon-eye-line":"fr-icon-eye-off-line"),te.className=`GPlayerVisibility gpf-btn ${st} fr-btn fr-btn--sm gpf-btn--tertiary fr-btn--tertiary-no-outline`,te.title="Afficher/masquer la couche",te.setAttribute("tabindex","0"),te.setAttribute("aria-pressed",ee),te.setAttribute("type","button");var ot=this;let ct=function(ut){var dt=ut.target.ariaPressed==="true";ut.target.setAttribute("aria-pressed",!dt),checkDsfr()&&(te.classList.toggle("fr-icon-eye-off-line",dt),te.classList.toggle("fr-icon-eye-line",!dt)),ot._onVisibilityLayerClick(ut)};return te.addEventListener?te.addEventListener("click",ct):te.attachEvent&&te.attachEvent("onclick",ct),te},_createAdvancedToolShowElement:function(ne){let ee=document.createElement("button");ee.id=this._addUID("GPshowAdvancedTools_ID_"+ne.id),ee.className="GPshowAdvancedToolPicto GPshowMoreOptionsImage GPshowMoreOptions GPshowLayerAdvancedTools gpf-btn fr-icon-arrow-down-s-line fr-btn--sm fr-btn--tertiary-no-outline",ee.title="Plus d'outils",ee.setAttribute("tabindex","0"),ee.setAttribute("aria-pressed",!1),ee.setAttribute("type","button");let te=this;const st=ot=>{let ct=ot.target.ariaPressed==="true";ot.target.setAttribute("aria-pressed",!ct);let ut=document.getElementById(te._addUID("GPadvancedTools_ID_"+ne.id));ct?(ut.classList.replace("GPelementVisible","GPelementHidden"),ut.classList.replace("gpf-visible","gpf-hidden")):(ut.classList.replace("GPelementHidden","GPelementVisible"),ut.classList.replace("gpf-hidden","gpf-visible"))};
112return ee.addEventListener?ee.addEventListener("click",st):ee.attachEvent&&ee.attachEvent("onclick",st),ee},_createAdvancedToolDivElement:function(ne){let ee=document.createElement("div");ee.id=this._addUID("GPadvancedTools_ID_"+ne.id),ee.className="GPelementHidden GPlayerAdvancedTools gpf-hidden";let te=document.createElement("div");te.id=this._addUID("GPopacityContainer_ID_"+ne.id),te.className="GPopacityContainer";let st=this._createOpacityElement(ne.id,ne.opacity);for(let ct=0;ct<st.length;ct++)te.appendChild(st[ct]);ee.appendChild(te);let ot=this._createButtonsGroupElement({className:"GPAdvancedToolBtnsGroup",id:ne.id,left:!0,size:"sm"});if(ne.advancedTools&&ne.advancedTools instanceof Array){const ct=this.constructor.switcherButtons;if(!ne.advancedTools.length)return;ne.advancedTools.forEach(ut=>{const dt=ut.key;if(dt&&Object.values(ct).includes(dt)){let ht;switch(dt){case ct.INFO:ht=this._createInformationElement;break;case ct.EDIT:ht=this._createEditionElement;break;case ct.GREYSCALE:ht=this._createGreyscaleElement;break;case ct.EXTENT:ht=this._createExtentElement;break}typeof ht=="function"&&ot.appendChild(ht.call(this,ne,ut))}else ut&&ot.appendChild(this._createAdvancedToolElement(ne,ut))}),ee.appendChild(ot)}else checkDsfr()?(ot.appendChild(this._createInformationElement(ne,{})),ot.appendChild(this._createEditionElement(ne,{})),ot.appendChild(this._createGreyscaleElement(ne,{})),ot.appendChild(this._createExtentElement(ne,{}))):(ot.appendChild(this._createInformationElement(ne,{})),ot.appendChild(this._createGreyscaleElement(ne,{}))),ee.appendChild(ot);return ee},_setAdvancedToolOptions:function(ne,ee,te=!0){if(!ne)return;let st;ee.label?st=ee.label.toLowerCase().replaceAll(" ","-"):st=ee.icon;const ot=`gpf-btn-icon-ls-tools-${st}`;if(ee.className&&(ne.className+=` ${ee.className} `),ee.icon&&this._setButtonIconStyle(ne,ot,ee.icon),ee.label&&(ne.innerHTML=ee.label),ee.title&&(ne.title=ee.title,ne.ariaLabel=ee.title),ee.attributes)for(const ut in ee.attributes){if(!Object.hasOwn(ee.attributes,ut))continue;const dt=ee.attributes[ut];ne.setAttribute(ut,dt)}ne.setAttribute("tabindex","0"),ne.setAttribute("type","button");let ct=this;return te&&ne.addEventListener("click",ut=>{ct._onClickAdvancedToolsMore(ut,ee.label,ee.cb)}),ne},_setButtonIconStyle:function(ne,ee,te){let st=!1;const ot=/(\.|\\)/;if(te&&(te.startsWith("<svg")?(te="data:image/svg+xml;base64,"+btoa(te),st=!0):ot.test(te)?st=!0:ne.className+=te),st&&(ne.classList.add(ee),!document.querySelector(`style[data-injected="${ee.toLowerCase()}"]`))){const ct=document.createElement("style");ct.dataset.injected=ee.toLowerCase(),ct.textContent=`
113                    .${ee.toLowerCase()}::before {
114                        width: 100%;
115                        height: 100%;
116                        -webkit-mask-image: url('${te}');
117                        -webkit-mask-repeat: no-repeat;
118                        -webkit-mask-position: center;
119
120                        mask-image: url('${te}');
121                        mask-repeat: no-repeat;
122                        mask-position: center;
123                    }
124                `,document.head.appendChild(ct)}},_createDeleteElement:function(ne){let ee=document.createElement("button");ee.id=this._addUID("GPremove_ID_"+ne);let te="gpf-btn-icon-ls-remove gpf-btn-icon";checkDsfr()&&(te="fr-icon-delete-line"),ee.className=`GPlayerRemove gpf-btn ${te} fr-btn fr-btn--sm gpf-btn--tertiary fr-btn--tertiary-no-outline`,ee.title="Supprimer la couche",ee.layerId=ne,ee.setAttribute("tabindex","0"),ee.setAttribute("type","button");var st=this;return ee.addEventListener?ee.addEventListener("click",function(ot){st._onDropLayerClick(ot)}):ee.attachEvent&&ee.attachEvent("onclick",function(ot){st._onDropLayerClick(ot)}),ee},_createEditionElement:function(ne,ee){let te=ne.id,st=ne.editable,ot=ne.layer.config&&ne.layer.config.serviceParams.id==="GPP:TMS",ct=ot?ne.layer.config.styles:null,ut=document.createElement("button");ut.id=this._addUID("GPedit_ID_"+te),ut.layerId=te;let dt="gpf-btn-icon-ls-edit gpf-btn-icon",ht;checkDsfr()&&(dt="fr-icon-pencil-line",ot?ht="Style":ht="Éditer");let ft="GPlayerEdit gpf-btn gpf-btn--tertiary fr-btn fr-btn--tertiary-no-outline";const pt={icon:dt,label:ht},mt=Helper.assign(pt,ee);mt.className=ft,ee&&ee.className&&(mt.className+=` ${ee.className}`),this._setAdvancedToolOptions(ut,mt,!1),(!st||ot&&ct.length===1)&&(ut.disabled=!0);let yt=this;return ot&&ct.length>1?ut.addEventListener?ut.addEventListener("click",function(vt){yt._onEditLayerStyleClick(vt,ct)}):ut.attachEvent&&ut.attachEvent("onclick",function(vt){yt._onEditLayerStyleClick(vt,ct)}):ut.addEventListener?ut.addEventListener("click",function(vt){yt._onEditLayerClick(vt)}):ut.attachEvent&&ut.attachEvent("onclick",function(vt){yt._onEditLayerClick(vt)}),ut},_createInformationElement:function(ne,ee){let te=ne.id,st=ne.title,ot=ne.description,ct=document.createElement("button");
124ct.id=this._addUID("GPinfo_ID_"+te),ct.layerId=te;let ut="gpf-btn-icon-ls-info gpf-btn-icon",dt;checkDsfr()&&(ut="fr-icon-information-line",dt="Infos");let ht="GPlayerInfo GPlayerInfoClosed gpf-btn gpf-btn--tertiary fr-btn fr-btn--tertiary-no-outline";const ft={icon:ut,label:dt},pt=Helper.assign(ft,ee);pt.className=ht,ee&&ee.className&&(pt.className+=` ${ee.className}`),this._setAdvancedToolOptions(ct,pt,!1),(!st||!ot)&&(ct.disabled=!0);var mt=this;return ct.addEventListener?ct.addEventListener("click",function(yt){mt._onOpenLayerInfoClick(yt)}):ct.attachEvent&&ct.attachEvent("onclick",function(yt){mt._onOpenLayerInfoClick(yt)}),ct},_createGreyscaleElement:function(ne,ee){let te=ne.id,st=ne.grayable,ot=ne.grayscale;ee=ee||{};var ct=typeof ot<"u"?ot:!1;let ut=document.createElement("button");ut.id=this._addUID("GPgreyscale_ID_"+te),ut.layerId=te;let dt="gpf-btn-icon-ls-greyscale gpf-btn-icon",ht;checkDsfr()&&(dt="fr-icon-contrast-line",ht="Noir et blanc");let ft="GPlayerGreyscale GPlayerGreyscaleOff gpf-btn gpf-btn--tertiary fr-btn fr-btn--tertiary-no-outline";const pt={icon:dt,label:ht},mt=Helper.assign(pt,ee);mt.className=ft,ee&&ee.className&&(mt.className+=` ${ee.className}`),this._setAdvancedToolOptions(ut,mt,!1),ct&&ut.classList.replace("GPlayerGreyscaleOff","GPlayerGreyscaleOn"),ut.setAttribute("aria-pressed",ct),st||(ut.disabled=!0);var yt=this;return ut.addEventListener?ut.addEventListener("click",function(vt){var _t=vt.target.ariaPressed==="true";vt.target.setAttribute("aria-pressed",!_t),yt._onToggleLayerGreyscaleClick(vt)}):ut.attachEvent&&ut.attachEvent("onclick",function(vt){var _t=vt.target.ariaPressed==="true";vt.target.setAttribute("aria-pressed",!_t),yt._onToggleLayerGreyscaleClick(vt)}),ut},_createOpacityElement:function(ne,ee){var te=[],st=document.createElement("div");st.id=this._addUID("GPopacity_ID_"+ne),st.className="GPlayerOpacity fr-range fr-range--sm",st.dataset.frJsRange="true",st.title="Opacité";var ot=typeof ee<"u"?ee:1;ot=Math.round(ot*100),st.style.setProperty("--progress-right",ot+"%");var ct=document.createElement("input");ct.id=this._addUID("GPopacityValueDiv_ID_"+ne),ct.type="range",ct.value=ot,ct.ariaLabel="Opacité";var ut=this;ct.addEventListener?ct.addEventListener("change",function(ft){ut._onChangeLayerOpacity(ft)}):ct.attachEvent&&ct.attachEvent("onchange",function(ft){ut._onChangeLayerOpacity(ft)}),ct.addEventListener?ct.addEventListener("input",function(ft){ut._onChangeLayerOpacity(ft)}):ct.attachEvent&&ct.attachEvent("oninput",function(ft){ut._onChangeLayerOpacity(ft)}),st.appendChild(ct);var dt=document.createElement("div");dt.id=this._addUID("GPopacityValueDiv_ID_"+ne),dt.className="GPlayerOpacityValue";var ht=document.createElement("span");return ht.id=this._addUID("GPopacityValue_ID_"+ne),ht.className="gpf-range__output fr-range__output gpf-visible",ht.innerText=ot+"%",dt.appendChild(ht),te.push(st),te.push(dt),te},_createExtentElement:function(ne,ee){let te=ne.id,st=document.createElement("button");st.id=this._addUID("GPextent_ID_"+te),st.layerId=te,ee=ee||{};let ot="gpf-btn-icon-ls-extent gpf-btn-icon",ct;checkDsfr()&&(ot="fr-icon-zoom-in-line",ct="Centrer sur la couche");let ut="GPelementHidden GPlayerExtent gpf-btn--tertiary gpf-btn fr-btn fr-btn--tertiary-no-outline";const dt={icon:ot,label:ct},ht=Helper.assign(dt,ee);ht.className=ut,ee&&ee.className&&(ht.className+=` ${ee.className}`),this._setAdvancedToolOptions(st,ht,!1),st.setAttribute("aria-pressed",!0);var ft=this;return st.addEventListener?st.addEventListener("click",function(pt){var mt=pt.target.ariaPressed==="true";pt.target.setAttribute("aria-pressed",!mt),ft._onZoomToExtentClick(pt)}):st.attachEvent&&st.attachEvent("onclick",function(pt){var mt=pt.target.ariaPressed==="true";pt.target.setAttribute("aria-pressed",!mt),ft._onZoomToExtentClick(pt)}),st},_createAdvancedToolElement:function(ne,ee){let te=ne.id,st=document.createElement("button");const ot=ee.label.toLowerCase().replaceAll(" ","-");st.id=this._addUID("GPtools-"+ot+"_ID_"+te),st.layerId=te,ee=ee||{};let ct=ee.icon,ut;checkDsfr()&&(ut=ee.label);let dt="GPlayerTools gpf-btn gpf-btn--tertiary fr-btn fr-btn--tertiary-no-outline";const ht={icon:ct,label:ut},ft=Helper.assign(ht,ee);if(ft.className=dt,ee&&ee.className&&(ft.className+=` ${ee.className}`),this._setAdvancedToolOptions(st,ft,!1),Object.assign(st.style,ee.styles),ee.accepted&&ee.accepted.length){const mt=ne.layer,yt=mt.constructor.name;let vt=!0;for(const _t of ee.accepted)if(typeof _t=="string"&&_t===yt||_t.prototype instanceof BaseLayer&&mt instanceof _t){vt=!1;break}st.disabled=vt}var pt=this;return st.addEventListener?st.addEventListener("click",mt=>{pt._onClickAdvancedToolsMore(mt,ee.label,ee.cb)}):st.attachEvent&&st.attachEvent("onclick",mt=>{pt._onClickAdvancedToolsMore(mt,ee.label,ee.cb)}),st},_createContainerLayerInfoElement:function(ne){var ee=document.createElement("div");let te=this._createPanelHeaderElement({icon:"ign-layerswitcher",title:"Informations"});
124ee.appendChild(te),te._closeBtn.addEventListener("click",()=>{document.getElementById(this._addUID("GPlayerInfoPanel")).classList.add("GPlayerInfoPanelClosed","gpf-hidden"),document.getElementById(this._addUID("GPlayerInfoPanel")).classList.remove("GPlayerInfoPanelOpened","gpf-visible"),document.getElementById(ne.id).classList.add("GPlayerInfoClosed"),document.getElementById(ne.id).classList.remove("GPlayerInfoOpened")}),this.addEventListener("layerswitcher:remove",Vt=>{parseInt(ne.id.split("-")[0].split("GPinfo_ID_")[1])===Vt.layer.id&&(document.getElementById(this._addUID("GPlayerInfoPanel")).classList.add("GPlayerInfoPanelClosed","gpf-hidden"),document.getElementById(this._addUID("GPlayerInfoPanel")).classList.remove("GPlayerInfoPanelOpened","gpf-visible"))});var st=document.createElement("div");if(st.id=this._addUID("GPlayerInfoContent"),st.className="gpf-panel__content fr-modal__content",ee.appendChild(st),ne.quicklookUrl){var ot=document.createElement("div");ot.id=this._addUID("GPlayerInfoQuicklook"),ot.title="Afficher un aperçu de la couche";var ct=document.createElement("a");ct.href=ne.quicklookUrl,ct.appendChild(ot),st.appendChild(ct)}var ut=document.createElement("div");if(ut.id=this._addUID("GPlayerInfoDescription"),ut.innerHTML=ne.description,st.appendChild(ut),ne.metadata){var dt=document.createElement("div");dt.id=this._addUID("GPlayerInfoMetadata");var ht=document.createElement("div");ht.className="GPlayerInfoSubtitle",ht.innerHTML="Métadonnées",dt.appendChild(ht);for(var ft=0;ft<ne.metadata.length;ft++){var pt=ne.metadata[ft].url,mt=document.createElement("div");mt.className="GPlayerInfoLink";var yt=document.createElement("a");yt.href=pt,yt.innerHTML=pt,mt.appendChild(yt),dt.appendChild(mt)}ne.metadata.length!==0&&st.appendChild(dt)}if(ne.legends){var vt=document.createElement("div");vt.id=this._addUID("GPlayerInfoLegend");var _t=document.createElement("div");_t.className="GPlayerInfoSubtitle",_t.innerHTML="Légende",vt.appendChild(_t);for(var bt={},xt=ne.maxScaleDenominator||56e7,Mt=0;Mt<ne.legends.length;Mt++){var Ot=ne.legends[Mt].minScaleDenominator;if(Ot){var kt=Ot.toString();Ot=Math.round(parseInt(kt.substring(0,3),10)/10)*Math.pow(10,kt.length-2)}else Ot=270;bt[Ot]=ne.legends[Mt]}for(var Nt in bt)if(bt.hasOwnProperty(Nt)){var Gt=bt[Nt].url;if(typeof Gt=="string"&&Gt.toLowerCase().indexOf("nolegend.jpg")===-1){var Bt=document.createElement("div");Bt.className="GPlayerInfoLink",xt=bt[Nt].maxScaleDenominator||xt;var Ut=document.createElement("a");Ut.className="fr-link",Ut.href=Gt,Ut.target="_blank",Ut.innerHTML="Du 1/"+Nt+" au 1/"+xt,Bt.appendChild(Ut),vt.appendChild(Bt)}else delete bt[Nt]}Object.keys(bt).length!==0&&st.appendChild(vt)}return ee},_createContainerLayerStyleElement:function(ne){var ee=document.createElement("div");let te=this._createPanelHeaderElement({icon:"ign-layerswitcher",title:"Options de style"});ee.appendChild(te),te._closeBtn.addEventListener("click",()=>{document.getElementById(this._addUID("GPlayerStylePanel")).classList.add("GPlayerStylePanelClosed","gpf-hidden"),document.getElementById(this._addUID("GPlayerStylePanel")).classList.remove("GPlayerStylePanelOpened","gpf-visible"),document.getElementById(ne.div).classList.add("GPlayerStyleClosed"),document.getElementById(ne.div).classList.remove("GPlayerStyleOpened")}),this.addEventListener("layerswitcher:remove",mt=>{parseInt(ne.id.split("-")[0].split("GPinfo_ID_")[1])===mt.layer.id&&(document.getElementById(self._addUID("GPlayerStylePanel")).classList.add("GPlayerStylePanelClosed","gpf-hidden"),document.getElementById(self._addUID("GPlayerStylePanel")).classList.remove("GPlayerStylePanelOpened","gpf-visible"))});var st=document.createElement("div");st.id=this._addUID("GPlayerStyleContent"),st.className="gpf-panel__content fr-modal__content",ee.appendChild(st);var ot=document.createElement("div");ot.id=this._addUID("GPlayerStyleList");const ct=/^([0-9a-f]{8}(-[0-9a-f]{4}){3}-[0-9a-f]{12}_)/i;for(let mt=0;mt<ne.styles.length;mt++){var ut=ne.styles[mt],dt=ut.title?ut.title:ut.name;dt=dt.replace(ct,"");var ht=document.createElement("div");ht.className="gpf-flex gpf-radio-group fr-radio-group fr-my-1w";var ft=document.createElement("input");ft.type="radio",ft.name=this._addUID("styleradio_ID_"+ne.id),ft.id=this._addUID("styleradio_"+ut.name+"_ID_"+ne.id),ft.value=ut.url,ft.dataset.name=ut.name;var pt=document.createElement("label");pt.className="gpf-label fr-label",pt.innerText=dt,pt.htmlFor=this._addUID("styleradio_"+ut.name+"_ID_"+ne.id),ht.appendChild(ft),ht.appendChild(pt),ot.appendChild(ht),ne.layerInfo.layer.styleUrl===ut.url&&(ft.checked=!0),ft.addEventListener("change",yt=>{this._onChangeStyleLayerClick(yt)})}return st.appendChild(ot),ee}};let PanelDOM={_createPanelHeaderElement:function({icon:ne,title:ee,btnClassF
124orClose:te=!1,backBtn:st=!1}){let ot=document.createElement("div");if(ot.classList.add("GPpanelHeader","gpf-panel__header","fr-p-1w"),st){let ut=this._createPanelBackButtonElement();ot.appendChild(ut),ot._backBtn=ut}if(ne){let ut=this._createPanelIconElement(ne);ot.appendChild(ut),ot._icon=ut}if(ee||ee===""){let ut=this._createPanelTitleElement(ee);ot.appendChild(ut),ot._title=ut}let ct=this._createPanelCloseElement(te);return ot.appendChild(ct),ot._closeBtn=ct,ot},_createPanelIconElement:function(ne){let ee=document.createElement("span");return ee.classList.add(`fr-icon-${ne}`,"fr-icon--sm","fr-mr-1w"),ee},_createPanelTitleElement:function(ne){let ee=document.createElement("span");return ee.classList.add("GPpanelTitle","gpf-panel__title"),ee.innerText=ne,ee},_createPanelCloseElement:function(ne){let ee=document.createElement("button");return ee.type="button",ee.classList.add("GPpanelClose","fr-btn","fr-btn--sm","fr-icon-close-line","fr-btn--tertiary-no-outline","fr-ml-auto"),ee.innerText="Fermer le panneau",ee.title="Fermer le panneau",ne&&ee.addEventListener("click",()=>{let te=document.getElementById(this._addUID(ne));te&&te.click()}),ee},_createPanelBackButtonElement:function(){let ne=document.createElement("button");return ne.type="button",ne.classList.add("GPreturnPicto","fr-btn","fr-btn--sm","fr-icon-arrow-left-line","fr-btn--tertiary-no-outline","fr-mr-1w","GPelementHidden","gpf-hidden"),ne.innerText="Retour",ne.title="Retour",ne},_createPanelBodyElement:function(){let ne=document.createElement("div");return ne.classList.add("gpf-panel__body","fr-modal__body"),ne}};var logger$E=LoggerByDefault.getLogger("layerswitcher");const Kl=class Kl extends ControlExtended{constructor(ee){ee=ee||{};var te=ee.options||{},st=ee.layers||[];if(super(te),!(this instanceof Kl))throw new TypeError("ERROR CLASS_CONSTRUCTOR");if(!Array.isArray(st))throw new Error("ERROR WRONG_TYPE : layers should be an array");if(typeof te!="object")throw new Error("ERROR WRONG_TYPE : options should be an object");return this.CLASSNAME="LayerSwitcher",this._initialize(te,st),this.container=this._initContainer(te),this.element?this.element.appendChild(this.container):this.element=this.container,this}setMap(ee){if(this.getSelectedLayer()&&this.setSelectedLayer(this.getSelectedLayer(),!1),ee)this._addMapLayers(ee),this.collapsed||this._showLayerSwitcherButton.setAttribute("aria-pressed",!0),unByKey(this._listeners.onMoveListener),unByKey(this._listeners.onAddListener),unByKey(this._listeners.onRemoveListener),this._listeners.onMoveListener=ee.on("moveend",()=>this._onMapMoveEnd(ee)),this._listeners.onAddListener=ee.getLayers().on("add",st=>{logger$E.debug("LayerSwitcher:onAddListener",st);var ot=st.element,ct;ot.hasOwnProperty("gpLayerId")?ct=ot.gpLayerId:(ct=this._layerId,ot.gpLayerId=ct,this._layerId++),this._layers[ct]||this.addLayer(ot)}),this._listeners.onRemoveListener=ee.getLayers().on("remove",st=>{logger$E.debug("LayerSwitcher:onRemoveListener",st);var ot=st.element,ct=ot.gpLayerId;this._layers[ct]&&this.removeLayer(ot)});else{unByKey(this._listeners.onMoveListener),unByKey(this._listeners.onAddListener),unByKey(this._listeners.onRemoveListener);for(var te=this._layersOrder.length-1;te>=0;te--);}super.setMap(ee),this.options.position&&this.setPosition(this.options.position),this.options.gutter===!1&&this.getContainer().classList.add("gpf-button-no-gutter"),this.options.allowTooltips&&ToolTips.init()}shouldDisplayLayerInSwitcher(ee){return!ee||typeof ee.get!="function"?!0:ee.get("display")!==!1}addLayer(ee,te){var st=this.getMap();if(!ee){logger$E.log("[ERROR] LayerSwitcher:addLayer - missing layer parameter");return}te=te||ee.config||{},Object.prototype.hasOwnProperty.call(te,"display")&&ee.set("display",te.display);var ot=ee.gpLayerId;if(typeof ot>"u"){logger$E.trace("[WARN] LayerSwitcher:addLayer - configuration cannot be set for this layer (layer id not found)",ee);return}var ct=!1;if(st.getLayers().forEach(kt=>{kt.gpLayerId===ot&&(ct=!0)}),!ct){logger$E.log("[ERROR] LayerSwitcher:addLayer - configuration cannot be set for ",ee," layer (layer is not in map.getLayers() )");return}if(this._layers[ot]){for(var _t in te)te.hasOwnProperty(_t)&&(this._layers[ot][_t]=te[_t]);if(te.title){var bt=document.getElementById(this._addUID("GPname_ID_"+ot));bt&&(bt.innerHTML=te.title,bt.title=te.description||te.title)}if(te.producer){let kt=document.getElementById(this._addUID("GPlayerProducer_ID_"+ot));kt?kt.innerHTML=te.producer:this.setLayerProducer(ot,te.producer)}var xt=document.getElementById(this._addUID("GPinfo_ID_"+ot));if(!document.getElementById(this._addUID("GPinfo_ID_"+ot))&&te.de
124scription){var Mt=document.getElementById(this._addUID("GPadvancedTools_ID_"+ot));Mt&&Mt.appendChild(this._createInformationElement({id:ot}))}xt&&xt.className==="GPlayerInfoOpened"&&document.getElementById(this._addUID("GPlayerInfoPanel")).classList.add("GPlayerInfoPanelClosed","gpf-hidden")}else{var ut=this.getLayerInfo(ee)||{},dt=ee.getOpacity(),ht=ee.getVisible(),ft=ee.get("grayscale"),pt=ee.get("locked"),mt=this.isInRange(ee,st),yt={layer:ee,id:ot,name:ee.name,service:ee.service,type:"",opacity:dt??1,visibility:ht??!0,grayscale:ft,locked:pt,inRange:mt??!0,producer:te.producer!=null?te.producer:ut._producer||null,title:te.title!=null?te.title:ut._title||ot,thumbnail:te.thumbnail!=null?te.thumbnail:ut._thumbnail||null,description:te.description||ut._description||null,legends:te.legends||ut._legends||[],metadata:te.metadata||ut._metadata||[],quicklookUrl:te.quicklookUrl||ut._quicklookUrl||null};this._layers[ot]=yt;var vt=this._createLayerDiv(yt);this._layers[ot].div=vt,ee.getZIndex&&ee.getZIndex()!==0&&typeof ee.getZIndex()<"u"||ee._forceNullzIndex?this._updateLayersOrder():(this._layersOrder.unshift(yt),this._lastZIndex++,ee.setZIndex(this._lastZIndex),vt.dataset.sortableId=this._layerId,this._layerListContainer.insertBefore(vt,this._layerListContainer.firstChild)),this._listeners.updateLayerOpacity=ee.on("change:opacity",kt=>this._updateLayerOpacity(kt)),this._listeners.updateLayerVisibility=ee.on("change:visible",kt=>this._updateLayerVisibility(kt)),this._listeners.updateLayerGrayScale=ee.on("change:grayscale",kt=>this._updateLayerGrayScale(kt)),this._listeners.updateLayerLocked=ee.on("change:locked",kt=>this._updateLayerLocked(kt)),this._listeners.updateProperties=ee.on("propertychange",kt=>this._updateGenericProperty(kt)),this._layers[ot].onZIndexChangeEvent==null&&(this._layers[ot].onZIndexChangeEvent=ee.on("change:zIndex",()=>this._updateLayersOrder()))}this._updateLayerCounter();var Ot=this;setTimeout(()=>{Ot._updateLayerGrayScale({target:{gpLayerId:ot}})},0),this.dispatchEvent({type:this.ADD_LAYER_EVENT,layer:this._layers[ot]})}removeLayer(ee){if(ee){unByKey(this._listeners.updateLayerOpacity),unByKey(this._listeners.updateLayerVisibility),unByKey(this._listeners.updateLayerGrayScale),unByKey(this._listeners.updateLayerLocked),unByKey(this._listeners.updateProperties),logger$E.trace(ee);var te=ee.gpLayerId,st=document.getElementById(this._addUID("GPinfo_ID_"+te));st&&st.className==="GPlayerInfoOpened"&&document.getElementById(this._addUID("GPlayerInfoPanel")).classList.add("GPlayerInfoPanelClosed","gpf-hidden");var ot=document.getElementById(this._addUID("GPedit_ID_"+te));ot&&ot.classList.contains("GPlayerStyleOpened")&&document.getElementById(this._addUID("GPlayerStylePanel")).classList.add("GPlayerStylePanelClosed","gpf-hidden");var ct=document.getElementById(this._addUID("GPlayerSwitcher_ID_"+te));ct&&this._layerListContainer.removeChild(ct);var ut=Math.abs(ee.getZIndex()-this._lastZIndex);this._layersOrder.splice(ut,1),this._lastZIndex--;for(var dt=this._layersOrder,ht=0;ht<dt.length;ht++)dt[ht].layer.setZIndex(this._lastZIndex-ht);this.dispatchEvent({type:this.REMOVE_LAYER_EVENT,layer:this._layers[te]}),ee===this.getSelectedLayer()&&this.setSelectedLayer(),delete this._layers[te],this._updateLayerCounter()}}lockLayer(ee,te){if(ee){var st=ee.gpLayerId,ot=document.getElementById(this._addUID("GPlayerSwitcher_ID_"+st));ot&&(te?ot.setAttribute("disabled",!0):ot.removeAttribute("disabled")),ee.set("locked",te),this.dispatchEvent({type:this.LOCK_LAYER_EVENT,layer:this._layers[st],locked:te})}}setCollapsed(ee){if(ee===void 0){logger$E.log("[ERROR] LayerSwitcher:setCollapsed - missing collapsed parameter");return}var te=!document.getElementById(this._addUID("GPshowLayersList")).checked;ee&&te||!ee&&!te||(te||(document.getElementById(this._addUID("GPlayerInfoPanel")).classList.add("GPlayerInfoPanelClosed","gpf-hidden"),document.getElementById(this._addUID("GPlayerStylePanel")).classList.add("GPlayerStylePanelClosed","gpf-hidden")),document.getElementById(this._addUID("GPshowLayersList")).checked=!ee)}getCollapsed(){return this.collapsed}setRemovable(ee,te){if(ee){var st=ee.gpLayerId;if(st==null){logger$E.log("[LayerSwitcher:setRemovable] layer should be added to map before calling setRemovable method");return}var ot=document.getElementById(this._addUID("GPremove_ID_"+st));ot&&(te===!1?ot.style.display="none":te===!0&&(ot.style.display="block"))}}getContainer(){return this.container}forget(){unByKey(this._listeners.onAddListener)}listen(){var ee=this.getMap();ee&&(this._listeners.onAddListener=ee.getLayers().on("add",te=>{logger$E.debug("LayerSwitcher:onAddListener",te);var st=te.element,ot;st.hasOwnProperty("gpLayerId")?ot=st.gpLayerId:(ot=this._layerId,st.gpLayerId=ot,this._layerId++),this._layers[ot]||this.addLayer(st)}))}_initialize(ee,te){this.options={id:"",collapsed:!0,draggable:!1,
124counter:!1,panel:!1,gutter:!1,allowEdit:!0,allowGrayScale:!0,allowDraggable:!0,allowDelete:!0,allowTooltips:!1,headerButtons:[],advancedTools:null},Helper.assign(this.options,ee),this.options.layers=te,this._uid=this.options.id||SelectorID.generate(),this._layers={},this._layersOrder=[],this._layersIndex={},this._lastZIndex=0,this._layerId=0,this.collapsed=this.options.collapsed!==void 0?this.options.collapsed:!0,this._layerListContainer=null,this._listeners={};for(var st=0;st<te.length;st++){var ot=te[st].layer;if(ot){var ct;ot.hasOwnProperty("gpLayerId")?ct=ot.gpLayerId:(ct=this._layerId,ot.gpLayerId=ct,this._layerId++);var ut=te[st].config||{},dt=this.getLayerInfo(ot),ht=ot.getOpacity(),ft=ot.getVisible(),pt=ot.get("grayscale"),mt={layer:ot,id:ct,name:ot.name,service:ot.service,opacity:ht??1,visibility:ft??!0,grayscale:pt,title:ut.title||dt._title,description:ut.description||dt._description,legends:ut.legends||dt._legends,metadata:ut.metadata||dt._metadata,quicklookUrl:ut.quicklookUrl||dt._quicklookUrl,thumbnail:ut.thumbnail||dt._thumbnail,producer:ut.producer||dt._producer};this._layers[ct]=mt}}this._layerListContainer=null,this._layerSwitcherCounter=null,this._showLayerSwitcherButton=null,this.PROPERTY_CHANGE_EVENT="layerswitcher:propertychange",this.ADD_LAYER_EVENT="layerswitcher:add",this.REMOVE_LAYER_EVENT="layerswitcher:remove",this.LOCK_LAYER_EVENT="layerswitcher:lock",this.EXTENT_LAYER_EVENT="layerswitcher:extent",this.EDIT_LAYER_EVENT="layerswitcher:edit",this.CUSTOM_LAYER_EVENT="layerswitcher:custom",this.HEADER_BUTTON_EVENT="layerswitcher:header:button",this.CHANGE_LAYER_OPACITY_EVENT="layerswitcher:change:opacity",this.CHANGE_LAYER_VISIBILITY_EVENT="layerswitcher:change:visibility",this.CHANGE_LAYER_GRAYSCALE_EVENT="layerswitcher:change:grayscale",this.CHANGE_LAYER_LOCKED_EVENT="layerswitcher:change:locked",this.CHANGE_LAYER_SELECTED_EVENT="layerswitcher:change:selected"}_initContainer(){var ee=this._createMainContainerElement(),te=this._createMainLayersShowElement();ee.appendChild(te),this.collapsed?this.collapsed=!0:(te.checked="checked",this.collapsed=!1);var st=this,ot=function(bt){this.collapsed=!bt.target.checked,this.dispatchEvent("change:collapsed")};te.addEventListener("click",function(bt){ot.call(st,bt)});var ct=this._showLayerSwitcherButton=this._createMainPictoElement();if(ee.appendChild(ct),ee.classList.add("GplayerSwitcher-counterRemoved"),this.options.counter){ee.classList.remove("GplayerSwitcher-counterRemoved"),ee.classList.add("GplayerSwitcher-counterAdded");var ut=this._layerSwitcherCounter=this._createMainCounterLayersElement();ct.appendChild(ut)}var dt=this._createMainLayersElement();if(ee.appendChild(dt),this.options.panel){var ht=this._createPanelHeaderElement({icon:"ign-layerswitcher",title:"Couches",btnClassForClose:"GPshowLayersListPicto"});dt.appendChild(ht)}var ft=this._createMainLayersDivElement();if(dt.appendChild(ft),this.options.headerButtons.length){let bt=this._createHeaderButtonsDivElement(),xt=this._createButtonsGroupElement({className:"GPbodyHeaderBtnsGroup",size:"sm"});this.options.headerButtons.forEach(Mt=>{let Ot=this._createButtonHeaderElement(Mt);xt.appendChild(Ot)}),bt.appendChild(xt),ft.appendChild(bt)}var pt=this._layerListContainer=this._createMainLayerListElement();ft.appendChild(pt),this._createDraggableElement(pt,this);var mt=this._createMainInfoElement(),yt=this._createMainInfoDivElement();mt.appendChild(yt),ee.appendChild(mt);var vt=this._createMainStyleElement(),_t=this._createMainStyleDivElement();return vt.appendChild(_t),ee.appendChild(vt),ee}_addMapLayers(ee){this._layersIndex={},ee.getLayers().forEach(ft=>{var pt=null;ft.hasOwnProperty("gpLayerId")?pt=ft.gpLayerId:(pt=this._layerId,ft.gpLayerId=pt,this._layerId++);var mt=this.getLayerInfo(ft)||{};if(this._layers[pt])this._layers[pt].opacity=ft.getOpacity(),this._layers[pt].visibility=ft.getVisible(),this._layers[pt].grayscale=ft.get("grayscale"),this._layers[pt].locked=ft.get("locked"),this._layers[pt].inRange=this.isInRange(ft,ee);else{var yt=ft.getOpacity(),vt=ft.getVisible(),_t=ft.get("grayscale"),bt=ft.get("locked"),xt=this.isInRange(ft,ee),Mt={layer:ft,id:pt,name:ft.name,service:ft.service,opacity:yt??1,visibility:vt??!0,grayscale:_t,locked:bt,inRange:xt??!0,producer:mt._producer||null,thumbnail:mt._thumbnail||null,title:mt._title||pt,description:mt._description||null,legends:mt._legends||[],metadata:mt._metadata||[],quicklookUrl:mt._quicklookUrl||null};this._layers[pt]=Mt}this._updateLayerCounter(),this._listeners.updateLayerOpacity=ft.on("change:opacity",Nt=>this._updateLayerOpacity(Nt)),this._listeners.updateLayerVisibility=ft.on("change:visible",Nt=>this._updateLayerVisibility(Nt)),this._listeners.updateLayerGrayScale=ft.on("change:grayscale",Nt=>this._updateLayerGrayScale(Nt)),this._listeners.updateLayerLocked=ft.on("change:locked",Nt=>this._updateLayerLocked(Nt)),this._listeners.updateProperties=ft.on("propertychange",Nt=>this._updateGenericProperty(Nt));var Ot=this;if(setTimeout(()=>{Ot._updateLayerGrayScale({target:{gpLayerId:pt}})},0),ft.getZIndex!==void 0){var kt=ft.getZIndex()||0;(!this._layersIndex[kt]||!Array.isArray(this._layersIndex[kt]))&&(this._layersIndex[kt]=[]),this._layersIndex[kt].push(this._layers[pt])}});for(var te in this._layersIndex)if(this._layersIndex.hasOwnProperty(te))for(var st=this._layersIndex[te],ot=0;ot<st.length;ot++)this._layersOrder.unshift(st[ot]),this._lastZIndex++,st[ot].layer.setZIndex(this._lastZIndex),this._layers[st[ot].layer.gpLayerId].onZIndexChangeEvent==null&&(this._layers[st[ot].layer.gpLayerId].onZIndexChangeEvent=st[ot].layer.on("change:zIndex",()=>this._updateLayersOrder()));for(var ct=0;ct<this._layersOrder.length;ct++){var ut=this._layersOrder[ct],dt=this._createLayerDiv(ut);dt.dataset.sortableId=ut.id;
124const ft="#"+dt.id;this._layerListContainer.querySelector(ft)?dt=this._layerListContainer.querySelector(ft):this._layerListContainer.appendChild(dt),this._layers[ut.id].div=dt}const ht=Object.values(this._layers);!this.getSelectedLayer()&&ht.length>0&&this.setSelectedLayer(ht[ht.length-1].layer,!0)}_createLayerDiv(ee){var te=ee.legends&&ee.legends.length!==0,st=ee.metadata&&ee.metadata.length!==0,ot=ee.quicklookUrl;(te||st||ot)&&(ee.displayInformationElement=!0),ee.editable=!1,this.options.allowEdit&&(ee.layer instanceof VectorLayer||ee.layer instanceof VectorTileLayer)&&(ee.editable=!0),ee.grayable=!1,this.options.allowGrayScale&&(ee.layer instanceof TileLayer||ee.layer instanceof VectorTileLayer)&&(ee.grayable=!0),ee.draggable=!1,this.options.allowDraggable&&(ee.draggable=!0),ee.deletable=!1,this.options.allowDelete&&(ee.deletable=!0),ee.advancedTools=this.options.advancedTools;var ct=this._createContainerLayerElement(ee,this.options.allowTooltips);return this.shouldDisplayLayerInSwitcher(ee.layer)||ct.classList.add("gpf-hidden","GPelementHidden"),ee.inRange||ct.classList.add("outOfRange"),ct}onShowLayerSwitcherClick(ee){ee.target.ariaPressed==="true"&&this.onPanelOpen();var te=this._showLayerSwitcherButton.ariaPressed;this.collapsed=te!=="true",this.dispatchEvent("change:collapsed"),this.options.position&&!this.collapsed&&this.updatePosition(this.options.position)}_updateLayerCounter(){if(this._layerSwitcherCounter){const ee=Object.values(this._layers).filter(te=>te.layer&&this.shouldDisplayLayerInSwitcher(te.layer)).length;this._layerSwitcherCounter.innerHTML=ee}}_onChangeLayerOpacity(ee){ee.target.parentNode.style.setProperty("--progress-right",ee.target.value+"%");var te=ee.target.id,st=SelectorID.index(te),ot=this._layers[st].layer,ct=ee.target.value,ut=document.getElementById(this._addUID("GPopacityValue_ID_"+st));ut.innerText=ct+"%",ot.setOpacity(ct/100)}_updateLayerOpacity(ee){var te=ee.target.getOpacity();te>1&&(te=1),te<0&&(te=0);var st=ee.target.gpLayerId,ot=document.getElementById(this._addUID("GPopacityValueDiv_ID_"+st));ot&&(ot.value=Math.round(te*100));var ct=document.getElementById(this._addUID("GPopacityValue_ID_"+st));ct&&(ct.innerHTML=Math.round(te*100)+"%"),this.dispatchEvent({type:this.CHANGE_LAYER_OPACITY_EVENT,opacity:te,layer:this._layers[st]})}_onVisibilityLayerClick(ee){var te=ee.target.id,st=SelectorID.index(te),ot=this._layers[st].layer;ot.setVisible(ee.target.ariaPressed==="true")}_updateLayerVisibility(ee){var te=ee.target.getVisible(),st=ee.target.gpLayerId,ot=document.getElementById(this._addUID("GPvisibilityPicto_ID_"+st));ot&&(ot.ariaPressed=te),this.dispatchEvent({type:this.CHANGE_LAYER_VISIBILITY_EVENT,visibility:te,layer:this._layers[st]})}_onChangeStyleLayerClick(ee){var te=ee.target.id,ct=SelectorID.index(te),st=this._layers[ct].layer;st.set("grayscale",!1);var ot=ee.target.id,ct=SelectorID.index(ot),ut=document.getElementById(this._addUID("GPgreyscale_ID_"+ct));ut&&(ut.classList.add("GPlayerGreyscaleOff"),ut.classList.remove("GPlayerGreyscaleOn")),st.styleUrl=ee.target.value,st.styleName=ee.target.dataset.name,st.setStyleMapBox().then(()=>{st.setProperties({title:st.getSource()._title||st.styleName||st.styleTitle})}),this.dispatchEvent({type:"layerswitcher:change:style",name:st.styleName,url:st.styleUrl,layer:this._layers[ct]})}_updateLayersOrder(){var ee=this.getMap();if(ee){this._layersIndex={};var te,st;ee.getLayers().forEach(ft=>{st=ft.gpLayerId,this._layers[st]&&(unByKey(this._layers[st].onZIndexChangeEvent),this._layers[st].onZIndexChangeEvent=null,te=null,ft.getZIndex!==void 0&&(te=ft.getZIndex(),(!this._layersIndex[te]||!Array.isArray(this._layersIndex[te]))&&(this._layersIndex[te]=[]),this._layersIndex[te].push(this._layers[st])))}),this._lastZIndex=0,this._layersOrder=[];for(var ot in this._layersIndex)if(this._layersIndex.hasOwnProperty(ot))for(var ct=this._layersIndex[ot],ut=0;ut<ct.length;ut++)this._layersOrder.unshift(ct[ut]),this._lastZIndex++,this._layers[ct[ut].layer.gpLayerId].onZIndexChangeEvent==null&&(this._layers[ct[ut].layer.gpLayerId].onZIndexChangeEvent=ct[ut].layer.on("change:zIndex",()=>this._updateLayersOrder()));
124if(this._layerListContainer){for(let ft=0;ft<this._layerListContainer.childNodes.length;ft++){const pt=this._layerListContainer.childNodes[ft];pt.id!==""&&pt.remove()}for(var dt=0;dt<this._layersOrder.length;dt++){var ht=this._layersOrder[dt];this._layerListContainer.appendChild(ht.div)}}else logger$E.log("[ol.control.LayerSwitcher] _updateLayersOrder : layer list container not found to update layers order ?!")}}_onOpenLayerInfoClick(ee){var te=ee.target.id,st=SelectorID.index(te),ot=this._layers[st],ct,ut,dt=document.getElementById(ee.target.id);if(dt.classList.contains("GPlayerInfoOpened")){dt.classList.remove("GPlayerInfoOpened"),dt.classList.add("GPlayerInfoClosed"),ct=document.getElementById(this._addUID("GPlayerInfoPanel")),ct.classList.remove("GPlayerInfoPanelOpened","gpf-visible"),ct.classList.add("GPlayerInfoPanelClosed","gpf-hidden"),ut=document.getElementById(this._addUID("GPlayerInfoContent")),ut&&ut.parentNode.remove();return}dt.classList.contains("GPlayerInfoClosed")&&(dt.classList.remove("GPlayerInfoClosed"),dt.classList.add("GPlayerInfoOpened")),ct=document.getElementById(this._addUID("GPlayerInfoPanel")),ct.classList.remove("GPlayerInfoPanelClosed","gpf-hidden"),ct.classList.add("GPlayerInfoPanelOpened","gpf-visible"),ut=document.getElementById(this._addUID("GPlayerInfoContent")),ut&&ut.parentNode.remove();var ht={id:te,title:ot.title,description:ot.description,quicklookUrl:ot.quicklookUrl,metadata:ot.metadata,legends:ot.legends},ft=ot.layer.getMaxResolution();ft===1/0?ht._maxScaleDenominator=56e7:ht._maxScaleDenominator=Math.round(ft/28e-5);var pt=this._createContainerLayerInfoElement(ht);ct.firstChild.appendChild(pt)}_onEditLayerStyleClick(ee,te){var st=ee.target.id,ot=SelectorID.index(st),ct=this._layers[ot],ut,dt,ht=document.getElementById(ee.target.id);if(ht.classList.contains("GPlayerStyleOpened")){ht.classList.remove("GPlayerStyleOpened"),ht.classList.add("GPlayerStyleClosed"),ut=document.getElementById(this._addUID("GPlayerStylePanel")),ut.classList.remove("GPlayerStylePanelOpened","gpf-visible"),ut.classList.add("GPlayerStylePanelClosed","gpf-hidden"),dt=document.getElementById(this._addUID("GPlayerStyleContent")),dt&&dt.parentNode.remove();return}ht.classList.contains("GPlayerStyleClosed")&&(ht.classList.remove("GPlayerStyleClosed"),ht.classList.add("GPlayerStyleOpened")),ut=document.getElementById(this._addUID("GPlayerStylePanel")),ut.classList.remove("GPlayerStylePanelClosed","gpf-hidden"),ut.classList.add("GPlayerStylePanelOpened","gpf-visible"),dt=document.getElementById(this._addUID("GPlayerStyleContent")),dt&&dt.parentNode.remove();var ft={id:ot,div:st,styles:te,layerInfo:ct},pt=ct.layer.getMaxResolution();pt===1/0?ft._maxScaleDenominator=56e7:ft._maxScaleDenominator=Math.round(pt/28e-5);var mt=this._createContainerLayerStyleElement(ft);ut.firstChild.appendChild(mt)}_onDropLayerClick(ee){var te=ee.target.id,st=SelectorID.index(te),ot=this._layers[st].layer;this.getMap().getLayers().remove(ot)}_onEditLayerClick(ee){var te=ee.target.id,st=SelectorID.index(te),ot=this._layers[st],ct=this._layers[st].layer;this.dispatchEvent({type:this.EDIT_LAYER_EVENT,layer:ct,options:ot})}_onEndDragAndDropLayerClick(ee){logger$E.trace(ee);var te=this.getMap(),st=document.querySelectorAll("div.GPlayerSwitcher_layer"),ot=st.length;this._layersOrder=[];for(var ct=0;ct<st.length;ct++){var ut=st[ct].id,dt=SelectorID.index(ut),ht=this._layers[dt].layer;unByKey(this._layers[dt].onZIndexChangeEvent),this._layers[dt].onZIndexChangeEvent=null,ht.setZIndex&&(ht.setZIndex(ot),this._layersOrder.push(this._layers[dt]),ot--),this._layers[dt].onZIndexChangeEvent==null&&(this._layers[dt].onZIndexChangeEvent=ht.on("change:zIndex",()=>this._updateLayersOrder()))}te.updateSize(),this.dispatchEvent({type:"layerswitcher:change:position",position:ee.newIndex,layer:this._layersOrder[ee.newIndex],layers:this._layersOrder})}_onStartDragAndDropLayerClick(ee){logger$E.debug(ee)}_updateLayerGrayScale(ee){function te(xt){xt.crossOrigin="anonymous";var Mt=document.createElement("canvas"),Ot=Mt.getContext("2d");
124xt.width=xt.width||256,xt.height=xt.height||256,Mt.width=xt.width,Mt.height=xt.height,Ot.drawImage(xt,0,0);for(var kt=Ot.getImageData(0,0,xt.width,xt.height),Nt=kt.data,Gt=0;Gt<Nt.length;Gt+=4){var Bt=(Nt[Gt]+Nt[Gt+1]+Nt[Gt+2])/3;Nt[Gt]=Bt,Nt[Gt+1]=Bt,Nt[Gt+2]=Bt}return Ot.putImageData(kt,0,0),Mt.toDataURL()}function st(xt,Mt){var Ot=te(xt);xt.src="",xt.src=Ot}function ot(xt){xt.image.getImage().crossOrigin="Anonymous"}function ct(xt){xt.tile.getImage().crossOrigin="Anonymous"}function ut(xt){st(xt.image.getImage(),xt.target)}function dt(xt){st(xt.tile.getImage(),xt.target)}function ht(xt){if(!xt||typeof xt!="string"||!xt.startsWith("#"))return xt;const Mt=parseInt(xt.slice(1,3),16),Ot=parseInt(xt.slice(3,5),16),kt=parseInt(xt.slice(5,7),16),Gt=Math.round(.3*Mt+.59*Ot+.11*kt).toString(16).padStart(2,"0");return`#${Gt}${Gt}${Gt}`}async function ft(xt){var Mt=await mt(xt);Mt.layers.forEach(Ot=>{Ot.paint&&Object.keys(Ot.paint).forEach(kt=>{let Nt=Ot.paint[kt];if(Array.isArray(Nt)&&Nt[0]==="interpolate"&&Nt[2]==="zoom")for(let Gt=4;Gt<Nt.length;Gt+=2)Nt[Gt]=ht(Nt[Gt]);else if(Array.isArray(Nt)&&Nt[0]==="step")for(let Gt=2;Gt<Nt.length;Gt+=2)Nt[Gt]=ht(Nt[Gt]);else if(Nt instanceof Object&&Nt.stops)for(let Gt=0;Gt<Nt.stops.length;Gt+=1)Nt.stops[Gt][1]=ht(Nt.stops[Gt][1]);else Ot.paint[kt]=ht(Nt)})}),applyStyle(xt,Mt)}async function pt(xt){var Mt=await mt(xt);applyStyle(xt,Mt)}async function mt(xt){return await(await fetch(xt.styleUrl)).json()}var yt=ee.target.gpLayerId,vt=this._layers[yt].layer;if(vt.getLayers&&vt.getLayers().getArray().length>0){console.warn("Grayscale not implemented for layer groups");return}var _t=vt.getSource();if(!(_t instanceof ImageSource||_t instanceof TileWMS||_t instanceof WMTS$1||_t instanceof VectorTile)){console.warn("Greyscale only implemented for raster and vector tiles");return}var bt=vt.get("grayscale");bt?_t instanceof VectorTile?ft(vt):_t instanceof ImageSource?(_t.loadstartListenerKey=_t.on("imageloadstart",ot),_t.loadendListenerKey=_t.on("imageloadend",ut)):(_t.loadstartListenerKey=_t.on("tileloadstart",ct),_t.loadendListenerKey=_t.on("tileloadend",dt)):_t instanceof VectorTile?pt(vt):(unByKey(_t.loadstartListenerKey),unByKey(_t.loadendListenerKey),_t.loadstartListenerKey=null,_t.loadendListenerKey=null),_t instanceof VectorTile||_t.refresh(),this.dispatchEvent({type:this.CHANGE_LAYER_GRAYSCALE_EVENT,grayscale:bt,layer:this._layers[yt]})}_onToggleLayerGreyscaleClick(ee){console.trace(ee);var te=ee.target.id,st=SelectorID.index(te),ot=this._layers[st].layer,ct=!0;ee.target.classList.contains("GPlayerGreyscaleOff")?(ee.target.classList.remove("GPlayerGreyscaleOff"),ee.target.classList.add("GPlayerGreyscaleOn")):(ee.target.classList.add("GPlayerGreyscaleOff"),ee.target.classList.remove("GPlayerGreyscaleOn"),ct=!1),ot.set("grayscale",ct)}_updateLayerLocked(ee){var te=ee.target.gpLayerId,st=this._layers[te].layer,ot=st.get("locked"),ct=document.getElementById(this._addUID("GPlayerSwitcher_ID_"+te));ct&&(ot?ct.setAttribute("disabled",!0):ct.removeAttribute("disabled")),this.dispatchEvent({type:this.CHANGE_LAYER_LOCKED_EVENT,locked:ot,layer:this._layers[te]})}_updateGenericProperty(ee){var te=ee.target.gpLayerId;if(this._layers[te]){var st=this._layers[te].layer,ot=st.get(ee.key);switch(ee.key){case"title":this._layers[te].title=ot;var ct=document.getElementById(this._addUID("GPname_ID_"+te));ct&&(ct.innerHTML=ot,ct.title=ot);break;case"description":this._layers[te].description=ot;var ct=document.getElementById(this._addUID("GPname_ID_"+te));ct&&(ct.title=ot);break;case"producer":this._layers[te].producer=ot;var ut=document.getElementById(this._addUID("GPlayerProducer_ID_"+te));ut&&(ut.innerHTML=ot);break;case"display":var dt=this._layers[te].div;dt&&(ot===!1?dt.classList.add("gpf-hidden","GPelementHidden"):dt.classList.remove("gpf-hidden","GPelementHidden")),this._updateLayerCounter();break}this.dispatchEvent({type:this.PROPERTY_CHANGE_EVENT,key:ee.key,value:ot,layer:this._layers[te]})}}_onToggleLayerLockedClick(ee){var te=ee.target.id,st=SelectorID.index(te),ot=this._layers[st].layer,ct=ee.target.ariaPressed==="true";ot.set("locked",ct)}_onZoomToExtentClick(ee){logger$E.debug(ee);var te=ee.target.id,st=SelectorID.index(te),ot=this._layers[st],ct=null,ut=null,dt=this.getMap();if(ot.layer.hasOwnProperty("gpResultLayerId")&&(ot.layer.gpResultLayerId.split(":")[0]==="layerimport"||ot.layer.gpResultLayerId.split(":")[0]==="drawing"||ot.layer.gpResultLayerId.split(":")[0]==="compute"||ot.layer.gpResultLayerId.split(":")[0]==="bookmark")){if(dt.getView()&&dt.getSize()){var ht=ot.layer.getExtent();if(!ht){var ft=ot.layer.getSource();ft&&ft.getExtent?ht=ft.getExtent():ht=ft.getTileGrid().getExtent()}ht&&ht[0]!==1/0&&dt.getView().fit(ht,dt.getSize())}}else try{if(!Config.isConfigLoaded())throw"ERROR : contract key configuration has to be loaded to load Geoportal layers.";var pt=ot.layer.name||ot.layer.getSource().name,mt=ot.layer.service||ot.layer.getSource().service,yt=Config.configuration.getLayerId(pt,mt);if(!yt)throw"ERROR : Layer ID not found into the catalogue !?";var vt=Config.configuration.getGlobalConstraints(yt);if(vt){if(!dt||!dt.getView())return;var _t=dt.getView(),bt=_t.getProjection(),xt=[vt.extent.left,vt.extent.bottom,vt.extent.right,vt.extent.top],Mt=vt.crs;Mt||(Mt="EPSG:4326"),ct=transformExtent(xt,Mt,bt),ct&&_t.fit(ct)}}catch(Ot){ut=Ot}this.dispatchEvent({type:this.EXTENT_LAYER_EVENT,extent:ct,layer:ot,error:ut})}_onClickAdvancedToolsMore(ee,te,st){var ot=ee.target.id,ct=SelectorID.index(ot),ut=this._layers[ct],dt=this._layers[ct].layer;if(st){st(ee,this,dt,ut);return}this.dispatchEvent({type:this.CUSTOM_LAYER_EVENT,action:te,layer:dt,options:ut})}_onClickHeaderButtons(ee,te,st){if(st){st(ee,this);return}this.dispatchEvent({type:this.HEADER_BUTTON_EVENT,action:te})}_onSelectLayer(ee){var te;if(ee.type!=="keydown"||["Enter","Space"].includes(ee.code)&&ee.target.id.startsWith("GPlayerSwitcher_ID_")){const ot=ee.target.id,ct=SelectorID.index(ot);if(this._layers[ct]){const dt=this._layers[ct].layer;dt.gpLayerId!==((te=this.getSelectedLayer())==null?void 0:te.gpLayerId)&&this.setSelectedLayer(dt,!0)}}}getSelectedLayer(){return this.selectedLayer}setSelectedLayer(ee,te){let st=this.getSelectedLayer();if(ee===st&&st&&st.get("selected")!==te?(ee.set("selected",te),this.selectedLayer=null):!ee&&st?(st.set("selected",!1),this.selectedLayer=null):(ee.
124set("selected",!!te),te?this.selectedLayer=ee:this.selectedLayer=null,st&&st.set("selected",!1)),this.getSelectedLayer()){const ot=this._layers[this.getSelectedLayer().gpLayerId].div;ot.ariaCurrent=!0}if(st){const ot=this._layers[st.gpLayerId].div;ot.ariaCurrent=!1}this.dispatchEvent({type:this.CHANGE_LAYER_SELECTED_EVENT,layer:this.getSelectedLayer(),previous:st})}_onMapMoveEnd(ee){ee.getLayers().forEach(te=>{var st=te.gpLayerId;if(this._layers[st]){var ot=this._layers[st],ct;if(this.isInRange(te,ee)&&!ot.inRange){ot.inRange=!0,ct=document.getElementById(this._addUID("GPlayerSwitcher_ID_"+st)),ct.classList.remove("outOfRange");var ut=this.getLayerInfo(te),dt=ut._title,ht=ut._description,ft=document.getElementById(this._addUID("GPname_ID_"+st));ft&&(ft.title=ht||dt)}else!this.isInRange(te,ee)&&ot.inRange&&(ot.inRange=!1,ct=document.getElementById(this._addUID("GPlayerSwitcher_ID_"+st)),ct.classList.add("outOfRange"))}})}getLayerDOMId(ee){var te=null;return this.getMap().getLayers().forEach(st=>{st===ee&&(te=st.hasOwnProperty("gpLayerId")?st.gpLayerId:null)}),te!==null?this._addUID("GPlayerSwitcher_ID_"+te):null}isInRange(ee,te){if(te){var st=ee.gpLayerId,ot=document.getElementById(this._addUID("GPname_ID_"+st)),ct=te.getView().getResolution();if(ct>ee.getMaxResolution()||ct<ee.getMinResolution()){var ut="Cette couche n'est pas visible à ce niveau de zoom";return ot&&(ot.title=ut),!1}var dt=te.getView().calculateExtent(te.getSize()),ht=ee.getExtent();if(ht&&!intersects$1(dt,ht)){var ut="Cette couche n'est pas visible à cet endroit";return ot&&(ot.title=ut),!1}return!0}}getLayerInfo(ee){var te={};if(ee&&ee.getProperties!==void 0){var st=ee.getProperties()||{},ot=st.source;!ot&&ee.getSource!==void 0&&(ot=ee.getSource()),te._title=ot&&ot._title||st.title||st.id||"",te._description=ot&&ot._description||st.description||"",te._producer=ot&&ot._producer||st.producer||"",te._thumbnail=ot&&ot._thumbnail||st.thumbnail||"",te._quicklookUrl=ot&&ot._quicklookUrl||st.quicklookUrl||"",te._metadata=ot&&ot._metadata||st.metadata||[],te._legends=ot&&ot._legends||st.legends||[]}return te}setLayerProducer(ee,te){let st=ee.gpLayerId,ot=this._layers[st].div;if(ot){let ct=ot.querySelector(".GPlayerTitle");if(ct.childElementCount===2&&ct.querySelector(".GPlayerProducer").remove(),te){let ut=this._createLayerProducerElement({producer:te},this.options.allowTooltips);ct.appendChild(ut)}}}};Kn(Kl,"switcherButtons",{INFO:"info",EDIT:"edition",GREYSCALE:"greyscale",EXTENT:"extent"});let LayerSwitcher=Kl;Object.assign(LayerSwitcher.prototype,PanelDOM);Object.assign(LayerSwitcher.prototype,LayerSwitcherDOM);Object.assign(LayerSwitcher.prototype,Widget);window.ol&&window.ol.control&&(window.ol.control.LayerSwitcher=LayerSwitcher);LoggerByDefault.getLogger("draggable");var Draggable={dragElement:function(ne,ee,te){let st=0,ot=0,ct=0,ut=0,dt=0,ht=0;ee?ee.addEventListener("mousedown",mt,!0):ne.addEventListener("mousedown",mt,!0);var ft,pt={bottom:0,left:0,right:0,top:0};function mt(_t){_t=_t||window.event,_t.preventDefault(),st=_t.clientX,ot=_t.clientY,ft=ne.getBoundingClientRect();const bt=te.getBoundingClientRect();pt={bottom:bt.bottom,left:bt.left,right:bt.right,top:bt.top},document.addEventListener("mouseup",yt,!0),document.addEventListener("mousemove",vt,!0)}function yt(){dt-=ct,ht-=ut,document.removeEventListener("mouseup",yt,!0),document.removeEventListener("mousemove",vt,!0)}function vt(_t){_t=_t||window.event;let bt=_t.clientX,xt=_t.clientY,Mt=ct,Ot=ut;ct=st-bt,ut=ot-xt;var kt=ft.left-ct,Nt=ft.top-ut;if(kt<pt.left||Nt<pt.top||kt+ft.width>pt.right||Nt+ft.height>pt.bottom)ct=Mt,ut=Ot;else{let Gt=dt-ct,Bt=ht-ut;ne.style.transform="translate("+Gt+"px,"+Bt+"px)"}}}};class AsyncData{constructor(ee){this.data=ee,this.subscribers=[]}subscribe(ee){if(typeof ee!="function")throw new Error("Callback must be a function");this.subscribers.push(ee)}async set(ee,te){this.data[ee]=te;const st=this.subscribers.map(async ot=>{await ot(ee,te)});await Promise.allSettled(st)}get(ee){return this.data[ee]}}var GetFeatureInfoDOM={_addUID:function(ne){var ee=this.uid?ne+"-"+this.uid:ne;return ee},stringToHTML:function(ne){var ee=function(){if(!window.DOMParser)return!1;var ct=new DOMParser;try{ct.parseFromString("x","text/html")}catch{return!1}return!0};if(ee()){var te=new DOMParser,st=te.parseFromString(ne,"text/html");return st.body}var ot=document.createElement("div");return ot.innerHTML=ne,ot},_createMainContainerElement:function(){var ne=document.createElement("div");return ne.id=this._addUID("GPgetFeatureInfo"),ne.className="GPgetFeatureInfo gpf-widget gpf-widget-button gpf-mobile-fullscreen",ne},_createShowGetFeatureInfoPictoElement:function(){var ne=this,ee=document.createElement("button"),te=document.createElement("span");return ee.appendChild(te),ee.id=this._addUID("GPgetFeatureInfoPicto"),ee.classList.add("GPshowOpen","GPshowAdvancedToolPicto","GPgetFeatureInfoPicto"),ee.classList.add("gpf-btn","gpf-btn--tertiary","gpf-btn-icon","gpf-btn-icon-getfeatureinfo"),ee.classList.add("fr-btn","fr-btn--tertiary"),ee.setAttribute("aria-label","Activer/désactiver l'interrogation des couches"),ee.setAttribute("tabindex","0"),ee.setAttribute("aria-pressed",!1),ee.setAttribute("type","button"),ee.addEventListener?ee.addEventListener("click",function(st){var ot=ne.getActive();ne.setActive(!ot),ne.onShowGetFeatureInfoClick(st)}):ee.attachEvent&&ee.attachEvent("onclick",function(st){var ot=ne.getActive();ne.setActive(!ot),ne.onShowGetFeatureInfoClick(st)}),ee},_createGetFeatureInfoPanelElement:function(){var ne=document.createElement("dialog");return ne.id=this._addUID("GPgetFeatureInfoPanel"),ne.className="GPpanel gpf-panel fr-modal",ne},_createGetFeatureInfoPanelDivElement:function(){var ne=document.createElement("div");
124return ne.className="GPpanelBody gpf-panel__body fr-modal__body",ne},_createGetFeatureInfoWaitingDiv:function(){var ne=`
125        <div class="waiting-div-container"><div class="lds-ring"><div></div><div></div><div></div><div></div></div><div>
126        `;return ne},_createGetFeatureInfoNoData:function(ne){var ee=document.createElement("div");return ee.className="GPgetFeatureInfoNoData fr-py-2w fr-px-2w",console.log(this.stringToHTML(ne)),ee.insertAdjacentHTML("beforeend",ne),ee},_createGetFeatureInfoAccordionGroup:function(){var ne=document.createElement("div");return ne.id=this._addUID("GPgetFeatureInfoAccordionGroup"),ne.className="GPgetFeatureInfoAccordionGroup fr-accordions-group",ne},_createGetFeatureInfoLayerAccordion:function(ne,ee){var te=this.stringToHTML(`
127            <section class="fr-accordion">
128                <h3 class="fr-accordion__title">
129                    <button class="GPgfiLayerButton fr-accordion__btn" aria-expanded="false" aria-controls="accordion-${ne}">
130                        <span class="GPshowGfiLayerFeature"></span>
131                        <span id="gfiLayerName">${ne}</span>
132                    </button>
133                </h3>
134                <div class="fr-collapse GPgetFeatureInfoAccordionContent GPelementHidden" id="accordion-${ne}" style="margin:unset;">
135                    ${this._createGetFeatureInfoWaitingDiv()}
136                </div>
137            </section>
138        `),st=te.firstChild,ot=st.querySelector("button, button.fr-accordion__btn");return ot.addEventListener("click",ct=>{ct.currentTarget.ariaExpanded=ct.currentTarget.ariaExpanded!=="true";var ut=document.getElementById(ct.currentTarget.getAttribute("aria-controls"));ct.currentTarget.ariaExpanded==="true"?(ut.classList.add("fr-collapse--expanded"),ut.classList.remove("GPelementHidden"),setTimeout(()=>{const dt=ot.parentNode.parentNode.getBoundingClientRect(),ht=ee.getBoundingClientRect();dt.bottom>ht.bottom&&ee.scrollTo({top:ee.scrollTop-(ht.top-dt.top),behavior:"smooth"})},50)):(ut.classList.remove("fr-collapse--expanded"),ut.classList.add("GPelementHidden"))}),st}},logger$D=LoggerByDefault.getLogger("getFeatureInfo");class GetFeatureInfo extends ControlExtended{constructor(ee){if(ee=ee||{},super(ee),!(this instanceof GetFeatureInfo))throw new TypeError("ERROR CLASS_CONSTRUCTOR");return this.CLASSNAME="GetFeatureInfo",this.initialize(ee),this.container=this.initContainer(),this.element?this.element.appendChild(this.container):this.element=this.container,this}setMap(ee){ee?(this.draggable&&Draggable.dragElement(this.panelGetFeatureInfoContainer,this.panelGetFeatureInfoHeaderContainer,ee.getTargetElement()),!this.collapsed&&!this.activeExplicit&&this.buttonGetFeatureInfoShow&&this.setActive(!0),this.auto&&this.addEventsListeners(ee)):this.auto&&this.removeEventsListeners(),super.setMap(ee),this.options.position&&this.setPosition(this.options.position),this.options.gutter===!1&&this.element.classList.add("gpf-button-no-gutter")}getActive(){return this.active}setActive(ee){this.active=ee===!0,this.activeExplicit=!0,this.buttonGetFeatureInfoShow&&this.buttonGetFeatureInfoShow.setAttribute("aria-pressed",this.active)}initialize(ee){this.uid=ee.id||SelectorID.generate(),this.options={collapsed:!0,draggable:!1,auto:!0,button:!0,active:!1},Helper.assign(this.options,ee),this.button=this.options.button,this.activeExplicit=ee.active!==void 0,this.active=ee.active===void 0?!this.button:ee.active===!0,this.collapsed=this.options.collapsed,this.draggable=this.options.draggable,this.noDataMessage=this.options.noDataMessage,this.auto=this.options.auto,this.buttonGetFeatureInfoShow=null,this.panelGetFeatureInfoContainer=null,this.getFeatureInfoPanelDiv=null,this.panelGetFeatureInfoHeaderContainer=null,this.buttonGetFeatureInfoClose=null,this.getFeatureInfoAccordionGroup=null,this.panelGetFeatureInfoEntriesContainer=null,this.noDataMessageDiv=null,this.eventsListeners=[],this.pixel=[],this.coordinates=[],this.layers=[],this.res=null}initContainer(){var ee=this._createMainContainerElement();if(this.button){var te=this.buttonGetFeatureInfoShow=this._createShowGetFeatureInfoPictoElement();te.setAttribute("aria-pressed",this.active),ee.appendChild(te)}var st=this.panelGetFeatureInfoContainer=this._createGetFeatureInfoPanelElement(),ot=this.getFeatureInfoPanelDiv=this._createGetFeatureInfoPanelDivElement(),ct=this.panelGetFeatureInfoHeaderContainer=this._createPanelHeaderElement({icon:"ign-getfeatureinfo",title:"Infos sur les couches"});this.buttonGetFeatureInfoClose=ct._closeBtn,this.buttonGetFeatureInfoClose.classList.add("GPcloseGetFeatureInfo"),this.buttonGetFeatureInfoClose.addEventListener("click",dt=>{this.buttonGetFeatureInfoClose.setAttribute("aria-pressed",!1),this.onCloseGetFeatureInfoClick(dt)}),st.appendChild(ct),st.appendChild(ot);var ut=this.getFeatureInfoAccordionGroup=this._createGetFeatureInfoAccordionGroup();return ot.appendChild(ut),this.noDataMessage&&(this.noDataMessageDiv=this._createGetFeatureInfoNoData(this.noDataMessage)),ee.appendChild(st),logger$D.log(ee),ee}addEventsListeners(ee){var te=this;this.eventsListeners.singleclick=function(st){logger$D.trace(st),te.onMapClick(st)},ee.on("singleclick",this.eventsListeners.singleclick)}removeEventsListeners(){var ee=this.getMap();ee.getLayers().un("singleclick",this.eventsListeners.singleclick),delete this.eventsListeners.singleclick}getFeatureInfoIsActive(){return this.getActive()}onMapClick(ee){if(this.getFeatureInfoIsActive())if(this.getFeatureInfoAccordionGroup.remove(),this.noDataMessage&&this.noDataMessageDiv.remove(),this.buttonGetFeatureInfoClose.setAttribute("aria-pressed",!0),this.onPanelOpen(),this.layers=ee.map.getLayers().getArray().filter(st=>{if(st.isVisible(ee.map.getView())&&st.getOpacity()>0)return st}).sort((st,ot)=>ot.getZIndex()-st.getZIndex()),this.layers.length>0){var te=this.getFeatureInfoAccordionGroup=this._createGetFeatureInfoAccordionGroup();this.getFeatureInfoPanelDiv.appendChild(te),this.map=ee.map,this.pixel=ee.pixel,this.coordinates=ee.coordinate,this.res=ee.map.getView().getResolution(),this.displayGetFeatureInfo()}else{this.noDataMessage&&this.getFeatureInfoPanelDiv.append(this.noDataMessageDiv);return}}getGetFeatureInfoLayer(ee){var te={};let st=this.getLayerFormat(ee);if(te={format:st,layer:ee},st==="wmts"){let ot=ee.getSource().getFeatureInfoUrl(this.coordinates,this.res,this.map.getView().getProjection(),{INFOFORMAT:"text/html",STYLES:""});te={...te,url:ot}}if(st==="wms"){let ot=ee.getSource().getFeatureInfoUrl(this.coordinates,this.res,this.map.getView().getProjection(),{INFO_FORMAT:"text/html",STYLES:""});te={...te,url:ot}}return te}getFeaturesAtClick(ee){var te=[];
138return this.getMap().forEachFeatureAtPixel(this.pixel,function(st,ot){ee==ot&&te.push(st)}),te}async getGetFeatureInfoContent(ee){var te=null;if(ee.format==="vector"){var st=this.getFeaturesAtClick(ee.layer);return st&&(te=this.features2html(st)),te}else return fetch(ee.url).then(ot=>ot.text()).then(ot=>{var ct=!1;if((ot.trim().length===0||ot.indexOf("ServiceExceptionReport")!==-1||ot.indexOf("java.lang.NullPointerException")!==-1||ot.indexOf("java.lang.OutOfMemoryError")!==-1||ot.indexOf("not queryable")!==-1||ot.indexOf("No data")!==-1||ot.indexOf("non interrogeable")!==-1)&&(ct=!0),ct)return null;var ut=this.stringToHTML(ot);return ut&&ut.innerHTML&&ut.innerHTML.trim().length>0?ot:null}).catch(ot=>(logger$D.log(ot),ot))}getLayerTitle(ee){if(ee.layer.getProperties!==void 0&&ee.layer.getSource!==void 0){var te=ee.layer.getProperties(),st=te.source,ot="";st&&(ot=st._title||st.name||te.title||te.name||st.url_||"Couche de données")}return ot}displayGetFeatureInfo(){var ee=this.layers.map(st=>this.getGetFeatureInfoLayer(st)),te=ee.map(st=>{var ot=this.getLayerTitle(st),ct=null,ut=this._createGetFeatureInfoLayerAccordion(ot,this.getFeatureInfoPanelDiv);ut.style.display="none";var dt=!0;return new AsyncData({...st,layername:ot,content:ct,contentDiv:ut,pending:dt})});for(let st=0;st<te.length;st++)this.getFeatureInfoAccordionGroup.append(te[st].data.contentDiv);te.forEach(st=>{st.subscribe((ot,ct)=>{if(ot=="content"){if(st.set("pending",!1),!this.getActive()){st.get("contentDiv").remove();return}st.get("content")?(st.get("contentDiv").querySelector("div.fr-collapse").innerHTML=st.get("content"),this.buttonGetFeatureInfoClose.setAttribute("aria-pressed",!0),this.onPanelOpen(),st.get("contentDiv").style.display="block"):st.get("contentDiv").remove(),te.filter(ut=>ut.get("pending")===!0).length==0&&te.filter(ut=>ut.get("content")).length==0&&(this.noDataMessage?this.getFeatureInfoPanelDiv.append(this.noDataMessageDiv):this.buttonGetFeatureInfoClose.setAttribute("aria-pressed",!1))}})}),te.forEach(st=>{this.getGetFeatureInfoContent(st.data).then(ot=>{st.set("content",ot)})})}getLayerFormat(ee){var te=typeof ee.getType=="function"?ee.getType():null,
138st=ee.getSource();if(te){if(te==="VECTOR"||te==="VECTOR_TILE")return"vector";if(te==="TILE")return st.tileGrid?"wmts":"wms";if(te==="IMAGE")return"wms"}else{if(st instanceof TileWMS||st instanceof ImageWMS)return"wms";if(st instanceof WMTS$1)return"wmts";if(st instanceof VectorSource||st instanceof VectorTile)return"vector"}return"unknown"}features2html(ee){var te=document.createElement("div");return ee.forEach(function(st){var ot=st.getProperties();if(ot.hasOwnProperty("render"))te.insertAdjacentHTML("beforeend",ot.render);else{if(ot.hasOwnProperty("name")){var ct=document.createElement("div");ct.className="gp-att-name-div",ct.insertAdjacentHTML("afterbegin",ot.name),te.appendChild(ct)}if(ot.hasOwnProperty("description")){var ut=document.createElement("div");ut.className="gp-att-description-div",ut.insertAdjacentHTML("afterbegin",ot.description),te.appendChild(ut)}var dt=null,ht=!1,ft=null,pt=null,mt=null,yt=["fill","fill-opacity","label-fill","label-fill-opacity","label-stroke","label-stroke-opacity","label-stroke-width","label-font","label-textAlign","stroke","stroke-opacity","stroke-width","marker-symbol","marker-color","marker-size","geometry","value","name","description","styleUrl","extensionsNode_","icon"];for(dt in ot)if(ot[dt]!==void 0&&yt.indexOf(dt)===-1){ht||(ft=document.createElement("div"),ft.className="gp-att-others-div",pt=document.createElement("ul"),ht=!0),mt=document.createElement("li");var vt=document.createElement("span");vt.className="gp-attname-others-span",vt.appendChild(document.createTextNode(dt+" : ")),mt.appendChild(vt),mt.appendChild(document.createTextNode(ot[dt])),pt.appendChild(mt)}pt&&(ft.appendChild(pt),te.appendChild(ft))}}),te.hasChildNodes()?te=te.innerHTML:te="",te}onShowGetFeatureInfoClick(ee){ee.target.ariaPressed==="true"&&this.onPanelOpen(),ee.target.ariaPressed==="false"&&this.buttonGetFeatureInfoClose.setAttribute("aria-pressed",!1),logger$D.trace(ee)}onCloseGetFeatureInfoClick(ee){logger$D.trace(ee)}onGetFeatureInfoComputationSubmit(ee){logger$D.trace(ee)}}Object.assign(GetFeatureInfo.prototype,PanelDOM);Object.assign(GetFeatureInfo.prototype,GetFeatureInfoDOM);Object.assign(GetFeatureInfo.prototype,Widget);window.ol&&window.ol.control&&(window.ol.control.GetFeatureInfo=GetFeatureInfo);var MathUtils={modulo:function(ne,ee){var te=ne%ee;return te*ee<0?te+ee:te},decimalToDMS:function(ne,ee,te){var st=this.modulo(ne+180,360)-180,ot=Math.abs(3600*st),ct=te||0,ut=Math.pow(10,ct),dt=Math.floor(ot/3600),ht=Math.floor((ot-dt*3600)/60),ft=ot-dt*3600-ht*60;ft=Math.ceil(ft*ut)/ut,ft>=60&&(ft=0,ht+=1),ht>=60&&(ht=0,dt+=1);var pt=ee.charAt(st<0?1:0);return{d:dt,m:ht,s:ft,direction:pt}},dmsToDecimal(ne,ee,te,st){var ot=ne+ee/60+te/3600;return(st=="S"||st=="O")&&(ot=ot*-1),ot},coordinateToDecimal(ne){var ee={};return ee.lat=ne[1].toFixed(6),ee.lng=ne[0].toFixed(6),ee.unit="°",ee},coordinateToDMS(ne){return{lng:MathUtils.decimalToDMS(ne[0],"EO",2),lat:MathUtils.decimalToDMS(ne[1],"NS",2),unit:"DMS"}},coordinateToRad(ne){var ee={},te=.017453292519943295;return ee.lng=ne[0]*te,ee.lng=ee.lng.toFixed(8),ee.lat=ne[1]*te,ee.lat=ee.lat.toFixed(8),ee.unit="rad",ee},coordinateToGon(ne){var ee={},te=1.1111111111111112;return ee.lng=ne[0]*te,ee.lng=ee.lng.toFixed(8),ee.lat=ne[1]*te,ee.lat=ee.lat.toFixed(8),ee.unit="gon",ee},coordinateToMeter(ne){var ee={};return ee.x=ne[0].toFixed(2),ee.y=ne[1].toFixed(2),ee.unit="m",ee},coordinateToKMeter(ne){var ee={};return ee.x=(ne[0]/1e3).toFixed(2),ee.y=(ne[1]/1e3).toFixed(2),ee.unit="km",ee},toInteger:function(ne,ee){var te=ee||10,st=parseInt(ne,te);return!isNaN(st)&&isFinite(st)?st:null},isInteger:function(ne){if(isNaN(ne))return!1;var ee=parseFloat(ne);return(ee|0)===ee},toFloat:function(ne){var ee=parseFloat(ne);return!isNaN(ee)&&isFinite(ee)?ee:null},convertSecondsToTime:function(ne){var ee="";ne=Math.round(ne);var te=Math.floor(ne/3600),st=ne%3600,ot=Math.floor(st/60);return te&&(ee=te+"h "),ee+=ot+" min",ee},convertDistance:function(ne){var ee="",te=parseInt(ne/1e3,10);return te?ee=te+" km":ee=parseInt(ne,10)+" m",ee}},SearchEngineUtils={advancedSearchFiltersByDefault:{PositionOfInterest:[{name:"q",title:"Chercher un lieu"},{name:"category",title:"Type",value:["cimetière","aérodrome","réservoir","administratif","construction linéaire","construction ponctuelle","construction surfacique","cours d'eau","détail hydrographique","détail orographique","équipement de transport","plan d'eau","poste de transformation","terrain de sport","transport par câble","zone d'activité ou d'intérêt","zone d'habitation","lieu-dit non habité"]},{name:"postcode",title:"Code postal"},{name:"citycode",title:"Code INSEE"}],StreetAddress:[{name:"address",title:"Adresse"},{name:"city",title:"Ville"},{name:"postcode",title:"Code postal"}],CadastralParcel:[{name:"departmentcode",title:"Code département (INSEE)",description:"Code INSEE du département (ex: 01, 94)"},{name:"municipalitycode",title:"Code commune (INSEE)",description:"Code INSEE de la commune : 3 chiffres (ex: 067)"},{name:"oldmunicipalitycode",title:"Commune absorbée",description:"Commune absorbée : 3 chiffres (ex: 000, 001)"},{name:"districtcode",title:"Arrondissement",description:"Arrondissement : 3 chiffres (ex: 004, 012)"},{name:"section",title:"Section",description:"Section Cadastrale : 2 caractères (chiffre et/ou lettre)"},{name:"number",title:"Numéro",description:"Numéro de la parcelle : 4 chiffres (ex: 0041, 0250)"},{name:"sheet",title:"Feuille",description:"Numéro de la feuille cadastrale"}]},zoomToResultsByDefault:function(ne){var ee=15,te=ne.service,st=ne.fields,ot=ne.type,ct={1:11,2:12,3:13,4:14,5:15,6:16,7:17,8:17};return te==="SuggestedLocation"&&ot==="PositionOfInterest"&&(ee=ct[st.classification]),te==="GeocodedLocation"&&ot==="PositionOfInterest"&&(ee=ct[st.importance]||14),ot==="StreetAddress"&&(ee=17),ot==="CadastralParcel"&&(ee=17),ee}},GeocodeUtils={getGeocodedLocationFreeform:function(ne){var ee=ne.placeAttributes;if(ee.label)return ee.label;if(ne.type==="PositionOfInterest"){var te=ee.toponym;return ee.category&&Array.isArray(ee.category)&&ee.category.length>=2&&ee.category[0]==="administratif"?te=te+", "+ee.category[1]:ee.postcode&&(te=te+", "+ee.postcode[0],ee.city&&(te=te+" "+ee.city[0])),te}else return ne.type==="StreetAddress"?(ee.housenumber?ee.housenumber+" ":"")+ee.street+" "+(ee.postcode?ee.postcode+", ":"")+ee.city:ne.type==="CadastralParcel"?ee.id:"..."},getSuggestedLocationFreeform:function(ne){if(ne.fullText)return ne.fullText;var ee=[];return ee.push(ne.street||""),ee.push(ne.postalCode||""),ee.push(ne.commune||""),ne.type==="PositionOfInterest"&&(ee.push(ne.poi||""),ee.push(ne.kind||"")),ee.join(" - ")}};function globals(ne){ne("EPSG:4326","+title=WGS 84 (long/lat) +proj=longlat +ellps=WGS84 +datum=WGS84 +units=degrees"),ne("EPSG:4269","+title=NAD83 (long/lat) +proj=longlat +a=6378137.0 +b=6356752.31414036 +ellps=GRS80 +datum=NAD83 +units=degrees"),ne("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");for(var ee=1;ee<=60;++ee)ne("EPSG:"+(32600+ee),"+proj=utm +zone="+ee+" +datum=WGS84 +units=m"),ne("EPSG:"+(32700+ee),"+proj=utm +zone="+ee+" +south +datum=WGS84 +units=m");ne.WGS84=ne["EPSG:4326"],ne["EPSG:3785"]=ne["EPSG:3857"],ne.GOOGLE=ne["EPSG:3857"],ne["EPSG:900913"]=ne["EPSG:3857"],ne["EPSG:102113"]=ne["EPSG:3857"]}var PJD_3PARAM=1,PJD_7PARAM=2,PJD_GRIDSHIFT=3,PJD_WGS84=4,PJD_NODATU
138M=5,SRS_WGS84_SEMIMAJOR=6378137,SRS_WGS84_SEMIMINOR=6356752314e-3,SRS_WGS84_ESQUARED=.0066943799901413165,SEC_TO_RAD=484813681109536e-20,HALF_PI=Math.PI/2,SIXTH=.16666666666666666,RA4=.04722222222222222,RA6=.022156084656084655,EPSLN=1e-10,D2R$1=.017453292519943295,R2D=57.29577951308232,FORTPI=Math.PI/4,TWO_PI=Math.PI*2,SPI=3.14159265359,exports$2={};exports$2.greenwich=0;exports$2.lisbon=-9.131906111111;exports$2.paris=2.337229166667;exports$2.bogota=-74.080916666667;exports$2.madrid=-3.687938888889;exports$2.rome=12.452333333333;exports$2.bern=7.439583333333;exports$2.jakarta=106.807719444444;exports$2.ferro=-17.666666666667;exports$2.brussels=4.367975;exports$2.stockholm=18.058277777778;exports$2.athens=23.7163375;exports$2.oslo=10.722916666667;const units={mm:{to_meter:.001},cm:{to_meter:.01},ft:{to_meter:.3048},"us-ft":{to_meter:1200/3937},fath:{to_meter:1.8288},kmi:{to_meter:1852},"us-ch":{to_meter:20.1168402336805},"us-mi":{to_meter:1609.34721869444},km:{to_meter:1e3},"ind-ft":{to_meter:.30479841},"ind-yd":{to_meter:.91439523},mi:{to_meter:1609.344},yd:{to_meter:.9144},ch:{to_meter:20.1168},link:{to_meter:.201168},dm:{to_meter:.01},in:{to_meter:.0254},"ind-ch":{to_meter:20.11669506},"us-in":{to_meter:.025400050800101},"us-yd":{to_meter:.914401828803658}};var ignoredChar=/[\s_\-\/\(\)]/g;function match(ne,ee){if(ne[ee])return ne[ee];for(var te=Object.keys(ne),st=ee.toLowerCase().replace(ignoredChar,""),ot=-1,ct,ut;++ot<te.length;)if(ct=te[ot],ut=ct.toLowerCase().replace(ignoredChar,""),ut===st)return ne[ct]}function projStr(ne){var ee={},te=ne.split("+").map(function(dt){return dt.trim()}).filter(function(dt){return dt}).reduce(function(dt,ht){var ft=ht.split("=");return ft.push(!0),dt[ft[0].toLowerCase()]=ft[1],dt},{}),st,ot,ct,ut={proj:"projName",datum:"datumCode",rf:function(dt){ee.rf=parseFloat(dt)},lat_0:function(dt){ee.lat0=dt*D2R$1},lat_1:function(dt){ee.lat1=dt*D2R$1},lat_2:function(dt){ee.lat2=dt*D2R$1},lat_ts:function(dt){ee.lat_ts=dt*D2R$1},lon_0:function(dt){ee.long0=dt*D2R$1},lon_1:function(dt){ee.long1=dt*D2R$1},lon_2:function(dt){ee.long2=dt*D2R$1},alpha:function(dt){ee.alpha=parseFloat(dt)*D2R$1},gamma:function(dt){ee.rectified_grid_angle=parseFloat(dt)},lonc:function(dt){ee.longc=dt*D2R$1},x_0:function(dt){ee.x0=parseFloat(dt)},y_0:function(dt){ee.y0=parseFloat(dt)},k_0:function(dt){ee.k0=parseFloat(dt)},k:function(dt){ee.k0=parseFloat(dt)},a:function(dt){ee.a=parseFloat(dt)},b:function(dt){ee.b=parseFloat(dt)},r:function(dt){ee.a=ee.b=parseFloat(dt)},r_a:function(){ee.R_A=!0},zone:function(dt){ee.zone=parseInt(dt,10)},south:function(){ee.utmSouth=!0},towgs84:function(dt){ee.datum_params=dt.split(",").map(function(ht){return parseFloat(ht)})},to_meter:function(dt){ee.to_meter=parseFloat(dt)},units:function(dt){ee.units=dt;var ht=match(units,dt);ht&&(ee.to_meter=ht.to_meter)},from_greenwich:function(dt){ee.from_greenwich=dt*D2R$1},pm:function(dt){var ht=match(exports$2,dt);ee.from_greenwich=(ht||parseFloat(dt))*D2R$1},nadgrids:function(dt){dt==="@null"?ee.datumCode="none":ee.nadgrids=dt},axis:function(dt){var ht="ewnsud";dt.length===3&&ht.indexOf(dt.substr(0,1))!==-1&&ht.indexOf(dt.substr(1,1))!==-1&&ht.indexOf(dt.substr(2,1))!==-1&&(ee.axis=dt)},approx:function(){ee.approx=!0}};for(st in te)ot=te[st],st in ut?(ct=ut[st],typeof ct=="function"?ct(ot):ee[ct]=ot):ee[st]=ot;return typeof ee.datumCode=="string"&&ee.datumCode!=="WGS84"&&(ee.datumCode=ee.datumCode.toLowerCase()),ee}class PROJJSONBuilderBase{static getId(ee){const te=ee.find(st=>Array.isArray(st)&&st[0]==="ID");return te&&te.length>=3?{authority:te[1],code:parseInt(te[2],10)}:null}static convertUnit(ee,te="unit"){if(!ee||ee.length<3)return{type:te,name:"unknown",conversion_factor:null};const st=ee[1],ot=parseFloat(ee[2])||null,ct=ee.find(dt=>Array.isArray(dt)&&dt[0]==="ID"),ut=ct?{authority:ct[1],code:parseInt(ct[2],10)}:null;return{type:te,name:st,conversion_factor:ot,id:ut}}static convertAxis(ee){const te=ee[1]||"Unknown";let st;const ot=te.match(/^\((.)\)$/);if(ot){const ft=ot[1].toUpperCase();if(ft==="E")st="east";else if(ft==="N")st="north";else if(ft==="U")st="up";else if(ee[2])st=ee[2];else throw new Error(`Unknown axis abbreviation: ${ft}`)}else st=ee[2]||"unknown";const ct=ee.find(ft=>Array.isArray(ft)&&ft[0]==="ORDER"),ut=ct?parseInt(ct[1],10):null,dt=ee.find(ft=>Array.isArray(ft)&&(ft[0]==="LENGTHUNIT"||ft[0]==="ANGLEUNIT"||ft[0]==="SCALEUNIT")),ht=this.convertUnit(dt);return{name:te,direction:st,unit:ht,order:ut}}static extractAxes(ee){return ee.filter(te=>Array.isArray(te)&&te[0]==="AXIS").map(te=>this.convertAxis(te)).sort((te,st)=>(te.order||0)-(st.order||0))}static convert(ee,te={}){switch(ee[0]){case"PROJCRS":te.type="ProjectedCRS",te.name=ee[1],te.base_crs=ee.find(vt=>Array.isArray(vt)&&vt[0]==="BASEGEOGCRS")?this.convert(ee.find(vt=>Array.isArray(vt)&&vt[0]==="BASEGEOGCRS")):null,te.conversion=ee.find(vt=>Array.isArray(vt)&&vt[0]==="CONVERSION")?this.convert(ee.find(vt=>Array.isArray(vt)&&vt[0]==="CONVERSION")):null;const st=ee.find(vt=>Array.isArray(vt)&&vt[0]==="CS");st&&(te.coordinate_system={subtype:st[1],axis:this.extractAxes(ee)});const ot=ee.find(vt=>Array.isArray(vt)&&vt[0]==="LENGTHUNIT");if(ot){const vt=this.convertUnit(ot);te.coordinate_system.unit=vt}te.id=this.getId(ee);break;case"BASEGEOGCRS":case"GEOGCRS":case"GEODCRS":te.type=ee[0]==="GEODCRS"?"GeodeticCRS":"GeographicCRS",te.name=ee[1];const ct=ee.find(vt=>Array.isArray(vt)&&(vt[0]==="DATUM"||vt[0]==="ENSEMBLE"));if(ct){const vt=this.convert(ct);ct[0]==="ENSEMBLE"?te.datum_ensemble=vt:te.datum=vt;const _t=ee.find(bt=>Array.isArray(bt)&&bt[0]==="PRIMEM");_t&&_t[1]!=="Greenwich"&&(vt.prime_meridian={name:_t[1],longitude:parseFloat(_t[2])})}const ut=ee.find(vt=>Array.isArray(vt)&&vt[0]==="CS");te.coordinate_system={subtype:ut?ut[1]:"ellipsoidal",axis:this.extractAxes(ee)},te.id=this.getId(ee);break;case"DATUM":te.type="GeodeticReferenceFrame",te.name=ee[1],te.ellipsoid=ee.find(vt=>Array.isArray(vt)&&vt[0]==="ELLIPSOID")?this.convert(ee.find(vt=>Array.isArray(vt)&&vt[0]==="ELLIPSOID")):null;break;case"ENSEMBLE":te.type="DatumEnsemble",te.name=ee[1],te.members=ee.filter(vt
138=>Array.isArray(vt)&&vt[0]==="MEMBER").map(vt=>({type:"DatumEnsembleMember",name:vt[1],id:this.getId(vt)}));const dt=ee.find(vt=>Array.isArray(vt)&&vt[0]==="ENSEMBLEACCURACY");dt&&(te.accuracy=parseFloat(dt[1]));const ht=ee.find(vt=>Array.isArray(vt)&&vt[0]==="ELLIPSOID");ht&&(te.ellipsoid=this.convert(ht)),te.id=this.getId(ee);break;case"ELLIPSOID":te.type="Ellipsoid",te.name=ee[1],te.semi_major_axis=parseFloat(ee[2]),te.inverse_flattening=parseFloat(ee[3]),ee.find(vt=>Array.isArray(vt)&&vt[0]==="LENGTHUNIT")&&this.convert(ee.find(vt=>Array.isArray(vt)&&vt[0]==="LENGTHUNIT"),te);break;case"CONVERSION":te.type="Conversion",te.name=ee[1],te.method=ee.find(vt=>Array.isArray(vt)&&vt[0]==="METHOD")?this.convert(ee.find(vt=>Array.isArray(vt)&&vt[0]==="METHOD")):null,te.parameters=ee.filter(vt=>Array.isArray(vt)&&vt[0]==="PARAMETER").map(vt=>this.convert(vt));break;case"METHOD":te.type="Method",te.name=ee[1],te.id=this.getId(ee);break;case"PARAMETER":te.type="Parameter",te.name=ee[1],te.value=parseFloat(ee[2]),te.unit=this.convertUnit(ee.find(vt=>Array.isArray(vt)&&(vt[0]==="LENGTHUNIT"||vt[0]==="ANGLEUNIT"||vt[0]==="SCALEUNIT"))),te.id=this.getId(ee);break;case"BOUNDCRS":te.type="BoundCRS";const ft=ee.find(vt=>Array.isArray(vt)&&vt[0]==="SOURCECRS");if(ft){const vt=ft.find(_t=>Array.isArray(_t));te.source_crs=vt?this.convert(vt):null}const pt=ee.find(vt=>Array.isArray(vt)&&vt[0]==="TARGETCRS");if(pt){const vt=pt.find(_t=>Array.isArray(_t));te.target_crs=vt?this.convert(vt):null}const mt=ee.find(vt=>Array.isArray(vt)&&vt[0]==="ABRIDGEDTRANSFORMATION");mt?te.transformation=this.convert(mt):te.transformation=null;break;case"ABRIDGEDTRANSFORMATION":if(te.type="Transformation",te.name=ee[1],te.method=ee.find(vt=>Array.isArray(vt)&&vt[0]==="METHOD")?this.convert(ee.find(vt=>Array.isArray(vt)&&vt[0]==="METHOD")):null,te.parameters=ee.filter(vt=>Array.isArray(vt)&&(vt[0]==="PARAMETER"||vt[0]==="PARAMETERFILE")).map(vt=>{if(vt[0]==="PARAMETER")return this.convert(vt);if(vt[0]==="PARAMETERFILE")return{name:vt[1],value:vt[2],id:{authority:"EPSG",code:8656}}}),te.parameters.length===7){const vt=te.parameters[6];vt.name==="Scale difference"&&(vt.value=Math.round((vt.value-1)*1e12)/1e6)}te.id=this.getId(ee);break;case"AXIS":te.coordinate_system||(te.coordinate_system={type:"unspecified",axis:[]}),te.coordinate_system.axis.push(this.convertAxis(ee));break;case"LENGTHUNIT":const yt=this.convertUnit(ee,"LinearUnit");te.coordinate_system&&te.coordinate_system.axis&&te.coordinate_system.axis.forEach(vt=>{vt.unit||(vt.unit=yt)}),yt.conversion_factor&&yt.conversion_factor!==1&&te.semi_major_axis&&(te.semi_major_axis={value:te.semi_major_axis,unit:yt});break;default:te.keyword=ee[0];break}return te}}function buildPROJJSON(ne){return PROJJSONBuilderBase.convert(ne)}function detectWKTVersion(ne){const ee=ne.toUpperCase();return ee.includes("PROJCRS")||ee.includes("GEOGCRS")||ee.includes("BOUNDCRS")||ee.includes("VERTCRS")||ee.includes("LENGTHUNIT")||ee.includes("ANGLEUNIT")||ee.includes("SCALEUNIT")?"WKT2":(ee.includes("PROJCS")||ee.includes("GEOGCS")||ee.includes("LOCAL_CS")||ee.includes("VERT_CS")||ee.includes("UNIT"),"WKT1")}var NEUTRAL=1,KEYWORD=2,NUMBER=3,QUOTED=4,AFTERQUOTE=5,ENDED=-1,whitespace=/\s/,latin=/[A-Za-z]/,keyword$1=/[A-Za-z84_]/,endThings=/[,\]]/,digets=/[\d\.E\-\+]/;function Parser(ne){if(typeof ne!="string")throw new Error("not a string");this.text=ne.trim(),this.level=0,this.place=0,this.root=null,this.stack=[],this.currentObject=null,this.state=NEUTRAL}Parser.prototype.readCharicter=function(){var ne=this.text[this.place++];if(this.state!==QUOTED)for(;whitespace.test(ne);){if(this.place>=this.text.length)return;ne=this.text[this.place++]}switch(this.state){case NEUTRAL:return this.neutral(ne);case KEYWORD:return this.keyword(ne);case QUOTED:return this.quoted(ne);case AFTERQUOTE:return this.afterquote(ne);case NUMBER:return this.number(ne);case ENDED:return}};Parser.prototype.afterquote=function(ne){if(ne==='"'){this.word+='"',this.state=QUOTED;return}if(endThings.test(ne)){this.word=this.word.trim(),this.afterItem(ne);return}throw new Error(`havn't handled "`+ne+'" in afterquote yet, index '+this.place)};Parser.prototype.afterItem=function(ne){if(ne===","){this.word!==null&&this.currentObject.push(this.word),this.word=null,this.state=NEUTRAL;return}if(ne==="]"){this.level--,this.word!==null&&(this.currentObject.push(this.word),this.word=null),this.state=NEUTRAL,this.currentObject=this.stack.pop(),this.currentObject||(this.state=ENDED);return}};Parser.prototype.number=function(ne){if(digets.test(ne)){this.word+=ne;return}if(endThings.test(ne)){this.word=parseFloat(this.word),this.afterItem(ne);return}throw new Error(`havn't handled "`+ne+'" in number yet, index '+this.place)};Parser.prototype.quoted=function(ne){if(ne==='"'){this.state=AFTERQUOTE;return}this.word+=ne};Parser.prototype.keyword=function(ne){if(keyword$1.test(ne)){this.word+=ne;return}if(ne==="["){var ee=[];ee.push(this.word),this.level++,this.root===null?this.root=ee:this.currentObject.push(ee),this.stack.push(this.currentObject),this.currentObject=ee,this.state=NEUTRAL;return}if(endThings.test(ne)){this.afterItem(ne);return}throw new Error(`havn't handled "`+ne+'" in keyword yet, index '+this.place)};Parser.prototype.neutral=function(ne){if(latin.test(ne)){this.word=ne,this.state=KEYWORD;return}if(ne==='"'){this.word="",this.state=QUOTED;return}if(digets.test(ne)){this.word=ne,this.state=NUMBER;return}if(endThings.test(ne)){this.afterItem(ne);return}throw new Error(`havn't handled "`+ne+'" in neutral yet, index '+this.place)};Parser.prototype.output=function(){for(;this.place<this.text.length;)this.readCharicter();if(this.state===ENDED)return this.root;throw new Error('unable to parse string "'+this.text+'". State is '+this.state)};function parseString(ne){var ee=new Parser(ne);return ee.output()}function mapit(ne,ee,te){Array.isArray(ee)&&(te.unshift(ee),ee=null);var st=ee?{}:ne,ot=te.reduce(function(ct,ut){return sExpr(ut,ct),ct},st);ee&&(ne[ee]=ot)}function sExpr(ne,ee){if(!Array.isArray(ne)){ee[ne]=!0;return}var te=ne.shift();if(te==="PARAMETER"&&(te=ne.shift()),ne.length===1){if(Array.isArray(ne[0])){ee[te]={},sExpr(ne[0],ee[te]);return}ee[te]=ne[0];return}if(!ne.length){ee[te]=!0;return}if(te==="TOWGS84"){ee[te]=ne;return}if(te==="AXIS"){te in ee||(ee[te]=[]),ee[te].push(ne);return}Array.isArray(te)||(ee[te]={});var st;switch(te){case"UNIT":case"PRIMEM":case"VERT_DATUM":ee[te]={name:ne[0].toLowerCase(),convert:ne[1]},ne.length===3&&sExpr(ne[2],ee[te]);return;case"SPHEROID":case"ELLIPSOID":ee[te]={name:ne[0],a:ne[1],rf:ne[2]},ne.length===4&&sExpr(ne[3],ee[te]);return;case"EDATUM":case"ENGINEERINGDATUM":case"LOCAL_DATUM":case"DATUM":case"VERT_CS":case"VERTCRS":case"VERTICALCRS":ne[0]=["name",ne[0]],mapit(ee,te,ne);return;
138case"COMPD_CS":case"COMPOUNDCRS":case"FITTED_CS":case"PROJECTEDCRS":case"PROJCRS":case"GEOGCS":case"GEOCCS":case"PROJCS":case"LOCAL_CS":case"GEODCRS":case"GEODETICCRS":case"GEODETICDATUM":case"ENGCRS":case"ENGINEERINGCRS":ne[0]=["name",ne[0]],mapit(ee,te,ne),ee[te].type=te;return;default:for(st=-1;++st<ne.length;)if(!Array.isArray(ne[st]))return sExpr(ne,ee[te]);return mapit(ee,te,ne)}}var D2R=.017453292519943295;function d2r(ne){return ne*D2R}function applyProjectionDefaults(ne){const ee=(ne.projName||"").toLowerCase().replace(/_/g," ");ne.long0===void 0&&ne.longc!==void 0&&(ne.long0=ne.longc),!ne.lat_ts&&ne.lat1&&(ee==="stereographic south pole"||ee==="polar stereographic (variant b)")?(ne.lat0=d2r(ne.lat1>0?90:-90),ne.lat_ts=ne.lat1,delete ne.lat1):!ne.lat_ts&&ne.lat0&&(ee==="polar stereographic"||ee==="polar stereographic (variant a)")&&(ne.lat_ts=ne.lat0,ne.lat0=d2r(ne.lat0>0?90:-90),delete ne.lat1)}function processUnit(ne){let ee={units:null,to_meter:void 0};return typeof ne=="string"?(ee.units=ne.toLowerCase(),ee.units==="metre"&&(ee.units="meter"),ee.units==="meter"&&(ee.to_meter=1)):ne&&ne.name&&(ee.units=ne.name.toLowerCase(),ee.units==="metre"&&(ee.units="meter"),ee.to_meter=ne.conversion_factor),ee}function toValue(ne){return typeof ne=="object"?ne.value*ne.unit.conversion_factor:ne}function calculateEllipsoid(ne,ee){ne.ellipsoid.radius?(ee.a=ne.ellipsoid.radius,ee.rf=0):(ee.a=toValue(ne.ellipsoid.semi_major_axis),ne.ellipsoid.inverse_flattening!==void 0?ee.rf=ne.ellipsoid.inverse_flattening:ne.ellipsoid.semi_major_axis!==void 0&&ne.ellipsoid.semi_minor_axis!==void 0&&(ee.rf=ee.a/(ee.a-toValue(ne.ellipsoid.semi_minor_axis))))}function transformPROJJSON(ne,ee={}){return!ne||typeof ne!="object"?ne:ne.type==="BoundCRS"?(transformPROJJSON(ne.source_crs,ee),ne.transformation&&(ne.transformation.method&&ne.transformation.method.name==="NTv2"?ee.nadgrids=ne.transformation.parameters[0].value:ee.datum_params=ne.transformation.parameters.map(te=>te.value)),ee):(Object.keys(ne).forEach(te=>{const st=ne[te];if(st!==null)switch(te){case"name":if(ee.srsCode)break;ee.name=st,ee.srsCode=st;break;case"type":st==="GeographicCRS"?ee.projName="longlat":st==="GeodeticCRS"?ne.coordinate_system&&ne.coordinate_system.subtype==="Cartesian"?ee.projName="geocent":ee.projName="longlat":st==="ProjectedCRS"&&ne.conversion&&ne.conversion.method&&(ee.projName=ne.conversion.method.name);break;case"datum":case"datum_ensemble":st.ellipsoid&&(ee.ellps=st.ellipsoid.name,calculateEllipsoid(st,ee)),st.prime_meridian&&(ee.from_greenwich=st.prime_meridian.longitude*Math.PI/180);break;case"ellipsoid":ee.ellps=st.name,calculateEllipsoid(st,ee);break;case"prime_meridian":ee.long0=(st.longitude||0)*Math.PI/180;break;case"coordinate_system":if(st.axis){const ot={east:"e",north:"n",west:"w",south:"s",up:"u",down:"d",geocentricx:"e",geocentricy:"n",geocentricz:"u"},ct=st.axis.map(ut=>ot[ut.direction.toLowerCase()]);if(ct.every(Boolean)&&(ee.axis=ct.join(""),ee.axis.length===2&&(ee.axis+="u")),st.unit){const{units:ut,to_meter:dt}=processUnit(st.unit);ee.units=ut,ee.to_meter=dt}else if(st.axis[0]&&st.axis[0].unit){const{units:ut,to_meter:dt}=processUnit(st.axis[0].unit);ee.units=ut,ee.to_meter=dt}}break;case"id":st.authority&&st.code&&(ee.title=st.authority+":"+st.code);break;case"conversion":st.method&&st.method.name&&(ee.projName=st.method.name),st.parameters&&st.parameters.forEach(ot=>{const ct=ot.name.toLowerCase().replace(/\s+/g,"_"),ut=ot.value;ot.unit&&ot.unit.conversion_factor?ee[ct]=ut*ot.unit.conversion_factor:ot.unit==="degree"?ee[ct]=ut*Math.PI/180:ee[ct]=ut});break;case"unit":st.name&&(ee.units=st.name.toLowerCase(),ee.units==="metre"&&(ee.units="meter")),st.conversion_factor&&(ee.to_meter=st.conversion_factor);break;case"base_crs":transformPROJJSON(st,ee),ee.datumCode=st.id?st.id.authority+"_"+st.id.code:st.name;break}}),ee.latitude_of_false_origin!==void 0&&(ee.lat0=ee.latitude_of_false_origin),ee.longitude_of_false_origin!==void 0&&(ee.long0=ee.longitude_of_false_origin),ee.latitude_of_standard_parallel!==void 0&&(ee.lat0=ee.latitude_of_standard_parallel,ee.lat1=ee.latitude_of_standard_parallel),ee.latitude_of_1st_standard_parallel!==void 0&&(ee.lat1=ee.latitude_of_1st_standard_parallel),ee.latitude_of_2nd_standard_parallel!==void 0&&(ee.lat2=ee.latitude_of_2nd_standard_parallel),ee.latitude_of_projection_centre!==void 0&&(ee.lat0=ee.latitude_of_projection_centre),ee.longitude_of_projection_centre!==void 0&&(ee.longc=ee.longitude_of_projection_centre),ee.easting_at_false_origin!==void 0&&(ee.x0=ee.easting_at_false_origin),ee.northing_at_false_origin!==void 0&&(ee.y0=ee.northing_at_false_origin),ee.latitude_of_natural_origin!==void 0&&(ee.lat0=ee.latitude_of_natural_origin),ee.longitude_of_natural_origin!==void 0&&(ee.long0=ee.longitude_of_natural_origin),ee.longitude_of_origin!==void 0&&(ee.long0=ee.longitude_of_origin),ee.false_easting!==void 0&&(ee.x0=ee.fal
138se_easting),ee.easting_at_projection_centre&&(ee.x0=ee.easting_at_projection_centre),ee.false_northing!==void 0&&(ee.y0=ee.false_northing),ee.northing_at_projection_centre&&(ee.y0=ee.northing_at_projection_centre),ee.standard_parallel_1!==void 0&&(ee.lat1=ee.standard_parallel_1),ee.standard_parallel_2!==void 0&&(ee.lat2=ee.standard_parallel_2),ee.scale_factor_at_natural_origin!==void 0&&(ee.k0=ee.scale_factor_at_natural_origin),ee.scale_factor_at_projection_centre!==void 0&&(ee.k0=ee.scale_factor_at_projection_centre),ee.scale_factor_on_pseudo_standard_parallel!==void 0&&(ee.k0=ee.scale_factor_on_pseudo_standard_parallel),ee.azimuth!==void 0&&(ee.alpha=ee.azimuth),ee.azimuth_at_projection_centre!==void 0&&(ee.alpha=ee.azimuth_at_projection_centre),ee.angle_from_rectified_to_skew_grid&&(ee.rectified_grid_angle=ee.angle_from_rectified_to_skew_grid),applyProjectionDefaults(ee),ee)}var knownTypes=["PROJECTEDCRS","PROJCRS","GEOGCS","GEOCCS","PROJCS","LOCAL_CS","GEODCRS","GEODETICCRS","GEODETICDATUM","ENGCRS","ENGINEERINGCRS"];function rename(ne,ee){var te=ee[0],st=ee[1];!(te in ne)&&st in ne&&(ne[te]=ne[st],ee.length===3&&(ne[te]=ee[2](ne[te])))}function cleanWKT(ne){for(var ee=Object.keys(ne),te=0,st=ee.length;te<st;++te){var ot=ee[te];knownTypes.indexOf(ot)!==-1&&setPropertiesFromWkt(ne[ot]),typeof ne[ot]=="object"&&cleanWKT(ne[ot])}}function setPropertiesFromWkt(ne){if(ne.AUTHORITY){var ee=Object.keys(ne.AUTHORITY)[0];ee&&ee in ne.AUTHORITY&&(ne.title=ee+":"+ne.AUTHORITY[ee])}if(ne.type==="GEOGCS"?ne.projName="longlat":ne.type==="LOCAL_CS"?(ne.projName="identity",ne.local=!0):typeof ne.PROJECTION=="object"?ne.projName=Object.keys(ne.PROJECTION)[0]:ne.projName=ne.PROJECTION,ne.AXIS){for(var te="",st=0,ot=ne.AXIS.length;st<ot;++st){var ct=[ne.AXIS[st][0].toLowerCase(),ne.AXIS[st][1].toLowerCase()];ct[0].indexOf("north")!==-1||(ct[0]==="y"||ct[0]==="lat")&&ct[1]==="north"?te+="n":ct[0].indexOf("south")!==-1||(ct[0]==="y"||ct[0]==="lat")&&ct[1]==="south"?te+="s":ct[0].indexOf("east")!==-1||(ct[0]==="x"||ct[0]==="lon")&&ct[1]==="east"?te+="e":(ct[0].indexOf("west")!==-1||(ct[0]==="x"||ct[0]==="lon")&&ct[1]==="west")&&(te+="w")}te.length===2&&(te+="u"),te.length===3&&(ne.axis=te)}ne.UNIT&&(ne.units=ne.UNIT.name.toLowerCase(),ne.units==="metre"&&(ne.units="meter"),ne.UNIT.convert&&(ne.type==="GEOGCS"?ne.DATUM&&ne.DATUM.SPHEROID&&(ne.to_meter=ne.UNIT.convert*ne.DATUM.SPHEROID.a):ne.to_meter=ne.UNIT.convert));var ut=ne.GEOGCS;ne.type==="GEOGCS"&&(ut=ne),ut&&(ut.PRIMEM&&ut.PRIMEM.convert&&(ne.from_greenwich=d2r(ut.PRIMEM.convert)),ut.DATUM?ne.datumCode=ut.DATUM.name.toLowerCase():ne.datumCode=ut.name.toLowerCase(),ne.datumCode.slice(0,2)==="d_"&&(ne.datumCode=ne.datumCode.slice(2)),ne.datumCode==="new_zealand_1949"&&(ne.datumCode="nzgd49"),(ne.datumCode==="wgs_1984"||ne.datumCode==="world_geodetic_system_1984")&&(ne.PROJECTION==="Mercator_Auxiliary_Sphere"&&(ne.sphere=!0),ne.datumCode="wgs84"),ne.datumCode==="belge_1972"&&(ne.datumCode="rnb72"),ut.DATUM&&ut.DATUM.SPHEROID&&(ne.ellps=ut.DATUM.SPHEROID.name.replace("_19","").replace(/[Cc]larke\_18/,"clrk"),ne.ellps.toLowerCase().slice(0,13)==="international"&&(ne.ellps="intl"),ne.a=ut.DATUM.SPHEROID.a,ne.rf=parseFloat(ut.DATUM.SPHEROID.rf)),ut.DATUM&&ut.DATUM.TOWGS84&&(ne.datum_params=ut.DATUM.TOWGS84),~ne.datumCode.indexOf("osgb_1936")&&(ne.datumCode="osgb36"),~ne.datumCode.indexOf("osni_1952")&&(ne.datumCode="osni52"),(~ne.datumCode.indexOf("tm65")||~ne.datumCode.indexOf("geodetic_datum_of_1965"))&&(ne.datumCode="ire65"),ne.datumCode==="ch1903+"&&(ne.datumCode="ch1903"),~ne.datumCode.indexOf("israel")&&(ne.datumCode="isr93")),ne.b&&!isFinite(ne.b)&&(ne.b=ne.a),ne.rectified_grid_angle&&(ne.rectified_grid_angle=d2r(ne.rectified_grid_angle));function dt(pt){var mt=ne.to_meter||1;return pt*mt}var ht=function(pt){return rename(ne,pt)},ft=[["standard_parallel_1","Standard_Parallel_1"],["standard_parallel_1","Latitude of 1st standard parallel"],["standard_parallel_2","Standard_Parallel_2"],["standard_parallel_2","Latitude of 2nd standard parallel"],["false_easting","False_Easting"],["false_easting","False easting"],["false-easting","Easting at false origin"],["false_northing","False_Northing"],["false_northing","False northing"],["false_northing","Northing at false origin"],["central_meridian","Central_Meridian"],["central_meridian","Longitude of natural origin"],["central_meridian","Longitude of false origin"],["latitude_of_origin","Latitude_Of_Origin"],["latitude_of_origin","Central_Parallel"],["latitude_of_origin","Latitude of natural origin"],["latitude_of_origin","Latitude of false origin"],["scale_factor","Scale_Factor"],["k0","scale_factor"],["latitude_of_center","Latitude_Of_Center"],["latitude_of_center","Latitude_of_center"],["lat0","latitude_of_center",d2r],["longitude_of_center","Longitude_Of_Center"],["longitude_of_center","Longitude_of_center"],["longc","longitude_of_center",d2r],["x0","false_easting",dt],["y0","fal
138se_northing",dt],["long0","central_meridian",d2r],["lat0","latitude_of_origin",d2r],["lat0","standard_parallel_1",d2r],["lat1","standard_parallel_1",d2r],["lat2","standard_parallel_2",d2r],["azimuth","Azimuth"],["alpha","azimuth",d2r],["srsCode","name"]];ft.forEach(ht),applyProjectionDefaults(ne)}function wkt(ne){if(typeof ne=="object")return transformPROJJSON(ne);const ee=detectWKTVersion(ne);var te=parseString(ne);if(ee==="WKT2"){const ct=buildPROJJSON(te);return transformPROJJSON(ct)}var st=te[0],ot={};return sExpr(te,ot),cleanWKT(ot),ot[st]}function defs(ne){var ee=this;if(arguments.length===2){var te=arguments[1];typeof te=="string"?te.charAt(0)==="+"?defs[ne]=projStr(arguments[1]):defs[ne]=wkt(arguments[1]):defs[ne]=te}else if(arguments.length===1){if(Array.isArray(ne))return ne.map(function(st){Array.isArray(st)?defs.apply(ee,st):defs(st)});if(typeof ne=="string"){if(ne in defs)return defs[ne]}else"EPSG"in ne?defs["EPSG:"+ne.EPSG]=ne:"ESRI"in ne?defs["ESRI:"+ne.ESRI]=ne:"IAU2000"in ne?defs["IAU2000:"+ne.IAU2000]=ne:console.log(ne);return}}globals(defs);function testObj(ne){return typeof ne=="string"}function testDef(ne){return ne in defs}var codeWords=["PROJECTEDCRS","PROJCRS","GEOGCS","GEOCCS","PROJCS","LOCAL_CS","GEODCRS","GEODETICCRS","GEODETICDATUM","ENGCRS","ENGINEERINGCRS"];function testWKT(ne){return codeWords.some(function(ee){return ne.indexOf(ee)>-1})}var codes=["3857","900913","3785","102113"];function checkMercator(ne){var ee=match(ne,"authority");if(ee){var te=match(ee,"epsg");return te&&codes.indexOf(te)>-1}}function checkProjStr(ne){var ee=match(ne,"extension");if(ee)return match(ee,"proj4")}function testProj(ne){return ne[0]==="+"}function parse(ne){if(testObj(ne)){if(testDef(ne))return defs[ne];if(testWKT(ne)){var ee=wkt(ne);if(checkMercator(ee))return defs["EPSG:3857"];var te=checkProjStr(ee);return te?projStr(te):ee}if(testProj(ne))return projStr(ne)}else return ne}function extend(ne,ee){ne=ne||{};var te,st;if(!ee)return ne;for(st in ee)te=ee[st],te!==void 0&&(ne[st]=te);return ne}function msfnz(ne,ee,te){var st=ne*ee;return te/Math.sqrt(1-st*st)}function sign(ne){return ne<0?-1:1}function adjust_lon(ne){return Math.abs(ne)<=SPI?ne:ne-sign(ne)*TWO_PI}function tsfnz(ne,ee,te){var st=ne*te,ot=.5*ne;return st=Math.pow((1-st)/(1+st),ot),Math.tan(.5*(HALF_PI-ee))/st}function phi2z(ne,ee){for(var te=.5*ne,st,ot,ct=HALF_PI-2*Math.atan(ee),ut=0;ut<=15;ut++)if(st=ne*Math.sin(ct),ot=HALF_PI-2*Math.atan(ee*Math.pow((1-st)/(1+st),te))-ct,ct+=ot,Math.abs(ot)<=1e-10)return ct;return-9999}function init$x(){var ne=this.b/this.a;this.es=1-ne*ne,"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=msfnz(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts)):this.k0||(this.k?this.k0=this.k:this.k0=1)}function forward$v(ne){var ee=ne.x,te=ne.y;if(te*R2D>90&&te*R2D<-90&&ee*R2D>180&&ee*R2D<-180)return null;var st,ot;if(Math.abs(Math.abs(te)-HALF_PI)<=EPSLN)return null;if(this.sphere)st=this.x0+this.a*this.k0*adjust_lon(ee-this.long0),ot=this.y0+this.a*this.k0*Math.log(Math.tan(FORTPI+.5*te));else{var ct=Math.sin(te),ut=tsfnz(this.e,te,ct);st=this.x0+this.a*this.k0*adjust_lon(ee-this.long0),ot=this.y0-this.a*this.k0*Math.log(ut)}return ne.x=st,ne.y=ot,ne}function inverse$v(ne){var ee=ne.x-this.x0,te=ne.y-this.y0,st,ot;if(this.sphere)ot=HALF_PI-2*Math.atan(Math.exp(-te/(this.a*this.k0)));else{var ct=Math.exp(-te/(this.a*this.k0));if(ot=phi2z(this.e,ct),ot===-9999)return null}return st=adjust_lon(this.long0+ee/(this.a*this.k0)),ne.x=st,ne.y=ot,ne}var names$y=["Mercator","Popular Visualisation Pseudo Mercator","Mercator_1SP","Mercator_Auxiliary_Sphere","merc"];const merc={init:init$x,forward:forward$v,inverse:inverse$v,names:names$y};function init$w(){}function identity(ne){return ne}var names$x=["longlat","identity"];const longlat={init:init$w,forward:identity,inverse:identity,names:names$x};var projs=[merc,longlat],names$w={},projStore=[];function add(ne,ee){var te=projStore.length;return ne.names?(projStore[te]=ne,ne.names.forEach(function(st){names$w[st.toLowerCase()]=te}),this):(console.log(ee),!0)}function get(ne){if(!ne)return!1;var ee=ne.toLowerCase();if(typeof names$w[ee]<"u"&&projStore[names$w[ee]])return projStore[names$w[ee]]}function start(){projs.forEach(add)}const projections={start,add,get};var exports$1={};exports$1.MERIT={a:6378137,rf:298.257,ellipseName:"MERIT 1983"};exports$1.SGS85={a:6378136,rf:298.257,ellipseName:"Soviet Geodetic System 85"};exports$1.GRS80={a:6378137,rf:298.257222101,ellipseName:"GRS 1980(IUGG, 1980)"};exports$1.IAU76={a:6378140,rf:298.257,ellipseName:"IAU 1976"};exports$1.airy={a:6377563396e-3,b:635625691e-2,ellipseName:"Airy 1830"};exports$1.APL4={a:6378137,rf:298.25,ellipseName:"Appl. Physics. 1965"};exports$1.NWL9D={a:6378145,rf:298.25,ellipseName:"Naval Weapons Lab., 1965"};exports$1.mod_airy={a:6377340189e-3,b:6356034446e-3,ellipseName:"Modified Airy"};exports$1.andrae={a:637710443e-2,rf:300,ellipseName:"Andrae 1876 (Den., Iclnd.)"};exports$1.aust_SA={a:6378160,rf:298.25,ellipseName:"Australian Natl & S. Amer. 1969"};exports$1.GRS67={a:6378160,rf:298.247167427,ellipseName:"GRS 67(IUGG 1967)"};exports$1.bessel={a:6377397155e-3,rf:299.1528128,ellipseName:"Bessel 1841"};exports$1.bess_nam={a:6377483865e-3,rf:299.1528128,ellipseName:"Bessel 1841 (Namibia)"};exports$1.clrk66={a:63782064e-1,b:63565838e-1,ellipseName:"Clarke 1866"};exports$1.clrk80={a:6378249145e-3,rf:293.4663,ellipseName:"Clarke 1880 mod."};exports$1.clrk80ign={a:63782492e-1,b:6356515,rf:293.4660213,ellipseName:"Clarke 1880 (IGN)"};exports$1.clrk58={a:6378293645208759e-9,rf:294.2606763692654,ellipseName:"Clarke 1858"};exports$1.CPM={a:63757387e-1,rf:334.29,ellipseName:"Comm. des Poids et Mesures 1799"};exports$1.delmbr={a:6376428,rf:311.5,ellipseName:"Delambre 1810 (Belgium)"};exports$1.engelis={a:637813605e-2,rf:298.2566,ellipseName:"Engelis 1985"};
138exports$1.evrst30={a:6377276345e-3,rf:300.8017,ellipseName:"Everest 1830"};exports$1.evrst48={a:6377304063e-3,rf:300.8017,ellipseName:"Everest 1948"};exports$1.evrst56={a:6377301243e-3,rf:300.8017,ellipseName:"Everest 1956"};exports$1.evrst69={a:6377295664e-3,rf:300.8017,ellipseName:"Everest 1969"};exports$1.evrstSS={a:6377298556e-3,rf:300.8017,ellipseName:"Everest (Sabah & Sarawak)"};exports$1.fschr60={a:6378166,rf:298.3,ellipseName:"Fischer (Mercury Datum) 1960"};exports$1.fschr60m={a:6378155,rf:298.3,ellipseName:"Fischer 1960"};exports$1.fschr68={a:6378150,rf:298.3,ellipseName:"Fischer 1968"};exports$1.helmert={a:6378200,rf:298.3,ellipseName:"Helmert 1906"};exports$1.hough={a:6378270,rf:297,ellipseName:"Hough"};exports$1.intl={a:6378388,rf:297,ellipseName:"International 1909 (Hayford)"};exports$1.kaula={a:6378163,rf:298.24,ellipseName:"Kaula 1961"};exports$1.lerch={a:6378139,rf:298.257,ellipseName:"Lerch 1979"};exports$1.mprts={a:6397300,rf:191,ellipseName:"Maupertius 1738"};exports$1.new_intl={a:63781575e-1,b:63567722e-1,ellipseName:"New International 1967"};exports$1.plessis={a:6376523,rf:6355863,ellipseName:"Plessis 1817 (France)"};exports$1.krass={a:6378245,rf:298.3,ellipseName:"Krassovsky, 1942"};exports$1.SEasia={a:6378155,b:63567733205e-4,ellipseName:"Southeast Asia"};exports$1.walbeck={a:6376896,b:63558348467e-4,ellipseName:"Walbeck"};exports$1.WGS60={a:6378165,rf:298.3,ellipseName:"WGS 60"};exports$1.WGS66={a:6378145,rf:298.25,ellipseName:"WGS 66"};exports$1.WGS7={a:6378135,rf:298.26,ellipseName:"WGS 72"};var WGS84=exports$1.WGS84={a:6378137,rf:298.257223563,ellipseName:"WGS 84"};exports$1.sphere={a:6370997,b:6370997,ellipseName:"Normal Sphere (r=6370997)"};function eccentricity(ne,ee,te,st){var ot=ne*ne,ct=ee*ee,ut=(ot-ct)/ot,dt=0;st?(ne*=1-ut*(SIXTH+ut*(RA4+ut*RA6)),ot=ne*ne,ut=0):dt=Math.sqrt(ut);var ht=(ot-ct)/ct;return{es:ut,e:dt,ep2:ht}}function sphere(ne,ee,te,st,ot){if(!ne){var ct=match(exports$1,st);ct||(ct=WGS84),ne=ct.a,ee=ct.b,te=ct.rf}return te&&!ee&&(ee=(1-1/te)*ne),(te===0||Math.abs(ne-ee)<EPSLN)&&(ot=!0,ee=ne),{a:ne,b:ee,rf:te,sphere:ot}}var datums={wgs84:{towgs84:"0,0,0",ellipse:"WGS84",datumName:"WGS84"},ch1903:{towgs84:"674.374,15.056,405.346",ellipse:"bessel",datumName:"swiss"},ggrs87:{towgs84:"-199.87,74.79,246.62",ellipse:"GRS80",datumName:"Greek_Geodetic_Reference_System_1987"},nad83:{towgs84:"0,0,0",ellipse:"GRS80",datumName:"North_American_Datum_1983"},nad27:{nadgrids:"@conus,@alaska,@ntv2_0.gsb,@ntv1_can.dat",ellipse:"clrk66",datumName:"North_American_Datum_1927"},potsdam:{towgs84:"598.1,73.7,418.2,0.202,0.045,-2.455,6.7",ellipse:"bessel",datumName:"Potsdam Rauenberg 1950 DHDN"},carthage:{towgs84:"-263.0,6.0,431.0",ellipse:"clark80",datumName:"Carthage 1934 Tunisia"},hermannskogel:{towgs84:"577.326,90.129,463.919,5.137,1.474,5.297,2.4232",ellipse:"bessel",datumName:"Hermannskogel"},mgi:{towgs84:"577.326,90.129,463.919,5.137,1.474,5.297,2.4232",ellipse:"bessel",datumName:"Militar-Geographische Institut"},osni52:{towgs84:"482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15",ellipse:"airy",datumName:"Irish National"},ire65:{towgs84:"482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15",ellipse:"mod_airy",datumName:"Ireland 1965"},rassadiran:{towgs84:"-133.63,-157.5,-158.62",ellipse:"intl",datumName:"Rassadiran"},nzgd49:{towgs84:"59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993",ellipse:"intl",datumName:"New Zealand Geodetic Datum 1949"},osgb36:{towgs84:"446.448,-125.157,542.060,0.1502,0.2470,0.8421,-20.4894",ellipse:"airy",datumName:"Ordnance Survey of Great Britain 1936"},s_jtsk:{towgs84:"589,76,480",ellipse:"bessel",datumName:"S-JTSK (Ferro)"},beduaram:{towgs84:"-106,-87,188",ellipse:"clrk80",datumName:"Beduaram"},gunung_segara:{towgs84:"-403,684,41",ellipse:"bessel",datumName:"Gunung Segara Jakarta"},rnb72:{towgs84:"106.869,-52.2978,103.724,-0.33657,0.456955,-1.84218,1",ellipse:"intl",datumName:"Reseau National Belge 1972"}};for(var key in datums){var datum$1=datums[key];datums[datum$1.datumName]=datum$1}function datum(ne,ee,te,st,ot,ct,ut){var dt={};
138return ne===void 0||ne==="none"?dt.datum_type=PJD_NODATUM:dt.datum_type=PJD_WGS84,ee&&(dt.datum_params=ee.map(parseFloat),(dt.datum_params[0]!==0||dt.datum_params[1]!==0||dt.datum_params[2]!==0)&&(dt.datum_type=PJD_3PARAM),dt.datum_params.length>3&&(dt.datum_params[3]!==0||dt.datum_params[4]!==0||dt.datum_params[5]!==0||dt.datum_params[6]!==0)&&(dt.datum_type=PJD_7PARAM,dt.datum_params[3]*=SEC_TO_RAD,dt.datum_params[4]*=SEC_TO_RAD,dt.datum_params[5]*=SEC_TO_RAD,dt.datum_params[6]=dt.datum_params[6]/1e6+1)),ut&&(dt.datum_type=PJD_GRIDSHIFT,dt.grids=ut),dt.a=te,dt.b=st,dt.es=ot,dt.ep2=ct,dt}var loadedNadgrids={};function nadgrid(ne,ee){var te=new DataView(ee),st=detectLittleEndian(te),ot=readHeader(te,st),ct=readSubgrids(te,ot,st),ut={header:ot,subgrids:ct};return loadedNadgrids[ne]=ut,ut}function getNadgrids(ne){if(ne===void 0)return null;var ee=ne.split(",");return ee.map(parseNadgridString)}function parseNadgridString(ne){if(ne.length===0)return null;var ee=ne[0]==="@";return ee&&(ne=ne.slice(1)),ne==="null"?{name:"null",mandatory:!ee,grid:null,isNull:!0}:{name:ne,mandatory:!ee,grid:loadedNadgrids[ne]||null,isNull:!1}}function secondsToRadians(ne){return ne/3600*Math.PI/180}function detectLittleEndian(ne){var ee=ne.getInt32(8,!1);return ee===11?!1:(ee=ne.getInt32(8,!0),ee!==11&&console.warn("Failed to detect nadgrid endian-ness, defaulting to little-endian"),!0)}function readHeader(ne,ee){return{nFields:ne.getInt32(8,ee),nSubgridFields:ne.getInt32(24,ee),nSubgrids:ne.getInt32(40,ee),shiftType:decodeString(ne,56,64).trim(),fromSemiMajorAxis:ne.getFloat64(120,ee),fromSemiMinorAxis:ne.getFloat64(136,ee),toSemiMajorAxis:ne.getFloat64(152,ee),toSemiMinorAxis:ne.getFloat64(168,ee)}}function decodeString(ne,ee,te){return String.fromCharCode.apply(null,new Uint8Array(ne.buffer.slice(ee,te)))}function readSubgrids(ne,ee,te){for(var st=176,ot=[],ct=0;ct<ee.nSubgrids;ct++){var ut=readGridHeader(ne,st,te),dt=readGridNodes(ne,st,ut,te),ht=Math.round(1+(ut.upperLongitude-ut.lowerLongitude)/ut.longitudeInterval),ft=Math.round(1+(ut.upperLatitude-ut.lowerLatitude)/ut.latitudeInterval);ot.push({ll:[secondsToRadians(ut.lowerLongitude),secondsToRadians(ut.lowerLatitude)],del:[secondsToRadians(ut.longitudeInterval),secondsToRadians(ut.latitudeInterval)],lim:[ht,ft],count:ut.gridNodeCount,cvs:mapNodes(dt)}),st+=176+ut.gridNodeCount*16}return ot}function mapNodes(ne){return ne.map(function(ee){return[secondsToRadians(ee.longitudeShift),secondsToRadians(ee.latitudeShift)]})}function readGridHeader(ne,ee,te){return{name:decodeString(ne,ee+8,ee+16).trim(),parent:decodeString(ne,ee+24,ee+24+8).trim(),lowerLatitude:ne.getFloat64(ee+72,te),upperLatitude:ne.getFloat64(ee+88,te),lowerLongitude:ne.getFloat64(ee+104,te),upperLongitude:ne.getFloat64(ee+120,te),latitudeInterval:ne.getFloat64(ee+136,te),longitudeInterval:ne.getFloat64(ee+152,te),gridNodeCount:ne.getInt32(ee+168,te)}}function readGridNodes(ne,ee,te,st){for(var ot=ee+176,ct=16,ut=[],dt=0;dt<te.gridNodeCount;dt++){var ht={latitudeShift:ne.getFloat32(ot+dt*ct,st),longitudeShift:ne.getFloat32(ot+dt*ct+4,st),latitudeAccuracy:ne.getFloat32(ot+dt*ct+8,st),longitudeAccuracy:ne.getFloat32(ot+dt*ct+12,st)};ut.push(ht)}return ut}function Projection(ne,ee){if(!(this instanceof Projection))return new Projection(ne);ee=ee||function(ft){if(ft)throw ft};var te=parse(ne);if(typeof te!="object"){ee("Could not parse to valid json: "+ne);return}var st=Projection.projections.get(te.projName);if(!st){ee("Could not get projection name from: "+ne);return}if(te.datumCode&&te.datumCode!=="none"){var ot=match(datums,te.datumCode);ot&&(te.datum_params=te.datum_params||(ot.towgs84?ot.towgs84.split(","):null),te.ellps=ot.ellipse,te.datumName=ot.datumName?ot.datumName:te.datumCode)}te.k0=te.k0||1,te.axis=te.axis||"enu",te.ellps=te.ellps||"wgs84",te.lat1=te.lat1||te.lat0;var ct=sphere(te.a,te.b,te.rf,te.ellps,te.sphere),ut=eccentricity(ct.a,ct.b,ct.rf,te.R_A),dt=getNadgrids(te.nadgrids),ht=te.datum||datum(te.datumCode,te.datum_params,ct.a,ct.b,ut.es,ut.ep2,dt);extend(this,te),extend(this,st),this.a=ct.a,this.b=ct.b,this.rf=ct.rf,this.sphere=ct.sphere,this.es=ut.es,this.e=ut.e,this.ep2=ut.ep2,this.datum=ht,this.init(),ee(null,this)}Projection.projections=projections;Projection.projections.start();function compareDatums(ne,ee){return ne.datum_type!==ee.datum_type||ne.a!==ee.a||Math.abs(ne.es-ee.es)>5e-11?!1:ne.datum_type===PJD_3PARAM?ne.datum_params[0]===ee.datum_params[0]&&ne.datum_params[1]===ee.datum_params[1]&&ne.datum_params[2]===ee.datum_params[2]:ne.datum_type===PJD_7PARAM?ne.datum_params[0]===ee.datum_params[0]&&ne.datum_params[1]===ee.datum_params[1]&&ne.datum_params[2]===ee.datum_params[2]&&ne.datum_params[3]===ee.datum_params[3]&&ne.datum_params[4]===ee.datum_params[4]&&ne.datum_params[5]===ee.datum_params[5]&&ne.datum_params[6]===ee.datum_params[6]:!0}function geodeticToGeocentric(ne,ee,te){var st=ne.x,ot=ne.y,ct=ne.z?ne.z:0,ut,dt,ht,ft;if(ot<-HALF_PI&&ot>-1.001*HALF_PI)ot=-HALF_PI;else if(ot>HALF_PI&&ot<1.001*HALF_PI)ot=HALF_PI;else{if(ot<-HALF_PI)return{x:-1/0,y:-1/0,z:ne.z};if(ot>HALF_PI)return{x:1/0,y:1/0,z:ne.z}}return st>
138Math.PI&&(st-=2*Math.PI),dt=Math.sin(ot),ft=Math.cos(ot),ht=dt*dt,ut=te/Math.sqrt(1-ee*ht),{x:(ut+ct)*ft*Math.cos(st),y:(ut+ct)*ft*Math.sin(st),z:(ut*(1-ee)+ct)*dt}}function geocentricToGeodetic(ne,ee,te,st){var ot=1e-12,ct=ot*ot,ut=30,dt,ht,ft,pt,mt,yt,vt,_t,bt,xt,Mt,Ot,kt,Nt=ne.x,Gt=ne.y,Bt=ne.z?ne.z:0,Ut,Vt,Ht;if(dt=Math.sqrt(Nt*Nt+Gt*Gt),ht=Math.sqrt(Nt*Nt+Gt*Gt+Bt*Bt),dt/te<ot){if(Ut=0,ht/te<ot)return Vt=HALF_PI,Ht=-st,{x:ne.x,y:ne.y,z:ne.z}}else Ut=Math.atan2(Gt,Nt);ft=Bt/ht,pt=dt/ht,mt=1/Math.sqrt(1-ee*(2-ee)*pt*pt),_t=pt*(1-ee)*mt,bt=ft*mt,kt=0;do kt++,vt=te/Math.sqrt(1-ee*bt*bt),Ht=dt*_t+Bt*bt-vt*(1-ee*bt*bt),yt=ee*vt/(vt+Ht),mt=1/Math.sqrt(1-yt*(2-yt)*pt*pt),xt=pt*(1-yt)*mt,Mt=ft*mt,Ot=Mt*_t-xt*bt,_t=xt,bt=Mt;while(Ot*Ot>ct&&kt<ut);return Vt=Math.atan(Mt/Math.abs(xt)),{x:Ut,y:Vt,z:Ht}}function geocentricToWgs84(ne,ee,te){if(ee===PJD_3PARAM)return{x:ne.x+te[0],y:ne.y+te[1],z:ne.z+te[2]};if(ee===PJD_7PARAM){var st=te[0],ot=te[1],ct=te[2],ut=te[3],dt=te[4],ht=te[5],ft=te[6];return{x:ft*(ne.x-ht*ne.y+dt*ne.z)+st,y:ft*(ht*ne.x+ne.y-ut*ne.z)+ot,z:ft*(-dt*ne.x+ut*ne.y+ne.z)+ct}}}function geocentricFromWgs84(ne,ee,te){if(ee===PJD_3PARAM)return{x:ne.x-te[0],y:ne.y-te[1],z:ne.z-te[2]};if(ee===PJD_7PARAM){var st=te[0],ot=te[1],ct=te[2],ut=te[3],dt=te[4],ht=te[5],ft=te[6],pt=(ne.x-st)/ft,mt=(ne.y-ot)/ft,yt=(ne.z-ct)/ft;return{x:pt+ht*mt-dt*yt,y:-ht*pt+mt+ut*yt,z:dt*pt-ut*mt+yt}}}function checkParams(ne){return ne===PJD_3PARAM||ne===PJD_7PARAM}function datum_transform(ne,ee,te){if(compareDatums(ne,ee)||ne.datum_type===PJD_NODATUM||ee.datum_type===PJD_NODATUM)return te;var st=ne.a,ot=ne.es;if(ne.datum_type===PJD_GRIDSHIFT){var ct=applyGridShift(ne,!1,te);if(ct!==0)return;st=SRS_WGS84_SEMIMAJOR,ot=SRS_WGS84_ESQUARED}var ut=ee.a,dt=ee.b,ht=ee.es;if(ee.datum_type===PJD_GRIDSHIFT&&(ut=SRS_WGS84_SEMIMAJOR,dt=SRS_WGS84_SEMIMINOR,ht=SRS_WGS84_ESQUARED),ot===ht&&st===ut&&!checkParams(ne.datum_type)&&!checkParams(ee.datum_type))return te;if(te=geodeticToGeocentric(te,ot,st),checkParams(ne.datum_type)&&(te=geocentricToWgs84(te,ne.datum_type,ne.datum_params)),checkParams(ee.datum_type)&&(te=geocentricFromWgs84(te,ee.datum_type,ee.datum_params)),te=geocentricToGeodetic(te,ht,ut,dt),ee.datum_type===PJD_GRIDSHIFT){var ft=applyGridShift(ee,!0,te);if(ft!==0)return}return te}function applyGridShift(ne,ee,te){if(ne.grids===null||ne.grids.length===0)return console.log("Grid shift grids not found"),-1;var st={x:-te.x,y:te.y},ot={x:Number.NaN,y:Number.NaN},ct=[];e:for(var ut=0;ut<ne.grids.length;ut++){var dt=ne.grids[ut];if(ct.push(dt.name),dt.isNull){ot=st;break}if(dt.mandatory,dt.grid===null){if(dt.mandatory)return console.log("Unable to find mandatory grid '"+dt.name+"'"),-1;continue}for(var ht=dt.grid.subgrids,ft=0,pt=ht.length;ft<pt;ft++){var mt=ht[ft],yt=(Math.abs(mt.del[1])+Math.abs(mt.del[0]))/1e4,vt=mt.ll[0]-yt,_t=mt.ll[1]-yt,bt=mt.ll[0]+(mt.lim[0]-1)*mt.del[0]+yt,xt=mt.ll[1]+(mt.lim[1]-1)*mt.del[1]+yt;if(!(_t>st.y||vt>st.x||xt<st.y||bt<st.x)&&(ot=applySubgridShift(st,ee,mt),!isNaN(ot.x)))break e}}return isNaN(ot.x)?(console.log("Failed to find a grid shift table for location '"+-st.x*R2D+" "+st.y*R2D+" tried: '"+ct+"'"),-1):(te.x=-ot.x,te.y=ot.y,0)}function applySubgridShift(ne,ee,te){var st={x:Number.NaN,y:Number.NaN};if(isNaN(ne.x))return st;var ot={x:ne.x,y:ne.y};ot.x-=te.ll[0],ot.y-=te.ll[1],ot.x=adjust_lon(ot.x-Math.PI)+Math.PI;var ct=nadInterpolate(ot,te);if(ee){if(isNaN(ct.x))return st;ct.x=ot.x-ct.x,ct.y=ot.y-ct.y;var ut=9,dt=1e-12,ht,ft;do{if(ft=nadInterpolate(ct,te),isNaN(ft.x)){console.log("Inverse grid shift iteration failed, presumably at grid edge.  Using first approximation.");break}ht={x:ot.x-(ft.x+ct.x),y:ot.y-(ft.y+ct.y)},ct.x+=ht.x,ct.y+=ht.y}while(ut--&&Math.abs(ht.x)>dt&&Math.abs(ht.y)>dt);if(ut<0)return console.log("Inverse grid shift iterator failed to converge."),st;st.x=adjust_lon(ct.x+te.ll[0]),st.y=ct.y+te.ll[1]}else isNaN(ct.x)||(st.x=ne.x+ct.x,st.y=ne.y+ct.y);return st}function nadInterpolate(ne,ee){var te={x:ne.x/ee.del[0],y:ne.y/ee.del[1]},st={x:Math.floor(te.x),y:Math.floor(te.y)},ot={x:te.x-1*st.x,y:te.y-1*st.y},ct={x:Number.NaN,y:Number.NaN},ut;if(st.x<0||st.x>=ee.lim[0]||st.y<0||st.y>=ee.lim[1])return ct;ut=st.y*ee.lim[0]+st.x;var dt={x:ee.cvs[ut][0],y:ee.cvs[ut][1]};ut++;var ht={x:ee.cvs[ut][0],y:ee.cvs[ut][1]};ut+=ee.lim[0];var ft={x:ee.cvs[ut][0],y:ee.cvs[ut][1]};ut--;var pt={x:ee.cvs[ut][0],y:ee.cvs[ut][1]},mt=ot.x*ot.y,yt=ot.x*(1-ot.y),vt=(1-ot.x)*(1-ot.y),_t=(1-ot.x)*ot.y;return ct.x=vt*dt.x+yt*ht.x+_t*pt.x+mt*ft.x,ct.y=vt*dt.y+yt*ht.y+_t*pt.y+mt*ft.y,ct}function adjust_axis(ne,ee,te){var st=te.x,ot=te.y,ct=te.z||0,ut,dt,ht,ft={};for(ht=0;ht<3;ht++)if(!(ee&&ht===2&&te.z===void 0))switch(ht===0?(ut=st,"ew".indexOf(ne.axis[ht])!==-1?dt="x":dt="y"):ht===1?(ut=ot,"ns".indexOf(ne.axis[ht])!==-1?dt="y":dt="x"):(ut=ct,dt="z"),ne.axis[ht]){case"e":ft[dt]=ut;break;case"w":ft[dt]=-ut;break;case"n":ft[dt]=ut;break;case"s":ft[dt]=-ut;break;case"u":te[dt]!==void 0&&(ft.z=ut);break;case"d":te[dt]!==void 0&&(ft.z=-ut);break;default:return null}return ft}function common(ne){var ee={x:ne[0],y:ne[1]};return ne.length>2&&(ee.z=ne[2]),ne.length>3&&(ee.m=ne[3]),ee}function checkSanity(ne){checkCoord(ne.x),checkCoord(ne.y)}function checkCoord(ne){if(typeof Number.isFinite=="function"){if(Number.isFinite(ne))return;throw new TypeError("coordinates must be finite numbers")}if(typeof ne!="number"||ne!==ne||!isFinite(ne))throw new TypeError("coordinates must be finite numbers")}function checkNotWGS(ne,ee){return(ne.datum.datum_type===PJD_3PARAM||ne.datum.datum_type===PJD_7PARAM||ne.datum.datum_type===PJD_GRIDSHIFT)&&ee.datumCode!=="WGS84"||(ee.datum.datum_type===PJD_3PARAM||ee.datum.datum_type===PJD_7PARAM||ee.datum.datum_type===PJD_GRIDSHIFT)&&ne.datumCode!=="WGS84"}function transform(ne,ee,te,st){var ot;Array.isArray(te)?te=common(te):te={x:te.x,y:te.y,z:te.z,m:te.m};var ct=te.z!==void 0;if(checkSanity(te),ne.datum&&ee.datum&&checkNotWGS(ne,ee)&&(ot=new Projection("WGS84"),te=transform(ne,ot,te,st),ne=ot),st&&ne.axis!=="enu"&&(te=adjust_axis(ne,!1,te)),ne.projName==="longlat")te={x:te.x*D2R$1,y:te.y*D2R$1,z:te.z||0};else if(ne.to_meter&&(te={x:te.x*ne.to_meter,y:te.y*ne.to_meter,z:te.z||0}),te=ne.inverse(te),!te)return;if(ne.from_greenwich&&(te.x+=ne.from_greenwich),te=datum_transform(ne.datum,ee.datum,te),!!te)return ee.from_greenwich&&(te={x:te.x-ee.from_greenwich,y:te.y,z:te.z||0}),ee.projName==="longlat"?te={x:te.x*R2D,y:te.y*R2D,z:te.z||0}:(te=ee.forward(te),ee.to_meter&&(te={x:te.x/ee.to_meter,y:te.y/ee.to_meter,z:te.z||0})),st&&ee.axis!=="enu"?adjust_axis(ee,!0,te):(te&&!ct&&delete te.z,te)}var wgs84=Projection("WGS84");function transformer(ne,ee,te,st){var ot,ct,ut;return Array.isArray(te)?(ot=transform(ne,ee,te,st)||{x:NaN,y:NaN},te.length>2?typeof ne.name<"u"&&ne.name==="geocent"||typeof ee.name<"u"&&ee.name==="geocent"?typeof ot.z=="number"?[ot.x,ot.y,ot.z].concat(te.slice(3)):[ot.x,ot.y,te[2]].concat(te.slice(3)):[ot.x,ot.y].concat(te.slice(2)):[ot.x,ot.y]):(ct=transform(ne,ee,te,st),ut=Object.keys(te),ut.length===2||ut.forEach(function(dt){if(typeof ne.name<"u"&&ne.name==="geocent"||typeof ee.name<"u"&&ee.name==="geocent"){if(dt==="x"||dt==="y"||dt==="z")return}else if(dt==="x"||dt==="y")return;ct[dt]=te[dt]}),ct)}
138function checkProj(ne){return ne instanceof Projection?ne:ne.oProj?ne.oProj:Projection(ne)}function proj4(ne,ee,te){ne=checkProj(ne);var st=!1,ot;return typeof ee>"u"?(ee=ne,ne=wgs84,st=!0):(typeof ee.x<"u"||Array.isArray(ee))&&(te=ee,ee=ne,ne=wgs84,st=!0),ee=checkProj(ee),te?transformer(ne,ee,te):(ot={forward:function(ct,ut){return transformer(ne,ee,ct,ut)},inverse:function(ct,ut){return transformer(ee,ne,ct,ut)}},st&&(ot.oProj=ee),ot)}var NUM_100K_SETS=6,SET_ORIGIN_COLUMN_LETTERS="AJSAJS",SET_ORIGIN_ROW_LETTERS="AFAFAF",A$1=65,I$3=73,O=79,V$2=86,Z$1=90;const mgrs={forward:forward$u,inverse:inverse$u,toPoint};function forward$u(ne,ee){return ee=ee||5,encode(LLtoUTM({lat:ne[1],lon:ne[0]}),ee)}function inverse$u(ne){var ee=UTMtoLL(decode$1(ne.toUpperCase()));return ee.lat&&ee.lon?[ee.lon,ee.lat,ee.lon,ee.lat]:[ee.left,ee.bottom,ee.right,ee.top]}function toPoint(ne){var ee=UTMtoLL(decode$1(ne.toUpperCase()));return ee.lat&&ee.lon?[ee.lon,ee.lat]:[(ee.left+ee.right)/2,(ee.top+ee.bottom)/2]}function degToRad(ne){return ne*(Math.PI/180)}function radToDeg(ne){return 180*(ne/Math.PI)}function LLtoUTM(ne){var ee=ne.lat,te=ne.lon,st=6378137,ot=.00669438,ct=.9996,ut,dt,ht,ft,pt,mt,yt,vt=degToRad(ee),_t=degToRad(te),bt,xt;xt=Math.floor((te+180)/6)+1,te===180&&(xt=60),ee>=56&&ee<64&&te>=3&&te<12&&(xt=32),ee>=72&&ee<84&&(te>=0&&te<9?xt=31:te>=9&&te<21?xt=33:te>=21&&te<33?xt=35:te>=33&&te<42&&(xt=37)),ut=(xt-1)*6-180+3,bt=degToRad(ut),dt=ot/(1-ot),ht=st/Math.sqrt(1-ot*Math.sin(vt)*Math.sin(vt)),ft=Math.tan(vt)*Math.tan(vt),pt=dt*Math.cos(vt)*Math.cos(vt),mt=Math.cos(vt)*(_t-bt),yt=st*((1-ot/4-3*ot*ot/64-5*ot*ot*ot/256)*vt-(3*ot/8+3*ot*ot/32+45*ot*ot*ot/1024)*Math.sin(2*vt)+(15*ot*ot/256+45*ot*ot*ot/1024)*Math.sin(4*vt)-35*ot*ot*ot/3072*Math.sin(6*vt));var Mt=ct*ht*(mt+(1-ft+pt)*mt*mt*mt/6+(5-18*ft+ft*ft+72*pt-58*dt)*mt*mt*mt*mt*mt/120)+5e5,Ot=ct*(yt+ht*Math.tan(vt)*(mt*mt/2+(5-ft+9*pt+4*pt*pt)*mt*mt*mt*mt/24+(61-58*ft+ft*ft+600*pt-330*dt)*mt*mt*mt*mt*mt*mt/720));return ee<0&&(Ot+=1e7),{northing:Math.round(Ot),easting:Math.round(Mt),zoneNumber:xt,zoneLetter:getLetterDesignator(ee)}}function UTMtoLL(ne){var ee=ne.northing,te=ne.easting,st=ne.zoneLetter,ot=ne.zoneNumber;if(ot<0||ot>60)return null;var ct=.9996,ut=6378137,dt=.00669438,ht,ft=(1-Math.sqrt(1-dt))/(1+Math.sqrt(1-dt)),pt,mt,yt,vt,_t,bt,xt,Mt,Ot,kt=te-5e5,Nt=ee;st<"N"&&(Nt-=1e7),xt=(ot-1)*6-180+3,ht=dt/(1-dt),bt=Nt/ct,Mt=bt/(ut*(1-dt/4-3*dt*dt/64-5*dt*dt*dt/256)),Ot=Mt+(3*ft/2-27*ft*ft*ft/32)*Math.sin(2*Mt)+(21*ft*ft/16-55*ft*ft*ft*ft/32)*Math.sin(4*Mt)+151*ft*ft*ft/96*Math.sin(6*Mt),pt=ut/Math.sqrt(1-dt*Math.sin(Ot)*Math.sin(Ot)),mt=Math.tan(Ot)*Math.tan(Ot),yt=ht*Math.cos(Ot)*Math.cos(Ot),vt=ut*(1-dt)/Math.pow(1-dt*Math.sin(Ot)*Math.sin(Ot),1.5),_t=kt/(pt*ct);var Gt=Ot-pt*Math.tan(Ot)/vt*(_t*_t/2-(5+3*mt+10*yt-4*yt*yt-9*ht)*_t*_t*_t*_t/24+(61+90*mt+298*yt+45*mt*mt-252*ht-3*yt*yt)*_t*_t*_t*_t*_t*_t/720);Gt=radToDeg(Gt);var Bt=(_t-(1+2*mt+yt)*_t*_t*_t/6+(5-2*yt+28*mt-3*yt*yt+8*ht+24*mt*mt)*_t*_t*_t*_t*_t/120)/Math.cos(Ot);Bt=xt+radToDeg(Bt);var Ut;if(ne.accuracy){var Vt=UTMtoLL({northing:ne.northing+ne.accuracy,easting:ne.easting+ne.accuracy,zoneLetter:ne.zoneLetter,zoneNumber:ne.zoneNumber});Ut={top:Vt.lat,right:Vt.lon,bottom:Gt,left:Bt}}else Ut={lat:Gt,lon:Bt};return Ut}function getLetterDesignator(ne){var ee="Z";return 84>=ne&&ne>=72?ee="X":72>ne&&ne>=64?ee="W":64>ne&&ne>=56?ee="V":56>ne&&ne>=48?ee="U":48>ne&&ne>=40?ee="T":40>ne&&ne>=32?ee="S":32>ne&&ne>=24?ee="R":24>ne&&ne>=16?ee="Q":16>ne&&ne>=8?ee="P":8>ne&&ne>=0?ee="N":0>ne&&ne>=-8?ee="M":-8>ne&&ne>=-16?ee="L":-16>ne&&ne>=-24?ee="K":-24>ne&&ne>=-32?ee="J":-32>ne&&ne>=-40?ee="H":-40>ne&&ne>=-48?ee="G":-48>ne&&ne>=-56?ee="F":-56>ne&&ne>=-64?ee="E":-64>ne&&ne>=-72?ee="D":-72>ne&&ne>=-80&&(ee="C"),ee}function encode(ne,ee){var te="00000"+ne.easting,st="00000"+ne.northing;return ne.zoneNumber+ne.zoneLetter+get100kID(ne.easting,ne.northing,ne.zoneNumber)+te.substr(te.length-5,ee)+st.substr(st.length-5,ee)}function get100kID(ne,ee,te){var st=get100kSetForZone(te),ot=Math.floor(ne/1e5),ct=Math.floor(ee/1e5)%20;return getLetter100kID(ot,ct,st)}function get100kSetForZone(ne){var ee=ne%NUM_100K_SETS;return ee===0&&(ee=NUM_100K_SETS),ee}function getLetter100kID(ne,ee,te){var st=te-1,ot=SET_ORIGIN_COLUMN_LETTERS.charCodeAt(st),ct=SET_ORIGIN_ROW_LETTERS.charCodeAt(st),ut=ot+ne-1,dt=ct+ee,ht=!1;ut>Z$1&&(ut=ut-Z$1+A$1-1,ht=!0),(ut===I$3||ot<I$3&&ut>I$3||(ut>I$3||ot<I$3)&&ht)&&ut++,(ut===O||ot<O&&ut>O||(ut>O||ot<O)&&ht)&&(ut++,ut===I$3&&ut++),ut>Z$1&&(ut=ut-Z$1+A$1-1),dt>V$2?(dt=dt-V$2+A$1-1,ht=!0):ht=!1,(dt===I$3||ct<I$3&&dt>I$3||(dt>I$3||ct<I$3)&&ht)&&dt++,(dt===O||ct<O&&dt>O||(dt>O||ct<O)&&ht)&&(dt++,dt===I$3&&dt++),dt>V$2&&(dt=dt-V$2+A$1-1);var ft=String.fromCharCode(ut)+String.fromCharCode(dt);return ft}function decode$1(ne){if(ne&&ne.length===0)throw"MGRSPoint coverting from nothing";for(var ee=ne.length,te=null,st="",ot,ct=0;!/[A-Z]/.test(ot=ne.charAt(ct));){if(ct>=2)throw"MGRSPoint bad conversion from: "+ne;st+=ot,ct++}var ut=parseInt(st,10);if(ct===0||ct+3>ee)throw"MGRSPoint bad conversion from: "+ne;var dt=ne.charAt(ct++);if(dt<="A"||dt==="B"||dt==="Y"||dt>="Z"||dt==="I"||dt==="O")throw"MGRSPoint zone letter "+dt+" not handled: "+ne;te=ne.substring(ct,ct+=2);for(var ht=get100kSetForZone(ut),ft=getEastingFromChar(te.charAt(0),ht),pt=getNorthingFromChar(te.charAt(1),ht);pt<getMinNorthing(dt);)pt+=2e6;var mt=ee-ct;if(mt%2!==0)throw`MGRSPoint has to have an even number 
139of digits after the zone letter and two 100km letters - front 
140half for easting meters, second half for 
141northing meters`+ne;var yt=mt/2,vt=0,_t=0,bt,xt,Mt,Ot,kt;return yt>0&&(bt=1e5/Math.pow(10,yt),xt=ne.substring(ct,ct+yt),vt=parseFloat(xt)*bt,Mt=ne.substring(ct+yt),_t=parseFloat(Mt)*bt),Ot=vt+ft,kt=_t+pt,{easting:Ot,northing:kt,zoneLetter:dt,zoneNumber:ut,accuracy:bt}}function getEastingFromChar(ne,ee){for(var te=SET_ORIGIN_COLUMN_LETTERS.charCodeAt(ee-1),st=1e5,ot=!1;te!==ne.charCodeAt(0);){if(te++,te===I$3&&te++,te===O&&te++,te>Z$1){if(ot)throw"Bad character: "+ne;te=A$1,ot=!0}st+=1e5}return st}function getNorthingFromChar(ne,ee){if(ne>"V")throw"MGRSPoint given invalid Northing "+ne;for(var te=SET_ORIGIN_ROW_LETTERS.charCodeAt(ee-1),st=0,ot=!1;te!==ne.charCodeAt(0);){if(te++,te===I$3&&te++,te===O&&te++,te>V$2){if(ot)throw"Bad character: "+ne;te=A$1,ot=!0}st+=1e5}return st}function getMinNorthing(ne){var ee;switch(ne){case"C":ee=11e5;break;case"D":ee=2e6;break;case"E":ee=28e5;break;case"F":ee=37e5;break;case"G":ee=46e5;break;case"H":ee=55e5;break;case"J":ee=64e5;break;case"K":ee=73e5;break;case"L":ee=82e5;break;case"M":ee=91e5;break;case"N":ee=0;break;case"P":ee=8e5;break;case"Q":ee=17e5;break;case"R":ee=26e5;break;case"S":ee=35e5;break;case"T":ee=44e5;break;case"U":ee=53e5;break;case"V":ee=62e5;break;case"W":ee=7e6;break;case"X":ee=79e5;break;default:ee=-1}if(ee>=0)return ee;throw"Invalid zone letter: "+ne}function Point(ne,ee,te){if(!(this instanceof Point))return new Point(ne,ee,te);if(Array.isArray(ne))this.x=ne[0],this.y=ne[1],this.z=ne[2]||0;else if(typeof ne=="object")this.x=ne.x,this.y=ne.y,this.z=ne.z||0;else if(typeof ne=="string"&&typeof ee>"u"){var st=ne.split(",");this.x=parseFloat(st[0],10),this.y=parseFloat(st[1],10),this.z=parseFloat(st[2],10)||0}else this.x=ne,this.y=ee,this.z=te||0;console.warn("proj4.Point will be removed in version 3, use proj4.toPoint")}Point.fromMGRS=function(ne){return new Point(toPoint(ne))};Point.prototype.toMGRS=function(ne){return forward$u([this.x,this.y],ne)};var C00=1,C02=.25,C04=.046875,C06=.01953125,C08=.01068115234375,C22=.75,C44=.46875,C46=.013020833333333334,C48=.00
1417120768229166667,C66=.3645833333333333,C68=.005696614583333333,C88=.3076171875;function pj_enfn(ne){var ee=[];ee[0]=C00-ne*(C02+ne*(C04+ne*(C06+ne*C08))),ee[1]=ne*(C22-ne*(C04+ne*(C06+ne*C08)));var te=ne*ne;return ee[2]=te*(C44-ne*(C46+ne*C48)),te*=ne,ee[3]=te*(C66-ne*C68),ee[4]=te*ne*C88,ee}function pj_mlfn(ne,ee,te,st){return te*=ee,ee*=ee,st[0]*ne-te*(st[1]+ee*(st[2]+ee*(st[3]+ee*st[4])))}var MAX_ITER$3=20;function pj_inv_mlfn(ne,ee,te){for(var st=1/(1-ee),ot=ne,ct=MAX_ITER$3;ct;--ct){var ut=Math.sin(ot),dt=1-ee*ut*ut;if(dt=(pj_mlfn(ot,ut,Math.cos(ot),te)-ne)*(dt*Math.sqrt(dt))*st,ot-=dt,Math.abs(dt)<EPSLN)return ot}return ot}function init$v(){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.es&&(this.en=pj_enfn(this.es),this.ml0=pj_mlfn(this.lat0,Math.sin(this.lat0),Math.cos(this.lat0),this.en))}function forward$t(ne){var ee=ne.x,te=ne.y,st=adjust_lon(ee-this.long0),ot,ct,ut,dt=Math.sin(te),ht=Math.cos(te);if(this.es){var pt=ht*st,mt=Math.pow(pt,2),yt=this.ep2*Math.pow(ht,2),vt=Math.pow(yt,2),_t=Math.abs(ht)>EPSLN?Math.tan(te):0,bt=Math.pow(_t,2),xt=Math.pow(bt,2);ot=1-this.es*Math.pow(dt,2),pt=pt/Math.sqrt(ot);var Mt=pj_mlfn(te,dt,ht,this.en);ct=this.a*(this.k0*pt*(1+mt/6*(1-bt+yt+mt/20*(5-18*bt+xt+14*yt-58*bt*yt+mt/42*(61+179*xt-xt*bt-479*bt)))))+this.x0,ut=this.a*(this.k0*(Mt-this.ml0+dt*st*pt/2*(1+mt/12*(5-bt+9*yt+4*vt+mt/30*(61+xt-58*bt+270*yt-330*bt*yt+mt/56*(1385+543*xt-xt*bt-3111*bt))))))+this.y0}else{var ft=ht*Math.sin(st);if(Math.abs(Math.abs(ft)-1)<EPSLN)return 93;if(ct=.5*this.a*this.k0*Math.log((1+ft)/(1-ft))+this.x0,ut=ht*Math.cos(st)/Math.sqrt(1-Math.pow(ft,2)),ft=Math.abs(ut),ft>=1){if(ft-1>EPSLN)return 93;ut=0}else ut=Math.acos(ut);te<0&&(ut=-ut),ut=this.a*this.k0*(ut-this.lat0)+this.y0}return ne.x=ct,ne.y=ut,ne}function inverse$t(ne){var ee,te,st,ot,ct=(ne.x-this.x0)*(1/this.a),ut=(ne.y-this.y0)*(1/this.a);if(this.es)if(ee=this.ml0+ut/this.k0,te=pj_inv_mlfn(ee,this.es,this.en),Math.abs(te)<HALF_PI){var mt=Math.sin(te),yt=Math.cos(te),vt=Math.abs(yt)>EPSLN?Math.tan(te):0,_t=this.ep2*Math.pow(yt,2),bt=Math.pow(_t,2),xt=Math.pow(vt,2),Mt=Math.pow(xt,2);ee=1-this.es*Math.pow(mt,2);var Ot=ct*Math.sqrt(ee)/this.k0,kt=Math.pow(Ot,2);ee=ee*vt,st=te-ee*kt/(1-this.es)*.5*(1-kt/12*(5+3*xt-9*_t*xt+_t-4*bt-kt/30*(61+90*xt-252*_t*xt+45*Mt+46*_t-kt/56*(1385+3633*xt+4095*Mt+1574*Mt*xt)))),ot=adjust_lon(this.long0+Ot*(1-kt/6*(1+2*xt+_t-kt/20*(5+28*xt+24*Mt+8*_t*xt+6*_t-kt/42*(61+662*xt+1320*Mt+720*Mt*xt))))/yt)}else st=HALF_PI*sign(ut),ot=0;else{var dt=Math.exp(ct/this.k0),ht=.5*(dt-1/dt),ft=this.lat0+ut/this.k0,pt=Math.cos(ft);ee=Math.sqrt((1-Math.pow(pt,2))/(1+Math.pow(ht,2))),st=Math.asin(ee),ut<0&&(st=-st),ht===0&&pt===0?ot=0:ot=adjust_lon(Math.atan2(ht,pt)+this.long0)}return ne.x=ot,ne.y=st,ne}var names$v=["Fast_Transverse_Mercator","Fast Transverse Mercator"];const tmerc={init:init$v,forward:forward$t,inverse:inverse$t,names:names$v};function sinh(ne){var ee=Math.exp(ne);return ee=(ee-1/ee)/2,ee}function hypot(ne,ee){ne=Math.abs(ne),ee=Math.abs(ee);var te=Math.max(ne,ee),st=Math.min(ne,ee)/(te||1);return te*Math.sqrt(1+Math.pow(st,2))}function log1py(ne){var ee=1+ne,te=ee-1;return te===0?ne:ne*Math.log(ee)/te}function asinhy(ne){var ee=Math.abs(ne);return ee=log1py(ee*(1+ee/(hypot(1,ee)+1))),ne<0?-ee:ee}function gatg(ne,ee){for(var te=2*Math.cos(2*ee),st=ne.length-1,ot=ne[st],ct=0,ut;--st>=0;)ut=-ct+te*ot+ne[st],ct=ot,ot=ut;return ee+ut*Math.sin(2*ee)}function clens(ne,ee){for(var te=2*Math.cos(ee),st=ne.length-1,ot=ne[st],ct=0,ut;--st>=0;)ut=-ct+te*ot+ne[st],ct=ot,ot=ut;return Math.sin(ee)*ut}function cosh(ne){var ee=Math.exp(ne);return ee=(ee+1/ee)/2,ee}function clens_cmplx(ne,ee,te){for(var st=Math.sin(ee),ot=Math.cos(ee),ct=sinh(te),ut=cosh(te),dt=2*ot*ut,ht=-2*st*ct,ft=ne.length-1,pt=ne[ft],mt=0,yt=0,vt=0,_t,bt;--ft>=0;)_t=yt,bt=mt,yt=pt,mt=vt,pt=-_t+dt*yt-ht*mt+ne[ft],vt=-bt+ht*yt+dt*mt;return dt=st*ut,ht=ot*ct,[dt*pt-ht*vt,dt*vt+ht*pt]}function init$u(){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&&(tmerc.init.apply(this),this.forward=tmerc.forward,this.inverse=tmerc.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 ne=this.es/(1+Math.sqrt(1-this.es)),ee=ne/(2-ne),te=ee;this.cgb[0]=ee*(2+ee*(-2/3+ee*(-2+ee*(116/45+ee*(26/45+ee*(-2854/675)))))),this.cbg[0]=ee*(-2+ee*(2/3+ee*(4/3+ee*(-82/45+ee*(32/45+ee*(4642/4725)))))),te=te*ee,this.cgb[1]=te*(7/3+ee*(-8/5+ee*(-227/45+ee*(2704/315+ee*(2323/945))))),this.cbg[1]=te*(5/3+ee*(-16/15+ee*(-13/9+ee*(904/315+ee*(-1522/945))))),te=te*ee,this.cgb[2]=te*(56/15+ee*(-136/35+ee*(-1262/105+ee*(73814/2835)))),this.cbg[2]=te*(-26/15+ee*(34/21+ee*(8/5+ee*(-12686/2835)))),te=te*ee,this.cgb[3]=te*(4279/630+ee*(-332/35+ee*(-399572/14175))),this.cbg[3]=te*(1237/630+ee*(-12/5+ee*(-24832/14175))),te=te*ee,this.cgb[4]=te*(4174/315+ee*(-144838/6237)),this.cbg[4]=te*(-734/315+ee*(109598/31185)),te=te*ee,this.cgb[5]=te*(601676/22275),this.cbg[5]=te*(444337/155925),te=Math.pow(ee,2),this.Qn=this.k0/(1+ee)*(1+te*(1/4+te*(1/64+te/256))),this.utg[0]=ee*(-.5+ee*(2/3+ee*(-37/96+ee*(1/360+ee*(81/512+ee*(-96199/604800)))))),this.gtu[0]=ee*(.5+ee*(-2/3+ee*(5/16+ee*(41/180+ee*(-127/288+ee*(7891/37800)))))),this.utg[1]=te*(-1/48+ee*(-1/15+ee*(437/1440+ee*(-46/105+ee*(1118711/3870720))))),this.gtu[1]=te*(13/48+ee*(-3/5+ee*(557/1440+ee*(281/630+ee*(-1983433/1935360))))),te=te*ee,this.utg[2]=te*(-17/480+ee*(37/840+ee*(209/4480+ee*(-5569/90720)))),this.gtu[2]=te*(61/240+ee*(-103/140+ee*(15061/26880+ee*(167603/181440)))),te=te*ee,this.utg[3]=te*(-4397/161280+ee*(11/504+ee*(830251/7257600))),this.gtu[3]=te*(49561/161280+ee*(-179/168+ee*(6601661/7257600))),te=te*ee,this.utg[4]=te*(-4583/161280+ee*(108847/3991680)),this.gtu[4]=te*(34729/80640+ee*(-3418889/1995840)),te=te*ee,this.utg[5]=te*(-20648693/638668800),this.gtu[5]=te*(212378941/319334400);var st=gatg(this.cbg,this.lat0);this.Zb=-this.Qn*(st+clens(this.gtu,2*st))}function forward$s(ne){var ee=adjust_lon(ne.x-this.long0),te=ne.y;te=gatg(this.cbg,te);var st=Math.sin(te),ot=Math.cos(te),ct=Math.sin(ee),ut=Math.cos(ee);te=Math.atan2(st,ut*ot),ee=Math.atan2(ct*ot,hypot(st,ot*ut)),ee=asinhy(Math.tan(ee));var dt=clens_cmplx(this.gtu,2*te,2*ee);te=te+dt[0],ee=ee+dt[1];var ht,ft;return Math.abs(ee)<=2.623395162778?(ht=this.a*(this.Qn*ee)+this.x0,ft=this.a*(this.Qn*te+this.Zb)+this.y0):(ht=1/0,ft=1/0),ne.x=ht,ne.y=ft,ne}function inverse$s(ne){var ee=(ne.x-this.x0)*(1/this.a),te=(ne.y-this.y0)*(1/this.a);te=(te-this.Zb)/this.Qn,ee=ee/this.Qn;var st,ot;if(Math.abs(ee)<=2.623395162778){var ct=clens_cmplx(this.utg,2*te,2*ee);te=te+ct[0],ee=ee+ct[1],ee=Math.atan(sinh(ee));
141var ut=Math.sin(te),dt=Math.cos(te),ht=Math.sin(ee),ft=Math.cos(ee);te=Math.atan2(ut*ft,hypot(ht,ft*dt)),ee=Math.atan2(ht,ft*dt),st=adjust_lon(ee+this.long0),ot=gatg(this.cgb,te)}else st=1/0,ot=1/0;return ne.x=st,ne.y=ot,ne}var names$u=["Extended_Transverse_Mercator","Extended Transverse Mercator","etmerc","Transverse_Mercator","Transverse Mercator","Gauss Kruger","Gauss_Kruger","tmerc"];const etmerc={init:init$u,forward:forward$s,inverse:inverse$s,names:names$u};function adjust_zone(ne,ee){if(ne===void 0){if(ne=Math.floor((adjust_lon(ee)+Math.PI)*30/Math.PI)+1,ne<0)return 0;if(ne>60)return 60}return ne}var dependsOn="etmerc";function init$t(){var ne=adjust_zone(this.zone,this.long0);if(ne===void 0)throw new Error("unknown utm zone");this.lat0=0,this.long0=(6*Math.abs(ne)-183)*D2R$1,this.x0=5e5,this.y0=this.utmSouth?1e7:0,this.k0=.9996,etmerc.init.apply(this),this.forward=etmerc.forward,this.inverse=etmerc.inverse}var names$t=["Universal Transverse Mercator System","utm"];const utm={init:init$t,names:names$t,dependsOn};function srat(ne,ee){return Math.pow((1-ne)/(1+ne),ee)}var MAX_ITER$2=20;function init$s(){var ne=Math.sin(this.lat0),ee=Math.cos(this.lat0);ee*=ee,this.rc=Math.sqrt(1-this.es)/(1-this.es*ne*ne),this.C=Math.sqrt(1+this.es*ee*ee/(1-this.es)),this.phic0=Math.asin(ne/this.C),this.ratexp=.5*this.C*this.e,this.K=Math.tan(.5*this.phic0+FORTPI)/(Math.pow(Math.tan(.5*this.lat0+FORTPI),this.C)*srat(this.e*ne,this.ratexp))}function forward$r(ne){var ee=ne.x,te=ne.y;return ne.y=2*Math.atan(this.K*Math.pow(Math.tan(.5*te+FORTPI),this.C)*srat(this.e*Math.sin(te),this.ratexp))-HALF_PI,ne.x=this.C*ee,ne}function inverse$r(ne){for(var ee=1e-14,te=ne.x/this.C,st=ne.y,ot=Math.pow(Math.tan(.5*st+FORTPI)/this.K,1/this.C),ct=MAX_ITER$2;ct>0&&(st=2*Math.atan(ot*srat(this.e*Math.sin(ne.y),-.5*this.e))-HALF_PI,!(Math.abs(st-ne.y)<ee));--ct)ne.y=st;return ct?(ne.x=te,ne.y=st,ne):null}const gauss={init:init$s,forward:forward$r,inverse:inverse$r};function init$r(){gauss.init.apply(this),this.rc&&(this.sinc0=Math.sin(this.phic0),this.cosc0=Math.cos(this.phic0),this.R2=2*this.rc,this.title||(this.title="Oblique Stereographic Alternative"))}function forward$q(ne){var ee,te,st,ot;return ne.x=adjust_lon(ne.x-this.long0),gauss.forward.apply(this,[ne]),ee=Math.sin(ne.y),te=Math.cos(ne.y),st=Math.cos(ne.x),ot=this.k0*this.R2/(1+this.sinc0*ee+this.cosc0*te*st),ne.x=ot*te*Math.sin(ne.x),ne.y=ot*(this.cosc0*ee-this.sinc0*te*st),ne.x=this.a*ne.x+this.x0,ne.y=this.a*ne.y+this.y0,ne}function inverse$q(ne){var ee,te,st,ot,ct;if(ne.x=(ne.x-this.x0)/this.a,ne.y=(ne.y-this.y0)/this.a,ne.x/=this.k0,ne.y/=this.k0,ct=hypot(ne.x,ne.y)){var ut=2*Math.atan2(ct,this.R2);ee=Math.sin(ut),te=Math.cos(ut),ot=Math.asin(te*this.sinc0+ne.y*ee*this.cosc0/ct),st=Math.atan2(ne.x*ee,ct*this.cosc0*te-ne.y*this.sinc0*ee)}else ot=this.phic0,st=0;return ne.x=st,ne.y=ot,gauss.inverse.apply(this,[ne]),ne.x=adjust_lon(ne.x+this.long0),ne}var names$s=["Stereographic_North_Pole","Oblique_Stereographic","sterea","Oblique Stereographic Alternative","Double_Stereographic"];const sterea={init:init$r,forward:forward$q,inverse:inverse$q,names:names$s};function ssfn_(ne,ee,te){return ee*=te,Math.tan(.5*(HALF_PI+ne))*Math.pow((1-ee)/(1+ee),.5*te)}function init$q(){this.x0=this.x0||0,this.y0=this.y0||0,this.lat0=this.lat0||0,this.long0=this.long0||0,this.coslat0=Math.cos(this.lat0),this.sinlat0=Math.sin(this.lat0),this.sphere?this.k0===1&&!isNaN(this.lat_ts)&&Math.abs(this.coslat0)<=EPSLN&&(this.k0=.5*(1+sign(this.lat0)*Math.sin(this.lat_ts))):(Math.abs(this.coslat0)<=EPSLN&&(this.lat0>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)<=EPSLN&&Math.abs(Math.cos(this.lat_ts))>EPSLN&&(this.k0=.5*this.cons*msfnz(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts))/tsfnz(this.e,this.con*this.lat_ts,this.con*Math.sin(this.lat_ts))),this.ms1=msfnz(this.e,this.sinlat0,this.coslat0),this.X0=2*Math.atan(this.ssfn_(this.lat0,this.sinlat0,this.e))-HALF_PI,this.cosX0=Math.cos(this.X0),this.sinX0=Math.sin(this.X0))}function forward$p(ne){var ee=ne.x,te=ne.y,st=Math.sin(te),ot=Math.cos(te),ct,ut,dt,ht,ft,pt,mt=adjust_lon(ee-this.long0);return Math.abs(Math.abs(ee-this.long0)-Math.PI)<=EPSLN&&Math.abs(te+this.lat0)<=EPSLN?(ne.x=NaN,ne.y=NaN,ne):this.sphere?(ct=2*this.k0/(1+this.sinlat0*st+this.coslat0*ot*Math.cos(mt)),ne.x=this.a*ct*ot*Math.sin(mt)+this.x0,ne.y=this.a*ct*(this.coslat0*st-this.sinlat0*ot*Math.cos(mt))+this.y0,ne):(ut=2*Math.atan(this.ssfn_(te,st,this.e))-HALF_PI,ht=Math.cos(ut),dt=Math.sin(ut),Math.abs(this.coslat0)<=EPSLN?(ft=tsfnz(this.e,te*this.con,this.con*st),pt=2*this.a*this.k0*ft/this.cons,ne.x=this.x0+pt*Math.sin(ee-this.long0),ne.y=this.y0-this.con*pt*Math.cos(ee-this.long0),ne):(Math.abs(this.sinlat0)<EPSLN?(ct=2*this.a*this.k0/(1+ht*Math.cos(mt)),ne.y=ct*dt):(ct=2*this.a*this.k0*this.ms1/(this.cosX0*(1+this.sinX0*dt+this.cosX0*ht*Math.cos(mt))),ne.y=ct*(this.cosX0*dt-this.sinX0*ht*Math.cos(mt))+this.y0),ne.x=ct*ht*Math.sin(mt)+this.x0,ne))}function inverse$p(ne){ne.x-=this.x0,ne.y-=this.y0;var ee,te,st,ot,ct,ut=Math.sqrt(ne.x*ne.x+ne.y*ne.y);if(this.sphere){var dt=2*Math.atan(ut/(2*this.a*this.k0));return ee=this.long0,te=this.lat0,ut<=EPSLN?(ne.x=ee,ne.y=te,ne):(te=Math.asin(Math.cos(dt)*this.sinlat0+ne.y*Math.sin(dt)*this.coslat0/ut),Math.abs(this.coslat0)<EPSLN?this.lat0>0?ee=adjust_lon(this.long0+Math.atan2(ne.x,-1*ne.y)):ee=adjust_lon(this.long0+Math.atan2(ne.x,ne.y)):ee=adjust_lon(this.long0+Math.atan2(ne.x*Math.sin(dt),ut*this.coslat0*Math.cos(dt)-ne.y*this.sinlat0*Math.sin(dt))),ne.x=ee,ne.y=te,ne)}else if(Math.abs(this.coslat0)<=EPSLN){if(ut<=EPSLN)return te=this.lat0,ee=this.long0,ne.x=ee,ne.y=te,ne;ne.x*=this.con,ne.y*=this.con,st=ut*this.cons/(2*this.a*this.k0),te=this.con*phi2z(this.e,st),ee=this.con*adjust_lon(this.con*this.long0+Math.atan2(ne.x,-1*ne.y))}else ot=2*Math.atan(ut*this.cosX0/(2*this.a*this.k0*this.ms1)),ee=this.long0,ut<=EPSLN?ct=this.
141X0:(ct=Math.asin(Math.cos(ot)*this.sinX0+ne.y*Math.sin(ot)*this.cosX0/ut),ee=adjust_lon(this.long0+Math.atan2(ne.x*Math.sin(ot),ut*this.cosX0*Math.cos(ot)-ne.y*this.sinX0*Math.sin(ot)))),te=-1*phi2z(this.e,Math.tan(.5*(HALF_PI+ct)));return ne.x=ee,ne.y=te,ne}var names$r=["stere","Stereographic_South_Pole","Polar Stereographic (variant B)","Polar_Stereographic"];const stere={init:init$q,forward:forward$p,inverse:inverse$p,names:names$r,ssfn_};function init$p(){var ne=this.lat0;this.lambda0=this.long0;var ee=Math.sin(ne),te=this.a,st=this.rf,ot=1/st,ct=2*ot-Math.pow(ot,2),ut=this.e=Math.sqrt(ct);this.R=this.k0*te*Math.sqrt(1-ct)/(1-ct*Math.pow(ee,2)),this.alpha=Math.sqrt(1+ct/(1-ct)*Math.pow(Math.cos(ne),4)),this.b0=Math.asin(ee/this.alpha);var dt=Math.log(Math.tan(Math.PI/4+this.b0/2)),ht=Math.log(Math.tan(Math.PI/4+ne/2)),ft=Math.log((1+ut*ee)/(1-ut*ee));this.K=dt-this.alpha*ht+this.alpha*ut/2*ft}function forward$o(ne){var ee=Math.log(Math.tan(Math.PI/4-ne.y/2)),te=this.e/2*Math.log((1+this.e*Math.sin(ne.y))/(1-this.e*Math.sin(ne.y))),st=-this.alpha*(ee+te)+this.K,ot=2*(Math.atan(Math.exp(st))-Math.PI/4),ct=this.alpha*(ne.x-this.lambda0),ut=Math.atan(Math.sin(ct)/(Math.sin(this.b0)*Math.tan(ot)+Math.cos(this.b0)*Math.cos(ct))),dt=Math.asin(Math.cos(this.b0)*Math.sin(ot)-Math.sin(this.b0)*Math.cos(ot)*Math.cos(ct));return ne.y=this.R/2*Math.log((1+Math.sin(dt))/(1-Math.sin(dt)))+this.y0,ne.x=this.R*ut+this.x0,ne}function inverse$o(ne){for(var ee=ne.x-this.x0,te=ne.y-this.y0,st=ee/this.R,ot=2*(Math.atan(Math.exp(te/this.R))-Math.PI/4),ct=Math.asin(Math.cos(this.b0)*Math.sin(ot)+Math.sin(this.b0)*Math.cos(ot)*Math.cos(st)),ut=Math.atan(Math.sin(st)/(Math.cos(this.b0)*Math.cos(st)-Math.sin(this.b0)*Math.tan(ot))),dt=this.lambda0+ut/this.alpha,ht=0,ft=ct,pt=-1e3,mt=0;Math.abs(ft-pt)>1e-7;){if(++mt>20)return;ht=1/this.alpha*(Math.log(Math.tan(Math.PI/4+ct/2))-this.K)+this.e*Math.log(Math.tan(Math.PI/4+Math.asin(this.e*Math.sin(ft))/2)),pt=ft,ft=2*Math.atan(Math.exp(ht))-Math.PI/2}return ne.x=dt,ne.y=ft,ne}var names$q=["somerc"];const somerc={init:init$p,forward:forward$o,inverse:inverse$o,names:names$q};var TOL=1e-7;function isTypeA(ne){var ee=["Hotine_Oblique_Mercator","Hotine_Oblique_Mercator_Azimuth_Natural_Origin"],te=typeof ne.PROJECTION=="object"?Object.keys(ne.PROJECTION)[0]:ne.PROJECTION;return"no_uoff"in ne||"no_off"in ne||ee.indexOf(te)!==-1}function init$o(){var ne,ee,te,st,ot,ct,ut,dt,ht,ft,pt=0,mt,yt=0,vt=0,_t=0,bt=0,xt=0,Mt=0;this.no_off=isTypeA(this),this.no_rot="no_rot"in this;var Ot=!1;"alpha"in this&&(Ot=!0);var kt=!1;if("rectified_grid_angle"in this&&(kt=!0),Ot&&(Mt=this.alpha),kt&&(pt=this.rectified_grid_angle*D2R$1),Ot||kt)yt=this.longc;else if(vt=this.long1,bt=this.lat1,_t=this.long2,xt=this.lat2,Math.abs(bt-xt)<=TOL||(ne=Math.abs(bt))<=TOL||Math.abs(ne-HALF_PI)<=TOL||Math.abs(Math.abs(this.lat0)-HALF_PI)<=TOL||Math.abs(Math.abs(xt)-HALF_PI)<=TOL)throw new Error;var Nt=1-this.es;ee=Math.sqrt(Nt),Math.abs(this.lat0)>EPSLN?(dt=Math.sin(this.lat0),te=Math.cos(this.lat0),ne=1-this.es*dt*dt,this.B=te*te,this.B=Math.sqrt(1+this.es*this.B*this.B/Nt),this.A=this.B*this.k0*ee/ne,st=this.B*ee/(te*Math.sqrt(ne)),ot=st*st-1,ot<=0?ot=0:(ot=Math.sqrt(ot),this.lat0<0&&(ot=-ot)),this.E=ot+=st,this.E*=Math.pow(tsfnz(this.e,this.lat0,dt),this.B)):(this.B=1/ee,this.A=this.k0,this.E=st=ot=1),Ot||kt?(Ot?(mt=Math.asin(Math.sin(Mt)/st),kt||(pt=Mt)):(mt=pt,Mt=Math.asin(st*Math.sin(mt))),this.lam0=yt-Math.asin(.5*(ot-1/ot)*Math.tan(mt))/this.B):(ct=Math.pow(tsfnz(this.e,bt,Math.sin(bt)),this.B),ut=Math.pow(tsfnz(this.e,xt,Math.sin(xt)),this.B),ot=this.E/ct,ht=(ut-ct)/(ut+ct),ft=this.E*this.E,ft=(ft-ut*ct)/(ft+ut*ct),ne=vt-_t,ne<-Math.pi?_t-=TWO_PI:ne>Math.pi&&(_t+=TWO_PI),this.lam0=adjust_lon(.5*(vt+_t)-Math.atan(ft*Math.tan(.5*this.B*(vt-_t))/ht)/this.B),mt=Math.atan(2*Math.sin(this.B*adjust_lon(vt-this.lam0))/(ot-1/ot)),pt=Mt=Math.asin(st*Math.sin(mt))),this.singam=Math.sin(mt),this.cosgam=Math.cos(mt),this.sinrot=Math.sin(pt),this.cosrot=Math.cos(pt),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(st*st-1)/Math.cos(Mt))),this.lat0<0&&(this.u_0=-this.u_0)),ot=.5*mt,this.v_pole_n=this.ArB*Math.log(Math.tan(FORTPI-ot)),this.v_pole_s=this.ArB*Math.log(Math.tan(FORTPI+ot))}function forward$n(ne){var ee={},te,st,ot,ct,ut,dt,ht,ft;if(ne.x=ne.x-this.lam0,Math.abs(Math.abs(ne.y)-HALF_PI)>EPSLN){if(ut=this.E/Math.pow(tsfnz(this.e,ne.y,Math.sin(ne.y)),this.B),dt=1/ut,te=.5*(ut-dt),st=.5*(ut+dt),ct=Math.sin(this.B*ne.x),ot=(te*this.singam-ct*this.cosgam)/st,Math.abs(Math.abs(ot)-1)<EPSLN)throw new Error;ft=.5*this.ArB*Math.log((1-ot)/(1+ot)),dt=Math.cos(this.B*ne.x),Math.abs(dt)<TOL?ht=this.A*ne.x:ht=this.ArB*Math.atan2(te*this.cosgam+ct*this.singam,dt)}else ft=ne.y>0?this.v_pole_n:this.v_pole_s,ht=this.ArB*ne.y;return this.no_rot?(ee.x=ht,ee.y=ft):(ht-=this.u_0,ee.x=ft*this.cosrot+ht*this.sinrot,ee.y=ht*this.cosrot-ft*this.sinrot),ee.x=this.a*ee.x+this.x0,ee.y=this.a*ee.y+this.y0,ee}function inverse$n(ne){var ee,te,st,ot,ct,ut,dt,ht={};if(ne.x=(ne.x-this.x0)*(1/this.a),ne.y=(ne.y-this.y0)*(1/this.a),this.no_rot?(te=ne.y,ee=ne.x):(te=ne.x*this.cosrot-ne.y*this.sinrot,ee=ne.y*this.cosrot+ne.x*this.sinrot+this.u_0),st=Math.exp(-this.BrA*te),ot=.5*(st-1/st),ct=.5*(st+1/st),ut=Math.sin(this.BrA*ee),dt=(ut*this.cosgam+ot*this.singam)/ct,Math.abs(Math.abs(dt)-1)<EPSLN)ht.x=0,ht.y=dt<0?-HALF_PI:HALF_PI;else{if(ht.y=this.E/Math.sqrt((1+dt)/(1-dt)),ht.y=phi2z(this.e,Math.pow(ht.y,1/this.B)),ht.y===1/0)throw new Error;ht.x=-this.rB*Math.atan2(ot*this.cosgam-ut*this.singam,Math.cos(this.BrA*ee))}return ht.x+=this.lam0,ht}var names$p=["Hotine_Oblique_Mercator","Hotine Oblique Mercator","Hotine_Oblique_Mercator_Azimuth_Natural_Origin","Hotine_Oblique_Mercator_Two_Point_Natural_Origin","Hotine_Oblique_Mercator_Azimuth_Center","Oblique_Mercator","omerc"];const omerc={init:init$o,forward:forward$n,inverse:inverse$n,names:names$p};function init$n(){if(this.lat2||(this.lat2=this.lat1),this.k0||(this.k0=1),this.x0=this.x0||0,this.y0=this.y0||0,!(Math.abs(this.lat1+this.lat2)<EPSLN)){var ne=this.b/this.a;this.e=Math.sqrt(1-ne*ne);var ee=Math.sin(this.lat1),te=Math.cos(this.lat1),st=msfnz(this.e,ee,te),ot=tsfnz(this.e,this.lat1,ee),ct=Math.sin(this.lat2),ut=Math.cos(this.lat2),dt=msfnz(this.e,ct,ut),ht=tsfnz(this.e,this.lat2,ct),ft=tsfnz(this.e,this.lat0,Math.sin(this.lat0));Math.abs(this.lat1-this.lat2)>EPSLN?this.ns=Math.log(st/dt)/Math.log(ot/ht):this.ns=ee,isNaN(this.ns)&&(this.ns=ee),this.f0=st/(this.ns*Math.pow(ot,this.ns)),this.rh=this.a*this.f0*Math.pow(ft,this.ns),this.title||(this.title="Lambert Conformal Conic")}}function forward$m(ne){var ee=ne.x,te=ne.y;Math.abs(2*Math.abs(te)-Math.PI)<=EPSLN&&(te=sign(te)*(HALF_PI-2*EPSLN));var st=Math.abs(Math.abs(te)-HALF_PI),ot,ct;if(st>EPSLN)ot=tsfnz(this.e,te,Math.sin(te)),ct=this.a*this.f0*Math.pow(ot,this.ns);else{if(st=te*this.ns,st<=0)return null;ct=0}var ut=this.ns*adjust_lon(ee-this.long0);return ne.x=this.k0*(ct*Math.sin(ut))+this.x0,ne.y=this.k0*(this.rh-ct*Math.cos(ut))+this.y0,ne}function inverse$m(ne){var ee,te,st,ot,ct,ut=(ne.x-this.x0)/this.k0,dt=this.rh-(ne.y-this.y0)/this.k0;this.ns>0?(ee=Math.sqrt(ut*ut+dt*dt),te=1):(ee=-Math.sqrt(ut*ut+dt*dt),te=-1);var ht=0;if(ee!==0&&(ht=Math.atan2(te*ut,te*dt)),ee!==0||this.ns>
1410){if(te=1/this.ns,st=Math.pow(ee/(this.a*this.f0),te),ot=phi2z(this.e,st),ot===-9999)return null}else ot=-HALF_PI;return ct=adjust_lon(ht/this.ns+this.long0),ne.x=ct,ne.y=ot,ne}var names$o=["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 lcc={init:init$n,forward:forward$m,inverse:inverse$m,names:names$o};function init$m(){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 forward$l(ne){var ee,te,st,ot,ct,ut,dt,ht=ne.x,ft=ne.y,pt=adjust_lon(ht-this.long0);return ee=Math.pow((1+this.e*Math.sin(ft))/(1-this.e*Math.sin(ft)),this.alfa*this.e/2),te=2*(Math.atan(this.k*Math.pow(Math.tan(ft/2+this.s45),this.alfa)/ee)-this.s45),st=-pt*this.alfa,ot=Math.asin(Math.cos(this.ad)*Math.sin(te)+Math.sin(this.ad)*Math.cos(te)*Math.cos(st)),ct=Math.asin(Math.cos(te)*Math.sin(st)/Math.cos(ot)),ut=this.n*ct,dt=this.ro0*Math.pow(Math.tan(this.s0/2+this.s45),this.n)/Math.pow(Math.tan(ot/2+this.s45),this.n),ne.y=dt*Math.cos(ut)/1,ne.x=dt*Math.sin(ut)/1,this.czech||(ne.y*=-1,ne.x*=-1),ne}function inverse$l(ne){var ee,te,st,ot,ct,ut,dt,ht,ft=ne.x;ne.x=ne.y,ne.y=ft,this.czech||(ne.y*=-1,ne.x*=-1),ut=Math.sqrt(ne.x*ne.x+ne.y*ne.y),ct=Math.atan2(ne.y,ne.x),ot=ct/Math.sin(this.s0),st=2*(Math.atan(Math.pow(this.ro0/ut,1/this.n)*Math.tan(this.s0/2+this.s45))-this.s45),ee=Math.asin(Math.cos(this.ad)*Math.sin(st)-Math.sin(this.ad)*Math.cos(st)*Math.cos(ot)),te=Math.asin(Math.cos(st)*Math.sin(ot)/Math.cos(ee)),ne.x=this.long0-te/this.alfa,dt=ee,ht=0;var pt=0;do ne.y=2*(Math.atan(Math.pow(this.k,-1/this.alfa)*Math.pow(Math.tan(ee/2+this.s45),1/this.alfa)*Math.pow((1+this.e*Math.sin(dt))/(1-this.e*Math.sin(dt)),this.e/2))-this.s45),Math.abs(dt-ne.y)<1e-10&&(ht=1),dt=ne.y,pt+=1;while(ht===0&&pt<15);return pt>=15?null:ne}var names$n=["Krovak","krovak"];const krovak={init:init$m,forward:forward$l,inverse:inverse$l,names:names$n};function mlfn(ne,ee,te,st,ot){return ne*ot-ee*Math.sin(2*ot)+te*Math.sin(4*ot)-st*Math.sin(6*ot)}function e0fn(ne){return 1-.25*ne*(1+ne/16*(3+1.25*ne))}function e1fn(ne){return .375*ne*(1+.25*ne*(1+.46875*ne))}function e2fn(ne){return .05859375*ne*ne*(1+.75*ne)}function e3fn(ne){return ne*ne*ne*(35/3072)}function gN(ne,ee,te){var st=ee*te;return ne/Math.sqrt(1-st*st)}function adjust_lat(ne){return Math.abs(ne)<HALF_PI?ne:ne-sign(ne)*Math.PI}function imlfn(ne,ee,te,st,ot){var ct,ut;ct=ne/ee;for(var dt=0;dt<15;dt++)if(ut=(ne-(ee*ct-te*Math.sin(2*ct)+st*Math.sin(4*ct)-ot*Math.sin(6*ct)))/(ee-2*te*Math.cos(2*ct)+4*st*Math.cos(4*ct)-6*ot*Math.cos(6*ct)),ct+=ut,Math.abs(ut)<=1e-10)return ct;return NaN}function init$l(){this.sphere||(this.e0=e0fn(this.es),this.e1=e1fn(this.es),this.e2=e2fn(this.es),this.e3=e3fn(this.es),this.ml0=this.a*mlfn(this.e0,this.e1,this.e2,this.e3,this.lat0))}function forward$k(ne){var ee,te,st=ne.x,ot=ne.y;if(st=adjust_lon(st-this.long0),this.sphere)ee=this.a*Math.asin(Math.cos(ot)*Math.sin(st)),te=this.a*(Math.atan2(Math.tan(ot),Math.cos(st))-this.lat0);else{var ct=Math.sin(ot),ut=Math.cos(ot),dt=gN(this.a,this.e,ct),ht=Math.tan(ot)*Math.tan(ot),ft=st*Math.cos(ot),pt=ft*ft,mt=this.es*ut*ut/(1-this.es),yt=this.a*mlfn(this.e0,this.e1,this.e2,this.e3,ot);ee=dt*ft*(1-pt*ht*(1/6-(8-ht+8*mt)*pt/120)),te=yt-this.ml0+dt*ct/ut*pt*(.5+(5-ht+6*mt)*pt/24)}return ne.x=ee+this.x0,ne.y=te+this.y0,ne}function inverse$k(ne){ne.x-=this.x0,ne.y-=this.y0;var ee=ne.x/this.a,te=ne.y/this.a,st,ot;if(this.sphere){var ct=te+this.lat0;st=Math.asin(Math.sin(ct)*Math.cos(ee)),ot=Math.atan2(Math.tan(ee),Math.cos(ct))}else{var ut=this.ml0/this.a+te,dt=imlfn(ut,this.e0,this.e1,this.e2,this.e3);if(Math.abs(Math.abs(dt)-HALF_PI)<=EPSLN)return ne.x=this.long0,ne.y=HALF_PI,te<0&&(ne.y*=-1),ne;var ht=gN(this.a,this.e,Math.sin(dt)),ft=ht*ht*ht/this.a/this.a*(1-this.es),pt=Math.pow(Math.tan(dt),2),mt=ee*this.a/ht,yt=mt*mt;st=dt-ht*Math.tan(dt)/ft*mt*mt*(.5-(1+3*pt)*mt*mt/24),ot=mt*(1-yt*(pt/3+(1+3*pt)*pt*yt/15))/Math.cos(dt)}return ne.x=adjust_lon(ot+this.long0),ne.y=adjust_lat(st),ne}var names$m=["Cassini","Cassini_Soldner","cass"];const cass={init:init$l,forward:forward$k,inverse:inverse$k,names:names$m};function qsfnz(ne,ee){var te;return ne>1e-7?(te=ne*ee,(1-ne*ne)*(ee/(1-te*te)-.5/ne*Math.log((1-te)/(1+te)))):2*ee}var S_POLE=1,N_POLE=2,EQUIT=3,OBLIQ=4;function init$k(){var ne=Math.abs(this.lat0);if(Math.abs(ne-HALF_PI)<EPSLN?this.mode=this.lat0<0?this.S_POLE:this.N_POLE:Math.abs(ne)<EPSLN?this.mode=this.EQUIT:this.mode=this.OBLIQ,this.es>0){var ee;switch(this.qp=qsfnz(this.e,1),this.mmf=.5/(1-this.es),this.apa=authset(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
141=1,this.ymf=.5*this.qp;break;case this.OBLIQ:this.rq=Math.sqrt(.5*this.qp),ee=Math.sin(this.lat0),this.sinb1=qsfnz(this.e,ee)/this.qp,this.cosb1=Math.sqrt(1-this.sinb1*this.sinb1),this.dd=Math.cos(this.lat0)/(Math.sqrt(1-this.es*ee*ee)*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 forward$j(ne){var ee,te,st,ot,ct,ut,dt,ht,ft,pt,mt=ne.x,yt=ne.y;if(mt=adjust_lon(mt-this.long0),this.sphere){if(ct=Math.sin(yt),pt=Math.cos(yt),st=Math.cos(mt),this.mode===this.OBLIQ||this.mode===this.EQUIT){if(te=this.mode===this.EQUIT?1+pt*st:1+this.sinph0*ct+this.cosph0*pt*st,te<=EPSLN)return null;te=Math.sqrt(2/te),ee=te*pt*Math.sin(mt),te*=this.mode===this.EQUIT?ct:this.cosph0*ct-this.sinph0*pt*st}else if(this.mode===this.N_POLE||this.mode===this.S_POLE){if(this.mode===this.N_POLE&&(st=-st),Math.abs(yt+this.lat0)<EPSLN)return null;te=FORTPI-yt*.5,te=2*(this.mode===this.S_POLE?Math.cos(te):Math.sin(te)),ee=te*Math.sin(mt),te*=st}}else{switch(dt=0,ht=0,ft=0,st=Math.cos(mt),ot=Math.sin(mt),ct=Math.sin(yt),ut=qsfnz(this.e,ct),(this.mode===this.OBLIQ||this.mode===this.EQUIT)&&(dt=ut/this.qp,ht=Math.sqrt(1-dt*dt)),this.mode){case this.OBLIQ:ft=1+this.sinb1*dt+this.cosb1*ht*st;break;case this.EQUIT:ft=1+ht*st;break;case this.N_POLE:ft=HALF_PI+yt,ut=this.qp-ut;break;case this.S_POLE:ft=yt-HALF_PI,ut=this.qp+ut;break}if(Math.abs(ft)<EPSLN)return null;switch(this.mode){case this.OBLIQ:case this.EQUIT:ft=Math.sqrt(2/ft),this.mode===this.OBLIQ?te=this.ymf*ft*(this.cosb1*dt-this.sinb1*ht*st):te=(ft=Math.sqrt(2/(1+ht*st)))*dt*this.ymf,ee=this.xmf*ft*ht*ot;break;case this.N_POLE:case this.S_POLE:ut>=0?(ee=(ft=Math.sqrt(ut))*ot,te=st*(this.mode===this.S_POLE?ft:-ft)):ee=te=0;break}}return ne.x=this.a*ee+this.x0,ne.y=this.a*te+this.y0,ne}function inverse$j(ne){ne.x-=this.x0,ne.y-=this.y0;var ee=ne.x/this.a,te=ne.y/this.a,st,ot,ct,ut,dt,ht,ft;if(this.sphere){var pt=0,mt,yt=0;if(mt=Math.sqrt(ee*ee+te*te),ot=mt*.5,ot>1)return null;switch(ot=2*Math.asin(ot),(this.mode===this.OBLIQ||this.mode===this.EQUIT)&&(yt=Math.sin(ot),pt=Math.cos(ot)),this.mode){case this.EQUIT:ot=Math.abs(mt)<=EPSLN?0:Math.asin(te*yt/mt),ee*=yt,te=pt*mt;break;case this.OBLIQ:ot=Math.abs(mt)<=EPSLN?this.lat0:Math.asin(pt*this.sinph0+te*yt*this.cosph0/mt),ee*=yt*this.cosph0,te=(pt-Math.sin(ot)*this.sinph0)*mt;break;case this.N_POLE:te=-te,ot=HALF_PI-ot;break;case this.S_POLE:ot-=HALF_PI;break}st=te===0&&(this.mode===this.EQUIT||this.mode===this.OBLIQ)?0:Math.atan2(ee,te)}else{if(ft=0,this.mode===this.OBLIQ||this.mode===this.EQUIT){if(ee/=this.dd,te*=this.dd,ht=Math.sqrt(ee*ee+te*te),ht<EPSLN)return ne.x=this.long0,ne.y=this.lat0,ne;ut=2*Math.asin(.5*ht/this.rq),ct=Math.cos(ut),ee*=ut=Math.sin(ut),this.mode===this.OBLIQ?(ft=ct*this.sinb1+te*ut*this.cosb1/ht,dt=this.qp*ft,te=ht*this.cosb1*ct-te*this.sinb1*ut):(ft=te*ut/ht,dt=this.qp*ft,te=ht*ct)}else if(this.mode===this.N_POLE||this.mode===this.S_POLE){if(this.mode===this.N_POLE&&(te=-te),dt=ee*ee+te*te,!dt)return ne.x=this.long0,ne.y=this.lat0,ne;ft=1-dt/this.qp,this.mode===this.S_POLE&&(ft=-ft)}st=Math.atan2(ee,te),ot=authlat(Math.asin(ft),this.apa)}return ne.x=adjust_lon(this.long0+st),ne.y=ot,ne}var P00=.3333333333333333,P01=.17222222222222222,P02=.10257936507936508,P10=.06388888888888888,P11=.0664021164021164,P20=.016415012942191543;function authset(ne){var ee,te=[];return te[0]=ne*P00,ee=ne*ne,te[0]+=ee*P01,te[1]=ee*P10,ee*=ne,te[0]+=ee*P02,te[1]+=ee*P11,te[2]=ee*P20,te}function authlat(ne,ee){var te=ne+ne;return ne+ee[0]*Math.sin(te)+ee[1]*Math.sin(te+te)+ee[2]*Math.sin(te+te+te)}var names$l=["Lambert Azimuthal Equal Area","Lambert_Azimuthal_Equal_Area","laea"];const laea={init:init$k,forward:forward$j,inverse:inverse$j,names:names$l,S_POLE,N_POLE,EQUIT,OBLIQ};function asinz(ne){return Math.abs(ne)>1&&(ne=ne>1?1:-1),Math.asin(ne)}function init$j(){Math.abs(this.lat1+this.lat2)<EPSLN||(this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e3=Math.sqrt(this.es),this.sin_po=Math.sin(this.lat1),this.cos_po=Math.cos(this.lat1),this.t1=this.sin_po,this.con=this.sin_po,this.ms1=msfnz(this.e3,this.sin_po,this.cos_po),this.qs1=qsfnz(this.e3,this.sin_po),this.sin_po=Math.sin(this.lat2),this.cos_po=Math.cos(this.lat2),this.t2=this.sin_po,this.ms2=msfnz(this.e3,this.sin_po,this.cos_po),this.qs2=qsfnz(this.e3,this.sin_po),this.sin_po=Math.sin(this.lat0),this.cos_po=Math.cos(this.lat0),this.t3=this.sin_po,this.qs0=qsfnz(this.e3,this.sin_po),Math.abs(this.lat1-this.lat2)>EPSLN?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 forward$i(ne){var ee=ne.x,te=ne.y;this.sin_phi=Math.sin(te),this.cos_phi=Math.cos(te);var st=qsfnz(this.e3,this.sin_phi),ot=this.a*Math.sqrt(this.c-this.ns0*st)/this.ns0,ct=this.ns0*adjust_lon(ee-this.long0),ut=ot*Math.sin(ct)+this.x0,dt=this.rh-ot*Math.cos(ct)+this.y0;return ne.x=ut,ne.y=dt,ne}function inverse$i(ne){var ee,te,st,ot,ct,ut;return ne.x-=this.x0,ne.y=this.rh-ne.y+this.y0,this.ns0>=0?(ee=Math.sqrt(ne.x*ne.x+ne.y*ne.y),st=1):(ee=-Math.sqrt(ne.x*ne.x+ne.y*ne.y),st=-1),ot=0,ee!==0&&(ot=Math.atan2(st*ne.x,st*ne.y)),st=ee*this.ns0/this.a,this.sphere?ut=Math.asin((this.c-st*st)/(2*this.ns0)):(te=(this.c-st*st)/this.ns0,ut=this.phi1z(this.e3,te)),ct=adjust_lon(ot/this.ns0+this.long0),ne.x=ct,ne.y=ut,ne}function phi1z(ne,ee){var te,st,ot,ct,ut,dt=asinz(.5*ee);if(ne<EPSLN)return dt;for(var ht=ne*ne,ft=1;ft<=25;ft++)if(te=Math.sin(dt),st=Math.cos(dt),ot=ne*te,ct=1-ot*ot,ut=.5*ct*ct/st*(ee/(1-ht)-te/ct+.5/ne*Math.log((1-ot)/(1+ot))),dt=dt+ut,Math.abs(ut)<=1e-7)return dt;return null}var names$k=["Albers_Conic_Equal_Area","Albers","aea"];const aea={init:init$j,forward:forward$i,inverse:inverse$i,names:names$k,phi1z};function init$i(){this.sin_p14=Math.sin(this.lat0),this.cos_p14=Math.cos(this.lat0),this.infinity_dist=1e3*this.a,this.rc=1}function forward$h(ne){var ee,te,st,ot,ct,ut,dt,ht,ft=ne.x,pt=ne.y;return st=adjust_lon(ft-this.long0),ee=Math.sin(pt),te=Math.cos(pt),ot=Math.cos(st),ut=this.sin_p14*ee+this.cos_p14*te*ot,ct=1,ut>0||Math.abs(ut)<=EPSLN?(dt=this.x0+this.a*ct*te*Math.sin(st)/ut,ht=this.y0+this.a*ct*(this.cos_p14*ee-this.sin_p14*te*ot)/ut):(dt=this.x0+this.infinity_dist*te*Math.sin(st),ht=this.y0+this.infinity_dist*(this.cos_p14*ee-this.sin_p14*te*ot)),ne.x=dt,ne.y=ht,ne}function inverse$h(ne){var ee,te,st,ot,ct,ut;return ne.x=(ne.x-this.x0)/this.a,ne.y=(ne.y-this.y0)/this.a,ne.x/=this.k0,ne.y/=this.k0,(ee=Math.sqrt(ne.x*ne.x+ne.y*ne.y))?(ot=Math.atan2(ee,this.rc),te=Math.sin(ot),st=Math.cos(ot),ut=asinz(st*this.sin_p14+ne.y*te*this.cos_p14/ee),ct=Math.atan2(ne.x*te,ee*this.cos_p14*st-ne.y*this.sin_p14*te),ct=adjust_lon(this.long0+ct)):(ut=this.phic0,ct=0),ne.x=ct,ne.y=ut,ne}var names$j=["gnom"];const gnom={init:init$i,forward:forward$h,inverse:inverse$h,names:names$j};function iqsfnz(ne,ee){var te=1-(1-ne*ne)/(2*ne)*Math.log((1-ne)/(1+ne));
141if(Math.abs(Math.abs(ee)-te)<1e-6)return ee<0?-1*HALF_PI:HALF_PI;for(var st=Math.asin(.5*ee),ot,ct,ut,dt,ht=0;ht<30;ht++)if(ct=Math.sin(st),ut=Math.cos(st),dt=ne*ct,ot=Math.pow(1-dt*dt,2)/(2*ut)*(ee/(1-ne*ne)-ct/(1-dt*dt)+.5/ne*Math.log((1-dt)/(1+dt))),st+=ot,Math.abs(ot)<=1e-10)return st;return NaN}function init$h(){this.sphere||(this.k0=msfnz(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts)))}function forward$g(ne){var ee=ne.x,te=ne.y,st,ot,ct=adjust_lon(ee-this.long0);if(this.sphere)st=this.x0+this.a*ct*Math.cos(this.lat_ts),ot=this.y0+this.a*Math.sin(te)/Math.cos(this.lat_ts);else{var ut=qsfnz(this.e,Math.sin(te));st=this.x0+this.a*this.k0*ct,ot=this.y0+this.a*ut*.5/this.k0}return ne.x=st,ne.y=ot,ne}function inverse$g(ne){ne.x-=this.x0,ne.y-=this.y0;var ee,te;return this.sphere?(ee=adjust_lon(this.long0+ne.x/this.a/Math.cos(this.lat_ts)),te=Math.asin(ne.y/this.a*Math.cos(this.lat_ts))):(te=iqsfnz(this.e,2*ne.y*this.k0/this.a),ee=adjust_lon(this.long0+ne.x/(this.a*this.k0))),ne.x=ee,ne.y=te,ne}var names$i=["cea"];const cea={init:init$h,forward:forward$g,inverse:inverse$g,names:names$i};function init$g(){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 forward$f(ne){var ee=ne.x,te=ne.y,st=adjust_lon(ee-this.long0),ot=adjust_lat(te-this.lat0);return ne.x=this.x0+this.a*st*this.rc,ne.y=this.y0+this.a*ot,ne}function inverse$f(ne){var ee=ne.x,te=ne.y;return ne.x=adjust_lon(this.long0+(ee-this.x0)/(this.a*this.rc)),ne.y=adjust_lat(this.lat0+(te-this.y0)/this.a),ne}var names$h=["Equirectangular","Equidistant_Cylindrical","eqc"];const eqc={init:init$g,forward:forward$f,inverse:inverse$f,names:names$h};var MAX_ITER$1=20;function init$f(){this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e=Math.sqrt(this.es),this.e0=e0fn(this.es),this.e1=e1fn(this.es),this.e2=e2fn(this.es),this.e3=e3fn(this.es),this.ml0=this.a*mlfn(this.e0,this.e1,this.e2,this.e3,this.lat0)}function forward$e(ne){var ee=ne.x,te=ne.y,st,ot,ct,ut=adjust_lon(ee-this.long0);if(ct=ut*Math.sin(te),this.sphere)Math.abs(te)<=EPSLN?(st=this.a*ut,ot=-1*this.a*this.lat0):(st=this.a*Math.sin(ct)/Math.tan(te),ot=this.a*(adjust_lat(te-this.lat0)+(1-Math.cos(ct))/Math.tan(te)));else if(Math.abs(te)<=EPSLN)st=this.a*ut,ot=-1*this.ml0;else{var dt=gN(this.a,this.e,Math.sin(te))/Math.tan(te);st=dt*Math.sin(ct),ot=this.a*mlfn(this.e0,this.e1,this.e2,this.e3,te)-this.ml0+dt*(1-Math.cos(ct))}return ne.x=st+this.x0,ne.y=ot+this.y0,ne}function inverse$e(ne){var ee,te,st,ot,ct,ut,dt,ht,ft;if(st=ne.x-this.x0,ot=ne.y-this.y0,this.sphere)if(Math.abs(ot+this.a*this.lat0)<=EPSLN)ee=adjust_lon(st/this.a+this.long0),te=0;else{ut=this.lat0+ot/this.a,dt=st*st/this.a/this.a+ut*ut,ht=ut;var pt;for(ct=MAX_ITER$1;ct;--ct)if(pt=Math.tan(ht),ft=-1*(ut*(ht*pt+1)-ht-.5*(ht*ht+dt)*pt)/((ht-ut)/pt-1),ht+=ft,Math.abs(ft)<=EPSLN){te=ht;break}ee=adjust_lon(this.long0+Math.asin(st*Math.tan(ht)/this.a)/Math.sin(te))}else if(Math.abs(ot+this.ml0)<=EPSLN)te=0,ee=adjust_lon(this.long0+st/this.a);else{ut=(this.ml0+ot)/this.a,dt=st*st/this.a/this.a+ut*ut,ht=ut;var mt,yt,vt,_t,bt;for(ct=MAX_ITER$1;ct;--ct)if(bt=this.e*Math.sin(ht),mt=Math.sqrt(1-bt*bt)*Math.tan(ht),yt=this.a*mlfn(this.e0,this.e1,this.e2,this.e3,ht),vt=this.e0-2*this.e1*Math.cos(2*ht)+4*this.e2*Math.cos(4*ht)-6*this.e3*Math.cos(6*ht),_t=yt/this.a,ft=(ut*(mt*_t+1)-_t-.5*mt*(_t*_t+dt))/(this.es*Math.sin(2*ht)*(_t*_t+dt-2*ut*_t)/(4*mt)+(ut-_t)*(mt*vt-2/Math.sin(2*ht))-vt),ht-=ft,Math.abs(ft)<=EPSLN){te=ht;break}mt=Math.sqrt(1-this.es*Math.pow(Math.sin(te),2))*Math.tan(te),ee=adjust_lon(this.long0+Math.asin(st*mt/this.a)/Math.sin(te))}return ne.x=ee,ne.y=te,ne}var names$g=["Polyconic","poly"];const poly={init:init$f,forward:forward$e,inverse:inverse$e,names:names$g};function init$e(){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 forward$d(ne){var ee,te=ne.x,st=ne.y,ot=st-this.lat0,ct=te-this.long0,ut=ot/SEC_TO_RAD*1e-5,dt=ct,ht=1,ft=0;for(ee=1;ee<=10;ee++)ht=ht*ut,ft=ft+this.A[ee]*ht;var pt=ft,mt=dt,yt=1,vt=0,_t,bt,xt=0,Mt=0;for(ee=1;ee<=6;ee++)_t=yt*pt-vt*mt,bt=vt*pt+yt*mt,yt=_t,vt=bt,xt=xt+this.B_re[ee]*yt-this.B_im[ee]*vt,Mt=
141Mt+this.B_im[ee]*yt+this.B_re[ee]*vt;return ne.x=Mt*this.a+this.x0,ne.y=xt*this.a+this.y0,ne}function inverse$d(ne){var ee,te=ne.x,st=ne.y,ot=te-this.x0,ct=st-this.y0,ut=ct/this.a,dt=ot/this.a,ht=1,ft=0,pt,mt,yt=0,vt=0;for(ee=1;ee<=6;ee++)pt=ht*ut-ft*dt,mt=ft*ut+ht*dt,ht=pt,ft=mt,yt=yt+this.C_re[ee]*ht-this.C_im[ee]*ft,vt=vt+this.C_im[ee]*ht+this.C_re[ee]*ft;for(var _t=0;_t<this.iterations;_t++){var bt=yt,xt=vt,Mt,Ot,kt=ut,Nt=dt;for(ee=2;ee<=6;ee++)Mt=bt*yt-xt*vt,Ot=xt*yt+bt*vt,bt=Mt,xt=Ot,kt=kt+(ee-1)*(this.B_re[ee]*bt-this.B_im[ee]*xt),Nt=Nt+(ee-1)*(this.B_im[ee]*bt+this.B_re[ee]*xt);bt=1,xt=0;var Gt=this.B_re[1],Bt=this.B_im[1];for(ee=2;ee<=6;ee++)Mt=bt*yt-xt*vt,Ot=xt*yt+bt*vt,bt=Mt,xt=Ot,Gt=Gt+ee*(this.B_re[ee]*bt-this.B_im[ee]*xt),Bt=Bt+ee*(this.B_im[ee]*bt+this.B_re[ee]*xt);var Ut=Gt*Gt+Bt*Bt;yt=(kt*Gt+Nt*Bt)/Ut,vt=(Nt*Gt-kt*Bt)/Ut}var Vt=yt,Ht=vt,zt=1,jt=0;for(ee=1;ee<=9;ee++)zt=zt*Vt,jt=jt+this.D[ee]*zt;var Wt=this.lat0+jt*SEC_TO_RAD*1e5,Jt=this.long0+Ht;return ne.x=Jt,ne.y=Wt,ne}var names$f=["New_Zealand_Map_Grid","nzmg"];const nzmg={init:init$e,forward:forward$d,inverse:inverse$d,names:names$f};function init$d(){}function forward$c(ne){var ee=ne.x,te=ne.y,st=adjust_lon(ee-this.long0),ot=this.x0+this.a*st,ct=this.y0+this.a*Math.log(Math.tan(Math.PI/4+te/2.5))*1.25;return ne.x=ot,ne.y=ct,ne}function inverse$c(ne){ne.x-=this.x0,ne.y-=this.y0;var ee=adjust_lon(this.long0+ne.x/this.a),te=2.5*(Math.atan(Math.exp(.8*ne.y/this.a))-Math.PI/4);return ne.x=ee,ne.y=te,ne}var names$e=["Miller_Cylindrical","mill"];const mill={init:init$d,forward:forward$c,inverse:inverse$c,names:names$e};var MAX_ITER=20;function init$c(){this.sphere?(this.n=1,this.m=0,this.es=0,this.C_y=Math.sqrt((this.m+1)/this.n),this.C_x=this.C_y/(this.m+1)):this.en=pj_enfn(this.es)}function forward$b(ne){var ee,te,st=ne.x,ot=ne.y;if(st=adjust_lon(st-this.long0),this.sphere){if(!this.m)ot=this.n!==1?Math.asin(this.n*Math.sin(ot)):ot;else for(var ct=this.n*Math.sin(ot),ut=MAX_ITER;ut;--ut){var dt=(this.m*ot+Math.sin(ot)-ct)/(this.m+Math.cos(ot));if(ot-=dt,Math.abs(dt)<EPSLN)break}ee=this.a*this.C_x*st*(this.m+Math.cos(ot)),te=this.a*this.C_y*ot}else{var ht=Math.sin(ot),ft=Math.cos(ot);te=this.a*pj_mlfn(ot,ht,ft,this.en),ee=this.a*st*ft/Math.sqrt(1-this.es*ht*ht)}return ne.x=ee,ne.y=te,ne}function inverse$b(ne){var ee,te,st,ot;return ne.x-=this.x0,st=ne.x/this.a,ne.y-=this.y0,ee=ne.y/this.a,this.sphere?(ee/=this.C_y,st=st/(this.C_x*(this.m+Math.cos(ee))),this.m?ee=asinz((this.m*ee+Math.sin(ee))/this.n):this.n!==1&&(ee=asinz(Math.sin(ee)/this.n)),st=adjust_lon(st+this.long0),ee=adjust_lat(ee)):(ee=pj_inv_mlfn(ne.y/this.a,this.es,this.en),ot=Math.abs(ee),ot<HALF_PI?(ot=Math.sin(ee),te=this.long0+ne.x*Math.sqrt(1-this.es*ot*ot)/(this.a*Math.cos(ee)),st=adjust_lon(te)):ot-EPSLN<HALF_PI&&(st=this.long0)),ne.x=st,ne.y=ee,ne}var names$d=["Sinusoidal","sinu"];const sinu={init:init$c,forward:forward$b,inverse:inverse$b,names:names$d};function init$b(){}function forward$a(ne){for(var ee=ne.x,te=ne.y,st=adjust_lon(ee-this.long0),ot=te,ct=Math.PI*Math.sin(te);;){var ut=-(ot+Math.sin(ot)-ct)/(1+Math.cos(ot));if(ot+=ut,Math.abs(ut)<EPSLN)break}ot/=2,Math.PI/2-Math.abs(te)<EPSLN&&(st=0);var dt=.900316316158*this.a*st*Math.cos(ot)+this.x0,ht=1.4142135623731*this.a*Math.sin(ot)+this.y0;return ne.x=dt,ne.y=ht,ne}function inverse$a(ne){var ee,te;ne.x-=this.x0,ne.y-=this.y0,te=ne.y/(1.4142135623731*this.a),Math.abs(te)>.999999999999&&(te=.999999999999),ee=Math.asin(te);var st=adjust_lon(this.long0+ne.x/(.900316316158*this.a*Math.cos(ee)));st<-Math.PI&&(st=-Math.PI),st>Math.PI&&(st=Math.PI),te=(2*ee+Math.sin(2*ee))/Math.PI,Math.abs(te)>1&&(te=1);var ot=Math.asin(te);return ne.x=st,ne.y=ot,ne}var names$c=["Mollweide","moll"];const moll={init:init$b,forward:forward$a,inverse:inverse$a,names:names$c};function init$a(){Math.abs(this.lat1+this.lat2)<EPSLN||(this.lat2=this.lat2||this.lat1,this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e=Math.sqrt(this.es),this.e0=e0fn(this.es),this.e1=e1fn(this.es),this.e2=e2fn(this.es),this.e3=e3fn(this.es),this.sinphi=Math.sin(this.lat1),this.cosphi=Math.cos(this.lat1),this.ms1=msfnz(this.e,this.sinphi,this.cosphi),this.ml1=mlfn(this.e0,this.e1,this.e2,this.e3,this.lat1),Math.abs(this.lat1-this.lat2)<EPSLN?this.ns=this.sinphi:(this.sinphi=Math.sin(this.lat2),this.cosphi=Math.cos(this.lat2),this.ms2=msfnz(this.e,this.sinphi,this.cosphi),this.ml2=mlfn(this.e0,this.e1,this.e2,this.e3,this.lat2),this.ns=(this.ms1-this.ms2)/(this.ml2-this.ml1)),this.g=this.ml1+this.ms1/this.ns,this.ml0=mlfn(this.e0,this.e1,this.e2,this.e3,this.lat0),this.rh=this.a*(this.g-this.ml0))}function forward$9(ne){var ee=ne.x,te=ne.y,st;if(this.sphere)st=this.a*(this.g-te);else{var ot=mlfn(this.e0,this.e1,this.e2,this.e3,te);st=this.a*(this.g-ot)}var ct=this.ns*adjust_lon(ee-this.long0),ut=this.x0+st*Math.sin(ct),dt=this.y0+this.rh-st*Math.cos(ct);return ne.x=ut,ne.y=dt,ne}function inverse$9(ne){ne.x-=this.x0,ne.y=this.rh-ne.y+this.y0;var ee,te,st,ot;this.ns>=0?(te=Math.sqrt(ne.x*ne.x+ne.y*ne.y),ee=1):(te=-Math.sqrt(ne.x*ne.x+ne.y*ne.y),ee=-1);var ct=0;
141if(te!==0&&(ct=Math.atan2(ee*ne.x,ee*ne.y)),this.sphere)return ot=adjust_lon(this.long0+ct/this.ns),st=adjust_lat(this.g-te/this.a),ne.x=ot,ne.y=st,ne;var ut=this.g-te/this.a;return st=imlfn(ut,this.e0,this.e1,this.e2,this.e3),ot=adjust_lon(this.long0+ct/this.ns),ne.x=ot,ne.y=st,ne}var names$b=["Equidistant_Conic","eqdc"];const eqdc={init:init$a,forward:forward$9,inverse:inverse$9,names:names$b};function init$9(){this.R=this.a}function forward$8(ne){var ee=ne.x,te=ne.y,st=adjust_lon(ee-this.long0),ot,ct;Math.abs(te)<=EPSLN&&(ot=this.x0+this.R*st,ct=this.y0);var ut=asinz(2*Math.abs(te/Math.PI));(Math.abs(st)<=EPSLN||Math.abs(Math.abs(te)-HALF_PI)<=EPSLN)&&(ot=this.x0,te>=0?ct=this.y0+Math.PI*this.R*Math.tan(.5*ut):ct=this.y0+Math.PI*this.R*-Math.tan(.5*ut));var dt=.5*Math.abs(Math.PI/st-st/Math.PI),ht=dt*dt,ft=Math.sin(ut),pt=Math.cos(ut),mt=pt/(ft+pt-1),yt=mt*mt,vt=mt*(2/ft-1),_t=vt*vt,bt=Math.PI*this.R*(dt*(mt-_t)+Math.sqrt(ht*(mt-_t)*(mt-_t)-(_t+ht)*(yt-_t)))/(_t+ht);st<0&&(bt=-bt),ot=this.x0+bt;var xt=ht+mt;return bt=Math.PI*this.R*(vt*xt-dt*Math.sqrt((_t+ht)*(ht+1)-xt*xt))/(_t+ht),te>=0?ct=this.y0+bt:ct=this.y0-bt,ne.x=ot,ne.y=ct,ne}function inverse$8(ne){var ee,te,st,ot,ct,ut,dt,ht,ft,pt,mt,yt,vt;return ne.x-=this.x0,ne.y-=this.y0,mt=Math.PI*this.R,st=ne.x/mt,ot=ne.y/mt,ct=st*st+ot*ot,ut=-Math.abs(ot)*(1+ct),dt=ut-2*ot*ot+st*st,ht=-2*ut+1+2*ot*ot+ct*ct,vt=ot*ot/ht+(2*dt*dt*dt/ht/ht/ht-9*ut*dt/ht/ht)/27,ft=(ut-dt*dt/3/ht)/ht,pt=2*Math.sqrt(-ft/3),mt=3*vt/ft/pt,Math.abs(mt)>1&&(mt>=0?mt=1:mt=-1),yt=Math.acos(mt)/3,ne.y>=0?te=(-pt*Math.cos(yt+Math.PI/3)-dt/3/ht)*Math.PI:te=-(-pt*Math.cos(yt+Math.PI/3)-dt/3/ht)*Math.PI,Math.abs(st)<EPSLN?ee=this.long0:ee=adjust_lon(this.long0+Math.PI*(ct-1+Math.sqrt(1+2*(st*st-ot*ot)+ct*ct))/2/st),ne.x=ee,ne.y=te,ne}var names$a=["Van_der_Grinten_I","VanDerGrinten","vandg"];const vandg={init:init$9,forward:forward$8,inverse:inverse$8,names:names$a};function init$8(){this.sin_p12=Math.sin(this.lat0),this.cos_p12=Math.cos(this.lat0)}function forward$7(ne){var ee=ne.x,te=ne.y,st=Math.sin(ne.y),ot=Math.cos(ne.y),ct=adjust_lon(ee-this.long0),ut,dt,ht,ft,pt,mt,yt,vt,_t,bt,xt,Mt,Ot,kt,Nt,Gt,Bt,Ut,Vt,Ht,zt,jt,Wt;return this.sphere?Math.abs(this.sin_p12-1)<=EPSLN?(ne.x=this.x0+this.a*(HALF_PI-te)*Math.sin(ct),ne.y=this.y0-this.a*(HALF_PI-te)*Math.cos(ct),ne):Math.abs(this.sin_p12+1)<=EPSLN?(ne.x=this.x0+this.a*(HALF_PI+te)*Math.sin(ct),ne.y=this.y0+this.a*(HALF_PI+te)*Math.cos(ct),ne):(Ut=this.sin_p12*st+this.cos_p12*ot*Math.cos(ct),Gt=Math.acos(Ut),Bt=Gt?Gt/Math.sin(Gt):1,ne.x=this.x0+this.a*Bt*ot*Math.sin(ct),ne.y=this.y0+this.a*Bt*(this.cos_p12*st-this.sin_p12*ot*Math.cos(ct)),ne):(ut=e0fn(this.es),dt=e1fn(this.es),ht=e2fn(this.es),ft=e3fn(this.es),Math.abs(this.sin_p12-1)<=EPSLN?(pt=this.a*mlfn(ut,dt,ht,ft,HALF_PI),mt=this.a*mlfn(ut,dt,ht,ft,te),ne.x=this.x0+(pt-mt)*Math.sin(ct),ne.y=this.y0-(pt-mt)*Math.cos(ct),ne):Math.abs(this.sin_p12+1)<=EPSLN?(pt=this.a*mlfn(ut,dt,ht,ft,HALF_PI),mt=this.a*mlfn(ut,dt,ht,ft,te),ne.x=this.x0+(pt+mt)*Math.sin(ct),ne.y=this.y0+(pt+mt)*Math.cos(ct),ne):(yt=st/ot,vt=gN(this.a,this.e,this.sin_p12),_t=gN(this.a,this.e,st),bt=Math.atan((1-this.es)*yt+this.es*vt*this.sin_p12/(_t*ot)),xt=Math.atan2(Math.sin(ct),this.cos_p12*Math.tan(bt)-this.sin_p12*Math.cos(ct)),xt===0?Vt=Math.asin(this.cos_p12*Math.sin(bt)-this.sin_p12*Math.cos(bt)):Math.abs(Math.abs(xt)-Math.PI)<=EPSLN?Vt=-Math.asin(this.cos_p12*Math.sin(bt)-this.sin_p12*Math.cos(bt)):Vt=Math.asin(Math.sin(ct)*Math.cos(bt)/Math.sin(xt)),Mt=this.e*this.sin_p12/Math.sqrt(1-this.es),Ot=this.e*this.cos_p12*Math.cos(xt)/Math.sqrt(1-this.es),kt=Mt*Ot,Nt=Ot*Ot,Ht=Vt*Vt,zt=Ht*Vt,jt=zt*Vt,Wt=jt*Vt,Gt=vt*Vt*(1-Ht*Nt*(1-Nt)/6+zt/8*kt*(1-2*Nt)+jt/120*(Nt*(4-7*Nt)-3*Mt*Mt*(1-7*Nt))-Wt/48*kt),ne.x=this.x0+Gt*Math.sin(xt),ne.y=this.y0+Gt*Math.cos(xt),ne))}function inverse$7(ne){ne.x-=this.x0,ne.y-=this.y0;var ee,te,st,ot,ct,ut,dt,ht,ft,pt,mt,yt,vt,_t,bt,xt,Mt,Ot,kt,Nt,Gt,Bt,Ut,Vt;return this.sphere?(ee=Math.sqrt(ne.x*ne.x+ne.y*ne.y),ee>2*HALF_PI*this.a?void 0:(te=ee/this.a,st=Math.sin(te),ot=Math.cos(te),ct=this.long0,Math.abs(ee)<=EPSLN?ut=this.lat0:(ut=asinz(ot*this.sin_p12+ne.y*st*this.cos_p12/ee),dt=Math.abs(this.lat0)-HALF_PI,Math.abs(dt)<=EPSLN?this.lat0>=0?ct=adjust_lon(this.long0+Math.atan2(ne.x,-ne.y)):ct=adjust_lon(this.long0-Math.atan2(-ne.x,ne.y)):ct=adjust_lon(this.long0+Math.atan2(ne.x*st,ee*this.cos_p12*ot-ne.y*this.sin_p12*st))),ne.x=ct,ne.y=ut,ne)):(ht=e0fn(this.es),ft=e1fn(this.es),pt=e2fn(this.es),mt=e3fn(this.es),Math.abs(this.sin_p12-1)<=EPSLN?(yt=this.a*mlfn(ht,ft,pt,mt,HALF_PI),ee=Math.sqrt(ne.x*ne.x+ne.y*ne.y),vt=yt-ee,ut=imlfn(vt/this.a,ht,ft,pt,mt),ct=adjust_lon(this.long0+Math.atan2(ne.x,-1*ne.y)),ne.x=ct,ne.y=ut,ne):Math.abs(this.sin_p12+1)<=EPSLN?(yt=this.a*mlfn(ht,ft,pt,mt,HALF_PI),ee=Math.sqrt(ne.x*ne.x+ne.y*ne.y),vt=ee-yt,ut=imlfn(vt/this.a,ht,ft,pt,mt),ct=adjust_lon(this.long0+Math.atan2(ne.x,ne.y)),ne.x=ct,ne.y=ut,ne):(ee=Math.sqrt(ne.x*ne.x+ne.y*ne.y),xt=Math.atan2(ne.x,ne.y),_t=gN(this.a,this.e,this.sin_p12),Mt=Math.cos(xt),Ot=this.e*this.cos_p12*Mt,kt=-Ot*Ot/(1-this.es),Nt=3*this.es*(1-kt)*this.sin_p12*this.cos_p12*Mt/(1-this.es),Gt=ee/_t,Bt=Gt-kt*(1+kt)*Math.pow(Gt,3)/6-Nt*(1+3*kt)*Math.pow(Gt,4)/24,Ut=1-kt*Bt*Bt/2-Gt*Bt*Bt*Bt/6,bt=M
141ath.asin(this.sin_p12*Math.cos(Bt)+this.cos_p12*Math.sin(Bt)*Mt),ct=adjust_lon(this.long0+Math.asin(Math.sin(xt)*Math.sin(Bt)/Math.cos(bt))),Vt=Math.sin(bt),ut=Math.atan2((Vt-this.es*Ut*this.sin_p12)*Math.tan(bt),Vt*(1-this.es)),ne.x=ct,ne.y=ut,ne))}var names$9=["Azimuthal_Equidistant","aeqd"];const aeqd={init:init$8,forward:forward$7,inverse:inverse$7,names:names$9};function init$7(){this.sin_p14=Math.sin(this.lat0),this.cos_p14=Math.cos(this.lat0)}function forward$6(ne){var ee,te,st,ot,ct,ut,dt,ht,ft=ne.x,pt=ne.y;return st=adjust_lon(ft-this.long0),ee=Math.sin(pt),te=Math.cos(pt),ot=Math.cos(st),ut=this.sin_p14*ee+this.cos_p14*te*ot,ct=1,(ut>0||Math.abs(ut)<=EPSLN)&&(dt=this.a*ct*te*Math.sin(st),ht=this.y0+this.a*ct*(this.cos_p14*ee-this.sin_p14*te*ot)),ne.x=dt,ne.y=ht,ne}function inverse$6(ne){var ee,te,st,ot,ct,ut,dt;return ne.x-=this.x0,ne.y-=this.y0,ee=Math.sqrt(ne.x*ne.x+ne.y*ne.y),te=asinz(ee/this.a),st=Math.sin(te),ot=Math.cos(te),ut=this.long0,Math.abs(ee)<=EPSLN?(dt=this.lat0,ne.x=ut,ne.y=dt,ne):(dt=asinz(ot*this.sin_p14+ne.y*st*this.cos_p14/ee),ct=Math.abs(this.lat0)-HALF_PI,Math.abs(ct)<=EPSLN?(this.lat0>=0?ut=adjust_lon(this.long0+Math.atan2(ne.x,-ne.y)):ut=adjust_lon(this.long0-Math.atan2(-ne.x,ne.y)),ne.x=ut,ne.y=dt,ne):(ut=adjust_lon(this.long0+Math.atan2(ne.x*st,ee*this.cos_p14*ot-ne.y*this.sin_p14*st)),ne.x=ut,ne.y=dt,ne))}var names$8=["ortho"];const ortho={init:init$7,forward:forward$6,inverse:inverse$6,names:names$8};var FACE_ENUM={FRONT:1,RIGHT:2,BACK:3,LEFT:4,TOP:5,BOTTOM:6},AREA_ENUM={AREA_0:1,AREA_1:2,AREA_2:3,AREA_3:4};function init$6(){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>=HALF_PI-FORTPI/2?this.face=FACE_ENUM.TOP:this.lat0<=-(HALF_PI-FORTPI/2)?this.face=FACE_ENUM.BOTTOM:Math.abs(this.long0)<=FORTPI?this.face=FACE_ENUM.FRONT:Math.abs(this.long0)<=HALF_PI+FORTPI?this.face=this.long0>0?FACE_ENUM.RIGHT:FACE_ENUM.LEFT:this.face=FACE_ENUM.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 forward$5(ne){var ee={x:0,y:0},te,st,ot,ct,ut,dt,ht={value:0};if(ne.x-=this.long0,this.es!==0?te=Math.atan(this.one_minus_f_squared*Math.tan(ne.y)):te=ne.y,st=ne.x,this.face===FACE_ENUM.TOP)ct=HALF_PI-te,st>=FORTPI&&st<=HALF_PI+FORTPI?(ht.value=AREA_ENUM.AREA_0,ot=st-HALF_PI):st>HALF_PI+FORTPI||st<=-(HALF_PI+FORTPI)?(ht.value=AREA_ENUM.AREA_1,ot=st>0?st-SPI:st+SPI):st>-(HALF_PI+FORTPI)&&st<=-FORTPI?(ht.value=AREA_ENUM.AREA_2,ot=st+HALF_PI):(ht.value=AREA_ENUM.AREA_3,ot=st);else if(this.face===FACE_ENUM.BOTTOM)ct=HALF_PI+te,st>=FORTPI&&st<=HALF_PI+FORTPI?(ht.value=AREA_ENUM.AREA_0,ot=-st+HALF_PI):st<FORTPI&&st>=-FORTPI?(ht.value=AREA_ENUM.AREA_1,ot=-st):st<-FORTPI&&st>=-(HALF_PI+FORTPI)?(ht.value=AREA_ENUM.AREA_2,ot=-st-HALF_PI):(ht.value=AREA_ENUM.AREA_3,ot=st>0?-st+SPI:-st-SPI);else{var ft,pt,mt,yt,vt,_t,bt;this.face===FACE_ENUM.RIGHT?st=qsc_shift_lon_origin(st,+HALF_PI):this.face===FACE_ENUM.BACK?st=qsc_shift_lon_origin(st,+SPI):this.face===FACE_ENUM.LEFT&&(st=qsc_shift_lon_origin(st,-HALF_PI)),yt=Math.sin(te),vt=Math.cos(te),_t=Math.sin(st),bt=Math.cos(st),ft=vt*bt,pt=vt*_t,mt=yt,this.face===FACE_ENUM.FRONT?(ct=Math.acos(ft),ot=qsc_fwd_equat_face_theta(ct,mt,pt,ht)):this.face===FACE_ENUM.RIGHT?(ct=Math.acos(pt),ot=qsc_fwd_equat_face_theta(ct,mt,-ft,ht)):this.face===FACE_ENUM.BACK?(ct=Math.acos(-ft),ot=qsc_fwd_equat_face_theta(ct,mt,-pt,ht)):this.face===FACE_ENUM.LEFT?(ct=Math.acos(-pt),ot=qsc_fwd_equat_face_theta(ct,mt,ft,ht)):(ct=ot=0,ht.value=AREA_ENUM.AREA_0)}return dt=Math.atan(12/SPI*(ot+Math.acos(Math.sin(ot)*Math.cos(FORTPI))-HALF_PI)),ut=Math.sqrt((1-Math.cos(ct))/(Math.cos(dt)*Math.cos(dt))/(1-Math.cos(Math.atan(1/Math.cos(ot))))),ht.value===AREA_ENUM.AREA_1?dt+=HALF_PI:ht.value===AREA_ENUM.AREA_2?dt+=SPI:ht.value===AREA_ENUM.AREA_3&&(dt+=1.5*SPI),ee.x=ut*Math.cos(dt),ee.y=ut*Math.sin(dt),ee.x=ee.x*this.a+this.x0,ee.y=ee.y*this.a+this.y0,ne.x=ee.x,ne.y=ee.y,ne}function inverse$5(ne){var ee={lam:0,phi:0},te,st,ot,ct,ut,dt,ht,ft,pt,mt={value:0};if(ne.x=(ne.x-this.x0)/this.a,ne.y=(ne.y-this.y0)/this.a,st=Math.atan(Math.sqrt(ne.x*ne.x+ne.y*ne.y)),te=Math.atan2(ne.y,ne.x),ne.x>=0&&ne.x>=Math.abs(ne.y)?mt.value=AREA_ENUM.AREA_0:ne.y>=0&&ne.y>=Math.abs(ne.x)?(mt.value=AREA_ENUM.AREA_1,te-=HALF_PI):ne.x<0&&-ne.x>
141=Math.abs(ne.y)?(mt.value=AREA_ENUM.AREA_2,te=te<0?te+SPI:te-SPI):(mt.value=AREA_ENUM.AREA_3,te+=HALF_PI),pt=SPI/12*Math.tan(te),ut=Math.sin(pt)/(Math.cos(pt)-1/Math.sqrt(2)),dt=Math.atan(ut),ot=Math.cos(te),ct=Math.tan(st),ht=1-ot*ot*ct*ct*(1-Math.cos(Math.atan(1/Math.cos(dt)))),ht<-1?ht=-1:ht>1&&(ht=1),this.face===FACE_ENUM.TOP)ft=Math.acos(ht),ee.phi=HALF_PI-ft,mt.value===AREA_ENUM.AREA_0?ee.lam=dt+HALF_PI:mt.value===AREA_ENUM.AREA_1?ee.lam=dt<0?dt+SPI:dt-SPI:mt.value===AREA_ENUM.AREA_2?ee.lam=dt-HALF_PI:ee.lam=dt;else if(this.face===FACE_ENUM.BOTTOM)ft=Math.acos(ht),ee.phi=ft-HALF_PI,mt.value===AREA_ENUM.AREA_0?ee.lam=-dt+HALF_PI:mt.value===AREA_ENUM.AREA_1?ee.lam=-dt:mt.value===AREA_ENUM.AREA_2?ee.lam=-dt-HALF_PI:ee.lam=dt<0?-dt-SPI:-dt+SPI;else{var yt,vt,_t;yt=ht,pt=yt*yt,pt>=1?_t=0:_t=Math.sqrt(1-pt)*Math.sin(dt),pt+=_t*_t,pt>=1?vt=0:vt=Math.sqrt(1-pt),mt.value===AREA_ENUM.AREA_1?(pt=vt,vt=-_t,_t=pt):mt.value===AREA_ENUM.AREA_2?(vt=-vt,_t=-_t):mt.value===AREA_ENUM.AREA_3&&(pt=vt,vt=_t,_t=-pt),this.face===FACE_ENUM.RIGHT?(pt=yt,yt=-vt,vt=pt):this.face===FACE_ENUM.BACK?(yt=-yt,vt=-vt):this.face===FACE_ENUM.LEFT&&(pt=yt,yt=vt,vt=-pt),ee.phi=Math.acos(-_t)-HALF_PI,ee.lam=Math.atan2(vt,yt),this.face===FACE_ENUM.RIGHT?ee.lam=qsc_shift_lon_origin(ee.lam,-HALF_PI):this.face===FACE_ENUM.BACK?ee.lam=qsc_shift_lon_origin(ee.lam,-SPI):this.face===FACE_ENUM.LEFT&&(ee.lam=qsc_shift_lon_origin(ee.lam,+HALF_PI))}if(this.es!==0){var bt,xt,Mt;bt=ee.phi<0?1:0,xt=Math.tan(ee.phi),Mt=this.b/Math.sqrt(xt*xt+this.one_minus_f_squared),ee.phi=Math.atan(Math.sqrt(this.a*this.a-Mt*Mt)/(this.one_minus_f*Mt)),bt&&(ee.phi=-ee.phi)}return ee.lam+=this.long0,ne.x=ee.lam,ne.y=ee.phi,ne}function qsc_fwd_equat_face_theta(ne,ee,te,st){var ot;return ne<EPSLN?(st.value=AREA_ENUM.AREA_0,ot=0):(ot=Math.atan2(ee,te),Math.abs(ot)<=FORTPI?st.value=AREA_ENUM.AREA_0:ot>FORTPI&&ot<=HALF_PI+FORTPI?(st.value=AREA_ENUM.AREA_1,ot-=HALF_PI):ot>HALF_PI+FORTPI||ot<=-(HALF_PI+FORTPI)?(st.value=AREA_ENUM.AREA_2,ot=ot>=0?ot-SPI:ot+SPI):(st.value=AREA_ENUM.AREA_3,ot+=HALF_PI)),ot}function qsc_shift_lon_origin(ne,ee){var te=ne+ee;return te<-SPI?te+=TWO_PI:te>+SPI&&(te-=TWO_PI),te}var names$7=["Quadrilateralized Spherical Cube","Quadrilateralized_Spherical_Cube","qsc"];const qsc={init:init$6,forward:forward$5,inverse:inverse$5,names:names$7};var COEFS_X=[[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]],COEFS_Y=[[-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]],FXC=.8487,FYC=1.3523,C1=R2D/5,RC1=1/C1,NODES=18,poly3_val=function(ne,ee){return ne[0]+ee*(ne[1]+ee*(ne[2]+ee*ne[3]))},poly3_der=function(ne,ee){return ne[1]+ee*(2*ne[2]+ee*3*ne[3])};function newton_rapshon(ne,ee,te,st){for(var ot=ee;st;--st){var ct=ne(ot);if(ot-=ct,Math.abs(ct)<te)break}return ot}function init$5(){this.x0=this.x0||0,this.y0=this.y0||0,this.long0=this.long0||0,this.es=0,this.title=this.title||"Robinson"}function forward$4(ne){var ee=adjust_lon(ne.x-this.long0),te=Math.abs(ne.y),st=Math.floor(te*C1);st<0?st=0:st>=NODES&&(st=NODES-1),te=R2D*(te-RC1*st);var ot={x:poly3_val(COEFS_X[st],te)*ee,y:poly3_val(COEFS_Y[st],te)};return ne.y<0&&(ot.y=-ot.y),ot.x=ot.x*this.a*FXC+this.x0,ot.y=ot.y*this.a*FYC+this.y0,ot}function inverse$4(ne){var ee={x:(ne.x-this.x0)/(this.a*FXC),y:Math.abs(ne.y-this.y0)/(this.a*FYC)};if(ee.y>
141=1)ee.x/=COEFS_X[NODES][0],ee.y=ne.y<0?-HALF_PI:HALF_PI;else{var te=Math.floor(ee.y*NODES);for(te<0?te=0:te>=NODES&&(te=NODES-1);;)if(COEFS_Y[te][0]>ee.y)--te;else if(COEFS_Y[te+1][0]<=ee.y)++te;else break;var st=COEFS_Y[te],ot=5*(ee.y-st[0])/(COEFS_Y[te+1][0]-st[0]);ot=newton_rapshon(function(ct){return(poly3_val(st,ct)-ee.y)/poly3_der(st,ct)},ot,EPSLN,100),ee.x/=poly3_val(COEFS_X[te],ot),ee.y=(5*te+ot)*D2R$1,ne.y<0&&(ee.y=-ee.y)}return ee.x=adjust_lon(ee.x+this.long0),ee}var names$6=["Robinson","robin"];const robin={init:init$5,forward:forward$4,inverse:inverse$4,names:names$6};function init$4(){this.name="geocent"}function forward$3(ne){var ee=geodeticToGeocentric(ne,this.es,this.a);return ee}function inverse$3(ne){var ee=geocentricToGeodetic(ne,this.es,this.a,this.b);return ee}var names$5=["Geocentric","geocentric","geocent","Geocent"];const geocent={init:init$4,forward:forward$3,inverse:inverse$3,names:names$5};var mode={N_POLE:0,S_POLE:1,EQUIT:2,OBLIQ:3},params={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 init$3(){if(Object.keys(params).forEach((function(te){if(typeof this[te]>"u")this[te]=params[te].def;else{if(params[te].num&&isNaN(this[te]))throw new Error("Invalid parameter value, must be numeric "+te+" = "+this[te]);params[te].num&&(this[te]=parseFloat(this[te]))}params[te].degrees&&(this[te]=this[te]*D2R$1)}).bind(this)),Math.abs(Math.abs(this.lat0)-HALF_PI)<EPSLN?this.mode=this.lat0<0?mode.S_POLE:mode.N_POLE:Math.abs(this.lat0)<EPSLN?this.mode=mode.EQUIT:(this.mode=mode.OBLIQ,this.sinph0=Math.sin(this.lat0),this.cosph0=Math.cos(this.lat0)),this.pn1=this.h/this.a,this.pn1<=0||this.pn1>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 ne=this.tilt,ee=this.azi;this.cg=Math.cos(ee),this.sg=Math.sin(ee),this.cw=Math.cos(ne),this.sw=Math.sin(ne)}function forward$2(ne){ne.x-=this.long0;var ee=Math.sin(ne.y),te=Math.cos(ne.y),st=Math.cos(ne.x),ot,ct;switch(this.mode){case mode.OBLIQ:ct=this.sinph0*ee+this.cosph0*te*st;break;case mode.EQUIT:ct=te*st;break;case mode.S_POLE:ct=-ee;break;case mode.N_POLE:ct=ee;break}switch(ct=this.pn1/(this.p-ct),ot=ct*te*Math.sin(ne.x),this.mode){case mode.OBLIQ:ct*=this.cosph0*ee-this.sinph0*te*st;break;case mode.EQUIT:ct*=ee;break;case mode.N_POLE:ct*=-(te*st);break;case mode.S_POLE:ct*=te*st;break}var ut,dt;return ut=ct*this.cg+ot*this.sg,dt=1/(ut*this.sw*this.h1+this.cw),ot=(ot*this.cg-ct*this.sg)*this.cw*dt,ct=ut*dt,ne.x=ot*this.a,ne.y=ct*this.a,ne}function inverse$2(ne){ne.x/=this.a,ne.y/=this.a;var ee={x:ne.x,y:ne.y},te,st,ot;ot=1/(this.pn1-ne.y*this.sw),te=this.pn1*ne.x*ot,st=this.pn1*ne.y*this.cw*ot,ne.x=te*this.cg+st*this.sg,ne.y=st*this.cg-te*this.sg;var ct=hypot(ne.x,ne.y);if(Math.abs(ct)<EPSLN)ee.x=0,ee.y=ne.y;else{var ut,dt;switch(dt=1-ct*ct*this.pfact,dt=(this.p-Math.sqrt(dt))/(this.pn1/ct+ct/this.pn1),ut=Math.sqrt(1-dt*dt),this.mode){case mode.OBLIQ:ee.y=Math.asin(ut*this.sinph0+ne.y*dt*this.cosph0/ct),ne.y=(ut-this.sinph0*Math.sin(ee.y))*ct,ne.x*=dt*this.cosph0;break;case mode.EQUIT:ee.y=Math.asin(ne.y*dt/ct),ne.y=ut*ct,ne.x*=dt;break;case mode.N_POLE:ee.y=Math.asin(ut),ne.y=-ne.y;break;case mode.S_POLE:ee.y=-Math.asin(ut);break}ee.x=Math.atan2(ne.x,ne.y)}return ne.x=ee.x+this.long0,ne.y=ee.y,ne}var names$4=["Tilted_Perspective","tpers"];const tpers={init:init$3,forward:forward$2,inverse:inverse$2,names:names$4};function init$2(){if(this.flip_axis=this.sweep==="x"?1:0,this.h=Number(this.h),this.radius_g_1=this.h/this.a,this.radius_g_1<=0||this.radius_g_1>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 ne=1-this.es,ee=1/ne;this.radius_p=Math.sqrt(ne),this.radius_p2=ne,this.radius_p_inv2=ee,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 forward$1(ne){var ee=ne.x,te=ne.y,st,ot,ct,ut;if(ee=ee-this.long0,this.shape==="ellipse"){te=Math.atan(this.radius_p2*Math.tan(te));var dt=this.radius_p/hypot(this.radius_p*Math.cos(te),Math.sin(te));if(ot=dt*Math.cos(ee)*Math.cos(te),ct=dt*Math.sin(ee)*Math.cos(te),ut=dt*Math.sin(te),(this.radius_g-ot)*ot-ct*ct-ut*ut*this.radius_p_inv2<0)return ne.x=Number.NaN,ne.y=Number.NaN,ne;st=this.radius_g-ot,this.flip_axis?(ne.x=this.radius_g_1*Math.atan(ct/hypot(ut,st)),ne.y=this.radius_g_1*Math.atan(ut/st)):(ne.x=this.radius_g_1*Math.atan(ct/st),ne.y=this.radius_g_1*Math.atan(ut/hypot(ct,st)))}else this.shape==="sphere"&&(st=Math.cos(te),ot=Math.cos(ee)*st,ct=Math.sin(ee)*st,ut=Math.sin(te),st=this.radius_g-ot,this.flip_axis?(ne.x=this.radius_g_1*Math.atan(ct/hypot(ut,st)),ne.y=this.radius_g_1*Math.atan(ut/st)):(ne.x=this.radius_g_1*Math.atan(ct/st),ne.y=this.radius_g_1*Math.atan(ut/hypot(ct,st))));return ne.x=ne.x*this.a,ne.y=ne.y*this.a,ne}function inverse$1(ne){var ee=-1,te=0,st=0,ot,ct,ut,dt;if(ne.x=ne.x/this.a,ne.y=ne.y/this.a,this.shape==="ellipse"){this.flip_axis?(st=Math.tan(ne.y/this.radius_g_1),te=Math.tan(ne.x/this.radius_g_1)*hypot(1,st)):(te=Math.tan(ne.x/this.radius_g_1),st=Math.tan(ne.y/this.radius_g_1)*hypot(1,te));var ht=st/this.radius_p;if(ot=te*te+ht*ht+ee*ee,ct=2*this.radius_g*ee,ut=ct*ct-4*ot*this.C,ut<0)return ne.x=Number.NaN,ne.y=Number.NaN,ne;dt=(-ct-Math.sqrt(ut))/(2*ot),ee=this.radius_g+dt*ee,te*=dt,st*=dt,ne.x=Math.atan2(te,ee),ne.y=Math.atan(st*Math.cos(ne.x)/ee),ne.y=Math.atan(this.radius_p_inv2*Math.tan(ne.y))}else if(this.shape==="sphere"){if(this.flip_axis?(st=Math.tan(ne.y/this.radius_g_1),te=Math.tan(ne.x/this.radius_g_1)*Math.sqrt(1+st*st)):(te=Math.tan(ne.x/this.radius_g_1),st=Math.tan(ne.y/this.radius_g_1)*Math.sqrt(1+te*te)),ot=te*te+st*st+ee*ee,ct=2*this.radius_g*ee,ut=ct*ct-4*ot*this.C,ut<0)return ne.x=Number.NaN,ne.y=Number.NaN,ne;dt=(-ct-Math.sqrt(ut))/(2*ot),ee=this.radius_g+dt*ee,te*=dt,st*=dt,ne.x=Math.atan2(te,ee),ne.y=Math.atan(st*Math.cos(ne.x)/ee)}return ne.x=ne.x+this.long0,ne}var names$3=["Geostationary Satellite View","Geostationary_Satellite","geos"];const geos={init:init$2,forward:forward$1,inverse:inverse$1,names:names$3};var A1=1.340264,A2=-.081106,A3=893e-6,A4=.003796,M$4=Math.sqrt(3)/2;function init$1(){this.es=0,this.long0=this.long0!==void 0?this.long0:0}function forward(ne){var ee=adjust_lon(ne.x-this.long0),te=ne.y,st=Math.asin(M$4*Math.sin(te)),ot=st*st,ct=ot*ot*ot;return ne.x=ee*Math.cos(st)/(M$4*(A1+3*A2*ot+ct*(7*A3+9*A4*ot))),ne.y=st*(A1+A2*ot+ct*(A3+A4*ot)),ne.x=this.a*ne.x+this.x0,ne.y=this.a*ne.y+this.y0,ne}function inverse(ne){ne.x=(ne.x-this.x0)/this.a,ne.y=(ne.y-this.y0)/this.a;var ee=1e-9,te=12,st=ne.y,ot,ct,ut,dt,ht,ft;for(ft=0;ft<te&&(ot=st*st,ct=ot*ot*ot,ut=st*(A1+A2*ot+ct*(A3+A4*ot))-ne.y,dt=A1+3*A2*ot+ct*(7*A3+9*A4*ot),st-=ht=ut/dt,!(Math.abs(ht)<ee));++ft);return ot=st*st,ct=ot*ot*ot,ne.x=M$4*ne.x*(A1+3*A2*ot+ct*(7*A3+9*A4*ot))/Math.cos(st),ne.y=Math.asin(Math.sin(st)/M$4),ne.x=adjust_lon(ne.x+this.long0),ne}var names$2=["eqearth","Equal Earth","Equal_Earth"];const eqearth={init:init$1,forward,inverse,names:names$2};var EPS10=1e-10;
141function init(){var ne;if(this.phi1=this.lat1,Math.abs(this.phi1)<EPS10)throw new Error;this.es?(this.en=pj_enfn(this.es),this.m1=pj_mlfn(this.phi1,this.am1=Math.sin(this.phi1),ne=Math.cos(this.phi1),this.en),this.am1=ne/(Math.sqrt(1-this.es*this.am1*this.am1)*this.am1),this.inverse=e_inv,this.forward=e_fwd):(Math.abs(this.phi1)+EPS10>=HALF_PI?this.cphi1=0:this.cphi1=1/Math.tan(this.phi1),this.inverse=s_inv,this.forward=s_fwd)}function e_fwd(ne){var ee=adjust_lon(ne.x-(this.long0||0)),te=ne.y,st,ot,ct;return st=this.am1+this.m1-pj_mlfn(te,ot=Math.sin(te),ct=Math.cos(te),this.en),ot=ct*ee/(st*Math.sqrt(1-this.es*ot*ot)),ne.x=st*Math.sin(ot),ne.y=this.am1-st*Math.cos(ot),ne.x=this.a*ne.x+(this.x0||0),ne.y=this.a*ne.y+(this.y0||0),ne}function e_inv(ne){ne.x=(ne.x-(this.x0||0))/this.a,ne.y=(ne.y-(this.y0||0))/this.a;var ee,te,st,ot;if(te=hypot(ne.x,ne.y=this.am1-ne.y),ot=pj_inv_mlfn(this.am1+this.m1-te,this.es,this.en),(ee=Math.abs(ot))<HALF_PI)ee=Math.sin(ot),st=te*Math.atan2(ne.x,ne.y)*Math.sqrt(1-this.es*ee*ee)/Math.cos(ot);else if(Math.abs(ee-HALF_PI)<=EPS10)st=0;else throw new Error;return ne.x=adjust_lon(st+(this.long0||0)),ne.y=adjust_lat(ot),ne}function s_fwd(ne){var ee=adjust_lon(ne.x-(this.long0||0)),te=ne.y,st,ot;return ot=this.cphi1+this.phi1-te,Math.abs(ot)>EPS10?(ne.x=ot*Math.sin(st=ee*Math.cos(te)/ot),ne.y=this.cphi1-ot*Math.cos(st)):ne.x=ne.y=0,ne.x=this.a*ne.x+(this.x0||0),ne.y=this.a*ne.y+(this.y0||0),ne}function s_inv(ne){ne.x=(ne.x-(this.x0||0))/this.a,ne.y=(ne.y-(this.y0||0))/this.a;var ee,te,st=hypot(ne.x,ne.y=this.cphi1-ne.y);if(te=this.cphi1+this.phi1-st,Math.abs(te)>HALF_PI)throw new Error;return Math.abs(Math.abs(te)-HALF_PI)<=EPS10?ee=0:ee=st*Math.atan2(ne.x,ne.y)/Math.cos(te),ne.x=adjust_lon(ee+(this.long0||0)),ne.y=adjust_lat(te),ne}var names$1=["bonne","Bonne (Werner lat_1=90)"];
141const bonne={init,names:names$1};function includedProjections(ne){ne.Proj.projections.add(tmerc),ne.Proj.projections.add(etmerc),ne.Proj.projections.add(utm),ne.Proj.projections.add(sterea),ne.Proj.projections.add(stere),ne.Proj.projections.add(somerc),ne.Proj.projections.add(omerc),ne.Proj.projections.add(lcc),ne.Proj.projections.add(krovak),ne.Proj.projections.add(cass),ne.Proj.projections.add(laea),ne.Proj.projections.add(aea),ne.Proj.projections.add(gnom),ne.Proj.projections.add(cea),ne.Proj.projections.add(eqc),ne.Proj.projections.add(poly),ne.Proj.projections.add(nzmg),ne.Proj.projections.add(mill),ne.Proj.projections.add(sinu),ne.Proj.projections.add(moll),ne.Proj.projections.add(eqdc),ne.Proj.projections.add(vandg),ne.Proj.projections.add(aeqd),ne.Proj.projections.add(ortho),ne.Proj.projections.add(qsc),ne.Proj.projections.add(robin),ne.Proj.projections.add(geocent),ne.Proj.projections.add(tpers),ne.Proj.projections.add(geos),ne.Proj.projections.add(eqearth),ne.Proj.projections.add(bonne)}proj4.defaultDatum="WGS84";proj4.Proj=Projection;proj4.WGS84=new proj4.Proj("WGS84");proj4.Point=Point;proj4.toPoint=common;proj4.defs=defs;proj4.nadgrid=nadgrid;proj4.transform=transform;proj4.mgrs=mgrs;proj4.version="__VERSION__";includedProjections(proj4);var logger$C=LoggerByDefault.getLogger("CRS");function register(ne){const ee=Object.keys(ne.defs);logger$C.trace("proj. codes :",ee);const te=ee.length;let st,ot;for(st=0;st<te;++st){const ct=ee[st];if(!get$3(ct)){const ut=ne.defs(ct);addProjection(new Projection$1({code:ct,axisOrientation:ut.axis,metersPerUnit:ut.to_meter,units:ut.units}))}}for(st=0;st<te;++st){const ct=ee[st],ut=get$3(ct);for(ot=0;ot<te;++ot){const dt=ee[ot],ht=get$3(dt);if(!get$4(ct,dt))if(ne.defs[ct]===ne.defs[dt])addEquivalentProjections([ut,ht]);else{const ft=ne(ct,dt);addCoordinateTransforms(ut,ht,ft.forward,ft.inverse)}}}}var Register={isLoaded:!1,get:function(ne){if(!(ne===""||ne===null||typeof ne>"u")){var ee=ne.split(":");if(ee.length===2){var te=ee[0],st=ee[1];if(this.hasOwnProperty(te)&&this[te].hasOwnProperty(st))return this[te][st]}}},exist:function(ne){if(ne===""||ne===null||typeof ne>"u")return!1;var ee=ne.split(":");if(ee.length!==2)return!1;var te=ee[0],st=ee[1];return!(!this.hasOwnProperty(te)||!this[te].hasOwnProperty(st))},load:function(ne){if(!this.isLoaded){for(var ee=["IGNF","EPSG","CRS"],te=0;te<ee.length;te++){var st=ee[te],ot=this[st];for(var ct in ot)if(ot.hasOwnProperty(ct)){var ut=st+":"+ct;ne.defs(ut,this.get(ut))}}this.isLoaded=!0}},loadByDefault:function(ne){var ee={EPSG:{2154:Register.EPSG[2154],27571:Register.EPSG[27571],27572:Register.EPSG[27572],27573:Register.EPSG[27573],27574:Register.EPSG[27574]},CRS:{84:Register.CRS[84]},IGNF:{LAMB93:Register.IGNF.LAMB93,LAMBE:Register.IGNF.LAMBE,LAMB1:Register.IGNF.LAMB1,LAMB2:Register.IGNF.LAMB2,LAMB3:Register.IGNF.LAMB3,LAMB4:Register.IGNF.LAMB4,RGF93G:Register.IGNF.RGF93G,WGS84G:Register.IGNF.WGS84G}};for(var te in ee)if(ee.hasOwnProperty(te)){var st=ee[te];for(var ot in st)if(st.hasOwnProperty(ot)){var ct=te+":"+ot;ne.defs(ct,st[ot])}}},loadByName:function(ne,ee){if(!this.exist(ee))return!1;try{ne.defs(ee,this.get(ee))}catch{return!1}return!0},EPSG:{4978:"+proj=geocent +datum=WGS84 +units=m +no_defs ",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 +wktext  +no_defs",3785:"+title=WGS 84 / Pseudo-Mercator (deprecated) +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 +wktext  +no_defs",4149:"+title=CH1903 +proj=longlat +ellps=bessel +towgs84=674.374,15.056,405.346,0,0,0,0 +no_defs ",4150:"+title=CH1903plus +proj=longlat +ellps=bessel +towgs84=674.374,15.056,405.346,0,0,0,0 +no_defs ",4151:"+title=CHTRF95 +proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_defs ",4171:"+title=RGF93 +proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_defs ",4230:"+title=ED50 +proj=longlat +ellps=intl +no_defs ",4235:"+title=Guyane Francaise +proj=longlat +ellps=intl +no_defs ",4258:"+title=ETRS89 +proj=longlat +ellps=GRS80 +no_defs ",4275:"+title=NTF +proj=longlat +a=6378249.2 +b=6356515 +towgs84=-168,-60,320,0,0,0,0 +no_defs ",4322:"+title=WGS 72 +proj=longlat +ellps=WGS72 +no_defs ",4326:"+title=WGS 84 +proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs ",4467:"+proj=utm +zone=21 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs ",4470:"+proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_defs ",4471:"+proj=utm +zone=38 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs ",4474:"+proj=utm +zone=38 +south +ellps=intl +towgs84=-382,-59,-262,0,0,0,0 +units=m +no_defs ",4558:"+proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_defs ",4559:"+proj=utm +zone=20 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs ",4621:"+title=Fort Marigot +proj=longlat +ellps=intl +towgs84=137,248,-430,0,0,0,0 +no_defs ",4622:"+title=Guadeloupe 1948 +proj=longlat +ellps=intl +no_defs ",4623:"+title=CSG67 +proj=longlat +ellps=intl +towgs84=-186,230,110,0,0,0,0 +no_defs ",4624:"+title=RGFG95 +proj=longlat +ellps=GRS80 +towgs84=2,2,-2,0,0,0,0 +no_defs ",4625:"+title=Martinique 1938 +proj=longlat +ellps=intl +no_defs ",4626:"+title=Reunion 1947 +proj=longlat +ellps=intl +no_defs ",4627:"+title=RGR92 +proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_defs ",4628:"+title=Tahiti 52 +proj=longlat +ellps=intl +towgs84=162,117,154,0,0,0,0 +no_defs ",4629:"+title=Tahaa 54 +proj=longlat +ellps=intl +no_defs ",4630:"+title=IGN72 Nuku Hiva +proj=longlat +ellps=intl +no_defs ",4632:"+title=Combani 1950 +proj=longlat +ellps=intl +towgs84=-382,-59,-262,0,0,0,0 +no_defs ",4633:"+title=IGN56 Lifou +proj=longlat +ellps=intl +no_defs ",4634:"+title=IGN72 Grand Terre +proj=longlat +ellps=intl +no_defs ",4637:"+title=Perroud 1950 +proj=longlat +ellps=intl +towgs84=325,
141154,172,0,0,0,0 +no_defs ",4638:"+title=Saint Pierre et Miquelon 1950 +proj=longlat +ellps=clrk66 +towgs84=30,430,368,0,0,0,0 +no_defs ",4640:"+title=RRAF 1991 +proj=longlat +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +no_defs ",4641:"+title=IGN53 Mare +proj=longlat +ellps=intl +no_defs ",4645:"+title=RGNC 1991 +proj=longlat +ellps=intl +towgs84=0,0,0,0,0,0,0 +no_defs ",4687:"+proj=longlat +ellps=GRS80 +no_defs ",4662:"+title=IGN72 Grande Terre +proj=longlat +ellps=intl +no_defs ",4689:"+title=IGN63 Hiva Oa +proj=longlat +ellps=intl +no_defs ",4690:"+title=Tahiti 79 +proj=longlat +ellps=intl +no_defs ",4691:"+title=Moorea 87 +proj=longlat +ellps=intl +towgs84=215.525,149.593,176.229,-3.2624,-1.692,-1.1571,10.4773 +no_defs ",4692:"+title=Maupiti 83 +proj=longlat +ellps=intl +towgs84=217.037,86.959,23.956,0,0,0,0 +no_defs ",4698:"+title=IGN 1962 Kerguelen +proj=longlat +ellps=intl +towgs84=145,-187,103,0,0,0,0 +no_defs ",4749:"+title=RGNC91-93 +proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_defs ",4750:"+title=ST87 Ouvea +proj=longlat +ellps=WGS84 +towgs84=-56.263,16.136,-22.856,0,0,0,0 +no_defs ",4807:"+title=NTF (Paris) +proj=longlat +a=6378249.2 +b=6356515 +towgs84=-168,-60,320,0,0,0,0 +pm=paris +no_defs ",2056:"+title=CH1903+ / LV95 +proj=somerc +lat_0=46.95240555555556 +lon_0=7.439583333333333 +x_0=2600000 +y_0=1200000 +ellps=bessel +towgs84=674.374,15.056,405.346,0,0,0,0 +units=m +no_defs ",2154:"+title=RGF93 / Lambert-93 +proj=lcc +lat_1=49 +lat_2=44 +lat_0=46.5 +lon_0=3 +x_0=700000 +y_0=6600000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs ",2213:"+title=ETRS89 / TM 30 NE +proj=tmerc +lat_0=0 +lon_0=30 +k=0.9996 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs ",2969:"+title=Fort Marigot / UTM zone 20N +proj=utm +zone=20 +ellps=intl +towgs84=137,248,-430,0,0,0,0 +units=m +no_defs ",2970:"+title=Guadeloupe 1948 / UTM zone 20N +proj=utm +zone=20 +ellps=intl +units=m +no_defs ",2971:"+title=CSG67 / UTM zone 22N +proj=utm +zone=22 +ellps=intl +towgs84=-186,230,110,0,0,0,0 +units=m +no_defs ",2972:"+title=RGFG95 / UTM zone 22N +proj=utm +zone=22 +ellps=GRS80 +towgs84=2,2,-2,0,0,0,0 +units=m +no_defs ",2973:"+title=Martinique 1938 / UTM zone 20N +proj=utm +zone=20 +ellps=intl +units=m +no_defs ",2975:"+title=RGR92 / UTM zone 40S +proj=utm +zone=40 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs ",2976:"+title=Tahiti 52 / UTM zone 6S +proj=utm +zone=6 +south +ellps=intl +towgs84=162,117,154,0,0,0,0 +units=m +no_defs ",2977:"+title=Tahaa 54 / UTM zone 5S +proj=utm +zone=5 +south +ellps=intl +units=m +no_defs ",2978:"+title=IGN72 Nuku Hiva / UTM zone 7S +proj=utm +zone=7 +south +ellps=intl +units=m +no_defs ",2980:"+title=Combani 1950 / UTM zone 38S +proj=utm +zone=38 +south +ellps=intl +towgs84=-382,-59,-262,0,0,0,0 +units=m +no_defs ",2981:"+title=IGN56 Lifou / UTM zone 58S +proj=utm +zone=58 +south +ellps=intl +units=m +no_defs ",2982:"+title=IGN72 Grand Terre / UTM zone 58S (deprecated) +proj=utm +zone=58 +south +ellps=intl +units=m +no_defs ",2984:"+title=RGNC 1991 / Lambert New Caledonia (deprecated) +proj=lcc +lat_1=-20.66666666666667 +lat_2=-22.33333333333333 +lat_0=-21.5 +lon_0=166 +x_0=400000 +y_0=300000 +ellps=intl +towgs84=0,0,0,0,0,0,0 +units=m +no_defs ",2986:"+title=Terre Adelie 1950 +proj=stere +towgs84=324.9120,153.2820,172.0260 +a=6378388.0000 +rf=297.0000000000000 +lat_0=-90.000000000 +lon_0=140.000000000 +lat_ts=-67.000000000 +k=0.96027295 +x_0=300000.000 +y_0=-2299363.482 +units=m +no_defs",2987:"+title=Saint Pierre et Miquelon 1950 / UTM zone 21N +proj=utm +zone=21 +ellps=clrk66 +towgs84=30,430,368,0,0,0,0 +units=m +no_defs ",2989:"+title=RRAF 1991 / UTM zone 20N +proj=utm +zone=20 +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs ",2990:"+title=Reunion 1947 / TM Reunion (deprecated) +proj=tmerc +lat_0=-21.11666666666667 +lon_0=55.53333333333333 +k=1 +x_0=50000 +y_0=160000 +ellps=intl +units=m +no_defs ",2995:"+title=IGN53 Mare / UTM zone 58S +proj=utm +zone=58 +south +ellps=intl +units=m +no_defs ",3038:"+proj=utm +zone=26 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs ",3039:"+proj=utm +zone=27 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs ",3040:"+proj=utm +zone=28 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs ",3041:"+proj=utm +zone=29 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs ",3045:"+proj=utm +zone=33 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs ",3046:"+proj=utm +zone=34 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs ",3047:"+proj=utm +zone=35 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs ",3048:"+proj=utm +zone=36 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs ",3049:"+proj=utm +zone=37 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs ",3050:"+proj=utm +zone=38 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs ",3051:"+proj=utm +zone=39 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs ",3034:"+title=ETRS89 / ETRS-LCC +proj=lcc +lat_1=35 +lat_2=65 +lat_0=52 +lon_0=10 +x_0=4000000 +y_0=2800000 +ellps=GRS80 +units=m +no_defs ",3035:"+title=ETRS89 / ETRS-LAEA +proj=laea +lat_0=52 +lon_0=10 +x_0=4321000 +y_0=3210000 +ellps=GRS80 +units=m +no_defs ",3042:"+title=ETRS89 / ETRS-TM30 +proj=utm +zone=30 +ellps=GRS80 +units=m +no_defs ",3043:"+title=ETRS89 / ETRS-TM31 +proj=utm +zone=31 +ellps=GRS80 +units=m +no_defs ",3044:"+title=ETRS89 / ETRS-TM32 +proj=utm +zone=32 +ellps=GRS80 +units=m +no_defs ",25828:"+proj=utm +zone=28 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs ",25829:"+proj=utm +zone=29 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs ",25833:"+proj=utm +zone=33 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs ",25834:"+proj=utm +zone=34 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs ",25835:"+proj=utm +zone=35 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs ",25836:"+proj=utm +zone=36 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs ",25837:"+proj=utm +zone=37 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs ",25838:"+proj=utm +zone=38 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs ",3060:"+title=IGN72 Grande Terre / UTM zone 58S +proj=utm +zone=58 +south +ellps=intl +units=m +no_defs ",3
141163:"+title=RGNC91-93 / Lambert New Caledonia +proj=lcc +lat_1=-20.66666666666667 +lat_2=-22.33333333333333 +lat_0=-21.5 +lon_0=166 +x_0=400000 +y_0=300000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs ",3164:"+title=ST87 Ouvea / UTM zone 58S +proj=utm +zone=58 +south +ellps=WGS84 +towgs84=-56.263,16.136,-22.856,0,0,0,0 +units=m +no_defs ",3165:"+title=NEA74 Noumea / Noumea Lambert +proj=lcc +lat_1=-22.24469175 +lat_2=-22.29469175 +lat_0=-22.26969175 +lon_0=166.44242575 +x_0=0.66 +y_0=1.02 +ellps=intl +units=m +no_defs ",3166:"+title=NEA74 Noumea / Noumea Lambert 2 +proj=lcc +lat_1=-22.24472222222222 +lat_2=-22.29472222222222 +lat_0=-22.26972222222222 +lon_0=166.4425 +x_0=8.313000000000001 +y_0=-2.354 +ellps=intl +units=m +no_defs ",3169:"+title=RGNC91-93 / UTM zone 57S +proj=utm +zone=57 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs ",3170:"+title=RGNC91-93 / UTM zone 58S +proj=utm +zone=58 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs ",3171:"+title=RGNC91-93 / UTM zone 59S +proj=utm +zone=59 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs ",3
141172:"+title=IGN53 Mare / UTM zone 59S +proj=utm +zone=59 +south +ellps=intl +units=m +no_defs ",3296:"+title=RGPF / UTM zone 5S +proj=utm +zone=5 +south +ellps=GRS80 +units=m +no_defs ",3297:"+title=RGPF / UTM zone 6S +proj=utm +zone=6 +south +ellps=GRS80 +units=m +no_defs ",3298:"+title=RGPF / UTM zone 7S +proj=utm +zone=7 +south +ellps=GRS80 +units=m +no_defs ",3299:"+title=RGPF / UTM zone 8S +proj=utm +zone=8 +south +ellps=GRS80 +units=m +no_defs ",3302:"+title=IGN63 Hiva Oa / UTM zone 7S +proj=utm +zone=7 +south +ellps=intl +units=m +no_defs ",3303:"+title=Fatu Iva 72 / UTM zone 7S +proj=utm +zone=7 +south +ellps=intl +towgs84=347.103,1078.12,2623.92,-33.8875,70.6773,-9.3943,186.074 +units=m +no_defs ",3304:"+title=Tahiti 79 / UTM zone 6S +proj=utm +zone=6 +south +ellps=intl +units=m +no_defs ",3305:"+title=Moorea 87 / UTM zone 6S +proj=utm +zone=6 +south +ellps=intl +towgs84=215.525,149.593,176.229,-3.2624,-1.692,-1.1571,10.4773 +units=m +no_defs ",3306:"+title=Maupiti 83 / UTM zone 5S +proj=utm +zone=5 +south +ellps=intl +towgs84=217.037,86.959,23.956,0,0,0,0 +units=m +no_defs ",3312:"+title=CSG67 / UTM zone 21N +proj=utm +zone=21 +ellps=intl +towgs84=-186,230,110,0,0,0,0 +units=m +no_defs ",3313:"+title=RGFG95 / UTM zone 21N +proj=utm +zone=21 +ellps=GRS80 +towgs84=2,2,-2,0,0,0,0 +units=m +no_defs ",3336:"+title=IGN 1962 Kerguelen / UTM zone 42S +proj=utm +zone=42 +south +ellps=intl +towgs84=145,-187,103,0,0,0,0 +units=m +no_defs ",3395:"+title=WGS 84 / World Mercator +proj=merc +lon_0=0 +k=1 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",3727:"+title=Reunion 1947 / TM Reunion +proj=tmerc +lat_0=-21.11666666666667 +lon_0=55.53333333333333 +k=1 +x_0=160000 +y_0=50000 +ellps=intl +units=m +no_defs ",21781:"+title=CH1903 / LV03 +proj=somerc +lat_0=46.95240555555556 +lon_0=7.439583333333333 +x_0=600000 +y_0=200000 +ellps=bessel +towgs84=674.374,15.056,405.346,0,0,0,0 +units=m +no_defs ",25830:"+title=ETRS89 / UTM zone 30N +proj=utm +zone=30 +ellps=GRS80 +units=m +no_defs ",25831:"+title=ETRS89 / UTM zone 31N +proj=utm +zone=31 +ellps=GRS80 +units=m +no_defs ",25832:"+title=ETRS89 / UTM zone 32N +proj=utm +zone=32 +ellps=GRS80 +units=m +no_defs ",27561:"+title=NTF (Paris) / Lambert Nord France +proj=lcc +lat_1=49.50000000000001 +lat_0=49.50000000000001 +lon_0=0 +k_0=0.999877341 +x_0=600000 +y_0=200000 +a=6378249.2 +b=6356515 +towgs84=-168,-60,320,0,0,0,0 +pm=paris +units=m +no_defs ",27562:"+title=NTF (Paris) / Lambert Centre France +proj=lcc +lat_1=46.8 +lat_0=46.8 +lon_0=0 +k_0=0.99987742 +x_0=600000 +y_0=200000 +a=6378249.2 +b=6356515 +towgs84=-168,-60,320,0,0,0,0 +pm=paris +units=m +no_defs ",27563:"+title=NTF (Paris) / Lambert Sud France +proj=lcc +lat_1=44.10000000000001 +lat_0=44.10000000000001 +lon_0=0 +k_0=0.9998774990000001 +x_0=600000 +y_0=200000 +a=6378249.2 +b=6356515 +towgs84=-168,-60,320,0,0,0,0 +pm=paris +units=m +no_defs ",27564:"+title=NTF (Paris) / Lambert Corse +proj=lcc +lat_1=42.16500000000001 +lat_0=42.16500000000001 +lon_0=0 +k_0=0.9999447100000001 +x_0=234.358 +y_0=185861.369 +a=6378249.2 +b=6356515 +towgs84=-168,-60,320,0,0,0,0 +pm=paris +units=m +no_defs ",27571:"+title=NTF (Paris) / Lambert zone I +proj=lcc +lat_1=49.50000000000001 +lat_0=49.50000000000001 +lon_0=0 +k_0=0.999877341 +x_0=600000 +y_0=1200000 +a=6378249.2 +b=6356515 +towgs84=-168,-60,320,0,0,0,0 +pm=paris +units=m +no_defs ",27572:"+title=NTF (Paris) / Lambert zone II +proj=lcc +lat_1=46.8 +lat_0=46.8 +lon_0=0 +k_0=0.99987742 +x_0=600000 +y_0=2200000 +a=6378249.2 +b=6356515 +towgs84=-168,-60,320,0,0,0,0 +pm=paris +units=m +no_defs ",27573:"+title=NTF (Paris) / Lambert zone III +proj=lcc +lat_1=44.10000000000001 +lat_0=44.10000000000001 +lon_0=0 +k_0=0.9998774990000001 +x_0=600000 +y_0=3200000 +a=6378249.2 +b=6356515 +towgs84=-168,-60,320,0,0,0,0 +pm=paris +units=m +no_defs ",27574:"+title=NTF (Paris) / Lambert zone IV +proj=lcc +lat_1=42.16500000000001 +lat_0=42.16500000000001 +lon_0=0 +k_0=0.9999447100000001 +x_0=234.358 +y_0=4185861.369 +a=6378249.2 +b=6356515 +towgs84=-168,-60,320,0,0,0,0 +pm=paris +units=m +no_defs ",27581:"+title=NTF (Paris) / France I (deprecated) +proj=lcc +lat_1=49.50000000000001 +lat_0=49.50000000000001 +lon_0=0 +k_0=0.999877341 +x_0=600000 +y_0=1200000 +a=6378249.2 +b=6356515 +towgs84=-168,-60,320,0,0,0,0 +pm=paris +units=m +no_defs ",27582:"+title=NTF (Paris) / France II (deprecated) +proj=lcc +lat_1=46.8 +lat_0=46.8 +lon_0=0 +k_0=0.99987742 +x_0=600000 +y_0=2200000 +a=6378249.2 +b=6356515 +towgs84=-168,-60,320,0,0,0,0 +pm=paris +units=m +no_defs ",27583:"+title=NTF (Paris) / France III (deprecated) +proj=lcc +lat_1=44.10000000000001 +lat_0=44.10000000000001 +lon_0=0 +k_0=0.9998774990000001 +x_0=600000 +y_0=3200000 +a=6378249.2 +b=6356515 +towgs84=-168,-60,320,0,0,0,0 +pm=paris +units=m +no_defs ",27584:"+title=NTF (Paris) / France IV (deprecated) +proj=lcc +lat_1=42.16500000000001 +lat_0=42.16500000000001 +lon_0=0 +k_0=0.9999447100000001 +x_0=234.358 +y_0=4185861.369 +a=6378249.2 +b=6356515 +towgs84=-168,-60,320,0,0,0,0 +pm=paris +units=m +no_defs ",27591:"+title=NTF (Paris) / Nord France (deprecated) +proj=lcc +lat_1=49.50000000000001 +lat_0=49.50000000000001 +lon_0=0 +k_0=0.999877341 +x_0=600000 +y_0=200000 +a=6378249.2 +b=6356515 +towgs84=-168,-60,320,0,0,0,0 +pm=paris +units=m +no_defs ",27592:"+title=NTF (Paris) / Centre France (deprecated) +proj=lcc +lat_1=46.8 +lat_0=46.8 +lon_0=0 +k_0=0.99987742 +x_0=600000 +y_0=200000 +a=6378249.2 +b=6356515 +towgs84=-168,-60,320,0,0,0,0 +pm=paris +units=m +no_defs ",27593:"+title=NTF (Paris) / Sud France (deprecated) +proj=lcc +lat_1=44.10000000000001 +lat_0=44.10000000000001 +lon_0=0 +k_0=0.9998774990000001 +x_0=600000 +y_0=200000 +a=6378249.2 +b=6356515 +towgs84=-168,-60,320,0,0,0,0 +pm=paris +units=m +no_defs ",27594:"+title=NTF (Paris) / Corse (deprecated) +proj=lcc +lat_1=42.16500000000001 +lat_0=42.16500000000001 +lon_0=0 +k_0=0.9999447100000001 +x_0=234.358 +y_0=185861.369 +a=6378249.2 +b=6356515 +towgs84=-168,-60,320,0,0,0,0 +pm=paris +units=m +no_defs ",32601:"+proj=utm +zone=1 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32602:"+proj=utm +zone=2 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32603:"+proj=utm +zone=3 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32604:"+proj=utm +zone=4 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32605:"+proj=utm +zone=5 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32606:"+proj=utm +zone=6 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32607:"+proj=utm +zone=7 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32608:"+proj=utm +zone=8 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32609:"+proj=utm +zone=9 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32610:"+proj=utm +zone=10 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32611:"+proj=utm +zone=11 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32612:"+proj=utm +zone=12 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32613:"+proj=utm +zone=13 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32614:"+proj=utm +zone=14 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32615:"+proj=utm +zone=15 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32616:"+proj=utm +zone=16 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32617:"+proj=utm +zone=17 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32618:"+proj=utm +zone=18 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32619:"+proj=utm +zone=19 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32620:"+proj=utm +zone=20 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32621:"+proj=utm +zone=21 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32622:"+proj=utm +zone=22 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32623:"+proj=utm +zone=23 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32624:"+proj=utm +zone=24 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32625:"+proj=utm +zone=25 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32626:"+proj=utm +zone=26 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32627:"+proj=utm +zone=27 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32628:"+proj=utm +zone=28 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32629:"+proj=utm +zone=29 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32630:"+proj=utm +zone=30 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32631:"+proj=utm +zone=31 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32632:"+proj=utm +zone=32 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32633:"+proj=utm +zone=33 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32634:"+proj=utm +zone=34 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32635:"+proj=utm +zone=35 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32636:"+proj=utm +zone=36 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32637:"+proj=utm +zone=37 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32638:"+proj=utm +zone=38 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32639:"+proj=utm +zone=39 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32640:"+proj=utm +zone=40 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32641:"+proj=utm +zone=41 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32642:"+proj=utm +zone=42 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32643:"+proj=utm +zone=43 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32644:"+proj=utm +zone=44 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32645:"
141+proj=utm +zone=45 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32646:"+proj=utm +zone=46 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32647:"+proj=utm +zone=47 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32648:"+proj=utm +zone=48 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32649:"+proj=utm +zone=49 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32650:"+proj=utm +zone=50 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32651:"+proj=utm +zone=51 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32652:"+proj=utm +zone=52 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32653:"+proj=utm +zone=53 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32654:"+proj=utm +zone=54 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32655:"+proj=utm +zone=55 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32656:"+proj=utm +zone=56 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32657:"+proj=utm +zone=57 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32658:"+proj=utm +zone=58 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32659:"+proj=utm +zone=59 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32660:"+proj=utm +zone=60 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32661:"+proj=stere +lat_0=90 +lat_ts=90 +lon_0=0 +k=0.994 +x_0=2000000 +y_0=2000000 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32662:"+title=WGS 84 / Plate Carree +proj=eqc +lat_ts=0 +lon_0=0 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32701:"+proj=utm +zone=1 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32702:"+proj=utm +zone=2 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32703:"+proj=utm +zone=3 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32704:"+proj=utm +zone=4 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32705:"+proj=utm +zone=5 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32706:"+proj=utm +zone=6 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32707:"+proj=utm +zone=7 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32708:"+proj=utm +zone=8 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32709:"+proj=utm +zone=9 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32710:"+proj=utm +zone=10 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32711:"+proj=utm +zone=11 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32712:"+proj=utm +zone=12 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32713:"+proj=utm +zone=13 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32714:"+proj=utm +zone=14 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32715:"+proj=utm +zone=15 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32716:"+proj=utm +zone=16 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32717:"+proj=utm +zone=17 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32718:"+proj=utm +zone=18 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32719:"+proj=utm +zone=19 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32720:"+proj=utm +zone=20 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32721:"+proj=utm +zone=21 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32722:"+proj=utm +zone=22 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32723:"+proj=utm +zone=23 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32724:"+proj=utm +zone=24 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32725:"+proj=utm +zone=25 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32726:"+proj=utm +zone=26 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32727:"+proj=utm +zone=27 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32728:"+proj=utm +zone=28 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32729:"+proj=utm +zone=29 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32730:"+proj=utm +zone=30 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32731:"+proj=utm +zone=31 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32732:"+proj=utm +zone=32 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32733:"+proj=utm +zone=33 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32734:"+proj=utm +zone=34 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32735:"+proj=utm +zone=35 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32736:"+proj=utm +zone=36 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32737:"+proj=utm +zone=37 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32738:"+proj=utm +zone=38 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32739:"+proj=utm +zone=39 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32740:"+proj=utm +zone=40 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32741:"+proj=utm +zone=41 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32742:"+proj=utm +zone=42 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32743:"+proj=utm +zone=43 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32744:"+proj=utm +zone=44 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32745:"+proj=utm +zone=45 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32746:"+proj=utm +zone=46 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32747:"+proj=utm +zone=47 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32748:"+proj=utm +zone=48 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32749:"+proj=utm +zone=49 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32750:"+proj=utm +zone=50 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32751:"+proj=utm +zone=51 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32752:"+proj=utm +zone=52 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32753:"+proj=utm +zone=53 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32754:"+proj=utm +zone=54 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32755:"+proj=utm +zone=55 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32756:"+proj=utm +zone=56 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32757:"+proj=utm +zone=57 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32758:"+proj=utm +zone=58 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32759:"+proj=utm +zone=59 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32760:"+proj=utm +zone=60 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",32761:"+proj=stere +lat_0=-90 +lat_ts=-90 +lon_0=0 +k=0.994 +x_0=2000000 +y_0=2000000 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ",3
14110024802:"+title=Geoportail - France metropolitaine +proj=eqc +nadgrids=null +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=0.000000000 +lat_ts=46.500000000 +x_0=0.000 +y_0=0.000 +units=m +no_defs",310915814:"+title=Geoportail - Antilles francaises +proj=eqc +nadgrids=null +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=0.000000000 +lat_ts=15.000000000 +x_0=0.000 +y_0=0.000 +units=m +no_defs",310486805:"+title=Geoportail - Guyane +proj=eqc +nadgrids=null +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=0.000000000 +lat_ts=4.000000000 +x_0=0.000 +y_0=0.000 +units=m +no_defs",310700806:"+title=Geoportail - Reunion et dependances +proj=eqc +nadgrids=null +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=0.000000000 +lat_ts=-21.000000000 +x_0=0.000 +y_0=0.000 +units=m +no_defs",310702807:"+title=Geoportail - Mayotte +proj=eqc +nadgrids=null +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=0.000000000 +lat_ts=-12.000000000 +x_0=0.000 +y_0=0.000 +units=m +no_defs",310706808:"+title=Geoportail - Saint-Pierre et Miquelon +proj=eqc +nadgrids=null +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=0.000000000 +lat_ts=47.000000000 +x_0=0.000 +y_0=0.000 +units=m +no_defs",310547809:"+title=Geoportail - Nouvelle-Caledonie +proj=eqc +nadgrids=null +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=0.000000000 +lat_ts=-22.000000000 +x_0=0.000 +y_0=0.000 +units=m +no_defs",310642810:"+title=Geoportail - Wallis et Futuna +proj=eqc +nadgrids=null +towgs84=0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.000000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=0.000000000 +lat_ts=-14.000000000 +x_0=0.000 +y_0=0.000 +units=m +no_defs",310032811:"+title=Geoportail - Polynesie francaise +proj=eqc +nadgrids=null +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=0.000000000 +lat_ts=-15.000000000 +x_0=0.000 +y_0=0.000 +units=m +no_defs",310642812:"+title=Geoportail - Kerguelen +proj=eqc +nadgrids=null +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=0.000000000 +lat_ts=-49.500000000 +x_0=0.000 +y_0=0.000 +units=m +no_defs",310642801:"+title=Geoportail - Crozet +proj=eqc +nadgrids=null +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=0.000000000 +lat_ts=-46.000000000 +x_0=0.000 +y_0=0.000 +units=m +no_defs",310642813:"+title=Geoportail - Amsterdam et Saint-Paul +proj=eqc +nadgrids=null +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=0.000000000 +lat_ts=-38.000000000 +x_0=0.000 +y_0=0.000 +units=m +no_defs",310642901:"+title=Geoportail - Monde +proj=mill +towgs84=0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.000000 +a=6378137.0000 +rf=298.2572221010000 +lon_0=0.000000000 +x_0=0.000 +y_0=0.000 +units=m +no_defs",5489:"+title=RGAF09 geographiques (dms) +proj=longlat +nadgrids=@null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137 +rf=298.257222101 +units=m +no_defs",5490:"+title=RGAF09 UTM Nord Fuseau 20 +proj=tmerc +nadgrids=@null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137 +rf=298.257222101 +lat_0=0.000000000 +lon_0=-63.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=0.000 +units=m +no_defs"},CRS:{84:"+title=WGS 84 longitude-latitude +proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs "},IGNF:{AMST63:"+title=Amsterdam 1963 +proj=geocent +towgs84=109.753,-528.133,-362.244,0,0,0,0 +a=6378388.0000 +rf=297.0000000000000 +units=m +no_defs",CROZ63:"+title=Crozet 1963 +proj=geocent +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378388.0000 +rf=297.0000000000000 +units=m +no_defs",CSG67:"+title=Guyane CSG67 +proj=geocent +towgs84=-193.0660,236.9930,105.4470,0.4814,-0.8074,0.1276,1.564900 +a=6378388.0000 +rf=297.0000000000000 +units=m +no_defs",ED50:"+title=ED50 +proj=geocent +towgs84=-84.0000,-97.0000,-117.0000 +a=6378388.0000 +rf=297.0000000000000 +units=m +no_defs",ETRS89:"+title=Systeme de reference terrestre Europeen (1989) +proj=geocent +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +units=m +no_defs",GUAD48:"+title=Guadeloupe Ste Anne +proj=geocent +towgs84=-472.2900,-5.6300,-304.1200,0.43
14162,-0.8374,0.2563,1.898400 +a=6378388.0000 +rf=297.0000000000000 +units=m +no_defs",GUADFM49:"+title=Guadeloupe Fort Marigot +proj=geocent +towgs84=136.5960,248.1480,-429.7890 +a=6378388.0000 +rf=297.0000000000000 +units=m +no_defs",IGN63:"+title=IGN 1963 (Hiva Oa, Tahuata, Mohotani) +proj=geocent +towgs84=410.7210,55.0490,80.7460,-2.5779,-2.3514,-0.6664,17.331100 +a=6378388.0000 +rf=297.0000000000000 +units=m +no_defs",IGN72:"+title=IGN 1972 Grande-Terre / Ile des Pins +proj=geocent +towgs84=-11.6400,-348.6000,291.6800 +a=6378388.0000 +rf=297.0000000000000 +units=m +no_defs",KERG62CAR:"+title=Kerguelen - K0 +proj=geocent +towgs84=144.8990,-186.7700,100.9230 +a=6378388.0000 +rf=297.0000000000000 +units=m +no_defs",MART38:"+title=Martinique Fort-Desaix +proj=geocent +towgs84=126.9260,547.9390,130.4090,-2.7867,5.1612,-0.8584,13.822650 +a=6378388.0000 +rf=297.0000000000000 +units=m +no_defs",MAYO50:"+title=Mayotte Combani +proj=geocent +towgs84=-599.9280,-275.5520,-195.6650,-0.0835,-0.4715,0.0602,49.281400 +a=6378388.0000 +rf=297.0000000000000 +units=m +no_defs",MOOREA87:"+title=Moorea 1987 +proj=geocent +towgs84=215.9820,149.5930,176.2290,3.2624,1.6920,1.1571,10.477300 +a=6378388.0000 +rf=297.0000000000000 +units=m +no_defs",NTF:"+title=Nouvelle Triangulation Francaise +proj=geocent +nadgrids=ntf_r93.gsb,null +wktext +towgs84=-168.0000,-60.0000,320.0000 +a=6378249.2000 +rf=293.4660210000000 +units=m +no_defs",NUKU72:"+title=IGN 1972 Nuku Hiva +proj=geocent +towgs84=165.7320,216.7200,180.5050,-0.6434,-0.4512,-0.0791,7.420400 +a=6378388.0000 +rf=297.0000000000000 +units=m +no_defs",REUN47:"+title=Reunion 1947 +proj=geocent +towgs84=789.5240,-626.4860,-89.9040,0.6006,76.7946,-10.5788,-32.324100 +a=6378388.0000 +rf=297.0000000000000 +units=m +no_defs",RGF93:"+title=Reseau geodesique francais 1993 +proj=geocent +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +units=m +no_defs",RGFG95:"+title=Reseau geodesique francais de Guyane 1995 +proj=geocent +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +units=m +no_defs",RGM04:"+title=RGM04 (Reseau Geodesique de Mayotte 2004) +proj=geocent +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +units=m +no_defs",RGNC:"+title=Reseau Geodesique de Nouvelle-Caledonie +proj=geocent +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +units=m +no_defs",RGPF:"+title=RGPF (Reseau Geodesique de Polynesie Francaise) +proj=geocent +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +units=m +no_defs",RGR92:"+title=Reseau geodesique Reunion 1992 +proj=geocent +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +units=m +no_defs",RGSPM06:"+title=Reseau Geodesique Saint-Pierre-et-Miquelon (2006) +proj=geocent +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +units=m +no_defs",RGTAAF07:"+title=Reseau Geodesique des TAAF (2007) +proj=geocent +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +units=m +no_defs",RRAF91:"+title=RRAF 1991 (Reseau de Reference des Antilles Francaises) +proj=geocent +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +units=m +no_defs",STPL69:"+title=Saint-Paul 1969 +proj=geocent +towgs84=225.571,-346.608,-46.567,0,0,0,0 +a=6378388.0000 +rf=297.0000000000000 +units=m +no_defs",STPM50:"+title=St Pierre et Miquelon 1950 +proj=geocent +towgs84=-95.5930,573.7630,173.4420,-0.9602,1.2510,-1.3918,42.626500 +a=6378206.4000 +rf=294.9786982000000 +units=m +no_defs",TAHAA:"+title=Raiatea - Tahaa 51-54 (Tahaa, Base Terme Est) +proj=geocent +towgs84=72.4380,345.9180,79.4860,-1.6045,-0.8823,-0.5565,1.374600 +a=6378388.0000 +rf=297.0000000000000 +units=m +no_defs",TAHI79:"+title=IGN79 (Tahiti) Iles de la Societe +proj=geocent +towgs84=221.5250,152.9480,176.7680,2.3847,1.3896,0.8770,11.474100 +a=6378388.0000 +rf=297.0000000000000 +units=m +no_defs",TERA50:"+title=Pointe Geologie - Perroud 1950 +proj=geocent +towgs84=324.9120,153.2820,172.0260 +a=6378388.0000 +rf=297.0000000000000 +units=m +no_defs",WALL78:"+title=Wallis-Uvea 1978 (MOP78) +proj=geocent +towgs84=253.0000,-133.0000,-127.0000 +a=6378388.0000 +rf=297.0000000000000 +units=m +no_defs",WGS72:"+title=World Geodetic System 1972 +proj=geocent +towgs84=0.0000,12.0000,6.0000 +a=6378135.0000 +rf=298.2600000000000 +units=m +no_defs",WGS84:"+title=World Geodetic System 1984 +proj=geocent +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +units=m +no_defs",AMST63GEO:"+title=Amsterdam 
1411963 +proj=longlat +towgs84=109.753,-528.133,-362.244,0,0,0,0 +a=6378388.0000 +rf=297.0000000000000 +units=m +no_defs",CROZ63GEO:"+title=Crozet 1963 +proj=longlat +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378388.0000 +rf=297.0000000000000 +units=m +no_defs",CSG67GEO:"+title=Guyane CSG67 +proj=longlat +towgs84=-193.0660,236.9930,105.4470,0.4814,-0.8074,0.1276,1.564900 +a=6378388.0000 +rf=297.0000000000000 +units=m +no_defs",ED50G:"+title=ED50 +proj=longlat +towgs84=-84.0000,-97.0000,-117.0000 +a=6378388.0000 +rf=297.0000000000000 +units=m +no_defs",GUAD48GEO:"+title=Guadeloupe Ste Anne +proj=longlat +towgs84=-472.2900,-5.6300,-304.1200,0.4362,-0.8374,0.2563,1.898400 +a=6378388.0000 +rf=297.0000000000000 +units=m +no_defs",GUADFM49GEO:"+title=Guadeloupe Fort Marigot +proj=longlat +towgs84=136.5960,248.1480,-429.7890 +a=6378388.0000 +rf=297.0000000000000 +units=m +no_defs",IGN63GEO:"+title=IGN 1963 (Hiva Oa, Tahuata, Mohotani) +proj=longlat +towgs84=410.7210,55.0490,80.7460,-2.5779,-2.3514,-0.6664,17.331100 +a=6378388.0000 +rf=297.0000000000000 +units=m +no_defs",IGN72GEO:"+title=IGN 1972 Grande-Terre / Ile des Pins +proj=longlat +towgs84=-11.6400,-348.6000,291.6800 +a=6378388.0000 +rf=297.0000000000000 +units=m +no_defs",KERG62GEO:"+title=Kerguelen - K0 +proj=longlat +towgs84=144.8990,-186.7700,100.9230 +a=6378388.0000 +rf=297.0000000000000 +units=m +no_defs",MART38GEO:"+title=Martinique Fort-Desaix +proj=longlat +towgs84=126.9260,547.9390,130.4090,-2.7867,5.1612,-0.8584,13.822650 +a=6378388.0000 +rf=297.0000000000000 +units=m +no_defs",MAYO50GEO:"+title=Mayotte Combani +proj=longlat +towgs84=-599.9280,-275.5520,-195.6650,-0.0835,-0.4715,0.0602,49.281400 +a=6378388.0000 +rf=297.0000000000000 +units=m +no_defs",MOOREA87GEO:"+title=Moorea 1987 +proj=longlat +towgs84=215.9820,149.5930,176.2290,3.2624,1.6920,1.1571,10.477300 +a=6378388.0000 +rf=297.0000000000000 +units=m +no_defs",NTFG:"+title=Nouvelle Triangulation Francaise Greenwich degres sexagesimaux +proj=longlat +nadgrids=ntf_r93.gsb,null +wktext +towgs84=-168.0000,-60.0000,320.0000 +a=6378249.2000 +rf=293.4660210000000 +units=m +no_defs",NTFP:"+title=Nouvelle Triangulation Francaise Paris grades +proj=longlat +nadgrids=ntf_r93.gsb,null +wktext +towgs84=-168.0000,-60.0000,320.0000 +a=6378249.2000 +rf=293.4660210000000 +pm=2.337229167 +units=m +no_defs",NUKU72GEO:"+title=IGN 1972 Nuku Hiva +proj=longlat +towgs84=165.7320,216.7200,180.5050,-0.6434,-0.4512,-0.0791,7.420400 +a=6378388.0000 +rf=297.0000000000000 +units=m +no_defs",REUN47GEO:"+title=Reunion 1947 +proj=longlat +towgs84=789.5240,-626.4860,-89.9040,0.6006,76.7946,-10.5788,-32.324100 +a=6378388.0000 +rf=297.0000000000000 +units=m +no_defs",RGF93G:"+title=Reseau geodesique francais 1993 +proj=longlat +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +units=m +no_defs",RGFG95GEO:"+title=Reseau geodesique francais de Guyane 1995 +proj=longlat +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +units=m +no_defs",RGM04GEO:"+title=RGM04 (Reseau Geodesique de Mayotte 2004) +proj=longlat +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +units=m +no_defs",RGNCGEO:"+title=Reseau Geodesique de Nouvelle-Caledonie +proj=longlat +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +units=m +no_defs",RGPFGEO:"+title=RGPF (Reseau Geodesique de Polynesie Francaise) +proj=longlat +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +units=m +no_defs",RGR92GEO:"+title=Reseau geodesique de la Reunion 1992 +proj=longlat +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +units=m +no_defs",RGSPM06GEO:"+title=Saint-Pierre-et-Miquelon (2006) +proj=longlat +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +units=m +no_defs",RGTAAF07G:"+title=Reseau Geodesique des TAAF (2007) (dms) +proj=longlat +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +units=m +no_defs",STPL69GEO:"+title=Saint-Paul 1969 +proj=longlat +towgs84=225.571,-346.608,-46.567,0,0,0,0 +a=6378388.0000 +rf=297.0000000000000 +units=m +no_defs",STPM50GEO:"+title=St Pierre et Miquelon 1950  +proj=longlat +towgs84=-95.5930,573.7630,173.4420,-0.9602,1.2510,-1.3918,42.626500 +a=6378206.4000 +rf=294.9786982000000 +units=m +no_defs",TAHAAGEO:"+title=Raiatea - Tahaa 51-54 (Tahaa, Base Terme Est) +proj=longlat +towgs84=72.4380,345.9180,79.4860,-1.6045,-0.8823,-0.5565,1.374600 +a=6378388.0000 +rf=297.0000000000000 +units=m +no_defs",TAHI79GEO:"+title=IGN79 (Tahiti) Iles de la Societe +proj=longlat +towgs84=221.5250,152.9480,176.7680,2.3847,1.3896,0.8770,11.474100 +a=6378388.0000 +rf=297.0000000000000 +units=m +no_defs",TERA50G:"+title=Pointe Geologie - Perroud 1950 +proj=longlat +towgs84=324.9120,153.2820,172.0260 +a=6378388.0000 +rf=297.0000000000000 +units=m +no_defs",WALL78GEO:"+title=Wallis - Uvea 1978 (MOP78) +proj=longlat +towgs84=253.0000,-133.0000,-127.0000 +a=6378388.0000 +rf=297.0000000000000 +units=m +no_defs",WGS72G:"+title=WGS72 +proj=longlat +towgs84=0.0000,12.0000,6.0000 +a=6378135.0000 +rf=298.2600000000000 +units=m +no_defs",WGS84G:"+title=World Geodetic System 1984 +proj=longlat +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +units=m +no_defs",WGS84RRAFGEO:"+title=Reseau de reference des Antilles francaises (1988-1991) +proj=longlat +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +units=m +no_defs",XGEO:"+title=Systeme CIO-BIH +proj=longlat +towgs84=0.0000,0.0000,0.5000,0.0000,0.0000,0.0140,-0.100000 +a=6378137.0000 +rf=298.2572221010000 +units=m +no_defs",AMST63UTM43S:"+title=Amsterdam 
1411963 UTM fuseau 43 Sud +proj=tmerc +towgs84=109.753,-528.133,-362.244,0,0,0,0 +a=6378388.0000 +rf=297.0000000000000 +lat_0=0.000000000 +lon_0=75.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=10000000.000 +units=m +no_defs",CROZ63UTM39S:"+title=Crozet 1963 +proj=tmerc +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378388.0000 +rf=297.0000000000000 +lat_0=0.000000000 +lon_0=51.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=10000000.000 +units=m +no_defs",CSG67UTM21:"+title=Guyane CSG67 UTM fuseau 21 +proj=tmerc +towgs84=-193.0660,236.9930,105.4470,0.4814,-0.8074,0.1276,1.564900 +a=6378388.0000 +rf=297.0000000000000 +lat_0=0.000000000 +lon_0=-57.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=0.000 +units=m +no_defs",CSG67UTM22:"+title=Guyane CSG67 UTM fuseau 22 +proj=tmerc +towgs84=-193.0660,236.9930,105.4470,0.4814,-0.8074,0.1276,1.564900 +a=6378388.0000 +rf=297.0000000000000 +lat_0=0.000000000 +lon_0=-51.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=0.000 +units=m +no_defs",GEOPORTALANF:"+title=Geoportail - Antilles francaises +proj=eqc +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=0.000000000 +lat_ts=15.000000000 +x_0=0.000 +y_0=0.000 +units=m +no_defs",GEOPORTALASP:"+title=Geoportail - Amsterdam et Saint-Paul +proj=eqc +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=0.000000000 +lat_ts=-38.000000000 +x_0=0.000 +y_0=0.000 +units=m +no_defs",GEOPORTALCRZ:"+title=Geoportail - Crozet +proj=eqc +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=0.000000000 +lat_ts=-46.000000000 +x_0=0.000 +y_0=0.000 +units=m +no_defs",GEOPORTALFXX:"+title=Geoportail - France metropolitaine +proj=eqc +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=0.000000000 +lat_ts=46.500000000 +x_0=0.000 +y_0=0.000 +units=m +no_defs",GEOPORTALGUF:"+title=Geoportail - Guyane +proj=eqc +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=0.000000000 +lat_ts=4.000000000 +x_0=0.000 +y_0=0.000 +units=m +no_defs",GEOPORTALKER:"+title=Geoportail - Kerguelen +proj=eqc +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=0.000000000 +lat_ts=-49.500000000 +x_0=0.000 +y_0=0.000 +units=m +no_defs",GEOPORTALMYT:"+title=Geoportail - Mayotte +proj=eqc +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=0.000000000 +lat_ts=-12.000000000 +x_0=0.000 +y_0=0.000 +units=m +no_defs",GEOPORTALNCL:"+title=Geoportail - Nouvelle-Caledonie +proj=eqc +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=0.000000000 +lat_ts=-22.000000000 +x_0=0.000 +y_0=0.000 +units=m +no_defs",GEOPORTALPYF:"+title=Geoportail - Polynesie francaise +proj=eqc +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=0.000000000 +lat_ts=-15.000000000 +x_0=0.000 +y_0=0.000 +units=m +no_defs",GEOPORTALREU:"+title=Geoportail - Reunion et dependances +proj=eqc +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=0.000000000 +lat_ts=-21.000000000 +x_0=0.000 +y_0=0.000 +units=m +no_defs",GEOPORTALSPM:"+title=Geoportail - Saint-Pierre et Miquelon +proj=eqc +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=0.000000000 +lat_ts=47.000000000 +x_0=0.000 +y_0=0.000 +units=m +no_defs",GEOPORTALWLF:"+title=Geoportail - Wallis et Futuna +proj=eqc +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=0.000000000 +lat_ts=-14.000000000 +x_0=0.000 +y_0=0.000 +units=m +no_defs",GUAD48UTM20:"+title=Guadeloupe Ste Anne +proj=tmerc +towgs84=-472.2900,-5.6300,-304.1200,0.43
14162,-0.8374,0.2563,1.898400 +a=6378388.0000 +rf=297.0000000000000 +lat_0=0.000000000 +lon_0=-63.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=0.000 +units=m +no_defs",GUADFM49U20:"+title=Guadeloupe Fort Marigot  +proj=tmerc +towgs84=136.5960,248.1480,-429.7890 +a=6378388.0000 +rf=297.0000000000000 +lat_0=0.000000000 +lon_0=-63.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=0.000 +units=m +no_defs",IGN63UTM7S:"+title=IGN 1963 - Hiva Oa, Tahuata, Mohotani - UTM fuseau 7 Sud +proj=tmerc +towgs84=410.7210,55.0490,80.7460,-2.5779,-2.3514,-0.6664,17.331100 +a=6378388.0000 +rf=297.0000000000000 +lat_0=0.000000000 +lon_0=-141.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=10000000.000 +units=m +no_defs",IGN72UTM58S:"+title=IGN 1972 - UTM fuseau 58 Sud +proj=tmerc +towgs84=-11.6400,-348.6000,291.6800 +a=6378388.0000 +rf=297.0000000000000 +lat_0=0.000000000 +lon_0=165.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=10000000.000 +units=m +no_defs",KERG62UTM42S:"+title=Kerguelen 1962 +proj=tmerc +towgs84=144.8990,-186.7700,100.9230 +a=6378388.0000 +rf=297.0000000000000 +lat_0=0.000000000 +lon_0=69.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=10000000.000 +units=m +no_defs",LAMB1:"+title=Lambert I +proj=lcc +nadgrids=ntf_r93.gsb,null +wktext +towgs84=-168.0000,-60.0000,320.0000 +a=6378249.2000 +rf=293.4660210000000 +pm=2.337229167 +lat_0=49.500000000 +lon_0=0.000000000 +k_0=0.99987734 +lat_1=49.500000000 +x_0=600000.000 +y_0=200000.000 +units=m +no_defs",LAMB1C:"+title=Lambert I Carto +proj=lcc +nadgrids=ntf_r93.gsb,null +wktext +towgs84=-168.0000,-60.0000,320.0000 +a=6378249.2000 +rf=293.4660210000000 +pm=2.337229167 +lat_0=49.500000000 +lon_0=0.000000000 +k_0=0.99987734 +lat_1=49.500000000 +x_0=600000.000 +y_0=1200000.000 +units=m +no_defs",LAMB2:"+title=Lambert II +proj=lcc +nadgrids=ntf_r93.gsb,null +wktext +towgs84=-168.0000,-60.0000,320.0000 +a=6378249.2000 +rf=293.4660210000000 +pm=2.337229167 +lat_0=46.800000000 +lon_0=0.000000000 +k_0=0.99987742 +lat_1=46.800000000 +x_0=600000.000 +y_0=200000.000 +units=m +no_defs",LAMB2C:"+title=Lambert II Carto +proj=lcc +nadgrids=ntf_r93.gsb,null +wktext +towgs84=-168.0000,-60.0000,320.0000 +a=6378249.2000 +rf=293.4660210000000 +pm=2.337229167 +lat_0=46.800000000 +lon_0=0.000000000 +k_0=0.99987742 +lat_1=46.800000000 +x_0=600000.000 +y_0=2200000.000 +units=m +no_defs",LAMB3:"+title=Lambert III +proj=lcc +nadgrids=ntf_r93.gsb,null +wktext +towgs84=-168.0000,-60.0000,320.0000 +a=6378249.2000 +rf=293.4660210000000 +pm=2.337229167 +lat_0=44.100000000 +lon_0=0.000000000 +k_0=0.99987750 +lat_1=44.100000000 +x_0=600000.000 +y_0=200000.000 +units=m +no_defs",LAMB3C:"+title=Lambert III Carto +proj=lcc +nadgrids=ntf_r93.gsb,null +wktext +towgs84=-168.0000,-60.0000,320.0000 +a=6378249.2000 +rf=293.4660210000000 +pm=2.337229167 +lat_0=44.100000000 +lon_0=0.000000000 +k_0=0.99987750 +lat_1=44.100000000 +x_0=600000.000 +y_0=3200000.000 +units=m +no_defs",LAMB4:"+title=Lambert IV +proj=lcc +nadgrids=ntf_r93.gsb,null +wktext +towgs84=-168.0000,-60.0000,320.0000 +a=6378249.2000 +rf=293.4660210000000 +pm=2.337229167 +lat_0=42.165000000 +lon_0=0.000000000 +k_0=0.99994471 +lat_1=42.165000000 +x_0=234.358 +y_0=185861.369 +units=m +no_defs",LAMB4C:"+title=Lambert IV Carto +proj=lcc +nadgrids=ntf_r93.gsb,null +wktext +towgs84=-168.0000,-60.0000,320.0000 +a=6378249.2000 +rf=293.4660210000000 +pm=2.337229167 +lat_0=42.165000000 +lon_0=0.000000000 +k_0=0.99994471 +lat_1=42.165000000 +x_0=234.358 +y_0=4185861.369 +units=m +no_defs",LAMB93:"+title=Lambert 93 +proj=lcc +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=46.500000000 +lon_0=3.000000000 +lat_1=44.000000000 +lat_2=49.000000000 +x_0=700000.000 +y_0=6600000.000 +units=m +no_defs",RGF93CC42:"+title=Lambert conique conforme Zone 1 +proj=lcc +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=42.000000000 +lon_0=3.000000000 +lat_1=41.200000000 +lat_2=42.800000000 +x_0=1700000.000 +y_0=1200000.000 +units=m +no_defs",RGF93CC43:"+title=Lambert conique conforme Zone 2 +proj=lcc +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=43.000000000 +lon_0=3.000000000 +lat_1=42.200000000 +lat_2=43.800000000 +x_0=1700000.000 +y_0=2200000.000 +units=m +no_defs",RGF93CC44:"+title=Lambert conique conforme Zone 3 +proj=lcc +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=44.000000000 +lon_0=3.000000000 +lat_1=43.200000000 +lat_2=44.800000000 +x_0=1700000.000 +y_0=3200000.000 +units=m +no_defs",RGF93CC45:"+title=Lambert conique conforme Zone 4 +proj=lcc +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=45.000000000 +lon_0=3.000000000 +lat_1=44.200000000 +lat_2=45.800000000 +x_0=1700000.000 +y_0=4200000.000 +units=m +no_defs",RGF93CC46:"+title=Lambert conique conforme Zone 5 +proj=lcc +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=46.000000000 +lon_0=3.000000000 +lat_1=45.200000000 +lat_2=46.800000000 +x_0=1700000.000 +y_0=5200000.000 +units=m +no_defs",RGF93CC47:"+title=Lambert conique conforme Zone 6 +proj=lcc +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=47.000000000 +lon_0=3.000000000 +lat_1=46.200000000 +lat_2=47.800000000 +x_0=1700000.000 +y_0=6200000.000 +units=m +no_defs",RGF93CC48:"+title=Lambert conique conforme Zone 7 +proj=lcc +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=48.000000000 +lon_0=3.000000000 +lat_1=47.200000000 +lat_2=48.800000000 +x_0=1700000.000 +y_0=7200000.000 +units=m +no_defs",RGF93CC49:"+title=Lambert conique conforme Zone 8 +proj=lcc +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=49.000000000 +lon_0=3.000000000 +lat_1=48.200000000 +lat_2=49.800000000 +x_0=1700000.000 +y_0=8200000.000 +units=m +no_defs",RGF93CC50:"+title=Lambert conique conforme Zone 9 +proj=lcc +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=50.000000000 +lon_0=3.000000000 +lat_1=49.200000000 +lat_2=50.800000000 +x_0=1700000.000 +y_0=9200000.000 +units=m +no_defs",LAMBE:"+title=Lambert II etendu +proj=lcc +nadgrids=ntf_r93.gsb,null +wktext +towgs84=-168.0000,-60.0000,320.0000 +a=6378249.2000 +rf=293.4660210000000 +pm=2.337229167 +lat_0=46.800000000 +lon_0=0.000000000 +k_0=0.99987742 +lat_1=46.800000000 +x_0=600000.000 +y_0=2200000.000 +units=m +no_defs",MART38UTM20:"+title=Martinique Fort-Desaix +proj=tmerc +towgs84=126.9260,547.9390,130.4090,-2.7867,5.1612,-0.8584,13.822650 +a=6378388.0000 +rf=297.0000000000000 +lat_0=0.000000000 +lon_0=-63.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=0.000 +units=m +no_defs",MAYO50UTM38S:"+title=Mayotte Combani +proj=tmerc +towgs84=-599.9280,-275.5520,-195.6650,-0.0835,-0.4715,0.0602,49.281400 +a=6378388.0000 +rf=297.0000000000000 +lat_0=0.000000000 +lon_0=45.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=10000000.000 +units=m +no_defs",MILLER:"+title=Geoportail - Monde +proj=mill +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lon_0=0.000000000 +x_0=0.000 +y_0=0.000 +units=m +no_defs",MOOREA87U6S:"+title=Moorea 1987 - UTM fuseau 6 Sud +proj=tmerc +towgs84=215.9820,149.5930,176.2290,3.2624,1.6920,1.1571,10.477300 +a=6378388.0000 +rf=297.0000000000000 +lat_0=0.000000000 +lon_0=-147.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=10000000.000 +units=m +no_defs",NUKU72U7S:"+title=IGN 1972 Nuku Hiva - UTM fuseau 7 Sud +proj=tmerc +towgs84=165.7320,216.7200,180.5050,-0.6434,-0.4512,-0.0791,7.420400 +a=6378388.0000 +rf=297.0000000000000 +lat_0=0.000000000 +lon_0=-141.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=10000000.000 +units=m +no_defs",RGM04UTM38S:"+title=UTM fuseau 38 Sud (Reseau Geodesique de Mayotte 2004) +proj=tmerc +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=45.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=10000000.000 +units=m +no_defs",RGNCUTM57S:"+title=Reseau Geodesique de Nouvelle-Caledonie - UTM fuseau 57 Sud +proj=tmerc +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=159.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=10000000.000 +units=m +no_defs",RGNCUTM58S:"+title=Reseau Geodesique de Nouvelle-Caledonie - UTM fuseau 58 Sud +proj=tmerc +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=165.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=10000000.000 +units=m +no_defs",RGNCUTM59S:"+title=Reseau Geodesique de Nouvelle-Caledonie - UTM fuseau 59 Sud +proj=tmerc +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=171.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=10000000.000 +units=m +no_defs",RGPFUTM5S:"+title=RGPF - UTM fuseau 5 Sud +proj=tmerc +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=-153.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=10000000.000 +units=m +no_defs",RGPFUTM6S:"+title=RGPF - UTM fuseau 6 Sud +proj=tmerc +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=-147.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=10000000.000 +units=m +no_defs",RGPFUTM7S:"+title=RGPF - UTM fuseau 7 Sud +proj=tmerc +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=-141.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=10000000.000 +units=m +no_defs",RGR92UTM40S:"+title=RGR92 UTM fuseau 40 Sud +proj=tmerc +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=57.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=10000000.000 +units=m +no_defs",RGSPM06U21:"+title=Saint-Pierre-et-Miquelon (2006) UTM Fuseau 21 Nord +proj=tmerc +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=-57.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=0.000 +units=m +no_defs",STPL69UTM43S:"+title=Saint-Paul 1969 UTM fuseau 43 Sud +proj=tmerc +towgs84=225.571,-346.608,-46.567,0,0,0,0 +a=6378388.0000 +rf=297.0000000000000 +lat_0=0.000000000 +lon_0=75.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=10000000.000 +units=m +no_defs",STPM50UTM21:"+title=St Pierre et Miquelon 1950 +proj=tmerc +towgs84=-95.5930,573.7630,173.4420,-0.9602,1.2510,-1.3918,42.626500 +a=6378206.4000 +rf=294.9786982000000 +lat_0=0.000000000 +lon_0=-57.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=0.000 +units=m +no_defs",TAHAAUTM05S:"+title=Tahaa 1951 +proj=tmerc +towgs84=72.4380,345.9180,79.4860,-1.6045,-0.8823,-0.5565,1.374600 +a=6378388.0000 +rf=297.0000000000000 +lat_0=0.000000000 +lon_0=-153.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=10000000.000 +units=m +no_defs",TAHI51UTM06S:"+title=Tahiti-Terme Nord UTM fuseau 6 Sud +proj=tmerc +towgs84=162.0000,117.0000,154.0000 +a=6378388.0000 +rf=297.0000000000000 +lat_0=0.000000000 +lon_0=-147.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=10000000.000 +units=m +no_defs",TAHI79UTM6S:"+title=Tahiti 1979 +proj=tmerc +towgs84=221.5250,152.9480,176.7680,2.3847,1.3896,0.8770,11.474100 +a=6378388.0000 +rf=297.0000000000000 +lat_0=0.000000000 +lon_0=-147.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=10000000.000 +units=m +no_defs",TERA50STEREO:"+title=Terre Adelie 1950 +proj=stere +towgs84=324.9120,153.2820,172.0260 +a=6378388.0000 +rf=297.0000000000000 +lat_0=-90.000000000 +lon_0=140.000000000 +lat_ts=-67 +k=0.96027295 +x_0=300000.000 +y_0=-2299363.482 +units=m +no_defs",UTM01SW84:"+title=World Geodetic System 1984 UTM fuseau 01 Sud +proj=tmerc +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=-177.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=10000000.000 +units=m +no_defs",UTM20W84GUAD:"+title=World Geodetic System 1984 UTM fuseau 20 Nord-Guadeloupe +proj=tmerc +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=-63.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=0.000 +units=m +no_defs",UTM20W84MART:"+title=World Geodetic System 1984 UTM fuseau 20 Nord-Martinique +proj=tmerc +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=-63.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=0.000 +units=m +no_defs",UTM22RGFG95:"+title=RGFG95 UTM fuseau 22 Nord-Guyane +proj=tmerc +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=-51.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=0.000 +units=m +no_defs",UTM39SW84:"+title=World Geodetic System 1984 UTM fuseau 39 Sud +proj=tmerc +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=51.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=10000000.000 +units=m +no_defs",UTM42SW84:"+title=World Geodetic System 1984 UTM fuseau 42 Sud +proj=tmerc +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=69.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=10000000.000 +units=m +no_defs",UTM43SW84:"+title=World Geodetic System 1984 UTM fuseau 43 Sud +proj=tmerc +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=75.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=10000000.000 +units=m +no_defs",WALL78UTM1S:"+title=Wallis-Uvea 1978 (MOP78) UTM 1 SUD +proj=tmerc +towgs84=253.0000,-133.0000,-127.0000 +a=6378388.0000 +rf=297.0000000000000 +lat_0=0.000000000 +lon_0=-177.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=10000000.000 +units=m +no_defs",ETRS89GEO:"+title=ETRS89 geographiques (dms) +proj=longlat +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +units=m +no_defs",ETRS89LAEA:"+title=ETRS89 Lambert Azimutal Equal Area +proj=laea +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=52.000000000 +lon_0=10.000000000 +x_0=4321000.000 +y_0=3210000.000 +units=m +no_defs",ETRS89LCC:"+title=ETRS89 Lambert Conformal Conic +proj=lcc +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=52.000000000 +lon_0=9.999999995 +lat_1=35.000000000 +lat_2=65.000000000 +x_0=4000000.000 +y_0=2800000.000 +units=m +no_defs",UTM26ETRS89:"+title=Europe - de 30d a 24d Ouest +proj=tmerc +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=-27.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=0.000 +units=m +no_defs",UTM27ETRS89:"+title=Europe - de 24d a 18d Ouest +proj=tmerc +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=-21.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=0.000 +units=m +no_defs",UTM28ETRS89:"+title=Europe - de 18d a 12d Ouest +proj=tmerc +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=-15.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=0.000 +units=m +no_defs",UTM29ETRS89:"+title=Europe - de 12d a 6d Ouest +proj=tmerc +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=-9.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=0.000 +units=m +no_defs",UTM30ETRS89:"+title=Europe - de -6d a 0d Ouest +proj=tmerc +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=-3.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=0.000 +units=m +no_defs",UTM31ETRS89:"+title=Europe - de 0d a 6d Est +proj=tmerc +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=3.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=0.000 +units=m +no_defs",UTM32ETRS89:"+title=Europe - de 6d a 12d Est +proj=tmerc +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378
141137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=9.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=0.000 +units=m +no_defs",UTM33ETRS89:"+title=Europe - de 12d a 18d Est +proj=tmerc +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=15.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=0.000 +units=m +no_defs",UTM34ETRS89:"+title=Europe - de 18d a 24d Est +proj=tmerc +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=21.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=0.000 +units=m +no_defs",UTM35ETRS89:"+title=Europe - de 24d a 30d Est +proj=tmerc +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=27.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=0.000 +units=m +no_defs",UTM36ETRS89:"+title=Europe - de 30d a 36d Est +proj=tmerc +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=33.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=0.000 +units=m +no_defs",UTM37ETRS89:"+title=Europe - de 36d a 42d Est +proj=tmerc +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=39.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=0.000 +units=m +no_defs",UTM38ETRS89:"+title=Europe - de 42d a 48d Est +proj=tmerc +nadgrids=null +wktext +towgs84=0.0000,0.0000,0.0000 +a=6378137.0000 +rf=298.2572221010000 +lat_0=0.000000000 +lon_0=45.000000000 +k_0=0.99960000 +x_0=500000.000 +y_0=0.000 +units=m +no_defs"}},logger$B=LoggerByDefault.getLogger("CRS"),CRS={projectionsExtent:{"EPSG:2154":{left:-9.62,bottom:41.18,right:10.3,top:51.54},"EPSG:27572":{left:-4.87,bottom:42.33,right:8.23,top:51.14}},load:function(){if(logger$B.trace("Loading custom definitions projections"),!Register.isLoaded){Register.load(proj4);try{register(proj4),window.ol&&window.ol.proj&&window.ol.proj.proj4&&(window.ol.proj.proj4.register=register,window.ol.proj.proj4.register(proj4))}catch(ne){logger$B.error(ne)}}},loadByDefault:function(){if(logger$B.trace("Loading custom definitions projections by default"),!Register.isLoaded){Register.loadByDefault(proj4);try{register(proj4),window.ol&&window.ol.proj&&window.ol.proj.proj4&&(window.ol.proj.proj4.register=register,window.ol.proj.proj4.register(proj4))}catch(ne){logger$B.error(ne)}}},loadByName:function(ne){if(logger$B.trace("Loading a custom definition projection : ",ne),!Register.isLoaded){Register.loadByName(proj4,ne);try{register(proj4),window.ol&&window.ol.proj&&window.ol.proj.proj4&&(window.ol.proj.proj4.register=register,window.ol.proj.proj4.register(proj4))}catch(ee){logger$B.error(ee)}}},overload:function(){logger$B.trace("Loading projections aera (extent)");for(var ne in this.projectionsExtent)if(this.projectionsExtent.hasOwnProperty(ne)){var ee=this.projectionsExtent[ne],te=get$3(ne),st=getTransform("EPSG:4326",te),ot=applyTransform([ee.bottom,ee.right,ee.top,ee.left],st);te.setExtent(ot),addProjection(te),window.ol&&window.ol.proj&&window.ol.proj.addProjection&&window.ol.proj.addProjection(te)}}};window.ol&&window.ol.proj&&window.ol.proj.proj4&&(window.ol.proj.proj4.register=register);let m_suggestions=[],controller=new AbortController,m_index="geoplateforme",m_fields="title,layer_name",m_size="1000",m_maximumResponses=10,m_filterByService=["WMTS","TMS"],m_filterByProjection=[],m_filterByLayerPriority=[],m_filterWMTSPriority=!1,m_filterTMS=!0,m_url=`https://data.geopf.fr/recherche/api/indexes/${m_index}/suggest`;const target=new EventTarget,suggest=async ne=>{clear(),controller=new AbortController;let ee=new URL(m_url),te={text:ne,fields:m_fields,size:m_size};Object.keys(te).forEach(ht=>ee.searchParams.append(ht,te[ht]));var st=await fetch(ee,{}),ot=await st.json();if(st.status!==200)throw new Error(st.message);if(!(!ot||ot.length===0)){for(let ht=0;ht<ot.length;ht++){const ft=ot[ht];m_filterByLayerPriority.findIndex(mt=>mt.includes(ft.source.layer_name))>=0&&(ot[ht].score+=100)}ot.sort((ht,ft)=>ft.score-ht.score);var ct=null;m_filterWMTSPriority&&(ct=inventory(ot));for(let ht=0;ht<ot.length;
141ht++){const ft=ot[ht];var ut=m_filterByService.length===0||m_filterByService.includes(ft.source.type);if(ut){if(unique().length>=m_maximumResponses)break;var dt={attribution:ft.source.attribution||{},srs:ft.source.srs||[],keywords:ft.source.keywords||[],extent:ft.source.extent||{},metadata:ft.source.metadata_urls||[],name:ft.source.layer_name||"",title:ft.source.title||"",description:ft.source.description,service:ft.source.type||"",url:ft.source.url||"",tech:ft.source.tech||{},tags:ft.source.tags||{},theme:ft.source.theme||"",producer:ft.source.producer||""};if(m_filterByProjection.length&&m_filterByProjection.includes(dt.srs[0])||ct&&ct[dt.name]&&dt.service==="WMS"||dt.service==="TMS"&&(dt.styles=!1,dt.metadata.length!==0&&/(\.json)$/i.test(dt.metadata[0])&&(dt.styles=!0),!dt.styles&&m_filterTMS)||dt.service==="WMTS"&&dt.metadata.length!==0&&/(.json)$/i.test(dt.metadata[0])&&m_filterTMS===!0)continue;m_suggestions.push(dt)}}return target.dispatchEvent(new CustomEvent("suggest",{bubbles:!0,detail:getSuggestions()})),getSuggestions()}},unique=()=>m_suggestions.filter((ne,ee,te)=>ee===te.findIndex(st=>st.service===ne.service&&st.name===ne.name&&st.title===ne.title&&st.description===ne.description)),clear=()=>{controller.abort(),m_suggestions=[]},inventory=ne=>{var ee={};for(let te=0;te<ne.length;te++){const st=ne[te].source.type,ot=ne[te].source.layer_name;(st==="WMTS"||st==="WMS")&&(ee[ot]===void 0&&(ee[ot]=st==="WMTS"),ee[ot]||(ee[ot]=st==="WMTS"))}return ee},getSuggestions=()=>unique(),getNames=()=>unique().map(ne=>ne.name),getTitles=()=>unique().map(ne=>ne.title),setIndex=ne=>{m_index=ne},setFields=ne=>{m_fields=ne},setSuggestions=ne=>{m_suggestions=ne},setSize=ne=>{m_size=parseInt(ne)},setUrl=value=>{m_url=eval("`"+value+"`")},setMaximumResponses=ne=>{m_maximumResponses=parseInt(ne)},setFiltersByService=ne=>{m_filterByService=ne===""?[]:ne.split(",")},setFiltersByProjection=ne=>{m_filterByProjection=ne===""?[]:ne.split(",")},setFiltersByLayerPriority=ne=>{m_filterByLayerPriority=ne===""?[]:ne.split(",")},setFilterWMTSPriority=ne=>{m_filterWMTSPriority=ne},setFilterTMS=ne=>{m_filterTMS=ne},Search$1={target,suggest,clear,getSuggestions,getNames,getTitles,setIndex,setFields,setSuggestions,setSize,setUrl,setMaximumResponses,setFiltersByService,setFiltersByProjection,setFiltersByLayerPriority,setFilterWMTSPriority,setFilterTMS};var SearchEngineDOM={_addUID:function(ne){var ee=this._uid?ne+"-"+this._uid:ne;return ee},_createMainContainerElement:function(){var ne=document.createElement("div");return ne.id=this._addUID("GPsearchEngine"),ne.className="GPwidget gpf-widget",ne},_createSearchDivElement:function(){var ne=document.createElement("div");return ne.id=this._addUID("GPshowSearchDiv"),ne},_createShowSearchEnginePictoElement:function(ne){var ee=this;checkDsfr()&&(ne=!0);var te=document.createElement("button");return te.id=this._addUID("GPshowSearchEnginePicto"),te.className="GPshowOpen GPshowAdvancedToolPicto GPshowSearchEnginePicto gpf-btn gpf-btn-icon-search fr-btn",te.title="Afficher/masquer la recherche par lieux",checkDsfr()&&(te.title="Rechercher"),te.setAttribute("tabindex","0"),te.setAttribute("aria-pressed",!ne),te.disabled=!ne,te.setAttribute("type","button"),te.addEventListener("click",function(st){if(checkDsfr()){var ot=document.getElementById(ee._addUID("GPautocompleteResults")),ct=ot.getElementsByClassName("GPautoCompleteProposal gpf-panel__items gpf-panel__items_searchengine current"),ut=ot.getElementsByClassName("GPautoCompleteProposal gpf-panel__items gpf-panel__items_searchengine"),dt=ut.length;if(!dt)return;var ht=null;ct.length?ht=ct[0]:(ht=ut[0],ht.className="GPautoCompleteProposal gpf-panel__items gpf-panel__items_searchengine current",ht.style.color="#000000",ht.style["background-color"]="#CEDBEF"),ht.click();return}var ft=st.target.ariaPressed==="true";st.target.setAttribute("aria-pressed",!ft),document.getElementById(ee._addUID("GPautoCompleteList")).classList.replace("GPelementVisible","GPelementHidden"),document.getElementById(ee._addUID("GPautoCompleteList")).classList.replace("gpf-visible","gpf-hidden"),document.getElementById(ee._addUID("GPgeocodeResultsList")).classList.replace("GPelementVisible","GPelementHidden"),document.getElementById(ee._addUID("GPgeocodeResultsList")).classList.replace("gpf-visible","gpf-hidden");var pt=document.getElementById(ee._addUID("GPshowAdvancedSearch"));
141pt&&(pt.style.display=null,document.getElementById(ee._addUID("GPadvancedSearchPanel")).classList.replace("GPelementVisible","GPelementHidden"),document.getElementById(ee._addUID("GPadvancedSearchPanel")).classList.replace("gpf-visible","gpf-hidden"));var mt=document.getElementById(ee._addUID("GPshowGeolocate"));mt&&(mt.style.display=null);var yt=document.getElementById(ee._addUID("GPshowSearchByCoordinate"));yt&&(yt.style.display=null);var vt="#GPsearchInput-"+ee._uid;document.querySelector(vt+" input").disabled=!1,checkDsfr()&&(document.querySelector("#GPshowSearchEnginePicto-"+ee._uid).disabled=!1),ee.onShowSearchEngineClick(st)}),te},_createSearchInputElement:function(ne){var ee=this,te=document.createElement("form");te.id=this._addUID("GPsearchInput"),te.className="gpf-panel__content fr-modal__content",te.addEventListener("submit",function(ct){return ct.preventDefault(),document.getElementById(ee._addUID("GPsearchInputText")).value===""||(document.getElementById(ee._addUID("GPgeocodeResultsList")).classList.replace("GPelementHidden","GPelementVisible"),document.getElementById(ee._addUID("GPgeocodeResultsList")).classList.replace("gpf-hidden","gpf-visible"),document.getElementById(ee._addUID("GPautoCompleteList")).classList.replace("GPelementVisible","GPelementHidden"),document.getElementById(ee._addUID("GPautoCompleteList")).classList.replace("gpf-visible","gpf-hidden"),ee.onGeocodingSearchSubmit(ct)),!1});var st=document.createElement("input");st.id=this._addUID("GPsearchInputText"),st.className="GPsearchInputText gpf-input fr-input",st.type="text",st.placeholder=ne,st.autocomplete="off",st.addEventListener("keyup",function(ct){var ut=ct.which||ct.keyCode;ut===13||ut===10||ut===38||ut===40||(document.getElementById(ee._addUID("GPgeocodeResultsList")).classList.replace("GPelementVisible","GPelementHidden"),document.getElementById(ee._addUID("GPgeocodeResultsList")).classList.replace("gpf-visible","gpf-hidden"),st.value.length>2?(document.getElementById(ee._addUID("GPautoCompleteList")).classList.replace("GPelementHidden","GPelementVisible"),document.getElementById(ee._addUID("GPautoCompleteList")).classList.replace("gpf-hidden","gpf-visible")):(document.getElementById(ee._addUID("GPautoCompleteList")).classList.replace("GPelementVisible","GPelementHidden"),document.getElementById(ee._addUID("GPautoCompleteList")).classList.replace("gpf-visible","gpf-hidden")),ee.onAutoCompleteSearchText(ct))});var ot=null;return document.addEventListener("pointerdown",function(ct){ot=ct.target}),st.addEventListener("blur",function(ct){ot.classList.contains("GPautoCompleteProposal")||(document.getElementById(ee._addUID("GPautoCompleteList")).classList.replace("GPelementVisible","GPelementHidden"),document.getElementById(ee._addUID("GPautoCompleteList")).classList.replace("gpf-visible","gpf-hidden"))}),st.addEventListener("keydown",function(ct){var ut=ct.which||ct.keyCode;ut===13&&ct.preventDefault();var dt=document.getElementById(ee._addUID("GPautocompleteResults"));if(dt){var ht=dt.getElementsByClassName("GPautoCompleteProposal gpf-panel__items gpf-panel__items_searchengine current"),ft=dt.getElementsByClassName("GPautoCompleteProposal gpf-panel__items gpf-panel__items_searchengine"),pt=ft.length;if(pt){var mt=null;if(ht.length)mt=ht[0];else if(mt=ft[0],mt.className="GPautoCompleteProposal gpf-panel__items gpf-panel__items_searchengine current",mt.style.color="#000000",mt.style["background-color"]="#CEDBEF",ut!==13)return;var yt=parseInt(SelectorID.index(mt.id),10),vt=yt===pt-1?ft[0]:ft[yt+1],_t=yt===0?ft[pt-1]:ft[yt-1];switch(mt.style["background-color"]="",mt.style.color="",_t.style["background-color"]="",_t.style.color="",vt.style["background-color"]="",vt.style.color="",ut){case 38:mt.className="GPautoCompleteProposal gpf-panel__items gpf-panel__items_searchengine",_t.className="GPautoCompleteProposal gpf-panel__items gpf-panel__items_searchengine current",_t.style.color="#000000",_t.style["background-color"]="#CEDBEF",mt.scrollIntoView();break;case 40:mt.className="GPautoCompleteProposal gpf-panel__items gpf-panel__items_searchengine",vt.className="GPautoCompleteProposal gpf-panel__items gpf-panel__items_searchengine current",vt.style.color="#000000",vt.style["background-color"]="#CEDBEF",mt.scrollIntoView();break;case 13:ct.preventDefault(),mt.click(ct);break}mt.focus()}}}),te.appendChild(st),te},_createSearchResetElement:function(){var ne=this,ee=document.createElement("button");return ee.id=this._addUID("GPsearchInputReset"),ee.className="GPshowOpen GPsearchInputReset gpf-btn gpf-btn-icon-reset gpf-btn-icon-search-reset fr-btn fr-btn--secondary gpf-btn--secondary",ee.setAttribute("aria-label","Supprimer la recherche"),ee.addEventListener("click",function(te){document.getElementById(ne._addUID("GPsearchInputText")).value="",document.getElementById(ne._addUID("GPautoCompleteList")).classList.replace("GPelementVisible","GPelementHidden"),document.getElementById(ne._addUID("GPautoCompleteList")).classList.replace("gpf-visible","gpf-hidden"),document.getElementById(ne._addUID("GPgeocodeResultsList")).classList.replace("GPelementVisible","GPelementHidden"),document.getElementById(ne._addUID("GPgeocodeResultsList")).classList.replace("gpf-visible","gpf-hidden"),ne.onSearchResetClick()}),ee},_createButtonsElement:function(){var ne=document.createElement("div");return ne.className="GPbuttonsContainer",ne},_createFirstLineWrapper:function(){var ne=document.createElement("div");return ne.className="GPsearchFirstLineWrapper",ne},_createRadioContainer:function(){var ne=document.createElement("div");
141return ne.className="GPsearchRadioContainer",ne},_createRadioElements:function(){var ne=document.createElement("div");ne.className="GPsearchRadioElements";var ee=document.createElement("div");ee.className="GPsearchSplitChoice gpf-flex gpf-radio-group fr-radio-group fr-my-1w";var te=document.createElement("input");te.id=this._addUID("GPsearchSplitLocations"),te.type="radio",te.name="GPsearchSplit",te.value="address",te.checked=!0,ee.appendChild(te);var st=document.createElement("label");st.className="gpf-label fr-label",st.htmlFor=this._addUID("GPsearchSplitLocations"),st.title="Adresses",st.innerHTML="Adresses",ee.appendChild(st),te.addEventListener?te.addEventListener("change",function(){te.checked?(document.querySelector("[id^='GPautocompleteResultsSuggest']").classList.add("gpf-hidden","GPelementHidden"),document.querySelector("[id^='GPautocompleteResultsLocation']").classList.remove("gpf-hidden","GPelementHidden")):(document.querySelector("[id^='GPautocompleteResultsSuggest']").classList.remove("gpf-hidden","GPelementHidden"),document.querySelector("[id^='GPautocompleteResultsLocation']").classList.add("gpf-hidden","GPelementHidden"))}):te.attachEvent&&te.attachEvent("onchange",function(){te.checked?(document.querySelector("[id^='GPautocompleteResultsSuggest']").classList.add("gpf-hidden","GPelementHidden"),document.querySelector("[id^='GPautocompleteResultsLocation']").classList.remove("gpf-hidden","GPelementHidden")):(document.querySelector("[id^='GPautocompleteResultsSuggest']").classList.remove("gpf-hidden","GPelementHidden"),document.querySelector("[id^='GPautocompleteResultsLocation']").classList.add("gpf-hidden","GPelementHidden"))});var ot=document.createElement("div");ot.className="GPsearchSplitChoice gpf-flex gpf-radio-group fr-radio-group fr-my-1w";var ct=document.createElement("input");ct.id=this._addUID("GPsearchSplitData"),ct.type="radio",ct.name="GPsearchSplit",ct.value="data",ot.appendChild(ct);var ut=document.createElement("label");return ut.className="gpf-label fr-label",ut.htmlFor=this._addUID("GPsearchSplitData"),ut.title="Cartes et données",ut.innerHTML="Cartes et données",ot.appendChild(ut),ct.addEventListener?ct.addEventListener("change",function(){ct.checked?(document.querySelector("[id^='GPautocompleteResultsSuggest']").classList.remove("gpf-hidden","GPelementHidden"),document.querySelector("[id^='GPautocompleteResultsLocation']").classList.add("gpf-hidden","GPelementHidden")):(document.querySelector("[id^='GPautocompleteResultsSuggest']").classList.add("gpf-hidden","GPelementHidden"),document.querySelector("[id^='GPautocompleteResultsLocation']").classList.remove("gpf-hidden","GPelementHidden"))}):ct.attachEvent&&ct.attachEvent("onchange",function(){ct.checked?(document.querySelector("[id^='GPautocompleteResultsSuggest']").classList.remove("gpf-hidden","GPelementHidden"),document.querySelector("[id^='GPautocompleteResultsLocation']").classList.remove("gpf-hidden","GPelementHidden")):(document.querySelector("[id^='GPautocompleteResultsSuggest']").classList.remove("gpf-hidden","GPelementHidden"),document.querySelector("[id^='GPautocompleteResultsLocation']").classList.add("gpf-hidden","GPelementHidden"))}),ne.appendChild(ee),ne.appendChild(ot),[ne,te,ct]},_createShowAdvancedSearchElement:function(){var ne=this,ee=document.createElement("button");return ee.id=this._addUID("GPshowAdvancedSearch"),ee.className="GPshowOpen GPshowAdvancedToolPicto GPshowAdvancedSearch GPshowOpen gpf-btn gpf-btn-icon-search-advanced fr-btn fr-btn--secondary gpf-btn--secondary fr-m-1w",ee.setAttribute("tabindex","0"),ee.setAttribute("aria-pressed",!1),ee.addEventListener("click",function(te){var st=te.target.ariaPressed==="true";te.target.setAttribute("aria-pressed",!st);var ot="#GPsearchInput-"+ne._uid;st?(document.getElementById(ne._addUID("GPadvancedSearchPanel")).classList.replace("GPelementVisible","GPelementHidden"),document.getElementById(ne._addUID("GPadvancedSearchPanel")).classList.replace("gpf-visible","gpf-hidden"),document.querySelector(ot+" input").disabled=!1,document.querySelector(ot+" .GPsearchInputReset")&&(document.querySelector(ot+" .GPsearchInputReset").disabled=!1),checkDsfr()&&(document.querySelector("#GPshowSearchEnginePicto-"+ne._uid).disabled=!1)):(document.getElementById(ne._addUID("GPadvancedSearchPanel")).classList.replace("GPelementHidden","GPelementVisible"),document.getElementById(ne._addUID("GPadvancedSearchPanel")).classList.replace("gpf-hidden","gpf-visible"),document.querySelector(ot+" input").disabled=!0,document.querySelector(ot+" .GPsearchInputReset")&&(document.querySelector(ot+" .GPsearchInputReset").disabled=!0),checkDsfr()&&(document.querySelector("#GPshowSearchEnginePicto-"+ne._uid).disabled=!0)),document.getElementById(ne._addUID("GPautoCompleteList")).classList.replace("GPelementVisible","GPelementHidden"),document.getElementById(ne._addUID("GPautoCompleteList")).classList.replace("gpf-visible","gpf-hidden"),document.getElementById(ne._addUID("GPgeocodeResultsList")).classList.replace("GPelementVisible","GPelementHidden"),document.getElementById(ne._addUID("GPgeocodeResultsList")).classList.replace("gpf-visible","gpf-hidden");var ct=document.getElementById(ne._addUID("GPcoordinateSearchPanel"));ct&&(ct.classList.replace("GPelementVisible","GPelementHidden"),ct.classList.replace("gpf-visible","gpf-hidden"));var ut=document.getElementById(ne._addUID("GPshowSearchByCoordinate"));ut&&ut.setAttribute("aria-pressed",!1)}),ee},_createShowGeolocateElement:function(){var ne=this,ee=document.createElement("button");return ee.id=this._addUID("GPshowGeolocate"),ee.className="GPshowOpen GPshowAdvancedToolPicto GPshowGeolocate gpf-btn gpf-btn-icon-search-geolocate fr-btn fr-btn--secondary gpf-btn--secondary fr-m-1w",ee.title="Activer la géolocalisation",ee.setAttribute("tabindex","0"),ee.setAttribute("aria-pressed",!1),ee.addEventListener("click",function(te){var st=te.target.ariaPressed==="true";te.target.setAttribute("aria-pressed",!st),ne.onShowSearchGeolocateClick(te)}),ee},_createShowSearchByCoordinateElement:function(){var ne=this,ee=document.createElement("button");return ee.id=this._addUID("GPshowSearchByCoordinate"),ee.className="GPshowOpen GPshowAdvancedToolPicto GPshowSearchByCoordinate gpf-btn gpf-btn-icon-search-coordinate fr-btn fr-btn--secondary gpf-btn--secondary fr-m-1w",ee.title="Ouvrir la recherche par coordonnées",ee.setAttribute("tabindex","0"),ee.setAttribute("aria-pressed",!1),ee.addEventListener("click",function(te){var st=te.target.ariaPressed==="true";te.target.setAttribute("aria-pressed",!st);var ot="#GPsearchInput-"+ne._uid;st?(document.getElementById(ne._addUID("GPcoordinateSearchPanel")).classList.replace("GPelementVisible","GPelementHidden"),document.getElementById(ne._addUID("GPcoordinateSearchPanel")).classList.replace("gpf-visible","gpf-hidden"),document.querySelector(ot+" input").disabled=!1,document.querySelector(ot+" .GPsearchInputReset").disabled=!1,checkDsfr()&&(document.querySelector("#GPshowSearchEnginePicto-"+ne._uid).disabled=!1)):(document.getElementById(ne._addUID("GPcoordinateSearchPanel")).classList.replace("GPelementHidden","GPelementVisible"),document.getElementById(ne._addUID("GPcoordinateSearchPanel")).classList.replace("gpf-hidden","gpf-visible"),document.querySelector(ot+" input").disabled=!0,document.querySelector(ot+" .GPsearchInputReset").disabled=!0,checkDsfr()&&(document.querySelector("#GPshowSearchEnginePicto-"+ne._uid).disabled=!0)),document.getElementById(ne._addUID("GPautoCompleteList")).classList.replace("GPelementVisible","GPelementHidden"),document.getElementById(ne._addUID("GPautoCompleteList")).classList.replace("gpf-visible","gpf-hidden"),document.getElementById(ne._addUID("GPgeocodeResultsList")).classList.replace("GPelementVisible","GPelementHidden"),document.getElementById(ne._addUID("GPgeocodeResultsList")).classList.replace("gpf-visible","gpf-hidden"),document.getElementById(ne._addUID("GPadvancedSearchPanel")).classList.replace("GPelementVisible","GPelementHidden"),document.getElementById(ne._addUID("GPadvancedSearchPanel")).classList.replace("gpf-visible","gpf-hidden"),document.getElementById(ne._addUID("GPshowAdvancedSearch")).setAttribute("aria-pressed",!1)}),ee},_createAdvancedSearchPanelElement:function(){var ne=document.createElement("dialog");return ne.id=this._addUID("GPadvancedSearchPanel"),ne.className="GPpanel GPelementHidden gpf-panel gpf-hidden fr-modal",ne},_createAdvancedSearchPanelDivElement:function(){var ne=document.createElement("div");
141return ne.className="gpf-panel__body fr-modal__body",ne},_createGeocodeResultsElement:function(){var ne=document.createElement("dialog");return ne.id=this._addUID("GPgeocodeResultsList"),ne.className="GPpanel GPelementHidden gpf-panel gpf-hidden fr-modal",ne},_createGeocodeResultsDivElement:function(){var ne=document.createElement("div");return ne.className="gpf-panel__body fr-modal__body",ne.appendChild(this._createGeocodeResultsHeaderElement()),ne},_createAutoCompleteElement:function(){var ne=document.createElement("div");return ne.id=this._addUID("GPautoCompleteList"),ne.className="GPautoCompleteList GPelementHidden gpf-panel fr-modal gpf-hidden ",ne},_createCoordinateSearchPanelElement:function(){var ne=document.createElement("dialog");return ne.id=this._addUID("GPcoordinateSearchPanel"),ne.className="GPpanel GPelementHidden gpf-panel gpf-hidden fr-modal",ne},_createCoordinateSearchPanelDivElement:function(){var ne=document.createElement("div");return ne.className="gpf-panel__body fr-modal__body",ne},_createAutoCompleteListElement:function(){var ne=this,ee=document.createElement("div");return ee.id=this._addUID("GPautocompleteResults"),ee.className="",ee.addEventListener?ee.addEventListener("click",function(te){document.getElementById(ne._addUID("GPautoCompleteList")).classList.replace("GPelementVisible","GPelementHidden"),document.getElementById(ne._addUID("GPautoCompleteList")).classList.replace("gpf-visible","gpf-hidden")},!1):ee.attachEvent&&ee.attachEvent("onclick",function(te){document.getElementById(ne._addUID("GPautoCompleteList")).classList.replace("GPelementVisible","GPelementHidden"),document.getElementById(ne._addUID("GPautoCompleteList")).classList.replace("gpf-visible","gpf-hidden")}),ee},_createAutoCompletedLocationContainer(){var ne=document.createElement("div");return ne.id=this._addUID("GPautocompleteResultsLocation"),ne.className="GPelementHidden gpf-hidden gpf-select",ne.size=20,ne.autofocus=!0,ne},_createAutoCompletedLocationTitleElement(){var ne=document.getElementById(this._addUID("GPautocompleteResultsLocation")),ee=document.createElement("p");ee.className="GPlabel GPlabelTitle gpf-label fr-label search-results-loc",ee.innerHTML="Lieux et adresses",ne.appendChild(ee)},_createAutoCompletedLocationElement:function(ne,ee){var te=this,st=document.getElementById(this._addUID("GPautocompleteResultsLocation")),ot=document.createElement("p");ot.id=this._addUID("AutoCompletedLocation_"+ee),ot.className="GPautoCompleteProposal gpf-panel__items gpf-panel__items_searchengine";var ct=GeocodeUtils.getSuggestedLocationFreeform(ne);ot.innerHTML=ct,ot.title=ct,ot.addEventListener?ot.addEventListener("click",function(ut){te.onAutoCompletedResultsItemClick(ut)},!1):ot.attachEvent&&ot.attachEvent("onclick",function(ut){te.onAutoCompletedResultsItemClick(ut)}),st.appendChild(ot)},_createSearchedSuggestContainer(){var ne=document.createElement("div");return ne.id=this._addUID("GPautocompleteResultsSuggest"),ne.className="GPelementHidden gpf-hidden gpf-select",ne.size=6,ne.autofocus=!0,ne},_createSearchedSuggestTitleElement(){var ne=document.getElementById(this._addUID("GPautocompleteResultsSuggest")),ee=document.createElement("p");ee.className="GPlabel GPlabelTitle gpf-label fr-label search-results-data",ee.innerHTML="Cartes et données",ne.appendChild(ee)},_createSearchedSuggestElement:function(ne,ee){var te=this,st=document.getElementById(this._addUID("GPautocompleteResultsSuggest")),ot=document.createElement("p");ot.id=this._addUID("AutoCompletedSuggest_"+ee),ot.className="GPautoCompleteProposal gpf-panel__items gpf-panel__items_searchengine",ot.innerHTML=ne.title+" ("+ne.service+")",ot.dataset.layer=ne.name,ot.title=`${ne.description} (nom technique : ${ne.name})`,ot.addEventListener?ot.addEventListener("click",function(ct){te.onSearchedResultsItemClick(ct)},!1):ot.attachEvent&&ot.attachEvent("onclick",function(ct){te.onSearchedResultsItemClick(ct)}),st.appendChild(ot)},_createAdvancedSearchPanelHeaderElement:function(){var ne=this;let ee=this._createPanelHeaderElement({title:"Recherche avancée"});return ee._closeBtn.addEventListener("click",function(){var te="#GPsearchInput-"+ne._uid;document.querySelector(te+" input").disabled=!1,document.querySelector(te+" .GPsearchInputReset")&&(document.querySelector(te+" .GPsearchInputReset").disabled=!1),checkDsfr()&&(document.querySelector("#GPshowSearchEnginePicto-"+ne._uid).disabled=!1),document.getElementById(ne._addUID("GPgeocodeResultsList")).classList.replace("GPelementVisible","GPelementHidden"),document.getElementById(ne._addUID("GPgeocodeResultsList")).classList.replace("gpf-visible","gpf-hidden"),document.getElementById(ne._addUID("GPshowAdvancedSearch")).setAttribute("aria-pressed",!1),document.getElementById(ne._addUID("GPadvancedSearchPanel")).classList.replace("GPelementVisible","GPelementHidden"),document.getElementById(ne._addUID("GPadvancedSearchPanel")).classList.replace("gpf-visible","gpf-hidden")},!1),ee},_createAdvancedSearchPanelFormElement:function(ne,ee){var te=this,st=document.createElement("form");st.id=this._addUID("GPadvancedSearchForm"),st.className="gpf-panel__content fr-modal__content",st.addEventListener("submit",function(dt){dt.preventDefault();for(var ht=[],ft="#GPadvancedSearchFilters-"+te._uid,pt=document.querySelectorAll(ft+" > div > div > input,select#category"),mt=0;mt<pt.length;mt++){var yt=pt[mt];ht.push({key:yt.name,value:yt.value})}return te.onGeocodingAdvancedSearchSubmit(dt,ht),document.getElementById(te._addUID("GPgeocodeResultsList")).classList.replace("GPelementHidden","GPelementVisible"),document.getElementById(te._addUID("GPgeocodeResultsList")).classList.replace("gpf-hidden","gpf-visible"),!1});var ot=document.createElement("div");ot.className="GPflexInput gpf-flex-column ";var ct=document.createElement("label");ct.className="GPadvancedSearchCodeLabel gpf-label fr-label",ct.innerHTML="Recherche par",ot.appendChild(ct);
141var ut=this._createAdvancedSearchFormCodeElement(ne,ee);return ot.appendChild(ut),st.appendChild(ot),st},_createAdvancedSearchFormCodeElement:function(ne,ee){var te=this,st=document.createElement("select");st.id=this._addUID("GPadvancedSearchCode"),st.title="Choisir un type de recherche",st.className="GPadvancedSearchCode gpf-select fr-select",st.addEventListener("change",function(ut){te.onGeocodingAdvancedSearchCodeChange(ut)},!1),ne||(ne=[{id:"PositionOfInterest",title:"Lieux/toponymes"},{id:"StreetAddress",title:"Adresses"},{id:"CadastralParcel",title:"Parcelles cadastrales"}]);for(var ot=0;ot<ne.length;ot++){var ct=document.createElement("option");ct.value=ne[ot].id,ct.text=ne[ot].title,st.appendChild(ct)}if(ee){var ct=document.createElement("option");ct.value="Coordinates",ct.text="Coordonnées",st.appendChild(ct)}return st},_createAdvancedSearchFormInputElement:function(){var ne=document.createElement("input");return ne.type="submit",ne.id=this._addUID("GPadvancedSearchSubmit"),ne.className="GPsubmit gpf-btn gpf-btn-icon-submit  fr-btn fr-btn--secondary gpf-btn--secondary",ne.value="Chercher",ne},_createAdvancedSearchFormFiltersElement:function(){var ne=document.createElement("div");return ne.id=this._addUID("GPadvancedSearchFilters"),ne},_createAdvancedSearchFiltersTableElement:function(ne,ee){var te=document.createElement("div");return te.id=this._addUID(ne),ee||(te.style.display="none"),te},_createAdvancedSearchFiltersAttributElement:function(ne){var ee=null,te=ne.name,st=ne.title,ot=ne.description,ct=ne.code,ut=ne.value,dt=document.createElement("div");dt.className="GPflexInput gpf-flex-column ";var ht=document.createElement("label");if(ht.className="GPadvancedSearchFilterLabel gpf-label fr-label",ht.htmlFor=te,ht.title=ot||st,ht.innerHTML=st,dt.appendChild(ht),te==="category"){var ft=document.createElement("select");if(ft.id=te,ft.name=te,ft.title=st,ft.className="GPadvancedSearchFilterInput gpf-select fr-select",ut&&Array.isArray(ut))for(var pt=0;pt<ut.length;pt++){var mt=document.createElement("option");mt.value=ut[pt],mt.text=ut[pt],ft.appendChild(mt)}dt.appendChild(ft)}else{var yt=document.createElement("input");if(yt.id=te,yt.className="GPadvancedSearchFilterInput gpf-input fr-input",yt.type="text",yt.name=te,ut)if(Array.isArray(ut)){var vt=te+"_list";yt.setAttribute("list",vt);var _t=document.createElement("datalist");_t.id=vt;for(var pt=0;pt<ut.length;++pt){var mt=document.createElement("option");mt.value=ut[pt],_t.appendChild(mt)}dt.appendChild(_t)}else yt.value=ut;dt.appendChild(yt)}return ee=document.getElementById(this._addUID(ct)),ee?ee.appendChild(dt):ee=dt,ee},_createGeocodeResultsHeaderElement:function(){var ne=this;let ee=this._createPanelHeaderElement({title:"Résultats de la recherche"});return ee._closeBtn.addEventListener("click",function(){document.getElementById(ne._addUID("GPgeocodeResultsList")).classList.replace("GPelementVisible","GPelementHidden"),document.getElementById(ne._addUID("GPgeocodeResultsList")).classList.replace("gpf-visible","gpf-hidden")},!1),ee},_createGeocodeResultsListElement:function(){var ne=this,ee=document.createElement("div");return ee.id=this._addUID("GPgeocodeResults"),ee.className="gpf-panel__list",ee.setAttribute("tabindex","0"),ee.addEventListener?ee.addEventListener("click",function(te){te.ctrlKey||(document.getElementById(ne._addUID("GPgeocodeResultsList")).classList.replace("GPelementVisible","GPelementHidden"),document.getElementById(ne._addUID("GPgeocodeResultsList")).classList.replace("gpf-visible","gpf-hidden")),ne.onGeocodedResultsItemClick(te)},!1):ee.attachEvent&&ee.attachEvent("onclick",function(te){te.ctrlKey||(document.getElementById(ne._addUID("GPgeocodeResultsList")).classList.replace("GPelementVisible","GPelementHidden"),document.getElementById(ne._addUID("GPgeocodeResultsList")).classList.replace("gpf-visible","gpf-hidden")),ne.onGeocodedResultsItemClick(te)}),ee},_createGeocodedLocationElement:function(ne,ee){var te=document.getElementById(this._addUID("GPgeocodeResults")),st=document.createElement("div");st.id=this._addUID("GeocodedLocation_"+ee),st.className="GPautoCompleteProposal gpf-panel__items gpf-panel__items_searchengine",typeof ne=="string"?st.innerHTML=ne:st.innerHTML=GeocodeUtils.getGeocodedLocationFreeform(ne),te.appendChild(st)},_createCoordinateSearchPanelHeaderElement(){var ne=this;let ee=this._createPanelHeaderElement({title:"Recherche par coordonnées"});return ee._closeBtn.addEventListener("click",function(){var te="#GPsearchInput-"+ne._uid;document.querySelector(te+" input").disabled=!1,document.querySelector(te+" .GPsearchInputReset")&&(document.querySelector(te+" .GPsearchInputReset").disabled=!1),checkDsfr()&&(document.querySelector("#GPshowSearchEnginePicto-"+ne._uid).disabled=!1),document.getElementById(ne._addUID("GPshowSearchByCoordinate")).setAttribute("aria-pressed",!1),document.getElementById(ne._addUID("GPcoordinateSearchPanel")).classList.replace("GPelementVisible","GPelementHidden"),document.getElementById(ne._addUID("GPcoordinateSearchPanel")).classList.replace("gpf-visible","gpf-hidden"),ne.onCoordinateSearchClose()},!1),ee},_createCoordinateSearchPanelFormElement(){var ne=this,ee=document.createElement("form");return ee.id=this._addUID("GPcoordinateSearchForm"),ee.className="gpf-panel__content fr-modal__content",ee.addEventListener("submit",function(te){return te.preventDefault(),ne.onShowSearchByCoordinateClick(),!1}),ee},__createCoordinateSearchDivElement(){var ne=document.createElement("div");return ne.className="GPflexInput gpf-flex-column ",ne},_createCoordinateSearchSystemsLabelElement(){var ne=document.createElement("label");return ne.className="GPcoordinateSearchSystemsLabel gpf-label fr-label",ne.innerHTML="Système de référence",ne},_setCoordinateSearchSystemsSelectElement(ne){document.getElementById(this._addUID("GPcoordinateSearchSystem"))&&document.getElementById(this._addUID("GPcoordinateSearchSystem")).remove();var ee=this,te=document.createElement("select");te.id=this._addUID("GPcoordinateSearchSystem"),te.title="Choisir un système de réference",te.className="GPselect GPcoordinateSearchSystemsSelect gpf-select fr-select",te.addEventListener("change",function(ut){ee.onCoordinateSearchSystemChange(ut)});for(var st=0;st<ne.length;st++){var ot=ne[st],ct=document.createElement("option");ct.value=ot.code,ct.text=ot.label||st,te.appendChild(ct)}return te},_createCoordinateSearchUnitsLabelElement(){var ne=document.createElement("label");return ne.className="GPcoordinateSearchUnitsLabel gpf-label fr-label",ne.innerHTML="Unités",ne},_setCoordinateSearchUnitsSelectElement(ne){document.getElementById(this._addUID("GPcoordinateSearchUnits"))&&document.getElementById(this._addUID("GPcoordinateSearchUnits")).remove();var ee=this,te=document.createElement("select");te.id=this._addUID("GPcoordinateSearchUnits"),te.title="Choisir un type d'unité",te.className="GPselect GPcoordinateSearchUnitsSelect gpf-select fr-select",te.addEventListener("change",function(ut){ee.onCoordinateSearchUnitsChange(ut)});for(var st=0;st<ne.length;st++){var ot=ne[st],ct=document.createElement("option");ct.value=ot.code?ot.code:st,ct.text=ot.label||st,te.appendChild(ct)}return te},_setCoordinateSearchLngLabelElement(ne){document.getElementById(this._addUID("GPcoordinateSearchLngLabel"))&&document.getElementById(this._addUID("GPcoordinateSearchLngLabel")).remove();var ee=document.createElement("label");return ee.className="GPcoordinateSearchLabel gpf-label fr-label",ee.id=this._addUID("GPcoordinateSearchLngLabel"),ee.htmlFor="coordinate-lng",ee.innerHTML=ne
141==="Geographical"?"Longitude :":"Y :",ee},_setCoordinateSearchLngInputElement(ne){document.getElementById(this._addUID("GPcoordinateSearchLngInput"))&&document.getElementById(this._addUID("GPcoordinateSearchLngInput")).remove(),document.getElementById(this._addUID("GPcoordinateSearchLngDMS"))&&document.getElementById(this._addUID("GPcoordinateSearchLngDMS")).remove();var ee=document.createElement("input");switch(ee.id=this._addUID("GPcoordinateSearchLngInput"),ee.className="GPcoordinateSearchInput gpf-input fr-input",ee.title="Saisir des coordonnées",ee.name="coordinate-lng",ee.type="number",ee.step="any",ee.required="",ne){case"DMS":return ee.title+=" géographiques (en sexa)",ee.className="GPelementHidden gpf-hidden",this._setCoordinateSearchLngDMSElement();case"DEC":ee.title+=" géographiques (en decimal)",ee.min="-180",ee.max="180";break;case"M":ee.title+=" cartésiennes (en mètre)";break;case"KM":ee.title+=" cartésiennes (en kilomètre)";break}return ee},_setCoordinateSearchLngDMSElement(){var ne=document.createElement("div");return ne.id=this._addUID("GPcoordinateSearchLngDMS"),ne.innerHTML=`
142        <div class="GPflexInput gpf-flex">
143            <input step="1"
144                id="GPcoordinatSearchInputSexLonDeg"
145                class="gpf-input fr-input"
146                name="inputSexLonDeg"
147                title="Saisir une valeur de degré entre 0° et 180°"
148                type="number"
149                required=""
150                min="0"
151                max="180">
152            <label>°</label>
153            <input step="1"
154                id="GPcoordinatSearchInputSexLonMin"
155                class="gpf-input fr-input"
156                name="inputSexLonMin"
157                title="Saisir une valeur de minute entre 0' et 59'"
158                type="number"
159                required=""
160                min="0"
161                max="59">
162            <label>'</label>
163            <input step="any"
164                id="GPcoordinatSearchInputSexLonSec"
165                class="gpf-input fr-input"
166                name="inputSexLonSec"
167                title="Saisir une valeur de seconde entre 0'' et 59''"
168                type="number"
169                required=""
170                min="0"
171                max="59.9999">
172            <label>"</label>
173            <select
174                id="GPcoordinatSearchInputSexLonToward"
175                class="GPselect gpf-select fr-select"
176                title="Saisir une direction pour Est et 0uest"
177                name="inputSexLonToward">
178                <option value="O">O</option>
179                <option value="E" selected="">E</option>
180            </select>
181        </div>
182        `,ne},_setCoordinateSearchLatLabelElement(ne){document.getElementById(this._addUID("GPcoordinateSearchLatLabel"))&&document.getElementById(this._addUID("GPcoordinateSearchLatLabel")).remove();var ee=document.createElement("label");return ee.className="GPcoordinateSearchLabel gpf-label fr-label",ee.id=this._addUID("GPcoordinateSearchLatLabel"),ee.htmlFor="coordinate-lat",ee.innerHTML=ne==="Geographical"?"Latitude :":"X :",ee},_setCoordinateSearchLatInputElement(ne){document.getElementById(this._addUID("GPcoordinateSearchLatInput"))&&document.getElementById(this._addUID("GPcoordinateSearchLatInput")).remove(),document.getElementById(this._addUID("GPcoordinateSearchLatDMS"))&&document.getElementById(this._addUID("GPcoordinateSearchLatDMS")).remove();var ee=document.createElement("input");switch(ee.id=this._addUID("GPcoordinateSearchLatInput"),ee.className="GPcoordinateSearchInput gpf-input fr-input",ee.title="Saisir des coordonnées",ee.name="coordinate-lat",ee.type="number",ee.step="any",ee.required="",ne){case"DMS":return ee.title+=" géographiques (en sexa)",ee.className="GPelementHidden gpf-hidden",this._setCoordinateSearchLatDMSElement();case"DEC":ee.title+=" géographiques (en decimal)",ee.min="-180",ee.max="180";break;case"M":ee.title+=" cartésiennes (en mètre)";break;case"KM":ee.title+=" cartésiennes (en kilomètre)";break}return ee},_setCoordinateSearchLatDMSElement(){var ne=document.createElement("div");return ne.id=this._addUID("GPcoordinateSearchLatDMS"),ne.innerHTML=`
183        <div class="GPflexInput gpf-flex">
184            <input step="1"
185                id="GPcoordinatSearchInputSexLatDeg"
186                class="gpf-input fr-input"
187                name="inputSexLatDeg"
188                title="Saisir une valeur de degré entre 0° et 85°"
189                type="number"
190                required=""
191                min="0"
192                max="85">
193            <label>°</label>
194            <input step="1"
195                id="GPcoordinatSearchInputSexLatMin"
196                class="gpf-input fr-input"
197                name="inputSexLatMin"
198                title="Saisir une valeur de minute entre 0' et 59'"
199                type="number"
200                required=""
201                min="0"
202                max="59">
203            <label>'</label>
204            <input step="any"
205                id="GPcoordinatSearchInputSexLatSec"
206                class="gpf-input fr-input"
207                name="inputSexLatSec"
208                title="Saisir une valeur de seconde entre 0' et 59'"
209                type="number"
210                required=""
211                min="0"
212                max="59.9999">
213            <label>"</label>
214            <select
215                id="GPcoordinatSearchInputSexLatToward"
216                class="GPselect gpf-select fr-select"
217                title="Saisir une direction pour Nord et Sud"
218                name="inputSexLatToward">
219                <option value="N">N</option>
220                <option value="S">S</option>
221            </select>
222        </div>
223        `,ne},_createCoordinateSearchSubmitElement(){var ne=document.createElement("input");return ne.type="submit",ne.id=this._addUID("GPcoordinateSearchSubmit"),ne.className="GPsubmit gpf-btn gpf-btn-icon-submit  fr-btn fr-btn--secondary gpf-btn--secondary",ne.value="Chercher",ne}},logger$A=LoggerByDefault.getLogger("searchengine");class SearchEngine extends ControlExtended{constructor(ee){if(ee=ee||{},super(ee),!(this instanceof SearchEngine))throw new TypeError("ERROR CLASS_CONSTRUCTOR");return this.CLASSNAME="SearchEngine",this.initialize(ee),this.container=this._initContainer(),this.element?this.element.appendChild(this.container):this.element=this.container,this}setMap(ee){ee||this._clearResults(),this.collapsed||this._showSearchEngineButton.setAttribute("aria-pressed",!0),super.setMap(ee),this.options.position&&this.setPosition(this.options.position),this.options.gutter===!1&&this.getContainer().classList.add("gpf-button-no-gutter")}getCollapsed(){return this.collapsed}setCollapsed(ee){if(ee===void 0){logger$A.log("[ERROR] SearchEngine:setCollapsed - missing collapsed parameter");return}this.options.collapsible&&(ee&&this.collapsed||!ee&&!this.collapsed||(this._showSearchEngineButton.click(),this.collapsed=ee))}getData(){return this._geocodedLocations}getContainer(){return this.container}initialize(ee){this._checkInputOptions(ee),this.options={collapsed:!0,collapsible:!0,zoomTo:"",resources:{geocode:[],autocomplete:[],search:!1},displayButtonClose:!0,displayButtonAdvancedSearch:!1,displayButtonGeolocate:!1,displayButtonCoordinateSearch:!1,coordinateSearchInAdvancedSearch:!1,advancedSearch:{},coordinateSearch:{},searchOptions:{addToMap:!0,maximumEntries:5,serviceOptions:{maximumResponses:10},filterLayers:!0},geocodeOptions:{serviceOptions:{}},autocompleteOptions:{serviceOptions:{maximumResponses:5},triggerGeocode:!1,triggerDelay:1e3,prettifyResults:!1},displayMarker:!0,markerStyle:"lightOrange",markerUrl:"",placeholder:"Rechercher un lieu, une adresse",splitResults:!1}
223,Helper.mergeParams(this.options,ee),this.options.resources.geocode===""&&(this.options.resources.geocode=["PositionOfInterest","StreetAddress"]),this.options.resources.autocomplete.length===0&&(this.options.resources.autocomplete=["PositionOfInterest","StreetAddress"]),this.options.resources.search&&(this.options.searchOptions&&(this.options.searchOptions.serviceOptions&&(this.options.searchOptions.serviceOptions.url&&Search$1.setUrl(this.options.searchOptions.serviceOptions.url),this.options.searchOptions.serviceOptions.fields&&Search$1.setFields(this.options.searchOptions.serviceOptions.fields),this.options.searchOptions.serviceOptions.index&&Search$1.setIndex(this.options.searchOptions.serviceOptions.index),this.options.searchOptions.serviceOptions.size&&Search$1.setSize(this.options.searchOptions.serviceOptions.size),this.options.searchOptions.serviceOptions.maximumResponses&&Search$1.setMaximumResponses(this.options.searchOptions.serviceOptions.maximumResponses)),this.options.searchOptions.filterServices&&Search$1.setFiltersByService(this.options.searchOptions.filterServices),this.options.searchOptions.filterLayersPriority&&Search$1.setFiltersByLayerPriority(this.options.searchOptions.filterLayersPriority),this.options.searchOptions.filterWMTSPriority&&Search$1.setFilterWMTSPriority(this.options.searchOptions.filterWMTSPriority),this.options.searchOptions.filterTMS===!1&&Search$1.setFilterTMS(this.options.searchOptions.filterTMS),this.options.searchOptions.filterProjections&&Search$1.setFiltersByProjection(this.options.searchOptions.filterProjections)),Search$1.target.addEventListener("suggest",ot=>{logger$A.debug(ot);let ct=ot.detail;ct=this._filterResultsFromConfigLayers(ct),this._fillSearchedSuggestListContainer(ct)})),this.options.collapsible||(this.options.collapsed=!1),this.collapsed=this.options.collapsed,this._uid=this.options.id||SelectorID.generate(),this._showSearchEngineButton=null,this._showSearchEngineAdvancedButton=null,this._inputSearchContainer=null,this._autocompleteContainer=null,this._containerResultsLocation=null,this._containerResultsSuggest=null,this._radioButtonLocation=null,this._radioButtonSuggest=null,this._suggestedLocations=[],this._geocodedContainer=null,this._geocodedLocations=[],this._filterContainer=null,this._currentGeocodingCode=null,this._currentGeocodingLocation=null,this._advancedSearchFilters={},this._initAdvancedSearchFilters(),this._advancedSearchCodes=[],this._initAdvancedSearchCodes(),this._coordinateSearchSystems=[],this.options.displayButtonCoordinateSearch&&(this._initCoordinateSearchSystems(),this._currentCoordinateSearchSystems=this._coordinateSearchSystems[0],this._currentCoordinateSearchType=this._coordinateSearchSystems[0].type),this._coordinateSearchUnits=[],this.options.displayButtonCoordinateSearch&&(this._initCoordinateSearchUnits(),this._currentCoordinateSearchUnits=this._coordinateSearchUnits[this._currentCoordinateSearchType][0].code),this._coordinateSearchLngInput=null,this._coordinateSearchLatInput=null,this._marker=null;var te=this.options.markerStyle,st=this.options.markerUrl;st?this._markerUrl=st:this._markerUrl=Object.keys(Marker).indexOf(te)===-1?Marker.lightOrange:Marker[te],this._displayMarker=this.options.displayMarker,this._popupContent=null,this._popupDiv=this._initPopupDiv(),this._popupOverlay=null,this._triggerHandler=null}_checkInputOptions(ee){var te;if(ee.resources)if(typeof ee.resources=="object"){var st=ee.resources.geocode;if(st)if(Array.isArray(st)){var ot=["StreetAddress","PositionOfInterest","CadastralParcel","Administratif"];for(te=0;te<st.length;te++)ot.indexOf(st[te])===-1&&logger$A.log("[SearchEngine] options.resources.geocode : "+st[te]+" is not a resource for geocode")}else logger$A.log("[SearchEngine] 'options.resources.geocode' parameter should be an array"),st=null;var ct=ee.resources.autocomplete;if(ct)if(Array.isArray(ct)){var ut=["StreetAddress","PositionOfInterest"];for(te=0;te<ct.length;te++)ut.indexOf(ct[te])===-1&&logger$A.log("[SearchEngine] options.resources.autocomplete : "+ct[te]+" is not a resource for autocomplete")}
223else logger$A.log("[SearchEngine] 'options.resources.autocomplete' parameter should be an array"),ct=null}else logger$A.log("[SearchEngine] 'resources' parameter should be an object"),ee.resources=null}_initAdvancedSearchCodes(){var ee=this.options.resources.geocode;ee==="location"&&(ee=["PositionOfInterest","StreetAddress","CadastralParcel"]),Array.isArray(ee)||(ee=[ee]);for(var te=0;te<ee.length;te++)switch(ee[te]){case"PositionOfInterest":this._advancedSearchCodes.push({id:"PositionOfInterest",title:"Lieux/toponymes"});break;case"StreetAddress":this._advancedSearchCodes.push({id:"StreetAddress",title:"Adresses"});break;case"CadastralParcel":this._advancedSearchCodes.push({id:"CadastralParcel",title:"Parcelles cadastrales"});break}this._advancedSearchCodes.length===0&&(this._advancedSearchCodes=[{id:"StreetAddress",title:"Adresses"},{id:"PositionOfInterest",title:"Lieux/toponymes"},{id:"CadastralParcel",title:"Cadastre"}]),logger$A.log("advancedSearchCodes",this._advancedSearchCodes)}_initAdvancedSearchFilters(){this._advancedSearchFilters=SearchEngineUtils.advancedSearchFiltersByDefault;var ee=this.options.advancedSearch;Helper.assign(this._advancedSearchFilters,ee),logger$A.log("advancedSearchFilters",this._advancedSearchFilters)}_initCoordinateSearchSystems(){var ee=[{label:"Géographique",crs:"EPSG:4326",type:"Geographical"},{label:"Web Mercator",crs:"EPSG:3857",type:"Metric"},{label:"Lambert 93",crs:"EPSG:2154",type:"Metric"}],te=this.options.coordinateSearch.systems;if(te)for(var st=0;st<te.length;st++){var ot=te[st];this._setSystem(ot)}if(this._coordinateSearchSystems.length===0)for(var ct=0;ct<ee.length;ct++)this._setSystem(ee[ct])}_initCoordinateSearchUnits(){var ee={Geographical:[{code:"DEC",label:"degrés décimaux",format:MathUtils.coordinateToDecimal},{code:"DMS",label:"degrés sexagésimaux",format:MathUtils.coordinateToDMS}],Metric:[{code:"M",label:"mètres",format:MathUtils.coordinateToMeter},{code:"KM",label:"kilomètres",format:MathUtils.coordinateToKMeter}]},te=this.options.coordinateSearch.units;if(te){for(var st in ee)if(ee.hasOwnProperty(st)){for(var ot=!1,ct=0;ct<ee[st].length;ct++)for(var ut=ee[st][ct],dt=0;dt<te.length;dt++){var ht=te[dt];ut.code===ht&&(ot=!0,this._coordinateSearchUnits[st]||(this._coordinateSearchUnits[st]=[]),this._coordinateSearchUnits[st].push(ut))}ot||(this._coordinateSearchUnits[st]=ee[st])}}typeof this._coordinateSearchUnits=="object"&&Object.keys(this._coordinateSearchUnits).length===0&&(this._coordinateSearchUnits=ee)}_initPopupDiv(){var ee=this,te=document.createElement("div");te.className="gp-feature-info-div gpf-widget-color";var st=document.createElement("button");st.title="Supprimer le marqueur",st.className="gp-styling-button remove gpf-btn gpf-btn-icon-remove fr-btn--remove fr-btn fr-btn--tertiary-no-outline fr-mt-1v fr-mr-2v",st.onclick=function(){var ct=ee.getMap();ee._marker&&(ct.removeOverlay(ee._marker),ee._marker=null),ee._popupOverlay!=null&&ee._popupOverlay.setPosition(void 0),ee.dispatchEvent({type:"searchengine:geolocation:remove"})};var ot=document.createElement("button");return ot.title="Fermer la pop-up",ot.className="gp-styling-button closer gpf-btn gpf-btn-icon-close fr-btn--close fr-btn fr-btn--tertiary-no-outline fr-mt-1v fr-mr-2v",ot.onclick=function(){return ee._popupOverlay!=null&&ee._popupOverlay.setPosition(void 0),!1},this._popupContent=document.createElement("div"),this._popupContent.className="gp-features-content-div",this._popupContent.style["min-width"]="200px",te.appendChild(ot),te.appendChild(this._popupContent),te.appendChild(st),te}_initContainer(){var ee=this._createMainContainerElement(),te=this._createSearchDivElement(),st=this._showSearchEngineButton=this._createShowSearchEnginePictoElement(this.options.collapsible);te.appendChild(st),this.options.collapsible||ee.classList.add("gpf-widget-color","gpf-widget-padding");var ot=this._inputSearchContainer=this._createSearchInputElement(this.options.placeholder);this.options.displayButtonClose&&ot.appendChild(this._createSearchResetElement());var ct=this;ot.addEventListener?ot.addEventListener("click",function(){ct.onAutoCompleteInputClick()}):ot.attachEvent&&ot.attachEvent("onclick",function(){ct.onAutoCompleteInputClick()}),te.appendChild(ot);var ut=this._createButtonsElement(),dt=this._createFirstLineWrapper();if(dt.appendChild(te),dt.appendChild(ut),ee.appendChild(dt),checkDsfr()&&this.options.splitResults){var ht=this._createRadioContainer();ee.appendChild(ht)}if(checkDsfr()&&this.options.splitResults){var ft;[ft,this._radioButtonLocation,this._radioButtonSuggest]=this._createRadioElements(),ht.appendChild(ft)}if(this.options.displayButtonGeolocate){var pt=this._createShowGeolocateElement();ut.appendChild(pt)}if(this.options.displayButtonCoordinateSearch||this.options.coordinateSearchInAdvancedSearch){var mt=this._createShowSearchByCoordinateElement();this.options.coordinateSearchInAdvancedSearch||ut.appendChild(mt);var yt=this._createCoordinateSearchPanelElement(),vt=this._createCoordinateSearchPanelDivElement(),_t=this._createCoordinateSearchPanelHeaderElement(),bt=this._createCoordinateSearchPanelFormElement(),xt=null;xt=this._containerSystems=this.__createCoordinateSearchDivElement(),bt.appendChild(xt);var Mt=this._createCoordinateSearchSystemsLabelElement(),Ot=this._setCoordinateSearchSystemsSelectElement(this._coordinateSearchSystems);xt.appendChild(Mt),xt.appendChild(Ot),xt=this._containerUnits=this.__createCoordinateSearchDivElement(),bt.appendChild(xt);var kt=this._createCoordinateSearchUnitsLabelElement(),Nt=this._setCoordinateSearchUnitsSelectElement(this._coordinateSearchUnits[this._currentCoordinateSearchType]);xt.appendChild(kt),xt.appendChild(Nt),xt=this._containerCoordinateLat=this.__createCoordinateSearchDivElement(),bt.appendChild(xt);var Gt=this._setCoordinateSearchLatLabelElement(this._currentCoordinateSearchType),Bt=this._coordinateSearchLatInput=this._setCoordinateSearchLatInputElement(this._currentCoordinateSearchUnits);xt.appendChild(Gt),xt.appendChild(Bt),xt=this._containerCoordinateLng=this.__createCoordinateSearchDivElement(),bt.appendChild(xt);var Ut=this._setCoordinateSearchLngLabelElement(this._currentCoordinateSearchType),Vt=this._coordinateSearchLngInput=this._setCoordinateSearchLngInputElement(this._currentCoordinateSearchUnits);xt.appendChild(Ut),xt.appendChild(Vt);var Ht=this._createCoordinateSearchSubmitElement();bt.appendChild(Ht),vt.appendChild(_t),vt.appendChild(bt),yt.appendChild(vt),this.options.coordinateSearchInAdvancedSearch||ee.appendChild(yt)}if(this.options.displayButtonAdvancedSearch){var zt=this._showSearchEngineAdvancedButton=this._createShowAdvancedSearchElement();ut.appendChild(zt);var jt=this._createAdvancedSearchPanelElement(),Wt=this._createAdvancedSearchPanelDivElement(),Jt=this._createAdvancedSearchPanelHeaderElement(),Qt=this._createAdvancedSearchPanelFormElement(this._advancedSearchCodes,this.options.coordinateSearchInAdvancedSearch),oi=this._filterContainer=this._createAdvancedSearchFormFiltersElement();this._setFilter(this._advancedSearchCodes[0].id);var ai=this._createAdvancedSearchFormInputElement();Qt.appendChild(oi),this.options.coordinateSearchInAdvancedSearch&&Qt.appendChild(bt),Qt.appendChild(ai),Wt.appendChild(Jt),Wt.appendChild(Qt),jt.appendChild(Wt),ee.appendChild(jt)}var xn=this._autocompleteContainer=this._createAutoCompleteElement(),An=this._createAutoCompleteListElement(),Nn=this._containerResultsLocation=this._createAutoCompletedLocationContainer(),Xt=this._containerResultsSuggest=this._createSearchedSuggestContainer();An.appendChild(Nn),An.appendChild(Xt),xn.appendChild(An),ee.appendChild(xn);var Zt=this._createGeocodeResultsElement(),Kt=this._createGeocodeResultsDivElement();Zt.appendChild(Kt);var ti=this._geocodedContainer=this._createGeocodeResultsListElement();return Kt.appendChild(ti),ee.appendChild(Zt),ee}_setFilter(ee){for(var te=this._filterContainer,st=!1,ot=0;ot<this._advancedSearchCodes.length;ot++)if(this._advancedSearchCodes[ot].id===ee){st=!0;break}if(!st){for(;te.firstChild;)te.removeChild(te.firstChild);return}for(this._currentGeocodingCode=ee;te.firstChild;)te.removeChild(te.firstChild);var ct=this._advancedSearchFilters[ee];if(!(!ct||ct.length===0)){for(var ut=this._createAdvancedSearchFiltersTableElement(ee,!0),dt=0;dt<ct.length;dt++){var ht=this._createAdvancedSearchFiltersAttributElement(ct[dt]);ut.appendChild(ht)}return te.appendChild(ut),te}}_requestAutoComplete(ee){if(!(!ee||typeof ee=="object"&&Object.keys(ee).length===0)&&ee.text){logger$A.log(ee);var te={};Helper.assign(te,this.options.autocompleteOptions.serviceOptions),Helper.assign(te,ee);var st=this.options.resources.autocomplete;st&&Array.isArray(st)&&(te.type||(te.type=st)),te.apiKey=te.apiKey||this.options.apiKey,typeof te.ssl!="boolean"&&(typeof this.options.ssl=="boolean"?te.ssl=this.options.ssl:te.ssl=!0),logger$A.log(te),Gp.Services.autoComplete(te)}}_fillAutoCompletedLocationListContainer(ee){if(!(!ee||ee.length===0)){var te=this._containerResultsLocation;if(te.childElementCount)for(;te.firstChild;)te.removeChild(te.firstChild);if(te.classList.add("GPelementHidden","gpf-hidden"),ee.length){(!this._radioButtonLocation||this._radioButtonLocation&&this._radioButtonLocation.checked)&&te.classList.remove("GPelementHidden","gpf-hidden"),this._displaySuggestedLocation(),(!checkDsfr()||!this.options.splitResults)&&this._createAutoCompletedLocationTitleElement();for(var st=0;st<ee.length;st++)this._createAutoCompletedLocationElement(ee[st],st)}}}_fillSearchedSuggestListContainer(ee){this.options.searchOptions.maximumEntries&&(ee=ee.slice(0,this.options.searchOptions.maximumEntries));var te=this._containerResultsSuggest;if(te.childElementCount)for(;te.firstChild;)te.removeChild(te.firstChild);if(te.classList.add("GPelementHidden","gpf-hidden"),ee.length){(!this._radioButtonSuggest||this._radioButtonSuggest&&this._radioButtonSuggest.checked)&&te.classList.remove("GPelementHidden","gpf-hidden"),(!checkDsfr()||!this.options.splitResults)&&this._createSearchedSuggestTitleElement();for(let st=0;st<ee.length;st++){const ot=ee[st];this._createSearchedSuggestElement(ot,st)}}}_filterResultsFromConfigLayers(ee){if(this.options.searchOptions.filterLayers){var te={};
223if(this.options.searchOptions.filterLayersList)te=this.options.searchOptions.filterLayersList;else{var st=window.Gp.Config.layers;for(let ct in st)st.hasOwnProperty(ct)&&(te[st[ct].name]=st[ct].serviceParams.id.split(":")[1])}let ot=ee.length;for(;ot--;)(!te[ee[ot].name]||ee[ot].service.toUpperCase()!==te[ee[ot].name].toUpperCase())&&ee.splice(ot,1)}return Search$1.setSuggestions(ee),ee}_requestGeocoding(ee){if(!(!ee||typeof ee=="object"&&Object.keys(ee).length===0)&&ee.query!==null){logger$A.log(ee);var te={};Helper.assign(te,this.options.geocodeOptions.serviceOptions),Helper.assign(te,ee);var st=this,ot=this.options.geocodeOptions.serviceOptions.onFailure!==null&&typeof this.options.geocodeOptions.serviceOptions.onFailure=="function",ct=this.options.geocodeOptions.serviceOptions.onSuccess!==null&&typeof this.options.geocodeOptions.serviceOptions.onSuccess=="function";if(ct){var ut=function(ft){ee.onSuccess.call(st,ft),st.options.geocodeOptions.serviceOptions.onSuccess.call(st,ft)};te.onSuccess=ut}if(ot){var dt=function(ft){ee.onFailure.call(st,ft),st.options.geocodeOptions.serviceOptions.onFailure.call(st,ft)};te.onFailure=dt}var ht=this.options.resources.geocode;ht&&(te.index||(te.index=ht)),te.apiKey=te.apiKey||this.options.apiKey,typeof te.ssl!="boolean"&&(typeof this.options.ssl=="boolean"?te.ssl=this.options.ssl:te.ssl=!0),logger$A.log(te),Gp.Services.geocode(te)}}_fillGeocodedLocationListContainer(ee){if(!ee||ee.length===0){this._clearGeocodedLocation();return}var te=this._geocodedContainer;if(te.childElementCount)for(;te.firstChild;)te.removeChild(te.firstChild);for(var st=0;st<ee.length;st++)logger$A.log(ee[st]),this._createGeocodedLocationElement(ee[st],st);this._geocodedLocations=ee}_setLabel(ee){document.getElementById("GPsearchInputText-"+this._uid).value=ee}_setPosition(ee,te){var st=this.getMap().getView();st.setCenter(ee),st.setZoom(te)}_setPositionFromExtent(ee){var te=this.getMap().getView();te.fit(ee)}_setMarker(ee,te){var st=this.getMap(),ot=this;if(this._marker!=null&&(st.removeOverlay(this._marker),this._marker=null),ee){var ct=document.createElement("img");ct.src=this._markerUrl,ct.addEventListener?ct.addEventListener("click",function(){ot._onResultMarkerSelect(te,ee)}):ct.attachEvent&&ct.attachEvent("onclick",function(){ot._onResultMarkerSelect(te,ee)}),this._marker=new Overlay({position:ee,positioning:"center-center",element:ct,stopEvent:!1}),st.addOverlay(this._marker)}}_getZoom(ee){var te=this.getMap(),st=this.options.zoomTo,ot=null;if(typeof st=="function"&&(logger$A.trace("zoom function"),ot=st.call(this,ee)),typeof st=="number"&&(logger$A.trace("zoom level"),ot=st),typeof st=="string")if(st==="auto")logger$A.trace("zoom auto"),ot=SearchEngineUtils.zoomToResultsByDefault(ee);else{logger$A.trace("zoom level parsing");var ct=parseInt(st,10);isNaN(ct)||(logger$A.trace("zoom parsing"),ot=ct)}Number.isInteger=Number.isInteger||function(ht){return typeof ht=="number"&&isFinite(ht)&&Math.floor(ht)===ht},(!ot||ot===""||!Number.isInteger(ot))&&(logger$A.trace("zoom not found, current zoom..."),ot=te.getView().getZoom());var ut=te.minZoom,dt=te.maxZoom;return ot<ut&&(logger$A.trace("zoom level min..."),ot=ut),ot>dt&&(logger$A.trace("zoom level max..."),ot=dt),logger$A.trace("zoom",ot),ot}_onResultMarkerSelect(ee,te=null){var st=this.getMap();te&&st.getView().animate({center:te,duration:250});var ot="";if(typeof ee!="string")if(ee.service==="GeocodedLocation"){ot="<ul>";var ct=ee.location.placeAttributes;for(var ut in ct)ct.hasOwnProperty(ut)&&ut!=="trueGeometry"&&ut!=="extraFields"&&ut!=="houseNumberInfos"&&ut!=="_count"&&(ot+="<li>",ot+='<span class="gp-attname-others-span">'+ut.toUpperCase()+" : </span>",ot+=ct[ut],ot+=" </li>");ot+=" </ul>"}else ee.service==="SuggestedLocation"?ot=GeocodeUtils.getSuggestedLocationFreeform(ee.location):ot="sans informations.";else ot=ee;this._popupContent.innerHTML=ot,this._popupOverlay?this._popupOverlay.setPosition(this._marker.getPosition()):(this._popupOverlay=new Overlay({element:this._popupDiv,positioning:"bottom-center",position:this._marker.getPosition(),offset:[0,-42]}),st.addOverlay(this._popupOverlay))}_setSystem(ee){if(typeof ee!="object"){logger$A.log("[ERROR] MousePosition:addSystem - system parameter should be an object");return}if(!ee.crs){logger$A.error("crs not defined !");return}if(ee.label||(logger$A.warn("crs label not defined, use crs code by default."),ee.label=ee.crs),ee.type||(logger$A.warn("type srs not defined, use 'Metric' by default."),ee.type="Metric"),CRS.loadByName(ee.crs),!get$3(ee.crs)){logger$A.error("crs '{}' not available into proj4 definitions !",ee.crs);return}for(var te=0;te<this._coordinateSearchSystems.length;te++){var st=this._coordinateSearchSystems[te];ee.crs===st.crs&&logger$A.info("crs '{}
223' already configured",st.crs)}ee.code=this._coordinateSearchSystems.length,this._coordinateSearchSystems.push(ee)}onShowSearchEngineClick(ee){ee.target.ariaPressed==="true"&&this.onPanelOpen();var te=this.getMap();Interactions.unset(te);var st=this._showSearchEngineButton.ariaPressed;this.collapsed=st!=="true",this.dispatchEvent("change:collapsed"),this.options.position&&!this.collapsed&&this.updatePosition(this.options.position),this.collapsed&&this._clearResults()}onSearchResetClick(){this._clearResults()}onShowSearchGeolocateClick(){"geolocation"in navigator&&navigator.geolocation.getCurrentPosition(ee=>{var te=this.getMap().getView(),st=te.getProjection().getCode(),ot=[ee.coords.longitude,ee.coords.latitude],ct;if(st!=="EPSG:4326"?ct=transform$1(ot,"EPSG:4326",st):ct=ot,isNaN(ct[0])||isNaN(ct[1])){this._setMarker();return}if(this._setPosition(ct,15),this._displayMarker){var ut="<h6> Ma position </h6> latitude : "+ot[1]+"<br/> longitude : "+ot[0];this._setMarker(ct,ut)}this.dispatchEvent({type:"searchengine:geolocation:click",coordinates:ct})})}onShowSearchByCoordinateClick(){var ee=null,te=null;if(this._coordinateSearchLngInput&&this._coordinateSearchLngInput.nodeName==="DIV"&&this._coordinateSearchLatInput&&this._coordinateSearchLatInput.nodeName==="DIV"?(ee=this._getCoordinateSearchDMS(this._coordinateSearchLngInput),te=this._getCoordinateSearchDMS(this._coordinateSearchLatInput)):(ee=this._coordinateSearchLngInput.value,te=this._coordinateSearchLatInput.value),!(!ee||!te)){var st=[ee,te],ot=this.getMap().getView(),ct=ot.getProjection().getCode();if(ct!=="EPSG:4326"&&(st=transform$1(st,"EPSG:4326",ct)),isNaN(st[0])||isNaN(st[1])){this._setMarker();return}this._setPosition(st,10),this._displayMarker&&this._setMarker(st,te+", "+ee),this.dispatchEvent({type:"searchengine:coordinates:click",coordinates:st})}}_getCoordinateSearchDMS(ee){if(ee&&ee.nodeName==="DIV"){var te=ee.querySelectorAll("[name]");if(te){var st=MathUtils.toInteger(te[0].value),ot=MathUtils.toInteger(te[1].value),ct=MathUtils.toInteger(te[2].value),ut=te[3].options[te[3].selectedIndex].text;return!st||!ot||!ct||!ut?void 0:MathUtils.dmsToDecimal(st,ot,ct,ut)}}}onAutoCompleteInputClick(){var ee=document.getElementById("GPsearchInputText-"+this._uid);ee&&!ee.disabled&&ee.value.length>2&&this._displaySuggestedLocation()}onAutoCompleteSearchText(ee){var te=ee.target.value;if(te){if(this._currentGeocodingLocation=te,te.length<3){this._clearSuggestedLocation();return}var st=this.options.autocompleteOptions.triggerGeocode,ot=this.options.autocompleteOptions.triggerDelay,ct=this.options.autocompleteOptions.maximumEntries,ut=this.options.autocompleteOptions.prettifyResults,dt=this;this._requestAutoComplete({text:te,onSuccess:function(ft){if(logger$A.log("request from AutoComplete",ft),ft){dt._suggestedLocations=ft.suggestedLocations,dt._locationsToBeDisplayed=[];for(var pt=0;pt<dt._suggestedLocations.length;pt++){var mt=dt._suggestedLocations[pt];mt.position&&mt.position.x===0&&mt.position.y===0&&mt.fullText?dt._getGeocodeCoordinatesFromFullText(mt,pt):dt._locationsToBeDisplayed.push(mt)}ut===!0&&dt._prettifyAutocompleteResults(dt._locationsToBeDisplayed),ct&&(dt._locationsToBeDisplayed=dt._locationsToBeDisplayed.slice(0,ct)),dt._fillAutoCompletedLocationListContainer(dt._locationsToBeDisplayed),dt._triggerHandler&&(clearTimeout(dt._triggerHandler),dt._triggerHandler=null,logger$A.warn("Cancel a geocode request !"))}},onFailure:function(ft){dt._clearSuggestedLocation(),logger$A.log(ft.message),ft.message==="No suggestion matching the search"&&st&&(dt._triggerHandler&&(clearTimeout(dt._triggerHandler),logger$A.warn("Cancel the last geocode request !")),dt._triggerHandler=setTimeout(function(){logger$A.warn("Launch a geocode request !"),dt._requestGeocoding({location:te,onSuccess:function(pt){if(logger$A.log("request from Geocoding",pt),pt){dt._locationsToBeDisplayed=[];for(var mt=pt.locations,yt=0;yt<mt.length;yt++){var vt=mt[yt];vt.fullText=GeocodeUtils.getGeocodedLocationFreeform(vt),vt.position={x:vt.position.lon,y:vt.position.lat},dt._locationsToBeDisplayed.push(vt)}dt._fillAutoCompletedLocationListContainer(mt)}},onFailure:function(pt){logger$A.log(pt.message)}})},ot))}}),this.options.resources.search&&Search$1.suggest(te);var dt=this,ht=this.getMap();ht.once("click",function(){dt._hideSuggestedLocation()}),ht.once("pointerdrag",function(){dt._hideSuggestedLocation()})}}_getGeocodeCoordinatesFromFullText(ee,te){var st=this;Gp.Services.geocode({apiKey:this.options.apiKey,ssl:this.options.ssl,q:GeocodeUtils.getSuggestedLocationFreeform(ee),index:ee.type,onSuccess:function(ot){logger$A.log("request from Geocoding (coordinates null)",ot),ot.locations&&ot.locations.length!==0&&ot.locations[0].position&&st._suggestedLocations&&st._suggestedLocations[te]&&(st._suggestedLocations[te].position={lon:ot.locations[0].position.y,lat:ot.locations[0].position.x},st._locationsToBeDisplayed.unshift(st._suggestedLocations[te]),st._fillAutoCompletedLocationListContainer(st._locationsToBeDisplayed))},onFailure:function(){st._suggestedLocations&&st._suggestedLocations[te]&&st._createAutoCompletedLocationElement(st._suggestedLocations[te],te)}})}onAutoCompletedResultsItemClick(ee){var te=SelectorID.index(ee.target.id);if(logger$A.log(te),logger$A.log(this._locationsToBeDisplayed[te]),!!te){var st=[this._locationsToBeDisplayed[te].position.x,this._locationsToBeDisplayed[te].position.y],ot={service:"SuggestedLocation",location:this._locationsToBeDisplayed[te]},ct=GeocodeUtils.getSuggestedLocationFreeform(this._locationsToBeDisplayed[te]);this._setLabel(ct),this._currentGeocodingLocation=ct;var ut=this.getMap().getView(),dt=ut.getProjection().getCode();dt!=="EPSG:4326"&&(st=transform$1(st,"EPSG:4326",dt)),this._requestGeocoding({index:"address,poi",limit:1,returnTrueGeometry:!0,location:ct,onSuccess:ht=>{if(ht.locations[0].placeAttributes.truegeometry){var ft=JSON.parse(ht.locations[0].placeAttributes.truegeometry);if(ft.type==="Point")this._setPosition(st,15);else{var pt=new GeoJSON$1,mt=pt.readGeometry(ft,{dataProjection:"EPSG:4326",featureProjection:"EPSG:3857"}),yt=mt.getExtent();this._setPositionFromExtent(yt)}}else this._setPosition(st,15);this._displayMarker&&this._setMarker(st,ot);var vt=document.getElementById(this._addUID("GPautocompleteResults"));if(vt){var _t=vt.getElementsByClassName("GPautoCompleteProposal gpf-panel__items gpf-panel__items_searchengine");for(let xt=0;xt<_t.length;xt++){const Mt=_t[xt];Mt.className="GPautoCompleteProposal gpf-panel__items gpf-panel__items_searchengine"}var bt=_t[te];bt.className="GPautoCompleteProposal gpf-panel__items gpf-panel__items_searchengine current",this.dispatchEvent({type:"searchengine:autocomplete:click",location:this._locationsToBeDisplayed[te]})}},onFailure:ht=>{logger$A.warn(ht);var ft=this._getZoom(ot);this._setPosition(st,ft),this._displayMarker&&this._setMarker(st,ot);var pt=document.getElementById(this._addUID("GPautocompleteResults"));if(pt){var mt=pt.getElementsByClassName("GPautoCompleteProposal gpf-panel__items gpf-panel__items_searchengine");for(let vt=0;vt<mt.length;vt++){const _t=mt[vt];_t.className="GPautoCompleteProposal gpf-panel__items gpf-panel__items_searchengine"}var yt=mt[te];yt.className="GPautoCompleteProposal gpf-panel__items gpf-panel__items_searchengine current",this.dispatchEvent({type:"searchengine:autocomplete:click",location:this._locationsToBeDisplayed[te]})}}})}}onSearchedResultsItemClick(ee){var te=SelectorID.index(ee.target.id),st=null;try{var ot=Search$1.getSuggestions()[te];
223if(!ot)throw"No suggestions found !";if(this.options.searchOptions.addToMap){if(!Config.isConfigLoaded())throw"ERROR : contract key configuration has to be loaded to load Geoportal layers.";var ct=ot.service,ut=ot.name,dt=null;switch(ct){case"WMS":dt=new LayerWMS({layer:ut});break;case"WMTS":dt=new LayerWMTS({layer:ut});break;case"WFS":dt=new LayerWFS({layer:ut});break;case"TMS":dt=new LayerMapBox({layer:ut},{declutter:!0});default:break}if(dt){var ht=this.getMap();ht.addLayer(dt)}}}catch(ft){st=ft}this.dispatchEvent({type:"searchengine:search:click",suggest:ot,error:st})}onGeocodingSearchSubmit(ee){var te=ee.target[0].value;if(te){this._currentGeocodingLocation=te;var st=this;this._requestGeocoding({query:te,onSuccess:function(ot){if(logger$A.log("request from Geocoding",ot),ot){var ct=ot.locations;st._fillGeocodedLocationListContainer(ct)}},onFailure:function(ot){st._clearGeocodedLocation(),logger$A.log(ot.message)}})}}onGeocodedResultsItemClick(ee){var te=SelectorID.index(ee.target.id);if(te){var st=[this._geocodedLocations[te].position.lon,this._geocodedLocations[te].position.lat],ot={service:"GeocodedLocation",location:this._geocodedLocations[te]},ct=GeocodeUtils.getGeocodedLocationFreeform(this._geocodedLocations[te]);this._setLabel(ct);var ut=this.getMap().getView(),dt=ut.getProjection().getCode();dt!=="EPSG:4326"&&(st=transform$1(st,"EPSG:4326",dt));var ht=this._getZoom(this.options.zoomTo);this._setPosition(st,ht),this._displayMarker&&this._setMarker(st,ot),this.dispatchEvent({type:"searchengine:geocode:click",location:this._geocodedLocations[te]}),this._clearSuggestedLocation(),this._showSearchEngineAdvancedButton.click()}}onGeocodingAdvancedSearchCodeChange(ee){logger$A.log(ee);var te=ee.target.selectedIndex,st=ee.target.options[te].value;st&&this._setFilter(st)}onGeocodingAdvancedSearchSubmit(ee,te){if(logger$A.log(te),!(!te||te.length===0)){for(var st,ot={},ct=0;ct<te.length;ct++){var ut=te[ct];ut.value&&(ut.key==="section"&&(ut.value=ut.value.toUpperCase()),ot[ut.key]=ut.value)}var dt=document.getElementById("GPsearchInputText-"+this._uid);st=dt.value,this._currentGeocodingCode==="CadastralParcel"&&(st=""),this._currentGeocodingCode==="StreetAddress"&&(st=`${ot.address} ${ot.postcode} ${ot.city}`,ot={}),this._currentGeocodingCode==="PositionOfInterest"&&(st=ot.q,delete ot.q);var ht=this;this._requestGeocoding({query:st,index:this._currentGeocodingCode,filters:ot,onSuccess:function(ft){if(logger$A.log(ft),ft){var pt=ft.locations;ht._fillGeocodedLocationListContainer(pt)}},onFailure:function(ft){ht._clearGeocodedLocation(),logger$A.log(ft.message)}})}}
223_getCadastralParcelRequestParams(ee){var te="",st,ot=ee.department;ot?(st=ot.length,st===2?te=ot:st===1?te="0"+ot:te=ot.substring(0,2)):te="__";var ct=ee.commune;ct?(st=ct.length,st===3?te+=ct:st===2?te+="_"+ct:st===1?te+="__"+ct:te+=ct.substring(0,3)):te+="___";var ut=ee.insee;ut&&ut.length===5&&(te=ut);var dt=ee.absorbedCity;dt?(st=dt.length,st===3?te+=dt:st<3?st===2?te+="_"+dt:st===1&&(te+="__"+dt):te+=dt.substring(0,3)):te+="___";var ht=ee.section;ht?(st=ht.length,st===2?te+=ht:st===1?te+="_"+ht:te+=ht.substring(0,2)):te+="__";var ft=ee.number;return ft?(st=ft.length,st===4?te+=ft:st===3?te+="_"+ft:st===2?te+="__"+ft:st===1?te+="___"+ft:te+=ft.substring(0,4)):te+="___",logger$A.log("location : "+te),te}onCoordinateSearchSystemChange(ee){var te=ee.target.selectedIndex,st=ee.target.options[te].value;this._coordinateSearchLngInput.value="",this._coordinateSearchLatInput.value="";for(var ot=null,ct=0;ct<this._coordinateSearchSystems.length;++ct)if(this._coordinateSearchSystems[ct].code===Number(st)){ot=this._coordinateSearchSystems[ct].type;break}if(!ot){logger$A.log("system not found in projection systems container");return}this._currentCoordinateSearchSystems=this._coordinateSearchSystems[Number(st)],ot!==this._currentCoordinateSearchType&&(this._currentCoordinateSearchType=ot,this._currentCoordinateSearchUnits=this._coordinateSearchUnits[ot][0].code,this._containerUnits.appendChild(this._setCoordinateSearchUnitsSelectElement(this._coordinateSearchUnits[ot])),this._updateCoordinateSearchElements())}onCoordinateSearchUnitsChange(ee){var te=ee.target.selectedIndex,st=ee.target.options[te].value;this._coordinateSearchLngInput.value="",this._coordinateSearchLatInput.value="",this._currentCoordinateSearchUnits=st,this._updateCoordinateSearchElements()}onCoordinateSearchClose(){this._setMarker(),this._coordinateSearchLngInput.value="",this._coordinateSearchLatInput.value=""}_updateCoordinateSearchElements(){var ee=this._setCoordinateSearchLngLabelElement(this._currentCoordinateSearchType),te=this._coordinateSearchLngInput=this._setCoordinateSearchLngInputElement(this._currentCoordinateSearchUnits);this._containerCoordinateLng.appendChild(ee),this._containerCoordinateLng.appendChild(te),ee=this._setCoordinateSearchLatLabelElement(this._currentCoordinateSearchType),te=this._coordinateSearchLatInput=this._setCoordinateSearchLatInputElement(this._currentCoordinateSearchUnits),this._containerCoordinateLat.appendChild(ee),this._containerCoordinateLat.appendChild(te)}_clearResults(){var ee=this.getMap();this._currentGeocodingLocation=null,this._clearSuggestedLocation(),this._clearGeocodedLocation(),this._setMarker(),this._popupOverlay!=null&&(ee.removeOverlay(this._popupOverlay),this._popupOverlay=null)}_clearSuggestedLocation(){if(this._suggestedLocations=[],this._containerResultsLocation)for(;this._containerResultsLocation.firstChild;)this._containerResultsLocation.removeChild(this._containerResultsLocation.firstChild);if(this.options.resources.search&&(Search$1.clear(),this._containerResultsSuggest))for(;this._containerResultsSuggest.firstChild;)this._containerResultsSuggest.removeChild(this._containerResultsSuggest.firstChild)}_prettifyAutocompleteResults(ee){for(var te=ee.length-1;te>=0;te--){var st=ee[te];(st.type==="StreetAddress"&&st.kind==="municipality"&&["Lyon","Marseille","Paris"].includes(st.commune)||st.type==="PositionOfInterest"&&st.poiType[0]==="lieu-dit habité"&&st.poiType[1]==="zone d'habitation")&&ee.splice(te,1),st.type==="PositionOfInterest"&&st.poiType[0]==="administratif"&&(st.poiType[1]==="département"||st.poiType[1]==="région")&&(st.fullText=st.fullText+", "+st.poiType[1])}}_hideSuggestedLocation(){this._autocompleteContainer&&(this._autocompleteContainer.classList.replace("GPelementVisible","GPelementHidden"),this._autocompleteContainer.classList.replace("gpf-visible","gpf-hidden"))}_displaySuggestedLocation(){this._autocompleteContainer&&(this._autocompleteContainer.classList.replace("GPelementHidden","GPelementVisible"),this._autocompleteContainer.classList.replace("gpf-hidden","gpf-visible"))}_clearGeocodedLocation(){if(this._geocodedLocations=[],this._geocodedContainer)for(;this._geocodedContainer.firstChild;)this._geocodedContainer.removeChild(this._geocodedContainer.firstChild)}}Object.assign(SearchEngine.prototype,PanelDOM);Object.assign(SearchEngine.prototype,SearchEngineDOM);Object.assign(SearchEngine.prototype,Widget);window.ol&&window.ol.control&&(window.ol.control.SearchEngine=SearchEngine);LoggerByDefault.getLogger("searchengine");class AbstractSearchService extends BaseObject{constructor(ee){if(ee=ee||{},super(ee),this.constructor==AbstractSearchService)throw new TypeError("AbstractSearchService cannot be instantiate");return this.CLASSNAME="AbstractSearchService",this.initialize(ee),this}initialize(ee){this.AUTOCOMPLETE_EVENT="autocomplete",this.SEARCH_EVENT="search",this.ERROR_EVENT="error",this._autocompleteLocations=[],this._locations=[],ee.autocomplete===!1&&this.set("autocomplete",!1),this.set("index",ee.index||"address,poi"),this.set("limit",typeof ee.limit=="number"?ee.limit:1),this.set("returnTrueGeometry",!!ee.returnTrueGeometry)}getAutocompleteLocations(ee){return ee===void 0?this._autocompleteLocations:this._autocompleteLocations[ee]}getResult(ee){return ee===void 0?this._locations:this._locations[ee]}autocomplete(ee){}search(ee){}getItemTitle(ee){return ee}}window.ol&&(window.ol.service||(window.ol.service={}),window.ol.service.AbstractSearchService=AbstractSearchService);LoggerByDefault.getLogger("searchengine");class DefaultSearchService extends AbstractSearchService{constructor(ee){ee=ee||{},super(ee),this.CLASSNAME="DefaultSearchService",ee.searchTab&&(this._searchTab=ee.searchTab||[])}autocomplete(ee){this._autocompleteLocations=[];const te=new RegExp(ee,"i");
223(this._searchTab||[]).forEach(st=>{te.test(st.toLowerCase())&&this._autocompleteLocations.push(st)}),this.dispatchEvent({type:this.AUTOCOMPLETE_EVENT,result:this._autocompleteLocations})}search(ee){this.dispatchEvent({type:this.SEARCH_EVENT,result:ee})}}window.ol&&(window.ol.service||(window.ol.service={}),window.ol.service.DefaultSearchService=DefaultSearchService);function standardize(ne){return ne.normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase()}const exceptions=[{codeCommune:"25104",nomCommune:"By"},{codeCommune:"28064",nomCommune:"Bû"},{codeCommune:"38289",nomCommune:"Oz"},{codeCommune:"61349",nomCommune:"Ri"},{codeCommune:"65458",nomCommune:"Uz"},{codeCommune:"76548",nomCommune:"Ry"},{codeCommune:"76255",nomCommune:"Eu"},{codeCommune:"95625",nomCommune:"Us"},{codeCommune:"08434",nomCommune:"Sy"},{codeCommune:"31404",nomCommune:"Oô"},{codeCommune:"66218",nomCommune:"Ur"},{codeCommune:"66155",nomCommune:"Py"},{codeCommune:"77082",nomCommune:"Gy"},{codeCommune:"80829",nomCommune:"Y"}];function isException(ne){return ne.length?exceptions.map(te=>standardize(te.nomCommune)).includes(standardize(ne)):!1}function getExceptionParams(ne){return exceptions.find(ee=>standardize(ee.nomCommune)===standardize(ne))}const history$1="fr-icon-history-line",defaultIcon="fr-icon-map-pin-2-line",typeClasses={StreetAddress:"fr-icon-map-pin-2-line",PositionOfInterest:{administratif:"fr-icon-france-line",hydrographie:"fr-icon-ign-mer",transport:{"télécabine, téléphérique transport par câble":"fr-icon-subway-line","gare voyageurs uniquement":"fr-icon-subway-line","voyageurs et fret":"fr-icon-subway-line","station de métro":"fr-icon-subway-line","gare fret uniquement":"fr-icon-subway-line","gare routière":"fr-icon-subway-line","station de tramway":"fr-icon-subway-line","arrêt voyageurs":"fr-icon-subway-line",aérodrome:"fr-icon-plane-line",héliport:"fr-icon-plane-line",altiport:"fr-icon-plane-line",aérogare:"fr-icon-plane-line",port:"fr-icon-ship-2-line","gare maritime":"fr-icon-ship-2-line",parking:"fr-icon-parking-box-line","aire de repos ou de service":"fr-icon-parking-box-line","service dédié aux vélos":"fr-icon-bike-line"}}};LoggerByDefault.getLogger("searchengine");class SearchEngineBase extends ControlExtended{constructor(ee){if(ee=ee||{},super(ee),this.CLASSNAME="SearchEngineBase",this.initialize(ee),this.searchService=ee.searchService,this.searchService.get("autocomplete")!==!1&&this.searchService.on("autocomplete",(function(te){this.onAutocomplete(te)}).bind(this)),this.searchService.on("search",(function(te){this.onSearch(te)}).bind(this)),this._initContainer(ee),this._initEvents(ee),this._historic=!1,this._historicName="GPsearch-"+ee.historic,ee.historic!==!1&&this.searchService.get("autocomplete")!==!1){this._historic=[];try{const te=window.localStorage.getItem(this._historicName);te&&(this._historic=JSON.parse(te))}catch{}}this.showHistoric()}initialize(ee){ee.minChars=ee.minChars?ee.minChars:3,ee.maximumEntries=typeof ee.maximumEntries=="number"?ee.maximumEntries:5,ee.historic=typeof ee.historic=="string"?ee.historic:this.CLASSNAME,ee.title=ee.title?ee.title:"Rechercher",ee.ariaLabel=ee.ariaLabel?ee.ariaLabel:"Rechercher",ee.placeholder=ee.placeholder?ee.placeholder:"",ee.searchService=ee.searchService?ee.searchService:new DefaultSearchService,ee.label=ee.label?ee.label:"",ee.hint=ee.hint?ee.hint:"",ee.search=ee.search===!0,ee.searchButton=ee.searchButton===!0,ee.collapsible=ee.collapsible===!0,this.set("maximumEntries",ee.maximumEntries)}_initEvents(ee){this.searchService.get("autocomplete")!==!1&&(this.input.addEventListener("input",(function(te){te.target.value.length>0?te.target.dataset.erase=!0:delete te.target.dataset.erase,te.target.value||this.showHistoric()}).bind(this)),this.input.addEventListener("keydown",(function(te){/ArrowDown|ArrowUp/.test(te.key)&&te.preventDefault()}).bind(this)),this.input.addEventListener("keyup",(function(te){const st=Array.from(this.autocompleteList.querySelectorAll("li"));let ot=st.findIndex(ct=>ct.classList.contains("active"));switch(ot===-1&&(this._previousValue=te.target.value),te.key){case"ArrowDown":case"ArrowUp":if(te.preventDefault(),st.length===0)return;if(st.forEach(ct=>ct.classList.remove("active")),te.key==="ArrowDown"?(ot++,ot>=st.length&&(ot=-1)):te.key==="ArrowUp"&&(ot--,ot<-1&&(ot=st.length-1)),ot!==-1){const ct=st[ot];ct.classList.add("active"),this.input.value=ct.innerText,this.input.setAttribute("aria-activedescendant",ct.id),this.input.setAttribute("data-active-option",ct.id)}else te.target.value=this._previousValue;this.input.dispatchEvent(new Event("input"));break;default:te.target.value.length&&te.target.value.length>=ee.minChars&&te.target.value!==this._currentValue&&this.autocomplete(te.target.value);break}this._currentValue=te.target.value}).bind(this),!1)),this.container.addEventListener("submit",(function(te){te.preventDefault();const st=Array.from(this.autocompleteList.querySelectorAll("li"));if(te&&te.submitter&&te.submitter.type==="submit"){const dt=te.target.querySelector("input").value;if(dt&&isException(dt)){const ht=getExceptionParams(dt);return this.search({index:"poi",location:ht.nomCommune+"**",filters:{cityCode:ht.codeCommune}}),!1}if(dt.length<ee.minChars)return!1}let ot=st.findIndex(ut=>ut.classList.contains("active")),ct=st[ot];ot<0&&(ct=st[0]),ct&&ct.click()}).bind(this))}_initContainer(ee){const te=this.element=document.createElement("div");te.className="GPwidget gpf-widget",te.id=Helper.getUid("GPsearchEngine-");const st=this.container=document.createElement("form");st.className=ee.search?"GPSearchBar":"",st.id=Helper.getUid("GPsearchInput-Base-"),!ee.target&&ee.collapsible&&(this.button=document.createElement("button"),this.button.id=Helper.getUid("GPshowSearchEnginePicto-"),this.button.className="GPshowOpen GPshowAdvancedToolPicto GPshowSearchEnginePicto gpf-btn fr-icon-search-line fr-btn fr-btn--lg",this.button.setAttribute("aria-pressed","true"),ee.title&&this.button.setAttribute("title",ee.title),ee.collapsible&&this.button.addEventListener("click",(function(){te.classList.toggle("ol-collapsed");const mt=this.button.getAttribute("aria-pressed")==="true";this.button.setAttribute("aria-pressed",!mt),mt?ct.blur():ct.focus()}).bind(this)),te.appendChild(this.button)),te.appendChild(st);const ot=document.createElement("div");ot.className="GPInputGroup",ot.classList.add(ee.search?"fr-input":"fr-input-group"),st.appendChild(ot);const ct=this.input=document.createElement("input");if(ct.type="text",ct.className="GPsearchInputText fr-input",ct.id=Helper.getUid("GPsearchInputText-"),ct.placeholder=ee.placeholder,ct.autocomplete="off",ct.setAttribute("aria-label",ee.ariaLabel),ee.label){const mt=document.createElement("label");if(mt.className="GPLabel fr-label",mt.textContent=ee.label,mt.htmlFor=ct.id,ee.hint){const yt=document.createElement("span");yt.className="GPLabelHint fr-hint-text",yt.textContent=ee.hint,mt.appendChild(yt)}ot.appendChild(mt)}ot.appendChild(ct);const ut=document.createElement("div");if(ut.className="GPMessagesGroup fr-messages-group",ut.ariaLive="polite",ut.id=Helper.getUid("GPMessagesGroup-"),ct.setAttribute("aria-describedby",ut.id),ot.appendChild(ut),this.optionscontainer=document.createElement("div"),this.optionscontainer.className="GPOptionsContainer",ot.appendChild(this.optionscontainer),ee.searchButton){const mt=this.subimtBt=document.createElement("button");mt.className="GPsearchInputSubmit gpf-btn fr-icon-search-line fr-btn",mt.id=Helper.getUid("GPshowSearchEnginePicto-"),mt.type="submit",ee.title&&mt.setAttribute("title",ee.title),st.appendChild(mt)}const dt=this.acContainer=document.createElement("div");dt.id=Helper.getUid("GPautoCompleteContainer-"),dt.className="GPautoCompleteContainer GPelementHidden gpf-hidden",te.appendChild(dt);const ht=this.autocompleteHeader=document.createElement("div");ht.className="GPautoCompleteHeader",dt.appendChild(ht);
223const ft=this.autocompleteList=document.createElement("ul");ft.className="GPautoCompleteList",ft.id=Helper.getUid("GPautoCompleteList-"),ft.setAttribute("role","listbox"),ft.setAttribute("tabindex","-1"),ft.setAttribute("aria-label","Propositions"),dt.appendChild(ft);const pt=this.autocompleteFooter=document.createElement("div");pt.className="GPautoCompleteFooter",dt.appendChild(pt),ct.setAttribute("role","combobox"),ct.setAttribute("aria-controls",dt.id),ct.setAttribute("aria-expanded","false"),ct.setAttribute("aria-autocomplete","list"),ct.setAttribute("aria-haspopup","listbox"),this.searchService.get("autocomplete")!==!1&&(ct.addEventListener("focus",()=>{ct.setAttribute("aria-expanded","true"),dt.classList.add("gpf-visible"),dt.classList.remove("gpf-hidden"),dt.classList.add("GPelementVisible"),dt.classList.remove("GPelementHidden")}),ct.addEventListener("blur",mt=>{mt.relatedTarget&&dt.contains(mt.relatedTarget)?mt.relatedTarget.tagName!=="BUTTON"?ct.focus():mt.relatedTarget.addEventListener("blur",yt=>{var vt;yt.relatedTarget&&dt.contains(yt.relatedTarget)||yt.relatedTarget===ct?ct.focus():(ct.value.length===0&&(delete ct.dataset.erase,(vt=yt.relatedTarget.parentNode.querySelector("button"))==null||vt.focus()),setTimeout(()=>{ct.setAttribute("aria-expanded","false"),dt.classList.remove("gpf-visible"),dt.classList.add("gpf-hidden"),dt.classList.remove("GPelementVisible"),dt.classList.add("GPelementHidden")},50))},{once:!0}):(ct.value.length===0&&delete ct.dataset.erase,setTimeout(()=>{ct.setAttribute("aria-expanded","false"),dt.classList.remove("gpf-visible"),dt.classList.add("gpf-hidden"),dt.classList.remove("GPelementVisible"),dt.classList.add("GPelementHidden")},50))}))}setActive(ee){this.input.disabled=!!ee,this.subimtBt.disabled=!!ee}autocomplete(ee){clearTimeout(this._completeDelay),this._completeDelay=setTimeout((function(){this.searchService.autocomplete(ee)}).bind(this),this.get("triggerDelay")||100)}onAutocomplete(ee){clearTimeout(this._completeDelay),this._updateList(ee.result),this.dispatchEvent(ee)}search(ee){clearTimeout(this._completeDelay),this._completeDelay=setTimeout((function(){this.searchService.search(ee)}).bind(this),this.get("triggerDelay")||100)}onSearch(ee){clearTimeout(this._completeDelay),this.dispatchEvent(ee)}select(ee){clearTimeout(this._completeDelay);const te=this.getItemTitle(ee);this.input.value=te,this.input.dispatchEvent(new Event("input")),this._currentValue=te,this._updateHistoric(ee),this._updateList(),this.dispatchEvent({type:"select",title:this.getItemTitle(ee),item:ee})}showHistoric(){clearTimeout(this._completeDelay),this._historic&&this._updateList(this._historic.length?this._historic:[],"history")}_updateList(ee,te="search"){this.autocompleteList.parentNode.dataset.type=te,ee=(ee||[]).slice(0,this.get("maximumEntries")),this.autocompleteList.querySelectorAll("li").forEach(st=>st.classList.remove("active")),this.input.setAttribute("aria-activedescendant",""),this.input.setAttribute("data-active-option",""),this.autocompleteList.innerHTML="",ee.forEach((st,ot)=>{const ct=document.createElement("li"),ut=this.getIconClass(st,te);if(ct.id=Helper.getUid("GPsearchResult-"),ct.className=`GPsearchResult gpf-panel__item gpf-panel__item-searchengine ${ut} fr-icon--sm`,ct.setAttribute("role","option"),ct.setAttribute("data-idx",ot),ct.innerHTML=ct.title=this.getItemTitle(st),te==="history"){ct.classList.add("GPsearchHistoric");const dt=document.createElement("span");dt.ariaHidden="true",dt.className=`${history$1} fr-icon--sm`,ct.append(dt)}this.autocompleteList.appendChild(ct),ct.addEventListener("click",(function(dt){const ht=Number(dt.target.getAttribute("data-idx"));this.select(ee[ht]),this.search({location:ee[ht]})}).bind(this))})}getIconClass(ee,te){let st=typeClasses[ee.type];if(typeof st=="object"){for(let ot=0;ot<ee.poiType.length;ot++){const ct=ee.poiType[ot];if(Object.hasOwn(st,ct)){st=st[ct];break}}if(typeof st=="object")for(let ot=0;ot<ee.poiType.length;ot++){const ct=ee.poiType[ot];if(Object.hasOwn(st,ct)){st=st[ct];break}}st=typeof st=="object"?defaultIcon:st}return st}getItemTitle(ee){return this.searchService.getItemTitle(ee)}_updateHistoric(ee){if(this._historic){let te=-1;for(let ot=0;ot<this._historic.length;ot++){const ct=this._historic[ot];if(this._isEqual(ct,ee)){te=ot;break}}te!==-1&&this._historic.splice(te,1),this._historic.unshift(ee)>this.get("maximumEntries")&&this._historic.pop(),localStorage.setItem(this._historicName,JSON.stringify(this._historic))}}_isEqual(ee,te){const st=JSON.stringify(ee),ot=JSON.stringify(te);return st===ot}addMessage(ee,te="error"){var ot;let st=this.input.ariaDescribedByElements[0];if(st){const ct=document.createElement("p"),ut=te==="error"?"error":"valid";ct.className=`GPMessage GPMessage--${ut} fr-message fr-message--${ut}`,ct.id=Helper.getUid("GPMessage-"),ct.textContent=ee,(ot=st.parentElement)==null||ot.classList.forEach(dt=>{var ht;/^fr-.*-group$/.test(dt)&&((ht=st.parentElement)==null||ht.classList.add(`${dt}--${ut}`))}),st.replaceChildren(ct)}}removeMessages(){var te;let ee=this.input.ariaDescribedByElements[0];ee&&(ee.replaceChildren(),(te=ee.parentElement)==null||te.classList.forEach(st=>{var ot;/^fr-.*-group--/.test(st)&&((ot=ee.parentElement)==null||ot.classList.remove(st))}))}}window.ol&&window.ol.control&&(window.ol.control.SearchEngineBase=SearchEngineBase);var logger$z=LoggerByDefault.getLogger("searchengine");class IGNSearchService extends AbstractSearchService{constructor(ee){if(ee=ee||{},super(ee),!(this instanceof IGNSearchService))throw new TypeError("ERROR CLASS_CONSTRUCTOR");return this.CLASSNAME="IGNSearchService",this}initialize(ee){super.initialize(ee),this.options={searchOptions:{maximumEntries:5,serviceOptions:{maximumResponses:10},filterLayers:!0},geocodeOptions:{serviceOptions:{}},autocomplete:!0,autocompleteOptions:{serviceOptions:{maximumResponses:10},triggerGeocode:!1,triggerDelay:1e3,prettifyResults:!0}}
223,Helper.mergeParams(this.options,ee),this.options.searchOptions&&(this.options.searchOptions.serviceOptions&&(this.options.searchOptions.serviceOptions.serverUrl&&Search$1.setUrl(this.options.searchOptions.serviceOptions.serverUrl),this.options.searchOptions.serviceOptions.fields&&Search$1.setFields(this.options.searchOptions.serviceOptions.fields),this.options.searchOptions.serviceOptions.index&&Search$1.setIndex(this.options.searchOptions.serviceOptions.index),this.options.searchOptions.serviceOptions.size&&Search$1.setSize(this.options.searchOptions.serviceOptions.size),this.options.searchOptions.serviceOptions.maximumResponses&&Search$1.setMaximumResponses(this.options.searchOptions.serviceOptions.maximumResponses)),this.options.searchOptions.filterServices&&Search$1.setFiltersByService(this.options.searchOptions.filterServices),this.options.searchOptions.filterLayersPriority&&Search$1.setFiltersByLayerPriority(this.options.searchOptions.filterLayersPriority),this.options.searchOptions.filterWMTSPriority&&Search$1.setFilterWMTSPriority(this.options.searchOptions.filterWMTSPriority),this.options.searchOptions.filterTMS===!1&&Search$1.setFilterTMS(this.options.searchOptions.filterTMS),this.options.searchOptions.filterProjections&&Search$1.setFiltersByProjection(this.options.searchOptions.filterProjections)),Search$1.target.addEventListener("suggest",te=>{logger$z.debug(te);let st=te.detail;st=this._filterResultsFromConfigLayers(st),this._fillSearchedSuggestListContainer(st)}),this._currentGeocodingLocation,this._suggestedLocations}autocomplete(ee){ee&&(this._currentGeocodingLocation=ee,this._requestAutoComplete({text:ee,onSuccess:this._onSuccessAutoComplete.bind(this),onFailure:this._onFailureAutoComplete.bind(this)}))}getItemTitle(ee){return ee.fullText}_requestAutoComplete(ee){if(!ee||typeof ee=="object"&&Object.keys(ee).length===0||!ee.text)return;logger$z.log(ee);let te={};Helper.assign(te,this.options.autocompleteOptions.serviceOptions),Helper.assign(te,ee),te.apiKey=te.apiKey||this.options.apiKey,typeof te.ssl!="boolean"&&(typeof this.options.ssl=="boolean"?te.ssl=this.options.ssl:te.ssl=!0),logger$z.log(te),Gp.Services.autoComplete(te)}_onSuccessAutoComplete(ee){let te=this.options.autocompleteOptions.maximumEntries,st=this.options.autocompleteOptions.prettifyResults;if(logger$z.log("request from AutoComplete",ee),ee){this._suggestedLocations=ee.suggestedLocations,this._autocompleteLocations=[];for(let ot=0;ot<this._suggestedLocations.length;ot++){let ct=this._suggestedLocations[ot];ct.position&&ct.position.x===0&&ct.position.y===0&&ct.fullText?this._getGeocodeCoordinatesFromFullText(ct,ot):this._autocompleteLocations.push(ct)}st===!0&&this._prettifyAutocompleteResults(this._autocompleteLocations),te&&(this._autocompleteLocations=this._autocompleteLocations.slice(0,te)),this._triggerHandler&&(clearTimeout(this._triggerHandler),this._triggerHandler=null,logger$z.warn("Cancel a geocode request !")),this.dispatchEvent({type:this.AUTOCOMPLETE_EVENT,result:this._autocompleteLocations})}}_onFailureAutoComplete(ee){let te=this.options.autocompleteOptions.triggerGeocode,st=this.options.autocompleteOptions.triggerDelay,ot=function(ct){if(logger$z.log("request from Geocoding",ct),ct){this._clearResults();let ut=ct.locations;for(let dt=0;dt<ut.length;dt++){let ht=ut[dt];ht.fullText=GeocodeUtils.getGeocodedLocationFreeform(ht),ht.position={x:ht.position.lon,y:ht.position.lat},this._autocompleteLocations.push(ht)}}this.dispatchEvent({type:this.AUTOCOMPLETE_EVENT,result:this._autocompleteLocations})};this._clearResults(),logger$z.log(ee.message),ee.message==="No suggestion matching the search"&&te&&(this._triggerHandler&&(clearTimeout(this._triggerHandler),logger$z.warn("Cancel the last geocode request !")),this._triggerHandler=setTimeout(function(){logger$z.warn("Launch a geocode request !"),this._requestGeocoding({location:value,onSuccess:ot.bind(this),onFailure:function(ct){logger$z.log(ct.message)}})},st))}_prettifyAutocompleteResults(ee){for(let te=ee.length-1;te>=0;te--){const st=ee[te];(st.type==="StreetAddress"&&st.kind==="municipality"&&["Lyon","Marseille","Paris"].includes(st.commune)||st.type==="PositionOfInterest"&&st.poiType[0]==="lieu-dit habité"&&st.poiType[1]==="zone d'habitation")&&ee.splice(te,1),st.type==="PositionOfInterest"&&st.poiType[0]==="administratif"&&(st.poiType[1]==="département"||st.poiType[1]==="région")&&(st.fullText=st.fullText+", "+st.poiType[1])}}_getGeocodeCoordinatesFromFullText(ee,te){var st=this;Gp.Services.geocode({apiKey:this.options.apiKey,ssl:this.options.ssl,q:GeocodeUtils.getSuggestedLocationFreeform(ee),index:ee.type,onSuccess:function(ot){logger$z.log("request from Geocoding (coordinates null)",ot),ot.locations&&ot.locations.length!==0&&ot.locations[0].position&&st._suggestedLocations&&st._suggestedLocations[te]&&(st._suggestedLocations[te].position={lon:ot.locations[0].position.y,lat:ot.locations[0].position.x},st._locationsToBeDisplayed.unshift(st._suggestedLocations[te]),st._fillAutoCompletedLocationListContainer(st._locationsToBeDisplayed))},onFailure:function(){st._suggestedLocations&&st._suggestedLocations[te]&&st._createAutoCompletedLocationElement(st._suggestedLocations[te],te)}})}_clearResults(){this._autocompleteLocations=[],this._locations=[]}search(ee){const te=ee.location,st=ee.filters?ee.filters:{};if(te===void 0)return;let ot,ct=this.get("index"),ut=this.get("returnTrueGeometry");if(typeof te=="string")ot=te;else{if(ct=te.type?te.type:ct,ot=GeocodeUtils.getSuggestedLocationFreeform(te),te.type==="PositionOfInterest"&&te.poiType[0]==="administratif"&&(te.poiType[1]==="département"||te.poiType[1]==="région")&&(ot=ot.substring(0,ot.length-(te.poiType[1].length+2))),ct==="PositionOfInterest"){let dt=te.poiType[0];dt==="administratif"&&te.poiType[1]&&(dt=te.poiType[1]),st.category=dt||null,ut=!1;const ht=["administratif","département","construction","hydrographie"];for(let ft=0;ft<te.poiType.length;ft++){const pt=te.poiType[ft];if(pt!=="lieu-dit habité"&&ht.includes(pt)){ut=!0;break}}}st.postalCode=te.postalCode?te.postalCode:null;for(const dt in st)Object.hasOwn(st,dt)&&st[dt]===null&&delete st[dt]}this._requestGeocoding({index:ct,limit:this.get("limit"),returnTrueGeometry:ut,location:ot,filters:st,onSuccess:this._onSuccessSearch.bind(this),onFailure:this._onFailureSearch.bind(this,te)}),ot.includes("**")?this._currentGeocodingLocation=ot.replace("**",""):this._currentGeocodingLocation=ot}_requestGeocoding(ee){if(!(!ee||typeof ee=="object"&&Object.keys(ee).length===0)){logger$z.log(ee);var te={};Helper.assign(te,this.options.searchOptions.serviceOptions),Helper.assign(te,ee),te.maximumResponses=ee.limit;var st=this.options.searchOptions.serviceOptions.onSuccess!==null&&typeof this.options.searchOptions.serviceOptions.onSuccess=="function";if(st){var ot=function(dt){ee.onSuccess.bind(this,dt),this.options.searchOptions.serviceOptions.onSuccess.bind(this,dt)};te.onSuccess=ot.bind(this)}
223var ct=this.options.searchOptions.serviceOptions.onFailure!==null&&typeof this.options.searchOptions.serviceOptions.onFailure=="function";if(ct){var ut=function(dt){ee.onFailure.bind(this,dt),this.options.searchOptions.serviceOptions.onFailure.bind(this,dt)};te.onFailure=ut.bind(this)}te.apiKey=te.apiKey||this.options.apiKey,typeof te.ssl!="boolean"&&(typeof this.options.ssl=="boolean"?te.ssl=this.options.ssl:te.ssl=!0),logger$z.log(te),Gp.Services.geocode(te)}}getResultFeatures(ee){let te=this.getResult(ee);if(!te)return{featureFilter:null,extent:null};let st=[te.position.lon,te.position.lat],ot,ct;if(te.placeAttributes.truegeometry){let ut=te.placeAttributes.truegeometry;typeof ut=="string"&&(ut=JSON.parse(ut));let ht=new GeoJSON$1().readGeometry(ut,{dataProjection:"EPSG:4326",featureProjection:"EPSG:3857"});if(ut.type!=="Point"&&ut.type!=="MultiPoint"){ct=new Feature({geometry:ht});const ft=new Point$1(st);ft.transform("EPSG:4326","EPSG:3857"),ot=new Feature({geometry:ft})}else ct=null,ot=new Feature({geometry:ht})}else{const ut=new Point$1(st);ut.transform("EPSG:4326","EPSG:3857"),ot=new Feature({geometry:ut})}return ct&&ct.set("infoPopup",this._currentGeocodingLocation),ot.set("infoPopup",this._currentGeocodingLocation),{feature:ot,extent:ct}}_onSuccessSearch(ee){this._locations=ee.locations;const te=this.getResultFeatures(0);this.dispatchEvent({type:this.SEARCH_EVENT,result:te.feature,extent:te.extent,nbResults:ee.locations.length})}_onFailureSearch(ee,te){if(logger$z.warn(te),!ee||!ee.position){this.dispatchEvent({type:this.ERROR_EVENT,location:ee,error:te});return}let st=[ee.position.x,ee.position.y];const ot=new Point$1(st);let ct=new Feature({geometry:ot});ct.set("infoPopup",this._currentGeocodingLocation),this.dispatchEvent({type:this.SEARCH_EVENT,result:ct})}}window.ol&&(window.ol.service||(window.ol.service={}),window.ol.service.IGNSearchService=IGNSearchService);LoggerByDefault.getLogger("searchengine");class SearchEngineGeocodeIGN extends SearchEngineBase{constructor(ee){return ee=ee||{},super(ee),this}initialize(ee){this.CLASSNAME="SearchEngineGeocodeIGN",this.REMOVE_FEATURE_EVENT="remove:feature",ee.serviceOptions=ee.serviceOptions?ee.serviceOptions:{},ee.autocomplete===!1&&(this.set("autocomplete",!1),ee.serviceOptions.autocomplete=!1),ee.serviceOptions.returnTrueGeometry=!!ee.returnTrueGeometry,(!ee.searchService||!(ee.searchService instanceof AbstractSearchService))&&(ee.searchService=new IGNSearchService(ee)),super.initialize(ee)}_initEvents(ee){super._initEvents(ee)}}window.ol&&window.ol.control&&(window.ol.control.SearchEngineGeocodeIGN=SearchEngineGeocodeIGN);const mapPinIcon="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20width='40'%20height='40'%20fill='%23ffffff'%3e%3cpath%20d='M18.364%2017.364L12%2023.7279L5.63604%2017.364C2.12132%2013.8492%202.12132%208.15076%205.63604%204.63604C9.15076%201.12132%2014.8492%201.12132%2018.364%204.63604C21.8787%208.15076%2021.8787%2013.8492%2018.364%2017.364ZM12%2013C13.1046%2013%2014%2012.1046%2014%2011C14%209.89543%2013.1046%209%2012%209C10.8954%209%2010%209.89543%2010%2011C10%2012.1046%2010.8954%2013%2012%2013Z'%3e%3c/path%3e%3c/svg%3e";LoggerByDefault.getLogger("abstractAdvancedSearch");class AbstractAdvancedSearch extends ControlExtended{constructor(ee){ee=ee||{},super(ee),this.CLASSNAME="AbstractAdvancedSearch",this.initialize(ee),this.element=this._initContainer(ee),this._initEvents(ee)}setMap(ee){super.setMap(ee),this.inputs.forEach(te=>{te.setMap&&te.setMap(ee)}),this.element.appendChild(this.btnGroup)}initialize(ee){if(ee.name)this.name=ee.name;else throw new SyntaxError("`name` is mandatory");this.inputs=[]}getName(){return this.name}getContent(){return this.element}_initContainer(ee){let te=document.createElement("form");te.className="GPForm gpf-advanced-search-form",te.id=Helper.getUid("GPAdvancedForm-"+this.CLASSNAME+"-");let st=document.createElement("fieldset");st.className="GPFieldset fr-fieldset gpf-advanced-search-fieldset",st.id=Helper.getUid("GPAdvancedFieldset-"),this.addInputs(ee),this.inputs.forEac
223h(dt=>{dt instanceof ControlExtended?dt.setTarget(te):te.appendChild(dt)});const ot=this.btnGroup=document.createElement("div");ot.className="GPFormFooter";const ct=this.eraseBtn=document.createElement("button");ct.type="reset",ct.className="GPBtn gpf-btn fr-btn fr-btn--tertiary",ct.id=Helper.getUid("GPEraseBtn-"),ct.textContent="Effacer";const ut=this.searchBtn=document.createElement("button");return ut.className="GPBtn gpf-btn fr-btn",ut.id=Helper.getUid("GPSearchBtn-"),ut.type="submit",ut.textContent="Rechercher",ut.setAttribute("form",te.id),ot.appendChild(ct),ot.appendChild(ut),te.appendChild(ot),te}addInputs(){}_initEvents(ee){this.eraseBtn.onclick=this._onErase.bind(this),this.element.onsubmit=this._onSearch.bind(this)}_onErase(ee){ee.preventDefault(),this.getContent().querySelectorAll("input").forEach(te=>{te.value=""})}_onSearch(ee){ee.preventDefault()}}window.ol&&window.ol.control&&(window.ol.control.AbstractAdvancedSearch=AbstractAdvancedSearch);function getStyle(ne,ee,te=0){return new Style$1({image:new Icon({src:mapPinIcon,color:ne,anchor:[.5,1]}),stroke:new Stroke({color:ne,lineDash:[8,8],width:2,lineDashOffset:te}),fill:new Fill({color:ee||"rgba(0, 0, 0, 0.1)"})})}class SearchEngineAdvanced extends ControlExtended{constructor(ee){ee=ee||{},super(ee),this.geolocation=new Geolocation({trackingOptions:{enableHighAccuracy:!0},projection:"EPSG:4326"}),this.layer=new VectorLayer({source:new VectorSource({}),zIndex:1/0,style:[getStyle([255,255,255,1]),getStyle([0,0,145,1],null,8)]}),this.selectInteraction=new Select({layers:[this.layer],style:getStyle([145,0,0,1],[145,0,0,.2])}),this.initialize(ee),this._initContainer(ee),this._initEvents(ee),ee.popupButtons=ee.popupButtons?ee.popupButtons:[],this.selectInteraction.on("select",this._onSelectElement.bind(this)),this.popup=this._createPopup(ee.popupButtons)}initialize(ee){this.CLASSNAME="SearchEngineAdvanced",this._searchForms,this.listenToClick=!1,this.selectGeometry=ee.selectGeometry==="extent"?"extent":"point",ee.advancedSearch&&ee.advancedSearch instanceof Array?this._searchForms=ee.advancedSearch:this._searchForms=[],this._searchForms.forEach(te=>{te.on("search",this.onAdvancedSearchResult.bind(this))})}setMap(ee){this.getMap()&&this.baseSearchEngine&&this.getMap().removeControl(this.baseSearchEngine),super.setMap(ee),this.baseSearchEngine&&this.baseSearchEngine.setMap(ee),this._searchForms.forEach(te=>{te.setMap(ee)}),this.element.appendChild(this.advancedContainer),ee&&(this.layer.setMap(ee),ee.addInteraction(this.selectInteraction),ee.addOverlay(this.popup))}getLayer(){return this.layer}_initEvents(ee){this.geolocation.on("change:position",()=>{const te=this.geolocation.getPosition();this.createMarker(te,"Ma localisation","geolocate",!0),this.geolocation.setTracking(!1)}),this.baseSearchEngine.input.addEventListener("keydown",(function(te){te.key==="Tab"&&!te.shiftKey&&this.locationBtn.checkVisibility()&&(te.preventDefault(),this.locationBtn.focus())}).bind(this)),this.locationBtn.addEventListener("keydown",(function(te){te.key==="Tab"&&(te.preventDefault(),te.shiftKey?this.baseSearchEngine.input.focus():this.advancedBtn.checkVisibility()?this.advancedBtn.focus():this.eraseBtn.focus())}).bind(this)),this.on("search",this.addResultToMap.bind(this)),["mousedown","focus"].map(te=>document.addEventListener(te,this._onDocumentClick.bind(this))),this.advancedBtn.addEventListener("blur",(function(te){te.relatedTarget===this.baseSearchEngine.input&&(this.listenToClick=!1,this.advancedBtn.setAttribute("aria-expanded",!1))}).bind(this)),this.baseSearchEngine.input.addEventListener("blur",(function(te){te.relatedTarget&&te.relatedTarget===this.eraseBtn&&te.target.dispatchEvent(new Event("input"))}).bind(this))}createEvent(ee,te,st){let ot=ee;return ee instanceof Feature?ot={result:ee,extent:null}:ee instanceof Point$1&&(ot={result:new Feature(ee),extent:null}),te&&ot.result.set("infoPopup",te),ot.type="search",ot.center=st!==!1,ot}_initContainer(ee){const te=this.element=document.createElement("div");te.className="GPwidget gpf-widget",te.id=Helper.getUid("GPsearchEngine-Advanced-"),ee.target=this.element,ee.searchButton=!0,ee.search=!0,this.baseSearchEngine=new SearchEngineGeocodeIGN(ee),this.baseSearchEngine.on(["select","search","autocomplete"],ut=>{this.dispatchEvent(ut)}),this.locationBtn=this._getGeolocButton(),this.baseSearchEngine.autocompleteHeader.appendChild(this.locationBtn);const st=this.advancedBtn=document.createElement("button");st.className="GPSearchEngine-advanced-btn fr-btn fr-btn--sm fr-icon-arrow-up-s-line fr-btn--icon-right fr-btn--tertiary-no-outline",st.id=Helper.getUid("GPSearchEngine-advanced-btn-"),st.type="button",st.title="Recherche avancée ",st.innerHTML="Avancée",st.setAttribute("aria-label","Afficher les options avancées"),st.setAttribute("aria-expanded","fal
223se");const ot=this.advancedContainer=document.createElement("div");ot.className="GPAdvancedContainer",ot.id=Helper.getUid("GPsearchEngine-AdvancedContainer-"),ot.setAttribute("aria-labelledby",st.id),ot.appendChild(this._getGeolocButton()),this._searchForms.forEach(ut=>{const dt=document.createElement("section");dt.className="fr-accordion",ot.appendChild(dt);const ht=document.createElement("h3");ht.className="fr-accordion__title",dt.appendChild(ht);const ft=document.createElement("button");ft.type="button",ft.className="fr-accordion__btn",ft.setAttribute("aria-expanded","false"),ft.innerText=ut.getName(),ht.appendChild(ft);const pt=document.createElement("div");pt.className="fr-collapse",pt.id=Helper.getUid("accordion-"),ft.setAttribute("aria-controls",pt.id),dt.appendChild(pt),ut.setTarget(pt),ft.addEventListener("click",()=>{const mt=ft.getAttribute("aria-expanded")==="true";ot.querySelectorAll("section").forEach(yt=>{yt.querySelector(".fr-collapse").classList.remove("fr-collapse--expanded"),yt.querySelector("button").setAttribute("aria-expanded","false"),ot.dataset.open=!mt,mt?yt.classList.remove("fr-hidden"):yt.classList.add("fr-hidden")}),mt||(ft.setAttribute("aria-expanded","true"),pt.classList.add("fr-collapse--expanded"),dt.classList.remove("fr-hidden")),ut.dispatchEvent({type:"expand",expanded:!mt})})}),st.setAttribute("aria-controls",ot.id),st.addEventListener("click",(function(ut){ut.preventDefault();const dt=st.getAttribute("aria-expanded")==="false";if(st.setAttribute("aria-expanded",dt),this.listenToClick=dt,dt){const ht=["a[href]","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])","[tabindex]:not([tabindex='-1'])"].join(","),ft=ot.querySelector(ht);ft&&ft.focus()}}).bind(this)),this._searchForms.length&&this.baseSearchEngine.optionscontainer.appendChild(st);const ct=this.eraseBtn=document.createElement("button");ct.className="GPSearchEngine-erase-btn fr-btn fr-btn--sm fr-icon-close-circle-fill fr-btn--tertiary-no-outline",ct.id=Helper.getUid("GPSearchEngine-erase-btn-"),ct.type="button",ct.title="Effacer la saisie",ct.setAttribute("aria-label","Effacer la saisie"),ct.addEventListener("click",(function(){this.baseSearchEngine.input.value="",delete this.baseSearchEngine.input.dataset.empty,this.baseSearchEngine.input.dispatchEvent(new Event("input")),setTimeout(()=>{this.baseSearchEngine.input.focus()},50)}).bind(this)),this.baseSearchEngine.optionscontainer.appendChild(ct)}_onDocumentClick(ee){if(this.listenToClick===!0){const te=this.advancedContainer===ee.target||this.advancedContainer.contains(ee.target),st=this.advancedBtn===ee.target;te||st||(this.listenToClick=!1,this.advancedBtn.setAttribute("aria-expanded",!1))}}addResultToMap(ee){this._closePopup(ee),this.layer.getSource().clear();let te,st;if(ee.result&&(this.selectGeometry!=="extent"||!ee.extent)&&(this.layer.getSource().addFeature(ee.result),te=ee.result.getGeometry().getExtent(),st=ee.result),ee.extent&&(this.layer.getSource().addFeature(ee.extent),te=ee.extent.getGeometry().getExtent(),this.selectGeometry==="extent"&&(st=ee.extent)),st&&(this.selectInteraction.getFeatures().push(st),this._setPopupInfo(st)),this.getMap()&&ee.center!==!1){let ot=this.getMap().getView();te&&(ot.fit(te),ot.getZoom()>15&&ot.setZoom(15))}}_setPopupInfo(ee,te){var st,ot;if(ee){this.popup.setPosition(void 0);let ct=null;const ut=ee.getGeometry();(ut==null?void 0:ut.getType())==="Point"?(te=ut.getCoordinates(),ct=[0,-20]):!te&&ut&&(te=((ot=(st=ut.getInteriorPoint)==null?void 0:st.call(ut))==null?void 0:ot.getCoordinates())||getCenter(ut.getExtent())),this.popup.setPosition(te),ct&&this.popup.setOffset(ct),this.setPopupContent(ee.get("infoPopup")||""),this.popup.set("feature",ee),this.popup.set("layer",this.layer),this.popup.set("origin",ee.get("origin"))}else this.popup.setPosition(void 0),this.setPopupContent(""),this.popup.unset("feature"),this.popup.unset("layer")}_onSelectElement(ee){let te=ee.mapBrowserEvent.coordinate;this._setPopupInfo(ee.selected.length?ee.selected[0]:null,te)}_createPopup(ee){let te=this._popupDiv=document.createElement("div");te.className="GPSearchPopup";let st=this._popupContent=document.createElement("div");st.className="GPPopupContent";let ot=this._popupBtns=document.createElement("div");return ot.className="GPButtonGroups gpf-btns-group",ot.appendChild(this._addCloseButton()),ot.appendChild(this._addRemoveButton()),ee.forEach(ut=>{ot.appendChild(this._createCustomPopupButton(ut))}),te.appendChild(st),te.appendChild(ot),new Overlay({element:te,positioning:"bottom-center"})}setPopupContent(ee){this._popupContent.innerHTML=ee}_addCloseButton(){let ee=document.createElement("button");return ee.title=ee.ariaLabel="Fermer la pop-up",ee.textContent="Fermer",ee.className="GPButton gpf-btn fr-icon-close-line fr-btn fr-btn--sm gpf-btn--tertiary  fr-btn--tertiary-no-outline",ee.onclick=this._closePopup.bind(this),ee}_closePopup(ee){return this.selectInteraction.getFeatures().clear(),this.popup!==null&&(this.popup.setPosition(void 0),this.dispatchEvent({type:"searchengineadvanced:popup:close",evt:ee})),!1}_addRemoveButton(){let ee=document.createElement("button");return ee.title=ee.ariaLabel="Supprimer le marqueur",ee.textContent="Supprimer",ee.className="GPButton gpf-btn fr-icon-delete-line fr-btn fr-btn--sm gpf-btn--tertiary fr-btn--tertiary-no-outline",ee.onclick=this._removeFeature.bind(this),ee}
223_removeFeature(){const ee=this.popup.get("feature"),te=this.popup.get("layer");te&&ee&&(te.getSource().removeFeature(ee),this.dispatchEvent({type:"searchengineadvanced:feature:remove",feature:ee,layer:te}),this._closePopup())}_createCustomPopupButton(ee){const te=document.createElement("button");return te.title=te.ariaLabel=ee.label,te.className="GPButton fr-btn fr-btn--sm fr-btn--tertiary-no-outline ",ee.className&&(te.className+=ee.className),ee.icon&&te.classList.add(ee.icon),ee.attributes&&Object.entries(ee.attributes).forEach(([st,ot])=>{te.setAttribute(st,ot)}),te.onclick=()=>{const st=this.popup.get("feature");if(st&&typeof ee.onClick=="function"){const ot=st.clone();ot.setStyle(void 0),ee.onClick.call(this,ot)&&(this._closePopup(),this.selectInteraction.getFeatures().clear(),this.layer.getSource().removeFeature(st))}},te}createMarker(ee,te,st,ot){const ct=new Point$1(ee);ct.transform("EPSG:4326",this.getMap().getView().getProjection());const ut=new Feature(ct);st&&ut.set("origin",st);const dt=sanitizeHtml(te),ht=this.createEvent(ut,dt,ot);this.addResultToMap(ht),this.dispatchEvent(ht)}_getGeolocButton(){const ee=document.createElement("button");return ee.innerText="Me géolocaliser",ee.className="GPSearchEngine-locate fr-btn fr-btn--sm fr-icon-crosshair-2-line fr-btn--icon-left fr-btn--tertiary-no-outline",ee.addEventListener("click",()=>{this.geolocation.setTracking(!0);const te=()=>{const st=this.geolocation.getPosition();this.dispatchEvent({type:"searchengineadvanced:geolocation:click",coordinates:st})};this.geolocation.once("change:position",te)}),ee}onAdvancedSearchResult(ee){this.listenToClick=!1,this.advancedBtn.setAttribute("aria-expanded",!1),this.closeAllSections(),ee.result instanceof Array||ee.result instanceof Feature&&this.addResultToMap(ee)}closeAllSections(){this.advancedContainer.dataset.open=!1,this.advancedContainer.querySelectorAll("section").forEach(ee=>{const te=ee.querySelector(".fr-accordion__title > button[aria-expanded]");te.setAttribute("aria-expanded","false"),te.ariaControlsElements[0].classList.remove("fr-collapse--expanded"),ee.classList.remove("fr-hidden")})}}window.ol&&window.ol.control&&(window.ol.control.SearchEngineAdvanced=SearchEngineAdvanced);let logger$y=LoggerByDefault.getLogger("abstractAdvancedSearch");class CoordinateAdvancedSearch extends AbstractAdvancedSearch{constructor(ee){super(ee),this.element.dataset.unitType=this.get("unitType"),this.element.dataset.unit=this.unit.value}initialize(ee){ee.name||(ee.name="Coordonnées"),super.initialize(ee),this._initCoordinateSearchSystems(ee),this._initCoordinateSearchUnits(ee),this._boundOnLonLatBeforeInput=this._onlonLatBeforeInput.bind(this),this._boundOnLonLatInput=this._onlonLatInput.bind(this),this._currentCoordinateSystem=this._coordinateSearchSystems[0],this._currentUnit=this._coordinateSearchUnits[this._currentCoordinateSystem.type],this.set("unitType",this._currentCoordinateSystem.type),this.set("unit",this._currentUnit[0].code),this.CLASSNAME="CoordinateAdvancedSearch"}_initCoordinateSearchSystems(ee){this._coordinateSearchSystems=[];let te=[{label:"Géographique",crs:"EPSG:4326",type:"Geographical"},{label:"Web Mercator",crs:"EPSG:3857",type:"Metric"},{label:"Lambert 93",crs:"EPSG:2154",type:"Metric"}];if(ee&&ee.coordinateSearch&&ee.coordinateSearch.systems){let st=ee.coordinateSearch.systems;for(let ot=0;ot<st.length;ot++){let ct=st[ot];this._setSystem(ct)}}if(this._coordinateSearchSystems.length===0)for(let st=0;st<te.length;st++)this._setSystem(te[st])}_initCoordinateSearchUnits(ee){this._coordinateSearchUnits=[];let te={Geographical:[{code:"DEC",label:"Degrés décimaux",format:MathUtils.coordinateToDecimal},{code:"DMS",label:"Degrés sexagésimaux",format:MathUtils.coordinateToDMS}],Metric:[{code:"M",label:"Mètres",format:MathUtils.coordinateToMeter},{code:"KM",label:"Kilomètres",format:MathUtils.coordinateToKMeter}]};if(ee&&ee.coordinateSearch&&ee.coordinateSearch.units){let st=ee.coordinateSearch.units;for(let ot in te)if(te.hasOwnProperty(ot)){let ct=!1;for(let ut=0;ut<te[ot].length;ut++){let dt=te[ot][ut];for(let ht=0;ht<st.length;ht++){let ft=st[ht];dt.code===ft&&(ct=!0,this._coordinateSearchUnits[ot]||(this._coordinateSearchUnits[ot]=[]),this._coordinateSearchUnits[ot].push(dt))}}ct||(this._coordinateSearchUnits[ot]=te[ot])}}typeof this._coordinateSearchUnits=="object"&&Object.keys(this._coordinateSearchUnits).length===0&&(this._coordinateSearchUnits=te)}_setSystem(ee){if(typeof ee!="object"){logger$y.log("[ERROR] CoordinateAdvancedSearch:_setSystem - system parameter should be an object");return}if(!ee.crs){logger$y.error("crs not defined !");return}if(ee.label||(logger$y.warn("crs label not defined, use crs code by default."),ee.label=ee.crs),ee.type||(logger$y.warn("type srs not defined, use 'Metric' by default."),ee.type="Metric"),CRS.loadByName(ee.crs),!get$3(ee.crs)){logger$y.error("crs '{}' not available into proj4 definitions !",ee.crs);return}for(var te=0;te<this._coordinateSearchSystems.length;te++){var st=this._coordinateSearchSystems[te];ee.crs===st.crs&&logger$y.info("crs '{}
223' already configured",st.crs)}ee.code=this._coordinateSearchSystems.length,this._coordinateSearchSystems.push(ee)}setCoordinates(ee){const te=this.lon.querySelector("input"),st=this.lat.querySelector("input");te&&(te.value=ee[0]),st&&(st.value=ee[1])}getCoordinates(){const ee=this.lon.querySelector("input").value,te=this.lat.querySelector("input").value;if(this.get("unit")==="DMS")return ee.length===6&&te.length===6?[ee,te]:void 0;const st=[parseFloat(ee),parseFloat(te)];if(!(Number.isNaN(st[0])||Number.isNaN(st[1])))return st}_getLabelContainer(ee,te,st,ot=!1){const ct=document.createElement("div");ct.className=te;const ut=this._createLabel(ee,ot);return ct.appendChild(ut),st&&(ut.setAttribute("for",st.id),ct.appendChild(st)),ct}_createLabel(ee,te=!1){const st=document.createElement("label");st.className="fr-label";const ot=te?"*":"";return st.textContent=ee+ot,st}_updateLabel(ee,te,st=!1){const ot=te.querySelector("label"),ct=st?"*":"";ot.innerText=ee+ct}addInputs(){super.addInputs();const ee=document.createElement("div"),te=document.createElement("span");te.className="GPLabelHint fr-hint-text",te.textContent="* Tous les champs sont obligatoires",ee.appendChild(te),this.inputs.push(ee);const st=this.system=document.createElement("select");st.className="fr-select",st.id=st.name=Helper.getUid("CoordinateAdvancedSearch-system-");const ot=this._getLabelContainer("Système de référence","fr-select-group",st,!0);this.inputs.push(ot),this._coordinateSearchSystems.forEach((pt,mt)=>{const yt=document.createElement("option");yt.value=mt,yt.selected=!mt,yt.innerText=pt.label,st.appendChild(yt)});const ct=this.unit=document.createElement("select");ct.className="fr-select",ct.id=ct.name=Helper.getUid("CoordinateAdvancedSearch-unit-");const ut=this._getLabelContainer("Unité","fr-select-group",ct,!0);this.inputs.push(ut);for(let pt=0;pt<this._currentUnit.length;pt++){const mt=this._currentUnit[pt],yt=document.createElement("option");yt.value=mt.code?mt.code:pt,yt.textContent=mt.label||pt,ct.appendChild(yt)}const dt=this.lonLatInputs=document.createElement("div");dt.className="GPLonLatInputs";const ht=this.lat=this.createCoordinateInput("lat");dt.appendChild(ht);const ft=this.lon=this.createCoordinateInput("lon");dt.appendChild(ft),this.inputs.push(dt)}createCoordinateInput(ee){const te=document.createElement("div");te.className="GPCoordinateWrapper";const st=ee==="lon"?"Longitude":"Latitude",ot=this._createLabel(st,!0);te.appendChild(ot);const ct=document.createElement("div");ct.className="GPCoordinateInputs",te.appendChild(ct);const ut=document.createElement("div"),dt=document.createElement("input");dt.className="GPCoordinateInput fr-input",dt.type="text",dt.name=ee,dt.inputMode="numeric",dt.autocomplete="off",dt.required=!0,dt.id=Helper.getUid(`CoordinateAdvancedSearch-${ee}-`),ut.appendChild(dt),ct.appendChild(ut),ot.setAttribute("for",dt.id);const ht=document.createElement("div");return ht.className="display-mask",ht.textContent=`__°__'__"`,ut.appendChild(ht),ct.appendChild(this._createSelectCardinals(ee)),te}_createSelectCardinals(ee){const te={lon:["O","E"],lat:["N","S"]};if(te[ee]){const st=document.createElement("select");return st.className="fr-select",st.id=st.name=Helper.getUid("CoordinateAdvancedSearch-cardinal-"),te[ee].forEach(ot=>{const ct=document.createElement("option");ct.value=ct.textContent=ot,st.appendChild(ct)}),st}else return}_initEvents(ee){super._initEvents(ee),this.system.addEventListener("change",this._updateSystem.bind(this)),this.unit.addEventListener("change",this._updateUnits.bind(this)),this.on("change:unitType",this._updateInputsLabel.bind(this)),this.on("change:unit",this._updateInputs.bind(this))}_updateSystem(ee){const te=this._coordinateSearchSystems[ee.target.value].crs;if(te!==this._currentCoordinateSystem.crs){let st=this.getCoordinates(),ot;st?(st=this._normalizeCoordinatesUnit(st),ot=transform$1(st,this._currentCoordinateSystem.crs,te),ot[0]=ot[0].toFixed(2),ot[1]=ot[1].toFixed(2)):ot=["",""],this._currentCoordinateSystem=this._coordinateSearchSystems[ee.target.value],this._currentUnit=this._coordinateSearchUnits[this._currentCoordinateSystem.type],this.unit.replaceChildren();for(let ct=0;ct<this._currentUnit.length;ct++){const ut=this._currentUnit[ct],dt=document.createElement("option");dt.value=ut.code?ut.code:ct,dt.textContent=ut.label||ct,this.unit.appendChild(dt)}ee.target.closest("form").dataset.unit=this.unit.value,this.set("unit",this.unit.value),ee.target.closest("form").dataset.unitType=this._currentCoordinateSystem.type,this.set("unitType",this._currentCoordinateSystem.type),this.setCoordinates(ot)}}_updateUnits(ee){const te=ee.target.value;this.get("unit")!==te&&(ee.target.closest("form").dataset.unit=te,this.set("unit",te))}_updateInputsLabel(){const te=this.get("unitType")==="Geographical",st={lon:te?"Longitude":"X",lat:te?"Latitude":"Y"};this._updateLabel(st.lon,this.lon,!0),this._updateLabel(st.lat,this.lat,!0),this.lon.querySelector("input").value="",this.lat.querySelector("input").value=""}_updateInputs(){const ee=this.get("unit");let te=1;this.get("unitType")==="Metric"&&(te=ee==="KM"?.001:1e3),ee==="DMS"?this.lonLatInputs.querySelectorAll("input").forEach(st=>{let ot;st.id.includes("-lon-")&&(ot=this._decimalToCompactDMS(st.value,"lon")),st.id.includes("-lat-")&&(ot=this._decimalToCompactDMS(st.value,"lat")),st.value=ot.value;const ct=st.parentElement.querySelector(".display-mask");
223ct&&(ct.textContent=this._format(ot.value));const ut=st.closest(".GPCoordinateInputs").querySelector("select");ut&&(ut.value=ot.cardinal),st.minLength="6",st.maxLength="6",st.addEventListener("beforeinput",this._boundOnLonLatBeforeInput),st.addEventListener("input",this._boundOnLonLatInput)}):(this.lonLatInputs.querySelectorAll("input").forEach(st=>{if(ee==="DEC"){let ot;const ct=st.closest(".GPCoordinateInputs").querySelector("select").value;st.id.includes("-lon-")&&(ot=this._decimalCompactDMSToDecimal(st.value,"lon",ct)),st.id.includes("-lat-")&&(ot=this._decimalCompactDMSToDecimal(st.value,"lat",ct)),st.value=ot}else st.value=st.value===""||isNaN(st.value)?"":parseFloat(st.value)*te;st.removeAttribute("minLength"),st.removeAttribute("maxLength"),st.removeEventListener("beforeinput",this._boundOnLonLatBeforeInput),st.removeEventListener("input",this._boundOnLonLatInput)}),this.getContent().querySelectorAll(".display-mask").forEach(st=>{st.textContent=`__°__'__"`}))}_onlonLatBeforeInput(ee){const te=/^\d+$/;ee.inputType.startsWith("insert")&&ee.inputType!="insertLineBreak"&&!te.test(ee.data)&&ee.preventDefault()}_format(ee){const te=ee.padEnd(6,"_");return`${te.slice(0,2)}°${te.slice(2,4)}'${te.slice(4,6)}"`}_onlonLatInput(ee){console.log("on lon lat inputs");const te=ee.target.value,st=ee.target.parentElement.querySelector(".display-mask");st.textContent=this._format(te)}_normalizeCoordinatesUnit(ee){let te=ee[0],st=ee[1];return this.get("unit")==="DMS"?(te=MathUtils.dmsToDecimal(parseInt(te.substring(0,2)),parseInt(te.substring(2,4)),parseInt(te.substring(4,6)),this.lon.querySelector("select").value),st=MathUtils.dmsToDecimal(parseInt(st.substring(0,2)),parseInt(st.substring(2,4)),parseInt(st.substring(4,6)),this.lat.querySelector("select").value)):this.get("unit")==="KM"?(te=parseFloat(te)*1e3,st=parseFloat(st)*1e3):(te=parseFloat(te),st=parseFloat(st)),[te,st]}_decimalCompactDMSToDecimal(ee,te,st){const ot=String(ee).padStart(6,"0"),ct=parseInt(ot.slice(0,2),10),ut=parseInt(ot.slice(2,4),10),dt=parseInt(ot.slice(4,6),10);let ht=ct+ut/60+dt/3600;return(te==="lat"&&st==="S"||te==="lon"&&st==="O")&&(ht=-ht),ht}_decimalToCompactDMS(ee,te){const st=Math.abs(ee),ot=Math.floor(st),ct=(st-ot)*60,ut=Math.floor(ct),dt=Math.round((ct-ut)*60);let ht;return te==="lon"?ht=ee<0?"O":"E":ht=ee<0?"S":"N",{value:[String(ot).padStart(2,"0"),String(ut).padStart(2,"0"),String(dt).padStart(2,"0")].join(""),cardinal:ht}}_onSearch(ee){super._onSearch(ee);let te=this.getCoordinates(),st=this._normalizeCoordinatesUnit(te);const ot=this.getMap().getView().getProjection().getCode(),ct=this._currentCoordinateSystem.crs;ot!==ct&&(st=transform$1(st,ct,ot));const ut=new Point$1(st),dt=new Feature({geometry:ut});dt.set("infoPopup",this._createInfoPopup(te[0],te[1])),this.dispatchEvent({type:"search",result:dt})}_createInfoPopup(ee,te){let st,ot,ct,ut;if(this.get("unitType")==="Geographical")if(st="Longitude",ot="Latitude",this.get("unit")==="DMS"){const ht=this.lon.querySelector("input").value,ft=this.lon.querySelector("select").value;ct=`${parseInt(ht.substring(0,2))}°${parseInt(ht.substring(2,4))}'${parseInt(ht.substring(4,6))}" ${ft}`;const pt=this.lat.querySelector("input").value,mt=this.lat.querySelector("select").value;ut=`${parseInt(pt.substring(0,2))}°${parseInt(pt.substring(2,4))}'${parseInt(pt.substring(4,6))}" ${mt}`}else ct=`${ee.toFixed(2)} °`,ut=`${te.toFixed(2)} °`;else ot="Y",st="X",ut=`${te.toFixed(2)} ${this.get("unit").toLowerCase()}`,ct=`${ee.toFixed(2)} ${this.get("unit").toLowerCase()}`;return`<b>${ot} : </b>${ut}<br><b>${st} : </b>${ct}`}_onErase(ee){super._onErase(ee),this.getContent().querySelectorAll(".display-mask").forEach(te=>{te.textContent=`__°__'__"`})}}window.ol&&window.ol.control&&(window.ol.control.CoordinateAdvancedSearch=CoordinateAdvancedSearch);LoggerByDefault.getLogger("searchengine");class InseeSearchService extends AbstractSearchService{constructor(ee){ee=ee||{},ee.autocomplete=!1,super(ee),this.CLASSNAME="InseeSearchService",this.ignService=new IGNSearchService({autocomplete:!1,returnTrueGeometry:!0,index:"poi",searchOptions:ee.searchOptions||{}}),this.ignService.on(this.SEARCH_EVENT,this._onSearch.bind(this))}autocomplete(){}search(ee,te){const st=ee.location;this._requestGeoAPI({value:st,arr:!!te}).then(ct=>{if(ct instanceof Array&&ct.length){const ut=ct[0];let dt=ut.nom;ut.nom.length<3&&(dt=`${ut.nom}, ${ut.codesPostaux[0]}`);let ht={category:"administratif",citycode:ut.code};
223const ft={location:dt,filters:ht};this.ignService.search(ft)}else{if(/^(13|69|75)/.test(st)&&!te){this.search(ee,!0);return}this._onSearch({type:this.SEARCH_EVENT})}})}_onSearch(ee){this.dispatchEvent(ee)}async _requestGeoAPI(ee){const te="https://geo.api.gouv.fr/communes",st="json",ot=["nom","code","codesPostaux"],ct=ee.arr;let ut=`${te}?code=${ee.value}&format=${st}&fields=${ot}`;ct&&(ut+="&type=arrondissement-municipal");try{const dt=await fetch(ut,{headers:{"Content-Type":"application/json"}});if(!dt.ok)throw new Error(`Response status: ${dt.status}`);return await dt.json()}catch(dt){console.error(dt.message)}}}window.ol&&(window.ol.service||(window.ol.service={}),window.ol.service.InseeSearchService=InseeSearchService);LoggerByDefault.getLogger("abstractAdvancedSearch");class InseeAdvancedSearch extends AbstractAdvancedSearch{constructor(ee){super(ee),this.inseeInput.on("search",(function(te){te.result?this.dispatchEvent(te):this.inseeInput.addMessage("Ce code INSEE est introuvable.")}).bind(this))}initialize(ee){ee.name||(ee.name="Code INSEE"),super.initialize(ee),this._inputPattern=/^(\d\d|2[A,B,a,b])\d{3}$/,this.CLASSNAME="InseeAdvancedSearch"}addInputs(ee){super.addInputs(ee);let te=this.inseeInput=new SearchEngineGeocodeIGN({label:"Code INSEE",hint:"Format attendu INSEE : 5 chiffres, selon le code officiel géographique (COG)",searchService:new InseeSearchService({autocomplete:!1,searchOptions:{serviceOptions:{fields:["postcode"],serverUrl:ee.searchOptions&&ee.searchOptions.serverUrl||{}}}})});this.inseeInput.input.title="Code INSEE sur 5 caractères",this.inputs.push(te)}_initEvents(ee){super._initEvents(ee),this.inseeInput.input.onkeydown=(function(te){te.key==="Enter"&&this.element.requestSubmit(this.searchBtn)}).bind(this)}_onErase(ee){super._onErase(ee),this.inseeInput.removeMessages()}_onSearch(ee){super._onSearch(ee);const te=this.inseeInput.input.value;this._inputPattern.test(te)?(this.inseeInput.removeMessages(),this.inseeInput.search({location:te,filters:{cityCode:te}})):this.inseeInput.addMessage("Le champs INSEE n'est pas valide (texte de 5 chiffres).")}}window.ol&&window.ol.control&&(window.ol.control.InseeAdvancedSearch=InseeAdvancedSearch);class LocationAdvancedSearch extends AbstractAdvancedSearch{constructor(ee){ee=ee||{},ee.name=ee.name||"Lieux et toponymes",super(ee),this.searchService=new IGNSearchService({index:"poi",limit:10,returnTrueGeometry:!0,searchOptions:{serviceOptions:ee.searchOptions||{}}}),this.element.setAttribute("novalidate","")}_initEvents(ee){super._initEvents(ee),this.on("expand",te=>{te.expanded&&setTimeout(()=>this.searchInput.focus(),300),this.searchResult.innerHTML=""}),setTimeout(()=>{this.searchService.on("search",te=>this.handleSearch(te)),this.searchService.on("error",te=>this.handleError(te))})}handleError(ee){this.handleSearch({nbResults:0})}handleSearch(ee){if(ee.multi||(this.searchResult.innerHTML=""),ee.nbResults===1){const te=ee.attr||this.searchService.getResult(0).placeAttributes;["postcode","citycode","city","category"].forEach(ot=>{te[ot]=te[ot]||[]});const st={infoPopup:"<strong>"+te.toponym+"</strong><br/>"+(te.category?"<em>"+(te.category||[]).join(", ")+"</em><br/>":"")+(te.postcode?"Code postal : "+(te.postcode||[]).join(", ")+"<br/>":""),toponyme:te.toponym,postcode:te.postcode[0],postcodes:te.postcode.join(" - "),insee:te.citycode[0],citycodes:te.citycode.join(" - "),city:te.city[0],citys:te.city.join(" - "),category:te.category[0],categories:te.category.join(" - ")};ee.result&&ee.result.setProperties(st),ee.extent&&ee.extent.setProperties(st),console.log(ee),this.dispatchEvent(ee)}else if(this.element.parentElement.parentElement.scrollTop=0,ee.nbResults===0){this.searchResult.innerHTML="";const te=document.createElement("li");te.className="fr-message--error",te.innerText="Aucun résultat",this.searchInput.value||(te.innerText+=" : précisez votre recherche en renseignant le lieu."),this.searchResult.appendChild(te),te.addEventListener("click",()=>{te.remove()})}else this.handleMultipleResults(ee)}initialize(ee){var ot;super.initialize(ee),this.CLASSNAME="LocationAdvancedSearch";const te=((ot=ee.searchOptions)==null?void 0:ot.geocodeGetCapabilitiesUrl)||"https://data.geopf.fr/geocodage/getCapabilities";fetch(te).then(ct=>ct.json()).then(ct=>{const ut=ct.indexes.find(dt=>dt.id==="poi").fields.find(dt=>dt.name==="category").values;this._typeList=ut,ee.typeList||this.setCategories(ut)}).catch(()=>{console.log("Geocode getCapabilites parsing error (see https://data.geopf.fr/geocodage/getCapabilities) ")}),this._typeList={};const st=["administratif","aérodrome","cimetière","construction ponctuelle","construction surfacique","cours d'eau"];this.set("typeList",ee.typeList||st)}setCategories(ee,te){te=te||this.element.querySelector("select[name='category']"),te.innerHTML="";let st=[];const ot=Array.isArray(ee);if(ot)st=ee;else if(typeof ee=="object")st=Object.keys(ee);else return;st.forEach(ct=>{const ut=document.createElement("option");ut.value=ct.toLowerCase(),ut.innerText=ct,te.appendChild(ut),!ot&&Array.isArray(ee[ct])&&(ut.className="option",ee[ct].forEach(dt=>{const ht=document.createElement("option");
223ht.value=dt.toLowerCase(),ht.className="subOption",ht.innerHTML="&nbsp;&nbsp;"+dt,te.appendChild(ht)}))}),this.filter&&(te.value=this.filter.category,te.value||(te.selectedIndex=0,this.filter.category=te.value))}handleMultipleResults(ee){const te=this.searchService.getResult();te.forEach((ct,ut)=>{const dt=ct.placeAttributes,ht=document.createElement("li");ht.className="search-result-item"+(ut>=5?" hidden":""),this.searchResult.appendChild(ht);const ft=document.createElement("a");ht.appendChild(ft),ft.className="fr-icon-map-pin-2-line",ft.href="#";const pt=dt.postcode&&dt.postcode[0]?`, ${dt.postcode[0]}`:"",mt=(dt.toponym||"")+pt+" ("+(dt.category||[]).join(", ")+") - "+(dt.city||[]).join(", ");ft.title=ft.innerText=mt,ht.addEventListener("click",()=>ft.click()),ft.addEventListener("click",yt=>{yt.preventDefault();const vt=this.searchService.getResultFeatures(ut),_t={type:"search",multi:!0,attr:dt,extent:vt.extent,result:vt.feature,nbResults:1};this.searchService.dispatchEvent(_t)})});const st=document.createElement("li");if(this.searchResult.appendChild(st),te.length>5){const ct=document.createElement("button");ct.className="fr-btn fr-btn--sm fr-btn--tertiary",ct.innerText="Afficher plus de résultats",ct.addEventListener("click",()=>{ct.remove(),this.searchResult.querySelectorAll(".hidden").forEach(ut=>{ut.classList.remove("hidden")})}),st.appendChild(ct)}st.className="search-result-actions";const ot=document.createElement("button");ot.className="fr-btn fr-btn--sm fr-btn--tertiary",ot.innerText="Effacer",ot.addEventListener("click",()=>{this.searchResult.innerHTML="",this.element.parentElement.parentElement.scrollTop=0}),st.appendChild(ot)}_getLabelContainer(ee,te,st,ot=""){const ct=document.createElement("div");ct.className=te,this.inputs.push(ct);const ut=document.createElement("label");ut.className="fr-label";let dt=ee;ot&&(dt=`${ee} <span class="fr-hint-text">${ot}</span>`),ut.innerHTML=dt,ct.appendChild(ut),st&&(ut.setAttribute("for",st.id),ct.appendChild(st));const ht=document.createElement("div");return ht.className="GPMessagesGroup fr-messages-group",ct.appendChild(ht),ct}addInputs(){super.addInputs(),this.searchResult=document.createElement("ul"),this.searchResult.className="search-result",this.inputs.push(this.searchResult);const ee=document.createElement("legend");ee.className="fr-fieldset__legend fr-fieldset__legend--regular",ee.id=Helper.getUid("LocationAdvancedSearch-legend-");const te=document.createElement("span");te.className="fr-hint-text",te.textContent="* Champs obligatoires",ee.appendChild(te),this.inputs.push(ee);const st=document.createElement("select");st.className="fr-select",st.id=Helper.getUid("LocationAdvancedSearch-type-"),st.name="category",this._getLabelContainer("Type","fr-select-group",st),this.setCategories(this.get("typeList"),st),st.addEventListener("change",()=>{this.filter.category=st.value});const ot=this.searchInput=document.createElement("input");ot.className="fr-input",ot.type="text",ot.name="search",ot.setAttribute("minlength","3"),ot.required=!0,ot.id=Helper.getUid("LocationAdvancedSearch-search-"),this._getLabelContainer("Renseigner un lieu *","fr-input-group",ot,null);const ct=document.createElement("input");ct.className="fr-input",ct.type="text",ct.name="postalCode",ct.pattern="^(\\d{5})$",ct.title="Code postal à 5 chiffres",ct.id=Helper.getUid("LocationAdvancedSearch-postal-"),this._getLabelContainer("Code postal","fr-input-group",ct),ct.addEventListener("change",()=>{this.filter.postcode=ct.value});const ut=document.createElement("input");ut.className="fr-input",ut.name="cityCode",ut.type="text",ut.pattern="^(\\d\\d|2[A,B,a,b])\\d{3}$",ut.title="Code INSEE sur 5 caractères",ut.id=Helper.getUid("LocationAdvancedSearch-insee-"),this._getLabelContainer("Code INSEE","fr-input-group",ut,"Format attendu INSEE : 5 chiffres, selon le code officiel géographique (COG)"),ut.addEventListener("change",()=>{this.filter.citycode=ut.value.toUpperCase()}),this.filter={category:st.value,postcode:ct.value.toUpperCase(),citycode:ut.value}}_onErase(ee){super._onErase(ee),this.element.querySelectorAll("select").forEach(te=>{te.selectedIndex=0}),this.element.querySelectorAll("input").forEach(te=>{te.value=""}),this.searchResult.innerHTML="",this._clearMessages(),this.filter={category:this.element.querySelector("select[name='category']").value,postcode:"",citycode:""}}_clearMessages(){this.element.querySelectorAll(".fr-message--error").forEach(ee=>ee.remove())}_showMessage(ee,te){const st=this.element.querySelector("input[name='"+ee+"']").nextSibling;if(te){const ot=document.createElement("p");ot.className="fr-message fr-message--error",ot.textContent=te,st.appendChild(ot)}else st.innerHTML=""}_onSearch(ee,te){super._onSearch(ee);const st=te||this.searchInput.value;if(this._clearMessages(),this.filter.postcode&&!this.element.querySelector("input[name='postalCode']").checkValidity()){this._showMessage("postalCode","Le code postal doit être composé de 5 chiffres.");return}if(this.filter.citycode&&!this.element.querySelector("input[name='cityCode']").checkValidity()){this._showMessage("cityCode","Le code INSEE doit être composé de 5 caractères (chiffres ou 2A, 2B).");return}if(!st&&this.filter.citycode){fetch(`https://geo.api.gouv.fr/communes?code=${this.filter.citycode}&format=json&fields=nom`).then(ot=>ot.json()).then(ot=>{if(ot&&ot.length){const ct=ot[0].nom;ct?this._onSearch(ee,ct):this.handleSearch({nbResults:0})}}).catch(()=>{this.handleSearch({nbResults:0})});return}else if(!st&&this.filter.postcode){fetch(`https://apicarto.ign.fr/api/codes-postaux/communes/${this.filter.postcode}`).then(ot=>ot.json()).then(ot=>{if(ot&&ot.length){const ct=ot[0].nomCommune;ct?this._onSearch(ee,ct):this.handleSearch({nbResults:0})}}).catch(()=>{this._showMessage("postalCode","Aucune commune trouvée pour ce code postal."),this.handleSearch({nbResults:0})});return}else if(st.length<3){this._showMessage("search","Veuillez saisir au moins 3 caractères pour lancer la recherche.");return}this.searchService.search({location:st,filters:this.filter})}}window.ol&&window.ol.control&&(window.ol.control.LocationAdvancedSearch=LocationAdvancedSearch);class ParcelAdvancedSearch extends AbstractAdvancedSearch{constructor(ee){ee=ee||{},ee.name=ee.name||"Parcelles cadastrales",super(ee),this.element.setAttribute("novalidate",""),this.searchService=new IGNSearchService({index:"parcel",limit:1,returnTrueGeometry:!0,searchOptions:{serviceOptions:ee.searchOptions||{}}}),this.searchService.on("search",te=>this.handleSearch(te)),this.searchService.on("error",te=>this.handleError(te))}handleError(ee){console.log("error",ee),this.dispatchEvent(ee)}handleSearch(ee){var st,ot;if(ee.nbResults===0){this._showMessage("numero","Aucune parcelle ne correspond à ce numéro.");return}const te=ee.attr||this.searchService.getResult(0).placeAttributes;delete te.truegeometry,te.infoPopup=`<strong>${te.id}</strong><br/>
224            Parcelle n° ${te.number.replace(/^0{1,4}/g,"")}<br/>
225            Feuille ${te.oldmunicipalitycode}-${te.section}<br/>
226            ${te.city}
227        `,(st=ee.result)==null||st.setProperties(te),(ot=ee.extent)==null||ot.setProperties(te),this.dispatchEvent(ee)}_clearMessages(){this.element.querySelectorAll(".fr-message--error").forEach(ee=>ee.remove())}_showMessage(ee,te,st){const ot=this.element.querySelector("[name='"+ee+"']").parentElement.querySelector(".GPMessagesGroup");if(te){const ct=document.createElement("p");ct.className="fr-message fr-message--"+(st||"error"),ct.textContent=te,ot.innerHTML="",ot.appendChild(ct)}else ot.innerHTML=""}setSection(ee){const te=this.prefixInput.value,st=this.sectionInput.value;this.numberList.innerHTML="",this._showMessage("section","chargement en cours","info"),this._fetchCadastre({code:this.communeId,arrond:this.arrondId,prefix:te,section:st,serviceOptions:ee}).then(ot=>{this._showMessage("section","");const ct=this.sectionInput.value;if(ot&&ot.features&&ot.features[0].properties.section===ct){this.numberInput.focus();const ut=[];
227ot.features.forEach(dt=>ut.push(dt.properties.numero)),ut.sort().forEach(dt=>{const ht=document.createElement("li");ht.value=ht.textContent=dt.replace(/^0{1,4}/g,""),ht.id=Helper.getUid("GPautoCompleteOption-"),ht.addEventListener("click",()=>{this.numberInput.value=ht.value,this._onSearch(),this.numberInput.blur(),this.numberInput.ariaExpanded="false",this.numberInput.setAttribute("aria-activedescendant","")}),this.numberList.appendChild(ht)}),this.filterListNumber()}})}setFeuille(ee){const te=this.feuilles[ee];if(this.sectionInput.innerHTML="",te){const st=document.createElement("option");st.value="",st.textContent="Sélectionner une section",this.sectionInput.appendChild(st);let ot="";this.feuilles[ee].sort().forEach(ct=>{if(ct!==ot){const ut=document.createElement("option");ut.value=ut.textContent=ct,this.sectionInput.appendChild(ut),ot=ct}}),this.sectionInput.removeAttribute("disabled"),this.sectionInput.focus()}else this.sectionInput.setAttribute("disabled","disabled");this.sectionInput.dispatchEvent(new Event("change"))}setCommune({id:ee="",arrond:te="",serviceOptions:st}){if(this.communeId!==ee){const ot=this.prefixInput;this.communeId=ee,this.arrondId=te,ot.innerHTML="",ee?(this._showMessage("commCode","chargement en cours","info"),this._fetchCadastre({code:ee,arrond:te,serviceOptions:st}).then(ct=>{this._showMessage("commCode",""),this.feuilles={},ct.features.forEach(dt=>{this.feuilles[dt.properties.com_abs]||(this.feuilles[dt.properties.com_abs]=[]),this.feuilles[dt.properties.com_abs].push(dt.properties.section)});let ut="";Object.keys(this.feuilles).sort().forEach(dt=>{if(dt!==ut){const ht=document.createElement("option");ht.value=ht.textContent=dt,ot.appendChild(ht),ut=dt}}),this.setFeuille(ot.value)}),ot.removeAttribute("disabled")):(ot.setAttribute("disabled","disabled"),this.setFeuille())}}_initEvents(ee){super._initEvents(ee),this.on("expand",_t=>{_t.expanded&&setTimeout(()=>te.focus(),300)});const te=this.comCodeInput,st=this.autocompleteList,ot=this.prefixInput,ct=this.sectionInput;let ut="";this.communeId="";let dt=-1,ht=-1;const ft=_t=>{var bt,xt,Mt;ut!==te.value&&this.setCommune({serviceOptions:ee}),_t!==!1&&(_t=ut===te.value),_t?(te.setAttribute("aria-expanded","true"),te.setAttribute("aria-activedescendant",((bt=st.children[dt])==null?void 0:bt.id)||"")):(te.setAttribute("aria-expanded","false"),(xt=st.children[dt])==null||xt.classList.remove("active"),te.setAttribute("aria-activedescendant",((Mt=st.children[dt])==null?void 0:Mt.id)||""),dt=-1)};let pt="";te.addEventListener("keydown",_t=>{var xt,Mt,Ot,kt;_t.key==="Tab"&&!_t.shiftKey&&te.value&&pt!==te.value&&ot.getAttribute("disabled")==="disabled"&&(_t.preventDefault(),te.dispatchEvent(new Event("change"))),pt=te.value;const bt=st.children;if(bt.length){let Nt=dt;switch(_t.key){case"Backspace":{Nt=-1,te.value.length>5&&(te.value=te.value.slice(0,6));break}case"Escape":{Nt=-1;break}case"ArrowDown":{Nt++,Nt>=bt.length&&(Nt=-1),_t.preventDefault();break}case"ArrowUp":{Nt--,Nt<-1&&(Nt+=bt.length+1),_t.preventDefault();break}case"Enter":{Nt>=0&&Nt<bt.length&&((xt=bt[dt])==null||xt.classList.remove("active"),bt[Nt].click(),Nt=-1);break}}dt!==Nt&&((Mt=bt[dt])==null||Mt.classList.remove("active"),dt=Nt,(Ot=bt[dt])==null||Ot.classList.add("active"),ft(["ArrowUp","ArrowDown"].includes(_t.key)),(kt=bt[dt])==null||kt.scrollIntoView({block:"nearest"}))}}),te.addEventListener("keyup",_t=>{if(["ArrowUp","ArrowDown","Enter","Escape"].includes(_t.key)){_t.preventDefault();return}ft(_t)}),te.addEventListener("focus",ft),te.addEventListener("blur",_t=>{_t.relatedTarget!==st&&ft(!1)});function mt(_t,bt){const xt=`${_t.arrond||_t.code} ${_t.nom}`;return bt&&_t.codesPostaux?`${xt}, ${_t.codesPostaux.join(", ")} (postal)`:xt}te.addEventListener("change",()=>{if(te.checkValidity())this._clearMessages();else{this._showMessage("commCode","Le code INSEE doit être composé de 5 caractères (chiffres ou 2A, 2B) ou le code postal de 5 chiffres.");return}this._showMessage("commCode","chargement en cours","info"),this._fetchCommuneData(te.value).then(_t=>{this._showMessage("commCode",""),st.innerHTML="",ut="",_t.length===0?(this._showMessage("commCode","Aucune commune ne correspond à ce code INSEE ou code postal."),this.setCommune({serviceOptions:ee})):_t.length===1?(ut=te.value=mt(_t[0]),this.setCommune({id:_t[0].code,arrond:_t[0].arrond,serviceOptions:ee})):(_t.forEach(bt=>
227{const xt=bt.codesPostaux?"code INSEE":"code postal",Mt=document.createElement("li");Mt.className="GPautoCompleteOption",Mt.setAttribute("role","option"),Mt.id=Helper.getUid("GPautoCompleteOption-"),Mt.title=Mt.textContent=mt(bt,xt),Mt.addEventListener("click",()=>{ut=te.value=mt(bt),this.setCommune({id:bt.code,arrond:bt.arrond,serviceOptions:ee}),ft(!1)}),st.appendChild(Mt)}),ut=te.value,this.setCommune({serviceOptions:ee}),te.setAttribute("aria-expanded","true"))})}),ot.addEventListener("change",()=>{this.setFeuille(ot.value)});let yt=null,vt=!1;ct.addEventListener("click",()=>{vt=!0}),ct.addEventListener("change",_t=>{setTimeout(()=>{clearTimeout(yt),yt=setTimeout(()=>{ct.value?(this.numberInput.removeAttribute("disabled"),this.setSection(ee)):this.numberInput.setAttribute("disabled","disabled")},vt?0:500)}),vt=!1}),this.numberInput.addEventListener("focus",()=>{this.numberInput.ariaExpanded="true"}),this.numberInput.addEventListener("blur",_t=>{_t.relatedTarget!==this.numberList&&(this.numberInput.ariaExpanded="false")}),this.numberInput.addEventListener("keydown",_t=>{if(["ArrowUp","ArrowDown","Enter","Escape"].includes(_t.key)){_t.preventDefault();return}}),this.numberInput.addEventListener("keyup",_t=>{var xt,Mt,Ot,kt,Nt,Gt;this.filterListNumber();let bt=ht;switch(_t.key){case"ArrowDown":{for(let Bt=ht+1;Bt<this.numberList.children.length;Bt++)if(this.numberList.children[Bt].style.display!=="none"){bt=Bt;break}bt>=this.numberList.children.length&&(bt=-1),_t.preventDefault();break}case"ArrowUp":{for(let Bt=ht-1;Bt>=-1;Bt--)if(Bt===-1||this.numberList.children[Bt].style.display!=="none"){bt=Bt;break}bt<-1&&(bt+=this.numberList.children.length+1),_t.preventDefault();break}case"Escape":{bt=-1,this.numberInput.ariaExpanded="false";break}case"Enter":{const Bt=((xt=this.numberList.children[bt])==null?void 0:xt.value)||"";Bt&&(this.numberInput.value=Bt,this._onSearch(),this.filterListNumber(),bt=-1,setTimeout(()=>this.numberInput.ariaExpanded="false"));break}default:{bt=-1;break}}ht!==bt&&((Mt=this.numberList.children[ht])==null||Mt.classList.remove("active"),ht=bt,(Ot=this.numberList.children[ht])==null||Ot.classList.add("active"),this.numberInput.setAttribute("aria-activedescendant",((kt=this.numberList.children[ht])==null?void 0:kt.id)||""),this.numberInput.ariaExpanded="true",this.numberInput.setAttribute("aria-activedescendant",((Nt=this.numberList.children[ht])==null?void 0:Nt.id)||""),(Gt=this.numberList.children[ht])==null||Gt.scrollIntoView({block:"nearest"}))})}filterListNumber(){const ee=this.numberInput.value.toUpperCase();if(this.currentFilter===ee)return;this.currentFilter=ee;const te=this.numberList.querySelectorAll("li");let st=!1;te.forEach(ot=>{ot.textContent.toUpperCase().indexOf(ee)>-1?(ot.style.display="",st=!0):ot.style.display="none"}),st?(this._showMessage("numero",""),this.numberInput.ariaExpanded="true"):this._showMessage("numero","Aucun numéro de parcelle ne correspond à cette saisie.")}initialize(ee){super.initialize(ee),this.CLASSNAME="ParcelAdvancedSearch",this.insseSearchService=new InseeSearchService(ee)}_getLabelContainer(ee,te,st,ot=""){const ct=document.createElement("div");ct.className=te,this.inputs.push(ct);const ut=document.createElement("label");ut.className="fr-label";let dt=ee;ot&&(dt=`${ee} <span class="fr-hint-text">${ot}</span>`),ut.innerHTML=dt,ct.appendChild(ut),st&&(ut.setAttribute("for",st.id),ct.appendChild(st));const ht=document.createElement("div");return ht.className="GPMessagesGroup fr-messages-group",ct.appendChild(ht),ct}async _fetchCommuneData(ee){const te="https://geo.api.gouv.fr/communes",st=`${te}?code=${ee}&format=json&fields=nom,code`,ot=`${te}?codePostal=${ee}&format=json&fields=nom,codesPostaux`,ct={headers:{"Content-Type":"application/json"}},ut=[fetch(st,ct),fetch(ot,ct)];return/^75|^6900|^6938|^1300|^1301|^1320|^1321/.test(ee)&&(ut.push(fetch(st+"&type=arrondissement-municipal",ct)),ut.push(fetch(ot+"&type=arrondissement-municipal",ct))),Promise.all(ut).then(dt=>Promise.all(dt.map(ht=>ht.json())).then(ht=>{if(ht[2]&&ht[2].length&&ht[2].forEach(ft=>{switch(ft.arrond=ft.code,ft.code.slice(0,2)){case"75":{ft.code="75056";break}case"69":{ft.code="69123";break}case"13":{ft.code="13055";break}}}
227),ht[3]&&ht[3].length){const ft=ht[3][0],pt=ft.codesPostaux[0];if(ht[1].length){const mt=ht[1].filter(vt=>vt.codesPostaux.includes(pt)>=0);ht[1]=ht[1].filter(vt=>vt.codesPostaux.includes(pt)<0);const yt=mt.find(vt=>vt.code!==ft.code);yt&&(ft.arrond=ft.code,ft.code=yt.code)}}return ht[0].concat(ht[1]).concat(ht[2]||[]).concat(ht[3]||[])})).catch(dt=>(this._showMessage("commCode","Une erreur est survenue lors de la récupération des données de la commune."),[]))}async _fetchCadastre({code:ee,arrond:te,prefix:st,section:ot,serviceOptions:ct}){const ut=ee.slice(0,2),dt=ee.slice(2,5),ht=ct&&ct.searchOptions&&ct.searchOptions.wfsServerUrl||"https://data.geopf.fr/wfs/ows?",ft={service:"WFS",version:"2.0.0",request:"GetFeature",typename:"CADASTRALPARCELS.PARCELLAIRE_EXPRESS:"+(ot?"parcelle":"feuille"),outputFormat:"application/json",srsName:"CRS:84",count:"1000",propertyName:ot?"com_abs,section,numero":"com_abs,section,code_arr",cql_filter:`code_dep='${ut}' and code_com='${dt}'`+(te?`and code_arr='${te.slice(2)}'`:"")+(ot?` and com_abs='${st}' and section='${ot}'`:"")},pt=new URLSearchParams(ft).toString(),mt=ht+pt;this.controller&&this.controller.abort(),this.controller=new AbortController;const yt=await fetch(mt,{headers:{"Content-Type":"application/json"},signal:this.controller.signal}).catch(_t=>null);return this.controller=null,yt?await yt.json():{}}addInputs(){super.addInputs();const ee=document.createElement("legend");ee.className="fr-fieldset__legend fr-fieldset__legend--regular",ee.id=Helper.getUid("ParcelAdvancedSearch-legend-");const te=document.createElement("span");te.className="fr-hint-text",te.textContent="* Champs obligatoires",ee.appendChild(te),this.inputs.push(ee);const st=this.comCodeInput=document.createElement("input");st.className="fr-input",st.type="text",st.name="commCode",st.pattern="^(\\d\\d|2[A,B,a,b,0-9])\\d{3}$",st.title="Code postal ou code INSEE",st.id=Helper.getUid("ParcelAdvancedSearch-comCode-");const ot=this._getLabelContainer("Renseigner un lieu*","fr-input-group",st,"Code postal ou code INSEE"),ct=this.autocompleteList=document.createElement("ul");ct.className="GPautoCompleteList",ct.id=Helper.getUid("GPautoCompleteList-"),ct.setAttribute("role","listbox"),ct.setAttribute("tabindex","-1"),ct.setAttribute("aria-label","Propositions"),ot.insertBefore(ct,st.nextSibling),st.
227setAttribute("role","combobox"),st.setAttribute("aria-controls",ct.id),st.setAttribute("aria-expanded","false"),st.setAttribute("aria-autocomplete","list"),st.setAttribute("aria-haspopup","listbox"),st.setAttribute("autocomplete","off");const ut=this.prefixInput=document.createElement("select");ut.className="fr-select",ut.name="prefix",ut.title="Choisir le préfixe de la parcelle",ut.id=Helper.getUid("ParcelAdvancedSearch-prefix-"),ut.setAttribute("disabled","disabled"),this._getLabelContainer("Préfixe","fr-select-group",ut,"");const dt=this.sectionInput=document.createElement("select");dt.className="fr-select",dt.name="section",dt.title="Choisir la section de la parcelle",dt.id=Helper.getUid("ParcelAdvancedSearch-section-"),dt.setAttribute("disabled","disabled"),this._getLabelContainer("Section*","fr-select-group",dt,"");const ht=this.numberInput=document.createElement("input");ht.className="fr-input",ht.type="text",ht.pattern="\\d{1,4}",ht.maxLength="4",ht.name="numero",ht.title="Numéro de la parcelle",ht.autocomplete="off",ht.ariaExpanded="false",ht.id=Helper.getUid("ParcelAdvancedSearch-number-"),ht.setAttribute("disabled","disabled");const ft=this._getLabelContainer("Numéro*","fr-input-group",ht,""),pt=this.numberList=document.createElement("ul");pt.className="GPautoCompleteList",pt.id=Helper.getUid("GPautoCompleteList-"),pt.setAttribute("role","listbox"),pt.setAttribute("tabindex","-1"),pt.setAttribute("aria-label","Propositions"),ft.insertBefore(pt,ht.nextSibling)}_onSearch(ee){if(ee&&super._onSearch(ee),!this.communeId)return;this._clearMessages();const te=this.prefixInput.value,st=this.sectionInput.value,ot=this.numberInput.value;if(te)if(st)if(this.numberInput.checkValidity()){if(!ot){this._showMessage("numero","Le numéro de parcelle est obligatoire.");return}}else{this._showMessage("numero","Le numéro de parcelle doit être un nombre.");return}else{this._showMessage("section","La section est obligatoire.");return}else return;const ut=(this.arrondId||this.communeId)+"000".slice(te.length)+te+st+"0000".slice(ot.length)+ot;this.searchService.search({location:ut})}_onErase(ee){super._onErase(ee),this.setCommune(),this._clearMessages()}}window.ol&&window.ol.control&&(window.ol.control.ParcelAdvancedSearch=ParcelAdvancedSearch);const stringToHTML$3=ne=>{var ee=function(){if(!window.DOMParser)return!1;var ct=new DOMParser;try{ct.parseFromString("x","text/html")}catch{return!1}return!0};if(ee()){var te=new DOMParser,st=te.parseFromString(ne,"text/html");return st.body}var ot=document.createElement("div");return ot.innerHTML=ne,ot};var MousePositionDOM={_addUID:function(ne){var ee=this._uid?ne+"-"+this._uid:ne;return ee},_createMainContainerElement:function(){var ne=document.createElement("div");return ne.id=this._addUID("GPmousePosition"),ne.className="GPwidget gpf-widget gpf-widget-button gpf-mobile-fullscreen",ne},_createShowMousePositionPictoElement:function(ne){var ee=this,te=document.createElement("button"),st=document.createElement("span");return te.appendChild(st),te.id=this._addUID("GPshowMousePositionPicto"),te.classList.add("GPshowOpen","GPshowAdvancedToolPicto"),te.classList.add("gpf-btn","gpf-btn--tertiary","gpf-btn-icon","gpf-btn-icon-position"),te.classList.add("fr-btn","fr-btn--tertiary"),te.setAttribute("aria-label","Afficher les coordonnées du curseur"),te.setAttribute("tabindex","0"),te.setAttribute("aria-pressed",!1),te.setAttribute("type","button"),te.addEventListener?te.addEventListener("click",function(ot){var ct=ot.target.ariaPressed==="true";ot.target.setAttribute("aria-pressed",!ct),ee.onShowMousePositionClick(ot)}):te.attachEvent&&te.attachEvent("onclick",function(ot){var ct=ot.target.ariaPressed==="true";ot.target.setAttribute("aria-pressed",!ct),ee.onShowMousePositionClick(ot)}),te},_createMousePositionPanelElement:function(){var ne=document.createElement("dialog");return ne.id=this._addUID("GPmousePositionPanel"),ne.className="GPpanel gpf-panel fr-modal",ne},_createMousePositionPanelDivElement:function(){var ne=document.createElement("div");return ne.className="gpf-panel__body fr-modal__body",ne},_createMapCenter:function(){var ne=document.createElement("div");return ne.id="GPmapCenter",ne.className="",ne},_createMousePositionPanelBasicElement:function(ne,ee,te,st){ne=typeof ne>"u"?!0:ne,ee=typeof ee>"u"?!0:ee,te=typeof te>"u"?!1:te;var ot=document.createElement("div");return ot.id=this._addUID("GPmousePositionBasicPanel"),ot.classList.add("fr-mx-1w"),ot.appendChild(this._createMousePositionPanelBasicCoordinateElement(ee,te,st)),ot.appendChild(this._createMousePositionPanelEditToolsElement(te)),ot.appendChild(this._createMousePositionPanelBasicAltitudeElement(ne)),ot},_createCoordinateElement:function(ne,ee){var te=this;if(["Lon","Lat"].indexOf(ne)===-1)return[];var st=[],ot=document.createElement("input");ot.id=this._addUID("GPmousePosition"+ne),ot.title=ee===!0?"Cliquer pour saisir des coordonnées":"",ot.readOnly=!0,ee&&(ot.addEventListener("click",function(){te.onMousePositionEditModeClick(!0)}),ot.addEventListener("change",function(ut){this.classList.remove("error");var dt=te.validateExtentCoordinate(ne,this.value,ut);dt?this.classList.remove("error"):this.classList.add("error")})),st.push(ot);var ct=document.createElement("span");return ct.className="GPmousePositionUnits",st.push(ct),st},_createDMSCoordinateElement:function(ne,ee){if(["Lon","Lat"].indexOf(ne)===-1)return[];var te=this,st=[],ot=document.createElement("input");ot.id=this._addUID("GPmousePosition"+ne+"Degrees"),ot.className="GPSexagesimal",ot.setAttribute("name","degrees"),ot.title=ee===!0?"Cliquer pour saisir des coordonnées":"",ot.readOnly=!0,ot.dataset.min=0,ot.dataset.max=ne==="Lon"?180:90,ee&&(ot.addEventListener("click",function(){te.onMousePositionEditModeClick(!0)}),ot.addEventListener("change",function(){this.classList.remove("error");var vt=te._checkDMSDegrees(ne,this);vt?this.classList.remove("error"):this.classList.add("error")})),st.push(ot);var ct=document.createElement("span");ct.className="GPmousePositionSexagesimalLabel",ct.innerHTML="°",st.push(ct);var ut=document.createElement("input");ut.id=this._addUID("GPmousePosition"+ne+"Minutes"),ut.className="GPSexagesimal",ut.setAttribute("name","minutes"),ut.title=ee===!0?"Cliquer pour saisir des coordonnées":"",ut.readOnly=!0,ut.dataset.min=0,ut.dataset.max=59,ee&&(ut.addEventListener("click",function(){te.onMousePositionEditModeClick(!0)}),ut.addEventListener("change",function(){this.classList.remove("error");var vt=te._checkDMSElement(this);vt?this.classList.remove("error"):this.classList.add("error")})),st.push(ut);var dt=document.createElement("span");dt.className="GPmousePositionSexagesimalLabel",dt.innerHTML="'",st.push(dt);var ht=document.createElement("input");
227ht.id=this._addUID("GPmousePosition"+ne+"Seconds"),ht.className="GPSexagesimalsec",ht.setAttribute("name","seconds"),ht.title=ee===!0?"Cliquer pour saisir des coordonnées":"",ht.readOnly=!0,ht.dataset.min=0,ht.dataset.max=59,ee&&(ht.addEventListener("click",function(){te.onMousePositionEditModeClick(!0)}),ht.addEventListener("change",function(){this.classList.remove("error");var vt=te._checkDMSElement(this,!0);vt?this.classList.remove("error"):this.classList.add("error")})),st.push(ht);var ft=document.createElement("span");ft.className="GPmousePositionSexagesimalLabel",ft.innerHTML="''",st.push(ft);var pt=document.createElement("select");pt.id=this._addUID("GPmousePosition"+ne+"Direction"),pt.className="GPmousePositionDirection",pt.setAttribute("name","direction"),pt.disabled=!0;var mt=document.createElement("option");mt.value=ne==="Lon"?"E":"N",mt.innerHTML=ne==="Lon"?"E":"N",pt.appendChild(mt);var yt=document.createElement("option");return yt.value=ne==="Lon"?"O":"S",yt.innerHTML=ne==="Lon"?"O":"S",pt.appendChild(yt),st.push(pt),st},_createMousePositionPanelBasicCoordinateElement:function(ne,ee,te){var st=document.createElement("div");st.id=this._addUID("GPmousePositionCoordinate"),st.style.display=ne?"block":"none";var ot=document.createElement("div"),ct=document.createElement("span");ct.className="GPmousePositionLabel",ct.id=this._addUID("GPmousePositionLatLabel"),ct.innerHTML="Latitude : ",ot.appendChild(ct);var ut=document.createElement("span");ut.id=this._addUID("GPmousePositionLatCoordinate");var dt;te==="DMS"?dt=this._createDMSCoordinateElement("Lat",ee):dt=this._createCoordinateElement("Lat",ee);for(var ht=0;ht<dt.length;ht++)ut.appendChild(dt[ht]);ot.appendChild(ut),st.appendChild(ot);var ft=document.createElement("div"),pt=document.createElement("span");pt.className="GPmousePositionLabel",pt.id=this._addUID("GPmousePositionLonLabel"),pt.innerHTML="Longitude : ",ft.appendChild(pt);var mt=document.createElement("span");mt.id=this._addUID("GPmousePositionLonCoordinate");var yt;te==="DMS"?yt=this._createDMSCoordinateElement("Lon",ee):yt=this._createCoordinateElement("Lon",ee);for(var vt=0;vt<yt.length;vt++)mt.appendChild(yt[vt]);return ft.appendChild(mt),st.appendChild(ft),st},_createMousePositionPanelBasicAltitudeElement:function(ne){var ee=document.createElement("div");ee.id=this._addUID("GPmousePositionAltitude"),ee.style.display=ne?"block":"none";var te=document.createElement("span");te.className="GPmousePositionLabel",te.innerHTML="Altitude : ",ee.appendChild(te);var st=document.createElement("span");st.className="GPmousePositionCoords",st.id=this._addUID("GPmousePositionAlt"),st.innerHTML="...",ee.appendChild(st);var ot=document.createElement("span");return ot.className="GPmousePositionAltitudeUnits",ot.innerHTML="m",ee.appendChild(ot),ee},_createMousePositionPanelEditToolsElement:function(ne){var ee=this,te=document.createElement("div");te.className="GPmousePositionPanelEditTools",te.id=this._addUID("GPmousePositionPanelEditTools"),ne||(te.style.display="none");var st=document.createElement("span");st.className="GPmousePositionEditTool gpf-btn gpf-btn-icon gpf-btn-icon-mp-edit fr-btn fr-btn--tertiary gpf-btn--tertiary",st.id=this._addUID("GPmousePositionLocate"),st.title=ne===!0?"Cliquer pour saisir des coordonnées":"",ne&&st.addEventListener("click",function(){ee.onMousePositionEditModeLocateClick()}),te.appendChild(st);var ot=document.createElement("span");return ot.className="GPmousePositionEditTool gpf-btn gpf-btn-icon gpf-btn-icon-mp-edit-close fr-btn fr-btn--tertiary gpf-btn--tertiary",ot.id=this._addUID("GPmousePositionCloseEdit"),ot.title="Quitter la saisie des coordonnées",ot.style.display="none",ne&&ot.addEventListener("click",function(){ee.onMousePositionEditModeClick(!1)}),te.appendChild(ot),te},_createShowMousePositionSettingsElement:function(ne){var ee=this,te=document.createElement("button");return te.id=this._addUID("GPshowMousePositionSettings"),te.className="GPelementHidden GPshowAdvancedToolPicto GPshowMoreOptionsImage GPshowMoreOptions GPshowMousePositionSettingsPicto gpf-hidden gpf-btn fr-btn--sm fr-btn--tertiary gpf-btn--tertiary fr-icon-arrow-down-fill",te.title="Réglages",te.
227setAttribute("tabindex","0"),te.setAttribute("aria-pressed",!0),te.addEventListener?te.addEventListener("click",function(st){var ot=st.target.ariaPressed==="true";st.target.setAttribute("aria-pressed",!ot),ee.onShowMousePositionSettingsClick(st)}):te.attachEvent&&te.attachEvent("onclick",function(st){var ot=st.target.ariaPressed==="true";st.target.setAttribute("aria-pressed",!ot),ee.onShowMousePositionSettingsClick(st)}),te},_createMousePositionSettingsElement:function(ne){var ee=document.createElement("div");ee.id=this._addUID("GPmousePositionSettings"),ee.style.display=ne===void 0||ne?"block":"none",ee.classList.add("fr-m-1w");var te=document.createElement("span");return te.className="GPmousePositionSettingsLabel",ee.appendChild(te),ee},_createMousePositionSettingsAccordion:function(ne){var ee=stringToHTML$3(`
228                <section class="fr-accordion">
229                               <div class="fr-accordion__title GPmousePositionSettingsLabel">
230                                   <button type="button" class="fr-accordion__btn" aria-expanded="false" aria-controls="accordion-more-settings-1">
231                                       <span class="GPshowMousePositionAdvancedTools gpf-hidden"></span>Système de référence
232                                   </button>
233                               </div>
234                               <div class="fr-collapse GPelementHidden" id="accordion-more-settings-1">
235                               </div>
236                    </section>
237           `);return ee=ee.firstChild,ne.map(te=>ee.getElementsByClassName("fr-collapse")[0].append(te)),ee.getElementsByTagName("button")[0].addEventListener("click",function(te){var st=te.target.ariaExpanded==="true";te.target.setAttribute("aria-expanded",!st),st?(ee.getElementsByClassName("fr-collapse")[0].classList.remove("fr-collapse--expanded"),ee.getElementsByClassName("fr-collapse")[0].classList.add("GPelementHidden")):(ee.getElementsByClassName("fr-collapse")[0].classList.add("fr-collapse--expanded"),ee.getElementsByClassName("fr-collapse")[0].classList.remove("GPelementHidden"))}),ee},_createMousePositionSettingsSystemsElement:function(ne){var ee=this,te=document.createElement("select");te.id=this._addUID("GPmousePositionProjectionSystem"),te.className="GPselect GPmousePositionSettingsSelect gpf-select fr-select fr-my-1w",te.addEventListener("change",function(ut){ee.onMousePositionProjectionSystemChange(ut)}),te.addEventListener("mouseover",function(ut){ut.target.nodeName!=="OPTION"&&ee.onMousePositionProjectionSystemMouseOver(ut)}),te.title="Type de système";for(var st=0;st<ne.length;st++){var ot=ne[st],ct=document.createElement("option");ct.value=ot.code,ct.text=ot.label||st,te.appendChild(ct)}return te},_createMousePositionSettingsUnitsElement:function(ne){var ee=this,te=document.createElement("select");te.id=this._addUID("GPmousePositionProjectionUnits"),te.className="GPselect GPmousePositionSettingsSelect gpf-select fr-select",te.addEventListener("change",function(ut){ee.onMousePositionProjectionUnitsChange(ut)}),te.title="Unités du système";for(var st=0;st<ne.length;st++){var ot=ne[st],ct=document.createElement("option");ct.value=ot.code?ot.code:st,ct.text=ot.label||st,te.appendChild(ct)}return te},_resetLabelElements:function(ne){var ee=document.getElementById(this._addUID("GPmousePositionLatLabel"));ee.innerHTML=ne==="Geographical"?"Latitude :":"Y :";var te=document.getElementById(this._addUID("GPmousePositionLonLabel"));te.innerHTML=ne==="Geographical"?"Longitude :":"X :"},_resetUnitElements:function(ne){var ee="";(ne==="M"||ne==="KM")&&(ee=ne.toLowerCase());for(var te=document.getElementsByClassName("GPmousePositionUnits"),st=0;st<te.length;st++)te[st].innerHTML=ee},_resetCoordinateElements:function(ne,ee,te){for(var st=document.getElementById(this._addUID("GPmousePositionLatCoordinate"));st.firstChild;)st.removeChild(st.firstChild);var ot;te==="DMS"?ot=this._createDMSCoordinateElement("Lat",ne):ot=this._createCoordinateElement("Lat",ne);for(var ct=0;ct<ot.length;ct++)st.appendChild(ot[ct]);for(var ut=document.getElementById(this._addUID("GPmousePositionLonCoordinate"));ut.firstChild;)ut.removeChild(ut.firstChild);var dt;te==="DMS"?dt=this._createDMSCoordinateElement("Lon",ne):dt=this._createCoordinateElement("Lon",ne);for(var ht=0;ht<dt.length;ht++)ut.appendChild(dt[ht])},_setEditMode:function(ne){var ee=document.getElementById(this._addUID("GPmousePositionLocate"));ee.title=ne?"Aller à la position ...":"Cliquer pour saisir des coordonnées";var te=document.getElementById(this._addUID("GPmousePositionCloseEdit"));if(te.style.display=ne?"inline-block":"none",ne===!0){ee.classList.remove("gpf-btn-icon-mp-edit"),ee.classList.add("gpf-btn-icon-mp-edit-center");var st=document.getElementById(this._addUID("GPmousePositionLat"))||document.getElementById(this._addUID("GPmousePositionLatDegrees"));st.select(),st.focus()}else ee.classList.remove("gpf-btn-icon-mp-edit-center"),ee.classList.add("gpf-btn-icon-mp-edit");for(var ot="div[id^="+this._addUID("GPmousePositionCoordinate")+"]",ct=document.querySelectorAll(
237ot+" input"),ut=0;ut<ct.length;ut++)ct[ut].readOnly=!ne,ne&&ct[ut].classList.remove("error");for(var dt=document.querySelectorAll(ot+" select"),ht=0;ht<dt.length;ht++)dt[ht].disabled=!ne},_checkDMSElement:function(ne,ee){var te=ee!==void 0,st=ne.value;if(te&&(st=st.replace(",",".")),isNaN(st))return!1;var ot=parseFloat(st);if(!te&&(ot|0)!==ot)return!1;var ct=Number(ne.dataset.min),ut=Number(ne.dataset.max);return ot>=ct&&ot<=ut},_checkDMSDegrees:function(ne,ee){if(isNaN(ee.value))return!1;var te=parseFloat(ee.value);if((te|0)!==te)return!1;var st=Number(ee.dataset.min),ot=Number(ee.dataset.max);if(te<st||te>ot)return!1;var ct=document.getElementById(this._addUID("GPmousePosition"+ne+"Minutes")),ut=document.getElementById(this._addUID("GPmousePosition"+ne+"Seconds"));return te>=ot?(ct.dataset.max=0,ut.dataset.max=0):(ct.dataset.max=59,ut.dataset.max=59.9999),!0},GPdisplayCoords:function(ne){if(ne){var ee=document.getElementById(this._addUID("GPmousePositionLonLabel")),te=document.getElementById(this._addUID("GPmousePositionLatLabel"));if(ne.x||ne.y?(te.innerHTML="Y : ",ee.innerHTML="X : "):ne.e||ne.n?(te.innerHTML="E : ",ee.innerHTML="N : "):(te.innerHTML="Latitude : ",ee.innerHTML="Longitude : "),typeof ne.lat=="object"&&typeof ne.lng=="object"){var st={lng:"Lon",lat:"Lat"},ot=["Degrees","Minutes","Seconds"];for(var ct in st)for(var ut=0;ut<ot.length;++ut){var dt="GPmousePosition"+st[ct]+ot[ut],ht=document.getElementById(this._addUID(dt)),ft=ot[ut].charAt(0).toLowerCase();ht.value=ne[ct][ft]}document.getElementById(this._addUID("GPmousePositionLonDirection")).value=ne.lng.direction,document.getElementById(this._addUID("GPmousePositionLatDirection")).value=ne.lat.direction}else{var pt=document.getElementById(this._addUID("GPmousePositionLat")),mt=document.getElementById(this._addUID("GPmousePositionLon"));pt.value=ne.y||ne.lat||ne.e||"0",mt.value=ne.x||ne.lng||ne.lon||ne.n||"0",pt.title="Latitude",mt.title="Longitude",pt.type="text",mt.type="text";for(var yt=ne.unit===void 0?"":ne.unit,vt=document.getElementsByClassName("GPmousePositionUnits"),_t=0;_t<vt.length;++_t)vt[_t].innerHTML=yt}}},GPdisplayElevation:function(ne,ee,te,st){var ot=this,ct;ee||(ee=500),clearTimeout(ct),document.getElementById(this._addUID("GPmousePositionAlt")).innerHTML="...",te==null&&(te=-99999),st==null&&(st=99980);var ut=te+st,dt=te-st;ne&&document.getElementById(this._addUID("GPmousePositionAltitude"))&&(ct=setTimeout(function(){ot.onRequestAltitude(ne,function(ht){dt<ht&&ht<ut?ot.GPresetElevation():document.getElementById(ot._addUID("GPmousePositionAlt")).innerHTML=ht})},ee))},GPresetElevation:function(){document.getElementById(this._addUID("GPmousePositionAltitude"))&&(document.getElementById(this._addUID("GPmousePositionAlt")).innerHTML="---")}},logger$x=LoggerByDefault.getLogger("GeoportalMousePosition");class MousePosition extends ControlExtended{constructor(ee){if(ee=ee||{},super(ee),!(this instanceof MousePosition))throw new TypeError("ERROR CLASS_CONSTRUCTOR");return this.CLASSNAME="MousePosition",this._initialize(ee),this.container=this._initContainer(this.options),this.element?this.element.appendChild(this.container):this.element=this.container,this}setMap(ee){var te=this;if(ee){var st=this._createMapCenter();if(ee.getViewport().appendChild(st),!this.collapsed&&!this._isDesktop&&(st.className="GPmapCenterVisible"),this.draggable&&Draggable.dragElement(this._panelMousePositionContainer,this._panelHeaderContainer,ee.getTargetElement()),this.collapsed||(this._isDesktop?this.listenerKey=ee.on("pointermove",ut=>{this.onMouseMove(ut)}):this.listenerKey=ee.on("moveend",ut=>this.onMapMove(ut)),this._showMousePositionButton.setAttribute("aria-pressed",!0)),this.options.editCoordinates){var ot=document.createElement("img");ot.id=this._addUID("GPmousePositionMarker"),ot.src=this._markerUrl,ot.title="Cliquer pour supprimer",ot.addEventListener("click",function(){te._markerOverlay.setPosition(void 0)}),this._markerOverlay=new Overlay({offset:this._markerOffset,element:ot,stopEvent:!1}),ee.addOverlay(this._markerOverlay)}}else unByKey(this.listenerKey);if(super.setMap(ee),ee!==null&&(this.options.position&&this.setPosition(this.options.position),this.options.gutter===!1&&this.getContainer().classList.add("gpf-button-no-gutter"),!this.collapsed)){var ct=document.getElementById("GPshowMousePosition-"+this._uid);ct.checked="checked",this._setElevationPanel(this.options.displayAltitude),this._setCoordinatesPanel(this.options.displayCoordinates),this.options.displayCoordinates||this._setSettingsPanel(!1)}}
237addSystem(ee){if(typeof ee!="object"){logger$x.log("[ERROR] MousePosition:addSystem - system parameter should be an object");return}if(!ee.crs){logger$x.error("crs not defined !");return}if(ee.label||(logger$x.warn("crs label not defined, use crs code by default."),ee.label=ee.crs),ee.type||(logger$x.warn("type srs not defined, use 'Metric' by default."),ee.type="Metric"),CRS.loadByName(ee.crs),!get$3(ee.crs)){logger$x.error("crs '{}' not available into proj4 definitions !",ee.crs);return}for(var te=0;te<this._projectionSystems.length;te++){var st=this._projectionSystems[te];ee.crs===st.crs&&logger$x.info("crs '{}' already configured",st.crs)}ee.code=this._projectionSystems.length,this._projectionSystems.push(ee);var ot=document.getElementById("GPmousePositionProjectionSystem-"+this._uid);if(ot){var ct=document.createElement("option");ct.value=ee.code,ct.text=ee.label,ot.appendChild(ct)}}addSystems(ee){if(ee){if(!Array.isArray(ee)){logger$x.log("[ERROR] MousePosition:addSystems - systems parameter should be an array");return}for(var te=0;te<ee.length;te++)this.addSystem(ee[te])}}removeSystem(ee){if(!ee||typeof ee!="string"){logger$x.log("[ERROR] MousePosition:removeSystem - systemCode parameter should be a string");return}for(var te=document.getElementById("GPmousePositionProjectionSystem-"+this._uid),st=null,ot=0;ot<this._projectionSystems.length;ot++){var ct=this._projectionSystems[ot];if(ee===ct.crs){st=ct.code,this._projectionSystems.splice(ot,1);break}}if(st==null){logger$x.log("[WARN] MousePosition:removeSystem - system not found");return}for(var ut=[],dt=0;dt<this._projectionSystems.length;dt++)ut[Number(this._projectionSystems[dt].code)]=dt,this._projectionSystems[dt].code=dt;for(var ht=null,ft=0;ft<te.childNodes.length;ft++){if(st===te.childNodes[dt].value){ht=ft;continue}te.childNodes[dt].value=ut[Number(te.childNodes[dt].value)]}ht!=null&&te.removeChild(te.childNodes[ht]),this._currentProjectionSystems.code===Number(st)&&(te.childNodes[0].setAttribute("selected","selected"),this._setCurrentSystem(te.childNodes[0].value))}setUnits(ee){!ee||!Array.isArray(ee)||(this.options.units=ee,this._projectionUnits=[],this._initProjectionUnits(),this._currentProjectionType&&this._setTypeUnitsPanel(this._currentProjectionType))}setAltitudeOptions(ee){if(!(!ee||typeof ee!="object")&&(this.options.altitude.triggerDelay=ee.triggerDelay,this.options.altitude.responseDelay=ee.responseDelay,ee.serviceOptions))for(var te in ee.serviceOptions)ee.serviceOptions.hasOwnProperty(te)&&(this.options.altitude.serviceOptions[te]=ee.serviceOptions[te])}displayAltitude(ee){ee!==void 0&&(this.options.displayAltitude=ee,this._setElevationPanel(ee))}displayCoordinates(ee){ee!==void 0&&(this.options.displayCoordinates=ee,this._setCoordinatesPanel(ee),this._setSettingsPanel(ee))}setCollapsed(ee){if(ee===void 0){logger$x.log("[ERROR] MousePosition:setCollapsed - missing collapsed parameter");return}ee&&this.collapsed||!ee&&!this.collapsed||(this._isDesktop||(document.getElementById("GPmapCenter").className=ee?"":"GPmapCenterVisible"),this.onShowMousePositionClick(),this._showMousePositionContainer.checked=!ee)}getContainer(){return this.container}_initialize(ee){if(ee=ee||{},this.options=ee,this.options.collapsed=ee.collapsed!==void 0?ee.collapsed:!0,this.collapsed=this.options.collapsed,this.options.draggable=ee.draggable!==void 0?ee.draggable:!1,this.draggable=this.options.draggable,this._markerOverlay=null,this._markerUrl=null,this._markerOffset=[0,0],this._hideMarker=!1,this._initMarker(ee.positionMarker),this.options.units=ee.units||[],this.options.displayAltitude=ee.displayAltitude!==void 0?ee.displayAltitude:!0,this.options.displayCoordinates=ee.displayCoordinates!==void 0?ee.displayCoordinates:!0,this.options.displayCoordinates?this.options.editCoordinates=ee.editCoordinates!==void 0?ee.editCoordinates:!1:this.options.editCoordinates=!1,this.editing=!1,this.options.systems=ee.systems||[],ee.altitude){var te=ee.altitude;this.options.altitude={triggerDelay:te.triggerDelay!==void 0?te.triggerDelay:200,responseDelay:te.responseDelay!==void 0?te.responseDelay:500,serviceOptions:te.serviceOptions||{},noDataValue:te.noDataValue!==void 0?te.noDataValue:-99999,noDataValueTolerance:te.noDataValueTolerance!==void 0?te.noDataValueTolerance:9e4}}else this.options.altitude={triggerDelay:200,responseDelay:500,serviceOptions:{}};this._uid=this.options.id||SelectorID.generate(),this._projectionSystems=[],this._initProjectionSystems(),this._projectionUnits={},this._initProjectionUnits(),this._isDesktop=Helper.detectSupport(),this.options.altitude.triggerDelay<100&&(this.options.altitude.triggerDelay=100),this._timer=this.options.altitude.triggerDelay,this._currentProjectionSystems=this._projectionSystems[0],this._currentProjectionType=this._projectionSystems[0].type,this._currentProjectionUnits=this._projectionUnits[this._currentProjectionType][0].code,this._projectionUnitsContainer=null,this._showMousePositionContainer=null,this._panelMousePositionContainer=null,this._panelHeaderMousePositionContainer=null,!this.options.displayAltitude&&!this.options.displayCoordinates&&(this.options.displayCoordinates=!0),this.listenerKey=null}_initMarker(ee){if(this.options.editCoordinates){if(!ee){this._markerUrl=Marker.lightOrange,this._markerOffset=Marker.defaultOffset;return}this._hideMarker=ee.hide!==void 0?ee.hide:!1,ee.offset?Array.isArray(ee.offset)&&ee.offset.length===2?this._markerOffset=ee.offset:(logger$x.log("positionMarker.offset should be an array. e.g. : [0,0]"),this._markerOffset=Marker.defaultOffset):this._markerOffset=Marker.defaultOffset;var te=ee.url;te?te.match(/^[a-zA-Z]+$/)?this._markerUrl=Marker[te]!==void 0?Marker[te]:Marker.lightOrange:this._markerUrl=te:this._markerUrl=Marker.lightOrange}}_initProjectionSystems(){for(var ee=[{label:"Géographique",crs:get$3("EPSG:4326").getCode(),type:"Geographical"},{label:"Web Mercator",crs:get$3("EPSG:3857").getCode(),type:"Metric"},{label:"Lambert 93",crs:get$3("EPSG:2154").getCode(),type:"Metric",geoBBox:{left:-9.86,bottom:41.15,right:10.38,top:51.56}},{label:"Lambert II étendu",crs:get$3("EPSG:27572").getCode(),type:"Metric",geoBBox:{left:-4.87,bottom:42.33,right:8.23,top:51.14}}],te=this.options.systems,st=0;st<te.length;st++){var ot=te[st];this.addSystem(ot)}if(this._projectionSystems.length===0)for(var ct=0;ct<ee.length;ct++)this.addSystem(ee[ct])}_initProjectionUnits(){var ee={Geographical:[{code:"DEC",label:"Degrés décimaux",format:MathUtils.coordinateToDecimal},{code:"DMS",label:"Degrés sexagésimaux",format:MathUtils.coordinateToDMS},{code:"RAD",label:"Radians",format:MathUtils.coordinateToRad},{code:"GON",label:"Grades",format:MathUtils.coordinateToGon}],Metric:[{code:"M",label:"Mètres",format:MathUtils.coordinateToMeter},{code:"KM",label:"Kilomètres",format:MathUtils.coordinateToKMeter}]},te=this.options.units;
237for(var st in ee)if(ee.hasOwnProperty(st)){for(var ot=!1,ct=0;ct<ee[st].length;ct++)for(var ut=ee[st][ct],dt=0;dt<te.length;dt++){var ht=te[dt];ut.code===ht&&(ot=!0,this._projectionUnits[st]||(this._projectionUnits[st]=[]),this._projectionUnits[st].push(ut))}ot||(this._projectionUnits[st]=ee[st])}typeof this._projectionUnits=="object"&&Object.keys(this._projectionUnits).length===0&&(this._projectionUnits=ee)}_getCurrentProjectionInformation(){for(var ee=[this._currentProjectionSystems.label,"en"],te=this._projectionUnits[this._currentProjectionType],st=0;st<te.length;++st)if(te[st].code===this._currentProjectionUnits){ee.push(te[st].label);break}return ee.join(" ")}_initContainer(){var ee=this._createMainContainerElement(),te=this._showMousePositionButton=this._createShowMousePositionPictoElement();ee.appendChild(te);var st=this._panelMousePositionContainer=this._createMousePositionPanelElement(),ot=this._panelHeaderContainer=this._createPanelHeaderElement({icon:"ign-mouseposition",title:"Coordonnées",btnClassForClose:"GPshowMousePositionPicto"});st.appendChild(ot);var ct=this._createMousePositionPanelDivElement();st.appendChild(ct);var ut=this._createMousePositionPanelBasicElement(this.options.displayAltitude,this.options.displayCoordinates,this.options.editCoordinates,this._currentProjectionUnits);ct.appendChild(ut);var dt=this._createShowMousePositionSettingsElement(this.options.displayCoordinates);ct.appendChild(dt);var ht=this._createMousePositionSettingsElement(),ft=this._projectionSystemsContainer=this._createMousePositionSettingsSystemsElement(this._projectionSystems),pt=this._projectionUnitsContainer=this._createMousePositionSettingsUnitsElement(this._projectionUnits[this._currentProjectionType]),mt=this._createMousePositionSettingsAccordion([ft,pt]);return ht.appendChild(mt),ct.appendChild(ht),ee.appendChild(st),ee}_setElevationPanel(ee){var te=null;ee?(te=document.getElementById("GPmousePositionAltitude-"+this._uid),te.style.display=""):(te=document.getElementById("GPmousePositionAltitude-"+this._uid),te.style.display="none")}_setCoordinatesPanel(ee){var te=document.getElementById("GPmousePositionCoordinate-"+this._uid);ee?te.style.display="":te.style.display="none"}_setSettingsPanel(ee){var te=document.getElementById("GPshowMousePositionSettingsPicto-"+this._uid),st=document.getElementById("GPmousePositionSettings-"+this._uid);ee?(te.style.display="",st.style.display=""):(te.style.display="none",st.style.display="none")}_setTypeUnitsPanel(ee){for(var te=this._projectionUnitsContainer;te.firstChild;)te.removeChild(te.firstChild);for(var st=this._projectionUnits[ee],ot=0;ot<st.length;ot++){var ct=st[ot],ut=document.createElement("option");ut.value=ct.code?ct.code:ot,ut.text=ct.label||ot,te.appendChild(ut)}var dt=this._projectionUnits[ee][0].code;(this._currentProjectionUnits==="DMS"||dt==="DMS")&&(this._resetCoordinateElements(this.options.editCoordinates,ee,dt),this._setEditMode(this.editing)),this._currentProjectionType=ee,this._resetLabelElements(ee),this._resetUnitElements(dt),this._currentProjectionUnits=dt}_setCoordinate(ee,te){var st={},ot=this._currentProjectionSystems.crs;if(!ot){logger$x.log("ERROR : system crs not found");return}ee=transform$1(ee,te,ot);for(var ct=this._currentProjectionSystems.type,ut=null,dt=this._projectionUnits[ct],ht=0;ht<dt.length;ht++)if(dt[ht].code===this._currentProjectionUnits){ut=dt[ht].format;break}if(!ut||typeof ut!="function"){logger$x.log("WARNING : coordinates format function not found");return}else st=ut(ee);!st||Object.keys(st).length===0||this.GPdisplayCoords(st)}_setElevation(ee){var te=this.options.altitude.responseDelay,st=this.options.altitude.noDataValue,ot=this.options.altitude.noDataValueTolerance;this.GPdisplayElevation(ee,te,st,ot)}onMoveStopped(ee,te){var st=transform$1(ee,te,"EPSG:4326");this._setElevation(st)}onMouseMove(ee){var te=this;const st=ee.originalEvent||ee;if(!this._panelMousePositionContainer.contains(st.target)){var ot=ee.coordinate;if(!(!ee.map||!ee.map.getView())){var ct=ee.map.getView().getProjection();this._setCoordinate(ot,ct),clearTimeout(this._timer),this._timer=setTimeout(function(){te.onMoveStopped(ot,ct)},this.options.altitude.triggerDelay)}}}onMapMove(){var ee=this,te=this.getMap();if(!(!te||!te.getView())){var st=te.getView(),ot=st.getCenter(),ct=st.getProjection();this._setCoordinate(ot,ct),clearTimeout(this._timer),this._timer=setTimeout(function(){ee.onMoveStopped(ot,ct)},this.options.altitude.triggerDelay)}}onRequestAltitude(ee,te){if(!(!ee||Object.keys(ee).length===0)&&this.options.displayAltitude){var st=this.options.altitude.serviceOptions||{},ot=st.serverUrl,ct=st.protocol||"XHR",ut=st.timeOut||0;ct==="JSONP"&&ut===0&&(ut=15e3);var dt=st.outputFormat||"json",ht=!0,ht;st.zonly===!1?ht=st.zonly:ht=!0;var ft=st.measures||!1,pt=[{lon:ee[0],lat:ee[1]}],mt=st.resource,yt=this,vt=st.rawResponse||!1,_t=st.onSuccess||null,bt=null,xt=null;vt?bt=function(kt){_t&&_t.call(this,kt),logger$x.log("alti service raw response : ",kt)}:bt=function(kt){kt&&Object.keys(kt).length&&(_t&&_t.call(this,kt),te.call(this,kt.elevations[0].z))},xt=function(kt){logger$x.log("[getAltitude] ERROR : "+kt.message)};var Mt=st.apiKey||this.options.apiKey;typeof st.ssl!="boolean"&&(typeof this.options.ssl=="boolean"?st.ssl=this.options.ssl:st.ssl=!0);var Ot=st.ssl;Gp.Services.getAltitude({apiKey:Mt,serverUrl:ot,protocol:ct,ssl:Ot,timeOut:ut,scope:yt,outputFormat:dt,rawResponse:vt,onSuccess:bt,onFailure:xt,zonly:ht,measures:ft,resource:mt,positions:pt})}}onShowMousePositionClick(ee){ee.target.ariaPressed==="true"&&this.onPanelOpen();var te=this.getMap();Interactions.unset(te);var st=this._showMousePositionButton.ariaPressed;this.collapsed=st!=="true",this.dispatchEvent("change:collapsed"),this.options.position&&!this.collapsed&&this.updatePosition(this.options.position),st==="false"?unByKey(this.listenerKey):this.editing||(this._isDesktop?this.listenerKey=te.on("pointermove",ot=>{this.onMouseMove(ot)}):(this.listenerKey=te.on("moveend",ot=>this.onMapMove(ot)),this.onMapMove())),this._setElevationPanel(this.options.displayAltitude),this._setCoordinatesPanel(this.options.displayCoordinates),this.options.displayCoordinates||this._setSettingsPanel(!1)}onShowMousePositionSettingsClick(ee){this.draggable||ee.target.ariaPressed}onMousePositionEditModeClick(ee){if(this.options.editCoordinates&&this.editing!==ee){this.editing=ee,this._setEditMode(this.editing);var te=this.getMap();this._isDesktop?this.editing?unByKey(this.listenerKey):(this.listenerKey=te.on("pointermove",st=>{this.onMouseMove(st)}),this.onMapMove()):this.editing?unByKey(this.listenerKey):(this.listenerKey=te.on("moveend",st=>this.onMapMove(st)),this.onMapMove()),!this.editing&&this._markerOverlay&&this._markerOverlay.setPosition(void 0)}}getCoordinate(ee){var te=document.getElementById(this._addUID("GPmousePosition"+ee+"Degrees")),st=te.value;if(!st||(st=st.replace(",","."),!MathUtils.isInteger(st)))return null;var ot=MathUtils.toInteger(st);if(ot<Number(te.dataset.min)||ot>Number(te.dataset.max))return null;var ct=document.getElementById(this._addUID("GPmousePosition"+ee+"Direction")).value,ut=document.getElementById(this._addUID("GPmousePosition"+ee+"Minutes")),dt=ut.value;if(dt&&(dt=dt.replace(",","."),MathUtils.isInteger(dt))){var ht=MathUtils.toInteger(dt);ht>=Number(ut.dataset.min)&&ht<=Number(ut.dataset.max)&&(ot+=ht/60)}var ft=document.getElementById(this._addUID("GPmousePosition"+ee+"Seconds")),pt=ft.value;if(pt){pt=pt.replace(",",".");
237var mt=MathUtils.toFloat(pt);mt&&mt>=Number(ft.dataset.min)&&mt<=Number(ft.dataset.max)&&(ot+=mt/3600)}return(ct==="O"||ct==="S")&&(ot=-ot),ot}locateDMSCoordinates(){var ee=[this.getCoordinate("Lon"),this.getCoordinate("Lat")];if(!(ee[0]===null||ee[1]===null)){var te=this._currentProjectionSystems.crs;if(!te){logger$x.log("ERROR : system crs not found");return}var st=this.getMap().getView(),ot=transform$1(ee,te,st.getProjection());st.setCenter(ot),this._markerOverlay&&!this._hideMarker&&this._markerOverlay.setPosition(ot)}}locateCoordinates(){var ee=document.getElementById(this._addUID("GPmousePositionLon")).value;if(ee=ee.replace(",","."),ee=MathUtils.toFloat(ee),ee!==null){var te=document.getElementById(this._addUID("GPmousePositionLat")).value;if(te=te.replace(",","."),te=MathUtils.toFloat(te),te!==null){var st=this._currentProjectionSystems.crs;if(!st){logger$x.log("ERROR : system crs not found");return}var ot;this._currentProjectionSystems.type==="Geographical"?ot=[this.convert(ee),this.convert(te)]:ot=[this.convert(te),this.convert(ee)];var ct=transform$1(ot,this._currentProjectionSystems.crs,"EPSG:4326"),ut=this._currentProjectionSystems.geoBBox;if(ut){var dt=[ut.left,ut.bottom,ut.right,ut.top];if(ct[0]<dt[0]||ct[0]>dt[2]||ct[1]<dt[1]||ct[1]>dt[3])return}var ht=this.getMap().getView(),ft=transform$1(ot,st,ht.getProjection());ht.setCenter(ft),this._markerOverlay&&!this._hideMarker&&this._markerOverlay.setPosition(ft)}}}onMousePositionEditModeLocateClick(){if(this.options.editCoordinates){if(!this.editing){this.onMousePositionEditModeClick(!0);return}this._currentProjectionUnits==="DMS"?this.locateDMSCoordinates():this.locateCoordinates();var ee=this.options.mapCenterCallback;if(typeof ee=="function"){var te=this.getMap().getView(),st=te.getCenter();ee.call(this,st)}}}onMousePositionProjectionSystemChange(ee){var te=ee.target.selectedIndex,st=ee.target.options[te].value;this._setCurrentSystem(st)}_setCurrentSystem(ee){for(var te=null,st=0;st<this._projectionSystems.length;++st)if(this._projectionSystems[st].code===Number(ee)){te=this._projectionSystems[st].type;break}if(!te){logger$x.log("system not found in projection systems container");return}this._currentProjectionSystems=this._projectionSystems[Number(ee)],te!==this._currentProjectionType&&this._setTypeUnitsPanel(te),this._isDesktop||this.onMapMove()}onMousePositionProjectionSystemMouseOver(ee){logger$x.trace(ee);var te=this.getMap();if(!(!te||!te.getView())){var st=te.getView(),ot=st.getProjection(),ct=st.calculateExtent(te.getSize());ct=transformExtent(ct,ot,"EPSG:4326");var ut=document.getElementById(this._addUID("GPmousePositionProjectionSystem"));ut.innerHTML="";for(var dt=0;dt<this._projectionSystems.length;dt++){var ht=this._projectionSystems[dt],ft=null;if(ht.geoBBox&&(ct[0]>ht.geoBBox.right||ct[1]>ht.geoBBox.top||ct[2]<ht.geoBBox.left||ct[3]<ht.geoBBox.bottom)){ht===this._currentProjectionSystems&&(ft=document.createElement("option"),ft.value=ht.code,ft.text=ht.label||dt,ft.setAttribute("selected","selected"),ft.setAttribute("disabled","disabled"),ut.appendChild(ft));continue}var pt=document.createElement("option");pt.value=ht.code,pt.text=ht.label||dt,ht===this._currentProjectionSystems&&pt.setAttribute("selected","selected"),ut.appendChild(pt)}}}onMousePositionProjectionUnitsChange(ee){var te=ee.target.selectedIndex,st=ee.target.options[te].value,ot=this._currentProjectionUnits;this._currentProjectionUnits=st,this._resetLabelElements(this._currentProjectionType),this._resetUnitElements(this._currentProjectionUnits),(ot==="DMS"||this._currentProjectionUnits==="DMS")&&(this._resetCoordinateElements(this.options.editCoordinates,this._currentProjectionType,this._currentProjectionUnits),this._setEditMode(this.editing)),this._isDesktop||this.onMapMove()}convert(ee){var te;if(this._currentProjectionUnits==="M"||this._currentProjectionUnits==="DEC")te=ee;else if(this._currentProjectionUnits==="KM")te=ee*1e3;else if(this._currentProjectionUnits==="RAD"){var st=(180/Math.PI).toFixed(20);te=(ee*st).toFixed(20)}else if(this._currentProjectionUnits==="GON"){var ot=.9.toFixed(20);te=(ee*ot).toFixed(20)}return te}validateExtentCoordinate(ee,te){if(["Lon","Lat"].indexOf(ee)===-1)return!1;var st=te.replace(",",".");
237if(st=MathUtils.toFloat(st),st===null)return!1;st=this.convert(st);var ot=this._currentProjectionSystems.geoBBox;if(ot===void 0)return!0;var ct=[ot.left,ot.bottom,ot.right,ot.top];return ct=transformExtent(ct,"EPSG:4326",this._currentProjectionSystems.crs),!(ee==="Lat"&&(st<ct[0]||st>ct[2])||ee==="Lon"&&(st<ct[1]||st>ct[3]))}}Object.assign(MousePosition.prototype,PanelDOM);Object.assign(MousePosition.prototype,MousePositionDOM);Object.assign(MousePosition.prototype,Widget);window.ol&&window.ol.control&&(window.ol.control.GeoportalMousePosition=MousePosition);var MarkersOther={drawing_api:[{src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACsAAAAgCAYAAACLmoEDAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAA3XAAAN1wFCKJt4AAAAB3RJTUUH5wUZACIosGP4JQAABapJREFUWMO1mGtsFFUUgL9zZ6bdbaEP2kpRCYj4wlciRMHEHxo0MdHEqDFG/aExvmJiYmJ8G2P0B8YYYozC+oivCAl/VMRqIkTBUIygCAiNlr6oQAttd9vS7bQ7c48/pq0QdtvZFU9yM5nZOfd895xz7zmzQomibwFlgACVCCPUI1QDCcAFAsBHydBDP2ejOEAlyN2l2XRLhaUcyCDUsoQsK4DrgCuBRmAWcALoAfbQyDaUn1nGAZrRUk1KSV59DwhpRLgLuAe4JsZMPwPrsGzA0CuP/M+wugYwCMJFKM+g3IVQEU8ZgCywAeF1LH/ioPJwfPvFpUGA4LEYeBW4DSlCP3JLBXAfSgXCC7i0TS0jhpjYXk0BHjXAE8BtaMn57gK3IzxBjhpdE18xNiyKg3ADcD/glpbtExJF5AGUGwDnjMJqChBqgccRZhVYTDTCk8bks/zvzwIeBWr1vXiwcUNpgCuAqwuCgtKwtIcFtzqU19Ywls5waGPI8d8aUeS0SET3KxAuB34kRu7Gh1VuRCjPDyqWhbcMsGI1VJ1fCRPH/wX3DrHjyX46N9XlBY5O65XAT0RFZEaPxYMVlpAvvxSoXjTIsteGqTp/LvAvbNXiuSx7dZiqRZkCfnOAy9B4HHFhhagy5d9WsxcmmXN5XZ75DHOunEPVecmC8ypz0XjbtZjjJ5H3qQLGcxHJb1CkHPGcghkpFFrIaRL/6ILBAsbA7zvBWLov7+/+QB/+8ZFpfJc5s7CKRWlFCfPCDhxI0JKyaDh8ql44TMtaJd2SLAAbAn8BNg5GvDRQLEIzUdNy6iYTIMgm+H3VXMYz3Vz8UAavqoHc0HEOpMZpSc0nyJYVgM0RNTixYGMltq5BEM4DvkdYlGcxkRg3xKsAcR1sEBJkwQbONFbaEVYCnfLwzOds3JxV4CiwLq8XZGLYwGFsyMEfgPEhZwZQC3xO1PPGamZiV3hNAcqFCJ8Ay+PqTSM7EO6/86PGv347Uo6xEFqD41isiepHhe9zXU8Pk71Ocf1sCg+4HVgNzCuVUpWjA1nz3B3vn7PxSNZ4AbjGYkJrjOPY0BqxAuNJ389eMjjk7204i3meLRoWop70ZeBJwIuvHLnGKnZ7R2LbU183fHVs2PFdo65G6SiR71QRUcCiBChpA/vFaGvRjd4E8EKUtcBNeSv+NLxtfV778011m3YeSmSciYyWU94QUJ24CIAVGLXo98UUBQAmvp26UFYDHcXoDo6azPrds5t3dSfSjkElArFMDYmuIhbEiqgVQRStQLWmaNgJYCXNZuAdou+qGSUXEvzQmty1fvfsDiMgseIhgqqoyBE1prUkWACOESJ8DHzJdEePRlHd31Pe8vb2mt3jgdgYoAIYBR/YY6DJJBKHS//f4BIA0sAbqlwMXJUXQuDYsNOb2lHd3JX2sqe/ogKCTjbwgkU1CxxE5E+gO51MnqjO5YpqZE5leGTSb+zNhawOleGpJydd/RxjX+yb1bzlYLJXmAp/FF7FqAqoBsAI0KmwxXHdzxS+u7mzswU4MT+Tof3gwf/02RcxpaCzz6ltqLKvJD19zAju5KYOlfCntsTOF7+t33pkyPUdE9U6VUVExoERVdKCdomY1hCOqxCM9veHlbW14Di0tbdP2So9DU7y8M7nTAbHfFBfGSyt8PRaI5FjuwbcQx/+Uv3r34Ou7xp1VMkBaRE5BhwVkW7Xcw+j5KwNkFyouA71Cxbwx759+TLqzEjHKo8yx97RUBm+7TnMG/Rl+N3tNU1rm6v3ey5pgaOo/q3QU5FI9I6OjfkiguN5nLt8OZs//XRmx5wpWIDvnp6duLR+9KXaZPjgjs7k1mebGtals6bDiPY7IpnusrKReb5PeVkZB1pbi57/P6fByVKXDPzOtPtmwtX1f/Qm0u3pRL/b0+VXL2xEVbm+r49v+vtLnv8f2Pk64kl5WH4AAAAldEVYdGRhdGU6Y3JlYXRlADIwMjMtMDUtMjVUMDA6Mjg6NTkrMDA6MDAzyLlbAAAAJXRFWHRkYXRlOm1vZGlmeQAyMDIzLTA1LTI0VDIzOjAyOjM4KzAwOjAwnw8TLgAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAAASUVORK5CYII=",anchor:[.5,1]},{src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACsAAAAgCAYAAACLmoEDAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAA3XAAAN1wFCKJt4AAAAB3RJTUUH5wUZACIosGP4JQAABm5JREFUWMO1mFtsXFcVhr+195mLx3bshNghKWkNpCglPEBpUYSAKg88gGigUftARSJzkbiIB54QalQkKvGISkGQSkTQplJBKQgQbbmUW6CkTZuGVq0pjV3n4jSOnUzG47HHM545++fhjNs6npDjISzpaDQ6s9f69tr/XnvtMTo0fbYfAhACbN5knJ1ch9QHlseIgAZSHbMyhRsvUj0qvIPeHPbd6Y5iRp3CIkGjy8jUtnJ28mbgg8B7gEGgB5gDpoCXmD92GOxZ3pt/haN1dRrSOuLcvQYitwHpNsTtwE0gj5kAXeLfkGLgKGaPgPslIZ62A7P/X9hk6YMRuB5nX8PYBeoBiy+BbBfHA3OIXyDdh7NRXFP24/nU8VcnA3OG6R047QXtTACsmWaeQBNUAO7E6Ea6B984cYVJLjOXOqvD/aC4D/gSxk7MPFhY1WSx0Bq3E/gizVyf9vSmHp0aloBH3ALcCeZIakEnFkgk8RmCfQTkryqshvshoh/4AtBNu6WTjBAbzUWjUYfmYvJdWrkvDLX8fB58n/b0p4JNp1lhBG0D3k+yWZbDJkCBd95c5H0fz1LoX0u1VOKfv11k/Ln1SNaqFMuR4SaMbYgnSaHddLAmD+wAsm0zigI33lrh09/OMzDUD3QBxvY7Zvjp3lmO/aYX4ZYBmwHkEDswPQVccaOm1KwcaCuJ1i55FWDDlgq79i4yMLSJZHkd0M3A0CZ23bXIhi0V1FbiHtNWTKk4UsKagQ22/X0IMDhU4JobBlhZt41r3j3A4FCB0BbWgW1YSvOVLK1mAfKAtTbHm18Kn4kwy11mnll8RpeRpLX8prK0pUvALO0imjMqF+aols+3HTk/c4HZC3NJtVvhVUhlpFQHQ1rNCvQqEK/04GFiJMuhB+uEUFn2LoQKhx6sc2Yki2tbTptgY8hSwaY9bgNwBNMdYMujmkG9muPR7/RTnZ3glt095HsHWKic59CBOf68fwP1agbXLi9qAs9i6Q6YVMLWcK8hfx3oVxhvZ6UcDAl8pkmuYPjIEzdj6lURN6LW/mlXZ09g9knUPG0PzF0xu+k1GzSFeAQRt5mkMCBuRFTLnkpRVMv+v4KKGHEQaRrSySB1i6jdfeDYAuzD2E47/aY3j/Q0xpd3He0de74S4QLEweF9IDjDgEKtxofPnWNfa1DqFtEeKqPhNSeR7UNch/FWVtHMSK3EGIY0WWy4n9z2zJriVMMGWxyu9cQtv4uC6vmuQu1dA4NszIRVNt/DfRAoYHwd01fBMlz2TBfSG8VeyCRzTaF/lKKnvvHv7sfPL7paZIqUQFqr7VDrWA6IJqLkYMScRld9rdGePjBdC9wLfHTlVeYNyCC5gHmBCZmBjc378W8e7/79c+Wo7F2SLHvTWLCkUtpSf0QwWAjoifT97JIcDpTBwgTSD4Fxlu5ZCEkWZC4WviGyTcgE4aQkc6WGK/1sMvfMsdloxhuyBCTw+mPJp1kAC2YKZphQAal/1bAA9sCcmF74K/AjpPmlbAaZb4pMLKKAnLBkp5hoBGv8pZh5/ueTuVOOtN2AGZLJ7KycG+0IFoCLzZhgD4M9KpliETUhkuRkMsPUWlAk00jFH7//dP6FxWAhBagBTlADXnDwuMvnX+v8f4MtfVDIzlCvf09ia4x9QBKtZC5p2Awxtein9p/JH5lY8AsrOWVLZwqtNh+pCoxh9gowUerqmutrNFZxB7t06g+Xod4QxCO12H4Qi7IlZUnQSimiHlvt11PZI4eKmWnj9eVPlle4pHdXE5gHTgr+5KPoIcHvPnby5MvA3OaZGcbHxjr7k2NZXoZ7GatE/etzujvn9RVnconMZEEW/n4xc/Rbo4UnJ+uu7pcULGFmi8C8RMnQKTM3GsN5Gc2FYjHuXrsWvOfV8fFl2vif7fAn1tr6vG1bn42/3+X5kFlyLTgx70/eM1b4w+FSphglV6MGUDKzaWDSzCZ8FL2GaITQJG7EUuQp9PTw0osvrlzNqwELcPz2deRd+NS6rO7NODaXG1a6/1T+if1nci9nnJUMJpHOCM4V8vmphXq9Zmb4TIa3bd/OHw8cuGKMqwYL8NitA7kb8s27+jL63NOl6G93j/UcnGnYCYeK3mxmIpud31irkctm+dfo6Kr9d14N2thbolA/VbP7rnc6ODIXzZyqZy76M6cX1ly7EUnsuHCBx4rFjv3/B5an/+2QIsMIAAAAJXRFWHRkYXRlOmNyZWF0ZQAyMDIzLTA1LTI1VDAwOjI4OjU5KzAwOjAwM8i5WwAAACV0RVh0ZGF0ZTptb2RpZnkAMjAyMy0wNS0yNFQyMzowMjo1MCswMDowMGqPVM4AAAAZdEVYdFNvZnR3YXJlAHd3dy5pbmtzY2FwZS5vcmeb7jwaAAAAAElFTkSuQmCC",anchor:[.5,1]},{src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACsAAAAgCAYAAACLmoEDAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAABmJLR0QA/wD/AP+gvaeTAAAA
237CXBIWXMAAA3XAAAN1wFCKJt4AAAAB3RJTUUH5wUZACIosGP4JQAABPdJREFUWMO9mNtrXFUUh7+1z5nMmdhkkjZpE1RsWi1FqQWL0gp98EUQ7JP+AYJPPigIlvqgiIr4IFqxSFtQ1AqW4oMXUAreK7Zia0vv2Exz6SVNc5u0SZpJZ875+XBOa0oz6UwydcFimNln//a3195nrb3HmKPpxq8GtABZIAB8oAQUgFFgeHoXm+OY/lxhp417P7AOWA+sBtqABcA40A8cBvYAfwInbp7nbTbF3iZ4QfCnQBX4PsHzgiX/C20CaYKVgk8EExWCXvOJpN/KROe2wprgPsGXgmKVoNe8KNgluFdz374VRbVZsGUeoNOBP0j0bgusJ3hKMDZP0Gs+luh5tyOqLYKfawR6zX9IdCuySlOXAx4EHpl1TmvW9LNhg0dzcxP5/Cjffhty8GAb5ffmOmAV8Cu1SmkCX/B22b1qFmrDhkHlcn2SxiWVJI2rs7NPTz45KIhm2btvaf75/gbYOsE3ZQddvnxEhw93SQp1o4U6dKhLy5aNlIGNEt26Spe3EjPiyjTzci5dmmHVqkUz6DlWr15IR0dmFt0lVJjCqgl/ULYllfIxm3lAszSp1GxvfIYKrdLIAlwq2zI0NE4+PzRj28jIEIODE7PojtYaNgI6gXDG1hMnArZvjwjDsRt+D8Mxtm0TJ0+Wi14InEr0a2NJQXhWMFk2Z2azU9q0Kadc7owGBiaVy53Rxo05NTZOzZJnJxPd2hWG5EywTHB61iTv+yU1Npa0cKHU2FiS75duURROCzpqekZIKlhG8KYgrFH1CgVvJLoVWcUzSgRXAJ8Ba2sQg33AM0+3tZ06mE7jIggjh+dFRM4woL5QYH1/P1uTDhWnLouBu4H3gc1A+zxW6sKIc9ufuvPOwT7nFiccLvGQ+IW7KrgymKkvrGhdTHsqqm6vJNGtB14DXgRS1YJGEP0RBHteam39ZsDzCr7kK4a0JCTCTECEKCHyDo6bU2dVNTmJ7hVgK/F963Gq3EpdqVTPlqamIwOe1+yByWyagGI5xa+cYv52QUcofqimKFwHBnqJt0J3NX0vOTe6s6Fh74EgyHsgg8jiJU/c4k+zCCwyU2SGCdUjNVUNmwAL+BH4kDjSt7QilH7JZA7sbGjodhUvhxmSyaxPznXOCTaxEPgU+JpbnEUFHE+nT25pajp01SyqANQAp/h/h8MOvndBcH6+58g88I5gJfBQOYgBz7u4PZvd25tKXbn5GRkYUjIvI0K6AuQw+wc4m89kxrPFYlUHmZumngTtSBE2hzA203MFmPpqwYK9P2UyF+2/fvHyCicZSCVgAugR/OT5/ueC3U/09JwExu8eHaUrl5t/mRPQ43nNrVH0ekZ6zk3L3SGEvwfB/ldaWn7r8/2CF7OaJMzsKjAhkTfUa+Y6QxiUUZocHg7vaG4Gz+N0V9f1seZ9nTBgv3OjOPdRS6m0pl561CWT6PX9Mx9ns3+f8/2CL3mCIpA3swHggpmd9VP+eUQxikpYMRS+R8s993Ds6NGbxqrJ3efhYlHdqdSRy869lw7DDgftl83GdjU0/LUnk7mYigEvIJ0T9GfS6YuTU1OFeLbGXevW8uOOHRUFpma2u6EheGBy8tXmMHx2X5D57eXFrV/knet20rBnNnq2rm6ivVAgXVfHic7OqvVrd6sEFpVKh
237R7ffzeItPNYOsh3BcGw39tbyLa1IYnHhob4bnh4zvr/AlFvZYTScGjCAAAAJXRFWHRkYXRlOmNyZWF0ZQAyMDIzLTA1LTI1VDAwOjI4OjU5KzAwOjAwM8i5WwAAACV0RVh0ZGF0ZTptb2RpZnkAMjAyMy0wNS0yNFQyMzowMzowMSswMDowMGvaOiAAAAAZdEVYdFNvZnR3YXJlAHd3dy5pbmtzY2FwZS5vcmeb7jwaAAAAAElFTkSuQmCC",anchor:[.5,1]},{src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACsAAAAgCAYAAACLmoEDAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAA3XAAAN1wFCKJt4AAAAB3RJTUUH5wUZACIosGP4JQAABfxJREFUWMO1mF1sXEcVx39n5u5613btOIlrp0lEhBr6RSmKLUiQIkQFSH0rLSoI8VCE1DSqVKkIAeVDCPECQhChClKXB0qBRKpoQbQNRbSUNIoTKW1NmsZW6vgjNbHXjje79q7Xd33vncPDjYuc7qZ3t+ZIq5V27sz5zZn/mXPuCk2a7vwlZNNgBK5vE/JLm0E6UTIIHhCi+KBFSrk8nTcokYVqGzL85aZ8es3C0tkCI0Xhpq5byVf2AHuBO4BeoB0oAzngNNf1vorTk8z1D9MzqM26lKaiuusJMFEvTu4DvgJ88t2l6q2onAQOoe5pxMzKG/v+v7DafxAiI4jchOi3Qe8DaU04G5QK8DTITxF3DmdVhh5I7L8xGdhQcKkbgR8Dd6PiJd+ugNAKfBXVVlS+h3pj8S6SmUke1QEIUxsQHgbuBm0A9KoACfeAPIwEG7TvYOKJiWFRtSB3AvfH2d4caWziAV9D9E7Arius9g2AkS7gIZD2OpsBpxBEsBLF307j32vyajvwII4u7X8iEWwyzSoGx8eAT9QFBeW27hx7P2TpaNnAYrXIq+9EjFzqRVWQq09CQNiDyO3Av0ig3WSwggH9HEhLHVDHp3dc5ht7YFtHG/HRtnHXzkV+cSLP0clNUAuYFuCzKMeA8P0wkmrWgNxKLX05hW2dC+zvL7Gtowf4H+z2jh7295fY3lHE1QycBT4KmogjGawiKL3UyioFtl6X5caNm2qsZ9i5cSNbO7J1DllAe0ATZWtSGQBkam9EwTMeIrUdirRgxdZNNCSbiCFxZGNbqAMDBb/MYnW+5viiP0/RX0LqBq+4zrDqQEdBo/cMWYGxyxmeHXE4La0Zc1rimRFlrJDF1oBVIpS3UVwSioTlVh3IIHHTsjbJRMAPMzz57x5KK1N84eYibaluloJLPDu8wjMj2/HDNKYGrBAAJ2E9YQVHxCsYpoEPv2fcAKVqmj+c3sGfhsGKJXI34IcQOlsTNLZpVP6JTQabVLOKZQY4VDsKEkc4dJZy1bLgQ3nFEjp7Da06lD8COTRZM5O4wGv/AET6EUR+h7A76bxr2AlU7v/iwm/ffiOcxjiInMFahzOCAK2+z95cjtVWp7F+tm8gBdwDHAC2NEup6MxlV3n03uJv/jrtKqkQPOMwkTPGWhc5I05gJev7lVsWFv03u69nS8o1/FoTAM8Bu4BHgFQjiCA4VXc8mDj3zfJzXXOu/CUP4xkwGMSauMcw8cPOb8mEQ92ZgoGzM5GMNtznad8AwA5UH0f4PNcQZS3csWh+/LvlI8+fCt4pWonvM1nzhMSFRkDjwuYElh36j0aKAgDy+j6AC4geACYambvglouH/aHB14KpgsWoxCCOdz8Sf4s4ECeiTgRRtBXVDQ3DXgFWsoWXgF8BlSRzAo3CV4LR1w77QxMGqVudr/IkqIqKTKsxo03BAtA+F6HyJMpfrn31KKrK2Sg38ljl+NCKhi4BqABGwQdOGzhiMpmLzf9vcOkWWKFAmp8pejPKrtoQwpwrzQ5UTgxeiAqVGm2bgKz2OYrgUK0A5xE5B0wVstlyZxA01MisRXh9H6RQhDcDogMRq33BlSBf8e67oPrn6pnBl4PzswKrxx8fr2JUBVRDYAmYVHjZet7vFV68a3JyBChvLxYZP3/+A731xUx9A0xG813dpuNHWVL7jYi3mtWRanQsGDv1/fLfjk67Rd+KEUBUFRFZAZZUKQh6QcSMRnBJhXA5n4/aurrAWsbGx9do4wPbqTselc3Seftm03awldSnjAgKTIT5iR8u/f3IsWB83sNY4nu6ICJzwIyITFnPu4gSOBcSBZGqZ2ltb+etM2dqCGqdbOLjPyEt9t5uaXssJXbLgvNLv14+fuTx5cGzKfEKAjOo/kch15rJzC5Xq76IYFMptu3ezUtPPfW+PtYNFuDFXd/K3Kabf9Al2a+fCC4c/c7SC4cKrjJhkLwVKU6l00tbfJ+WdJrh0dGG12/+NqhhmzTrT0aFn2esd/itaLYwTiHvXcz5nVt3oKp8Zn6eF/L5ptf/L2sInRchOhqOAAAAJXRFWHRkYXRlOmNyZWF0ZQAyMDIzLTA1LTI1VDAwOjI4OjU5KzAwOjAwM8i5WwAAACV0RVh0ZGF0ZTptb2RpZnkAMjAyMy0wNS0yNFQyMzowNjo0OCswMDowMJwhuk0AAAAZdEVYdFNvZnR3YXJlAHd3dy5pbmtzY2FwZS5vcmeb7jwaAAAAAElFTkSuQmCC",anchor:[.5,1]},{src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACsAAAAgCAYAAACLmoEDAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAA3XAAAN1wFCKJt4AAAAB3RJTUUH5wUZACIosGP4JQAABmRJREFUWMO1mF2MlFcZx3//887Ozs5O96OwZekupiq0ptJigFhaJaZNa9MbbTVBY5pYY0MlxiZ640XjhfHGxtheGFNFL7AIGmIbEy2Cix8sCSWxSCiyKyy7QGGXhd1hZnc+dnbfec/jxSwI7ADvjvhPJm/yvufj93ycc54zokHt+tYqMnMtOHN0lu7RdGt2KdBuWApTQqIKVgHy3d2F7PhYu7koork0y6d3DTQ0Z6JR2Ltn23m/Y1Crcw88OJ3OPgpsBNYA3UAGKALjwNHx8bv6kT+06r1LA/9+bJk1Oqca6fTnF9fiAtftzW8CvgI8IsAAzQ9p1yDNvzkE7DRnu5zXxSd/8c//L+y+l9bjfSRMDyB9V2ITRjrOKDV2Kwt2yXjVnE74yNvTvzwSe/5FpYESgRT6lQY/AJ4FS6B49tY8rzTG8yZLm9krvmrDV+2IIRe3Yd/m9VhY7QC9jHhWIrHYLJpPlYShL2C87JrUsfeldbH7x4Y1LDDjCeAFoYYX5nwgEoKvSXrCILijsHs3ryMw1wl8k9pKX2iMGeY9vhriwzl8NcS8x2xhlAWYlAG+EeA7+15cHws2pofMefzDwCdvBiqwtg9/fHzpwxuDRLqto1qezk8c7Y8KZwe7zUy6IbcFYHoU00PA34mRu7FgHXKIp4DmeqCAX7rmM5fv3/Qd0l29rdRC29r9yDPTJ3e9lp04un+JGQuAgWaDJ4UdAKq354gh1do9SL38Mk/6nt6plZ/fUkh39S4DrsKmu1Ys++jnthTSXSvymK83dCBYjeJxxGpkmMC6qbP8zYyWJT0trT0rl9QZz2V6V93dsrSnpV7uIoRYdvUkuY1i5qwAUvUtMRQkEvViDCCpWUEQYDdNyZZ4DHE9a2DGVH07xFwxVwzL05P1Poel6cm5Yr50i8Mjf0dhJbzEEBAt+OYCSmPDqdH+t715X7jOSO8L5/vfstLocItcve3UIjM7aVY/oW9UvDQQHuMgtaLlulklEc1VUmf2bFsWlgvnejc+lw9SrV1RpTRxvv/tufMH3loRhZWktNAvZgqBQ8CdgzXkRfQ3cGPARxZ63hGWC8kP+n593+j+30EQBETRvdFcBR9Vg3qg8xrD7K9GEAs27tZlEFww2HkzL0jCR9UgnCkGYXGKcKYY1EDr56oZHmyHwTi3WH03cMRT3+b1eKL7hX4ltCFuv1voXcle+OG7UyeHp6o4D5F3BIHHu9pelq5U2Dg+zhvzHWIXEdsPj/HVtT3TkqaATwF3NUppxoVC6F99pT9/ZLIctXlol9Fupg7nLGNSRtCcqFZJRz6q3tuj1UvbFlk9iRD4A7AW49smmuKGpnaLAG/mB7PhiW3Hip3Ts/5LgUg4cDgUOAMwV2vuK82p6pGuVM7B8QuRhhZ9renbvA7gPsN+BvqsFlnUjhejke0DxT8OXQ7zgZOuGHGdSWbzDwF4wYzH+mLXs1f01NbDeDiL9DpwOn6dD6U5n99/vnLwVC7MOdW8p9qCnf+p9pQ8yEvmJWRYGrOORcMCPL31sCU6W/YJfgqU4/SJvFWPTYbvHThXOS1qu8ftJWEmk8bMuaGGYAHC7kwkbBuy399q6zFqxc7ZQjT4znD5SNWbjwEqwBlUgKMOdrtUarTh60lyYAKfnMvZXPJHGB8zbG09CAH5WX9x70j54KVyVF7YwgS6Yq7VTksrA6eQTgDnci0txfYwjH8Hu1GPbz2MhU0m0/tV43UPBfivj6+UhGHkZw+NzR48NhFevCb8tfAazkxgVgVKwBmDvwSJxHaDPc+cOTMIFFfk84ycOtXYnxzXat/mdVyaiTrbku77TY4tTkqY1S6GZhYdnwz/sWOguP9yxVdcjVRWuzbMASUzcsLOSm4oggkT1ZlsNmrt7IQgYHhk5Loo/c/6+ZfXKJPQQ21J90ZzwGNX0mG8VD3928HS7uOT4WQgAiAEcpIuARcknQsSiVGM0PsqURiZJQLSmQz/OnasbkrdEe14/hM0SV+8q1k/STgtL4e+8KeRmd17Ts8cD5xygguYnTcYT6dSF2dmZyuSCJqa6N2wgX1vvnnbOe4YLMBrz61NLc/Y9zJN+vqJy+H+7cdLOwuhP+0gG0j5c8lkaXmlQnMyycDQ0KLHb3g3qKdMk1UuzUQ/TrrEbz4o+NzFClmNjlZaP9SDmfH45CTvZLMNj/8ffOgG6JpOcn4AAAAldEVYdGRhdGU6Y3JlYXRlADIwMjMtMDUtMjVUMDA6Mjg6NTkrMDA6MDAzyLlbAAAAJXRFWHRkYXRlOm1vZGlmeQAyMDIzLTA1LTI0VDIzOjA3OjAwKzAwOjAwxEaR7gAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAAASUVORK5CYII=",anchor:[.5,1]},{src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACsAAAAgCAYAAACLmoEDAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAABmJLR0QA/wD/AP+gvaeTAAAA
237CXBIWXMAAA3XAAAN1wFCKJt4AAAAB3RJTUUH5wUZACIosGP4JQAABZ5JREFUWMO1mF1oXFUQx39z7r3Z3aQx2TYxCVo1aaviJyhqK/TBUgVBRVT6oD4oIiqFgiAoqIjogyIaoYgGFGrFVuuDWloRrWgrxmKrYmtbbZovY76z2e0m2W6ye8/4cLe1obvN3bUOHO7DOTPzP/+ZM2fOFSoUHQaygAVyCB4NKHUIUcAF8ihZIMUUCepQCGbkosp8upWCJQM0IoxxBS6rgNXAtUAzsAiYBkaA36hlD5a9xDlMsgC6ApGKWO0GhGaUdcD9wE3ogtb2AluAbSijsvx/Bqs9gEUQLgOeBtahVJdhJYOyDXgV5U9AZUV4/+WlgUFQlgMvodwNuGXGphp4sPB9ljzdED4tTFms+tQDG1DuRsoGGojgAvcgbMCjXrvL4Sq8EwdYAzxUcFi5BPoPI6wBnHMKtsBqHFhPcNKLLCoxSgNehPI4lnhYdsMyZBCuQbmxaOiDSqBErh8hdqeDE6/HJlPMbPeZ/aUZkBIpswrhapTvCJG74cAqBrgVIVIUKGKpuWOSxe3gLashCG0Nix5Ik3gywcyOJWgRwIG9tcD3QH5hxsKCVa6gVH55bcepf3kKb1kT8C9Yb3kT8Zem8NpSJSw7KFcVyFhQwh4wIbiZigfTuyRG1dVLitgzVF27GLc1VoIEAZoIWe/DpUFgKlp6geciUtyhSATxikdEACVGSAlfuuB4yRl/Yho/OVF8bnICOz5zFiJSYet12Jy1KF0oftH53OEo6Q6L+lPz9fwp0u8oc0dKsecDRwl6twUlbOmyQCdB0zI/pALYTJTUK03Y1ADnPZrCnNeITY+T7pgj3bEUm6kqwV6OoMEJBTZUALQLAVoRvkZoK8E+iOsj1SCug+Z9NAOad87ipQfDWpQ+aVu4zobNWUUYRthSkgUhAGbTDv4k2LSzAFALfIhlhJDNTOhWpHAlXgq8D6wMq3cW+RGHh+57rPnoL39EMBZ8a3AcizXB/VGdzbJ6ZIS3CwqhGxJZBnqMXoQ3gXagpVKUqgxPpkzHvesvGB8aMecXcJjC8AuszylkxmPV2Usbz6fFs2U23wG71cALwJOAF14ZELAW+8PP0T1PvdL4+VjCybpGXQ1ASiGXFBEFLEoeJWngkBjtKqvVk2Wg3WSAtwneW7cRNpUkwNsz4PVt3Fx/YGzCiTsOonJ6y1DYkWphvYDQotDqK1+XcymcAgz0o7Sj9JajezxtUlu313buPxhNOg4qgpUg5IUhwVfEglgRtSKIotWo1pcNtgBYGWMX8BbBO3dByeXJf7s3tn/rjtpeY0BCxUMEVVGRITWmqyKwAEzio2xC+Qw9S+nRIKqHjkaObNxc/+tcTmwIoAIYDf5M/GbgCxONDlb+PFkOKEmE1xQuR7muKAiBsQlntOOjus7+QS9z5hoVEFQLWxMsqhngGCJ/AgPJWGy6Lpcrq5GZj+FygteBcCCXo933mTrJ5Onf7Cyzn361qPObztioyKnwB+FVjKqAah6YAfoUvnFc9wOFL2/v6zsCTC9Npeg5dqyynxzzeOmGvkEn3rjYvhiL6BPG4J481L7F/35fdN9zrzfsHhpzs05wn4mqIiJzwIwqSUH7RUyXD+Mq5E8kEn5NPA6OQ3dPzylf/+2VSlAd9m03KdS827A4f311VG82JiC2f9D9671P6n7+e8TNuq46quSApIiMAcMiMuB67iBKzto8kvMV16Hh4ov5/eDBM3z9Z7AAN9yV097d3oH0lHkj4vmtxtCSnpapj3fW/rTnp9io55EUZBjVvxVGYpHI6InZ2WywW+HCVSvZtXnzwsScC7An5ctNtdEr
237V5x4Pl7nP/Ljr7Hdz7zWuCV53PQa0YQjkhqoqpppyWaJVFVxuKurbPvnhNmTsiSez/YNua9HI7r1965osmcgmnCT/dm6S5pRVW6ZmGBnIlGx/X8AIXpAQWXTlG4AAAAldEVYdGRhdGU6Y3JlYXRlADIwMjMtMDUtMjVUMDA6Mjg6NTkrMDA6MDAzyLlbAAAAJXRFWHRkYXRlOm1vZGlmeQAyMDIzLTA1LTI0VDIzOjA3OjE0KzAwOjAw/KO1YwAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAAASUVORK5CYII=",anchor:[.5,1]},{src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACsAAAAgCAYAAACLmoEDAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAA3XAAAN1wFCKJt4AAAAB3RJTUUH5wUZACIosGP4JQAABh1JREFUWMO1mH+MXFUVxz/nvje/3s7+mLa72wqNSykIxEKCqKUJf0jQgGJCIGKC/AEaUSEh4R+NGv8wEMUY0xgjTI2J2Go1/EWA7hbBxELcboKh0tItZZfd7a50Z3dmdmZ3Z2dndt67xz9mt7bd2fbNUE/y8jL35d77eed83znnjtCqvfRrcKPgCBS7ha7sFtBOkDioC+KDVFAt0lXKU0wqvgu5Tvjm11ra0m0ZNhqDXFXYHLuJzuztwB3ALcBWIAmUQDPAu8y3vYnRId6+bZg9R7XVLaWlWf1pUN2K8CDIQ8DnEb1oufOZBGAI5SDoixgzw93f+T/DHkqDEUH1U6A/AHkQUS/UMgqIlkFeROQXqJ4Gq9zzeOjtm5SBFdTsBJ4G7kNwQ7+vAIqH8DCqHuiPwX7IhSG4pJnQnANpwHQBTyLch0jzehcBVRflfuBJ1HTV173SsKiDcCfwCB/nwxShHhEeBbkTxbmysAP7wJoU8ARCsvG7aP2ywf+utbHG1EmE72I0xeHnQmGE9ZBB9GbgcxuCCvqZjp7MV3s+6aTcaFehVi2+nJ0M3lnIbkVVkIbavh3YBfyDENoNCasG4YtArBGogL23p29u7w17uNbraAMcoO0bV12/8NT7g/lXZyY2bwAcQ7kLkbcA//IeC+tZuGkV4mJadnid889c99nFa72OXuAc7E6vo/fpnbct7vA6ihs4zgE+jYbjCAsr1CvT+lgq9HntiV3JTZsbrGduad+86RqvI7FBkAWlFw2X/5r5quONh5WIGFeksShFJBYR4zT2rIBoIixAE6mL+cbDQm6lUirUqrlGT+dqlVx2ZXmpYfFQQCmGLQvhYBWLMgIEDVzHcGkuvm/qlA1UF89/FKgupieH9VSpkGiYDYQAkQ8QsWEwwsrAgg6i8hBy0UcmQjnw48+OH+st+tWpb199Y7HDjXQv+LXsvqnhlX1Tw9vLgR9tnLq0BgwhhIINV9gPpQVHr0F5HWTH+j3rcXSNCTwngivi+KpBOajhW+tskGMBxkDuQvwJ7n7ismIIq1kFpoGDqK73ggiI4FvrLNSqztxKhYVa1bkkqKpF9c/1nldCqTZ8i3g4DVavR+SPwO7Q8za2o4g8sv3nL3zgTpzFWAiswXEs1ggCeJUKd2QyPN80LMBrv4sQBPcDexHZ1jKm6rQpLf/wqmd+/3J8finig2ssJrDGOI4NrBErsJKoVMo3zi9Ujnf3sC1im+yeVGuovoKRW4GngEgTc+tysWq99ydO9/zhlZQ7v/h1NcY1YDCIYxRATV12thKL+8e64wUDJ6cDGWn+WHPoOTCmDyUNfAlpLjqRTH6s50D/q4mRySKOc9FhaPVXvTFCVQCswLJFX2+mKNTtK4+DmjOI7kV0vJmpprRc7DzyzmBidKqAMboKYjl3Sf0uYkGsiFoRRFEP1a7mYQG+/JgSLbwB/BYoh5oTBH7bidF/db717/G17HF5E0FVVOSsGjPSGixA8myAygsoL3GpXnS1AY9PZk5t6v/nMfF9GwJUAKNQAd410G/i8Y9aP55kb4aIKWD9X6J6A3Br45IqOMXFma7XhgYjs4XyeoWrgKzVFUWwqJaBUUROA1OFRKLUWas11chcaPc+BjZQ0OP4di92tS9YO8as3mWlVm0fOjHYdnx0BmEt/PXwKkZVQNUHloAJhb87rntA4fA9ExOngNL2YpGx0dEW/+Q43wbSOLm5lG1P/lQjke9hxD2XplQD7+TY2z1/GjjiFhYqGCOAqCoisgIsqVIQ9IyIGQkgq4K/nM8HbakUOA4fjo1doI2PbZH0jwQvuctvb3teY9E9a3KIZPLj3X/9W793ciynjnGAGlAQkVlgWkSmHNf9CKVmrU9QC1RdBy+Z5L0TJ9Yr6krAAkT2/wzruA8EnW2/wXG2mXJlMTUw2J86fPQkrlMAplH9j0LGi8dnlqvViojgRCJcvXs3b+zff9k9rhgsQPuz348vb9/yk8CLf8s7feZI74H+g6ZUHkck74gUp6LRpW2VCrFolOGRkabXbz0bNDC/PVFxZwu/0k9s+UtscrYQny3ka9lMRfv6UFW+kMtxKJ9vef3/AgyZp3iOwsFtAAAAJXRFWHRkYXRlOmNyZWF0ZQAyMDIzLTA1LTI1VDAwOjI4OjU5KzAwOjAwM8i5WwAAACV0RVh0ZGF0ZTptb2RpZnkAMjAyMy0wNS0yNFQyMzowNzozMyswMDowMHshjJAAAAAZdEVYdFNvZnR3YXJlAHd3dy5pbmtzY2FwZS5vcmeb7jwaAAAAAElFTkSuQmCC",anchor:[.5,1]},{src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACsAAAAgCAYAAACLmoEDAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAA3XAAAN1wFCKJt4AAAAB3RJTUUH5wUZACIosGP4JQAABjBJREFUWMO1mFFsXFcRhr//3F1713biOCVxotiolJiUlpLKtiBFiiqqgpS3tkhFQjwU8QBRpUr0BSHEA+IFVNoIIVQeQ4CAKiVCoUSIFokEKUSENGpCYxJnnUQmteN4u+v12r7ru+cMD+tESbOO727DSFfn4dwz852ZOXPmXtGmDE0NkY/zuODYnGxWMVv8GEavyXJCGaBuZjFQnp+fL/b29prHU8vUOP/x823ZzLQL27vYy9imMe2Y2fFIMVN8AtgN7AS2AD1AFZgG3l23bt3xEMLJmb6Z8/2lfmvXptpZNFwYxsltCRaeB74GfB5raNMqKg07CRw07A2Zrr+z/Z3/L+zoxCg+eEnaIfRd4HmMrrRaDFvEeAP4iUwXAsHODJ1Jbb+lNIhcpGBhO/AjjGcMy0jp9yvUBXzdsC7Dvm91KwCp08K14tW6r28QegnjGURLoLcRZ4SeQ7ykrDaMFEZSL00Na7IIeAp4QVLbB/MmMPANSU8B0X2FHZkYwXnXB7xI46TfvRkzggUSS1i2ZRJLCBawVaIsqQfj2yGEvtHCaCrYVB4yzAWFz2J8rtlhMjMQ9mjno9O787uj9dH6DZVQKR9fOO7HamNbDFOzlBF6QtJjGH8jRe6mgpXJAV9CdDYFhfBk95MfvLzxZQayA900Qtu9p2dP5bXia8VjC8cewLgbuKHvacP+DtTX4kiXs4bDeIQm+RUIDGQH5vZu2Ds/kB3oB27BDmYH+/f27Z0fzA6WA6GZ5gjjM1g6jlQvGSbDttCkLhvGtuy2/PaO7Q800eeGOoY2bstsyzfNXUNAPynrfbo0aIQvt8pGyJDJaJU6JqkzUhQ1hRVg5NMwpPbsisw1hUGUfKla8ZXZZvMVX5kth/LCatcwopz2BkybswFjHMN/eCoiopAUcocrh0OwMH/7XLAwf6hyyArLhXzUpJwa5g27aFgghaQt7gE4QaNpucOqJOIQ5/aX9/fPh/nJZ9c/W+523ZsWwsKNw5XDy4cqhwbjEHc43e0XoQQ4uaJ/TUkVgNHxUXn8J5zcW4iHmjrfjIwyPqcckaLIm/exxdStHt3jWp4wZ09HFl059dCpNets2py1SNEU4uBqXpBE3epRNVSjOT9HNVSjNUCDYb8lMG1YqmYmdScyWhjF4z8l9CuhXWnX3UP+YZG9sPituYu1/9RxAXxwRFEguMZx7Ipjdk9P83qrsAAjl0ayiOeAfcDWtjGNqVAO35t7sXwkmg7ZOmRcwPngXBQFH5yCYDkfx4ufnqvEZzdtZms2tPhZIxLgj8Aw8B0g2wIgCCxYqJ9OLiz9uNqnYviqOTIOHA5FzgDMNd4OcWeufmZTruTgvSmv8ZYb0pX+80HDfin05Vaj46/6icWfVt/0Z5OyIsl0u4KbO7KVQQBBsBSwt1q5FAA4/cnTAFdl2odxuZW1Vgnl5SPxCX8uKRFhiKDGgV151BilAAqSBQkZ1oXZhpZhV4AtP5N/G/gFsJgKtG715GTyr+U348u4W1f4GiJhJpPeN+fG24IF6Pmgx5vZfjP7g9k9So81arC/6MfiA4tnLLGQAlSAM4iBdx0cdbnctbY/T25sv8GyLZc61PEK8LCZDTeFENhsuF77/eKJcM0vNunbBLpZaQ0RMFsELiFdACZL+Xy1N0laamTukNMPnyarrEk6S8I+PPM3PdkYV6zXQm35L7UTyYnkOroV/kZ4DWcmMKsDC8AVg79GmcyvDf6858qVMaA6WC4zcelSez85bpeRwgj+mu9zG90P6WSvnDK3lSlfP5WcWnq1eizMhFiRBMjMkLQMLJhREnZVcuMebpioLxWLvruvD6KIwsTEHbnxkWXnkZ1Srx5zG93r5PiCnBqFcrJ+eelnC0fr/0xmyRABCVCSNANMSZqMMplrGEkIdXzizTIRXT09/PvcuWYZdX/k8WOPo6y+oo36ubLaatUwH/9m6Wjt4NJ7yqoETGH2X4Pprlzu+lKtFksiymYZ2LWLtw8cWNPGfYMFGN4/nLMh+4F69c36meRY/MrCQT8XLksUI6k82dGxsDWO6ezo4Pz4eMv6P9rPig+J9Vns3/evRp2Z3/nxULJJila6FuvBbZgZX5yd5U/FYtv6/weDRwGc3Jre9AAAACV0RVh0ZGF0ZTpjcmVhdGUAMjAyMy0wNS0yNVQwMDoyODo1OSswMDowMDPIuVsAAAAldEVYdGRhdGU6bW9kaWZ5ADIwMjMtMDUtMjRUMjM6MDc6NDkrMDA6MDDVlNrHAAAAGXRFWHRTb2Z0d2FyZQB3d3cuaW5rc2NhcGUub3Jnm+48GgAAAABJRU5ErkJggg==",anchor:[.5,1]},{src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACsAAAAgCAYAAACLmoEDAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAABmJLR0QA/wD/AP+gvaeTAAAA
237CXBIWXMAAA3XAAAN1wFCKJt4AAAAB3RJTUUH5wUZACIosGP4JQAABmJJREFUWMO1l1tsXFcVhr9/7zPjGY/jSy6NXVHVScsttCBVqElBFU0FFYiXqkitVPEQBA8ERBFPqCIUIZAQApSHFgchSEorAuoTUJJSNalTUNNQLs0FO0qcOE6d+D6ecXwbe+bsxcPYpYknyvE0LOloP5yz1/r22v9Ze21Rpz3zxlrcYgULMes2NCk/Prte0AJkDEWCCkbJsOKVcnu+OT1sFfNMqYGnto/XFTOqF1bzC6Q2NKuSn9kyOT53H3A/8DGgHWgCZoAR4ERzeuSvoGP/mr21d2tu0OqOWc+krldzBNEuuUdlPA62FRP2bqfLng2QYXAMtN9CeMF7Rnc+MPv/hX2mO4cHmfFBQ99GPApqvKETq0YybE7wgmQ/DsYZ55zt/NR04virk0GIZfJ3gn4APCxTlGjJqgILNSL7opkaZXzHOzu/tJRE5pJ+2HV4Dbio1aQnEA9LilAC0HcDCwxFZjwCPFGJ1dp1eE3iXCWGNTMv9CCwg+WM1mFVZkWgL2E8iJm/qbBdR3I479pkfF2mplrZNDPMYuKwSBwWiMMiZjFmNXZZgKzJsK+ad217DucSwSbNkDPCRxH31tp3MwNht6z5+Ejnus/6dNTaulgpFgcmXorHZo63m5mklfME92HhbuAICbSbDNbkDD4jaLgOaOhc//nJT97xI1qym3KAB3Lv3/jYldfPPZkfmDi4biWwABqQfdqkvwGVG2YsKaxMW0Ar9GUEWjKbp7Z27ppuyW7aCLwD25LdvPHeTbumW7KbikZY6Ra8obsMJeJIBiuEaKeGBswCzdnbs2tzH1lXw59bl7tr7ZpsZ9Ys1PYMG1GymrKavzpznbQjRVFNUQKSGpwiX0uSSxOySSttosxa9ZmqDeMolfMzC+XiRK33pXJholTOz6rWTlcdF28qrCAI+oB45TvP5OzpTO/w3mAWrjo7zcJ0z9Bem5ztzYqV5dREbOKsiUACSyQDCwTEUeBxXRNVEpV4LvPvt3dvXKhMDW7p2FFM+TUbyvH0eM/QvsXeob23VeL5dK3MCsrAMW4mbEDBQTeEIUybr/0dJMdCuZg+Pvh0Z8/lXyN5bxbfWg5zhFD215OAiSEz92okSwSbVAaG4mGJ/chCLY1JEELZL1SmfKk8yUJlyldBax13gCwIfisXRixhM5O4RezqzoHcBzB+g7Gtvk74KntDnh37v9d89lJ/hAsQB4f3geCqtayxVOL+kRH2rBYWoOtQcwofHgF2Y+qoF9jMhuem3ZP7nmr9U7moVAUiF3BxcM77EAenIFjMlkpzH566Ujq54RY6UmGV/awoI3uR4O4x8S1BKjkgSIYFhYu96TMv/bKpbb7oHvPOIgcOh7wzAHNVWYRSQ6by1oZMwUHPcKy+Veem60gOC64T+IXgoaSnz7IsJ4ei/pf35f586Uyq6L3JrnKwfKWwpUFQLZvzAXslcT+7bF97YJYguwi227ALq5k7P+OKJ7ozRy+fTRWcw0BBEHjnUXWUAihIFiRkWCNmrauGBfjG9hmb0vwhoZ9jzCXJaohV6T+R+ufJ7oYLUrV63NgkzGTSkDnXVxcswIVMHDvTs8AfanfYS5hW3c7RAX/62B8b36pUFBKACnAGJeCEg4Muk7lc9/Vk63Qb026+kFbqJ6APYdxTC0IyZgp+9M0DjUeLo36uRt8mEEvLNUTAbA44h3QGGCxkszMt5XLyO9i19pWHCjQoZZI7GSrstsA02HLQpdGoLGqh5/WGo+ePp0b53/ZXt9dwZgKzCjALDBgc9lH0vMFfPjcwcBqYua1YpP/cufde2ru6mymOubbG5vj7qTQ75SwyU7VMmeKBk6l/vPJs7rUrk77k3NLtywxJi8CsGQVhFyXXF8O4icp8Ph/n2trAe87391+ljfdsu361Vpmm+O5cc9iTzvAJaalMDfsLh5/PHRw4lZ5w3jzVxqUgaQwYljToo+gyRjmECnE5Nos8jU1N/OfUqZWSuhmwAD/8fQtRxBdyLeFpH1lHadZN//3FzME3DzT2uIiCYBizSwYjjZnM6PzCQkkSPpXifdu2cei5524Y46bBAnzzp+sz7beXv5ttCl8e7E2/9vLepv3zM+6CZHkvFQfT6dmOUomGdJrevr5V+6+7GtSyXHMoFcf8z1Jp+93Y26lCYawhz/jFUrazAzNj+8QEB/L5uv3/F2k1+QZ70J2JAAAAJXRFWHRkYXRlOmNyZWF0ZQAyMDIzLTA1LTI1VDAwOjI4OjU5KzAwOjAwM8i5WwAAACV0RVh0ZGF0ZTptb2RpZnkAMjAyMy0wNS0yNFQyMzowODowMiswMDowMKLS20oAAAAZdEVYdFNvZnR3YXJlAHd3dy5pbmtzY2FwZS5vcmeb7jwaAAAAAElFTkSuQmCC",anchor:[.5,1]},{src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACsAAAAgCAYAAACLmoEDAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAA3XAAAN1wFCKJt4AAAAB3RJTUUH5wUZACIosGP4JQAABdtJREFUWMO1mFuMFFUax3/fqarp7ppLdzMDDCwmzAxegrIka7KLF2JkITFGE5NNfFAeNPuwGh8ML2rcbDYbXMNkszFmH7w8qYmYGB92jcuDwkYwQYzILEFmggODgDANc+menkvX0FXn24dqFJZuprrVf1KpTup85/zP/7uc77TQKv4KmNrvKoJHD0IWSAMuEKIEQIlZpsihGKAT+ENrS7otk3WBACHFejzuAjYDG4FeoAOYAwrAUTo5gOUQ9zLMAbTVJaUlq12A0IvyKMpjCL9JYHUI2I3wPsJFnvu5yQ7WbJRbgeeBRwE/ka0CwgLwPoZBLCewKC8mX77ZMBBgHbAT5RHATbxdARQfYTsWH+WPWE7VtpEITpOq5lFeALYjTRC9lrABbgUcDIf4LQH7kpmbZMO+39gW4Al+TGIKILjAk8AWJLlgyci+DCh5lGeIM/16KGCBCAhrb8uNnNwBPIUlz8vJyCZVyKD8Evh1XdfHyaN3rrqz8PC6h518Kp8rLhZLH45+GB0pHOlFkevs4pC4C2ED8CkJYjcZWcEA24BUPaKC2Idufmj6lS2vMJAbaCcOmfbH1z9e3rFvx9RHJz/qrksYUghbgc9q/lhCsaRkhfV140uhP98/89Lml2YHcgMrge/JrsuvW7lz887Z/lx/qa5ugoNwR02MJZE0wYT4ZLpeG4W12bWZDT0buuvMZzau2LisL9eXaeBkAVaSsN43k9XpRh88x3NFpO6CIpLyjNc445VMUgLNlK6ZRtpMLkzOFYPiZL3P08H05ERlYr6hdkIpab1OStYCo8QF6TqywxPD6Tf++4aNNJq9+lOk0ezrQ6/ryMRIpgGhCPimNv+SSFaQtyIo3cADtYJ+DdmqrbqHC4cz5cXyeF+ubz6yUaowXxgf/GKw/OpXr66euzyXakD2MvAmMMTepUtXMgfsQrD0IXyC0F93jILruJHv+bjiOqGG0UJ1gTAKnRusMlaT4lueX5ps0jBQhHFgN41cJhBGoVMOys50ZZpyUHaWIGpR3iXueRM1M8lbkV2AcgvC28CmxHaN8TnCEzd90PuNeymFsRBZg+NYrInPDz8I2Fwo8FrNIHnXtRfYRpm4KtxDfEFpDcq4qZjBNe+uGUrPeF0WsqJkVSVnjHaoSIdAyg1D/MhG4epfyB09XdJck7cLiJvtPwM7AK8Jglf6Aet/lz6wYt/yf7kLToCoq3E4Sm2AIhK3RUqIUjRwXIyOJlf2irpbqQInUW4HBuqe+PVQG+WVvNM9B5d9liq2CYYuFWkXET9+NH6rtovQAdKF0IPQH8Fcc2R/IDwDTAD3IOSTmprAlPJHs/s6T7VfqPW1KrHmtUfit4iCqIiqiIiiHqoXmyd7hfB9fIuLIb7VLh0OlrBjzD/YfTh/TFQ0mT9EUBUVuaAiXzRz3F6LEhHCWyj/RG9QemqapSdSI8u+yg1JJDYBUQGMQgAcNbDHpNPnW7+erAZmKOLzN4TbUH5Vl4SAM+dczA1lD3oz3kKd3QgIqrWtCRbVBeAkIieAc8VMZi5brTZRuv4fHwMPAB6XiJgHtiGkrsr6OL9DFrtGuv6THe4cE5UriRa7FzEgCBqCVIDzKhx2XfdTa+3xB8+cKZzM5S4vn59n5OzZFv/kuBqD4JScvPXtX9TVpxHcqwhH/tn0lyv29+x359wAE6eVqiIil4F5VYqCnhExoxFMqBBWpqai9nweHIdTY2PXxMaPhvesJ2TYEPrha+rp3T+UKff08gPde/xzmUk16gBVoCgil4BxETnnuO55lKq1IVE1UnUd/I4Ovj52rF5E/TTwXvCwrv1dlIn+gcMqsyiz+SO5Pfkj2eM4FIFxVL9TKPjp9MXK4mIgIjiex5pNm9j7zjtLrvGTkQXofLozXVlW+VOUin7vn8/sX7l/+W5TMacRnXJESufa2uZXBQGptjaGR0ebnr/1alAHYToM3JL7d+3W91KT6WK6nJ6qXjgT6NpeVJX7Jyf599RUy/P/D0pQLH84wUhqAAAAJXRFWHRkYXRlOmNyZWF0ZQAyMDIzLTA1LTI1VDAwOjI4OjU5KzAwOjAwM8i5WwAAACV0RVh0ZGF0ZTptb2RpZnkAMjAyMy0wNS0yNFQyMzowODoxNiswMDowMJo3/8cAAAAZdEVYdFNvZnR3YXJlAHd3dy5pbmtzY2FwZS5vcmeb7jwaAAAAAElFTkSuQmCC",anchor:[.5,1]},{src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACsAAAAgCAYAAACLmoEDAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAABmJLR0QA/wD/AP+gvaeTAAAA
237CXBIWXMAAA3XAAAN1wFCKJt4AAAAB3RJTUUH5wUZACIosGP4JQAABapJREFUWMO1mF1sFFUUgL9zZ6bd3ULbBUpBJVTwB1E0UaJg4oNGTUw0MZoYoz5ojKAxMeFFQ4wxBh8wxhB/sWriPyY+GH+RBDT+FhQVFaSBQrtQhRba7ral22l35h4fZosou3R2qSe5mWTm3nu+e+6555w7QrWizwI1gAB1AiOzQBqABOACAeCD5qCnH85QcIA6kNurUulWDUstkBNIL4b8cuAq4BJgDjANOAb0AL/BnG9At8HS3dCm1WqU6qz6ChDOAbkNuAO4IsZU24ANYN8H04us/J9hdT1gBOR80EdAbwNJxRwMkAfeB3kK7B5wFFkRW32FbhAIeOcAa4CbQSoYLwAp4C7QFMij4O6fWEUcMfGt2gp4jcBDEahW6+8ucAvIQ1BojHZrqmFRB+Qa4O5IYXXuHom4wD2g1xCFiCmE1VZA0sCDINPKdCq28IQ28a5k/2nA/UA6OrCTS9ytNMDFwOXlQdHLaOq5iflOmtrGLGO5jzkY/sLROaBy8k4IwHKQJcBXxPDdCmD1OpDaUqAC9kZaBtaxnIXU11GM/ndy7tAqtvZ/SmZmaWBqgWuBb4mSyKQWiwkriynpX8oCGgafZOnwQuqbgeOw51DfvIalwwuoz5UxnANcBBqLIy6sEGWmkqeqhenJJcyYWWI+cwkzZpxNfbL8vNocWX1yqST8JEq/VjyMK0hJhYLUeohT3iWl3EJOkgpCF4PljNOHfyzLWF+prwP4fUfxR04R6nJTDKsWtAM0LAW7m4FEK+02RIdP/BKiwy/Tru1kk2VgQ2AvYONQxHQDtSBtREXLfw6ZkCdIrOXX5hzj3fexKFeP1zRE4Wgru8dbaZ+XJ6gpA1sgKnBiwcZLQ7peQM4GNoMsKNGhuHITpvBwESfAhnkCAqxzCjWdINcCGWTFpHE2rs8qcBjYUNoKAggB1hlizBnAZ4hxZxJQC7xLVPPGKmbiJ3htBfQ8kDeBZbHHlZetIHfPu/n1ve6vhzAWQmtwHIs1ggAp3+eqnh4mSp0K69lWD7gFWAfMrRpT9bAZyK8+89ZXP05k8l4ArrGY0BrjODa0RqzAeNL38xcMDvm/N81mrmcrhoWoJn0cWAV4FQyObGPVpr7r+mb2qk8+co8M+zjG1cgdi+lYFREFLEqAkjXwhxjtqLzOi4BbQF8GrqdMMijH6+3v65z9yMZPkz8czOE68u+Kobgg1eJDAKzAqEU3V5IUIonuTgdA1wFdlQw1udFcwzs72pLbu7O4RhGsRAet2CR6ilgQK6JWBFE0hWpj5bARsEJ2C/Ai0b1qcimEQd2XHT81bNjRFV3j4myICKqiIofUmI7qYAE4EoK8AXzIKUOPgiqJXT3tM577foeMBzYGqABGwQd+M7DRJBJ/ncZ/gwsAssDTqC4CLi0NITi9w72N67e2eZls/uQjHXmtanFlgkU1D+xDZA/QnU0mjzUUChUVMv9hWFk0G79TCNcRTtQFE0aOnuIXxqZ/sLOt7ot9vVHukGgFqqKKURVQDYARIKPwheO6bytsuiGTaQeOzcvl6Ny377RufUWmVpxMX9o21T+hSe8BjLjHT3WgYerb/dtnr/78a/fQkI9jBBBVRUTGgRFVsoIeEDEdIRxVIRjt7w/r0mlwHPZ3dh5XdRpu8I+FzfbVOYPzWjCr7jJNeVdiJApTBwYONr7648/un4O+usZBtQBkReQIcFhEul3P/QulYG2AFELFdZg1fz67du4s4VBTJF7XWmyNc2vYVPc8njPXDPrD6Re+35h+qe0PatwscBjVPxV6UolE7+jYmC8iOJ7HWcuWseWttya3y1TBAkzf9HBi9MJZj4WNyXtTWw983fzwZxvMQL4LI/2OSK67pmZkru9TW1PD7o6Oiuc/fTc4QYKZSd/NZJ/RRe57tbt6s4nObH9hqMfXlhZUlav7+visv7/q+f8Gb188Ax2DNawAAAAldEVYdGRhdGU6Y3JlYXRlADIwMjMtMDUtMjVUMDA6Mjg6NTkrMDA6MDAzyLlbAAAAJXRFWHRkYXRlOm1vZGlmeQAyMDIzLTA1LTI0VDIzOjA4OjMyKzAwOjAwLF3cqQAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAAASUVORK5CYII=",anchor:[.5,1]},{src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACsAAAAgCAYAAACLmoEDAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAA3XAAAN1wFCKJt4AAAAB3RJTUUH5wUZACIosGP4JQAABQ5JREFUWMO9mNtvFFUcxz+/M9N2d1HaQgEbNVy8hEiURIIBEx98MTGRhIR/wMQnHzThQXwyPhkfjBcwBg0mKiJiTIiYoCQKEWOoEZWLXCIt2+VWWnrZddvSLTszXx9ma8tll9m2+EtOJrtnzvd85nd+8zu/M8Z0TZr6y4A2oBlIAT4QACWgAAwCkwPMpjWlP23YSchHgLXAU8BK4B7gLmAE6AWOAT8DvwKnroP+X0wC6R6kl5F+RVKC1oH0EtKiG1bljkIa0nKkT5BGE4JOtNHKuOUVnTsKa0gPIX2NVK4TdKKVkb5CehBpesGb0KutSO/PAHQq8JaK3h2B9ZA2IA3PEHSiDVf0vDvh1TakA7MEOtF+qOgmwkiauhzwGPBErUdaBb3rwGuFljwUvoXwzziVVYvNtcCjwE/MWkqTfKQ3q8WqSeE6qb9L6pE0IimQNNIp9Twn9SNFNWL3DaSZ5vvrYBuR9lSb9AFp6JiUlRTqeguPSNll0lAV2Kii25h0eZOYUWM5l0D6UZh/Cz23EuYthXQN3UVUD5PrrB73p6p1NIBvVSY0aGqAWm98moSW1LMA/1TrGICRPAzcqm8IBvphtIZuYbZhI6ATCG/VeQpSH0EUwvDU/0MY/hB0urr3QuBMRX+WLN4QXkAaq5Yzm6XxV6WuLun8FWmsSzr/itQ1VxqvkWfHKrqzuDHENcEypLO1krwvBXOlYJ6kuVLgS8FtNoWzSEuT1ghJw0DAZWBnrSULwCuCNwQUwQtqv1gR8AVxzZtoQ0he9cRb4sPAZ8Ca6S7SFOsAnr9//foz/tGjuAjCyOF5EZEzDMiUSjzV28vWyoDkqcsMpG7gPeBdoH3amNJlNzT00b0bNvSncrmFQczhKi2seP2a4Gp/OlN6eMFC2huiOjw76d0M8DqwEWioGzSKoswvv/y8cOPGPf6VKyU8z1cMWUnVEmYCIkSAyDs4aU6d9e3JsXevAluJz1vPUGcoNWSzudbNm4/7fX2t+L7JbIqAYjkpvsT87YKlofihnk1hEhjOEYdCdz1DXaFQaN6x41D68OE8vi/MIouXvNIsvppFYJGZIjNMKIPUUj9sDCzgR+AD4GqiMeVyMOfAgd+bd+7sxrmEx3EzJJNZj5zrnB5sbCHwKfANt0s9EqkTJ07P27LliF27FiUANcAp/u5wzMF3LpW6NNM6Mg+8hbQceLwahNfX19eydeuhhlzu6s33yOC/g64wosp70YXZ38CFfDo90lwu11XI3PDsRsWjxymX3yUMh295W6k0fvfu3Yfm7N/fh9nEuHh5hZMMpIC42MkJ9nu+/7lg37O53Glg5P5CgWxX1wy/yMTZIfJ6evZGCxZ8KudexLlJzSAI0x0dR1q2bz9j5bLwPANMEmZ2zWBUIg+cc2adIfTLCIr9/eGc1la+X7aMs9nsf3IzP06Y4Q4fLjj4OGhrW6VM5kmci9PUuXPnW7Zt+8O/eLEk3/eQykDezK4Al83sgt/gX0KUoyjAyqHwPdoWL+bEX3/dNNWsnH3Kq1erobv7uCsW3wmbmpbiXLsrFofn7tr1W+bgwT4aG/MGl5EuCnrTTU19Y+PjpYmHvW/tGn7cvv32fpkN2Am7e9++1NiKFa+FLa0vZDoOHVy0adNONzTUjXODnlnhQmP
237jaHupRFNjI6c6O+vWn8VTJQTz55f8XO5tLU992XTiZD6VzQ6Wi8WSlixBEk8PDLB3cHDa+v8CFsk24crxS5QAAAAldEVYdGRhdGU6Y3JlYXRlADIwMjMtMDUtMjVUMDA6Mjg6NTkrMDA6MDAzyLlbAAAAJXRFWHRkYXRlOm1vZGlmeQAyMDIzLTA1LTI0VDIzOjA4OjQ3KzAwOjAwdKD6FwAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAAASUVORK5CYII=",anchor:[.5,1]},{src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACsAAAAgCAYAAACLmoEDAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAA3XAAAN1wFCKJt4AAAAB3RJTUUH5wUZACIosGP4JQAABm5JREFUWMO1mFtsXFcVhr9/nzMXj8ceu4mVG1VSFwiq4iIqKClVHygFqQgkRKNAqjyk4gFC+gBPRYI8IISgIKgQjdKXiFKUi6IGVQKiirb0kjakCiJtrk0dO26cxHbsiWdsjz23sxcPdkJIxs3xpGxpdGZ0zt77m3/9a+01I5ocXd99lrJLUnfQPXGnBtr6FxuWk5QGC5HqZpRlVlgzkckfzU1b6Opks5cZ+sUPmtozbBZ2OkjRVaxotD1910Bb/33AA8CngaVAFmMKGAbePd4+84ZDhz6x+sDJ0ye+ZM3uqWYmtXx/D4H5pSbWgx41+DwyhOAqyuwbk+Y2skPALnm3N8JGZrZv+P/CZjfvJgIhrRb2hLD1JjKKsYwBMqYN9prxJI7THqyyLT70gmygyEmB/zjYzxDfAMI4oFdVERnMNkrKGPy4Cn1cE4ubjSDug61bdoKzTqQfgW2UCJtxkSSHbLVQEJodSt27rlw7vC/WXBd3E5MFJnsQbJOkpkD/q7JC4DEHD3ostmCxYLOP78HVw05MWxDZhl/GjMgb1bqnUo+o1j2RN8waR1mQRfpeaOrMPr4zFmxczzocdyPdOx+okH125W3DD/csDzoyyY7CdLWw/9iF6J1zl5eamaRGkbD7TPQArxHDu7FgzZsDvoyRuj76c8r5r9694vIvv/kZuruyrczmQuu3P7dy4onnj+T3H7+waB7glMFDwAGgfnPF4sAKZ+IudGNCeoPurrbi1q/1THZ3ZZcAV2G7u9qWbP16z+Qdi7MF31i3wGCNmWJxxHpIIM2eTDdI481Yuai1Zc3y3KIG67meFR23rVqcbfENvSvJtESmWNm6kDqbbqi6QSJw4TymRFIqESiw+R3ZEhcgZukywIqNcsAJ8lOVqcJ0dazRzPFSZWxsslJy82knCnGrYDxYw2P0AtH1twInTl4spHe8ecZ7b5PX3vPeJne81Wcnh4otQWPaCHgf8HEwYtrAebCDGI9en2SSmK5F6d/+/dSS4kxt8LH77yy0pRNdE+Xq6B/e7KvueKvv9plalHQNXGJQAzskUyzYWAFo3bxHTnaHh5cQ3Q3FNyMRuCiTDAmcgshbNF2tU4t8MI+dMazfyx4KzA2Utm24aZ2Ne9yaR0PALmyekEnUIh8UZ6rB5VKF4kw1+DBQzLyMnc4YJmYzE/uAb92yB8x/EumPGGtvoTWYU5V/Stq0+MDT77vCIM5D5B1B4PFutpfLlMs8MDzM9rk5sZuI2uHnSaxdNyGjCNyPaGue1IZctfTkon/86kiqNNbuIScjZ6YO5yxrUlaQCut1MpGP6stXaM3idi2snzVqGH8B7gH7ISixEC1nOwjzqbHe0x3v7O105YlvmVzoZnsPBc4AzM3awpdT6fqRrvS4gxNDkXoXHMzWLbuR2SqDZ0z6imJa6YopE5OX+nPH9v01mT9bwAUyrl1g7pPZ3EUAXjDjsZdi97NXRmnbBgLvPzDpKeBsnNS48oirThcy594+mLw8MI6czYF4rr40e5U8yEvmJWRYBrOOBcMCFJ/ZaJVc58uCbcim4ySzfFRPX3rvX5lzb5+92m3cfJYwk0kXzbnepmABokwucuJZgxfsQ2kNmZEoXjiV7X3liKK6jwEqwBmUgXcd7Hfp9IWm/zdYNDpIXonxjNV+LbNPgd1Dw1NKhJXiSLbvtYNhaWz6RoubQMw1OobwmE0DZ5BOA4PjLS1TuVot/m+w60f+d+tpsbrJ7Cg+egpscjaX50Q2wwBXr1XS5/99MDXy3sg14Z8Nr+HMBGZ1oAQMGLwShOGfDF58eGDgFDB1e6FA/5kzt1raZ6uDK412+lT7TwmSm00KZYZJyCxKjZ4+nDv659eDcrGMnACZGZKqQMmMcWEfSK43glET9Zl8Pmrt7IQgoK+//3+8ccujfcPPRSrXE6Wy2wmSX7jSS4dTo2dzx1/YnxrtHTO5AKgB45IuAUOSBoMwvIBR875OVIvMwoBMNsvxY8du2OcjgQVo3/Q05oJHfCr7e3PhMledmcyeeXV/tu/VE7hwHBjC7LzBcCadHpmpVMqSCBIJPrZ2LS8/99xN9/jIYAG61v0kXWlftjVKtH4nNdb3eufRfbtUK50F5QOpMJhMlpaVy6SSSU729i54/aarQaMRJbNlVxr7jW9L7E5MXBxPlvP52vmRMitXYWZ8cWyMv+XzTa//H6b399ILDmv5AAAAJXRFWHRkYXRlOmNyZWF0ZQAyMDIzLTA1LTI1VDAwOjI4OjU5KzAwOjAwM8i5WwAAACV0RVh0ZGF0ZTptb2RpZnkAMjAyMy0wNS0yNFQyMzowOToxMyswMDowMCfNu14AAAAZdEVYdFNvZnR3YXJlAHd3dy5pbmtzY2FwZS5vcmeb7jwaAAAAAElFTkSuQmCC",anchor:[.5,1]},{src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACsAAAAgCAYAAACLmoEDAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAA3XAAAN1wFCKJt4AAAAB3RJTUUH5wUZACIpx2TIswAABhBJREFUWMO1l0tsXGcVx3//e+94xmPHzsSxPXm4NK/adRKKQISUKjz6QIBKFIQUpMCiwIoFSF3RDQsELCIWCLEosKiggiyyQKWQSFV5pJRHUKpaVbDj2HnUedmOPR57xmOPPfd+h8Wk1JbH9Z1p+kmf7uK795zfd87/nu98otHxkScgbAYLYM4XbdFWsHZQCiNAhIgy2CwtTTmKy0YgaHfwj5cbchk0DLvcCh23xcyOftqiRzGOIB4BskArMI8xAbzFfOXv4J1nb2KIkWVr1KUa+qr/GMhlMR0HToA+gRlohbm1SOcRp/B0GucmGfrDBwy7/yg4T4he4HtgxzGl41kyQAvAabCTOF0GZwzHl4RfF2zXPoH2gn4MHMeURHG3LDASyA5gZIEBQsszM/IBwO4/CngZ4DlMXwcLVqU9Ji/IA/UifHzO0/VwmanhWJ97dbjyMR4HnkHUD7oaOgC+gfQ4ZrEDFu/F/i8DdAA/AXpr5t2sOsMIogicvftarY1JTaAtyDtDV99CnOjGLV0epg8jDtVcNQOwjx3cN/Glz3zcz7S1bM4XSrMvn7sQvTl4JYuZ1snEo2AHwc5Rq340Bmse4imM5JqgmiFwT3/20MxPn/sme3qyLVQz1vK1pz9VePbkC7k//e1CxzrASeBJ0OtAuHHE4sJi/aiGbJyx+4Hs3I++e6K4pyfbDfwfdu8D27p/+J0Txd092VlcjcAZPsYBXDyOmLASKEstsTrHgzu6mw8+9KGOGva8R3of3LJrZ3czztU0DNYNFutvree4Ta23kAj8QKotSknJRODX/pGrpaw5LkA9pWuutkMxnS/O5wvz07WWZ+aK01P5Quk9St3s/YU1c5iNAtGaNd9j6MpY6penX3GRc8WVS5FzxV+cfsUujd5oxq/pKsIYwXDEGPHqbGefgA7E50GrpSNRqYTBG0NXmwvFhfFdO7OlyLnkxHR+/OQLvy/87Ldnts+XFpN4tWBtGfgVaIDp4Q1LV7xjqO+o8LxdwKvA7nWiTxAEUbo5SeB7fhi5aGGxTBhG/voSsGvIniTy3mb4pQ1h42rWEONgp9ZPmQjD0C8US/7MbJFCseS/J2jVzu8wTRDjQIgfWYD9x8DcQ6DfYDrcYCe8kvbfwDM9iyMjgVvAcxA5D99397pQSJfLHJmY4Pl7X8TvuqaGoau3AJoDPYbY1DinjXsWntxZHhpIuaU2B+0y2s202fOs1aRWQTIIQ9KRi8LtO3Rga5vqvdZUMP0R+CjwLJBogNSlXfFy19JYJrDwqwaBBx4e8r1qj+FVZeHKyVQ40JnKezA4Hmm0vuZ76jJ09VUQV4D9wB4M1SOJhCtf31q583rSLQmpzaQWSenqtOrTrEWiFdSG2IrYHcF8fbBQlUN3/xzmpoDHQJm4sJ6Fs5lw6i+bwtk7AEimahTvTVWfkoFMMpMkwxKYTdYPC3D3EuzreZtyk4d0hDhyMAtbo7l/dVQmLgqzeM27hJlMumPSf+o5blePlrkI6dfAS2xUesxIuYVLWyoTAzLnYoAK8AzKwFsenPVSqduNRRag9RBAGeMqZocQ29arhL5VJjsq4682u1L+nYCt2IlAqrbFgHCYlYBBpH8K3syn09PJMIx
237//1kzJoehsw+Mu2Al0FNIyRUQgJC5pbYo99f2KHdN74JW01u9PCIsBC0Ct028EQTBOefc4BfHxiaubN683FkqcenGjfdf2uk/hh8uZZwf/MDkfbvaO1RBMYvSUfFC1/KN1wKrlKm2kTIzJC0DJTPywsYkbzSCKRPhYi4XtWQy4PtcvXZtlTbe90js/ZxI+AdDgucN75PvpDnhytc7l26dTbvCtCEfqAB5SXeBcUk3/SC4jVFxLiSqRGaBT7q1lf9evLjGz32BBUj0fwHn+ErkNf0ctM2zsJipTJ7NVCYHkZcHxjG7ZTCRTqUmF5eWypLwEwl2Hj7Mn198cUMf9w0WYNPDn04tkv5+RPCtdDT/Wnfl5inPwutAzpdmbzY1lbaVyySbmhgaHa3b/n2Fbe57AnO2peI3b2+v5PJZG89Vbtwq244ePGBfsciZXK5h+/8DFYWTIIiuQPwAAAAldEVYdGRhdGU6Y3JlYXRlADIwMjMtMDUtMjVUMDA6Mjg6NTkrMDA6MDAzyLlbAAAAJXRFWHRkYXRlOm1vZGlmeQAyMDIzLTA1LTI0VDIzOjA5OjIzKzAwOjAwqUK8vQAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAAASUVORK5CYII=",anchor:[.5,1]},{src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACsAAAAgCAYAAACLmoEDAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAA3XAAAN1wFCKJt4AAAAB3RJTUUH5wUZACIpx2TIswAABilJREFUWMO1mF9sXEcVh78zd9fetZ04TkmcKDYqJSalpaSyLUiRooqqIOWtLVKREA9FPEBUqRJ9QQjxgHgBlTZCCJXHECCgSolQKBGiRSJBSiNCGjWhMYljJ5FJ7Tje7np3bd/duzM/HtZFCazju9twpNU83J0z3znzmzN/jA5tZGSWfD7GucDWrYkVCtmPgPoly5mRARqSYqBUqVQK/f398h5qtQwXL360ozEzncL29y8zMbHFdu2af6hQyDwG7AV2A9uAPqAKzAHvbNiw4WQI4fT8/MDFwcGiOh3TOuk0OjqFc7YtBD0LfAX4LAgwbA2PEqeBwxKvmenm22/v/P/Cjo9P430wM9tlxreBZ0E9ad1ILINeA35kpkshoHPnRlKP35YMoshZCNoJ/AD0lETGLH28ZvQAX5Xokfiu1JiiOSWpzLWT1UbDbzLjBdBTYG2B3oacMeMZsBfMspvGxqZS90wNK1kEPAE8Z2YdL8wPgIGvmdkTQHRPYcfGpnHODwDP01zpLYIRIYgkEfV6sw1BaI1JNrM+0DdDCAPj4+mymypDEi4E+zToM60WkyTA9PDD3XN79+ajjRujTeVyKJ08ueQnJmrbJKyVZMx4zMweAf2FFNpNBWsmB3wBrLs1KOHxx3vff/HFzQwNZXtpTm3vvn195VdeKRROnFi6D9QC2LqBJyX+CjTW40ipWTnQQ7TQVwgwNJRd3L9/U2VoKDsI/Ad2eDg7uH//QGV4OFsKoaXjCPSppv/1LdWfJExiGy00IMGOHdn8zp1d97Xw50ZGujbv2JHJt9auDBgkZaFOKQMDyK0RCJkMGVujjplZdxRZ1BrWAOXTMKTO7KottoaBYtFXy2W/0Op7uewXSqWwtHZJtlLaHTCtZgNoEuT/+0sUwdRUkjt6tBxCUOX2byGocuRIWVNT9XzUoppKeInLEoEUlra4B+AUzUPLHcOaGXEccgcPlgYrlTDz9NMbS729bsvSUrh19Gi5fuRIeTiOQ5dzLUtXApxe9b+upcr/+Pikec/HnLM3wB5omXuJTMZ8LmdEkUXey8exaDQU3WVbnpbck1Gka2fOPLBunU2rWUWRzYIdXisLZkajoahaDdHioqdaDdE6oEHi1xDmpHSHmdQnkfHxKbznE2b8wow9afvdxd6SoueWF79xudb4Jy6AD44oCgRnGNATx+ydm+PVdmEBxsauZMGeAQ4A2zvn1GwIpe8slp4/FoW5bAMyLuB8cC6Kgg/OgkE9H8fLn1wsx+e3bGV7NrR7rbEE+D0wCnwLyLYBCBhSCI3k7KWV6g8HLBS+LFzGgcNhkROsbpdAiLtzjXNbckUH7856m2z7QLp6/rxf4udmfLHd2fH++vRy9cev++R8ySwyYbc5aAaEtNoYQDBYCeiNdjYFAM6e/TjAdTMdAF1tp69CuVSPj53yyYUiRAIL1lywqz9rtmYBLJgpmGFCPUib2oZdBVY+P/8m8DNgORWoGo0kOf33evz6VXCku2WYIZnM3pNzkx3BAvT1ve8lHZT0O0l3KT1CEt5fnoiXD52TkpAC1AAniIF3HBx3udyNjq8nt27tpF5XsavLXgIelDTaGsJQWLhZW/7tqeBvLP+vxGXNhbcamRGQloErmF0CZor5fLU/Sdo6yNxhZ88+SDZrMrPzkBwAX/kgk81mdfRQq9VrfzqVJKduNt8VbDUCmYSTDKQGsARcE/w5ymR+KfjjvmvXJoDqcKnE9JUrnT1y3G5jY1N4f2PAuc3fh+79Zi5zW5nyjeTMmZXqyydCmI/NIgNMzXtOHViSKBq6buYmPdyS0VgpFHzvwABEEVPT03do40Pb7t3HzKz/Eec2vwq5z5m5ZqFszFxdWfrJ8UbytwXIREACFM1sHpg1s5kok7mBSEJo4BMvZSJ6+vr4x4ULLQR1j+zRR09glv2S2eafmmW3K1Qr8cqvjtdWDr9rli0Cs0j/Esz15HI3V2q12MyIslmG9uzhzUOH1h3jnsECjI4ezEkj3zPr/3ojOXciXnrpsA+LVw0rRGalma6upe1xTHdXFxcnJ9v2/yEfK+40aSD2/r2Xo6j7N95fKYqZgm4UY9txP5L4/MICfygUOvb/b4OFAZuQsv++AAAAJXRFWHRkYXRlOmNyZWF0ZQAyMDIzLTA1LTI1VDAwOjI4OjU5KzAwOjAwM8i5WwAAACV0RVh0ZGF0ZTptb2RpZnkAMjAyMy0wNS0yNFQyMzowOTo0MSswMDowMPiypBMAAAAZdEVYdFNvZnR3YXJlAHd3dy5pbmtzY2FwZS5vcmeb7jwaAAAAAElFTkSuQmCC",anchor:[.5,1]},{src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACsAAAAgCAYAAACLmoEDAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAA3XAAAN1wFCKJt4AAAAB3RJTUUH5wUZACIpx2TIswAABfxJREFUWMOtmF1sHNUVgL9zZ3a9u97gXRITO4CwImhpAqXioQ2oeWgESPAUgRQk4AHEQ4uQqJAQP614QFVRItSi/tD0CRVo08gR/xAhkQRIIhMURJxAfm2vHdzY63g3Hv/P7s7c04dxCm7WYXbJkUZXmtl7znfPOffcc1doUn7/smJSgIHalUiiyApR2lBSCC4QKPiAN62Uc4IaB5al4Zd3SVM23WZh3Sz4g0hLF2sSo9wCrAduAjqALDADFIHDy4S9Fg78fC3H9h5Bm7XZ1BI3dyuidChsUrhP4GcxNB4AtonQLZaxJ+9t3HRDM7Z0Kwiiyg9RnkLYBGTizFUFEeZQug1ssYaTVtHfbIqP0FgaWATDtcDvFDYCblxTIqCQEXjAChlVfmuFAYifFqYhrxpyCo8BG0Xig/4PGFDBVbgbeMyx5J7fHj+FY8OiOMAG4EG+x8aU6HFRHgI2CDiXFPb5HYoa8gqPEu30C9eiYBVCC0EYjVaj90tIFviVFfJxvRvXQ0bhx8BP64V+YfNoZ57itZ04LUlylSpe3yhh8Rwdqoj830QRUOUWgRuBj4mRu7FgBQzK7UBLPVDAXreKcxtuglyWVqLQtq65hqndvZT7R1heDxhoEbgN2AcE3+mxWLCKEVhTL78UyGeZXL+W6VyWlfANbD7LyvU3MJ3L4tVzm4AjcINIPI54G0wRlA7q1GVVaGslvaKN5XX0mSvauDzXSlrr0wrCSiRevY+Xs5Gq1FKfHYMrSxgUocWYpXe8QjoWQ2zPRjK51DrmKsz4VUr1vvtVSvMVZpdynSiexCy1cWEt0AeEdTzH+CSp3gJWlelFXlOmDw2g45OkpT5tiHAKwcaBiFu6rEIPUdOyKKQiEISkDpxgpV9l+Cer8ZIJ2qs1xnsLVHsLXB2EJJeArRE1OJcQVrCqfCTKCMLqet71qyQPnqKrdwDE4KhlVS06HBxZKgeUEZQ9EtOzcdNAxTIKbEPrKxaJwPwaznwF/BrORUGjaP0LoY
237jEa2Zi9yKbtysq/EDgFYR1ceddRD4V4cG3/7Tx1OhwL8ZCaA2OY7EmKi0Z32d9scjWRmEBNndrgqhjehHobJZSVUfnZ849s+OP97wTzAwlAnCNxYTWGMexoTViBapp35/70eSUf6T9CjoTtuHuqQa8C9wMPA4k4gOe7wesPXNq/8mPtz+er0ydvdcYxzVgMIhjFEBNdDBavyUVHGpPTRg4OhpKX8N3i83dCtClyt+BOyTm6bOAjHd2oLB3x1PvFQufecZxRRcdXwrIwspAVQCswLxFP2zkUADg6egacpooFQYbmevPet6xT//ZUxw8OCHGVRArUdlaeCQaRSyIFVErgiiaQTXXMOwCsNZy7BJ4CWUuzhwb1oKvj+/5/MSBbYMipm4LdqGIoCoqMqLG9DUFC+BdSSjKPxTe0ov0oqqgqpTOfHX80K4/HwqDqo0BKkQ9tA8cNrDTpFJnmr6erDoMk2kmMgEviOr1CjfXgxCB2cmxscMfbe2ZKg3NccFvVEDO98WKYFGdA/oROQkMT6TTM221WkONzCJ54n4hHaAuHLFB7UW14fR5T357DGt+pe+LN3pOH9s9hsj58EfhVYyqgGoAzAJDCrsd131N4YM7h4aOAzNXex6F/v7m/uT4tmzpVrzSUD6zrP05N5F+RIxxvylTQTh8Yt/B/a8/88mMN+Ib4wggGl0bqsCsKhOCnhYxfSGMqxDMl8thaz4PjsNAobAoN763/PqFg5LOrLgxc9mKrYlk5lYRAyjeeGGw581ndw6f2FsyjusQ1ekJETkLjIrIsOO6Z1Bq1gaEtVDVdchks3z15ZcXptSlgAV4+qVB3GTynnS2/S+Ok+iszE1O9+75687ePX87atzkhMAoqv9RKGZSqbH5SsUXEZxEgqvWrWPXq69+p41LBgvwyHMfpC7vWPtsSyb/8Eh/zyf7dzy5bX723KCIKTsi3nAyOdvp+7Qkkxzr62tYf9PVoJ6kWpf7XnnoD8vd1L9LI0cnvFKhzNkpP9XVharyi1KJ98vlpvX/F5vAnOxV5r8nAAAAJXRFWHRkYXRlOmNyZWF0ZQAyMDIzLTA1LTI1VDAwOjI4OjU5KzAwOjAwM8i5WwAAACV0RVh0ZGF0ZTptb2RpZnkAMjAyMy0wNS0yNFQyMzowOTo1MiswMDowMAXwvhAAAAAZdEVYdFNvZnR3YXJlAHd3dy5pbmtzY2FwZS5vcmeb7jwaAAAAAElFTkSuQmCC",anchor:[.5,1]},{src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACsAAAAgCAYAAACLmoEDAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAA3XAAAN1wFCKJt4AAAAB3RJTUUH5wUZACIpx2TIswAABa9JREFUWMOtmGtoHFUUx3/nzkyym7R5tIlNfdCH9f0CLdoK/aCoICiUFkTUDxWxKoLQL0oREdEPikjxGaP9oLVW8IOo2GqpilqJlfporU2oaZKNaW3SZrOb12aSnbnHD7PV1O42s2sPDBdm773nd8/933PurFChvYxSBQhQCzIBTQL1QAJwgQDwFbIDkD4X1In6cjdSkU+3UthqIAvSCJfnYCWwCrgGaAHmAOPAALC/Bb5T2LMcOtpBK/VZ0RLfQgmhReAu4B7ghhgT7QG2WfjQwOBDFbgua0QrigERuEThCYW7BGrijC2EMwd8KPCChUMO6PoyEMqSQQDiwTLgWWC1lDG+gFQD3KdQI/CkC92UIQsTt2MbigcNwGPAaq1c7y6wRuCxPDS0liHh2LAKjsDNwDrArew8R1bYkfs1ms85q7BtKAKNwKMSnfRii0GBcMZz8l2J/nOAh4HGt2JGN+5WGuBq4PpSoIA2X8fAojtxqhtpmMqQ/fNTwhO/0KLRofxvdAFWClwFfEMM7caGVbhVovR6OqhgF9/B8MpNUHchtURbW3vRvYz+sIF06jPmFwMmmu8WYDdREZk1YrFgBS6niL4UqF/KyPLnGKu7kAXwL2zdMhYsf5axuqVkS4TNAa7UmBxxYYWoMhU9V3MXk5x3FfOLzGfmXcO8uiUkS82rsEBj5vty0k+i2EsFjIcrUtyhCNXi4ZQSpFByIadZ7NQFjJRwhj/E+FSGoWK/+8MM+SeYOEPosmcVVsEqdGmUkU6DHe4g0dmG1ZCxU8aFjHW+iWY6SZaADYE/ABuHI5YMFKxAO9Gl5ZRDJkCQI7HveRZMZ+m/9EGyXh3N+VFOdLQx3dnGBUGOqhKweaILTizYWMJuRUVgCbBLYGmRxQBgXEKvBsTFsQFhkAMb4JzBSY9EqSu1Hpk1z8bVrALHgG3FoiCFxwY4U6M4/jBMj+LMAmqB94nuvLFKWOwS34aicLHAu8CKuOPOYD8IrNvasvqP/up9GAuhNTiOxZootdT4PqsGBmgtF7YA7AFrgE3AwkopFT2WM8MbN5+39tO8SXkBuMZiQmuM49jQGrEC00nfz102Mur/1nwOCz1bNixEd9KngQ2AFx8wioxibSrx/Xfbmzd8Mu4c9x113EIFk0IPRUQBixKgZAwcFKNdZd/0CsCLFd4EbpOydkdJe909n89/4rMjiR+zDq4oM6tJYUmqhUYgykSTFt1VTlEAoPDt1KeRFHrLGTtpstl9c7e2H03szRhcBbESHbTCI1ErYkGsiFoRRNEaVBvKhi0Aawa+BF4n+q6a1ULyQXfy65/2z93WKxgk1oaIoCoq8pca01URLMBxCAXeAT7mDKknuoArg9W/d7Y3vPJrINM2BqgQXUt9YL+BHSaROFrx/waXRU0GeFHRS4Fri0EIMO4MDv5Y39qe9VK50yWuAoJqYW2CRTUHHEbkENCfSSbH6/P5si4yp1hBuwr8FpLfpIRjJ1/MbPP4UwfmfNR+OPnVIMjJ7Y+2VzGqAqoBMAGkFL5yXPc9hS9uT6U6gfELsll6Dh+u8H+cGdaGMuSkGuts8zOeJh8RjPtvmgrC3sTuvTubNn476v7lm6igiaoiItPAhCoZQftETFcIJ1QIJtPpsLaxERyH7p6ef3xVLIOZEd5o9mYdw+baoOk6T2tuFAygDLt9f+6tf/vnEfeIb9R1FM0DGRE5DhwTkX7Xc4+i5K0NkHyouA5Nixbx+4EDRSV1Vux5rxfHVq2tDZtfdfAW+jIytqfhtR176t84aKjKCBxD9YjCQE0iMTg5NeWLCI7ncf6KFXy5ZcusPs4aLMDjc79INE1e8VQybHygL9H+7c5zHt+WM8O9oibtiGT7q6omFvo+1VVVdHR1lT3//5bBTEsG8/2Mm3rJtYkPBqsPZoYTPWn6Rv1ky2JUlZuGhtieTlc8/98L/TvfZZ49dwAAACV0RVh0ZGF0ZTpjcmVhdGUAMjAyMy0wNS0yNVQwMDoyODo1OSswMDowMDPIuVsAAAAldEVYdGRhdGU6bW9kaWZ5ADIwMjMtMDUtMjRUMjM6MTA6MDQrMDA6MDATW3FEAAAAGXRFWHRTb2Z0d2FyZQB3d3cuaW5rc2NhcGUub3Jnm+48GgAAAABJRU5ErkJggg==",anchor:[.5,1]},{src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACsAAAAgCAYAAACLmoEDAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAA3XAAAN1wFCKJt4AAAAB3RJTUUH5wUZACIpx2TIswAABQpJREFUWMO9mNtvVFUUh7+1z5nOTKWUSsE2ahRUQiRootGIiQ++mJhIYoJ/gIlPPmhi4u3F+GR8MN4gBokaFRU0Jt4SlYSLQhSIKAhyibRMWy6l9xl6nTLnnJ8Pc4pFmOFMW1yTlZMz++y1v73WPmvtfYwZitD0WwOagUYgA/hAABSBAjAI/3YwbEZj+jOFnQZ5O7AKeAC4E2gB5gGjQA9wENgF7AWOTof+X0TlX4vQ00J7hZRA9wg9JXSd/g/eGNKElgt9KDSWEHRKx+J+y2M7VxXWhG4T+lKoVCPolJaEvhC6VWhmizehV5uE1s0CdDrw2tjeVYH1hNYIjcwSdEpHYnve1fBqs9COOQKd0q2x3UQcSVOXA+4A7q06p7vpYTUeTSwgT4HvCNlPC1RMrKuAlcDPzFVKE/KFXq24Vk2hVqtf7eqWNCopkDSqNnXrEfULRVXW7itCs833F8HWCX1bcdBbNKSDykkKdbGEOqCclmqoAmwU261LGt4kYlAlnDeTZSULL2PPcSfXsoRsFbvXQbL6W4v7MxVbUvgVC76RJkW1Nz5LQknqWYBzFVsGGCXPwGXbhhign7EqdgtzDRsBbUB42dajZNhARMjIRf+HjPAu4lhF74XA8dj+3EhcEJ4QmqiYMxs1qRfUrnadVJ8m1K6Tek7tmq/JKnl2IrY7d4Uh3hMsFTpRNcn7CjRfga6VNF+BfAVXKAonhJYk3SMkXQYCzgKbqoYswGMYjyFgGI+g6osVAZ9R3vMmKgiJdz1xSVwGfAzcN9MoTZM9wOOPtTx6fH/6T1wEYeTwvIjIlVNLfbHIAz09rI87JE5dhiHUAbwFvAm0zpRS6OyQG9qw5vo1/d2uc3HM4WINY6+fF4z3Z+uLyxYtpjUV1XYYir1bD7wMPAOkagWNiKJfM7/senbRM9/2eX1FX56vMqSVAy1hJiBCBIi8gyPm1FZTTY69Ow6sp3zeeogal1Iuletct+DtQ31eb5OHb7Lp1URlc1L5UuZvFSwJxdZaisIFYKCL8lLoqKXvOVcobG74dPfvmX15D1+GRVYOeaxWvppFYJGZIjNMqB5pQc2wMbCAbcA7wHiSPiVKwU/ZHb9vbtjU4XAJj+NmSCazbjnXNiPYWELgI+AbrpB6hDiSPnxs3YK1B87b+SgBqAFO5e8OBx384DKZM7PdR+aB14SWA3dVgujzens3NK7f3ZXqHL/0GRkYUjwvI0IaB9ox+xs4lc9mRxtLpZo2Mv+ZuhF79FCJ0psh4cjlnitSnPx63le7t2e39xo21a8cXuEkAykAxoBOwXbP9z8RbHm4s/MYMHpjoUCuvX12X2Ti7BB1e93fL4oWfeTknnS4CzZDgnBvZs+BTxs2Hg+sJA/PAJOEmZ03GJPIA13OrC2EfhnBcH9/eE1TEz8uXcqJXO7CeLM+ThjGPrevgOP95qD57nrV3+9wCNHld538oPG9P077p4u+fE+oBOTNrA84a2an/JR/BlGKogArhcL3aL7pJg7/9dclY83J2eee0j3qSHUcGnbDb6TD9BKHax224ZEvGj7/bVd2Z2+KurwZZ5FOC3qy6XTvxORksTxb44ZV97Ft48YEjplD2dKwJbNiYsVLTWHTE3syu3e+uPj5TXk31OHkBj2zwqm6urHWYpF0XR1H29pqtj93p0pgYbCw2Ol3vp6JMpsPp4/kc5ncoN81XGxsuRlJPDgwwPeDgzO2/w/IRTXCFJZFPwAAACV0RVh0ZGF0ZTpjcmVhdGUAMjAyMy0wNS0yNVQwMDoyODo1OSswMDowMDPIuVsAAAAldEVYdGRhdGU6bW9kaWZ5ADIwMjMtMDUtMjRUMjM6MTA6MTMrMDA6MDAaVk9UAAAAGXRFWHRTb2Z0d2FyZQB3d3cuaW5rc2NhcGUub3Jnm+48GgAAAABJRU5ErkJggg==",anchor:[.5,1]},{src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACsAAAAgCAYAAACLmoEDAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAABmJLR0QA/wD/AP+gvaeTAAAA
237CXBIWXMAAA3XAAAN1wFCKJt4AAAAB3RJTUUH5wUZACIpx2TIswAABfVJREFUWMO9mE1sXFcVx3/nvnn2PI/leEZDHSNQ04gUUgGVQIIGqQuqgMSuYtEFRUoqNlRIlVixoKiqukIIwgZVhEr9CAS1Vj+Q2oJE+EijpmnTNiRNaxKnSWyntmM/z0wyiXnjmXf/LGZchXbGvHECR7q6i3vPub93znnnnveMDUq9XqfVaiGJarVqo6OjZTPbBOSBHNACEkm1hYWF5fHxcQE45xgdHd3QmbZR2DiOGRkZsXq9fhuwA7jTzG4HNgPDwBVgQdJx4BXgSD6ff6/RaKhUKv3/YKvVKmmabnbO3QN8B/hqBrUjwH4zewa4WCwW/7ewcRwTBIEBn5X0I0n3mNlQHyZWgGfM7KfAKUD9QOf6gfXem3PuM8AjwN1m1pe+pCEz+25n/rFz7n1AWfVd1o2VSoUgCEYlPQDcLakvUAAzo6P3bUkPeO9HK5VKZv3MsEBgZncBu4Gc2cbezY5eDrhP0l1AcENh4zhGUlHSD8xsuNseST1HDxmW9H1JxTiOM8FmDaUDvgh8pReomSkIgoUwDAMzG5VUazabaZqmmyVZj0jsAL4A/J0MuZvJs2bmgG8Agz1AfRiGy4VCgSiKCvl8PoiiqFAoFAjDcNnM1MPDg8BOM8uUCplhzey2Xkadc5eiKKoHQTAGFGjnYSEIgrEoiurOuVoP0wHw+awcWdPAaN9MXWPpnIucc0GXQ51zruScG0zTtJfdMTLW+37KT349O72S0swG6fHGd1SirAD9lK5LvRYkXZEU91iLJV1dR7e2TsXoH1aSlzQlqWss0zTNNxoNL6n+Eb16o9FQmqa9vJea2Wkz8zcM1sy8mR02s2aXNSTlkyQZS5Jk0Xs/671PvPezSZIsJkkyJmmwh+kmcCQrbKacdc75NE3/BsyZ2dZuwN77gSRJtjQaDWjn6Cc7l0KwtqeLzEn66w31rNoyD+yX1NVwx8OB9z7w3uO9DyQFZtYVtGPnd865BTI2M5kv+DiOMbNbgSfN7I6seus44LUgCHbvvvfe08dPnsR5SL0jCDzeGQYMJQl3LizwaEcnc+kql8tUKpVzwC+BPcD4dYDOV6vVX+/atWtp8cKFmzocrjNSwAOrgpWlaCi59RM3MR76/prvTjs3BDwE/BAI+wBcy23/xuuvv/LQgw/+YSmOk5xzObUhrR1oCTMBHtFCVB28a05TffWkpVKJSqWyAjwq6XYz+yYZU2ktb6enp8//Zu/eE0tLS8UgCExm1xhQ25zUntr844JbUvHnfi6FD4GBaTPbA5zLWtABLtVqtecmJg7/4+23q0EQyMy8tUPeGdaezTyYN5M3w4SGkEb7hu0Aa3h4+ADwKzNbyaLTarVahw4devO5Z58955wjW/NuhmQym5NzUxuCBQjDMDWzJ4AXtI571xrwycnJycf27j22urrqM4Aa4AQJcNzByy6f/6Dv76g1qdfrrK6uVsMw/JmZfU7Sl7pBmBmLi4sXn3z88cMXZmdXPr5HBkbncYXhkVaAM5idAmarUXRlU7PZVyPzHzIyMkIYhnLOnWg2m3vSNK2vefLaudFoNF5+8cXDhw4evHjNBdEOr3CSgdQCrgLnBX8Jcrl9gj996/z5SeDKp2s1zp4509+n+EelVCpRrVb9/Pz8S+Vy+Qnn3P3Oudw1ZSp96+jRYxNPP3261Wqp88/BOuurBlclqsC0M5tKYUlG6/LSUlooFvnj1q28f/bsh+ddFyxAsVjkwIEDNUmPlcvlL0dR9DXn2gGbnZmZ+e2+fW/Nzc0luVwukNQEqma2CMyb2WwuzH2AaHrfwpqpyAWUb76Zk++887GzrhsWYOfOnTp27NiJer3+i4GBgVucc+OXL1+uv/D882+89uqrF3MDA1WDeaQLgoVocPDivxqNBAAzPrXjDg489dR/PWfDP+a6ycTERH779u0/2bRp0/fePHr04CMPP7y/Vqudc2bLgVltdmDg6niSMDgwwHtTU33bvyGeXZNSqZTMzMz8fNu2bb//5+Sp6vT09HJQqyUjW7Ygia/HMS8tL2/Y/r8BRVECE4yt2dgAAAAldEVYdGRhdGU6Y3JlYXRlADIwMjMtMDUtMjVUMDA6Mjg6NTkrMDA6MDAzyLlbAAAAJXRFWHRkYXRlOm1vZGlmeQAyMDIzLTA1LTI0VDIzOjEwOjMxKzAwOjAwz+xZAAAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAAASUVORK5CYII=",anchor:[.5,1]},{src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACsAAAAgCAYAAACLmoEDAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAA3XAAAN1wFCKJt4AAAAB3RJTUUH5wUZACIpx2TIswAABihJREFUWMO1mF9sW2cVwH/n+6597aRVbLykf0S0iiJGpwLSGkGHtAcmQOINDWlIEw9DvIAmTeKhoAnxgHhCCFVa1UIRDxBEkaZ1He2YUCnQDalUqdextmvnpUs60sVxbMdO4tROfO93eMhNadO4vXbLka6u7v3uOefn853zfeez0KMUCgWazSbOOWZnZyWXyz0EDIhICvBUNRCRFlDPZDLVubk5tdbi+z67d+/uyafXK+z8/Dy7du2SQqHwaC6Xexx4AvgcsBXYBDSAGeCder3+pjHm7NDQ0OVSqaS9+pRelPL5PM65rcaYp4FngC9s9J3q/7hE5CxwREReUtXSyMjI/xd2bGwMa62o6iOq+kPgaaBP5N5mVBURuQG8BPxMVQvGGN2zZ09s/12lQRiGYoz5JPBT4OsiEls/+kF9qvotEekTkR+JyAdA7LQw3UTV87yMqj7fLeg6aE9VnwKeV9VMPp+PrRsbVkQs8CTwLPdRmGvAwLdV9UlVtQ8UNiqoLPAcq5V+h6gqqopz7ua19q6DbAK+a63Njo2NxYKNGyFjjPmsiHy+Eyig/f39MwMDA9bzvEwQBPX5+flwaWlpq6pKhyJ8PAzDzwCniZG7sWBV1QBfUVV/vdMI1GUymbnh4WF83+8HLNCfy+UWpqamqvV6PbcRsKr6wJdF5J9AcM+IxY0s8GgEcYekUqn57du3L/q+vwW4Cev7/pbofb2DXQvsjssRK7JRSLbSYV1OJpPpdDptN3Bq0un0x3zf95eXlzc0DWwh5nrfTVWnNnoZLfZep6QUEV9EbPTd+jGAdFyA2EsXMN8BhiAIGkEQVDYaD4KgEgTBUqddTlXrd1kxuodVVaeq40C40Xiz2UyVy2Wnqovr9BbL5bI2m81O0QtF5H0RcXE44qaBA86o6jPR5nBbZJ1zqVKptCUMw6nBwcG6MWbQOVcul8srlUpl2DmX3CiyqtoGzkb2Hwysqjpr7T+cc9PAJ9aPR6mQLJVKOyqVCqxW+fYwDFFV2ykFRGQa+HsYhrFg4+ashmFYBI50ioKIoKo2CAIbBAFBENi7gUZ2/gDMiEispI3dIkbt4adU9XfA3rh6d5F/WWuffWHfvvcL4+MYB6EzWOtwRhCgr9XiiZkZftktLMC5c+cSIvIUsB/Y1iulqhYXFhZe+MG+fccXqtVEAJ5xmNAZY60LnREnsJJutW7sml9oXRgcYlvCddc9iUgbOAE8BnwfSHQBuFaM7uKFC4WDL76YrdVq37TGeAYMBrFmtccwq32Ca/mp4O3BVM3Au8VQxrs+1kT95w7gV8BXu52d69evTxw+dOi1K5cv1z3PE73NQPSkGt0EwAk0HfrXbjYFAKKz04equl9VJ7vRXVxcrJ86efJM4b33atZajUAcNy9ZvYs4ECeiTgRRtA/VTNewEbA2m81TwEFVvRFHJwiC4Hw+nz918uSkiBDn3AYiqIqKTKsx4z3BAjQajVBEfisir3KXXnStAZ+cmLhy9OWX32632y4GqABGoQW8Y+B1k0p91PPxZGhoiGQyWVtZWfm5qn4aeGwjCBFhbm6u9Kdjx87MFIs37vxGBYSoPVAEx+psXUWkAEzV0unGQLvdVSNzm4yMjNBut1VVLwRBsN85t7gWyVvvK8vLy2+ePn3mrXy+dMv0r06vYlQFVANgCbim8Dfreb9X+MvXrl27AjSG63Umrl7t7U+OWyWfzzM9PZ3NZrM/8X3/e8YYb22ZUtXw3+fPn/v14cNvVCuVljFGAInGV4AlVWqCfihixkMoqxA0q9WwP5sFa/lgYuKmr/s6pa5FeHR0tC4iv8lkMntSqdQX16a6WCz+57UTJ94qz862rLU2alxqIjILFEVkykt4H6G0nQuQdqh4locefphLFy/emVL3C7smx48fJ5FIfCObzR7wPG9bo9FYfPWVV14/dvTou14iURMoonpdYaYvlSo1l5dbIoJNJPj43r2cGh29p48HBgtw4MCB1M6dO3+8efPm71y6eOmNw4cOHllYXJw0IlUrUp9KJpe2tVr4ySSXx8e7tn/faXCrZDKZVqlU+kUymfzj5ORkbbpYrJpqtbVpxw5UlS9VKvy5Wu3Z/n8BcY8RVtNG93EAAAAldEVYdGRhdGU6Y3JlYXRlADIwMjMtMDUtMjVUMDA6Mjg6NTkrMDA6MDAzyLlbAAAAJXRFWHRkYXRlOm1vZGlmeQAyMDIzLTA1LTI0VDIzOjEwOjQwKzAwOjAwY15brQAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAAASUVORK5CYII=",anchor:[.5,1]},{src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACsAAAAgCAYAAACLmoEDAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAABmJLR0QA/wD/AP+gvaeTAAAA
237CXBIWXMAAA3XAAAN1wFCKJt4AAAAB3RJTUUH5wUZACIpx2TIswAABh5JREFUWMO1mF9sW3cVxz/nd23Xf26bhFGaNEyNKrTB0lFpD9Ah7QEESPRpAimVKA9DvIAmTdoTQoiHiidUsWpCZTxVMESJHG3lb4VEl64gteWPuiZjTZrUdqZQ203sxk7s1H/u/R0e7FTpZqfXXvlK1pX98zm/zz3n/H6/c6/Qp86cOUM0GsUYw+joqOTz+Y+r6oCqRkUkBHhADSipalFE1HEcYrEYR48e7WvOUL+wruuSyWRkbGzsqVwu9yzwHHAYGAZcoALkgRkR+RtwdXx8/Mbs7Kz2O6f0Y5RMJlHVYWAC+Cbw+fsOpavLq8BZEUlaa+8cO3bs/wubTCYREVHVJ1X1+yIyAcSD2KoqIrKpqkngJ8aYm6qqExMTgefvqQystWKM+RTwY+D5XuzbEY8D3xKRuKr+UERSQOCyML1E1RgzCLwEPN9eRD2rbfd14CVr7eDk5GRg28CwquoAXwJe6CWiXRRS1W+3/TmPFHZqagpjzBDwIq2V3ulmUFWstfi+j7X2/m9d5ALfFZGhoNENGiEDfBb4XDdQEdGhoaH8yMiIE4lEBhuNRimXy/l3794dVlX54C4hIqjqs8DTwNsEqN3AsKr6FWBXJ1DA7t+//+7hw4dxXTdBK7WJAwcOrF+/fr2YzWYf6wTc9vdl4O+0DpGHRuyhUlUDPEWX+nJdtzw+Pr7huu4+4D6s67r7Dh06tOG6bqmLawc4JCKBOILCSvsQkA5jJBKJ2MDAwGMd/JmBgYGPJRKJWKfalZb2yQ4nyXYFKoO2r2jXOzYm1G1CEdlljNlpxceCMASObFvlbgP1er3SaDQKncYajUahXq9Xu9mqammHHaMvWAssAn6HyFEul6PpdNqq6sYHQDZSqZSWy+VYl8D7IrIgIjYIRNDdwAKXaTUtD6RURPB9Pzo/P7+v0WgsHzx4sBQOh/c2m83VdDrdSKfTj/u+H+kC26TV4Dw6WBGxqnpRVbMicrBTdBuNRmRhYWEslUphjHGstfvbh4PTbf2oalZVp4NGNmgZqLU2B5xV1Y6ORQRrrdNsNp16vU6z2XR2Am1H8zcikheRQEUbuEWcnJxERJ4AfiUiR4La7aArIvLCz199dWFpeRljwbcGx7FYIwgQr9V4Lp/ntV5hAZLJZJhWx3QKGOmXUlVzlUrlB6deeeUP9Uol7EHIWIxvjXEc61sjVqARq9U2P1Ner83u/QQjYdtz99QE/gg8A7wMhHsA3OoH7OLCws2pycmh6vr6MceYkAGDQRyjAGpafYKt7Yp67+yNrhl4L+fLYs+PNclkEmBMVX8BfDXo6bOllZWV9JtTU3/KpNMlx3FE2Z7e9jfV9kUArMA9i/61l0MBgPZjyPu0SiHTi+1mtVr655Url5cymTVjjLZBLPc/0rqKWBArolYEUTSO6mDPsG1gHRwcvACcVtXNIDa+73vzc3P//sfVqxkRIVhCRFAVFcmqMYt9wQKMjo76qvpL4Hfs0ItuNeDZ27fn3rpw4R3P82wAUAGMtt47zBg4b6LR230/nszMzBCLxdY8zzupqp8GnukEISKsl8t3Ll28eLlYKGx++D8qILTbA0WwtLJ1C5GbwPJaLFYZaDZ7amQe0PHjx/E8T4FZz/NOWWs3tiK5/dpsNuvXrl27PHfjxp1t6W+lVzGqAqoeUAWWFN5yQqFfK/zla0tLc0Dl8VKJ9K1b/b3k2K5kMkmhUBjavXv3iXA4/D1jTGjbNuUvzM//69wbb1wqlUo1Y4wA0h5vAFVV1gR9X8Qs+rCqgnevWPQTQ0PgOKTS6Qdq4yPr5MmTEo/Hn96zZ89rkUjkC1upXl1dzfz+3Lnzi/PzBeM4Dq19ek1EVoCciCw7odBtlKa1Hn7TVw05xF2X/7z77odL6lHAApw+fZpIJPIN13V/5jjOyL3NzY2L09Pn356efs8JhdYEcqj+VyEfj0bv3KvXayKCEw7zySNHuPD66w+d45HBApw4cSI6PDz8o3g8/p3UrdSlN6eSZyvVasaIFB2R0nIkUh2p1dgViXBjcbFn/x/1ZcUDSiQStWKx+NNQKPTbbDa7tlooFGVlpRYfG0NV+WKhwJ+Lxb79/w9bQvQtKYEySwAAACV0RVh0ZGF0ZTpjcmVhdGUAMjAyMy0wNS0yNVQwMDoyODo1OSswMDowMDPIuVsAAAAldEVYdGRhdGU6bW9kaWZ5ADIwMjMtMDUtMjRUMjM6MTA6NTArMDA6MDCv9FszAAAAGXRFWHRTb2Z0d2FyZQB3d3cuaW5rc2NhcGUub3Jnm+48GgAAAABJRU5ErkJggg==",anchor:[.5,1]},{src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACsAAAAgCAYAAACLmoEDAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAA3XAAAN1wFCKJt4AAAAB3RJTUUH5wUZACIpx2TIswAABjJJREFUWMO1mE1sFOcZx3//d9beXePixQvCpFSp0qopNGlFKlGn2EhF5VIulSqlUsQhqDduPfClqqdeiEJPPeTApY1UKuVUCcIhaikpBrxRKEmJ7RrMR7CNd8GuP3a9O/bszNPDrhE4Xjy7oY80GmneeZ/nN8/832eed0SLduLECaIoAqCtrU1BEGw2sy5JKSBhZlVJPjCXyWRmZmZmLIoiisUip0+fbilmolXYarVKKpXS0tLSziAIXgf6gR8APUAnUALywGdzc3P/dM4NDgwMDO/du9dajalWJh09ehQz65H0hqQ3gR+ZGdLT7sye4hoEzpjZ+2ZWOHXq1P8X9siRIwCS9DJwDHhDUkfc+WZWBt6Pouht59yoc85OnjwZO36zMhDwbeB3kn7e7HxJHWZ20DnXIek3zrnbQGxZeE1mdZOk48BBSS3pXZKrvxnPzAb7+/v9gYGBWHNdE3E8YB/wVqugT1gCOATsM7PYCYt14/HjxwGykt4BXl69kKC2mMyMMAyJouhxWatncy237UC3c+6Dvr6+cpzsxs2Qk/R9YPdag/VKYNu3b8/v2LHDS6fTmUqlMjcyMhJOTEz0mJkaAL9uZq8CF4mh3ViwZuaA/UByLVAg2rlz538PHDhANpvdQO2Nbdi1a9fCuXPnZoaHh7MNgJNm9lPgElBdN2NxYc1sJ2vIxszIZrPz+/fvL2az2a3AY9hsNru1fn1uVc1dMc/MXqknY12LdZNq1sMaddnM6O7uTvf09GTX8Oe2bdvW3d3dnW4AK0lbG2lktTWzqlMNn9i5RKOAkpLOuWct5HRcgGZK13yjgXK5XKpUKtMNxqYXFxcX1xqrV5BGEmkZNgJuAeGXHDhHPp9P5XK5KIqi4lOToqg4ODhohUIh7dyaoULgZt3/uhZXBhFwBXiTVYtMEkEQpC5evLi1UqmM7969ey6VSm3xff9RLpdbzuVy3wiCoL2BSgJqDc7zhZX0DzN7ALy0elASlUql/dKlS98cHBzEOedFUfRCEASEYeg9Y/08AC6YWSzYuDIwM5sCzjTKgiTCMPR83/fK5TK+73vrgEaS/kyt540l2tgt4rFjxwC+A/wJ6I077xl2VdJbFz788OajmRlcBGHk8LyIyAkBHb5Pfz7Pu/UJsZuIy5cvs2fPngVJ88Ae4GutUprZ1NLS0tvnzp69XikWN0bQJaPLTBnnrNOkTkEyUa3SEUZh9YWv65XNG5vrniQFwFngNTP7taS2FkCjQj4/+kkutynw/V86KeHA4ZDnDMBcTRaRn0xVr29JzToYmgp1K3ZmV7Lb19cXAGOSvgd8iyZ3G8WFhbv//vTTSwvz83LObTRpg6SO2mG1s9kGiU7QRsRmxEshlJqCfQJ4HngE7DGzTTG/liwvLc3dGh39+8T4+ANJSDLVslg/VDtLBjKp1v0Y1oZZoWnYFeB9+/bdq1arDuiPI4coiqqTExNXhoeGblitBYsRScJMJj0wKdfM5/Ypy2QyoZn9UdJfWaf0mBmzs7Mjw8PD18MwjGKACnAGPvCZg/MulZpseXsyOTlJV1fXbLlcfsfMvgu81gjC9/3CzZGRK4vFYnmNRxGIentgiIjaLngMaRQYn02nS11BEL90rbarV6/S29uLmT2MomgR2C8pufL/YOUcVqtLd27fvnBnbOwOPN7i1F4vciCEVUEVYNLEJ4lE4mIURUM/++KL/Fgms7xlcZGR+/dbhwUYGBigr6/PSqXSuOd5m5xzP5TkngAOHxYK14Y///xfQRBU622kq+8aAokFYEpww8l9FEk5k+4vTk8X29Pp6lg2y+1798iXSo+18ZXt0KFD6ujoeDWZTL6bSCR+vCKH4sLC3evXrp0v5PPTkjxqjcuspIfAlKRxL5GYxAiiqEoYhGYJj47OTj6/ceNLcZ4LLMDhw4dxzv0inU7/wTm3bXl5ufifoaHzoyMjQ87zZoEpzCYM8h2pVKGytORLwmtrY3tvL397
2377711Yzw3WICDBw+mMpnMb5PJ5K8eFgofXfv44zNLy8t3BTOeNDfe3r64zfdJtrczfOtW0/6/6s+KpyyZTPqlUun3nuf9ZW5ufnaxXJ6JJif95IsvYmb8ZHqaD2ZmWvb/PzZaBDRi9tDdAAAAJXRFWHRkYXRlOmNyZWF0ZQAyMDIzLTA1LTI1VDAwOjI4OjU5KzAwOjAwM8i5WwAAACV0RVh0ZGF0ZTptb2RpZnkAMjAyMy0wNS0yNFQyMzoxMTowMCswMDowMAjWPmkAAAAZdEVYdFNvZnR3YXJlAHd3dy5pbmtzY2FwZS5vcmeb7jwaAAAAAElFTkSuQmCC",anchor:[.5,1]},{src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACsAAAAgCAYAAACLmoEDAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAA3XAAAN1wFCKJt4AAAAB3RJTUUH5wUZACIpx2TIswAABixJREFUWMO1mE1sVNcVx3//+549Y2MMDkTMTBHCNgpVmlApi2IagVQ0SFVXlYpSKcoC1BXLrlKp6qLqKoq66gKpqzZSqciGSnXYuEVJIwWjVkIRkAhMBtt82MYej8fz4fHMe/d0MQZR8Mcbhx7p6S3uu+f87rn/d+55T2zTTp8+TbVaxXtPqVRSf3//XmCXpDQQAhHQMLOl2dnZYjabtTiOWVlZYXx8fFsxw+3CLi4ucuTIEd28efP1/v7+Y8Bx4PtABugDqsAs8GUmk/mXmY1PT09/NTg4aNuNqe1MyufzeO8zzrl3gHeBo1vNMbNx4IKkj733c1euXPn/wp48eRLnnIDDwPtm9g7QKyV2Uzezj83sA0m3nXM2NjaWOH5HMjAzmdkhSb8DfiqpUxn1Au9J6pX0a+AbILEsgqQP5vN5gAFJv5L0npmFHWT0qUlykg4DgaTx4eHhRqFQSDTXdRAkkHQSOANsC/QZC4GzwElJiROW6MFTp04RRdEeSR+uZeUFMzPMjCiKiOMY7z1PFrTBwrqBV7z3nwwPD9eTZDep5pxz7oikH2wECtjhw4dnR0ZGgp07d+6uVCpL165di+/cuZMxM60HbGbHgDeBT0mg3USw3nsHnDKz1PNB10D9sWPHFs+dO0cul9tBe8d25PP55fPnzxevXr26Zz1gSSkgD3xO+xDZPGNJMwu8zjqyMTNyuVz57NmzlVwutw94CpvL5fadOXOmks1ml9YW9bwFwBtJORI9pLZl1ttL7z2ZTKZncHBwzzr+3NDQ0CvZbLbHe7+ua2AfCet9J3UyvaGTMAy1wVskKRUEwWYvck9SgMSlCyhvAEO5XK5Wq9WF9cYrlcpCuVyubVLqll4qrJl5M5sws/gFB84xOTmZHh0d9d77yrNj3vvK6OioTU5O9ji3bqgYuAN4EliiOjs0NCRgD/Dj549YSbRarXBiYqKnVqvNZDKZmvc+tbi4OHPx4sXlS5cu5er1emoD2CbwR+B6oVDYsnQlEnY+n5eZDQJjkoY2yD5hGMapVIogCII4juPV1VWiKAo2kUAByEuaHBsb2xI2qWYNmJF0gU22LIqioFarBcvLy9RqtWALUA/8RdIsCZuZxAd8Pp9H0mtm9mdgJOm8TeyqpDOPpqfv1BsNnIfYO4LA450Q0NtocHx2lvNrExI3EYVCgcHBwWVJZeBtYOe3AJ2J4/iDyXv3rvtWq9/DLhm7zLTbOeszqU+QCqOI3tjHUe47emNvf2f9qKQW8Hczewv4paSuTinNzDdWVm7Pz80NEMc/NwgdOBwKXLvHcG1Z+EYqHV1/NV1ycGsm1kTizD7J7tDQUAu4K+l7wDAdSMmAVrN5b7FY/LzVbEpSv0k71prxXsnad7MdEn2gfsRexFAM1Y5gnwAfOnSoDMwDb5vZQNLe1sfxUmVp6Z+1avXR2k6Z2mtYu9S+SwYyqd39GNaF2VzHsE+ADxw4MCnJAceTyMHMolq1+kW5VLph7RYsQSQJM5n0yKRrnRy3/2NdXV2xmf0J+BtblB4zY3V19eulUum6994nABXgDBrAlw4uu3T64bb/GzSbTXp6ekpRFH1oZt8F3toIwsfx3HKp9EXUbNbXWYpArHWQhvCY1YG7SLeB+6WenuquVit56XrepqamOHjwIMBjM6tJOrXWTD/NpiTM+9Xl5eUrlXK5AE8/cdrbixwIYRFoBXho4j9hGH7qvb/1k6mp2bu7dzdfrdX4enp6ez85nrV8Pk+j0Rjo6ur6rXPunKTwKahZ3KjX/73w+PFnURQ11tpIrY03gZoZJWFTkpuIYd5EtFIsxjsGBiAI+OaZb7NvDQswMjKi7u7uN8MwPC/ph0/k0Go27xXn5y+v1OsLtA+gFlCS9Jj28X0/CMOHGC3vI+JWbBYG9Pb1cfPGjRfivBRYgBMnTiDpZ2EY/kFSNo7jSnlx8fJSqXTLOVcCZjB7YDDbm07PrayuNiQRdHWxf2SEf3z00ZYxXhoswNGjR9PpdPo3QRD8olFf+aw4//hCFMf3BMVAWrrf3V3LNhqkurv5amKiY//brgbrWRAEjVar9Xsn99dms1WKvC/6Bw8awf79mBk/Wljgk2Jx2/7/C8D87PcyjeWGAAAAJXRFWHRkYXRlOmNyZWF0ZQAyMDIzLTA1LTI1VDAwOjI4OjU5KzAwOjAwM8i5WwAAACV0RVh0ZGF0ZTptb2RpZnkAMjAyMy0wNS0yNFQyMzoxMTowOSswMDowMJ1Oe7oAAAAZdEVYdFNvZnR3YXJlAHd3dy5pbmtzY2FwZS5vcmeb7jwaAAAAAElFTkSuQmCC",anchor:[.5,1]},{src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACsAAAAgCAYAAACLmoEDAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAA3XAAAN1wFCKJt4AAAAB3RJTUUH5wUZACIpx2TIswAABNVJREFUWMO9l8trXHUUxz/nd+/NPJK5k5kmzbRG2iRWijZmESit0qUbaVb+A0JXLhRclK5EVETcuNCFLQhiF4K4asFVtbT1UZ8JsSbBzjQ1qU3zntQkzCRz7z0u7kRazKSTzI0HDhd+j+/5/n7n/M45V4hGBGgD0kAcsAEPKANLwAKgURhpdP9TwHHgBNAH5IAWYAWYBoaBa8APwGgUpHciOeDVKgmtQ68DrwAd/ydJAQ4DnwCrdRLd0NXqvsM07tW6iB4CvgAq2yS6oRXgc+CJ3SacAT5sgOiDhD+o4u2KWMCLwHKDRDd0uYpn7QbZNuByREQ39FIVty6x61xngGeAo1us0f7+/umBgQErk8m0FovFpYsXL/qDg4M5asfmcaAXuEKEKc0G3qVGrIqIPzAwMFcoFKZUdUVVPVVdyefzUydPnpwDAmrH7jvbuLS6pAm4UMtoT0/P4vDw8Liq+vqw+ENDQ+Pd3d2LNcgGVdymekiYOskKYRHY1J0HDx5M9Pb27tkEz/T19WW7uroSW+B2UGcK2871x2tNOI5ji8imBkUk5jjOVi8+QZ1S780C3K81MT8/v1IsFuc3m1tcXJyfm5tb3QJ3KWqyAZAH/M0mR0dH4+fOnQt8319+cNz3/eWzZ8/q2NhYrdvzgZtV/MjEAk4BJWrkzHQ6vXbmzJlCoVCYnJ2dLRUKhcnTp08XXNddo3aeLVVxIy0MAnQDt7YwrLZte67retlsVl3X9Wzb9ti6KNwCutiFHiEBvE3ouiiqlw+8xTYe2HZP9CTwKXAsgsNfB156PJe7acdimAD8wGBZAYERBEiWy5yYnuaj6obtxsrfhFnhOSDVANF7xpj3Ojs7h+KO4waQFiWtKq3GaIuKtAjEbM8j6Qe+t/8xOdLmyk5iJQm8AbwGODvYHyTj8Wt729sv2JZVRtXWMCtJ6GhVRMLqpngoRQMjYjS/k1dYAQrA00AP2wwlx3Fut2Wz38SamgRwVaRZRJKhavhVbRahBcRFaEPo9mFlpynjPj
237BHGA51N9DGmKVMOv11qrl5qjqk8tCjk/AroiAqoioioqiD6kwj+e1PQvedoL5w8FqSye/3ZDI3JHRzHSKCqqjIlIr82AhZBf4gzL9HeEQ4xGOxkfZs9lvLstbrYQkYhbLAqIhckXj8bqOVo0yY2I8C+2otsixrZk8mcykRjxc3ObOAiGr1sEKA6iowgsh3AoPFZHI+5nkaRZmbJfzFfh6IbXJFa67rXk6nUuMPNGahexEDgqAeSAm4q8Ivtm1fCYJg5IWJielCa+t6++oqY5OT0ZQ5y7IyQRC8qaov83Db6Sfj8Z/3trVdtW27HHJHVBURWQdWVSkKOiFi8j7MqeCVFhb85kwGLItb4+P/gkXyO2GMWTLGfOx5Xr+qPrsx7tj2ZGs6/att22VVtQjTXlFEZoF7InLHduy7KJUg8JCKr9gWbQcO8PuNG/+xEwnZSqWijuP8Zox53/f9LmCfEVl2U6mfkonETJXgPVT/UphOxGIzpbW1chgQQufxY3x1/vwj7UTa7aRSqXipVHrd9/1TyXjiasfe9s+MMbdRXbBElu40Na3uK5eJNTUxms9vGz9SsolEAlXNVtYr+9NuupjraF+oTEyUNZfDAIeWl/lyYWHH+P8AZ0RW2q2R2psAAAAldEVYdGRhdGU6Y3JlYXRlADIwMjMtMDUtMjVUMDA6Mjg6NTkrMDA6MDAzyLlbAAAAJXRFWHRkYXRlOm1vZGlmeQAyMDIzLTA1LTI0VDIzOjExOjE5KzAwOjAwUeR7JAAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAAASUVORK5CYII=",anchor:[.5,1]}]},logger$w=LoggerByDefault.getLogger("DrawingDOM"),DrawingDOM={_addUID:function(ne){var ee=this._uid?ne+"-"+this._uid:ne;return ee},_createMainContainerElement:function(){var ne=document.createElement("div");return ne.id=this._addUID("GPdrawing"),ne.className="GPwidget gpf-widget gpf-widget-button gpf-mobile-fullscreen",ne},_createShowDrawingPictoElement:function(){var ne=this,ee=document.createElement("button"),te=document.createElement("span");return ee.appendChild(te),ee.id=this._addUID("GPshowDrawingPicto"),ee.classList.add("GPshowOpen","GPshowAdvancedToolPicto","GPshowDrawingPicto"),ee.classList.add("gpf-btn","gpf-btn--tertiary","gpf-btn-icon","gpf-btn-icon-drawing"),ee.classList.add("fr-btn","fr-btn--tertiary"),ee.setAttribute("aria-label",this.options.labels.control),ee.setAttribute("tabindex","0"),ee.setAttribute("aria-pressed",!1),ee.setAttribute("type","button"),ee.addEventListener?ee.addEventListener("click",function(st){var ot=st.target.ariaPressed==="true";st.target.setAttribute("aria-pressed",!ot),ne.onShowDrawingClick(st)}):ee.attachEvent&&ee.attachEvent("onclick",function(st){var ot=st.target.ariaPressed==="true";st.target.setAttribute("aria-pressed",!ot),ne.onShowDrawingClick(st)}),ee},_createDrawingPanelElement:function(){var ne=document.createElement("dialog");return ne.id=this._addUID("GPdrawingPanel"),ne.className="GPpanel gpf-panel fr-modal",ne},_createDrawingPanelDivElement:function(){var ne=document.createElement("div");return ne.className="gpf-panel__body fr-modal__body",ne},_createDrawingToolsDivSections:function(){var ne=document.createElement("div");return ne.className="gpf-panel__content fr-modal__content",ne},_createDrawingButtonsPluginDiv:function(){var ne=document.createElement("div");return ne.className="container-buttons-plugin fr-mx-2w",ne},_createDrawingToolsSections:function(){var ne=[];return this.dtOptions={},this.options.tools.points&&(this.dtOptions.points={label:this.options.labels.points,active:!1,panel:"draw",id:"point"}),this.options.tools.lines&&(this.dtOptions.lines={label:this.options.labels.lines,active:!1,panel:"draw",id:"line"}),this.options.tools.polygons&&(this.dtOptions.polygons={label:this.options.labels.polygons,active:!1,panel:"draw",id:"polygon"}),this.options.tools.holes&&(this.dtOptions.holes={label:this.options.labels.holes,active:!1,panel:"draw",id:"holes"}),this.options.tools.text&&(this.dtOptions.text={label:this.options.labels.text,active:!1,panel:"draw",id:"text"}),this.options.tools.edit&&(this.dtOptions.edit={label:this.options.labels.edit,active:!1,panel:"edit",id:"edit"}),this.options.tools.display&&(this.dtOptions.display={label:this.options.labels.display,active:!1,panel:"edit",id:"display"}),this.options.tools.tooltip&&(this.dtOptions.tooltip={label:this.options.labels.tooltip,active:!1,panel:"edit",id:"tooltip"}),this.options.tools.remove&&(this.dtOptions.remove={label:this.options.labels.remove,active:!1,panel:"edit",id:"remove"}),(this.dtOptions.points||this.dtOptions.lines||this.dtOptions.polygons||this.dtOptions.text)&&ne.push(this._createDrawingToolSection(this.options.labels.creatingTools,"draw")),(this.dtOptions.edit||this.dtOptions.display||this.dtOptions.tooltip||this.dtOptions.remove)&&ne.push(this._createDrawingToolSection(this.options.labels.editingTools,"edit")),this.options.tools.export&&ne.push(this._createSavingSection(this.options.labels.export,this.options.labels.exportTitle)),ne},_createDrawingToolSection:function(ne,ee){var te=document.createElement("div");te.className="drawing-tool-section fr-mx-2w";var st=document.createElement("p");st.className="drawing-tool-section-title",st.innerHTML=ne,te.appendChild(st);var ot=document.createElement("div");ot.className="drawing-tools-flex-display";var ct=this;function ut(ft){ct._handleDOMToolClick(ft,this.id,ct),ct._handleToolClick(ft,this.id,ct)}for(var dt in this.dtOptions)if(this.dtOptions[dt].panel===ee){var ht=document.createElement("button");ht.className="drawing-tool fr-btn fr-btn--tertiary gpf-btn--tertiary",ht.id=this._addUID("drawing-tool-"+this.dtOptions[dt].id),ht.title=this.dtOptions[dt].label,ht.addEventListener("click",ut),ot.appendChild(ht)}return te.appendChild(ot),te},_createSavingSection:function(ne,ee){var te=document.createElement("div");te.className="drawing-tool-section drawing-tools-flex-display fr-m-1w";var st=document.createElement("button");st.title=ee,st.className="tool-form-submit drawing-button fr-btn fr-btn--secondary gpf-btn--secondary fr-m-1w",st.id=this._addUID("drawing-export"),st.setAttribute("type","button"),st.textContent=ne;var ot=this;return st.onclick=function(){ot.onExportFeatureClick()},te.appendChild(st),te},_createMarkersChooser:function(ne){var ee=document.createElement("div");ee.className=ne.className;var te=document.createElement("input");te.type="checkbox",te.className="gpf-custom-dropdown-toggle",te.i
237d=this._addUID("gpf-custom-dropdown-toggle"),ee.appendChild(te);var st=document.createElement("span");st.innerText="Sélectionner le pictogramme :",ee.appendChild(st);for(var ot=0;ot<this.options.markersList.length;ot++){var ct=document.createElement("input");ct.type="radio",ct.name="gpf-dropdown-radio-style",ct.value=this.options.markersList[ot].src,ct.className="gpf-custom-dropdown-display",ct.id=this._addUID(`gpf-custom-dropdown-display-${ot}`),ee.appendChild(ct),ot===0&&(ct.checked=!0);var ut=document.createElement("label");ut.htmlFor=this._addUID("gpf-custom-dropdown-toggle"),ut.className="fr-select GPselect gpf-select",ee.appendChild(ut);var dt=document.createElement("img");dt.src=this.options.markersList[ot].src,dt.alt=`Option ${ot+1}`,ut.appendChild(dt)}var ht=document.createElement("div");ht.className="gpf-custom-dropdown-options",ee.append(ht);for(var ot=0;ot<this.options.markersList.length;ot++){var ft=document.createElement("label");ft.htmlFor=this._addUID(`gpf-custom-dropdown-display-${ot}`),ft.className="gpf-custom-dropdown-option",ht.appendChild(ft);var pt=document.createElement("img");pt.src=this.options.markersList[ot].src,pt.alt=`Option ${ot+1}`,ft.appendChild(pt),ft.addEventListener("click",()=>{te.click()})}return ee},_createStylingElement:function(ne){var ee=document.createElement("div");ee.className=ne.className;var te=document.createTextNode(ne.label);ee.appendChild(te);var st=document.createElement("input");try{st.type=ne.type}catch{st.type="text"}if(ne.type==="range"){ee.dataset.frJsRange="true",ee.title=ne.label;var ot=ne.defaultValue;ot=Math.round((ot-ne.min)/(ne.max-ne.min)*100),ee.style.setProperty("--progress-right",ot+"%"),st.addEventListener("change",ct=>{ct.target.parentNode.style.setProperty("--progress-right",`${(ct.target.value-ne.min)/(ne.max-ne.min)*100}%`)})}return st.id=ne.id,st.value=ne.defaultValue,ne.title&&(st.title=ne.title),ne.checked!==void 0&&(st.checked=ne.checked),ne.min!==void 0&&(st.min=ne.min),ne.max!==void 0&&(st.max=ne.max),ne.step!==void 0&&(st.step=ne.step),ee.appendChild(st),ee},_createStylingDiv:function(ne){var ee=document.createElement("dialog");ee.className="gp-styling-div gpf-panel fr-modal gpf-visible GPelementVisible";var te=document.createElement("div");if(te.className="gpf-modal__body fr-modal__body",ee.appendChild(te),checkDsfr()){var st=this._createPanelHeaderElement({title:"Modifier le style"});st._closeBtn.addEventListener("click",yt=>{ne.applyFunc.call(this,"cancel")}),te.appendChild(st)}var ot=document.createElement("div");ot.className="gpf-panel__content fr-px-3w fr-modal__content",te.appendChild(ot);var ct=document.createElement("div"),ut=null,dt=ne.geomType.toLowerCase();switch(dt){case"point&text":case"point":ut=this._createMarkersChooser({className:"gp-styling-option",defaultValue:ne.initValues.markerSrc}),ct.appendChild(ut),ut=this._createStylingElement({type:"range",className:"gp-styling-option fr-range fr-range--sm",label:this.options.labels.markerSize,title:"petit, moyen ou grand",id:this._addUID("markerSize"),min:5,max:15,step:5,defaultValue:ne.initValues.markerSize*10}),ct.appendChild(ut),ne.initValues.markerCustom,dt==="point&text"&&(ut=this._createStylingElement({type:"checkbox",className:"gp-styling-option",label:this.options.labels.labelDisplay,id:this._addUID("labelDisplay"),checked:ne.initValues.labelDisplay,defaultValue:ne.initValues.labelDisplay}),ct.appendChild(ut));break;case"text":ut=this._createStylingElement({type:"color",className:"gp-styling-option",label:this.options.labels.fillColor,id:this._addUID("fillColor"),defaultValue:ne.initValues.fillColor}),ct.appendChild(ut),ut=this._createStylingElement({type:"color",className:"gp-styling-option",label:this.options.labels.strokeColor,id:this._addUID("strokeColor"),defaultValue:ne.initValues.strokeColor}),ct.appendChild(ut),ut=this._createStylingElement({type:"range",className:"gp-styling-option",label:this.options.labels.strokeWidth,title:"1 à 10 pixels",id:this._addUID("strokeWidth"),min:1,max:10,step:1,defaultValue:ne.initValues.strokeWidth}),ct.appendChild(ut);break;case"line":ut=this._createStylingElement({type:"color",className:"gp-styling-option",label:this.options.labels.strokeColor,
237id:this._addUID("strokeColor"),defaultValue:ne.initValues.strokeColor}),ct.appendChild(ut),ut=this._createStylingElement({type:"range",className:"gp-styling-option fr-range fr-range--sm",label:this.options.labels.strokeWidth,title:"1 à 10 pixels",id:this._addUID("strokeWidth"),min:1,max:10,step:1,defaultValue:ne.initValues.strokeWidth}),ct.appendChild(ut);break;case"polygon":ut=this._createStylingElement({type:"color",className:"gp-styling-option",label:this.options.labels.strokeColor,id:this._addUID("strokeColor"),defaultValue:ne.initValues.strokeColor}),ct.appendChild(ut),ut=this._createStylingElement({type:"range",className:"gp-styling-option fr-range fr-range--sm",label:this.options.labels.strokeWidth,title:"1 à 10 pixels",id:this._addUID("strokeWidth"),min:1,max:10,step:1,defaultValue:ne.initValues.strokeWidth}),ct.appendChild(ut),ut=this._createStylingElement({type:"color",className:"gp-styling-option",label:this.options.labels.fillColor,id:this._addUID("fillColor"),defaultValue:ne.initValues.fillColor}),ct.appendChild(ut),ut=this._createStylingElement({type:"range",className:"gp-styling-option fr-range fr-range--sm",label:this.options.labels.fillOpacity,title:"0 (transparent) à 100% (opaque)",id:this._addUID("fillOpacity"),min:0,max:10,step:1,defaultValue:ne.initValues.fillOpacity*10}),ct.appendChild(ut);break;default:logger$w.log("Unhandled geometry type for styling.")}ot.appendChild(ct);var ht=document.createElement("div");ht.className="gpf-flex-row",ot.appendChild(ht);var ft=document.createElement("input");ft.type="button",ft.className="gp-styling-button fr-btn fr-btn--secondary",ft.value=this.options.labels.applyToObject,ft.onclick=function(){ne.applyFunc.call(this,"apply")};var pt=document.createElement("input");pt.type="button",pt.value=this.options.labels.setAsDefault,pt.className="gp-styling-button fr-btn fr-btn--tertiary",pt.onclick=function(){ne.applyFunc.call(this,"default")},ht.appendChild(pt),ht.appendChild(ft);var mt=document.createElement("input");return mt.type="button",mt.className="gp-styling-button closer",mt.onclick=function(){ne.applyFunc.call(this,"cancel")},ot.appendChild(mt),ee},_createLabelDiv:function(ne){var ee=document.createElement("dialog");ee.className="gp-label-div gpf-panel fr-modal gpf-visible GPelementVisible";var te=document.createElement("div");if(te.className="gpf-modal__body fr-modal__body",ee.appendChild(te),checkDsfr()){let ft="Ajouter une description";ne.geomType==="Text"&&(ft="Texte de l’annotation");var st=this._createPanelHeaderElement({title:ft});st._closeBtn.addEventListener("click",pt=>{ne.applyFunc.call(this,"cancel")}),te.appendChild(st)}var ot=document.createElement("div");ot.className="gpf-panel__content fr-px-3w fr-modal__content",te.appendChild(ot);var ct=null;if(ne.geomType==="Text"?(ct=document.createElement("input"),ct.type="text",ct.className="gp-input-label-style fr-input fr-mb-3w"):(ct=document.createElement("textArea"),ct.rows=2,ct.cols=40,ct.className="gp-textarea-att-label-style fr-input"),ne.text&&(ct.value=ne.text),ct.autocomplete="off",ct.placeholder=ne.placeholder,ct.id=ne.inputId,ot.appendChild(ct),ct.onkeyup=function(ft){ne.geomType==="Text"&&ft.keyCode===13&&ne.applyFunc.call(this,ne.key,ct.value,!0),ft.keyCode===27&&ne.applyFunc.call(this,ne.key,ct.value,!1)},ne.measure&&ne.geomType!=="Text"){var ut=document.createElement("input");ut.type="text",ut.readonly=!0,ut.className="gp-input-measure-style",ut.value=ne.measure,ot.appendChild(ut)}var dt=document.createElement("input");dt.type="button",dt.className="gp-styling-button fr-btn fr-btn--tertiary",dt.value=this.options.labels.saveDescription,dt.onclick=function(){ne.applyFunc.call(this,ne.key,ct.value,!0)},ot.appendChild(dt);var ht=document.createElement("input");return ht.type="button",ht.className="gp-styling-button closer",ht.onclick=function(){ne.applyFunc.call(this,ne.key,ct.value,!1)},ot.appendChild(ht),ee},_handleDOMToolClick:function(ne,ee,te){for(var st in te.dtOptions){var ot=te._addUID("drawing-tool-"+te.dtOptions[st].id),ct=document.getElementById(ot);if(ot!==ee){ct.className="drawing-tool fr-btn fr-btn--tertiary gpf-btn--tertiary",te.dtOptions[st].active=!1;continue}te.dtOptions[st].active?ct.className="drawing-tool fr-btn fr-btn--tertiary gpf-btn--tertiary":ct.className="drawing-tool drawing-tool-active fr-btn fr-btn--tertiary gpf-btn--tertiary",te.dtOptions[st].active=!te.dtOptions[st].active}}},logger$v=LoggerByDefault.getLogger("Drawing");const Io=class Io extends ControlExtended{constructor(ee){if(ee=ee||{},super(ee),!(this instanceof Io))throw new TypeError("ERROR CLASS_CONSTRUCTOR");return this.CLASSNAME="Drawing",this._initialize(ee),this._container=this._initContainer(),this.element?this.element.appendChild(this._container):this.element=this._container,this}setMap(ee){super.setMap(ee),this.getMap()&&this.eventKey&&unByKey(this.eventKey),ee!=null&&(this.options.position&&this.setPosition(this.options.position),this.options.gutter===!1&&this.getContainer().classList.add("gpf-button-no-gutter"),this.draggable&&Draggable.dragElement(this._drawingPanel,this._drawingPanelHeader,ee.getTargetElement()),this.collapsed||this._showDrawingButton.setAttribute("aria-pressed",!0),this.layer&&this.setLayer(this.layer),this.eventKey=this.getMap().getLayers().on("remove",te=>{te.element===this.layer&&(this.layer=null,this.interactionCurrent&&(this.getMap().removeInteraction(this.interactionCurrent),this.interactionCurrent=null))}))}exportFeatures(){var ee=null;if(ControlExtended.prototype.getMap.call(this)==null)return logger$v.log("Impossible to export : control isn't attached to any map."),ee;if(!this.layer)return logger$v.log("Impossible to export : no layer is hosting features."),ee;if(!this.layer.getSource()||!this.layer.getSource().getFeatures()||!this.layer.getSource().getFeatures().length)return logger$v.log("Impossible to export : no features found."),ee;this.featuresCollectionSelected&&this.featuresCollectionSelected.clear();var te=null;switch(this.getExportFormat()){case"KML":te=new KML({writeStyles:!0});break;case"GPX":te=new GPX({});break;case"GEOJSON":te=new GeoJSON({});break}if(!te)return logger$v.log("Impossible to export : format unknown !?"),ee;var st=this.layer.getSource().getProjection();return st=st||this.getMap().getView().getProjection(),ee=te.writeFeatures(this.layer.getSource().getFeatures(),{dataProjection:"EPSG:4326",featureProjection:st}),ee}setCollapsed(ee){if(ee===void 0){logger$v.error("[ERROR] Drawing:setCollapsed - missing collapsed parameter");return}ee&&this.collapsed||!ee&&!this.collapsed||(ee?this.panelCloseBtn.click():this._showDrawingButton.click(),this.collapsed=ee)}setExportName(ee){this._exportName=ee}getExportName(){return this._exportName}setExportFormat(ee){switch(this._exportFormat=ee?ee.toUpperCase():"KML",ee.toUpperCase()){case"KML":this._exportExt=".kml",this._exportMimeType="application/vnd.google-earth.kml+xml";break;case"GPX":this._exportExt=".gpx",this._exportMimeType="application/gpx+xml";break;case"GEOJSON":this._exportExt=".geojson",this._exportMimeType="application/geo+json";break;default:this._exportFormat="KML";break}}getExportFormat(){return this._exportFormat}setLayer(ee){if(!ee){this.layer=null;return}if(!(ee instanceof VectorLayer)){logger$v.log("no valid layer given for hosting drawn features.");return}var te=this.getMap().getLayers();if(te){var st=!1;te.forEach(ot=>{ot===ee&&(logger$v.trace("layer already in map. Not adding."),st=!0)}),st||(this.getMap().addLayer(ee),this.dispatchEvent({type:this.ADD_AFTER_DRAWING_LAYER_EVENT,layer:ee}
237)),ee.getSource().getFeatures().forEach(ot=>{var ct=ot.getStyle();if(typeof ct=="function"){var ut=ot.getStyleFunction();if(ut){var dt=ut.call(this,ot,0);dt&&dt.length!==0&&ot.setStyle(Array.isArray(dt)?dt[0]:dt)}}}),this.layer=ee,this.getMap().getControls().forEach(ot=>{if(ot instanceof LayerSwitcher){var ct=this.layer.gpLayerId;ct&&ot._layers[ct].title===ct&&ot.addLayer(this.layer,{title:this.options.layerDescription.title,description:this.options.layerDescription.description})}})}}getLayer(){return this.layer}getContainer(){return this._container}disable(){var ee=this.getMap();Interactions.unset(ee);for(var te in this.dtOptions)if(this.dtOptions.hasOwnProperty(te)&&this.dtOptions[te].active){var st=this._addUID("drawing-tool-"+this.dtOptions[te].id);document.getElementById(st).className="drawing-tool fr-btn fr-btn--tertiary gpf-btn--tertiary",this.dtOptions[te].active=!1}}_getsMarkersOptionsFromSrc(ee){for(var te=null,st=0;st<this.options.markersList.length;st++)if(ee&&this.options.markersList[st].src===ee)return te=this.options.markersList[st],te;return te}_getIconStyleOptions(ee){var te={};return Object.keys(ee).forEach(st=>{switch(st){case"src":case"size":case"scale":case"color":case"anchor":case"anchorOrigin":case"anchorXUnits":case"anchorYUnits":te[st]=ee[st];break}}),te}_initialize(ee){this._uid=ee.id||SelectorID.generate(),this._exportName="Croquis",this._exportFormat="KML",this._exportMimeType="application/vnd.google-earth.kml+xml",this._exportExt=".kml",ee=ee||{},this.options=ee,this.options.layerDescription=Object.assign({title:"Croquis",description:"Mon croquis"},ee.layerDescription),this.options.tools||(this.options.tools={}),Object.keys(Io.DefaultTools).forEach(te=>{this.options.tools.hasOwnProperty(te)||(this.options.tools[te]=Io.DefaultTools[te])}),this.options.cursorStyle||(this.options.cursorStyle={}),Object.keys(Io.DefaultCursorStyle).forEach(te=>{this.options.cursorStyle.hasOwnProperty(te)||(this.options.cursorStyle[te]=Io.DefaultCursorStyle[te])}),this.options.collapsed=ee.collapsed!==void 0?ee.collapsed:!0,this.collapsed=this.options.collapsed,this.options.draggable=ee.draggable!==void 0?ee.draggable:!1,this.draggable=this.options.draggable,this.options.markersList=ee.markersList||MarkersOther.drawing_api,this.options.labels||(this.options.labels={}),Object.keys(Io.DefaultLabels).forEach(te=>{this.options.labels.hasOwnProperty(te)||(this.options.labels[te]=Io.DefaultLabels[te])}),this.options.defaultStyles||(this.options.defaultStyles={}),Object.keys(Io.DefaultStyles).forEach(te=>{if(!ee.defaultStyles.hasOwnProperty(te)){this.options.defaultStyles[te]=Io.DefaultStyles[te];return}if(te==="polyFillOpacity"&&(ee.defaultStyles[te]<0||ee.defaultStyles[te]>1)){logger$v.log("Wrong value ("+ee.defaultStyles[te]+") for defaultStyles.polyFillOpactity. Must be between 0 and 1"),this.options.defaultStyles[te]=Io.DefaultStyles[te];return}if(te==="strokeWidth"||te==="polyStrokeWidth"){var st=parseInt(ee.defaultStyles[te],10);if(isNaN(st)||st<0){logger$v.log("Wrong value ("+ee.defaultStyles[te]+") for defaultStyles.strokeWidth. Must be a positive interger value."),this.options.defaultStyles[te]=Io.DefaultStyles[te];return}this.options.defaultStyles[te]=st}if(te==="markerSize"){var ot=parseFloat(ee.defaultStyles[te]);if(isNaN(ot)||ot<0){logger$v.log("Wrong value ("+ee.defaultStyles[te]+") for defaultStyles.markerSize. Must be a positive value."),this.options.defaultStyles[te]=Io.DefaultStyles[te];return}this.options.defaultStyles[te]=ot}}),this.interactionCurrent=null,this.interactionSelectEdit=null,this.featuresCollectionSelected=null,this.stylingOvl=null,this.popupOvl=null,this.tooltipOvl=null,this.tooltipElem=null,this.panelCloseBtn=null,this.layer=null,this.options.layer&&this.options.layer instanceof VectorLayer&&(this.layer=this.options.layer),this._isDesktop=this._detectSupport(),this.options.popup||(this.options.popup={display:!0,apply:null}),this.ADD_AFTER_DRAWING_LAYER_EVENT="drawing:add:after",this.ADD_BEFORE_DRAWING_LAYER_EVENT="drawing:add:before"}_createEmptyLayer(){var ee=new Collection,te=new VectorLayer({source:new VectorSource({features:ee}
237),title:this.options.layerDescription.title,description:this.options.layerDescription.description});te.gpResultLayerId="drawing",this.dispatchEvent({type:this.ADD_BEFORE_DRAWING_LAYER_EVENT,layer:te}),this.setLayer(te)}_detectSupport(){var ee=!0,te=window.navigator.userAgent.toLowerCase();return(te.indexOf("iphone")!==-1||te.indexOf("ipod")!==-1||te.indexOf("ipad")!==-1||te.indexOf("android")!==-1||te.indexOf("mobile")!==-1||te.indexOf("blackberry")!==-1||te.indexOf("tablet")!==-1||te.indexOf("phone")!==-1||te.indexOf("touch")!==-1)&&(ee=!1),(te.indexOf("msie")!==-1||te.indexOf("trident")!==-1)&&(ee=!0),ee}_initContainer(){var ee=this._createMainContainerElement(),te=this._showDrawingButton=this._createShowDrawingPictoElement();ee.appendChild(te);var st=this._drawingPanel=this._createDrawingPanelElement(),ot=this._drawingPanelHeader=this._createPanelHeaderElement({icon:"ign-drawing",title:this.options.controlLabel||"Annoter la carte",btnClassForClose:"GPshowDrawingPicto"});st.appendChild(ot),this.panelCloseBtn=ot._closeBtn;var ct=this._createDrawingPanelDivElement();st.appendChild(ct);var ut=this._createDrawingToolsDivSections();ct.appendChild(ut);for(var dt=this._createDrawingToolsSections(),ht=0;ht<dt.length;ht++)ut.appendChild(dt[ht]);var ft=this._createDrawingButtonsPluginDiv();return ut.appendChild(ft),ee.appendChild(st),ee}_drawEndFeature(ee,te){var st=null;switch(te){case"Point":st=new Style$1({image:new Icon(this._getIconStyleOptions(this.options.markersList[0]))});break;case"LineString":st=new Style$1({stroke:new Stroke({color:this.options.defaultStyles.strokeColor,width:this.options.defaultStyles.strokeWidth})});break;case"Polygon":st=new Style$1({fill:new Fill({color:ColorUtils.hexToRgba(this.options.defaultStyles.polyFillColor,this.options.defaultStyles.polyFillOpacity)}),stroke:new Stroke({color:this.options.defaultStyles.polyStrokeColor,width:this.options.defaultStyles.polyStrokeWidth})});break}if(ee.setStyle(st),this._updateMeasure(ee,te),this.options.popup.display){var ot=this,ct=function(pt,mt,yt){if(ot.getMap().removeOverlay(ot.popupOvl),ot.popupOvl=null,yt&&mt&&mt.trim().length>0){var vt={};vt[pt]=mt.replace(/\n/g,"<br>"),ee.setProperties(vt)}},ut=null,dt=!0,ht=this.options.popup.function;ht&&typeof ht=="function"&&(ut=ht.call(ot,{feature:ee,geomType:te,closeFunc:function(){ct(null,!1)},saveFunc:function(pt){ct(pt,!0)}}),ut&&(dt=!1,ut.tabIndex=-1,ut.onblur=function(){ot.getMap().removeOverlay(ot.popupOvl),ot.popupOvl=null})),dt&&(ut=this._createLabelDiv({applyFunc:ct,inputId:this._addUID("att-input"),placeholder:"Saisir une description... (facultatif)",measure:this.options.tools.measure?ee.getProperties().measure:null,geomType:te,key:"description"})),this.popupOvl&&(this.getMap().removeOverlay(this.popupOvl),this.popupOvl=null),this.popupOvl=new Overlay({element:ut,positioning:"top-center"}),this.getMap().addOverlay(this.popupOvl);var ft=ee.getGeometry().getExtent();this.popupOvl.setPosition([(ft[0]+ft[2])/2,(ft[1]+ft[3])/2]),document.getElementById(this._addUID("att-input"))&&document.getElementById(this._addUID("att-input")).focus()}}_createRemoveInteraction(){var ee=new Select({layers:[this.layer],style:!1});return ee.on("select",te=>{!te||!te.selected||te.selected.length===0||(this.layer.getSource().removeFeature(te.selected[0]),this.getMap().removeInteraction(this.interactionCurrent),this.interactionCurrent=this._createRemoveInteraction(),this.getMap().addInteraction(this.interactionCurrent))}),ee}_createStylingInteraction(){var ee=new Select({layers:[this.layer],style:!1});return ee.on("select",te=>{if(this.stylingOvl&&this.getMap().removeOverlay(this.stylingOvl),!(!te||!te.selected||te.selected.length===0)){var st=null,ot=null,ct=null,ut=null,dt={},ht=te.selected[0].getGeometry(),ft=te.selected[0].getStyle();if(ht instanceof Point$1||ht instanceof MultiPoint){if(ft&&ft.getImage()&&typeof ft.getImage().getSrc=="function"&&ft.getImage().getSrc()!==this.options.defaultStyles.textIcon1x1.src&&(ut="Point",typeof ft.getImage().getSrc=="function"?(dt.markerSrc=ft.getImage().getSrc(),dt.markerSize=ft.getImage().getScale()||1,dt.markerAnchor=ft.getImage().getAnchor(),ft.getImage().getColor()?(st=ft.getImage().getColor(),Array.isArray(st)?st="rgba("+st.join()+")":dt.markerColor=st,ot=ColorUtils.isRGB(st)?ColorUtils.rgbaToHex(st):{hex:st,opacity:1},dt.markerColor=ot.hex,dt.markerOpacity=ot.opacity):dt.markerColor=this.options.markersList[0].color||"#ffffff"):(dt.markerSrc=this.options.markersList[0].src,dt.markerSize=this.options.markersList[0].scale||1,dt.markerColor=this.options.markersList[0].color||"#ffffff",dt.markerAnchor=this.options.markersList[0].anchor),dt.markerCustom=!this._getsMarkersOptionsFromSrc(dt.markerSrc)),ft&&ft.getText()){var pt=te.selected[0].getProperties().name;if(pt&&(ut=ut==="Point"?"Point&Text":"Text",ft.getText().getStroke()&&ft.getText().getStroke().getColor()&&
237(st=ft.getText().getStroke().getColor(),Array.isArray(st)?st="rgba("+st.join()+")":dt.strokeColor=st,ot=ColorUtils.isRGB(st)?ColorUtils.rgbaToHex(st):{hex:st,opacity:1},dt.strokeColor=ot.hex,dt.strokeOpacity=ot.opacity),ft.getText().getStroke()&&ft.getText().getStroke().getWidth()&&(dt.strokeWidth=ft.getText().getStroke().getWidth()),ft.getText().getFill()&&ft.getText().getFill().getColor()&&(st=ft.getText().getFill().getColor(),Array.isArray(st)?st="rgba("+st.join()+")":dt.fillColor=st,ot=ColorUtils.isRGB(st)?ColorUtils.rgbaToHex(st):{hex:st,opacity:1},dt.fillColor=ot.hex,dt.fillOpacity=ot.opacity),dt.strokeColor=dt.hasOwnProperty("strokeColor")?dt.strokeColor:this.options.defaultStyles.textStrokeColor,dt.strokeWidth=dt.hasOwnProperty("strokeWidth")?dt.strokeWidth:this.options.defaultStyles.textStrokeWidth,dt.fillColor=dt.hasOwnProperty("fillColor")?dt.fillColor:this.options.defaultStyles.textFillColor,ut==="Point&Text")){var mt=ft.getText().getText();mt||ft.getText().setText(pt);var yt=te.selected[0].get("checked");dt.labelDisplay=yt===void 0?this.options.defaultStyles.labelDisplay:yt}}}else ht instanceof LineString||ht instanceof MultiLineString?(ut="Line",ft&&ft.getStroke()&&(ft.getStroke().getWidth()&&(dt.strokeWidth=ft.getStroke().getWidth()),ft.getStroke().getColor()&&(st=ft.getStroke().getColor(),Array.isArray(st)?st="rgba("+st.join()+")":dt.strokeColor=st,ot=ColorUtils.isRGB(st)?ColorUtils.rgbaToHex(st):{hex:st,opacity:1},dt.strokeColor=ot.hex,dt.strokeOpacity=ot.opacity)),dt.strokeWidth=dt.hasOwnProperty("strokeWidth")?dt.strokeWidth:this.options.defaultStyles.strokeWidth,dt.strokeColor=dt.hasOwnProperty("strokeColor")?dt.strokeColor:this.options.defaultStyles.strokeColor):(ht instanceof Polygon||ht instanceof MultiPolygon)&&(ut="Polygon",ft&&ft.getStroke()&&(ft.getStroke().getWidth()&&(dt.strokeWidth=ft.getStroke().getWidth()),ft.getStroke().getColor()&&(st=ft.getStroke().getColor(),Array.isArray(st)?st="rgba("+st.join()+")":dt.strokeColor=st,ot=ColorUtils.isRGB(st)?ColorUtils.rgbaToHex(st):{hex:st,opacity:1},dt.strokeColor=ot.hex,dt.strokeOpacity=ot.opacity)),ft&&ft.getFill()&&ft.getFill().getColor()&&(st=ft.getFill().getColor(),Array.isArray(st)?st="rgba("+st.join()+")":dt.fillColor=st,ot=ColorUtils.isRGB(st)?ColorUtils.rgbaToHex(st):{hex:st,opacity:1},dt.fillColor=ot.hex,dt.fillOpacity=ot.opacity),dt.strokeWidth=dt.hasOwnProperty("strokeWidth")?dt.strokeWidth:this.options.defaultStyles.polyStrokeWidth,dt.strokeColor=dt.hasOwnProperty("strokeColor")?dt.strokeColor:this.options.defaultStyles.polyStrokeColor,dt.fillColor=dt.hasOwnProperty("fillColor")?dt.fillColor:this.options.defaultStyles.polyFillColor,dt.fillOpacity=dt.hasOwnProperty("fillOpacity")?dt.fillOpacity:this.options.defaultStyles.polyFillOpacity);if(!ut){logger$v.log("Unhandled geometry type for styling.");return}var vt=this,_t=function(xt){if(xt==="cancel"){vt.getMap().removeOverlay(ct);return}var Mt=xt!=="apply",Ot=document.getElementById(vt._addUID("fillColor")),kt=document.getElementById(vt._addUID("fillOpacity")),Nt=document.getElementById(vt._addUID("strokeColor")),Gt=document.getElementById(vt._addUID("strokeWidth")),Bt=document.getElementById(vt._addUID("markerSize"));switch(ut.toLowerCase()){case"text":Mt?(vt.options.defaultStyles.textStrokeColor=Nt.value,vt.options.defaultStyles.textStrokeWidth=Gt.value,vt.options.defaultStyles.textFillColor=Ot.value):te.selected[0].setStyle(new Style$1({text:new Text({font:"16px sans",textAlign:"left",text:ft.getText().getText(),fill:new Fill({color:Ot.value}),stroke:new Stroke({color:Nt.value,width:parseInt(Gt.value,10)})})}));break;case"point&text":case"point":var Ut=document.querySelector("input[type='checkbox']"),Vt=null,Ht=parseInt(Bt.value,10)/10,zt=document.querySelector("input[name='gpf-dropdown-radio-style']:checked");if(zt&&(Vt=vt._getsMarkersOptionsFromSrc(zt.value),Vt.scale=Ht),Mt){if(vt.options.defaultStyles.markerSize=Ht,vt.options.markersList.length>1){var jt=vt.options.markersList.findIndex(function(Qt){return Qt===Vt});jt>0&&(vt.options.markersList.splice(jt,1),vt.options.markersList.splice(0,0,Vt))}ut.toLowerCase()==="point&text"&&(vt.options.defaultStyles.textStrokeColor=dt.strokeColor,vt.options.defaultStyles.textStrokeWidth=dt.strokeWidth,vt.options.defaultStyles.textFillColor=dt.fillColor,vt.options.defaultStyles.labelDisplay=dt.labelDisplay)}else{var Wt={};ut.toLowerCase()==="point&text"&&(te.selected[0].set("checked",Ut.checked),Wt={text:new Text({font:"16px sans",textAlign:"left",text:Ut.checked?te.selected[0].get("name"):"",f
237ill:new Fill({color:dt.fillColor}),stroke:new Stroke({color:dt.strokeColor,width:parseInt(dt.strokeWidth,10)})})}),Vt?te.selected[0].setStyle(new Style$1(Object.assign({image:new Icon(vt._getIconStyleOptions(Vt))},Wt))):te.selected[0].setStyle(new Style$1(Object.assign({image:new Icon({src:dt.markerSrc,anchor:dt.markerAnchor,anchorOrigin:"top-left",anchorXUnits:"pixels",anchorYUnits:"pixels",scale:Ht})},Wt)))}break;case"line":Mt?(vt.options.defaultStyles.strokeColor=Nt.value,vt.options.defaultStyles.strokeWidth=parseInt(Gt.value,10)):te.selected[0].setStyle(new Style$1({stroke:new Stroke({width:parseInt(Gt.value,10),color:Nt.value})}));break;case"polygon":var Jt=parseInt(kt.value,10)/10;Mt?(vt.options.defaultStyles.polyStrokeColor=Nt.value,vt.options.defaultStyles.polyFillColor=Ot.value,vt.options.defaultStyles.polyFillOpacity=Jt,vt.options.defaultStyles.polyStrokeWidth=parseInt(Gt.value,10)):te.selected[0].setStyle(new Style$1({stroke:new Stroke({width:parseInt(Gt.value,10),color:Nt.value}),fill:new Fill({color:ColorUtils.hexToRgba(Ot.value,Jt)})}));break}Mt||vt.getMap().removeOverlay(ct)},bt=this._createStylingDiv({geomType:ut,initValues:dt,applyFunc:_t});ct=new Overlay({element:bt,positioning:"top-center"}),this.getMap().addOverlay(ct),ct.setPosition(te.mapBrowserEvent.coordinate),this.stylingOvl=ct,this.getMap().removeInteraction(this.interactionCurrent),this.interactionCurrent=this._createStylingInteraction(),this.getMap().addInteraction(this.interactionCurrent)}}),ee}_createLabelInteraction(){var ee=new Select({layers:[this.layer],style:!1});return ee.on("select",te=>{if(this.labelOvl&&this.getMap().removeOverlay(this.labelOvl),!(!te||!te.selected||te.selected.length===0)){var st=null,ot=null,ct=null,ut=null,dt=te.selected[0].getGeometry(),ht=te.selected[0].getStyle();if(dt instanceof Point$1||dt instanceof MultiPoint){var ft=te.selected[0].getProperties().name;ht&&ht.getText()&&ft?ot="Text":ht&&ht.getImage()&&(ot="Point")}else if(dt instanceof LineString||dt instanceof MultiLineString)ot="Line";else if(dt instanceof Polygon||dt instanceof MultiPolygon)ot="Polygon";else{logger$v.log("Geometry type for styling not supported .");return}if(!ot){logger$v.log("Unhandled geometry type for styling.");return}if(ot==="Text")ct=ht.getText().getText();else{var pt=te.selected[0].getProperties();pt&&(pt.hasOwnProperty("description")||pt.hasOwnProperty("desc"))&&(ct=pt.description||pt.desc),pt&&pt.hasOwnProperty("measure")&&(ut=pt.measure)}var mt=this,yt=function(_t,bt,xt){if(mt.getMap().removeOverlay(st),!!xt){var Mt=te.selected[0];if(ot==="Text"){var Ot=Mt.getStyle();Ot.getText().setText(bt),Mt.setProperties({name:bt}),Mt.setStyle(Ot);return}var kt={};kt[_t]=bt.replace(/\n/g,"<br>"),Mt.setProperties(kt)}},vt=this._createLabelDiv({applyFunc:yt,inputId:this._addUID("label-input"),placeholder:ot==="Text"?"Saisir un label...":"Saisir une description... (facultatif)",text:ct,key:"description",measure:this.options.tools.measure?ut:null,geomType:ot});st=new Overlay({element:vt,positioning:"top-center"}),this.getMap().addOverlay(st),st.setPosition(te.mapBrowserEvent.coordinate),document.getElementById(this._addUID("label-input")).focus(),this.labelOvl=st,this.getMap().removeInteraction(this.interactionCurrent),this.interactionCurrent=this._createLabelInteraction(),this.getMap().addInteraction(this.interactionCurrent)}}),ee}_updateMeasure(ee,te){logger$v.log(ee);var st=null,ot=this.getMap().getView().getProjection();function ct(Gt,Bt){Bt=Bt||2;var Ut=Math.pow(10,Bt);return Math.round(Gt*Ut)/Ut}var ut=te||ee.getProperties().type;switch(ut){case"Point":var dt=ee.getGeometry().getCoordinates(),ht=transform$1(dt,ot,"EPSG:4326");st="lon : ",st+=ct(ht[0],4)+"°",st+=" / ",st+="lat : ",st+=ct(ht[1],4)+"°";break;case"LineString":for(var ft=0,pt=ee.getGeometry().getCoordinates(),mt=0,yt=pt.length-1;mt<yt;++mt){var vt=transform$1(pt[mt],ot,"EPSG:4326"),_t=transform$1(pt[mt+1],ot,"EPSG:4326");ft+=getDistance(vt,_t)}st=ft>1e3?ct(ft/1e3,3)+" km":ct(ft,3)+" m";break;case"Polygon":var bt=0,xt=ee.getGeometry().clone(),Mt=xt.getLinearRing(0).getCoordinates();bt=Math.abs(getArea(new Polygon([Mt])));var Ot=xt.getLinearRings();if(Ot.length>1)for(var kt=1;kt<Ot.length;kt++){var Nt=Ot[kt].getCoordinates();bt-=Math.abs(getArea(new Polygon([Nt])))}st=bt>1e6?ct(bt/1e6,3)+" km^2":ct(bt,2)+" m^2";break}ee.setProperties({measure:st,type:ut})}_handleToolClick(ee,te,st){var ot=st.getMap();if(!ot){logger$v.trace("Drawing control not attached to any map.");return}Interactions.unset(ot,{current:"Drawing"}),st.interactionCurrent&&(ot.removeInteraction(st.interactionCurrent),st.interactionCurrent=null),st.interactionSelectEdit&&(ot.removeInteraction(st.interactionSelectEdit),st.interactionSelectEdit=null),st.popupOvl&&(st.getMap().removeOverlay(st.popupOvl),st.popupOvl=null),st.
237stylingOvl&&(st.getMap().removeOverlay(st.stylingOvl),st.stylingOvl=null),st.tooltipOvl&&(st.getMap().removeOverlay(st.tooltipOvl),st.tooltipOvl=null),this.layer||this._createEmptyLayer();const ct=dt=>{if(dt.dragging||!st.tooltipOvl)return;const ht=dt.coordinate;st.tooltipOvl.setPosition(ht)},ut=()=>{st.tooltipOvl&&(st.getMap().removeOverlay(st.tooltipOvl),st.tooltipOvl=null)};switch(te){case this._addUID("drawing-tool-point"):st.dtOptions.points.active&&(st.interactionCurrent=new Draw({stopClick:!0,source:st.layer.getSource(),style:new Style$1({image:new Icon(this._getIconStyleOptions(this.options.markersList[0]))}),type:"Point"}),st.interactionCurrent.on("drawend",function(dt){st._drawEndFeature(dt.feature,"Point")},st));break;case this._addUID("drawing-tool-line"):st.dtOptions.lines.active&&(st.interactionCurrent=new Draw({stopClick:!0,source:st.layer.getSource(),style:new Style$1({image:new CircleStyle({radius:this.options.cursorStyle.radius,stroke:new Stroke({color:this.options.cursorStyle.strokeColor,width:this.options.cursorStyle.strokeWidth}),fill:new Fill({color:this.options.cursorStyle.fillColor})}),stroke:new Stroke({color:this.options.defaultStyles.strokeColor,width:this.options.defaultStyles.strokeWidth})}),type:"LineString",handleMoveEvent:ct}),st.tootlTipElem||(st.tootlTipElem=document.createElement("div"),st.tootlTipElem.className="gpf-draw-linestring-tooltip"),st.tootlTipElem.innerText="Double-cliquer pour terminer",st.tooltipOvl=new Overlay({element:st.tootlTipElem,positioning:"top-right"}),st.interactionCurrent.on("drawend",function(dt){st._drawEndFeature(dt.feature,"LineString"),ut()},st),st.interactionCurrent.on("drawabort",ut,st));break;case this._addUID("drawing-tool-polygon"):st.dtOptions.polygons.active&&(st.interactionCurrent=new Draw({stopClick:!0,source:st.layer.getSource(),style:new Style$1({image:new CircleStyle({radius:this.options.cursorStyle.radius,stroke:new Stroke({color:this.options.cursorStyle.strokeColor,width:this.options.cursorStyle.strokeWidth}),fill:new Fill({color:this.options.cursorStyle.fillColor})}),stroke:new Stroke({color:this.options.defaultStyles.polyStrokeColor,width:this.options.defaultStyles.polyStrokeWidth}),fill:new Fill({color:ColorUtils.hexToRgba(this.options.defaultStyles.polyFillColor,this.options.defaultStyles.polyFillOpacity)})}),type:"Polygon",handleMoveEvent:ct}),st.tootlTipElem||(st.tootlTipElem=document.createElement("div"),st.tootlTipElem.className="gpf-draw-linestring-tooltip"),st.tootlTipElem.innerText="Double-cliquer pour terminer",st.tooltipOvl=new Overlay({element:st.tootlTipElem,positioning:"top-right"}),st.interactionCurrent.on("drawend",function(dt){st._drawEndFeature(dt.feature,"Polygon"),ut()},st),st.interactionCurrent.on("drawabort",ut,st));break;case this._addUID("drawing-tool-holes"):st.dtOptions.holes.active&&(st.interactionSelectEdit=new Select({stopClick:!0,condition:pointerMove,layers:[this.layer]}),st.interactionSelectEdit.setProperties({name:"Drawing",source:st}),ot.addInteraction(st.interactionSelectEdit),st.interactionCurrent=new Draw({stopClick:!0,features:this.interactionSelectEdit.getFeatures(),style:new Style$1({image:new CircleStyle({radius:this.options.cursorStyle.radius,stroke:new Stroke({color:this.options.cursorStyle.strokeColor,width:this.options.cursorStyle.strokeWidth}),fill:new Fill({color:this.options.cursorStyle.fillColor})}),stroke:new Stroke({color:this.options.defaultStyles.polyStrokeColor,width:this.options.defaultStyles.polyStrokeWidth}),fill:new Fill({color:ColorUtils.hexToRgba(this.options.defaultStyles.polyFillColor,this.options.defaultStyles.polyFillOpacity)})}),type:"Polygon"}),st.interactionCurrent.on("drawstart",function(dt){},st),st.interactionCurrent.on("drawend",function(dt){var ht=st.interactionSelectEdit.getFeatures();if(ht.getLength()){for(var ft=ht.item(0),pt=dt.feature.getGeometry().getCoordinates()[0],mt=!0,yt=0;yt<pt.length;yt++)if(!ft.getGeometry().intersectsCoordinate(pt[yt])){mt=!1;break}if(!mt)return;ft.getGeometry().appendLinearRing(new LinearRing(pt)),dt.feature=ft,st._drawEndFeature(dt.feature,"Polygon")}},st));break;case this._addUID("drawing-tool-text"):st.dtOptions.text.active&&(st.interactionCurrent=ne
237w Draw({stopClick:!0,source:st.layer.getSource(),style:new Style$1({image:new CircleStyle({radius:this.options.cursorStyle.radius,stroke:new Stroke({color:this.options.cursorStyle.strokeColor,width:this.options.cursorStyle.strokeWidth}),fill:new Fill({color:this.options.cursorStyle.fillColor})})}),type:"Point"}),st.interactionCurrent.on("drawend",dt=>{var ht=function(pt,mt,yt){if(st.getMap().removeOverlay(st.popupOvl),st.popupOvl=null,!yt||!mt){st.layer.getSource().removeFeature(dt.feature);return}var vt={};vt[pt]=mt,dt.feature.setProperties(vt),dt.feature.setStyle(new Style$1({image:new Icon(st._getIconStyleOptions(st.options.defaultStyles.textIcon1x1)),text:new Text({textAlign:"left",font:"16px sans",text:mt,fill:new Fill({color:st.options.defaultStyles.textFillColor}),stroke:new Stroke({color:st.options.defaultStyles.textStrokeColor,width:3})})}))},ft=this._createLabelDiv({applyFunc:ht,inputId:st._addUID("label-input"),geomType:"Text",key:"name",placeholder:"Saisir un label..."});st.popupOvl&&st.popupOvl.element.querySelector(".gp-styling-button.closer").click(),st.popupOvl=new Overlay({element:ft,positioning:"top-center"}),st.getMap().addOverlay(st.popupOvl),st.popupOvl.setPosition(dt.feature.getGeometry().getCoordinates()),document.getElementById(st._addUID("label-input")).focus()}));break;case this._addUID("drawing-tool-edit"):st.dtOptions.edit.active&&(this.featuresCollectionSelected=new Collection,st.interactionSelectEdit=new Select({condition:singleClick,layers:[this.layer],features:this.featuresCollectionSelected}),st.interactionSelectEdit.on("select",dt=>{}),st.interactionSelectEdit.setProperties({name:"Drawing",source:st}),ot.addInteraction(st.interactionSelectEdit),st.interactionCurrent=new Modify({stopClick:!0,features:this.interactionSelectEdit.getFeatures(),style:new Style$1({image:new CircleStyle({radius:this.options.cursorStyle.radius,stroke:new Stroke({color:this.options.cursorStyle.strokeColor,width:this.options.cursorStyle.strokeWidth}),fill:new Fill({color:this.options.cursorStyle.fillColor})})})}),st.interactionCurrent.on("modifyend",dt=>{var ht=dt.features.item(0);st._updateMeasure(ht)}));break;case this._addUID("drawing-tool-display"):st.dtOptions.display.active&&(st.interactionCurrent=this._createStylingInteraction());break;case this._addUID("drawing-tool-tooltip"):st.dtOptions.tooltip.active&&(st.interactionCurrent=this._createLabelInteraction());break;case this._addUID("drawing-tool-remove"):st.dtOptions.remove.active&&(st.interactionCurrent=st._createRemoveInteraction());break;default:logger$v.trace("unhandled tool type")}st.interactionCurrent&&(st.interactionCurrent.setProperties({name:"Drawing",source:this}),ot.addInteraction(st.interactionCurrent),st.tooltipOvl&&ot.addOverlay(st.tooltipOvl)),logger$v.log("interactions",ot.getInteractions())}onShowDrawingClick(ee){var te=this._showDrawingButton.ariaPressed;te==="true"?this.onPanelOpen():(this.popupOvl&&this.getMap().removeOverlay(this.popupOvl),this.onPanelClose()),this.disable(),this.collapsed=te!=="true",this.dispatchEvent("change:collapsed"),this.options.position&&!this.collapsed&&this.updatePosition(this.options.position)}onExportFeatureClick(){var ee=this.exportFeatures();if(ee){var te=document.createElement("a"),st="utf-8";if(te.setAttribute("href","data:"+this._exportMimeType+";charset="+st+","+encodeURIComponent(ee)),te.setAttribute("download",this.getExportName()+this._exportExt),document.createEvent){var ot=document.createEvent("MouseEvents");ot.initEvent("click",!0,!0),te.dispatchEvent(ot)}else te.click()}}};Kn(Io,"DefaultTools",{points:!0,lines:!0,polygons:!0,holes:!1,text:!0,remove:!0,display:!0,tooltip:!0,edit:!0,export:!0,measure:!1}),Kn(Io,"DefaultLabels",{control:"Annoter la carte",creatingTools:"Créer",points:"Placer des points",lines:"Dessiner des lignes",polygons:"Dessiner des polygones",holes:"Créer des trous sur un polygone",text:"Ecrire sur la carte",editingTools:"Éditer",edit:"Editer les tracés",display:"Modifier l'apparence des objets",tooltip:"Modifier les textes / infos-bulles",remove:"Supprimer des objets",export:"Exporter",exp
237ortTitle:"Exporter en KML",applyToObject:"Appliquer à l'objet",saveDescription:"Enregistrer",setAsDefault:"Définir par défaut",strokeColor:"Couleur du trait : ",strokeWidth:"Epaisseur du trait : ",fillColor:"Couleur de remplissage : ",fillOpacity:"Opacité du remplissage : ",markerSize:"Taille du pictogramme : ",markerColor:"Couleur du pictogramme : ",labelDisplay:"Afficher le label : "}),Kn(Io,"DefaultStyles",{textFillColor:"#000000",textStrokeColor:"#FFFFFF",textStrokeWidth:6,textIcon1x1:{src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR4nGNiYAAAAAkAAxkR2eQAAAAASUVORK5CYII=",anchor:[0,0]},polyFillColor:"#000091",polyFillOpacity:.7,polyStrokeColor:"#000091",polyStrokeWidth:4,strokeColor:"#FF7F00",strokeWidth:4,markerSize:1,markerColor:"#ffcc33",labelDisplay:!0}),Kn(Io,"DefaultCursorStyle",{radius:6,strokeColor:"#FFF",strokeWidth:1,fillColor:"rgba(0, 153, 255, 1)"});let Drawing=Io;Object.assign(Drawing.prototype,PanelDOM);Object.assign(Drawing.prototype,DrawingDOM);Object.assign(Drawing.prototype,Widget);window.ol&&window.ol.control&&(window.ol.control.Drawing=Drawing);var logger$u=LoggerByDefault.getLogger("LocationSelectorDOM"),LocationSelectorDOM={_addUID:function(ne){var ee=this._uid?ne+"-"+this._uid:ne;return ee},_createMainContainerElement:function(){var ne=document.createElement("div");return ne.className=this._addUID("GPlocationPoint"),ne.className+=" GPwidget gpf-widget ",ne},_createLocationPointElement:function(ne,ee){var te=document.createElement("div");return te.id=this._addUID("GPlocationPoint_"+ne),te.className=ee?"GPflexInput GPlocationStageFlexInput gpf-flex":"GPflexInput GPelementHidden gpf-flex gpf-hidden",te.style.cssText="",te},_createLocationPointLabelElement:function(ne,ee){var te=this,st=document.createElement("button");return st.id=this._addUID("GPlocationOriginLabel_"+ne),st.innerHTML=ee,st.className="GPlocationOriginLabel gpf-btn gpf-btn-icon-label fr-btn fr-btn--secondary gpf-btn--secondary",st.setAttribute("type","button"),st.addEventListener("click",function(ot){for(var ct=SelectorID.index(this.id),ut=document.getElementsByClassName(te._addUID("GPlocationPoint")),dt=0;dt<ut.length;dt++){var ht=ut[dt].childNodes[0].id,ft=SelectorID.index(ht);document.getElementById(te._addUID("GPlocationPoint_"+ft)).style.cssText=""}document.getElementById(te._addUID("GPlocationOriginCoords_"+ct)).value="",document.getElementById(te._addUID("GPlocationOrigin_"+ct)).value="",document.getElementById(te._addUID("GPlocationPoint_"+ct)).style.cssText="",document.getElementById(te._addUID("GPlocationOriginPointer_"+ct)).checked=!1,document.getElementById(te._addUID("GPlocationOrigin_"+ct)).className="GPelementShow gpf-show  gpf-input fr-input",document.getElementById(te._addUID("GPlocationOriginCoords_"+ct)).className="GPelementHidden gpf-hidden",document.getElementById(te._addUID("GPlocationStageRemove_"+ct))&&(document.getElementById(te._addUID("GPlocationStageRemove_"+ct)).className="GPlocationStageRemove gpf-btn gpf-btn-icon-remove fr-btn--sm fr-btn--secondary gpf-btn--secondary"),document.getElementById(te._addUID("GPlocationStageAdd"))&&(document.getElementById(te._addUID("GPlocationStageAdd")).className="GPlocationStageAdd gpf-btn gpf-btn-icon-add fr-btn--sm fr-btn--secondary gpf-btn--secondary fr-mt-2w"),te.onLocationClearPointClick(ot)}),st},_createLocationAutoCompleteteInputElement:function(ne){var ee=this,te=document.createElement("input");return te.id=this._addUID("GPlocationOrigin_"+ne),te.className="GPelementShow gpf-show gpf-input fr-input",te.type="text",te.placeholder="Saisir une adresse, un lieu...",te.autocomplete="off",te.addEventListener("keyup",function(st){var ot=st.which||st.keyCode;if(!(ot===13||ot===10||ot===38||ot===40)){var ct=SelectorID.index(this.id);document.getElementById(ee._addUID("GPlocationOrigin_"+ct)).value.length>2?(document.getElementById(ee._addUID("GPlocationAutoCompleteList_"+ct)).classList.replace("GPelementHidden","GPelementVisible"),document.getElementById(ee._addUID("GPlocationAutoCompleteList_"+ct)).classList.replace("gpf-hidden","gpf-visible")):(document.getElementById(ee._addUID("GPlocationAutoCompleteList_"+ct)).classList.replace("GPelementVisible","GPelementHidden"),document.getElementById(ee._addUID("GPlocationAutoCompleteList_"+ct)).classList.replace("gpf-visible","gpf-hidden")),ee.onAutoCompleteSearchText(st)}}),te.addEventListener("keydown",function(st){var ot=st.which||st.keyCode,ct=document.getElementById(ee._addUID("GPlocationAutoCompleteResult_"+ne));if(ct){var ut=ct.getElementsByClassName("GPautoCompleteProposal current"),dt=ct.getElementsByClassName("GPautoCompleteProposal"),ht=dt.length;if(ht){var ft=null;if(ut.length)ft=ut[0];else{ft=dt[0],ft.className="GPautoCompleteProposal current",ft.style.color="#000000",ft.style["background-color"]="#CEDBEF";return}var pt=parseInt(SelectorID.index(ft.id),10),mt=pt===ht-1?dt[0]:dt[pt+1],yt=pt===0?dt[ht-1]:dt[pt-1];switch(ft.style["background-color"]="",ft.style.color="",yt.style["background-color"]="",yt.style.color="",mt.style["background-color"]="",mt.style.color="",ot){case 38:logger$u.log("arrow up"),ft.className="GPautoCompleteProposal",yt.className="GPautoCompleteProposal current",
237yt.style.color="#000000",yt.style["background-color"]="#CEDBEF";break;case 40:logger$u.log("arrow down"),ft.className="GPautoCompleteProposal",mt.className="GPautoCompleteProposal current",mt.style.color="#000000",mt.style["background-color"]="#CEDBEF";break;case 13:logger$u.log("enter"),ft.click(st);break}ft.focus()}}}),te},_createLocationCoordinateInputElement:function(ne){var ee=this,te=document.createElement("input");return te.id=this._addUID("GPlocationOriginCoords_"+ne),te.className="GPelementHidden gpf-input gpf-hidden fr-input",te.type="text",te.disabled=!1,te.addEventListener("click",function(){var st=SelectorID.index(this.id);document.getElementById(ee._addUID("GPlocationOriginLabel_"+st)).click()}),te},_createLocationPointerShowInputElement:function(ne){var ee=document.createElement("input");return ee.id=this._addUID("GPlocationOriginPointer_"+ne),ee.className="GPelementHidden gpf-hidden",ee.type="checkbox",ee},_createLocationPointerInputElement:function(ne){var ee=this,te=document.createElement("button");return te.id=this._addUID("GPlocationOriginPointerImg_"+ne),te.htmlFor=this._addUID("GPlocationOriginPointer_"+ne),te.className="GPlocationOriginPointerImg gpf-btn gpf-btn-icon-pointer fr-btn",te.title="Pointer un lieu sur la carte",te.setAttribute("type","button"),te.addEventListener("click",function(st){st.preventDefault(),st.stopPropagation();var ot=SelectorID.index(this.id),ct=document.getElementsByClassName(ee._addUID("GPlocationPoint")),ut,dt,ht;for(ut=0;ut<ct.length;ut++)dt=ct[ut].childNodes[0].id,ht=SelectorID.index(dt),ot!==ht&&(document.getElementById(ee._addUID("GPlocationOriginPointer_"+ht)).checked=!1,document.getElementById(ee._addUID("GPlocationOriginCoords_"+ht)).value==="Pointer un lieu sur la carte"&&(document.getElementById(ee._addUID("GPlocationOriginCoords_"+ht)).value="",document.getElementById(ee._addUID("GPlocationOrigin_"+ht)).className="GPelementShow gpf-show  gpf-input fr-input",document.getElementById(ee._addUID("GPlocationOriginCoords_"+ht)).className="GPelementHidden gpf-hidden"));if(document.getElementById(ee._addUID("GPlocationOriginPointer_"+ot)).checked){for(document.getElementById(ee._addUID("GPlocationOriginCoords_"+ot)).value="",ut=0;ut<ct.length;ut++)dt=ct[ut].childNodes[0].id,ht=SelectorID.index(dt),document.getElementById(ee._addUID("GPlocationPoint_"+ht)).style.cssText="";document.getElementById(ee._addUID("GPlocationStageRemove_"+ot))&&(document.getElementById(ee._addUID("GPlocationStageRemove_"+ot)).className="GPlocationStageRemove  gpf-btn gpf-btn-icon-remove fr-btn--sm fr-btn--secondary gpf-btn--secondary"),document.getElementById(ee._addUID("GPlocationStageAdd"))&&(document.getElementById(ee._addUID("GPlocationStageAdd")).className="GPlocationStageAdd gpf-btn gpf-btn-icon-add fr-btn--sm fr-btn--secondary gpf-btn--secondary fr-mt-2w"),document.getElementById(ee._addUID("GPlocationOriginPointer_"+ot)).checked=!1,document.getElementById(ee._addUID("GPlocationOrigin_"+ot)).className="GPelementShow gpf-show  gpf-input fr-input",document.getElementById(ee._addUID("GPlocationOriginCoords_"+ot)).className="GPelementHidden gpf-hidden"}else{for(document.getElementById(ee._addUID("GPlocationOriginCoords_"+ot)).value="Pointer un lieu sur la carte",ut=0;ut<ct.length;ut++)dt=ct[ut].childNodes[0].id,ht=SelectorID.index(dt),ot===ht?document.getElementById(ee._addUID("GPlocationPoint_"+ht)).style.cssText="":document.getElementById(ee._addUID("GPlocationPoint_"+ht)).style.display="none";document.getElementById(ee._addUID("GPlocationStageRemove_"+ot))&&(document.getElementById(ee._addUID("GPlocationStageRemove_"+ot)).className="GPelementHidden gpf-hidden"),document.getElementById(ee._addUID("GPlocationStageAdd"))&&(document.getElementById(ee._addUID("GPlocationStageAdd")).className="GPelementHidden gpf-hidden"),document.getElementById(ee._addUID("GPlocationOriginPointer_"+ot)).checked=!0,document.getElementById(ee._addUID("GPlocationOrigin_"+ot)).className="GPelementHidden gpf-hidden",document.getElementById(ee._addUID("GPlocationOriginCoords_"+ot)).className="GPelementShow gpf-show gpf-input fr-input",document.getElementById(ee._addUID("GPlocationOriginCoords_"+ot)).disabled=!0}ee.onActivateMapPointClick(st)}),te},_createLocationRemovePointElement:function(ne){var ee=this,te=document.createElement("button");return te.id=this._addUID("GPlocationStageRemove_"+ne),te.className="GPlocationOpen GPlocationStageRemove gpf-btn gpf-btn-icon-remove fr-btn--sm fr-btn--secondary gpf-btn--secondary",te.title="Supprimer l'étape",te.setAttribute("tabindex","0"),te.setAttribute("aria-pressed",!1),te.setAttribute("type","button"),te.addEventListener("click",function(st){var ot=st.target.ariaPressed==="true";st.target.setAttribute("aria-pressed",!ot);var ct=document.getElementsByClassName(ee._addUID("GPlocationPoint")),ut=ct.length-1,dt=ct[0].childNodes[0].id,ht=ct[ut].childNodes[0].id,ft=SelectorID.index(dt),pt=SelectorID.index(ht);if(ne!==ft&&ne!==pt){var mt=SelectorID.index(this.id);document.getElementById(ee._addUID("GPlocationPoint_"+mt)).className="GPflexInput GPelementHidden gpf-flex gpf-hidden",document.getElementById(ee._addUID("GPlocationOrigin_"+mt)).value="",document.getElementById(ee._addUID("GPlocationOrigin_"+mt)).className="GPelementShow gpf-show gpf-input fr-input",document.getElementById(ee._addUID("GPlocationOriginCoords_"+mt)).value="",document.getElementById(ee._addUID("GPlocationOriginCoords_"+mt)).className="GPelementHidden gpf-hidden",document.getElementById(ee._addUID("GPlocationStageAdd")).style.display="",document.getElementById(ee._addUID("GPlocationPoint_"+mt)).parentElement.previousSibling.classList.add("GPelementHidden","gpf-hidden"),ee.onLocationRemovePointClick(st)}}),te},_createLocationAddPointElement:function(){var ne=this,ee=document.createElement("button");return ee.id=this._addUID("GPlocationStageAdd"),ee.className="GPlocationOpen GPlocationStageAdd gpf-btn gpf-btn-icon-add fr-btn--sm fr-btn--secondary gpf-btn--secondary fr-mt-2w",ee.title="Ajouter une étape",checkDsfr()&&(ee.innerText="Ajouter une étape"),ee.setAttribute("tabindex","0"),ee.setAttribute("aria-pressed",!1),ee.setAttribute("type","button"),ee.addEventListener("click",function(te){for(var st=1,ot=0,ct=document.getElementsByClassName(ne._addUID("GPlocationPoint")),ut=1;ut<ct.length-1;ut++){var dt=ct[ut].childNodes[0].id,ht=SelectorID.index(dt);document.getElementById(ne._addUID("GPlocationPoint_"+ht))&&(document.getElementById(ne._addUID("GPlocationPoint_"+ht)).className==="GPflexInput GPelementHidden gpf-flex gpf-hidden"?st===1&&(st=ht):ot++)}st<ct.length&&(document.getElementById(ne._addUID("GPlocationPoint_"+st)).className="GPflexInput GPlocationStageFlexInput gpf-flex",document.getElementById(ne._addUID("GPlocationPoint_"+st)).parentElement.previousSibling.classList.remove("GPelementHidden","gpf-hidden")),ot===4&&(document.getElementById(ne._addUID("GPlocationStageAdd")).style.display="none");var ft=te.target.ariaPressed==="true";te.target.setAttribute("aria-pressed",!ft),ne.onLocationAddPointClick(te)}),ee},_createLocationAutoCompleteElement:function(ne){var ee=document.createElement("div");return ee.id=this._addUID("GPlocationAutoCompleteList_"+ne),ee.className="GPlocationAutoCompleteList GPelementHidden gpf-panel gpf-hidden fr-modal",ee},_createLocationAutoCompleteResultElement:function(ne){var ee=this,te=document.createElement("div");return te.id=this._addUID("GPlocationAutoCompleteResult_"+ne),te.className="GPadvancedAutoCompleteResult gpf-panel__list",te.addEventListener?te.addEventListener("click",function(st){ee.onAutoCompletedResultsItemClick(st),document.getElementById(ee._addUID("GPlocationAutoCompleteList_"+ne)).classList.replace("GPelementHidden","GPelementVisible"),document.getElementById(ee._addUID("GPlocationAutoCompleteList_"+ne)).classList.replace("gpf-hidden","gpf-visible")},!1):te.attachEvent&&te.attachEvent("onclick",function(st){ee.onAutoCompletedResultsItemClick(st),document.getElementById(ee._addUID("GPlocationAutoCompleteList_"+ne)).classList.replace("GPelementHidden","GPelementVisible"),document.getElementById(ee._addUID("GPlocationAutoCompleteList_"+ne)).classList.replace("gpf-hidden","gpf-visible")}),te},_createLocationAutoCompletedLocationElement:function(ne,ee,te){var st=document.getElementById(this._addUID("GPlocationAutoCompleteResult_"+ne)),ot=document.createElement("div");ot.id=this._addUID("AutoCompletedLocation_"+te),ot.className="GPautoCompleteProposal gpf-panel__items",ot.title=GeocodeUtils.getSuggestedLocationFreeform(ee),ot.innerHTML=GeocodeUtils.getSuggestedLocationFreeform(ee),st.appendChild(ot)},GPdisplayCoordinate:function(ne){for(var ee=document.getElementsByClassName(this._addUID("GPlocationPoint")),te=0;te<ee.length;te++){var st=ee[te].childNodes[0].id,ot=SelectorID.index(st);if(document.getElementById(this._addUID("GPlocationOriginPointer_"+ot)).checked){document.getElementById(this._addUID("GPlocationOriginCoords_"+ot)).value=ne,document.getElementById(this._addUID("GPlocationOriginCoords_"+ot)).disabled=!1;for(var ct=0;ct<ee.length;ct++){st=ee[ct].childNodes[0].id;var ut=SelectorID.index(st);document.getElementById(this._addUID("GPlocationPoint_"+ut)).style.cssText="",document.getElementById(this._addUID("GPlocationStageRemove_"+ut))&&(document.getElementById(this._addUID("GPlocationStageRemove_"+ut)).className="GPlocationStageRemove gpf-btn gpf-btn-icon-remove fr-btn--sm fr-btn--secondary gpf-btn--secondary")}document.getElementById(this._addUID("GPlocationOriginPointer_"+ot)).checked=!1,document.getElementById(this._addUID("GPlocationStageAdd"))&&(document.getElementById(this._addUID("GPlocationStageAdd")).className="GPlocationStageAdd gpf-btn gpf-btn-icon-add fr-btn--sm");return}}}},logger$t=LoggerByDefault.getLogger("locationselector");class LocationSelector extends Control{constructor(ee){if(ee=ee||{},super({element:ee.element||document.createElement("div"),render:ee.render,target:ee.target}),!(this instanceof LocationSelector))throw new TypeError("ERROR CLASS_CONSTRUCTOR");return this.CLASSNAME="LocationSelector",this.initialize(ee),this._container=this._initContainer(),this.element?this.element.appendChild(this._container):this.element=this._container,this}initialize(ee){this.options={tag:{id:1,groupId:null,label:">",display:!0,addOption:!1,removeOption:!1},displayInfo:!0,autocompleteOptions:{}}
237,Helper.mergeParams(this.options,ee),this._uid=this.options.tag.groupId||SelectorID.generate(),this._map=null,this._inputsContainer=null,this._buttonLabel=null,this._inputAutoComplete=null,this._inputShowPointerContainer=null,this._inputShowPointer=null,this._inputCoordinateContainer=null,this._addPointElement=null,this._removePointElement=null,this._coordinate=null,this._suggestedContainer=null,this._suggestedList=null,this._suggestedLocations=[],this._currentLocation=null,this._initMarker(),this._resources={},this.listenerKey=null}_initMarker(){if(this._marker=null,this._markerUrl="",this._markerOffset=[0,0],this.options.tag.markerOpts&&this.options.tag.markerOpts.url){this._markerUrl=this.options.tag.markerOpts.url;var ee=this.options.tag.markerOpts.offset;ee&&(Array.isArray(ee)&&ee.length===2?this._markerOffset=ee:logger$t.log("markerOpts.offset should be an array. e.g. : [0,0]"))}else this._markerUrl=Marker.lightOrange,this._markerOffset=Marker.defaultOffset}getCoordinate(){return this._coordinate}setCoordinate(ee,te){var st=this.getMap(),ot=st.getView().getProjection().getCode();te||(te=ot),this._setCoordinate(ee,te),ee=transform$1(ee,te,ot),this._setMarker([ee[0],ee[1]],null,!1)}clear(){this.clearResults(),this._buttonLabel.click()}clearResults(){this._currentLocation=null,this._coordinate=null,this._hideSuggestedLocation(),this._clearSuggestedLocation(),this._setMarker(),unByKey(this.listenerKey)}
237_initContainer(){var ee=this.options.tag.id,te=this._createMainContainerElement(),st=this._inputsContainer=this._createLocationPointElement(ee,this.options.tag.display);te.appendChild(st);var ot=this._buttonLabel=this._createLocationPointLabelElement(ee,this.options.tag.label);st.appendChild(ot);var ct=this._inputAutoComplete=this._createLocationAutoCompleteteInputElement(ee);ct.addEventListener?ct.addEventListener("click",()=>this.onAutoCompleteInputClick()):ct.attachEvent&&ct.attachEvent("onclick",()=>this.onAutoCompleteInputClick()),st.appendChild(ct);var ut=this._inputCoordinateContainer=this._createLocationCoordinateInputElement(ee);st.appendChild(ut);var dt=this._inputShowPointerContainer=this._createLocationPointerShowInputElement(ee);st.appendChild(dt);var ht=this._inputShowPointer=this._createLocationPointerInputElement(ee);if(st.appendChild(ht),this.options.tag.addOption){var ft=this._addPointElement=this._createLocationAddPointElement();st.appendChild(ft)}if(this.options.tag.removeOption){var pt=this._removePointElement=this._createLocationRemovePointElement(ee);st.appendChild(pt)}var mt=this._suggestedContainer=this._createLocationAutoCompleteElement(ee),yt=this._suggestedList=this._createLocationAutoCompleteResultElement(ee);return mt.appendChild(yt),te.appendChild(mt),te}onAutoCompleteInputClick(){this._inputAutoComplete&&this._inputAutoComplete.value.length>2&&this._displaySuggestedLocation()}onAutoCompleteSearchText(ee){var te=ee.target.value;if(te){var st=this.options.autocompleteOptions||{},ot=st.onSuccess||null,ct=st.onFailure||null;if(this._currentLocation=te,te.length<3){this._clearSuggestedLocation();return}var ut=this;this._requestAutoComplete({text:te,maximumResponses:5,onSuccess:function(ht){if(ht){var ft=ht.suggestedLocations;ut._fillAutoCompletedLocationListContainer(ft),ot&&ot.call(this,ht)}},onFailure:function(ht){ut._clearSuggestedLocation(),logger$t.log(ht.message),ct&&ct.call(this,ht)}});var dt=this.getMap();dt.on("click",()=>this._hideSuggestedLocation()),dt.on("pointerdrag",()=>this._hideSuggestedLocation())}}onAutoCompletedResultsItemClick(ee){var te=SelectorID.index(ee.target.id);if(te){var st=[this._suggestedLocations[te].position.x,this._suggestedLocations[te].position.y];this._coordinate=st;var ot={type:this._suggestedLocations[te].type,fields:this._suggestedLocations[te]},ct=GeocodeUtils.getSuggestedLocationFreeform(this._suggestedLocations[te]);this._setLabel(ct);var ut=this.getMap().getView(),dt=ut.getProjection().getCode();dt!=="EPSG:4326"&&(st=transform$1(st,"EPSG:4326",dt)),this._setPosition(st),this._setMarker(st,ot,this.options.displayInfo)}}onActivateMapPointClick(){var ee=this.getMap();this._inputShowPointerContainer.checked?(this.clearResults(),this.listenerKey=ee.on("click",te=>this.onMouseMapClick(te)),this._setCursor("crosshair")):(unByKey(this.listenerKey),this._setCursor())}onLocationClearPointClick(){this._setCursor(),this.clearResults()}onLocationRemovePointClick(){this._setCursor(),this.clearResults()}onLocationAddPointClick(ee){logger$t.log("onRouteAddPointClick",ee)}onMouseMapClick(ee){var te=ee.coordinate;if(!(!ee.map||!ee.map.getView())){var st=ee.map.getView().getProjection();this._setCoordinate(te,st),this._setMarker([te[0],te[1]],null,!1),this.onActivateMapPointClick(ee)}}_setLabel(ee){this._inputAutoComplete.value=ee}_setCursor(ee){var te=this.getMap(),st=te.getTargetElement();ee?st.style.cursor=ee:st.style.cursor=null}_setCoordinate(ee,te){this._coordinate=transform$1(ee,te,"EPSG:4326");var st=this._coordinate[0].toFixed(4),ot=this._coordinate[1].toFixed(4),ct=ot+" / "+st;this.GPdisplayCoordinate(ct)}_setPosition(ee){var te=this.getMap().getView();te.setCenter(ee)}_setMarker(ee,te,st){var ot=this.getMap();if(this._marker!=null&&(ot.removeOverlay(this._marker),this._marker=null),ee){var ct=document.createElement("img");ct.src=this._markerUrl,this._marker=new Overlay({position:ee,offset:this._markerOffset,element:ct,stopEvent:!1}),ot.addOverlay(this._marker),st&&logger$t.log("marker information : ",te)}}_clearSuggestedLocation(){if(this._suggestedLocations=[],this._suggestedList)for(;this._suggestedList.firstChild;)this._suggestedList.removeChild(this._suggestedList.firstChild)}_hideSuggestedLocation(){this._suggestedContainer&&(this._suggestedContainer.classList.replace("GPelementVisible","GPelementHidden"),this._suggestedContainer.classList.replace("gpf-visible","gpf-hidden"))}_displaySuggestedLocation(){this._suggestedContainer&&(this._suggestedContainer.classList.replace("GPelementHidden","GPelementVisible"),this._suggestedContainer.classList.replace("gpf-hidden","gpf-visible"))}_requestAutoComplete(ee){if(logger$t.log("_requestAutoComplete()",ee),!(!ee||Object.keys(ee).length===0)&&ee.text){logger$t.log(ee);var te={};Helper.assign(te,this.options.autocompleteOptions),Helper.assign(te,ee);var st=this._resources.AutoCompletion||null;st&&Array.isArray(st)&&(te.filterOptions||(te.filterOptions={}),te.filterOptions.type=st),te.apiKey=te.apiKey||this.options.apiKey,typeof te.ssl!="boolean"&&(typeof this.options.ssl=="boolean"?te.ssl=this.options.ssl:te.ssl=!0),logger$t.log(te),Gp.Services.autoComplete(te)}}_fillAutoCompletedLocationListContainer(ee){if(!(!ee||ee.length===0)){var te=this._suggestedList;if(te.childElementCount)for(;te.firstChild;)te.removeChild(te.firstChild);for(var st=0;st<ee.length;st++)this._createLocationAutoCompletedLocationElement(this.options.tag.
237id,ee[st],st);this._suggestedLocations=ee}}}Object.assign(LocationSelector.prototype,LocationSelectorDOM);window.ol&&window.ol.control&&(window.ol.control.LocationSelector=LocationSelector);var ExportDOM={_addUID:function(ne){var ee=this.uid?ne+"-"+this.uid:ne;return ee}},logger$s=LoggerByDefault.getLogger("export");class ButtonExport extends Control{constructor(ee){if(ee=ee||{layer:null,control:null,target:null,format:"geojson",name:"export",description:"export",title:"Exporter",kind:"secondary",menu:!1,icons:{menu:"☰ ",button:""},callback:null},logger$s.trace("[constructor] Export",ee),super({element:document.createElement("div"),render:ee.render,target:null}),!(this instanceof ButtonExport))throw new TypeError("ERROR CLASS_CONSTRUCTOR");this.CLASSNAME="Export",this.EXPORT_ROUTE={},this.EXPORT_ISOCHRON={},this.EXPORT_PROFILE={},this.uid=ee.id||SelectorID.generate(),this.extension=null,this.mimeType=null,this.container=null,this.button=null,this.buttonOptions=null,this.inputName=null,this.inputDesc=null,this.menu=null,this.menuClassHidden="GPelementHidden gpf-hidden",this.initOptions(ee),this.initContainer(),this.BUTTON_EXPORT_CLICKED_EVENT="button:clicked"}render(){if(!this.options.target&&this.options.control){var ee=this.options.control.getContainer(),te=ee.querySelector(".container-buttons-plugin");this.options.target=te||ee.lastChild}this.container&&this.options.target.appendChild(this.container)}initOptions(ee){this.options={layer:null,control:null,target:null,download:!0,format:"geojson",name:"export",description:"export",title:"Exporter",kind:"secondary",direction:"row",menu:!1,menuOptions:{above:!1,outside:!1,labelName:!0,labelDesc:!0,selectFormat:!0},icons:{menu:"☰ ",button:"export"},callback:null};var te=Helper.assign(this.options.icons,ee.icons),st=Helper.assign(this.options.menuOptions,ee.menuOptions);Helper.assign(this.options,ee),Helper.assign(this.options.icons,te),Helper.assign(this.options.menuOptions,st),logger$s.debug(this.options),this.options.layer,this.options.control,this.options.target;var ot=this.options.format;ot?this.setFormat(ot):this.setFormat(""),this.options.name||this.setName("export"),this.options.description||this.setDescription("export"),this.options.title||this.setTitle("Exporter"),this.options.kind||this.setKind("secondary"),this.options.menu===void 0&&this.setMenu(!1)}initContainer(){var ee=this.options.title;this.options.menu&&(ee=this.options.icons.menu+this.options.title);var te=document.createElement("div");te.id=this._addUID("GPexportContainer"),te.className="GPexportMenuContainer gpf-export-menu-container gpf-export-menu-container-row-reverse",this.options.direction==="column"&&te.classList.replace("gpf-export-menu-container-row-reverse","gpf-export-menu-container-column-reverse");var st=this.stringToHTML(`
238            <div class="GPexportMenuHidden gpf-accordion fr-accordion ${this.menuClassHidden}">
239                <h3 class="gpf-accordion__title fr-accordion__title">
240                    <button type="button" 
241                        id="GPexportBtnMenuContent-${this.uid}"
242                        class="gpf-accordion__btn fr-accordion__btn" 
243                        aria-expanded="false" aria-controls="GPexportMenuContent-${this.uid}">options</button>
244                </h3>
245                <div id="GPexportMenuContent-${this.uid}"
246                    class="GPexportMenuContent fr-collapse fr-mx-2w">
247                    <div id="GPexportMenuName-${this.uid}" 
248                        class="GPexportMenuName">
249                        <label class="GPlabel gpf-label fr-label" for="GPexportMenuInputName-${this.uid}" title="Nom">Nom</label>
250                        <input type="text" id="GPexportMenuInputName-${this.uid}" class="GPinput gpf-input fr-input">
251                    </div>
252                    <div id="GPexportMenuDesc-${this.uid}"
253                        class="GPexportMenuDesc">
254                        <label class="GPlabel gpf-label fr-label" for="GPexportMenuInputDesc-${this.uid}" title="Description">Description</label>
255                        <input type="text" id="GPexportMenuInputDesc-${this.uid}" class="GPinput gpf-input fr-input">
256                    </div>
257                    <div id="GPexportMenuFormat-${this.uid}">
258                        <label class="GPlabel gpf-label fr-label" title="Formats">Formats</label>
259                        <div class="GPexportMenuFormat fr-radio-group fr-m-1w">
260                            <input type="radio" 
261                                id="GPmenuFormatGeojson-${this.uid}"
262                                name="format" 
263                                value="geojson">
264                            <label class="fr-label container" for="GPmenuFormatGeojson-${this.uid}">GeoJSON
265                                <span class="checkmark"></span>
266                            </label>
267                        </div>
268                        <div class="GPexportMenuFormat fr-radio-group fr-m-1w">
269                            <input type="radio" 
270                                id="GPmenuFormatKml-${this.uid}"
271                                name="format" 
272                                value="kml">
273                            <label class="fr-label container" for="GPmenuFormatKml-${this.uid}">KML
274                                <span class="checkmark"></span>
275                            </label>
276                        </div>
277                        <div class="GPexportMenuFormat fr-radio-group fr-m-1w">
278                            <input type="radio" 
279                                id="GPmenuFormatGpx-${this.uid}"
280                                name="format" 
281                                value="gpx">
282                            <label class="fr-label container" for="GPmenuFormatGpx-${this.uid}">GPX
283                                <span class="checkmark"></span>
284                            </label>
285                        </div>
286                    </div>
287                    <div id="GPexportMenuButtons-${this.uid}" 
288                        class="GPexportMenuButtons">
289                        <button 
290                            type="button"
291                            id="GPexportMenuButtonValidate-${this.uid}" 
292                            class="GPexportMenuButtonValidate GPsubmit gpf-btn gpf-btn-icon-export-validate fr-btn fr-btn--secondary fr-m-1w">
293                            Valider
294                        </button>
295                        <button 
296                            type="button"
297                            id="GPexportMenuButtonCancel-${this.uid}" 
298                            class="GPexportMenuButtonIconCancel GPsubmit gpf-btn gpf-btn-icon-export-cancel fr-btn fr-btn--secondary fr-m-1w">
299                            Annuler
300                        </button>
301                    </div>
302                </div>
303            </div>
304        `);if(this.menu=st.firstChild,this.menu){if(this.options.menu){var ot=this.menu.className;this.menu.className=ot.replace(this.menuClassHidden,"")}var ct=this.options.format.toUpperCase(),ut=this.menu.querySelectorAll('input[type=radio][name="format"]');for(let Mt=0;Mt<ut.length;Mt++){var dt=ut[Mt];dt.id.toUpperCase().includes(ct)&&(dt.checked=!0),dt.addEventListener("change",Ot=>this.onChangeRadioFormat(Ot))}this.buttonOptions=this.menu.querySelector("#GPexportBtnMenuContent-"+this.uid),this.buttonOptions&&this.buttonOptions.addEventListener("click",Mt=>this.onClickButtonToggleOptions(Mt)),this.inputName=this.menu.querySelector("#GPexportMenuInputName-"+this.uid),this.inputDesc=this.menu.querySelector("#GPexportMenuInputDesc-"+this.uid),this.inputName.addEventListener("change",Mt=>this.onChangeInputName(Mt)),this.inputName.addEventListener("focusin",Mt=>this.onFocusInputName(Mt)),this.inputDesc.addEventListener("change",Mt=>this.onChangeInputDesc(Mt)),this.inputDesc.addEventListener("focusin",Mt=>this.onFocusInputDesc(Mt));var ht=this.menu.querySelector("#GPexportMenuButtonValidate-"+this.uid);ht.addEventListener("click",Mt=>this.onClickButtonValidate(Mt));var ft=this.menu.querySelector("#GPexportMenuButtonCancel-"+this.uid);if(ft.addEventListener("click",Mt=>this.onClickButtonCancel(Mt)),this.options.menuOptions){if(this.options.menuOptions.outside){this.menu.classList.remove("gpf-accordion","fr-accordion");var pt=this.menu.querySelector("#GPexportBtnMenuContent-"+this.uid);pt.classList.add("gpf-hidden");var mt=this.menu.querySelector("#GPexportMenuContent-"+this.uid);mt.classList.remove("fr-collapse");var yt=this.menu.querySelector("#GPexportMenuButtons-"+this.uid);yt.classList.add("gpf-hidden")}if(this.options.menuOptions.above&&(te.classList.replace("gpf-export-menu-container-row-reverse","gpf-export-menu-container-row"),te.classList.replace("gpf-export-menu-container-column-reverse","gpf-export-menu-container-column")),!this.options.menuOptions.labelName){var vt=this.menu.querySelector("#GPexportMenuName-"+this.uid);vt.classList.add("gpf-hidden")}if(!this.options.menuOptions.labelDesc){var _t=this.menu.querySelector("#GPexportMenuDesc-"+this.uid);_t.classList.add("gpf-hidden")}if(!this.options.menuOptions.selectFormat){var bt=this.menu.querySelector("#GPexportMenuFormat-"+this.uid);bt.classList.add("gpf-hidden")}}}te.appendChild(this.menu);var xt=this.stringToHTML(`
305            <button 
306                type="button"
307                id="${this._addUID("GPexportButton")}" 
308                class="GPexportButtonExportIcon GPsubmit gpf-btn gpf-btn-icon-export-submit fr-btn fr-m-1w">
309                ${ee}
310            </button>
311        `);switch(this.button=xt.firstChild,this.button&&this.button.addEventListener("click",Mt=>this.onClickButtonExport(Mt)),this.options.kind){case"tertiary":this.button.classList.add("fr-btn--tertiary","gpf-btn--tertiary");break;case"secondary":this.button.classList.add("fr-btn--secondary","gpf-btn--secondary");break;case"primary":default:this.button.classList.add("fr-btn--primary","gpf-btn--primary");break}if(!this.options.icons.button)this.button.classList.remove("GPexportButtonExportIcon","gpf-btn-icon-export-submit");else switch(this.options.icons.button){case"export":break;case"save":this.button.classList.replace("GPexportButtonExportIcon","GPexportButtonSaveIcon"),this.button.classList.replace("gpf-btn-icon-export-submit","gpf-btn-icon-save-submit");break;default:this.button.classList.remove("GPexportButtonExportIcon","gpf-btn-icon-export-submit");break}te.appendChild(this.button),this.container=te}stringToHTML(ee){var te=function(){if(!window.DOMParser)return!1;var ut=new DOMParser;try{ut.parseFromString("x","text/html")}catch{return!1}return!0};if(te()){var st=new DOMParser,ot=st.parseFromString(ee,"text/html");return ot.body}var ct=document.createElement("div");return ct.innerHTML=ee,ct}isPluggableControl(){return!!(this.options.control&&typeof this.options.control.getContainer=="function"&&typeof this.options.control.getLayer=="function")}exportFeatures(ee,te,st){var ot=null;if(!ee)return logger$s.warn("Impossible to export : no layer is hosting features."),ot;if(!ee.getSource()||!ee.getSource().getFeatures()||!ee.getSource().getFeatures().length)return logger$s.warn("Impossible to export : no features found."),ot;
311ee.getSource().getFeatures().forEach(pt=>{var mt=pt.getStyle();!mt&&this.options.control&&typeof this.options.control.getStyle=="function"&&pt.setStyle(this.options.control.getStyle())});var ct={defaultStyle:st,extensions:{}};te&&(ct.extensions={"geoportail:compute":te}),this.options.description&&(ct.extensions.description=this.inputDesc&&this.inputDesc.value?this.inputDesc.value:this.options.description);var ut=null;switch(this.options.format.toUpperCase()){case"KML":ct.writeStyles=!0,ct.showPointNames=!0,ut=new KML(ct);break;case"GPX":ut=new GPX(ct);break;case"GEOJSON":ut=new GeoJSON(ct);break}if(!ut)return logger$s.warn("Impossible to export : format unknown !?"),ot;var dt=ee.getSource().getProjection(),ht=this.getMap();ht&&(dt=dt||ht.getView().getProjection());var ft=ee.getSource().getFeatures();return ot=ut.writeFeatures(ft,{dataProjection:"EPSG:4326",featureProjection:dt||"EPSG:3857"}),ot}onClickButtonExport(ee){this.isPluggableControl()||logger$s.warn("Componant not pluggable with the control !");var te=this.options.control&&this.options.control.getLayer!==void 0?this.options.control.getLayer():this.options.layer,st=this.options.control&&this.options.control.getData!==void 0?this.options.control.getData():{},ot=this.options.control&&this.options.control.getStyle!==void 0?this.options.control.getStyle():{},ct=this.exportFeatures(te,st,ot);if(!(!ct||ct==="null")){if(this.dispatchEvent({type:this.BUTTON_EXPORT_CLICKED_EVENT,content:ct,name:this.options.name,description:this.options.description,format:this.options.format,layer:te}),this.options.download){var ut=document.createElement("a"),dt="utf-8";if(ut.setAttribute("href","data:"+this.mimeType+";charset="+dt+","+encodeURIComponent(ct)),ut.setAttribute("download",this.options.name+this.extension),document.createEvent){var ht=document.createEvent("MouseEvents");ht.initEvent("click",!0,!0),ut.dispatchEvent(ht)}else ut.click()}this.options.callback&&typeof this.options.callback=="function"&&this.options.callback(ct,te)}}onChangeRadioFormat(ee){this.setFormat(ee.target.value)}onChangeInputName(ee){this.setName(ee.target.value)}onFocusInputName(ee){var te=this.getMap();te&&this.options.control&&typeof this.options.control.disable=="function"&&this.options.control.disable()}onChangeInputDesc(ee){this.setDescription(ee.target.value)}onFocusInputDesc(ee){var te=this.getMap();te&&this.options.control&&typeof this.options.control.disable=="function"&&this.options.control.disable()}onClickButtonToggleOptions(ee){ee.target.ariaExpanded=ee.target.ariaExpanded!=="true";var te=this.menu.querySelector("#"+ee.target.getAttribute("aria-controls"));te&&(ee.target.ariaExpanded==="true"?(te.classList.add("fr-collapse--expanded"),this.menu.classList.add("gpf-full-container"),this.menu.classList.add("gpf-accordion--opened"),te.classList.remove("GPelementHidden")):(te.classList.remove("fr-collapse--expanded"),this.menu.classList.remove("gpf-full-container"),this.menu.classList.remove("gpf-accordion--opened"),te.classList.add("GPelementHidden")))}onClickButtonValidate(ee){this.setName(this.inputName.value),this.setDescription(this.inputDesc.value),this.buttonOptions.click()}onClickButtonCancel(ee){this.inputName.value="",this.inputDesc.value="",this.buttonOptions.click()}getContainer(){return this.container}setControl(ee){this.options.control=ee}setTarget(ee){this.options.target=ee}setFormat(ee){switch(this.options.format=ee.toUpperCase(),this.options.format){case"KML":this.extension=".kml",this.mimeType="application/vnd.google-earth.kml+xml";break;case"GPX":this.extension=".gpx",this.mimeType="application/gpx+xml";break;case"GEOJSON":this.extension=".geojson",this.mimeType="application/geo+json";break;default:this.options.format="GEOJSON",this.extension=".geojson",this.mimeType="application/geo+json";break}}setName(ee){this.options.name=ee}setDescription(ee){this.options.description=ee}setTitle(ee){this.options.title=ee,this.button&&(this.button.textContent=this.options.menu?this.options.icons.menu+ee:ee)}setKind(ee){if(this.options.kind=ee,this.button)switch(this.button.classList.remove("fr-btn--tertiary","gpf-btn--tertiary"),this.button.classList.remove("fr-btn--secondary","gpf-btn--secondary"),this.options.kind){case"tertiary":this.button.classList.add("fr-btn--tertiary","gpf-btn--tertiary");break;case"secondary":this.button.classList.add("fr-btn--secondary","gpf-btn--secondary");break;case"primary":default:this.button.classList.add("fr-btn--primary","gpf-btn--primary");break}}setMenu(ee){if(this.options.menu=ee,this.button&&(this.button.textContent=this.options.menu?this.options.icons.menu+this.options.title:this.options.title),this.menu&&this.options.menu){var te=this.menu.className;this.menu.className=te.replace(this.menuClassHidden,"");var st=this.options.format.toUpperCase(),ot=this.menu.querySelectorAll('input[type=radio][name="format"]');for(let ut=0;ut<ot.length;ut++){var ct=ot[ut];
311ct.id.toUpperCase().includes(st)&&(ct.checked=!0)}}}setMenuOptions(ee){}setLayer(ee){this.options.layer=ee}setDownload(ee){this.options.download=ee}}Object.assign(ButtonExport.prototype,ExportDOM);Object.assign(ButtonExport.prototype,Widget);window.ol&&window.ol.control&&(window.ol.control.Export=ButtonExport);var logger$r=LoggerByDefault.getLogger("RouteDOM"),RouteDOM={_addUID:function(ne){var ee=this._uid?ne+"-"+this._uid:ne;return ee},_createMainContainerElement:function(){var ne=document.createElement("div");return ne.id=this._addUID("GProute"),ne.className="GPwidget gpf-widget gpf-widget-button gpf-mobile-fullscreen",ne},_createShowRoutePictoElement:function(){var ne=this,ee=document.createElement("button"),te=document.createElement("span");return ee.appendChild(te),ee.id=this._addUID("GPshowRoutePicto"),ee.classList.add("GPshowOpen","GPshowAdvancedToolPicto","GPshowRoutePicto"),ee.classList.add("gpf-btn","gpf-btn--tertiary","gpf-btn-icon","gpf-btn-icon-route"),ee.classList.add("fr-btn","fr-btn--tertiary"),ee.setAttribute("aria-label","Itinéraire"),ee.setAttribute("tabindex","0"),ee.setAttribute("aria-pressed",!1),ee.setAttribute("type","button"),ee.addEventListener?ee.addEventListener("click",function(st){var ot=st.target.ariaPressed==="true";st.target.setAttribute("aria-pressed",!ot),ne.onShowRoutePanelClick(st)}):ee.attachEvent&&ee.attachEvent("onclick",function(st){var ot=st.target.ariaPressed==="true";st.target.setAttribute("aria-pressed",!ot),ne.onShowRoutePanelClick(st)}),ee},_createRoutePanelElement:function(){var ne=document.createElement("dialog");return ne.id=this._addUID("GProutePanel"),ne.className="GPpanel gpf-panel fr-modal",ne},_createRoutePanelDivElement:function(){var ne=document.createElement("div");return ne.className="gpf-panel__body fr-modal__body",ne},_createDrawingButtonsPluginDiv:function(){var ne=document.createElement("div");return ne.className="container-buttons-plugin fr-mx-2w",ne},_createRoutePanelFooterElement:function(){var ne=document.createElement("div");return ne.className="GPpanelFooter gpf-panel__footer fr-modal__footer",ne},_createRoutePanelFormPointLabel:function(ne,ee=!0){var te=document.createElement("p");te.innerHTML=ne;var st=ee?"":" GPelementHidden gpf-hidden";return te.className="GProutePointLabelP gpf-label fr-label"+st,te},_createRoutePanelFormElement:function(){var ne=this,ee=document.createElement("form");return ee.id=this._addUID("GProuteForm"),ee.className="gpf-panel__content fr-modal__content",ee.setAttribute("onkeypress","return event.keyCode != 13;"),ee.addEventListener("submit",function(te){logger$r.log(te),te.preventDefault();var st=document.getElementsByClassName(ne._addUID("GPlocationPoint")),ot=st[0].childNodes[0].id,ct=st[st.length-1].childNodes[0].id,ut=SelectorID.index(ot),dt=SelectorID.index(ct);if(document.getElementById(ne._addUID("GPlocationOrigin_"+ut)).value===""&&document.getElementById(ne._addUID("GPlocationOriginCoords_"+ut)).value===""||document.getElementById(ne._addUID("GPlocationOrigin_"+dt)).value===""&&document.getElementById(ne._addUID("GPlocationOriginCoords_"+dt)).value==="")return!1;ne._addRouteResultsStagesValuesElement(st);var ht=null;document.getElementById(ne._addUID("GProuteComputationChoice"))&&(document.getElementById(ne._addUID("GProuteComputationFastest"))&&document.getElementById(ne._addUID("GProuteComputationFastest")).checked&&(ht=document.getElementById(ne._addUID("GProuteComputationFastest")).value),document.getElementById(ne._addUID("GProuteComputationShortest"))&&document.getElementById(ne._addUID("GProuteComputationShortest")).checked&&(ht=document.getElementById(ne._addUID("GProuteComputationShortest")).value));var ft=null;document.getElementById(ne._addUID("GProuteTransportCar"))&&document.getElementById(ne._addUID("GProuteTransportCar")).checked&&(ft=document.getElementById(ne._addUID("GProuteTransportCar")).value),document.getElementById(ne._addUID("GProuteTransportPedestrian"))&&document.getElementById(ne._addUID("GProuteTransportPedestrian")).checked&&(ft=document.getElementById(ne._addUID("GProuteTransportPedestrian")).value);for(var pt=[],mt=document.getElementsByClassName("GProuteExclusionsOption"),yt=0;yt<mt.length;yt++){var vt=mt[yt].htmlFor,_t=document.getElementById(vt);_t.checked||pt.push(_t.value)}return ne.onRouteComputationSubmit({computation:ht,transport:ft,exclusions:pt}),!1}),ee},_createRoutePanelResultsElement:function(ne){var ee=document.createElement("div");return ee.id=this._addUID("GProuteResultsPanel"),ee.className="GPelementHidden gpf-hidden",ee.appendChild(this._createRouteResultsStagesElement()),ee.appendChild(this._createRouteResultsElement(ne)),ee.appendChild(this._createRouteShowResultsDetailsElement()),ee.appendChild(this._createRouteResultsDetailsElement()),ee},_createRouteWaitingElement:function(){var ne=document.createElement("div");ne.id=this._addUID("GProuteCalcWaitingContainer"),ne.className="GPwaitingContainer GPwaitingContainerHidden gpf-waiting gpf-waiting--hidden";var ee=document.createElement("p");return ee.className="GPwaitingContainerInfo gpf-waiting_info",ee.innerHTML="Recherche en cours...",ne.appendChild(ee),ne},_createRouteResultsStagesElement:function(){var ne=document.createElement("div");return ne.id=this._addUID("GProuteResultsStages"),ne},_addRouteResultsStagesValuesElement:function(ne){document.getElementById(this._addUID("GProuteResultsStages")).innerHTML="";for(var ee=0;ee<ne.length;ee++){var te=ne[ee].childNodes[0].id,st=SelectorID.index(te);if(document.getElementById(this._addUID("GPlocationPoint_"+st)).className==="GPflexInput GPlocationStageFlexInput gpf-flex"){var ot=document.createElement("div");ot.className="GProuteResultsStages fr-my-1w";var ct=document.createElement("span");ct.className="GProuteResultStageLabel",ct.innerHTML=document.getElementById(this._addUID("GPlocationOriginLabel_"+st)).innerHTML+" : ",ot.appendChild(ct);var ut=document.createElement("span");ut.className="GProuteResultStageValue";var dt=document.getElementById(this._addUID("GPlocationOriginCoords_"+st)),ht=dt.value;ht!==null&&ht!==""?ut.innerHTML=sanitizeHtml(ht,{strict:!0}):ut.innerHTML=sanitizeHtml(document.getElementById(this._addUID("GPlocationOrigin_"+st)).value,{str
311ict:!0}),ot.appendChild(ut),ut.innerHTML!==""&&document.getElementById(this._addUID("GProuteResultsStages")).appendChild(ot)}}},_createRouteResultsElement:function(ne){var ee=this,te=document.createElement("div");te.id=this._addUID("GProuteResults");var st=document.createElement("div");st.id=this._addUID("GProuteResultsValues"),te.appendChild(st);var ot=document.createElement("div");ot.id=this._addUID("GProuteResultsMode"),ne&&(ot.style.display="none");var ct=document.createElement("select");ct.id=this._addUID("GProuteResultsComputationSelect"),ct.className="GPselect gpf-select fr-select",ct.addEventListener("change",function(pt){ee.onRouteModeComputationChangeAndRun(pt)});for(var ut=[{code:"fastest",label:"Plus rapide"},{code:"shortest",label:"Plus court"}],dt=0;dt<ut.length;dt++){var ht=document.createElement("option");ht.value=ut[dt].code,ht.text=ut[dt].label,ct.appendChild(ht)}ot.appendChild(ct),te.appendChild(ot);var ft=document.createElement("div");return ft.id=this._addUID("GProuteResultsNew"),ft.className="GPresetPicto gpf-btn gpf-btn-icon-reset fr-btn fr-btn--secondary gpf-btn--secondary",ft.title="Modifier le calcul",ft.addEventListener("click",function(pt){document.getElementById(ee._addUID("GProuteResultsPanel")).className="GPelementHidden gpf-hidden",document.getElementById(ee._addUID("GProuteForm")).className="gpf-panel__content fr-modal__content",ee.onShowRouteResultsNewClick(pt)}),te.appendChild(ft),te},_addRouteResultsValuesElement:function(ne,ee,te){var st=document.getElementById(this._addUID("GProuteResultsValues"));if(st.childElementCount)for(;st.firstChild;)st.removeChild(st.firstChild);var ot=document.createElement("div");ot.className="GProuteResultsValue";var ct=document.createElement("label");ct.className="GProuteResultsValueLabel",ct.innerHTML="Distance :",ot.appendChild(ct);var ut=0,dt=parseInt(ne/1e3,10);if(!dt)ut=Math.round(ne)+" m";else{var ht=Math.round(ne);ht=ht/1e3,ut=ht+" km"}var ft=document.createElement("div");ft.id=this._addUID("GProuteResultsValueDist"),ft.innerHTML=ut,ot.appendChild(ft),st.appendChild(ot);var pt=document.createElement("div");pt.className="GProuteResultsValue";var mt=document.createElement("label");mt.className="GProuteResultsValueLabel",mt.innerHTML="Durée :",pt.appendChild(mt);var yt=document.createElement("div");return yt.id=this._addUID("GProuteResultsValueDist"),yt.innerHTML=te(ee),pt.appendChild(yt),st.appendChild(pt),st},_createRouteShowResultsDetailsElement:function(){var ne=document.createElement("div");if(ne.className="GProuteResultsShowDetailsDiv gpf-flex fr-checkbox-group fr-m-1w",!checkDsfr()){var ee=document.createElement("div");ee.className="GPfakeBorder GPfakeBorderLeft",ne.appendChild(ee)}var te=document.createElement("input");te.id=this._addUID("GProuteResultsShowDetails"),te.type="checkbox",ne.appendChild(te);var st=document.createElement("label");if(st.className="gpf-label fr-label",st.htmlFor=this._addUID("GProuteResultsShowDetails"),st.innerHTML="Afficher le détail",ne.appendChild(st),!checkDsfr()){var ot=document.createElement("label");ot.htmlFor=this._addUID("GProuteResultsShowDetails"),ot.innerHTML="Masquer le détail",ne.appendChild(ot);var ct=document.createElement("div");ct.className="GPfakeBorder",ne.appendChild(ct)}return ne},_createRouteResultsDetailsElement:function(){var ne=document.createElement("div");return ne.id=this._addUID("GProuteResultsDetails"),ne},_addRouteResultsDetailsElement:function(ne,ee){var te=this,st=document.getElementById(this._addUID("GProuteResultsDetails"));if(st.childElementCount)for(;st.firstChild;)st.removeChild(st.firstChild);for(var ot=0,ct=0,ut=0;ut<ne.length;ut++){var dt=ut+1,ht=ne[ut],ft=document.createElement("div");ft.className="GProuteResultsDetailsNumber",ft.innerHTML=dt+".",st.appendChild(ft),ct+=parseFloat(ht.duration),ot+=parseFloat(ht.distance);var pt=0,mt=parseInt(ot/1e3,10);if(!mt)pt=Math.round(ot)+" m";else{var yt=Math.round(ot);yt=yt/1e3,pt=yt+" km"}var vt=document.createElement("div");vt.className="GProuteResultsDetailsInstruction",vt.id=this._addUID("GProuteResultsDetailsInstruction_"+dt),vt.title="distance : "+pt+" / temps : "+ee(ct),vt.innerHTML=ht.instruction,vt.addEventListener("mouseover",function(_t){te.onRouteResultsDetailsMouseOver(_t)}),vt.addEventListener("mouseout",function(_t){te.onRouteResultsDetailsMouseOut(_t)}),vt.addEventListener("click",function(_t){typeof te.onRouteResultsDetailsClick=="function"&&te.onRouteResultsDetailsClick(_t)}),st.appendChild(vt)}return st},_createRoutePanelFormPointElement:function(ne,ee,te){var st=this,ot=document.createElement("div");ot.id="GProutePoint"+ne,ot.className=te?"GPflexInput GProuteStageFlexInput":"GPflexInput GProuteStageFlexInputHidden";var ct=document.createElement("label");ct.id="GProuteOriginLabel"+ne,ct.htmlFor="GProuteOrigin"+ne,ct.innerHTML=ee,ct.addEventListener("click",function(){var pt=this.id.charAt(this.id.length-1);document.getElementById("GProuteOriginCoords"+pt).value="";for(var mt=1;mt<8;mt++)document.getElementById("GProutePoint"+mt).style.display="flex";
311document.getElementById("GProuteForm").className="gpf-panel__content fr-modal__content",document.getElementById("GProuteOriginPointer"+pt).checked=!1,document.getElementById("GProuteOrigin"+pt).className="GPelementVisible gpf-visible",document.getElementById("GProuteOriginCoords"+pt).className="GPelementHidden gpf-hidden"}),ot.appendChild(ct);var ut=document.createElement("input");ut.id="GProuteOrigin"+ne,ut.className="GPelementVisible gpf-visible",ut.type="text",ut.placeholder="Saisir une adresse, un lieu...",ut.addEventListener("keyup",function(pt){var mt=pt.which||pt.keyCode;if(!(mt===13||mt===10)){var yt=this.id.charAt(this.id.length-1);document.getElementById("GProuteOrigin"+yt).value.length>2?document.getElementById("GProuteAutoCompleteList"+yt).style.display="block":document.getElementById("GProuteAutoCompleteList"+yt).style.display="none",st.onAutoCompleteSearchText(pt)}}),ut.addEventListener("blur",function(){var pt=this.id.charAt(this.id.length-1);document.getElementById("GProuteAutoCompleteList"+pt).style.display="none"}),ot.appendChild(ut);var dt=document.createElement("input");dt.id="GProuteOriginCoords"+ne,dt.className="GPelementHidden gpf-hidden",dt.type="text",dt.disabled=!0,ot.appendChild(dt);var ht=document.createElement("input");ht.id="GProuteOriginPointer"+ne,ht.type="checkbox",ot.appendChild(ht);var ft=document.createElement("label");return ft.id="GProuteOriginPointerImg"+ne,ft.htmlFor="GProuteOriginPointer"+ne,ft.className="GProuteOriginPointerImg",ft.title="Pointer un lieu sur la carte",ft.addEventListener("click",function(pt){pt.preventDefault(),pt.stopPropagation();var mt=this.id.charAt(this.id.length-1),yt;for(yt=1;yt<8;yt++)mt!==yt&&(document.getElementById("GProuteOriginPointer"+yt).checked=!1,document.getElementById("GProuteOriginCoords"+yt).value==="Pointer un lieu sur la carte"&&(document.getElementById("GProuteOriginCoords"+yt).value="",document.getElementById("GProuteOrigin"+yt).className="GPelementVisible gpf-visible",document.getElementById("GProuteOriginCoords"+yt).className="GPelementHidden gpf-hidden"));if(document.getElementById("GProuteOriginPointer"+mt).checked){for(document.getElementById("GProuteOriginCoords"+mt).value="",yt=1;yt<8;yt++)document.getElementById("GProutePoint"+yt).style.display="flex";
311document.getElementById("GProuteForm").className="gpf-panel__content fr-modal__content",document.getElementById("GProuteOriginPointer"+mt).checked=!1,document.getElementById("GProuteOrigin"+mt).className="GPelementVisible gpf-visible",document.getElementById("GProuteOriginCoords"+mt).className="GPelementHidden gpf-hidden"}else{for(document.getElementById("GProuteOriginCoords"+mt).value="Pointer un lieu sur la carte",yt=1;yt<8;yt++)mt===yt?document.getElementById("GProutePoint"+yt).style.display="flex":document.getElementById("GProutePoint"+yt).style.display="none";document.getElementById("GProuteForm").className="GProuteFormMini gpf-panel__content fr-modal__content",document.getElementById("GProuteOriginPointer"+mt).checked=!0,document.getElementById("GProuteOrigin"+mt).className="GPelementHidden gpf-hidden",document.getElementById("GProuteOriginCoords"+mt).className="GPelementVisible gpf-visible"}st.onRouteMapPointClick(pt)}),ot.appendChild(ft),ot},_createRoutePanelFormRemoveStageElement:function(ne){var ee=this,te=document.createElement("div");return te.id="GProuteStageRemove"+ne,te.className="GProuteStageRemove",te.title="Supprimer l'étape",ne!==1&&ne!==7&&te.addEventListener("click",function(st){var ot=this.id.charAt(this.id.length-1);document.getElementById("GProutePoint"+ot).className="GPflexInput GProuteStageFlexInputHidden",document.getElementById("GProuteOrigin"+ot).value="",document.getElementById("GProuteOrigin"+ot).className="GPelementVisible gpf-visible",document.getElementById("GProuteOriginCoords"+ot).value="",document.getElementById("GProuteOriginCoords"+ot).className="GPelementHidden gpf-hidden",document.getElementById("GProuteStageAdd").style.display="",ee.onRouteRemovePointClick(st)}),te},_createRoutePanelFormAddStageElement:function(){var ne=this,ee=document.createElement("div");return ee.id="GProuteStageAdd",ee.title="Ajouter une étape",ee.addEventListener("click",function(te){for(var st=1,ot=0,ct=2;ct<7;ct++)document.getElementById("GProutePoint"+ct).className==="GPflexInput GProuteStageFlexInputHidden"?st===1&&(st=ct):ot++;st<7&&(document.getElementById("GProutePoint"+st).className="GPflexInput GProuteStageFlexInput"),ot===4&&(document.getElementById("GProuteStageAdd").style.display="none"),ne.onRouteAddPointClick(te)}),ee},_createRoutePanelFormAutoCompleteListElement:function(ne){var ee=this,te=document.createElement("div");return te.id="GProuteAutoCompleteList"+ne,te.className="GPadvancedAutoCompleteList",te.addEventListener?te.addEventListener("click",function(st){ee.onAutoCompletedResultsItemClick(st),document.getElementById("GProuteAutoCompleteList"+ne).style.display="none"},!1):te.attachEvent&&te.attachEvent("onclick",function(st){ee.onAutoCompletedResultsItemClick(st),document.getElementById("GProuteAutoCompleteList"+ne).style.display="none"}),te},_createRouteAutoCompletedLocationElement:function(ne,ee,te){var st=document.getElementById("GProuteAutoCompleteList"+ee),ot=document.createElement("div");ot.id="AutoCompletedLocation"+te,ot.className="GPautoCompleteProposal",ot.innerHTML=GeocodeUtils.getSuggestedLocationFreeform(ne),st.appendChild(ot)},_createRoutePanelFormModeChoiceTransportElement:function(ne){var ee=this,te=document.createElement("div");te.id=this._addUID("GProuteTransportChoice");var st=document.createElement("label");st.className="GProuteModeLabel gpf-label fr-label",st.innerHTML="Choisir un mode de déplacement",te.appendChild(st);var ot=document.createElement("div");ot.className="gpf-radio-btn-group";for(var ct=0;ct<ne.length;ct++){var ut=ne[ct],dt=document.createElement("div");if(dt.className="GProuteTransportChoice gpf-flex gpf-radio-group fr-radio-group fr-my-1w",ut==="Voiture"){var ht=document.createElement("input");ht.id=this._addUID("GProuteTransportCar"),ht.type="radio",ht.name="GProuteTransport",ht.value="Voiture",ct===0&&(ht.checked=!0),ht.addEventListener?ht.addEventListener("change",function(yt){ee.onRouteModeTransportChange(yt)}):ht.attachEvent&&ht.attachEvent("onchange",function(yt){ee.onRouteModeTransportChange(yt)}),dt.appendChild(ht);var ft=document.createElement("label");ft.className="GProuteTransportImg gpf-label fr-label",ft.htmlFor=this._addUID("GProuteTransportCar"),ft.title="Voiture",ft.innerHTML="V
311oiture",dt.appendChild(ft)}if(ut==="Pieton"){var pt=document.createElement("input");pt.id=this._addUID("GProuteTransportPedestrian"),pt.type="radio",pt.name="GProuteTransport",pt.value="Pieton",ct===0&&(pt.checked=!0),pt.addEventListener?pt.addEventListener("change",function(yt){ee.onRouteModeTransportChange(yt)}):pt.attachEvent&&pt.attachEvent("onchange",function(yt){ee.onRouteModeTransportChange(yt)}),dt.appendChild(pt);var mt=document.createElement("label");mt.className="GProuteTransportImg gpf-label fr-label",mt.htmlFor=this._addUID("GProuteTransportPedestrian"),mt.title="Piéton",mt.innerHTML="Piéton",dt.appendChild(mt)}ot.appendChild(dt)}return te.appendChild(ot),te},_createRoutePanelFormModeChoiceComputeElement:function(ne){var ee=this,te=document.createElement("div");te.id=this._addUID("GProuteComputationChoice"),te.className="fr-mt-2w";var st=document.createElement("label");st.className="GProuteComputationLabel gpf-label fr-label",st.innerHTML="Mode de calcul",te.appendChild(st);var ot=document.createElement("div");ot.className="gpf-radio-btn-group";var ct=document.createElement("div");ct.className="GProuteComputationChoice gpf-flex gpf-radio-group fr-radio-group fr-my-1w",ct.id=this._addUID("GProuteComputeFastest");var ut=document.createElement("input");ut.id=this._addUID("GProuteComputationFastest"),ut.type="radio",ut.name="GProuteComputation",ut.value="fastest",ut.checked=!0,ut.addEventListener?ut.addEventListener("change",function(mt){ee.onRouteModeComputationChange(mt)}):ut.attachEvent&&ut.attachEvent("onchange",function(mt){ee.onRouteModeComputationChange(mt)}),ct.appendChild(ut);var dt=document.createElement("label");dt.className="gpf-label fr-label",dt.htmlFor=this._addUID("GProuteComputationFastest"),dt.title="Plus rapide",dt.innerHTML="Plus rapide",ct.appendChild(dt),ot.appendChild(ct);var ht=document.createElement("div");ht.className="GProuteComputationChoice gpf-flex gpf-radio-group fr-radio-group fr-my-1w",ht.id=this._addUID("GProuteComputeShortest");var ft=document.createElement("input");ft.id=this._addUID("GProuteComputationShortest"),ft.type="radio",ft.name="GProuteComputation",ft.value="shortest",ft.addEventListener?ft.addEventListener("change",function(mt){ee.onRouteModeComputationChange(mt)}):ft.attachEvent&&ft.attachEvent("onchange",function(mt){ee.onRouteModeComputationChange(mt)}),ht.appendChild(ft),ne&&(te.style.display="none");var pt=document.createElement("label");return pt.className="gpf-label fr-label",pt.htmlFor=this._addUID("GProuteComputationShortest"),pt.title="Plus court",pt.innerHTML="Plus court",ht.appendChild(pt),ot.appendChild(ht),te.appendChild(ot),te},_createShowRouteExclusionsPictoElement:function(){var ne=this,ee=document.createElement("button");ee.id=this._addUID("GPshowRouteExclusionsPicto");var te="";return checkDsfr()&&(te="GPelementHidden gpf-hidden"),ee.className=`GPshowAdvancedToolPicto GPshowMoreOptionsImage GPshowMoreOptions GPshowRouteExclusionsPicto ${te} gpf-btn fr-btn--sm fr-btn--tertiary gpf-btn--tertiary fr-icon-arrow-down-fill`,ee.title="Exclusions",ee.setAttribute("tabindex","0"),ee.setAttribute("aria-pressed",!0),ee.addEventListener?ee.addEventListener("click",function(st){st.preventDefault();var ot=st.target.ariaPressed==="true";st.target.setAttribute("aria-pressed",!ot),ne.onShowRouteExclusionsClick(st)}):ee.attachEvent&&ee.attachEvent("onclick",function(st){st.preventDefault();var ot=st.target.ariaPressed==="true";st.target.setAttribute("aria-pressed",!ot),ne.onShowRouteExclusionsClick(st)}),ee},_createRoutePanelFormExclusionsElement:function(ne){var ee=document.createElement("div");ee.id=this._addUID("GProuteExclusions"),ee.className="fr-mt-2w",ne&&(ee.style.display="none");var te=document.createElement("label");return te.className="GProuteExclusionsLabel fr-label",te.innerHTML="Passages autorisés",ee.appendChild(te),ee},_createRoutePanelFormExclusionOptionsElement:function(ne){var ee=this,te=document.createElement("div");te.className="GProuteExclusionsOptions gpf-flex fr-checkbox-group fr-m-1w";for(var st in ne)if(ne.hasOwnProperty(st)){var ot=ne[st];switch(st){case"toll":var ct=document.createElement("input");ct.id=this._addUID("GProuteExclusionsToll"),ct.type="checkbox",ct.value="Toll",ct.name="Peage",ct.checked=!ot,ct.addEventListener?ct.addEventListener("change",function(mt){ee.onRouteExclusionsChange(mt)}):ct.attachEvent&&ct.attachEvent("onchange",function(mt){ee.onRouteExclusionsChange(mt)}),te.appendChild(ct);var ut=document.createElement("label");ut.className="GProuteExclusionsOption",ut.htmlFor=this._addUID("GProuteExclusionsToll"),ut.innerHTML="Péages",te.appendChild(ut);break;case"tunnel":var dt=document.createElement("input");dt.id=this._addUID("GProuteExclusionsTunnel"),dt.type="checkbox",dt.value="Tunnel",dt.name="Tunnel",dt.checked=!ot,dt.addEventListener?dt.addEventListener("change",function(mt){ee.onRouteExclusionsChange(mt)}):dt.attachEvent&&dt.attachEvent("onchange",function(mt){ee.onRouteExclusionsChange(mt)}),te.appendChild(dt);var ht=document.createElement("label");ht.className="GProuteExclusionsOption",ht.htmlFor=this._addUID("GProuteExclusionsTunnel"),ht.innerHTML="Tunnels",te.appendChild(ht);break;case"bridge":var ft=document.createElement("input");ft.id=this._addUID("GProuteExclusionsBridge"),ft.type="checkbox",ft.value="Bridge",ft.name="Ponts",ft.checked=!ot,ft.addEventListener?ft.addEventListener("change",function(mt){ee.onRouteExclusionsChange(mt)}):ft.attachEvent&&ft.attachEvent("onchange",function(mt){ee.onRouteExclusionsChange(mt)}),te.appendChild(ft);var pt=document.createElement("label");pt.className="GProuteExclusionsOption",pt.htmlFor=this._addUID("GProuteExclusionsBridge"),pt.innerHTML="Ponts",te.appendChild(pt);break}}return te},_createRouteSubmitFormElement:function(){var ne=document.createElement("input");return ne.id=this._addUID("GProuteSubmit"),ne.className="GPsubmit gpf-btn gpf-btn-icon-submit fr-btn",ne.type="submit",ne.value="Calculer l'itinéraire",ne},_createRouteFormResetElement:function(){var ne=this,ee=document.createElement("button");return ee.id=this._addUID("GProuteReset"),ee.title="Réinitialiser les paramètres",ee.className="GPresetPicto gpf-btn gpf-btn-icon-reset fr-btn fr-btn--secondary gpf-btn--secondary",ee.title="Réinitialiser les paramètres",ee.setAttribute("tabindex","0"),ee.setAttribute("aria-pressed",!1),ee.addEventListener("click",function(te){var st=te.target.ariaPressed==="true";te.target.setAttribute("aria-pressed",!st),ne.onRouteResetClick(te)}),ee}},logger$q=LoggerByDefault.getLogger("route");class Route extends ControlExtended{constructor(ee){if(ee=ee||{},super(ee),!(this instanceof Route))throw new TypeError("ERROR CLASS_CONSTRUCTOR");return this.CLASSNAME="Route",this.initialize(ee),this._container=this._createMainContainerElement(),this.element?this.element.appendChild(this._container):this.element=this._container,this}setMap(ee){if(ee){if(this._container=this._initContainer(ee),this.element=this._container,this.options.export){var te=Helper.assign({control:this},this.options.export);this.export=new ButtonExport(te),this.export.render();var st=this;this.export.on("button:clicked",ot=>{st.dispatchEvent({type:"export:compute",content:ot.content})})}this.draggable&&Draggable.dragElement(this._panelRouteContainer,this._panelHeaderRouteContainer,ee.getTargetElement()),this.collapsed||this._showRouteButton.setAttribute("aria-pressed",!0)}super.setMap(ee),this.options.position&&this.setPosition(this.options.position),this.options.gutter===!1&&this.getContainer().classList.add("gpf-button-no-gutter")}getCollapsed(){return this.collapsed}setCollapsed(ee){if(ee===void 0){logger$q.log("[ERROR] Route:setCollapsed - missing collapsed parameter");return}ee&&this.collapsed||!ee&&!this.collapsed||(ee?this._panelCloseBtn.click():this._showRouteButton.click(),this.collapsed=ee)}getLayer(){return this._geojsonSections}setLayer(ee){if(!ee){this._geojsonSections=null;return}if(!(ee instanceof VectorLayer)){logger$q.log("no valid layer given for hosting drawn features.");return}ee.setStyle(this._defaultFeatureStyle),this._geojsonSections=ee}getGeoJSON(){return JSON.stringify(this._geojsonObject)}setGeoJSON(ee){try{this._geojsonObject=JSON.parse(ee)}catch(te){logger$q.log("no valid geojson given :"+te.message)}}getData(){var ee=[];for(let st=0;st<this._currentPoints.length;st++){const ot=this._currentPoints[st];ee.push(ot.getCoordinate())}var te={type:"route",points:ee,transport:this._currentTransport,exclusions:this._currentExclusions,computation:this._currentComputation,results:{}};return Helper.assign(te.results,this._currentRouteInformations),te}setData(ee){this._currentTransport=ee.transport,this._currentComputation=ee.computation,this._currentExclusions=ee.exclusions;for(var te=0;te<ee.points.length;te++){const dt=ee.points[te];dt&&this._currentPoints[te].setCoordinate(dt,"EPSG:4326")}for(var st=0;st<this._currentPoints.length;st++){var ot=this._currentPoints[st];
311if(ot.getCoordinate()){var ct=st+1+"-"+this._uid,ut=ot.getCoordinate()[1].toFixed(4)+" / "+ot.getCoordinate()[0].toFixed(4);document.getElementById("GPlocationOriginCoords_"+ct).value=ut,document.getElementById("GPlocationOrigin_"+ct).value=ut,st>0&&st<6&&(document.getElementById("GPlocationPoint_"+ct).className="GPflexInput GPelementHidden gpf-flex gpf-hidden ")}}this._currentRouteInformations=ee.results}getContainer(){return this._container}getStyle(){return this._defaultFeatureStyle}init(){for(let vt=0;vt<this._currentPoints.length;vt++){const _t=this._currentPoints[vt];var ee=vt+1,te=_t.getCoordinate();if(te){var st=document.getElementById("GPlocationOrigin_"+ee+"-"+this._uid);st.value=te[1].toFixed(4)+" / "+te[0].toFixed(4),vt>0&&vt<6&&(document.getElementById("GPlocationPoint_"+ee+"-"+this._uid).className="GPflexInput GPlocationStageFlexInput gpf-flex")}}var ot=document.getElementsByClassName("GPlocationPoint-"+this._uid);this._addRouteResultsStagesValuesElement(ot);var ct;this._currentTransport==="Pieton"?(ct=document.getElementById("GProuteTransportPedestrian-"+this._uid),ct&&(ct.checked="true")):(ct=document.getElementById("GProuteTransportCar-"+this._uid),ct&&(ct.checked="true"));var ut=document.getElementById("GProuteComputationSelect-"+this._uid);ut&&(ut.value=this._currentComputation);var dt=document.getElementById("GProuteExclusionsToll-"+this._uid);dt&&(this._currentExclusions.indexOf("toll")!==-1?dt.checked=!1:dt.checked=!0);var ht=document.getElementById("GProuteExclusionsTunnel-"+this._uid);ht&&(this._currentExclusions.indexOf("tunnel")!==-1?ht.checked=!1:ht.checked=!0);var ft=document.getElementById("GProuteExclusionsBridge-"+this._uid);ft&&(this._currentExclusions.indexOf("bridge")!==-1?ft.checked=!1:ft.checked=!0);var pt=this._currentRouteInformations.totalDistance,mt=this._currentRouteInformations.totalTime,yt=this._simplifiedInstructions(this._currentRouteInformations.routeInstructions);yt&&this._fillRouteResultsDetailsContainer(pt,mt,yt),this._formRouteContainer.className="GPelementHidden gpf-hidden gpf-panel__content fr-modal__content",this._hideWaitingContainer(),this._resultsRouteContainer.className=""}clean(){this._currentTransport=null,this._currentExclusions=[],this._currentComputation=null;for(var ee=0;ee<this._currentPoints.length;ee++)this._currentPoints[ee].clear();this._removeRouteStepLocations(),this._clearRouteInputOptions(),this._clearRouteResultsDetails(),this.setLayer(),this._formRouteContainer.className="gpf-panel__content fr-modal__content",this._resultsRouteContainer.className="GPelementHidden gpf-hidden"}initialize(ee){this._checkInputOptions(ee),this.options={collapsed:!0,draggable:!1,export:!1,graphs:["Pieton","Voiture"],exclusions:{toll:!1,tunnel:!1,bridge:!1},prettifyCompute:!1,routeOptions:{},autocompleteOptions:{},layerDescription:{title:"Itinéraire",description:"Itinéraire basé sur un graphe"}},Helper.assign(this.options,ee);var te={departure:{url:Marker.red,offset:Marker.defaultOffset},stages:{url:Marker.lightOrange,offset:Marker.defaultOffset},arrival:{url:Marker.darkOrange,offset:Marker.defaultOffset}};this.options.markersOpts=Helper.assign(te,ee.markersOpts),this.collapsed=this.options.collapsed,this.draggable=this.options.draggable,this._uid=this.options.id||SelectorID.generate(),this._showRouteButton=null,this._panelBtnClose=null,this._panelRouteContainer=null,this._panelHeaderRouteContainer=null,this._waitingContainer=null,this._formRouteContainer=null,this._resultsRouteContainer=null,this._showRouteExclusionsElement=null,this._currentPoints=[],this._currentTransport=null,this._initTransport(),this._currentComputation=null,this._initComputation(),this._currentExclusions=[],this._initExclusions(),this._waiting=!1,this._timer=null,this._geojsonRoute=null,this._geojsonSections=null,this._geojsonObject=null,this.export=null,this._popupContent=null,this._popupDiv=this._initPopupDiv(),this._popupOverlay=null,this._resultsSelectInteraction=null,this._resultsHoverInteraction=null,this._defaultFeatureStyle=new Style$1({stroke:new Stroke({color:"rgba(0,183,152,0.9)",width:12})}),this._selectedFeatureStyle=new Style$1({stroke:new Stroke({color:"rgba(255,102,0,0.9)",width:12})}),this._currentRouteInformations=null,this._resources={},this.listenerKey=null}_checkInputOptions(ee){if(ee.graphs)if(Array.isArray(ee.graphs)&&ee.graphs.length)for(var te=0;te<ee.graphs.length;te++)typeof ee.graphs[te]=="string"?(ee.graphs[te].toLowerCase()==="pieton"&&(ee.graphs[te]="Pieton"),ee.graphs[te].toLowerCase()==="voiture"&&(ee.graphs[te]="Voiture")):(logger$q.log("[ol.control.Route] ERROR : parameter 'graphs' elements should be of type 'string'"),ee.graphs[te]=null);else logger$q.warn("'graphs' parameter should be an array"),ee.graphs=null;ee.collapsed==="true"&&(ee.collapsed=!0),ee.collapsed==="false"&&(ee.collapsed=!1)}_initContainer(ee){var te=this._container;if(te.childElementCount>0)return te;var st=this._showRouteButton=this._createShowRoutePictoElement();te.appendChild(st);var ot=this._panelRouteContainer=this._createRoutePanelElement(),ct=this._panelHeaderRouteContainer=this._createPanelHeaderElement({icon:"ign-route",title:"Calcul d’itinéraire",btnClassF
311orClose:"GPshowRoutePicto"});ot.appendChild(ct),this._panelCloseBtn=ct._closeBtn;var ut=this._createRoutePanelDivElement();ot.appendChild(ut);var dt=this._formRouteContainer=this._createRoutePanelFormElement();dt.appendChild(this._createRoutePanelFormModeChoiceTransportElement(this.options.graphs));for(var ht=this._createRoutePanelFormPointsElement(ee),ft=0;ft<ht.length;ft++)dt.appendChild(ht[ft]);dt.appendChild(this._createRoutePanelFormModeChoiceComputeElement(this.options.prettifyCompute)),this._showRouteExclusionsElement=this._createShowRouteExclusionsPictoElement(),dt.appendChild(this._showRouteExclusionsElement);var pt=this._createRoutePanelFormExclusionsElement(this.options.prettifyCompute);pt.appendChild(this._createRoutePanelFormExclusionOptionsElement(this.options.exclusions)),dt.appendChild(pt);var mt=this._createRoutePanelFooterElement();if(dt.appendChild(mt),!checkDsfr()){var yt=this._createRouteFormResetElement();mt.appendChild(yt)}var vt=this._createRouteSubmitFormElement();mt.appendChild(vt),ut.appendChild(dt);var _t=this._resultsRouteContainer=this._createRoutePanelResultsElement(this.options.prettifyCompute);ut.appendChild(_t);var bt=this._createDrawingButtonsPluginDiv();ut.appendChild(bt);var xt=this._waitingContainer=this._createRouteWaitingElement();return ut.appendChild(xt),te.appendChild(ot),te.addEventListener&&te.addEventListener("click",Mt=>this._hideRouteSuggestedLocations(Mt)),te}_initTransport(){this._currentTransport="Pieton";var ee=this.options.graphs;(!ee||ee.length===0)&&(this.options.graphs=["Pieton","Voiture"]),Array.isArray(ee)&&ee.length&&(ee[0]==="Voiture"||ee[0]==="Pieton")&&(this._currentTransport=ee[0]);var te=this.options.routeOptions;te.graph&&(this._currentTransport=te.graph)}_initComputation(){this._currentComputation="fastest";var ee=this.options.routeOptions;ee.routePreference&&(this._currentComputation=ee.routePreference)}_initExclusions(){this._currentExclusions=[];var ee=this.options.exclusions;if((!ee||typeof ee=="object"&&Object.keys(ee).length===0)&&(this.options.exclusions={toll:!1,tunnel:!1,bridge:!1}),ee&&typeof ee=="object"&&Object.keys(ee).length)for(var te in ee)ee.hasOwnProperty(te)&&ee[te]&&this._currentExclusions.push(te);var st=this.options.routeOptions;Array.isArray(st.exclusions)&&(this._currentExclusions=st.exclusions)}_initPopupDiv(){var ee=this,te=document.createElement("div");te.className="gp-feature-info-div";var st=document.createElement("button");return st.className="gp-styling-button closer",st.onclick=function(){return ee._popupOverlay!=null&&ee._popupOverlay.setPosition(void 0),!1},this._popupContent=document.createElement("div"),this._popupContent.className="gp-features-content-div",te.appendChild(this._popupContent),te.appendChild(st),te}_createRoutePanelFormPointsElement(ee){var te=[],st=1,ot=new LocationSelector({apiKey:this.options.apiKey||null,tag:{id:st,label:"Départ",groupId:this._uid,markerOpts:this.options.markersOpts.departure,display:!0},autocompleteOptions:this.options.autocompleteOptions||null});for(ot.setMap(ee),this._addFormPointsEventListeners(ot),te.push(this._createRoutePanelFormPointLabel("Départ")),te.push(ot._container),this._currentPoints.push(ot),st=2;st<7;st++){var ct=new LocationSelector({apiKey:this.options.apiKey||null,tag:{id:st,label:"Etape "+(st-1),groupId:this._uid,markerOpts:this.options.markersOpts.stages,display:!1,removeOption:!0},autocompleteOptions:this.options.autocompleteOptions||null});ct.setMap(ee),this._addFormPointsEventListeners(ct),te.push(this._createRoutePanelFormPointLabel("Étape",!1)),te.push(ct._container),this._currentPoints.push(ct)}var ut=new LocationSelector({apiKey:this.options.apiKey||null,tag:{id:st,label:"Arrivée",groupId:this._uid,markerOpts:this.options.markersOpts.arrival,display:!0,addOption:!0},autocompleteOptions:this.options.autocompleteOptions||null});return ut.setMap(ee),this._addFormPointsEventListeners(ut),te.push(this._createRoutePanelFormPointLabel("Arrivée")),te.push(ut._container),this._currentPoints.push(ut),te}_addFormPointsEventListeners(ee){ee&&(ee._buttonLabel.addEventListener?(ee._buttonLabel.addEventListener("click",te=>this.onRouteOriginLabelClick(te)),ee._inputShowPointer.addEventListener("click",te=>this.onRouteOriginPointerClick(te,ee)),ee._removePointElement&&ee._removePointElement.addEventListener("click",te=>{logger$q.trace("click on _removePointElement",te)}),ee._addPointElement&&ee._addPointElement.addEventListener("click",te=>{logger$q.trace("click on _addPointElement",te)})):ee._buttonLabel.attachEvent&&(ee._buttonLabel.attachEvent("onclick",te=>this.onRouteOriginLabelClick(te)),ee._inputShowPointer.attachEvent("onclick",te=>this.onRouteOriginPointerClick(te,ee)),ee._removePointElement&&ee._removePointElement.attachEvent("onclick",te=>{}),ee._addPointElement&&ee._addPointElement.attachEvent("onclick",te=>{})))}onRouteComputationSubmit(ee){logger$q.log("onRouteComputationSubmit",ee);var te=this._currentPoints,st;if(te[0]&&te[0].getCoordinate){var ot=te[0].getCoordinate();st={x:ot[0].toFixed(5),y:ot[1].toFixed(5)},logger$q.log("start",st)}var ct,ut=te[te.length-1];if(ut&&ut.getCoordinate){var dt=ut.getCoordinate();ct={x:dt[0].toFixed(5),y:dt[1].toFixed(5)},logger$q.log("end",ct)}for(var ht=[],ft=1;ft<te.length-1;ft++)if(te[ft]&&te[ft].getCoordinate){var pt=te[ft].getCoordinate();if(pt){var mt={x:pt[0].toFixed(5),y:pt[1].toFixed(5)};logger$q.log("step",mt),ht.push(mt)}}this._currentTransport=ee.transport,this._currentComputation=ee.computation,this._currentExclusions=ee.exclusions;var yt=this.options.routeOptions,vt;yt.resource?vt=yt.resource:this._currentComputation==="fastest"&&this._currentTransport==="Pieton"&&(vt="bdtopo-valhalla");var _t=yt.protocol||"XHR",bt=yt.timeOut||0;_t==="JSONP"&&bt===0&&(bt=15e3);
311var xt=yt.onFailure!==null&&typeof yt.onFailure=="function",Mt=yt.onSuccess!==null&&typeof yt.onSuccess=="function",Ot=this;this._requestRouting({serverUrl:yt.serverUrl,startPoint:st,endPoint:ct,viaPoints:ht,graph:yt.graph||this._currentTransport,routePreference:yt.routePreference||this._currentComputation,exclusions:yt.exclusions||this._currentExclusions,geometryInInstructions:!0,distanceUnit:"m",timeOut:bt,protocol:_t,resource:vt,onSuccess:function(kt){logger$q.log(kt),kt&&Ot._fillRouteResultsDetails(kt),Mt&&yt.onSuccess.call(Ot,kt)},onFailure:function(kt){Ot._hideWaitingContainer(),Ot._clearRouteResultsDetails(),logger$q.log(kt.message),xt&&yt.onFailure.call(Ot,kt)}})}onRouteOriginLabelClick(){this._formRouteContainer.className="gpf-panel__content gpf-mobile-form fr-modal__content",unByKey(this.listenerKey),this.dispatchEvent("route:drawend")}onRouteOriginPointerClick(ee,te){var st=this.getMap();te._inputShowPointerContainer.checked?(this._formRouteContainer.className="GProuteFormMini gpf-panel__content fr-modal__content",ee.target.parentElement.parentElement.classList.add("selected"),this.listenerKey=st.on("click",()=>{ee.target.parentElement.parentElement.classList.remove("selected"),this._formRouteContainer.className==="GProuteFormMini gpf-panel__content fr-modal__content"&&(this._formRouteContainer.className="gpf-panel__content fr-modal__content"),unByKey(this.listenerKey),this.dispatchEvent("route:drawend")}),this.dispatchEvent("route:drawstart")):(this._formRouteContainer.className="",unByKey(this.listenerKey),this.dispatchEvent("route:drawend"))}onShowRoutePanelClick(ee){var te=this._showRouteButton.ariaPressed;te==="true"?this.onPanelOpen():this.onPanelClose();var st=this.getMap();Interactions.unset(st),!this._geojsonSections&&!this._waiting&&this._clear(),this.collapsed=te!=="true",this.dispatchEvent("change:collapsed"),this.options.position&&!this.collapsed&&this.updatePosition(this.options.position)}onRouteModeComputationChange(ee){var te=ee.target.value;te&&(logger$q.log(te),this._currentComputation=te)}onRouteModeComputationChangeAndRun(ee){this.onRouteModeComputationChange(ee),this._clearRouteResultsDetails(),this._clearRouteResultsGeometry(),this._clearRouteResultsFeatureGeometry(),this.onRouteComputationSubmit({computation:this._currentComputation,transport:this._currentTransport,exclusions:this._currentExclusions})}onRouteModeTransportChange(ee){var te=ee.target.value,st=document.getElementById("GProuteComputationChoice-"+this._uid),ot=document.getElementById("GProuteExclusions-"+this._uid);te&&(te==="Pieton"&&this.options.prettifyCompute===!0?(st.style.display="none",ot.style.display="none"):(st.style.display="block",ot.style.display="block"),this._currentTransport=te)}onShowRouteExclusionsClick(ee){logger$q.log("onShowRouteExclusionsClick",ee)}onRouteExclusionsChange(ee){var te=ee.target.value,st=ee.target.checked;if(!(!te||typeof te!="string")){te=te.toLowerCase();for(var ot=!1,ct=null,ut=0;ut<this._currentExclusions.length;ut++)this._currentExclusions[ut]===te&&(ct=ut,ot=!0);!ot&&!st&&this._currentExclusions.push(te),ot&&st&&this._currentExclusions.splice(ct,1)}}onRouteResetClick(){for(var ee=this._currentPoints,te=0;te<ee.length;te++)ee[te].clear();this._clear(),this._clearRouteInputOptions()}onShowRouteResultsNewClick(){this._clearRouteResultsDetails(),this._clearRouteResultsGeometry(),this._clearRouteResultsFeatureGeometry(),this.dispatchEvent("route:newresults")}onRouteResultsDetailsMouseOver(ee){var te=ee.target.id,st=te.substring(te.indexOf("_")+1);if(ee.target.classList&&ee.target.classList.add("GProuteResultsDetailsInstructionHighlight"),!!this._geojsonSections){var ot=this._geojsonSections.getSource().getFeatureById(parseInt(st,10));ot.setStyle(this._selectedFeatureStyle)}}onRouteResultsDetailsMouseOut(ee){var te=ee.target.id,st=te.substring(te.indexOf("_")+1);if(ee.target.classList&&ee.target.classList.remove("GProuteResultsDetailsInstructionHighlight"),!!this._geojsonSections){var ot=this._geojsonSections.getSource().getFeatureById(parseInt(st,10));ot.setStyle(null)}}_requestRouting(ee){!ee||typeof ee=="object"&&Object.keys(ee).length===0||ee.startPoint&&ee.endPoint&&(this.options.prettifyCompute===!0&&ee.graph==="Pieton"&&(ee.routePreference="shortest",ee.exclusions=[]),ee.apiKey=this.options.routeOptions.apiKey||this.options.apiKey,typeof ee.ssl!="boolean"&&(typeof this.options.ssl=="boolean"?ee.ssl=this.options.ssl:ee.ssl=!0),logger$q.log(ee),this._displayWaitingContainer(),Gp.Services.route(ee))}_fillRouteResultsDetails(ee){var te=ee.totalDistance,st=ee.totalTime,ot=this._simplifiedInstructions(ee.routeInstructions);ot&&this._fillRouteResultsDetailsContainer(te,st,ot);var ct=ee.routeGeometry;ct&&this._fillRouteResultsDetailsGeometry(ct,this._defaultFeatureStyle),ot&&ot[0].geometry&&this._fillRouteResultsDetailsFeatureGeometry(ot,this._defaultFeatureStyle);var ut=ee.bbox;if(ut){var dt=this.getMap(),ht=[ut.left,ut.bottom,ut.right,ut.top],ft=dt.getView().getProjection().getCode();ft!=="EPSG:4326"&&(ht=transformExtent(ht,"EPSG:4326",ft)),dt.getView().fit(ht,dt.getSize())}this._currentRouteInformations=ee,this.dispatchEvent({type:"route:compute"}),this._formRouteContainer.className="GPelementHidden gpf-hidden gpf-panel__content fr-modal__content",this._hideWaitingContainer(),this._resultsRouteContainer.className="";
311let pt=document.getElementById("GProuteResultsMode-"+this._uid);this._currentTransport==="Pieton"&&this.options.prettifyCompute===!0?pt.style.display="none":pt.style.display="block"}_fillRouteResultsDetailsContainer(ee,te,st){this._resultsRouteValuesContainer=this._addRouteResultsValuesElement(ee,te,MathUtils.convertSecondsToTime),this._resultsRouteDetailsContainer=this._addRouteResultsDetailsElement(st,MathUtils.convertSecondsToTime)}_fillRouteResultsDetailsGeometry(ee,te){this._clearRouteResultsGeometry();var st=this.getMap();if(ee){var ot={type:"FeatureCollection",features:[{type:"Feature",crs:{type:"name",properties:{name:"EPSG:4326"}},geometry:ee}]},ct=new GeoJSON({defaultDataProjection:"EPSG:4326",defaultStyle:te}),ut=ct.readFeatures(ot,{dataProjection:"EPSG:4326",featureProjection:"EPSG:3857"});this._geojsonRoute=new VectorLayer({source:new VectorSource({features:ut}),style:te,title:"Mon Itinéraire"}),st.addLayer(this._geojsonRoute)}}_fillRouteResultsDetailsFeatureGeometry(ee,te){this._clearRouteResultsFeatureGeometry();var st=this.getMap();this._geojsonObject={type:"FeatureCollection",crs:{type:"name",properties:{name:"EPSG:4326"}},features:[]};for(var ot=0;ot<ee.length;ot++){for(var ct=ee[ot],ut=ot+1,dt=ct.geometry.coordinates,ht=0;ht<dt.length;ht++)typeof dt[ht][0]=="string"&&(dt[ht][0]=parseFloat(dt[ht][0]),dt[ht][1]=parseFloat(dt[ht][1]));this._geojsonObject.features.push({type:"Feature",geometry:ct.geometry,properties:{popupContent:"("+ut+") distance : "+MathUtils.convertDistance(ct.distance)+" / temps : "+MathUtils.convertSecondsToTime(ct.duration)},id:ut})}this._geojsonObject.features.push({type:"Feature",geometry:{type:"Point",coordinates:this._currentPoints[0].getCoordinate()},properties:{description:"Point de départ","marker-symbol":this.options.markersOpts.departure.url}});for(var ft=1;ft<this._currentPoints.length-1;ft++)if(this._currentPoints[ft]&&this._currentPoints[ft].getCoordinate){var pt=this._currentPoints[ft].getCoordinate();pt&&this._geojsonObject.features.push({type:"Feature",geometry:{type:"Point",coordinates:pt},properties:{description:"Point d'étape","marker-symbol":this.options.markersOpts.stages.url}})}this._geojsonObject.features.push({type:"Feature",geometry:{type:"Point",coordinates:this._currentPoints[this._currentPoints.length-1].getCoordinate()},properties:{description:"Point d'arrivée","marker-symbol":this.options.markersOpts.arrival.url}});var mt=new GeoJSON({defaultDataProjection:"EPSG:4326",defaultStyle:te}),yt=this.getMap().getView().getProjection().getCode(),vt=mt.readFeatures(this._geojsonObject,{dataProjection:"EPSG:4326",featureProjection:yt});this._geojsonSections=new VectorLayer({source:new VectorSource({features:vt}),style:te,opacity:.9,title:"Mon Itinéraire"});var _t;this._currentTransport==="Pieton"?(_t="piéton",this._geojsonSections.gpResultLayerId="compute:Pieton$OGC:OPENLS;Itineraire"):(_t="voiture",this._geojsonSections.gpResultLayerId="compute:Voiture$OGC:OPENLS;Itineraire"),st.addLayer(this._geojsonSections),st.getControls().forEach(bt=>{if(bt instanceof LayerSwitcher){var xt=this._geojsonSections.gpLayerId;bt._layers[xt].title===xt&&bt.addLayer(this._geojsonSections,{title:this.options.layerDescription.title+" ("+_t+")",description:this.options.layerDescription.description})}},this),this._resultsHoverInteraction=new Select({condition:pointerMove,layers:[this._geojsonSections],style:this._selectedFeatureStyle}),this._resultsHoverInteraction.on("select",bt=>this._onResultsFeatureMouseOver(bt)),st.addInteraction(this._resultsHoverInteraction),this._resultsSelectInteraction=new Select({layers:[this._geojsonSections],style:this._selectedFeatureStyle}),this._resultsSelectInteraction.on("select",bt=>this._onResultsFeatureSelect(bt)),st.addInteraction(this._resultsSelectInteraction)}_onResultsFeatureMouseOver(ee){if(ee.selected.length!==0){var te=ee.selected[0],st=document.getElementById("GProuteResultsDetailsInstruction_"+te.getId()+"-"+this._uid);st&&st.classList&&st.classList.add("GProuteResultsDetailsInstructionHighlight")}if(ee.deselected.length!==0){var ot=ee.deselected[0],ct=document.getElementById("GProuteResultsDetailsInstruction_"+ot.getId()+"-"+this._uid);ct&&ct.classList&&ct.classList.remove("GProuteResultsDetailsInstructionHighlight")}}_onResultsFeatureSelect(ee){var te=this.getMap();if(ee.selected.length!==0){var st=ee.selected[0];this._popupContent.innerHTML=st.getProperties().popupContent,this._popupOverlay?this._popupOverlay.setPosition(ee.mapBrowserEvent.coordinate):(this._popupOverlay=new Overlay({element:this._popupDiv,positioning:"bottom-center",position:ee.mapBrowserEvent.coordinate}),te.addOverlay(this._popupOverlay))}else this._popupOverlay!=null&&this._popupOverlay.setPosition(void 0)}_clear(){this._currentTransport=null,this._currentExclusions=[],this._currentComputation=null,this._clearRouteResultsDetails(),this._clearRouteResultsGeometry(),this._clearRouteResultsFeatureGeometry();for(var ee=0;ee<this._currentPoints.length;ee++)this._currentPoints[ee].clear();this._removeRouteStepLocations()}_clearRouteInputOptions(){this._initTransport(),this._initComputation(),this._initExclusions();var ee;this._currentTransport==="Pieton"?(ee=document.getElementById("GProuteTransportPedestrian-"+this._uid),ee&&(ee.checked="true")):(ee=document.getElementById("GProuteTransportCar-"+this._uid),ee&&(ee.checked="true"));var te=document.getElementById("GProuteComputationSelect-"+this._uid);te&&(te.value=this._currentComputation);var st=document.getElementById("GProuteExclusionsToll-"+this._uid);st&&(this._currentExclusions.indexOf("toll")!==-1?st.checked=!1:st.checked=!0);var ot=document.getElementById("GProuteExclusionsTunnel-"+this._uid);ot&&(this._currentExclusions.indexOf("tunnel")!==-1?ot.checked=!1:ot.checked=!0);var ct=document.getElementById("GProuteExclusionsBridge-"+this._uid);ct&&(this._currentExclusions.indexOf("bridge")!==-1?ct.checked=!1:ct.checked=!0)}_removeRouteStepLocations(){var ee=document.querySelectorAll('div[id^="GPlocationPoint"]');if(ee.length!==0){for(var te=[],st=0;st<ee.length;st++)ee[st].id.indexOf(this._uid)!==-1&&te.push(ee[st]);for(var ot=1;ot<te.length-1;ot++){var ct=te[ot].classList;if(ct.length!==0)for(var ut=0;ut<ct.length;ut++)ct[ut]==="GPlocationStageFlexInput"&&document.getElementById(this._addUID("GPlocationStageRemove_"+(ot+1))).click()}}}
311_clearRouteResultsDetails(){if(this._currentRouteInformations=null,this._resultsRouteDetailsContainer){var ee=this._resultsRouteDetailsContainer;if(ee.childElementCount)for(;ee.firstChild;)ee.removeChild(ee.firstChild)}if(this._resultsRouteValuesContainer){var te=this._resultsRouteValuesContainer;if(te.childElementCount)for(;te.firstChild;)te.removeChild(te.firstChild)}}_clearRouteResultsGeometry(){var ee=this.getMap();this._geojsonRoute!=null&&(ee.removeLayer(this._geojsonRoute),this._geojsonRoute=null)}_clearRouteResultsFeatureGeometry(){var ee=this.getMap();this._geojsonSections!=null&&(ee.removeLayer(this._geojsonSections),this._geojsonSections=null,this._geojsonObject=null),this._popupOverlay!=null&&(ee.removeOverlay(this._popupOverlay),this._popupOverlay=null),this._resultsSelectInteraction!=null&&(ee.removeInteraction(this._resultsSelectInteraction),this._resultsSelectInteraction=null),this._resultsHoverInteraction!=null&&(ee.removeInteraction(this._resultsHoverInteraction),this._resultsHoverInteraction=null)}_hideRouteSuggestedLocations(ee){if(ee.target&&ee.target.id&&ee.target.id.indexOf("GPlocationOrigin_")!==-1)for(var te=parseInt(ee.target.id.split("_")[1][0],10)-1,st=0;st<this._currentPoints.length;st++)st!==parseInt(te,10)&&this._currentPoints[st]._hideSuggestedLocation();else for(var ot=0;ot<this._currentPoints.length;ot++)this._currentPoints[ot]._hideSuggestedLocation()}_displayWaitingContainer(){this._waitingContainer.className="GPwaitingContainer GPwaitingContainerVisible gpf-waiting gpf-waiting--visible",this._waiting=!0;var ee=this.options.routeOptions;if(ee&&ee.timeOut){this._timer&&(clearTimeout(this._timer),this._timer=null);var te=this;this._timer=setTimeout(function(){te._waiting===!0?te._hideWaitingContainer():te._timer&&clearTimeout(te._timer)},16e3)}}_hideWaitingContainer(){if(this._waiting){this._waitingContainer.className="GPwaitingContainer GPwaitingContainerHidden gpf-waiting gpf-waiting--hidden",this._waiting=!1;var ee=this.options.routeOptions;ee&&ee.timeOut&&(clearTimeout(this._timer),this._timer=null)}}_simplifiedInstructions(ee){var te=[],st=ee[0];ee.length===1&&te.push(st);for(var ot=1;ot<ee.length;ot++){var ct=ee[ot];if(ct.instruction===st.instruction){st.distance=(parseFloat(ct.distance)+parseFloat(st.distance)).toString(),st.duration=(parseFloat(ct.duration)+parseFloat(st.duration)).toString();for(var ut=1;ut<ct.geometry.coordinates.length;ut++)st.geometry.coordinates.push(ct.geometry.coordinates[ut])}else te.push(st),st=ct,ot===ee.length-1&&(te.push(ct),st=null)}return logger$q.log(te),te}}Object.assign(Route.prototype,PanelDOM);Object.assign(Route.prototype,RouteDOM);Object.assign(Route.prototype,Widget);window.ol&&window.ol.control&&(window.ol.control.Route=Route);var IsoDOM={_addUID:function(ne){var ee=this._uid?ne+"-"+this._uid:ne;return ee},_createMainContainerElement:function(){var ne=document.createElement("div");return ne.id=this._addUID("GPisochron"),ne.className="GPwidget gpf-widget gpf-widget-button gpf-mobile-fullscreen",ne},_createShowIsoPictoElement:function(){var ne=this,ee=document.createElement("button"),te=document.createElement("span");return ee.appendChild(te),ee.id=this._addUID("GPshowIsochronPicto"),ee.classList.add("GPshowOpen","GPshowAdvancedToolPicto","GPshowIsochronPicto"),ee.classList.add("gpf-btn","gpf-btn--tertiary","gpf-btn-icon","gpf-btn-icon-isocurve"),ee.classList.add("icon--ri","icon--ri--map-pin-time-line"),ee.classList.add("fr-btn","fr-btn--tertiary"),ee.setAttribute("aria-label","Zone selon le temps de trajet ou distance"),ee.setAttribute("tabindex","0"),ee.setAttribute("aria-pressed",!1),ee.setAttribute("type","button"),ee.addEventListener?ee.addEventListener("click",function(st){var ot=st.target.ariaPressed==="true";st.target.setAttribute("aria-pressed",!ot),ne.onShowIsoPanelClick(st)}):ee.attachEvent&&ee.attachEvent("onclick",function(st){var ot=st.target.ariaPressed==="true";st.target.setAttribute("aria-pressed",!ot),ne.onShowIsoPanelClick(st)}),ee},_createIsoPanelElement:function(){var ne=document.createElement("dialog");return ne.id=this._addUID("GPisochronPanel"),ne.className="GPpanel gpf-panel fr-modal",ne},_createIsoPanelDivElement:function(){var ne=document.createElement("div");
311return ne.className="gpf-panel__body fr-modal__body",ne},_createDrawingButtonsPluginDiv:function(){var ne=document.createElement("div");return ne.className="container-buttons-plugin fr-mx-2w",ne},_createIsoPanelFormElement:function(){var ne=this,ee=document.createElement("form");return ee.id=this._addUID("GPisochronForm"),ee.className="GPform gpf-panel__content gpf-mobile-form fr-modal__content",ee.addEventListener("submit",function(te){return te.preventDefault(),ne.onIsoComputationSubmit(te),!1}),ee},_createIsoPanelResultsElement:function(){var ne=this,ee=document.createElement("div");ee.id=this._addUID("GPisoResultsPanel"),ee.className="GPelementHidden gpf-hidden";var te=document.createElement("div");return te.id=this._addUID("GPisoResultsNew"),te.className="GPresetPicto gpf-btn gpf-btn-icon-reset fr-btn fr-btn--secondary gpf-btn--secondary fr-m-2w",te.title="Modifier le calcul",te.addEventListener("click",function(st){document.getElementById(ne._addUID("GPisoResultsPanel")).className="GPelementHidden gpf-hidden",document.getElementById(ne._addUID("GPisochronForm")).className="gpf-panel__content fr-modal__content",ne.onShowIsoResultsNewClick(st)}),ee.appendChild(te),ee},_addIsoResultsValuesElement:function(ne,ee,te){var st=ne.distance,ot=ne.time,ct=ne.location,ut=ee.graph,dt=ee.method,ht=ee.exclusions,ft=document.getElementById(this._addUID("GPisoResultsPanel"));ft.childElementCount&&ft.firstChild.id===this._addUID("GPisoResultsValueDiv")&&ft.removeChild(ft.firstChild);var pt=document.createElement("div");pt.id=this._addUID("GPisoResultsValueDiv"),pt.className="fr-m-2w";var mt=document.createElement("div");mt.className="GPisoResultsValue";var yt=document.createElement("label");yt.className="GPisoResultsValueLabel",yt.innerHTML="Type :",mt.appendChild(yt);var vt=document.createElement("div");vt.id=this._addUID("GPisoResultsValueType"),dt==="time"?vt.innerHTML="temps":vt.innerHTML="distance",mt.appendChild(vt),pt.appendChild(mt);var _t=document.createElement("div");_t.className="GPisoResultsValue";var bt=document.createElement("label");bt.className="GPisoResultsValueLabel",bt.innerHTML="Mode :",_t.appendChild(bt);var xt=document.createElement("div");xt.id=this._addUID("GPisoResultsValueMode"),xt.innerHTML=ut,_t.appendChild(xt),pt.appendChild(_t);var Mt=document.createElement("div");Mt.className="GPisoResultsValue";
311var Ot=document.createElement("label");Ot.className="GPisoResultsValueLabel",Ot.innerHTML="Centre :",Mt.appendChild(Ot);var kt=document.createElement("div");if(kt.id=this._addUID("GPisoResultsValueOrigin"),kt.innerHTML=parseFloat(ct.y).toFixed(4)+", "+parseFloat(ct.x).toFixed(4),Mt.appendChild(kt),pt.appendChild(Mt),st&&st.length!==0){var Nt=document.createElement("div");Nt.className="GPisoResultsValue";var Gt=document.createElement("label");Gt.className="GPisoResultsValueLabel",Gt.innerHTML="Distance :",Nt.appendChild(Gt);var Bt=0,Ut=parseInt(st/1e3,10);if(!Ut)Bt=Math.round(st)+" m";else{var Vt=Math.round(st);Vt=Vt/1e3,Bt=Vt+" km"}var Ht=document.createElement("div");Ht.id=this._addUID("GPisoResultsValueDist"),Ht.innerHTML=Bt,Nt.appendChild(Ht),pt.appendChild(Nt)}if(ot&&ot.length!==0){var zt=document.createElement("div");zt.className="GPisoResultsValue";var jt=document.createElement("label");jt.className="GPisoResultsValueLabel",jt.innerHTML="Durée :",zt.appendChild(jt);var Wt=document.createElement("div");Wt.id=this._addUID("GPisoResultsValueTime"),Wt.innerHTML=te(ot),zt.appendChild(Wt),pt.appendChild(zt)}if(ht.length>0){var Jt=document.createElement("div");Jt.className="GPisoResultsValue";var Qt=document.createElement("label");Qt.className="GPisoResultsValueLabel",Qt.innerHTML="Exclusions :",Jt.appendChild(Qt);var oi=document.createElement("div");oi.id=this._addUID("GPisoResultsValueExclusions"),oi.innerHTML=ht.join(", "),Jt.appendChild(oi),pt.appendChild(Jt)}return ft.prepend(pt),ft},_createIsoWaitingElement:function(){var ne=document.createElement("div");ne.id=this._addUID("GPisochronCalcWaitingContainer"),ne.className="GPwaitingContainer GPwaitingContainerHidden gpf-waiting gpf-waiting--hidden";var ee=document.createElement("p");return ee.className="GPwaitingContainerInfo gpf-waiting_info",ee.innerHTML="Recherche en cours...",ne.appendChild(ee),ne},_createIsoPanelFooterElement:function(){var ne=document.createElement("div");return ne.className="GPpanelFooter gpf-panel__footer fr-modal__footer",ne},_createIsoPanelFormPointLabel:function(){var ne=document.createElement("p");return ne.id=this._addUID("GPisochronPointLabelP"),ne.className="gpf-label fr-label",ne.innerHTML="Départ",ne},_createIsoPanelFormTypeChoiceElement:function(){var ne=document.createElement("div");return ne.id=this._addUID("GPisochronChoice"),ne.className="fr-mt-2w",ne},_createIsoPanelFormTypeChoiceChronElement:function(ne){var ee=this,te=document.createElement("div");te.className="GPisochronChoiceAlt gpf-flex gpf-flex-isocurve gpf-radio-group fr-radio-group";var st=document.createElement("input");st.id=this._addUID("GPisochronChoiceAltChron"),st.name="GPisochronChoiceMode",st.type="radio",st.checked=!!ne,st.addEventListener?st.addEventListener("change",function(ut){document.getElementById(ee._addUID("GPisochronValueChron")).className="GPflexInput gpf-flex fr-mt-1w",document.getElementById(ee._addUID("GPisochronValueDist")).className="GPelementHidden gpf-hidden",document.getElementById(ee._addUID("GPisochronValueChronLabelP")).className="gpf-label fr-label",document.getElementById(ee._addUID("GPisochronValueDistLabelP")).className="GPelementHidden gpf-hidden",document.getElementById(ee._addUID("GPisochronSubmit")).value="Calculer l'isochrone",ee.onIsoTypeChoiceChange(ut)},!1):st.attachEvent&&st.attachEvent("onchange",function(){document.getElementById(ee._addUID("GPisochronValueChron")).className="GPflexInput gpf-flex fr-mt-1w",document.getElementById(ee._addUID("GPisochronValueDist")).className="GPelementHidden gpf-hidden",document.getElementById(ee._addUID("GPisochronValueChronLabelP")).className="gpf-label fr-label",document.getElementById(ee._addUID("GPisochronValueDistLabelP")).className="GPelementHidden gpf-hidden",document.getElementById(ee._addUID("GPisochronSubmit")).value="Calculer l'isochrone",ee.onIsoTypeChoiceChange()}),st.value="isochron",te.appendChild(st);var ot=document.createElement("label");ot.className="GPisochronChoiceAltImg gpf-label fr-label",ot.htmlFor=this._addUID("GPisochronChoiceAltChron"),ot.innerHTML="Durée",ot.title="Durée",te.appendChild(ot);var ct=document.createElement("span");return ct.id=this._addUID("GPisochronChoiceAltChronTxt"),ct.className="gpf-hidden",ct.innerHTML="Durée",ct.addEventListener?ct.addEventListener("click",function(){document.getElementById(ee._addUID("GPisochronChoiceAltChron")).click()},!1):ct.attachEvent&&ct.attachEvent("onclick",function(){document.getElementById(ee._addUID("GPisochronChoiceAltChron")).click()}),te.appendChild(ct),te},_createIsoPanelFormTypeChoiceDistElement:function(ne){var ee=this,te=document.createElement("div");te.className="GPisochronChoiceAlt gpf-flex gpf-flex-isocurve gpf-radio-group fr-radio-group";var st=document.createElement("input");st.id=this._addUID("GPisochronChoiceAltDist"),st.name="GPisochronChoiceMode",st.type="radio",st.checked=!!ne,st.addEventListener?st.addEventListener("change",function(ut){document.getElementById(ee._addUID("GPisochronValueDist")).className="GPflexInput gpf-flex fr
311-mt-1w",document.getElementById(ee._addUID("GPisochronValueChron")).className="GPelementHidden gpf-hidden",document.getElementById(ee._addUID("GPisochronValueDistLabelP")).className="gpf-label fr-label",document.getElementById(ee._addUID("GPisochronValueChronLabelP")).className="GPelementHidden gpf-hidden",document.getElementById(ee._addUID("GPisochronSubmit")).value="Calculer l'isodistance",ee.onIsoTypeChoiceChange(ut)},!1):st.attachEvent&&st.attachEvent("onchange",function(){document.getElementById(ee._addUID("GPisochronValueDist")).className="GPflexInput gpf-flex fr-mt-1w",document.getElementById(ee._addUID("GPisochronValueChron")).className="GPelementHidden gpf-hidden",document.getElementById(ee._addUID("GPisochronValueDistLabelP")).className="gpf-label fr-label",document.getElementById(ee._addUID("GPisochronValueChronLabelP")).className="GPelementHidden gpf-hidden",document.getElementById(ee._addUID("GPisochronSubmit")).value="Calculer l'isodistance",ee.onIsoTypeChoiceChange()}),st.value="isodistance",te.appendChild(st);var ot=document.createElement("label");ot.className="GPisochronChoiceAltImg gpf-label fr-label",ot.htmlFor=this._addUID("GPisochronChoiceAltDist"),ot.innerHTML="Distance",ot.title="Distance",te.appendChild(ot);var ct=document.createElement("span");return ct.id=this._addUID("GPisochronChoiceAltDistTxt"),ct.className="gpf-hidden",ct.innerHTML="Distance",ct.addEventListener?ct.addEventListener("click",function(){document.getElementById(ee._addUID("GPisochronChoiceAltDist")).click()},!1):ct.attachEvent&&ct.attachEvent("onclick",function(){document.getElementById(ee._addUID("GPisochronChoiceAltDist")).click()}),te.appendChild(ct),te},_createIsoPanelFormLabelIsochronElement:function(ne){var ee=document.createElement("p");return ee.id=this._addUID("GPisochronValueChronLabelP"),ee.className=ne?"gpf-label fr-label":"GPelementHidden gpf-hidden",ee.innerHTML="Définir un temps de trajet",ee},_createIsoPanelFormValueIsochronElement:function(ne){var ee=this,te=document.createElement("div");te.id=this._addUID("GPisochronValueChron"),te.className=ne?"GPflexInput gpf-flex fr-mt-1w":"GPelementHidden gpf-hidden";var st=document.createElement("input");st.id=this._addUID("GPisochronValueChronInput1"),st.className="gpf-input fr-input",st.min="0",st.step="1",st.value="0",st.type="number",st.title="Temps",st.addEventListener?st.addEventListener("change",function(dt){typeof ee.onIsoValueChronTimeMinuteChange=="function"&&ee.onIsoValueChronTimeHourChange(dt)}):st.attachEvent&&st.attachEvent("onchange",function(dt){typeof ee.onIsoValueChronTimeMinuteChange=="function"&&ee.onIsoValueChronTimeHourChange(dt)}),te.appendChild(st);var ot=document.createElement("label");ot.innerHTML="h",ot.className="gpf-label fr-label",te.appendChild(ot);var ct=document.createElement("input");ct.id=this._addUID("GPisochronValueChronInput2"),ct.className="gpf-input fr-input",ct.min="0",ct.max="59",ct.step="1",ct.value="0",ct.type="number",ct.title="Heures",ct.addEventListener?ct.addEventListener("change",function(dt){typeof ee.onIsoValueChronTimeMinuteChange=="function"&&ee.onIsoValueChronTimeMinuteChange(dt)}):ct.attachEvent&&ct.attachEvent("onchange",function(dt){typeof ee.onIsoValueChronTimeMinuteChange=="function"&&ee.onIsoValueChronTimeMinuteChange(dt)}),te.appendChild(ct);var ut=document.createElement("label");return ut.innerHTML="min",ut.className="gpf-label fr-label",te.appendChild(ut),te},_createIsoPanelFormLabelIsodistanceElement:function(ne){var ee=document.createElement("p");return ee.id=this._addUID("GPisochronValueDistLabelP"),ee.className=ne?"gpf-label fr-label":"GPelementHidden gpf-hidden",ee.innerHTML="Définir une distance",ee},_createIsoPanelFormValueIsodistanceElement:function(ne){var ee=this,te=document.createElement("div");te.id=this._addUID("GPisochronValueDist"),te.className=ne?"GPflexInput gpf-flex fr-mt-1w":"GPelementHidden gpf-hidden";var st=document.createElement("input");st.id=this._addUID("GPisochronValueDistInput"),st.className="gpf-input fr-input fr-ml-1w",st.min="0",st.step="any",st.value="0",st.type="number",st.title="Distance",st.addEventListener?st.addEventListener("change",function(ct){typeof ee.onIsoValueDistChange=="function"&&ee.onIsoValueDistChange(ct)}):st.attachEvent&&st.attachEvent("onchange",function(ct){typeof ee.onIsoValueDistChange=="function"&&ee.onIsoValueDistChange(ct)}),te.appendChild(st);var ot=document.createElement("label");return ot.innerHTML="km",ot.className="gpf-label fr-label",te.appendChild(ot),te},_createIsoPanelFormModeChoiceTransportElement:function(ne){var ee=this,te=document.createElement("div");te.id=this._addUID("GPisochronTransportChoice");var st=document.createElement("label");st.className="GPisochronModeLabel gpf-label fr-label",st.innerHTML="Choisir un mode de déplacement",te.appendChild(st);for(var ot=document.createElement("div"),ct=0;ct<ne.length;ct++){var ut=ne[ct],dt=document.createElement("div");if(dt.className="GPisochronTransportChoice gpf-flex gpf-radio-group fr-radio-group",ut==="Voiture"){var ht=document.createElement("input");
311ht.id=this._addUID("GPisochronTransportCar"),ht.type="radio",ht.name="GPisochronTransport",ct===0&&(ht.checked=!0),ht.addEventListener?ht.addEventListener("change",function(yt){ee.onIsoModeTransportChange(yt)}):ht.attachEvent&&ht.attachEvent("onchange",function(yt){ee.onIsoModeTransportChange(yt)}),ht.value="Voiture",dt.appendChild(ht);var ft=document.createElement("label");ft.className="GPisochronTransportImg gpf-label fr-label",ft.htmlFor=this._addUID("GPisochronTransportCar"),ft.title="Voiture",ft.innerHTML="Voiture",dt.appendChild(ft)}if(ut==="Pieton"){var pt=document.createElement("input");pt.id=this._addUID("GPisochronTransportPedestrian"),pt.type="radio",pt.name="GPisochronTransport",ct===0&&(pt.checked=!0),pt.addEventListener?pt.addEventListener("change",function(yt){ee.onIsoModeTransportChange(yt)}):pt.attachEvent&&pt.attachEvent("onchange",function(yt){ee.onIsoModeTransportChange(yt)}),pt.value="Pieton",dt.appendChild(pt);var mt=document.createElement("label");mt.className="GPisochronTransportImg gpf-label fr-label",mt.htmlFor=this._addUID("GPisochronTransportPedestrian"),mt.title="Piéton",mt.innerHTML="Piéton",dt.appendChild(mt)}ot.appendChild(dt)}return te.appendChild(ot),te},_createIsoPanelFormModeChoiceDirectionElement:function(ne){var ee=this,te=document.createElement("div");te.id=this._addUID("GPisochronDirectionChoice"),te.className="fr-my-2w";var st=document.createElement("label");st.innerHTML="Définir un sens de parcours",st.className="fr-label",te.appendChild(st);var ot=document.createElement("select");ot.id=this._addUID("GPisochronDirectionSelect"),ot.className="GPselect gpf-select fr-select",ot.title="Sens de parcours",ot.addEventListener("change",function(ft){ee.onIsoModeDirectionChange(ft)});for(var ct=0;ct<ne.length;ct++){var ut=ne[ct];if(ut.toLowerCase()==="departure"){var dt=document.createElement("option");ct===0&&(dt.selected="selected"),dt.value="departure",dt.text="Départ",ot.appendChild(dt)}if(ut.toLowerCase()==="arrival"){var ht=document.createElement("option");ct===0&&(ht.selected="selected"),ht.value="arrival",ht.text="Arrivée",ot.appendChild(ht)}}return te.appendChild(ot),te},_createShowIsoExclusionsPictoElement:function(){var ne=this,ee=document.createElement("button");ee.id=this._addUID("GPshowIsoExclusionsPicto");var te="";return checkDsfr()&&(te="GPelementHidden gpf-hidden"),ee.className=`GPshowAdvancedToolPicto GPshowMoreOptionsImage GPshowMoreOptions GPshowIsoExclusionsPicto ${te} gpf-btn fr-btn--sm fr-btn--tertiary gpf-btn--tertiary fr-icon-arrow-down-fill`,ee.title="Exclusions",ee.setAttribute("tabindex","0"),ee.setAttribute("aria-pressed",!0),ee.addEventListener?ee.addEventListener("click",function(st){st.preventDefault();var ot=st.target.ariaPressed==="true";st.target.setAttribute("aria-pressed",!ot),ne.onShowIsoSettingsClick(st)}):ee.attachEvent&&ee.attachEvent("onclick",function(st){st.preventDefault();var ot=st.target.ariaPressed==="true";st.target.setAttribute("aria-pressed",!ot),ne.onShowIsoSettingsClick(st)}),ee},_createIsoPanelFormExclusionsElement:function(){var ne=document.createElement("div");ne.id=this._addUID("GPisoExclusions");var ee=document.createElement("label");return ee.className="GPisoExclusionsLabel gpf-label fr-label",ee.innerHTML="Passages autorisés",ne.appendChild(ee),ne},_createIsoPanelFormExclusionOptionsElement:function(ne){var ee=this,te=document.createElement("div");te.className="GPisoExclusionsOptions gpf-flex fr-checkbox-group fr-m-1w";for(var st in ne)if(ne.hasOwnProperty(st)){var ot=ne[st];switch(st){case"toll":var ct=document.createElement("input");ct.id=this._addUID("GPisoExclusionsToll"),ct.type="checkbox",ct.name="Péages",ct.checked=!ot,ct.addEventListener?ct.addEventListener("change",function(mt){ee.onIsoExclusionsChange(mt)}):ct.attachEvent&&ct.attachEvent("onchange",function(mt){ee.onIsoExclusionsChange(mt)}),ct.value="Toll",te.appendChild(ct);var ut=document.createElement("label");ut.className="GPisoExclusionsOption",ut.htmlFor=this._addUID("GPisoExclusionsToll"),ut.innerHTML="Péages",te.appendChild(ut);break;case"tunnel":var dt=document.createElement("input");dt.id=this._addUID("GPisoExclusionsTunnel"),dt.type="checkbox",dt.name="Tunnel",dt.checked=!ot,dt.addEventListener?dt.addEventListener("change",function(mt){ee.onIsoExclusionsChange(mt)}):dt.attachEvent&&dt.attachEvent("onchange",function(mt){ee.onIsoExclusionsChange(mt)}),dt.value="Tunnel",te.appendChild(dt);var ht=document.createElement("label");ht.className="GPisoExclusionsOption",ht.htmlFor=this._addUID("GPisoExclusionsTunnel"),ht.innerHTML="Tunnels",te.appendChild(ht);break;case"bridge":var ft=document.createElement("input");ft.id=this._addUID("GPisoExclusionsBridge"),ft.type="checkbox",ft.name="Ponts",ft.checked=!ot,ft.addEventListener?ft.addEventListener("change",function(mt){ee.onIsoExclusionsChange(mt)}):ft.attachEvent&&ft.attachEvent("onchange",function(mt){ee.onIsoExclusionsChange(mt)}),ft.value="Bridge",te.appendChild(ft);var pt=document.createElement("label");pt.className="GPisoExclusionsOption",pt.htmlFor=this._addUID("GPisoExclusionsBridge"),pt.innerHTML="Ponts",te.appendChild(pt);break}}return te},_createIsoSubmitFormElement:function(){var ne=document.createElement("input");return ne.id=this._addUID("GPisochronSubmit"),ne.className="GPsubmit gpf-btn fr-btn",ne.type="submit",ne.value="Calculer l'isochrone",ne},_createIsoFormResetElement:function(){var ne=this,ee=document.createElement("button");return ee.id=this._addUID("GPisochronReset"),ee.className="GPresetPicto GPisochronReset gpf-btn gpf-btn-icon-reset gpf-btn-icon-isocurve-reset fr-btn fr-btn--secondary gpf-btn--secondary",ee.title="Réinitialiser les paramètres",ee.setAttribute("tabindex","0"),ee.setAttribute("aria-pressed",!1),ee.addEventListener("click",function(te){var st=te.target.ariaPressed==="true";te.target.setAttribute("aria-pressed",!st),ne.onIsoResetClick(te)}),ee}},logger$p=LoggerByDefault.getLogger("isocurve");class Isocurve extends ControlExtended{constructor(ee){if(ee=ee||{},super(ee),!(this instanceof Isocurve))throw new TypeError("ERROR CLASS_CONSTRUCTOR");return this.CLASSNAME="Isocurve",this.initialize(ee),this._container=this._createMainContainerElement(),this.element?this.element.appendChild(this._container):this.element=this._container,this}setMap(ee){if(ee){if(this._container=this._initContainer(ee),this.options.export){var te=Helper.assign({control:this},this.options.export);this.export=new ButtonExport(te),this.export.render();var st=this;this.export.on("button:clicked",ot=>{st.dispatchEvent({type:"export:compute",content:ot.content})})}this.draggable&&Draggable.dragElement(this._IsoPanelContainer,this._IsoPanelHeaderContainer,ee.getTargetElement()),this.collapsed||this._pictoIsoButton.setAttribute("aria-pressed",!0)}super.setMap(ee),this.options.position&&this.setPosition(this.options.position),this.options.gutter===!1&&this.getContainer().classList.add("gpf-button-no-gutter")}getCollapsed(){return this.collapsed}setCollapsed(ee){if(ee===void 0){logger$p.log("[ERROR] Isocurve:setCollapsed - missing collapsed parameter");return}ee&&this.collapsed||!ee&&!this.collapsed||(ee?this._panelCloseBtn.click():this._pictoIsoButton.click(),this.collapsed=ee)}getLayer(){return this._geojsonLayer}setLayer(ee){if(!ee){this._geojsonLayer=null;return}if(!(ee instanceof VectorLayer)){logger$p.log("no valid layer given for hosting drawn features.");return}ee.setStyle(this._defaultFeatureStyle),this._geojsonLayer=ee}getGeoJSON(){return JSON.stringify(this._geojsonObject)}setGeoJSON(ee){try{this._geojsonObject=JSON.parse(ee)}catch(te){logger$p.log("no valid geojson given :"+te.message)}}getData(){var ee={type:"isocurve",transport:this._currentTransport,computation:this._currentComputation,exclusions:this._currentExclusions,direction:this._currentDirection,point:this._originPoint.getCoordinate(),results:{}};return Helper.assign(ee.results,this._currentIsoResults),ee}setData(ee){this._currentTransport=ee.transport,this._currentComputation=ee.computation,this._currentExclusions=ee.exclusions,this._currentDirection=ee.direction;var te=document.getElementById("GPlocationOriginPointer_1-"+this._uid);te.checked=!0;var st=document.getElementById("GPlocationOrigin_1-"+this._uid),ot=document.getElementById("GPlocationOriginCoords_1-"+this._uid);ot.value=ee.point,st.value=ee.point[1].toFixed(4)+" / "+ee.point[0].toFixed(4),this._originPoint.setCoordinate(ee.point,"EPSG:4326"),this._currentIsoResults=ee.results}getContainer(){return this._container}getStyle(){return this._defaultFeatureStyle}compute(ee,te,st){this._clear();var ot=this._pictoIsoButton.ariaPressed;ot!=="true"&&this._pictoIsoButton.click();var ct=this.getMap();if(ct){var ut={direction:"departure",method:"time",transport:"Voiture",exclusions:[]};Helper.assign(ut,st),this._originPoint.setCoordinate(ee);var dt=this._originPoint.getCoordinate(),ht=document.getElementById("GPlocationOrigin_1-"+this._uid);if(ht.value=dt[0].toFixed(4)+" / "+dt[1].toFixed(4),this._currentTransport=ut.transport,ut.transport==="Voiture"?document.getElementById("GPisochronTransportCar-"+this._uid).checked=!0:document.getElementById("GPisochronTransportPedestrian-"+this._uid).checked=!0,this._currentExclusions=ut.exclusions,this._currentComputation=ut.method,ut.method==="time"){var ft=te.split(".");this._currentTimeHour=ft[0]||0,document.getElementById("GPisochronValueChronInput1-"+this._uid).value=this._currentTimeHour,this._currentTimeMinute=ft[1]||0,document.getElementById("GPisochronValueChronInput2-"+this._uid).value=this._currentTimeMinute,document.getElementById("GPisochronChoiceAltChron-"+this._uid).click()}else this._currentDistance=te,document.getElementById("GPisochronValueDistInput-"+this._uid).value=this._currentDistance,document.getElementById("GPisochronChoiceAltDist-"+this._uid).click();this._currentDirection=ut.direction,ut.direction==="departure"?document.getElementById("GPisochronDirectionSelect-"+this._uid).selectedIndex=0:document.getElementById("GPisochronDirectionSelect-"+this._uid).selectedIndex=1,this.onIsoComputationSubmit()}}init(){var ee=this._originPoint.getCoordinate(),te=document.getElementById("GPlocationOrigin_1-"+this._uid);if(te.value=ee[1].toFixed(4)+" / "+ee[0].toFixed(4),this._currentTransport==="Voiture"?document.getElementById("GPisochronTransportCar-"+this._uid).checked=!0:document.getElementById("GPisochronTransportPedestrian-"+this._uid).checked=!0,this._currentComputation==="time"){var st=this._currentIsoResults.time/60;this._currentTimeHour=Math.floor(st/60),document.getElementById("GPisochronValueChronInput1-"+this._uid).value=this._currentTimeHour,this._currentTimeMinute=Math.round((st/60-this._currentTimeHour)*60),document.getElementById("GPisochronValueChronInput2-"+this._uid).value=this._currentTimeMinute,document.getElementById("GPisochronChoiceAltChron-"+this._uid).click()}else this._currentDistance=this._currentIsoResults.distance/1e3,document.getElementById("GPisochronValueDistInput-"+this._uid).value=this._currentDistance,document.getElementById("GPisochronChoiceAltDist-"+this._uid).click();this._currentDirection==="departure"?document.getElementById("GPisochronDirectionSelect-"+this._uid).selectedIndex=0:document.getElementById("GPisochronDirectionSelect-"+this._uid).selectedIndex=1,this._fillIsoResultsDetails(this._currentIsoResults,{graph:this._currentTransport,exclusions:this._currentExclusions,method:this._currentComputation})}clean(){this._clearIsoInputs(),this._originPoint.clearResults(),document.getElementById("GPlocationPoint_1-"+this._uid).style.cssText="",document.getElementById("GPlocationOriginCoords_1-"+this._uid).value="",document.getElementById("GPlocationOrigin_1-"+this._uid).value="",document.getElementById("GPlocationPoint_1-"+this._uid).style.cssText="",document.getElementById("GPlocationOriginPointer_1-"+this._uid).checked=!1,document.getElementById("GPlocationOrigin_1-"+this._uid).className="GPlocationOriginVisible gpf-visible",document.getElementById("GPlocationOriginCoords_1-"+this._uid).className="GPlocationOriginHidden gpf-hidden",this._currentIsoResults=null,this.setLayer(),this._resultsIsoContainer.className="GPelementHidden gpf-hidden",this._formContainer.className="gpf-panel__content fr-modal__content"}initialize(ee){this._checkInputOptions(ee),this.options={collapsed:!0,draggable:!1,export:!1,methods:["time","distance"],graphs:["Pieton","Voiture"],exclusions:{toll:!1,tunnel:!1,bridge:!1},directions:["departure","arrival"],markerOpts:{url:Marker.lightOrange,offset:M
311arker.defaultOffset},isocurveOptions:{},autocompleteOptions:{},layerDescription:{title:"Isochrone/Isodistance",description:"isochrone/isodistance basé sur un graphe"}},Helper.assign(this.options,ee),this.collapsed=this.options.collapsed,this.draggable=this.options.draggable,this._uid=this.options.id||SelectorID.generate(),this._currentTransport=null,this._initTransport(),this._currentComputation=null,this._initComputation(),this._currentExclusions=[],this._initExclusions(),this._currentDirection=null,this._initDirection(),this._originPoint=null,this._pictoIsoButton=null,this._panelCloseBtn=null,this._waitingContainer=null,this._formContainer=null,this._resultsIsoContainer=null,this._IsoPanelContainer=null,this._IsoPanelHeaderContainer=null,this._currentIsoResults=null,this._geojsonLayer=null,this._geojsonObject=null,this.export=null,this._waiting=!1,this._timer=null,this._defaultFeatureStyle=new Style$1({fill:new Fill({color:"rgba(0, 183, 152, 0.7)"}),stroke:new Stroke({color:"rgba(0, 183, 152, 0)",width:1})}),this._resources={},this.listenerKey=null,this.COMPUTE_ISOCURVE_EVENT="isocurve:compute",this.RESULTS_ISOCURVE_EVENT="isocurve:newresults",this.DRAW_START_ISOCURVE_EVENT="isocurve:drawstart",this.DRAW_END_ISOCURVE_EVENT="isocurve:drawend"}_checkInputOptions(ee){var te;if(ee.methods)if(Array.isArray(ee.methods))if(ee.methods.length===0)ee.methods=null;else for(te=0;te<ee.methods.length;te++)typeof ee.methods[te]!="string"&&logger$p.log("[ol.control.Isocurve] ERROR : parameter 'methods' elements should be of type 'string'");else logger$p.warn("'methods' parameter should be an array"),ee.methods=null;if(ee.graphs)if(Array.isArray(ee.graphs))if(ee.graphs.length===0)ee.graphs=null;else for(te=0;te<ee.graphs.length;te++)typeof ee.graphs[te]!="string"?logger$p.log("[ol.control.Isocurve] ERROR : parameter 'graphs' elements should be of type 'string'"):(ee.graphs[te].toLowerCase()==="pieton"&&(ee.graphs[te]="Pieton"),ee.graphs[te].toLowerCase()==="voiture"&&(ee.graphs[te]="Voiture"));else logger$p.warn("'graphs' parameter should be an array"),ee.graphs=null;if(ee.directions)if(Array.isArray(ee.directions))if(ee.directions.length===0)ee.directions=null;else for(te=0;te<ee.directions.length;te++)typeof ee.directions[te]!="string"&&logger$p.log("[ol.control.Isocurve] ERROR : parameter 'directions' elements should be of type 'string'");else logger$p.warn("'directions' parameter should be an array"),ee.directions=null;ee.collapsed==="true"&&(ee.collapsed=!0),ee.collapsed==="false"&&(ee.collapsed=!1)}_initTransport(){this._currentTransport="Piéton";var ee=this.options.graphs;(!ee||ee.length===0)&&(this.options.graphs=["Pieton","Voiture"]),Array.isArray(ee)&&ee.length&&(ee[0]==="Voiture"||ee[0]==="Pieton")&&(this._currentTransport=ee[0]);var te=this.options.isocurveOptions;te.graph&&(this._currentTransport=te.graph)}_initComputation(){this._currentComputation="time";var ee=this.options.methods;(!ee||ee.length===0)&&(this.options.methods=["time","distance"]),Array.isArray(ee)&&ee.length&&(ee[0]==="time"||ee[0]==="distance")&&(this._currentComputation=ee[0]);var te=this.options.isocurveOptions;te.method&&(this._currentComputation=te.method),te.time&&(this._currentComputation="time"),te.distance&&(this._currentComputation="distance")}_initDirection(){this._currentDirection="departure";var ee=this.options.directions;(!ee||ee.length===0)&&(this.options.directions=["departure","arrival"]),Array.isArray(ee)&&ee.length&&(ee[0]==="departure"||ee[0]==="arrival")&&(this._currentDirection=ee[0]);var te=this.options.isocurveOptions;te.reverse||(this._currentDirection="departure"),te.reverse===!0&&(this._currentDirection="arrival",this.options.directions=["arrival","departure"])}_initExclusions(){this._currentExclusions=[];var ee=this.options.exclusions;if((!ee||typeof ee=="object"&&Object.keys(ee).length===0)&&(this.options.exclusions={toll:!1,tunnel:!1,bridge:!1}),ee&&typeof ee=="object"&&Object.keys(ee).length)for(var te in ee)ee.hasOwnProperty(te)&&ee.k&&this._currentExclusions.push(te);var st=this.options.isocurveOptions;Array.isArray(st.exclusions)&&(this._currentExclusions=st.exclusions)}_initContainer(ee){var te=this._container;if(te.childElementCount>0)return te;var st=this._pictoIsoButton=this._createShowIsoPictoElement();te.appendChild(st);var ot=this._IsoPanelContainer=this._createIsoPanelElement(),ct=this._createIsoPanelDivElement(),ut=this._IsoPanelHeaderContainer=this._createPanelHeaderElement({icon:"ign-isocurve",title:"Calcul d’isochrone",btnClassF
311orClose:"GPshowIsochronPicto"});this._panelCloseBtn=ut._closeBtn,ot.appendChild(ut),ot.appendChild(ct);var dt=this._formContainer=this._createIsoPanelFormElement();dt.appendChild(this._createIsoPanelFormModeChoiceTransportElement(this.options.graphs)),dt.appendChild(this._createIsoPanelFormPointLabel());var ht=this._createIsoPanelFormPointElement(ee);dt.appendChild(ht);for(var ft=!1,pt=!1,mt=this._createIsoPanelFormTypeChoiceElement(),yt=0;yt<this.options.methods.length;yt++)this.options.methods[yt]==="time"&&(ft=yt===0,mt.appendChild(this._createIsoPanelFormTypeChoiceChronElement(ft))),this.options.methods[yt]==="distance"&&(pt=yt===0,mt.appendChild(this._createIsoPanelFormTypeChoiceDistElement(pt)));if(dt.appendChild(mt),dt.appendChild(this._createIsoPanelFormLabelIsochronElement(ft)),dt.appendChild(this._createIsoPanelFormValueIsochronElement(ft)),dt.appendChild(this._createIsoPanelFormLabelIsodistanceElement(pt)),dt.appendChild(this._createIsoPanelFormValueIsodistanceElement(pt)),dt.appendChild(this._createIsoPanelFormModeChoiceDirectionElement(this.options.directions)),this.options.exclusions&&typeof this.options.exclusions=="object"&&Object.keys(this.options.exclusions).length!==0){dt.appendChild(this._createShowIsoExclusionsPictoElement());var vt=this._createIsoPanelFormExclusionsElement();vt.appendChild(this._createIsoPanelFormExclusionOptionsElement(this.options.exclusions)),dt.appendChild(vt)}var _t=this._createIsoPanelFooterElement();if(dt.appendChild(_t),!checkDsfr()){var bt=this._createIsoFormResetElement();_t.appendChild(bt)}var xt=this._submitContainer=this._createIsoSubmitFormElement();_t.appendChild(xt),ct.appendChild(dt);var Mt=this._resultsIsoContainer=this._createIsoPanelResultsElement();ct.appendChild(Mt);var Ot=this._createDrawingButtonsPluginDiv();ct.appendChild(Ot);var kt=this._waitingContainer=this._createIsoWaitingElement();return ot.appendChild(kt),te.appendChild(ot),te.addEventListener&&te.addEventListener("click",Nt=>this._hideIsoSuggestedLocations(Nt)),te}_createIsoPanelFormPointElement(ee){this._originPoint=new LocationSelector({apiKey:this.options.apiKey||null,tag:{id:1,groupId:this._uid,markerOpts:this.options.markerOpts,display:!0},autocompleteOptions:this.options.autocompleteOptions||null}),this._originPoint.setMap(ee);var te=this;return document.getElementById("GPlocationOriginPointerImg_1-"+this._uid).onclick=function(){te._clearGeojsonLayer();var st=te.getMap();te._originPoint._inputShowPointerContainer.checked?(te._formContainer.className="GPisochronFormMini gpf-panel__content fr-modal__content",this.listenerKey=st.on("click",()=>{te._formContainer.className="gpf-panel__content fr-modal__content",te.dispatchEvent(te.DRAW_END_ISOCURVE_EVENT)})):(te._formContainer.className="gpf-panel__content fr-modal__content",unByKey(this.listenerKey)),te.dispatchEvent(te.DRAW_START_ISOCURVE_EVENT)},document.getElementById("GPlocationOriginLabel_1-"+this._uid).onclick=function(){te._clearGeojsonLayer(),te._formContainer.className="gpf-panel__content fr-modal__content",ee.un("click",()=>{te._formContainer.className="gpf-panel__content fr-modal__content"}),te.dispatchEvent(te.DRAW_END_ISOCURVE_EVENT)},document.getElementById("GPlocationOrigin_1-"+this._uid).onclick=function(){te._clearGeojsonLayer(),te.dispatchEvent(te.DRAW_END_ISOCURVE_EVENT)},this._originPoint._container}onIsoComputationSubmit(){if(!this._originPoint||!this._originPoint.getCoordinate||!this._originPoint.getCoordinate()){logger$p.log("[Isocurve] Missing position parameter to submit isocurve request");return}var ee=this._originPoint.getCoordinate(),te={x:ee[0].toFixed(5),y:ee[1].toFixed(5)};logger$p.log("origin : ",te);var st,ot;if(this._currentComputation.toLowerCase()==="time"){var ct=document.getElementById("GPisochronValueChronInput1-"+this._uid),ut=parseInt(ct.value,10);isNaN&&isNaN(ut)&&(ut=0);var dt=document.getElementById("GPisochronValueChronInput2-"+this._uid),ht=parseInt(dt.value,10);isNaN&&isNaN(ht)&&(ht=0),st=ut*3600+ht*60,logger$p.log("time : "+st)}if(this._currentComputation.toLowerCase()==="distance"){var ft=document.getElementById("GPisochronValueDistInput-"+this._uid);ot=parseFloat(ft.value)*1e3,logger$p.log("distance : "+ot)}if(!st&&!ot){logger$p.log("[Isocurve] Missing time or distance parameter to submit isocurve request");return}var pt=this.options.isocurveOptions||{},mt=pt.protocol||"XHR",yt=pt.timeOut||0;mt==="JSONP"&&yt===0&&(yt=15e3);
311var vt=pt.onFailure!==null&&typeof pt.onFailure=="function",_t=pt.onSuccess!==null&&typeof pt.onSuccess=="function",bt=this,xt={serverUrl:pt.serverUrl,position:te,graph:pt.graph||this._currentTransport,exclusions:pt.exclusions||this._currentExclusions,method:pt.method||this._currentComputation,smoothing:pt.smoothing||!0,timeOut:yt,protocol:mt,resource:pt.resource,onSuccess:function(Mt){logger$p.log(Mt),Mt&&(bt._fillIsoResultsDetails(Mt,xt),bt._drawIsoResults(Mt)),_t&&pt.onSuccess.call(bt,Mt)},onFailure:function(Mt){bt._hideWaitingContainer(),logger$p.log(Mt.message),vt&&pt.onFailure.call(bt,Mt)}};(this._currentDirection.toLowerCase()==="arrival"||pt.reverse)&&(xt.reverse=!0),st&&(xt.time=st),ot&&(xt.distance=ot),this._requestIsoCurve(xt)}onShowIsoPanelClick(ee){var te=this._pictoIsoButton.ariaPressed;te==="true"?this.onPanelOpen():this.onPanelClose();var st=this.getMap();Interactions.unset(st),this.collapsed=te!=="true",this.dispatchEvent("change:collapsed"),this.options.position&&!this.collapsed&&this.updatePosition(this.options.position)}onIsoTypeChoiceChange(ee){var te=ee.target.value;te&&(te==="isodistance"&&(this._currentComputation="distance"),te==="isochron"&&(this._currentComputation="time"))}onIsoModeTransportChange(ee){var te=ee.target.value;te&&(this._currentTransport=te)}onIsoModeDirectionChange(ee){var te=ee.target.value;te&&(te.toLowerCase()==="arrival"?document.getElementById("GPisochronPointLabelP-"+this._uid).innerHTML="Arrivée":document.getElementById("GPisochronPointLabelP-"+this._uid).innerHTML="Départ",this._currentDirection=te)}onIsoExclusionsChange(ee){var te=ee.target.value,st=ee.target.checked;if(te){for(var ot=!1,ct=null,ut=0;ut<this._currentExclusions.length;ut++)deepEqual(this._currentExclusions[ut],te.toLowerCase())&&(ct=ut,ot=!0);!ot&&!st&&this._currentExclusions.push(te.toLowerCase()),ot&&st&&(this._currentExclusions[ct]=null)}}onIsoResetClick(){this._clear()}onShowIsoResultsNewClick(){this._clearGeojsonLayer(),this.dispatchEvent(this.RESULTS_ISOCURVE_EVENT)}onShowIsoSettingsClick(){}_requestIsoCurve(ee){!ee||typeof ee=="object"&&Object.keys(ee).length===0||ee.position&&(typeof ee.ssl!="boolean"&&(typeof this.options.ssl=="boolean"?ee.ssl=this.options.ssl:ee.ssl=!0),logger$p.log(ee),this._clearGeojsonLayer(),this._displayWaitingContainer(),Gp.Services.isoCurve(ee))}_fillIsoResultsDetails(ee,te){this._fillIsoResultsDetailsContainer(ee,te),this._currentIsoInformations=ee,this._formContainer.className="GPelementHidden gpf-hidden gpf-panel__content fr-modal__content",this._hideWaitingContainer(),this._resultsIsoContainer.className="gpf-flex GPflex"}_fillIsoResultsDetailsContainer(ee,te){this._resultsIsoValuesContainer=this._addIsoResultsValuesElement(ee,te,MathUtils.convertSecondsToTime)}_drawIsoResults(ee){if(this._currentIsoResults=ee,this._hideWaitingContainer(),!!ee.geometry){var te=this.getMap();this._geojsonObject={type:"FeatureCollection",crs:{type:"name",properties:{name:"EPSG:4326"}},features:[{type:"Feature",crs:{type:"name",properties:{name:"EPSG:4326"}},geometry:ee.geometry}]},this._geojsonObject.features.push({type:"Feature",geometry:{type:"Point",coordinates:this._originPoint.getCoordinate()},properties:{description:"Point d'origine","marker-symbol":this.options.markerOpts.url}});var st=new GeoJSON({defaultDataProjection:"EPSG:4326",defaultStyle:this._defaultFeatureStyle}),ot=te.getView().getProjection().getCode(),ct=st.readFeatures(this._geojsonObject,{dataProjection:"EPSG:4326",featureProjection:ot}),ht=this._currentComputation==="time"?"Isochrone":"Isodistance";this._geojsonLayer=new VectorLayer({source:new VectorSource({features:ct}),style:this._defaultFeatureStyle,opacity:.9,title:"Mon "+ht});var ut;if(this._currentTransport==="Pieton"?(ut="piéton",this._geojsonLayer.gpResultLayerId="compute:Pieton$GEOPORTAIL:GPP:Isocurve"):(ut="voiture",this._geojsonLayer.gpResultLayerId="compute:Voiture$GEOPORTAIL:GPP:Isocurve"),te.addLayer(this._geojsonLayer),this.dispatchEvent({type:this.COMPUTE_ISOCURVE_EVENT}),ct[0]&&ct[0].getGeometry()&&ct[0].getGeometry().getExtent()){var dt=ct[0].getGeometry().getExtent();te.getView().fit(dt,te.getSize())}var ht=this._currentComputation==="time"?"Isochrone":"Isodistance";
311te.getControls().forEach(ft=>{if(ft instanceof LayerSwitcher){var pt=this._geojsonLayer.gpLayerId;ft._layers[pt].title===pt&&ft.addLayer(this._geojsonLayer,{title:this.options.layerDescription.title+" ("+ht+"/"+ut+")",description:this.options.layerDescription.description})}})}}_clear(){this._clearIsoInputs(),this._originPoint.clear(),this._clearGeojsonLayer(),this._currentIsoResults=null}_clearIsoInputs(){var ee=document.getElementById("GPisochronValueChronInput1-"+this._uid);ee&&(ee.value="0");var te=document.getElementById("GPisochronValueChronInput2-"+this._uid);te&&(te.value="0");var st=document.getElementById("GPisochronValueDistInput-"+this._uid);st&&(st.value="0"),this._initTransport(),this._initComputation(),this._initDirection(),this._initExclusions();var ot;this._currentTransport==="Pieton"?(ot=document.getElementById("GPisochronTransportPedestrian-"+this._uid),ot&&(ot.checked="true")):(ot=document.getElementById("GPisochronTransportCar-"+this._uid),ot&&(ot.checked="true"));var ct;this._currentComputation.toLowerCase()==="distance"?(ct=document.getElementById("GPisochronChoiceAltDist-"+this._uid),ct&&(ct.checked="true"),document.getElementById("GPisochronValueDist-"+this._uid)&&(document.getElementById("GPisochronValueDist-"+this._uid).className="GPflexInput gpf-flex"),document.getElementById("GPisochronValueChron-"+this._uid)&&(document.getElementById("GPisochronValueChron-"+this._uid).className="GPelementHidden gpf-hidden")):(ct=document.getElementById("GPisochronChoiceAltChron-"+this._uid),ct&&(ct.checked="true"),document.getElementById("GPisochronValueChron-"+this._uid)&&(document.getElementById("GPisochronValueChron-"+this._uid).className="GPflexInput gpf-flex"),document.getElementById("GPisochronValueDist-"+this._uid)&&(document.getElementById("GPisochronValueDist-"+this._uid).className="GPelementHidden gpf-hidden"));var ut=document.getElementById("GPisochronDirectionSelect-"+this._uid);ut&&(ut.value=this._currentDirection),ut.value.toLowerCase()==="arrival"?document.getElementById("GPisochronPointLabelP-"+this._uid).innerHTML="Arrivée":document.getElementById("GPisochronPointLabelP-"+this._uid).innerHTML="Départ";var dt=document.getElementById("GPisoExclusionsToll-"+this._uid);dt&&(this._currentExclusions.indexOf("toll")!==-1?dt.checked=!1:dt.checked=!0);var ht=document.getElementById("GPisoExclusionsTunnel-"+this._uid);ht&&(this._currentExclusions.indexOf("tunnel")!==-1?ht.checked=!1:ht.checked=!0);var ft=document.getElementById("GPisoExclusionsBridge-"+this._uid);ft&&(this._currentExclusions.indexOf("bridge")!==-1?ft.checked=!1:ft.checked=!0)}_clearGeojsonLayer(){var ee=this.getMap();this._geojsonLayer&&(ee.removeLayer(this._geojsonLayer),this._geojsonLayer=null),this._geojsonObject=null}_hideIsoSuggestedLocations(ee){ee.target&&ee.target.id&&ee.target.id.indexOf("GPlocationOrigin_")!==-1||this._originPoint._hideSuggestedLocation()}_displayWaitingContainer(){this._waitingContainer.className="GPwaitingContainer GPwaitingContainerVisible gpf-waiting gpf-waiting--visible",this._waiting=!0;var ee=this.options.isocurveOptions;if(ee&&ee.timeOut){this._timer&&(clearTimeout(this._timer),this._timer=null);var te=this;this._timer=setTimeout(function(){te._waiting===!0?te._hideWaitingContainer():te._timer&&clearTimeout(te._timer)},16e3)}}_hideWaitingContainer(){if(this._waiting){this._waitingContainer.className="GPwaitingContainer GPwaitingContainerHidden gpf-waiting gpf-waiting--hidden",this._waiting=!1;var ee=this.options.isocurveOptions;ee&&ee.timeOut&&(clearTimeout(this._timer),this._timer=null)}}}Object.assign(Isocurve.prototype,PanelDOM);Object.assign(Isocurve.prototype,IsoDOM);Object.assign(Isocurve.prototype,Widget);window.ol&&window.ol.control&&(window.ol.control.Isocurve=Isocurve);const deepEqual=function(ne,ee){if(ne===ee)return!0;if(typeof ne=="object"&&ne!=null&&typeof ee=="object"&&ee!=null){if(Object.keys(ne).length!==Object.keys(ee).length)return!1;for(var te in ne)if(ee.hasOwnProperty(te)){if(!deepEqual(ne[te],ee[te]))return!1}else return!1;return!0}else return!1};var ReverseGeocodeDOM={_addUID:function(ne){var ee=this._uid?ne+"-"+this._uid:ne;return ee},_createMainContainerElement:function(){var ne=document.createElement("div");return ne.id=this._addUID("GPreverseGeocoding"),ne.className="GPwidget gpf-widget gpf-widget-button gpf-mobile-fullscreen",ne},_createShowReverseGeocodingPictoElement:function(){var ne=this,ee=document.createElement("button"),te=document.createElement("span");return ee.appendChild(te),ee.id=this._addUID("GPshowReverseGeocodingPicto"),ee.classList.add("GPshowOpen","GPshowAdvancedToolPicto","GPshowReverseGeocodingPicto"),ee.classList.add("gpf-btn","gpf-btn--tertiary","gpf-btn-icon","gpf-btn-icon-reverse"),ee.classList.add("fr-btn","fr-btn--tertiary"),ee.setAttribute("aria-label","Trouver une adresse"),ee.setAttribute("tabindex","0"),ee.setAttribute("aria-pressed",!1),ee.setAttribute("type","button"),ee.addEventListener?ee.addEventListener("click",function(st){var ot=st.target.ariaPressed==="true";st.target.setAttribute("aria-pressed",!ot),ne.onShowReverseGeocodingClick(st)}):ee.attachEvent&&ee.attachEvent("onclick",function(st){var ot=st.target.ariaPressed==="true";st.target.setAttribute("aria-pressed",!ot),ne.onShowReverseGeocodingClick(st)}),ee},_createReverseGeocodingWaitingElement:function(){var ne=document.createElement("div");ne.id=this._addUID("GPreverseGeocodingCalcWaitingContainer"),ne.className="GPwaitingContainer GPwaitingContainerHidden gpf-waiting gpf-waiting--hidden";var ee=document.createElement("p");return ee.className="GPwaitingContainerInfo gpf-waiting_info",ee.innerHTML="Recherche en cours...",ne.appendChild(ee),ne},_createReverseGeocodingResultsPanelElement:function(){var ne=document.createElement("div");return ne.id=this._addUID("GPreverseGeocodingResultsPanel"),ne.className="GPpanel GPelementHidden gpf-panel gpf-panel-reverse gpf-panel--hidden",ne},_createReverseGeocodingResultsListElement:function(){var ne=document.createElement("div");return ne.id=this._addUID("GPreverseGeocodingResultsList"),ne.className="gpf-panel__list",ne.setAttribute("tabindex","0"),ne},_createReverseGeocodingResultElement:function(ne,ee){var te=this,st=document.getElementById(this._addUID("GPreverseGeocodingResultsList")),ot=document.createElement("div");if(ne){ot.id=this._addUID("GPreverseGeocodedLocationResultDiv_"+ee);var ct=document.createElement("div");ct.id=this._addUID("GPreverseGeocodedLocation_"+ee),ct.setAttribute("tabindex","0"),ct.className="GPautoCompleteProposal gpf-panel__items",ct.innerHTML=ne,ct.title=ne,ct.addEventListener?(ct.addEventListener("mouseover",function(ht){te.onReverseGeocodingResultMouseOver(ht)}),ct.addEventListener("focus",function(ht){te.onReverseGeocodingResultMouseOver(ht)}),ct.addEventListener("mouseout",function(ht){te.onReverseGeocodingResultMouseOut(ht)}),ct.addEventListener("blur",function(ht){te.onReverseGeocodingResultMouseOut(ht)}),ct.addEventListener("click",function(ht){typeof te.onReverseGeocodingResultClick=="function"&&te.onReverseGeocodingResultClick(ht)})):ct.attachEvent&&(ct.attachEvent("onmouseover",function(ht){te.onReverseGeocodingResultMouseOver(ht)}),ct.attachEvent("onmouseout",function(ht){te.onReverseGeocodingResultMouseOut(ht)}),ct.attachEvent("onclick",function(ht){typeof te.onReverseGeocodingResultClick=="function"&&te.onReverseGeocodingResultClick(ht)}));var ut=document.createElement("button");ut.type="button",ut.id=this._addUID("GPreverseGeocodedLocationResultCopy_"+ee),ut.setAttribute("data-text-geolocate",ct.innerHTML),ut.setAttribute("title","Copier le résultat"),ut.classList.add("gpf-btn-icon-copy-result","fr-btn","fr-btn--tertiary","gpf-btn","gpf-btn--tertiary","gpf-btn-icon"),ut.addEventListener?ut.addEventListener("click",function(ht){typeof te.onReverseGeocodingResultCopyButtonClick=="function"&&(te.onReverseGeocodingResultCopyButtonClick(ht),ut.classList.add("GPcopiedLocation"),setTimeout(()=>{ut.classList.remove("GPcopiedLocation")},1e3))}):ut.attachEvent&&ut.attachEvent("onclick",function(ht){typeof te.onReverseGeocodingResultCopyButtonClick=="function"&&te.onReverseGeocodingResultCopyButtonClick(ht)}),ot.appendChild(ct),ot.appendChild(ut)}else{ot.id=this._addUID("GPreverseGeocodedLocationNoResultDiv");var ct=document.createElement("div");ct.id=this._addUID("GPreverseGeocodedNoResult"),ct.setAttribute("tabindex","0"),ct.className="GPautoCompleteProposal gpf-panel__items",ct.innerHTML="Aucun résultat trouvé",ct.title="Aucun résultat trouvé",ot.appendChild(ct)}st.appendChild(ot)},_createReverseGeocodingPanelElement:function(){var ne=document.createElement("dialog");return ne.id=this._addUID("GPreverseGeocodingPanel"),ne.className="GPpanel gpf-panel fr-modal",ne},_createReverseGeocodingPanelDivElement:function(){var ne=document.createElement("div");
311return ne.className="gpf-panel__body fr-modal__body",ne},_createReverseGeocodingPanelFormElement:function(){var ne=this,ee=document.createElement("form");return ee.id=this._addUID("GPreverseGeocodingForm"),ee.className="GPform gpf-panel__content fr-modal__content",ee.addEventListener?ee.addEventListener("submit",function(te){te.preventDefault(),ne.onReverseGeocodingSubmit()}):ee.attachEvent&&ee.attachEvent("onsubmit",function(te){te.preventDefault(),ne.onReverseGeocodingSubmit()}),ee},_createReverseGeocodingFormModeChoiceGeocodingTypeElement:function(ne){var ee=this,te=document.createElement("div");te.className="GPflexInput gpf-flex gpf-flex-reverse fr-mb-1w";var st=document.createElement("label");st.id="label-recherche-par",st.className="GPlabel gpf-label fr-label",st.innerHTML="Recherche par",st.title="Recherche par",te.appendChild(st);var ot=document.createElement("select");ot.setAttribute("aria-labelledby","label-recherche-par"),ot.className="GPselect gpf-select fr-select",ot.addEventListener?ot.addEventListener("change",function(ft){ee.onReverseGeocodingTypeChange(ft)}):ot.attachEvent&&ot.attachEvent("onchange",function(ft){ee.onReverseGeocodingTypeChange(ft)}),(!ne||!Array.isArray(ne))&&(ne=["StreetAddress","PositionOfInterest","CadastralParcel"]);for(var ct=0;ct<ne.length;ct++)switch(ne[ct]){case"PositionOfInterest":var ut=document.createElement("option");ut.value="PositionOfInterest",ut.text="Lieux/toponymes",ot.appendChild(ut);break;case"StreetAddress":var dt=document.createElement("option");dt.value="StreetAddress",dt.text="Adresses",ot.appendChild(dt);break;case"CadastralParcel":var ht=document.createElement("option");ht.value="CadastralParcel",ht.text="Parcelles cadastrales",ot.appendChild(ht);break}return te.appendChild(ot),te},_createReverseGeocodingFormModeChoiceGeocodingDelimitationElement:function(ne){var ee=this,te=document.createElement("div");te.className="GPflexInput gpf-flex gpf-flex-reverse fr-mb-2w";var st=document.createElement("label");st.id="label-delimitation",st.className="GPlabel gpf-label fr-label",st.innerHTML="Délimitation",st.title="Délimitation",te.appendChild(st);var ot=document.createElement("select");ot.setAttribute("aria-labelledby","label-delimitation"),ot.className="GPselect gpf-select fr-select",ot.addEventListener?ot.addEventListener("change",function(ft){ee.onReverseGeocodingDelimitationChange(ft)}):ot.attachEvent&&ot.attachEvent("onchange",function(ft){ee.onReverseGeocodingDelimitationChange(ft)}),(!ne||!Array.isArray(ne))&&(ne=["Point","Circle","Extent"]);for(var ct=0;ct<ne.length;ct++)switch(ne[ct].toLowerCase()){case"point":var ut=document.createElement("option");ut.value="point",ut.text="Pointer un lieu",ot.appendChild(ut);break;case"circle":var dt=document.createElement("option");dt.value="circle",dt.text="Dessiner un cercle",ot.appendChild(dt);break;case"extent":var ht=document.createElement("option");ht.value="extent",ht.text="Dessiner une emprise",ot.appendChild(ht);break}return te.appendChild(ot),te},_createReverseGeocodingSubmitFormElement:function(){var ne=document.createElement("input");return ne.id=this._addUID("GPreverseGeocodingSubmit"),ne.className="GPsubmit gpf-btn fr-btn",ne.type="submit",ne.value="Rechercher",ne}},logger$o=LoggerByDefault.getLogger("reversegeocoding");class ReverseGeocode extends ControlExtended{constructor(ee){if(ee=ee||{},super(ee),!(this instanceof ReverseGeocode))throw new TypeError("ERROR CLASS_CONSTRUCTOR");return this.CLASSNAME="ReverseGeocode",this.initialize(ee),this.container=this._initContainer(),this.element?this.element.appendChild(this.container):this.element=this.container,this}getCollapsed(){return this.collapsed}setCollapsed(ee){if(ee===void 0){logger$o.log("[ERROR] ReverseGeocode:setCollapsed - missing collapsed parameter");return}ee&&this.collapsed||!ee&&!this.collapsed||(ee?this._panelCloseButton.click():this._showReverseGeocodingButton.click(),this.collapsed=ee)}setMap(ee){if(ee)this._activateMapInteraction(ee),this.draggable&&Draggable.dragElement(this._panelContainer,this._panelHeaderContainer,ee.getTargetElement()),this.collapsed||this._showReverseGeocodingButton.setAttribute("aria-pressed",!0);else{var te=this.getMap();this._clearResults(),this._clearInputFeatures(),this._removeMapInteraction(te),this._inputFeaturesLayer!=null&&(te.removeLayer(this._inputFeaturesLayer),this._inputFeaturesLayer=null,this._inputFeaturesSources=null,this._inputFeatures=null)}super.setMap(ee),this.options.position&&this.setPosition(this.options.position),this.options.gutter===!1&&this.getContainer().classList.add("gpf-button-no-gutter")}getData(){return this._reverseGeocodingLocations}getContainer(){return this.container}initialize(ee){this._checkInputOptions(ee),this.options={collapsed:!0,draggable:!1,resources:["StreetAddress","PositionOfInterest","CadastralParcel"],delimitations:["Point","Circle","Extent"],reverseGeocodeOptions:{}
311,layerDescription:{title:"Saisie (recherche inverse)",description:"Couche de saisie d'une zone de recherche pour la recherche inverse"}},Helper.assign(this.options,ee),this.collapsed=this.options.collapsed,this.draggable=this.options.draggable,this._uid=this.options.id||SelectorID.generate(),this._currentGeocodingType=null,this._initGeocodingType(),this._currentGeocodingDelimitation=null,this._initGeocodingDelimitation(),this._showReverseGeocodingButton=null,this._panelContainer=null,this._panelHeaderContainer=null,this._panelTitleContainer=null,this._returnPictoContainer=null,this._panelCloseButton=null,this._formContainer=null,this._resultsContainer=null,this._resultsListContainer=null,this._waitingContainer=null,this._inputFeatures=null,this._inputFeaturesSource=null,this._inputFeaturesLayer=null,this._mapInteraction=null,this._requestOptions=null,this._requestGeom=null,this._requestPosition=null,this._waiting=!1,this._timer=null,this._reverseGeocodingLocations=[],this._reverseGeocodingLocationsMarkers=[],this._resultsDefaultStyle=new Style$1({image:new Icon({src:Marker.lightOrange,anchor:[.5,1]})}),this._resultsSelectedStyle=new Style$1({image:new Icon({src:Marker.red,anchor:[.5,1]})}),this._resultsHoverInteraction=null,this._resultsSelectInteraction=null,this._popupContent=null,this._popupDiv=this._initPopupDiv(),this._popupOverlay=null}_checkInputOptions(ee){var te,st;if(ee.resources){var ot=ee.resources;if(Array.isArray(ot)){var ct=["StreetAddress","PositionOfInterest","CadastralParcel"],ut=[];for(te=0;te<ot.length;te++)ct.indexOf(ot[te])===-1&&(ut.push(te),logger$o.log("[ReverseGeocode] options.resources : "+ot[te]+" is not a resource for reverse geocode"));if(ut.length!==0)for(st=0;st<ut.length;st++)ot.splice(ut[st],1)}else logger$o.log("[ReverseGeocode] 'options.resources' parameter should be an array"),ot=null}if(ee.delimitations){var dt=ee.delimitations;if(Array.isArray(dt)){var ht=["Circle","Point","Extent"],ft=[];for(te=0;te<dt.length;te++)ht.indexOf(dt[te])===-1&&(ft.push(te),logger$o.log("[ReverseGeocode] options.delimitations : "+dt[te]+" is not a delimitation for reverse geocode"));if(ft.length!==0)for(st=0;st<ft.length;st++)dt.splice(ft[st],1)}else logger$o.log("[ReverseGeocode] 'options.delimitations' parameter should be an array"),dt=null}}_initGeocodingType(){this._currentGeocodingType="StreetAddress";var ee=this.options.resources;(!ee||ee.length===0)&&(this.options.resources=["StreetAddress","PositionOfInterest","CadastralParcel"]),Array.isArray(ee)&&ee.length&&(ee[0]==="StreetAddress"||ee[0]==="PositionOfInterest"||ee[0]==="CadastralParcel")&&(this._currentGeocodingType=ee[0]);var te=this.options.reverseGeocodeOptions;te.filterOptions&&Array.isArray(te.filterOptions.type)&&te.filterOptions.type.length!==0&&(this._currentGeocodingType=te.filterOptions.type[0])}_initGeocodingDelimitation(){this._currentGeocodingDelimitation="Point";var ee=this.options.delimitations;if((!ee||ee.length===0)&&(this.options.delimitations=["Point","Circle","Extent"]),Array.isArray(ee)&&ee.length){var te=ee[0].toLowerCase();(te==="point"||te==="circle"||te==="extent")&&(this._currentGeocodingDelimitation=ee[0])}}_initPopupDiv(){var ee=this,te=document.createElement("div");te.className="gp-feature-info-div";var st=document.createElement("button");return st.className="gp-styling-button closer",st.onclick=function(){return ee._popupOverlay!=null&&ee._popupOverlay.setPosition(void 0),!1},this._popupContent=document.createElement("div"),this._popupContent.className="gp-features-content-div",te.appendChild(this._popupContent),te.appendChild(st),te}_initContainer(){var ee=this._createMainContainerElement(),te=this._showReverseGeocodingButton=this._createShowReverseGeocodingPictoElement();ee.appendChild(te);var st=this._panelContainer=this._createReverseGeocodingPanelElement(),ot=this._panelHeaderContainer=this._createPanelHeaderElement({icon:"ign-reversegeocode",title:"Trouver une adresse",btnClassForClose:"GPshowReverseGeocodingPicto",backBtn:!0});st.appendChild(ot),this._returnPictoContainer=ot._backBtn,this._panelTitleContainer=ot._title,this._panelCloseButton=ot._closeBtn,this._returnPictoContainer.addEventListener("click",mt=>{document.getElementById(this._addUID("GPreverseGeocodingResultsPanel")).className="GPelementHidden gpf-panel--hidden",document.getElementById(this._addUID("GPreverseGeocodingForm")).className="GPform gpf-panel__content fr-modal__content",this._panelTitleContainer.innerText="Trouver une adresse",this._returnPictoContainer.classList.add("gpf-hidden","GPelementHidden"),this.onGPreverseGeocodingReturnPictoCl
311ick(mt)});var ct=this._createReverseGeocodingPanelDivElement();st.appendChild(ct);var ut=this._formContainer=this._createReverseGeocodingPanelFormElement();ut.appendChild(this._createReverseGeocodingFormModeChoiceGeocodingTypeElement(this.options.resources)),ut.appendChild(this._createReverseGeocodingFormModeChoiceGeocodingDelimitationElement(this.options.delimitations));var dt=this._createReverseGeocodingSubmitFormElement();ut.appendChild(dt),ct.appendChild(ut);var ht=this._waitingContainer=this._createReverseGeocodingWaitingElement();ct.appendChild(ht);var ft=this._resultsContainer=this._createReverseGeocodingResultsPanelElement(),pt=this._resultsListContainer=this._createReverseGeocodingResultsListElement();return ft.appendChild(pt),ct.appendChild(ft),ee.appendChild(st),logger$o.log(ee),ee}_activateMapInteraction(ee){if(!this.collapsed){this._inputFeaturesLayer==null&&(this._inputFeatures=new Collection,this._inputFeaturesSource=new VectorSource({features:this._inputFeatures}),this._inputFeaturesLayer=new VectorLayer({source:this._inputFeaturesSource,style:new Style$1({fill:new Fill({color:"rgba(0, 183, 152, 0.3)"}),stroke:new Stroke({color:"rgba(0, 183, 152, 0.8)",width:3}),image:new Icon({src:Marker.turquoiseBlue,anchor:[.5,1]})})}),this._inputFeaturesLayer.gpResultLayerId="reverseGeocoding",ee.addLayer(this._inputFeaturesLayer));var te=this._currentGeocodingDelimitation.toLowerCase();switch(te){case"point":this._activatePointInteraction(ee);break;case"circle":this._activateCircleInteraction(ee);break;case"extent":this._activateBoxInteraction(ee);break}ee.getControls().forEach(st=>{if(st instanceof LayerSwitcher){var ot=this._inputFeaturesLayer.gpLayerId;st._layers[ot].title===ot&&(st.addLayer(this._inputFeaturesLayer,{title:this.options.layerDescription.title,description:this.options.layerDescription.description}),st.setRemovable(this._inputFeaturesLayer,!1))}})}}_activatePointInteraction(ee){this._mapInteraction=new Draw({style:new Style$1({image:new CircleStyle({radius:0,fill:new Fill({color:"rgba(0, 183, 152, 0.8)"})})}),type:"Point",source:this._inputFeaturesSource}),this._mapInteraction.on("drawstart",te=>{logger$o.log("on drawstart ",te),this._inputFeatures.clear(),this._onDrawStart(te,"point")}),this._mapInteraction.on("drawend",te=>{logger$o.log("on drawend",te),te.feature&&te.feature.getGeometry&&(this._requestGeom={type:"Point",coordinates:[this._requestPosition.lon,this._requestPosition.lat]})}),ee.addInteraction(this._mapInteraction),this._setCursor("crosshair",ee)}_activateCircleInteraction(ee){this._mapInteraction=new Draw({style:new Style$1({fill:new Fill({color:"rgba(0, 183, 152, 0.3)"}),stroke:new Stroke({color:"rgba(0, 183, 152, 0.8)",width:3}),image:new CircleStyle({radius:4,fill:new Fill({color:"rgba(0, 183, 152, 0.8)"})})}),type:"Circle",source:this._inputFeaturesSource,geometryFunction:function(te,st){const ot=te[0],ct=te[te.length-1],ut=ot[0]-ct[0],dt=ot[1]-ct[1],ft=Math.min(Math.sqrt(ut*ut+dt*dt),500);return st?st.setCenterAndRadius(ot,ft):st=new Circle(ot,ft),st}}),this._mapInteraction.on("drawstart",te=>{logger$o.log("on drawstart ",te),this._inputFeatures.clear(),this._onDrawStart(te,"circle")}),this._mapInteraction.on("drawend",te=>{if(logger$o.log("on drawend",te),te.feature&&te.feature.getGeometry){var st=te.feature.getGeometry().getRadius();this._requestGeom={},this._requestGeom.type="Circle",this._requestGeom.radius=st,this._requestPosition&&(this._requestGeom.coordinates=[this._requestPosition.lon,this._requestPosition.lat]),logger$o.log("circle radius : ",st)}}),ee.addInteraction(this._mapInteraction)}_activateBoxInteraction(ee){var te=function(st,ot){ot||(ot=new Polygon([]));var ct=st[0],ut=st[1];const dt=ct[0]-ut[0],ht=ct[1]-ut[1],ft=1e3,pt=Math.max(-ft,Math.min(dt,ft)),mt=Math.max(-ft,Math.min(ht,ft));return ot.setCoordinates([[ct,[ct[0],ct[1]-mt],[ct[0]-pt,ct[1]-mt],[ct[0]-pt,ct[1]],ct]]),ot};this._mapInteraction=new Draw({style:new Style$1({fill:new Fill({color:"rgba(0, 183, 152, 0.3)"}),stroke:new Stroke({color:"rgba(0, 183, 152, 0.8)",width:3}),image:new CircleStyle({radius:4,fill:new Fill({color:"rgba(0, 183, 152, 0.8)"})})}),type:"LineString",source:this._inputFeaturesSource,maxPoints:2,geometryFunction:te}),this._mapInteraction.on("drawstart",st=>{logger$o.log("on drawstart",st),this._inputFeatures.clear(),this._onDrawStart(st,"polygon")}),this._mapInteraction.on("drawend",st=>{logger$o.log("on drawend",st),this._onBoxDrawEnd(st)}),ee.addInteraction(this._mapInteraction)}_removeMapInteraction(ee){this._mapInteraction!=null&&(ee.removeInteraction(this._mapInteraction),this._mapInteraction=null),this._setCursor()}_onDrawStart(ee,te){var st;if(ee.feature&&ee.feature.getGeometry){var ot=ee.feature.getGeometry();te==="point"&&(st=ot.getCoordinates()),te==="circle"&&(st=ot.getCenter()),te==="polygon"&&(st=ot.getFirstCoordinate())}if(st){var ct;if(this.options.reverseGeocodeOptions&&this.options.reverseGeocodeOptions.srs)ct=this.options.reverseGeocodeOptions.srs;else{var ut=this.getMap();if(!ut||!ut.getView())return;ct=ut.getView().getProjection()}var dt=transform$1(st,ct,"EPSG:4326");this._requestPosition={lon:dt[0],lat:dt[1]},logger$o.log("position coordinates : ",this._requestPosition)}}_onBoxDrawEnd(ee){if(ee.feature&&ee.feature.getGeometry){var te=ee.feature.getGeometry().getCoordinates()[0],st=te[0],ot=te[2],ct;if(this.options.reverseGeocodeOptions&&this.options.reverseGeocodeOptions.srs)ct=this.options.reverseGeocodeOptions.srs;else{var ut=this.getMap();if(!ut||!ut.getView())return;ct=ut.getView().getProjection()}var dt=transform$1(st,ct,"EPSG:4326"),ht=transform$1(ot,ct,"EPSG:4326"),ft={};dt[0]<ht[0]?(ft.left=dt[0],ft.right=ht[0]):(ft.left=ht[0],ft.right=dt[0]),dt[1]<ht[1]?(ft.bottom=dt[1],ft.top=ht[1]):(ft.bottom=ht[1],ft.top=dt[1]),this._requestGeom={type:"Polygon",coordinates:[[[ft.left,ft.top],[ft.left,ft.bottom],[ft.right,ft.bottom],[ft.right,ft.top],[ft.left,ft.top]]]},logger$o.log("searchGeometry filter : ",this._requestGeom)}}_setCursor(ee,te){if(te=te||this.getMap(),!!te){var st=te.getTargetElement();ee?st.style.cursor=ee:st.style.cursor=null}}_reverseGeocodingRequest(){var ee=this.getMap();this._requestOptions=this._getReverseGeocodingRequestOptions(),this._removeMapInteraction(ee),this._displayWaitingContainer(),Gp.Services.reverseGeocode(this._requestOptions)}_getReverseGeocodingRequestOptions(){var ee=this.getMap(),te=this.options.reverseGeocodeOptions,st=this;typeof this.options.ssl!="boolean"&&(this.options.ssl=!0);
311var ot=te.onFailure!==null&&typeof te.onFailure=="function",ct=te.onSuccess!==null&&typeof te.onSuccess=="function",ut={serverUrl:te.serverUrl,apiKey:te.apiKey||this.options.apiKey,ssl:this.options.ssl,position:this._requestPosition,filterOptions:{type:[this._currentGeocodingType]},srs:"CRS:84",returnFreeForm:!1,maximumResponses:te.maximumResponses||18,timeOut:te.timeOut||3e4,onSuccess:function(dt){dt.locations&&(logger$o.log("reverseGeocode results : ",dt.locations),st._displayGeocodedLocations(dt.locations)),ct&&te.onSuccess.call(st,dt.locations)},onFailure:function(dt){st._hideWaitingContainer(),st._clearResults(),st._clearInputFeatures(),st._activateMapInteraction(ee),logger$o.log(dt.message),ot&&te.onFailure.call(st,dt)}};return this._requestGeom.type.toLowerCase()==="circle"?(this._requestGeom.radius>500&&(logger$o.log("INFO : initial circle radius ("+this._requestGeom.radius+") limited to 1000m."),this._requestGeom.radius=500),ut.searchGeometry=this._requestGeom):this._requestGeom.type.toLowerCase()==="polygon"?ut.searchGeometry=this._requestGeom:this._requestGeom.type.toLowerCase()==="point"&&(this._currentGeocodingType==="StreetAddress"?(ut.searchGeometry={type:"Circle",radius:50,coordinates:this._requestGeom.coordinates},ut.maximumResponses=1):ut.searchGeometry=this._requestGeom),logger$o.log("reverseGeocode request options : ",ut),ut}_displayGeocodedLocations(ee){this._clearResults(),this._reverseGeocodingLocations=ee,this.dispatchEvent({type:"reversegeocode:compute"}),this._formContainer.className="GPelementHidden gpf-hidden",this._hideWaitingContainer(),this._panelTitleContainer.innerHTML="Résultats de la recherche",this._returnPictoContainer.classList.remove("GPelementHidden"),this._returnPictoContainer.classList.remove("gpf-hidden"),this._resultsContainer.className="GPform gpf-panel__content fr-modal__content",this._fillGeocodedLocationListContainer(ee),this._displayGeocodedLocationsOnMap(ee)}_fillGeocodedLocationListContainer(ee){ee.length===0&&this._createReverseGeocodingResultElement();for(var te=0;te<ee.length;te++){var st=ee[te];logger$o.log(st);var ot=this._fillGeocodedLocationDescription(st);ot&&ot.length!==0&&this._createReverseGeocodingResultElement(ot,te)}}_fillGeocodedLocationDescription(ee){if(!(!ee||!ee.placeAttributes)){var te=ee.placeAttributes,st="";switch(ee.type){case"StreetAddress":te.street&&(st+=te.housenumber?te.housenumber+" ":"",st+=te.street+", "),st+=te.postcode+" "+te.city;break;case"PositionOfInterest":st+=te.toponym,te.postcode&&te.postcode.length===1&&(st+=", "+te.postcode[0]),st+=" ("+te.category.join(",")+")";break;case"CadastralParcel":st+=te.id,st+=te.city?" ("+te.city+")":"";break;default:st+=te.city?te.city:"";break}return st}}_displayGeocodedLocationsOnMap(ee){if(this._reverseGeocodingLocations.length!==0){var te=this.getMap();this._createResultsLayer();for(var st=0;st<ee.length;st++)this._addResultFeature(ee[st],st);if(this._resultsFeatures.getLength()>1){if(this._resultsFeaturesSource&&this._resultsFeaturesSource.getExtent){var ot=this._resultsFeaturesSource.getExtent();te.getView().fit(ot,te.getSize())}}else{var ct=this._resultsFeatures.item(0),ut=ct.getGeometry().getCoordinates();te.getView().setCenter(ut),te.getView().setZoom(17)}this._resultsHoverInteraction=new Select({condition:pointerMove,layers:[this._resultsFeaturesLayer]}),this._resultsHoverInteraction.on("select",ht=>this._onResultsFeatureMouseOver(ht)),te.addInteraction(this._resultsHoverInteraction),this._resultsSelectInteraction=new Select({layers:[this._resultsFeaturesLayer]}),this._resultsSelectInteraction.on("select",ht=>this._onResultsFeatureSelect(ht)),te.addInteraction(this._resultsSelectInteraction);var dt="";switch(this._currentGeocodingType){case"StreetAddress":dt="adresses";break;case"PositionOfInterest":dt="toponymes";break;case"CadastralParcel":dt="parcelles cadastrales";break}te.getControls().forEach(ht=>{if(ht instanceof LayerSwitcher){var ft=this._resultsFeaturesLayer.gpLayerId;ht._layers[ft].title===ft&&(ht.addLayer(this._resultsFeaturesLayer,{title:"Résultats de la recherche inverse",description:"Résultats de la recherche inverse sur les "+dt}),ht.setRemovable(this._resultsFeaturesLayer,!1))}})}}_createResultsLayer(){var ee=this.getMap();this._resultsFeatures=new Collection,this._resultsFeaturesSource=new VectorSource({features:this._resultsFeatures}),this._resultsFeaturesLayer=new VectorLayer({source:this._resultsFeaturesSource}),this._resultsFeaturesLayer.gpResultLayerId="reverseGeocodingResults",ee.addLayer(this._resultsFeaturesLayer)}_addResultFeature(ee,te){var st=this.getMap(),ot=[ee.position.lon,ee.position.lat];if(ot.length!==0){var ct=st.getView(),ut=ct.getProjection().getCode();ut!=="EPSG:4326"&&(ot=transform$1(ot,"EPSG:4326",ut));var dt=new Feature({geometry:new Point$1(ot)});dt.setStyle(this._resultsDefaultStyle),dt.setId(te),dt.setProperties({location:ee,popupContent:this._fillPopupContent(ee)}),this._resultsFeatures.push(dt)}}_fillPopupContent(ee){var te="<ul>",st=ee.placeAttributes;for(var ot in st)st.hasOwnProperty(ot)&&ot!=="trueGeometry"&&ot!=="extraFields"&&ot!=="houseNumberInfos"&&ot!=="_count"&&(te+="<li>",te+='<span class="gp-attname-others-span">'+ot.toUpperCase()+" : </span>",te+=st[ot],te+=" </li>");return te+=" </ul>",te}_onResultsFeatureMouseOver(ee){var te;if(ee.selected.length!==0){if(te=ee.selected[0],te.setStyle(this._resultsSelectedStyle),te.getId()!=null){var st=document.getElementById("GPreverseGeocodedLocation_"+te.getId()+"-"+this._uid);st&&st.classList&&st.classList.add("GPlocationHighlight")}document.getElementById("GPreverseGeocodedLocation_"+te.getId()+"-"+this._uid)}
311if(ee.deselected.length!==0){te=ee.deselected[0],te.setStyle(this._resultsDefaultStyle);var ot=document.getElementById("GPreverseGeocodedLocation_"+te.getId()+"-"+this._uid);ot&&ot.classList&&ot.classList.remove("GPlocationHighlight")}}_onResultsFeatureSelect(ee){var te=this.getMap();if(ee.selected.length!==0){var st=ee.selected[0];this._popupContent.innerHTML=st.getProperties().popupContent,this._popupOverlay?this._popupOverlay.setPosition(ee.mapBrowserEvent.coordinate):(this._popupOverlay=new Overlay({element:this._popupDiv,positioning:"bottom-center",position:ee.mapBrowserEvent.coordinate}),te.addOverlay(this._popupOverlay)),this.dispatchEvent({type:"reversegeocode:onclickresult",location:st.getProperties().location})}else this._popupOverlay!=null&&this._popupOverlay.setPosition(void 0)}onShowReverseGeocodingClick(ee){ee.target.ariaPressed==="true"&&this.onPanelOpen();var te=this.getMap();if(te){Interactions.unset(te);var st=this._showReverseGeocodingButton.ariaPressed;this.collapsed=st!=="true",this.dispatchEvent("change:collapsed"),this.options.position&&!this.collapsed&&this.updatePosition(this.options.position),!this._waiting&&!this._reverseGeocodingLocations.length&&(this.collapsed?(this._clearResults(),this._clearInputFeatures(),this._removeMapInteraction(te),this._inputFeaturesLayer!=null&&(te.removeLayer(this._inputFeaturesLayer),this._inputFeaturesLayer=null,this._inputFeaturesSources=null,this._inputFeatures=null)):this._activateMapInteraction(te))}}onReverseGeocodingTypeChange(ee){var te=ee.target.selectedIndex,st=ee.target.options[te].value;st&&(logger$o.log(st),this._currentGeocodingType=st)}onReverseGeocodingDelimitationChange(ee){var te=ee.target.selectedIndex,st=ee.target.options[te].value;if(st){logger$o.log(st),this._currentGeocodingDelimitation=st;var ot=this.getMap();this._clearInputFeatures(),this._removeMapInteraction(ot),this._activateMapInteraction(ot)}}onGPreverseGeocodingReturnPictoClick(){this._clearResults(),this._clearInputFeatures(),this._activateMapInteraction(this.getMap())}onReverseGeocodingSubmit(){if(!this._requestPosition){logger$o.log("missing position");return}this._reverseGeocodingRequest()}onReverseGeocodingResultClick(ee){var te=ee.target.id,st=te.substring(te.indexOf("_")+1),ot=this._resultsFeaturesSource.getFeatureById(parseInt(st,10));this.dispatchEvent({type:"reversegeocode:onclickresult",location:ot.getProperties().location})}onReverseGeocodingResultMouseOver(ee){var te=ee.target.id,st=te.substring(te.indexOf("_")+1);if(ee.target.classList&&ee.target.classList.add("GPlocationHighlight"),!!this._resultsFeaturesSource){var ot=this._resultsFeaturesSource.getFeatureById(parseInt(st,10));ot.setStyle(this._resultsSelectedStyle)}}onReverseGeocodingResultMouseOut(ee){var te=ee.target.id,st=te.substring(te.indexOf("_")+1);if(ee.target.classList&&ee.target.classList.remove("GPlocationHighlight"),!!this._resultsFeaturesSource){var ot=this._resultsFeaturesSource.getFeatureById(parseInt(st,10));ot.setStyle(this._resultsDefaultStyle)}}onReverseGeocodingResultCopyButtonClick(ee){navigator.clipboard.writeText(ee.target.getAttribute("data-text-geolocate")).then(()=>console.log("Texte copié !")).catch(te=>console.error("Erreur de copie :",te))}_clearResults(){var ee=this.getMap();if(this._reverseGeocodingLocations=[],this._resultsListContainer)for(;this._resultsListContainer.firstChild;)this._resultsListContainer.removeChild(this._resultsListContainer.firstChild);this._resultsFeaturesLayer&&(ee.removeLayer(this._resultsFeaturesLayer),this._resultsFeaturesLayer=null),this._popupOverlay!=null&&(ee.removeOverlay(this._popupOverlay),this._popupOverlay=null),this._resultsSelectInteraction!=null&&(ee.removeInteraction(this._resultsSelectInteraction),this._resultsSelectInteraction=null),this._resultsHoverInteraction!=null&&(ee.removeInteraction(this._resultsHoverInteraction),this._resultsHoverInteraction=null)}_clearInputFeatures(){this._inputFeatures&&this._inputFeatures.clear(),this._requestGeom=null,this._requestPosition=null}_displayWaitingContainer(){this._waitingContainer.className="GPwaitingContainer GPwaitingContainerVisible gpf-waiting gpf-waiting--visible",this._waiting=!0,this._timer&&(clearTimeout(this._timer),this._timer=null);var ee=this;this._timer=setTimeout(function(){ee._waiting===!0?ee._hideWaitingContainer():ee._timer&&clearTimeout(ee._timer)},16e3)}_hideWaitingContainer(){this._waiting&&(this._waitingContainer.className="GPwaitingContainer GPwaitingContainerHidden gpf-waiting gpf-waiting--hidden",this._waiting=!1,clearTimeout(this._timer),this._timer=null)}}Object.assign(ReverseGeocode.prototype,PanelDOM);Object.assign(ReverseGeocode.prototype,ReverseGeocodeDOM);Object.assign(ReverseGeocode.prototype,Widget);window.ol&&window.ol.control&&(window.ol.control.ReverseGeocode=ReverseGeocode);class XML{read(ee){if(!ee)return null;if(typeof ee=="string"){const te=parse$1(ee);return this.readFromDocument(te)}
311return isDocument(ee)?this.readFromDocument(ee):this.readFromNode(ee)}readFromDocument(ee){for(let te=ee.firstChild;te;te=te.nextSibling)if(te.nodeType==Node.ELEMENT_NODE)return this.readFromNode(te);return null}readFromNode(ee){abstract()}}const NAMESPACE_URI="http://www.w3.org/1999/xlink";function readHref(ne){return ne.getAttributeNS(NAMESPACE_URI,"href")}const NAMESPACE_URIS$2=[null,"http://www.opengis.net/wms","http://www.opengis.net/sld"];function isV13(ne){return compareVersions(ne[0].version,"1.3")>=0}const PARSERS$2=makeStructureNS(NAMESPACE_URIS$2,{Service:makeObjectPropertySetter(readService),Capability:makeObjectPropertySetter(readCapability)}),CAPABILITY_PARSERS=makeStructureNS(NAMESPACE_URIS$2,{Request:makeObjectPropertySetter(readRequest),Exception:makeObjectPropertySetter(readException),Layer:makeObjectPropertySetter(readCapabilityLayer),UserDefinedSymbolization:makeObjectPropertySetter(readUserDefinedSymbolization)});class WMSCapabilities extends XML{constructor(){super(),this.version=void 0}readFromNode(ee){this.version=ee.getAttribute("version").trim();const te=pushParseAndPop({version:this.version},PARSERS$2,ee,[]);return te||null}}const COMMON_SERVICE_PARSERS={Name:makeObjectPropertySetter(readString),Title:makeObjectPropertySetter(readString),Abstract:makeObjectPropertySetter(readString),KeywordList:makeObjectPropertySetter(readKeywordList),OnlineResource:makeObjectPropertySetter(readHref),ContactInformation:makeObjectPropertySetter(readContactInformation),Fees:makeObjectPropertySetter(readString),AccessConstraints:makeObjectPropertySetter(readString)},SERVICE_PARSERS=makeStructureNS(NAMESPACE_URIS$2,COMMON_SERVICE_PARSERS),SERVICE_PARSERS_V13=makeStructureNS(NAMESPACE_URIS$2,{...COMMON_SERVICE_PARSERS,LayerLimit:makeObjectPropertySetter(readPositiveInteger),MaxWidth:makeObjectPropertySetter(readPositiveInteger),MaxHeight:makeObjectPropertySetter(readPositiveInteger)}),CONTACT_INFORMATION_PARSERS=makeStructureNS(NAMESPACE_URIS$2,{ContactPersonPrimary:makeObjectPropertySetter(readContactPersonPrimary),ContactPosition:makeObjectPropertySetter(readString),ContactAddress:makeObjectPropertySetter(readContactAddress),ContactVoiceTelephone:makeObjectPropertySetter(readString),ContactFacsimileTelephone:makeObjectPropertySetter(readString),ContactElectronicMailAddress:makeObjectPropertySetter(readString)}),CONTACT_PERSON_PARSERS=makeStructureNS(NAMESPACE_URIS$2,{ContactPerson:makeObjectPropertySetter(readString),ContactOrganization:makeObjectPropertySetter(readString)}),CONTACT_ADDRESS_PARSERS=makeStructureNS(NAMESPACE_URIS$2,{AddressType:makeObjectPropertySetter(readString),Address:makeObjectPropertySetter(readString),City:makeObjectPropertySetter(readString),StateOrProvince:makeObjectPropertySetter(readString),PostCode:makeObjectPropertySetter(readString),Country:makeObjectPropertySetter(readString)}),EXCEPTION_PARSERS=makeStructureNS(NAMESPACE_URIS$2,{Format:makeArrayPusher(readString)}),COMMON_LAYER_PARSERS={Name:makeObjectPropertySetter(readString),Title:makeObjectPropertySetter(readString),Abstract:makeObjectPropertySetter(readString),KeywordList:makeObjectPropertySetter(readKeywordList),BoundingBox:makeObjectPropertyPusher(readBoundingBox$1),Dimension:makeObjectPropertyPusher(readDimension),Attribution:makeObjectPropertySetter(readAttribution),AuthorityURL:makeObjectPropertyPusher(readAuthorityURL),Identifier:makeObjectPropertyPusher(readString),MetadataURL:makeObjectPropertyPusher(readMetadataURL),DataURL:makeObjectPropertyPusher(readFormatOnlineresource),FeatureListURL:makeObjectPropertyPusher(readFormatOnlineresource),Style:makeObjectPropertyPusher(readStyle$1),Layer:makeObjectPropertyPusher(readLayer$1)},LAYER_PARSERS$1=makeStructureNS(NAMESPACE_URIS$2,{...COMMON_LAYER_PARSERS,SRS:makeObjectPropertyPusher(readString),Extent:makeObjectPropertySetter(readExtent),ScaleHint:makeObjectPropertyPusher(readScaleHint),LatLonBoundingBox:makeObjectPropertySetter((ne,ee)=>readBoundingBox$1(ne,ee,!1)),Layer:makeObjectPropertyPusher(readLayer$1)}),LAYER_PARSERS_V13=makeStructureNS(NAMESPACE_URIS$2,{...COMMON_LAYER_PARSERS,CRS:makeObjectPropertyPusher(readString),EX_GeographicBoundingBox:makeObjectPropertySetter(readEXGeographicBoundingBox),MinScaleDenominator:makeObjectPropertySetter(readDecimal),MaxScaleDenominator:makeObjectPropertySetter(readDecimal),Layer:makeObjectPropertyPusher(readLayer$1)}),ATTRIBUTION_PARSERS=makeStructureNS(NAMESPACE_URIS$2,{Title:makeObjectPropertySetter(readString),OnlineResource:makeObjectPropertySetter(readHref),LogoURL:makeObjectPropertySetter(readSizedFormatOnlineresource)}),EX_GEOGRAPHIC_BOUNDING_BOX_PARSERS=makeStructureNS(NAMESPACE_URIS$2,{westBoundLongitude:makeObjectPropertySetter(readDecimal),eastBoundLongitude:makeObjectPropertySetter(readDecimal),southBoundLatitude:makeObjectPropertySetter(readDecimal),northBoundLatitude:makeObjectPropertySetter(readDecimal)}),REQUEST_PARSERS=makeStructureNS(NAMESPACE_URIS$2,{GetCapabilities:makeObjectPropertySetter(readOperationType),GetMap:makeObjectPropertySetter(readOperationType),GetFeatureInfo:makeObjectPropertySetter(readOperationType),DescribeLayer:makeObjectPropertySetter(readOperationType),GetLegendGraphic:makeObjectPropertySetter(readOperationType)}),OPERATIONTYPE_PARSERS=makeStructureNS(NAMESPACE_URIS$2,{Format:makeObjectPropertyPusher(readString),DCPType:makeObjectPropertyPusher(readDCPType)}),DCPTYPE_PARSERS=makeStructureNS(NAMESPACE_URIS$2,{HTTP:makeObjectPropertySetter(readHTTP)}),HTTP_PARSERS$1=makeStructureNS(NAMESPACE_URIS$2,{Get:makeObjectPropertySetter(readFormatOnlineresource),Post:makeObjectPropertySetter(readFormatOnlineresource)}),STYLE_PARSERS$1=makeStructureNS(NAMESPACE_URIS$2,{Name:makeObjectPropertySetter(readString),Title:makeObjectPropertySetter(readString),Abstract:makeObjectPropertySetter(readString),LegendURL:makeObjectPropertyPusher(readSizedFormatOnlineresource),StyleSheetURL:makeObjectPropertySetter(readFormatOnlineresource),StyleURL:makeObjectPropertySetter(readFormatOnlineresource)}),FORMAT_ONLINERESOURCE_PARSERS=makeStructureNS(NAMESPACE_URIS$2,{Format:makeObjectPropertySetter(readString),OnlineResource:makeObjectPropertySetter(readHref)}),KEYWORDLIST_PARSERS=makeStructureNS(NAMESPACE_URIS$2,{Keyword:makeArrayPusher(readString)});function readAttribution(ne,ee){return pushParseAndPop({},ATTRIBUTION_PARSERS,ne,ee)}function readUserDefinedSymbolization(ne,ee){return{SupportSLD:!!readBooleanString(ne.getAttribute("SupportSLD")),UserLayer:!!readBooleanString(ne.getAttribute("UserLayer")),UserStyle:!!readBooleanString(ne.getAttribute("UserStyle")),RemoteWFS:!!readBooleanString(ne.getAttribute("RemoteWFS")),InlineFeatureData:!!readBooleanString(ne.getAttribute("InlineFeatureData")),RemoteWCS:!!readBooleanString(ne.getAttribute("RemoteWCS"))}}function readBoundingBox$1(ne,ee,te=!0){const st=[readDecimalString(ne.getAttribute("minx")),readDecimalString(ne.getAttribute("miny")),readDecimalString(ne.getAttribute("maxx")),readDecimalString(ne.getAttribute("maxy"))],ot=[readDecimalString(ne.getAttribute("resx")),readDecimalString(ne.getAttribute("resy"))],ct={extent:st,res:ot};return te&&(isV13(ee)?ct.crs=ne.getAttribute("CRS"):ct.srs=ne.getAttribute("SRS")),ct}function readEXGeographicBoundingBox(ne,ee){const te=pushParseAndPop({},EX_GEOGRAPHIC_BOUNDING_BOX_PARSERS,ne,ee);if(!te)return;const st=te.westBoundLongitude,ot=te.southBoundLatitude,ct=te.eastBoundLongitude,ut=te.northBoundLatitude;if(!(st===void 0||ot===void 0||ct===void 0||ut===void 0))return[st,ot,ct,ut]}function readCapability(ne,ee){return pushParseAndPop({},CAPABILITY_PARSERS,ne,ee)}function readService(ne,ee){return pushParseAndPop({},isV13(ee)?SERVICE_PARSERS_V13:SERVICE_PARSERS,ne,ee)}function readContactInformation(ne,ee){return pushParseAndPop({},CONTACT_INFORMATION_PARSERS,ne,ee)}function readContactPersonPrimary(ne,ee){return pushParseAndPop({},CONTACT_PERSON_PARSERS,ne,ee)}function readContactAddress(ne,ee){return pushParseAndPop({},CONTACT_ADDRESS_PARSERS,ne,ee)}function readException(ne,ee){return pushParseAndPop([],EXCEPTION_PARSERS,ne,ee)}function readCapabilityLayer(ne,ee){const te=pushParseAndPop({},isV13(ee)?LAYER_PARSERS_V13:LAYER_PARSERS$1,ne,ee);return te.Layer===void 0?Object.assign(te,readLayer$1(ne,ee)):te}function readLayer$1(ne,ee){const te=isV13(ee),st=ee[ee.length-1],ot=pushParseAndPop({},te?LAYER_PARSERS_V13:LAYER_PARSERS$1,ne,ee);if(!ot)return;let ct=readBooleanString(ne.getAttribute("queryable"));ct===void 0&&(ct=st.queryable),ot.queryable=ct!==void 0?ct:!1;let ut=readNonNegativeIntegerString(ne.getAttribute("cascaded"));ut===void 0&&(ut=st.cascaded),ot.cascaded=ut;
311let dt=readBooleanString(ne.getAttribute("opaque"));dt===void 0&&(dt=st.opaque),ot.opaque=dt!==void 0?dt:!1;let ht=readBooleanString(ne.getAttribute("noSubsets"));ht===void 0&&(ht=st.noSubsets),ot.noSubsets=ht!==void 0?ht:!1;let ft=readDecimalString(ne.getAttribute("fixedWidth"));ft||(ft=st.fixedWidth),ot.fixedWidth=ft;let pt=readDecimalString(ne.getAttribute("fixedHeight"));pt||(pt=st.fixedHeight),ot.fixedHeight=pt;const mt=["Style","AuthorityURL"];te?mt.push("CRS"):mt.push("SRS","Dimension"),mt.forEach(function(vt){if(vt in st){const _t=ot[vt]||[];ot[vt]=_t.concat(st[vt])}});const yt=["BoundingBox","Attribution"];return te?yt.push("Dimension","EX_GeographicBoundingBox","MinScaleDenominator","MaxScaleDenominator"):yt.push("LatLonBoundingBox","ScaleHint","Extent"),yt.forEach(function(vt){if(!(vt in ot)){const _t=st[vt];ot[vt]=_t}}),ot}function readDimension(ne,ee){const te={name:ne.getAttribute("name"),units:ne.getAttribute("units"),unitSymbol:ne.getAttribute("unitSymbol")};return isV13(ee)&&Object.assign(te,{default:ne.getAttribute("default"),multipleValues:readBooleanString(ne.getAttribute("multipleValues")),nearestValue:readBooleanString(ne.getAttribute("nearestValue")),current:readBooleanString(ne.getAttribute("current")),values:readString(ne)}),te}function readExtent(ne,ee){return{name:ne.getAttribute("name"),default:ne.getAttribute("default"),nearestValue:readBooleanString(ne.getAttribute("nearestValue"))}}function readScaleHint(ne,ee){return{min:readDecimalString(ne.getAttribute("min")),max:readDecimalString(ne.getAttribute("max"))}}function readFormatOnlineresource(ne,ee){return pushParseAndPop({},FORMAT_ONLINERESOURCE_PARSERS,ne,ee)}function readRequest(ne,ee){return pushParseAndPop({},REQUEST_PARSERS,ne,ee)}function readDCPType(ne,ee){return pushParseAndPop({},DCPTYPE_PARSERS,ne,ee)}function readHTTP(ne,ee){return pushParseAndPop({},HTTP_PARSERS$1,ne,ee)}function readOperationType(ne,ee){return pushParseAndPop({},OPERATIONTYPE_PARSERS,ne,ee)}function readSizedFormatOnlineresource(ne,ee){const te=readFormatOnlineresource(ne,ee);if(te){const st=[readNonNegativeIntegerString(ne.getAttribute("width")),readNonNegativeIntegerString(ne.getAttribute("height"))];return te.size=st,te}}function readAuthorityURL(ne,ee){const te=readFormatOnlineresource(ne,ee);if(te)return te.name=ne.getAttribute("name"),te}function readMetadataURL(ne,ee){const te=readFormatOnlineresource(ne,ee);if(te)return te.type=ne.getAttribute("type"),te}function readStyle$1(ne,ee){return pushParseAndPop({},STYLE_PARSERS$1,ne,ee)}function readKeywordList(ne,ee){return pushParseAndPop([],KEYWORDLIST_PARSERS,ne,ee)}const NAMESPACE_URIS$1=[null,"http://www.opengis.net/ows/1.1"],PARSERS$1=makeStructureNS(NAMESPACE_URIS$1,{ServiceIdentification:makeObjectPropertySetter(readServiceIdentification),ServiceProvider:makeObjectPropertySetter(readServiceProvider),OperationsMetadata:makeObjectPropertySetter(readOperationsMetadata)});class OWS extends XML{constructor(){super()}readFromNode(ee){const te=pushParseAndPop({},PARSERS$1,ee,[]);return te||null}}const ADDRESS_PARSERS=makeStructureNS(NAMESPACE_URIS$1,{DeliveryPoint:makeObjectPropertySetter(readString),City:makeObjectPropertySetter(readString),AdministrativeArea:makeObjectPropertySetter(readString),PostalCode:makeObjectPropertySetter(readString),Country:makeObjectPropertySetter(readString),ElectronicMailAddress:makeObjectPropertySetter(readString)}),ALLOWED_VALUES_PARSERS=makeStructureNS(NAMESPACE_URIS$1,{Value:makeObjectPropertyPusher(readValue)}),CONSTRAINT_PARSERS=makeStructureNS(NAMESPACE_URIS$1,{AllowedValues:makeObjectPropertySetter(readAllowedValues)}),CONTACT_INFO_PARSERS=makeStructureNS(NAMESPACE_URIS$1,{Phone:makeObjectPropertySetter(readPhone),Address:makeObjectPropertySetter(readAddress)}),DCP_PARSERS=makeStructureNS(NAMESPACE_URIS$1,{HTTP:makeObjectPropertySetter(readHttp)}),HTTP_PARSERS=makeStructureNS(NAMESPACE_URIS$1,{Get:makeObjectPropertyPusher(readGet),Post:void 0}),OPERATION_PARSERS=makeStructureNS(NAMESPACE_URIS$1,{DCP:makeObjectPropertySetter(readDcp)}),OPERATIONS_METADATA_PARSERS=makeStructureNS(NAMESPACE_URIS$1,{Operation:readOperation}),PHONE_PARSERS=makeStructureNS(NAMESPACE_URIS$1,{Voice:makeObjectPropertySetter(readString),Facsimile:makeObjectPropertySetter(readString)}),REQUEST_METHOD_PARSERS=makeStructureNS(NAMESPACE_URIS$1,{Constraint:makeObjectPropertyPusher(readConstraint)}),SERVICE_CONTACT_PARSERS=makeStructureNS(NAMESPACE_URIS$1,{IndividualName:makeObjectPropertySetter(readString),PositionName:makeObjectPropertySetter(readString),ContactInfo:makeObjectPropertySetter(readContactInfo)}),SERVICE_IDENTIFICATION_PARSERS=makeStructureNS(NAMESPACE_URIS$1,{Abstract:makeObjectPropertySetter(readString),Acce
311ssConstraints:makeObjectPropertySetter(readString),Fees:makeObjectPropertySetter(readString),Title:makeObjectPropertySetter(readString),ServiceTypeVersion:makeObjectPropertySetter(readString),ServiceType:makeObjectPropertySetter(readString)}),SERVICE_PROVIDER_PARSERS=makeStructureNS(NAMESPACE_URIS$1,{ProviderName:makeObjectPropertySetter(readString),ProviderSite:makeObjectPropertySetter(readHref),ServiceContact:makeObjectPropertySetter(readServiceContact)});function readAddress(ne,ee){return pushParseAndPop({},ADDRESS_PARSERS,ne,ee)}function readAllowedValues(ne,ee){return pushParseAndPop({},ALLOWED_VALUES_PARSERS,ne,ee)}function readConstraint(ne,ee){const te=ne.getAttribute("name");if(te)return pushParseAndPop({name:te},CONSTRAINT_PARSERS,ne,ee)}function readContactInfo(ne,ee){return pushParseAndPop({},CONTACT_INFO_PARSERS,ne,ee)}function readDcp(ne,ee){return pushParseAndPop({},DCP_PARSERS,ne,ee)}function readGet(ne,ee){const te=readHref(ne);if(te)return pushParseAndPop({href:te},REQUEST_METHOD_PARSERS,ne,ee)}function readHttp(ne,ee){return pushParseAndPop({},HTTP_PARSERS,ne,ee)}function readOperation(ne,ee){const te=ne.getAttribute("name"),st=pushParseAndPop({},OPERATION_PARSERS,ne,ee);if(!st)return;const ot=ee[ee.length-1];ot[te]=st}function readOperationsMetadata(ne,ee){return pushParseAndPop({},OPERATIONS_METADATA_PARSERS,ne,ee)}function readPhone(ne,ee){return pushParseAndPop({},PHONE_PARSERS,ne,ee)}function readServiceIdentification(ne,ee){return pushParseAndPop({},SERVICE_IDENTIFICATION_PARSERS,ne,ee)}function readServiceContact(ne,ee){return pushParseAndPop({},SERVICE_CONTACT_PARSERS,ne,ee)}function readServiceProvider(ne,ee){return pushParseAndPop({},SERVICE_PROVIDER_PARSERS,ne,ee)}function readValue(ne,ee){return readString(ne)}const NAMESPACE_URIS=[null,"http://www.opengis.net/wmts/1.0"],OWS_NAMESPACE_URIS=[null,"http://www.opengis.net/ows/1.1"],PARSERS=makeStructureNS(NAMESPACE_URIS,{Contents:makeObjectPropertySetter(readContents)});class WMTSCapabilities extends XML{constructor(){super(),this.owsParser_=new OWS}readFromNode(ee){let te=ee.getAttribute("version");te&&(te=te.trim());let st=this.owsParser_.readFromNode(ee);return st?(st.version=te,st=pushParseAndPop(st,PARSERS,ee,[]),st||null):null}}const CONTENTS_PARSERS=makeStructureNS(NAMESPACE_URIS,{Layer:makeObjectPropertyPusher(readLayer),TileMatrixSet:makeObjectPropertyPusher(readTileMatrixSet)}),LAYER_PARSERS=makeStructureNS(NAMESPACE_URIS,{Style:makeObjectPropertyPusher(readStyle),Format:makeObjectPropertyPusher(readString),TileMatrixSetLink:makeObjectPropertyPusher(readTileMatrixSetLink),Dimension:makeObjectPropertyPusher(readDimensions),ResourceURL:makeObjectPropertyPusher(readResourceUrl)},makeStructureNS(OWS_NAMESPACE_URIS,{Title:makeObjectPropertySetter(readString),Abstract:makeObjectPropertySetter(readString),WGS84BoundingBox:makeObjectPropertySetter(readBoundingBox),BoundingBox:makeObjectPropertyPusher(readBoundingBoxWithCrs),Identifier:makeObjectPropertySetter(readString)})),STYLE_PARSERS=makeStructureNS(NAMESPACE_URIS,{LegendURL:makeObjectPropertyPusher(readLegendUrl)},makeStructureNS(OWS_NAMESPACE_URIS,{Title:makeObjectPropertySetter(readString),Identifier:makeObjectPropertySetter(readString)})),TMS_LINKS_PARSERS=makeStructureNS(NAMESPACE_URIS,{TileMatrixSet:makeObjectPropertySetter(readString),TileMatrixSetLimits:makeObjectPropertySetter(readTileMatrixLimitsList)}),TMS_LIMITS_LIST_PARSERS=makeStructureNS(NAMESPACE_URIS,{TileMatrixLimits:makeArrayPusher(readTileMatrixLimits)}),TMS_LIMITS_PARSERS=makeStructureNS(NAMESPACE_URIS,{TileMatrix:makeObjectPropertySetter(readString),MinTileRow:makeObjectPropertySetter(readPositiveInteger),MaxTileRow:makeObjectPropertySetter(readPositiveInteger),MinTileCol:makeObjectPropertySetter(readPositiveInteger),MaxTileCol:makeObjectPropertySetter(readPositiveInteger)}),DIMENSION_PARSERS=makeStructureNS(NAMESPACE_URIS,{Default:makeObjectPropertySetter(readString),Value:makeObjectPropertyPusher(readString)},makeStructureNS(OWS_NAMESPACE_URIS,{Identifier:makeObjectPropertySetter(readString)})),WGS84_BBOX_READERS=makeStructureNS(OWS_NAMESPACE_URIS,{LowerCorner:makeArrayPusher(readCoordinates),UpperCorner:makeArrayPusher(readCoordinates)}),TMS_PARSERS=makeStructureNS(NAMESPACE_URIS,{WellKnownScaleSet:makeObjectPropertySetter(readString),TileMatrix:makeObjectPropertyPusher(readTileMatrix)},makeStructureNS(OWS_NAMESPACE_URIS,{SupportedCRS:makeObjectPropertySetter(readString),Identifier:makeObjectPropertySetter(readString),BoundingBox:makeObjectPropertySetter(readBoundingBox)}
311)),TM_PARSERS=makeStructureNS(NAMESPACE_URIS,{TopLeftCorner:makeObjectPropertySetter(readCoordinates),ScaleDenominator:makeObjectPropertySetter(readDecimal),TileWidth:makeObjectPropertySetter(readPositiveInteger),TileHeight:makeObjectPropertySetter(readPositiveInteger),MatrixWidth:makeObjectPropertySetter(readPositiveInteger),MatrixHeight:makeObjectPropertySetter(readPositiveInteger)},makeStructureNS(OWS_NAMESPACE_URIS,{Identifier:makeObjectPropertySetter(readString)}));function readContents(ne,ee){return pushParseAndPop({},CONTENTS_PARSERS,ne,ee)}function readLayer(ne,ee){return pushParseAndPop({},LAYER_PARSERS,ne,ee)}function readTileMatrixSet(ne,ee){return pushParseAndPop({},TMS_PARSERS,ne,ee)}function readStyle(ne,ee){const te=pushParseAndPop({},STYLE_PARSERS,ne,ee);if(!te)return;const st=ne.getAttribute("isDefault")==="true";return te.isDefault=st,te}function readTileMatrixSetLink(ne,ee){return pushParseAndPop({},TMS_LINKS_PARSERS,ne,ee)}function readDimensions(ne,ee){return pushParseAndPop({},DIMENSION_PARSERS,ne,ee)}function readResourceUrl(ne,ee){const te=ne.getAttribute("format"),st=ne.getAttribute("template"),ot=ne.getAttribute("resourceType"),ct={};return te&&(ct.format=te),st&&(ct.template=st),ot&&(ct.resourceType=ot),ct}function readBoundingBox(ne,ee){const te=pushParseAndPop([],WGS84_BBOX_READERS,ne,ee);if(te.length==2)return boundingExtent(te)}function readBoundingBoxWithCrs(ne,ee){const te=ne.getAttribute("crs"),st=pushParseAndPop([],WGS84_BBOX_READERS,ne,ee);if(st.length==2)return{extent:boundingExtent(st),crs:te}}function readLegendUrl(ne,ee){const te={};return te.format=ne.getAttribute("format"),te.href=readHref(ne),te}function readCoordinates(ne,ee){const te=readString(ne).split(/\s+/);if(!te||te.length!=2)return;const st=+te[0],ot=+te[1];if(!(isNaN(st)||isNaN(ot)))return[st,ot]}function readTileMatrix(ne,ee){return pushParseAndPop({},TM_PARSERS,ne,ee)}function readTileMatrixLimitsList(ne,ee){return pushParseAndPop([],TMS_LIMITS_LIST_PARSERS,ne,ee)}function readTileMatrixLimits(ne,ee){return pushParseAndPop({},TMS_LIMITS_PARSERS,ne,ee)}var eventbus_min$1={exports:{}},eventbus_min=eventbus_min$1.exports,hasRequiredEventbus_min;function requireEventbus_min(){return hasRequiredEventbus_min||(hasRequiredEventbus_min=1,(function(ne,ee){(function(te,st){ne.exports=st()})(eventbus_min,function(){var te={};te=function(){this.listeners={}},te.prototype={addEventListener:function(ot,ct,ut){for(var dt=[],ht=arguments.length,ft=0;ft<ht;ft++)dt.push(arguments[ft]);dt=dt.length>3?dt.splice(3,dt.length-1):[],typeof this.listeners[ot]<"u"?this.listeners[ot].push({scope:ut,callback:ct,args:dt}):this.listeners[ot]=[{scope:ut,callback:ct,args:dt}]},removeEventListener:function(ot,ct,ut){if(typeof this.listeners[ot]<"u"){for(var dt=this.listeners[ot].length,ht=[],ft=0;ft<dt;ft++){var pt=this.listeners[ot][ft];pt.scope==ut&&pt.callback==ct||ht.push(pt)}this.listeners[ot]=ht}},hasEventListener:function(ot,ct,ut){if(typeof this.listeners[ot]<"u"){var dt=this.listeners[ot].length;if(ct===void 0&&ut===void 0)return dt>0;for(var ht=0;ht<dt;ht++){var ft=this.listeners[ot][ht];if((!ut||ft.scope==ut)&&ft.callback==ct)return!0}}return!1},dispatch:function(ot,ct){for(var ut={type:ot,target:ct},dt=[],ht=arguments.length,ft=0;ft<ht;ft++)dt.push(arguments[ft]);if(dt=dt.length>2?dt.splice(2,dt.length-1):[],dt=[ut].concat(dt),typeof this.listeners[ot]<"u")for(var pt=this.listeners[ot].slice(),mt=pt.length,ft=0;ft<mt;ft++){var yt=pt[ft];if(yt&&yt.callback){var vt=dt.concat(yt.args);yt.callback.apply(yt.scope,vt)}}},getEvents:function(){var ot="";for(var ct in this.listeners)for(var ut=this.listeners[ct].length,dt=0;dt<ut;dt++){var ht=this.listeners[ct][dt];ot+=ht.scope&&ht.scope.className?ht.scope.className:"anonymous",ot+=" listen for '"+ct+`'
312`}return ot}};var st=new te;return st})})(eventbus_min$1)),eventbus_min$1.exports}var eventbus_minExports=requireEventbus_min();const EventBus=getDefaultExportFromCjs(eventbus_minExports);var EventEditor={onloaded:"editor:onloaded",layer:{onclickvisibility:"editor:layer:onclickvisibility",onclickclone:"editor:layer:onclickclone",onclickremove:"editor:layer:onclickremove"},legend:{onclickedition:"editor:legend:onclickedition",onchangevalue:"editor:legend:onchangevalue"},group:{oncollapse:"editor:group:oncollapse"},style:{oneditjson:"editor:style:oneditjson",scale:{onchangemin:"editor:style:scale:onchangemin",onchangemax:"editor:style:scale:onchangemax"}},filter:{oneditjson:"editor:filter:oneditjson"}
312,themes:{onclickimage:"editor:themes:onclickimage",onclicktitle:"editor:themes:onclicktitle"},search:{onsubmit:"editor:search:onsubmit",onautocomplete:"editor:search:onautocomplete"}},logger$n=LoggerByDefault.getLogger("editor-style");class Style{constructor(ee){if(logger$n.trace("[constructor] Style",ee),this.options=ee||{target:null,position:0,tools:null,title:null,obj:null},!(this instanceof Style))throw new TypeError("ERROR CLASS_CONSTRUCTOR");this._initialize(),this._initContainer()}_initialize(){this.id=this.options.id||null,this.options.target,this.options.position||(this.options.position=0);var ee={scale:!0,edition:!1};this.options.tools||(this.options.tools=ee),Helper.mergeParams(this.options.tools,ee,!1),this.options.obj||(this.options.obj={paint:{},layout:{}}),this.options.title||(this.options.title="JSON Styles :"),this.container=null,this.name={target:"GPEditorMapBoxStyleTarget",container:"GPEditorMapBoxStyleContainer",containerjson:"GPEditorMapBoxStyleJsonContainer",jsonlabel:"GPEditorMapBoxStyleJsonTitle",jsondisplay:"GPEditorMapBoxStyleJsonDisplay",containertoolsscale:"GPEditorMapBoxStyleToolsScaleContainer",scaletitle:"GPEditorMapBoxStyleScaleTitle",containertoolsminscale:"GPEditorMapBoxStyleToolsScaleMinContainer",scalelabelmin:"GPEditorMapBoxStyleScaleLabelMin",scaleinputmin:"GPEditorMapBoxStyleScaleInputMin",containertoolsmaxscale:"GPEditorMapBoxStyleToolsScaleMaxContainer",scalelabelmax:"GPEditorMapBoxStyleScaleLabelMax",scaleinputmax:"GPEditorMapBoxStyleScaleInputMax",containertoolsedit:"GPEditorMapBoxStyleToolsEditionContainer"}}_initContainer(){var ee=this,te=!1,st=JSON.parse(JSON.stringify(this.options.obj)),ot={};st.paint&&(te=!0,ot.paint=st.paint,Object.keys(st.paint).length===0&&logger$n.info("tag 'paint' is empty !")),st.layout&&(te=!0,ot.layout=st.layout,st.layout.visibility&&delete ot.visibility,Object.keys(st.layout).length===0&&logger$n.info("tag 'layout' is empty !"));var ct=document.createElement("div");ct.className=this.name.container;var ut=null;if(te){var dt=JSON.stringify(ot,null,4);ut=this._syntaxHighlight(dt)}var ht=document.createElement("div");ht.className=this.name.containerjson;var ft=document.createElement("label");ft.className=this.name.jsonlabel,ft.innerHTML=this.options.title,ht.appendChild(ft);var pt=document.createElement("pre");pt.className=this.name.jsondisplay,pt.innerHTML=ut,pt.addEventListener?pt.addEventListener("click",function(mt){ee.options.tools.edition&&ee.onEditJsonStyleMapBox(mt)}):pt.attachEvent&&pt.attachEvent("onclick",function(mt){ee.options.tools.edition&&ee.onEditJsonStyleMapBox(mt)}),ht.appendChild(pt),ct.appendChild(ht),this.options.tools.scale&&ct.appendChild(this._createElementToolsScale({min:ot.layout?ot.layout.minzoom:0,max:ot.layout?ot.layout.maxzoom:21})),this.options.tools.edition&&ct.appendChild(this._createElementToolsEdition()),this.container=ct}_createElementToolsScale(ee){logger$n.trace("_createElementToolsScale");var te=this,st=this.options.obj,ot=document.createElement("div");ot.className=this.name.containertoolsscale;var ct=document.createElement("div");ct.className=this.name.containertoolsminscale;var ut=document.createElement("label");ut.className=this.name.scalelabelmin,ut.innerHTML="min :",ct.appendChild(ut);var dt=document.createElement("input");dt.className=this.name.scaleinputmin,dt.type="range",dt.value=ee.min||0,dt.title=ee.min||0,dt.disabled=!1,dt.min=0,dt.max=21,dt.data=st,dt.addEventListener?dt.addEventListener("change",function(mt){te.onChangeStyleScaleMinMapBox(mt)}):dt.appendChild&&dt.appendChild("onchange",function(mt){te.onChangeStyleScaleMinMapBox(mt)}),ct.appendChild(dt),ot.appendChild(ct);var ht=document.createElement("div");ht.className=this.name.containertoolsmaxscale;var ft=document.createElement("label");ft.className=this.name.scalelabelmax,ft.innerHTML="max :",ht.appendChild(ft);var pt=document.createElement("input");return pt.className=this.name.scaleinputmin,pt.type="range",pt.value=ee.max||21,pt.title=ee.max||21,pt.disabled=!1,pt.min=0,pt.max=21,pt.data=st,pt.addEventListener?pt.addEventListener("change",function(mt){te.onChangeStyleScaleMaxMapBox(mt)}
312):pt.appendChild&&pt.appendChild("onchange",function(mt){te.onChangeStyleScaleMaxMapBox(mt)}),ht.appendChild(pt),ot.appendChild(ht),ot}_createElementToolsEdition(){logger$n.warn("_createElementToolsEdition, it's not yet implemented !");var ee=document.createElement("div");return ee.className=this.name.containertoolsedit,ee}_syntaxHighlight(ee){return ee=ee.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;"),ee.replace(/("(\\u[a-zA-Z0-9]{4}|\\[^u]|[^\\"])*"(\s*:)?|\b(true|false|null)\b|-?\d+(?:\.\d*)?(?:[eE][+-]?\d+)?)/g,function(te){var st="gp-json-number";return/^"/.test(te)?/:$/.test(te)?st="gp-json-key":st="gp-json-string":/true|false/.test(te)?st="gp-json-boolean":/null/.test(te)&&(st="gp-json-null"),"<span class='"+st+"'>"+te+"</span>"})}add(){if(!this.options.target){if(!document.getElementById(this.name.target)){var ee=document.createElement("div");ee.id=this.name.target;var te=document.documentElement||document.getElementsByTagName("body")[0]||document.getElementsByTagName("head")[0];te.appendChild(ee)}this.options.target=document.getElementById(this.name.target)}return this.container&&this.options.target.appendChild(this.container),this}display(ee){return logger$n.trace("display()",ee),typeof ee<"u"&&(this.container.style.display=ee?"flex":"none"),this.container.style.display==="flex"}getContainer(){return this.container}onEditJsonStyleMapBox(ee){logger$n.trace("onEditJsonStyleMapBox",ee),ee.editorID=this.id,ee.data=this.options,EventBus.dispatch(EventEditor.style.oneditjson,ee)}onChangeStyleScaleMinMapBox(ee){logger$n.trace("onChangeStyleScaleMinMapBox",ee),ee.editorID=this.id,ee.data=this.options,EventBus.dispatch(EventEditor.style.scale.onchangemin,ee)}onChangeStyleScaleMaxMapBox(ee){logger$n.trace("onChangeStyleScaleMaxMapBox",ee),ee.editorID=this.id,ee.data=this.options,EventBus.dispatch(EventEditor.style.scale.onchangemax,ee)}}window.ol&&window.ol.style&&(window.ol.style.editor||(window.ol.style.editor={}),window.ol.style.editor.Style=Style);var logger$m=LoggerByDefault.getLogger("editor-themes");class Themes{constructor(ee){if(logger$m.trace("[constructor] Themes",ee),this.options=ee||{},!(this instanceof Themes))throw new TypeError("ERROR CLASS_CONSTRUCTOR");this._initialize(),this._initContainer()}_initialize(){this.id=this.options.id||null,this.options.target;var ee={thumbnails:!0,button:{visible:!0,type:"radio"}};(!this.options.tools||Object.keys(this.options.tools).length===0)&&(this.options.tools=ee),Helper.mergeParams(this.options.tools,ee,!1),(typeof this.options.obj>"u"||this.options.obj===null||!this.options.obj)&&(this.options.obj={themesSummary:"",themes:[]}),this.container=null,this.name={target:"GPEditorMapBoxThemeTarget",container:"GPEditorMapBoxThemesContainer",containertheme:"GPEditorMapBoxThemeContainer",containerthemeID:"GPEditorMapBoxThemeContainer_ID_",input:"GPEditorMapBoxThemeInput",inputID:"GPEditorMapBoxThemeInput_ID_",label:"GPEditorMapBoxThemeTitle",labelID:"GPEditorMapBoxThemeTitle_ID_",image:"GPEditorMapBoxThemeImage",imageID:"GPEditorMapBoxThemeImage_ID_",message:"GPEditorMapBoxThemeMessage"}}_initContainer(){var ee=this,te=this.options.obj,st=this.id||SelectorID.generate(),ot=document.createElement("div");ot.className=this.name.container,ot.title=te.themesSummary||"";var ct=te.themes;if(ct)for(var ut=0;ut<ct.length;ut++){var dt=ct[ut],ht=document.createElement("div");ht.id=this.name.containerthemeID+ut+"_"+st,ht.className=this.name.containertheme,ht.tabIndex=ut;var ft=dt.url,pt=dt.selected||!1;if(ft){var mt=this.options.tools.button;if(mt.visible){var yt=mt.type==="checkbox"?"checkbox":"radio",vt=document.createElement("input");vt.type=yt,vt.id=this.name.inputID+ut+"_"+st,vt.className=this.name.input,vt.name=st,vt.checked=pt,vt.data=ft,vt.addEventListener?vt.addEventListener("click",function(Mt){ee.onClickThemeTitleMapBox(Mt)}):vt.attachEvent&&vt.attachEvent("onclick",function(Mt){ee.onClickThemeTitleMapBox(Mt)}),ht.appendChild(vt)}if(this.options.tools.thumbnails&&dt.thumbnail){var _t=document.createElement("img");_t.id=this.name.imageID+ut+"_"+st,_t.className=this.name.image,_t.src=dt.thumbnail,_t.alt=dt.thumbnail,_t.title=dt.description||"",_t.data=ft,_t.addEventListener?_t.addEventListener("click",function(Mt){ee.onClickThemeImageMapBox(Mt);var Ot=Mt.target.parentElement.childNodes;if(Ot){var kt=Ot[0];kt.tagName.toLowerCase()==="input"&&(kt.checked=!kt.checked)}}):_t.attachEvent&&_t.attachEvent("onclick",function(Mt){ee.onClickThemeImageMapBox(Mt);var Ot=Mt.target.parentElement.childNodes;if(Ot){var kt=Ot[0];kt.tagName.toLowerCase()==="input"&&(kt.checked=!kt.checked)}}),ht.appendChild(_t)}if(dt.name){var bt=document.createElement("label");bt.id=this.name.labelID+ut+"_"+st,this.options.tools.button.visible&&(bt.htmlFor=vt.id),bt.className=this.name.label,bt.innerHTML=dt.name,bt.title=dt.description||"",bt.data=ft,this.options.tools.button.visible||(bt.addEventListener?bt.addEventListener("click",function(Mt){ee.onClickThemeTitleMapBox(Mt)}):bt.attachEvent&&bt.attachEvent("onclick",function(Mt){ee.onClickThemeTitleMapBox(Mt)})),ht.appendChild(bt)}}else{var xt=document.createElement("label");xt.className=this.name.message,xt.innerHTML="Thème non disponible...",ht.appendChild(xt)}ot.appendChild(ht)}this.container=ot}add(){if(!this.options.target){if(!document.getElementById(this.name.target)){var ee=document.createElement("div");ee.id=this.name.target;var te=document.documentElement||document.getElementsByTagName("body")[0]||document.getElementsByTagName("head")[0];te.appendChild(ee)}this.options.target=document.getElementById(this.name.target)}return this.container&&this.options.target.appendChild(this.container),this}display(ee){return logger$m.trace("display()",ee),typeof ee<"u"&&(this.container.style.display=ee?"flex":"none"),this.container.style.display==="flex"}getContainer(){return this.container}onClickThemeImageMapBox(ee){if(logger$m.trace("onClickThemeImageMapBox",ee),ee.editorID=this.id,ee.data=this.options,this.options.tools.button.type==="checkbox")for(var te=ee.target.previousSibling.id.substring(ee.target.previousSibling.id.lastIndexOf("_")+1),st=document.getElementsByClassName(this.name.input),ot=0;ot<st.length;ot++){var ct=st[ot];if(ct.id!==ee.target.previousSibling.id){var ut=ct.id.substring(ct.id.lastIndexOf("_")+1);ut===te&&(ct.checked=!1)}}EventBus.dispatch(EventEditor.themes.onclickimage,ee)}onClickThemeTitleMapBox(ee){if(logger$m.trace("onClickThemeTitleMapBox",ee),ee.editorID=this.id,ee.data=this.options,this.options.tools.button.type==="checkbox")for(var te=ee.target.id.substring(ee.target.id.lastIndexOf("_")+1),st=document.getElementsByClassName(this.name.input),ot=0;ot<st.length;ot++){var ct=st[ot];if(ct.id!==ee.target.id){var ut=ct.id.substring(ct.id.lastIndexOf("_")+1);ut===te&&(ct.checked=!1)}}EventBus.dispatch(EventEditor.themes.onclicktitle,ee)}}window.ol&&window.ol.style&&(window.ol.style.editor||(window.ol.style.editor={}),window.ol.style.editor.Themes=Themes);var logger$l=LoggerByDefault.getLogger("editor-filter");class Filter{constructor(ee){if(logger$l.trace("[constructor] Filter",ee),this.options=ee||{target:null,position:0,tools:null,title:null,obj:null},!(this instanceof Filter))throw new TypeError("ERROR CLASS_CONSTRUCTOR");this._initialize(),this._initContainer()}_initialize(){this.id=this.options.id||null,this.options.target,this.options.position||(this.options.position=0);var ee={edition:!1};
312this.options.tools||(this.options.tools=ee),Helper.mergeParams(this.options.tools,ee,!1),this.options.obj||(this.options.obj={filter:[]}),this.options.title||(this.options.title="JSON Filtres :"),this.container=null,this.name={target:"GPEditorMapBoxFilterTarget",container:"GPEditorMapBoxFilterContainer",containerjson:"GPEditorMapBoxFilterJsonContainer",jsonlabel:"GPEditorMapBoxFilterTitleJson",jsondisplay:"GPEditorMapBoxFilterDisplayJson",containertoolsedit:"GPEditorMapBoxFilterToolsEditionContainer"}}_initContainer(){var ee=this,te=!1,st=JSON.parse(JSON.stringify(this.options.obj));st.filter&&(te=!0,st.filter.length===0&&logger$l.info("tag 'filter' is empty !"));var ot=document.createElement("div");ot.className=this.name.container;var ct=null;te&&(ct=JSON.stringify(st.filter,null,4));var ut=document.createElement("div");ut.className=this.name.containerjson;var dt=document.createElement("label");dt.className=this.name.jsonlabel,dt.innerHTML=this.options.title,ut.appendChild(dt);var ht=document.createElement("pre");if(ht.className=this.name.jsondisplay,ht.innerHTML=ct,ht.addEventListener?ht.addEventListener("click",function(pt){ee.options.tools.edition&&ee.onEditJsonFilterMapBox(pt)}):ht.attachEvent&&ht.attachEvent("onclick",function(pt){ee.options.tools.edition&&ee.onEditJsonFilterMapBox(pt)}),ut.appendChild(ht),ot.appendChild(ut),this.options.tools.edition){var ft=document.createElement("div");ft.className=this.name.containertoolsedit,ot.appendChild(ft)}this.container=ot}add(){if(!this.options.target){if(!document.getElementById(this.name.target)){var ee=document.createElement("div");ee.id=this.name.target;var te=document.documentElement||document.getElementsByTagName("body")[0]||document.getElementsByTagName("head")[0];te.appendChild(ee)}this.options.target=document.getElementById(this.name.target)}return this.container&&this.options.target.appendChild(this.container),this}display(ee){return logger$l.trace("display()",ee),typeof ee<"u"&&(this.container.style.display=ee?"flex":"none"),this.container.style.display==="flex"}getContainer(){return this.container}onEditJsonFilterMapBox(ee){logger$l.trace("onEditJsonFilterMapBox",ee),ee.editorID=this.id,ee.data=this.options,EventBus.dispatch(EventEditor.filter.oneditjson,ee)}}window.ol&&window.ol.style&&(window.ol.style.editor||(window.ol.style.editor={}),window.ol.style.editor.Filter=Filter);var logger$k=LoggerByDefault.getLogger("editor-legend");class Legend{constructor(ee){if(logger$k.trace("[constructor] Legend",ee),this.options=ee||{target:null,position:0,sprites:null,obj:null},!(this instanceof Legend))throw new TypeError("ERROR CLASS_CONSTRUCTOR");this._initialize(),this._initContainer()}_initialize(){this.id=this.options.id||null,this.options.target,this.options.position||(this.options.position=0),this.options.obj||(this.options.obj={title:"vide...",editable:!0,paint:{"fill-color":"#FFFFFF"}});var ee=this.options.obj.editable;this.editable=typeof ee<"u"?ee:!1,this.legendRender={type:"fill",values:{width:1,stroke:"#FFFFFF",color:"#000000",opacity:1}},this.container=null,this.rendercontainer=null,this.toolscontainer=null,this.name={target:"GPEditorMapBoxLegendTarget",container:"GPEditorMapBoxLegendContainer",containerlegendrender:"GPEditorMapBoxLegendRenderContainer",legendrender:"GPEditorMapBoxLegendRender",legendeditable:"GPEditorMapBoxLegendEditable",legendtitle:"GPEditorMapBoxLegendTitle",containerlegendtools:"GPEditorMapBoxLegendToolsContainer"},this.labels={"line-color":"Couleur du trait","line-width":"Epaisseur du trait","line-opacity":"Opacité du trait","fill-color":"Couleur de remplissage","fill-opacity":"Opacité du remplissage"}}_initContainer(){var ee=this.options.obj,te=document.createElement("div");te.className=this.name.container;var st=Object.assign({},ee.paint,ee.layout),ot=Object.keys(st);if(ot.length===0){logger$k.info("tag 'paint' or 'layout' is empty !");return}for(var ct={},ut=!1,dt=0;dt<ot.length;dt++){var ht=ot[dt];if(/fill-/.test(ht)||/line-/.test(ht)||/circle-/.test(ht)||/background-/.test(ht)||/text-/.test(ht)||/icon-/.test(ht)){ut=!0;var ft=ee.title||"",pt=ht.split("-")[0];(pt==="text"||pt==="icon")&&(pt="symbol"),this.legendRender=this._getProperties(pt,st),ct={edit:this.editable,title:ft,type:this.legendRender.type,values:this.legendRender.values},te.appendChild(this._createElementIconLegend(ct));break}}ut||(ct={edit:this.editable,title:"",type:this.legendRender.type,values:this.legendRender.values},te.appendChild(this._createElementIconLegend(ct)),logger$k.warn("legend type unknown, default legend used...")),this.toolscontainer=this._createElementEditionLegend(ct),te.appendChild(this.toolscontainer),this.container=te}_getProperties(ee,te){if(ee==="symbol"){var st=te["text-field"],ot=te["icon-image"];if(ee=st&&ot?"icon":st?"text":ot?"icon":"unknow",ee==="unknow"){logger$k.warn("type unknow !?");return}}var ct={};for(const ft in te)if(Object.hasOwnProperty.call(te,ft)){const pt=te[ft];if(Legend.PROPERTIES[ee].includes(ft)){var ut=ft.replace(ee,"").slice(1),dt=this._getValue(pt);if(dt){if((ut==="pattern"||ut==="image")&&(!this.options.sprites||!this.options.sprites.json||!this.options.sprites.json[dt])){var ht=ee+":"+ut;logger$k.warn("sprites mandatory for key ",ht);break}ct[ut]=dt}}else logger$k.warn("property not supported : ",ft)}return{type:ee,values:ct}}_renderThumbnail(ee,te){var st=this.rendercontainer;if(!st)return!1;var ot=null,ct=3;switch(te.color||(te.color="#FFFFFF"),ee){case"text":var ut="font-size: 5em;font-weight: bold;";ot=`url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' version='1.1' preserveAspectRatio='none' viewBox='0 0 100 100'><text x='50' y='50' fill='%color%' fill-opacity='%opacity%'  text-anchor='middle' dominant-baseline='central' style='%style%'> T </text></svg>")`,st.style.background=ot.replace("%color%",te.color.indexOf("rgb")===0?te.color:ColorUtils.hexToRgba(te.color,1)).replace("%
312opacity%",te.opacity||1).replace("%style%",ut);break;case"icon":if(te.image)ot="<svg xmlns='http://www.w3.org/2000/svg' version='1.1' preserveAspectRatio='none' width='27px' height='27px' x='0' y='0' viewBox='%x% %y% %w% %h%'><image width='%W%px' height='%H%px' href='%URL%'/></svg>".replace("%x%",this.options.sprites.json[te.image].x).replace("%y%",this.options.sprites.json[te.image].y).replace(/%w%/g,this.options.sprites.json[te.image].width).replace(/%h%/g,this.options.sprites.json[te.image].height).replace("%W%",this.options.sprites.size.w).replace("%H%",this.options.sprites.size.h).replace("%URL%",this.options.sprites.url),st.innerHTML=ot;else{var dt="fill: transparent;stroke-width: 10;";ot=`url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' version='1.1' preserveAspectRatio='none' viewBox='0 0 100 100'><path d='M 50,20 80,82.5 20,82.5 z' stroke='%color%' style='%style%'/></svg>")`,st.style.background=ot.replace("%color%",te.color.indexOf("rgb")===0?te.color:ColorUtils.hexToRgba(te.color,1)).replace("%style%",dt)}break;case"line":var ht=Array.isArray(te.dasharray)?te.dasharray.join(" "):0;ot=`url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' version='1.1' preserveAspectRatio='none' viewBox='0 0 100 100'><line x1='0' y1='100' x2='100' y2='0' stroke='%color%' stroke-width='%stroke-width%' stroke-opacity='%stroke-opacity%' stroke-dasharray='%stroke-dasharray%' /></svg>")`,st.style.background=ot.replace("%color%",te.color.indexOf("rgb")===0?te.color:ColorUtils.hexToRgba(te.color,1)).replace("%stroke-opacity%",te.opacity||1).replace("%stroke-dasharray%",ht).replace("%stroke-width%",(te.width||0)*ct);break;case"circle":var ft=te["stroke-color"]||"#FFFFFF";ot=`url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' version='1.1' preserveAspectRatio='none' viewBox='0 0 100 100'><circle cx='50' cy='50' r='40' stroke='%stroke-color%' stroke-width='%stroke-width%' stroke-opacity='%strock-opacity%' fill='%color%' fill-opacity='%opacity%' /></svg>")`,st.style.background=ot.replace("%color%",te.color.indexOf("rgb")===0?te.color:ColorUtils.hexToRgba(te.color,1)).replace("%opacity%",te.opacity||1).replace("%stroke-color%",ft.indexOf("rgb")===0?ft:ColorUtils.hexToRgba(ft,1)).replace("%stroke-opacity%",te["stroke-opacity"]||1).replace("%stroke-width%",(te["stroke-width"]||0)*ct);break;case"background":case"fill":if(te.pattern)ot="<svg xmlns='http://www.w3.org/2000/svg' version='1.1' preserveAspectRatio='none' width='27px' height='27px' x='0' y='0' viewBox='%x% %y% %w% %h%'><image width='%W%px' height='%H%px' href='%URL%'/></svg>".replace("%x%",this.options.sprites.json[te.pattern].x).replace("%y%",this.options.sprites.json[te.pattern].y).replace(/%w%/g,this.options.sprites.json[te.pattern].width).replace(/%h%/g,this.options.sprites.json[te.pattern].height).replace("%W%",this.options.sprites.size.w).replace("%H%",this.options.sprites.size.h).replace("%URL%",this.options.sprites.url),st.innerHTML=ot;else{var pt=te["outline-color"]||"#FFFFFF";ot=`url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' version='1.1' preserveAspectRatio='none' viewBox='0 0 100 100'><rect x='0' y='0' width='100' height='100' rx='5' ry='5' stroke='%stroke-color%' stroke-width='3' fill='%color%' fill-opacity='%opacity%' /></svg>")`,st.style.background=ot.replace("%color%",te.color.indexOf("rgb")===0?te.color:ColorUtils.hexToRgba(te.color,1)).replace("%opacity%",te.opacity||1).replace("%stroke-color%",pt.indexOf("rgb")===0?pt:ColorUtils.hexToRgba(pt,1))}break;default:return logger$k.warn("type not found, no thumbnail..."),!1}return!0}_getValue(ee){var te=null;if(typeof ee=="string")te=ee;else if(typeof ee=="number")te=ee;else if(Array.isArray(ee)){var st=!0;ee.forEach(ct=>{typeof ct!="number"&&(st=!1)}),st&&(te=ee)}else if(typeof ee=="object"){if(te=null,"stops"in ee){ee.stops.sort((ct,ut)=>{var dt=ct[0],ht=ut[0];return dt>ht?-1:dt<ht?1:0});var ot=ee.stops.slice(-1);te=ot[0][1]}}else logger$k.warn("value not supported !");return te}_createElementIconLegend(ee){var te=this,st=document.createElement("div");st.className=this.name.containerlegendrender;var ot=this.rendercontainer=document.createElement("div");ot.className=this.name.legendrender,ee.edit&&(ot.className+=" ",ot.className+=this.name.legendeditable,ot.addEventListener?ot.addEventListener("click",function(dt){te.onEditionLegendMapBox(dt)}):ot.attachEvent&&ot.attachEvent("onclick",function(dt){te.onEditionLegendMapBox(dt)}));var ct=ee.type;this._renderThumbnail(ct,ee.values)?ot.className+=ee.edit?" legend-"+ct:" legend-"+ct+"-not-editable":ot.className+=" legend-unknow",st.appendChild(ot);var ut=document.createElement("span");return ut.className=this.name.legendtitle,ut.innerHTML=ee.title||"",st.appendChild(ut),st}_createElementEditionLegend(ee){var te=this,st=document.createElement("div");if(st.className=this.name.containerlegendtools,!ee.edit)return st;switch(ee.type){case"line":ot.call(te),ct.call(te),ut.call(te);break;case"background":case"fill":dt.call(te),ht.call(te);break}function ot(){var ft=document.createElement("div");ft.className="legend-styling-div";var pt=document.createElement("label");pt.className="legend-line",pt.htmlFor=this.id?"line-color-"+this.id:"line-color",pt.innerHTML=this.labels["line-color"];var mt=document.createElement("input");mt.className="legend-styling",mt.id=this.id?"line-color-"+this.id:"line-color",mt.title="Selectionner une couleur de trait",mt.type="color",mt.value=ee.values.color,mt.setAttribute("data-id","line-color"),mt.addEventListener?mt.addEventListener("change",function(yt){te._renderThumbnail(ee.type,Object.assign(ee.values,{color:yt.target.value})),te.onChangeValueLegendMapBox(yt)}):mt.attachEvent&&mt.attachEvent("onchange",function(yt){te._renderThumbnail(ee.type,Object.assign(ee.values,{color:yt.target.value})),te.onChangeValueLegendMapBox(yt)}),ft.appendChild(pt),ft.appendChild(mt),st.appendChild(ft)}function ct(){var ft=document.createElement("div");ft.className="legend-styling-div";var pt=document.createElement("label");pt.className="legend-line",pt.htmlFor=this.id?"line-width-"+this.id:"line-width",pt.innerHTML=this.labels["line-width"];var mt=document.createElement("input");mt.className="legend-styling",mt.id=this.id?"line-width-"+this.id:"line-width",mt.title=ee.values.width,mt.type="range",mt.min="0",mt.max="10",mt.step="1",mt.defaultValue=ee.values.width,mt.setAttribute("data-id","line-width"),mt.addEventListener?mt.addEventListener("change",function(yt){logger$k.trace(yt),yt.target.title=yt.target.value,te._renderThumbnail(ee.type,Object.assign(ee.values,{width:yt.target.value})),te.onChangeValueLegendMapBox(yt)}):mt.attachEvent&&mt.attachEvent("onchange",function(yt){logger$k.trace(yt),yt.target.title=yt.target.value,te._renderThumbnail(ee.type,Object.assign(ee.values,{width:yt.target.value})),te.onChangeValueLegendMapBox(yt)}),ft.appendChild(pt),ft.appendChild(mt),st.appendChild(ft)}function ut(){var ft=document.createElement("div");ft.className="legend-styling-div";var pt=document.createElement("label");pt.className="legend-line",pt.htmlFor=this.id?"line-opacity-"+this.id:"line-opacity",pt.innerHTML=this.labels["line-opacity"];var mt=document.createElement("input");mt.className="legend-styling",mt.id=this.id?"line-opacity-"+this.id:"line-opacity",mt.title=ee.values.opacity,mt.type="range",mt.min="0",mt.max="1",mt.step="0.1",mt.defaultValue=ee.values.opacity,mt.setAttribute("data-id","line-opacity"),mt.addEventListener?mt.addEventListener("change",function(yt){logger$k.trace(yt),yt.target.title=yt.target.value,te._renderThumbnail(ee.type,Object.assign(ee.values,{opacity:yt.target.value})),te.onChangeValueLegendMapBox(yt)}):mt.attachEvent&&mt.attachEvent("onchange",function(yt){logger$k.trace(yt),yt.target.title=yt.target.value,te._renderThumbnail(ee.type,Object.assign(ee.values,{opacity:yt.target.value})),te.onChangeValueLegendMapBox(yt)}),ft.appendChild(pt),ft.appendChild(mt),st.appendChild(ft)}function dt(){var ft=document.createElement("div");ft.className="legend-styling-div";var pt=document.createElement("label");pt.className="legend-fill",pt.htmlFor=this.id?"fill-color-"+this.id:"fill-color",pt.innerHTML=this.labels["fill-color"];var mt=document.createElement("input");mt.className="legend-styling",mt.id=this.id?"fill-color-"+this.id:"fill-color",mt.title="Selectionner une couleur de remplissage",mt.type="color",mt.value=ee.values.color,mt.setAttribute("data-id","fill-color"),mt.addEventListener?mt.addEventListener("change",function(yt){te._renderThumbnail(ee.type,Object.assign(ee.values,{color:yt.target.value})),te.onChangeValueLegendMapBox(yt)}):mt.attachEvent&&mt.attachEvent("onchange",function(yt){te._renderThumbnail(ee.type,Object.assign(ee.values,{color:yt.target.value})),te.onChangeValueLegendMapBox(yt)}),ft.appendChild(pt),ft.appendChild(mt),st.appendChild(ft)}function ht(){var ft=document.createElement("div");ft.className="legend-styling-div";var pt=document.createElement("label");pt.className="legend-fill",pt.htmlFor=this.id?"fill-opacity-"+this.id:"fill-opacity",pt.innerHTML=this.labels["fill-opacity"];var mt=document.createElement("input");mt.className="legend-styling",mt.id=this.id?"fill-opacity-"+this.id:"fill-opacity",mt.title=ee.values.opacity,mt.type="range",mt.min="0",mt.max="1",mt.step="0.1",mt.defaultValue=ee.values.opacity,mt.setAttribute("data-id","fill-opacity"),mt.addEventListener?mt.addEventListener("change",function(yt){yt.target.title=yt.target.value,te._renderThumbnail(ee.type,Object.assign(ee.values,{opacity:yt.target.value})),te.onChangeValueLegendMapBox(yt)}):mt.attachEvent&&mt.attachEvent("onchange",function(yt){yt.target.title=yt.target.value,te._renderThumbnail(ee.type,Object.assign(ee.values,{opacity:yt.target.value})),te.onChangeValueLegendMapBox(yt)}),ft.appendChild(pt),ft.appendChild(mt),st.appendChild(ft)}return st}add(){if(!this.options.target){if(!document.getElementById(this.name.target)){var ee=document.createElement("div");ee.id=this.name.target;var te=document.documentElement||document.getElementsByTagName("body")[0]||document.getElementsByTagName("head")[0];te.appendChild(ee)}this.options.target=document.getElementById(this.name.target)}return this.container&&this.options.target.appendChild(this.container),this}display(ee){return logger$k.trace("display()",ee),typeof ee<"u"&&(this.container.style.display=ee?"flex":"none"),this.container.style.display==="flex"}isEditable(){return this.editable}getRenderContainer(){return this.rendercontainer}getToolsContainer(){return this.toolscontainer}getContainer(){return this.container}onEditionLegendMapBox(ee){logger$k.trace("onEditionLegendMapBox",ee),ee.editorID=this.id,ee.data=this.options,EventBus.dispatch(EventEditor.legend.onclickedition,ee)}onChangeValueLegendMapBox(ee){logger$k.trace("onChangeValueLegendMapBox",ee),ee.editorID=this.id,ee.data=this.options,EventBus.dispatch(EventEditor.legend.onchangevalue,ee)}}Legend.PROPERTIES={line:["line-color","line-dasharray","line-opacity","line-width"],fill:["fill-color","fill-opacity","fill-outline-color","fill-pattern"],background:["background-color","background-opacity","background-pattern"],circle:["cir
312cle-color","circle-opacity","circle-stroke-color","circle-stroke-opacity","circle-stroke-width"],icon:["icon-color","icon-image","icon-opacity","__icon-size"],text:["__text-anchor","text-color","text-field","__text-font","__text-opacity","__text-size"]};window.ol&&window.ol.style&&(window.ol.style.editor||(window.ol.style.editor={}),window.ol.style.editor.Legend=Legend);var logger$j=LoggerByDefault.getLogger("editor-layer");class Layer{constructor(ee){if(logger$j.trace("[constructor] Layer",ee),this.options=ee||{},!(this instanceof Layer))throw new TypeError("ERROR CLASS_CONSTRUCTOR");this._initialize(),this._initContainer()}_initialize(){this.id=this.options.id||null,this.options.target,this.options.position||(this.options.position=0);var ee={visibility:!0,icon:{image:!0,anchor:"end"},type:!0,pin:!0,remove:!1,clone:!1};this.options.tools||(this.options.tools=ee),Helper.mergeParams(this.options.tools,ee,!1);var te={id:"",type:"",source:"","source-layer":""};this.options.obj||(this.options.obj=te),Helper.mergeParams(this.options.obj,te,!1),this.bSlotLegend=!1,this.oFilter=null,this.oStyle=null,this.oLegend=null,this.container=null,this.DomVisibility=null,this.DomToggle=null,this.name={target:"GPEditorMapBoxLayerTarget",container:"GPEditorMapBoxLayerContainer",containerlegend:"GPEditorMapBoxLayerLegendContainer",containertitle:"GPEditorMapBoxLayerTitleContainer",imagelabelinput:"GPEditorMapBoxLayerImageInput",imagelabel:"GPEditorMapBoxLayerImageLabel",typeimg:"GPEditorMapBoxLayerTypeImage",titleinput:"GPEditorMapBoxLayerTitleInput",titlelabel:"GPEditorMapBoxLayerTitleLabel",containertools:"GPEditorMapBoxToolsContainer",visibilityinput:"GPEditorMapBoxToolsVisibilityInput",visibilitylabel:"GPEditorMapBoxToolsVisibilityLabel",visibilityinputdisable:"GPEditorMapBoxToolsVisibilityInputDisable",visibilitylabeldisable:"GPEditorMapBoxToolsVisibilityLabelDisable"}}_initContainer(){var ee=this,te=this.options.obj,st=document.createElement("div");st.className=this.name.container;var ot=document.createElement("div");if(ot.id=this.name.containertitle+"-"+this.options.position,ot.className=this.name.containertitle,this.options.tools.pin){var ct=document.createElement("input");ct.id=this.name.imagelabelinput+"-"+this.options.position,ct.className=this.name.imagelabelinput,ct.type="checkbox",ot.appendChild(ct);var ut=document.createElement("label");ut.className=this.name.imagelabel,ut.htmlFor=ct.id,ut.addEventListener?ut.addEventListener("click",function(yt){ee.onClickLayerMapBox(yt)}):ut.attachEvent&&ut.attachEvent("onclick",function(yt){ee.onClickLayerMapBox(yt)}),ot.appendChild(ut)}var dt=function(){var yt=document.createElement("div");if(yt.id=this.name.containertools+"-"+this.options.position,yt.className=this.name.containertools,this.options.tools.visibility){var vt=document.createElement("input");vt.id=this.name.visibilityinput+"-"+this.options.position,vt.className=this.options.tools.icon.image?this.name.visibilityinput:this.name.visibilityinputdisable,vt.type="checkbox",vt.checked="checked",vt.addEventListener?vt.addEventListener("click",function(bt){ee.onVisibilityLayerMapBox(bt)}):vt.attachEvent&&vt.attachEvent("onclick",function(bt){ee.onVisibilityLayerMapBox(bt)}),yt.appendChild(vt),this.DomVisibility=vt;var _t=document.createElement("label");_t.htmlFor=this.name.visibilityinput+"-"+this.options.position,_t.id=this.name.visibilitylabel+"-"+this.options.position,_t.className=this.options.tools.icon.image?this.name.visibilitylabel:this.name.visibilitylabeldisable,_t.title="Afficher/masquer la couche",yt.appendChild(_t),st.appendChild(yt)}this.options.tools.clone&&logger$j.warn("Dom for tools clone, it's not yet implemented !"),this.options.tools.remove&&logger$j.warn("Dom for tools remove, it's not yet implemented !")};if(this.options.tools.icon.anchor==="start"&&dt.apply(this),this.options.tools.type&&te.type){var ht=document.createElement("img");switch(ht.className=this.name.typeimg,te.type.toUpperCase()){case"SYMBOL-ICON":ht.style["background-position"]="0px 0";break;case"SYMBOL-TEXT":ht.style["background-position"]="-194px 0";break;case"SYMBOL":ht.style["background-position"]="-84px 0";break;case"LINE":ht.style["background-position"]="-28px 0";break;case"FILL":ht.style["background-position"]="-56px 0";break;case"BACKGROUND":ht.style["background-position"]="-140px 0";break;
312case"CIRCLE":ht.style["background-position"]="-168px 0";break;default:ht.style["background-position"]="-112px 0"}ot.appendChild(ht)}var ft=document.createElement("div");ft.id=this.name.containerlegend+"-"+this.options.position,ft.className=this.name.containerlegend,ot.appendChild(ft);var pt=document.createElement("input");pt.id=this.name.titleinput+"-"+this.options.position,pt.className=this.name.titleinput,pt.type="checkbox",ot.appendChild(pt);var mt=document.createElement("label");mt.className=this.name.titlelabel,mt.htmlFor=pt.id,mt.innerHTML=te.id||te["source-layer"]||te.source,mt.title=te["source-layer"]||te.source||te.id,mt.addEventListener?mt.addEventListener("click",function(yt){ee.onClickLayerMapBox(yt)}):mt.attachEvent&&mt.attachEvent("onclick",function(yt){ee.onClickLayerMapBox(yt)}),ot.appendChild(mt),this.DomToggle=mt,st.appendChild(ot),this.options.tools.icon.anchor==="end"&&dt.apply(this),this.container=st}add(){if(logger$j.trace("add()"),!this.options.target){if(!document.getElementById(this.name.target)){var ee=document.createElement("div");ee.id=this.name.target;var te=document.documentElement||document.getElementsByTagName("body")[0]||document.getElementsByTagName("head")[0];te.appendChild(ee)}this.options.target=document.getElementById(this.name.target)}return this.container&&this.options.target.appendChild(this.container),this}addStyle(ee){logger$j.trace("addStyle()",ee),ee&&typeof ee=="object"&&ee instanceof Style&&(this.oStyle=ee,this.oStyle.display(!1))}addFilter(ee){logger$j.trace("addFilter()",ee),ee&&typeof ee=="object"&&ee instanceof Filter&&(this.oFilter=ee,this.oFilter.display(!1))}addLegend(ee){logger$j.trace("addLegend()",ee),ee&&typeof ee=="object"&&ee instanceof Legend&&(this.oLegend=ee,this.oLegend.display(!1))}slotLegend(){var ee=this.oLegend;if(ee){var te=null,st=this.container.childNodes;if(st.length)for(var ot=this.options.tools.icon.anchor==="start"?1:0,ct=st[ot].childNodes,ut=0;ut<ct.length;ut++){var dt=ct[ut];dt.id.indexOf(this.name.containerlegend)!==-1&&(te=dt)}if(te){var ht=ee.getRenderContainer();ht&&(te.appendChild(ht),this.bSlotLegend=!0)}}}visibility(ee){if(logger$j.trace("visibility()",ee),!!this.options.tools.visibility)return typeof ee<"u"&&(this.DomVisibility.checked=ee?"checked":""),this.DomVisibility.checked}collapse(){logger$j.trace("collapse()"),this.DomToggle.click()}visible(){logger$j.trace("visible()"),this.options.tools.visibility&&this.DomVisibility.click()}display(ee){logger$j.trace("display()",ee);var te=document.getElementById(this.DomToggle.htmlFor).checked;return typeof ee<"u"&&(this.container.style.display=ee?"inline-flex":"none",this.oStyle&&this.oStyle.display(ee&&te),this.oFilter&&this.oFilter.display(ee&&te),this.oLegend&&this.oLegend.display(ee&&te)),te}active(ee){return logger$j.trace("active()",ee),typeof ee<"u"&&(this.container.className=ee?this.name.container:this.name.container+" disabled"),this.container.className===this.name.container}getContainer(){return this.container}onClickLayerMapBox(ee){logger$j.trace("onClickLayerMapBox",ee);var te=ee.target.htmlFor.substring(ee.target.htmlFor.indexOf("-")),st=document.getElementById(ee.target.htmlFor).checked;ee.target.htmlFor===this.name.imagelabelinput+te&&(document.getElementById(this.name.titleinput+te).checked=!st),ee.target.htmlFor===this.name.titleinput+te&&document.getElementById(this.name.imagelabelinput+te)&&(document.getElementById(this.name.imagelabelinput+te).checked=!st),this.oStyle&&this.oStyle.display(!st),this.oFilter&&this.oFilter.display(!st),this.oLegend&&this.oLegend.isEditable()&&this.oLegend.display(!st)}onVisibilityLayerMapBox(ee){logger$j.trace("onVisibilityLayerMapBox",ee),ee.editorID=this.id,ee.data=this.options,EventBus.dispatch(EventEditor.layer.onclickvisibility,ee)}onCloneLayerMapBox(ee){logger$j.trace("onCloneLayerMapBox",ee),ee.editorID=this.id,ee.data=this.options,EventBus.dispatch(EventEditor.layer.onclickclone,ee)}onRemoveLayerMapBox(ee){logger$j.trace("onRemoveLayerMapBox",ee),ee.editorID=this.id,ee.data=this.options,EventBus.dispatch(EventEditor.layer.onclickremove,ee)}}window.ol&&window.ol.style&&(window.ol.style.editor||(window.ol.style.editor={}),window.ol.style.editor.Layer=Layer);var logger$i=LoggerByDefault.getLogger("editor-group");class Group{constructor(ee){if(logger$i.trace("[constructor] Group",ee),this.options=ee||{},!(this instanceof Group))throw new TypeError("ERROR CLASS_CONSTRUCTOR");this._initialize(),this._initContainer()}_initialize(){this.id=this.options.id||null,this.options.target,this.options.title||(this.options.title="Détails du groupe..."),typeof this.options.collapse>"u"&&(this.options.collapse=!0),this.container=null,this.name={target:"GPEditorMapBoxGroupTarget",container:"GPE
312ditorMapBoxGroupContainer",details:"GPEditorMapBoxGroupDetails",summary:"GPEditorMapBoxGroupSummary"}}_initContainer(){var ee=document.createElement("div");ee.className=this.name.container;var te=document.createElement("details");te.className=this.name.details,te.open=!this.options.collapse,ee.appendChild(te);var st=document.createElement("summary");st.className=this.name.summary,st.innerHTML=this.options.title,te.appendChild(st),this.container=ee}add(){if(!this.options.target){if(!document.getElementById(this.name.target)){var ee=document.createElement("div");ee.id=this.name.target;var te=document.documentElement||document.getElementsByTagName("body")[0]||document.getElementsByTagName("head")[0];te.appendChild(ee)}this.options.target=document.getElementById(this.name.target)}this.container&&this.options.target.appendChild(this.container)}display(ee){this.container.style.display=ee?"flex":"none"}getContainer(){var ee=this.container.childNodes;return ee.length?ee[0]:this.container}onCollapseGroupMapBox(ee){logger$i.trace("onCollapseGroupMapBox",ee),ee.editorID=this.id,ee.data=this.options,EventBus.dispatch(EventEditor.group.oncollapse,ee)}}var logger$h=LoggerByDefault.getLogger("editor-search");class Search{constructor(ee){if(logger$h.trace("[constructor] Search",ee),this.options=ee||{target:null,tools:null,title:null,obj:null},!(this instanceof Search))throw new TypeError("ERROR CLASS_CONSTRUCTOR");this._initialize(),this._initContainer()}_initialize(){this.id=this.options.id||null,this.options.target;var ee={};this.options.tools||(this.options.tools=ee),Helper.mergeParams(this.options.tools,ee,!1),this.options.obj||(this.options.obj={}),this.options.title||(this.options.title="Recherche de couches :"),this.container=null,this.name={target:"GPEditorMapBoxSearchTarget",container:"GPEditorMapBoxSearchContainer"}}_initContainer(){var ee=JSON.parse(JSON.stringify(this.options.obj));ee.layers&&ee.layers.length===0&&logger$h.info("tag 'layers' is empty !");var te=document.createElement("div");te.className=this.name.container,this.container=te}add(){if(!this.options.target){if(!document.getElementById(this.name.target)){var ee=document.createElement("div");ee.id=this.name.target;var te=document.documentElement||document.getElementsByTagName("body")[0]||document.getElementsByTagName("head")[0];te.appendChild(ee)}this.options.target=document.getElementById(this.name.target)}return this.container&&this.options.target.appendChild(this.container),this}display(ee){return logger$h.trace("display()",ee),typeof ee<"u"&&(this.container.style.display=ee?"flex":"none"),this.container.style.display==="flex"}getContainer(){return this.container}onSubmitSearchLayersMapBox(ee){logger$h.trace("onSubmitSearchLayersMapBox",ee),ee.editorID=this.id,ee.data=this.options,EventBus.dispatch(EventEditor.search.onsubmit,ee)}onAutocompleteSearchLayersMapBox(ee){logger$h.trace("onAutocompleteSearchLayersMapBox",ee),ee.editorID=this.id,ee.data=this.options,EventBus.dispatch(EventEditor.search.onautocomplete,ee)}}var EditorDOM={_addUID:function(ne){var ee=this._uid?ne+"-"+this._uid:ne;return ee}},logger$g=LoggerByDefault.getLogger("editor");class Editor{constructor(ee){if(logger$g.trace("[constructor] Editor",ee),this.options=ee||{},!(this instanceof Editor))throw new TypeError("ERROR CLASS_CONSTRUCTOR");this._initialize()}_initialize(){if(this.options.target||logger$g.info("La 'target' n'est pas renseignée (options.target)."),!this.options.style){logger$g.error("Le 'style' MapBox n'est pas renseigné (options.style) !");return}this.options.events?this._initEvents():logger$g.warn("Les 'handlers' ne sont pas renseignés (options.events) !"),this.options.themes||logger$g.info("Les 'themes' MapBox ne sont pas renseignés (options.themes).");var ee={themes:!1,layers:!0,search:!1,style:!1,filter:!1,legend:!1,group:!1,groupAuto:!1,sort:!0,sortBy:"id",sortOrder:"asc",title:!0,collapse:void 0,type:!0,pin:!0,visibility:!0,icon:{image:!0,anchor:"end"},editable:!0};this.options.tools||(logger$g.trace("Utilisation des outils MapBox par défaut (options.tools)."),this.options.tools=ee),Helper.mergeParam
312s(this.options.tools,ee,!1),this.id=this.options.id||SelectorID.generate(),this.context={},this.layers=[],this.container=null,this.name={target:"GPEditorMapBoxTarget",container:"GPEditorMapBoxContainer",containerID:"GPEditorMapBoxContainer_ID_",containerLayers:"GPEditorMapBoxLayersContainer",titleLayers:"GPEditorMapBoxLayersTitle",titleLayersID:"GPEditorMapBoxLayersTitle_ID_",titleThemes:"GPEditorMapBoxThemesTitle",titleThemesID:"GPEditorMapBoxThemesTitle_ID_",sep:"GPEditorMapBoxSep"},this.mapbox={},this.sprites={}}_initEvents(){var ee=this.options.scope||this,te=this.options.events;if(te){for(var st in te)if(te.hasOwnProperty(st)){var ot=te[st];ot&&(EventBus.hasEventListener(st,ot,ee)||EventBus.addEventListener(st,ot,ee))}}}_initContainer(){logger$g.trace(this.mapbox);var ee=document.createElement("div");ee.id=this.name.containerID+this.id,ee.className=this.name.container;var te=this.options.tools.themes;if(te&&this.options.themes){if(this.options.tools.title){var st=document.createElement("div");st.id=this.name.titleThemesID+this.id,st.className=this.name.titleThemes,st.innerHTML="Liste des 'thèmes'",ee.appendChild(st)}var ot=new Themes({id:this.id,target:ee,tools:typeof te=="object"?te:{},obj:this.options.themes});ot.add()}if(this.options.tools.search){var ct=new Search({id:this.id,target:ee,tools:{},obj:this.mapbox.layers});ct.add()}for(var ut in this.mapbox.sources)if(this.mapbox.sources.hasOwnProperty(ut)){if(this.options.tools.layers){var dt=Object.keys(this.mapbox.sources).length>1?1:0;if(dt){var ht=document.createElement("hr");ht.className=this.name.sep,ee.appendChild(ht)}if(this.options.tools.title){var ft=document.createElement("div");ft.id=this.name.titleLayersID+this.id,ft.className=this.name.titleLayers,ft.innerHTML=dt?"Liste des 'couches' ("+ut+")":"Liste des 'couches'",ee.appendChild(ft)}}var pt=this.mapbox.layers.slice();if(pt.forEach(function(An,Nn){var Xt=An.metadata;Xt?Xt["geoportail:order"]=Nn:An.metadata={"geoportail:order":Nn}}),this.options.tools.sort){var mt=this.options.tools.sortBy,yt=this.options.tools.sortOrder,vt=function(An,Nn){var Xt=0;if(An.metadata&&An.metadata["geoportail:group"]&&Nn.metadata&&Nn.metadata["geoportail:group"]){var Zt=null,Kt=null;Zt=An.metadata["geoportail:group"],Kt=Nn.metadata["geoportail:group"],Xt=Zt.localeCompare(Kt)}else switch(mt){case"geom":Xt=yt==="asc"?An.type.localeCompare(Nn.type)||An.id.localeCompare(Nn.id):Nn.type.localeCompare(An.type)||Nn.id.localeCompare(An.id);break;case"class":Xt=yt==="asc"?An["source-layer"].localeCompare(Nn["source-layer"])||An.id.localeCompare(Nn.id):Nn["source-layer"].localeCompare(An["source-layer"])||Nn.id.localeCompare(An.id);break;case"id":default:Xt=yt==="asc"?An.id.localeCompare(Nn.id):Nn.id.localeCompare(An.id);break}return Xt};pt.sort(vt)}logger$g.trace("Layers : ",pt);var _t=this.options.tools.sortBy,bt=this.options.tools.groupAuto,xt={};pt.forEach(function(An){var Nn=An.metadata;if(Nn&&Nn["geoportail:group"]){var Xt=Nn["geoportail:group"];xt[Xt]=xt[Xt]?xt[Xt]+1:1}else{var Zt=null;switch(_t){case"class":Zt=An["source-layer"];break;case"geom":Zt=An.type;break;case"id":default:Zt=An.id;break}var Kt=Zt;if(bt){var ti=/_|-|:|=/,qt=Zt.search(ti);Kt=qt!==-1?Zt.substring(0,qt).trim():Zt}xt[Kt]=xt[Kt]?xt[Kt]+1:1,Nn?Nn["geoportail:group"]=Kt:An.metadata={"geoportail:group":Kt}}}),logger$g.trace("Groups : ",xt);var Mt=document.createElement("div");Mt.className=this.name.containerLayers,ee.appendChild(Mt);var Ot;if(this.options.tools.collapse!==void 0){Ot=document.createElement("details"),Ot.className="",Ot.open=!this.options.tools.collapse,Mt.appendChild(Ot);var kt=document.createElement("summary");kt.className="",kt.innerHTML="",Ot.appendChild(kt)}for(var Nt=this.options.tools.collapse!==void 0?Ot:Mt,Gt=-1,Bt=0;Bt<pt.length;Bt++){var Ut=pt[Bt];if(Gt++,Ut.source===ut){if(this.options.tools.group&&this.options.tools.sort){var Vt=Ut.metadata;if(Vt){var Ht=Ut.metadata["geoportail:group"];if(Ht)if(xt[Ht]>1){xt[Ht]=-1;var zt=new Group({id:this.id,target:this.options.tools.collapse!==void 0?Ot:Mt,title:Ht,collapse:!0});zt.add(),Nt=zt.getContainer()}else xt[Ht]===1&&(Nt=this.options.tools.collapse!==void 0?Ot:Mt);else Nt=this.options.tools.collapse!==void 0?Ot:Mt}else Nt=this.options.tools.collapse!==void 0?Ot:Mt}if(this.options.tools.layers){var jt=new Layer({id:this.id,target:Nt,position:Gt+"_"+this.id,tools:{visibility:this.options.tools.visibility,icon:this.options.tools.icon,type:this.options.tools.type,pin:this.options.tools.pin},obj:{id:Ut.id,type:Ut.type,source:Ut.source,"source-layer":Ut["source-layer"]}});jt.add(),Ut.layout&&Ut.layout.visibility&&Ut.layout.visibility==="none"&&jt.visibility(!1),this.layers.push(jt)}if(this.options.tools.legend){var Wt=this.options.tools.editable;typeof Wt>"u"&&(Wt=Ut.editable);var Jt=new Legend({id:this.id,target:Nt,sprites:this.sprites,obj:{id:Ut.id,source:Ut.source,title:Ut.id,editable:typeof Wt<"u"?Wt:!1,paint:Ut.paint,layout:Ut.layout}});
312Jt.add(),Jt.display(!1),jt&&(jt.addLegend(Jt),jt.slotLegend())}if(this.options.tools.style){var Qt=new Style({id:this.id,target:Nt,position:Gt+"_"+this.id,obj:{id:Ut.id,source:Ut.source,layout:Ut.layout,paint:Ut.paint}});Qt.add(),Qt.display(!1),jt&&jt.addStyle(Qt),Ut.layout&&Ut.layout.visibility&&Ut.layout.visibility==="none"&&jt.visibility(!1)}if(this.options.tools.filter){var oi=new Filter({id:this.id,target:Nt,position:Gt+"_"+this.id,obj:{id:Ut.id,source:Ut.source,filter:Ut.Filter}});oi.add(),oi.display(!1),jt&&jt.addFilter(oi)}}else Gt>=0&&Gt--}}if(this.container=ee,!this.options.target){if(!document.getElementById(this.name.target)){var ai=document.createElement("div");ai.id=this.name.target;var xn=document.getElementsByTagName("body")[0]||document.getElementsByTagName("head")[0]||document.documentElement;xn.appendChild(ai)}this.options.target=document.getElementById(this.name.target)}this.container&&this.options.target.appendChild(this.container),EventBus.dispatch(EventEditor.onloaded,this)}_getSprites(ee){var te=this;if(ee&&ee.startsWith("mapbox://"))return new Promise((ct,ut)=>{logger$g.error("Protocole mapbox:// non géré !"),ct(te)});if(!ee)return new Promise((ct,ut)=>{logger$g.error("Auncun sprites disponibles !"),ct(te)});var st=function(){var ct=ee+".png";return fetch(ct,{credentials:"same-origin"}).then(function(ut){if(ut.ok)return ut.blob().then(function(ht){te.sprites.url=ct;var ft=new Image;return ft.src=ct,ft.decode().then(function(){te.sprites.size={},te.sprites.size.h=ft.height,te.sprites.size.w=ft.width})}).catch(ht=>{logger$g.warn("fetch image sprites exception :",ht)});var dt=new Error("HTTP status code: "+ut.status);throw dt}).catch(ut=>new Promise((dt,ht)=>{logger$g.error("fetch image sprites exception :",ut),ht(ut)}))},ot=function(){var ct=ee+".json";return fetch(ct,{credentials:"same-origin"}).then(function(ut){if(ut.ok)return ut.json().then(function(ht){te.sprites.json=ht}).catch(ht=>{logger$g.warn("fetch json sprites exception :",ht)});var dt=new Error("HTTP status code: "+ut.status);throw dt}).catch(ut=>new Promise((dt,ht)=>{logger$g.error("fetch json sprites exception :",ut),ht(ut)}))};return Promise.all([st(),ot()])}createElement(){var ee=this;if(typeof this.options.style=="object")return this.mapbox=this.options.style,this.options.tools.legend?this._getSprites(this.mapbox.sprite).then(function(){return ee._initContainer(),ee}).catch(te=>{logger$g.warn("fetch sprites exception :",te)}):new Promise((te,st)=>{ee._initContainer(),te(ee)});if(typeof this.options.style=="string")return fetch(this.options.style,{credentials:"same-origin"}).then(te=>te.json().then(st=>{ee.mapbox=st}).then(function(){return ee.options.tools.legend?ee._getSprites(ee.mapbox.sprite).then(function(){return ee._initContainer(),ee}).catch(st=>{logger$g.warn("fetch sprites exception :",st)}):new Promise((st,ot)=>{ee._initContainer(),st(ee)})}).catch(st=>{logger$g.error("json exception :",st)})).catch(te=>{logger$g.error("fetch exception :",te)})}display(ee){this.container.style.display=ee?"block":"none"}setContext(ee,te){this.context[ee]=te}getContext(ee){return this.context[ee]}getID(){return this.id}getContainer(){return this.container}getStyle(){return this.mapbox}getStyleLayer(ee){for(var te=null,st=this.getLayer(ee),ot=st.options.obj.id,ct=0;ct<this.mapbox.layers.length;ct++){var ut=this.mapbox.layers[ct];if(ut.id===ot){te=ut;break}}return te}getLayerFromStyle(ee){for(var te=null,st=this.mapbox.layers[ee],ot=0;ot<this.getLayers().length;ot++){var ct=this.getLayer(ot);if(st.id===ct.options.obj.id){te=ct;break}}return te}getLayers(){return this.layers}getLayer(ee){return this.layers[ee]}}Helper.assign(Editor.prototype,EditorDOM);window.ol&&window.ol.style&&(window.ol.style.Editor=Editor);var LayerImportDOM={_addUID:function(ne){var ee=this._uid?ne+"-"+this._uid:ne;return ee},_createLoadingElement:function(){var ne=document.createElement("div");return ne.id="GPmapLoading",ne.className="",ne},_createMainContainerElement:function(){var ne=document.createElement("div");return ne.id=this._addUID("GPimport"),ne.className="GPwidget gpf-widget gpf-widget-button gpf-mobile-fullscreen",ne},_createShowImportPictoElement:function(){var ne=this,ee=document.createElement("button"),te=document.createElement("span");return ee.appendChild(te),ee.id=this._addUID("GPshowImportPicto"),ee.classList.add("GPshowOpen","GPshowAdvancedToolPicto","GPshowImportPicto"),ee.classList.add("gpf-btn","gpf-btn--tertiary","gpf-btn-icon","gpf-btn-icon-import"),ee.classList.add("fr-btn","fr-btn--tertiary"),ee.setAttribute("aria-label","Ouvrir l'import de couches"),ee.setAttribute("tabindex","0"),ee.setAttribute("aria-pressed",!1),ee.setAttribute("type","button"),ee.addEventListener?ee.addEventListener("click",function(st){var ot=st.target.ariaPressed==="true";st.target.setAttribute("aria-pressed",!ot),ne._onShowImportClick(st)}):ee.attachEvent&&ee.attachEvent("onclick",function(st){var ot=st.target.ariaPressed==="true";st.target.setAttribute("aria-pressed",!ot),ne._onShowImportClick(st)}),ee},_createImportPanelElement:function(){var ne=document.createElement("dialog");return ne.id=this._addUID("GPimportPanel"),ne.className="GPpanel gpf-panel fr-modal",ne},_createImportPanelDivElement:function(){var ne=document.createElement("div");
312return ne.className="gpf-panel__body fr-modal__body",ne},_createImportPanelFormElement:function(){var ne=this,ee=document.createElement("form");return ee.id=this._addUID("GPimportForm"),ee.className="GPform GPelementVisible gpf-visible gpf-mobile-form gpf-panel__content fr-modal__content",ee.addEventListener?ee.addEventListener("submit",function(te){te.preventDefault(),ne._onImportSubmit()}):ee.attachEvent&&ee.attachEvent("onsubmit",function(te){te.preventDefault(),ne._onImportSubmit()}),ee},_createImportTypeLineElement:function(ne){var ee=this,te=document.createElement("div");te.id=this._addUID("GPimportTypeLine"),te.className="GPimportInputLine";var st=document.createElement("label");st.id=this._addUID("GPimportTypeLabel"),st.className="GPlabel gpf-label fr-label",st.innerHTML="Type de donnée",st.title="Type de donnée",te.appendChild(st);var ot=document.createElement("select");ot.setAttribute("aria-labelledby",this._addUID("GPimportTypeLabel")),ot.className="GPselect gpf-select fr-select";var ct="GPelementVisible gpf-visible"+(ee.options&&ee.options.dragAndDropUI?"":" fr-my-4w");ot.addEventListener?ot.addEventListener("change",function(ht){this.value==="KML"||this.value==="GPX"||this.value==="GeoJSON"||this.value==="MAPBOX"?(document.getElementById(ee._addUID("GPimportStaticParams")).className=ct,document.getElementById(ee._addUID("GPimportServiceParams")).className="GPelementHidden gpf-hidden"):(this.value==="WMS"||this.value==="WMTS"||this.value==="WFS")&&(document.getElementById(ee._addUID("GPimportServiceParams")).className="GPelementVisible gpf-visible fr-my-4w",document.getElementById(ee._addUID("GPimportStaticParams")).className="GPelementHidden gpf-hidden"),ee._onImportTypeChange(ht)}):ot.attachEvent&&ot.attachEvent("onchange",function(){this.value==="KML"||this.value==="GPX"||this.value==="GeoJSON"||this.value==="MAPBOX"?(document.getElementById(ee._addUID("GPimportStaticParams")).className=ct,document.getElementById(ee._addUID("GPimportServiceParams")).className="GPelementHidden gpf-hidden"):(this.value==="WMS"||this.value==="WMTS"||this.value==="WFS")&&(document.getElementById(ee._addUID("GPimportServiceParams")).className="GPelementVisible gpf-visible fr-my-4w",document.getElementById(ee._addUID("GPimportStaticParams")).className="GPelementHidden gpf-hidden"),ee._onImportTypeChange()}),ot.id=this._addUID("GPimportTypeSelect"),(!ne||!Array.isArray(ne))&&(ne=["KML","GPX","GeoJSON","MAPBOX","WMS","WMTS","WFS"]);for(var ut,dt=0;dt<ne.length;dt++)ut=document.createElement("option"),ut.value=ne[dt],ut.text=ne[dt]==="MAPBOX"?"Tuiles vectorielles":ne[dt],ot.appendChild(ut);return te.appendChild(ot),te},_createImportWaitingElement:function(){var ne=document.createElement("div");ne.id=this._addUID("GPimportWaitingContainer"),ne.className="GPwaitingContainer GPwaitingContainerHidden gpf-waiting gpf-waiting--hidden";var ee=document.createElement("p");return ee.className="GPwaitingContainerInfo gpf-waiting_info",ee.innerHTML="Recherche en cours...",ne.appendChild(ee),ne},_createImportStaticParamsContainer:function(ne){var ee=document.createElement("div");return ee.id=this._addUID("GPimportStaticParams"),ne==="KML"||ne==="GPX"||ne==="GeoJSON"||ne==="MAPBOX"?ee.className="GPelementVisible gpf-visible fr-mt-4w"+(this.options&&this.options.dragAndDropUI?"":" fr-mb-4w"):ee.className="GPelementHidden gpf-hidden",ee},_createStaticNameLabel:function(){var ne=document.createElement("div");ne.className="GPimportInputLine fr-mb-1w";var ee=document.createElement("label");ee.className="GPlabel gpf-label fr-label",ee.htmlFor=this._addUID("GPimportName"),ee.innerHTML="Nom",ee.title="Nom",ne.appendChild(ee);var te=document.createElement("input");return te.type="text",te.id=this._addUID("GPimportName"),te.className="GPinput gpf-input fr-input",ne.appendChild(te),ne},_createStaticModeChoiceDiv:function(){var ne=document.createElement("div");return ne.id=this._addUID("GPimportChoice"),ne.className="fr-my-1w",ne},_createStaticLocalChoiceDiv:function(){var ne=this,ee=document.createElement("div");ee.className="GPimportChoiceAlt gpf-radio-group fr-radio-group";var te=document.createElement("input");te.type="radio",te.addEventListener?te.addEventListener("change",function(ot){document.getElementById(ne._addUID("GPimportValueLocal")).className="GPimportInputLine fr-mb-1w",document.getElementById(ne._addUID("GPimportValueUrl")).className="GPelementHidden gpf-hidden",ne._onStaticImportTypeChange(ot)}):te.appendChild&&te.appendChild("onchange",function(){document.getElementById(ne._addUID("GPimportValueLocal")).className="GPimportInputLine fr-mb-1w",document.getElementById(ne._addUID("GPimportValueUrl")).className="GPelementHidden gpf-hidden",ne._onStaticImportTypeChange()}),te.name="GPimportChoiceMode",te.value="local",te.checked=!0,te.id=this._addUID("GPimportChoiceAltLocal"),ee.appendChild(te);var st=document.createElement("label");return st.className="GPimportChoiceAltTxt gpf-label fr-label",st.htmlFor=this._addUID("GPimportChoiceAltLocal"),st.innerHTML="par fichier local",st.title="par fichier local",ee.appendChild(st),ee},_createStaticUrlChoiceDiv:function(){var ne=this,ee=document.createElement("div");ee.className="GPimportChoiceAlt gpf-radio-group fr-radio-group";var te=document.createElement("input");te.type="radio",te.addEventListener?te.addEventListener("change",function(ot){document.getElementById(ne._addUID("GPimportValueUrl")).className="GPimportInputLine",document.getElementById(ne._addUID("GPimportValueLocal")).className="GPelementHidden gpf-hidden",ne._onStaticImportTypeChange(ot)}):te.appendChild&&te.appendChild("onchange",function(){document.getElementById(ne._addUID("GPimportValueUrl")).className="GPimportInputLine",document.getElementById(ne._addUID("GPimportValueLocal")).className="GPelementHidden gpf-hidden",ne._onStaticImportTypeChange()}),te.id=this._addUID("GPimportChoiceAltUrl"),te.name="GPimportChoiceMode",te.value="url",te.checked=!1,ee.appendChild(te);var st=document.createElement("label");return st.className="GPimportChoiceAltTxt gpf-label fr-label",st.htmlFor=this._addUID("GPimportChoiceAltUrl"),st.innerHTML="par URL",st.title="par URL",ee.appendChild(st),ee},_createStaticLocalInputDiv:function(){var ne=document.createElement("div");return ne.id=this._addUID("GPimportValueLocal"),ne.className="GPimportInputLine",ne},_createStaticLocalInputLabel:function(){var ne=document.createElement("label");return ne.className="GPlabel gpf-label fr-label fr-mb-1w",ne.htmlFor=this._addUID("GPimportFile"),ne.innerHTML="Fichier local",ne.title="Fichier local",ne},_createStaticLocalInput:function(){var ne=document.createElement("input");return ne.type="file",ne.id=this._addUID("GPimportFile"),ne.className="GPimportInputFile gpf-upload fr-upload",ne},_createStaticLocalDropZone:function(ne){var ee=document.createElement("div");ee.id=this._addUID("GPimportDropZone"),ee.className="GPimportDropZone fr-p-3w";var te=document.createElement("div");te.className="GPimportDropZoneIcon",te.setAttribute("aria-hidden","true"),ee.appendChild(te);var st=document.createElement("p");st.className="GPimportDropZoneText fr-mb-2w",st.innerHTML="Glissez-déposez votre fichier ici",ee.appendChild(st);var ot=document.createElement("p");ot.className="GPimportDropZoneTextSecondary fr-mb-2w",ot.innerHTML="ou",ee.appendChild(ot);var ct=document.createElement("button");ct.type="button",ct.id=this._addUID("GPimportBrowse"),ct.className="GPimportDropZoneBrowse fr-btn fr-btn--secondary",ct.innerHTML="Parcourir",ct.title="Parcourir",ct.addEventListener("click",function(){ne.click()}),ee.appendChild(ct);var ut=document.createElement("p");return ut.id=this._addUID("GPimportDropZoneFileName"),ut.className="GPimportDropZoneFileName fr-mt-2w",ee.appendChild(ut),ne.classList.add("GPelementHidden","gpf-hidden"),ne.addEventListener("change",function(){ut.textContent=ne.files&&ne.files[0]?ne.files[0].name:""}),ee.appendChild(ne),["dragenter","dragover"].forEach(function(dt){ee.addEventListener(dt,function(ht){ht.preventDefault(),ht.stopPropagation(),ee.classList.add("GPimportDropZoneHover")})}),["dragleave","drop"].forEach(function(dt){ee.addEventListener(dt,function(ht){ht.preventDefault(),ht.stopPropagation(),ee.classList.remove("GPimportDropZoneHover")})}),ee.addEventListener("drop",function(dt){if(dt.dataTransfer&&dt.dataTransfer.files&&dt.dataTransfer.files.length){var ht=new DataTransfer;ht.items.add(dt.dataTransfer.files[0]),ne.files=ht.files,ut.textContent=ne.files[0].name}}),ee},_createStaticUrlInputDiv:function(){var ne=document.createElement("div");return ne.id=this._addUID("GPimportValueUrl"),ne.className="GPelementHidden gpf-hidden",ne},_createStaticUrlInputLabel:function(){var ne=document.createElement("label");return ne.className="GPlabel gpf-label fr-label",ne.htmlFor=this._addUID("GPimportUrl"),ne.innerHTML="URL",ne.title="URL",ne},_createStaticUrlInput:function(){var ne=document.createElement("input");return ne.type="text",ne.id=this._addUID("GPimportUrl"),ne.className="GPinput gpf-input fr-input",ne},_createServiceParamsContainer:function(ne){var ee=document.createElement("div");return ee.id=this._addUID("GPimportServiceParams"),ne==="WMS"||ne==="WMTS"||ne==="WFS"?ee.className="GPelementVisible gpf-visible":ee.className="GPelementHidden gpf-hidden",ee},_createServiceUrlDiv:function(){var ne=document.createElement("div");return ne.className="GPimportInputLine",ne},_createServiceUrlInputLabel:function(){var ne=document.createElement("label");return ne.className="GPlabel gpf-label fr-label",ne.htmlFor=this._addUID("GPimportServiceUrl"),ne.innerHTML="URL du service",ne.title="URL du service",ne},_createServiceUrlInput:function(){var ne=document.createElement("input");return ne.type="text",ne.id=this._addUID("GPimportServiceUrl"),ne.className="GPinput gpf-input fr-input",ne},_createImportSubmitFormElement:function(){var ne=document.createElement("input");return ne.id=this._addUID("GPimportSubmit"),ne.className="GPsubmit gpf-btn fr-btn",this.options&&this.options.dragAndDropUI&&ne.classList.add("GPimportSubmitRight"),ne.type="submit",ne.value="Importer",ne},_createImportGetCapPanelElement:function(){var ne=document.createElement("div");return ne.id=this._addUID("GPimportGetCapPanel"),ne.className="GPpanel GPelementHidden gpf-hidden",ne},_createImportGetCapPanelHeaderElement:function(){var ne=this,ee=document.createElement("div");ee.className="GPpanelHeader gpf-panel__header";var te=document.createElement("div");te.className="GPpanelTitle gpf-panel__title",te.innerHTML="Couches accessibles",te.title="Couches accessibles",ee.appendChild(te);var st=document.createElement("button");st.className="GPpanelClose GPimportGetCapPanelClose gpf-btn gpf-btn-icon-close fr-btn--close fr-btn fr-btn--tertiary-no-outline fr-m-1w",st.title="Fermer le panneau",st.id=this._addUID("GPimportGetCapPanelClose"),st.addEventListener?st.addEventListener("click",function(){document.getElementById(ne._addUID("GPshowImportPicto")).click(),document.getElementById(ne._addUID("GPimportGetCapPanel")).classList.replace("GPelementVisible","GPelementHidden"),document.getElementById(ne._addUID("GPimportGetCapPanel")).classList.replace("gpf-visible","gpf-hidden"),ne._onGetCapPanelClose()}):st.attachEvent&&st.attachEvent("click",function(){document.getElementById(ne._addUID("GPshowImportPicto")).click(),document.getElementById(ne._addUID("GPimportGetCapPanel")).classList.replace("GPelementVisible","GPelementHidden"),document.getElementById(ne._addUID("GPimportGetCapPanel")).classList.replace("gpf-visible","gpf-hidden"),ne._onGetCapPanelClose()});var ot=document.createElement("span");return ot.className="GPelementHidden gpf-visible",ot.innerText="Fermer",st.appendChild(ot),ee.appendChild(st),ee},_createImportGetCapResultsContainer:function(){var ne=document.createElement("div");return ne.className="GPimportGetCapRoot",ne.id=this._addUID("GPimportGetCapResults"),ne},_addImportGetCapResultListRubrique:function(ne,ee){var te=document.createElement("ul");return te.className="GPimportGetCapListRubrique",te.title=ne,ee.appendChild(te),ee},_addImportGetCapResultRubrique:function(ne,ee){var te=document.createElement("li");te.className="GPimportGetCapRubrique gpf-panel__items_layerimport";var st=document.createElement("input");st.id="GPimportGetCapRubrique-"+SelectorID.generate(),st.className="GPimportGetCapRubrique",st.type="checkbox",te.appendChild(st);var ot=document.createElement("label");return ot.className="GPimportGetCapRubriqueTitle gpf-label fr-btn fr-btn--secondary",ot.htmlFor=st.id,ot.innerHTML=ne,ot.title=ne,te.appendChild(ot),ee.appendChild(te),ee},_addImportGetCapResultListLayer:function(ne){var ee=document.createElement("ul");return ee.className="GPimportGetCapListLayer",ne.appendChild(ee),ne},_addImportGetCapResultLayer:function(ne,ee,te){var st=document.createElement("li");st.className="GPimportGetCapProposal gpf-panel__items_layerimport gpf-panel__items",st.innerHTML=ne.content,st.title=ne.title,st.id="GPimportGetCapProposal_"+ee;var ot=this;return st.addEventListener?st.addEventListener("click",function(ct){ot._onGetCapResponseLayerClick(ct)}):st.attachEvent&&st.attachEvent("onclick",function(){ot._onGetCapResponseLayerClick()}),te.appendChild(st),te},_createImportMapBoxPanelElement:function(){var ne=document.createElement("div");return ne.id=this._addUID("GPimportMapBoxPanel"),ne.className="GPpanel GPelementHidden gpf-hidden",ne},_createImportMapBoxPanelHeaderElement:function(){var ne=this,ee=document.createElement("div");ee.className="GPpanelHeader gpf-panel__header";var te=document.createElement("button");te.id=this._addUID("GPimportMapBoxPanelReturnPicto"),te.title="Nouvel import",te.className="GPreturnPicto GPimportMapBoxPanelReturnPicto gpf-btn gpf-btn-icon-return fr-btn fr-btn--secondary gpf-btn--secondary",te.addEventListener?te.addEventListener("click",function(ut){document.getElementById(ne._addUID("GPshowImportPicto")).click(),ne._onMapBoxReturnPictoCl
312ick(ut)}):te.attachEvent&&te.attachEvent("onclick",function(ut){document.getElementById(ne._addUID("GPshowImportPicto")).click(),ne._onMapBoxReturnPictoClick(ut)}),ee.appendChild(te);var st=document.createElement("div");st.className="GPpanelTitle gpf-panel__title",st.innerHTML="Edition des styles",st.title="Edition des styles",ee.appendChild(st);var ot=document.createElement("button");ot.className="GPpanelClose GPimportMapBoxPanelClose gpf-btn gpf-btn-icon-close fr-btn--close fr-btn fr-btn--tertiary-no-outline fr-m-1w",ot.title="Fermer le panneau",ot.id=this._addUID("GPimportMapBoxPanelClose"),ot.addEventListener?ot.addEventListener("click",function(){document.getElementById(ne._addUID("GPshowImportPicto")).click(),document.getElementById(ne._addUID("GPimportMapBoxPanel")).style.display="none",ne._onMapBoxPanelClose()}):ot.attachEvent&&ot.attachEvent("click",function(){document.getElementById(ne._addUID("GPshowImportPicto")).click(),document.getElementById(ne._addUID("GPimportMapBoxPanel")).style.display="none",ne._onMapBoxPanelClose()});var ct=document.createElement("span");return ct.className="GPelementHidden gpf-visible",ct.innerText="Fermer",ot.appendChild(ct),ee.appendChild(ot),ee},_createImportMapBoxResultsContainer:function(){var ne=document.createElement("div");return ne.className="GPimportMapBoxpRoot",ne.id=this._addUID("GPimportMapBoxResults"),ne}},MeasureToolBoxDOM={_toolboxId:"GPtoolbox-measure-main",_buttonId:"GPtoolbox-measure-button",_widgetId:"GPtoolbox-measure-widget",getToolBoxID:function(ne){return ne?this._toolboxId+"-"+ne:this._toolboxId},getButtonID:function(ne){return ne?this._buttonId+"-"+ne:this._buttonId},getWidgetID:function(ne){return ne?this._widgetId+"-"+ne:this._widgetId},_createToolBoxContainerElement:function(ne){var ee=document.createElement("div");ee.id=this.getToolBoxID(ne),ee.className="GPshowAdvancedToolPicto";var te=document.createElement("button");te.id=this.getButtonID(ne),te.className="GPshowOpen GPshowAdvancedToolPicto GPshowToolBoxPicto gpf-btn gpf-btn-icon-toolbox fr-btn",te.setAttribute("tabindex","0"),te.setAttribute("aria-pressed",!1),te.setAttribute("type","button");var st=this;te.addEventListener("click",function(ct){var ut=ct.target.ariaPressed==="true";ct.target.setAttribute("aria-pressed",!ut),this.blur();var dt=document.getElementById(st.getWidgetID(ne));dt.style.display==="block"?dt.style.display="none":dt.style.display="block"}),ee.appendChild(te);var ot=document.createElement("div");return ot.id=this.getWidgetID(ne),ot.addEventListener("click",function(){},!1),ee.appendChild(ot),ee}},logger$f=LoggerByDefault.getLogger("toolbox"),MeasureToolBox={_toolbox:{},add:function(ne,ee){if(logger$f.trace("ToolBox.add()",ee),!ne){logger$f.trace("map doesn't exist !?");return}var te=typeof window<"u"?window:typeof self<"u"?self:null;te&&(this._toolbox=te.gpShareMeasureToolBox||{});var st=ne.getTargetElement(),ot=st.ownerDocument,ct=st.id;!this._toolbox||Object.keys(this._toolbox).length===0?(this._toolbox={},this._toolbox[ct]=SelectorID.generate()):this._toolbox[ct]||(this._toolbox[ct]=SelectorID.generate());var ut=this._toolbox[ct];if(!ot.getElementById(this.getToolBoxID(ut))){logger$f.trace("create toolbox !");var dt=this._createToolBoxContainerElement(ut);dt.style.pointerEvents="auto";var ht=st.getElementsByClassName("ol-overlaycontainer-stopevent");ht[0].appendChild(dt)}var ft=ot.getElementById(this.getWidgetID(ut));ee.setTarget(ft),te&&(te.gpShareMeasureToolBox=this._toolbox),logger$f.trace("add control to toolbox !")}};Helper.assign(MeasureToolBox,MeasureToolBoxDOM);var logger$e=LoggerByDefault.getLogger("measures"),Measures={DEFAULT_POINTER_STYLE:new CircleStyle({radius:5,stroke:new Stroke({color:"#002A50",width:2}),fill:new Fill({color:"rgba(255, 155, 0, 0.7)"})}),DEFAULT_DRAW_START_STYLE:new Style$1({fill:new Fill({color:"rgba(0, 183, 152, 0.2)"}),stroke:new Stroke({color:"#002A50",lineDash:[10,10],width:2})}),DEFAULT_DRAW_FINISH_STYLE:new Style$1({fill:new Fill({color:"rgba(0, 183, 152, 0.3)"}),stroke:new Stroke({color:"#002A50",width:3})}),tools:{MeasureLength:[],MeasureArea:[],MeasureAzimuth:[]},measureDraw:null,measureSource:null,measureVector:null,eventLayerRemove:null,sketch:null,measureTooltipElement:null,measureTooltip:null,helpTooltipElement:null,helpTooltip:null,clean:function(){var ne=this.CLASSNAME;logger$e.trace("["+ne+"] deactived tool !"),this.clearMeasure(),this.clearMeasureToolTip(),this.removeMeasureEvents(),this._pictoContainer.setAttribute("aria-pressed",!1)},onPointerMoveHandler:function(ne){if(!ne.dragging){var ee=ne.coordinate;if(this.sketch){var te,st=this.sketch.getGeometry();if(te=this.format(st),st.getType()==="LineString")ee=st.getLastCoordinate();else if(st.getType()==="Polygon")ee=st.getInteriorPoint().getCoordinates();else return;this.measureTooltipElement.innerHTML=te,this.measureTooltip.setPosition(ee)}}},onShowMeasureClick:function(ne,ee){this._pictoContainer.ariaPressed==="true"?this.onPanelOpen():this.onPanelClose();var te=this.getMap(),st=te.getTargetElement().id,ot=typeof window<"u"?window:typeof self<"u"?self:null;ot&&(this.tools=ot.gpShareMeasures||{});var ct=this.CLASSNAME;for(var ut in this.tools)if(this.tools.hasOwnProperty(ut))for(var dt=this.tools[ut],ht=0;ht<dt.length;ht++){var ft=dt[ht];ft&&ft.active&&ut!==ct&&ft.map.id===st&&(ft.active=!1,ft.instance!==null&&ft.instance.clean())}Interactions.unset(te,{current:"Measures"});var pt=this._pictoContainer.ariaPressed;if(pt==="true"){this.addMeasureEvents(),this.initMeasureInteraction(),this.addMeasureInteraction(ee);for(var mt=0;mt<this.tools[ct].length;mt++)this.tools[ct][mt].map.id===st&&(this.tools[ct][mt].active=!0)}else{this.clearMeasure(),this.clearMeasureToolTip(),this.removeMeasureEvents();for(var yt=0;yt<this.tools[ct].length;yt++)this.tools[ct][yt].map.id===st&&(this.tools[ct][yt].active=!1)}},clearMeasureToolTip:function(){var ne=this.getMap();if(ne)for(var ee=ne.getTargetElement(),te=ee.getElementsByClassName("ol-overlaycontainer"),st=0;st<te.length;st++){for(var ot=te[st],ct=ot.children.length,ut=[],dt=0;dt<ct;dt++){var ht=ot.children[dt];if(ht.children.length!==0){var ft=ht.children[0];(ft.className==="GPmeasureTooltip GPmeasureTooltip-static"||ft.className==="GPmeasureTooltip GPmeasureTooltip-measure")&&ut.push(ht)}}for(var pt=0;pt<ut.length;pt++)ot.removeChild(ut[pt])}},clearMeasure:function(){var ne=this.getMap();this.measureVector&&(ne.removeLayer(this.measureVector),this.measureVector=null),this.measureDraw&&(ne.removeInteraction(this.measureDraw),this.measureDraw=null)},createMeasureTooltip:function(ne){this.measureTooltipElement&&this.measureTooltipElement.parentNode.removeChild(this.measureTooltipElement),this.measureTooltipElement=document.createElement("div"),this.measureTooltipElement.className="GPmeasureTooltip GPmeasureTooltip-measure",this.measureTooltip=new Overlay({element:this.measureTooltipElement,stopEvent:!1,offset:[0,-15],positioning:"bottom-center"}),ne.addOverlay(this.measureTooltip)},createHelpTooltip:function(ne){this.helpTooltipElement&&this.helpTooltipElement.parentNode.removeChild(this.helpTooltipElement),this.helpTooltipElement=document.createElement("div"),this.helpTooltipElement.className="tooltip hidden",this.helpTooltip=new Overlay({element:this.helpTooltipElement,stopEvent:!1,offset:[15,0],positioning:"center-left"}),ne.addOverlay(this.helpTooltip)},createStylingMeasureInteraction:function(ne){this.options.styles=ne||{},logger$e.trace("style start",this.options.styles.start);var ee={image:Measures.DEFAULT_POINTER_STYLE,fill:Measures.DEFAULT_DRAW_START_STYLE.getFill(),stroke:Measures.DEFAULT_DRAW_START_STYLE.getStroke()};this.options.styles.hasOwnProperty("pointer")&&this.options.styles.pointer instanceof Image&&(ee.image=this.options.styles.pointer),this.options.styles.hasOwnProperty("start")&&this.options.styles.start instanceof Style$1&&(this.options.styles.start.getFill
312()!=null&&(ee.fill=this.options.styles.start.getFill()),this.options.styles.start.getStroke()!=null&&(ee.stroke=this.options.styles.start.getStroke())),this.options.styles.start=new Style$1(ee),logger$e.trace("style finish",this.options.styles.finish);var te={fill:Measures.DEFAULT_DRAW_FINISH_STYLE.getFill(),stroke:Measures.DEFAULT_DRAW_FINISH_STYLE.getStroke()};this.options.styles.hasOwnProperty("finish")&&this.options.styles.finish instanceof Style$1&&(this.options.styles.finish.getFill()!=null&&(te.fill=this.options.styles.finish.getFill()),this.options.styles.finish.getStroke()!=null&&(te.stroke=this.options.styles.finish.getStroke())),this.options.styles.finish=new Style$1(te)},addMeasureInteraction:function(ne){var ee=this.getMap(),te=this;this.measureDraw=new Draw({source:this.measureSource,condition:function(st){return st.originalEvent.ctrlKey?(te.sketch&&this.removeLastPoint(),!1):!0},type:ne,style:this.options.styles.start||Measures.DEFAULT_DRAW_START_STYLE}),this.measureDraw.setProperties({name:"Measures",source:this}),ee.addInteraction(this.measureDraw),this.createMeasureTooltip(ee),this.measureDraw.on("drawstart",st=>{te.sketch=st.feature}),this.measureDraw.on("drawend",()=>{if(te.sketch){var st,ot,ct=te.sketch.getGeometry();if(st=te.format(ct),ct.getType()==="LineString")ot=ct.getLastCoordinate();else if(ct.getType()==="Polygon")ot=ct.getInteriorPoint().getCoordinates();else return;te.measureTooltipElement.innerHTML=st,te.measureTooltip.setPosition(ot)}te.measureTooltipElement.className="GPmeasureTooltip GPmeasureTooltip-static",te.measureTooltip.setOffset([0,-7]),te.sketch=null,te.measureTooltipElement=null,te.createMeasureTooltip(ee)})},initMeasureInteraction:function(){var ne=this.getMap();this.measureSource=new VectorSource,this.measureVector=new VectorLayer({source:this.measureSource,style:this.options.styles.finish||Measures.DEFAULT_DRAW_FINISH_STYLE}),this.measureVector.gpResultLayerId="measure",ne.addLayer(this.measureVector),ne.getControls().forEach(ee=>{if(ee.CLASSNAME==="LayerSwitcher"){var te=this.measureVector.gpLayerId;ee._layers[te].title===te&&ee.addLayer(this.measureVector,{title:this.options.layerDescription.title,description:this.options.layerDescription.description})}})}},ElevationPathDOM={_addUID:function(ne){var ee=this._uid?ne+"-"+this._uid:ne;return ee},_createMainContainerElement:function(){var ne=document.createElement("div");return ne.id=this._addUID("GPelevationPath"),ne.className="GPwidget gpf-widget gpf-widget-button gpf-mobile-fullscreen",ne},_createShowElevationPathPictoElement:function(){var ne=this,ee=document.createElement("button"),te=document.createElement("span");return ee.appendChild(te),ee.id=this._addUID("GPshowElevationPathPicto"),ee.classList.add("GPshowOpen","GPshowAdvancedToolPicto","GPshowElevationPathPicto"),ee.classList.add("gpf-btn","gpf-btn--tertiary","gpf-btn-icon","gpf-btn-icon-elevation"),ee.classList.add("fr-btn","fr-btn--tertiary"),ee.setAttribute("aria-label","Profil altimétrique"),ee.setAttribute("tabindex","0"),ee.setAttribute("aria-pressed",!1),ee.setAttribute("type","button"),ee.addEventListener?ee.addEventListener("click",function(st){var ot=st.target.ariaPressed==="true";st.target.setAttribute("aria-pressed",!ot),ne.onShowElevationPathClick(st)}):ee.attachEvent&&ee.attachEvent("onclick",function(st){var ot=st.target.ariaPressed==="true";st.target.setAttribute("aria-pressed",!ot),ne.onShowElevationPathClick(st)}),ee},_createElevationPathPanelElement:function(){var ne=document.createElement("dialog");return ne.id=this._addUID("GPelevationPathPanel"),ne.className="GPpanel gpf-panel fr-modal",ne},_createElevationPathPanelDivElement:function(){var ne=document.createElement("div");return ne.className="gpf-panel__body fr-modal__body",ne},_createDrawingButtonsPluginDiv:function(){var ne=document.createElement("div");return ne.className="container-buttons-plugin fr-mx-2w",ne},_createElevationPathPanelProfilElement:function(){var ne=document.createElement("div");ne.className="GPelevationPathProfilWrapper";var ee=document.createElement("div");return ee.id="GPelevationPathProfil",ne.appendChild(ee),ne},_createElevationPathWaitingElement:function(){var ne=document.createElement("div");ne.id=this._addUID("GPelevationPathCalcWaitingContainer"),ne.className="GPwaitingContainer GPwaitingContainerHidden gpf-waiting gpf-waiting--hidden";var ee=document.createElement("p");return ee.className="GPwaitingContainerInfo gpf-waiting_info",ee.innerHTML="Recherche en cours...",ne.appendChild(ee),ne},_createElevationPathInformationsElement:function(){var ne=document.createElement("div");ne.id=this._addUID("GPelevationPathInformationsContainer");var ee=document.createElement("p");return ee.className="GPelevationPathInformations",ee.innerHTML="Aucune information...",ne.appendChild(ee),ne},_addElevationPathInformationsItem:function(ne,ee){var te=document.getElementById(this._addUID("GPelevationPathInformationsContainer"));if(te){var st=document.createElement("p");st.className="GPelevationPathInformations";var ot=document.createElement("span");ot.innerText=ne;var ct=document.createElement("span");ct.innerText=ee,st.appendChild(ot),st.appendChild(ct),te.appendChild(st)}return te}},ProfileElevationPathDOM={_getCssProperty:function(ne,ee){return window.getComputedStyle(ne,null).getPropertyValue(ee)},_getTextWidth:function(ne,ee,te=null){var st=this.canvas||(this.canvas=document.createElement("canvas")),ot=st.getContext("2d");te===null?ot.font=`${this._getCssProperty(ee,"font-weight")} ${this._getCssProperty(ee,"font-size")} ${this._getCssProperty(ee,"font-family")}`:ot.font=te;var ct=ot.measureText(ne);return ct.width},_dataZToSvgY:function(ne,ee,te,st){return ee-(ne-te)*st-.5},_dataDistToSvgX:function(ne,ee,te,st){return ee-te+ne*st},_svgXToDataDist:function(ne,ee,te,st){return(ne+te-ee)/st},_arrayBisect:function(ne,ee){let te;if(ne.length===0)return 0;for(te=0;te<ne.length;te++)if(ee<ne[te].dist)return te;return te-1},displayProfileByDefault:function(ne,ee,te,st){var ot=te;if(!ee||!ne)return;const ct={fontFamily:"Arial",strokeColor:"#0B6BA7",fillColor:"#00B798",focusLineColor:"#F90"};for(checkDsfr()&&(ct.fontFamily="Marianne",ct.strokeColor="#2F4077",ct.fillColor="#2F4077",ct.focusLineColor="#639f6a");ee.firstChild;)ee.removeChild(ee.firstChild);const ut={top:25,right:15,bottom:10,left:10};
312var dt=ot.options.displayProfileOptions,ht=ne.points,ft=JSON.parse(JSON.stringify(ht));ft.sort(function(ys,Co){return ys.z-Co.z});var pt=ft[0].z,mt=ft[ft.length-1].z,yt=ne.distance;let vt="m";const _t=document.createElement("div");_t.id="profileElevationByDefault",ee.appendChild(_t);var bt=window.getComputedStyle(ee).getPropertyValue("width").replace(/px/,""),xt=window.getComputedStyle(ee).getPropertyValue("height").replace(/px/,"");const Mt=xt-ut.top-ut.bottom,Ot=bt-ut.left-ut.right,kt=17,Nt=this._getTextWidth(Math.round(mt).toLocaleString()+",88",ee,`400 10 ${ct.fontFamily}`),Gt=17,Bt=15,Ut=15,Vt=this._getTextWidth(Math.round(yt).toLocaleString()+",5",ee),Ht=1,zt=Mt-Gt-Bt,jt=Ot-kt-Nt,Wt=document.createElementNS("http://www.w3.org/2000/svg","svg");Wt.id="profileElevationByDefaultSvg",Wt.setAttribute("style","display: block; margin: auto; overflow: visible;"),Wt.setAttribute("viewBox",`0 0 ${bt} ${xt}`),Wt.setAttribute("width","100%"),Wt.setAttribute("height","100%");const Jt=Math.floor(zt/Ut);let Qt;mt===pt?Qt=.1:Qt=Math.pow(10,Math.ceil(Math.log((mt-pt)/Jt)/Math.log(10)))/2;let oi=Math.floor(pt/Qt)*Qt,ai=Math.ceil(mt/Qt)*Qt;ai===mt&&(ai+=Qt),oi=Math.round(oi*100)/100,ai=Math.round(ai*100)/100;let xn=Math.round((ai-oi)/Qt);xn+1>Jt&&(Qt=Math.pow(10,Math.ceil(Math.log((mt-pt)/Jt)/Math.log(10))),oi=Math.floor(pt/Qt)*Qt,ai=Math.ceil(mt/Qt)*Qt,ai===mt&&(ai+=Qt),oi=Math.round(oi*100)/100,ai=Math.round(ai*100)/100,xn=Math.floor((ai-oi)/Qt)),xn=Math.max(Math.round(xn),1);const An=document.createElementNS("http://www.w3.org/2000/svg","g");An.setAttribute("class","profile-z-vertical");const Nn=document.createElementNS("http://www.w3.org/2000/svg","g"),Xt=zt/xn;let Zt;mt===pt?Zt=zt/.2:Zt=zt/(ai-oi);let Kt,ti,qt,ii,wn,ni;for(let ys=0;ys<=xn;ys++)Kt=document.createElementNS("http://www.w3.org/2000/svg","text"),Kt.setAttribute("class","profile-z-graduation"),Kt.setAttribute("font-family",ct.fontFamily),Kt.setAttribute("font-size","10px"),Kt.setAttribute("fill","#5E5E5E"),Kt.textContent=(Math.round(100*(oi+ys*Qt))/100).toLocaleString(),ti=zt-ys*Xt,Kt.setAttribute("transform",`translate(${kt+Nt-8}, ${ti+5})`),Kt.setAttribute("text-anchor","end"),An.appendChild(Kt),qt=Math.round(ti)-.5,ii=document.createElementNS("http://www.w3.org/2000/svg","g"),wn=document.createElementNS("http://www.w3.org/2000/svg","path"),wn.setAttribute("cs","100,100"),wn.setAttribute("stroke-width","1"),ys!==0?wn.setAttribute("stroke-opacity","0.2"):wn.setAttribute("stroke-opacity","1"),wn.setAttribute("stroke","#000000"),wn.setAttribute("fill","none"),wn.setAttribute("d",`M${kt+Nt},${qt} L${jt+kt+Nt},${qt}`),ni=document.createElementNS("http://www.w3.org/2000/svg","path"),ni.setAttribute("cs","100,100"),ni.setAttribute("stroke-width","1"),ni.setAttribute("stroke-opacity","1"),ni.setAttribute("stroke","#000000"),ni.setAttribute("fill","none"),ni.setAttribute("d",`M${kt+Nt},${qt} L${kt+Nt+5},${qt}`),ni.setAttribute("transform","translate(-5, 0)"),ii.appendChild(ni),ii.appendChild(wn),Nn.appendChild(ii);
312var Cn=document.createElementNS("http://www.w3.org/2000/svg","text");Cn.setAttribute("class","profile-z-legend"),Cn.setAttribute("font-family",ct.fontFamily),Cn.setAttribute("font-size","11px"),Cn.setAttribute("fill","#5E5E5E"),Cn.textContent="Altitude (m)",Cn.setAttribute("transform",`translate(${kt-8}, ${Math.round(zt/2)}) rotate(-90)`),Cn.setAttribute("text-anchor","middle"),An.appendChild(Cn),Wt.appendChild(An),Wt.appendChild(Nn),yt>2e3&&(yt/=1e3,vt="km");const Ln=Math.floor(jt/Vt);let Un=Math.pow(10,Math.ceil(Math.log(yt/Ln)/Math.log(10)))/2;const Pn=yt;let Mn=Math.floor(Pn/Un);Mn>Ln?(Un=Math.pow(10,Math.ceil(Math.log(yt/Ln)/Math.log(10))),Mn=Math.floor(Pn/Un)):Mn<Ht&&(Un=Math.pow(10,Math.ceil(Math.log(yt/Ln)/Math.log(10))-1),Mn=Math.floor(Pn/Un)),Mn=Math.max(Mn,1);const Yt=Un*Mn,ri=document.createElementNS("http://www.w3.org/2000/svg","g");ri.setAttribute("class","profile-x-vertical");const Sn=document.createElementNS("http://www.w3.org/2000/svg","g"),On=jt/Pn,Rn=(Pn-Yt)*On,Bn=Math.round((jt-Rn)/Mn);let Vn,Wn,Gn,Hn,kn,er;for(let ys=0;ys<=Mn+1;ys++)Vn=document.createElementNS("http://www.w3.org/2000/svg","text"),Vn.setAttribute("class","profile-x-graduation"),Vn.setAttribute("font-family",ct.fontFamily),Vn.setAttribute("font-size","10px"),Vn.setAttribute("fill","#5E5E5E"),ys!==Mn+1&&(Vn.textContent=(Math.round(100*ys*Un)/100).toLocaleString()),Wn=kt+Nt+ys*Bn,ys===Mn+1&&(Wn=kt+Nt+jt),Vn.setAttribute("transform",`translate(${Wn}, ${zt+Bt+5})`),Vn.setAttribute("text-anchor","middle"),ri.appendChild(Vn),Gn=Wn-.5,Hn=document.createElementNS("http://www.w3.org/2000/svg","g"),kn=document.createElementNS("http://www.w3.org/2000/svg","path"),kn.setAttribute("cs","100,100"),kn.setAttribute("stroke-width","1"),ys!==0?kn.setAttribute("stroke-opacity","0.2"):kn.setAttribute("stroke-opacity","1"),kn.setAttribute("stroke","#000000"),kn.setAttribute("fill","none"),kn.setAttribute("d",`M${Gn},${zt} L${Gn},0`),er=document.createElementNS("http://www.w3.org/2000/svg","path"),er.setAttribute("cs","100,100"),er.setAttribute("stroke-width","1"),er.setAttribute("stroke-opacity","1"),er.setAttribute("stroke","#000000"),er.setAttribute("fill","none"),er.setAttribute("d",`M${Gn},${zt} L${Gn},${zt-5}`),er.setAttribute("transform","translate(0, 5)"),Hn.appendChild(er),Hn.appendChild(kn),Sn.appendChild(Hn);var Tn=document.createElementNS("http://www.w3.org/2000/svg","text");Tn.setAttribute("class","profile-x-legend"),Tn.setAttribute("font-family",ct.fontFamily),Tn.setAttribute("font-size","11px"),Tn.setAttribute("fill","#5E5E5E"),Tn.textContent=`Distance (${vt})`,Tn.setAttribute("transform",`translate(${kt+Nt+jt/2}, ${zt+Bt+Gt+3})`),Tn.setAttribute("text-anchor","middle"),ri.appendChild(Tn),Wt.appendChild(ri),Wt.appendChild(Sn);const Dn=document.createElementNS("http://www.w3.org/2000/svg","g");let $n=1;vt==="km"&&($n=1e3);let jn=this._dataDistToSvgX(ht[0].dist/$n,Ot,jt,On),zn=this._dataZToSvgY(ht[0].z,zt,oi,Zt),Jn=`M${jn},${zn}`;for(let ys=1;ys<ht.length;ys++)jn=this._dataDistToSvgX(ht[ys].dist/$n,Ot,jt,On),zn=this._dataZToSvgY(ht[ys].z,zt,oi,Zt),Jn+=` L${jn},${zn}`;const rs=document.createElementNS("http://www.w3.org/2000/svg","path");rs.setAttribute("cs","100,100"),rs.setAttribute("stroke-width","1"),rs.setAttribute("stroke-opacity","1"),rs.setAttribute("stroke",ct.strokeColor),rs.setAttribute("fill","none"),rs.setAttribute("d",Jn),Jn+=` L${jn},${zt}`,Jn+=` L${Ot-jt},${zt}`;const os=document.createElementNS("http://www.w3.org/2000/svg","path");os.setAttribute("cs","100,100"),os.setAttribute("stroke-width","1"),os.setAttribute("stroke-opacity","0"),os.setAttribute("stroke","#000000"),os.setAttribute("fill",ct.fillColor),os.setAttribute("fill-opacity","0.2"),os.setAttribute("d",Jn),Dn.appendChild(rs),Dn.appendChild(os),Wt.appendChild(Dn);const ls=document.createElementNS("http://www.w3.org/2000/svg","g"),cs=document.createElementNS("http://www.w3.org/2000/svg","rect");cs.setAttribute("width",jt),cs.setAttribute("height",zt),cs.setAttribute("transform",`translate(${Ot-jt},0)`),cs.setAttribute("visibility","hidden"),cs.setAttribute("pointer-events","all");const vs=JSON.parse(JSON.stringify(ht));vs.sort(function(ys,Co){return ys.dist-Co.dist});const hs=document.createElementNS("http://www.w3.org/2000/svg","line");hs.setAttribute("id","focusLineX"),hs.setAttribute("class","focusLine-default"),hs.setAttribute("fill","none"),hs.setAttribute("stroke",ct.focusLineColor),hs.setAttribute("stroke-width","0.5px"),hs.setAttribute("visibility","hidden");const fs=document.createElementNS("http://www.w3.org/2000/svg","line");fs.setAttribute("id","focusLineY"),fs.setAttribute("class","focusLine-default"),fs.setAttribute("fill","none"),fs.setAttribute("stroke",ct.focusLineColor),fs.setAttribute("stroke-width","0.5px"),fs.setAttribute("visibility","hidden");const _s=document.createElementNS("http://www.w3.org/2000/svg","circle");_s.setAttribute("id","focusCircle"),_s.setAttribute("r",4),_s.setAttribute("class","circle-default focusCircle-default"),_s.setAttribute("fill",ct.focusLineColor),_s.setAttribute("visibility","hidden"),ls.appendChild(_s),ls.appendChild(hs),ls.appendChild(fs);const ms=document.createElementNS("http://www.w3.org/2000/svg","text"),Zs=document.createElementNS("http://www.w3.org/2000/svg","tspan"),ao=document.createElementNS("http://www.w3.org/2000/svg","tspan"),us=document.createElementNS("http://www.w3.org/2000/svg","tspan");ms.setAttribute("style",`text-align:center; max-width:220px; font-size:10px; color:#000000; font-family:${ct.fontFamily}; z-index:50;`),ms.style.pointerEvents="none",ms.style.position="fixed",ms.setAttribute("class","tooltipInit"),ms.setAttribute("text-anchor","middle"),_t.appendChild(ms),Zs.setAttribute("class","altiPathValue"),Zs.setAttribute("x","0"),Zs.setAttribute("dy","-.7em"),ao.setAttribute("class","altiPathValue"),ao.setAttribute("x","0"),ao.setAttribute("dy","1em"),us.setAttribute("class","altiPathCoords"),us.setAttribute("x","0"),us.setAttribute("dy","1em"),ms.appendChild(Zs),dt.currentSlope&&ms.appendChild(ao),ms.appendChild(us);const ps=document.createElementNS("http://www.w3.org/2000/svg","g");ls.appendChild(ps);const gs=document.createElementNS("http://www.w3.org/2000/svg","path");gs.setAttribute("cs","100,100"),gs.setAttribute("fill","#FFFFFF"),gs.setAttribute("stroke","#CCCCCC"),gs.setAttribute("fill-opacity","0.8"),gs.setAttribute("stroke-width","1"),gs.setAttribute("stroke-opacity","1");const bs=document.createElementNS("http://www.w3.org/2000/svg","path");bs.setAttribute("cs","100,100"),bs.setAttribute("fill","#FFFFFF"),bs.setAttribute("stroke","#000000"),bs.setAttribute("fill-opacity","0"),bs.setAttribute("stroke-width","1"),bs.setAttribute("stroke-opacity","0.4"),bs.setAttribute("transform","translate(1,1)"),ps.appendChild(bs),ps.appendChild(gs),ps.appendChild(ms),ps.setAttribute("class","tooltipInit"),ps.style.pointerEvents="none";function Bo(){hs.setAttribute("visibility","visible"),fs.setAttribute("visibility","visible"),_s.setAttribute("visibility","visible"),st.__createProfileMarker(ot,ht[0]),ms.classList.remove("tooltipInit"),ps.classList.remove("tooltipInit"),ms.classList.remove("tooltipFadeOut"),ps.classList.remove("tooltipFadeOut"),ms.classList.add("tooltipFadeIn"),ps.classList.add("tooltipFadeIn")}function qo(){hs.setAttribute("visibility","hidden"),fs.setAttribute("visibility","hidden"),_s.setAttribute("visibility","hidden"),st.__removeProfileMarker(ot),ms.classList.remove("tooltipFadeIn"),ps.classList.remove("tooltipFadeIn"),ms.classList.add("tooltipFadeOut"),ps.classList.add("tooltipFadeOut")}function Lo(ys){const Co=Wt.createSVGPoint();Co.x=ys.clientX,Co.y=ys.clientY;const Ss=Co.matrixTransform(Wt.getScreenCTM().inverse()),lo=this._svgXToDataDist(Ss.x,Ot,jt,On)*$n,Ao=Math.max(1,this._arrayBisect(vs,lo)),wo=ht[Ao-1],To=ht[Ao];let io=wo;lo-wo.dist>To.dist-lo&&(io=To);const So=this._dataDistToSvgX(io.dist/$n,Ot,jt,On),xs=this._dataZToSvgY(io.z,zt,oi,Zt);_s.setAttribute("cx",So),_s.setAttribute("cy",xs),hs.setAttribute("x1",So),hs.setAttribute("y1",zt),hs.setAttribute("x2",So),hs.setAttribute("y2",0),fs.setAttribute("x1",kt+Nt),fs.setAttribute("y1",xs),fs.setAttribute("x2",jt+kt+Nt),fs.setAttribute("y2",xs),st.__updateProfileMarker(ot,io);
312const oo=`Altitude : ${io.z.toLocaleString()} m`,Go=`Pente : ${io.slope} %`,Vo=`(lat : ${io.lat.toLocaleString()} / lon : ${io.lon.toLocaleString()})`;Zs.innerHTML=oo,ao.innerHTML=Go,us.innerHTML=Vo;const Jo=Math.max(this._getTextWidth(Vo,us),this._getTextWidth(oo,Zs));let hl;io.dist>yt*$n/2?(hl=`M -0.5 -0.5 l -6 6 l 0 16 l -${Jo+10} 0 l 0 -44 l ${Jo+10} 0 l 0 16 l 6 6`,ms.setAttribute("transform",`translate(${-(Jo/2+12)},0)`)):io.dist<=yt*$n/2&&(hl=`M -0.5 -0.5 l 6 6 l 0 16 l ${Jo+10} 0 l 0 -44 l -${Jo+10} 0 l 0 16 l -6 6`,ms.setAttribute("transform",`translate(${Jo/2+12},0)`)),gs.setAttribute("d",hl),bs.setAttribute("d",hl),ps.setAttribute("transform",`translate(${So},${xs})`),ps.style.transform=`translate(${So}px,${xs}px)`}return cs.addEventListener("pointerover",Bo),cs.addEventListener("pointerout",qo),cs.addEventListener("pointermove",Lo.bind(this)),ls.appendChild(cs),Wt.appendChild(ls),_t.appendChild(Wt),ee},displayProfileRaw:function(ne,ee,te,st){if(ee){for(;ee.firstChild;)ee.removeChild(ee.firstChild);var ot=ne&&ne.points?ne.points:{},ct=document.createElement("textarea");return ct.id="profilElevationResults",ct.rows=10,ct.cols=50,ct.style.width="100%",ct.innerHTML=JSON.stringify(ot,void 0,4),ct.addEventListener("mouseover",function(ut){st.__customRawProfileMouseOverEvent(te,ut)}),ee.appendChild(ct),ee}},displayProfileLibD3:function(ne,ee,te,st){var ot=te;if(ee&&ne){for(;ee.firstChild;)ee.removeChild(ee.firstChild);var ct=ne.points;if(ne.distance>2e3){ne.unit="km";for(let Vt=0;Vt<ct.length;Vt++)ct[Vt].dist/=1e3}var ut=ot.options.displayProfileOptions,dt={top:20,right:20,bottom:30,left:40},ht=window.getComputedStyle(ee).getPropertyValue("width"),ft=window.getComputedStyle(ee).getPropertyValue("height"),pt=ht.replace(/px/,"")-dt.left-dt.right,mt=ft.replace(/px/,"")-dt.top-dt.bottom,yt=d3.scale.linear().range([0,pt]),vt=d3.scale.linear().range([mt,0]),_t=d3.svg.axis().scale(yt).orient("bottom").ticks(5),bt=d3.svg.axis().scale(vt).orient("left").ticks(5),xt=d3.svg.line().interpolate("basis").x(function(Vt){return yt(Vt.dist)}).y(function(Vt){return vt(Vt.z)}),Mt=d3.svg.area().interpolate("basis").x(function(Vt){return yt(Vt.dist)}).y0(mt).y1(function(Vt){return vt(Vt.z)}),Ot=d3.select(ee).append("svg").attr("width",pt+dt.left+dt.right).attr("height",mt+dt.top+dt.bottom).append("g").attr("transform","translate("+dt.left+","+dt.top+")"),kt=d3.extent(ct,function(Vt){return Vt.dist});yt.domain(kt);var Nt=[0,d3.max(ct,function(Vt){return Vt.z})];vt.domain(Nt),Ot.append("path").datum(ct).attr("class","area-d3").attr("d",Mt),Ot.append("g").attr("class","x axis-d3").attr("transform","translate(0,"+mt+")").call(_t).append("text").attr("y",-15).attr("dy",".71em").attr("x",pt).text("Distance ("+ne.unit+")"),Ot.append("g").attr("class","y axis-d3").call(bt).append("text").attr("transform","rotate(-90)").attr("y",6).attr("dy",".71em").text("Altitude (m)"),Ot.append("g").attr("class","grid-d3 vertical").attr("transform","translate(0,"+mt+")").call(_t.orient("bottom").tickSize(-mt,0,0).tickFormat("")),Ot.append("g").attr("class","grid-d3 horizontal").call(bt.orient("left").tickSize(-pt,0,0).tickFormat("")),Ot.append("path").datum(ct).attr("class","line-d3").attr("d",xt),Ot.selectAll("circle").data(ct).enter().append("circle").attr("cx",function(Vt){return yt(Vt.dist)}).attr("cy",function(Vt){return vt(Vt.z)}).attr("r",0).attr("class","circle-d3");var Gt=Ot.append("g").style("display","none");Gt.append("line").attr("id","focusLineX").attr("class","focusLine-d3"),Gt.append("line").attr("id","focusLineY").attr("class","focusLine-d3"),Gt.append("circle").attr("id","focusCircle").attr("r",4).attr("class","circle-d3 focusCircle-d3");var Bt=d3.select(ee).append("div").attr("class","tooltip-d3").style("opacity",0),Ut=d3.bisector(function(Vt){return Vt.dist}).left;return Ot.append("rect").attr("class","overlay-d3").attr("width",pt).attr("height",mt).on("mouseover",function(){Gt.style("display",null),st.__createProfileMarker(ot,ct[0])}).on("mouseout",function(){Gt.style("display","none"),st.__removeProfileMarker(ot),Bt.transition().duration(500).style("opacity",0)}).on("mousemove",function(){var Vt=d3.mouse(this),Ht=yt.invert(Vt[0]),zt=Math.max(1,Ut(ct,Ht)),jt=ct[zt-1],Wt=ct[zt],Jt=Ht-jt[0]>Wt[0]-Ht?Wt:jt,Qt=yt(Jt.dist),oi=vt(Jt.z);Gt.select("#focusCircle").attr("cx",Qt).attr("cy",oi),Gt.select("#focusLineX").attr("x1",Qt).attr("y1",vt(Nt[0])).attr("x2",Qt).attr("y2",vt(Nt[1])),Gt.select("#focusLineY").attr("x1",yt(kt[0])).attr("y1",oi).attr("x2",yt(kt[1])).attr("y2",oi),st.__updateProfileMarker(ot,Jt),Bt.transition().duration(200).style("opacity",.9);var ai="";ai+=" Altitude : "+Jt.z+" m",ut.currentSlope&&(ai+="<br/> Pente : "+Jt.slope+" %"),ai+="<br/> (Lat : "+Jt.lat+"/ Lon : "+Jt.lon+")",Bt.html(sanitizeHtml(ai)).style("left",d3.event.pageX+"px").style("top",d3.event.pageY-28+"px")}),Ot}},displayProfileLibAmCharts:function(ne,ee,te,st){var ot=te;
312if(ee&&ne){var ct=ne.points,ut="<span class='altiPathValue'>[[title]] : [[value]]m</span><br/>",dt=ot.options.displayProfileOptions.currentSlope;if(dt&&(ut+="<span class='altiPathValue'>Pente : [[slope]] %</span><br/>"),ut+="<span class='altiPathCoords'>(Lat: [[lat]] / Lon:[[lon]])</span>",AmCharts.addInitHandler(function(){}),ne.distance>2e3){ne.unit="km";for(let yt=0;yt<ct.length;yt++)ct[yt].dist/=1e3}for(let yt=0;yt<ct.length;yt++){var ht=ct[yt].dist,ft=100;ht>100?ft=1:ht>10&&(ft=10),ht=Math.round(ht*ft)/ft,ct[yt].dist=ht}var pt={type:"serial",pathToImages:"http://cdn.amcharts.com/lib/3/images/",categoryField:"dist",autoMarginOffset:0,marginRight:10,marginTop:10,startDuration:0,color:"#5E5E5E",fontSize:8,theme:"light",thousandsSeparator:"",numberFormatter:{precision:-1,decimalSeparator:",",thousandsSeparator:" "},categoryAxis:{color:"#5E5E5E",gridPosition:"start",minHorizontalGap:40,tickPosition:"start",title:"Distance ("+ne.unit+")",titleColor:"#5E5E5E",labelOffset:0,startOnAxis:!0},chartCursor:{animationDuration:0,bulletsEnabled:!0,bulletSize:10,categoryBalloonEnabled:!1,cursorColor:"#F90",graphBulletAlpha:1,graphBulletSize:1,zoomable:!1},trendLines:[],graphs:[{balloonColor:"#CCCCCC",balloonText:ut,bullet:"round",bulletAlpha:0,bulletBorderColor:"#FFF",bulletBorderThickness:2,bulletColor:"#F90",bulletSize:6,hidden:!1,id:"AmGraph-1",fillAlphas:.4,fillColors:"#C77A04",lineAlpha:1,lineColor:"#C77A04",lineThickness:1,title:"Altitude",valueField:"z"}],guides:[],valueAxes:[{id:"ValueAxis-1",minVerticalGap:20,title:"Altitude (m)"}],balloon:{borderColor:"#CCCCCC",borderThickness:1,fillColor:"#FFFFFF",showBullet:!0},titles:[],allLabels:[],dataProvider:ct},mt=AmCharts.makeChart(ee,pt);return mt.addListener("changed",function(yt){var vt=yt.chart.dataProvider[yt.index];st.__updateProfileMarker(ot,vt)}),mt}}},logger$d=LoggerByDefault.getLogger("elevationpath");const No=class No extends ControlExtended{constructor(ee){if(logger$d.trace("ElevationPath()"),ee=ee||{},super(ee),!(this instanceof No))throw new TypeError("ERROR CLASS_CONSTRUCTOR");return this.CLASSNAME="ElevationPath",this._uid=ee.id||SelectorID.generate(),this._showContainer=null,this._pictoButton=null,this._panelContainer=null,this._profileContainer=null,this._waitingContainer=null,this._infoContainer=null,this._timerHdlr=null,this._drawStyleStart=null,this._drawStyleFinish=null,this._markerStyle=null,this._profile=null,this._data={},this._measureSource=null,this._measureVector=null,this._measureDraw=null,this._lastSketch=null,this._currentSketch=null,this._marker=null,this._initialize(ee),this._container=this._initializeContainer(),this.element?this.element.appendChild(this._container):this.element=this._container,this}static __removeProfileMarker(ee){var te=ee;te._marker&&(te._measureSource.removeFeature(te._marker),te._marker=null)}static __createProfileMarker(ee,te){var st=ee;st._marker&&(st._measureSource.removeFeature(st._marker),st._marker=null);var ot=st.getMap(),ct=ot.getView().getProjection(),ut=transform$1([te.lon,te.lat],"EPSG:4326",ct),dt=st._measureSource.getFeatures()[0].getGeometry().getClosestPoint(ut),ht=new Point$1(dt);st._marker=new Feature({geometry:ht}),logger$d.trace(ht),st._marker.setStyle(st._markerStyle),st._measureSource.addFeature(st._marker)}static __updateProfileMarker(ee,te){var st=ee;No.__removeProfileMarker(st),No.__createProfileMarker(st,te)}static __customRawProfileOperation(ee,te){logger$d.log("__customRawProfileOperation");for(var st=ee,ot=te.points,ct=st.getMap().getView().getProjection(),ut=0;ut<ot.length;ut++){var dt=ot[ut],ht=transform$1([dt.lon,dt.lat],"EPSG:4326",ct),ft=new Point$1(ht);st._marker=new Feature({geometry:ft}),logger$d.trace(ft);var pt=No.DEFAULT_STYLES.RESULTS,mt=new CircleStyle({radius:pt.imageRadius,stroke:new Stroke({color:pt.imageStrokeColor,width:pt.imageStrokeWidth}),fill:new Fill({color:pt.imageFillColor})});st._marker.setStyle(new Style$1({image:mt})),st._measureSource.addFeature(st._marker)}}static __customRawProfileMouseOverEvent(ee,te){logger$d.log("__customRawProfileMouseOverEvent",ee,te)}static DISPLAY_PROFILE_LIB_AMCHARTS(ee,te,st){if(logger$d.trace("ElevationPath.DISPLAY_PROFILE_LIB_AMCHARTS"),t
312ypeof AmCharts>"u"){logger$d.log("Lib. AmCharts is not loaded !");return}var ot=ProfileElevationPathDOM.displayProfileLibAmCharts(ee,te,st,No);ot&&(this._profile=ot)}static DISPLAY_PROFILE_LIB_D3(ee,te,st){if(logger$d.trace("ElevationPath.DISPLAY_PROFILE_LIB_D3"),typeof d3>"u"){logger$d.log("Lib. D3 is not loaded !");return}var ot=ProfileElevationPathDOM.displayProfileLibD3(ee,te,st,No);ot&&(this._profile=ot)}static DISPLAY_PROFILE_RAW(ee,te,st){logger$d.trace("ElevationPath.DISPLAY_PROFILE_RAW");var ot=ProfileElevationPathDOM.displayProfileRaw(ee,te,st,No);ot&&(this._profile=ot)}static DISPLAY_PROFILE_BY_DEFAULT(ee,te,st){logger$d.trace("ElevationPath.DISPLAY_PROFILE_BY_DEFAULT");var ot=ProfileElevationPathDOM.displayProfileByDefault(ee,te,st,No);ot&&(this._profile=ot)}setMap(ee){if(logger$d.trace("ElevationPath::setMap"),ee&&(this.options.active&&(this._profile===null&&this._panelContainer.classList.add("GPelementHidden","gpf-hidden"),this._initMeasureInteraction(ee),this._addMeasureInteraction(ee)),!this.options.target&&!this.options.position&&MeasureToolBox.add(ee,this),this.options.export)){var te=Helper.assign({control:this},this.options.export);this.export=new ButtonExport(te),this.export.render();var st=this;this.export.on("button:clicked",ot=>{st.dispatchEvent({type:"export:compute",content:ot.content})})}super.setMap(ee),this.options.position&&this.setPosition(this.options.position),this.options.gutter===!1&&this.getContainer().classList.add("gpf-button-no-gutter")}getActive(){return logger$d.trace("ElevationPath::getActive"),this.options.active}setActive(ee){logger$d.trace("ElevationPath::setActive"),this.options.active=ee}getData(){return Helper.assign({type:"elevationpath"},this._data)}setData(ee){this._data=ee}getContainer(){return this._container}getLayer(){return this._measureVector}setLayer(ee){if(!ee){this._measureVector=null;return}if(!(ee instanceof VectorLayer)){logger$d.log("no valid layer given for hosting drawn features.");return}ee.setStyle(this._drawStyleFinish),this._measureVector=ee,this._measureSource=ee.getSource()}getGeoJSON(){var ee=this._measureVector.getSource().getFeatures(),te=new GeoJSON({defaultStyle:this._drawStyleFinish}),st=te.writeFeatures(ee,{dataProjection:"EPSG:4326",featureProjection:"EPSG:3857"});return st}getStyle(){return this._drawStyleFinish}clean(ee){logger$d.trace("ElevationPath::clean");var te=this.getMap();this._panelContainer.classList.add("GPelementHidden","gpf-hidden"),this._pictoButton.setAttribute("aria-pressed",!1),this._removeProfile(),this._removeMeasureInteraction(te,typeof ee<"u"?ee:!1),this.setLayer()}init(){this._pictoButton.setAttribute("aria-pressed",!0),this._panelContainer.classList.remove("GPelementHidden","gpf-hidden"),this._displayProfile(this._data),this._waitingContainer.className="GPwaitingContainer GPwaitingContainerHidden gpf-waiting gpf-waiting--hidden"}_initialize(ee){logger$d.trace("ElevationPath::_initialize : ",ee),this.options={target:null,render:null,active:!1,apiKey:null,export:!1,elevationPathOptions:{outputFormat:"json"},layerDescription:{title:"Profil altimétrique",description:"Mon profil altimétrique"},displayProfileOptions:{totalDistance:!0,greaterSlope:!0,meanSlope:!0,ascendingElevation:!0,descendingElevation:!0,currentSlope:!0,apply:null,target:null},stylesOptions:{profile:null,draw:null,marker:null}},Helper.mergeParams(this.options,ee),this.options.target=ee.target||null,this.options.apiKey=ee.apiKey;var te=ee.displayProfileOptions||{};this.export=null;var st=te.apply;this.options.displayProfileOptions.apply=typeof st=="function"?st:No.DISPLAY_PROFILE_BY_DEFAULT;var ot=te.target;this.options.displayProfileOptions.target=typeof ot<"u"?ot:null;var ct=ee.stylesOptions||{};this.options.stylesOptions.draw=ct.draw||{},this._createStylingDraw(),this.options.stylesOptions.marker=ct.marker||{},this._createStylingMarker(),this.COMPUTE_ELEVATION_EVENT="elevationpath:compute",this.DRAW_START_ELEVATION_EVENT="elevationpath:drawstart",this.DRAW_END_ELEVATION_EVENT="elevationpath:drawend"}_initializeContainer(){logger$d.trace("ElevationPath::_initializeContainer : ",this._uid);var ee=this._createMainContainerElement(),te=this._pictoButton=this._createShowElevationPathPictoElement();ee.appendChild(te),this.options.active&&this._pictoButton.click();var st=this._panelContainer=this._createElevationPathPanelElement(),ot=this._createPanelHeaderElement({icon:"ign-elevationpath",title:"Profil Altimétrique",btnClassF
312orClose:"GPshowElevationPathPicto"});st.appendChild(ot);var ct=this._createElevationPathPanelDivElement();st.appendChild(ct);var ut=this._createElevationPathPanelProfilElement();this._profileContainer=ut.firstChild,ct.appendChild(ut);var dt=this._waitingContainer=this._createElevationPathWaitingElement();ct.appendChild(dt);var ht=this._infoContainer=this._createElevationPathInformationsElement();ct.appendChild(ht);var ft=this._createDrawingButtonsPluginDiv();return ct.appendChild(ft),this.options.displayProfileOptions.target===null&&ee.appendChild(st),ee}_createStylingMarker(){logger$d.trace("ElevationPath::_createStylingMarker ");var ee=No.DEFAULT_STYLES.MARKER;logger$d.trace("style marker",ee),this.options.stylesOptions.marker instanceof ImageStyle&&(ee=this.options.stylesOptions.marker),this._markerStyle=new Style$1({image:ee})}_createStylingDraw(){logger$d.trace("ElevationPath::_createStylingDraw");var ee=this.options.stylesOptions.draw;logger$d.trace("style start",ee.start);var te={image:Measures.DEFAULT_POINTER_STYLE,stroke:Measures.DEFAULT_DRAW_START_STYLE.getStroke()};ee.hasOwnProperty("pointer")&&ee.pointer instanceof ImageStyle&&(te.image=ee.pointer),ee.hasOwnProperty("start")&&ee.start instanceof Stroke&&(te.stroke=ee.start),this._drawStyleStart=new Style$1(te),logger$d.trace("style finish",ee.finish);var st={stroke:Measures.DEFAULT_DRAW_FINISH_STYLE.getStroke()};ee.hasOwnProperty("finish")&&ee.finish instanceof Stroke&&(st.stroke=ee.finish),this._drawStyleFinish=new Style$1(st)}_createStylingProfile(){logger$d.trace("ElevationPath::_createStylingProfile");var ee=this.options.stylesOptions.profile;logger$d.trace("style profile",ee);var te=No.DEFAULT_STYLES.PROFILE;Object.keys(te).forEach(st=>{if(!ee.hasOwnProperty(st))ee[st]=te[st];else{var ot=te[st];typeof ot=="object"&&(Helper.mergeParams(ot,ee[st]),ee[st]=ot)}})}_initMeasureInteraction(ee){logger$d.trace("ElevationPath::_initMeasureInteraction()"),ee&&(this._measureSource=new VectorSource,this._measureVector=new VectorLayer({source:this._measureSource,style:this._drawStyleFinish}),this._measureVector.gpResultLayerId="measure:profil",ee.addLayer(this._measureVector),ee.getControls().forEach(te=>{if(te instanceof LayerSwitcher){var st=this._measureVector.gpLayerId;te._layers[st].title===st&&te.addLayer(this._measureVector,{title:this.options.layerDescription.title,description:this.options.layerDescription.description})}}))}_addMeasureInteraction(ee){logger$d.trace("ElevationPath::_addMeasureInteraction()"),ee&&(this._measureDraw=new Draw({source:this._measureSource,type:"LineString",style:this._drawStyleStart,stopClick:!0}),this._measureDraw.setProperties({name:"ElevationPath",source:this}),ee.addInteraction(this._measureDraw),this._measureDraw.on("drawstart",te=>{logger$d.trace("drawstart",te),this._marker!==null&&(this._measureSource.removeFeature(this._marker),this._marker=null),this._lastSketch!==null&&(this._measureSource.removeFeature(this._lastSketch),this._lastSketch=null),this._currentSketch=te.feature;for(var st=this._measureSource.getFeatures(),ot=0;ot<st.length;ot++)this._measureSource.removeFeature(st[ot]);this.dispatchEvent(this.DRAW_START_ELEVATION_EVENT)}),this._measureDraw.on("drawend",te=>{logger$d.trace("drawend",te),this.dispatchEvent(this.DRAW_END_ELEVATION_EVENT),this._lastSketch=this._currentSketch,typeof this.options.elevationPathOptions.onSuccess>"u"&&this.options.displayProfileOptions.target===null&&this._panelContainer.classList.remove("GPelementHidden","gpf-hidden"),this._measureDraw.setActive(!1),this._requestService()}))}_removeMeasureInteraction(ee,te){logger$d.trace("ElevationPath::_removeMeasureInteraction()"),ee&&(te&&this._measureVector&&(ee.removeLayer(this._measureVector),this._measureVector=null),this._measureDraw&&(ee.removeInteraction(this._measureDraw),this._measureDraw=null))}_getGeometry(){if(this._currentSketch===null){logger$d.warn("Current Feature undefined !?");return}for(var ee=[],te=this.getMap(),st=te.getView().getProjection(),ot="EPSG:4326",ct=this._currentSketch.getGeometry().getCoordinates(),ut=0;ut<ct.length;ut++){var dt=ct[ut],ht=dt;st!==ot&&(ht=transform$1(dt,st,ot)),ee.push({lon:Math.round(ht[0]*1e8)/1e8,lat:Math.round(ht[1]*1e8)/1e8})}return ee}_getLength(){if(this._currentSketch===null){logger$d.warn("Current Feature undefined !?");return}for(var ee=0,te=this.getMap(),st=te.getView().getProjection(),ot="EPSG:4326",ct=this._currentSketch.getGeometry().getCoordinates(),ut=0,dt=ct.length-1;ut<dt;++ut){var ht=transform$1(ct[ut],st,ot),ft=transform$1(ct[ut+1],st,ot);ht[0]=Math.round(ht[0]*1e8)/1e8,ht[1]=Math.round(ht[1]*1e8)/1e8,ft[0]=Math.round(ft[0]*1e8)/1e8,ft[1]=Math.round(ft[1]*1e8)/1e8,ee+=getDistance(ht,ft)}return ee}_getSketchCoords(){if(this._currentSketch===null){logger$d.warn("Current Feature undefined !?");return}for(var ee=this.getMap(),te=ee.getView().getProjection(),st="EPSG:4326",ot=[],ct=this._currentSketch.getGeometry().getCoordinates(),ut=0;ut<ct.length;ut++){var dt=transform$1(ct[ut],te,st);dt[0]=Math.round(dt[0]*1e8)/1e8,dt[1]=Math.round(dt[1]*1e8)/1e8,ot.push(dt)}return ot}_requestService(){logger$d.trace("ElevationPath::_requestService");var ee=this._getGeometry();if(logger$d.trace("geometry",ee),!ee){logger$d.warn("missing geometry !?");return}var te={};
312Helper.mergeParams(te,this.options.elevationPathOptions),Helper.mergeParams(te,{apiKey:te.apiKey||this.options.apiKey}),typeof te.ssl!="boolean"&&(typeof this.options.ssl=="boolean"?te.ssl=this.options.ssl:te.ssl=!0),Helper.mergeParams(te,{ssl:te.ssl});var st=this,ot=this.options.elevationPathOptions.onFailure!==null&&typeof this.options.elevationPathOptions.onFailure=="function",ct=this.options.elevationPathOptions.onSuccess!==null&&typeof this.options.elevationPathOptions.onSuccess=="function",ut=function(pt){logger$d.trace(pt),pt&&(st._panelContainer.classList.remove("GPelementHidden","gpf-hidden"),st._data&&(st._data={}),st._data=st._computeElevationMeasure(pt.elevations),st._displayProfile(st._data),st._waitingContainer.className="GPwaitingContainer GPwaitingContainerHidden gpf-waiting gpf-waiting--hidden",st._waiting=!1,st._measureDraw.setActive(!0)),ct&&st.options.elevationPathOptions.onSuccess.call(st,st.getData())},dt=function(pt){st._panelContainer.classList.add("GPelementHidden","gpf-hidden"),logger$d.error(pt.message),st._waitingContainer.className="GPwaitingContainer GPwaitingContainerHidden gpf-waiting gpf-waiting--hidden",st._waiting=!1,st._measureDraw.setActive(!0),ot&&st.options.elevationPathOptions.onFailure.call(st,pt)};Helper.mergeParams(te,{onSuccess:ut,onFailure:dt});var ht=te.sampling||200,ft=Math.max(50,Math.floor(this._getLength())/5);ft>200?ht=200:ht=Math.floor(ft),ht>0&&Helper.mergeParams(te,{sampling:ht}),Helper.mergeParams(te,{positions:ee}),logger$d.trace("options du service",te),this._waitingContainer.className="GPwaitingContainer GPwaitingContainerVisible gpf-waiting gpf-waiting--visible",Gp.Services.getAltitude(te)}_computeElevationMeasure(ee){logger$d.trace("ElevationPath::_computeElevationMeasure",ee);var te=ee,st="m",ot=this._getSketchCoords();if(ot){te[0].dist=0,te[0].slope=0,te[0].oldlat=te[0].lat,te[0].oldlon=te[0].lon,te[0].lat=Math.round(te[0].lat*1e5)/1e5,te[0].lon=Math.round(te[0].lon*1e5)/1e5;for(var ct=0,ut=0,dt=0,ht=0,ft=0,pt=0,mt=[],yt=1;yt<te.length;yt++){var vt=[te[yt].lon,te[yt].lat],_t=getDistance(vt,[te[yt-1].oldlon,te[yt-1].oldlat]),bt=_t+ft,xt=te[yt].z,Mt=te[yt-1].z;xt<0&&(xt=0),Mt<0&&(Mt=0);var Ot=xt-Mt;Ot<0?(ct+=_t,ht+=Ot):Ot>0&&(ut+=_t,dt+=Ot),ft=bt,te[yt].dist=bt,pt+=Ot?Math.abs(Math.round(Ot/_t*100)):0,te[yt].slope=Ot?Math.abs(Math.round(Ot/_t*100)):0;var kt=te[yt].slope;kt>15&&kt<30?te[yt].color="#005b4c":kt>30&&kt<45?te[yt].color="#00362d":kt>45?te[yt].color="#00120f":te[yt].color="#00B798",te[yt].oldlat=te[yt].lat,te[yt].oldlon=te[yt].lon,te[yt].lat=Math.round(te[yt].lat*1e5)/1e5,te[yt].lon=Math.round(te[yt].lon*1e5)/1e5}logger$d.trace("List Distances",mt);for(var Nt=te[0].z,Gt=te[0].z,Bt=te[0].slope,Ut=0;Ut<te.length;Ut++){var Vt=te[Ut];Vt.z<-100&&(Vt.z=0),Vt.z>Gt&&(Gt=Vt.z),Vt.z<Nt&&(Nt=Vt.z),Vt.slope>Bt&&(Bt=Vt.slope)}return{greaterSlope:Bt,meanSlope:Math.round(pt/te.length),distancePlus:ut,distanceMinus:ct,ascendingElevation:dt,descendingElevation:ht,altMin:Nt.toLocaleString(),altMax:Gt.toLocaleString(),distance:this._getLength(),unit:st,points:te}}}_displayProfile(ee){logger$d.trace("ElevationPath::_displayProfile",ee),this._updateInfoContainer();var te=this.options.displayProfileOptions.target;te&&te.appendChild(this._panelContainer),te=this._profileContainer;var st=this,ot=this.options.displayProfileOptions.apply;ot.call(this,ee,te,st);var ct=this.options.displayProfileOptions,ut=document.getElementById("GPelevationPathPanelInfo-"+this._uid);ut&&(ct.totalDistance||ct.greaterSlope||ct.meanSlope||ct.ascendingElevation||ct.descendingElevation)&&(ut.style.display="block"),this.dispatchEvent(this.COMPUTE_ELEVATION_EVENT)}_updateInfoContainer(){logger$d.trace("ElevationPath::_updateInfoContainer");var ee=this.options.displayProfileOptions.totalDistance,te=this.options.displayProfileOptions.meanSlope,st=this.options.displayProfileOptions.greaterSlope,ot=this.options.displayProfileOptions.ascendingElevation,ct=this.options.displayProfileOptions.descendingElevation,ut=this._infoContainer;if(ut.childElementCount)for(;ut.firstChild;)ut.removeChild(ut.firstChild);ee&&this._addElevationPathInformationsItem("Distance totale",Math.round(this._data.distance).toLocaleStr
312ing()+" m"),ot&&this._addElevationPathInformationsItem("Dénivelé positif",this._data.ascendingElevation.toLocaleString()+" m"),ct&&this._addElevationPathInformationsItem("Dénivelé négatif",this._data.descendingElevation.toLocaleString()+" m"),te&&this._addElevationPathInformationsItem("Pente moyenne",this._data.meanSlope.toLocaleString()+" %"),st&&this._addElevationPathInformationsItem("Plus forte pente",this._data.greaterSlope.toLocaleString()+" %")}_removeMeasure(){if(this._lastSketch=null,this._currentSketch=null,this._measureSource){this._marker&&(this._measureSource.removeFeature(this._marker),this._marker=null);for(var ee=this._measureSource.getFeatures(),te=0;te<ee.length;te++)this._measureSource.removeFeature(ee[te])}}_removeProfile(){if(this._profile=null,this._profileContainer)for(;this._profileContainer.firstChild;)this._profileContainer.removeChild(this._profileContainer.firstChild)}onShowElevationPathClick(ee){var te=this._pictoButton.ariaPressed;te==="true"?this.onPanelOpen():this.onPanelClose();var st=this.getMap();Interactions.unset(st,{current:"ElevationPath"}),te==="true"?(this._profile===null&&this._panelContainer.classList.add("GPelementHidden","gpf-hidden"),this._initMeasureInteraction(st),this._addMeasureInteraction(st)):(this._panelContainer.classList.add("GPelementHidden","gpf-hidden"),ee&&ee.target.dataset&&ee.target.dataset.removeMeasure?ee.target.dataset.removeMeasure==="true"?this._removeMeasure():(this._lastSketch=null,this._currentSketch=null):this._removeMeasure(),this._removeProfile(),ee&&ee.target.dataset&&ee.target.dataset.removeLayer?this._removeMeasureInteraction(st,ee.target.dataset.removeLayer==="true"):this._removeMeasureInteraction(st,!0)),this.collapsed=te!=="true",this.dispatchEvent("change:collapsed")}onOpenElevationPathInfoClick(){var ee=this._infoContainer;ee.className==="GPelementVisible gpf-visible"?(clearTimeout(this._timerHdlr),ee.className="GPelementHidden gpf-hidden"):ee.className="GPelevationPathInformationsContainerVisible",this._timerHdlr=setTimeout(function(){ee.className="GPelementHidden gpf-hidden"},4e3)}};Kn(No,"DEFAULT_STYLES",{MARKER:new Icon({src:Marker.lightOrange,anchor:[.5,1],snapToPixel:!0}),RESULTS:{imageRadius:5,imageFillColor:"rgba(128, 128, 128, 0.2)",imageStrokeColor:"rgba(0, 0, 0, 0.7)",imageStrokeWidth:2}});let ElevationPath=No;Object.assign(ElevationPath.prototype,PanelDOM);Object.assign(ElevationPath.prototype,ElevationPathDOM);Object.assign(ElevationPath.prototype,Widget);window.ol&&window.ol.control&&(window.ol.control.ElevationPath=ElevationPath);var logger$c=LoggerByDefault.getLogger("layerimport");const Eo=class Eo extends ControlExtended{constructor(ee){if(ee=ee||{},super(ee),this.CLASSNAME="LayerImport",!(this instanceof Eo))throw new TypeError("ERROR CLASS_CONSTRUCTOR");return this._initialize(ee),this._container=this._initContainer(ee),this.element?this.element.appendChild(this._container):this.element=this._container,this}setMap(ee){if(ee){var te=this;ee.getLayers().on("remove",function(st){st.element.gpResultLayerId==="layerimport:MAPBOX"&&st.element.gpEditorId&&te._mapBoxPanel&&te._importPanel&&(te.cleanMapBoxResults(st.element.gpEditorId),te._mapBoxPanel.classList.replace("GPelementVisible","GPelementHidden"),te._mapBoxPanel.classList.replace("gpf-visible","gpf-hidden"))},te),this.draggable&&Draggable.dragElement(this._importPanel,this._importPanelHeader,ee.getTargetElement()),this.collapsed||this._showImportButton.setAttribute("aria-pressed",!0)}super.setMap(ee),this.options.position&&this.setPosition(this.options.position),this.options.gutter===!1&&this.getContainer().classList.add("gpf-button-no-gutter")}getCollapsed(){return this.collapsed}setCollapsed(ee){if(ee===void 0){logger$c.error("[ERROR] LayerImport:setCollapsed - missing collapsed parameter");return}ee&&this.collapsed||!ee&&!this.collapsed||(ee?this._panelCloseButton.click():this._showImportButton.click(),this.collapsed=ee)}getStaticImportContent(){return this.contentStatic}getServiceImportContent(){return this.contentService}getName(){return this._name}getContainer(){return this._container}_initialize(ee){if(this._checkInputOptions(ee),this.options={title:"Import de données",collapsed:!0,draggable:!1,dragAndDropUI:!1,layerTypes:["KML","GPX","GeoJSON","WMS","WMTS","MAPBOX"],webServicesOptions:{},vectorStyleOptions:{KML:{extractStyles:!0,showPointNames:!0,defaultStyle:{}},GPX:{defaultStyle:{}},GeoJSON:{defaultStyle:{}},MapBox:{defaultStyle:{},editor:{}}}},ee.vectorStyleOptions&&ee.vectorStyleOptions.KML&&ee.vectorStyleOptions.KML.extractStyles&&(this.options.vectorStyleOptions.KML.extractStyles=ee.vectorStyleOptions.KML.extractStyles),ee.vectorStyleOptions&&ee.vectorStyleOptions.KML&&ee.vectorStyleOptions.KML.showPointNames&&(this.options.vectorStyleOptions.KML.showPointNames=ee.vectorStyleOptions.KML.showPointNames),ee.vectorStyleOptions&&ee.vectorStyleOptions.KML&&ee.vectorStyleOptions.KML.defaultStyle?this.options.vectorStyleOptions.KML.defaultStyle=ee.vectorStyleOptions.KML.defaultStyle:this.options.vectorStyleOptions.KML.defaultStyle=new Style$1({image:Eo.DefaultStyles.image,stroke:Eo.DefaultStyles.stroke,fill:Eo.DefaultStyles.fill,text:Eo.DefaultStyles.text}),ee.vectorStyleOptions&&ee.vectorStyleOptions.GPX&&ee.vectorStyleOptions.GPX.defaultStyle?this.options.vectorStyleOptions.GPX.defaultStyle=ee.vectorStyleOptions.GPX.defaultStyle:this.options.vectorStyleOptions.GPX.defaultStyle=new Style$1({image:Eo.DefaultStyles.image,stroke:Eo.DefaultStyles.stroke,fill:Eo.DefaultStyles.fill,text:Eo.DefaultStyles.text}),ee.vectorStyleOptions&&ee.vectorStyleOptions.GeoJSON&&ee.vectorStyleOptions.GeoJSON.defaultStyle?this.options.vectorStyleOptions.GeoJSON.defaultStyle=ee.vectorStyleOptions.GeoJSON.defaultStyle:this.options.vectorStyleOptions.GeoJSON.defaultStyle=new Style$1({image:Eo.DefaultStyles.image,stroke:Eo.DefaultStyles.stroke,fill:Eo.DefaultStyles.fill,text:Eo.DefaultStyles.text}),ee.vectorStyleOptions&&ee.vectorStyleOptions.MapBox&&ee.vectorStyleOptions.MapBox.defaultStyle?this.options.vectorStyleOptions.MapBox.defaultStyle=ee.vectorStyleOptions.MapBox.defaultStyle:this.options.vectorStyleOptions.MapBox.defaultStyle=new Style$1({image:Eo.DefaultStyles.image,stroke:Eo.DefaultStyles.stroke,fill:Eo.DefaultStyles.fill,text:Eo.DefaultStyles.text}),ee.vectorStyleOptions&&ee.vectorStyleOptions.MapBox&&ee.vectorStyleOptions.MapBox.editor?this.options.vectorStyleOptions.MapBox.editor=ee.vectorStyleOptions.MapBox.editor:this.options.vectorStyleOptions.MapBox.editor={title:!0,collapse:!1,themes:!1,layers:!0,style:!0,filter:!1,legend:!0,group:!1},ee.vectorStyleOptions&&ee.vectorStyleOptions.MapBox&&ee.vectorStyleOptions.MapBox.hasOwnProperty("display")?this.options.vectorStyleOptions.MapBox.display=ee.vectorStyleOptions.MapBox.display:this.options.vectorStyleOptions.MapBox.display=!0,Array.isArray(ee.layerTypes)){for(var te=[],st=0;st<ee.layerTypes.length;st++)te.push(ee.layerTypes[st]);this.options.layerTypes=te}
312Helper.mergeParams(this.options,ee),this.collapsed=this.options.collapsed,this.draggable=this.options.draggable,this._uid=this.options.id||SelectorID.generate(),this._waiting=!1,this._timer=null,this._initImportTypes(),this._initDefaultStyles(),this._showImportButton=null,this._importPanel=null,this._panelCloseButton=null,this._importPanelHeader=null,this._importPanelTitle=null,this._importPanelReturnPicto=null,this._formContainer=null,this._staticLocalImportInput=null,this._staticUrlImportInput=null,this._serviceUrlImportInput=null,this._getCapPanel=null,this._getCapPanelHeader=null,this._getCapResultsListContainer=null,this._mapBoxPanel=null,this._mapBoxPanelHeader=null,this._mapBoxResultsListContainer=null,this._waitingContainer=null,this._loadingContainer=null,this._hasGetCapResults=!1,this._getCapRequestUrl=null,this._getCapResponseWMS=null,this._getCapResponseWMSLayers=[],this._getCapResponseWMTS=null,this._getCapResponseWMTSLayers=[],this._hasMapBoxResults=!1,this.contentStatic=null,this._url=null,this._file=null,this._name=null}_checkInputOptions(ee){if(ee.layerTypes){var te=ee.layerTypes;if(!Array.isArray(te))logger$c.warn(`[ol.control.LayerImport] 'options.layerTypes' parameter should be an array. Set default values ["KML", "GPX", "GeoJSON", "WMS", "WMTS"]`),ee.layerTypes=["KML","GPX","GeoJSON","WMS","WMTS","MAPBOX"];else{for(var st=["KML","GPX","GEOJSON","WMS","WMTS","WFS","MAPBOX"],ot=[],ct=0;ct<te.length;ct++)typeof te[ct]!="string"?(ot.push(ct),logger$c.warn("[ol.control.LayerImport] 'options.layerTypes' elements should be of type string ("+te[ct]+")")):(te[ct]=te[ct].toUpperCase(),st.indexOf(te[ct])===-1&&(ot.push(ct),logger$c.log("[ol.control.LayerImport] options.layerTypes : "+te[ct]+" is not a supported type")),te[ct]==="GEOJSON"&&(te[ct]="GeoJSON"),te[ct]==="MAPBOX"&&(te[ct]="MAPBOX"));if(ot.length!==0)for(var ut=ot.length-1;ut>=0;ut--)te.splice(ot[ut],1)}}}_initDefaultStyles(){var ee=this.options.vectorStyleOptions.KML.defaultStyle;this._defaultKMLStyle=new Style$1({image:ee.image,stroke:ee.stroke,fill:ee.fill,text:ee.text});var te=this.options.vectorStyleOptions.GPX.defaultStyle;this._defaultGPXStyle=new Style$1({image:te.image,stroke:te.stroke,fill:te.fill,text:te.text});var st=this.options.vectorStyleOptions.GeoJSON.defaultStyle;this._defaultGeoJSONStyle=new Style$1({image:st.image,stroke:st.stroke,fill:st.fill,text:st.text});var ot=this.options.vectorStyleOptions.MapBox.defaultStyle;this._defaultMapBoxStyle=new Style$1({image:ot.image,stroke:ot.stroke,fill:ot.fill,text:ot.text})}_initImportTypes(){this._currentImportType=this.options.layerTypes[0]||"KML",this._currentImportType==="KML"||this._currentImportType==="GPX"||this._currentImportType==="GeoJSON"||this._currentImportType==="MAPBOX"?this._isCurrentImportTypeStatic=!0:(this._currentImportType==="WMS"||this._currentImportType==="WMTS"||this._currentImportType==="WFS")&&(this._isCurrentImportTypeStatic=!1),this._currentStaticImportType="local"}_initContainer(){var ee=this._createMainContainerElement(),te=this._showImportButton=this._createShowImportPictoElement();ee.appendChild(te);var st=this._importPanel=this._createImportPanelElement(),ot=this._createImportPanelDivElement(),ct=this._importPanelHeader=this._createPanelHeaderElement({icon:"ign-layerimport",title:this.options.title,btnClassForClose:"GPshowImportPicto",backBtn:!0});st.appendChild(ct),st.appendChild(ot),this._importPanelTitle=ct._title,this._panelCloseButton=ct._closeBtn,this._importPanelReturnPicto=ct._backBtn,this._importPanelReturnPicto.addEventListener("click",vt=>{document.getElementById(this._addUID("GPshowImportPicto")).click(),this._onReturnPictoClick(vt),document.getElementById(this._addUID("GPshowImportPicto")).click()});var ut=this._formContainer=this._initInputFormElement();ot.appendChild(ut);var dt=this._getCapPanel=this._createImportGetCapPanelElement(),ht=this._getCapResultsListContainer=this._createImportGetCapResultsContainer();dt.appendChild(ht),ot.appendChild(dt);var ft=this._mapBoxPanel=this._createImportMapBoxPanelElement(),pt=this._mapBoxResultsListContainer=this._createImportMapBoxResultsContainer();ft.appendChild(pt);var mt=this._loadingContainer=this._createLoadingElement();ft.appendChild(mt),ot.appendChild(ft);var yt=this._waitingContainer=this._createImportWaitingElement();return ot.appendChild(yt),ee.appendChild(st),ee}_initInputFormElement(){var ee=this._createImportPanelFormElement(),te=this._createImportTypeLineElement(this.options.layerTypes);ee.appendChild(te);var st=this._createImportStaticParamsContainer(this.options.layerTypes[0]);if(!this.options.dragAndDropUI){var ot=this._createStaticNameLabel();st.appendChild(ot);var ct=this._createStaticModeChoiceDiv(),ut=this._createStaticLocalChoiceDiv();ct.appendChild(ut);var dt=this._createStaticUrlChoiceDiv();ct.appendChild(dt),st.appendChild(ct)}var ht=this._createStaticLocalInputDiv();if(this._staticLocalImportInput=this._createStaticLocalInput(),this.options.dragAndDropUI?ht.appendChild(this._createStaticLocalDropZone(this._staticLocalImportInput)):(ht.appendChild(this._createStaticLocalInputLabel()),ht.appendChild(this._staticLocalImportInput)),st.appendChild(ht),!this.options.dragAndDropUI){var ft=this._createStaticUrlInputDiv();ft.appendChild(this._createStaticUrlInputLabel()),this._staticUrlImportInput=this._createStaticUrlInput(),ft.appendChild(this._staticUrlImportInput),st.appendChild(ft)}ee.appendChild(st);var pt=this._createServiceParamsContainer(this.options.layerTypes[0]),mt=this._createServiceUrlDiv();mt.appendChild(this._createServiceUrlInputLabel()),this._serviceUrlImportInput=this._createServiceUrlInput(),mt.appendChild(this._serviceUrlImportInput),pt.appendChild(mt),ee.appendChild(pt);var yt=this._createImportSubmitFormElement();return ee.appendChild(yt),ee}_onShowImportClick(ee){var te=this._showImportButton.ariaPressed;te==="true"&&this.onPanelOpen();var st=this.getMap();Interactions.unset(st),this.collapsed=te!=="true",this.dispatchEvent("change:collapsed"),this.options.position&&!this.collapsed&&this.updatePosition(this.options.position),this._hasMapBoxResults?(this._mapBoxPanel.classList.replace("GPelementHidden","GPelementVisible"),this._mapBoxPanel.classList.replace("gpf-hidden","gpf-visible"),this._hideFormContainer()):this._hasGetCapResults?(this._getCapPanel.classList.replace("GPelementHidden","GPelementVisible"),this._getCapPanel.classList.replace("gpf-hidden","gpf-visible"),this._hideFormContainer()):(this._getCapPanel.classList.replace("GPelementVisible","GPelementHidden"),this._getCapPanel.classList.replace("gpf-visible","gpf-hidden"),this._mapBoxPanel.classList.replace("GPelementVisible","GPelementHidden"),this._mapBoxPanel.classList.replace("gpf-visible","gpf-hidden"),this._displayFormContainer())}_onImportTypeChange(ee){this._currentImportType=ee.target.value,this._currentImportType==="KML"||this._currentImportType==="GPX"||this._currentImportType==="GeoJSON"||this._currentImportType==="MAPBOX"?this._isCurrentImportTypeStatic=!0:(this._currentImportType==="WMS"||this._currentImportType==="WMTS"||this._currentImportType==="WFS")&&(this._isCurrentImportTypeStatic=!1)}_onStaticImportTypeChange(ee){this._currentStaticImportType=ee.target.value}_onGetCapPanelClose(){(this._currentImportType==="WMS"||this._currentImportType==="WMTS"||this._currentImportType==="WFS")&&this.cleanGetCapResultsList()}_onMapBoxPanelClose(){this.cleanMapBoxResultsList(),this._loadingContainer.className="",this._importPanelReturnPicto.classList.add("GPelementHidden","gpf-hidden"),this._mapBoxPanel.classList.replace("GPelementVisible","GPelementHidden"),this._mapBoxPanel.classList.replace("gpf-visible","gpf-hidden")}
312_onReturnPictoClick(ee){this._onGetCapPanelClose(),this._onMapBoxPanelClose(),this._loadingContainer.className=""}_onImportSubmit(){logger$c.log("import d'une couche de type : "+this._currentImportType),this.contentStatic=null,this.contentService=null,this._isCurrentImportTypeStatic?(this.setCollapsed(!0),this._importStaticLayer()):this._importServiceLayers()}_importStaticLayer(){var ee,te=document.getElementById(this._addUID("GPimportName"));te&&(ee=te.value||"",logger$c.log("import layer name : "+ee)),this._currentStaticImportType==="local"?(logger$c.log("import static layer from local file"),this._importStaticLayerFromLocalFile(ee)):this._currentStaticImportType==="url"&&(logger$c.log("import static layer from url"),this._importStaticLayerFromUrl(ee))}_importStaticLayerFromUrl(ee){var te=this._staticUrlImportInput.value;if(logger$c.log("url : ",te),te.length===0){logger$c.error("[ol.control.LayerImport] url parameter is mandatory");return}te.trim&&(te=te.trim()),this._url=te,ee||(ee=this._url.substring(this._url.lastIndexOf("/")+1,this._url.lastIndexOf("."))),this._name=ee,this.options.webServicesOptions&&this.options.webServicesOptions.proxyUrl&&(te=ProxyUtils.proxifyUrl(te,this.options.webServicesOptions));var st=this;Gp.Protocols.XHR.call({url:te,method:"GET",timeOut:15e3,onResponse:function(ot){st._hideWaitingContainer(),st._addFeaturesFromImportStaticLayer(ot,ee)},onFailure:function(ot){st._hideWaitingContainer(),logger$c.error("[ol.control.LayerImport] KML/GPX/GeoJSON/MapBox request failed : ",ot)}})}_importStaticLayerFromLocalFile(ee){var te=this._staticLocalImportInput.files[0];if(!te){logger$c.warn("[ol.control.LayerImport] missing file");return}this._file=te,ee||(ee=this._file.name.substring(this._file.name.lastIndexOf("/")+1,this._file.name.lastIndexOf("."))),this._name=ee;var st=new FileReader,ot=this;st.onerror=ct=>{ot._hideWaitingContainer(),logger$c.error("error fileReader : ",ct)},st.onprogress=()=>{logger$c.log("onprogress")},st.onloadstart=()=>{ot._displayWaitingContainer(),logger$c.log("onloadstart")},st.onabort=()=>{ot._hideWaitingContainer(),logger$c.log("onabort")},st.onloadend=ct=>{logger$c.log("onloadend : ",ct)},st.onload=ct=>{logger$c.log("fileReader onload - file content : ",ct.target.result),ot._hideWaitingContainer(),ot._addFeaturesFromImportStaticLayer(ct.target.result,ee)},st.readAsText(te)}_addFeaturesFromImportStaticLayer(ee,te){var st=this.getMap();if(!(!st||!ee)){var ot=null,ct=null,ut=null,dt=null;if(this.contentStatic=ee,this._currentImportType==="MAPBOX"){this._hasMapBoxResults=!0;var ht=this,ft=JSON.parse(ee);st.set("mapbox-style",ft);var pt=ft.sources,mt=Object.keys(pt).length>1?1:0;for(var yt in pt)if(pt.hasOwnProperty(yt)){var vt="",_t="",bt=null,xt=null,Mt=null,Ot=null;if(ft.metadata){for(var kt in ft.metadata)if(ft.metadata.hasOwnProperty(kt)){var Nt=kt.split(":");if(Nt[0]==="geoportail"){var Gt=Nt[1];if(Gt==="title"){vt=ft.metadata[kt];continue}if(Gt==="description"){_t=ft.metadata[kt];continue}if(Gt==="quicklookUrl"){bt=ft.metadata[kt];continue}if(Gt==="legends"){xt=ft.metadata[kt];continue}if(Gt==="metadata"){Mt=ft.metadata[kt];continue}if(Gt==="originators"){Ot=ft.metadata[kt];continue}}}}vt||(vt="Couche MapBox"),_t||(_t="Couche MapBox"),vt=mt?vt+"("+yt+")":vt;var Bt=pt[yt],Ut=Bt.type;if(Ut==="vector"){var Vt=Bt.url,Ht=Bt.tiles,zt=ft.sprite;if(Vt&&Vt.indexOf("mapbox://")===0){var jt=this._url;if(jt){if(Ht=["a","b","c","d"].map(function(Rn){var Bn=Vt.replace("mapbox://",""),Vn=jt.split("?")[1];return"https://"+Rn+".tiles.mapbox.com/v4/"+Bn+"/{z}/{x}/{y}.vector.pbf?"+Vn}),zt.indexOf("mapbox://")===0){var Wt=jt.split("?");ft.sprite=Wt[0]+"/sprite?"+Wt[1]}}else logger$c.warn("Not yet implemented, can't use the local import scheme with a 'mapbox://' in the file.!")}if(Ht)ut=new MVT({featureClass:Feature}),ct=new VectorTile({attributions:Bt.attribution,format:ut,urls:Ht}),ct._title=vt,ct._description=_t,ct._quicklookUrl=bt,ct._metadata=Mt,ct._legends=xt,ct._originators=Ot,ct.on("tileloadstart",function(Rn){ht._loadingContainer.className="GPmapLoadingVisible"}),ct.on("tileloadend",function(Rn){ht._loadingContainer.className=""}),ct.on("tileloaderror",function(Rn){ht._loadingContainer.className=""}),ot=new VectorTileLayer({source:ct,visible:!1,declutter:!0}),ot.id=yt,ot.gpResultLayerId="layerimport:"+this._currentImportType;else if(Vt){ut=new MVT({featureClass:Feature}),ot=new VectorTileLayer({visible:!1,declutter:!0}),ot.id=yt,ot.gpResultLayerId="layerimport:"+this._currentImportType;var Jt=new TileJSON({url:Vt}),Qt=Jt.on("change",function(){if(Jt.getState()==="ready"){for(var Rn=Jt.getTileJSON(),Bn=Array.isArray(Rn.tiles)?Rn.tiles:[Rn.tiles],Vn=0;Vn<Bn.length;Vn++){var Wn=Bn[Vn];Wn.indexOf("http")!==0&&(Bn[Vn]=Vt+Wn)}ct=new VectorTile({attributions:Jt.getAttributions()||Rn.attribution,format:ut,urls:Bn}),ct._title=vt,ct._description=_t,ct._quicklookUrl=bt,ct._metadata=Mt,ct._legends=xt,ct._originators=Ot,ct.on("tileloadstart",function(Gn){ht._loadingContainer.className="GPmapLoadingVisible"}),ct.on("tileloadend",function(Gn){ht._loadingContainer.className=""}),ot.setSource(ct),ot.set("mapbox-extension",Rn.vector_layers),un
312ByKey(Qt)}})}}else if(Ut==="geojson"){var oi=Bt.data;ut=new GeoJSON,ct=new VectorTile({attributions:Bt.attribution,format:ut,url:oi}),ct._title=vt,ct._description=_t,ct._quicklookUrl=bt,ct._metadata=Mt,ct._legends=xt,ct._originators=Ot,ot=new VectorTileLayer({source:ct,visible:!1,declutter:!0}),ot.id=yt,ot.gpResultLayerId="layerimport:"+this._currentImportType}else{logger$c.warn("Type MapBox format unknown !");return}var ai=JSON.parse(JSON.stringify(ft));if(mt){for(var xn=ai.layers,An=0;An<xn.length;An++){var Nn=xn[An];if(Nn.source!==yt){xn.splice(An,1);continue}}for(var Xt in ai.sources)ai.sources.hasOwnProperty(Xt)&&Xt!==yt&&delete ai.sources[Xt]}var Zt={id:yt,styles:ai,layer:ot,options:{title:te||vt,description:_t,quicklookUrl:bt,metadata:Mt,legends:xt,originators:Ot}};(function(Rn){var Bn=()=>{applyStyle(Rn.layer,Rn.styles,{source:Rn.id,updateSource:!1}).then(function(){var Gn=!0;Rn.layer.setVisible(Gn);var Hn=1;Rn.layer.setOpacity(Hn)}).then(function(){var Gn=st.getView().getProjection().getCode();st.getView()&&Rn.styles.center&&Rn.styles.center.length&&st.getView().setCenter(transform$1(Rn.styles.center,"EPSG:4326",Gn)),st.getView()&&(Rn.styles.zoom||Rn.styles.zoom===0)&&st.getView().setZoom(Rn.styles.zoom);var Hn=Rn.layer.getSource();if(st.getView()&&st.getSize()){var kn=null;Hn&&Hn.getExtent?kn=Hn.getExtent():kn=Hn.getTileGrid().getExtent(),kn&&kn[0]!==1/0&&st.getView().fit(kn,st.getSize())}}).then(function(){ht._hideFormContainer(),ht._importPanelHeader.classList.replace("GPelementVisible","GPelementHidden"),ht._importPanelHeader.classList.replace("gpf-visible","gpf-hidden"),ht._importPanelTitle.innerHTML="Edition des styles";var Gn=new Editor({target:ht._mapBoxResultsListContainer,style:JSON.parse(JSON.stringify(Rn.styles)),scope:this,events:{"editor:onloaded":ht._onLoadedMapBox,"editor:layer:onclickvisibility":ht._onChangeVisibilitySourceMapBox,"editor:style:scale:onchangemin":ht._onChangeScaleMinSourceMapBox,"editor:style:scale:onchangemax":ht._onChangeScaleMaxSourceMapBox,"editor:legend:onchangevalue":ht._onChangeLegendValueSourceMapBox,"editor:legend:onclickedition":ht._onDisplayLayerSourceMapBox},tools:ht.options.vectorStyleOptions.MapBox.editor});return Gn.setContext("map",st),Gn.setContext("layer",Rn.layer),Gn.createElement().then(function(){if(Gn.getLayers().length===0)throw new Error("Il n'existe pas de styles pour la source demandée !?")}).then(function(){ht.options.vectorStyleOptions.MapBox.display&&(ht._importPanelHeader.classList.replace("GPelementHidden","GPelementVisible"),ht._importPanelHeader.classList.replace("gpf-hidden","gpf-visible"),ht._mapBoxPanel.classList.replace("GPelementHidden","GPelementVisible"),ht._mapBoxPanel.classList.replace("gpf-hidden","gpf-visible"),ht._importPanelReturnPicto.classList.remove("GPelementHidden","gpf-hidden"))}).then(function(){var Hn=ht._mapBoxResultsListContainer.getElementsByClassName("GPEditorMapBoxLayerTitleLabel");for(let kn=0;kn<Hn.length;kn++){const er=Hn[kn];er.textContent==="bckgrd"&&(er.textContent="Couleur de remplissage")}}).then(function(){Rn.layer.set("mapbox-editor",Gn.getID()),setTimeout(function(){st.dispatchEvent({id:Gn.getID(),type:"editor:loaded",style:Rn.styles,layer:Rn.layer})},100)}).catch(function(Hn){throw Hn})}).then(function(){st.dispatchEvent({id:Rn.id,type:"render:success",style:Rn.styles})}).catch(function(Gn){logger$c.error(Gn),st.dispatchEvent({id:Rn.id,type:"render:failure",error:Gn})})};logger$c.warn(Rn.layer);var Vn=st.get("mapbox-styles")||{},Wn=Rn.id;Vn[Wn]=Rn.styles,st.set("mapbox-styles",Vn),Rn.layer.set("mapbox-styles",Rn.styles),st.addLayer(Rn.layer),ht.dispatchEvent({type:"layerimport:mapbox:added",name:te,data:ee,layer:Rn.layer,format:ht._currentImportType.toLowerCase()||"mapbox"}),Rn.layer.getSource()?Bn():Rn.layer.once("change:source",Bn),st.getControls().forEach(Gn=>{Gn instanceof LayerSwitcher&&Gn.addLayer(Rn.layer,Rn.options)})})(Zt)}}else{this._currentImportType==="KML"?(dt=this.options.vectorStyleOptions.KML.defaultStyle,ut=new KML({showPointNames:this.options.vectorStyleOptions.KML.showPointNames,extractStyles:this.options.vectorStyleOptions.KML.extractStyles,defaultStyle:[dt]})):this._currentImportType==="GPX"?(dt=this.options.vectorStyleOptions.GPX.defaultStyle,ut=new GPX({defaultStyle:dt,readExtensions:function(Rn,Bn){this.readExtensions(Rn,Bn)}})):this._currentImportType==="GeoJSON"&&(dt=this.options.vectorStyleOptions.GeoJSON.defaultStyle,ut=new GeoJSON({defaultStyle:dt}));var Kt=ut.readProjection(ee),ti=this._getMapProjectionCode(),qt=null;qt=ut.readFeatures(ee,{dataProjection:Kt,featureProjection:ti}),logger$c.log("loaded features : ",qt);for(let Rn=0;Rn<qt.length;Rn++){const Bn=qt[Rn];var ii=Bn.getProperties();for(var Gt in ii)if(ii.hasOwnProperty(Gt)){var wn=ii[Gt];
312typeof wn=="string"&&Bn.set(Gt,sanitizeHtml(wn))}}ct=new VectorSource({features:new Collection}),ct.addFeatures(qt),logger$c.trace(ct),ct._title=ct._description=te,ot=new VectorLayer({source:ct,style:dt}),ot.gpResultLayerId="layerimport:"+this._currentImportType;var ni=ut.readRootExtensions("geoportail:compute");if(ni&&Object.keys(ni).length!==0){var Cn={route:{class:Route,name:"itineraire"},isocurve:{class:Isocurve,name:"isocurve"},elevationpath:{class:ElevationPath,name:"profil altimetrique"}},Ln=ni.type,Un=ni.transport;if(Ln){var Pn=Cn[Ln].name,Mn=Un?Pn+" ("+Un+")":Pn,Yt=Cn[Ln].class;if(Yt){ot.gpResultLayerId="layerimport:COMPUTE",ot.set("control",Ln),ot.set("name",Pn),ot.set("graph",Un),ot.set("data",ni),ot.set("title",Mn);var ri=new GeoJSON({defaultStyle:dt}),Sn=ri.writeFeatures(qt,{dataProjection:"EPSG:4326",featureProjection:"EPSG:3857"});ot.set("geojson",Sn),this.getMap().getControls().forEach(Rn=>{Rn instanceof Yt&&(Rn.setData(ni),Rn.setLayer(ot),Rn.init())})}}}if(st.addLayer(ot),st.getView()&&st.getSize()&&ct.getExtent){var On=ct.getExtent();On&&On[0]!==1/0&&st.getView().fit(On,st.getSize())}this.dispatchEvent({type:"layerimport:vector:added",name:te,data:ee,layer:ot,format:this._currentImportType.toLowerCase()})}}}_addFeaturesFromImportStaticLayerUrl(ee,te){var st=this.getMap();if(!(!st||!ee)){var ot,ct,ut;if(this._currentImportType==="MAPBOX"?logger$c.trace("Not yet implemented !"):(this._currentImportType==="KML"?ut=new KML({showPointNames:!0,extractStyles:this.options.vectorStyleOptions.KML.extractStyles,defaultStyle:[this.options.vectorStyleOptions.KML.defaultStyle]}):this._currentImportType==="GPX"?ut=new GPX({defaultStyle:this.options.vectorStyleOptions.GPX.defaultStyle,readExtensions:function(ht,ft){this.readExtensions(ht,ft)}}):this._currentImportType==="GeoJSON"&&(ut=new GeoJSON({defaultStyle:this.options.vectorStyleOptions.GeoJSON.defaultStyle})),ot=new VectorSource({url:ee,format:ut}),this._currentImportType==="GPX"&&ot.forEachFeature(function(ht){ht.getStyle()==null&&(logger$c.log("[ol.control.LayerImport] set default style for GPX feature"),ht.setStyle(this.options.vectorStyleOptions.GPX.defaultStyle))}),this._currentImportType==="GeoJSON"&&ot.forEachFeature(function(ht){ht.getStyle()==null&&(logger$c.log("[ol.control.LayerImport] set default style for GeoJSON feature"),ht.setStyle(this.options.vectorStyleOptions.GeoJSON.defaultStyle))}),ot._title=ot._description=te,ct=new VectorLayer({source:ot})),ct.gpResultLayerId="layerimport:"+this._currentImportType,st.addLayer(ct),st.getView()&&st.getSize()&&ot.getExtent){var dt=ot.getExtent();dt&&dt[0]!==1/0&&st.getView().fit(dt,st.getSize())}this.dispatchEvent({type:"layerimport:vector:added",name:te,url:ee,layer:ct,format:this._currentImportType.toLowerCase()})}}_onLoadedMapBox(ee){}_onChangeVisibilitySourceMapBox(ee){var te=ee.target.data.obj,st=ee.target.srcElement;this.getContext("map");var ot=this.getContext("layer");if(ot.get("mapbox-source")===te.source&&ot.get("mapbox-editor")===ee.target.editorID){var ct=ot.get("mapbox-styles");ct.id&&delete ct.id;for(var ut=ct.layers,dt=0;dt<ut.length;dt++)if(ut[dt].id===te.id){var ht=ut[dt].layout;ht?ht.visibility=st.checked?"visible":"none":ut[dt].layout={visibility:st.checked?"visible":"none"},ut[dt];break}applyStyle(ot,ct,{source:te.source,updateSource:!1}).then(function(){}).catch(function(ft){logger$c.error(ft)})}}_onChangeScaleMinSourceMapBox(ee){var te=ee.target.data.obj,st=ee.target.srcElement;this.getContext("map");var ot=this.getContext("layer");if(ot.get("mapbox-source")===te.source&&ot.get("mapbox-editor")===ee.target.editorID){var ct=ot.get("mapbox-styles");ct.id&&delete ct.id;for(var ut=ct.layers,dt=0;dt<ut.length;dt++)if(ut[dt].id===te.id){ut[dt].minzoom=st.value,st.title=st.value,ut[dt];break}applyStyle(ot,ct,{source:te.source,updateSource:!1}).then(function(){}).catch(function(ht){logger$c.error(ht)})}}_onChangeScaleMaxSourceMapBox(ee){var te=ee.target.data.obj,st=ee.target.srcElement;this.getContext("map");var ot=this.getContext("layer");if(ot.get("mapbox-source")===te.source&&ot.get("mapbox-editor")===ee.target.editorID){var ct=ot.get("mapbox-styles");ct.id&&delete ct.id;for(var ut=ct.layers,dt=0;dt<ut.length;dt++)if(ut[dt].id===te.id){ut[dt].maxzoom=st.value,st.title=st.value,ut[dt];break}applyStyle(ot,ct,{source:te.source,updateSource:!1}).then(function(){}).catch(function(ht){logger$c.error(ht)})}}
312_onChangeLegendValueSourceMapBox(ee){var te=ee.target.data.obj,st=ee.target.srcElement;this.getContext("map");var ot=this.getContext("layer");if(ot.get("mapbox-source")===te.source&&ot.get("mapbox-editor")===ee.target.editorID){var ct=ot.get("mapbox-styles");ct.id&&delete ct.id;for(var ut=ct.layers,dt=0;dt<ut.length;dt++)if(ut[dt].id===te.id){var ht=ut[dt].paint;ht&&(ht[st.dataset.id]=st.value),ut[dt];break}applyStyle(ot,ct,{source:te.source,updateSource:!1}).then(function(){}).catch(function(ft){logger$c.error(ft)})}}_onDisplayLayerSourceMapBox(ee){var te=ee.target.data.obj,st=this.getContext("layer");if(st.get("mapbox-source")===te.source&&st.get("mapbox-editor")===ee.target.editorID){var ot=ee.target.currentTarget.parentNode.id,ct=ot.substring(ot.indexOf("-")+1,ot.indexOf("_")),ut=this.getLayer(ct);ut.collapse()}}_importServiceLayers(){if(this._currentImportType==="WFS"){logger$c.warn("[ol.control.LayerImport] WFS layer import is not implemented yet");return}this.cleanGetCapResultsList();var ee=this._getCapRequestUrl=this._serviceUrlImportInput.value;if(!ee){logger$c.error("[ol.control.LayerImport] url parameter is mandatory");return}logger$c.log("url : ",ee),ee.trim&&(ee=ee.trim());var te=ee.indexOf("?");te<0?ee+="?SERVICE="+this._currentImportType+"&REQUEST=GetCapabilities":te===ee.length-1&&(ee+="SERVICE="+this._currentImportType+"&REQUEST=GetCapabilities"),this.options.webServicesOptions&&this.options.webServicesOptions.proxyUrl&&(ee=ProxyUtils.proxifyUrl(ee,this.options.webServicesOptions)),this._displayWaitingContainer();var st=this;Gp.Protocols.XHR.call({url:ee,method:"GET",timeOut:15e3,onResponse:function(ot){st._hideWaitingContainer(),st._displayGetCapResponseLayers(ot)},onFailure:function(ot){st._hideWaitingContainer(),logger$c.error("[ol.control.LayerImport] getCapabilities request failed : ",ot)}})}_displayGetCapResponseLayers(ee){var te,st,ot={content:null,title:null},ct;if(this._getCapResponseWMSLayers=[],this.contentService=ee,this._hideFormContainer(),this._getCapPanel.classList.replace("GPelementHidden","GPelementVisible"),this._getCapPanel.classList.replace("gpf-hidden","gpf-visible"),this._importPanelTitle.innerHTML="Couches accessibles",this._importPanelReturnPicto.classList.remove("GPelementHidden","gpf-hidden"),this._hasGetCapResults=!0,this._currentImportType==="WMS"){te=new WMSCapabilities;var ut=this._getCapResponseWMS=te.read(ee);if(logger$c.log("getCapabilities response : ",ut),ut&&ut.Capability&&ut.Capability.Layer){var dt=ut.Capability.Layer;if(Array.isArray(dt))for(var ht=0;ht<dt.length;ht++)this._displayGetCapResponseWMSLayer(dt[ht]);else this._displayGetCapResponseWMSLayer(dt)}}else if(this._currentImportType==="WMTS"){te=new WMTSCapabilities;var ft=this._getCapResponseWMTS=te.read(ee);if(logger$c.log("getCapabilities response : ",ft),ft&&ft.Contents&&ft.Contents.Layer&&(st=ft.Contents.Layer,Array.isArray(st))){this._getCapResponseWMTSLayers=st;for(var pt=0;pt<st.length;pt++)if(ct=this._getWMTSLayerProjection(st[pt],ft),ct&&typeof ct=="string")if(get$3(ct)||get$3(ct.toUpperCase()))ot={content:st[pt].Title,title:st[pt].Abstract||st[pt].Title},this._getCapResultsListContainer&&this._addImportGetCapResultLayer(ot,pt,this._getCapResultsListContainer);else{logger$c.warn("[ol.control.LayerImport] wmts layer cannot be added to map : unknown projection",st[pt]);continue}}}}_displayGetCapResponseWMSLayer(ee,te){if(!ee){logger$c.warn("[ol.control.LayerImport] _displayGetCapResponseWMSLayer : getCapabilities layer object not found");return}logger$c.log("[ol.control.LayerImport] _displayGetCapResponseWMSLayer - layerObj : ",ee);var st=this._getMapProjectionCode(),ot,ct={content:null,title:null};if(te){var ut,dt,ht=["CRS","Style"];for(dt=0;dt<ht.length;dt++)if(ut=ht[dt],Array.isArray(te[ut])&&te[ut].length!==0)if(Array.isArray(ee[ut])&&ee[ut].length!==0)for(var ft=0;ft<te[ut].length;ft++)ee[ut].indexOf(te[ut][ft])===-1&&ee[ut].push(te[ut][ft]);else ee[ut]=te[ut];var pt=["BoundingBox","EX_GeographicBoundingBox","MaxScaleDenominator","MinScaleDenominator","Attribution","Dimension","queryable","cascaded","opaque","noSubsets","fixedWidth","fixedHeight"];for(dt=0;dt<pt.length;dt++)ut=pt[dt],te[ut]&&!ee[ut]&&(ee[ut]=te[ut])}else ee._isRootLayer=!0,ee._container=this._getCapResultsListContainer,ee.Title||(ee.Title="Liste des couches");if(ee.Layer){if(Array.isArray(ee.Layer)){var mt=ee?ee._container:te._container,yt=ee?ee.Title:te.Title;ee._container=this._addImportGetCapResultListRubrique(yt,mt).lastChild;for(var vt=0;vt<ee.Layer.length;vt++){for(var _t=!1,bt=ee._container.getElementsByClassName("GPimportGetCapRubriqueTitle"),xt=0;xt<bt.length;xt++)bt[xt].title===ee.Title&&(_t=!0,ee.Layer[vt]._container=bt[xt].parentElement);_t||(ee.Layer[vt]._container=this._addImportGetCapResultRubrique(ee.Title,ee._container).lastChild),this._displayGetCapResponseWMSLayer(ee.Layer[vt],ee)}}}else{var Mt=this._getCapResponseWMSLayers.length;if(ot=this._getWMSLayerProjection(ee,st),!ot)logger$c.warn("[ol.control.LayerImport] wms layer cannot be added to map : unknown projection",ee);else{ee._projection=ot,ct={content:ee.Title,title:ee.Abstract||ee.Title};var Ot=ee._container;Ot.localName==="ul"&&(Ot=Ot.lastChild),this._addImportGetCapResultLayer(ct,Mt,Ot),this._getCapResponseWMSLayers[Mt]=ee}}}_onGetCapResponseLayerClick(ee){if(ee.target&&ee.target.id){var te=parseInt(ee.target.id.substr(23),10);if(isNaN(te))return;var st;this._currentImportType==="WMS"?(st=this._getCapResponseWMSLayers[te],this._addGetCapWMSLayer(st)):this._currentImportType==="WMTS"&&(st=this._getCapResponseWMTSLayers[te],this._addGetCapWMTSLayer(st))}}_addGetCapWMSLayer(ee){var te=this.getMap();if(!te){logger$c.warn("[ol.control.LayerImport] _addGetCapWMSLayer error : map is not defined");return}if(!ee){logger$c.warn("[ol.control.LayerImport] _addGetCapWMSLayer error : layerInfo is not defined");return}var st=this._getMapProjectionCode(),ot={},ct=this._getWMSLayerGetMapUrl();if(ct)ot.url=ct;else{var ut=this._getCapRequestUrl.indexOf("?");ut!==-1?ot.url=this._getCapRequestUrl.substring(0,ut):ot.url=this._getCapRequestUrl}if(ee.Url=ct||ot.url,ot.params={},ee.Name)ot.params.LAYERS=ee.Name;else{logger$c.warn("[ol.control.LayerImport] unable to add wms layer : mandatory layer 'name' parameter cannot be found",ee);return}ot.params.SERVICE="WMS",this._getCapResponseWMS.version&&(ot.params.VERSION=this._getCapResponseWMS.version),ee.Version=this._getCapResponseWMS.version;var dt=ee._projection;if(dt)dt!==st&&(ot.projection=dt);else{logger$c.warn("[ol.control.LayerImport] wms layer cannot be added to map : unknown projection");return}ee.Projection=dt||ot.projection;var ht;if(ee.Style&&Array.isArray(ee.Style)){var ft=ee.Style[0];ot.params.STYLES=ft.Name,ft.LegendURL&&Array.isArray(ft.LegendURL)&&ft.LegendURL.length!==0&&(ht=ft.LegendURL[0].OnlineResource)}var pt=new TileWMS(ot);this._getWMSLayerInfoForLayerSwitcher(ee,ht,pt);var mt={};mt.source=pt,this._getWMSLayerMinMaxResolution(ee,st,mt),this._getWMSLayerExtent(ee,st,mt);
312var yt=new TileLayer(mt);if(yt.setExtent(mt.extent),yt.gpResultLayerId="layerimport:WMS",ee.queryable&&(yt.gpGFIparams={queryable:!0},this._getCapResponseWMS&&this._getCapResponseWMS.Capability&&this._getCapResponseWMS.Capability.Request&&this._getCapResponseWMS.Capability.Request.GetFeatureInfo&&this._getCapResponseWMS.Capability.Request.GetFeatureInfo.Format&&Array.isArray(this._getCapResponseWMS.Capability.Request.GetFeatureInfo.Format)&&(yt.gpGFIparams.formats=this._getCapResponseWMS.Capability.Request.GetFeatureInfo.Format)),te.addLayer(yt),te.getView()&&te.getSize()&&yt.getExtent){var vt=yt.getExtent();vt&&vt[0]!==1/0&&te.getView().fit(vt,te.getSize())}this.dispatchEvent({type:"layerimport:service:added",name:ee.Name,data:ee,layer:yt,format:"wms"})}_getWMSLayerGetMapUrl(){var ee;if(this._getCapResponseWMS&&this._getCapResponseWMS.Capability&&this._getCapResponseWMS.Capability.Request&&this._getCapResponseWMS.Capability.Request.GetMap){var te=this._getCapResponseWMS.Capability.Request.GetMap;if(te.DCPType&&Array.isArray(te.DCPType)&&te.DCPType.length!==0){var st=te.DCPType[0];st&&st.HTTP&&st.HTTP.Get&&(ee=st.HTTP.Get.OnlineResource)}}return ee}_getWMSLayerProjection(ee,te){var st;if(!ee||typeof ee!="object"){logger$c.warn("missing layer information (from getCapabilities)");return}var ot=ee.CRS;if(Array.isArray(ot)){if(ot.includes(te))return st=te,st;var ct,ut;for(ut=0;ut<ot.length;ut++)if(ct=ot[ut],ct&&typeof ct=="string"&&(get$3(ct)||get$3(ct.toUpperCase())))return st=ct,st}return st}_getWMSLayerMinMaxResolution(ee,te,st){var ot=get$3(te).getUnits();if(ot==="m")ee.MinScaleDenominator&&(st.minResolution=ee.MinScaleDenominator*28e-5),ee.MaxScaleDenominator&&(st.maxResolution=ee.MaxScaleDenominator*28e-5);else if(ot==="degrees"){var ct=.05039999999999999/(Math.PI*6378137);ee.MinScaleDenominator&&(st.minResolution=ee.MinScaleDenominator*ct),ee.MaxScaleDenominator&&(st.maxResolution=ee.MaxScaleDenominator*ct)}}_getWMSLayerExtent(ee,te,st){if(!ee){logger$c.warn("[ol.control.LayerImport] _getWMSLayerExtent error : layerInfo is not defined");return}var ot=ee.EX_GeographicBoundingBox,ct=ee.BoundingBox;if(ot&&Array.isArray(ot))te==="EPSG:4326"?st.extent=ot:st.extent=transformExtent(ot,"EPSG:4326",te);else if(ct&&Array.isArray(ct)){for(var ut,dt,ht=0;ht<ct.length;ht++)if(ut=ct[ht].crs,dt=ct[ht].extent,ut){if(ut===te){st.extent=dt;break}else if(typeof ut=="string"){var ft=get$3(ut)?get$3(ut):get$3(ut.toUpperCase());if(ft){if(ft.getUnits()==="degrees"&&ut.toUpperCase().indexOf("EPSG")===0){var pt=[dt[1],dt[0],dt[3],dt[2]];st.extent=transformExtent(pt,ft,te)}else st.extent=transformExtent(dt,ft,te);break}}}}}_getWMSLayerInfoForLayerSwitcher(ee,te,st){if(ee.Title?(st._title=ee.Title,st._description=ee.Abstract?ee.Abstract:ee.Title):(st._title=ee.Name,st._description=ee.Abstract?ee.Abstract:ee.Name),te&&(st._legends=[{url:te}]),ee.MetadataURL&&Array.isArray(ee.MetadataURL)){st._metadata=[];for(var ot=0;ot<ee.MetadataURL.length;ot++){var ct=ee.MetadataURL[ot].OnlineResource;ct&&st._metadata.push({url:ct})}}if(ee.Attribution){var ut=ee.Attribution;st._originators={},ut.OnlineResource&&(st._originators.url=ut.OnlineResource),ut.Title&&(st._originators.name=st._originators.attribution=ut.Title),ut.LogoURL&&ut.LogoURL.OnlineResource&&(st._originators.logo=ut.LogoURL.OnlineResource)}}_addGetCapWMTSLayer(ee){if(!ee||!ee.Identifier){logger$c.warn("[ol.control.LayerImport] layer information not found in getCapabilities response for layer ");return}var te=this.getMap();if(te){var st={};st.layer=ee.Identifier,this._getCapResponseWMTS.version&&(st.version=this._getCapResponseWMTS.version),ee.Version=st.version;var ot=this._getWMTSLayerGetTileUrl();if(ot)st.url=ot;else{var ct=this._getCapRequestUrl.indexOf("?");ct!==-1?st.url=this._getCapRequestUrl.substring(0,ct):st.url=this._getCapRequestUrl}ee.Url=ot||st.url;var ut=this._getTMSParams(ee);st.matrixSet=ut.tms,st.projection=ut.projCode,st.tileGrid=new WMTSTileGrid({resolutions:ut.resolutions,matrixIds:ut.matrixIds,origin:ut.origin}),ee.MatrixIds=ut.matrixIds,ee.Projection=st.projection,ee.Resolutions=ut.resolutions,ee.Origin=ut.origin;var dt,ht;if(ee.Style&&Array.isArray(ee.Style))for(var ft,pt=0;pt<ee.Style.length&&(ft=ee.Style[pt],dt=ft.Identifier,!ft.isDefault);pt++)ft.LegendURL&&Array.isArray(ft.LegendURL)&&ft.LegendURL.length!==0&&(ht=ft.LegendURL[0].href);dt==null&&logger$c.warn("[ol.control.LayerImport] style information not found in getCapabilities response for layer "+ee.Identifier),st.style=dt;var mt;ee.Format&&Array.isArray(ee.Format)&&(mt=ee.Format[0]),mt==null&&logger$c.warn("[ol.control.LayerImport] format information not found in getCapabilities response for layer "+ee.Identifier),st.format=mt;
312var yt=new WMTS$1(st);ee.Title?(yt._title=ee.Title,yt._description=ee.Abstract?ee.Abstract:ee.Title):(yt._title=ee.Identifier,yt._description=ee.Abstract?ee.Abstract:ee.Identifier),ht&&(yt._legends=[{url:ht}]);var vt={};vt.source=yt,vt.extent=this._getWMTSLayerExtent(ee);var _t;try{_t=new TileLayer(vt),_t.setExtent(vt.extent)}catch(xt){logger$c.warn("[ol.control.LayerImport] an error occured while trying to create ol.layer.Tile from getCapabilities information. error : ",xt);return}if(_t.gpResultLayerId="layerimport:WMTS",te.addLayer(_t),te.getView()&&te.getSize()&&_t.getExtent){var bt=_t.getExtent();bt&&bt[0]!==1/0&&te.getView().fit(bt,te.getSize())}this.dispatchEvent({type:"layerimport:service:added",name:ee.Identifier,data:ee,layer:_t,format:"wmts"})}}_getWMTSLayerGetTileUrl(){var ee;if(this._getCapResponseWMTS&&this._getCapResponseWMTS.OperationsMetadata&&this._getCapResponseWMTS.OperationsMetadata.GetTile){var te=this._getCapResponseWMTS.OperationsMetadata.GetTile;te.DCP&&te.DCP.HTTP&&te.DCP.HTTP.Get&&Array.isArray(te.DCP.HTTP.Get)&&te.DCP.HTTP.Get.length!==0&&(ee=te.DCP.HTTP.Get[0].href)}return ee}_getWMTSLayerProjection(ee,te){var st;if(!ee||typeof ee!="object"){logger$c.warn("missing layer information (from getCapabilities)");return}if(!te||typeof te!="object"){logger$c.warn("missing getCapabilities response");return}if(ee.TileMatrixSetLink&&Array.isArray(ee.TileMatrixSetLink)){var ot=ee.TileMatrixSetLink[0].TileMatrixSet,ct;if(te.Contents&&Array.isArray(te.Contents.TileMatrixSet)){for(var ut=te.Contents.TileMatrixSet,dt=0;dt<ut.length;dt++)if(ut[dt].Identifier===ot&&ut[dt].TileMatrix){var ht=ut[dt];ct=ht.SupportedCRS,ct&&typeof ct=="string"&&(get$3(ct)||get$3(ct.toUpperCase()))&&(st=ct);break}}}return st}_getTMSParams(ee){var te={},st=[],ot=[],ct=[],ut,dt,ht,ft=this.getMap();if(ft){if(ee.TileMatrixSetLink&&Array.isArray(ee.TileMatrixSetLink))if(ut=ee.TileMatrixSetLink[0].TileMatrixSet,this._getCapResponseWMTS.Contents&&Array.isArray(this._getCapResponseWMTS.Contents.TileMatrixSet)){for(var pt=this._getCapResponseWMTS.Contents.TileMatrixSet,mt=0;mt<pt.length;mt++)if(pt[mt].Identifier===ut&&pt[mt].TileMatrix){var yt=pt[mt],vt,_t,bt,xt,Mt;if(yt.SupportedCRS&&(dt=yt.SupportedCRS,ht=get$3(dt)),ht&&ht.getUnits&&(Mt=ht.getUnits()),Array.isArray(yt.TileMatrix))for(var Ot=0;Ot<yt.TileMatrix.length;Ot++)vt=yt.TileMatrix[Ot],vt.Identifier!=null&&(_t=parseInt(vt.Identifier,10),st.push(_t)),bt=vt.ScaleDenominator,Mt==="degrees"?xt=bt*28e-5*180/(Math.PI*6378137):xt=bt*28e-5,ot.push(xt),ct=vt.TopLeftCorner;ot.sort!==void 0&&ot.sort(function(kt,Nt){return Nt-kt}),st.sort!==void 0&&st.sort(function(kt,Nt){return kt-Nt})}}else logger$c.warn("[ol.control.LayerImport] TileMatrixSet data not found in getCapabilities response for layer "+ee.Identifier);else return;return te.tms=ut,te.projCode=dt,te.matrixIds=st,te.resolutions=ot,te.origin=ct,te}}_getWMTSLayerExtent(ee){var te,st=this._getMapProjectionCode();return ee.WGS84BoundingBox&&Array.isArray(ee.WGS84BoundingBox)&&(te=transformExtent(ee.WGS84BoundingBox,"EPSG:4326",st)),te}_getMapProjectionCode(){var ee=this.getMap();if(!ee||!ee.getView||!ee.getView().getProjection){logger$c.warn("unable to get layerimport's map");return}var te=ee.getView().getProjection().getCode();return te}_displayWaitingContainer(){this._waitingContainer.className="GPwaitingContainer GPwaitingContainerVisible gpf-waiting gpf-waiting--visible",this._waiting=!0,this._timer&&(clearTimeout(this._timer),this._timer=null);var ee=this;this._timer=setTimeout(function(){ee._waiting===!0?ee._hideWaitingContainer():ee._timer&&clearTimeout(ee._timer)},16e3)}_hideWaitingContainer(){this._waiting&&(this._waitingContainer.className="GPwaitingContainer GPwaitingContainerHidden gpf-waiting gpf-waiting--hidden",this._waiting=!1,clearTimeout(this._timer),this._timer=null)}_displayFormContainer(){this._formContainer.classList.replace("GPelementHidden","GPelementVisible"),this._formContainer.classList.replace("gpf-hidden","gpf-visible"),this._importPanelTitle.innerHTML=this.options.title}_hideFormContainer(){this._formContainer.classList.replace("GPelementVisible","GPelementHidden"),this._formContainer.classList.replace("gpf-visible","gpf-hidden")}cleanGetCapResultsList(){if(this._hasGetCapResults=!1,this._getCapRequestUrl=null,this._getCapResponseWMS=null,this._getCapResponseWMTS=null,this._getCapResponseWMSLayers=null,this._getCapResponseWMTSLayers=null,this._getCapResultsListContainer)for(;this._getCapResultsListContainer.firstChild;)this._getCapResultsListContainer.removeChild(this._getCapResultsListContainer.firstChild)}cleanMapBoxResultsList(){if(this._hasMapBoxResults=!1,this._mapBoxResultsListContainer)for(;this._mapBoxResultsListContainer.firstChild;)this._mapBoxResultsListContainer.removeChild(this._mapBoxResultsListContainer.firstChild)}cleanMapBoxResults(ee){if(this._hasMapBoxResults=!1,this._mapBoxResultsListContainer){var te=this._mapBoxResultsListContainer.childNodes;for(let st=0;st<te.length;st++){const ot=te[st];ot.id==="GPEditorMapBoxContainer_ID_"+ee&&ot.remove()}}}};Kn(Eo,"DefaultStyles",{image:new Icon({src:Marker.lightOrange,anchor:[25.5,38],anch
312orOrigin:"top-left",anchorXUnits:"pixels",anchorYUnits:"pixels"}),stroke:new Stroke({color:"rgba(0,42,80,0.8)",width:4}),fill:new Fill({color:"rgba(0, 183, 152, 0.5)"}),text:new Text({font:"16px Sans",textAlign:"left",fill:new Fill({color:"rgba(255, 255, 255, 1)"}),stroke:new Stroke({color:"rgba(0, 0, 0, 1)",width:2})})});let LayerImport=Eo;Object.assign(LayerImport.prototype,PanelDOM);Object.assign(LayerImport.prototype,LayerImportDOM);Object.assign(LayerImport.prototype,Widget);window.ol&&window.ol.control&&(window.ol.control.LayerImport=LayerImport);var logger$b=LoggerByDefault.getLogger("geoportalattribution");class GeoportalAttribution extends Attribution{constructor(ee){if(ee=ee||{},ee.collapsible!==!1&&(ee.collapsible=!0),ee.collapsed!==!1&&(ee.collapsed=!0),super(ee),!(this instanceof GeoportalAttribution))throw new TypeError("ERROR CLASS_CONSTRUCTOR");return this}setMap(ee){if(ee!=null){var te=ee.getControls();te.forEach(st=>{if(!(st instanceof GeoportalAttribution)&&st){for(var ot=st.element.classList,ct=0;ct<ot.length;ct++)if(ot[ct]==="ol-attribution"){te.remove(st);break}}}),this._updateAttributions(ee),ee.on("moveend",()=>{this._updateAttributions(ee)}),ee.getLayers().on("add",()=>{this._updateAttributions(ee)}),ee.getLayers().on("remove",()=>{this._updateAttributions(ee)})}super.setMap(ee)}_updateAttributions(ee){for(var te={},st=ee.getView(),ot=st.calculateExtent(ee.getSize()),ct=st.getProjection().getCode(),ut=transformExtent(ot,ct,"EPSG:4326"),dt=[ut[3],ut[0],ut[1],ut[2]],ht=st.getZoom(),ft=ee.getLayers().getArray(),pt=0;pt<ft.length;pt++)if(ft[pt].getSource)this._updateLayerAttributions(ft[pt],te,dt,ct,ht);else if(ft[pt].getLayers){var mt=ft[pt].getLayers();mt.forEach(yt=>{yt.getSource?this._updateLayerAttributions(yt,te,dt,ct,ht):logger$b.log("cannot find layer source in layergroup ",ft[pt])})}}_updateLayerAttributions(ee,te,st,ot,ct){if(!ee){logger$b.trace("layer is null !?");return}var ut=ee.getSource();if(!ut){logger$b.trace("source is not yet loaded !");return}te||(te={});var dt=[],ht=ee.getVisible(),ft=ut._originators;if(typeof ft<"u"&&ut.setAttributions(),ft&&ht){for(var pt=LayerUtils.getAttributions({extent:st,crs:ot,zoom:ct,visibility:ht,originators:ft}),mt=0;mt<pt.length;mt++){var yt=pt[mt];te.hasOwnProperty(yt)||(dt.push(yt),te[yt]=!0)}dt.length!==0&&(ut.setAttributions(dt),this.dispatchEvent({type:"attributions:update",attributions:dt}))}}}window.ol&&window.ol.control&&(window.ol.control.GeoportalAttribution=GeoportalAttribution);var MeasureLengthDOM={_addUID:function(ne){var ee=this._uid?ne+"-"+this._uid:ne;return ee},_createMainContainerElement:function(){var ne=document.createElement("div");return ne.id=this._addUID("GPmeasureLength"),ne.className="GPwidget gpf-widget gpf-widget-button",ne},_createShowMeasureLengthPictoElement:function(){var ne=this,ee=document.createElement("button"),te=document.createElement("span");return ee.appendChild(te),ee.id=this._addUID("GPshowMeasureLengthPicto"),ee.className="GPshowOpen GPshowAdvancedToolPicto gpf-btn gpf-btn--tertiary gpf-btn-icon gpf-btn-icon-length fr-btn fr-btn--tertiary",ee.setAttribute("aria-label","Mesurer une distance"),ee.setAttribute("tabindex","0"),ee.setAttribute("aria-pressed",!1),ee.setAttribute("type","button"),ee.addEventListener?ee.addEventListener("click",function(st){var ot=st.target.ariaPressed==="true";st.target.setAttribute("aria-pressed",!ot),ne.onShowMeasureLengthClick(st)}):ee.attachEvent&&ee.attachEvent("onclick",function(st){var ot=st.target.ariaPressed==="true";st.target.setAttribute("aria-pressed",!ot),ne.onShowMeasureLengthClick(st)}),ee}},logger$a=LoggerByDefault.getLogger("measurelength");class MeasureLength extends ControlExtended{constructor(ee){if(ee=ee||{},super(ee),!(this instanceof MeasureLength))throw new TypeError("ERROR CLASS_CONSTRUCTOR");return this.CLASSNAME="MeasureLength",this._uid=ee.id||SelectorID.generate(),this._pictoContainer=null,this._initialize(ee),this._container=this._initializeContainer(),this.element?this.element.appendChild(this._container):this.element=this._container,this}setMap(ee){logger$a.trace("setMap()");var te=this.CLASSNAME;ee?!this.options.target&&!this.options.position&&MeasureToolBox.add(ee,this):this.clean(),this.tools[te].push({instance:ee?this:null,active:!1,map:ee?ee.getTargetElement():null});var st=typeof window<"u"?window:typeof self<"u"?self:null;st&&(st.gpShareMeasures||(st.gpShareMeasures={}),st.gpShareMeasures[te]=this.tools[te]),super.setMap(ee),this.options.position&&this.setPosition(this.options.position),this.options.gutter===!1&&this.getContainer().classList.add("gpf-button-no-gutter")}getContainer(){return this._container}_initialize(ee){logger$a.trace("call MeasureLength::_initialize() : ",ee),this.options={},this.options.geodesic=typeof ee.geodesic<"u"?ee.geodesic:!0,this.options.unit=typeof ee.unit<"u"?ee.unit:null,this.options.position=typeof ee.position<"u"?ee.position:null,this.options.target=typeof ee.target<"u"?ee.target:null,this.options.render=typeof ee.render<"u"?ee.render:null,this.options.gutter=typeof ee.gutter<"u"?ee.gutter:null,this.options.layerDescription=typeof ee.layerDescription<"u"?ee.layerDescription:{title:"Mesures de distance",description:"Mes mesures"},this.createStylingMeasureInteraction(ee.styles)}_initializeContainer(){logger$a.trace("call MeasureLength::_initializeContainer() : ",this._uid);var ee=this._createMainContainerElement(),te=this._pictoContainer=this._createShowMeasureLengthPictoElement();return ee.appendChild(te),ee}addMeasureEvents(){logger$a.trace("call MeasureLength::addMeasureEvents()");var ee=this.getMap();ee.on("singleclick",te=>this.onPointerMoveHandler(te)),ee.on("pointermove",te=>this.onPointerMoveHandler(te)),this.eventLayerRemove=ee.getLayers().on("remove",te=>{te.element===this.measureVector&&this.clean()})}removeMeasureEvents(){logger$a.trace("call MeasureLength::removeMeasureEvents()");var ee=this.getMap();ee.un("singleclick",te=>this.onPointerMoveHandle(te)),ee.un("pointermove",te=>this.onPointerMoveHandler(te)),this.eventLayerRemove&&unByKey(this.eventLayerRemove)}format(ee){logger$a.trace("call MeasureLength::format()");var te=this.getMap(),st;if(this.options.geodesic){var ot=ee.getCoordinates();st=0;for(var ct=te.getView().getProjection(),ut=0,dt=ot.length-1;ut<dt;++ut){var ht=transform$1(ot[ut],ct,"EPSG:4326"),ft=transform$1(ot[ut+1],ct,"EPSG:4326");st+=getDistance(ht,ft)}}else st=Math.round(ee.getLength()*100)/100;var pt;return this.options.unit==="km"?pt=Math.round(st/1e3*100)/100+" 
312km":this.options.unit==="m"?pt=Math.round(st*100)/100+" m":st>1e3?pt=Math.round(st/1e3*100)/100+" km":pt=Math.round(st*100)/100+" m",pt}onShowMeasureLengthClick(ee){logger$a.trace("call MeasureLength::onShowMeasureLengthClick()",ee),this.onShowMeasureClick(ee,"LineString")}}Object.assign(MeasureLength.prototype,Measures);Object.assign(MeasureLength.prototype,MeasureLengthDOM);Object.assign(MeasureLength.prototype,Widget);window.ol&&window.ol.control&&(window.ol.control.MeasureLength=MeasureLength);var MeasureAreaDOM={_addUID:function(ne){var ee=this._uid?ne+"-"+this._uid:ne;return ee},_createMainContainerElement:function(){var ne=document.createElement("div");return ne.id=this._addUID("GPmeasureArea"),ne.className="GPwidget gpf-widget gpf-widget-button",ne},_createShowMeasureAreaPictoElement:function(){var ne=this,ee=document.createElement("button"),te=document.createElement("span");return ee.appendChild(te),ee.id=this._addUID("GPshowMeasureAreaPicto"),ee.className="GPshowOpen GPshowAdvancedToolPicto gpf-btn gpf-btn--tertiary gpf-btn-icon gpf-btn-icon-area fr-btn fr-btn--tertiary",ee.setAttribute("aria-label","Mesurer une surface"),ee.setAttribute("tabindex","0"),ee.setAttribute("aria-pressed",!1),ee.setAttribute("type","button"),ee.addEventListener?ee.addEventListener("click",function(st){var ot=st.target.ariaPressed==="true";st.target.setAttribute("aria-pressed",!ot),ne.onShowMeasureAreaClick(st)}):ee.attachEvent&&ee.attachEvent("onclick",function(st){var ot=st.target.ariaPressed==="true";st.target.setAttribute("aria-pressed",!ot),ne.onShowMeasureAreaClick(st)}),ee}},logger$9=LoggerByDefault.getLogger("measurearea");class MeasureArea extends ControlExtended{constructor(ee){if(ee=ee||{},super(ee),!(this instanceof MeasureArea))throw new TypeError("ERROR CLASS_CONSTRUCTOR");return this.CLASSNAME="MeasureArea",this._uid=ee.id||SelectorID.generate(),this._pictoContainer=null,this._initialize(ee),this._container=this._initializeContainer(),this.element?this.element.appendChild(this._container):this.element=this._container,this}setMap(ee){logger$9.trace("setMap()");var te=this.CLASSNAME;ee?!this.options.target&&!this.options.position&&MeasureToolBox.add(ee,this):this.clean(),this.tools[te].push({instance:ee?this:null,active:!1,map:ee?ee.getTargetElement():null});var st=typeof window<"u"?window:typeof self<"u"?self:null;st&&(st.gpShareMeasures||(st.gpShareMeasures={}),st.gpShareMeasures[te]=this.tools[te]),super.setMap(ee),this.options.position&&this.setPosition(this.options.position),this.options.gutter===!1&&this.getContainer().classList.add("gpf-button-no-gutter")}getContainer(){return this._container}_initialize(ee){logger$9.trace("call MeasureArea::_initialize() : ",ee),this.options={},this.options.geodesic=typeof ee.geodesic<"u"?ee.geodesic:!0,this.options.position=typeof ee.position<"u"?ee.position:null,this.options.target=typeof ee.target<"u"?ee.target:null,this.options.render=typeof ee.render<"u"?ee.render:null,this.options.gutter=typeof ee.gutter<"u"?ee.gutter:null,this.options.layerDescription=typeof ee.layerDescription<"u"?ee.layerDescription:{title:"Mesures de surface",description:"Mes mesures"},this.createStylingMeasureInteraction(ee.styles)}_initializeContainer(){logger$9.trace("call MeasureArea::_initializeContainer() : ",this._uid);var ee=this._createMainContainerElement(),te=this._pictoContainer=this._createShowMeasureAreaPictoElement();return ee.appendChild(te),ee}addMeasureEvents(){logger$9.trace("call MeasureArea::addMeasureEvents()");var ee=this.getMap();ee.on("singleclick",te=>this.onPointerMoveHandler(te)),ee.on("pointermove",te=>this.onPointerMoveHandler(te)),this.eventLayerRemove=ee.getLayers().on("remove",te=>{te.element===this.measureVector&&this.clean()})}removeMeasureEvents(){logger$9.trace("call MeasureArea::removeMeasureEvents()");var ee=this.getMap();ee.un("singleclick",te=>this.onPointerMoveHandler(te)),ee.un("pointermove",te=>this.onPointerMoveHandler(te)),this.eventLayerRemove&&unByKey(this.eventLayerRemove)}format(ee){logger$9.trace("call MeasureArea::format()");var te;if(this.options.geodesic){var st=ee.clone(),ot=st.getLinearRing(0).getCoordinates();te=Math.abs(getArea(new Polygon([ot])))}else te=ee.getArea();var ct;return te>
3121e6?ct=Math.round(te/1e6*100)/100+" km<sup>2</sup>":te>1e5?ct=Math.round(te/1e6*1e3)/1e3+" km<sup>2</sup>":te>1e3?ct=Math.round(te/10)*10+" m<sup>2</sup>":ct=Math.round(te*100)/100+" m<sup>2</sup>",ct}onShowMeasureAreaClick(ee){logger$9.trace("call MeasureArea::onShowMeasureAreaClick()",ee),this.onShowMeasureClick(ee,"Polygon")}}Object.assign(MeasureArea.prototype,Measures);Object.assign(MeasureArea.prototype,MeasureAreaDOM);Object.assign(MeasureArea.prototype,Widget);window.ol&&window.ol.control&&(window.ol.control.MeasureArea=MeasureArea);var MeasureAzimuthDOM={_addUID:function(ne){var ee=this._uid?ne+"-"+this._uid:ne;return ee},_createMainContainerElement:function(){var ne=document.createElement("div");return ne.id=this._addUID("GPmeasureAzimuth"),ne.className="GPwidget gpf-widget gpf-widget-button",ne},_createShowMeasureAzimuthPictoElement:function(){var ne=this,ee=document.createElement("button"),te=document.createElement("span");return ee.appendChild(te),ee.id=this._addUID("GPshowMeasureAzimuthPicto"),ee.className="GPshowOpen GPshowAdvancedToolPicto gpf-btn gpf-btn--tertiary gpf-btn-icon gpf-btn-icon-azimuth fr-btn fr-btn--tertiary",ee.setAttribute("aria-label","Mesurer un angle"),ee.setAttribute("tabindex","0"),ee.setAttribute("aria-pressed",!1),ee.setAttribute("type","button"),ee.addEventListener?ee.addEventListener("click",function(st){var ot=st.target.ariaPressed==="true";st.target.setAttribute("aria-pressed",!ot),ne.onShowMeasureAzimuthClick(st)}):ee.attachEvent&&ee.attachEvent("onclick",function(st){var ot=st.target.ariaPressed==="true";st.target.setAttribute("aria-pressed",!ot),ne.onShowMeasureAzimuthClick(st)}),ee}},logger$8=LoggerByDefault.getLogger("measureazimut");class MeasureAzimuth extends ControlExtended{constructor(ee){if(ee=ee||{},super(ee),!(this instanceof MeasureAzimuth))throw new TypeError("ERROR CLASS_CONSTRUCTOR");return this.CLASSNAME="MeasureAzimuth",this._uid=ee.id||SelectorID.generate(),this._pictoContainer=null,this._initialize(ee),this._container=this._initializeContainer(),this.element?this.element.appendChild(this._container):this.element=this._container,this}setMap(ee){logger$8.trace("setMap()");var te=this.CLASSNAME;ee?!this.options.target&&!this.options.position&&MeasureToolBox.add(ee,this):this.clean(),this.tools[te].push({instance:ee?this:null,active:!1,map:ee?ee.getTargetElement():null});var st=typeof window<"u"?window:typeof self<"u"?self:null;st&&(st.gpShareMeasures||(st.gpShareMeasures={}),st.gpShareMeasures[te]=this.tools[te]),super.setMap(ee),this.options.position&&this.setPosition(this.options.position),this.options.gutter===!1&&this.getContainer().classList.add("gpf-button-no-gutter")}setGeodesic(ee){this.options.geodesic=typeof ee<"u"?ee:!1}isGeodesic(){return this.options.geodesic}getContainer(){return this._container}_initialize(ee){logger$8.trace("call MeasureAzimuth::_initialize() : ",ee),this.options={},this.options.geodesic=typeof ee.geodesic<"u"?ee.geodesic:!1,this.options.position=typeof ee.position<"u"?ee.position:null,this.options.target=typeof ee.target<"u"?ee.target:null,this.options.render=typeof ee.render<"u"?ee.render:null,this.options.gutter=typeof ee.gutter<"u"?ee.gutter:null,this.options.layerDescription=typeof ee.layerDescription<"u"?ee.layerDescription:{title:"Mesures d'azimuth",description:"Mes mesures"},this.createStylingMeasureInteraction(ee.styles)}_initializeContainer(){logger$8.trace("call MeasureAzimuth::_initializeContainer() : ",this._uid);var ee=this._createMainContainerElement(),te=this._pictoContainer=this._createShowMeasureAzimuthPictoElement();return ee.appendChild(te),ee}addMeasureEvents(){logger$8.trace("call MeasureAzimuth::addMeasureEvents()");var ee=this.getMap();ee.on("singleclick",te=>this.onPointerMoveAzimutHandler(te)),ee.on("pointermove",te=>this.onPointerMoveAzimutHandler(te)),this.eventLayerRemove=ee.getLayers().on("remove",te=>{te.element===this.measureVector&&this.clean()})}removeMeasureEvents(){logger$8.trace("call MeasureAzimuth::removeMeasureEvents()");var ee=this.getMap();ee.un("singleclick",te=>this.onPointerMoveAzimutHandler(te)),ee.un("pointermove",te=>this.onPointerMoveAzimutHandler(te)),this.eventLayerRemove&&unByKey(this.eventLayerRemove)}format(ee){logger$8.trace("call MeasureAzimuth::format()");var te=this.getMap(),st=te.getView().getProjection(),ot=transform$1(ee.getFirstCoordinate(),st,"EPSG:4326"),ct=transform$1(ee.getLastCoordinate(),st,"EPSG:4326");if(!this.options.geodesic){var ut=getDistance(ot,ct);if(logger$8.trace("measure between 2 points with geodesic method",ut),ut>500){var dt=500/ut;logger$8.trace("%",dt),ct=transform$1(ee.getCoordinateAt(dt),st,"EPSG:4326")}}var ht=Math.PI/180,ft=180/Math.PI,pt=ht*ot[0],mt=ht*ct[0],yt=ht*ot[1],vt=ht*ct[1],_t=Math.sin(mt-pt)*Math.cos(vt),bt=Math.cos(yt)*Math.sin(vt)-Math.sin(yt)*Math.cos(vt)*Math.cos(mt-pt),xt=Math.atan2(_t,bt),Mt=ft*xt;logger$8.trace("azimut",Mt),Mt<0&&(Mt+=360);var Ot=Math.round(Mt*100)/100+" °";return Ot}onShowMeasureAzimuthClick(ee){logger$8.trace("call MeasureAzimuth::onShowMeasureAzimuthClick()",ee),this.onShowMeasureClick(ee,"LineString")}onPointerMoveAzimutHandler(ee){if(this.onPointerMoveHandler(ee),this.sketch){var te=this.sketch.getGeometry();te.getCoordinates().length>2&&this.measureDraw.finishDrawing()}}}Object.assign(MeasureAzimuth.prototype,Measures);Object.assign(MeasureAzimuth.prototype,MeasureAzimuthDOM);Object.assign(MeasureAzimuth.prototype,Widget);window.ol&&window.ol.control&&(window.ol.control.MeasureAzimuth=MeasureAzimuth);LoggerByDefault.getLogger("zoom");class GeoportalZoom extends Zoom{constructor(ee){ee=ee||{};var te="ol-custom-zoom";ee.className=te,super(ee),this.container=null,this.options=ee,this._initContainer()}_createContainerPosition(ee){if(this.container=ee.getOverlayContainerStopEvent(),this.options.position){this.options.target=this.container;var te="position-container-"+this.options.position;if(!document.getElementById(te)){var st=document.createElement("div");st.id=te,st.classList.add("position"),st.classList.add(te),this.container.appendChild(st)}this.options.target=this.container.children[te]}}_initContainer(){this._uid=this.options.id||SelectorID.generate(),this.element.i
312d="GPzoom-"+this._uid,this.element.classList.add("GPwidget","gpf-widget","gpf-widget-button"),this.element.classList.add(this.options.className),this.element.classList.remove("ol-zoom","ol-unselectable","ol-control");var ee=this,te=this.element.childNodes;for(let ot=0;ot<te.length;ot++){const ct=te[ot];if(ct.classList.contains(this.options.className+"-in")){ct.classList.add("GPzoomIn","GPshowOpen","GPshowAdvancedToolPicto","gpf-btn-icon-zoom-in","fr-btn","fr-btn--tertiary","gpf-btn","gpf-btn--tertiary","gpf-btn-icon"),ct.id="GPzoomIn",ct.innerHTML="",ct.removeAttribute("title"),ct.setAttribute("aria-label","Zoomer");var st=document.createElement("span");ct.appendChild(st),ct.addEventListener?ct.addEventListener("click",function(){ee.dispatchEvent("zoom:in")}):ct.attachEvent&&ct.attachEvent("onclick",function(){ee.dispatchEvent("zoom:in")})}if(ct.classList.contains(this.options.className+"-out")){ct.classList.add("GPzoomOut","GPshowOpen","GPshowAdvancedToolPicto","gpf-btn-icon-zoom-out","fr-btn","fr-btn--tertiary","gpf-btn","gpf-btn--tertiary","gpf-btn-icon"),ct.id="GPzoomOut",ct.innerHTML="",ct.removeAttribute("title"),ct.setAttribute("aria-label","Dézoomer");var st=document.createElement("span");ct.appendChild(st),ct.addEventListener?ct.addEventListener("click",function(){ee.dispatchEvent("zoom:out")}):ct.attachEvent&&ct.attachEvent("onclick",function(){ee.dispatchEvent("zoom:out")})}}this.options.position&&(this.element.style.position="unset"),this.options.gutter===!1&&this.element.classList.add("gpf-button-no-gutter")}setMap(ee){if(ee){this._createContainerPosition(ee);var te=ee.getControls();te.forEach(st=>{st.element.classList.contains("ol-zoom")&&(st.element.classList.add("ol-hidden"),st.element.style.display="none")})}this.setTarget(this.options.target),super.setMap(ee)}getContainer(){return this.container}}window.ol&&window.ol.control&&(window.ol.control.GeoportalZoom=GeoportalZoom);const events=["fullscreenchange","webkitfullscreenchange"],FullScreenEventType={ENTERFULLSCREEN:"enterfullscreen",LEAVEFULLSCREEN:"leavefullscreen"};class FullScreen extends Control{constructor(ee){ee=ee||{},super({element:document.createElement("div"),target:ee.target}),this.on,this.once,this.un,this.keys_=ee.keys!==void 0?ee.keys:!1,this.source_=ee.source,this.isInFullscreen_=!1,this.boundHandleMapTargetChange_=this.handleMapTargetChange_.bind(this),this.cssClassName_=ee.className!==void 0?ee.className:"ol-full-screen",this.documentListeners_=[],this.activeClassName_=ee.activeClassName!==void 0?ee.activeClassName.split(" "):[this.cssClassName_+"-true"],this.inactiveClassName_=ee.inactiveClassName!==void 0?ee.inactiveClassName.split(" "):[this.cssClassName_+"-false"];const te=ee.label!==void 0?ee.label:"⤢";this.labelNode_=typeof te=="string"?document.createTextNode(te):te;const st=ee.labelActive!==void 0?ee.labelActive:"×";this.labelActiveNode_=typeof st=="string"?document.createTextNode(st):st;const ot=ee.tipLabel?ee.tipLabel:"Toggle full-screen";this.button_=document.createElement("button"),this.button_.title=ot,this.button_.setAttribute("type","button"),this.button_.appendChild(this.labelNode_),this.button_.addEventListener(EventType.CLICK,this.handleClick_.bind(this),!1),this.setClassName_(this.button_,this.isInFullscreen_),this.element.className=`${this.cssClassName_} ${CLASS_UNSELECTABLE} ${CLASS_CONTROL}`,this.element.appendChild(this.button_)}handleClick_(ee){ee.preventDefault(),this.handleFullScreen_()}handleFullScreen_(){const ee=this.getMap();if(!ee)return;const te=ee.getOwnerDocument();if(isFullScreenSupported(te))if(isFullScreen(te))exitFullScreen(te);else{let st;this.source_?st=typeof this.source_=="string"?te.getElementById(this.source_):this.source_:st=ee.getTargetElement(),this.keys_?requestFullScreenWithKeys(st):requestFullScreen(st)}}handleFullScreenChange_(){const ee=this.getMap();if(!ee)return;const te=this.isInFullscreen_;this.isInFullscreen_=isFullScreen(ee.getOwnerDocument()),te!==this.isInFullscreen_&&(this.setClassName_(this.button_,this.isInFullscreen_),this.isInFullscreen_?(replaceNode(this.labelActiveNode_,this.labelNode_),this.dispatchEvent(FullScreenEventType.ENTERFULLSCREEN)):(replaceNode(this.labelNode_,this.labelActiveNode_),this.dispatchEvent(FullScreenEventType.LEAVEFULLSCREEN)),ee.updateSize())}setClassName_(ee,te){te?(ee.classList.remove(...this.inactiveClassName_),ee.classList.add(...this.activeClassName_)):(ee.classList.remove(...this.activeClassName_),ee.classList.add(...this.inactiveClassName_))}setMap(ee){const te=this.getMap();te&&te.removeChangeListener(MapProperty.TARGET,this.boundHandleMapTargetChange_),super.setMap(ee),this.handleMapTargetChange_(),ee&&ee.addChangeListener(MapProperty.TARGET,this.boundHandleMapTargetChange_)}handleMapTargetChange_(){const ee=this.documentListeners_;for(let st=0,ot=ee.length;
312st<ot;++st)unlistenByKey(ee[st]);ee.length=0;const te=this.getMap();if(te){const st=te.getOwnerDocument();isFullScreenSupported(st)?this.element.classList.remove(CLASS_UNSUPPORTED):this.element.classList.add(CLASS_UNSUPPORTED);for(let ot=0,ct=events.length;ot<ct;++ot)ee.push(listen(st,events[ot],this.handleFullScreenChange_,this));this.handleFullScreenChange_()}}}function isFullScreenSupported(ne){const ee=ne.body;return!!(ee.webkitRequestFullscreen||ee.requestFullscreen&&ne.fullscreenEnabled)}function isFullScreen(ne){return!!(ne.webkitIsFullScreen||ne.fullscreenElement)}function requestFullScreen(ne){ne.requestFullscreen?ne.requestFullscreen():ne.webkitRequestFullscreen&&ne.webkitRequestFullscreen()}function requestFullScreenWithKeys(ne){ne.webkitRequestFullscreen?ne.webkitRequestFullscreen():requestFullScreen(ne)}function exitFullScreen(ne){ne.exitFullscreen?ne.exitFullscreen():ne.webkitExitFullscreen&&ne.webkitExitFullscreen()}LoggerByDefault.getLogger("fullscreen");class GeoportalFullScreen extends FullScreen{constructor(ee){ee=ee||{};var te="ol-custom-full-screen";ee.className=ee.className||te,ee.label=ee.label||"",ee.labelActive=ee.labelActive||"",ee.activeClassName=ee.activeClassName||te+"-true",ee.inactiveClassName=ee.inactiveClassName||te+"-false",ee.tipLabel=ee.tipLabel||"Plein écran",super(ee),this.CLASSNAME="FullScreen",this.container=null,this.options=ee,this._initContainer()}_createContainerPosition(ee){if(this.container=ee.getOverlayContainerStopEvent(),this.options.target=this.container,this.options.position){var te="position-container-"+this.options.position;if(!document.getElementById(te)){var st=document.createElement("div");st.id=te,st.classList.add("position"),st.classList.add(te),this.container.appendChild(st)}this.options.target=this.container.children[te]}}_initContainer(){this._uid=this.options.id||SelectorID.generate(),this.element.id="GPfullScreen-"+this._uid,this.element.classList.add("GPwidget","gpf-widget","gpf-widget-button"),this.element.classList.add(this.options.className),this.element.classList.remove("ol-full-screen","ol-unselectable","ol-control");var ee=this.element.childNodes[0],te=document.createElement("span");ee.appendChild(te),ee.classList.add("GPshowOpen","GPshowAdvancedToolPicto","GPfullScreenPicto"),ee.classList.add("fr-btn","fr-btn--tertiary"),ee.classList.add("gpf-btn--tertiary","gpf-btn","gpf-btn-icon"),ee.setAttribute("tabindex","0"),ee.setAttribute("aria-pressed",!1),ee.setAttribute("type","button"),ee.removeAttribute("title"),ee.setAttribute("aria-label",this.options.tipLabel),ee.addEventListener?ee.addEventListener("click",function(st){var ot=st.target.ariaPressed==="true";st.target.setAttribute("aria-pressed",!ot)}):ee.attachEvent&&ee.attachEvent("onclick",function(st){var ot=st.target.ariaPressed==="true";st.target.setAttribute("aria-pressed",!ot)}),this.options.position&&(this.element.style.position="unset"),this.options.gutter===!1&&this.element.classList.add("gpf-button-no-gutter")}setMap(ee){if(ee){this._createContainerPosition(ee);var te=ee.getControls();te.forEach(st=>{st.element.classList.contains("ol-full-screen")&&(st.element.classList.add("ol-hidden"),st.element.style.display="none")})}this.setTarget(this.options.target),super.setMap(ee)}getContainer(){return this.container}}window.ol&&window.ol.control&&(window.ol.control.GeoportalFullScreen=GeoportalFullScreen);const MAX_RATIO=.75,MIN_RATIO=.1;class OverviewMap extends Control{constructor(ee){ee=ee||{},super({element:document.createElement("div"),render:ee.render,target:ee.target}),this.boundHandleRotationChanged_=this.handleRotationChanged_.bind(this),this.collapsed_=ee.collapsed!==void 0?ee.collapsed:!0,this.collapsible_=ee.collapsible!==void 0?ee.collapsible:!0,this.collapsible_||(this.collapsed_=!1),this.rotateWithView_=ee.rotateWithView!==void 0?ee.rotateWithView:!1,this.viewExtent_=void 0;const te=ee.className!==void 0?ee.className:"ol-overviewmap",st=ee.tipLabel!==void 0?ee.tipLabel:"Overview map",ot=ee.collapseLabel!==void 0?ee.collapseLabel:"‹";typeof ot=="string"?(this.collapseLabel_=document.createElement("span"),this.collapseLabel_.textContent=ot):this.collapseLabel_=ot;const ct=ee.label!==void 0?ee.label:"›";typeof ct=="string"?(this.label_=document.createElement("span"),this.label_.textContent=ct):this.label_=ct;const ut=this.collapsible_&&!this.collapsed_?this.collapseLabel_:this.label_,dt=document.createElement("button");dt.setAttribute("type","button"),dt.title=st,dt.appendChild(ut),dt.addEventListener(EventType.CLICK,this.handleClick_.bind(this),!1),this.ovmapDiv_=document.createElement("div"),this.ovmapDiv_.className="ol-overviewmap-map",this.view_=ee.view;const ht=new Map$1({view:ee.view,controls:new Collection,interactions:new Collection});
312this.ovmap_=ht,ee.layers&&ee.layers.forEach(function(Mt){ht.addLayer(Mt)});const ft=document.createElement("div");ft.className="ol-overviewmap-box",ft.style.boxSizing="border-box",this.boxOverlay_=new Overlay({position:[0,0],positioning:"center-center",element:ft}),this.ovmap_.addOverlay(this.boxOverlay_);const pt=te+" "+CLASS_UNSELECTABLE+" "+CLASS_CONTROL+(this.collapsed_&&this.collapsible_?" "+CLASS_COLLAPSED:"")+(this.collapsible_?"":" ol-uncollapsible"),mt=this.element;mt.className=pt,mt.appendChild(this.ovmapDiv_),mt.appendChild(dt);const yt=this.boxOverlay_,vt=this.boxOverlay_.getElement(),_t=Mt=>({clientX:Mt.clientX,clientY:Mt.clientY}),bt=function(Mt){const Ot=_t(Mt),kt=ht.getEventCoordinate(Ot);yt.setPosition(kt)},xt=Mt=>{const Ot=ht.getEventCoordinateInternal(Mt),kt=this.getMap();kt.getView().setCenterInternal(Ot);const Nt=kt.getOwnerDocument();Nt.removeEventListener("pointermove",bt),Nt.removeEventListener("pointerup",xt)};this.ovmapDiv_.addEventListener("pointerdown",Mt=>{const Ot=this.getMap().getOwnerDocument();Mt.target===vt&&Ot.addEventListener("pointermove",bt),Ot.addEventListener("pointerup",xt)})}setMap(ee){const te=this.getMap();if(ee!==te){if(te){const st=te.getView();st&&this.unbindView_(st),this.ovmap_.setTarget(null)}if(super.setMap(ee),ee){this.ovmap_.setTarget(this.ovmapDiv_),this.listenerKeys.push(listen(ee,ObjectEventType.PROPERTYCHANGE,this.handleMapPropertyChange_,this));const st=ee.getView();st&&this.bindView_(st),this.ovmap_.isRendered()||this.updateBoxAfterOvmapIsRendered_()}}}handleMapPropertyChange_(ee){if(ee.key===MapProperty.VIEW){const te=ee.oldValue;te&&this.unbindView_(te);const st=this.getMap().getView();this.bindView_(st)}else!this.ovmap_.isRendered()&&(ee.key===MapProperty.TARGET||ee.key===MapProperty.SIZE)&&this.ovmap_.updateSize()}bindView_(ee){if(!this.view_){const te=new View({projection:ee.getProjection()});this.ovmap_.setView(te)}ee.addChangeListener(ViewProperty.ROTATION,this.boundHandleRotationChanged_),this.handleRotationChanged_(),ee.isDef()&&(this.ovmap_.updateSize(),this.resetExtent_())}unbindView_(ee){ee.removeChangeListener(ViewProperty.ROTATION,this.boundHandleRotationChanged_)}handleRotationChanged_(){this.rotateWithView_&&this.ovmap_.getView().setRotation(this.getMap().getView().getRotation())}validateExtent_(){const ee=this.getMap(),te=this.ovmap_;if(!ee.isRendered()||!te.isRendered())return;const st=ee.getSize(),ct=ee.getView().calculateExtentInternal(st);if(this.viewExtent_&&equals$2(ct,this.viewExtent_))return;this.viewExtent_=ct;const ut=te.getSize(),ht=te.getView().calculateExtentInternal(ut),ft=te.getPixelFromCoordinateInternal(getTopLeft(ct)),pt=te.getPixelFromCoordinateInternal(getBottomRight(ct)),mt=Math.abs(ft[0]-pt[0]),yt=Math.abs(ft[1]-pt[1]),vt=ut[0],_t=ut[1];mt<vt*MIN_RATIO||yt<_t*MIN_RATIO||mt>vt*MAX_RATIO||yt>_t*MAX_RATIO?this.resetExtent_():containsExtent(ht,ct)||this.recenter_()}resetExtent_(){const ee=this.getMap(),te=this.ovmap_,st=ee.getSize(),ct=ee.getView().calculateExtentInternal(st),ut=te.getView(),dt=Math.log(MAX_RATIO/MIN_RATIO)/Math.LN2,ht=1/(Math.pow(2,dt/2)*MIN_RATIO);scaleFromCenter(ct,ht),ut.fitInternal(fromExtent(ct))}recenter_(){const ee=this.getMap(),te=this.ovmap_,st=ee.getView();te.getView().setCenterInternal(st.getCenterInternal())}updateBox_(){const ee=this.getMap(),te=this.ovmap_;if(!ee.isRendered()||!te.isRendered())return;const st=ee.getSize(),ot=ee.getView(),ct=te.getView(),ut=this.rotateWithView_?0:-ot.getRotation(),dt=this.boxOverlay_,ht=this.boxOverlay_.getElement(),ft=ot.getCenter(),pt=ot.getResolution(),mt=ct.getResolution(),yt=st[0]*pt/mt,vt=st[1]*pt/mt;if(dt.setPosition(ft),ht){ht.style.width=yt+"px",ht.style.height=vt+"px";const _t="rotate("+ut+"rad)";ht.style.transform=_t}}updateBoxAfterOvmapIsRendered_(){this.ovmapPostrenderKey_||(this.ovmapPostrenderKey_=listenOnce(this.ovmap_,MapEventType.POSTRENDER,ee=>{delete this.ovmapPostrenderKey_,this.updateBox_()}))}handleClick_(ee){ee.preventDefault(),this.handleToggle_()}handleToggle_(){this.element.classList.toggle(CLASS_COLLAPSED),this.collapsed_?replaceNode(this.collapseLabel_,this.label_):replaceNode(this.label_,this.collapseLabel_),this.collapsed_=!this.collapsed_;const ee=this.ovmap_;if(!this.collapsed_){if(ee.isRendered()){this.viewExtent_=void 0,ee.render();return}ee.updateSize(),this.resetExtent_(),this.updateBoxAfterOvmapIsRendered_()}}getCollapsible(){return this.collapsible_}setCollapsible(ee){this.collapsible_!==ee&&(this.collapsible_=ee,this.element.classList.toggle("ol-uncollapsible"),!ee&&this.collapsed_&&this.handleToggle_())}setCollapsed(ee){!this.collapsible_||this.collapsed_===ee||this.handleToggle_()}getCollapsed(){return this.collapsed_}getRotateWithView(){return this.rotateWithView_}setRotateWithView(ee){this.rotateWithView_!==ee&&(this.rotateWithView_=ee,this.getMap().getView().getRotation()!==0&&(this.rotateWithView_?this.handleRotationChanged_():this.ovmap_.getView().setRotation(0),this.viewExtent_=void 0,this.validateExtent_(),this.updateBox_()))}getOverviewMap(){return this.ovmap_}render(ee){this.validateExtent_(),this.updateBox_()}}LoggerByDefault.getLogger("overviewMap");class GeoportalOverviewMap extends OverviewMap{constructor(ee){ee=ee||{};const te={name:"GEOGRAPHICALGRIDSYSTEMS.MAPS.OVERVIEW",globalConstraint:{maxScaleDenominator:27954113201435894e-8,minScaleDenominator:2.1839150938621787e6,bbox:{left:-179.5,right:179.5,top:75,bottom:-75}},params:{url:"https://data.geopf.fr/wmts",styles:"normal",version:"1.0.0",format:"image/jpeg",projection:"EPSG:3857",minScale:2.1839150938621787e6,maxScale:27954113201435894e-8,extent:{left:-179.5,right:179.5,top:75,bottom:-75},legends:[{format:"image/jpeg",url:"https://data.geopf.fr/annexes/ressources/legendes/LEGEND.jpg",minScaleDenominator:"200"}],title:"Carte Mondiale pour la mini-vue",description:"Carte Mondiale pour la mini-vue",tileMatrixSetLimits:{1:{minTileRow:"0",maxTileRow:"1",minTileCol:"0",maxTileCol:"1"},2:{minTileRow:"0",maxTileRow:"3",minTileCol:"0",maxTileCol:"3"},3:{minTileRow:"1",maxTileRow:"6",minTileCol:"0",maxTileCol:"7"},4:{minTileRow:"2",maxTileRow:"13",minTileCol:"0",maxTileCol:"15"},5:{minTileRow:"5",maxTileRow:"26",minTileCol:"0",maxTileCol:"31"},6:{minTileRow:"11",maxTileRow:"52",minTileCol:"0",maxTileCol:"63"},7:{minTileRow:"22",maxTileRow:"105",minTileCol:"0",maxTileCol:"127"},8:{minTileRow:"45",maxTileRow:"210",minTileCol:"0",maxTileCol:"255"}},TMSLink:"PM_1_8",matrixIds:["1","2","3","4","5","6","7","8"],tileMatrices:{1:{matrixId:"1",matrixHeight:2,matrixWidth:2,scaleDenominator:27954113201435894e-8,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},2:{matrixId:"2",matrixHeight:4,matrixWidth:4,scaleDenominator:1397705660071793e-7,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},3:{matrixId:"3",matrixHeight:8,matrixWidth:8,scaleDenominator:6988528300358965e-8,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},4:{matrixId:"4",matrixHeight:16,matrixWidth:16,scaleDenominator:3494264150179486e-8,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},5:{matrixId:"5",matrixHeight:32,matrixWidth:32,scaleDenominator:1747132075089743e-8,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},6:{matrixId:"6",matrixHeight:64,matrixWidth:64,scaleDenominator:8735660375448715e-9,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},7:{matrixId:"7",matrixHeight:128,matrixWidth:128,scaleDenominator:4.3678301877243575e6,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},8:{matrixId:"8",matrixHeight:256,matrixWidth:256,scaleDenominator:2.1839150938621787e6,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}}},nativeResolutions:["78271.51696402048","39135.75848201023","19567.87924100
312512","9783.939620502561","4891.969810251280","2445.984905125640","1222.992452562820","611.4962262814100"]}};var st="ol-overviewmap";ee.className=ee.className||st,ee.collapseLabel=ee.collapseLabel||"",ee.collapsed=ee.collapsed,ee.collapsed===void 0&&(ee.collapsed=!0),ee.label=ee.label||"",ee.tipLabel="Mini-carte",ee.layers=ee.layers||[new LayerWMTS({layer:"GEOGRAPHICALGRIDSYSTEMS.MAPS.OVERVIEW",configuration:te})],ee.view=ee.view||new View({minZoom:1,maxZoom:8}),ee.disableOverviewDragging===void 0&&(ee.disableOverviewDragging=!1),ee.disableOverviewBBox===void 0&&(ee.disableOverviewBBox=!1),super(ee),this.CLASSNAME="OverviewMap",this.container=null,this.options=ee,this._initContainer()}_createContainerPosition(ee){const te=this.options.target;if(this.container=ee.getOverlayContainerStopEvent(),this.options.target=this.container,this.options.position){var st="position-container-"+this.options.position;if(!document.getElementById(st)){var ot=document.createElement("div");ot.id=st,ot.classList.add("position"),ot.classList.add(st),this.container.appendChild(ot)}this.options.target=this.container.children[st]}te&&te!==this.options.target&&(this.options.target=te)}_initContainer(){this._uid=this.options.id||SelectorID.generate(),this.element.id="GPoverviewMap-"+this._uid,this.element.classList.add("GPwidget","gpf-widget","gpf-widget-button"),this.element.classList.remove("ol-control");var ee=this.element.childNodes,te=ee[1];te.id="GPshowOverviewMap-"+this._uid,te.classList.add("GPshowOpen","GPshowAdvancedToolPicto","GPshowOverviewMapPicto"),te.classList.add("gpf-btn-icon","gpf-btn--tertiary","gpf-btn-icon-overviewmap"),te.classList.add("fr-btn","fr-btn--tertiary"),te.setAttribute("tabindex","0"),te.setAttribute("aria-pressed",!this.options.collapsed),te.setAttribute("type","button"),te.removeAttribute("title"),te.setAttribute("aria-label",this.options.tipLabel);var st=this;te.addEventListener?te.addEventListener("click",function(ot){var ct=ot.target.ariaPressed==="true";ot.target.setAttribute("aria-pressed",!ct),st.dispatchEvent({type:"overviewmap:toggle",status:ct})}):te.attachEvent&&te.attachEvent("onclick",function(ot){var ct=ot.target.ariaPressed==="true";ot.target.setAttribute("aria-pressed",!ct),st.dispatchEvent({type:"overviewmap:toggle",status:ct})}),this.options.position&&(this.element.style.position="unset"),this.options.gutter===!1&&this.element.classList.add("gpf-button-no-gutter")}setMap(ee){if(ee&&(this._createContainerPosition(ee),this.options.disableOverviewDragging)){const st=this.ovmapDiv_;st&&st.addEventListener("pointerdown",ot=>{ot.stopImmediatePropagation(),ot.preventDefault()},!0)}if(this.setTarget(this.options.target),super.setMap(ee),ee){var te=this.boxOverlay_&&this.boxOverlay_.getElement&&this.boxOverlay_.getElement();te&&(this.options.disableOverviewBBox?(te.style.display="none",te.style.pointerEvents="none"):(te.style.display="",te.style.pointerEvents=""))}}getContainer(){return this.container}}window.ol&&window.ol.control&&(window.ol.control.GeoportalOverviewMap=GeoportalOverviewMap);var LegendsDOM={_addUID:function(ne){var ee=this.uid?ne+"-"+this.uid:ne;return ee},_createMainContainerElement:function(){var ne=document.createElement("div");return ne.id=this._addUID("GPlegends"),ne.className="GPwidget gpf-widget gpf-widget-button gpf-mobile-fullscreen",ne},_createShowLegendsPictoElement:function(){var ne=this,ee=document.createElement("button"),te=document.createElement("span");return ee.appendChild(te),ee.id=this._addUID("GPshowLegendsPicto"),ee.classList.add("GPshowOpen","GPshowAdvancedToolPicto","GPshowLegendsPicto"),ee.classList.add("gpf-btn","gpf-btn--tertiary","gpf-btn-icon","gpf-btn-icon-legends"),ee.classList.add("fr-btn","fr-btn--tertiary"),ee.setAttribute("aria-label","Légende"),ee.setAttribute("tabindex","0"),ee.setAttribute("aria-pressed",!1),ee.setAttribute("type","button"),ee.addEventListener?ee.addEventListener("click",function(st){var ot=st.target.ariaPressed==="true";st.target.setAttribute("aria-pressed",!ot),ne.onShowLegendsClick(st)}):ee.attachEvent&&ee.attachEvent("onclick",function(st){var ot=st.target.ariaPressed==="true";st.target.setAttribute("aria-pressed",!ot),ne.onShowLegendsClick(st)}),ee},_createLegendsPanelElement:function(){var ne=document.createElement("dialog");return ne.id=this._addUID("GPlegendsPanel"),ne.className="GPpanel gpf-panel fr-modal",ne},_createLegendsPanelDivElement:function(){var ne=document.createElement("div");return ne.className="gpf-panel__legends",ne},_createLegendElement:function(){var ne=document.createElement("div");
312return ne.className="legends-entries gpf-panel__body fr-modal__body",ne},_createLegendEntry:function(ne){const ee=ct=>{var ut=function(){if(!window.DOMParser)return!1;var pt=new DOMParser;try{pt.parseFromString("x","text/html")}catch{return!1}return!0};if(ut()){var dt=new DOMParser,ht=dt.parseFromString(ct,"text/html");return ht.body}var ft=document.createElement("div");return ft.innerHTML=ct,ft};if(ne&&ne.legends&&ne.legends.length){var te=ne.legends[0].url,st=ee(`
313                    <div
314                        id="${ne.id}"
315                        class="legend-entry-container">
316                        <label class="legend-entry-title gpf-label-legends-name fr-label">${ne.title}</label>
317                        <button
318                            id="GPcollapseLegend_ID_${ne.id}"
319                            class="legend-entry-show gpf-btn gpf-btn-icon gpf-btn-icon-legends-collapse fr-btn fr-btn--tertiary gpf-btn--tertiary"
320                            type="button"
321                            title=""
322                            tabindex="0"
323                            aria-pressed="false"></button>
324                        <div id="GPlegend_ID_${ne.id}" class="legend-entry-image gpf-hidden">
325                            <div>
326                                <div class="placeholder"></div>
327                                <img class="fr-fluid-img" src="${te}" alt="" loading="lazy" />
328                            </div>
329                            <p>
330                                <a href="${te}" target="_blank" class="fr-link fr-text--xs">Ouvrir la légende dans un nouvel onglet</a>
331                            </p>
332                        </div>
333                    </div>
334                `),ot=st.firstChild.querySelector("button");return ot&&ot.addEventListener("click",ct=>{var ut=ct.target.ariaPressed==="true";ct.target.setAttribute("aria-pressed",!ut);var dt=document.getElementById("GPlegend_ID_"+ne.id);ut?dt.classList.replace("gpf-visible","gpf-hidden"):dt.classList.replace("gpf-hidden","gpf-visible")}),st.firstChild}}},logger$7=LoggerByDefault.getLogger("legends");class Legends extends ControlExtended{constructor(ee){if(ee=ee||{},super(ee),!(this instanceof Legends))throw new TypeError("ERROR CLASS_CONSTRUCTOR");return this.CLASSNAME="Legends",this.initialize(ee),this.container=this.initContainer(),this.element?this.element.appendChild(this.container):this.element=this.container,this}setMap(ee){if(ee){if(this.draggable&&Draggable.dragElement(this.panelLegendsContainer,this.panelLegendsHeaderContainer,ee.getTargetElement()),this.collapsed||this.buttonLegendsShow.setAttribute("aria-pressed",!0),this.auto){var te=this;ee.getLayers().forEach(st=>{te.add(st)})}this.auto&&this.addEventsListeners(ee)}else this.auto&&this.removeEventsListeners();super.setMap(ee),this.options.position&&this.setPosition(this.options.position),this.options.gutter===!1&&this.getContainer().classList.add("gpf-button-no-gutter")}getContainer(){return this.container}getMetaInformations(ee){if(ee.hasOwnProperty("name"))return{id:ee.name,title:ee.getTitle(),legends:ee.getLegends(),metadatas:ee.getMetadata(),desc:ee.getDescription(),url:ee.getQuicklookUrl(),partners:ee.getOriginators()}}adds(ee){if(ee)for(let te=0;te<ee.length;te++)this.add(ee[te])}add(ee){if(ee){var te=this._createLegendEntry(this.getMetaInformations(ee));if(te)return this.exist(te)?!1:(this.panelLegendsEntriesContainer.prepend(te),this.legends.push({obj:ee,dom:te}),!0)}return!1}remove(ee){var te=!1;if(ee)for(let st=0;st<this.legends.length;st++){const ot=this.legends[st];if(ee.name===ot.obj.name&&ee.service===ot.obj.service){ot.dom&&this.legends[st].dom.remove(),this.legends.splice(st,1),te=!0;break}}return te}exist(ee){var te=!1;for(let st=0;st<this.legends.length;st++)if(this.legends[st].dom.id===ee.id){te=!0;break}return te}initialize(ee){this.uid=ee.id||SelectorID.generate(),this.options={collapsed:!0,draggable:!1,auto:!0,panel:!1},Helper.assign(this.options,ee),this.collapsed=this.options.collapsed,this.draggable=this.options.draggable,this.auto=this.options.auto,this.buttonLegendsShow=null,this.panelLegendsContainer=null,this.panelLegendsEntriesContainer=null,this.panelLegendsHeaderContainer=null,this.buttonLegendsClose
334=null,this.eventsListeners=[],this.legends=[]}initContainer(){var ee=this._createMainContainerElement(),te=this.buttonLegendsShow=this._createShowLegendsPictoElement();ee.appendChild(te);var st=this.panelLegendsContainer=this._createLegendsPanelElement();if(this.options.panel){var ot=this.panelLegendsHeaderContainer=this._createPanelHeaderElement({icon:"ign-legends",title:"Légendes",btnClassForClose:"GPshowLegendsPicto"});st.appendChild(ot),this.buttonLegendsClose=ot._closeBtn}var ct=this._createLegendsPanelDivElement();st.appendChild(ct);var ut=this.panelLegendsEntriesContainer=this._createLegendElement();return st.appendChild(ut),ee.appendChild(st),logger$7.log(ee),ee}addEventsListeners(ee){var te=this;this.eventsListeners["layer:add"]=function(st){if(logger$7.trace(st),!te.add(st.element)){logger$7.error("Layer already added...");return}},this.eventsListeners["layer:remove"]=function(st){if(logger$7.trace(st),!te.remove(st.element)){logger$7.error("Layer already removed...");return}},this.eventsListeners["layer:change:position"]=function(st){logger$7.trace(st)},this.eventsListeners["map:moveend"]=function(st){logger$7.trace(st);var ot=te.getMap();for(let yt=0;yt<te.legends.length;yt++){const vt=te.legends[yt];var ct=te.getMetaInformations(vt.obj);if(ct){var ut=ot.getView().getResolution()||ot.getView().getResolutionForZoom(ot.getZoom()),dt=ut*3570,ht=ct.legends.slice(),ft=ht[0];for(let _t=0;_t<ht.length;++_t){const bt=ht[_t];bt.minScaleDenominator||(bt.minScaleDenominator=0),(dt>ft.minScaleDenominator&&bt.minScaleDenominator>ft.minScaleDenominator&&bt.minScaleDenominator<dt||dt<ft.minScaleDenominator&&bt.minScaleDenominator<ft.minScaleDenominator)&&(ft=bt)}if(ct.legends[0]!==ft){ct.legends=[],ct.legends.push(ft);var pt=te._createLegendEntry(ct),mt=vt.dom;mt.replaceWith(pt),vt.dom=pt}}}},ee.getLayers().on("add",this.eventsListeners["layer:add"]),ee.getLayers().on("remove",this.eventsListeners["layer:remove"]),ee.getLayers().on("change:zIndex",this.eventsListeners["layer:change:position"]),ee.on("moveend",this.eventsListeners["map:moveend"])}removeEventsListeners(){var ee=this.getMap();ee.getLayers().un("add",this.eventsListeners["layer:add"]),ee.getLayers().un("remove",this.eventsListeners["layer:remove"]),ee.getLayers().un("change:zIndex",this.eventsListeners["layer:change:position"]),ee.un("moveend",this.eventsListeners["map:moveend"]),delete this.eventsListeners["layer:add"],delete this.eventsListeners["layer:remove"],delete this.eventsListeners["layer:change:position"],delete this.eventsListeners["map:moveend"]}onShowLegendsClick(ee){ee.target.ariaPressed==="true"&&this.onPanelOpen(),logger$7.trace(ee);var te=this.buttonLegendsShow.ariaPressed;this.collapsed=te!=="true",this.dispatchEvent("change:collapsed"),this.options.position&&!this.collapsed&&this.updatePosition(this.options.position)}}Object.assign(Legends.prototype,PanelDOM);Object.assign(Legends.prototype,LegendsDOM);Object.assign(Legends.prototype,Widget);window.ol&&window.ol.control&&(window.ol.control.Legends=Legends);const PM={projection:"EPSG:3857",nativeResolutions:["156543.0339280410","78271.51696402048","39135.75848201023","19567.87924100512","9783.939620502561","4891.969810251280","2445.984905125640","1222.992452562820","611.4962262814100","305.7481131407048","152.8740565703525","76.43702828517624","38.21851414258813","19.10925707129406","9.554628535647032","4.777314267823516","2.388657133911758","1.194328566955879","0.5971642834779395","0.2985821417389697","0.1492910708694849","0.0746455354347424"],tileMatrices:{0:{matrixId:"0",matrixHeight:1,matrixWidth:1,scaleDenominator:5590822640287179e-7,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},1:{matrixId:"1",matrixHeight:2,matrixWidth:2,scaleDenominator:27954113201435894e-8,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},2:{matrixId:"2",matrixHeight:4,matrixWidth:4,scaleDenominator:1397705660071793e-7,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},3:{matrixId:"3",matrixHeight:8,matrixWidth:8,scaleDenominator:6988528300358965e-8,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},4:{matrixId:"4",matrixHeight:16,matrixWidth:16,scaleDenominator:3494264150179486e-8,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},5:{matrixId:"5",matrixHeight:32,matrixWidth:32,scaleDenominator:1747132075089743e-8,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},6:{matrixId:"6",matrixHeight:64,matrixWidth:64,scaleDenominator:8735660375448715e-9,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},7:{matrixId:"7",matrixHeight:128,matrixWidth:128,scaleDenominator:4.3678301877243575e6,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},8:{matrixId:"8",matrixHeight:256,matrixWidth:256,scaleDenominator:2.1839150938621787e6,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},9:{matrixId:"9",matrixHeight:512,matrixWidth:512,scaleDenominator:1.0919575469310894e6,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},10:{matrixId:"10",matrixHeight:1024,matrixWidth:1024,scaleDenominator:545978.7734655464,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},11:{matrixId:"11",matrixHeight:2048,matrixWidth:2048,scaleDenominator:272989.38673277217,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},12:{matrixId:"12",matrixHeight:4096,matrixWidth:4096,scaleDenominator:136494.69336638608,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},13:{matrixId:"13",matrixHeight:8192,matrixWidth:8192,scaleDenominator:68247.34668319322,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},14:{matrixId:"14",matrixHeight:16384,matrixWidth:16384,scaleDenominator:34123.673341596535,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},15:{matrixId:"15",matrixHeight:32768,matrixWidth:32768,scaleDenominator:17061.83667079829,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},16:{matrixId:"16",matrixHeight:65536,matrixWidth:65536,scaleDenominator:8530.918335399145,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},17:{matrixId:"17",matrixHeight:131072,matrixWidth:131072,scaleDenominator:4265.459167699572,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},18:{matrixId:"18",matrixHeight:262144,matrixWidth:262144,scaleDenominator:2132.7295838497826,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},19:{matrixId:"19",matrixHeight:524288,matrixWidth:524288,scaleDenominator:1066.364791924893,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},20:{matrixId:"20",matrixHeight:1048576,matrixWidth:1048576,scaleDenominator:533.1823959624465,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},21:{matrixId:"21",matrixHeight:2097152,matrixWidth:2097152,scaleDenominator:266.5911979812229,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}}}},PM_0_14={projection:"EPSG:3857",nativeResolutions:["156543.0339280410","78271.51696402048","39135.75848201023","19567.87924100
334512","9783.939620502561","4891.969810251280","2445.984905125640","1222.992452562820","611.4962262814100","305.7481131407048","152.8740565703525","76.43702828517624","38.21851414258813","19.10925707129406","9.554628535647032"],tileMatrices:{0:{matrixId:"0",matrixHeight:1,matrixWidth:1,scaleDenominator:5590822640287179e-7,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},1:{matrixId:"1",matrixHeight:2,matrixWidth:2,scaleDenominator:27954113201435894e-8,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},2:{matrixId:"2",matrixHeight:4,matrixWidth:4,scaleDenominator:1397705660071793e-7,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},3:{matrixId:"3",matrixHeight:8,matrixWidth:8,scaleDenominator:6988528300358965e-8,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},4:{matrixId:"4",matrixHeight:16,matrixWidth:16,scaleDenominator:3494264150179486e-8,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},5:{matrixId:"5",matrixHeight:32,matrixWidth:32,scaleDenominator:1747132075089743e-8,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},6:{matrixId:"6",matrixHeight:64,matrixWidth:64,scaleDenominator:8735660375448715e-9,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},7:{matrixId:"7",matrixHeight:128,matrixWidth:128,scaleDenominator:4.3678301877243575e6,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},8:{matrixId:"8",matrixHeight:256,matrixWidth:256,scaleDenominator:2.1839150938621787e6,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},9:{matrixId:"9",matrixHeight:512,matrixWidth:512,scaleDenominator:1.0919575469310894e6,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},10:{matrixId:"10",matrixHeight:1024,matrixWidth:1024,scaleDenominator:545978.7734655464,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},11:{matrixId:"11",matrixHeight:2048,matrixWidth:2048,scaleDenominator:272989.38673277217,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},12:{matrixId:"12",matrixHeight:4096,matrixWidth:4096,scaleDenominator:136494.69336638608,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},13:{matrixId:"13",matrixHeight:8192,matrixWidth:8192,scaleDenominator:68247.34668319322,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},14:{matrixId:"14",matrixHeight:16384,matrixWidth:16384,scaleDenominator:34123.673341596535,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}}}},PM_0_16={projection:"EPSG:3857",nativeResolutions:["156543.0339280410","78271.51696402048","39135.75848201023","19567.87924100512","9783.939620502561","4891.969810251280","2445.984905125640","1222.992452562820","611.4962262814100","305.7481131407048","152.8740565703525","76.43702828517624","38.21851414258813","19.10925707129406","9.554628535647032","4.777314267823516","2.388657133911758"],tileMatrices:{0:{matrixId:"0",matrixHeight:1,matrixWidth:1,scaleDenominator:5590822640287179e-7,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},1:{matrixId:"1",matrixHeight:2,matrixWidth:2,scaleDenominator:27954113201435894e-8,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},2:{matrixId:"2",matrixHeight:4,matrixWidth:4,scaleDenominator:1397705660071793e-7,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},3:{matrixId:"3",matrixHeight:8,matrixWidth:8,scaleDenominator:6988528300358965e-8,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},4:{matrixId:"4",matrixHeight:16,matrixWidth:16,scaleDenominator:3494264150179486e-8,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},5:{matrixId:"5",matrixHeight:32,matrixWidth:32,scaleDenominator:1747132075089743e-8,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},6:{matrixId:"6",matrixHeight:64,matrixWidth:64,scaleDenominator:8735660375448715e-9,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},7:{matrixId:"7",matrixHeight:128,matrixWidth:128,scaleDenominator:4.3678301877243575e6,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},8:{matrixId:"8",matrixHeight:256,matrixWidth:256,scaleDenominator:2.1839150938621787e6,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},9:{matrixId:"9",matrixHeight:512,matrixWidth:512,scaleDenominator:1.0919575469310894e6,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},10:{matrixId:"10",matrixHeight:1024,matrixWidth:1024,scaleDenominator:545978.7734655464,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},11:{matrixId:"11",matrixHeight:2048,matrixWidth:2048,scaleDenominator:272989.38673277217,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},12:{matrixId:"12",matrixHeight:4096,matrixWidth:4096,scaleDenominator:136494.69336638608,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},13:{matrixId:"13",matrixHeight:8192,matrixWidth:8192,scaleDenominator:68247.34668319322,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},14:{matrixId:"14",matrixHeight:16384,matrixWidth:16384,scaleDenominator:34123.673341596535,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},15:{matrixId:"15",matrixHeight:32768,matrixWidth:32768,scaleDenominator:17061.83667079829,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},16:{matrixId:"16",matrixHeight:65536,matrixWidth:65536,scaleDenominator:8530.918335399145,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}}}},PM_0_18={projection:"EPSG:3857",nativeResolutions:["156543.0339280410","78271.51696402048","39135.75848201023","19567.87924100
334512","9783.939620502561","4891.969810251280","2445.984905125640","1222.992452562820","611.4962262814100","305.7481131407048","152.8740565703525","76.43702828517624","38.21851414258813","19.10925707129406","9.554628535647032","4.777314267823516","2.388657133911758","1.194328566955879","0.5971642834779395"],tileMatrices:{0:{matrixId:"0",matrixHeight:1,matrixWidth:1,scaleDenominator:5590822640287179e-7,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},1:{matrixId:"1",matrixHeight:2,matrixWidth:2,scaleDenominator:27954113201435894e-8,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},2:{matrixId:"2",matrixHeight:4,matrixWidth:4,scaleDenominator:1397705660071793e-7,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},3:{matrixId:"3",matrixHeight:8,matrixWidth:8,scaleDenominator:6988528300358965e-8,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},4:{matrixId:"4",matrixHeight:16,matrixWidth:16,scaleDenominator:3494264150179486e-8,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},5:{matrixId:"5",matrixHeight:32,matrixWidth:32,scaleDenominator:1747132075089743e-8,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},6:{matrixId:"6",matrixHeight:64,matrixWidth:64,scaleDenominator:8735660375448715e-9,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},7:{matrixId:"7",matrixHeight:128,matrixWidth:128,scaleDenominator:4.3678301877243575e6,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},8:{matrixId:"8",matrixHeight:256,matrixWidth:256,scaleDenominator:2.1839150938621787e6,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},9:{matrixId:"9",matrixHeight:512,matrixWidth:512,scaleDenominator:1.0919575469310894e6,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},10:{matrixId:"10",matrixHeight:1024,matrixWidth:1024,scaleDenominator:545978.7734655464,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},11:{matrixId:"11",matrixHeight:2048,matrixWidth:2048,scaleDenominator:272989.38673277217,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},12:{matrixId:"12",matrixHeight:4096,matrixWidth:4096,scaleDenominator:136494.69336638608,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},13:{matrixId:"13",matrixHeight:8192,matrixWidth:8192,scaleDenominator:68247.34668319322,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},14:{matrixId:"14",matrixHeight:16384,matrixWidth:16384,scaleDenominator:34123.673341596535,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},15:{matrixId:"15",matrixHeight:32768,matrixWidth:32768,scaleDenominator:17061.83667079829,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},16:{matrixId:"16",matrixHeight:65536,matrixWidth:65536,scaleDenominator:8530.918335399145,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},17:{matrixId:"17",matrixHeight:131072,matrixWidth:131072,scaleDenominator:4265.459167699572,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},18:{matrixId:"18",matrixHeight:262144,matrixWidth:262144,scaleDenominator:2132.7295838497826,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}}}},PM_0_19={projection:"EPSG:3857",nativeResolutions:["156543.0339280410","78271.51696402048","39135.75848201023","19567.87924100512","9783.939620502561","4891.969810251280","2445.984905125640","1222.992452562820","611.4962262814100","305.7481131407048","152.8740565703525","76.43702828517624","38.21851414258813","19.10925707129406","9.554628535647032","4.777314267823516","2.388657133911758","1.194328566955879","0.5971642834779395","0.2985821417389697"],tileMatrices:{0:{matrixId:"0",matrixHeight:1,matrixWidth:1,scaleDenominator:5590822640287179e-7,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},1:{matrixId:"1",matrixHeight:2,matrixWidth:2,scaleDenominator:27954113201435894e-8,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},2:{matrixId:"2",matrixHeight:4,matrixWidth:4,scaleDenominator:1397705660071793e-7,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},3:{matrixId:"3",matrixHeight:8,matrixWidth:8,scaleDenominator:6988528300358965e-8,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},4:{matrixId:"4",matrixHeight:16,matrixWidth:16,scaleDenominator:3494264150179486e-8,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},5:{matrixId:"5",matrixHeight:32,matrixWidth:32,scaleDenominator:1747132075089743e-8,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},6:{matrixId:"6",matrixHeight:64,matrixWidth:64,scaleDenominator:8735660375448715e-9,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},7:{matrixId:"7",matrixHeight:128,matrixWidth:128,scaleDenominator:4.3678301877243575e6,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},8:{matrixId:"8",matrixHeight:256,matrixWidth:256,scaleDenominator:2.1839150938621787e6,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},9:{matrixId:"9",matrixHeight:512,matrixWidth:512,scaleDenominator:1.0919575469310894e6,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},10:{matrixId:"10",matrixHeight:1024,matrixWidth:1024,scaleDenominator:545978.7734655464,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},11:{matrixId:"11",matrixHeight:2048,matrixWidth:2048,scaleDenominator:272989.38673277217,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},12:{matrixId:"12",matrixHeight:4096,matrixWidth:4096,scaleDenominator:136494.69336638608,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},13:{matrixId:"13",matrixHeight:8192,matrixWidth:8192,scaleDenominator:68247.34668319322,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},14:{matrixId:"14",matrixHeight:16384,matrixWidth:16384,scaleDenominator:34123.673341596535,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},15:{matrixId:"15",matrixHeight:32768,matrixWidth:32768,scaleDenominator:17061.83667079829,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},16:{matrixId:"16",matrixHeight:65536,matrixWidth:65536,scaleDenominator:8530.918335399145,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},17:{matrixId:"17",matrixHeight:131072,matrixWidth:131072,scaleDenominator:4265.459167699572,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},18:{matrixId:"18",matrixHeight:262144,matrixWidth:262144,scaleDenominator:2132.7295838497826,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},19:{matrixId:"19",matrixHeight:524288,matrixWidth:524288,scaleDenominator:1066.364791924893,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}}}},PM_0_21={projection:"EPSG:3857",nativeResolutions:["156543.0339280410","78271.51696402048","39135.75848201023","19567.87924100
334512","9783.939620502561","4891.969810251280","2445.984905125640","1222.992452562820","611.4962262814100","305.7481131407048","152.8740565703525","76.43702828517624","38.21851414258813","19.10925707129406","9.554628535647032","4.777314267823516","2.388657133911758","1.194328566955879","0.5971642834779395","0.2985821417389697","0.1492910708694849","0.0746455354347424"],tileMatrices:{0:{matrixId:"0",matrixHeight:1,matrixWidth:1,scaleDenominator:5590822640287179e-7,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},1:{matrixId:"1",matrixHeight:2,matrixWidth:2,scaleDenominator:27954113201435894e-8,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},2:{matrixId:"2",matrixHeight:4,matrixWidth:4,scaleDenominator:1397705660071793e-7,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},3:{matrixId:"3",matrixHeight:8,matrixWidth:8,scaleDenominator:6988528300358965e-8,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},4:{matrixId:"4",matrixHeight:16,matrixWidth:16,scaleDenominator:3494264150179486e-8,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},5:{matrixId:"5",matrixHeight:32,matrixWidth:32,scaleDenominator:1747132075089743e-8,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},6:{matrixId:"6",matrixHeight:64,matrixWidth:64,scaleDenominator:8735660375448715e-9,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},7:{matrixId:"7",matrixHeight:128,matrixWidth:128,scaleDenominator:4.3678301877243575e6,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},8:{matrixId:"8",matrixHeight:256,matrixWidth:256,scaleDenominator:2.1839150938621787e6,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},9:{matrixId:"9",matrixHeight:512,matrixWidth:512,scaleDenominator:1.0919575469310894e6,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},10:{matrixId:"10",matrixHeight:1024,matrixWidth:1024,scaleDenominator:545978.7734655464,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},11:{matrixId:"11",matrixHeight:2048,matrixWidth:2048,scaleDenominator:272989.38673277217,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},12:{matrixId:"12",matrixHeight:4096,matrixWidth:4096,scaleDenominator:136494.69336638608,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},13:{matrixId:"13",matrixHeight:8192,matrixWidth:8192,scaleDenominator:68247.34668319322,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},14:{matrixId:"14",matrixHeight:16384,matrixWidth:16384,scaleDenominator:34123.673341596535,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},15:{matrixId:"15",matrixHeight:32768,matrixWidth:32768,scaleDenominator:17061.83667079829,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},16:{matrixId:"16",matrixHeight:65536,matrixWidth:65536,scaleDenominator:8530.918335399145,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},17:{matrixId:"17",matrixHeight:131072,matrixWidth:131072,scaleDenominator:4265.459167699572,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},18:{matrixId:"18",matrixHeight:262144,matrixWidth:262144,scaleDenominator:2132.7295838497826,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},19:{matrixId:"19",matrixHeight:524288,matrixWidth:524288,scaleDenominator:1066.364791924893,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},20:{matrixId:"20",matrixHeight:1048576,matrixWidth:1048576,scaleDenominator:533.1823959624465,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},21:{matrixId:"21",matrixHeight:2097152,matrixWidth:2097152,scaleDenominator:266.5911979812229,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}}}},PM_0_6={projection:"EPSG:3857",nativeResolutions:["156543.0339280410","78271.51696402048","39135.75848201023","19567.87924100
334512","9783.939620502561","4891.969810251280","2445.984905125640"],tileMatrices:{0:{matrixId:"0",matrixHeight:1,matrixWidth:1,scaleDenominator:5590822640287179e-7,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},1:{matrixId:"1",matrixHeight:2,matrixWidth:2,scaleDenominator:27954113201435894e-8,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},2:{matrixId:"2",matrixHeight:4,matrixWidth:4,scaleDenominator:1397705660071793e-7,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},3:{matrixId:"3",matrixHeight:8,matrixWidth:8,scaleDenominator:6988528300358965e-8,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},4:{matrixId:"4",matrixHeight:16,matrixWidth:16,scaleDenominator:3494264150179486e-8,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},5:{matrixId:"5",matrixHeight:32,matrixWidth:32,scaleDenominator:1747132075089743e-8,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},6:{matrixId:"6",matrixHeight:64,matrixWidth:64,scaleDenominator:8735660375448715e-9,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}}}},PM_0_8={projection:"EPSG:3857",nativeResolutions:["156543.0339280410","78271.51696402048","39135.75848201023","19567.87924100512","9783.939620502561","4891.969810251280","2445.984905125640","1222.992452562820","611.4962262814100"],tileMatrices:{0:{matrixId:"0",matrixHeight:1,matrixWidth:1,scaleDenominator:5590822640287179e-7,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},1:{matrixId:"1",matrixHeight:2,matrixWidth:2,scaleDenominator:27954113201435894e-8,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},2:{matrixId:"2",matrixHeight:4,matrixWidth:4,scaleDenominator:1397705660071793e-7,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},3:{matrixId:"3",matrixHeight:8,matrixWidth:8,scaleDenominator:6988528300358965e-8,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},4:{matrixId:"4",matrixHeight:16,matrixWidth:16,scaleDenominator:3494264150179486e-8,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},5:{matrixId:"5",matrixHeight:32,matrixWidth:32,scaleDenominator:1747132075089743e-8,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},6:{matrixId:"6",matrixHeight:64,matrixWidth:64,scaleDenominator:8735660375448715e-9,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},7:{matrixId:"7",matrixHeight:128,matrixWidth:128,scaleDenominator:4.3678301877243575e6,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},8:{matrixId:"8",matrixHeight:256,matrixWidth:256,scaleDenominator:2.1839150938621787e6,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}}}},PM_10_12={projection:"EPSG:3857",nativeResolutions:["152.8740565703525","76.43702828517624","38.21851414258813"],tileMatrices:{10:{matrixId:"10",matrixHeight:1024,matrixWidth:1024,scaleDenominator:545978.7734655464,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},11:{matrixId:"11",matrixHeight:2048,matrixWidth:2048,scaleDenominator:272989.38673277217,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},12:{matrixId:"12",matrixHeight:4096,matrixWidth:4096,scaleDenominator:136494.69336638608,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}}}},PM_15_18={projection:"EPSG:3857",nativeResolutions:["4.777314267823516","2.388657133911758","1.194328566955879","0.5971642834779395"],tileMatrices:{15:{matrixId:"15",matrixHeight:32768,matrixWidth:32768,scaleDenominator:17061.83667079829,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},16:{matrixId:"16",matrixHeight:65536,matrixWidth:65536,scaleDenominator:8530.918335399145,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},17:{matrixId:"17",matrixHeight:131072,matrixWidth:131072,scaleDenominator:4265.459167699572,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},18:{matrixId:"18",matrixHeight:262144,matrixWidth:262144,scaleDenominator:2132.7295838497826,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}}}},PM_3_15={projection:"EPSG:3857",nativeResolutions:["19567.87924100
334512","9783.939620502561","4891.969810251280","2445.984905125640","1222.992452562820","611.4962262814100","305.7481131407048","152.8740565703525","76.43702828517624","38.21851414258813","19.10925707129406","9.554628535647032","4.777314267823516"],tileMatrices:{3:{matrixId:"3",matrixHeight:8,matrixWidth:8,scaleDenominator:6988528300358965e-8,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},4:{matrixId:"4",matrixHeight:16,matrixWidth:16,scaleDenominator:3494264150179486e-8,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},5:{matrixId:"5",matrixHeight:32,matrixWidth:32,scaleDenominator:1747132075089743e-8,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},6:{matrixId:"6",matrixHeight:64,matrixWidth:64,scaleDenominator:8735660375448715e-9,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},7:{matrixId:"7",matrixHeight:128,matrixWidth:128,scaleDenominator:4.3678301877243575e6,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},8:{matrixId:"8",matrixHeight:256,matrixWidth:256,scaleDenominator:2.1839150938621787e6,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},9:{matrixId:"9",matrixHeight:512,matrixWidth:512,scaleDenominator:1.0919575469310894e6,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},10:{matrixId:"10",matrixHeight:1024,matrixWidth:1024,scaleDenominator:545978.7734655464,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},11:{matrixId:"11",matrixHeight:2048,matrixWidth:2048,scaleDenominator:272989.38673277217,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},12:{matrixId:"12",matrixHeight:4096,matrixWidth:4096,scaleDenominator:136494.69336638608,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},13:{matrixId:"13",matrixHeight:8192,matrixWidth:8192,scaleDenominator:68247.34668319322,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},14:{matrixId:"14",matrixHeight:16384,matrixWidth:16384,scaleDenominator:34123.673341596535,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},15:{matrixId:"15",matrixHeight:32768,matrixWidth:32768,scaleDenominator:17061.83667079829,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}}}},PM_4_10={projection:"EPSG:3857",nativeResolutions:["9783.939620502561","4891.969810251280","2445.984905125640","1222.992452562820","611.4962262814100","305.7481131407048","152.8740565703525"],tileMatrices:{4:{matrixId:"4",matrixHeight:16,matrixWidth:16,scaleDenominator:3494264150179486e-8,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},5:{matrixId:"5",matrixHeight:32,matrixWidth:32,scaleDenominator:1747132075089743e-8,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},6:{matrixId:"6",matrixHeight:64,matrixWidth:64,scaleDenominator:8735660375448715e-9,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},7:{matrixId:"7",matrixHeight:128,matrixWidth:128,scaleDenominator:4.3678301877243575e6,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},8:{matrixId:"8",matrixHeight:256,matrixWidth:256,scaleDenominator:2.1839150938621787e6,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},9:{matrixId:"9",matrixHeight:512,matrixWidth:512,scaleDenominator:1.0919575469310894e6,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},10:{matrixId:"10",matrixHeight:1024,matrixWidth:1024,scaleDenominator:545978.7734655464,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}}}},PM_4_18={projection:"EPSG:3857",nativeResolutions:["9783.939620502561","4891.969810251280","2445.984905125640","1222.992452562820","611.4962262814100","305.7481131407048","152.8740565703525","76.43702828517624","38.21851414258813","19.10925707129406","9.554628535647032","4.777314267823516","2.3886571339
33411758","1.194328566955879","0.5971642834779395"],tileMatrices:{4:{matrixId:"4",matrixHeight:16,matrixWidth:16,scaleDenominator:3494264150179486e-8,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},5:{matrixId:"5",matrixHeight:32,matrixWidth:32,scaleDenominator:1747132075089743e-8,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},6:{matrixId:"6",matrixHeight:64,matrixWidth:64,scaleDenominator:8735660375448715e-9,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},7:{matrixId:"7",matrixHeight:128,matrixWidth:128,scaleDenominator:4.3678301877243575e6,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},8:{matrixId:"8",matrixHeight:256,matrixWidth:256,scaleDenominator:2.1839150938621787e6,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},9:{matrixId:"9",matrixHeight:512,matrixWidth:512,scaleDenominator:1.0919575469310894e6,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},10:{matrixId:"10",matrixHeight:1024,matrixWidth:1024,scaleDenominator:545978.7734655464,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},11:{matrixId:"11",matrixHeight:2048,matrixWidth:2048,scaleDenominator:272989.38673277217,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},12:{matrixId:"12",matrixHeight:4096,matrixWidth:4096,scaleDenominator:136494.69336638608,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},13:{matrixId:"13",matrixHeight:8192,matrixWidth:8192,scaleDenominator:68247.34668319322,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},14:{matrixId:"14",matrixHeight:16384,matrixWidth:16384,scaleDenominator:34123.673341596535,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},15:{matrixId:"15",matrixHeight:32768,matrixWidth:32768,scaleDenominator:17061.83667079829,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},16:{matrixId:"16",matrixHeight:65536,matrixWidth:65536,scaleDenominator:8530.918335399145,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},17:{matrixId:"17",matrixHeight:131072,matrixWidth:131072,scaleDenominator:4265.459167699572,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},18:{matrixId:"18",matrixHeight:262144,matrixWidth:262144,scaleDenominator:2132.7295838497826,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}}}},PM_4_19={projection:"EPSG:3857",nativeResolutions:["9783.939620502561","4891.969810251280","2445.984905125640","1222.992452562820","611.4962262814100","305.7481131407048","152.8740565703525","76.43702828517624","38.21851414258813","19.10925707129406","9.554628535647032","4.777314267823516","2.388657133911758","1.194328566955879","0.5971642834779395","0.2985821417389697"],tileMatrices:{4:{matrixId:"4",matrixHeight:16,matrixWidth:16,scaleDenominator:3494264150179486e-8,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},5:{matrixId:"5",matrixHeight:32,matrixWidth:32,scaleDenominator:1747132075089743e-8,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},6:{matrixId:"6",matrixHeight:64,matrixWidth:64,scaleDenominator:8735660375448715e-9,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},7:{matrixId:"7",matrixHeight:128,matrixWidth:128,scaleDenominator:4.3678301877243575e6,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},8:{matrixId:"8",matrixHeight:256,matrixWidth:256,scaleDenominator:2.1839150938621787e6,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},9:{matrixId:"9",matrixHeight:512,matrixWidth:512,scaleDenominator:1.0919575469310894e6,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},10:{matrixId:"10",matrixHeight:1024,matrixWidth:1024,scaleDenominator:545978.7734655464,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},11:{matrixId:"11",matrixHeight:2048,matrixWidth:2048,scaleDenominator:272989.38673277217,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},12:{matrixId:"12",matrixHeight:4096,matrixWidth:4096,scaleDenominator:136494.69336638608,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},13:{matrixId:"13",matrixHeight:8192,matrixWidth:8192,scaleDenominator:68247.34668319322,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},14:{matrixId:"14",matrixHeight:16384,matrixWidth:16384,scaleDenominator:34123.673341596535,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},15:{matrixId:"15",matrixHeight:32768,matrixWidth:32768,scaleDenominator:17061.83667079829,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},16:{matrixId:"16",matrixHeight:65536,matrixWidth:65536,scaleDenominator:8530.918335399145,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},17:{matrixId:"17",matrixHeight:131072,matrixWidth:131072,scaleDenominator:4265.459167699572,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},18:{matrixId:"18",matrixHeight:262144,matrixWidth:262144,scaleDenominator:2132.7295838497826,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},19:{matrixId:"19",matrixHeight:524288,matrixWidth:524288,scaleDenominator:1066.364791924893,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}}}},PM_6_11={projection:"EPSG:3857",nativeResolutions:["2445.984905125640","1222.992452562820","611.4962262814100","305.7481131407048","152.8740565703525","76.43702828517624"],tileMatrices:{6:{matrixId:"6",matrixHeight:64,matrixWidth:64,scaleDenominator:8735660375448715e-9,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},7:{matrixId:"7",matrixHeight:128,matrixWidth:128,scaleDenominator:4.3678301877243575e6,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},8:{matrixId:"8",matrixHeight:256,matrixWidth:256,scaleDenominator:2.1839150938621787e6,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},9:{matrixId:"9",matrixHeight:512,matrixWidth:512,scaleDenominator:1.0919575469310894e6,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},10:{matrixId:"10",matrixHeight:1024,matrixWidth:1024,scaleDenominator:545978.7734655464,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},11:{matrixId:"11",matrixHeight:2048,matrixWidth:2048,scaleDenominator:272989.38673277217,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}}}},PM_6_14={projection:"EPSG:3857",nativeResolutions:["2445.984905125640","1222.992452562820","611.4962262814100","305.7481131407048","152.8740565703525","76.43702828517624","38.21851414258813","19.10925707129406","9.554628535647032"],tileMatrices:{6:{matrixId:"6",matrixHeight:64,matrixWidth:64,scaleDenominator:8735660375448715e-9,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},7:{matrixId:"7",matrixHeight:128,matrixWidth:128,scaleDenominator:4.3678301877243575e6,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},8:{matrixId:"8",matrixHeight:256,matrixWidth:256,scaleDenominator:2.1839150938621787e6,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},9:{matrixId:"9",matrixHeight:512,matrixWidth:512,scaleDenominator:1.0919575469310894e6,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},10:{matrixId:"10",matrixHeight:1024,matrixWidth:1024,scaleDenominator:545978.7734655464,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},11:{matrixId:"11",matrixHeight:2048,matrixWidth:2048,scaleDenominator:272989.38673277217,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},12:{matrixId:"12",matrixHeight:4096,matrixWidth:4096,scaleDenominator:136494.69336638608,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},13:{matrixId:"13",matrixHeight:8192,matrixWidth:8192,scaleDenominator:68247.34668319322,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},14:{matrixId:"14",matrixHeight:16384,matrixWidth:16384,scaleDenominator:34123.673341596535,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}}}},PM_6_15={projection:"EPSG:3857",nativeResolutions:["2445.984905125640","1222.992452562820","611.4962262814100","305.7481131407048","152.8740565703525","76.43702828517624","38.21851414258813","19.10925707129406","9.554628535647032","4.777314267823516"],tileMatrices:{6:{matrixId:"6",matrixHeight:64,matrixWidth:64,scaleDenominator:8735660375448715e-9,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},7:{matrixId:"7",matrixHeight:128,matrixWidth:128,scaleDenominator:4.3678301877243575e6,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},8:{matrixId:"8",matrixHeight:256,matrixWidth:256,scaleDenominator:2.1839150938621787e6,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},9:{matrixId:"9",matrixHeight:512,matrixWidth:512,scaleDenominator:1.0919575469310894e6,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},10:{matrixId:"10",matrixHeight:1024,matrixWidth:1024,scaleDenominator:545978.7734655464,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},11:{matrixId:"11",matrixHeight:2048,matrixWidth:2048,scaleDenominator:272989.38673277217,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},12:{matrixId:"12",matrixHeight:4096,matrixWidth:4096,scaleDenominator:136494.69336638608,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},13:{matrixId:"13",matrixHeight:8192,matrixWidth:8192,scaleDenominator:68247.34668319322,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},14:{matrixId:"14",matrixHeight:16384,matrixWidth:16384,scaleDenominator:34123.673341596535,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},15:{matrixId:"15",matrixHeight:32768,matrixWidth:32768,scaleDenominator:17061.83667079829,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}}}},PM_6_16={projection:"EPSG:3857",nativeResolutions:["2445.984905125640","1222.992452562820","611.4962262814100","305.7481131407048","152.8740565703525","76.43702828517624","38.21851414258813","19.10925707129406","9.554628535647032","4.777314267823516","2.3886571339
33411758"],tileMatrices:{6:{matrixId:"6",matrixHeight:64,matrixWidth:64,scaleDenominator:8735660375448715e-9,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},7:{matrixId:"7",matrixHeight:128,matrixWidth:128,scaleDenominator:4.3678301877243575e6,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},8:{matrixId:"8",matrixHeight:256,matrixWidth:256,scaleDenominator:2.1839150938621787e6,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},9:{matrixId:"9",matrixHeight:512,matrixWidth:512,scaleDenominator:1.0919575469310894e6,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},10:{matrixId:"10",matrixHeight:1024,matrixWidth:1024,scaleDenominator:545978.7734655464,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},11:{matrixId:"11",matrixHeight:2048,matrixWidth:2048,scaleDenominator:272989.38673277217,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},12:{matrixId:"12",matrixHeight:4096,matrixWidth:4096,scaleDenominator:136494.69336638608,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},13:{matrixId:"13",matrixHeight:8192,matrixWidth:8192,scaleDenominator:68247.34668319322,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},14:{matrixId:"14",matrixHeight:16384,matrixWidth:16384,scaleDenominator:34123.673341596535,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},15:{matrixId:"15",matrixHeight:32768,matrixWidth:32768,scaleDenominator:17061.83667079829,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},16:{matrixId:"16",matrixHeight:65536,matrixWidth:65536,scaleDenominator:8530.918335399145,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}}}},PM_6_17={projection:"EPSG:3857",nativeResolutions:["2445.984905125640","1222.992452562820","611.4962262814100","305.7481131407048","152.8740565703525","76.43702828517624","38.21851414258813","19.10925707129406","9.554628535647032","4.777314267823516","2.388657133911758","1.194328566955879"],tileMatrices:{6:{matrixId:"6",matrixHeight:64,matrixWidth:64,scaleDenominator:8735660375448715e-9,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},7:{matrixId:"7",matrixHeight:128,matrixWidth:128,scaleDenominator:4.3678301877243575e6,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},8:{matrixId:"8",matrixHeight:256,matrixWidth:256,scaleDenominator:2.1839150938621787e6,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},9:{matrixId:"9",matrixHeight:512,matrixWidth:512,scaleDenominator:1.0919575469310894e6,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},10:{matrixId:"10",matrixHeight:1024,matrixWidth:1024,scaleDenominator:545978.7734655464,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},11:{matrixId:"11",matrixHeight:2048,matrixWidth:2048,scaleDenominator:272989.38673277217,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},12:{matrixId:"12",matrixHeight:4096,matrixWidth:4096,scaleDenominator:136494.69336638608,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},13:{matrixId:"13",matrixHeight:8192,matrixWidth:8192,scaleDenominator:68247.34668319322,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},14:{matrixId:"14",matrixHeight:16384,matrixWidth:16384,scaleDenominator:34123.673341596535,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},15:{matrixId:"15",matrixHeight:32768,matrixWidth:32768,scaleDenominator:17061.83667079829,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},16:{matrixId:"16",matrixHeight:65536,matrixWidth:65536,scaleDenominator:8530.918335399145,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},17:{matrixId:"17",matrixHeight:131072,matrixWidth:131072,scaleDenominator:4265.459167699572,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}}}},PM_6_18={projection:"EPSG:3857",nativeResolutions:["2445.984905125640","1222.992452562820","611.4962262814100","305.7481131407048","152.8740565703525","76.43702828517624","38.21851414258813","19.10925707129406","9.554628535647032","4.777314267823516","2.3886571339
33411758","1.194328566955879","0.5971642834779395"],tileMatrices:{6:{matrixId:"6",matrixHeight:64,matrixWidth:64,scaleDenominator:8735660375448715e-9,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},7:{matrixId:"7",matrixHeight:128,matrixWidth:128,scaleDenominator:4.3678301877243575e6,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},8:{matrixId:"8",matrixHeight:256,matrixWidth:256,scaleDenominator:2.1839150938621787e6,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},9:{matrixId:"9",matrixHeight:512,matrixWidth:512,scaleDenominator:1.0919575469310894e6,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},10:{matrixId:"10",matrixHeight:1024,matrixWidth:1024,scaleDenominator:545978.7734655464,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},11:{matrixId:"11",matrixHeight:2048,matrixWidth:2048,scaleDenominator:272989.38673277217,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},12:{matrixId:"12",matrixHeight:4096,matrixWidth:4096,scaleDenominator:136494.69336638608,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},13:{matrixId:"13",matrixHeight:8192,matrixWidth:8192,scaleDenominator:68247.34668319322,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},14:{matrixId:"14",matrixHeight:16384,matrixWidth:16384,scaleDenominator:34123.673341596535,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},15:{matrixId:"15",matrixHeight:32768,matrixWidth:32768,scaleDenominator:17061.83667079829,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},16:{matrixId:"16",matrixHeight:65536,matrixWidth:65536,scaleDenominator:8530.918335399145,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},17:{matrixId:"17",matrixHeight:131072,matrixWidth:131072,scaleDenominator:4265.459167699572,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},18:{matrixId:"18",matrixHeight:262144,matrixWidth:262144,scaleDenominator:2132.7295838497826,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}}}},PM_6_19={projection:"EPSG:3857",nativeResolutions:["2445.984905125640","1222.992452562820","611.4962262814100","305.7481131407048","152.8740565703525","76.43702828517624","38.21851414258813","19.10925707129406","9.554628535647032","4.777314267823516","2.388657133911758","1.194328566955879","0.5971642834779395","0.2985821417389697"],tileMatrices:{6:{matrixId:"6",matrixHeight:64,matrixWidth:64,scaleDenominator:8735660375448715e-9,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},7:{matrixId:"7",matrixHeight:128,matrixWidth:128,scaleDenominator:4.3678301877243575e6,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},8:{matrixId:"8",matrixHeight:256,matrixWidth:256,scaleDenominator:2.1839150938621787e6,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},9:{matrixId:"9",matrixHeight:512,matrixWidth:512,scaleDenominator:1.0919575469310894e6,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},10:{matrixId:"10",matrixHeight:1024,matrixWidth:1024,scaleDenominator:545978.7734655464,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},11:{matrixId:"11",matrixHeight:2048,matrixWidth:2048,scaleDenominator:272989.38673277217,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},12:{matrixId:"12",matrixHeight:4096,matrixWidth:4096,scaleDenominator:136494.69336638608,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},13:{matrixId:"13",matrixHeight:8192,matrixWidth:8192,scaleDenominator:68247.34668319322,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},14:{matrixId:"14",matrixHeight:16384,matrixWidth:16384,scaleDenominator:34123.673341596535,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},15:{matrixId:"15",matrixHeight:32768,matrixWidth:32768,scaleDenominator:17061.83667079829,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},16:{matrixId:"16",matrixHeight:65536,matrixWidth:65536,scaleDenominator:8530.918335399145,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},17:{matrixId:"17",matrixHeight:131072,matrixWidth:131072,scaleDenominator:4265.459167699572,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},18:{matrixId:"18",matrixHeight:262144,matrixWidth:262144,scaleDenominator:2132.7295838497826,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},19:{matrixId:"19",matrixHeight:524288,matrixWidth:524288,scaleDenominator:1066.364791924893,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}}}},PM_6_21={projection:"EPSG:3857",nativeResolutions:["2445.984905125640","1222.992452562820","611.4962262814100","305.7481131407048","152.8740565703525","76.43702828517624","38.21851414258813","19.10925707129406","9.554628535647032","4.777314267823516","2.3886571339
33411758","1.194328566955879","0.5971642834779395","0.2985821417389697","0.1492910708694849","0.0746455354347424"],tileMatrices:{6:{matrixId:"6",matrixHeight:64,matrixWidth:64,scaleDenominator:8735660375448715e-9,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},7:{matrixId:"7",matrixHeight:128,matrixWidth:128,scaleDenominator:4.3678301877243575e6,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},8:{matrixId:"8",matrixHeight:256,matrixWidth:256,scaleDenominator:2.1839150938621787e6,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},9:{matrixId:"9",matrixHeight:512,matrixWidth:512,scaleDenominator:1.0919575469310894e6,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},10:{matrixId:"10",matrixHeight:1024,matrixWidth:1024,scaleDenominator:545978.7734655464,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},11:{matrixId:"11",matrixHeight:2048,matrixWidth:2048,scaleDenominator:272989.38673277217,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},12:{matrixId:"12",matrixHeight:4096,matrixWidth:4096,scaleDenominator:136494.69336638608,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},13:{matrixId:"13",matrixHeight:8192,matrixWidth:8192,scaleDenominator:68247.34668319322,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},14:{matrixId:"14",matrixHeight:16384,matrixWidth:16384,scaleDenominator:34123.673341596535,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},15:{matrixId:"15",matrixHeight:32768,matrixWidth:32768,scaleDenominator:17061.83667079829,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},16:{matrixId:"16",matrixHeight:65536,matrixWidth:65536,scaleDenominator:8530.918335399145,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},17:{matrixId:"17",matrixHeight:131072,matrixWidth:131072,scaleDenominator:4265.459167699572,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},18:{matrixId:"18",matrixHeight:262144,matrixWidth:262144,scaleDenominator:2132.7295838497826,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},19:{matrixId:"19",matrixHeight:524288,matrixWidth:524288,scaleDenominator:1066.364791924893,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},20:{matrixId:"20",matrixHeight:1048576,matrixWidth:1048576,scaleDenominator:533.1823959624465,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},21:{matrixId:"21",matrixHeight:2097152,matrixWidth:2097152,scaleDenominator:266.5911979812229,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}}}},PM_6_9={projection:"EPSG:3857",nativeResolutions:["2445.984905125640","1222.992452562820","611.4962262814100","305.7481131407048"],tileMatrices:{6:{matrixId:"6",matrixHeight:64,matrixWidth:64,scaleDenominator:8735660375448715e-9,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},7:{matrixId:"7",matrixHeight:128,matrixWidth:128,scaleDenominator:4.3678301877243575e6,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},8:{matrixId:"8",matrixHeight:256,matrixWidth:256,scaleDenominator:2.1839150938621787e6,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},9:{matrixId:"9",matrixHeight:512,matrixWidth:512,scaleDenominator:1.0919575469310894e6,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}}}},PM_7_17={projection:"EPSG:3857",nativeResolutions:["1222.992452562820","611.4962262814100","305.7481131407048","152.8740565703525","76.43702828517624","38.21851414258813","19.10925707129406","9.554628535647032","4.777314267823516","2.388657133911758","1.194328566955879"],tileMatrices:{7:{matrixId:"7",matrixHeight:128,matrixWidth:128,scaleDenominator:4.3678301877243575e6,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},8:{matrixId:"8",matrixHeight:256,matrixWidth:256,scaleDenominator:2.1839150938621787e6,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},9:{matrixId:"9",matrixHeight:512,matrixWidth:512,scaleDenominator:1.0919575469310894e6,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},10:{matrixId:"10",matrixHeight:1024,matrixWidth:1024,scaleDenominator:545978.7734655464,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},11:{matrixId:"11",matrixHeight:2048,matrixWidth:2048,scaleDenominator:272989.38673277217,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},12:{matrixId:"12",matrixHeight:4096,matrixWidth:4096,scaleDenominator:136494.69336638608,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},13:{matrixId:"13",matrixHeight:8192,matrixWidth:8192,scaleDenominator:68247.34668319322,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},14:{matrixId:"14",matrixHeight:16384,matrixWidth:16384,scaleDenominator:34123.673341596535,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},15:{matrixId:"15",matrixHeight:32768,matrixWidth:32768,scaleDenominator:17061.83667079829,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},16:{matrixId:"16",matrixHeight:65536,matrixWidth:65536,scaleDenominator:8530.918335399145,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},17:{matrixId:"17",matrixHeight:131072,matrixWidth:131072,scaleDenominator:4265.459167699572,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}}}},PM_7_18={projection:"EPSG:3857",nativeResolutions:["1222.992452562820","611.4962262814100","305.7481131407048","152.8740565703525","76.43702828517624","38.21851414258813","19.10925707129406","9.554628535647032","4.777314267823516","2.3886571339
33411758","1.194328566955879","0.5971642834779395"],tileMatrices:{7:{matrixId:"7",matrixHeight:128,matrixWidth:128,scaleDenominator:4.3678301877243575e6,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},8:{matrixId:"8",matrixHeight:256,matrixWidth:256,scaleDenominator:2.1839150938621787e6,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},9:{matrixId:"9",matrixHeight:512,matrixWidth:512,scaleDenominator:1.0919575469310894e6,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},10:{matrixId:"10",matrixHeight:1024,matrixWidth:1024,scaleDenominator:545978.7734655464,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},11:{matrixId:"11",matrixHeight:2048,matrixWidth:2048,scaleDenominator:272989.38673277217,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},12:{matrixId:"12",matrixHeight:4096,matrixWidth:4096,scaleDenominator:136494.69336638608,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},13:{matrixId:"13",matrixHeight:8192,matrixWidth:8192,scaleDenominator:68247.34668319322,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},14:{matrixId:"14",matrixHeight:16384,matrixWidth:16384,scaleDenominator:34123.673341596535,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},15:{matrixId:"15",matrixHeight:32768,matrixWidth:32768,scaleDenominator:17061.83667079829,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},16:{matrixId:"16",matrixHeight:65536,matrixWidth:65536,scaleDenominator:8530.918335399145,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},17:{matrixId:"17",matrixHeight:131072,matrixWidth:131072,scaleDenominator:4265.459167699572,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},18:{matrixId:"18",matrixHeight:262144,matrixWidth:262144,scaleDenominator:2132.7295838497826,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}}}},PM_9_16={projection:"EPSG:3857",nativeResolutions:["305.7481131407048","152.8740565703525","76.43702828517624","38.21851414258813","19.10925707129406","9.554628535647032","4.777314267823516","2.388657133911758"],tileMatrices:{9:{matrixId:"9",matrixHeight:512,matrixWidth:512,scaleDenominator:1.0919575469310894e6,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},10:{matrixId:"10",matrixHeight:1024,matrixWidth:1024,scaleDenominator:545978.7734655464,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},11:{matrixId:"11",matrixHeight:2048,matrixWidth:2048,scaleDenominator:272989.38673277217,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},12:{matrixId:"12",matrixHeight:4096,matrixWidth:4096,scaleDenominator:136494.69336638608,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},13:{matrixId:"13",matrixHeight:8192,matrixWidth:8192,scaleDenominator:68247.34668319322,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},14:{matrixId:"14",matrixHeight:16384,matrixWidth:16384,scaleDenominator:34123.673341596535,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},15:{matrixId:"15",matrixHeight:32768,matrixWidth:32768,scaleDenominator:17061.83667079829,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},16:{matrixId:"16",matrixHeight:65536,matrixWidth:65536,scaleDenominator:8530.918335399145,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}}}},TMS={"2154_10cm":{projection:"EPSG:2154",nativeResolutions:["209715.2","104857.6","52428.8","26214.4","13107.2","6553.6","3276.8","1638.4","819.2","409.6","204.8","102.4","51.2","25.6","12.8","6.4","3.2","1.6","0.8","0.4","0.2","0.1"],tileMatrices:{0:{matrixId:"0",matrixHeight:1,matrixWidth:1,scaleDenominator:7489828571428572e-7,tileHeight:256,tileWidth:256,topLeftCorner:{x:0,y:12e6}},1:{matrixId:"1",matrixHeight:1,matrixWidth:1,scaleDenominator:374491428571428
3346e-7,tileHeight:256,tileWidth:256,topLeftCorner:{x:0,y:12e6}},2:{matrixId:"2",matrixHeight:1,matrixWidth:1,scaleDenominator:1872457142857143e-7,tileHeight:256,tileWidth:256,topLeftCorner:{x:0,y:12e6}},3:{matrixId:"3",matrixHeight:2,matrixWidth:1,scaleDenominator:9362285714285715e-8,tileHeight:256,tileWidth:256,topLeftCorner:{x:0,y:12e6}},4:{matrixId:"4",matrixHeight:4,matrixWidth:1,scaleDenominator:46811428571428575e-9,tileHeight:256,tileWidth:256,topLeftCorner:{x:0,y:12e6}},5:{matrixId:"5",matrixHeight:7,matrixWidth:1,scaleDenominator:23405714285714287e-9,tileHeight:256,tileWidth:256,topLeftCorner:{x:0,y:12e6}},6:{matrixId:"6",matrixHeight:13,matrixWidth:2,scaleDenominator:11702857142857144e-9,tileHeight:256,tileWidth:256,topLeftCorner:{x:0,y:12e6}},7:{matrixId:"7",matrixHeight:26,matrixWidth:4,scaleDenominator:5851428571428572e-9,tileHeight:256,tileWidth:256,topLeftCorner:{x:0,y:12e6}},8:{matrixId:"8",matrixHeight:52,matrixWidth:7,scaleDenominator:2925714285714286e-9,tileHeight:256,tileWidth:256,topLeftCorner:{x:0,y:12e6}},9:{matrixId:"9",matrixHeight:103,matrixWidth:13,scaleDenominator:1462857142857143e-9,tileHeight:256,tileWidth:256,topLeftCorner:{x:0,y:12e6}},10:{matrixId:"10",matrixHeight:206,matrixWidth:25,scaleDenominator:731428.5714285715,tileHeight:256,tileWidth:256,topLeftCorner:{x:0,y:12e6}},11:{matrixId:"11",matrixHeight:411,matrixWidth:50,scaleDenominator:365714.28571428574,tileHeight:256,tileWidth:256,topLeftCorner:{x:0,y:12e6}},12:{matrixId:"12",matrixHeight:822,matrixWidth:99,scaleDenominator:182857.14285714287,tileHeight:256,tileWidth:256,topLeftCorner:{x:0,y:12e6}},13:{matrixId:"13",matrixHeight:1643,matrixWidth:197,scaleDenominator:91428.57142857143,tileHeight:256,tileWidth:256,topLeftCorner:{x:0,y:12e6}},14:{matrixId:"14",matrixHeight:3285,matrixWidth:394,scaleDenominator:45714.28571428572,tileHeight:256,tileWidth:256,topLeftCorner:{x:0,y:12e6}},15:{matrixId:"15",matrixHeight:6569,matrixWidth:788,scaleDenominator:22857.14285714286,tileHeight:256,tileWidth:256,topLeftCorner:{x:0,y:12e6}},16:{matrixId:"16",matrixHeight:13138,matrixWidth:1575,scaleDenominator:11428.57142857143,tileHeight:256,tileWidth:256,topLeftCorner:{x:0,y:12e6}},17:{matrixId:"17",matrixHeight:26276,matrixWidth:3150,scaleDenominator:5714.285714285715,tileHeight:256,tileWidth:256,topLeftCorner:{x:0,y:12e6}},18:{matrixId:"18",matrixHeight:52552,matrixWidth:6300,scaleDenominator:2857.1428571428573,tileHeight:256,tileWidth:256,topLeftCorner:{x:0,y:12e6}},19:{matrixId:"19",matrixHeight:105102,matrixWidth:12600,scaleDenominator:1428.5714285714287,tileHeight:256,tileWidth:256,topLeftCorner:{x:0,y:12e6}},20:{matrixId:"20",matrixHeight:210205,matrixWidth:25200,scaleDenominator:714.2857142857143,tileHeight:256,tileWidth:256,topLeftCorner:{x:0,y:12e6}},21:{matrixId:"21",matrixHeight:420409,matrixWidth:50400,scaleDenominator:357.14285714285717,tileHeight:256,tileWidth:256,topLeftCorner:{x:0,y:12e6}}}},"2154_10cm_10_20":{projection:"EPSG:2154",nativeResolutions:["204.8","102.4","51.2","25.6","12.8","6.4","3.2","1.6","0.8","0.4","0.2"],tileMatrices:{10:{matrixId:"10",matrixHeight:206,matrixWidth:25,scaleDenominator:731428.5714285715,tileHeight:256,tileWidth:256,topLeftCorner:{x:0,y:12e6}},11:{matrixId:"11",matrixHeight:411,matrixWidth:50,scaleDenominator:365714.28571428574,tileHeight:256,tileWidth:256,topLeftCorner:{x:0,y:12e6}},12:{matrixId:"12",matrixHeight:822,matrixWidth:99,scaleDenominator:182857.14285714287,tileHeight:256,tileWidth:256,topLeftCorner:{x:0,y:12e6}},13:{matrixId:"13",matrixHeight:1643,matrixWidth:197,scaleDenominator:91428.57142857143,tileHeight:256,tileWidth:256,topLeftCorner:{x:0,y:12e6}},14:{matrixId:"14",matrixHeight:3285,matrixWidth:394,scaleDenominator:45714.28571428572,tileHeight:256,tileWidth:256,topLeftCorner:{x:0,y:12e6}},15:{matrixId:"15",matrixHeight:6569,matrixWidth:788,scaleDenominator:22857.14285714286,tileHeight:256,tileWidth:256,topLeftCorner:{x:0,y:12e6}},16:{matrixId:"16",matrixHeight:13138,matrixWidth:1575,scaleDenominator:11428.57142857143,tileHeight:256,tileWidth:256,topLeftCorner:{x:0,y:12e6}},17:{matrixId:"17",matrixHeight:26276,matrixWidth:3150,scaleDenominator:5714.285714285715,tileHeight:256,tileWidth:256,topLeftCorner:{x:0,y:12e6}},18:{matrixId:"18",matrixHeight:52552,matrixWidth:6300,scaleDenominator:2857.1428571428573,tileHeight:256,tileWidth:256,topLeftCorner:{x:0,y:12e6}},19:{matrixId:"19",matrixHeight:105102,matrixWidth:12600,scaleDenominator:1428.5714285714287,tileHeight:256,tileWidth:256,topLeftCorner:{x:0,y:12e6}},20:{matrixId:"20",matrixHeight:210205,matrixWidth:25200,scaleDenominator:714.2857142857143,tileHeight:256,tileWidth:256,topLeftCorner:{x:0,y:12e6}}}},"2154_10cm_6_19":{projection:"EPSG:2154",nativeResolutions:["3276.8","1638.4","8
33419.2","409.6","204.8","102.4","51.2","25.6","12.8","6.4","3.2","1.6","0.8","0.4"],tileMatrices:{6:{matrixId:"6",matrixHeight:13,matrixWidth:2,scaleDenominator:11702857142857144e-9,tileHeight:256,tileWidth:256,topLeftCorner:{x:0,y:12e6}},7:{matrixId:"7",matrixHeight:26,matrixWidth:4,scaleDenominator:5851428571428572e-9,tileHeight:256,tileWidth:256,topLeftCorner:{x:0,y:12e6}},8:{matrixId:"8",matrixHeight:52,matrixWidth:7,scaleDenominator:2925714285714286e-9,tileHeight:256,tileWidth:256,topLeftCorner:{x:0,y:12e6}},9:{matrixId:"9",matrixHeight:103,matrixWidth:13,scaleDenominator:1462857142857143e-9,tileHeight:256,tileWidth:256,topLeftCorner:{x:0,y:12e6}},10:{matrixId:"10",matrixHeight:206,matrixWidth:25,scaleDenominator:731428.5714285715,tileHeight:256,tileWidth:256,topLeftCorner:{x:0,y:12e6}},11:{matrixId:"11",matrixHeight:411,matrixWidth:50,scaleDenominator:365714.28571428574,tileHeight:256,tileWidth:256,topLeftCorner:{x:0,y:12e6}},12:{matrixId:"12",matrixHeight:822,matrixWidth:99,scaleDenominator:182857.14285714287,tileHeight:256,tileWidth:256,topLeftCorner:{x:0,y:12e6}},13:{matrixId:"13",matrixHeight:1643,matrixWidth:197,scaleDenominator:91428.57142857143,tileHeight:256,tileWidth:256,topLeftCorner:{x:0,y:12e6}},14:{matrixId:"14",matrixHeight:3285,matrixWidth:394,scaleDenominator:45714.28571428572,tileHeight:256,tileWidth:256,topLeftCorner:{x:0,y:12e6}},15:{matrixId:"15",matrixHeight:6569,matrixWidth:788,scaleDenominator:22857.14285714286,tileHeight:256,tileWidth:256,topLeftCorner:{x:0,y:12e6}},16:{matrixId:"16",matrixHeight:13138,matrixWidth:1575,scaleDenominator:11428.57142857143,tileHeight:256,tileWidth:256,topLeftCorner:{x:0,y:12e6}},17:{matrixId:"17",matrixHeight:26276,matrixWidth:3150,scaleDenominator:5714.285714285715,tileHeight:256,tileWidth:256,topLeftCorner:{x:0,y:12e6}},18:{matrixId:"18",matrixHeight:52552,matrixWidth:6300,scaleDenominator:2857.1428571428573,tileHeight:256,tileWidth:256,topLeftCorner:{x:0,y:12e6}},19:{matrixId:"19",matrixHeight:105102,matrixWidth:12600,scaleDenominator:1428.5714285714287,tileHeight:256,tileWidth:256,topLeftCorner:{x:0,y:12e6}}}},"2154_10cm_6_20":{projection:"EPSG:2154",nativeResolutions:["3276.8","1638.4","819.2","409.6","204.8","102.4","51.2","25.6","12.8","6.4","3.2","1.6","0.8","0.4","0.2"],tileMatrices:{6:{matrixId:"6",matrixHeight:13,matrixWidth:2,scaleDenominator:11702857142857144e-9,tileHeight:256,tileWidth:256,topLeftCorner:{x:0,y:12e6}},7:{matrixId:"7",matrixHeight:26,matrixWidth:4,scaleDenominator:5851428571428572e-9,tileHeight:256,tileWidth:256,topLeftCorner:{x:0,y:12e6}},8:{matrixId:"8",matrixHeight:52,matrixWidth:7,scaleDenominator:2925714285714286e-9,tileHeight:256,tileWidth:256,topLeftCorner:{x:0,y:12e6}},9:{matrixId:"9",matrixHeight:103,matrixWidth:13,scaleDenominator:1462857142857143e-9,tileHeight:256,tileWidth:256,topLeftCorner:{x:0,y:12e6}},10:{matrixId:"10",matrixHeight:206,matrixWidth:25,scaleDenominator:731428.5714285715,tileHeight:256,tileWidth:256,topLeftCorner:{x:0,y:12e6}},11:{matrixId:"11",matrixHeight:411,matrixWidth:50,scaleDenominator:365714.28571428574,tileHeight:256,tileWidth:256,topLeftCorner:{x:0,y:12e6}},12:{matrixId:"12",matrixHeight:822,matrixWidth:99,scaleDenominator:182857.14285714287,tileHeight:256,tileWidth:256,topLeftCorner:{x:0,y:12e6}},13:{matrixId:"13",matrixHeight:1643,matrixWidth:197,scaleDenominator:91428.57142857143,tileHeight:256,tileWidth:256,topLeftCorner:{x:0,y:12e6}},14:{matrixId:"14",matrixHeight:3285,matrixWidth:394,scaleDenominator:45714.28571428572,tileHeight:256,tileWidth:256,topLeftCorner:{x:0,y:12e6}},15:{matrixId:"15",matrixHeight:6569,matrixWidth:788,scaleDenominator:22857.14285714286,tileHeight:256,tileWidth:256,topLeftCorner:{x:0,y:12e6}},16:{matrixId:"16",matrixHeight:13138,matrixWidth:1575,scaleDenominator:11428.57142857143,tileHeight:256,tileWidth:256,topLeftCorner:{x:0,y:12e6}},17:{matrixId:"17",matrixHeight:26276,matrixWidth:3150,scaleDenominator:5714.285714285715,tileHeight:256,tileWidth:256,topLeftCorner:{x:0,y:12e6}},18:{matrixId:"18",matrixHeight:52552,matrixWidth:6300,scaleDenominator:2857.1428571428573,tileHeight:256,tileWidth:256,topLeftCorner:{x:0,y:12e6}},19:{matrixId:"19",matrixHeight:105102,matrixWidth:12600,scaleDenominator:1428.5714285714287,tileHeight:256,tileWidth:256,topLeftCorner:{x:0,y:12e6}},20:{matrixId:"20",matrixHeight:210205,matrixWidth:25200,scaleDenominator:714.2857142857143,tileHeight:256,tileWidth:256,topLeftCorner:{x:0,y:12e6}}}},"2154_5cm":{projection:"EPSG:2154",nativeResolutions:["209715.2","104857.6","52428.8","26214.4","13107.2","6553.6","3276.8","1638.4","8
33419.2","409.6","204.8","102.4","51.2","25.6","12.8","6.4","3.2","1.6","0.8","0.4","0.2","0.1","0.05"],tileMatrices:{0:{matrixId:"0",matrixHeight:1,matrixWidth:1,scaleDenominator:7489828571428572e-7,tileHeight:256,tileWidth:256,topLeftCorner:{x:0,y:12e6}},1:{matrixId:"1",matrixHeight:1,matrixWidth:1,scaleDenominator:3744914285714286e-7,tileHeight:256,tileWidth:256,topLeftCorner:{x:0,y:12e6}},2:{matrixId:"2",matrixHeight:1,matrixWidth:1,scaleDenominator:1872457142857143e-7,tileHeight:256,tileWidth:256,topLeftCorner:{x:0,y:12e6}},3:{matrixId:"3",matrixHeight:2,matrixWidth:1,scaleDenominator:9362285714285715e-8,tileHeight:256,tileWidth:256,topLeftCorner:{x:0,y:12e6}},4:{matrixId:"4",matrixHeight:4,matrixWidth:1,scaleDenominator:46811428571428575e-9,tileHeight:256,tileWidth:256,topLeftCorner:{x:0,y:12e6}},5:{matrixId:"5",matrixHeight:7,matrixWidth:1,scaleDenominator:23405714285714287e-9,tileHeight:256,tileWidth:256,topLeftCorner:{x:0,y:12e6}},6:{matrixId:"6",matrixHeight:13,matrixWidth:2,scaleDenominator:11702857142857144e-9,tileHeight:256,tileWidth:256,topLeftCorner:{x:0,y:12e6}},7:{matrixId:"7",matrixHeight:26,matrixWidth:4,scaleDenominator:5851428571428572e-9,tileHeight:256,tileWidth:256,topLeftCorner:{x:0,y:12e6}},8:{matrixId:"8",matrixHeight:52,matrixWidth:7,scaleDenominator:2925714285714286e-9,tileHeight:256,tileWidth:256,topLeftCorner:{x:0,y:12e6}},9:{matrixId:"9",matrixHeight:103,matrixWidth:13,scaleDenominator:1462857142857143e-9,tileHeight:256,tileWidth:256,topLeftCorner:{x:0,y:12e6}},10:{matrixId:"10",matrixHeight:206,matrixWidth:25,scaleDenominator:731428.5714285715,tileHeight:256,tileWidth:256,topLeftCorner:{x:0,y:12e6}},11:{matrixId:"11",matrixHeight:411,matrixWidth:50,scaleDenominator:365714.28571428574,tileHeight:256,tileWidth:256,topLeftCorner:{x:0,y:12e6}},12:{matrixId:"12",matrixHeight:822,matrixWidth:99,scaleDenominator:182857.14285714287,tileHeight:256,tileWidth:256,topLeftCorner:{x:0,y:12e6}},13:{matrixId:"13",matrixHeight:1643,matrixWidth:197,scaleDenominator:91428.57142857143,tileHeight:256,tileWidth:256,topLeftCorner:{x:0,y:12e6}},14:{matrixId:"14",matrixHeight:3285,matrixWidth:394,scaleDenominator:45714.28571428572,tileHeight:256,tileWidth:256,topLeftCorner:{x:0,y:12e6}},15:{matrixId:"15",matrixHeight:6569,matrixWidth:788,scaleDenominator:22857.14285714286,tileHeight:256,tileWidth:256,topLeftCorner:{x:0,y:12e6}},16:{matrixId:"16",matrixHeight:13138,matrixWidth:1575,scaleDenominator:11428.57142857143,tileHeight:256,tileWidth:256,topLeftCorner:{x:0,y:12e6}},17:{matrixId:"17",matrixHeight:26276,matrixWidth:3150,scaleDenominator:5714.285714285715,tileHeight:256,tileWidth:256,topLeftCorner:{x:0,y:12e6}},18:{matrixId:"18",matrixHeight:52552,matrixWidth:6300,scaleDenominator:2857.1428571428573,tileHeight:256,tileWidth:256,topLeftCorner:{x:0,y:12e6}},19:{matrixId:"19",matrixHeight:105102,matrixWidth:12600,scaleDenominator:1428.5714285714287,tileHeight:256,tileWidth:256,topLeftCorner:{x:0,y:12e6}},20:{matrixId:"20",matrixHeight:210205,matrixWidth:25200,scaleDenominator:714.2857142857143,tileHeight:256,tileWidth:256,topLeftCorner:{x:0,y:12e6}},21:{matrixId:"21",matrixHeight:420409,matrixWidth:50400,scaleDenominator:357.14285714285717,tileHeight:256,tileWidth:256,topLeftCorner:{x:0,y:12e6}},22:{matrixId:"22",matrixHeight:840818,matrixWidth:100800,scaleDenominator:178.57142857142858,tileHeight:256,tileWidth:256,topLeftCorner:{x:0,y:12e6}}}},"2154_5cm_6_22":{projection:"EPSG:2154",nativeResolutions:["3276.8","1638.4","819.2","409.6","204.8","102.4","51.2","25.6","12.8","6.4","3.2","1.6","0.8","0.4","0.2","0.1","0.05"],tileMatrices:{6:{matrixId:"6",matrixHeight:13,matrixWidth:2,scaleDenominator:11702857142857144e-9,tileHeight:256,tileWidth:256,topLeftCorner:{x:0,y:12e6}},7:{matrixId:"7",matrixHeight:26,matrixWidth:4,scaleDenominator:5851428571428572e-9,tileHeight:256,tileWidth:256,topLeftCorner:{x:0,y:12e6}},8:{matrixId:"8",matrixHeight:52,matrixWidth:7,scaleDenominator:2925714285714286e-9,tileHeight:256,tileWidth:256,topLeftCorner:{x:0,y:12e6}},9:{matrixId:"9",matrixHeight:103,matrixWidth:13,scaleDenominator:1462857142857143e-9,tileHeight:256,tileWidth:256,topLeftCorner:{x:0,y:12e6}},10:{matrixId:"10",matrixHeight:206,matrixWidth:25,scaleDenominator:731428.5714285715,tileHeight:256,tileWidth:256,topLeftCorner:{x:0,y:12e6}},11:{matrixId:"11",matrixHeight:411,matrixWidth:50,scaleDenominator:365714.28571428574,tileHeight:256,tileWidth:256,topLeftCorner:{x:0,y:12e6}},12:{matrixId:"12",matrixHeight:822,matrixWidth:99,scaleDenominator:182857.14285714287,tileHeight:256,tileWidth:256,topLeftCorner:{x:0,y:12e6}},13:{matrixId:"13",matrixHeight:1643,matrixWidth:197,scaleDenominator:91428.57142857143,tileHeight:256,tileWidth:256,topLeftCorner:{x:0,y:12e6}},14:{matrixId:"14",matrixHeight:3285,matrixWidth:394,scaleDenominator:45714.28571428572,tileHeight:256,tileWidth:256,topLeftCorner:{x:0,y:12e6}},15:{matrixId:"15",matrixHeight:6569,matrixWidth:788,scaleDenominator:22857.1428571428
3346,tileHeight:256,tileWidth:256,topLeftCorner:{x:0,y:12e6}},16:{matrixId:"16",matrixHeight:13138,matrixWidth:1575,scaleDenominator:11428.57142857143,tileHeight:256,tileWidth:256,topLeftCorner:{x:0,y:12e6}},17:{matrixId:"17",matrixHeight:26276,matrixWidth:3150,scaleDenominator:5714.285714285715,tileHeight:256,tileWidth:256,topLeftCorner:{x:0,y:12e6}},18:{matrixId:"18",matrixHeight:52552,matrixWidth:6300,scaleDenominator:2857.1428571428573,tileHeight:256,tileWidth:256,topLeftCorner:{x:0,y:12e6}},19:{matrixId:"19",matrixHeight:105102,matrixWidth:12600,scaleDenominator:1428.5714285714287,tileHeight:256,tileWidth:256,topLeftCorner:{x:0,y:12e6}},20:{matrixId:"20",matrixHeight:210205,matrixWidth:25200,scaleDenominator:714.2857142857143,tileHeight:256,tileWidth:256,topLeftCorner:{x:0,y:12e6}},21:{matrixId:"21",matrixHeight:420409,matrixWidth:50400,scaleDenominator:357.14285714285717,tileHeight:256,tileWidth:256,topLeftCorner:{x:0,y:12e6}},22:{matrixId:"22",matrixHeight:840818,matrixWidth:100800,scaleDenominator:178.57142857142858,tileHeight:256,tileWidth:256,topLeftCorner:{x:0,y:12e6}}}},"LAMB93_2.5m":{projection:"IGNF:LAMB93",nativeResolutions:["163840","81920","40960","20480","10240","5120","2560","1280","640","320","160","80","40","20","10","5","2.5"],tileMatrices:{0:{matrixId:"0",matrixHeight:1,matrixWidth:1,scaleDenominator:5851428571428572e-7,tileHeight:256,tileWidth:256,topLeftCorner:{x:0,y:12e6}},1:{matrixId:"1",matrixHeight:1,matrixWidth:1,scaleDenominator:2925714285714286e-7,tileHeight:256,tileWidth:256,topLeftCorner:{x:0,y:12e6}},2:{matrixId:"2",matrixHeight:2,matrixWidth:1,scaleDenominator:1462857142857143e-7,tileHeight:256,tileWidth:256,topLeftCorner:{x:0,y:12e6}},3:{matrixId:"3",matrixHeight:3,matrixWidth:1,scaleDenominator:7314285714285715e-8,tileHeight:256,tileWidth:256,topLeftCorner:{x:0,y:12e6}},4:{matrixId:"4",matrixHeight:5,matrixWidth:1,scaleDenominator:36571428571428575e-9,tileHeight:256,tileWidth:256,topLeftCorner:{x:0,y:12e6}},5:{matrixId:"5",matrixHeight:9,matrixWidth:1,scaleDenominator:18285714285714287e-9,tileHeight:256,tileWidth:256,topLeftCorner:{x:0,y:12e6}},6:{matrixId:"6",matrixHeight:17,matrixWidth:2,scaleDenominator:9142857142857144e-9,tileHeight:256,tileWidth:256,topLeftCorner:{x:0,y:12e6}},7:{matrixId:"7",matrixHeight:33,matrixWidth:4,scaleDenominator:4571428571428572e-9,tileHeight:256,tileWidth:256,topLeftCorner:{x:0,y:12e6}},8:{matrixId:"8",matrixHeight:66,matrixWidth:8,scaleDenominator:2285714285714286e-9,tileHeight:256,tileWidth:256,topLeftCorner:{x:0,y:12e6}},9:{matrixId:"9",matrixHeight:132,matrixWidth:16,scaleDenominator:1142857142857143e-9,tileHeight:256,tileWidth:256,topLeftCorner:{x:0,y:12e6}},10:{matrixId:"10",matrixHeight:263,matrixWidth:32,scaleDenominator:571428.5714285715,tileHeight:256,tileWidth:256,topLeftCorner:{x:0,y:12e6}},11:{matrixId:"11",matrixHeight:526,matrixWidth:63,scaleDenominator:285714.28571428574,tileHeight:256,tileWidth:256,topLeftCorner:{x:0,y:12e6}},12:{matrixId:"12",matrixHeight:1051,matrixWidth:126,scaleDenominator:142857.14285714287,tileHeight:256,tileWidth:256,topLeftCorner:{x:0,y:12e6}},13:{matrixId:"13",matrixHeight:2102,matrixWidth:252,scaleDenominator:71428.57142857143,tileHeight:256,tileWidth:256,topLeftCorner:{x:0,y:12e6}},14:{matrixId:"14",matrixHeight:4204,matrixWidth:504,scaleDenominator:35714.28571428572,tileHeight:256,tileWidth:256,topLeftCorner:{x:0,y:12e6}},15:{matrixId:"15",matrixHeight:8408,matrixWidth:1008,scaleDenominator:17857.14285714286,tileHeight:256,tileWidth:256,topLeftCorner:{x:0,y:12e6}},16:{matrixId:"16",matrixHeight:16816,matrixWidth:2016,scaleDenominator:8928.57142857143,tileHeight:256,tileWidth:256,topLeftCorner:{x:0,y:12e6}}}},"LAMB93_2.5m_3_16":{projection:"IGNF:LAMB93",nativeResolutions:["20480","10240","5120","2560","1280","640","320","160","80","40","20","10","5","2.5"],tileMatrices:{3:{matrixId:"3",matrixHeight:3,matrixWidth:1,scaleDenominator:7314285714285715e-8,tileHeight:256,tileWidth:256,topLeftCorner:{x:0,y:12e6}},4:{matrixId:"4",matrixHeight:5,matrixWidth:1,scaleDenominator:36571428571428575e-9,tileHeight:256,tileWidth:256,topLeftCorner:{x:0,y:12e6}},5:{matrixId:"5",matrixHeight:9,matrixWidth:1,scaleDenominator:18285714285714287e-9,tileHeight:256,tileWidth:256,topLeftCorner:{x:0,y:12e6}},6:{matrixId:"6",matrixHeight:17,matrixWidth:2,scaleDenominator:9142857142857144e-9,tileHeight:256,tileWidth:256,topLeftCorner:{x:0,y:12e6}},7:{matrixId:"7",matrixHeight:33,matrixWidth:4,scaleDenominator:4571428571428572e-9,tileHeight:256,tileWidth:256,topLeftCorner:{x:0,y:12e6}},8:{matrixId:"8",matrixHeight:66,matrixWidth:8,scaleDenominator:228571428571428
3346e-9,tileHeight:256,tileWidth:256,topLeftCorner:{x:0,y:12e6}},9:{matrixId:"9",matrixHeight:132,matrixWidth:16,scaleDenominator:1142857142857143e-9,tileHeight:256,tileWidth:256,topLeftCorner:{x:0,y:12e6}},10:{matrixId:"10",matrixHeight:263,matrixWidth:32,scaleDenominator:571428.5714285715,tileHeight:256,tileWidth:256,topLeftCorner:{x:0,y:12e6}},11:{matrixId:"11",matrixHeight:526,matrixWidth:63,scaleDenominator:285714.28571428574,tileHeight:256,tileWidth:256,topLeftCorner:{x:0,y:12e6}},12:{matrixId:"12",matrixHeight:1051,matrixWidth:126,scaleDenominator:142857.14285714287,tileHeight:256,tileWidth:256,topLeftCorner:{x:0,y:12e6}},13:{matrixId:"13",matrixHeight:2102,matrixWidth:252,scaleDenominator:71428.57142857143,tileHeight:256,tileWidth:256,topLeftCorner:{x:0,y:12e6}},14:{matrixId:"14",matrixHeight:4204,matrixWidth:504,scaleDenominator:35714.28571428572,tileHeight:256,tileWidth:256,topLeftCorner:{x:0,y:12e6}},15:{matrixId:"15",matrixHeight:8408,matrixWidth:1008,scaleDenominator:17857.14285714286,tileHeight:256,tileWidth:256,topLeftCorner:{x:0,y:12e6}},16:{matrixId:"16",matrixHeight:16816,matrixWidth:2016,scaleDenominator:8928.57142857143,tileHeight:256,tileWidth:256,topLeftCorner:{x:0,y:12e6}}}},PM,PM_0_14,PM_0_16,PM_0_18,PM_0_19,PM_0_21,PM_0_6,PM_0_8,PM_10_12,PM_15_18,PM_3_15,PM_4_10,PM_4_18,PM_4_19,PM_6_11,PM_6_14,PM_6_15,PM_6_16,PM_6_17,PM_6_18,PM_6_19,PM_6_21,PM_6_9,PM_7_17,PM_7_18,PM_9_16};var LayerConfigUtils={getLayerConfig:function(ne){var ee={};if(ne){var te=ne.serviceParams.id.split(/:/)[1],st=Object.keys(ne.serviceParams.serverUrl)[0];if(ee.url=ne.serviceParams.serverUrl[st],te!=="WFS"&&(/\/v\//.test(ee.url)?ee.styles=" ":ee.styles=ne.styles[0].name),ee.version=ne.serviceParams.version,ee.format=ne.formats&&ne.formats.length?ne.formats[0].name:"",ee.projection=ne.defaultProjection,ee.minScale=ne.globalConstraint?ne.globalConstraint.minScaleDenominator:null,ee.maxScale=ne.globalConstraint?ne.globalConstraint.maxScaleDenominator:null,ee.extent=ne.globalConstraint?ne.globalConstraint.bbox:null,ee.legends=ne.legends,ee.title=ne.title,ee.description=ne.description,te==="WMS"&&(ee.metadata=ne.metadata),ne.wmtsOptions){ee.tileMatrixSetLimits=ne.wmtsOptions.tileMatrixSetLimits;var ot=ne.wmtsOptions.tileMatrixSetLink;if(ot){ee.TMSLink=ot;var ct=this.getTMSConfig(ot);ee.matrixIds=Object.keys(ct.tileMatrices),ee.tileMatrices=ct.tileMatrices,ee.nativeResolutions=ct.nativeResolutions||this.getTMSConfig("PM").nativeResolutions}}}return{params:ee}},getTMSConfig:function(ne){return TMS[ne]}};const stringToHTML$2=ne=>{var ee=function(){if(!window.DOMParser)return!1;var ct=new DOMParser;try{ct.parseFromString("x","text/html")}catch{return!1}return!0};if(ee()){var te=new DOMParser,st=te.parseFromString(ne,"text/html");return st.body}var ot=document.createElement("div");return ot.innerHTML=ne,ot};var CatalogDOM={generateID:function(ne){return Math.abs(Array.from(ne).reduce((ee,te)=>Math.imul(31,ee)+te.charCodeAt(0)|0,0))},_addUID:function(ne){var ee=this.uid?ne+"-"+this.uid:ne;return ee},_createMainContainerElement:function(){var ne=document.createElement("div");return ne.id=this._addUID("GPcatalog"),ne.className="GPwidget gpf-widget gpf-widget-button gpf-mobile-fullscreen",ne},_createShowCatalogPictoElement:function(){var ne=this,ee=document.createElement("button"),te=document.createElement("span");return ee.appendChild(te),ee.id=this._addUID("GPshowCatalogPicto"),ee.classList.add("GPshowOpen","GPshowAdvancedToolPicto","GPshowCatalogPicto"),ee.classList.add("gpf-btn","gpf-btn--tertiary","gpf-btn-icon","gpf-btn-icon-catalog"),ee.classList.add("fr-btn","fr-btn--tertiary"),ee.setAttribute("aria-label","Catalogue de cartes"),ee.setAttribute("tabindex","0"),ee.setAttribute("aria-pressed",!1),ee.setAttribute("type","button"),ee.addEventListener?ee.addEventListener("click",function(st){var ot=st.target.ariaPressed==="true";st.target.setAttribute("aria-pressed",!ot),ne.onShowCatalogClick(st)}):ee.attachEvent&&ee.attachEvent("onclick",function(st){var ot=st.target.ariaPressed==="true";st.target.setAttribute("aria-pressed",!ot),ne.onShowCatalogClick(st)}),ee},_createCatalogPanelElement:function(ne="md"){let ee="";switch(ne){case"sm":ee="fr-col-8";break;case"md":ee="fr-col-10";break;case"lg":ee="fr-col-12";break;case"xl":ee="fr-col-14";break}let te=document.createElement("dialog");return te.id=this._addUID("GPcatalogPanel"),te.classList.add("GPpanel","gpf-panel","fr-modal",ee),te},_createCatalogPanelBodyElement:function(){var ne=document.createElement("div");
334return ne.className="gpf-panel__body fr-modal__body",ne},_createCatalogPanelContentDivElement:function(){var ne=document.createElement("div");return ne.className="gpf-panel__content fr-modal__content",ne},_createCatalogContentDivElement:function(){var ne=stringToHTML$2('<div class="catalog-container-content" style=""></div>');return ne.firstChild},_createCatalogContentTitleElement:function(ne){var ee=stringToHTML$2(`
335        <!-- titre -->
336        <div class="catalog-container-title">
337            <div class="fr-title">
338                <h5 style="margin:unset">${ne}</h5>
339            </div>
340        </div>
341        `);return ee.firstChild},_createCatalogContentSearchGlobalElement:function(ne){var ee=`
342        <!-- barre de recherche globale -->
343        <!-- https://www.systeme-de-design.gouv.fr/composants-et-modeles/composants/barre-de-recherche -->
344        <div class="catalog-container-search-global fr-mb-1w">
345            <div class="fr-search-bar" id="catalog-header-search-global" role="search" style="justify-content: center;">
346                <label class="fr-label" for="catalog-input-search-global">
347                    Recherche
348                </label>
349                <div class="input-wrapper" style="width:100%;">
350                    <input class="fr-input" placeholder="${ne}" type="text" id="catalog-input-search-global" name="search-input" incremental>
351                    <button type="button" id="catalog-button-reset-search-global" class="clear-btn" aria-label="Effacer le texte">
352                        <svg viewBox="0 0 20 20" fill="none" stroke="currentColor" stroke-width="2">
353                            <circle cx="10" cy="10" r="9" stroke="currentColor" stroke-opacity="0.8"/>
354                            <line x1="6" y1="6" x2="14" y2="14"/>
355                            <line x1="14" y1="6" x2="6" y2="14"/>
356                        </svg>
357                    </button>
358                </div>
359                <button id="catalog-button-search-global" class="fr-btn" title="${ne}">
360                    Rechercher
361                </button>
362            </div>
363        </div>
364        `,te=stringToHTML$2(ee);const st=te.attachShadow({mode:"open"});st.innerHTML=ee.trim();var ot=st.getElementById("catalog-button-search-global");ot&&ot.addEventListener("click",dt=>{dt.target.value=ut.value,this.onSearchGlobalCatalogButtonClick(dt)});var ct=st.getElementById("catalog-button-reset-search-global");ct&&ct.addEventListener("click",dt=>{ut.value="",this.onSearchGlobalCatalogButtonResetClick(dt)});var ut=st.getElementById("catalog-input-search-global");return ut&&ut.addEventListener("input",dt=>{dt.target.value.length<3&&dt.target.value.length>0||this.onSearchGlobalCatalogInputChange(dt)}),st},_createCatalogWaitingElement:function(){var ne=document.createElement("div");ne.id=this._addUID("GPcatalogCalcWaitingContainer"),ne.className="GPwaitingContainerHidden gpf-waiting--hidden";var ee=document.createElement("p");return ee.className="GPwaitingContainerInfo gpf-waiting_info",ee.innerHTML="Recherche en cours...",ne.appendChild(ee),ne},_createCatalogContentCategoriesTabs:function(ne,ee){var te="",st=(Vt,Ht,zt,jt)=>{var Wt="GPtabButton fr-tabs__tab",Jt="false",Qt=-1;return jt&&(Wt="GPtabButton GPtabButtonActive fr-tabs__tab",Jt="true",Qt=0),`
365            <li class="GPtabList" role="presentation">
366                <button 
367                    id="tabbutton-${Vt}_${Ht}" 
368                    class="${Wt}" 
369                    data-category="${Ht}"
370                    tabindex="${Qt}" 
371                    role="tabbutton" 
372                    aria-selected="${Jt}" 
373                    aria-controls="tabpanel-${Vt}-panel_${Ht}">
374                    ${zt}
375                </button>
376            </li>
377            `},ot=(Vt,Ht)=>{var zt="gpf-hidden";return Vt&&(zt="fr-tabs__panel--selected"),`
378            <!-- barre de recherche spécifique à la catégorie -->
379            <div id="catalog-container-search-specific" class="fr-tabs__list ${zt}" style="padding:10px;justify-content:center;">
380                <div class="fr-search-bar" id="catalog-header-search-specific" role="search" style="width:100%;">
381                    <label class="fr-label" for="catalog-input-search-specific">
382                        Recherche dans la catégorie
383                    </label>
384                    <div class="input-wrapper" style="width:100%">
385                        <input class="fr-input" placeholder="${Ht}" type="text" id="catalog-input-search-specific" name="search-input-specific" incremental>
386                        <button type="button" id="catalog-button-reset-search-specific" class="clear-btn" aria-label="Effacer le texte">
387                            <svg viewBox="0 0 20 20" fill="none" stroke="currentColor" stroke-width="2">
388                                <circle cx="10" cy="10" r="9" stroke="currentColor" stroke-opacity="0.8"/>
389                                <line x1="6" y1="6" x2="14" y2="14"/>
390                                <line x1="14" y1="6" x2="6" y2="14"/>
391                            </svg>
392                        </button>
393                    </div>
394                    <button id="catalog-button-search-specific" class="fr-btn" title="${Ht}">
395                        Rechercher
396                    </button>
397                </div>
398            </div>
399            `},ct=(Vt,Ht)=>{var zt=Ht.default?"checked":"";return`
400            <div class="fr-fieldset__element fr-fieldset__element--inline">
401                <div class="fr-radio-group fr-radio-group--sm">
402                    <input 
403                        type="radio" 
404                        ${zt} 
405                        id="radio-inline_${Ht.id}" 
406                        data-category="${Ht.id}"
407                        name="radio-inline-${Vt}" 
408                        role="radio-inline-section"
409                        aria-controls="tabcontent-${Ht.id}">
410                    <label class="fr-label" for="radio-inline_${Ht.id}">
411                        ${Ht.title}
412                    </label>
413                </div>
414            </div>
415            `},ut=(Vt,Ht)=>{var zt="",jt="";for(let Jt=0;Jt<Ht.length;Jt++){const Qt=Ht[Jt];jt+=ct(Vt,Qt);var Wt="";Qt.default||(Wt="GPelementHidden gpf-hidden"),zt+=`<div class="tabcontent ${Wt}" data-category="${Vt}" role="tabpanel-section" id="tabcontent-${Qt.id}"></div>`}return`
416            <!-- boutons radio des sous categories -->
417            <fieldset class="fr-fieldset" id="radio-inline_${Vt}" aria-labelledby="radio-inline-legend radio-inline-messages" style="margin:unset;">
418                ${jt}
419                <div class="fr-messages-group" id="radio-inline-messages" aria-l
419ive="assertive"></div>
420            </fieldset>
421            <!-- panneaux des sous categories -->
422            ${zt}
423            `},dt="",ht=(Vt,Ht,zt,jt,Wt,Jt)=>{var Qt="GPtabContent fr-tabs__panel",oi=-1;zt&&(Qt="GPtabContent GPtabContentSelected fr-tabs__panel fr-tabs__panel--selected",oi=0);var ai=`<div class="tabcontent" data-category="${Ht}" style="content-visibility: auto;contain-intrinsic-size:50px;"></div>`;return Wt&&(ai=ut(Ht,Wt)),`
424            <!-- panneaux -->
425            <div id="tabpanel-${Vt}-panel_${Ht}" 
426                class="${Qt} fr-p-0" 
427                role="tabpanel" 
428                aria-labelledby="tabbutton-${Vt}_${Ht}" 
429                tabindex="${oi}" 
430            >
431                ${ai}
432            </div>
433            `},ft=!1,pt=!1;for(let Vt=0;Vt<ne.length;Vt++){const Ht=ne[Vt];Ht.search&&(pt=!0),Ht.default&&Ht.search&&(ft=!0)}for(let Vt=0;Vt<ne.length;Vt++){const Ht=ne[Vt];te+=st(Vt,Ht.id,Ht.title,Ht.default),dt+=ht(Vt,Ht.id,Ht.default,Ht.search,Ht.items)}var yt=ot(ft,"Rechercher une donnée dans la catégorie"),vt="gpf-catalog-tabs-fixe";pt&&(vt="gpf-catalog-tabs-fixe-with-bar");var _t=`
434        <!-- onglets -->
435        <div id="GPcatalogContainerTabs" class="catalog-container-tabs">
436            <div class="GPtabs fr-tabs ${ee?"":vt}">
437                <ul class="GPtabsList fr-tabs__list" role="tablist" aria-label="presentation">
438                    ${te}
439                </ul>
440                ${yt}
441                ${dt}
442            </div>
443        </div>
444        `,bt=stringToHTML$2(_t.trim());const xt=bt.attachShadow({mode:"open"});xt.innerHTML=_t.trim();var Mt=xt.querySelectorAll('[role="tabpanel-section"]'),Ot=xt.querySelectorAll('[role="radio-inline-section"]');Ot&&Ot.forEach(Vt=>{Vt.addEventListener("change",Ht=>{for(let Wt=0;Wt<Mt.length;Wt++){const Jt=Mt[Wt];var zt=Jt.getAttribute("data-category");zt===Ht.target.name.split("-")[2]&&(Jt.classList.add("gpf-hidden"),Jt.classList.add("GPelementHidden"))}var jt=document.getElementById(Ht.target.getAttribute("aria-controls"));jt.classList.remove("gpf-hidden"),jt.classList.remove("GPelementHidden"),this.onToggleCatalogRadioChange(Ht,Ht.target.getAttribute("data-category"))})});var kt=xt.querySelectorAll('[role="tabpanel"]'),Nt=xt.querySelectorAll('[role="tabbutton"]');Nt&&Nt.forEach(Vt=>{Vt.addEventListener("click",Ht=>{for(let jt=0;jt<Nt.length;jt++){const Wt=Nt[jt];Wt.setAttribute("tabindex",-1),Wt.ariaSelected=!1,Wt.classList.remove("GPtabButtonActive")}Ht.target.setAttribute("tabindex",0),Ht.target.ariaSelected=!0,Ht.target.classList.add("GPtabButtonActive");for(let jt=0;jt<kt.length;jt++){const Wt=kt[jt];Wt.setAttribute("tabindex",-1),Wt.classList.remove("fr-tabs__panel--selected"),Wt.classList.remove("GPtabContentSelected"),Wt.classList.add("gpf-hidden"),Wt.classList.add("GPelementHidden")}var zt=document.getElementById(Ht.target.getAttribute("aria-controls"));zt.setAttribute("tabindex",0),zt.classList.add("fr-tabs__panel--selected"),zt.classList.add("GPtabContentSelected"),zt.classList.remove("gpf-hidden"),zt.classList.remove("GPelementHidden"),this.onSelectCatalogTabClick(Ht,Ht.target.getAttribute("data-category"))})});var Gt=xt.getElementById("catalog-button-search-specific");Gt&&Gt.addEventListener("click",Vt=>{Vt.target.value=Ut.value,this.onSearchSpecificCatalogButtonClick(Vt)});var Bt=xt.getElementById("catalog-button-reset-search-specific");Bt&&Bt.addEventListener("click",Vt=>{Ut.value="",this.onSearchSpecificCatalogButtonResetClick(Vt)});var Ut=xt.getElementById("catalog-input-search-specific");return Ut&&Ut.addEventListener("input",Vt=>{Vt.target.value.length<3&&Vt.target.value.length>0||this.onSearchSpecificCatalogInputChange(Vt)}),xt},_createCatalogContentCategoryTabContent:async function(ne,ee,te){var ot=[],ct="",ut=(Ut,Vt,Ht,zt,jt,Wt,Jt,Qt)=>{var oi=Nn=>Nn&&(Nn.startsWith("data:")||Nn.startsWith("http"))?`
445                            <img src="${Nn}" alt="" />
446                        `:"",ai=Wt.producers?Wt.producers[0].name:"",xn=Nn=>{if(!Nn)return"";var Xt="";for(let Zt=0;Zt<Nn.length;Zt++){const Kt=Nn[Zt];Xt+=`
447                        <a href="${Kt.url}" target="_blank" class="fr-tag fr-tag--sm fr-icon-arrow-right-line fr-tag--icon-left">
448                            ${Kt.name}
449                        </a>
450                    `}return Xt},An=Nn=>{if(!Nn)return"";var Xt="";for(let Zt=0;Zt<Nn.length;Zt++){const Kt=Nn[Zt];if(Kt.includes("catalogue/dataset")||Kt.includes("rechercher-une-donnee/dataset"))return`
451                            <a href="${Kt}" target="_blank" class="fr-link fr-link--sm fr-icon-arrow-right-line fr-link--icon-right">
452                                Voir la fiche détaillée
453                            </a>
454                        `}return Xt};return`
455            <div
456                data-layeritem
457                class="fr-fieldset__element fr-toggle--border-bottom fr-py-2w fr-px-1w fr-mb-0" 
458                id="fieldset-${Qt}_${Vt}-${zt}"
459            >
460                <div class="fr-checkbox-group gpf-flex" style="justify-content:flex-start">
461                    <input
462                        class="fr-input"
463                        name="checkboxes-${Qt}"
464                        id="checkboxes-${Qt}-${Ut}_${Vt}-${zt}"
465                        type="checkbox"
466                        data-layer="${Vt}:${zt}"/>
467                    <label 
468                        for="checkboxes-${Qt}-${Ut}_${Vt}-${zt}"
469                        style="position: relative; bottom: 12px;">
470                    </label>
471                    <div class="catalog-thumbnail-container" style="">
472                        <div class="catalog-thumbnail-default">
473                            ${oi(Jt)}
474                        </div>
475                    </div>
476                    <div style="width: 100%;">
477                        <label 
478                            class="GPlabelActive fr-label"
479                            role="label-collapse-more-${Qt}"
480                            aria-controls="checkboxes-${Qt}-${Ut}_${Vt}-${zt}"
481                            title="${Ht}"
482                            style="display: -webkit-box; width: 100%; text-overflow: ellipsis; overflow: hidden; white-space: normal; cursor: pointer; line-height: 1.5em; -webkit-line-clamp: 2; -webkit-box-orient: vertical; word-break: break-word;">
483                            ${Ht}
484                        </label>
485                        <span class="GPlabelActive fr-label fr-hint-text fr-text--xs fr-m-0">${ai}</span>
486                    </div>
487                    <button 
488                        id="catalog-collapse-more-${Ut}-${Qt}"
489                        role="button-collapse-more-${Qt}"
490                        class="catalog-collapse-show gpf-btn gpf-btn-icon gpf-btn-icon-catalog-collapse fr-btn fr-btn--tertiary gpf-btn--tertiary" 
491                        type="button" 
492                        title="En savoir plus sur la couche" 
493                        tabindex="0" 
494                        aria-pressed="false"
495                        aria-controls="catalog-info-more-${Ut}-${Qt}"
496                        style="position: relative;">
497                    </button>
498                </div>
499                <div class="gpf-hidden catalog-layer-info fr-mt-2w" id="catalog-info-more-${Ut}-${Qt}">
500                    <p class="fr-hint-text" style="word-break: break-all;">
501                        ${Vt} - ${zt}
502                    </p>
503                    <p class="fr-hint-text">
504                        ${xn(Wt.producers)}
505                    </p>
506                    <div class="catalog-layer-description fr-hint-text">
507                        ${jt}
508                    </div>
509                    ${An(Wt.metadatas)}
510                </div>
511            </div>
512            `},dt="",ht=(Ut,Vt,Ht,zt,jt,Wt)=>{var Jt=zt&&zt.startsWith("fr-icon")?zt:"",Qt=`section-accordion-${Vt}-${Ut}`;return`
513            <!-- section -->
514            <section 
515                id="section-${Vt}-${Ut}" 
516                data-category="${Vt}"
517                data-id="${Ut}"
518                class="fr-accordion" style="contain: content;">
519                <h3 class="fr-accordion__title">
520                    <button class="GPcatalogButtonSection fr-accordion__btn gpf-accordion__btn" role="section-collapse-${Vt}" aria-expanded="false" aria-controls="${Qt}">
521                        <span class="GPshowCatalogAdvancedTools gpf-hidden"></span>
522                        <span class="catalog-section-icon ${Jt}" role="section-icon-collapse-${Vt}" style="width: calc(100% - 2rem);">${Ht}</span>
523                        <span class="catalog-section-count" role="section-count-collapse-${Vt}
523" id="section-count-${Vt}-${Ut}" style="position: absolute; right: 1.25rem;">${jt}</span>
524                    </button>
525                </h3>
526                <div class="fr-collapse GPelementHidden" id="${Qt}">
527                    ${Wt}
528                </div>
529            </section>
530            `},ft=ne.section;ft&&(ee=ee.sort((Ut,Vt)=>Ut[ne.filter.field][0].localeCompare(Vt[ne.filter.field][0])));var pt={},mt=[];for(let Ut=0;Ut<ee.length;Ut+=10){for(let Vt=Ut;Vt<Math.min(Ut+10,ee.length);Vt++){const Ht=ee[Vt],zt={producers:Ht.producer_urls,thematics:Ht.thematic_urls,metadatas:Ht.metadata_urls};var yt=ut(Vt,Ht.name,Ht.label,Ht.service,Ht.description,zt,Ht.thumbnail,ne.id);if(ft){var vt=Ht[ne.filter.field];Array.isArray(vt)&&(vt=vt[0]),vt?(pt.hasOwnProperty(vt)||(pt[vt]=""),pt[vt]+=yt):(pt.hasOwnProperty("Autres")||(pt.Autres=""),pt.Autres+=yt)}else ct+=yt,mt.push(yt)}await new Promise(Vt=>setTimeout(Vt,0))}if(ct!==""){var Gt=stringToHTML$2(ct);const Vt=Gt.attachShadow({mode:"open"});Vt.innerHTML=ct.trim(),ot.push({domid:`checkboxes-${ne.id}`,rows:mt,fragment:Vt,debug:{type:"layers",desc:"liste des couches pour une categorie",title:ne.title}}),te&&(ct="")}if(ft){ne.sections=[];const Ut=Object.entries(pt).sort((Vt,Ht)=>{const zt=Vt[0],jt=Ht[0];return zt==="Autres"?1:jt==="Autres"?-1:zt.localeCompare(jt,"fr",{sensitivity:"base"})});for(const[Vt,Ht]of Ut)if(Object.prototype.hasOwnProperty.call(pt,Vt)){var _t=[],bt=[...Ht.matchAll(/data-layeritem/g)];for(let zt=0;zt<bt.length;zt++){const jt=bt[zt];_t.push(jt.input)}var xt=bt.length,Mt=this.generateID(Vt),Ot="";if(ne.icon&&ne.iconJson){const zt=ne.iconJson.find(jt=>jt.name===Vt);zt?Ot=zt.icon:Ot="fr-icon-folder-2-fill"}var kt=ht(Mt,ne.id,Vt,Ot,xt,te?"":Ht);if(dt+=kt,ne.sections.push(Vt),kt!==""){var Gt=stringToHTML$2(Ht);const jt=Gt.attachShadow({mode:"open"});jt.innerHTML=Ht.trim(),ot.push({domid:`section-accordion-${ne.id}-${Mt}`,rows:_t,fragment:jt,debug:{type:"section",desc:"liste des couches pour une section",title:Vt,id:Mt,category:ne.id}})}}}var Nt=`
531            <!-- liste de données -->
532            <div class="fr-accordions-group" 
533                id="checkboxes-${ne.id}" 
534                data-category="${ne.id}"
535                data-sections="${!!dt}"
536                aria-labelledby="checkboxes-legend checkboxes-messages"
537                style="contain: content;">
538                ${dt||ct}
539            </div>
540        `,Gt=stringToHTML$2(Nt);const Bt=Gt.attachShadow({mode:"open"});return Bt.innerHTML=Nt.trim(),{dom:Bt,blocks:ot}},_updateListenersLayersDOM:function(ne,ee){var te=`checkboxes-${ee}`,st=ne.querySelectorAll('[name="'+te+'"]');st&&st.forEach(_t=>{_t.addEventListener("click",bt=>{this.onSelectCatalogEntryClick(bt)})});var ot=`section-collapse-${ee}`,ct=ne.querySelectorAll('[role="'+ot+'"]');ct&&ct.forEach(_t=>{_t.addEventListener("click",bt=>{bt.target.ariaExpanded=bt.target.ariaExpanded!=="true";var xt=bt.target.getAttribute("aria-controls"),Mt=document.getElementById(xt);if(Mt){var Ot=xt.replace("section-accordion","section"),kt=document.getElementById(Ot),Nt=kt?kt.dataset.category:null;if(bt.target.ariaExpanded==="true"){Mt.classList.add("fr-collapse--expanded"),Mt.classList.remove("GPelementHidden"),kt&&(kt.classList.add("catalog-section-full"),this.updateVisibilitySectionsByCategory(Ot,Nt,!1));const Gt=_t.closest('div[id^="tabpanel-"]'),Bt=_t.getBoundingClientRect(),Ut=Gt.getBoundingClientRect(),Vt=Bt.top-Ut.top;Gt.scrollTo({top:Gt.scrollTop+Vt,behavior:"smooth"})}else Mt.classList.remove("fr-collapse--expanded"),Mt.classList.add("GPelementHidden"),kt&&(kt.classList.remove("catalog-section-full"),this.updateVisibilitySectionsByCategory(Ot,Nt,!0));this.onToggleCatalogSectionClick(bt,Nt,xt)}},!1)});var ut=`button-collapse-more-${ee}`,dt=ne.querySelectorAll('[role="'+ut+'"]');dt&&dt.forEach(_t=>{_t.addEventListener("click",bt=>{bt.target.ariaPressed=bt.target.ariaPressed!=="true";var xt=document.getElementById(bt.target.getAttribute("aria-controls"));if(xt){if(bt.target.ariaPressed==="true"){xt.classList.add("gpf-visible"),xt.classList.remove("gpf-hidden"),_t.closest('div[id^="tabpanel-"]');const Mt=_t.closest('div[id^="tabpanel-"]'),Ot=_t.getBoundingClientRect(),kt=Mt.getBoundingClientRect(),Nt=Ot.top-kt.top;Mt.scrollTo({top:Mt.scrollTop+Nt,behavior:"smooth"})}else xt.classList.remove("gpf-visible"),xt.classList.add("gpf-hidden");this.onToggleCatalogMoreLearnClick(bt)}},!1)});var ht=`label-collapse-more-${ee}`,ft=ne.querySelectorAll('[role="'+ht+'"]');ft&&ft.forEach(_t=>{_t.addEventListener("click",bt=>{var xt=document.getElementById(bt.target.getAttribute("aria-controls"));xt&&xt.click()},!1)});var pt=`section-icon-collapse-${ee}`,mt=ne.querySelectorAll('[role="'+pt+'"]');mt&&mt.forEach(_t=>{_t.addEventListener("click",bt=>{bt.target.parentElement.click()})});var yt=`section-count-collapse-${ee}`,vt=ne.querySelectorAll('[role="'+yt+'"]');vt&&vt.forEach(_t=>{_t.addEventListener("click",bt=>{bt.target.parentElement.click()})})},updateVisibilitySectionsByCategory(ne,ee,te){var st=`[id^="section-${ee}-"]`,ot=document.querySelectorAll(st);for(let ht=0;ht<ot.length;
540ht++){const ft=ot[ht];if(ft.id!==ne)if(te){var ct=`section-count-${ee}-${ft.getAttribute("data-id")}`,ut=document.getElementById(ct),dt=parseInt(ut.textContent,10);if(dt===0)continue;ft.classList.remove("gpf-hidden"),ft.classList.remove("GPelementHidden")}else ft.classList.add("gpf-hidden"),ft.classList.add("GPelementHidden")}}};const thematic=[{id:"biota",name:"Biologie, faune et flore",icon:"fr-icon-plant-fill"},{id:"boundaries",name:"Limites politiques et administratives",icon:"fr-icon-france-line"},{id:"climatologyMeteorologyAtmosphere",name:"Climatologie, météorologie, atmosphère",icon:"fr-icon-heavy-showers-fill"},{id:"economy",name:"Économie",icon:"fr-icon-bar-chart-box-fill"},{id:"elevation",name:"Altimétrie",icon:"fr-icon-line-chart-fill"},{id:"environment",name:"Environnement",icon:"fr-icon-leaf-fill"},{id:"farming",name:"Agriculture",icon:"fr-icon-seedling-fill"},{id:"geoscientificInformation",name:"Sciences de la terre, géosciences",icon:"fr-icon-earth-fill"},{id:"health",name:"Santé",icon:"fr-icon-first-aid-kit-fill"},{id:"imageryBaseMapsEarthCover",name:"Carte de référence de la couverture terrestre",icon:"fr-icon-global-fill"},{id:"intelligenceMilitary",name:"Infrastructures militaires",icon:"fr-icon-medal-fill"},{id:"inlandWaters",name:"Eaux intérieures, Hydrographie",icon:"fr-icon-drop-fill"},{id:"location",name:"Localisation",icon:"fr-icon-road-map-fill"},{id:"oceans",name:"Océans",icon:"fr-icon-submersion-fill"},{id:"planningCadastre",name:"Cadastre, aménagement",icon:"fr-icon-layout-grid-fill"},{id:"society",name:"Société",icon:"fr-icon-team-fill"},{id:"structure",name:"Constructions et ouvrages",icon:"fr-icon-community-fill"},{id:"transportation",name:"Infrastructures de transport",icon:"fr-icon-bus-fill"},{id:"utilitiesCommunication",name:"Télécommunication, approvisionnement et énergie",icon:"fr-icon-lightbulb-fill"}],service=[{id:"wmts",name:"WMTS",icon:"fr-icon-earth-line"},{id:"wfs",name:"WFS",icon:"fr-icon-earth-fill"},{id:"wms",name:"WMS",icon:"fr-icon-earth-line"},{id:"tms",name:"TMS",icon:"fr-icon-earth-fill"}],producer=[{id:"ign",name:"IGN",icon:"fr-icon-government-fill"}],Topics={thematic,service,producer};function L$2(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var T$1=L$2();function G(ne){T$1=ne}var E$1={exec:()=>null};function d$3(ne,ee=""){let te=typeof ne=="string"?ne:ne.source,st={replace:(ot,ct)=>{let ut=typeof ct=="string"?ct:ct.source;return ut=ut.replace(m$1.caret,"$1"),te=te.replace(ot,ut),st},getRegex:()=>new RegExp(te,ee)};return st}var be=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),m$1={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:ne=>new RegExp(`^( {0,3}${ne})((?:[	 ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:ne=>new RegExp(`^ {0,${Math.min(3,ne-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ 	][^\\n]*)?(?:\\n|$))`),hrRegex:ne=>new RegExp(`^ {0,${Math.min(3,ne-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:ne=>new RegExp(`^ {0,${Math.min(3,ne-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:ne=>new RegExp(`^ {0,${Math.min(3,ne-1)}}#`),htmlBeginRegex:ne=>new RegExp(`^ {0,${Math.min(3,ne-1)}}<(?:[a-z].*>|!--)`,"i")},Re=/^(?:[ \t]*(?:\n|$))+/,Te=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Oe=/^ {0,3}(`{3,}
vendor: 5,034 bytes, lines 540-541
540(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,I$2=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,we=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,F=/(?:[*+-]|\d{1,9}[.)])/,ie=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,oe=d$3(ie).replace(/bull/g,F).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),ye=d$3(ie).replace(/bull/g,F).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),j=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,Pe=/^[^\n]+/,Q$1=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,Se=d$3(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Q$1).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),$e$1=d$3(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,F).getRegex(),v$1="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",U=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,_e=d$3("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ 	]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ 	]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ 	]*)+\\n|$))","i").replace("comment",U).replace("tag",v$1).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),ae=d$3(j).replace("hr",I$2).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",v$1).getRegex(),Le=d$3(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",ae).getRegex(),K={blockquote:Le,code:Te,def:Se,fences:Oe,heading:we,hr:I$2,html:_e,lheading:oe,list:$e$1,newline:Re,paragraph:ae,table:E$1,text:Pe},re=d$3("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",I$2).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3}	)[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",v$1).getRegex(),Me={...K,lheading:ye,table:re,paragraph:d$3(j).replace("hr",I$2).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",re).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",v$1).getRegex()},ze={...K,html:d$3(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",U).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:E$1,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:d$3(j).replace("hr",I$2).replace("heading",` *#{1,6} *[^
541]`).replace("lheading",oe).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},Ae=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Ee=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,le=/^( {2,}|\\)\n(?!\s*$)/,Ie=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,D$1=/[\p{P}\p{S}]/u,W=/[\s\p{P}\p{S}]/u,ue=/[^\s\p{P}\p{S}]/u,Ce=d$3(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,W).getRegex(),pe=/(?!~)[\p{P}\p{S}
vendor: 7,039 bytes, lines 541-550
541]/u,Be=/(?!~)[\s\p{P}\p{S}]/u,qe$1=/(?:[^\s\p{P}\p{S}]|~)/u,ve=d$3(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",be?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),ce=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,De=d$3(ce,"u").replace(/punct/g,D$1).getRegex(),He$1=d$3(ce,"u").replace(/punct/g,pe).getRegex(),he="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",Ze$1=d$3(he,"gu").replace(/notPunctSpace/g,ue).replace(/punctSpace/g,W).replace(/punct/g,D$1).getRegex(),Ge$1=d$3(he,"gu").replace(/notPunctSpace/g,qe$1).replace(/punctSpace/g,Be).replace(/punct/g,pe).getRegex(),Ne=d$3("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,ue).replace(/punctSpace/g,W).replace(/punct/g,D$1).getRegex(),Fe=d$3(/\\(punct)/,"gu").replace(/punct/g,D$1).getRegex(),je=d$3(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),Qe$1=d$3(U).replace("(?:-->|$)","-->").getRegex(),Ue=d$3("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",Qe$1).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),q=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,Ke$1=d$3(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",q).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),de=d$3(/^!?\[(label)\]\[(ref)\]/).replace("label",q).replace("ref",Q$1).getRegex(),ke=d$3(/^!?\[(ref)\](?:\[\])?/).replace("ref",Q$1).getRegex(),We=d$3("reflink|nolink(?!\\()","g").replace("reflink",de).replace("nolink",ke).getRegex(),se=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,X={_backpedal:E$1,anyPunctuation:Fe,autolink:je,blockSkip:ve,br:le,code:Ee,del:E$1,emStrongLDelim:De,emStrongRDelimAst:Ze$1,emStrongRDelimUnd:Ne,escape:Ae,link:Ke$1,nolink:ke,punctuation:Ce,reflink:de,reflinkSearch:We,tag:Ue,text:Ie,url:E$1},Xe$1={...X,link:d$3(/^!?\[(label)\]\((.*?)\)/).replace("label",q).getRegex(),reflink:d$3(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",q).getRegex()},N$2={...X,emStrongRDelimAst:Ge$1,emStrongLDelim:He$1,url:d$3(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",se).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:d$3(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",se).getRegex()},Je$1={...N$2,br:d$3(le).replace("{2,}","*").getRegex(),text:d$3(N$2.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},C$3={normal:K,gfm:Me,pedantic:ze},M$3={normal:X,gfm:N$2,breaks:Je$1,pedantic:Xe$1},Ve$1={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},ge=ne=>Ve$1[ne];function w$2(ne,ee){if(ee){if(m$1.escapeTest.test(ne))return ne.replace(m$1.escapeReplace,ge)}else if(m$1.escapeTestNoEncode.test(ne))return ne.replace(m$1.escapeReplaceNoEncode,ge);return ne}function J(ne){try{ne=encodeURI(ne).replace(m$1.percentDecode,"%")}catch{return null}return ne}function V$1(ne,ee){var ct;let te=ne.replace(m$1.findPipe,(ut,dt,ht)=>{let ft=!1,pt=dt;for(;--pt>=0&&ht[pt]==="\\";)ft=!ft;return ft?"|":" |"}),st=te.split(m$1.splitPipe),ot=0;if(st[0].trim()||st.shift(),st.length>0&&!((ct=st.at(-1))!=null&&ct.trim())&&st.pop(),ee)if(st.length>ee)st.splice(ee);else for(;st.length<ee;)st.push("");for(;ot<st.length;ot++)st[ot]=st[ot].trim().replace(m$1.slashPipe,"|");return st}function z$2(ne,ee,te){let st=ne.length;if(st===0)return"";let ot=0;for(;ot<st&&ne.charAt(st-ot-1)===ee;)ot++;return ne.slice(0,st-ot)}function fe(ne,ee){if(ne.indexOf(ee[1])===-1)return-1;let te=0;for(let st=0;st<ne.length;st++)if(ne[st]==="\\")st++;else if(ne[st]===ee[0])te++;else if(ne[st]===ee[1]&&(te--,te<0))return st;return te>0?-2:-1}function me(ne,ee,te,st,ot){let ct=ee.href,ut=ee.title||null,dt=ne[1].replace(ot.other.outputLinkReplace,"$1");st.state.inLink=!0;let ht={type:ne[0].charAt(0)==="!"?"image":"link",raw:te,href:ct,title:ut,text:dt,tokens:st.inlineTokens(dt)};return st.state.inLink=!1,ht}function Ye$1(ne,ee,te){let st=ne.match(te.other.indentCodeCompensation);if(st===null)return ee;let ot=st[1];return ee.split(`
542`).map(ct=>{let ut=ct.match(te.other.beginningSpace);if(ut===null)return ct;let[dt]=ut;return dt.length>=ot.length?ct.slice(ot.length):ct}).join(`
543`)}var y$3=class{constructor(ee){Kn(this,"options");Kn(this,"rules");Kn(this,"lexer");this.options=ee||T$1}space(ee){let te=this.rules.block.newline.exec(ee);if(te&&te[0].length>0)return{type:"space",raw:te[0]}}code(ee){let te=this.rules.block.code.exec(ee);if(te){let st=te[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:te[0],codeBlockStyle:"indented",text:this.options.pedantic?st:z$2(st,`
544`)}}}fences(ee){let te=this.rules.block.fences.exec(ee);if(te){let st=te[0],ot=Ye$1(st,te[3]||"",this.rules);return{type:"code",raw:st,lang:te[2]?te[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):te[2],text:ot}}}heading(ee){let te=this.rules.block.heading.exec(ee);if(te){let st=te[2].trim();if(this.rules.other.endingHash.test(st)){let ot=z$2(st,"#");(this.options.pedantic||!ot||this.rules.other.endingSpaceChar.test(ot))&&(st=ot.trim())}return{type:"heading",raw:te[0],depth:te[1].length,text:st,tokens:this.lexer.inline(st)}}}hr(ee){let te=this.rules.block.hr.exec(ee);if(te)return{type:"hr",raw:z$2(te[0],`
545`)}}blockquote(ee){let te=this.rules.block.blockquote.exec(ee);if(te){let st=z$2(te[0],`
546`).split(`
547`),ot="",ct="",ut=[];for(;st.length>0;){let dt=!1,ht=[],ft;for(ft=0;ft<st.length;ft++)if(this.rules.other.blockquoteStart.test(st[ft]))ht.push(st[ft]),dt=!0;else if(!dt)ht.push(st[ft]);else break;st=st.slice(ft);let pt=ht.join(`
548`),mt=pt.replace(this.rules.other.blockquoteSetextReplace,`
549    $1`).replace(this.rules.other.blockquoteSetextReplace2,"");ot=ot?`${ot}
550${pt}
550`:pt,ct=ct?`${ct}
551${mt}`:mt;let yt=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(mt,ut,!0),this.lexer.state.top=yt,st.length===0)break;let vt=ut.at(-1);if((vt==null?void 0:vt.type)==="code")break;if((vt==null?void 0:vt.type)==="blockquote"){let _t=vt,bt=_t.raw+`
552`+st.join(`
553`),xt=this.blockquote(bt);ut[ut.length-1]=xt,ot=ot.substring(0,ot.length-_t.raw.length)+xt.raw,ct=ct.substring(0,ct.length-_t.text.length)+xt.text;break}else if((vt==null?void 0:vt.type)==="list"){let _t=vt,bt=_t.raw+`
554`+st.join(`
555`),xt=this.list(bt);ut[ut.length-1]=xt,ot=ot.substring(0,ot.length-vt.raw.length)+xt.raw,ct=ct.substring(0,ct.length-_t.raw.length)+xt.raw,st=bt.substring(ut.at(-1).raw.length).split(`
556`);continue}}return{type:"blockquote",raw:ot,tokens:ut,text:ct}}}list(ee){let te=this.rules.block.list.exec(ee);if(te){let st=te[1].trim(),ot=st.length>1,ct={type:"list",raw:"",ordered:ot,start:ot?+st.slice(0,-1):"",loose:!1,items:[]};st=ot?`\\d{1,9}\\${st.slice(-1)}`:`\\${st}`,this.options.pedantic&&(st=ot?st:"[*+-]");let ut=this.rules.other.listItemRegex(st),dt=!1;for(;ee;){let ft=!1,pt="",mt="";if(!(te=ut.exec(ee))||this.rules.block.hr.test(ee))break;pt=te[0],ee=ee.substring(pt.length);let yt=te[2].split(`
557`,1)[0].replace(this.rules.other.listReplaceTabs,Ot=>" ".repeat(3*Ot.length)),vt=ee.split(`
558`,1)[0],_t=!yt.trim(),bt=0;if(this.options.pedantic?(bt=2,mt=yt.trimStart()):_t?bt=te[1].length+1:(bt=te[2].search(this.rules.other.nonSpaceChar),bt=bt>4?1:bt,mt=yt.slice(bt),bt+=te[1].length),_t&&this.rules.other.blankLine.test(vt)&&(pt+=vt+`
559`,ee=ee.substring(vt.length+1),ft=!0),!ft){let Ot=this.rules.other.nextBulletRegex(bt),kt=this.rules.other.hrRegex(bt),Nt=this.rules.other.fencesBeginRegex(bt),Gt=this.rules.other.headingBeginRegex(bt),Bt=this.rules.other.htmlBeginRegex(bt);for(;ee;){let Ut=ee.split(`
560`,1)[0],Vt;if(vt=Ut,this.options.pedantic?(vt=vt.replace(this.rules.other.listReplaceNesting,"  "),Vt=vt):Vt=vt.replace(this.rules.other.tabCharGlobal,"    "),Nt.test(vt)||Gt.test(vt)||Bt.test(vt)||Ot.test(vt)||kt.test(vt))break;if(Vt.search(this.rules.other.nonSpaceChar)>=bt||!vt.trim())mt+=`
561`+Vt.slice(bt);else{if(_t||yt.replace(this.rules.other.tabCharGlobal,"    ").search(this.rules.other.nonSpaceChar)>=4||Nt.test(yt)||Gt.test(yt)||kt.test(yt))break;mt+=`
562`+vt}!_t&&!vt.trim()&&(_t=!0),pt+=Ut+`
563`,ee=ee.substring(Ut.length+1),yt=Vt.slice(bt)}}ct.loose||(dt?ct.loose=!0:this.rules.other.doubleBlankLine.test(pt)&&(dt=!0));let xt=null,Mt;this.options.gfm&&(xt=this.rules.other.listIsTask.exec(mt),xt&&(Mt=xt[0]!=="[ ] ",mt=mt.replace(this.rules.other.listReplaceTask,""))),ct.items.push({type:"list_item",raw:pt,task:!!xt,checked:Mt,loose:!1,text:mt,tokens:[]}),ct.raw+=pt}let ht=ct.items.at(-1);if(ht)ht.raw=ht.raw.trimEnd(),ht.text=ht.text.trimEnd();else return;ct.raw=ct.raw.trimEnd();for(let ft=0;ft<ct.items.length;ft++)if(this.lexer.state.top=!1,ct.items[ft].tokens=this.lexer.blockTokens(ct.items[ft].text,[]),!ct.loose){let pt=ct.items[ft].tokens.filter(yt=>yt.type==="space"),mt=pt.length>0&&pt.some(yt=>this.rules.other.anyLine.test(yt.raw));ct.loose=mt}if(ct.loose)for(let ft=0;ft<ct.items.length;ft++)ct.items[ft].loose=!0;return ct}}html(ee){let te=this.rules.block.html.exec(ee);if(te)return{type:"html",block:!0,raw:te[0],pre:te[1]==="pre"||te[1]==="script"||te[1]==="style",text:te[0]}}def(ee){let te=this.rules.block.def.exec(ee);if(te){let st=te[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),ot=te[2]?te[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",ct=te[3]?te[3].substring(1,te[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):te[3];return{type:"def",tag:st,raw:te[0],href:ot,title:ct}}}table(ee){var dt;let te=this.rules.block.table.exec(ee);if(!te||!this.rules.other.tableDelimiter.test(te[2]))return;let st=V$1(te[1]),ot=te[2].replace(this.rules.other.tableAlignChars,"").split("|"),ct=(dt=te[3])!=null&&dt.trim()?te[3].replace(this.rules.other.tableRowBlankLine,"").split(`
564`):[],ut={type:"table",raw:te[0],header:[],align:[],rows:[]};if(st.length===ot.length){for(let ht of ot)this.rules.other.tableAlignRight.test(ht)?ut.align.push("right"):this.rules.other.tableAlignCenter.test(ht)?ut.align.push("center"):this.rules.other.tableAlignLeft.test(ht)?ut.align.push("left"):ut.align.push(null);for(let ht=0;ht<st.length;ht++)ut.header.push({text:st[ht],tokens:this.lexer.inline(st[ht]),header:!0,align:ut.align[ht]});for(let ht of ct)ut.rows.push(V$1(ht,ut.header.length).map((ft,pt)=>({text:ft,tokens:this.lexer.inline(ft),header:!1,align:ut.align[pt]})));return ut}}lheading(ee){let te=this.rules.block.lheading.exec(ee);if(te)return{type:"heading",raw:te[0],depth:te[2].charAt(0)==="="?1:2,text:te[1],tokens:this.lexer.inline(te[1])}}paragraph(ee){let te=this.rules.block.paragraph.exec(ee);if(te){let st=te[1].charAt(te[1].length-1)===`
565`?te[1].slice(0,-1):te[1];return{type:"paragraph",raw:te[0],text:st,tokens:this.lexer.inline(st)}}}text(ee){let te=this.rules.block.text.exec(ee);if(te)return{type:"text",raw:te[0],text:te[0],tokens:this.lexer.inline(te[0])}}escape(ee){let te=this.rules.inline.escape.exec(ee);if(te)return{type:"escape",raw:te[0],text:te[1]}}tag(ee){let te=this.rules.inline.tag.exec(ee);if(te)return!this.lexer.state.inLink&&this.rules.other.startATag.test(te[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(te[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(te[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(te[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:te[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:te[0]}}link(ee){let te=this.rules.inline.link.exec(ee);if(te){let st=te[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(st)){if(!this.rules.other.endAngleBracket.test(st))return;let ut=z$2(st.slice(0,-1),"\\");if((st.length-ut.length)%2===0)return}else{let ut=fe(te[2],"()");if(ut===-2)return;if(ut>-1){let dt=(te[0].indexOf("!")===0?5:4)+te[1].length+ut;te[2]=te[2].substring(0,ut),te[0]=te[0].substring(0,dt).trim(),te[3]=""}}let ot=te[2],ct="";if(this.options.pedantic){let ut=this.rules.other.pedanticHrefTitle.exec(ot);ut&&(ot=ut[1],ct=ut[3])}else ct=te[3]?te[3].slice(1,-1):"";return ot=ot.trim(),this.rules.other.startAngleBracket.test(ot)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(st)?ot=ot.slice(1):ot=ot.slice(1,-1)),me(te,{href:ot&&ot.replace(this.rules.inline.anyPunctuation,"$1"),title:ct&&ct.replace(this.rules.inline.anyPunctuation,"$1")},te[0],this.lexer,this.rules)}}reflink(ee,te){let st;if((st=this.rules.inline.reflink.exec(ee))||(st=this.rules.inline.nolink.exec(ee))){let ot=(st[2]||st[1]).replace(this.rules.other.multipleSpaceGlobal," "),ct=te[ot.toLowerCase()];if(!ct){let ut=st[0].charAt(0);return{type:"text",raw:ut,text:ut}}return me(st,ct,st[0],this.lexer,this.rules)}}emStrong(ee,te,st=""){let ot=this.rules.inline.emStrongLDelim.exec(ee);if(!(!ot||ot[3]&&st.match(this.rules.other.unicodeAlphaNumeric))&&(!(ot[1]||ot[2])||!st||this.rules.inline.punctuation.exec(st))){let ct=[...ot[0]].length-1,ut,dt,ht=ct,ft=0,pt=ot[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(pt.lastIndex=0,te=te.slice(-1*ee.length+ct);(ot=pt.exec(te))!=null;){if(ut=ot[1]||ot[2]||ot[3]||ot[4]||ot[5]||ot[6],!ut)continue;if(dt=[...ut].length,ot[3]||ot[4]){ht+=dt;continue}else if((ot[5]||ot[6])&&ct%3&&!((ct+dt)%3)){ft+=dt;continue}if(ht-=dt,ht>0)continue;dt=Math.min(dt,dt+ht+ft);let mt=[...ot[0]][0].length,yt=ee.slice(0,ct+ot.index+mt+dt);if(Math.min(ct,dt)%2){let _t=yt.slice(1,-1);return{type:"em",raw:yt,text:_t,tokens:this.lexer.inlineTokens(_t)}}let vt=yt.slice(2,-2);return{type:"strong",raw:yt,text:vt,tokens:this.lexer.inlineTokens(vt)}}}}codespan(ee){let te=this.rules.inline.code.exec(ee);if(te){let st=te[2].replace(this.rules.other.newLineCharGlobal," "),ot=this.rules.other.nonSpaceChar.test(st),ct=this.rules.other.startingSpaceChar.test(st)&&this.rules.other.endingSpaceChar.test(st);return ot&&ct&&(st=st.substring(1,st.length-1)),{type:"codespan",raw:te[0],text:st}}}br(ee){let te=this.rules.inline.br.exec(ee);if(te)return{type:"br",raw:te[0]}}del(ee){let te=this.rules.inline.del.exec(ee);if(te)return{type:"del",raw:te[0],text:te[2],tokens:this.lexer.inlineTokens(te[2])}}autolink(ee){let te=this.rules.inline.autolink.exec(ee);if(te){let st,ot;return te[2]==="@"?(st=te[1],ot="mailto:"+st):(st=te[1],ot=st),{type:"link",raw:te[0],text:st,href:ot,tokens:[{type:"text",raw:st,text:st}]}}}url(ee){var st;let te;if(te=this.rules.inline.url.exec(ee)){let ot,ct;if(te[2]==="@")ot=te[0],ct="mailto:"+ot;else{let ut;do ut=te[0],te[0]=((st=this.rules.inline._backpedal.exec(te[0]))==null?void 0:st[0])??"";while(ut!==te[0]);ot=te[0],te[1]==="www."?ct="http://"+te[0]:ct=te[0]}return{type:"link",raw:te[0],text:ot,href:ct,tokens:[{type:"text",raw:ot,text:ot}]}}}inlineText(ee){let te=this.rules.inline.text.exec(ee);if(te){let st=this.lexer.state.inRawBlock;return{type:"text",raw:te[0],text:te[0],escaped:st}}}},x$2=class Gc{constructor(ee){Kn(this,"tokens");Kn(this,"options");Kn(this,"state");Kn(this,"tokenizer");Kn(this,"inlineQueue");this.tokens=[],this.tokens.links=Object.create(null),this.options=ee||T$1,this.options.tokenizer=this.options.tokenizer||new y$3,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let te={other:m$1,block:C$3.normal,inline:M$3.normal};this.options.pedantic?(te.block=C$3.pedantic,te.inline=M$3.pedantic):this.options.gfm&&(te.block=C$3.gfm,this.options.breaks?te.inline=M$3.breaks:te.inline=M$3.gfm),this.tokenizer.rules=te}static get rules(){return{block:C$3,inline:M$3}}static lex(ee,te){return new Gc(te).lex(ee)}static lexInline(ee,te){return new Gc(te).inlineTokens(ee)}lex(ee){ee=ee.replace(m$1.carriageReturn,`
566`),this.blockTokens(ee,this.tokens);for(let te=0;
vendor: 6,296 bytes, lines 566-584
566te<this.inlineQueue.length;te++){let st=this.inlineQueue[te];this.inlineTokens(st.src,st.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(ee,te=[],st=!1){var ot,ct,ut;for(this.options.pedantic&&(ee=ee.replace(m$1.tabCharGlobal,"    ").replace(m$1.spaceLine,""));ee;){let dt;if((ct=(ot=this.options.extensions)==null?void 0:ot.block)!=null&&ct.some(ft=>(dt=ft.call({lexer:this},ee,te))?(ee=ee.substring(dt.raw.length),te.push(dt),!0):!1))continue;if(dt=this.tokenizer.space(ee)){ee=ee.substring(dt.raw.length);let ft=te.at(-1);dt.raw.length===1&&ft!==void 0?ft.raw+=`
567`:te.push(dt);continue}if(dt=this.tokenizer.code(ee)){ee=ee.substring(dt.raw.length);let ft=te.at(-1);(ft==null?void 0:ft.type)==="paragraph"||(ft==null?void 0:ft.type)==="text"?(ft.raw+=(ft.raw.endsWith(`
568`)?"":`
569`)+dt.raw,ft.text+=`
570`+dt.text,this.inlineQueue.at(-1).src=ft.text):te.push(dt);continue}if(dt=this.tokenizer.fences(ee)){ee=ee.substring(dt.raw.length),te.push(dt);continue}if(dt=this.tokenizer.heading(ee)){ee=ee.substring(dt.raw.length),te.push(dt);continue}if(dt=this.tokenizer.hr(ee)){ee=ee.substring(dt.raw.length),te.push(dt);continue}if(dt=this.tokenizer.blockquote(ee)){ee=ee.substring(dt.raw.length),te.push(dt);continue}if(dt=this.tokenizer.list(ee)){ee=ee.substring(dt.raw.length),te.push(dt);continue}if(dt=this.tokenizer.html(ee)){ee=ee.substring(dt.raw.length),te.push(dt);continue}if(dt=this.tokenizer.def(ee)){ee=ee.substring(dt.raw.length);let ft=te.at(-1);(ft==null?void 0:ft.type)==="paragraph"||(ft==null?void 0:ft.type)==="text"?(ft.raw+=(ft.raw.endsWith(`
571`)?"":`
572`)+dt.raw,ft.text+=`
573`+dt.raw,this.inlineQueue.at(-1).src=ft.text):this.tokens.links[dt.tag]||(this.tokens.links[dt.tag]={href:dt.href,title:dt.title},te.push(dt));continue}if(dt=this.tokenizer.table(ee)){ee=ee.substring(dt.raw.length),te.push(dt);continue}if(dt=this.tokenizer.lheading(ee)){ee=ee.substring(dt.raw.length),te.push(dt);continue}let ht=ee;if((ut=this.options.extensions)!=null&&ut.startBlock){let ft=1/0,pt=ee.slice(1),mt;this.options.extensions.startBlock.forEach(yt=>{mt=yt.call({lexer:this},pt),typeof mt=="number"&&mt>=0&&(ft=Math.min(ft,mt))}),ft<1/0&&ft>=0&&(ht=ee.substring(0,ft+1))}if(this.state.top&&(dt=this.tokenizer.paragraph(ht))){let ft=te.at(-1);st&&(ft==null?void 0:ft.type)==="paragraph"?(ft.raw+=(ft.raw.endsWith(`
574`)?"":`
575`)+dt.raw,ft.text+=`
576`+dt.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=ft.text):te.push(dt),st=ht.length!==ee.length,ee=ee.substring(dt.raw.length);continue}if(dt=this.tokenizer.text(ee)){ee=ee.substring(dt.raw.length);let ft=te.at(-1);(ft==null?void 0:ft.type)==="text"?(ft.raw+=(ft.raw.endsWith(`
577`)?"":`
578`)+dt.raw,ft.text+=`
579`+dt.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=ft.text):te.push(dt);continue}if(ee){let ft="Infinite loop on byte: "+ee.charCodeAt(0);if(this.options.silent){console.error(ft);break}else throw new Error(ft)}}return this.state.top=!0,te}inline(ee,te=[]){return this.inlineQueue.push({src:ee,tokens:te}),te}inlineTokens(ee,te=[]){var ht,ft,pt,mt,yt;let st=ee,ot=null;if(this.tokens.links){let vt=Object.keys(this.tokens.links);if(vt.length>0)for(;(ot=this.tokenizer.rules.inline.reflinkSearch.exec(st))!=null;)vt.includes(ot[0].slice(ot[0].lastIndexOf("[")+1,-1))&&(st=st.slice(0,ot.index)+"["+"a".repeat(ot[0].length-2)+"]"+st.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(ot=this.tokenizer.rules.inline.anyPunctuation.exec(st))!=null;)st=st.slice(0,ot.index)+"++"+st.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let ct;for(;(ot=this.tokenizer.rules.inline.blockSkip.exec(st))!=null;)ct=ot[2]?ot[2].length:0,st=st.slice(0,ot.index+ct)+"["+"a".repeat(ot[0].length-ct-2)+"]"+st.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);st=((ft=(ht=this.options.hooks)==null?void 0:ht.emStrongMask)==null?void 0:ft.call({lexer:this},st))??st;let ut=!1,dt="";for(;ee;){ut||(dt=""),ut=!1;let vt;if((mt=(pt=this.options.extensions)==null?void 0:pt.inline)!=null&&mt.some(bt=>(vt=bt.call({lexer:this},ee,te))?(ee=ee.substring(vt.raw.length),te.push(vt),!0):!1))continue;if(vt=this.tokenizer.escape(ee)){ee=ee.substring(vt.raw.length),te.push(vt);continue}if(vt=this.tokenizer.tag(ee)){ee=ee.substring(vt.raw.length),te.push(vt);continue}if(vt=this.tokenizer.link(ee)){ee=ee.substring(vt.raw.length),te.push(vt);continue}if(vt=this.tokenizer.reflink(ee,this.tokens.links)){ee=ee.substring(vt.raw.length);let bt=te.at(-1);vt.type==="text"&&(bt==null?void 0:bt.type)==="text"?(bt.raw+=vt.raw,bt.text+=vt.text):te.push(vt);continue}if(vt=this.tokenizer.emStrong(ee,st,dt)){ee=ee.substring(vt.raw.length),te.push(vt);continue}if(vt=this.tokenizer.codespan(ee)){ee=ee.substring(vt.raw.length),te.push(vt);continue}if(vt=this.tokenizer.br(ee)){ee=ee.substring(vt.raw.length),te.push(vt);continue}if(vt=this.tokenizer.del(ee)){ee=ee.substring(vt.raw.length),te.push(vt);continue}if(vt=this.tokenizer.autolink(ee)){ee=ee.substring(vt.raw.length),te.push(vt);continue}if(!this.state.inLink&&(vt=this.tokenizer.url(ee))){ee=ee.substring(vt.raw.length),te.push(vt);continue}let _t=ee;if((yt=this.options.extensions)!=null&&yt.startInline){let bt=1/0,xt=ee.slice(1),Mt;this.options.extensions.startInline.forEach(Ot=>{Mt=Ot.call({lexer:this},xt),typeof Mt=="number"&&Mt>=0&&(bt=Math.min(bt,Mt))}),bt<1/0&&bt>=0&&(_t=ee.substring(0,bt+1))}if(vt=this.tokenizer.inlineText(_t)){ee=ee.substring(vt.raw.length),vt.raw.slice(-1)!=="_"&&(dt=vt.raw.slice(-1)),ut=!0;let bt=te.at(-1);(bt==null?void 0:bt.type)==="text"?(bt.raw+=vt.raw,bt.text+=vt.text):te.push(vt);continue}if(ee){let bt="Infinite loop on byte: "+ee.charCodeAt(0);if(this.options.silent){console.error(bt);break}else throw new Error(bt)}}return te}},P$2=class{constructor(ee){Kn(this,"options");Kn(this,"parser");this.options=ee||T$1}space(ee){return""}code({text:ee,lang:te,escaped:st}){var ut;let ot=(ut=(te||"").match(m$1.notSpaceStart))==null?void 0:ut[0],ct=ee.replace(m$1.endingNewline,"")+`
580`;return ot?'<pre><code class="language-'+w$2(ot)+'">'+(st?ct:w$2(ct,!0))+`</code></pre>
581`:"<pre><code>"+(st?ct:w$2(ct,!0))+`</code></pre>
582`}blockquote({tokens:ee}){return`<blockquote>
583${this.parser.parse(ee)}</blockquote>
584`}html({text:ee}){return ee}def(ee){return""}heading({tokens:ee,depth:te}){return`<h${te}>${this.parser.parseInline(ee)}
584</h${te}>
585`}hr(ee){return`<hr>
586`}list(ee){let te=ee.ordered,st=ee.start,ot="";for(let dt=0;dt<ee.items.length;dt++){let ht=ee.items[dt];ot+=this.listitem(ht)}let ct=te?"ol":"ul",ut=te&&st!==1?' start="'+st+'"':"";return"<"+ct+ut+`>
587`+ot+"</"+ct+`>
588`}listitem(ee){var st;let te="";if(ee.task){let ot=this.checkbox({checked:!!ee.checked});ee.loose?((st=ee.tokens[0])==null?void 0:st.type)==="paragraph"?(ee.tokens[0].text=ot+" "+ee.tokens[0].text,ee.tokens[0].tokens&&ee.tokens[0].tokens.length>0&&ee.tokens[0].tokens[0].type==="text"&&(ee.tokens[0].tokens[0].text=ot+" "+w$2(ee.tokens[0].tokens[0].text),ee.tokens[0].tokens[0].escaped=!0)):ee.tokens.unshift({type:"text",raw:ot+" ",text:ot+" ",escaped:!0}):te+=ot+" "}return te+=this.parser.parse(ee.tokens,!!ee.loose),`<li>${te}</li>
589`}checkbox({checked:ee}){return"<input "+(ee?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:ee}){return`<p>${this.parser.parseInline(ee)}</p>
590`}table(ee){let te="",st="";for(let ct=0;ct<ee.header.length;ct++)st+=this.tablecell(ee.header[ct]);te+=this.tablerow({text:st});let ot="";for(let ct=0;ct<ee.rows.length;ct++){let ut=ee.rows[ct];st="";for(let dt=0;dt<ut.length;dt++)st+=this.tablecell(ut[dt]);ot+=this.tablerow({text:st})}return ot&&(ot=`<tbody>${ot}</tbody>`),`<table>
591<thead>
592`+te+`</thead>
593`+ot+`</table>
594`}tablerow({text:ee}){return`<tr>
595${ee}</tr>
596`}tablecell(ee){let te=this.parser.parseInline(ee.tokens),st=ee.header?"th":"td";return(ee.align?`<${st} align="${ee.align}">`:`<${st}>`)+te+`</${st}>
597`}strong({tokens:ee}){return`<strong>${this.parser.parseInline(ee)}</strong>`}em({tokens:ee}){return`<em>${this.parser.parseInline(ee)}</em>`}codespan({text:ee}){return`<code>${w$2(ee,!0)}</code>`}br(ee){return"<br>"}del({tokens:ee}){return`<del>${this.parser.parseInline(ee)}</del>`}link({href:ee,title:te,tokens:st}){let ot=this.parser.parseInline(st),ct=J(ee);if(ct===null)return ot;ee=ct;let ut='<a href="'+ee+'"';return te&&(ut+=' title="'+w$2(te)+'"'),ut+=">"+ot+"</a>",ut}image({href:ee,title:te,text:st,tokens:ot}){ot&&(st=this.parser.parseInline(ot,this.parser.textRenderer));let ct=J(ee);if(ct===null)return w$2(st);ee=ct;let ut=`<img src="${ee}" alt="${st}"`;return te&&(ut+=` title="${w$2(te)}"`),ut+=">",ut}text(ee){return"tokens"in ee&&ee.tokens?this.parser.parseInline(ee.tokens):"escaped"in ee&&ee.escaped?ee.text:w$2(ee.text)}},$$2=class{strong({text:ee}){return ee}em({text:ee}){return ee}codespan({text:ee}){return ee}del({text:ee}){return ee}html({text:ee}){return ee}text({text:ee}){return ee}link({text:ee}){return""+ee}image({text:ee}){return""+ee}br(){return""}},b$3=class Fc{constructor(ee){Kn(this,"options");Kn(this,"renderer");Kn(this,"textRenderer");this.options=ee||T$1,this.options.renderer=this.options.renderer||new P$2,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new $$2}static parse(ee,te){return new Fc(te).parse(ee)}static parseInline(ee,te){return new Fc(te).parseInline(ee)}parse(ee,te=!0){var ot,ct;let st="";for(let ut=0;ut<ee.length;ut++){let dt=ee[ut];if((ct=(ot=this.options.extensions)==null?void 0:ot.renderers)!=null&&ct[dt.type]){let ft=dt,pt=this.options.extensions.renderers[ft.type].call({parser:this},ft);if(pt!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(ft.type)){st+=pt||"";continue}}let ht=dt;switch(ht.type){case"space":{st+=this.renderer.space(ht);continue}case"hr":{st+=this.renderer.hr(ht);continue}case"heading":{st+=this.renderer.heading(ht);continue}case"code":{st+=this.renderer.code(ht);continue}case"table":{st+=this.renderer.table(ht);continue}case"blockquote":{st+=this.renderer.blockquote(ht);continue}case"list":{st+=this.renderer.list(ht);continue}case"html":{st+=this.renderer.html(ht);continue}case"def":{st+=this.renderer.def(ht);continue}case"paragraph":{st+=this.renderer.paragraph(ht);continue}case"text":{let ft=ht,pt=this.renderer.text(ft);for(;ut+1<ee.length&&ee[ut+1].type==="text";)ft=ee[++ut],pt+=`
598`+this.renderer.text(ft);te?st+=this.renderer.paragraph({type:"paragraph",raw:pt,text:pt,tokens:[{type:"text",raw:pt,text:pt,escaped:!0}]}):st+=pt;continue}default:{let ft='Token with "'+ht.type+'" type was not found.';if(this.options.silent)return console.error(ft),"";throw new Error(ft)}}}return st}parseInline(ee,te=this.renderer){var ot,ct;let st="";for(let ut=0;ut<ee.length;ut++){let dt=ee[ut];if((ct=(ot=this.options.extensions)==null?void 0:ot.renderers)!=null&&ct[dt.type]){let ft=this.options.extensions.renderers[dt.type].call({parser:this},dt);if(ft!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(dt.type)){st+=ft||"";continue}}let ht=dt;switch(ht.type){case"escape":{st+=te.text(ht);break}case"html":{st+=te.html(ht);break}case"link":{st+=te.link(ht);break}case"image":{st+=te.image(ht);break}case"strong":{st+=te.strong(ht);break}case"em":{st+=te.em(ht);break}case"codespan":{st+=te.codespan(ht);break}
598case"br":{st+=te.br(ht);break}case"del":{st+=te.del(ht);break}case"text":{st+=te.text(ht);break}default:{let ft='Token with "'+ht.type+'" type was not found.';if(this.options.silent)return console.error(ft),"";throw new Error(ft)}}}return st}},Bl,S$3=(Bl=class{constructor(ee){Kn(this,"options");Kn(this,"block");this.options=ee||T$1}preprocess(ee){return ee}postprocess(ee){return ee}processAllTokens(ee){return ee}emStrongMask(ee){return ee}provideLexer(){return this.block?x$2.lex:x$2.lexInline}provideParser(){return this.block?b$3.parse:b$3.parseInline}},Kn(Bl,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens","emStrongMask"])),Kn(Bl,"passThroughHooksRespectAsync",new Set(["preprocess","postprocess","processAllTokens"])),Bl),B$1=class{constructor(...ee){Kn(this,"defaults",L$2());Kn(this,"options",this.setOptions);Kn(this,"parse",this.parseMarkdown(!0));Kn(this,"parseInline",this.parseMarkdown(!1));Kn(this,"Parser",b$3);Kn(this,"Renderer",P$2);Kn(this,"TextRenderer",$$2);Kn(this,"Lexer",x$2);Kn(this,"Tokenizer",y$3);Kn(this,"Hooks",S$3);this.use(...ee)}walkTokens(ee,te){var ot,ct;let st=[];for(let ut of ee)switch(st=st.concat(te.call(this,ut)),ut.type){case"table":{let dt=ut;for(let ht of dt.header)st=st.concat(this.walkTokens(ht.tokens,te));for(let ht of dt.rows)for(let ft of ht)st=st.concat(this.walkTokens(ft.tokens,te));break}case"list":{let dt=ut;st=st.concat(this.walkTokens(dt.items,te));break}default:{let dt=ut;(ct=(ot=this.defaults.extensions)==null?void 0:ot.childTokens)!=null&&ct[dt.type]?this.defaults.extensions.childTokens[dt.type].forEach(ht=>{let ft=dt[ht].flat(1/0);st=st.concat(this.walkTokens(ft,te))}):dt.tokens&&(st=st.concat(this.walkTokens(dt.tokens,te)))}}return st}use(...ee){let te=this.defaults.extensions||{renderers:{},childTokens:{}};return ee.forEach(st=>{let ot={...st};if(ot.async=this.defaults.async||ot.async||!1,st.extensions&&(st.extensions.forEach(ct=>{if(!ct.name)throw new Error("extension name required");if("renderer"in ct){let ut=te.renderers[ct.name];ut?te.renderers[ct.name]=function(...dt){let ht=ct.renderer.apply(this,dt);return ht===!1&&(ht=ut.apply(this,dt)),ht}:te.renderers[ct.name]=ct.renderer}if("tokenizer"in ct){if(!ct.level||ct.level!=="block"&&ct.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let ut=te[ct.level];ut?ut.unshift(ct.tokenizer):te[ct.level]=[ct.tokenizer],ct.start&&(ct.level==="block"?te.startBlock?te.startBlock.push(ct.start):te.startBlock=[ct.start]:ct.level==="inline"&&(te.startInline?te.startInline.push(ct.start):te.startInline=[ct.start]))}"childTokens"in ct&&ct.childTokens&&(te.childTokens[ct.name]=ct.childTokens)}),ot.extensions=te),st.renderer){let ct=this.defaults.renderer||new P$2(this.defaults);for(let ut in st.renderer){if(!(ut in ct))throw new Error(`renderer '${ut}' does not exist`);if(["options","parser"].includes(ut))continue;let dt=ut,ht=st.renderer[dt],ft=ct[dt];ct[dt]=(...pt)=>{let mt=ht.apply(ct,pt);return mt===!1&&(mt=ft.apply(ct,pt)),mt||""}}ot.renderer=ct}if(st.tokenizer){let ct=this.defaults.tokenizer||new y$3(this.defaults);for(let ut in st.tokenizer){if(!(ut in ct))throw new Error(`tokenizer '${ut}' does not exist`);if(["options","rules","lexer"].includes(ut))continue;let dt=ut,ht=st.tokenizer[dt],ft=ct[dt];ct[dt]=(...pt)=>{let mt=ht.apply(ct,pt);return mt===!1&&(mt=ft.apply(ct,pt)),mt}}ot.tokenizer=ct}if(st.hooks){let ct=this.defaults.hooks||new S$3;for(let ut in st.hooks){if(!(ut in ct))throw new Error(`hook '${ut}' does not exist`);if(["options","block"].includes(ut))continue;let dt=ut,ht=st.hooks[dt],ft=ct[dt];S$3.passThroughHooks.has(ut)?ct[dt]=pt=>{if(this.defaults.async&&S$3.passThroughHooksRespectAsync.has(ut))return(async()=>{let yt=await ht.call(ct,pt);return ft.call(ct,yt)})();let mt=ht.call(ct,pt);return ft.call(ct,mt)}:ct[dt]=(...pt)=>{if(this.defaults.async)return(async()=>{let yt=await ht.apply(ct,pt);return yt===!1&&(yt=await ft.apply(ct,pt)),yt})();let mt=ht.apply(ct,pt);return mt===!1&&(mt=ft.apply(ct,pt)),mt}}ot.hooks=ct}if(st.walkTokens){let ct=this.defaults.walkTokens,ut=st.walkTokens;ot.walkTokens=function(dt){let ht=[];return ht.push(ut.call(this,dt)),ct&&(ht=ht.concat(ct.call(this,dt))),ht}}this.defaults={...this.defaults,...ot}}),this}setOptions(ee){return this.defaults={...this.defaults,...ee},this}lexer(ee,te){return x$2.lex(ee,te??this.defaults)}parser(ee,te){return b$3.parse(ee,te??this.defaults)}parseMarkdown(ee){return(te,st)=>{let ot={...st},ct={...this.defaults,...ot},ut=this.onError(!!ct.silent,!!ct.async);if(this.defaults.async===!0&&ot.async===!1)return ut(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof te>"u"||te===null)return ut(new Error("marked(): input parameter is undefined or null"));if(typeof te!="string")return ut(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(te)+", string expected"));if(ct.hooks&&(ct.hooks.options=ct,ct.hooks.block=ee),ct.async)return(async()=>{let dt=ct.hooks?await ct.hooks.preprocess(te):te,ht=await(ct.hooks?await ct.hooks.provideLexer():ee?x$2.lex:x$2.lexInline)(dt,ct),ft=ct.hooks?await ct.hooks.processAllTokens(ht):ht;ct.walkTokens&&await Promise.all(this.walkTokens(ft,ct.walkTokens));let pt=await(ct.hooks?await ct.hooks.provideParser():ee?b$3.parse:b$3.parseInline)(ft,ct);return ct.hooks?await ct.hooks.postprocess(pt):pt})().catch(ut);try{ct.hooks&&(te=ct.hooks.preprocess(te));let dt=(ct.hooks?ct.hooks.provideLexer():ee?x$2.lex:x$2.lexInline)(te,ct);ct.hooks&&(dt=ct.hooks.processAllTokens(dt)),ct.walkTokens&&this.walkTokens(dt,ct.walkTokens);let ht=(ct.hooks?ct.hooks.provideParser():ee?b$3.parse:b$3.parseInline)(dt,ct);return ct.hooks&&(ht=ct.hooks.postprocess(ht)),ht}catch(dt){return ut(dt)}}}onError(ee,te){return st=>
598{if(st.message+=`
599Please report this to https://github.com/markedjs/marked.`,ee){let ot="<p>An error occurred:</p><pre>"+w$2(st.message+"",!0)+"</pre>";return te?Promise.resolve(ot):ot}if(te)return Promise.reject(st);throw st}}},_$2=new B$1;function k$2(ne,ee){return _$2.parse(ne,ee)}k$2.options=k$2.setOptions=function(ne){return _$2.setOptions(ne),k$2.defaults=_$2.defaults,G(k$2.defaults),k$2};k$2.getDefaults=L$2;k$2.defaults=T$1;k$2.use=function(...ne){return _$2.use(...ne),k$2.defaults=_$2.defaults,G(k$2.defaults),k$2};k$2.walkTokens=function(ne,ee){return _$2.walkTokens(ne,ee)};k$2.parseInline=_$2.parseInline;k$2.Parser=b$3;k$2.parser=b$3.parse;k$2.Renderer=P$2;k$2.TextRenderer=$$2;k$2.Lexer=x$2;k$2.lexer=x$2.lex;k$2.Tokenizer=y$3;k$2.Hooks=S$3;k$2.parse=k$2;k$2.options;k$2.setOptions;k$2.use;k$2.walkTokens;k$2.parseInline;b$3.parse;x$2.lex;var clusterize={exports:{}},hasRequiredClusterize;function requireClusterize(){return hasRequiredClusterize||(hasRequiredClusterize=1,(function(ne){(function(ee,te){ne.exports=te()})("Clusterize",function(){var ee=(function(){for(var ht=3,ft=document.createElement("b"),pt=ft.all||[];ft.innerHTML="<!--[if gt IE "+ ++ht+"]><i><![endif]-->",pt[0];);return ht>4?ht:document.documentMode})(),te=navigator.platform.toLowerCase().indexOf("mac")+1,st=function(ht){if(!(this instanceof st))return new st(ht);var ft=this,pt={rows_in_block:50,blocks_in_cluster:4,tag:null,show_no_data_row:!0,no_data_class:"clusterize-no-data",no_data_text:"No data",keep_parity:!0,callbacks:{}};ft.options={};for(var mt=["rows_in_block","blocks_in_cluster","show_no_data_row","no_data_class","no_data_text","keep_parity","tag","callbacks"],yt=0,vt;vt=mt[yt];yt++)ft.options[vt]=typeof ht[vt]<"u"&&ht[vt]!=null?ht[vt]:pt[vt];for(var _t=["scroll","content"],yt=0,bt;bt=_t[yt];yt++)if(ft[bt+"_elem"]=ht[bt+"Id"]?document.getElementById(ht[bt+"Id"]):ht[bt+"Elem"],!ft[bt+"_elem"])throw new Error("Error! Could not find "+bt+" element");ft.content_elem.hasAttribute("tabindex")||ft.content_elem.setAttribute("tabindex",0);var xt=ut(ht.rows)?ht.rows:ft.fetchMarkup(),Mt={},Ot=ft.scroll_elem.scrollTop;ft.insertToDOM(xt,Mt),ft.scroll_elem.scrollTop=Ot;var kt=!1,Nt=0,Gt=!1,Bt=function(){te&&(Gt||(ft.content_elem.style.pointerEvents="none"),Gt=!0,clearTimeout(Nt),Nt=setTimeout(function(){ft.content_elem.style.pointerEvents="auto",Gt=!1},50)),kt!=(kt=ft.getClusterNum(xt))&&ft.insertToDOM(xt,Mt),ft.options.callbacks.scrollingProgress&&ft.options.callbacks.scrollingProgress(ft.getScrollProgress())},Ut=0,Vt=function(){clearTimeout(Ut),Ut=setTimeout(ft.refresh,100)};ot("scroll",ft.scroll_elem,Bt),ot("resize",window,Vt),ft.destroy=function(zt){ct("scroll",ft.scroll_elem,Bt),ct("resize",window,Vt),ft.html((zt?ft.generateEmptyRow():xt).join(""))},ft.refresh=function(zt){(ft.getRowsHeight(xt)||zt)&&ft.update(xt)},ft.update=function(zt){xt=ut(zt)?zt:[];var jt=ft.scroll_elem.scrollTop;xt.length*ft.options.item_height<jt&&(ft.scroll_elem.scrollTop=0,kt=0),ft.insertToDOM(xt,Mt),ft.scroll_elem.scrollTop=jt},ft.clear=function(){ft.update([])},ft.getRowsAmount=function(){return xt.length},ft.getScrollProgress=function(){return this.options.scroll_top/(xt.length*this.options.item_height)*100||0};var Ht=function(zt,jt){var Wt=ut(jt)?jt:[];Wt.length&&(xt=zt=="append"?xt.concat(Wt):Wt.concat(xt),ft.insertToDOM(xt,Mt))};ft.append=function(zt){Ht("append",zt)},ft.prepend=function(zt){Ht("prepend",zt)}};st.prototype={constructor:st,fetchMarkup:function(){for(var ht=[],ft=this.getChildNodes(this.content_elem);ft.length;)ht.push(ft.shift().outerHTML);return ht},exploreEnvironment:function(ht,ft){var pt=this.options;pt.content_tag=this.content_elem.tagName.toLowerCase(),ht.length&&(ee&&ee<=9&&!pt.tag&&(pt.tag=ht[0].match(/<([^>\s/]*)/)[1].toLowerCase()),this.content_elem.children.length<=1&&(ft.data=this.html(ht[0]+ht[0]+ht[0])),pt.tag||(pt.tag=this.content_elem.children[0].tagName.toLowerCase()),this.getRowsHeight(ht))},getRowsHeight:function(ht){var ft=this.options,pt=ft.item_height;if(ft.cluster_height=0,!!ht.length){var mt=this.content_elem.children;if(mt.length){var yt=mt[Math.floor(mt.length/2)];if(ft.item_height=yt.offsetHeight,ft.tag=="tr"&&dt("borderCollapse",this.content_elem)!="collapse"&&(ft.item_height+=parseInt(dt("borderSpacing",this.content_elem),10)||0),ft.tag!="tr"){var vt=parseInt(dt("marginTop",yt),10)||0,_t=parseInt(dt("marginBottom",yt),10)||0;ft.item_height+=Math.max(vt,_t)}return ft.block_height=ft.item_height*ft.rows_in_block,ft.rows_in_cluster
599=ft.blocks_in_cluster*ft.rows_in_block,ft.cluster_height=ft.blocks_in_cluster*ft.block_height,pt!=ft.item_height}}},getClusterNum:function(ht){var ft=this.options;ft.scroll_top=this.scroll_elem.scrollTop;var pt=ft.cluster_height-ft.block_height,mt=Math.floor(ft.scroll_top/pt),yt=Math.floor(ht.length*ft.item_height/pt);return Math.min(mt,yt)},generateEmptyRow:function(){var ht=this.options;if(!ht.tag||!ht.show_no_data_row)return[];var ft=document.createElement(ht.tag),pt=document.createTextNode(ht.no_data_text),mt;return ft.className=ht.no_data_class,ht.tag=="tr"&&(mt=document.createElement("td"),mt.colSpan=100,mt.appendChild(pt)),ft.appendChild(mt||pt),[ft.outerHTML]},generate:function(ht){var ft=this.options,pt=ht.length;if(pt<ft.rows_in_block)return{top_offset:0,bottom_offset:0,rows_above:0,rows:pt?ht:this.generateEmptyRow()};var mt=Math.max((ft.rows_in_cluster-ft.rows_in_block)*this.getClusterNum(ht),0),yt=mt+ft.rows_in_cluster,vt=Math.max(mt*ft.item_height,0),_t=Math.max((pt-yt)*ft.item_height,0),bt=[],xt=mt;vt<1&&xt++;for(var Mt=mt;Mt<yt;Mt++)ht[Mt]&&bt.push(ht[Mt]);return{top_offset:vt,bottom_offset:_t,rows_above:xt,rows:bt}},renderExtraTag:function(ht,ft){var pt=document.createElement(this.options.tag),mt="clusterize-";return pt.className=[mt+"extra-row",mt+ht].join(" "),ft&&(pt.style.height=ft+"px"),pt.outerHTML},insertToDOM:function(ht,ft){this.options.cluster_height||this.exploreEnvironment(ht,ft);var pt=this.generate(ht),mt=pt.rows.join(""),yt=this.checkChanges("data",mt,ft),vt=this.checkChanges("top",pt.top_offset,ft),_t=this.checkChanges("bottom",pt.bottom_offset,ft),bt=this.options.callbacks,xt=[];yt||vt?(pt.top_offset&&(this.options.keep_parity&&xt.push(this.renderExtraTag("keep-parity")),xt.push(this.renderExtraTag("top-space",pt.top_offset))),xt.push(mt),pt.bottom_offset&&xt.push(this.renderExtraTag("bottom-space",pt.bottom_offset)),bt.clusterWillChange&&bt.clusterWillChange(),this.html(xt.join("")),this.options.content_tag=="ol"&&this.content_elem.setAttribute("start",pt.rows_above),this.content_elem.style["counter-increment"]="clusterize-counter "+(pt.rows_above-1),bt.clusterChanged&&bt.clusterChanged()):_t&&(this.content_elem.lastChild.style.height=pt.bottom_offset+"px")},html:function(ht){var ft=this.content_elem;if(ee&&ee<=9&&this.options.tag=="tr"){var pt=document.createElement("div"),mt;for(pt.innerHTML="<table><tbody>"+ht+"</tbody></table>";mt=ft.lastChild;)ft.removeChild(mt);for(var yt=this.getChildNodes(pt.firstChild.firstChild);yt.length;)ft.appendChild(yt.shift())}else ft.innerHTML=ht},getChildNodes:function(ht){for(var ft=ht.children,pt=[],mt=0,yt=ft.length;mt<yt;mt++)pt.push(ft[mt]);return pt},checkChanges:function(ht,ft,pt){var mt=ft!=pt[ht];return pt[ht]=ft,mt}};function ot(ht,ft,pt){return ft.addEventListener?ft.addEventListener(ht,pt,!1):ft.attachEvent("on"+ht,pt)}function ct(ht,ft,pt){return ft.removeEventListener?ft.removeEventListener(ht,pt,!1):ft.detachEvent("on"+ht,pt)}function ut(ht){return Object.prototype.toString.call(ht)==="[object Array]"}function dt(ht,ft){return window.getComputedStyle?window.getComputedStyle(ft)[ht]:ft.currentStyle[ht]}return st})})(clusterize)),clusterize.exports}var clusterizeExports=requireClusterize();const Clusterize=getDefaultExportFromCjs(clusterizeExports);Clusterize.default;var logger$6=LoggerByDefault.getLogger("widget");class Catalog extends ControlExtended{constructor(ee){if(ee=ee||{},super(ee),!(this instanceof Catalog))throw new TypeError("ERROR CLASS_CONSTRUCTOR");return this.CLASSNAME="Catalog",this.initialize(ee),this.container=this.initContainer(),this.element?this.element.appendChild(this.container):this.element=this.container,this.showWaiting(),this.initConfigData().then(te=>{logger$6.trace(this,te),this.hideWaiting(),this.configData=te,this.dispatchEvent({type:this.LOADED_CATALOG_EVENT,data:te})}).catch(te=>{this.hideWaiting(),logger$6.error(te)}),this}setMap(ee){ee?(this.on("catalog:loaded",this.checkLayersOnMap),this.draggable&&Draggable.dragElement(this.panelCatalogContainer,this.panelCatalogHeaderContainer,ee.getTargetElement()),this.collapsed||this.buttonCatalogShow.setAttribute("aria-pressed",!0),this.auto&&this.addEventsListeners(ee)):(this.un("catalog:loaded",this.checkLayersOnMap),this.auto&&this.removeEventsListeners()),super.setMap(ee),this.options.position&&this.setPosition(this.options.position),this.options.gutter===!1&&this.getContainer().classList.add("gpf-button-no-gutter")}getCollapsed(){return this.collapsed}setCollapsed(ee){if(ee===void 0){logger$6.error("[ERROR] Catalog:setCollapsed - missing collapsed parameter");return}ee&&this.collapsed||!ee&&!this.collapsed||(ee?this.buttonCatalogClose.click():this.buttonCatalogShow.click(),this.collapsed=ee)}addLayerConfig(ee){for(const ot in ee)if(Object.prototype.hasOwnProperty.call(ee,ot)){const ct=ee[ot];if(ct.serviceParams){var te=ct.serviceParams.id.split(":").slice(-1)[0];ct.service=te,ct.categories=[],ct.producer_urls=this.createCatalogLinks("producer",ct.producer),ct.thematic_urls=this.createCatalogLinks("thematic",ct.thematic),this.layersList[ot]=ct}}var st=document.getElementById("GPcatalogContainerTabs");st&&st.remove(),this.layersList.sort((ot,ct)=>ot.title.localeCompare(ct.title,"fr",{sensitivity:"base"})),this.createCatalogContentEntries(this.layersList)}activeLayerByID(ee){var te=ee.split("$")[0],st=ee.split(":").slice(-1)[0];this.activeLayer(te,st)}disableLayerByID(ee){var te=ee.split("$")[0],st=ee.split(":").slice(-1)[0];this.disableLayer(te,st)}activeLayer(ee,te){var st=this.getLayerId(ee,te);if(st){var ot={};this.options.addToMap&&(ot=this.addLayer(ee,te)),this.dispatchEvent({type:this.ADD_CATALOG_LAYER_EVENT,name:ee,service:te,layer:ot})}}disableLayer(ee,te){var st=this.getLayerId(ee,te);if(st){var ot={};this.options.addToMap&&(ot=this.removeLayer(ee,te)),this.dispatchEvent({type:this.REMOVE_CATALOG_LAYER_EVENT,name:ee,service:te,layer:ot})}}getLayerId(ee,te){if(!this.layersList||typeof this.layersList!="object")return null;var st=new RegExp(ee+".*"+te);for(const ot in this.layersList)if(Object.prototype.hasOwnProperty.call(this.layersList,ot)&&st.test(ot))return ot;return null}getLayersByCategory(ee,te){var st=Object.values(te).map(dt=>dt);ee.order&&(st=Object.values(te).sort((dt,ht)=>dt.title.localeCompare(ht.title,"fr",{sensitivity:"base"})));var ot=ee.filter;if(ot){var ct=[];for(let dt=0;dt<st.length;dt++){const ht=st[dt];if(ht[ot.field]){var ut=Array.isArray(ot.value)?ot.value.includes(ht[ot.field].toString()):ot.value==="*"||ht[ot.field].toString()===ot.value;ut&&(ct.push(ht),this.layersList[ht.key].categories.push(ee.id))}}st=ct}if(ee.featured&&this.featuredLayersList&&this.featuredLayersList.length>0){const dt=this.featuredLayersList,ht=Object.fromEntries(st.map(mt=>[mt.name,mt])),ft=dt.map(mt=>
599ht[mt]).filter(Boolean),pt=st.filter(mt=>!dt.includes(mt.name));st=[...ft,...pt]}return st}getContainer(){return this.container}initialize(ee){this.uid=ee.id||SelectorID.generate(),this.clusterOptions={rows_in_block:50,blocks_in_cluster:4},this.options={collapsed:!0,draggable:!1,auto:!0,titlePrimary:"Gérer vos couches de données",titleSecondary:"",layerLabel:"title",layerThumbnail:!1,tabHeightAuto:!1,optimisation:"none",size:"md",search:{display:!0,label:"Rechercher une donnée",criteria:["name","title","description"]},addToMap:!0,categories:[{title:"Données",id:"data",order:!1,featured:!1,cluster:!0,clusterOptions:this.clusterOptions,default:!0,filter:null}],configuration:{type:"json",urls:["https://raw.githubusercontent.com/IGNF/geoportal-configuration/new-url/dist/entreeCarto.json"]}};var te=Helper.assign(this.options.search,ee.search);Helper.assign(this.options,ee),Helper.assign(this.options.search,te),this.collapsed=this.options.collapsed,this.draggable=this.options.draggable,this.auto=this.options.auto,this.eventsListeners=[],this.buttonCatalogShow=null,this.panelCatalogContainer=null,this.panelCatalogHeaderContainer=null,this.buttonCatalogClose=null,this.contentCatalogContainer=null,this.waitingContainer=null,this.configData={},this.layersList={},this.featuredLayersList=[],this.clusterizeRef={},this.clusterizeSections={},this.dataOnDemand={},this.categories=this.options.categories.map(st=>{var ot=st.items;return st.items&&(ot=st.items.map(ct=>({title:ct.title,id:ct.id||this.generateID(ct.title),default:ct.hasOwnProperty("default")?ct.default:!1,order:ct.hasOwnProperty("order")?ct.order:!1,featured:ct.hasOwnProperty("featured")?ct.featured:!1,section:ct.hasOwnProperty("section")?ct.section:!1,sections:[],subcategory:!0,icon:ct.hasOwnProperty("icon")?ct.icon:!1,iconJson:ct.iconJson||[],cluster:ct.hasOwnProperty("cluster")?ct.cluster:!1,clusterOptions:ct.hasOwnProperty("clusterOptions")?ct.clusterOptions:this.clusterOptions,filter:ct.filter||null}))),{title:st.title,id:st.id||this.generateID(st.title),default:st.hasOwnProperty("default")?st.default:!1,order:st.hasOwnProperty("order")?st.order:!1,featured:st.hasOwnProperty("featured")?st.featured:!1,search:st.hasOwnProperty("search")?st.search:!1,cluster:st.hasOwnProperty("cluster")?st.cluster:!1,clusterOptions:st.hasOwnProperty("clusterOptions")?st.clusterOptions:this.clusterOptions,filter:st.filter||null,items:ot||null}}),this.categoryId=(()=>{var st=this.categories.findIndex(ot=>ot.default);return st===-1&&(st=0,this.categories[st].default=!0),this.categories[st].id})(),this.layersListOnMap={},this._searchTimeout=null,this.ADD_CATALOG_LAYER_EVENT="catalog:layer:add",this.REMOVE_CATALOG_LAYER_EVENT="catalog:layer:remove",this.LOADED_CATALOG_EVENT="catalog:loaded"}initContainer(){var ee=this._createMainContainerElement(),te=this.buttonCatalogShow=this._createShowCatalogPictoElement();ee.appendChild(te);var st=this.panelCatalogContainer=this._createCatalogPanelElement(),ot=this.panelCatalogHeaderContainer=this._createPanelHeaderElement({icon:"ign-catalog",title:this.options.titlePrimary,btnClassForClose:"GPshowCatalogPicto"});st.appendChild(ot),this.buttonCatalogClose=ot._closeBtn;var ct=this._createCatalogPanelBodyElement();st.appendChild(ct);var ut=this._createCatalogPanelContentDivElement(),dt=this.contentCatalogContainer=this._createCatalogContentDivElement();dt.appendChild(this._createCatalogContentTitleElement(this.options.titleSecondary)),this.options.search.display&&dt.appendChild(this._createCatalogContentSearchGlobalElement(this.options.search.label));var ht=this.waitingContainer=this._createCatalogWaitingElement();return dt.appendChild(ht),ut.appendChild(dt),ct.appendChild(ut),ee.appendChild(st),ee}checkLayersOnMap(){var ee=this.getMap();if(ee){var te=ee.getLayers();te.forEach(st=>{if(st.name&&st.service){this.layersListOnMap[st.name+":"+st.service]=st;var ot=document.querySelectorAll(`input[data-layer="${st.name}:${st.service}"]`);ot&&ot.forEach(ct=>{ct.checked=!0})}})}}async initConfigData(){var ee=null;if(this.options.configuration.data)return ee=this.options.configuration.data||{}
599,Config.isConfigLoaded()&&Helper.mergeParams(ee,Config.configuration),this.checkConfigLayers(ee.layers),this.layersList=ee.layers,this.featuredLayersList=ee.featured,this.createCatalogContentEntries(ee),new Promise((st,ot)=>{st(ee)});if(this.options.configuration.urls){var te=[];for(let st=0;st<this.options.configuration.urls.length;st++){const ot=this.options.configuration.urls[st],ct=function(){return fetch(ot,{}).then(function(ut){if(ut.ok)return ut.json().then(function(ht){return ht}).catch(ht=>{logger$6.warn("fetch json exception :",ht)});var dt=new Error("HTTP status code: "+ut.status);throw dt}).catch(ut=>new Promise((dt,ht)=>{logger$6.error("fetch json exception :",ut),ht(ut)}))};te.push(ct())}try{const st=await Promise.all(te);ee=st[0];for(let ot=1;ot<st.length;ot++){const ct=st[ot];Helper.mergeParams(ee,ct)}return Config.isConfigLoaded()&&Helper.mergeParams(ee,Config.configuration),this.checkConfigLayers(ee.layers),this.layersList=ee.layers,this.featuredLayersList=ee.featured,this.createCatalogContentEntries(ee),await new Promise((ot,ct)=>{ot(ee)})}catch(st){return await new Promise((ot,ct)=>{ct(st)})}}}checkConfigLayers(ee){for(const st in ee)if(Object.prototype.hasOwnProperty.call(ee,st)){const ot=ee[st];if(ot.serviceParams){if((ut=>{const dt=document.createElement("div");return dt.innerHTML=ut.trim(),dt.childNodes.length>0&&dt.firstChild.nodeType===1})(ot.description)){logger$6.error(`layer description contains HTML code, which is not allowed. Layer: ${st}`),logger$6.error("Please use Markdown syntax for layer descriptions instead."),logger$6.error(ot.description),delete ee[st];continue}var te=ot.serviceParams.id.split(":").slice(-1)[0];ot.service=te,ot.categories=[],ot.key=st,ot.producer_urls=this.createCatalogProducerLinks(ot.producer),ot.thematic_urls=this.createCatalogThematicLinks(ot.thematic),ot.label=this.options.layerLabel&&ot[this.options.layerLabel]||ot.title,ot.description=k$2.parse(ot.description),this.options.layerThumbnail?ot.thumbnail||(ot.thumbnail="default"):ot.thumbnail&&delete ot.thumbnail}else delete ee[st]}}createCatalogContentEntries(ee){var te=this.contentCatalogContainer,st=this._createCatalogContentCategoriesTabs(this.categories,this.options.tabHeightAuto);te.appendChild(st);var ot=[];this.categories.forEach(ht=>{if(ht.items)for(let ft=0;ft<ht.items.length;ft++){const pt=ht.items[ft];if(pt.icon&&pt.iconJson.length===0&&pt.section&&pt.filter){const mt=pt.filter.field;ee.topics&&ee.topics[mt]?pt.iconJson=ee.topics[mt]:ee[mt]?pt.iconJson=ee[mt]:Topics[mt]?pt.iconJson=Topics[mt]:pt.iconJson=[]}pt.subcategory=!0,ot.push(pt)}else ot.push(ht)}),ot.findIndex(ht=>ht.id===this.categoryId);var ct=te.querySelectorAll(".tabcontent");for(let ht=0;ht<ct.length;ht++){const ft=ct[ht];var ut=this.getLayersByCategory(ot[ht],ee.layers),dt=ot[ht].cluster&&this.options.optimisation==="clusterize"||this.options.optimisation==="on-demand";this._createCatalogContentCategoryTabContent(ot[ht],ut,dt).then(pt=>{const mt=document.createDocumentFragment();if(pt.dom)if(mt.appendChild(pt.dom),ft.appendChild(mt),console.log(`Content for category ${ot[ht].title} created.`),ot[ht].cluster&&this.options.optimisation==="clusterize")ot[ht].section?(console.warn(`No clustering at initialization for sections : ${ot[ht].title} !`),this.clusterizeSections[ot[ht].id]=pt.blocks.reduce((yt,vt)=>(yt[vt.domid]=vt.rows,yt),{}),this._updateListenersLayersDOM(ft,ot[ht].id)):this.clusterizeRef[ot[ht].id]=new Clusterize({scrollId:ft.parentElement.id,contentId:pt.blocks[0].domid,rows:pt.blocks[0].rows,rows_in_block:ot[ht].clusterOptions.rows_in_block,blocks_in_cluster:ot[ht].clusterOptions.blocks_in_cluster,callbacks:{clusterChanged:()=>{logger$6.trace("cluster changed"),this._updateListenersLayersDOM(ft,ot[ht].id),this.checkLayersOnMap()}}});else if(this.options.optimisation==="on-demand"){if(ot[ht].section)this.dataOnDemand[ot[ht].id]=pt.blocks.reduce((yt,vt)=>(yt[vt.domid]=vt.fragment,yt),{});else if(this.dataOnDemand[ot[ht].id]=pt.blocks[0].fragment,ot[ht].default){const vt=(_t=>{const bt=document.createDocumentFragment();
599return _t.childNodes.forEach(xt=>{bt.appendChild(xt.cloneNode(!0))}),bt})(this.dataOnDemand[ot[ht].id]);ft.querySelector(`#checkboxes-${ot[ht].id}`).appendChild(vt)}this._updateListenersLayersDOM(ft,ot[ht].id),this.checkLayersOnMap()}else this._updateListenersLayersDOM(ft,ot[ht].id),this.checkLayersOnMap()})}}createCatalogThematicLinks(ee){if(!ee)return null;var te="https://cartes.gouv.fr/catalogue/search?",st=[];for(let ct=0;ct<ee.length;ct++){const ut=ee[ct];if(ut!=="Autres"){var ot=Topics.thematic.find(dt=>dt.name===ut);ot&&st.push({name:ut,url:te+"topic="+ot.id})}}return st.length===0&&(st=null),st}createCatalogProducerLinks(ee){if(!ee)return null;var te="https://cartes.gouv.fr/catalogue/search?",st=[];for(let ot=0;ot<ee.length;ot++){const ct=ee[ot];ct!=="Autres"&&st.push({name:ct,url:te+"organization="+ct})}return st.length===0&&(st=null),st}addEventsListeners(ee){var te=this;this.eventsListeners["map:add"]=function(st){logger$6.trace(st);var ot=st.element.name,ct=st.element.service;te.layersListOnMap[ot+":"+ct]=st.element;var ut=document.querySelectorAll(`input[data-layer="${ot}:${ct}"]`);ut&&ut.forEach(dt=>{dt.checked=!0})},ee.getLayers().on("add",this.eventsListeners["map:add"]),this.eventsListeners["map:remove"]=function(st){logger$6.trace(st);var ot=st.element.name,ct=st.element.service;delete te.layersListOnMap[ot+":"+ct];var ut=document.querySelectorAll(`input[data-layer="${ot}:${ct}"]`);ut&&ut.forEach(dt=>{dt.checked=!1})},ee.getLayers().on("remove",this.eventsListeners["map:remove"])}removeEventsListeners(){var ee=this.getMap();ee.getLayers().un("add",this.eventsListeners["map:add"]),delete this.eventsListeners["map:add"],ee.getLayers().un("remove",this.eventsListeners["map:remove"]),delete this.eventsListeners["map:remove"]}addLayer(ee,te){var st=null,ot=null,ct=this.getLayerId(ee,te);if(ct){var ut=Config.isConfigLoaded()?null:LayerConfigUtils.getLayerConfig(this.layersList[ct]);switch(te){case"WMS":ot=new LayerWMS({layer:ee,configuration:ut});break;case"WMTS":ot=new LayerWMTS({layer:ee,configuration:ut});break;case"TMS":ot=new LayerMapBox({layer:ee,configuration:ut},{declutter:!0});break;case"WFS":ot=new LayerWFS({layer:ee,configuration:ut});break}if(ot){var dt=this.getMap();dt.addLayer(ot),this.layersListOnMap[ee+":"+te]=ot,st=ot.getConfiguration()}return st}}removeLayer(ee,te){var st=null,ot=this.layersListOnMap[ee+":"+te];if(ot){st=ot.getConfiguration();var ct=this.getMap();ct.removeLayer(ot),delete this.layersListOnMap[ee+":"+te]}return st}hideWaiting(){this.waitingContainer.className="GPwaitingContainerHidden  gpf-waiting--hidden"}showWaiting(){this.waitingContainer.className="GPwaitingContainerVisible gpf-waiting--visible"}resetFilteredLayersList(){for(const ee in this.layersList)if(Object.prototype.hasOwnProperty.call(this.layersList,ee)){const te=this.layersList[ee];te.hidden=!1,this.updateVisibilityFilteredLayers(te.name,te.service,te.hidden)}}setFilteredLayersList(ee){const te=ut=>String(ut||"").toLowerCase().normalize("NFD").replace(/[\u0300-\u036f]/g,"").replace(/[_-]+/g," ").replace(/\s+/g," ").trim();var st=te(ee),ot=this.options.search.criteria;for(const ut in this.layersList)if(Object.prototype.hasOwnProperty.call(this.layersList,ut)){const dt=this.layersList[ut];var ct="";for(let ht=0;ht<ot.length;ht++){const ft=ot[ht];dt[ft]&&(Array.isArray(dt[ft])?ct+=te(dt[ft].flat(1/0).filter(pt=>pt!=null).join(" ")):ct+=" "+te(dt[ft]))}dt.hidden=!ct.includes(st),dt.hidden||logger$6.info(`Filtering layer ${dt.name} with words : ${ct}`),this.updateVisibilityFilteredLayers(dt.name,dt.service,dt.hidden)}this.updateVisibilityFilteredSections()}updateVisibilityFilteredLayers(ee,te,st){const ot=ht=>ht.replace(/\./g,"\\.");var ct=[];this.categories.forEach(ht=>{if(ht.items)for(let ft=0;ft<ht.items.length;ft++){const pt=ht.items[ft];ct.push(pt)}else ct.push(ht)});const ut=(ht,ft,pt)=>{var mt=document.getElementById(`fieldset-${ht.id}_${ft}-${pt}`);if(this.options.optimisation==="on-demand"&&ht.section)for(const vt in this.dataOnDemand[ht.id]){const _t=this.dataOnDemand[ht.id][vt];if(_t){var yt=ot(`#fieldset-${ht.id}_${ft}-${pt}`);if(mt=_t.querySelector(yt),mt)break}}return mt};for(let ht=0;ht<ct.length;
599ht++){const ft=ct[ht];var dt=ut(ft,ee,te);dt&&(st?(dt.classList.add("gpf-hidden"),dt.classList.add("GPelementHidden")):(dt.classList.remove("gpf-hidden"),dt.classList.remove("GPelementHidden"),logger$6.info(`Layer ${ee}:${te} visibility updated to hidden=${st} in category ${ft.id} (${dt.id}).`)))}}updateVisibilityFilteredSections(){const ee=(ut,dt)=>{var ht=0;if(this.options.optimisation==="on-demand"){var ft=this.dataOnDemand[ut][dt];ft&&(ht=ft.querySelectorAll(".fr-fieldset__element:not(.gpf-hidden):not(.GPelementHidden)").length)}else{var pt=document.getElementById(dt);if(pt){var mt=pt.innerHTML;ht=[...mt.matchAll(/"fr-fieldset__element"/g)].length}}return ht};for(let ut=0;ut<this.categories.length;ut++){const dt=this.categories[ut];if(dt.items)for(let ht=0;ht<dt.items.length;ht++){const ft=dt.items[ht];if(ft.section)for(let pt=0;pt<ft.sections.length;pt++){const mt=ft.sections[pt];var te=document.getElementById(`section-${ft.id}-${this.generateID(mt)}`);if(te){var st=`section-accordion-${ft.id}-${this.generateID(mt)}`,ot=ee(ft.id,st),ct=document.getElementById(`section-count-${ft.id}-${this.generateID(mt)}`);ot===0?(te.classList.add("gpf-hidden"),te.classList.add("GPelementHidden"),ct&&(ct.textContent=ot)):(ct&&(ct.textContent=ot),te.classList.remove("gpf-hidden"),te.classList.remove("GPelementHidden"))}}}}}onShowCatalogClick(ee){var te=ee.target.ariaPressed;te==="true"&&this.onPanelOpen(),this.collapsed=te!=="true",this.dispatchEvent("change:collapsed"),logger$6.trace(ee)}onCloseCatalogClick(ee){logger$6.trace(ee)}onSelectCatalogTabClick(ee,te){logger$6.trace(ee);var st=[];this.categories.forEach(bt=>{if(bt.items)for(let xt=0;xt<bt.items.length;xt++){const Mt=bt.items[xt];st.push(Mt)}else st.push(bt)});var ot=document.getElementById(`checkboxes-${this.categoryId}`);if(ot){var ct=st.find(bt=>bt.id==this.categoryId);this.options.optimisation==="on-demand"&&!ct.section&&(ot.innerHTML="")}this.categoryId=te;var ut=st.find(bt=>bt.id==te);const dt=bt=>{const xt=document.createDocumentFragment();return bt.childNodes.forEach(Mt=>{xt.appendChild(Mt.cloneNode(!0))}),xt};var ht=ee.target.ariaSelected==="true",ft=document.getElementById(`checkboxes-${te}`);if(ft&&ft.children.length===0){if(this.options.optimisation==="on-demand"&&ht){var pt=this.dataOnDemand[ut.id];pt&&(ft.appendChild(dt(pt)),this._updateListenersLayersDOM(ft,ut.id),this.checkLayersOnMap())}ut.cluster&&this.options.optimisation}var mt=document.getElementById("catalog-container-search-specific");if(mt){var yt=this.categories.find(bt=>bt.id==te);yt&&yt.search?(mt.classList.remove("gpf-hidden"),mt.classList.add("fr-tabs__panel--selected")):(mt.classList.add("gpf-hidden"),mt.classList.remove("fr-tabs__panel--selected"))}var vt=document.getElementById("catalog-input-search-specific");vt&&vt.value!==""&&(vt.value="",this.setFilteredLayersList(""));var _t=document.getElementById("catalog-input-search-global");_t&&this.options.optimisation==="on-demand"&&_t.value!==""&&this.setFilteredLayersList(_t.value)}onSelectCatalogEntryClick(ee){logger$6.trace(ee);var te=ee.target.dataset.layer,st=te.substring(0,te.lastIndexOf(":")),ot=te.substring(te.lastIndexOf(":")+1),ct={};ee.target.checked?(this.options.addToMap&&(ct=this.addLayer(st,ot)),this.dispatchEvent({type:this.ADD_CATALOG_LAYER_EVENT,name:st,service:ot,layer:ct})):(this.options.addToMap&&(ct=this.removeLayer(st,ot)),this.dispatchEvent({type:this.REMOVE_CATALOG_LAYER_EVENT,name:st,service:ot,layer:ct}))}onToggleCatalogMoreLearnClick(ee){logger$6.trace(ee)}onToggleCatalogSectionClick(ee,te,st){logger$6.trace(ee);const ot=mt=>{const yt=document.createDocumentFragment();return mt.childNodes.forEach(vt=>{yt.appendChild(vt.cloneNode(!0))}),yt};var ct=[];this.categories.forEach(mt=>{if(mt.items)for(let yt=0;yt<mt.items.length;yt++){const vt=mt.items[yt];ct.push(vt)}else ct.push(mt)});var ut=ct.find(mt=>mt.id==te),dt=ee.target.ariaExpanded==="true",ht=document.getElementById(st);if(ht){if(this.options.optimisation==="on-demand")if(dt){var ft=this.dataOnDemand[ut.id][st];ft&&(ht.appendChild(ot(ft)),this._updateListenersLayersDOM(ht,ut.id),this.checkLayersOnMap())}else ht.innerHTML="";if(ut.cluster&&this.options.optimisation==="clusterize")if(dt)if(this.clusterizeRef[ut.id]&&this.clusterizeRef[ut.id][st]&&this.clusterizeRef[ut.id][st].destroyed)this.clusterizeRef[ut.id][st].refresh(!0);else{var pt=this.clusterizeSections[ut.id][st];this.clusterizeRef[ut.id]||(this.clusterizeRef[ut.id]={}),this.clusterizeRef[ut.id][st]=new Clusterize({scrollId:ht.parentElement.id,contentId:st,rows:pt,rows_in_block:ut.clusterOptions.rows_in_block,blocks_in_cluster:ut.clusterOptions.blocks_in_cluster,callbacks:{clusterChanged:()=>{logger$6.trace("cluster changed"),this._updateListenersLayersDOM(ht,ut.id),this.checkLayersOnMap()}}})}else this.clusterizeRef[ut.id]&&this.clusterizeRef[ut.id][st]&&!this.clusterizeRef[ut.id][st].destroyed&&this.clusterizeRef[ut.id][st].destroy(!0)}}onToggleCatalogRadioChange(ee,te){logger$6.trace(ee,te);var st=[];
599this.categories.forEach(ft=>{if(ft.items)for(let pt=0;pt<ft.items.length;pt++){const mt=ft.items[pt];st.push(mt)}else st.push(ft)});var ot=st.find(ft=>ft.id==te),ct=document.getElementById(`checkboxes-${this.categoryId}`);ct&&!ot.section&&this.options.optimisation==="on-demand"&&(ct.innerHTML=""),this.categoryId=te;const ut=ft=>{const pt=document.createDocumentFragment();return ft.childNodes.forEach(mt=>{pt.appendChild(mt.cloneNode(!0))}),pt};var dt=document.getElementById(`checkboxes-${te}`);if(dt&&dt.children.length===0){if(this.options.optimisation==="on-demand"&&ee.target.checked){var ht=this.dataOnDemand[ot.id];ht&&(dt.appendChild(ut(ht)),this._updateListenersLayersDOM(dt,ot.id),this.checkLayersOnMap())}ot.cluster&&this.options.optimisation}}onSearchGlobalCatalogButtonClick(ee){var te=ee.target.value;this.setFilteredLayersList(te)}onSearchGlobalCatalogInputChange(ee){clearTimeout(this._searchTimeout),this._searchTimeout=setTimeout(()=>{this.onSearchGlobalCatalogButtonClick(ee)},200)}onSearchGlobalCatalogButtonResetClick(ee){this.resetFilteredLayersList(),this.updateVisibilityFilteredSections()}onSearchSpecificCatalogButtonClick(ee){var te=ee.target.value;this.setFilteredLayersList(te)}onSearchSpecificCatalogInputChange(ee){clearTimeout(this._searchTimeout),this._searchTimeout=setTimeout(()=>{this.onSearchSpecificCatalogButtonClick(ee)},200)}onSearchSpecificCatalogButtonResetClick(ee){this.resetFilteredLayersList(),this.updateVisibilityFilteredSections()}}Object.assign(Catalog.prototype,PanelDOM);Object.assign(Catalog.prototype,CatalogDOM);Object.assign(Catalog.prototype,Widget);window.ol&&window.ol.control&&(window.ol.control.Catalog=Catalog);const TerritoriesJson=[{id:"FXX",title:"France métropolitaine",description:"",zoom:null,bbox:[-9.86,41.15,10.38,51.56],thumbnail:"https://data.geopf.fr/annexes/cartes.gouv.fr-config/public/resources/territories/thumbnails/fxx.png",icon:"https://data.geopf.fr/annexes/cartes.gouv.fr-config/public/resources/territories/fxx.svg"},{id:"IDF",title:"Paris petite couronne",description:"",zoom:null,bbox:[2.18,48.77,2.52,48.95],thumbnail:"https://data.geopf.fr/annexes/cartes.gouv.fr-config/public/resources/territories/thumbnails/idf.png",icon:"https://data.geopf.fr/annexes/cartes.gouv.fr-config/public/resources/territories/idf.svg"},{id:"MTQ",title:"Martinique",description:"",zoom:null,bbox:[-61.4,14.25,-60.67,15.04],thumbnail:"https://data.geopf.fr/annexes/cartes.gouv.fr-config/public/resources/territories/thumbnails/mtq.png",icon:"https://data.geopf.fr/annexes/cartes.gouv.fr-config/public/resources/territories/mtq.svg"},{id:"GUF",title:"Guyane",description:"",zoom:null,bbox:[-55.65,1.49,-51.2,6.21],thumbnail:"https://data.geopf.fr/annexes/cartes.gouv.fr-config/public/resources/territories/thumbnails/guf.png",icon:"https://data.geopf.fr/annexes/cartes.gouv.fr-config/public/resources/territories/guf.svg"},{id:"MYT",title:"Mayotte",description:"",zoom:null,bbox:[44.95,-13.049,45.32,-12.57],thumbnail:"https://data.geopf.fr/annexes/cartes.gouv.fr-config/public/resources/territories/thumbnails/myt.png",icon:"https://data.geopf.fr/annexes/cartes.gouv.fr-config/public/resources/territories/myt.svg"},{id:"GLP",title:"Guadeloupe",description:"",zoom:null,bbox:[-61.97,15.72,-60.93,16.66],thumbnail:"https://data.geopf.fr/annexes/cartes.gouv.fr-config/public/resources/territories/thumbnails/glp.png",icon:"https://data.geopf.fr/annexes/cartes.gouv.fr-config/public/resources/territories/glp.svg"},{id:"REU",title:"Réunion",description:"",zoom:null,bbox:[55.07,-21.46,55.86,-20.79],thumbnail:"https://data.geopf.fr/annexes/cartes.gouv.fr-config/public/resources/territories/thumbnails/reu.png",icon:"https://data.geopf.fr/annexes/cartes.gouv.fr-config/public/resources/territories/reu.svg"},{id:"SPM",title:"Saint-Pierre-et-Miquelon",description:"",zoom:null,bbox:[-56.48,46.69,-56.07,47.19],thumbnail:"https://data.geopf.fr/annexes/cartes.gouv.fr-config/public/resources/territories/thumbnails/spm.png",icon:"https://data.geopf.fr/annexes/cartes.gouv.fr-config/public/resources/territories/spm.svg"},{id:"BLM",title:"Saint-Barthélemy",description:"",zoom:null,bbox:[-62.95,17.85,-62.75,17.95],thumbnail:"https://data.geopf.fr/annexes/cartes.gouv.fr-config/public/resources/territories/thumbnails/blm.png",icon:"https://data.geopf.fr/annexes/cartes.gouv.fr-config/public/resources/territories/blm.svg"},{id:"MAF",title:"Saint-Martin",description:"",zoom:null,bbox:[-63.2,18,-62.9,18.2],thumbnail:"https://data.geopf.fr/annexes/cartes.gouv.fr-config/public/resources/territories/thumbnails/maf.png",icon:"https://data.geopf.fr/annexes/cartes.gouv.fr-config/public/resources/territories/maf.svg"},{id:"WLF",title:"Wallis-et-Futuna",description:"",zoom:null,bbox:[180.3,-15.2,185.3,-12.25],thumbnail:"https://data.geopf.fr/annexes/cartes.gouv.fr-config/public/resources/territories/thumbnails/wlf.png",icon:"https://data.geopf.fr/annexes/cartes.gouv.fr-config/public/resources/territories/wlf.svg"},{id:"PYF",title:"Polynésie française",description:"",zoom:null,bbox:[-154.83,-27.6,-134.32,-7.25],thumbnail:"https://data.geopf.fr/annexes/cartes.gouv.fr-config/public/resources/territories/thumbnails/pyf.png",icon:"https://data.geopf.fr/annexes/cartes.gouv.fr-config/public/resources/territories/pyf.svg"},{id:"NCL",title:"Nouvelle Calédonie",description:"",zoom:null,bbox:[163.02,-23.08,167.86,-19.5],thumbnail:"https://data.geopf.fr/annexes/cartes.gouv.fr-config/public/resources/territories/thumbnails/ncl.png",icon:"https://data.geopf.fr/annexes/cartes.gouv.fr-config/public/resources/territories/ncl.svg"},{id:"ATF",title:"Terres australes et antarctiques françaises",description:"",zoom:null,bbox:[50,-60,90,-45],thumbnail:"https://data.geopf.fr/annexes/cartes.gouv.fr-config/public/resources/territories/thumbnails/atf.png",icon:"https://data.geopf.fr/annexes/cartes.gouv.fr-config/public/resources/territories/atf.svg"}],stringToHTML$1=ne=>{var ee=function(){if(!window.DOMParser)return!1;var ct=new DOMParser;try{ct.parseFromString("x","text/html")}catch{return!1}return!0};if(ee()){var te=new DOMParser,st=te.parseFromString(ne,"text/html");return st.body}var ot=document.createElement("div");return ot.innerHTML=ne,ot};var TerritoriesDOM={_addUID:function(ne){var ee=this.uid?ne+"-"+this.uid:ne;return ee},createDraggableElement:function(ne,ee){return Sortable.create(ne,{animation:150,handle:".gpf-btn-icon-territories-draggable",draggable:".draggable-territories-view",ghostClass:"gpf-territories-view-ghost",onEnd:function(st){ee.onReorderTerritoriesViews(st)}})},_createMainContainerElement:function(){var ne=document.createElement("div");return ne.id=this._addUID("GPterritories"),ne.className="GPwidget gpf-widget gpf-widget-button gpf-mobile-fullscreen",ne},_createShowTerritoriesPictoElement:function(){var ne=this,ee=document.createElement("button"),te=document.createElement("span");return ee.appendChild(te),ee.id=this._addUID("GPshowTerritoriesPicto"),ee.classList.add("GPshowOpen","GPshowAdvancedToolPicto","GPshowTerritoriesPicto"),ee.classList.add("gpf-btn","gpf-btn--tertiary","gpf-btn-icon","gpf-btn-icon-territories"),ee.classList.add("fr-btn","fr-btn--tertiary"),ee.setAttribute("aria-label","Sélectionner un territoire"),ee.setAttribute("tabindex","0"),ee.setAttribute("aria-pressed",!1),ee.setAttribute("type","button"),ee.addEventListener?ee.addEventListener("click",function(st){var ot=st.target.ariaPressed==="true";st.target.setAttribute("aria-pressed",!ot),ne.onShowTerritoriesClick(st)}):ee.attachEvent&&ee.attachEvent("onclick",function(st){var ot=st.target.ariaPressed==="true";st.target.setAttribute("aria-pressed",!ot),ne.onShowTerritoriesClick(st)}),ee},_createTerritoriesPanelElement:function(){var ne=document.createElement("dialog");return ne.id=this._addUID("GPterritoriesPanel"),ne.className="GPpanel gpf-panel fr-modal",ne},_createTerritoriesPanelDivElement:function(){var ne=document.createElement("div");return ne.className="gpf-panel__territories",ne},_createTerritoriesPanelOptionsElement:function(ne,ee){var te=this,st="&#x2630",ot="gpf-territories-button-option-id",ct="gpf-territories-upload-id",ut="gpf-territories-upload-close-id",dt="gpf-territories-toggle-messages",ht="gpf-territories-apply-id",ft=`
600        <div class="fr-ml-auto">
601            <button type="button" 
602                id="${ot}"
603                class="fr-btn fr-btn--sm fr-btn--tertiary-no-outline" 
604                role="territories-button-options" 
605                aria-expanded="false" 
606                aria-controls="gpf-territories-upload-container-id">
607                ${st}
608            </button>
609            <dialog id="gpf-territories-upload-container-id" class="fr-modal__body fr
609-upload-group gpf-hidden">
610                <div class="gpf-territories-header-upload">
611                    <button 
612                        id="${ut}"
613                        type="button" 
614                        class="gpf-btn gpf-btn-icon-close fr-btn--close fr-btn fr-btn--tertiary-no-outline fr-m-1w"
615                        aria-expanded="false"
616                        title="Fermer le panneau">
617                        <span>Fermer</span>
618                    </button>
619                </div>
620                <label class="fr-label">
621                    ${ne}
622                    <span class="fr-hint-text">${ee}</span>
623                </label>
624                <fieldset class="fr-fieldset">
625                    <div class="fr-fieldset__element">
626                        <div class="fr-toggle fr-m-2v">
627                            <input 
628                                id="${dt}" 
629                                class="fr-toggle__input" 
630                                type="checkbox" 
631                                aria-describedby="gpf-territories-toggle-messages">
632                            <label class="fr-toggle__label" for="${dt}">Compléter la liste</label>
633                            <div class="fr-messages-group" id="gpf-territories-toggle-messages" aria-live="polite"></div>
634                        </div>
635                    </div>
636                    <div class="fr-fieldset__element">
637                        <input 
638                            id="${ct}" 
639                            class="fr-upload" 
640                            aria-describedby="gpf-territories-upload-id-messages" 
641                            type="file" 
642                            name="upload">
643                        <div class="fr-messages-group" id="gpf-territories-upload-id-messages" aria-live="polite"></div>
644                    </div>
645                </fieldset>
646                <fieldset class="fr-fieldset">
647                    <button 
648                        id="${ht}" 
649                        class="gpf-button gpf-button fr-btn fr-btn--tertiary" 
650                        aria-describedby="gpf-territories-apply-id-messages">Appliquer</button>
651                    <div class="fr-messages-group" id="gpf-territories-apply-id-messages" aria-live="polite"></div>
652                </fieldset>
653            </dialog>
654        </div>
655        `,pt=stringToHTML$1(ft);const mt=pt.attachShadow({mode:"open"});mt.innerHTML=ft.trim();var yt=mt.getElementById(ot);yt&&yt.addEventListener("click",Mt=>{Mt.target.ariaExpanded=Mt.target.ariaExpanded!=="true";
655var Ot=document.getElementById(Mt.target.getAttribute("aria-controls"));Ot&&(Mt.target.ariaExpanded==="true"?(Ot.classList.add("gpf-visible"),Ot.classList.remove("gpf-hidden")):(Ot.classList.remove("gpf-visible"),Ot.classList.add("gpf-hidden")))},!1);var vt=mt.getElementById(ut);vt&&vt.addEventListener("click",Mt=>{Mt.target.ariaExpanded=Mt.target.ariaExpanded!=="true";var Ot=document.getElementById(ot);Ot.click()});var _t=mt.getElementById(ct);_t&&_t.addEventListener("change",Mt=>{te.onUploadFileClick(Mt)},!1);var bt=mt.getElementById(dt);bt.addEventListener("click",Mt=>{console.log(Mt.target.checked),te.onUploadToggleClick(Mt)});var xt=mt.getElementById(ht);return xt&&xt.addEventListener("click",Mt=>{te.onApplyTerritoriesClick(Mt)},!1),mt.firstChild},_createTerritoriesPanelMenuViewsDivElement:function(ne,ee){var te=document.createElement("div");return te.className="territories-views gpf-panel__menuviews_territories",te.appendChild(this._createTerritoriesButtonOpenMenuViewsElement(ne,ee)),te.appendChild(this._createTerritoriesPanelMenuViewsElement(ne)),te},_createTerritoriesButtonOpenMenuViewsElement:function(ne,ee){var te=this,st=document.createElement("button"),ot=document.createElement("span");return st.appendChild(ot),st.id="gpf-territories-button-open-views-id",st.classList.add("gpf-btn","gpf-btn--tertiary","gpf-btn-icon"),st.classList.add("fr-btn","fr-btn--tertiary"),st.setAttribute("aria-label",ne),st.setAttribute("title",ee),st.setAttribute("tabindex","0"),st.setAttribute("aria-pressed",!1),st.setAttribute("aria-controls","gpf-territories-views-container-id"),st.setAttribute("type","button"),st.innerHTML=ne,st.addEventListener?st.addEventListener("click",function(ct){var ut=ct.target.ariaPressed==="true";ct.target.setAttribute("aria-pressed",!ut);var dt=document.getElementById(ct.target.getAttribute("aria-controls"));dt&&(ut?(dt.classList.remove("gpf-visible"),dt.classList.add("gpf-hidden")):(dt.classList.add("gpf-visible"),dt.classList.remove("gpf-hidden")),te.onShowTerritoriesViewsClick(ct))}):st.attachEvent&&st.attachEvent("onclick",function(ct){var ut=ct.target.ariaPressed==="true";ct.target.setAttribute("aria-pressed",!ut);var dt=document.getElementById(ct.target.getAttribute("aria-controls"));dt&&(ut?(dt.classList.remove("gpf-visible"),dt.classList.add("gpf-hidden")):(dt.classList.add("gpf-visible"),dt.classList.remove("gpf-hidden")),te.onShowTerritoriesViewsClick(ct))}),st},_createTerritoriesPanelMenuViewsElement:function(ne){var ee=document.createElement("dialog");return ee.id="gpf-territories-views-container-id",ee.className="fr-modal__body gpf-panel__views_territories-menu gpf-hidden",ee.appendChild(this._createTerritoriesMenuAddViewElement(ne)),ee.appendChild(this._createTerritoriesMenuListViewElement()),ee},_createTerritoriesMenuAddViewElement:function(ne){var ee=this,te="gpf-territories-views-back-button-id",st="gpf-territories-views-input-id",ot="gpf-territories-views-form-id",ct="gpf-territories-views-submit-id",ut=`
656        <div>
657            <button 
658                id="${te}" 
659                class="fr-btn fr-icon-arrow-left-line fr-btn--icon-left fr-btn--tertiary-no-outline"
660                aria-pressed="false" 
661                aria-controls="gpf-territories-views-container-id gpf-territories-button-open-views-id"
662                title="Retour au sélecteur de territoires" 
663                type="button">
664                ${ne}
665            </button>
666            <form id="${ot}">
667                <fieldset 
668                    class="fr-fieldset" 
669                    id="add-view-form-fieldset" 
670                    aria-labelledby="add-view-form-fieldset-legend add-view-form-fieldset-messages">
671                    <legend 
672                        class="fr-fieldset__legend" 
673                        id="add-view-form-fieldset-legend"> 
674                        Ajouter la vue actuelle 
675                    </legend>
676                    <div class="fr-fieldset__element">
677                        <div class="fr-input-group" id="${st}-input-group-view">
678                            <label class="fr-label" for="${st}"> Nom </label>
679                            <input class="fr-input" aria-describedby="${st}-messages" id="${st}" type="text">
680                            <div class="fr-messages-group" id="${st}
680-messages" aria-live="polite"></div>
681                        </div>
682                    </div>
683                    <div class="fr-messages-group" id="add-view-form-fieldset-messages" aria-live="polite">
684                        <p class="fr-message fr-message--error gpf-hidden" id="${st}-message-error-duplicate-id">Ce nom est déjà utilisé</p>
685                        <p class="fr-message fr-message--error gpf-hidden" id="${st}-message-error-empty-id">Le nom est vide</p>
686                    </div>
687                </fieldset>
688            </form>
689            <input type="submit" id="${ct}" value="Ajouter" class="fr-btn">
690            <hr class="fr-m-1v"/>
691        </div>
692        `,dt=stringToHTML$1(ut);const ht=dt.attachShadow({mode:"open"});ht.innerHTML=ut.trim();var ft=ht.getElementById(te);ft&&ft.addEventListener("click",yt=>{var vt=yt.target.ariaPressed==="true";yt.target.setAttribute("aria-pressed",!vt);var _t=yt.target.getAttribute("aria-controls").split(" "),bt=document.getElementById(_t[0]);if(bt){bt.classList.remove("gpf-visible"),bt.classList.add("gpf-hidden");var xt=document.getElementById(_t[1]);if(xt){xt.setAttribute("aria-pressed","false");var Mt=document.getElementById(st);if(Mt){Mt.value="";var Ot=document.getElementById(st+"-message-error-empty-id"),kt=document.getElementById(st+"-message-error-duplicate-id");Ot&&Ot.classList.add("gpf-hidden"),kt&&kt.classList.add("gpf-hidden")}ee.onCloseTerritoriesViewsClick(yt)}}},!1);var pt=ht.getElementById(ot);pt&&pt.addEventListener("submit",yt=>{yt.preventDefault();var vt=document.getElementById(st);vt&&ee.onAddTerritoriesViewClick(yt,vt.value)},!1);var mt=ht.getElementById(ct);return mt&&mt.addEventListener("click",yt=>{yt.preventDefault();var vt=document.getElementById(st);if(vt){var _t=ee.territories.find(Mt=>Mt.data.title===vt.value),bt=document.getElementById(st+"-message-error-empty-id"),xt=document.getElementById(st+"-message-error-duplicate-id");if(vt.value===""){bt&&bt.classList.remove("gpf-hidden"),xt&&xt.classList.add("gpf-hidden");return}if(_t){xt&&xt.classList.remove("gpf-hidden"),bt&&bt.classList.add("gpf-hidden");return}bt&&bt.classList.add("gpf-hidden"),xt&&xt.classList.add("gpf-hidden"),ee.onAddTerritoriesViewClick(yt,vt.value)}},!1),ht.firstChild},_createTerritoriesMenuListViewElement:function(){var ne=this,ee="gpf-territories-views-reset-button-id",te="gpf-territories-views-count-id",st=`
693        <div class="gpf-panel__views_territories-listview">
694            <!-- Menu de la liste des vues -->
695            <div class="gpf-panel__views_territories-listview-header">
696                <div class="gpf-panel__views_territories-listview-count">
697                    <span class="fr-label" style="padding-right: 10px; font-weight: bolder;"> Territoires </span>
698                    <span 
699                        class="fr-badge fr-badge--sm fr-badge--info fr-badge--no-icon" 
700                        id="${te}"> 0 </span>
701                </div>
702                <button 
703                    id="${ee}" 
704                    class="fr-btn fr-btn--sm fr-btn--tertiary-no-outline"
705                    title="Réinitialiser la liste des territoires" 
706                    type="button">
707                    Réinitialiser
708                </button>
709            </div>
710            <!-- Liste des vues -->
711            <div 
712                id="gpf-territories-views-listview-entries-id"
713                class="gpf-panel__views_territories-listview-entries">
714            </div>
715        </div>
716        `,ot=stringToHTML$1(st);const ct=ot.attachShadow({mode:"open"});ct.innerHTML=st.trim();var ut=ct.getElementById(ee);return ut&&ut.addEventListener("click",dt=>{ne.onResetTerritoriesViewClick(dt)},!1),ct.firstChild},_createTerritoriesElement:function(){var ne=document.createElement("div");return ne.className="territories-entries gpf-panel__body_territories fr-modal__body",ne},_createTerritoryEntry:function(ne){var ee=this;if(ne){var te="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACwAAAAsCAYAAAAehFoBAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAFvSURBVHgB7ZfBisIwEIb/aIWKHsXH8OCT+lBevHgRjwp6EBEREdRqTbKZLN3FXT20yRyK80FIqJR8mf4drDqfjUWNaKBmiDA3IsyNCHMjwtyIMDcizI0Ic/O5wsYA7bZCkjxfb7UQlWjCnY7CaJRhNtM/0nSAyUQjTRViEU3Yug+t8Tj3ws2mcpVVWCw0Gm4Hmv9Wvioq1jcdR
716aLbVX6+XCyUK+p0ql2VgevVYjhM/LVQolSYqni7AVlm/aB4UKXT9LvyFI35PE40goVJ9nSiYb0cPfrVyvh1Aa21BjYb4+KCIIKFiwhQNzgcSFphvTb/ugMdZLnULhbq6TBlCcowSex2v7dTRvd74+PxLq90kMEg8dGpQuUKF1GgR01VpvF4AP1+A3lu/frVOB4ttltT+QWsXGHakN7+V5mkQ9zv7++l33s95efS+4ZEIqRNVc1xUDu3UTp4OeTfGjcizI0IcyPC3IgwNyLMjQhzUzvhL49qosB5TImnAAAAAElFTkSuQmCC",st=ne.thumbnail||te,ot="",ct=ne.icon||te;ct.startsWith("fr-icon-")?ot=`
717                <button 
718                    type="button" 
719                    class="fr-btn fr-btn--lg ${ct} fr-btn--tertiary-no-outline">
720                </button>`:ot=`
721                <svg>       
722                    <image id="icon-${ne.id}" xlink:href="${ct}" style="width:100%;"/>    
723                </svg>`;var ut=ne.id.toLowerCase(),dt=stringToHTML$1(`
724            <div class="gpf-tile fr-tile fr-tile--sm">
725                <div class="fr-tile__body">
726                    <div class="fr-tile__content">
727                        <p class="fr-tile__title">
728                            <label class="gpf-label fr-label" title="${ne.description}">${ne.title}</label>
729                        </p>
730                    </div>
731                </div>
732                <div class="gpf-tile__header fr-tile__header">
733                    <div class="fr-tile__pictogram fr-tile__thumbnail">
734                        <img id="thumbnail-${ne.id}" src="${st}" width="100%" height="100%" title="${ne.description}"/>
735                    </div>
736                    <div class="fr-tile__pictogram fr-tile__icon fr-tile__icon--${ut}">
737                        ${ot}
738                    </div>
739                </div>
740            </div>
741            `),ht=dt.firstChild;return ht&&ht.addEventListener("click",ft=>{ee.onImageTerritoriesClick(ft,ne.id)}),dt.firstChild}},_createTerritoryView:function(ne){var ee=this,te="gpf-territories-view-entry-button-id-"+ne.id;if(ne){var st=stringToHTML$1(`
742            <div class="gpf-panel__views_territories-listview-entry draggable-territories-view">
743                <!-- ${ne.title} -->
744                <div style="display: flex;flex-direction: row;align-items: center;">    
745                    <span class="gpf-btn gpf-btn-icon-territories-draggable gpf-btn--tertiary"></span>
746                    <label class="gpf-label fr-label" title="${ne.description}">${ne.title}</label>
747                </div>
748                <button 
749                    id="${te}" 
750                    type="button" 
751                    class="fr-btn fr-btn--sm fr-btn--icon-left fr-btn--tertiary-no-outline gpf-btn gpf-btn-icon-territories-remove gpf-btn--tertiary"></button>
752            </div>
753            `),ot=st.firstChild;if(ot){ot.addEventListener("click",ut=>{ee.onViewTerritoryClick(ut,ne.id)});var ct=st.querySelector("#"+te);ct&&ct.addEventListener("click",ut=>{ut.stopPropagation(),ee.onViewTerritoryRemoveClick(ut,ne.id)})}return st.firstChild}}};let logger$5=LoggerByDefault.getLogger("territories");class Territories extends ControlExtended{constructor(ee){if(ee=ee||{},super(ee),!(this instanceof Territories))throw new TypeError("ERROR CLASS_CONSTRUCTOR");return this.CLASSNAME="Territories",this.initialize(ee),this.container=this.initContainer(),this.element?this.element.appendChild(this.container):this.element=this.container,this}setMap(ee){if(ee){this.draggable&&Draggable.dragElement(this.panelTerritoriesContainer,this.panelTerritoriesHeaderContainer,ee.getTargetElement()),this.collapsed||this.buttonTerritoriesShow.setAttribute("aria-pressed",!0);var te=this.auto?TerritoriesJson:this.options.territories;for(const ot of te)this.setTerritory(ot)}super.setMap(ee),this.options.position&&this.setPosition(this.options.position),this.options.gutter===!1&&this.getContainer().classList.add("gpf-button-no-gutter");var st=this;this.createDraggableElement(st.element.querySelector("#gpf-territories-views-listview-entries-id"),st),this.dispatchEvent({type:"territories:loaded"})}getTerritories(){return this.territories.map(ee=>ee.data)}findTerritoryById(ee){var te=this.territories.find(st=>st.data.id===ee);return te?te.data:null}validateTerritory(ee){if(!ee||ee.id===void 0||ee.id===null||ee.id==="")return logger$5.error("Invalid territory object. Must have a non-empty id."),null;const te=String(ee.title??""),st=ee.bbox!==void 0&&ee.bbox!==null,ot=ee.point!==void 0&&ee.point!==null;if(!te||!st&&!ot)return logger$5.error("Invalid territory object. Must have title and bbox or point."),null;if(st){const ut=ee.bbox;if(!Array.isArray(ut)||ut.length!==4||ut.some(dt=>typeof dt!="number"||Number.isNaN(dt)))return logger$5.error("Invalid territory bbox. Must be an array of 4 numbers in EPSG:4326."),null}if(ot){const ut=ee.point;if(!Array.isArray(ut)||ut.length!==2||ut.some(dt=>typeof dt!="number"||Number.isNaN(dt)))return logger$5.error("Invalid territory point. Must be an array of 2 numbers in EPSG:4326."),null}var ct={};
753return ct.id=String(ee.id),ct.title=sanitizeHtml(te,{strict:!0}),ct.description=sanitizeHtml(String(ee.description??""),{strict:!0}),ct.bbox=st?ee.bbox:null,ct.point=ot?ee.point:null,ct.zoom=typeof ee.zoom=="number"&&!Number.isNaN(ee.zoom)?ee.zoom:null,ct.thumbnail=sanitizeHtml(String(ee.thumbnail??""),{strict:!0}),ct.icon=sanitizeHtml(String(ee.icon??""),{strict:!0}),ct}setTerritory(ee,te=!1){if(ee=this.validateTerritory(ee),!ee)return!1;var st=this.territories.some(ht=>ht.data.id===ee.id);if(!st){var ot=this._createTerritoryEntry(ee),ct=this._createTerritoryView(ee);if(ot&&ct){this.panelTerritoriesEntriesContainer.appendChild(ot),this.panelTerritoriesViewsContainer.appendChild(ct);var ut=this.element.querySelector("#gpf-territories-views-count-id");if(ut){var dt=this.territories.filter(ht=>!ht.isRemoved).length+1;ut.innerText=dt}return this.territories.push({isRemoved:!1,isAdded:te,data:ee,initialIndex:this.territories.length,domEntry:ot,domView:ct}),!0}}return!1}setTerritories(ee){ee.forEach(te=>{this.setTerritory(te)})}removeTerritory(ee,te=!1){var st=!1;if(ee)for(let ut=0;ut<this.territories.length;ut++){const dt=this.territories[ut];if(dt.data.id===ee.data.id){te?(dt.domEntry.remove(),dt.domView.remove(),this.territories.splice(ut,1)):(dt.isRemoved=!0,dt.domEntry.classList.add("gpf-hidden"),dt.domView.style.display="none"),st=!0;var ot=this.element.querySelector("#gpf-territories-views-count-id");if(ot){var ct=this.territories.filter(ht=>!ht.isRemoved).length;ot.innerText=ct}break}}return st}removeTerritories(){for(const ee of this.territories)ee.domEntry.remove(),ee.domView.remove();this.territories=[]}setCollapse(ee){if(ee===void 0){logger$5.log("[ERROR] Territory:setCollapsed - missing collapsed parameter");return}ee&&this.collapsed||!ee&&!this.collapsed||(ee?this._panelBtnClose.click():this.buttonTerritoriesShow.click(),this.collapsed=ee)}setReduce(ee){ee?this.panelTerritoriesEntriesContainer.classList.add("tiles-reduce"):this.panelTerritoriesEntriesContainer.classList.remove("tiles-reduce")}getContainer(){return this.container}initialize(ee){this.uid=ee.id||SelectorID.generate(),this.options={collapsed:!0,draggable:!1,panel:!0,upload:{active:!1,title:"Ajouter un fichier de configuration",description:""},view:{active:!1,title:"Modifier les territoires",description:""},title:"Sélectionner un territoire",auto:!1,thumbnail:!1,reduce:!1,tiles:3,territories:[]};var te=Helper.assign(this.options.upload,ee.upload);Helper.assign(this.options,ee),Helper.assign(this.options.upload,te),this.collapsed=this.options.collapsed,this.draggable=this.options.draggable,this.auto=this.options.auto,this.territories=[],this.uploadConfig=null,this.append=!1,this.buttonTerritoriesShow=null,this._panelBtnClose=null,this.panelTerritoriesContainer=null,this.panelTerritoriesHeaderContainer=null,this.containerTerritoriesOptions=null,this.panelTerritoriesEntriesContainer=null,this.panelTerritoriesViewsContainer=null}initContainer(){var ee=this._createMainContainerElement(),te=this.buttonTerritoriesShow=this._createShowTerritoriesPictoElement();ee.appendChild(te);var st=this.panelTerritoriesContainer=this._createTerritoriesPanelElement();if(st.classList.add("tiles-direction"),st.classList.add("tiles-"+this.options.tiles),this.options.panel){var ot=this.panelTerritoriesHeaderContainer=this._createPanelHeaderElement({icon:"ign-territories",title:"Sélecteur de territoires",btnClassForClose:"GPshowTerritoriesPicto"});if(this.options.upload&&this.options.upload.active){var ct=this.containerTerritoriesOptions=this._createTerritoriesPanelOptionsElement(this.options.upload.title,this.options.upload.description);ot.insertBefore(ct,ot._closeBtn),ot._closeBtn.classList.remove("fr-ml-auto")}st.appendChild(ot),this._panelBtnClose=ot._closeBtn}var ut=this._createTerritoriesPanelDivElement();st.appendChild(ut);var dt=this._createTerritoriesPanelMenuViewsDivElement(this.options.view.title,this.options.view.description);st.appendChild(dt),this.panelTerritoriesViewsContainer=dt.querySelector("#gpf-territories-views-listview-entries-id"),this.options.view&&!this.options.view.active&&(dt.style.display="none");var ht=this.panelTerritoriesEntriesContainer=this._createTerritoriesElement();return ht.classList.add("tiles-direction"),ht.classList.add("tiles-"+this.options.tiles),this.options.reduce&&ht.classList.add("tiles-reduce"),this.options.thumbnail?ht.classList.add("tiles-thumbn
753ail"):ht.classList.add("tiles-icon"),st.appendChild(ht),ee.appendChild(st),logger$5.log(ee),ee}closePanelUpLoad(){if(this.containerTerritoriesOptions){var ee=this.containerTerritoriesOptions.children[0];ee&&ee.setAttribute("aria-expanded","false");var te=this.containerTerritoriesOptions.children[1];te&&(te.classList.add("gpf-hidden"),te.classList.remove("gpf-visible"))}}onShowTerritoriesClick(ee){ee.target.ariaPressed==="true"&&this.onPanelOpen(),logger$5.trace(ee),this.collapsed=!this.collapsed}onCloseTerritoriesClick(ee){logger$5.trace(ee)}onImageTerritoriesClick(ee,te){logger$5.trace(ee,te);var st=this.territories.find(mt=>mt.data.id===te);if(st){var ot=st.data.zoom,ct=st.data.bbox,ut=st.data.point;if(ct&&!ct.length||!ut&&!ct)return;var dt=this.getMap(),ht=dt.getView().getProjection().getCode();if(ct){var ft=transformExtent(ct,"EPSG:4326",ht);dt.getView().fit(ft,{size:dt.getSize()})}if(ut){var pt=transform$1(ut,"EPSG:4326",ht);dt.getView().setCenter(pt)}ot&&dt.getView().setZoom(ot),this.setCollapse(!0),this.dispatchEvent({type:"territories:change",territory:st.data})}}onUploadFileClick(ee){var te=ee.target.files[0];if(ee.target,!te){logger$5.warn("Missing file to upload !");return}var st=new FileReader,ot=this;st.onerror=ct=>{logger$5.log("onerror")},st.onprogress=ct=>{logger$5.log("onprogress")},st.onloadstart=ct=>{logger$5.log("onloadstart")},st.onabort=ct=>{logger$5.log("onabort")},st.onloadend=ct=>{logger$5.log("onloadend : ",ct)},st.onload=ct=>{logger$5.log("file content : ",ct.target.result);try{if(ot.uploadConfig=JSON.parse(ct.target.result),!ot.uploadConfig){console.error("Invalid configuration file !");return}}catch(ut){console.error("Error parsing configuration file : ",ut);return}},st.readAsText(te)}onUploadToggleClick(ee){this.append=ee.target.checked}onApplyTerritoriesClick(ee){if(logger$5.trace(ee),this.closePanelUpLoad(),!this.uploadConfig){logger$5.error("No configuration to apply !");return}this.append||this.removeTerritories(),this.setTerritories(this.uploadConfig)}onShowTerritoriesViewsClick(ee){logger$5.trace(ee)}onCloseTerritoriesViewsClick(ee){logger$5.trace(ee),this.closePanelUpLoad()}onAddTerritoriesViewClick(ee,te){logger$5.trace(ee,te);var st=sanitizeHtml(te,{strict:!0});if(!st||!st.length){logger$5.error("Invalid view name !");return}var ot=Math.abs(Array.from(st).reduce((pt,mt)=>Math.imul(31,pt)+mt.charCodeAt(0)|0,0)),ct=this.getMap().getView(),ut=ct.getProjection().getCode(),dt=transform$1(ct.getCenter(),ut,"EPSG:4326"),ht=ct.getZoom(),ft={id:ot.toString(),title:st,description:"Vue personnalisée",point:dt,zoom:ht,thumbnail:"",icon:"fr-icon-map-pin-2-line"};this.setTerritory(ft,!0),this.dispatchEvent({type:"territories:add",territory:ft})}onResetTerritoriesViewClick(ee){logger$5.trace(ee);for(const ot of this.territories.slice())ot.isAdded?this.removeTerritory(ot,!0):ot.isRemoved&&(ot.domEntry.classList.remove("gpf-hidden"),ot.domView.style.display="",ot.isRemoved=!1);this.territories.sort((ot,ct)=>ot.initialIndex-ct.initialIndex),this.panelTerritoriesEntriesContainer.innerHTML="",this.territories.forEach(ot=>{this.panelTerritoriesEntriesContainer.appendChild(ot.domEntry)}),this.panelTerritoriesViewsContainer.innerHTML="",this.territories.forEach(ot=>{this.panelTerritoriesViewsContainer.appendChild(ot.domView)});var te=this.element.querySelector("#gpf-territories-views-count-id");if(te){var st=this.territories.filter(ot=>!ot.isRemoved).length;te.innerText=st}this.dispatchEvent({type:"territories:reset",territories:this.getTerritories()})}onViewTerritoryClick(ee,te){logger$5.trace(ee,te)}onViewTerritoryRemoveClick(ee,te){logger$5.trace(ee,te);var st=this.territories.find(ot=>ot.data.id===te);st&&(this.removeTerritory(st,st.isAdded),this.dispatchEvent({type:"territories:remove",territory:st.data}))}onReorderTerritoriesViews(ee){logger$5.trace(ee);const te=Array.from(this.panelTerritoriesViewsContainer.children),st=[];te.forEach(ot=>{const ct=this.territories.find(ut=>ut.domView===ot);ct&&st.push(ct)}),this.territories=st,this.panelTerritoriesEntriesContainer.innerHTML="",this.territories.forEac
753h(ot=>{this.panelTerritoriesEntriesContainer.appendChild(ot.domEntry)}),this.dispatchEvent({type:"territories:order",territories:this.getTerritories()})}}Object.assign(Territories.prototype,PanelDOM);Object.assign(Territories.prototype,TerritoriesDOM);Object.assign(Territories.prototype,Widget);window.ol&&window.ol.control&&(window.ol.control.Territories=Territories);var ControlListDOM={_addUID:function(ne){var ee=this._uid?ne+"-"+this._uid:ne;return ee},_createMainContainerElement:function(){var ne=document.createElement("div");return ne.id=this._addUID("GPcontrolList"),ne.className="GPwidget gpf-widget gpf-widget-button gpf-mobile-fullscreen",ne},_createShowControlListPictoElement:function(){var ne=this,ee=document.createElement("button"),te=document.createElement("span");return ee.appendChild(te),ee.id=this._addUID("GPshowControlListPicto"),ee.classList.add("GPshowOpen","GPshowAdvancedToolPicto","GPshowControlListPicto"),ee.classList.add("gpf-btn","gpf-btn--tertiary","gpf-btn-icon","gpf-btn-icon-controllist"),ee.classList.add("fr-btn","fr-btn--tertiary"),ee.setAttribute("aria-label","Afficher plus"),ee.setAttribute("tabindex","0"),ee.setAttribute("aria-pressed",!1),ee.setAttribute("type","button"),ee.addEventListener("click",function(st){st.stopPropagation();var ot=st.target.ariaPressed==="true";st.target.setAttribute("aria-pressed",!ot),ne.onShowControlListPanelClick(st)}),ee},_createControlListPanelElement:function(){var ne=document.createElement("dialog");return ne.id=this._addUID("GPcontrolListPanel"),ne.className="GPpanel gpf-panel fr-modal",ne},_createControlListPanelDivElement:function(){var ne=document.createElement("div");return ne.className="gpf-panel__body fr-modal__body",ne},_createControlListPanelContentElement:function(){var ne=document.createElement("div");ne.className="gpf-panel__content fr-modal__content fr-p-2v";let ee=document.createElement("ul");return ee.classList.add("fr-m-0","fr-p-0"),ne.appendChild(ee),ne},_createControlListPanelFooterElement:function(ne){var ee=document.createElement("div");ee.className="GPpanelFooter gpf-panel__footer fr-modal__footer";var te=document.createElement("button");return te.classList.add("gpf-btn","gpf-btn--tertiary","fr-btn","fr-btn--tertiary"),te.innerText="+ Ajouter plus d'outils",te.addEventListener("click",function(){ne.click()}),ee.appendChild(te),ee},_createControlListPanelControl:function(ne){let ee;try{ee=ne.getContainer()}catch{ee=ne.container}let te=document.createElement("li");te.classList.add("gpf-list-element","fr-py-0-5v"),te.dataset.name=ne.CLASSNAME,te.setAttribute("role","button"),te.setAttribute("tabindex",0);let st=ee.querySelector(".GPshowOpen"),ot=st.cloneNode();ot.getAttribute("aria-pressed")==="true"&&te.classList.add("gpf-list-element--active"),this._registerControlListStateSync(st,te);let ut=document.createElement("span");ut.className=ot.className,ut.classList.add("gpf-list-element-icon","fr-mx-2v"),te.appendChild(ut);let dt=document.createElement("span");dt.classList.add("gpf-list-element-text"),st.ariaLabel?dt.innerText=st.ariaLabel:ee.querySelector(".GPpanelTitle")?dt.innerText=ee.querySelector(".GPpanelTitle").innerText:ee.querySelector("[class^='gpf-btn-header-']")&&(dt.innerText=ee.querySelector("[class^='gpf-btn-header-']").title),te.appendChild(dt);let ht=()=>{let ft=te.classList.contains("gpf-list-element--active");te.parentNode.querySelectorAll(".gpf-list-element").forEach(pt=>{pt.classList.remove("gpf-list-element--active")}),ft||te.classList.add("gpf-list-element--active"),st.click(),this.setCollapsed(!0)};return te.addEventListener("click",ht),te.addEventListener("keydown",ft=>{["Enter","Space"].includes(ft.code)&&ht()}),te},_createAccessibleSortableElement:function(){let ne=document.createElement("div");ne.className="GPelementHidden GPlayerDragNDrop gpf-btn gpf-btn-icon-ls-draggable gpf-btn--tertiary",ne.title="Deplacer l’outil";let ee=document.createElement("div");ee.className="keyboard-navigation";let te=document.createElement("span");te.tabIndex=0,te.dataset.direction="up",te.title=te.ariaLabel="Déplacer l’outil vers le haut",te.className="fr-icon-arrow-up-line fr-icon--sm",te.onkeydown=ot=>this._onMoveElement(!0,ot);let st=document.createElement("span");return st.tabIndex=0,st.dataset.direction="down",st.title=st.ariaLabel="Déplacer l’outil vers le bas",st.className="fr-icon-arrow-down-line fr-icon--sm",st.onkeydown=ot=>this._onMoveElement(!1,ot),ee.appendChild(st),ee.appendChild(te),ne.appendChild(ee),ne.addEventListener("click",ot=>{ot.stopImmediatePropagation()}),ne},_onMoveElement:function(ne,ee){if(["Enter","Space"].includes(ee.code)){const te=ne?"up":"down",st=ne?"down":"up";ee.stopPropagation(),ee.preventDefault(),this._moveElement(ee.currentTarget.closest(".gpf-list-element--sortable"),te),window.getComputedStyle(ee.currentTarget).visibility=="hidden"?ee.currentTarget.parentNode.querySelector(`[data-direction=${st}
753]`).focus():ee.currentTarget.focus()}},_moveElement:function(ne,ee){const te=this._sortables[0];if(["up","down"].includes(ee)==!1||typeof ne.dataset.name>"u")return!1;let st=ne.dataset.name,ot=te.toArray(),ct=ot.indexOf(st);const ut=ot.length;ot.splice(ct,1);let dt;return ee=="down"?dt=ct===ut-1?0:ct+1:ee=="up"&&(dt=ct===0?ot.length:ct-1),ot.splice(dt,0,st),te.sort(ot,!0),this._onSortedEnd(),!0},_sortables:[],_createSortableElement:function(ne){this._sortables.length&&(this._sortables[0].destroy(),this._sortables=[]);const ee=Sortable.create(ne,{animation:150,handle:".gpf-btn-icon-ls-draggable",draggable:".gpf-list-element--sortable",ghostClass:"gpf-list-element--ghost",dragClass:"gpf-list-element--drag",dataIdAttr:"data-name",onEnd:()=>{this._onSortedEnd()}});return this._sortables=[ee],[...ne.children].forEach(st=>{st.classList.add("gpf-list-element--sortable"),st.appendChild(this._createAccessibleSortableElement())}),ee}},logger$4=LoggerByDefault.getLogger("controlList");class ControlList extends ControlExtended{constructor(ee){if(ee=ee||{},super(ee),!(this instanceof ControlList))throw new TypeError("ERROR CLASS_CONSTRUCTOR");return ee.controlCatalogElement?this.controlCatalogElement=ee.controlCatalogElement:this.controlCatalogElement=null,this.CLASSNAME="ControlList",this.initialize(ee),this._container=this._initContainer(),this.element?this.element.appendChild(this._container):this.element=this._container,this}setMap(ee){ee&&(this.draggable&&Draggable.dragElement(this._ControlListPanelContainer,this._ControlListPanelHeaderContainer,ee.getTargetElement()),this.collapsed||this._pictoControlListButton.setAttribute("aria-pressed",!0)),super.setMap(ee),this.options.position&&this.setPosition(this.options.position)}getCollapsed(){return this.collapsed}setCollapsed(ee){if(ee===void 0){logger$4.log("[ERROR] ControlList:setCollapsed - missing collapsed parameter");return}ee&&this.collapsed||!ee&&!this.collapsed||this._pictoControlListButton.click()}getContainer(){return this._container}clean(){this._clearIsoInputs(),this._originPoint.clearResults(),document.getElementById("GPlocationPoint_1-"+this._uid).style.cssText="",document.getElementById("GPlocationOriginCoords_1-"+this._uid).value="",document.getElementById("GPlocationOrigin_1-"+this._uid).value="",document.getElementById("GPlocationPoint_1-"+this._uid).style.cssText="",document.getElementById("GPlocationOriginPointer_1-"+this._uid).checked=!1,document.getElementById("GPlocationOrigin_1-"+this._uid).className="GPlocationOriginVisible gpf-visible",document.getElementById("GPlocationOriginCoords_1-"+this._uid).className="GPlocationOriginHidden gpf-hidden",this._currentIsoResults=null,this.setLayer()}initialize(ee){ee.collapsed==="true"&&(ee.collapsed=!0),ee.collapsed==="false"&&(ee.collapsed=!1),this.options={collapsed:!0,draggable:!1,sortable:!1,header:!0},Helper.assign(this.options,ee),this.collapsed=this.options.collapsed,this.draggable=this.options.draggable,this.sortable=this.options.sortable,this.sortable&&(this._controlsListSorted=null,this._controlsListStateSync=new globalThis.Map,this._controlsListStateObserver=null),this._uid=this.options.id||SelectorID.generate()}_initContainer(){var ee=this._createMainContainerElement(),te=this._pictoControlListButton=this._createShowControlListPictoElement();ee.appendChild(te);var st=this._ControlListPanelContainer=this._createControlListPanelElement();if(this.options.header){var ot=this._ControlListPanelHeaderContainer=this._createPanelHeaderElement({title:"Mes outils",btnClassForClose:"GPshowControlListPicto"});st.appendChild(ot)}var ct=this._createControlListPanelDivElement();st.appendChild(ct);var ut=this._createControlListPanelContentElement();if(ct.appendChild(ut),this._ControlListPanelContentContainer=ut.children[0],this.controlCatalogElement){var dt=this._createControlListPanelFooterElement(this.controlCatalogElement);ct.appendChild(dt)}return ee.appendChild(st),ee}onShowControlListPanelClick(){this.getMap();var ee=this._pictoControlListButton.ariaPressed;if(this.collapsed=ee!=="true",this.options.position&&!this.collapsed&&this.updatePosition(this.options.position),this.collapsed)this._stopControlListStateObserver(),this._Control
753ListPanelContentContainer.innerHTML="";else{let te=this.getMap().getControls().getArray().filter(st=>st.listable);if(this.sortable&&this._controlsListSorted){let st=Object.fromEntries(this._controlsListSorted.map((ot,ct)=>[ot,ct]));te.sort((ot,ct)=>st[ot.CLASSNAME]-st[ct.CLASSNAME])}te.forEach(st=>{let ot=this._createControlListPanelControl(st);this._ControlListPanelContentContainer.appendChild(ot)}),this.sortable&&this._createSortableElement(this._ControlListPanelContentContainer),this._startControlListStateObserver()}this.dispatchEvent("change:collapsed")}_registerControlListStateSync(ee,te){this._controlsListStateSync.set(ee,te)}_startControlListStateObserver(){this._controlsListStateObserver&&this._controlsListStateObserver.disconnect(),this._controlsListStateObserver=new MutationObserver(ee=>{ee.forEach(te=>{if(te.type!=="attributes"||te.attributeName!=="aria-pressed")return;const st=te.target,ot=this._controlsListStateSync.get(st);if(!ot)return;const ct=st.getAttribute("aria-pressed")==="true";ot.classList.toggle("gpf-list-element--active",ct)})}),this._controlsListStateSync.forEach((ee,te)=>{this._controlsListStateObserver.observe(te,{attributes:!0,attributeFilter:["aria-pressed"]})})}_stopControlListStateObserver(){this._controlsListStateObserver&&(this._controlsListStateObserver.disconnect(),this._controlsListStateObserver=null),this._controlsListStateSync.clear()}_onSortedEnd(){let ee=[...this._ControlListPanelContentContainer.children].map(te=>te.dataset.name);this._controlsListSorted=ee,this.dispatchEvent({type:"controllist:sorted",list:ee})}}Object.assign(ControlList.prototype,PanelDOM);Object.assign(ControlList.prototype,ControlListDOM);Object.assign(ControlList.prototype,Widget);window.ol&&window.ol.control&&(window.ol.control.ControlList=ControlList);var OGCRequest={computeGenericGPFWFS:async function(ne,ee,te=0,st="geom",ot="",ct=4326,ut=!1,dt,ht){let ft=ht,pt=dt;ct!==4326&&([ft,pt]=proj4(proj4.defs("EPSG:4326"),proj4.defs(`EPSG:${ct}`),[ht,dt]));let mt=`INTERSECTS(${st},Point(${ft}%20${pt}))`;te>0&&(mt=`DWITHIN(${st},Point(${ft}%20${pt}),${te},kilometers)`),ot&&(mt+=` ${ot}`);const vt=await(await fetch(`https://data.geopf.fr/wfs/ows?SERVICE=WFS&VERSION=2.0.0&REQUEST=GetFeature&typename=${ne}&outputFormat=json&count=50&CQL_FILTER=${mt}`)).json(),_t=[];return vt.features.forEach(bt=>{const xt=[];ee.forEach(Mt=>{xt.push(bt.properties[Mt])}),ut&&xt.push(bt.geometry),ee.length===1&&xt[0]!==null&&!ut?_t.push(xt[0]):(ee.length>1||ut)&&_t.push(xt)}),_t}},title$4="contextMenu",ContextMenuDOM={_addUID:function(ne){var ee=this.uid?ne+"-"+this.uid:ne;return ee},_createMainContainerElement:function(){var ne=document.createElement("div");return ne.id=this._addUID("GPpointInfo"),ne.className="GPpointInfo GPwidget gpf-widget",ne},_createShowPointInfoPictoElement:function(){var ne=this,ee=document.createElement("button");return ee.id=this._addUID("GPshowPointInfoPicto"),ee.className="GPshowOpen GPshowAdvancedToolPicto GPshowPointInfoPicto gpf-btn gpf-btn-icon gpf-btn-icon-widget fr-btn",ee.title=`${title$4}`,ee.setAttribute("tabindex","0"),ee.setAttribute("aria-pressed",!1),ee.setAttribute("type","button"),ee.addEventListener?ee.addEventListener("click",function(te){var st=te.target.ariaPressed==="true";te.target.setAttribute("aria-pressed",!st),ne.onShowPointInfoClick(te)}):ee.attachEvent&&ee.attachEvent("onclick",function(te){var st=te.target.ariaPressed==="true";te.target.setAttribute("aria-pressed",!st),ne.onShowPointInfoClick(te)}),ee},_createPointInfoPanelElement:function(){var ne=document.createElement("dialog");return ne.id=this._addUID("GPpointInfoPanel"),ne.className="GPpanel gpf-panel fr-modal",ne},_createPointInfoPanelDivElement:function(){var ne=document.createElement("div");return ne.className="gpf-panel__pointInfo",ne},_createPointInfoPanelHeaderElement:function(){var ne=document.createElement("div");return ne.className="GPpointInfoHeader gpf-panel__header gpf-panel__header_pointInfo",ne},_createPointInfoPanelIconElement:function(){var ne=document.createElement("label");return ne.className="GPpanelHeader gpf-btn-header-pointInfo gpf-btn-icon-header-pointInfo",ne.title="Adresse et coordonnées",ne},_createPointInfoPanelTitleElement:function(){var ne=document.createElement("div");return ne.className="GPpanelTitle gpf-panel__title_pointInfo fr-pt-4w",ne.innerHTML="Adresse et coordonnées",ne},_createPointInfoPanelCloseElement:function(){var ne=this,ee=document.createElement("button");ee.className="GPpanelClose GPpointInfoPanelClose gpf-btn gpf-btn-icon-close fr-btn--close fr-btn fr-btn--tertiary-no-outline",ee.title="Fermer le panneau";var te=document.createElement("span");return te.className="GPelementHidden gpf-visible",te.innerText="Fermer",ee.appendChild(te),ee.addEventListener?ee.addEventListener("click",function(){document.getElementById(ne._addUID("GPshowPointInfoPicto")).click(),ne.onClosePointInfoClick()},!1):ee.attachEvent&&ee.attachEvent("onclick",function(){document.getElementById(ne._addUID("GPshowPointInfoPicto")).click(),ne.onClosePointInfoClick()}),ee},_createEntriesElement:function(){var ne=document.createElement("div");
753ne.className="point-info-content gpf-panel__body fr-modal__body";var ee=document.createElement("div");return ne.appendChild(ee),ne},_createPinDOMOverlay:function(ne){var ee=document.createElement("div"),te=document.createElement("img");return te.src=ne,ee.appendChild(te),ee}};/*!
754  * ol-contextmenu - v5.5.0
755  * https://github.com/jonataswalker/ol-contextmenu
756  * Built: Wed Aug 07 2024 12:29:18 GMT+0000 (Coordinated Universal Time)
757  */var k$1=Object.defineProperty,I$1=(ne,ee,te)=>ee in ne?k$1(ne,ee,{enumerable:!0,configurable:!0,writable:!0,value:te}):ne[ee]=te,a$3=(ne,ee,te)=>I$1(ne,typeof ee!="symbol"?ee+"":ee,te),S$2={exports:{}};function x$1(){}x$1.prototype={on:function(ne,ee,te){var st=this.e||(this.e={});return(st[ne]||(st[ne]=[])).push({fn:ee,ctx:te}),this},once:function(ne,ee,te){var st=this;function ot(){st.off(ne,ot),ee.apply(te,arguments)}return ot._=ee,this.on(ne,ot,te)},emit:function(ne){var ee=[].slice.call(arguments,1),te=((this.e||(this.e={}))[ne]||[]).slice(),st=0,ot=te.length;for(st;st<ot;st++)te[st].fn.apply(te[st].ctx,ee);return this},off:function(ne,ee){var te=this.e||(this.e={}),st=te[ne],ot=[];if(st&&ee)for(var ct=0,ut=st.length;ct<ut;ct++)st[ct].fn!==ee&&st[ct].fn._!==ee&&ot.push(st[ct]);return ot.length?te[ne]=ot:delete te[ne],this}};S$2.exports=x$1;var _$1=S$2.exports.TinyEmitter=x$1,L$1=(ne=>(ne.CONTEXTMENU="contextmenu",ne.CLICK="click",ne.DBLCLICK="dblclick",ne))(L$1||{}),p$2=(ne=>(ne.BEFOREOPEN="beforeopen",ne.OPEN="open",ne.CLOSE="close",ne.ADD_MENU_ENTRY="add-menu-entry",ne))(p$2||{});let w$1=class extends MapBrowserEvent{constructor(ee){super(ee.type,ee.map,ee.originalEvent)}};const z$1={width:150,scrollAt:4,eventType:L$1.CONTEXTMENU,defaultItems:!0,items:[]},d$2="ol-ctx-menu",r$3={container:`${d$2}-container`,separator:`${d$2}-separator`,submenu:`${d$2}-submenu`,hidden:`${d$2}-hidden`,icon:`${d$2}-icon`,zoomIn:`${d$2}-zoom-in`,zoomOut:`${d$2}-zoom-out`,unselectable:"ol-unselectable"},C$2=[{text:"Zoom In",classname:`${r$3.zoomIn} ${r$3.icon}`,callback:(ne,ee)=>{const te=ee.getView();te.animate({zoom:Number(te.getZoom())+1,duration:700,center:ne.coordinate})}},{text:"Zoom Out",classname:`${r$3.zoomOut} ${r$3.icon}`,callback:(ne,ee)=>{const te=ee.getView();te.animate({zoom:Number(te.getZoom())-1,duration:700,center:ne.coordinate})}}];function y$2(ne){const ee=document.createDocumentFragment(),te=document.createElement("div");for(te.innerHTML=ne;te.firstChild;)ee.append(te.firstChild);return ee}function P$1(ne){var ht,ft;const ee=document.importNode(ne),te=ne.offsetWidth;ee.style.cssText=`position: fixed; top: 0; left: 0; overflow: auto; visibility: hidden; pointer-events: none; height: unset; max-height: unset; width: ${te}px`;const st=y$2("<span>Foo</span>"),ot=y$2("<span>Foo</span>"),ct=document.createElement("li"),ut=document.createElement("li");ct.append(st),ut.append(ot),ee.append(ct),ee.append(ut),(ht=ne.parentNode)==null||ht.append(ee);const dt=ee.offsetHeight/2;return(ft=ne.parentNode)==null||ft.removeChild(ee),dt}function N$1({parentNode:ne,item:ee,isSubmenu:te=!1,isInsideSubmenu:st=!1,emitter:ot}){const ct=`_${Math.random().toString(36).slice(2,11)}`;if(typeof ee!="string"&&"text"in ee){const pt=`<span>${ee.text}</span>`,mt=y$2(pt),yt=document.createElement("li");ee.classname=ee.classname||"",ee.icon&&(ee.classname===""?ee.classname=r$3.icon:ee.classname.includes(r$3.icon)===!1&&(ee.classname+=` ${r$3.icon}`),yt.setAttribute("style",`background-image:url(${ee.icon})`)),yt.id=ct,yt.className=ee.classname,yt.append(mt),ne.append(yt);const vt={id:ct,isSubmenu:te,isInsideSubmenu:st,isSeparator:!1,callback:"callback"in ee?ee.callback:null,data:"data"in ee?ee.data:null};return ot.emit(p$2.ADD_MENU_ENTRY,vt,yt),yt}const ut=`<li id="${ct}" class="${r$3.separator}"><hr></li>`,dt=y$2(ut);ne.append(dt);const ht=ne.lastChild,ft={id:ct,isSubmenu:!1,isInsideSubmenu:!1,isSeparator:!0,callback:null,data:null};return ot.emit(p$2.ADD_MENU_ENTRY,ft,ht),ht}function M$2({container:ne,items:ee,menuWidth:te,isInsideSubmenu:st,emitter:ot}){ee.forEach(ct=>{if(typeof ct!="string"&&"items"in ct&&Array.isArray(ct.items)){const ut=N$1({parentNode:ne,item:ct,isSubmenu:!0,emitter:ot});ut.classList.add(r$3.submenu);const dt=document.createElement("ul");dt.classList.add(r$3.container),dt.style.width=`${te}px`,ut.append(dt),M$2({emitter:ot,menuWidth:te,container:dt,items:ct.items,isInsideSubmenu:!0})}else N$1({parentNode:ne,item:ct,isSubmenu:!1,isInsideSubmenu:st,emitter:ot})})}function b$2(ne,ee){if(!ne)throw new Error(ee)}let R$1=class extends Control{constructor(ee={}){b$2(typeof ee=="object","@param `opts` should be object type!");const te=document.createElement("div");super({element:te}),a$3(this,"map"),a$3(this,"emitter",new _$1),a$3(this,"container"),a$3(this,"coordinate",[]),a$3(this,"pixel",[]),a$3(this,"contextMenuEventListener"),a$3(this,"entryCallbackEventListener"),a$3(this,"mapMoveListener"),a$3(this,"lineHeight",0),a$3(this,"disabled"),a$3(this,"opened"),a$3(this,"items",[]),a$3(this,"menuEntries",new Map),a$3(this,"options"),this.options={...z$1,...ee};const st=document.createElement("ul");te.append(st),te.style.width=`${this.options.width}px`,te.classList.add(r$3.container,r$3.unselectable,r$3.hidden),this.container=te,this.contextMenuEventListener=ot=>{this.handleContextMenu(ot)},this.entryCallbackEventListener=ot=>{this.handleEntryCallback(ot)},this.mapMoveListener=()=>{this.handleMapMove()},this.disabled=!1,this.opened=!1,window.addEventListener("beforeunload",()=>{this.removeListeners()},{once:!0})}clear(){for(const ee of this.menuEntries.keys())this.removeMenuEntry(ee);this.container.replaceChildren(),this.container.append(document.createElement("ul"))}enable(){this.disabled=!1}disable(){this.disabled=!0}getDefaultItems(){return C$2}countItems(){return this.menuEntries.size}extend(ee){b$2(Array.isArray(ee),"@param `items` should be an Array."),M$2({items:ee,emitter:this.emitter,menuWidth:this.options.width,container:this.container.firstElementChild})}closeMenu(){this.opened=!1,this.container.classList.add(r$3.hidden),this.dispatchEvent(p$2.CLOSE)}isOpen(){return this.opened}updatePosition(ee){b$2(Array.isArray(ee),"@param `pixel` should be an Array."),this.isOpen()&&(this.pixel=ee,this.positionContainer())}pop(){const ee=Array.from(this.menuEntries.keys()).pop();ee&&this.removeMenuEntry(ee)}shift(){const ee=Array.from(this.menuEntries.keys()).shift();ee&&this.removeMenuEntry(ee)}push(ee){ee&&this.extend([ee])}setMap(ee){if(super.setMap(ee),ee){this.map=ee,ee.getViewport().addEventListener(this.options.eventType,this.contextMenuEventListener,!1),ee.on("movestart",()=>{this.handleMapMove()}),this.emitter.on(p$2.ADD_MENU_ENTRY,(st,ot)=>{this.handleAddMenuEntry(st,ot)},this),this.items=this.options.defaultItems?this.options.items.concat(C$2):this.options.items,M$2({items:this.items,emitter:this.emitter,menuWidth:this.options.width,container:this.container.firstElementChild});const te=this.getMenuEntriesLength();this.lineHeight=te>0?this.container.offsetHeight/te:P$1(this.container)}else this.removeListeners(),this.clear()}removeListeners(){this.map.getViewport().removeEventListener(this.options.eventType,this.contextMenuEventListener,!1),this.emitter.off(p$2.ADD_MENU_ENTRY)}removeMenuEntry(ee){let te=document.getElementById(ee);te==null||te.remove(),te=null,this.menuEntries.delete(ee)}handleContextMenu(ee){var te;
757this.coordinate=this.map.getEventCoordinate(ee),this.pixel=this.map.getEventPixel(ee),this.dispatchEvent(new w$1({map:this.map,originalEvent:ee,type:p$2.BEFOREOPEN})),!this.disabled&&(this.options.eventType===L$1.CONTEXTMENU&&(ee.stopPropagation(),ee.preventDefault()),setTimeout(()=>{this.openMenu(ee)}),(te=ee.target)==null||te.addEventListener("pointerdown",st=>{this.opened&&(st.stopPropagation(),this.closeMenu())},{once:!0}))}openMenu(ee){this.opened=!0,this.positionContainer(),this.container.classList.remove(r$3.hidden),this.dispatchEvent(new w$1({map:this.map,originalEvent:ee,type:p$2.OPEN}))}getMenuEntriesLength(){return Array.from(this.menuEntries).filter(([,ee])=>ee.isSeparator===!1&&ee.isSubmenu===!1&&ee.isInsideSubmenu===!1).length}positionContainer(){const ee=this.map.getSize()||[0,0],te={w:ee[0]-this.pixel[0],h:ee[1]-this.pixel[1]},st=this.getMenuEntriesLength(),ot={w:this.container.offsetWidth,h:Math.round(this.lineHeight*st)},ct=te.w>=ot.w?this.pixel[0]+5:this.pixel[0]-ot.w;this.container.style.left=`${ct}px`,this.container.style.top=te.h>=ot.h?`${this.pixel[1]-10}px`:`${this.pixel[1]-ot.h}px`,this.container.style.right="auto",this.container.style.bottom="auto",te.w-=ot.w;const ut=ft=>Array.from(ft.children).filter(pt=>pt.tagName==="LI"&&pt.classList.contains(r$3.submenu));let dt=0;const ht=(ft,pt)=>{dt+=1,ut(ft).forEach(mt=>{const yt=pt>=ot.w?ot.w-8:(ot.w+8)*-1,vt=mt.querySelector(`ul.${r$3.container}`),_t=Math.round(this.lineHeight*Array.from(vt.children).filter(bt=>bt.tagName==="LI").length);vt.style.left=`${yt}px`,vt.style.right="auto",vt.style.top=te.h>=_t+ot.h?"0":`-${vt.offsetHeight-25}px`,vt.style.bottom="auto",vt.style.zIndex=String(dt),ut(vt).length>0&&ht(vt,pt-ot.w)})};ht(this.container.firstElementChild,te.w)}handleMapMove(){this.closeMenu()}handleEntryCallback(ee){var ct;ee.preventDefault(),ee.stopPropagation();const te=ee.currentTarget,st=this.menuEntries.get(te.id);if(!st)return;const ot={data:st.data,coordinate:this.coordinate};this.closeMenu(),(ct=st.callback)==null||ct.call(st,ot,this.map)}handleAddMenuEntry(ee,te){this.menuEntries.set(ee.id,ee),this.positionContainer(),"callback"in ee&&typeof ee.callback=="function"&&te.addEventListener("click",this.entryCallbackEventListener,!1)}};var logger$3=LoggerByDefault.getLogger("contextMenu");class ContextMenu extends ControlExtended{constructor(ee){if(ee=ee||{},super({element:ee.element,target:ee.target,render:ee.render}),!(this instanceof ContextMenu))throw new TypeError("ERROR CLASS_CONSTRUCTOR");return this.CLASSNAME="ContextMenu",this.initialize(ee),this.container=this.initContainer(),this.element?this.element.appendChild(this.container):this.element=this.container,this}setMap(ee){ee?(ee.addControl(this.contextmenu),ee.addOverlay(this._marker),this.auto&&this.addEventsListeners()):this.auto&&this.removeEventsListeners(),super.setMap(ee)}updateContextMenuItems(ee){ee instanceof Array&&(this.contextMenuItemsOptions=ee.map(te=>({...te,classname:te.classname??"ol-context-menu-custom fr-text--md"})))}initialize(ee){this.uid=SelectorID.generate(),this.options={collapsed:!0,draggable:!1,auto:!0,panel:!0,contextMenuItemsOptions:[]},Helper.assign(this.options,ee),this.collapsed=this.options.collapsed,this.draggable=this.options.draggable,this.auto=this.options.auto,this.buttonContextMenuShow=null,this.panelContextMenuContainer=null,this.panelContextMenuHeaderContainer=null,this.buttonContextMenuClose=null,this.panelContextMenuEntriesContainer=null,this.eventsListeners=[],this.controlList=[],this._listenersAdded=!1,this._onContextBeforeOpen=null,this._onContextOpen=null,this._onContextClose=null,this._onDocumentClick=null,this.itiPoints=new Array(7),this._marker=new Overlay({element:this._createPinDOMOverlay(Marker.lightOrange),stopEvent:!1,offset:Marker.defaultOffset});var te=this.getAvailableContextMenuControls.call(this);this.contextMenuItemsOptions=[],ee.contextMenuItemsOptions instanceof Array&&ee.contextMenuItemsOptions&&ee.contextMenuItemsOptions.length>0&&(this.contextMenuItemsOptions=ee.contextMenuItemsOptions.map(st=>({...st,classname:st.classname??"ol-context-menu-custom fr-text--md"}))),this.contextmenu=new R$1({defaultItems:!1,width:250,items:te})}initContainer(){var ee=this._createMainContainerElement(),te=this.buttonPointInfoShow=this._createShowPointInfoPictoElement();ee.appendChild(te);var st=this.panelPointInfoContainer=this._createPointInfoPanelElement(),ot=this._createPointInfoPanelDivElement();st.appendChild(ot);var ct=this.panelPointInfoEntriesContainer=this._createEntriesElement();st.appendChild(ct);var ut=this.panelPointInfoHeaderContainer=this._createPointInfoPanelHeaderElement(),dt=this._createPointInfoPanelIconElement();ut.appendChild(dt);var ht=this._createPointInfoPanelTitleElement();ut.appendChild(ht);var ft=this.buttonPointInfoClose=this._createPointInfoPanelCloseElement();return ut.appendChild(ft),ot.appendChild(ut),ee.appendChild(st),logger$3.log(ee),ee}addEventsListeners(){this._listenersAdded||(this._onContextBeforeOpen=ee=>{ee.this=this,this.onBeforeOpenContextMenu(ee)},this._onContextOpen=ee=>{ee.this=this,this.onOpenContextMenu(ee)},this._onContextClose=ee=>{ee.this=this,this.onCloseContextMenu(ee)},this._onDocumentClick=ee=>{this.container.contains(ee.target)||this.contextmenu.closeMenu()},this.contextmenu.on("beforeopen",this._onContextBeforeOpen),this.contextmenu.on("open",this._onContextOpen),this.contextmenu.on("close",this._onContextClose),document.addEventListener("click",this._onDocumentClick),this._listenersAdded=!0)}removeEventsListeners(){this._listenersAdded&&(this._onContextBeforeOpen&&this.contextmenu.un("beforeopen",this._onContextBeforeOpen),this._onContextOpen&&this.contextmenu.un("open",this._onContextOpen),this._onContextClose&&this.contextmenu.un("close",this._onContextClose),this._onDocumentClick&&document.removeEventListener("click",this._onDocumentClick),this._onContextBeforeOpen=null,this._onContextOpen=null,this._onContextClose=null,this._onDocumentClick=null,this._listenersAdded=!1)}getAvailableContextMenuControls(){var ee=[{text:"Adresse / Coordonnées",classname:"ol-context-menu-custom fr-text--md",callback:this.displayAdressAndCoordinate.bind(this),control_CLASSNAME:"ContextMenu"},{text:"Itinéraire depuis ce lieu",classname:"ol-context-menu-custom fr-text--md",callback:this.defineStartPoint.bind(this),control_CLASSNAME:"Route"},{text:"Itinéraire vers ce lieu",classname:"ol-context-menu-custom fr-text--md",callback:this.defineEndPoint.bind(this),control_CLASSNAME:"Route"},{text:"Zone selon temps de trajet",classname:"ol-context-menu-custom fr-text--md",callback:this.computeIsochrone.bind(this),control_CLASSNAME:"Isocurve"}],te=this.getMap(),st=[];te&&(st=te.getControls().getArray());var ot=ee.filter(ct=>{if(st.filter(dt=>dt.CLASSNAME&&dt.CLASSNAME==ct.control_CLASSNAME).length>0||ct=="separator")return ct});return Array.prototype.push.apply(ot,this.contextMenuItemsOptions),ot}defineStartPoint(ee){let te=this.to4326(ee.coordinate);var st=this.getMap().getControls().getArray().filter(ot=>ot.CLASSNAME=="Route")[0];st._showRouteButton.click(),st._showRouteButton.setAttribute("aria-pressed",!0),this.itiPoints[0]=te,st.setData({points:this.itiPoints})}defineEndPoint(ee){let te=this.to4326(ee.coordinate);var st=this.getMap().getControls().getArray().filter(ot=>ot.CLASSNAME=="Route")[0];st._showRouteButton.click(),st._showRouteButton.setAttribute("aria-pressed",!0),this.itiPoints[6]=te,st.setData({points:this.itiPoints})}to4326(ee){return transform$1([parseFloat(ee[0]),parseFloat(ee[1])],"EPSG:3857","EPSG:4326")}computeIsochrone(ee){var te=this.getMap().getControls().getArray().filter(ct=>ct.CLASSNAME=="Isocurve")[0];te._pictoIsoButton.click(),te._pictoIsoButton.setAttribute("aria-pressed",!0);let st=this.to4326(ee.coordinate);var ot=te.getData();ot.point=st,te.setData(ot)}getFeatureInfo(ee){var te=this.getMap().getControls().getArray().filter(ut=>ut.CLASSNAME=="GetFeatureInfo")[0],st=te.getActive();te.setActive(!0);
757let ct={pixel:this.getMap().getPixelFromCoordinate(ee.coordinate),map:this.getMap(),coordinate:ee.coordinate};this.getMap().dispatchEvent({type:"singleclick",...ct}),st||te.setActive(!1)}displayLegend(ee){var te=this.getMap().getControls().getArray().filter(st=>st.CLASSNAME=="Legends")[0];te.buttonLegendsShow.click(),te.buttonLegendsShow.setAttribute("aria-pressed",!0)}openCatalogue(ee){var te=this.getMap().getControls().getArray().filter(st=>st.CLASSNAME=="Catalog")[0];te.buttonCatalogShow.click(),te.buttonCatalogShow.setAttribute("aria-pressed",!0)}displayAdressAndCoordinate(ee){let te=this.to4326(ee.coordinate);this.panelPointInfoEntriesContainer.innerHTML="",this._marker.setPosition(fromLonLat(te)),this.buttonPointInfoShow.click(),this.buttonPointInfoShow.setAttribute("aria-pressed",!0);var st=document.createElement("div");st.innerHTML=te[1].toFixed(6)+", "+te[0].toFixed(6);var ot=document.createElement("div"),ct=document.createElement("div"),ut=document.createElement("div");this.panelPointInfoEntriesContainer.appendChild(st),this.panelPointInfoEntriesContainer.appendChild(ot),this.panelPointInfoEntriesContainer.appendChild(ct),this.panelPointInfoEntriesContainer.appendChild(ut);var dt={rawResponse:!1,scope:null,onSuccess:function(mt){mt.elevations.length>0&&mt.elevations[0].z&&(ut.innerHTML="Altitude : "+mt.elevations[0].z+"m")},onFailure:function(mt){},positions:[{lon:te[0],lat:te[1]}],outputFormat:"json",serverUrl:this.options.altiServerUrl,resource:this.options.altiResource};Gp.Services.getAltitude(dt);var ht={onSuccess:function(mt){mt.locations.length>0&&(ct.innerHTML="Parcelle : "+mt.locations[0].placeAttributes.districtcode+" / "+mt.locations[0].placeAttributes.section+" / "+mt.locations[0].placeAttributes.number)},onFailure:function(mt){},position:{lon:te[0],lat:te[1]},searchGeometry:{type:"Circle",coordinates:[te[0],te[1]],radius:100},index:"CadastralParcel",maximumResponses:1,serverUrl:this.options.reverseGeocodeServerUrl};Gp.Services.reverseGeocode(ht);var ft=async function(){let mt={layer:"LIMITES_ADMINISTRATIVES_EXPRESS.LATEST:commune",attributes:["code_postal","nom_officiel"]};const yt=await OGCRequest.computeGenericGPFWFS(mt.layer,mt.attributes,mt.around||0,mt.geom_name||"geometrie",mt.additional_cql||"",mt.epsg||4326,mt.get_geom||!1,te[0],te[1]);yt.length&&(ot.innerHTML=yt[0].join(", "))},pt={onSuccess:function(mt){mt.locations.length>0?ot.innerHTML=mt.locations[0].placeAttributes.label:ft()},onFailure:function(mt){ft()},position:{lon:te[0],lat:te[1]},searchGeometry:{type:"Circle",coordinates:[te[0],te[1]],radius:100},index:"StreetAddress",maximumResponses:1,serverUrl:this.options.reverseGeocodeServerUrl};Gp.Services.reverseGeocode(pt)}onShowPointInfoClick(ee){ee.target.ariaPressed==="true"&&this.onPanelOpen(),logger$3.trace(ee);var te=this.buttonPointInfoShow.ariaPressed;this.collapsed=te!=="true",this.dispatchEvent("change:collapsed"),this.options.position&&!this.collapsed&&this.updatePosition(this.options.position)}onClosePointInfoClick(ee){logger$3.trace(ee),this._marker.setPosition(void 0)}onCloseContextMenu(ee){ee.target.clear()}onBeforeOpenContextMenu(ee){var dt;const te=this.getMap();if(!te)return;const st=te.getViewport(),ot=(dt=ee==null?void 0:ee.originalEvent)==null?void 0:dt.target;var ct=!st||ot&&!st.contains(ot),ut=ot&&ot.closest(".GPwidget, .gpf-widget, .ol-control");ct||ut?this.contextmenu.disable():this.contextmenu.enable()}onOpenContextMenu(ee){var dt;const te=this.getMap();if(!te)return;const st=te.getViewport(),ot=(dt=ee==null?void 0:ee.originalEvent)==null?void 0:dt.target;if(!st||ot&&!st.contains(ot)){this.contextmenu.clear(),this.contextmenu.closeMenu();return}if(ot&&ot.closest(".GPwidget, .gpf-widget, .ol-control")){this.contextmenu.clear(),this.contextmenu.closeMenu();return}var ct=()=>{ee.this.controlList=[];var ht=ee.this.getMap().getControls().getArray().filter(ft=>ft.CLASSNAME=="Route");ht.length>0&&ht[0].on("route:newresults",()=>{ee.this.itiPoints=new Array(7)})},ut=ee.this.getAvailableContextMenuControls();ee.target.clear(),ee.target.extend(ut),ct()}}Object.assign(ContextMenu.prototype,ContextMenuDOM);Object.assign(ContextMenu.prototype,ContextMenu);Object.assign(ContextMenu.prototype,Widget);window.ol&&window.ol.control&&(window.ol.control.ContextMenu=ContextMenu);var title$3="reporting";const stringToHTML=ne=>{var ee=function(){if(!window.DOMParser)return!1;var ct=new DOMParser;try{ct.parseFromString("x","text/html")}catch{return!1}return!0};if(ee()){var te=new DOMParser,st=te.parseFromString(ne,"text/html");return st.body}var ot=document.createElement("div");return ot.innerHTML=ne,ot};var ReportingDOM={_addUID:function(ne){var ee=this.uid?ne+"-"+this.uid:ne;return ee},_createMainContainerElement:function(){var ne=document.createElement("div");return ne.id=this._addUID("GPreporting"),ne.className="gpf-widget gpf-widget-button gpf-mobile-fullscreen",ne},_createShowReportingPictoElement:function(){var ne=this,ee=document.createElement("button"),te=document.createElement("span");return ee.appendChild(te),ee.id=this._addUID("GPshowReportingPicto"),ee.className="gpf-btn gpf-btn--tertiary gpf-btn-icon gpf-btn-icon-reporting fr-btn fr-btn--tertiary ",ee.title=`${title$3}`,ee.setAttribute("aria-label","Signalement"),ee.setAttribute("tabindex","0"),ee.setAttribute("aria-pressed",!1),ee.setAttribute("type","button"),ee.addEventListener?ee.addEventListener("click",function(st){var ot=st.target.ariaPressed==="true";st.target.setAttribute("aria-pressed",!ot),ne.onShowReportingClick(st)}):ee.attachEvent&&ee.attachEvent("onclick",function(st){var ot=st.target.ariaPressed==="true";st.target.setAttribute("aria-pressed",!ot),ne.onShowReportingClick(st)}),ee},_createReportingPanelElement:function(){var ne=document.createElement("dialog");return ne.id=this._addUID("GPreportingPanel"),ne.className="GPpanel gpf-panel fr-modal",ne},_createReportingPanelDivElement:function(){var ne=document.createElement("div");
757return ne.className="gpf-panel__body fr-modal__body",ne},_createReportingPanelFooterElement:function(){var ne=document.createElement("div");return ne.className="gpf-panel__footer fr-modal__footer gpf-panel__footer_reporting gpf-visible",ne},_createReportingButtonAnnulerFooterElement:function(){var ne=this,ee=document.createElement("button");return ee.className="gpf-btn gpf-btn--tertiary gpf-btn-icon-annuler fr-btn fr-btn--tertiary fr-m-1w",ee.title="Annuler",ee.textContent="Annuler",ee.addEventListener?ee.addEventListener("click",function(te){ne.onCancelReportingClick(te)},!1):ee.attachEvent&&ee.attachEvent("onclick",function(te){ne.onCancelReportingClick(te)}),ee},_createReportingButtonSuivantFooterElement:function(){var ne=this,ee=document.createElement("button");return ee.className="gpf-btn gpf-btn--primary gpf-btn-icon-suivant fr-btn fr-btn--primary fr-m-1w",ee.title="Suivant",ee.textContent="Suivant",ee.addEventListener?ee.addEventListener("click",function(te){ne.onNextReportingClick(te)},!1):ee.attachEvent&&ee.attachEvent("onclick",function(te){ne.onNextReportingClick(te)}),ee},_createReportingPanelInputElement:function(){var ne=document.createElement("div");ne.id=this._addUID("GPreportingPanelInput"),ne.className="gpf-panel__content fr-modal__content fr-px-3w gpf-hidden";var ee=document.createElement("p");return ee.innerHTML="Cliquez sur la carte à l'endroit que vous souhaitez corriger.",ee.className="gpf-label fr-label",ne.appendChild(ee),ne},_createReportingPanelFormElement:function(ne){var ee=this,te=document.createElement("form");te.id=this._addUID("GPreportingForm"),te.className="gpf-panel__content fr-modal__content gpf-hidden",te.addEventListener("submit",function(Ot){Ot.preventDefault();var kt=document.getElementById(st).value,Nt=document.getElementById(dt).value,Gt=document.getElementById(ct),Bt=Gt.options[Gt.selectedIndex].textContent;return ee.onReportingFormSubmit({target:Ot.target,name:kt,desc:Nt,theme:Bt}),!1});var st=this._addUID("GPreportingFormLabelName"),ot=`
758        <div class="fr-input-group">
759            <label class="gpf-label fr-label" for="${st}">Titre (obligatoire)</label>
760            <input class="gpf-input fr-input" type="text" id="${st}" name="GPreportingLabelName" required>
761        </div>
762        `,ct=this._addUID("GPreportingFormSelectTheme"),ut=`
763        <div class="fr-select-group">
764            <label class="gpf-label fr-label" for="${ct}">
765                Objet du signalement (obligatoire)
766            </label>
767            <select class="gpf-select fr-select" id="${ct}" name="GPreportingSelectTheme" required>
768                <option value="" selected disabled >Sélectionner une option</option>
769                ${ne.map(Ot=>`<option value="${Ot}">${Ot}</option>`).join("")}
770            </select>
771        </div>
772        `,dt=this._addUID("GPreportingFormTextDesc"),ht=`
773        <div class="fr-input-group">
774            <label class="gpf-label fr-label" for="${dt}">
775                Description (obligatoire)
776            </label>
777            <textarea class="gpf-input fr-input" id="${dt}" name="GPreportingTextDesc" required></textarea>
778        </div>
779        `,ft=this._addUID("GPreportingFormButtonDrawing"),pt=`
780        <div class="gpf-btn-group">
781            <button id="${ft}" class="gpf-btn fr-btn fr-btn--secondary fr-btn--icon-left fr-icon-edit-box-line">
782                Dessiner sur la carte
783            </button>
784        </div>
785        `,mt=`
786        <fieldset class="fr-fieldset" id="GPreportingFormFieldset" role="group" aria-labelledby="GPreportingFormFieldsetMessages">
787            ${ot}
788            ${ut}
789            ${ht}
790            <div class="fr-messages-group gpf-hidden" id="GPreportingFormFieldsetMessages" aria-live="polite">
791                <p class="fr-message fr-message--error" id="GPreportingFormFieldsetMessage">Les champs sont obligatoires</p>
792            </div>
793            ${pt}
794        </fieldset>
795        `,yt=stringToHTML(mt);const vt=yt.attachShadow({mode:"open"});vt.innerHTML=mt.trim();var _t=vt.getElementById(ft);_t&&_t.addEventListener("click",Ot=>{this.onShowFormDrawingReportingClick(Ot)});var bt=vt.getElementById(st);bt&&bt.addEventListener("change",Ot=>{this.onEntryFormNameReportingChange(Ot)});var xt=vt.getElementById(ct);xt&&xt.addEventListener("change",Ot=>{this.onSelectFormThemeReportingChange(Ot)});var Mt=vt.getElementById(dt);return Mt&&Mt.addEventListener("change",Ot=>{this.onEntryFormDescReportingChange(Ot)}),te.appendChild(vt),te},_createReportingSubmitFormElement:function(){var ne=document.createElement("input");return ne.id=this._addUID("GPreportingSubmit"),ne.className="gpf-btn fr-btn gpf-hidden",ne.type="submit",ne.value="",ne},_createReportingPanelDrawingElement:function(){var ne=document.createElement("div");return ne.id=this._addUID("GPreportingPanelDrawing"),ne.className="gpf-panel__content fr-modal__content gpf-hidden",ne},_createReportingPanelSendElement:function(){var ne=document.createElement("div");ne.id=this._addUID("GPreportingPanelSend"),ne.className="gpf-panel__content fr-modal__content fr-px-3w gpf-hidden";var ee=this._addUID("GPreportingLabelEmail"),te=`
796        <div class="fr-input-group">
797            <label class="gpf-label fr-label" for="${ee}">Adresse courriel
798                <span class="fr-hint-text">Pour valider le signalement, renseignez votre adresse courriel. Nous vous tiendrons informés de sa prise en compte.</span>
799            </label>
800            <input class="gpf-input fr-input" type="text" id="${ee}" name="GPreportingLabelEmail" required>
801        </div>
802        `,st=this._addUID("GPreportingButtonEnvoyer"),ot=`
803        <div class="gpf-btn-group fr-pb-1w">
804            <button id="${st}" class="gpf-btn fr-btn fr-btn--primary">
805                Envoyer
806            </button>
807        </div>
808        `,ct=`
809        <fieldset class="fr-fieldset" id="GPreportingSendFieldset" role="group" aria-labelledby="GPreportingSendFieldsetMessages">
810            ${te}
811            ${ot}
812            <div class="fr-messages-group gpf-hidden" id="GPreportingSendFieldsetMessages" aria-live="polite">
813                <p class="fr-message fr-message--error" id="GPreportingSendFieldsetMessage">Le champ est obligatoire</p>
814            </div>
815        </fieldset>
816        `,ut=stringToHTML(ct);const dt=ut.attachShadow({mode:"open"});dt.innerHTML=ct.trim();var ht=dt.getElementById(st);ht&&ht.addEventListener("click",pt=>{this.onShowSendReportingClick({target:pt.target,mail:document.getElementById(ee).value})});var ft=dt.getElementById(ee);return ft&&ft.addEventListener("change",pt=>{this.onEntrySendMailReportingChange(pt)}),ne.appendChild(dt),ne},_createReportingErrorSendElement:function(){var ne=this._addUID("GPreportingSpanError"),ee=document.createElement("span");return ee.id=ne,ee.className="gpf-error fr-error fr-error-text gpf-hidden",ee.innerHTML="Une erreur est survenue lors de l'envoi du signalement. <br> Veuillez réessayer plus tard.",ee}},logger$2=LoggerByDefault.getLogger("reporting");class InputActionByDefaut{constructor(ee){logger$2.info("InputActionByDefaut constructor"),this.map=ee||null,this.data=null,this.coordinate=null,this.listener=null,this.icon="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAzNiIgd2lkdGg9IjQ4IiBoZWlnaHQ9IjQ4Ij48cGF0aCBmaWxsPSIjMDAwMDkxIiBkPSJNMTguMzY0IDMuNjM2YTkgOSAwIDAgMSAwIDEyLjcyOEwxMiAyMi43MjhsLTYuMzY0LTYuMzY0QTkgOSAwIDAgMSAxOC4zNjQgMy42MzZaTTEyIDhhMiAyIDAgMSAwIDAgNCAyIDIgMCAwIDAgMC00WiIvPjwvc3ZnPg=="}setMap(ee){logger$2.info("InputActionByDefaut map"),this.map=ee}setIcon(ee){logger$2.info("InputActionByDefaut icon"),ee&&(this.icon=ee)}getData(){logger$2.info("InputActionByDefaut data");var ee=this.map.getView().getProjection();this.coordinate||(this.coordinate=this.map.getView().getCenter());var te={type:"FeatureCollection",crs:{type:"name",properties:{name:ee.getCode()}},features:[{type:"Feature",crs:{type:"name",properties:{name:ee.getCode()}},geometry:{type:"Point",coordinates:this.coordinate||[0,0]},properties:{description:"Point de signalement",date:new Date().toISOString(),author:"Anonyme"}}]};return this.data={location:te},this.data||{location:null}}clear(){logger$2.info("InputActionByDefaut clear"),this.data=null,this.coordinate=null,this.listener&&(unByKey(this.listener),this.listener=null),this.marker!=null&&(this.map.removeOverlay(this.marker),this.marker=null)}active(){this._addEventsListeners()}disable(){this._removeEventsListeners()}_addEventsListeners(){logger$2.info("InputActionByDefaut active"),this.map&&(this.listener=this.map.on("singleclick",this._handler.bind(this)))}_removeEventsListeners(){logger$2.info("InputActionByDefaut disable"),this.map&&unByKey(this.listener)}_handler(ee){if(logger$2.info("InputActionByDefaut handler",ee),!!this.map){this.coordinate=ee.coordinate,this.marker!=null&&(this.map.removeOverlay(this.marker),this.marker=null);var te=document.createElement("img");te.src=this.icon,this.marker=new Overlay({position:this.coordinate,positioning:"center-center",element:te,stopEvent:!1}),this.map.addOverlay(this.marker)}}}class FormActionByDefaut{constructor(ee){logger$2.info("FormActionByDefaut constructor"),this.data=null,this.form=null,this.submit=null,this.error=null,this.message=null}active(){logger$2.info("FormActionByDefaut active"),this._addEventsListeners()}disable(){logger$2.info("FormActionByDefaut disable")}setForm(ee){logger$2.info("FormActionByDefaut form"),this.form=ee,this.submit=this.form.querySelector('input[type="submit"]'),this.error=this.form.querySelector("#GPreportingFormFieldset"),this.message=this.form.querySelector("#GPreportingFormFieldsetMessages")}getData(){return logger$2.info("FormActionByDefaut data"),this.submit.click(),this.data?(this.error.classList.remove("fr-fieldset--error"),this.message.classList.replace("gpf-visible","gpf-hidden")):(this.error.classList.add("fr-fieldset--error"),this.message.classList.replace("gpf-hidden","gpf-visible")),this.data}clear(){logger$2.info("FormActionByDefaut clear"),this.data=null}_addEventsListeners(){this.form.addEventListener("submit",this._handler.bind(this),{once:!0})}_handler(ee){logger$2.info("FormActionByDefaut handler",ee),ee.preventDefault();var te=new FormData(ee.target),st=te.get("GPreportingLabelName"),ot=te.get("GPreportingTextDesc"),ct=te.get("GPreportingSelectTheme");return st&&ot&&ct&&(this.data={name:st,desc:ot,theme:ct}),!1}}class DrawingActionByDefaut{constructor(ee){logger$2.info("DrawingActionByDefaut constructor"),this.data=null,this.format="geojson",this.map=ee||null,this.dom=null,this.Drawing=null,this.DrawingBtn=null,this.DrawingPanel=null}active(){logger$2.info("ServiceActionByDefaut active"),this.Drawing||this._initializeDrawing(),this.Drawing.setCollapsed(!1),this.DrawingPanel.style.position="relative",this.DrawingPanel.style.left="0px",this.DrawingPanel.style.top="0px",this.DrawingPanel.style.bottom="unset",this.DrawingPanel.style.right="unset"}disable(){logger$2.info("DrawingActionByDefaut disable"),this.Drawing&&this.Drawing.setCollapsed(!0)}clear(){logger$2.info("DrawingActionByDefaut clear"),this.data=null}getData(){if(logger$2.info("DrawingActionByDefaut data"),this.Drawing){var ee=this.Drawing.exportFeatures();this.data={drawing:this.format.toLowerCase()==="geojson"?JSON.parse(ee):ee}}return this.data||{drawing:null}}setMap(ee){logger$2.info("DrawingActionByDefaut map"),this.map=ee}setTarget(ee){if(logger$2.info("DrawingActionByDefaut target"),!ee){logger$2.warn("DrawingActionByDefaut target is null");return}this.dom=ee}setFormat(ee){logger$2.info("DrawingActionByDefaut format"),ee&&(this.format=ee)}_initializeDrawing(){if(logger$2.info("DrawingActionByDefaut initializeDrawing"),!!this.map){var ee=1e3;this.Drawing=new Drawing({target:this.dom,id:ee,layerDescription:{title:"Signalement",description:"Dessin de signalement"},popup:{display:!1},tools:{export:!1}}),this.Drawing.setExportFormat(this.format);var te=this.Drawing.getContainer();te.className="";var st=this.DrawingBtn=te.querySelector("#GPshowDrawingPicto-"+ee);st&&(st.style.display="none");var ot=this.DrawingPanel=te.querySelector("#GPdrawingPanel-"+ee);ot&&(ot.style.position="relative",ot.style.left="0px",ot.style.top="0px",ot.style.bottom="unset",ot.style.right="unset",ot.style.margin="auto");var ct=te.querySelector(".gpf-panel__header");ct&&(ct.style.display="none"),this.map.addControl(this.Drawing)}}}class ServiceActionByDefaut{constructor(){logger$2.info("ServiceActionByDefaut constructor")}active(){logger$2.info("ServiceActionByDefaut active")}disable(){logger$2.info("ServiceActionByDefaut disable")}send(ee){return logger$2.info("ServiceActionByDefaut send"),Promise.reject(new Error("ServiceActionByDefaut send not implemented"))}clear(){logger$2.info("ServiceActionByDefaut clear")}}var Al,Wu,qu;const $c=class $c extends ControlExtended{constructor(te){te=te||{};super({element:te.element,target:te.target,render:te.render});fo(this,Al);if(!(this instanceof $c))throw new TypeError("ERROR CLASS_CONSTRUCTOR");return es(this,Al,Wu).call(this,te),this.container=es(this,Al,qu).call(this),this.element?this.element.appendChild(this.container):this.element=this.container,this}setMap(te){te?(this.setStep(0),this._setComponents(te),this.draggable&&Draggable.dragElement(this.panelReportingContainer,this.panelReportingHeaderContainer,this.options.position?null:te.getTargetElement()),this.collapsed||this.buttonReportingShow.click(),this.auto&&this._addEventsListeners(te)):this.auto&&this._removeEventsListeners(),super.setMap(te),this.options.position&&this.setPosition(this.options.position),this.options.gutter===!1&&this.getContainer().classList.add("gpf-button-no-gutter")}getContainer(){return this.container}getCollapsed(){return this.collapsed}setCollapsed(te){te!==void 0&&(te&&this.collapsed||!te&&!this.collapsed||(te?this.buttonReportingClose.click():this.buttonReportingShow.click(),this.collapsed=te))}_setComponents(te){this.iocInput||(this.iocInput=new InputActionByDefaut),this.iocInput.setMap(te),this.iocInput.setIcon(this.options.icon||null),this.iocForm||(this.iocForm=new FormActionByDefaut),this.iocForm.setForm(this.formReportingContainer),this.iocService||(this.iocService=new ServiceActionByDefaut),this.iocDrawing||(this.iocDrawing=new DrawingActionByDefaut),this.iocDrawing.setFormat(this.options.format||"geojson"),this.iocDrawing.setMap(te),this.iocDrawing.setTarget(this.drawingReportingContainer),this.stepContainer[0].action=this.iocInput,this.stepContainer[1].action=this.iocForm,this.stepContainer[2].action=this.iocService,this.stepContainer[3].action=this.iocDrawing}setComponentInput(te){this.iocInput=te}setComponentForm(te){this.iocForm=te}setComponentService(te){this.iocService=te}setComponentDrawing(te){this.iocDrawing=te}_addEventsListeners(te){this.eventsListeners["custom:action"]=function(st){logger$2.trace(st)},te.getLayers().on("some:event",this.eventsListeners["custom:action"])}_removeEventsListeners(){var te=this.getMap();te.getLayers().un("some:event",this.eventsListeners["custom:action"]),delete this.eventsListeners["custom:action"]}setStep(te){if(te!==void 0){for(let ct=0;ct<this.stepContainer.length;ct++){this.stepContainer[ct].container.classList.replace("gpf-visible","gpf-hidden");var ot=this.stepContainer[ct].action;ot&&(ot.disable(),ot.clear())}this.step=te;var st=this.stepContainer[te].container;st.classList.replace("gpf-hidden","gpf-visible");var ot=this.stepContainer[te].action;ot&&ot.active(),this.divReportingTitle.innerHTML=this.stepContainer[te].name,this.panelReportingFooterContainer.style.display=this.stepContainer[te].footer?"flex":"none",this.reportingBtnAnnulerFooter.style.display=this.stepContainer[te].prev===-1?"none":"flex",this.reportingBtnSuivantFooter.style.display=this.stepContainer[te].next===-1?"none":"flex",this.stepContainer[te].prev!==-1?this.backBtnIcon.classList.remove("gpf-hidden"):this.backBtnIcon.classList.add("gpf-hidden")}}nextStep(){var te=this.step,st=this.stepContainer[te].next;if(st!==-1){var ot=this.stepContainer[te].action;if(ot){var ct=ot.getData();if(!ct)return;logger$2.trace("Reporting nextStep",ct),this.data=Object.assign({},this.data,ct),ot.disable(),ot.clear()}this.setStep(st)}}prevStep(){var te=this.step,st=this.stepContainer[te].prev;if(st!==-1){var ot=this.stepContainer[te].action;ot&&ot.clear(),this.setStep(st)}}clear(){for(let ut=0;ut<this.stepContainer.length;ut++){this.stepContainer[ut].container.classList.replace("gpf-visible","gpf-hidden");var te=this.stepContainer[ut].action;te&&(te.disable(),te.clear())}var st=this.iocDrawing.Drawing;if(st){var ot=st.getLayer(),ct=this.getMap();ot&&(ct.removeLayer(ot),st.setLayer())}}onShowReportingClick(te){logger$2.trace("onShowReportingClick",te);var st=this.buttonReportingShow.ariaPressed;st==="true"?this.onPanelOpen():this.onPanelClose(),this.collapsed=st!=="true",this.dispatchEvent("change:collapsed"),this.collapsed?this.clear():(this.setStep(0),this.dispatchEvent(this.OP
816ENED_REPORTING_EVENT))}onPrevReportingClick(te){logger$2.trace("onPrevReportingClick",te),this.prevStep()}onNextReportingClick(te){logger$2.trace("onNextReportingClick",te),this.nextStep()}onCloseReportingClick(te){logger$2.trace("onCloseReportingClick",te),this.clear()}onCancelReportingClick(te){logger$2.trace("onCancelReportingClick",te),this.clear(),this.setStep(0)}onReportingFormSubmit(te){logger$2.trace("onReportingFormSubmit",te)}onShowFormDrawingReportingClick(te){logger$2.trace("onShowFormDrawingReportingClick",te),this.setStep(3)}onEntryFormNameReportingChange(te){logger$2.trace("onEntryFormNameReportingChange",te)}onSelectFormThemeReportingChange(te){logger$2.trace("onSelectFormThemeReportingChange",te)}onEntryFormDescReportingChange(te){logger$2.trace("onEntryFormDescReportingChange",te)}onEntrySendMailReportingChange(te){logger$2.trace("onEntrySendMailReportingChange",te)}onShowSendReportingClick(te){logger$2.trace("onShowSendReportingClick",te),this.data=Object.assign({},this.data,{mail:te.mail});var st=this.sendReportingContainer.querySelector("#GPreportingSendFieldset"),ot=this.sendReportingContainer.querySelector("#GPreportingSendFieldsetMessages");if(te.mail)st.classList.remove("fr-fieldset--error"),ot.classList.replace("gpf-visible","gpf-hidden");else{st.classList.add("fr-fieldset--error"),ot.classList.replace("gpf-hidden","gpf-visible");return}logger$2.info("Reporting data to send:",this.data),this.iocService.send(this.data).then(()=>{this.data=null;var ct=this.iocDrawing.Drawing;if(ct){var ut=ct.getLayer(),dt=this.getMap();ut&&(dt.removeLayer(ut),ct.setLayer())}}).then(()=>{this.setStep(0)}).then(()=>{this.dispatchEvent({type:this.SEND_REPORTING_EVENT,data:this.data})}).catch(ct=>{this.spanReportingError.classList.replace("gpf-hidden","gpf-visible"),setTimeout(()=>{this.spanReportingError.classList.replace("gpf-visible","gpf-hidden")},5e3),logger$2.error(ct)})}};Al=new WeakSet,Wu=function(te){this.uid=SelectorID.generate(),this.options={collapsed:!0,draggable:!1,auto:!0,thematics:["Réseau routier","Bâtiment","Toponyme","Touristique/randonnée","Borne cadastrale","Hydrographie","Végétation","Autre"]},Helper.assign(this.options,te),this.collapsed=this.options.collapsed,this.draggable=this.options.draggable,this.auto=this.options.auto,this.buttonReportingShow=null,this.panelReportingContainer=null,this.panelReportingHeaderContainer=null,this.panelReportingFooterContainer=null,this.reportingBtnAnnulerFooter=null,this.reportingBtnSuivantFooter=null,this.buttonReportingClose=null,this.divReportingTitle=null,this.backBtnIcon=null,this.buttonReportingSubmit=null,this.spanReportingError=null,this.inputReportingContainer=null,this.formReportingContainer=null,this.sendReportingContainer=null,this.drawingReportingContainer=null,this.step=0,this.stepContainer=[{name:"",footer:!0,header:!0,next:1,prev:-1,action:null,container:null},{name:"Décrire le signalement",footer:!0,header:!0,next:2,prev:0,action:null,container:null},{name:"Envoyer un signalement",footer:!1,header:!0,next:-1,prev:1,action:null,container:null},{name:"Dessiner sur la carte",footer:!0,header:!0,next:1,prev:1,action:null,container:null}],this.iocInput=null,this.iocForm=null,this.iocService=null,this.iocDrawing=null,this.data=null,this.eventsListeners=[],this.OPENED_REPORTING_EVENT="reporting:opened",this.SEND_REPORTING_EVENT="reporting:sending"},qu=function(){var te=this._createMainContainerElement(),st=this.buttonReportingShow=this._createShowReportingPictoElement();te.appendChild(st);var ot=this.panelReportingContainer=this._createReportingPanelElement(),ct=this.panelReportingHeaderContainer=this._createPanelHeaderElement({icon:"ign-reporting",title:"",btnClassForClose:"GPshowReportingPicto",backBtn:!0});ot.appendChild(ct),this.backBtnIcon=ct._backBtn,this.backBtnIcon.addEventListener("click",xt=>{this.onPrevReportingClick(xt)}),this.divReportingTitle=ct._title,this.buttonReportingClose=ct._closeBtn;var ut=this._createReportingPanelDivElement();ot.appendChild(ut);var dt=this.panelReportingFooterContainer=this._createReportingPanelFooterElement(),ht=this.reportingBtnAnnulerFooter=this._createReportingButtonAnnulerFooterElement(),ft=this.reportingBtnSuivantFooter=this._createReportingButtonSu
816ivantFooterElement();dt.appendChild(ht),dt.appendChild(ft);var pt=this.inputReportingContainer=this._createReportingPanelInputElement();this.stepContainer[0].container=pt;var mt=this.formReportingContainer=this._createReportingPanelFormElement(this.options.thematics);this.stepContainer[1].container=mt;var yt=this.sendReportingContainer=this._createReportingPanelSendElement();this.stepContainer[2].container=yt;var vt=this.drawingReportingContainer=this._createReportingPanelDrawingElement();this.stepContainer[3].container=vt;var _t=this.buttonReportingSubmit=this._createReportingSubmitFormElement();mt.appendChild(_t);var bt=this.spanReportingError=this._createReportingErrorSendElement();return yt.appendChild(bt),ut.appendChild(pt),ut.appendChild(mt),ut.appendChild(yt),ut.appendChild(vt),ut.appendChild(dt),te.appendChild(ot),logger$2.log(te),te};let Reporting=$c;Object.assign(Reporting.prototype,PanelDOM);Object.assign(Reporting.prototype,ReportingDOM);Object.assign(Reporting.prototype,Widget);window.ol&&window.ol.control&&(window.ol.control.Reporting=Reporting);var title$2="Panoramax",PanoramaxDOM={_addUID:function(ne){var ee=this.uid?ne+"-"+this.uid:ne;return ee},_createMainContainerElement:function(){var ne=document.createElement("div");return ne.id=this._addUID("GPpanoramax"),ne.className="GPwidget gpf-widget gpf-widget-button gpf-mobile-fullscreen",ne},_createShowWidgetPictoElement:function(){var ne=this,ee=document.createElement("button"),te=document.createElement("span");return ee.appendChild(te),ee.id=this._addUID("GPshowPanoramaxPicto"),ee.title=`${title$2}`,ee.classList.add("GPshowOpen","GPshowAdvancedToolPicto","GPshowPanoramaxPicto"),ee.classList.add("gpf-btn","gpf-btn--tertiary","gpf-btn-icon","gpf-btn-icon-panoramax"),ee.classList.add("fr-btn","fr-btn--tertiary"),ee.setAttribute("tabindex","0"),ee.setAttribute("aria-pressed",!1),ee.setAttribute("aria-label",`Parcourir les photos ${title$2}`),ee.setAttribute("type","button"),ee.addEventListener("click",function(st){var ot=ee.getAttribute("aria-pressed")==="true";ee.setAttribute("aria-pressed",!ot),ne.onShowPanoramaxClick(st)}),ee},_createWidgetPanelButtonsElement:function(){var ne=document.createElement("dialog");return ne.id=this._addUID("GPpanoramaxPanelButtons"),ne.className="GPpanel pnx-buttons-window-panel gpf-panel fr-modal",ne},_createWidgetPanelButtonsDivElement:function(){var ne=document.createElement("div");return ne.className="pnx-buttons-panel__body gpf-panel__body fr-modal__body",ne.classList.add("gpf-visible"),ne},_createWidgetButtonsElement:function(){var ne=document.createElement("div");return ne.className="pnx-buttons-panel__content",ne},_createButtonOptionsElement:function(){var ne=this,ee=document.createElement("button");return ee.id=this._addUID("GPpanoramaxButtonOptions"),ee.className="gpf-btn gpf-btn-icon gpf-btn-icon-background",ee.classList.add("fr-btn","fr-icon-equalizer-line","fr-btn--icon-right","fr-btn--secondary"),ee.title="Options",ee.setAttribute("aria-label","Options"),ee.setAttribute("aria-pressed","false"),ee.setAttribute("type","button"),ee.textContent="Options",ee.addEventListener("click",function(te){var st=te.target.getAttribute("aria-pressed")==="true";te.target.setAttribute("aria-pressed",!st),ne.onOpenPanoramaxOptionsClick(te)}),ee},_createWidgetPanelOptionsElement:function(){var ne=document.createElement("form");return ne.id=this._addUID("GPpanoramaxPanelOptions"),ne.className="GPpanel pnx-options-panel gpf-panel gpf-hidden fr-modal",ne.setAttribute("aria-label","Panneau des options Panoramax"),ne},_createWidgetPanelOptionsDivElement:function(){let ne=document.createElement("div");return ne.className="gpf-panel__body fr-modal__body",ne},_createButtonContributionsElement:function(ne){var ee=document.createElement("a");return ee.id=this._addUID("GPpanoramaxButtonContributions"),ee.className="fr-btn fr-btn--sm fr-icon-external-link-fill fr-btn--icon-right fr-btn--secondary",ee.classList.add("gpf-btn"),ee.title=ne.description,ee.setAttribute("aria-label",ne.description),ee.setAttribute("target","_blank"),ee.setAttribute("href",ne.link),ee.textContent=ne.label,ee},_createButtonChoiceHoverElement:function(ne,ee){var te=this,st=document.createElement("div");st.id=this._addUID("GPpanoramaxToggle"),st.className="pnx-toggle fr-toggle fr-m-2v";var ot=document.createElement("div");ot.id=this._addUID("GPpanoramaxToggleMessages"),ot.className="fr-messages-group",ot.setAttribute("aria-live","polite");var ct=document.createElement("input");ct.id=this._addUID("GPpanoramaxToggleInput"),ct.className="pnx-toggle__input fr-toggle__input",ct.type="checkbox",ct.checked=ne,ct.setAttribute("aria-describedby",ot.id),ct.addEventListener("click",function(dt){te.onToggleChoiceHoverPanoramaxClick(dt)});var ut=document.createElement("label");return ut.id=this._addUID("GPpanoramaxToggleLabel"),ut.className="pnx-toggle__label fr-toggle__label",ut.setAttribute("title",ee.description),ut.setAttribute("for",ct.id),ut.innerText=ee.label,st.appendChild(ct),st.appendChild(ut),st.appendChild(ot),st},_createButtonChoiceStyleElement:function(ne){var ee=["Classique","Type de camera","Date de prise de vue"];ne&&ne.content&&Array.isArray(ne.content)&&ne.content.length&&(ee=ne.content);var te=this,st=document.createElement("div");st.id=this._addUID("GPpanoramaxStyleChoice"),st.className="pnx-style-choice fr-select-group fr-m-2v";var ot=document.createElement("label");ot.className="fr-label fr-icon-palette-line fr-label--icon-left gpf-icon-color",ot.setAttribute("for",this._addUID("GPpanoramaxStyleChoiceSelect")),ot.innerText=ne&&ne.label||"Rendu";var ct=document.createElement("select");ct.id=this._addUID("GPpanoramaxStyleChoiceSelect"),ct.className="fr-select",ct.disabled=!0,ct.setAttribute("title",ne&&ne.description||"Selectionner un rendu de carte");for(var ut=0;ut<ee.length;ut++){var dt=document.createElement("option");dt.value=ee[ut],dt.innerText=ee[ut],ut===0&&(dt.selected=!0),ct.appendChild(dt)}return ct.addEventListener("change",function(ht){te.onSelectPanoramaxRenderClick(ht)}),st.appendChild(ot),st.appendChild(ct),st}
816,_createButtonChoiceBackgroundElement:function(ne,ee){var te=this,st=document.createElement("div");st.id=this._addUID("GPpanoramaxToggleBackground"),st.className="pnx-toggle fr-toggle fr-m-2v";var ot=document.createElement("div");ot.id=this._addUID("GPpanoramaxToggleBackgroundMessages"),ot.className="fr-messages-group",ot.setAttribute("aria-live","polite");var ct=document.createElement("input");ct.id=this._addUID("GPpanoramaxToggleBackgroundInput"),ct.className="pnx-toggle__input fr-toggle__input",ct.type="checkbox",ct.checked=ne,ct.setAttribute("aria-describedby",ot.id),ct.addEventListener("click",function(dt){te.onToggleChoiceBackgroundPanoramaxClick(dt)});var ut=document.createElement("label");return ut.id=this._addUID("GPpanoramaxToggleBackgroundLabel"),ut.className="pnx-toggle__label fr-toggle__label",ut.setAttribute("title",ee.description),ut.setAttribute("for",ct.id),ut.innerText=ee.label,st.appendChild(ct),st.appendChild(ut),st.appendChild(ot),st},_createButtonChoiceDisplayLayerElement:function(ne,ee){var te=this,st=document.createElement("div");st.id=this._addUID("GPpanoramaxToggleDisplay"),st.className="pnx-toggle fr-toggle fr-m-2v";var ot=document.createElement("div");ot.id=this._addUID("GPpanoramaxToggleDisplayMessages"),ot.className="fr-messages-group",ot.setAttribute("aria-live","polite");var ct=document.createElement("input");ct.id=this._addUID("GPpanoramaxToggleDisplayInput"),ct.className="pnx-toggle__input fr-toggle__input",ct.type="checkbox",ct.checked=ne,ct.setAttribute("aria-describedby",ot.id),ct.addEventListener("click",function(dt){te.onToggleChoiceDisplayLayerPanoramaxClick(dt)});var ut=document.createElement("label");return ut.id=this._addUID("GPpanoramaxToggleDisplayLabel"),ut.className="pnx-toggle__label fr-toggle__label",ut.setAttribute("title",ee.description),ut.setAttribute("for",ct.id),ut.innerText=ee.label,st.appendChild(ct),st.appendChild(ut),st.appendChild(ot),st},_createWidgetPanelFiltersElement:function(ne){var ee=document.createElement("div");if(ee.id=this._addUID("GPpanoramaxPanelFilters"),ee.className="pnx-filters-panel gpf-panel__content",ee.setAttribute("role","region"),ee.setAttribute("aria-label",ne.description||"Panneau des filtres Panoramax"),ne.content.periodes||ne.content.dates){let pt=this._createGroupFiltersByDateFieldsetElement();if(ne.content.periodes){var te=[{text:"1 mois",value:1},{text:"6 mois",value:6},{text:"1 an",value:12}],st=this._createGroupFiltersByPeriodeElement(te);pt.appendChild(st)}if(ne.content.dates){var ot=this._createGroupFiltersByDateElement();pt.appendChild(ot);var ct=this._createGroupFiltersByStartDateElement();ot.appendChild(ct);var ut=this._createGroupFiltersByEndDateElement();ot.appendChild(ut)}ee.appendChild(pt)}if(ne.content.types){var dt=["Tout","Classique","360°"],ht=this._createGroupFiltersByTypeElement(dt);ee.appendChild(ht)}ee.addEventListener("click",function(pt){pt.stopPropagation()});var ft=document.createElement("div");return ft.className="pnx-filters-panel-buttons",ee.appendChild(ft),ee},_createButtonResetFiltersElement:function(ne){var ee=this,te=document.createElement("button");return te.id=this._addUID("GPpanoramaxButtonResetFilters"),te.className="gpf-btn",te.classList.add("fr-btn","fr-btn--sm","fr-btn--tertiary-no-outline"),te.title=ne.description,te.setAttribute("aria-label",ne.description),te.setAttribute("aria-pressed","false"),te.setAttribute("type","button"),te.textContent=ne.label,te.addEventListener("click",function(st){var ot=st.target.getAttribute("aria-pressed")==="true";st.target.setAttribute("aria-pressed",!ot),ee.onResetPanoramaxFiltersClick(st)}),te},_createGroupFiltersByPeriodeElement:function(ne){var ee=this,te=document.createElement("div");te.className="fr-fieldset__element pnx-filters-panel__date-predefined";let st=document.createElement("div");st.classList.add("fr-tags-group"),te.appendChild(st);for(var ot=0;ot<ne.length;ot++){var ct=document.createElement("div");ct.className="gpf-fieldset__element";var ut=document.createElement("button");ut.className="fr-tag fr-tag--sm",ut.setAttribute("type","button"),ut.setAttribute("aria-pressed","fal
816se"),ut.dataset.filters="group-filter-periodes",ut.name="group-filter-periodes",ut.innerText=ne[ot].text,ut.value=ne[ot].value,ut.addEventListener("click",function(dt){var ht=dt.currentTarget||dt.target,ft=ht.getAttribute("aria-pressed")==="true";ht.setAttribute("aria-pressed",!ft);for(var pt=ht.dataset.filters,mt=te.querySelectorAll("[data-filters='"+pt+"']"),yt=0;yt<mt.length;yt++)mt[yt]!==ht&&mt[yt].setAttribute("aria-pressed","false");ee.onClickPanoramaxFilterByPeriode(dt)}),ct.appendChild(ut),st.appendChild(ct)}return te},_createGroupFiltersByDateFieldsetElement:function(){let ne=document.createElement("fieldset");ne.classList.add("fr-fieldset");let ee=document.createElement("legend");return ee.classList.add("fr-fieldset__legend","fr-fieldset__legend--regular"),ee.innerText="Date",ne.appendChild(ee),ne},_createGroupFiltersByDateElement:function(){var ne=document.createElement("div");return ne.className="fr-fieldset__element pnx-filters-panel__date gpf-input-group fr-pb-2w",ne},_createGroupFiltersByStartDateElement:function(){var ne=this,ee=document.createElement("div");ee.className="pnx-filters-panel__date-start gpf-input-group fr-mb-1w";let te=this._addUID("GPpanoramaxFilterDateStart");var st=document.createElement("label");st.className="fr-label",st.htmlFor=te,st.innerText="De",ee.appendChild(st);var ot=document.createElement("input");return ot.id=this._addUID("GPpanoramaxFilterDateStart"),ot.className="fr-input gpf-input-date",ot.setAttribute("type","date"),ot.dataset.filters="group-filter-dates",ot.name="group-filter-dates",ot.addEventListener("change",function(ct){ne.onChangePanoramaxFilterByDates(ct)}),ee.appendChild(ot),ee},_createGroupFiltersByEndDateElement:function(){var ne=this,ee=document.createElement("div");ee.className="pnx-filters-panel__date-end gpf-input-group fr-mb-1w";let te=this._addUID("GPpanoramaxFilterDateEnd");var st=document.createElement("label");st.className="fr-label",st.htmlFor=te,st.innerText="À",ee.appendChild(st);var ot=document.createElement("input");return ot.id=te,ot.className="fr-input gpf-input-date",ot.setAttribute("type","date"),ot.dataset.filters="group-filter-dates",ot.name="group-filter-dates",ot.addEventListener("change",function(ct){ne.onChangePanoramaxFilterByDates(ct)}),ee.appendChild(ot),ee},_createGroupFiltersByTypeElement:function(ne){var ee=this,te=document.createElement("div");te.className="pnx-filters-panel__type gpf-select-group fr-mb-8v";var st=document.createElement("fieldset");st.className="gpf-segmented fr-segmented";var ot=document.createElement("legend");ot.className="fr-segmented__legend",ot.innerText="Type d'image",st.appendChild(ot);var ct=document.createElement("div");ct.className="fr-segmented__elements",ct.dataset.filters="group-filter-types",st.appendChild(ct);for(var ut=0;ut<ne.length;ut++){var dt=ne[ut],ht=document.createElement("div");ht.className="gpf-segmented__element fr-segmented__element",ct.appendChild(ht);var ft=document.createElement("input");ft.value=ut,ft.checked=ut===0,ft.dataset.default=ut===0,ft.type="radio",ft.id="filter-type-segmented-"+ut,ft.name="group-filter-types",ft.addEventListener("change",function(mt){for(var yt=mt.target.parentElement.parentElement.dataset.filters,vt=st.querySelectorAll("[data-filters='"+yt+"'] input"),_t=0;_t<vt.length;_t++)vt[_t]!==mt.target&&(vt[_t].checked=!1);var bt=parseInt(mt.target.value,10);ee.onChangePanoramaxFilterByType(mt,ne[bt])}),ht.appendChild(ft);var pt=document.createElement("label");pt.className="fr-label",pt.htmlFor="filter-type-segmented-"+ut,pt.innerText=dt,ht.appendChild(pt)}return te.appendChild(st),te},_createWidgetPanelViewerElement:function(ne){var ee=document.createElement("dialog");return ee.id=this._addUID("GPpanoramaxPanelViewer"),ee.className="GPpanel pnx-visualization-window-panel gpf-panel fr-modal",ee.classList.add("gpf-hidden"),ee},_createWidgetPanelViewerDivElement:function(){var ne=document.createElement("div");return ne.className="pnx-visualization-window-panel__body gpf-panel__body fr-modal__body",ne.classList.add("gpf-hidden"),ne}};/**
817 * @license
818 * Copyright 2019 Google LLC
819 * SPDX-License-Identifier: BSD-3-Clause
820 */const t$2=globalThis,e$4=t$2.ShadowRoot&&(t$2.ShadyCSS===void 0||t$2.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,s$2=Symbol(),o$5=new WeakMap;let n$3=class{constructor(ee,te,st){if(this._$cssResult$=!0,st!==s$2)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=ee,this.t=te}get styleSheet(){let ee=this.o;const te=this.t;if(e$4&&ee===void 0){const st=te!==void 0&&te.length===1;st&&(ee=o$5.get(te)),ee===void 0&&((this.o=ee=new CSSStyleSheet).replaceSync(this.cssText),st&&o$5.set(te,ee))}return ee}toString(){return this.cssText}};const r$2=ne=>
vendor: 12,336 bytes, lines 820-830
820new n$3(typeof ne=="string"?ne:ne+"",void 0,s$2),S$1=(ne,ee)=>{if(e$4)ne.adoptedStyleSheets=ee.map(te=>te instanceof CSSStyleSheet?te:te.styleSheet);else for(const te of ee){const st=document.createElement("style"),ot=t$2.litNonce;ot!==void 0&&st.setAttribute("nonce",ot),st.textContent=te.cssText,ne.appendChild(st)}},c$2=e$4?ne=>ne:ne=>ne instanceof CSSStyleSheet?(ee=>{let te="";for(const st of ee.cssRules)te+=st.cssText;return r$2(te)})(ne):ne;/**
821 * @license
822 * Copyright 2017 Google LLC
823 * SPDX-License-Identifier: BSD-3-Clause
824 */const{is:i$3,defineProperty:e$3,getOwnPropertyDescriptor:h$1,getOwnPropertyNames:r$1,getOwnPropertySymbols:o$4,getPrototypeOf:n$2}=Object,a$2=globalThis,c$1=a$2.trustedTypes,l$2=c$1?c$1.emptyScript:"",p$1=a$2.reactiveElementPolyfillSupport,d$1=(ne,ee)=>ne,u$2={toAttribute(ne,ee){switch(ee){case Boolean:ne=ne?l$2:null;break;case Object:case Array:ne=ne==null?ne:JSON.stringify(ne)}return ne},fromAttribute(ne,ee){let te=ne;switch(ee){case Boolean:te=ne!==null;break;case Number:te=ne===null?null:Number(ne);break;case Object:case Array:try{te=JSON.parse(ne)}catch{te=null}}return te}},f$1=(ne,ee)=>!i$3(ne,ee),b$1={attribute:!0,type:String,converter:u$2,reflect:!1,useDefault:!1,hasChanged:f$1};Symbol.metadata??(Symbol.metadata=Symbol("metadata")),a$2.litPropertyMetadata??(a$2.litPropertyMetadata=new WeakMap);let y$1=class extends HTMLElement{static addInitializer(ee){this._$Ei(),(this.l??(this.l=[])).push(ee)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(ee,te=b$1){if(te.state&&(te.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(ee)&&((te=Object.create(te)).wrapped=!0),this.elementProperties.set(ee,te),!te.noAccessor){const st=Symbol(),ot=this.getPropertyDescriptor(ee,st,te);ot!==void 0&&e$3(this.prototype,ee,ot)}}static getPropertyDescriptor(ee,te,st){const{get:ot,set:ct}=h$1(this.prototype,ee)??{get(){return this[te]},set(ut){this[te]=ut}};return{get:ot,set(ut){const dt=ot==null?void 0:ot.call(this);ct==null||ct.call(this,ut),this.requestUpdate(ee,dt,st)},configurable:!0,enumerable:!0}}static getPropertyOptions(ee){return this.elementProperties.get(ee)??b$1}static _$Ei(){if(this.hasOwnProperty(d$1("elementProperties")))return;const ee=n$2(this);ee.finalize(),ee.l!==void 0&&(this.l=[...ee.l]),this.elementProperties=new Map(ee.elementProperties)}static finalize(){if(this.hasOwnProperty(d$1("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(d$1("properties"))){const te=this.properties,st=[...r$1(te),...o$4(te)];for(const ot of st)this.createProperty(ot,te[ot])}const ee=this[Symbol.metadata];if(ee!==null){const te=litPropertyMetadata.get(ee);if(te!==void 0)for(const[st,ot]of te)this.elementProperties.set(st,ot)}this._$Eh=new Map;for(const[te,st]of this.elementProperties){const ot=this._$Eu(te,st);ot!==void 0&&this._$Eh.set(ot,te)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(ee){const te=[];if(Array.isArray(ee)){const st=new Set(ee.flat(1/0).reverse());for(const ot of st)te.unshift(c$2(ot))}else ee!==void 0&&te.push(c$2(ee));return te}static _$Eu(ee,te){const st=te.attribute;return st===!1?void 0:typeof st=="string"?st:typeof ee=="string"?ee.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){var ee;this._$ES=new Promise(te=>this.enableUpdating=te),this._$AL=new Map,this._$E_(),this.requestUpdate(),(ee=this.constructor.l)==null||ee.forEach(te=>te(this))}addController(ee){var te;(this._$EO??(this._$EO=new Set)).add(ee),this.renderRoot!==void 0&&this.isConnected&&((te=ee.hostConnected)==null||te.call(ee))}removeController(ee){var te;(te=this._$EO)==null||te.delete(ee)}_$E_(){const ee=new Map,te=this.constructor.elementProperties;for(const st of te.keys())this.hasOwnProperty(st)&&(ee.set(st,this[st]),delete this[st]);ee.size>0&&(this._$Ep=ee)}createRenderRoot(){const ee=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return S$1(ee,this.constructor.elementStyles),ee}connectedCallback(){var ee;this.renderRoot??(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(ee=this._$EO)==null||ee.forEach(te=>{var st;return(st=te.hostConnected)==null?void 0:st.call(te)})}enableUpdating(ee){}disconnectedCallback(){var ee;(ee=this._$EO)==null||ee.forEach(te=>{var st;return(st=te.hostDisconnected)==null?void 0:st.call(te)})}attributeChangedCallback(ee,te,st){this._$AK(ee,st)}_$ET(ee,te){var ct;const st=this.constructor.elementProperties.get(ee),ot=this.constructor._$Eu(ee,st);if(ot!==void 0&&st.reflect===!0){const ut=(((ct=st.converter)==null?void 0:ct.toAttribute)!==void 0?st.converter:u$2).toAttribute(te,st.type);this._$Em=ee,ut==null?this.removeAttribute(ot):this.setAttribute(ot,ut),this._$Em=null}}_$AK(ee,te){var ct,ut;const st=this.constructor,ot=st._$Eh.get(ee);if(ot!==void 0&&this._$Em!==ot){const dt=st.getPropertyOptions(ot),ht=typeof dt.converter=="function"?{fromAttribute:dt.converter}:((ct=dt.converter)==null?void 0:ct.fromAttribute)!==void 0?dt.converter:u$2;this._$Em=ot;const ft=ht.fromAttribute(te,dt.type);this[ot]=ft??((ut=this._$Ej)==null?void 0:ut.get(ot))??ft,this._$Em=null}}requestUpdate(ee,te,st,ot=!1,ct){var ut;if(ee!==void 0){const dt=this.constructor;if(ot===!1&&(ct=this[ee]),st??(st=dt.getPropertyOptions(ee)),!((st.hasChanged??f$1)(ct,te)||st.useDefault&&st.reflect&&ct===((ut=this._$Ej)==null?void 0:ut.get(ee))&&!this.hasAttribute(dt._$Eu(ee,st))))return;this.C(ee,te,st)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(ee,te,{useDefault:st,reflect:ot,wrapped:ct},ut){st&&!(this._$Ej??(this._$Ej=new Map)).has(ee)&&(this._$Ej.set(ee,ut??te??this[ee]),ct!==!0||ut!==void 0)||(this._$AL.has(ee)||(this.hasUpdated||st||(te=void 0),this._$AL.set(ee,te)),ot===!0&&this._$Em!==ee&&(this._$Eq??(this._$Eq=new Set)).add(ee))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(te){Promise.reject(te)}const ee=this.scheduleUpdate();return ee!=null&&await ee,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var st;if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??(this.renderRoot=this.createRenderRoot()),this._$Ep){for(const[ct,ut]of this._$Ep)this[ct]=ut;this._$Ep=void 0}const ot=this.constructor.elementProperties;if(ot.size>0)for(const[ct,ut]of ot){const{wrapped:dt}=ut,ht=this[ct];dt!==!0||this._$AL.has(ct)||ht===void 0||this.C(ct,void 0,ut,ht)}}let ee=!1;const te=this._$AL;try{ee=this.shouldUpdate(te),ee?(this.willUpdate(te),(st=this._$EO)==null||st.forEach(ot=>{var ct;return(ct=ot.hostUpdate)==null?void 0:ct.call(ot)}),this.update(te)):this._$EM()}catch(ot){throw ee=!1,this._$EM(),ot}ee&&this._$AE(te)}willUpdate(ee){}_$AE(ee){var te;(te=this._$EO)==null||te.forEach(st=>{var ot;return(ot=st.hostUpdated)==null?void 0:ot.call(st)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(ee)),this.updated(ee)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(ee){return!0}update(ee){this._$Eq&&(this._$Eq=this._$Eq.forEach(te=>this._$ET(te,this[te]))),this._$EM()}updated(ee){}firstUpdated(ee){}};y$1.elementStyles=[],y$1.shadowRootOptions={mode:"open"},y$1[d$1("elementProperties")]=new Map,y$1[d$1("finalized")]=new Map,p$1==null||p$1({ReactiveElement:y$1}),(a$2.reactiveElementVersions??(a$2.reactiveElementVersions=[])).push("2.1.2");/**
825 * @license
826 * Copyright 2017 Google LLC
827 * SPDX-License-Identifier: BSD-3-Clause
828 */const t$1=globalThis,i$2=ne=>ne,s$1=t$1.trustedTypes,e$2=s$1?s$1.createPolicy("lit-html",{createHTML:ne=>ne}):void 0,h="$lit$",o$3=`lit$${Math.random().toFixed(9).slice(2)}$`,n$1="?"+o$3,r=`<${n$1}>`,l$1=document,c=()=>l$1.createComment(""),a$1=ne=>ne===null||typeof ne!="object"&&typeof ne!="function",u$1=Array.isArray,d=ne=>u$1(ne)||typeof(ne==null?void 0:ne[Symbol.iterator])=="function",f=`[ 	
829\f\r]`,v=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,_=/-->/g,m=/>/g,p=RegExp(`>|${f}(?:([^\\s"'>=/]+)(${f}*=${f}*(?:[^ 	
830\f\r"'\`<>=]|("|')|))|$)`,"g"),g=/'/g,$$1=/"/g,y=/^(?:script|style|textarea|title)$/i,x=ne=>(ee,...te)=>({_$litType$:ne,strings:ee,values:te}),b=x(1),E=Symbol.for("lit-noChange"),A=Symbol.for("lit-nothing"),C$1=new WeakMap,P=l$1.createTreeWalker(l$1,129);function V(ne,ee){if(!u$1(ne)||!ne.hasOwnProperty("raw"))throw Error("invalid template strings array");return e$2!==void 0?e$2.createHTML(ee):ee}const N=(ne,ee)=>{const te=ne.length-1,st=[];let ot,ct=ee===2?"<svg>":ee===3?"<math>":"",ut=v;for(let dt=0;dt<te;dt++){const ht=ne[dt];let ft,pt,mt=-1,yt=0;for(;yt<ht.length&&(ut.lastIndex=yt,pt=ut.exec(ht),pt!==null);)yt=ut.lastIndex,ut===v?pt[1]==="!--"?ut=_:pt[1]!==void 0?ut=m:pt[2]!==void 0?(y.test(pt[2])&&(ot=RegExp("</"+pt[2],"g")),ut=p):pt[3]!==void 0&&(ut=p):ut===p?pt[0]===">"?(ut=ot??v,mt=-1):pt[1]===void 0?mt=-2:(mt=ut.lastIndex-pt[2].length,ft=pt[1],ut=pt[3]===void 0?p:pt[3]==='"'?$$1:g):ut===$$1||ut===g?ut=p:ut===_||ut===m?ut=v:(ut=p,ot=void 0);const vt=ut===p&&ne[dt+1].startsWith("/>")?" ":"";ct+=ut===v?ht+r:mt>=0?(st.push(ft),ht.slice(0,mt)+h+ht.slice(mt)+o$3+vt):ht+o$3+(mt===-2?dt:vt)}return[V(ne,ct+(ne[te]||"<?>")+(ee===2?"</svg>":ee===3?"</math>":"")),st]};class S{constructor({strings:ee,_$litType$:te},st){let ot;this.parts=[];let ct=0,ut=0;const dt=ee.length-1,ht=this.parts,[ft,pt]=N(ee,te);if(this.el=S.createElement(ft,st),P.currentNode=this.el.content,te===2||te===3){const mt=this.el.content.firstChild;mt.replaceWith(...mt.childNodes)}for(;(ot=P.nextNode())!==null&&ht.length<dt;){if(ot.nodeType===1){if(ot.hasAttributes())for(const mt of ot.getAttributeNames())if(mt.endsWith(h)){const yt=pt[ut++],vt=ot.getAttribute(mt).split(o$3),_t=/([.?@])?(.*)/.exec(yt);ht.push({type:1,index:ct,name:_t[2],strings:vt,ctor:_t[1]==="."?I:_t[1]==="?"?L:_t[1]==="@"?z:H}),ot.removeAttribute(mt)}else mt.startsWith(o$3)&&(ht.push({type:6,index:ct}),ot.removeAttribute(mt));if(y.test(ot.tagName)){const mt=ot.textContent.split(o$3),yt=mt.length-1;if(yt>0){ot.textContent=s$1?s$1.emptyScript:"";for(let vt=0;vt<yt;vt++)ot.append(mt[vt],c()),P.nextNode(),ht.push({type:2,index:++ct});ot.append(mt[yt],c())}}}else if(ot.nodeType===8)if(ot.data===n$1)ht.push({type:2,index:ct});else{let mt=-1;for(;(mt=ot.data.indexOf(o$3,mt+1))!==-1;)ht.push({type:7,index:ct}),mt+=o$3.length-1}ct++}}static createElement(ee,te){const st=l$1.createElement("template");return st.innerHTML=ee,st}}function M$1(ne,ee,te=ne,st){var ut,dt;if(ee===E)return ee;let ot=st!==void 0?(ut=te._$Co)==null?void 0:ut[st]:te._$Cl;const ct=a$1(ee)?void 0:ee._$litDirective$;return(ot==null?void 0:ot.constructor)!==ct&&((dt=ot==null?void 0:ot._$AO)==null||dt.call(ot,!1),ct===void 0?ot=void 0:(ot=new ct(ne),ot._$AT(ne,te,st)),st!==void 0?(te._$Co??(te._$Co=[]))[st]=ot:te._$Cl=ot),ot!==void 0&&(ee=M$1(ne,ot._$AS(ne,ee.values),ot,st)),ee}class R{constructor(ee,te){this._$AV=[],this._$AN=void 0,this._$AD=ee,this._$AM=te}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(ee){const{el:{content:te},parts:st}=this._$AD,ot=((ee==null?void 0:ee.creationScope)??l$1).importNode(te,!0);P.currentNode=ot;let ct=P.nextNode(),ut=0,dt=0,ht=st[0];for(;ht!==void 0;){if(ut===ht.index){let ft;ht.type===2?ft=new k(ct,ct.nextSibling,this,ee):ht.type===1?ft=new ht.ctor(ct,ht.name,ht.strings,this,ee):ht.type===6&&(ft=new Z(ct,this,ee)),this._$AV.push(ft),ht=st[++dt]}ut!==(ht==null?void 0:ht.index)&&(ct=P.nextNode(),ut++)}return P.currentNode=l$1,ot}p(ee){let te=0;for(const st of this._$AV)st!==void 0&&(st.strings!==void 0?(st._$AI(ee,st,te),te+=st.strings.length-2):st._$AI(ee[te])),te++}}class k{get _$AU(){var ee;return((ee=this._$AM)==null?void 0:ee._$AU)??this._$Cv}constructor(ee,te,st,ot){this.type=2,this._$AH=A,this._$AN=void 0,this._$AA=ee,this._$AB=te,this._$AM=st,this.options=ot,this._$Cv=(ot==null?void 0:ot.isConnected)??!0}get parentNode(){let ee=this._$AA.parentNode;const te=this._$AM;return te!==void 0&&(ee==null?void 0:ee.nodeType)===11&&(ee=te.parentNode),ee}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(ee,te=this){ee=M$1(this,ee,te),a$1(ee)?ee===A||ee==null||ee===""?(this._$AH!==A&&this._$AR(),this._$AH=A):ee!==this._$AH&&ee!==E&&this._(ee):ee._$litType$!==void 0?this.$(ee):ee.
830nodeType!==void 0?this.T(ee):d(ee)?this.k(ee):this._(ee)}O(ee){return this._$AA.parentNode.insertBefore(ee,this._$AB)}T(ee){this._$AH!==ee&&(this._$AR(),this._$AH=this.O(ee))}_(ee){this._$AH!==A&&a$1(this._$AH)?this._$AA.nextSibling.data=ee:this.T(l$1.createTextNode(ee)),this._$AH=ee}$(ee){var ct;const{values:te,_$litType$:st}=ee,ot=typeof st=="number"?this._$AC(ee):(st.el===void 0&&(st.el=S.createElement(V(st.h,st.h[0]),this.options)),st);if(((ct=this._$AH)==null?void 0:ct._$AD)===ot)this._$AH.p(te);else{const ut=new R(ot,this),dt=ut.u(this.options);ut.p(te),this.T(dt),this._$AH=ut}}_$AC(ee){let te=C$1.get(ee.strings);return te===void 0&&C$1.set(ee.strings,te=new S(ee)),te}k(ee){u$1(this._$AH)||(this._$AH=[],this._$AR());const te=this._$AH;let st,ot=0;for(const ct of ee)ot===te.length?te.push(st=new k(this.O(c()),this.O(c()),this,this.options)):st=te[ot],st._$AI(ct),ot++;ot<te.length&&(this._$AR(st&&st._$AB.nextSibling,ot),te.length=ot)}_$AR(ee=this._$AA.nextSibling,te){var st;for((st=this._$AP)==null?void 0:st.call(this,!1,!0,te);ee!==this._$AB;){const ot=i$2(ee).nextSibling;i$2(ee).remove(),ee=ot}}setConnected(ee){var te;this._$AM===void 0&&(this._$Cv=ee,(te=this._$AP)==null||te.call(this,ee))}}class H{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(ee,te,st,ot,ct){this.type=1,this._$AH=A,this._$AN=void 0,this.element=ee,this.name=te,this._$AM=ot,this.options=ct,st.length>2||st[0]!==""||st[1]!==""?(this._$AH=Array(st.length-1).fill(new String),this.strings=st):this._$AH=A}_$AI(ee,te=this,st,ot){const ct=this.strings;let ut=!1;if(ct===void 0)ee=M$1(this,ee,te,0),ut=!a$1(ee)||ee!==this._$AH&&ee!==E,ut&&(this._$AH=ee);else{const dt=ee;let ht,ft;for(ee=ct[0],ht=0;ht<ct.length-1;ht++)ft=M$1(this,dt[st+ht],te,ht),ft===E&&(ft=this._$AH[ht]),ut||(ut=!a$1(ft)||ft!==this._$AH[ht]),ft===A?ee=A:ee!==A&&(ee+=(ft??"")+ct[ht+1]),this._$AH[ht]=ft}ut&&!ot&&this.j(ee)}j(ee){ee===A?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,ee??"")}}class I extends H{constructor(){super(...arguments),this.type=3}j(ee){this.element[this.name]=ee===A?void 0:ee}}class L extends H{constructor(){super(...arguments),this.type=4}j(ee){this.element.toggleAttribute(this.name,!!ee&&ee!==A)}}class z extends H{constructor(ee,te,st,ot,ct){super(ee,te,st,ot,ct),this.type=5}_$AI(ee,te=this){if((ee=M$1(this,ee,te,0)??A)===E)return;const st=this._$AH,ot=ee===A&&st!==A||ee.capture!==st.capture||ee.once!==st.once||ee.passive!==st.passive,ct=ee!==A&&(st===A||ot);ot&&this.element.removeEventListener(this.name,this,st),ct&&this.element.addEventListener(this.name,this,ee),this._$AH=ee}handleEvent(ee){var te;typeof this._$AH=="function"?this._$AH.call(((te=this.options)==null?void 0:te.host)??this.element,ee):this._$AH.handleEvent(ee)}}class Z{constructor(ee,te,st){this.element=ee,this.type=6,this._$AN=void 0,this._$AM=te,this.options=st}get _$AU(){return this._$AM._$AU}_$AI(ee){M$1(this,ee)}}const B=t$1.litHtmlPolyfillSupport;B==null||B(S,k),(t$1.litHtmlVersions??(t$1.litHtmlVersions=[])).push("3.3.3");const D=(ne,ee,te)=>{const st=(te==null?void 0:te.renderBefore)??ee;let ot=st._$litPart$;if(ot===void 0){const ct=(te==null?void 0:te.renderBefore)??null;st._$litPart$=ot=new k(ee.insertBefore(c(),ct),ct,void 0,te??{})}return ot._$AI(ne),ot};/**
831 * @license
832 * Copyright 2017 Google LLC
833 * SPDX-License-Identifier: BSD-3-Clause
834 */const s=globalThis;let i$1=class extends y$1{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var te;const ee=super.createRenderRoot();return(te=this.renderOptions).renderBefore??(te.renderBefore=ee.firstChild),ee}update(ee){const te=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(ee),this._$Do=D(te,this.renderRoot,this.renderOptions)}connectedCallback(){var ee;super.connectedCallback(),(ee=this._$Do)==null||ee.setConnected(!0)}disconnectedCallback(){var ee;super.disconnectedCallback(),(ee=this._$Do)==null||ee.setConnected(!1)}render(){return E}};var iu;i$1._$litElement$=!0,i$1.finalized=!0,(iu=s.litElementHydrateSupport)==null||iu.call(s,{LitElement:i$1});const o$2=s.litElementPolyfillSupport;o$2==null||o$2({LitElement:i$1});(s.litElementVersions??(s.litElementVersions=[])).push("4.2.2");class MiniMap extends i$1{constructor(ee,te={}){super(),this._map=ee||null,this._options=te&&typeof te=="object"?te:{},this._pictureCoordinates=null,this._pictureHeading=null,this._overviewControl=null,this._isSyncingView=!1,this._onMainMapMoveEnd=null,this._onMiniMapMoveEnd=null,this._centerMarkerOverlay=null,this._container=null}connectedCallback(){super.connectedCallback(),this.style.width||(this.style.width=this._options.width?this._options.width+"px":"200px"),this.style.height||(this.style.height=this._options.height?this._options.height+"px":"150px"),this.style.display="block",this._container=this.querySelector(".pnx-mini-map__container")||this._container,this._renderOverviewMap()}disconnectedCallback(){this._removeOverviewMap(),super.disconnectedCallback()}createRenderRoot(){return this}firstUpdated(){this._container=this.querySelector(".pnx-mini-map__container"),this._renderOverviewMap()}get map(){return this._map}set map(ee){this._map!==ee&&(this._removeOverviewMap(),this._map=ee,this.requestUpdate(),this._renderOverviewMap())}get options(){return this._options}set options(ee){this._removeOverviewMap(),this._options=ee&&typeof ee=="object"?ee:{},this.requestUpdate(),this._renderOverviewMap()}get pictureHeading(){return this._pictureHeading}set pictureHeading(ee){this._pictureHeading=ee,this._syncToPictureCoordinates()}get pictureCoordinates(){return this._pictureCoordinates}set pictureCoordinates(ee){if(!Array.isArray(ee)||ee.length<2){this._pictureCoordinates=null;return}var te=Number(ee[0]),st=Number(ee[1]);if(!Number.isFinite(te)||!Number.isFinite(st)){this._pictureCoordinates=null;return}this._pictureCoordinates=[te,st],this._syncToPictureCoordinates()}setPhotoCoordinates(ee){this.pictureCoordinates=ee}setPhotoHeading(ee){this.pictureHeading=ee}_initCenterMarkerOverlay(){if(!this._overviewControl||this._centerMarkerOverlay)return;var ee=this._overviewControl.getOverviewMap&&this._overviewControl.getOverviewMap();if(!ee)return;var te=ee.getView&&ee.getView();if(!te)return;var st=document.createElement("div");st.className="pnx-mini-map__center-marker",st.setAttribute("aria-hidden","true");let ot=document.createElement("div");ot.classList.add("pnx-mini-map__center-marker-direction"),st.appendChild(ot),this._centerMarkerOverlay=new Overlay({element:st,positioning:"center-center",stopEvent:!1}),ee.addOverlay(this._centerMarkerOverlay),this._centerMarkerOverlay.setPosition(te.getCenter())}_updateCenterMarkerOverlayPosition(ee){if(!(!ee||!this._overviewControl)){var te=this._overviewControl.getOverviewMap&&this._overviewControl.getOverviewMap(),st=te&&te.getView&&te.getView(),ot=this._pictureHeading;st&&(this._isSyncingView=!0,st.setCenter(ee),this._isSyncingView=!1),this._centerMarkerOverlay&&(this._centerMarkerOverlay.setPosition(ee),this._centerMarkerOverlay.getElement().style.transform=`rotate(${ot||0}deg)`)}}_syncToPictureCoordinates(){if(!(!this._pictureCoordinates||!this._overviewControl)){var ee=this._overviewControl.getOverviewMap&&this._overviewControl.getOverviewMap(),te=ee&&ee.getView&&ee.getView();if(te){var st=te.getProjection()&&te.getProjection().getCode(),ot=this._pictureCoordinates.slice();st&&st!=="EPSG:4326"&&(ot=transform$1(ot,"EPSG:4326",st)),this._updateCenterMarkerOverlayPosition(ot)}}}_removeCenterMarkerOverlay(){if(!this._overviewControl||!this._centerMarkerOverlay){this._centerMarkerOverlay=null;return}var ee=this._overviewControl.getOverviewMap&&this._overviewControl.getOverviewMap();ee&&ee.removeOverlay(this._centerMarkerOverlay),this._centerMarkerOverlay=null}_onViewSync(){if(!(!this._map||!this._overviewControl)){var ee=this._overviewControl.getOverviewMap&&this._overviewControl.getOverviewMap();if(ee){var te=this._map.getView&&this._map.getView(),st=ee.getView&&ee.getView();!te||!st||(this._onMainMapMoveEnd=()=>
834{if(!this._isSyncingView){this._isSyncingView=!0;var ot=te.getCenter();st.setCenter(ot),this._updateCenterMarkerOverlayPosition(ot),this._isSyncingView=!1}},this._onMiniMapMoveEnd=()=>{if(!this._isSyncingView){this._isSyncingView=!0;var ot=st.getCenter();te.setCenter(ot),this._updateCenterMarkerOverlayPosition(ot),this._isSyncingView=!1}},this._map.on("moveend",this._onMainMapMoveEnd),ee.on("moveend",this._onMiniMapMoveEnd),this._onMainMapMoveEnd())}}}_unViewSync(){if(!this._overviewControl){this._onMainMapMoveEnd=null,this._onMiniMapMoveEnd=null,this._isSyncingView=!1;return}var ee=this._overviewControl.getOverviewMap&&this._overviewControl.getOverviewMap();this._map&&this._onMainMapMoveEnd&&this._map.un("moveend",this._onMainMapMoveEnd),ee&&this._onMiniMapMoveEnd&&ee.un("moveend",this._onMiniMapMoveEnd),this._onMainMapMoveEnd=null,this._onMiniMapMoveEnd=null,this._isSyncingView=!1}_renderOverviewMap(){if(!this.isConnected||!this._map||this._overviewControl||!this._container)return;var te=Object.assign({},(()=>{var ct=this.getAttribute("options");if(!ct)return{};try{var ut=JSON.parse(ct);return ut&&typeof ut=="object"?ut:{}}catch{return{}}})(),this._options),st=Array.isArray(te.layers)?te.layers.slice():[];te.target=this._container,te.layers=st.filter(ct=>ct&&typeof ct.getSource=="function"),te.collapsed===void 0&&(te.collapsed=!1),te.collapsible===void 0&&(te.collapsible=!0),te.view===void 0&&(te.view=new View({minZoom:16,maxZoom:21})),te.disableOverviewDragging===void 0&&(te.disableOverviewDragging=!0),te.disableOverviewBBox===void 0&&(te.disableOverviewBBox=!0),this._overviewControl=new GeoportalOverviewMap(te),this._map.addControl(this._overviewControl),this._initCenterMarkerOverlay(),this._onViewSync(),this._syncToPictureCoordinates();const ot=ct=>{this.dispatchEvent(new CustomEvent("toggle",{detail:{status:ct}}))};te.collapsed||ot(!0),this._overviewControl.on("overviewmap:toggle",ct=>{ot(!ct.status)})}_removeOverviewMap(){this._unViewSync(),this._removeCenterMarkerOverlay(),this._overviewControl&&this._map&&this._map.removeControl(this._overviewControl),this._overviewControl=null,this._container&&(this._container.innerHTML="")}render(){return b`
835            <style>
836                .pnx-mini-map__container {
837                    width: 100%;
838                    height: 100%;
839                    position: relative;
840                }
841                .pnx-mini-map__container .ol-overviewmap {
842                    position: relative;
843                    left: unset;
844                    bottom: unset;
845                    width: 100%;
846                    height: 100%;
847                    padding: 0;
848                }
849                .pnx-mini-map__container .ol-overviewmap::after {
850                    content: initial !important;
851                }
852                .pnx-mini-map__container .ol-overviewmap .ol-overviewmap-map {
853                    box-sizing: border-box;
854                    position: absolute;
855                    width: 100%;
856                    height: 100%;
857                    border-radius: 4px;
858                    border: solid 4px var(--background-default-grey);
859                    background-color: var(--background-default-grey);
860                    box-shadow: var(--raised-shadow);
861                }
862                .pnx-mini-map__container .ol-overviewmap button {
863                    position: absolute !important;
864                    bottom: 0;
865                    left: 0;
866                    width: 48px;
867                    height: 48px;
868                    padding: unset;
869                    opacity: 0;
870                    transition: opacity 0s; /* à la fermeture, masquer sans attendre  */
871                }
872                .pnx-mini-map__container .ol-overviewmap button[aria-pressed="true"] {
873                    bottom: 8px;
874                    left: 8px;
875                    opacity: 1;
876                    transition: opacity .15s .3s; /* à l'ouverture, attendre 0.3s et animer en 0.15s */
877                }
878                .pnx-mini-map__center-marker {
879                    width: 20px;
880                    height: 20px;
881                    border-radius: 50%;
882                    background-color: var(--background-action-high-blue-france);
883                    box-shadow: 0 0 0 2px #fff, 0 0 0 3px rgba(0, 0, 0, 0.2);
884                    pointer-events: none;
885                    z-index: 2;
886                }
887                .pnx-mini-map__center-marker-direction {
888                    width: 20px;
889                    height: 20px;
890                    background-color: white;
891                    clip-path: polygon(50% 18%, 25% 75%, 50% 66%, 75% 75%);
892                }
893                .pnx-mini-map__container .ol-viewport canvas,
894                .pnx-mini-map__container .ol-overlaycontainer {
895                    cursor: default;
896                }
897                .pnx-mini-map__container .ol-overviewmap.ol-collapsed .ol-overviewmap-map {
898                    display: block;
899                }
900                @media (min-width: 36em) {
901                    .pnx-photo-viewer-mini-map {
902                        transition: width .3s, height .3s;
903                    }
904                }
905                .pnx-photo-viewer-container--minimap-open .pnx-photo-viewer-mini-map {
906                    width: 280px !important;
907                    height: 150px !important;
908                }
909                @media (max-width: 35.99em) {
910                    .pnx-photo-viewer-container--minimap-open .ol-overviewmap .ol-overviewmap-map {
911                        border: none;
912                    }
913                    /* minimap ouverte */
914                    .pnx-photo-viewer-container--minimap-open .pnx-photo-viewer-mini-map {
915                        width: 100cqw !important;
916                    }
917                }
918            </style>
919            <div class="pnx-mini-map__container"></div>
920        `}}customElements.get("pnx-mini-map")||customElements.define("pnx-mini-map",MiniMap);/**
921 * @license
922 * Copyright 2020 Google LLC
923 * SPDX-License-Identifier: BSD-3-Clause
924 */const a=Symbol.for(""),o$1=ne=>{if((ne==null?void 0:ne.r)===a)return ne==null?void 0:ne._$litStatic$},l=new Map,n=ne=>(ee,...te)=>{const st=te.length;let ot,ct;const ut=[],dt=[];let ht,ft=0,pt=!1;for(;ft<st;){for(ht=ee[ft];ft<st&&(ct=te[ft],(ot=o$1(ct))!==void 0);)ht+=ot+ee[++ft],pt=!0;ft!==st&&dt.push(ct),ut.push(ht),ft++}if(ft===st&&ut.push(ee[st]),pt){const mt=ut.join("$$lit$$");(ee=l.get(mt))===void 0&&(ut.raw=ut,l.set(mt,ee=ut)),te=dt}return ne(ee,...te)},u=n(b);/**
925 * @license
926 * Copyright 2017 Google LLC
927 * SPDX-License-Identifier: BSD-3-Clause
928 */const t={CHILD:2},e$1=ne=>(...ee)=>({_$litDirective$:ne,values:ee});class i{constructor(ee){}get _$AU(){return this._$AM._$AU}_$AT(ee,te,st){this._$Ct=ee,this._$AM=te,this._$Ci=st}_$AS(ee,te){return this.update(ee,te)}update(ee,te){return this.render(...te)}}/**
929 * @license
930 * Copyright 2017 Google LLC
931 * SPDX-License-Identifier: BSD-3-Clause
932 */class e extends i{constructor(ee){if(super(ee),this.it=A,ee.type!==t.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(ee){if(ee===A||ee==null)return this._t=void 0,this.it=ee;if(ee===E)return ee;if(typeof ee!="string")throw Error(this.constructor.directiveName+"() called with a non-string value");if(ee===this.it)return this._t;this.it=ee;const te=[ee];return te.raw=te,this._t={_$litType$:this.constructor.resultType,strings:te,values:[]}}}e.directiveName="unsafeHTML",e.resultType=1;const o=e$1(e),NOMINATIM_BASE_URL="https://nominatim.openstreetmap.org",PANORAMAX_DEFAULT_ENDPOINT="https://explore.panoramax.fr/",GEOPLATEFORME_DEFAULT_ENDPOINT="https://cartes.gouv.fr/explorer-les-cartes/";function buildShareUrl(ne,ee,te,st,ot,ct=17){if(!te)return null;var ut=ee==null?void 0:ee.replace(/\/+$/,"").replace(/\/api$/,"");return ne.type==="geoplateforme"?(ut=(ne.url||GEOPLATEFORME_DEFAULT_ENDPOINT).replace(/\/+$/,""),st?`${ut}/photo/${encodeURIComponent(st)}/${encodeURIComponent(te)}/${encodeURIComponent(ot==null?void 0:ot.lat)},${encodeURIComponent(ot==null?void 0:ot.lon)}/${encodeURIComponent(ct)}`:`${ut}/photo//${encodeURIComponent(te)}/${encodeURIComponent(ot==null?void 0:ot.lat)},${encodeURIComponent(ot==null?void 0:ot.lon)}/${encodeURIComponent(ct)}`):ne.type==="panoramax"?(ut=(ne.url||PANORAMAX_DEFAULT_ENDPOINT).replace(/\/+$/,""),`${ut}/fr/index?focus=pic&map=${encodeURIComponent(ct)}/${encodeURIComponent(ot==null?void 0:ot.lat)}/${encodeURIComponent(ot==null?void 0:ot.lon)}&pic=${encodeURIComponent(te)}&seq=${encodeURIComponent(st)}`):`${ut}/?pic=${encodeURIComponent(te)}`}function onceParentAvailable(ne){return ne._parent?Promise.resolve(ne._parent):new Promise(ee=>{const te=setInterval(()=>{const st=ne.closest("pnx-photo-viewer");st&&(ne._parent=st,clearInterval(te),ee(st))},100)})}function reverseGeocode(ne,ee,te="geoplateforme"){if(te==="geoplateforme")return reverseGeocodeGp(ne,ee);if(te==="osm")return reverseGeocodeNominatim(ne,ee)}function reverseGeocodeGp(ne,ee){return new Promise((te,st)=>{Gp.Services.reverseGeocode({position:{x:ee,y:ne},srs:"EPSG:4326",filterOptions:{type:["StreetAddress"]},onSuccess:function(ot){te(ot)}})}).then(te=>{let st=te.locations;return st&&st.length?st[0].placeAttributes.label:null})}function reverseGeocodeNominatim(ne,ee){return fetch(`${NOMINATIM_BASE_URL}/reverse?lat=${ne}&lon=${ee}&zoom=18&format=geocodejson`).then(st=>st.json()).then(st=>{var ot,ct,ut;return geocodeJsonToPlaceName((ut=(ct=(ot=st==null?void 0:st.features)==null?void 0:ot.shift())==null?void 0:ct.properties)==null?void 0:ut.geocoding)})}function geocodeJsonToPlaceName(ne){if(!ne||typeof ne!="object")return"";let ee=ne.name,te=[],st=[];switch(ne.type){case"hamlet":case"croft":case"isolated_dwelling":case"neighbourhood":case"allotments":case"quarter":case"farm":case"farmyard":case"industrial":case"commercial":case"retail":case"city_block":case"residential":case"locality":case"district":st.push(ne.city),st.push(ne.county),st.push(ne.state),st.push(ne.country);break;case"city":st.push(ne.county),st.push(ne.state),st.push(ne.country);break;case"region":st.push(ne.county),st.push(ne.state),st.push(ne.country);break;case"country":break;case"house":case"housenumber":te.push(ne.housenumber),te.push(ne.street),te.push(ne.locality),te.push(ne.district),st.push(ne.city),st.push(ne.county),st.push(ne.state),st.push(ne.country);break;case"street":case"road":default:te.push(ne.street),te.push(ne.locality),te.push(ne.district),st.push(ne.city),st.push(ne.county),st.push(ne.state),st.push(ne.country);break}return te=te.filter(ct=>ct),te=te.filter((ct,ut)=>ct!==ee&&(ut===0||te[ut-1]!==ct)),te=te.length>0?ne.housenumber?te.slice(0,2).join(" "):te.shift():null,te===ee&&(te=null),st=st.filter(ct=>ct),st=st.filter((ct,ut)=>ct!==ee&&(!te||!te.includes(ct))&&(ut===0||st[ut-1]!==ct)),[ee,te,st.shift()].filter(ct=>ct).join(", ")}class PictureLegendWidget extends i$1{constructor(ee){super(),this._share=ee,this._expanded=window.matchMedia("(min-width: 576px)").matches,this._onLegendClick=this._onLegendClick.bind(this)}get share(){return this._share}set share(ee){this._share=ee}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this._prevSearches={},this._parent=this._parent||this.closest("pnx-photo-viewer"),onceParentAvailable(this).then(()=>this._parent.onceReady()).then(()=>{this._parent.psv.addEventListener("picture-loaded",()=>{this._onPicChange(this._parent.psv.getPictureMetadata())})}),this.addEventListener("click",this._onLegendClick)}disconnectedCallback(){this.removeEventListener("click",this._onLegendClick),super.disconnectedCallback()}_onPicChange(ee){var te,st,ot,ct;if(clearTimeout(this._addrTimer1),this._caption=ee==null?void 0:ee.caption,this._hdUrl=(te=ee==null?void 0:ee.panorama)==null?void 0:te.hdUrl,this._shareUrl=buildShareUrl(this._share,(st=this._parent)==null?void 0:st.endpoint,ee==null?void 0:ee.id,(ot=ee==null?void 0:ee.sequence)==null?void 0:ot.id,{lat:ee==null?void 0:ee.gps[1],lon:ee==null?void 0:ee.gps[0]},17),ee){this._visibility=((ct=ee.properties)==null?void 0:ct["geovisio:visibility"])||null,this._visibility==="anyone"&&(this._visibility=null);const ut=`${ee.gps[0].toFixed(4)}/${ee.gps[1].toFixed(4)}`;this._prevSearches[ut]?this._addr=this._prevSearches[ut]:this._parent.psv._sequencePlaying||(this._addr="",this._addrTimer1=setTimeout(()=>{reverseGeocode(ee.gps[1],ee.gps[0],"osm").then(dt=>{clearTimeout(this._addrTimer2),this._addr=dt,this._prevSearches[ut]=dt})},0))}else this._visibility=null,this._addr=""}_onBackClick(){this.dispatchEvent(new CustomEvent("close"))}_onExpand(){this._expanded=!this._expanded}_closeGroup(){const ee=this.querySelector("#pic-legend-headline-menu");ee&&typeof ee.close=="function"&&ee.close()}_closeMenu(){this._closeGroup()}_onLegendClick(){this._closeGroup()}_onCopyShareUrl(){var ee;this._shareUrl&&((ee=navigator.clipboard)==null||ee.writeText(this._shareUrl)),this._closeGroup()}render(){var ee,te;return this._caption?u`
933            <style>
934                .gpf-picture-legend-widget {
935                    cursor: default;
936                    display: flex;
937                    box-sizing: border-box;
938                    width: 450px;
939                    min-width: unset;
940                    max-width: calc(100cqw - 16px);
941                    border-radius: 4px;
942                    color: var(--text-default-grey);
943                    background-color: var(--background-default-grey);
944                    box-shadow: var(--raised-shadow);
945                    transition: opacity 0.2s 0.1s;
946                }
947                @media (max-width: 576px) {
948                    .gpf-picture-legend-widget {
949                        width: 600px;
950                    }
951                }
952                .gpf-picture-legend-widget.is-expanded {
953                    --line-clamp: 2;
954                }
955                .gpf-picture-legend-widget .column.fixed {
956                    width: auto;
957                }
958                .gpf-picture-legend-widget .column-info {
959                    flex: 1;
960                    --text-spacing: 0 0 1rem;
961                }
962                .gpf-picture-legend-widget .row {
963                    display: flex;
964                }
965                .gpf-picture-legend-widget pnx-button::part(btn) {
966                    box-shadow: none;
967                }
968                .gpf-picture-legend-widget pnx-button[size="sm"]::part(btn) {
969                  width: 32px;
970                  height: 32px !important;
971                  flex: 0 0 32px;
972                }
973                .gpf-picture-legend-widget .picture-address {
974                    font-weight: 500;
975                    flex: 1;
976                    margin-right: auto;
977                    /* ellipsis */
978                    overflow: hidden;
979                    display: -webkit-box;
980                    -webkit-line-clamp: var(--line-clamp, 1);
981                    -webkit-box-orient: vertical;
982                }
983                /* menu boutons toggable */
984                .gpf-picture-legend-widget ::part(menu) {
985                    position: absolute !important;
986                    top: 100% !important;
987                    border-radius: 4px;
988                    color: var(--text-default-grey);
989                    background-color: var(--background-default-grey);
990                    border: none;
991                    box-shadow: var(--raised-shadow);
992                }
993                @media (max-width: 768px) {
994                    .gpf-picture-legend-widget ::part(menu) {
995                        right: 0 !important;
996                    }
997                }
998                .gpf-picture-legend-widget .fr-icon-arrow-down-s-line {
999                    transition: transform 0.2s ease;
1000                }
1001                .gpf-picture-legend-widget .fr-icon-arrow-down-s-line.is-rotated {
1002                    transform: rotate(180deg);
1003                }
1004                @keyframes animatedBackground {
1005                    from { background-position: 0 0; }
1006                    to { background-position: 1000px 0; }
1007                }
1008                .pnx-placeholder-loading {
1009                    display: inline-block;
1010                    height: 100%;
1011                    width: 100%;
1012                    background-image: linear-gradient(90deg, #e4e4e4 0%, #f1f1f1 40%, #ededed 60%, #e4e4e4 100%);
1013                    background-position: 0px 0px;
1014                    background-repeat: repeat;
1015                    animation: animatedBackground 5s linear infinite;
1016                }
1017                .link {
1018                    box-sizing: border-box;
1019                    background-image: none;
1020                    background-color: var(--background-default-grey);
1021                    --hover-tint: var(--hover);
1022                }
1023                button.link {
1024                    display: flex;
1025                    align-items: center;
1026                    width: 100%;
1027                    border: none;
1028                    cursor: pointer;
1029                    text-align: left;
1030                    font: inherit;
1031                    color: inherit;
1032                }
1033            </style>
1034            <div class="gpf-picture-legend-widget fr-p-1v ${this._expanded?"is-expanded":""}">
1035                <div class="column fixed">
1036                    <pnx-button kind="superflat" @click=${this._onBackClick}>
1037                        <span class="fr-icon-arrow-left-line" aria-hidden="true"></span>
1038                    </pnx-button>
1039                </div>
1040                <div class="column column-info fr-my-2v fr-ml-2v fr-mr-0">
1041                    <div class="row">
1042                        <div class="picture-address fr-mt-1v" title=${this._addr||""}>
1043                            ${((ee=this._addr)==null?void 0:ee.length)>0?this._addr:u`<span class="pnx-placeholder-loading">&nbsp;</span>`}
1044                        </div>
1045                        <pnx-button-group dir="row" size="sm" class="fr-ml-2v">
1046                           <pnx-togglable-group padded="false" id="pic-legend-headline-menu" ._parent=${this._parent}>
1047                                <pnx-button kind="superflat" size="sm" slot="button">
1048                                    <span class="fr-icon-more-fill" aria-hidden="true"></span>
1049                                </pnx-button>
1050                                <pnx-list-group class="pnx-print-hidden" @click=${this._closeMenu}>
1051                                    <a
1052                                        class="fr-px-2v fr-py-3v link"
1053                                        download
1054                                        target="_blank"
1055                                        href=${this._hdUrl}
1056                                        @click=${this._closeGroup}
1057                                    >Afficher l’image HD</a>
1058                                    <button
1059                                        class="fr-px-2v fr-py-3v link"
1060                                        type="button"
1061                                        @click=${this._onCopyShareUrl}
1062                                    >
1063                                        Copier le lien de partage
1064                                        <span class="pnx-share-copy-icon fr-icon--sm fr-ml-1v" aria-hidden="true"></span>
1065                                    </button>
1066                                </pnx-list-group>
1067                            </pnx-togglable-group>
1068                            <pnx-button kind="superflat" size="sm" @click=${this._onExpand}>
1069                                <span class="fr-icon-arrow-down-s-line ${this._expanded?"is-rotated":""}" aria-hidden="true"></span>
1070                            </pnx-button>
1071                        </pnx-button-group>
1072                    </div>
1073
1074                    ${this._expanded&&((te=this._caption.producer)==null?void 0:te.length)>0?u`
1075                        <div class="fr-text--sm fr-mt-3v">
1076                            <span class="fr-icon-account-circle-fill fr-icon--sm" aria-hidden="true"></span>
1077                            ${this._caption.producer[this._caption.producer.length-1]}
1078                        </div>
1079                    `:A}
1080
1081                    ${this._expanded&&this._caption.date?u`
1082                        <hr class="fr-hr">
1083                        <div class="fr-text--sm fr-mb-0">
1084                            ${this._caption.date.toLocaleDateString("fr-fr")}
1085                            <span class="fr-ml-2v fr-link__detail">${o(this._caption.license)}</span>
1086                        </div>
1087                    `:A}
1088                </div>
1089            </div>
1090        `:A}}Kn(PictureLegendWidget,"properties",{_addr:{state:!0},_caption:{state:!0},_hdUrl:{state:!0},_visibility:{state:!0},_expanded:{state:!0}});customElements.define("gpf-picture-legend-widget",PictureLegendWidget);const constructFromSymbol=Symbol.for("constructDateFrom");function constructFrom(ne,ee){return typeof ne=="function"?ne(ee):ne&&typeof ne=="object"&&constructFromSymbol in ne?ne[constructFromSymbol](ee):ne instanceof Date?new ne.constructor(ee):new Date(ee)}function toDate(ne,ee){return constructFrom(ne,ne)}function addMonths(ne,ee,te){const st=toDate(ne);if(isNaN(ee))return constructFrom(ne,NaN);if(!ee)return st;const ot=st.getDate(),ct=constructFrom(ne,st.getTime());ct.setMonth(st.getMonth()+ee+1,0);const ut=ct.getDate();return ot>=ut?ct:(st.setFullYear(ct.getFullYear(),ct.getMonth(),ot),st)}function subMonths(ne,ee,te){return addMonths(ne,-ee)}var logger$1=LoggerByDefault.getLogger("panoramax");class Panoramax extends ControlExtended{constructor(ee){if(ee=ee||{},super({element:ee.element,target:ee.target,render:ee.render}),!(this instanceof Panoramax))throw new TypeError("ERROR CLASS_CONSTRUCTOR");return this.initialize(ee),this.container=this.initContainer(),this.element?this.element.appendChild(this.container):this.element=this.container,this}setMap(ee){if(ee){if(this.draggable){var te=this.panelPanoramaxButtonsContainer&&this.panelPanoramaxButtonsContainer.parentElement?this.panelPanoramaxButtonsContainer.parentElement:this.options.position?null:ee.getTargetElement();te?Draggable.dragElement(this.panelPanoramaxButtonsContainer,this.panelPanoramaxButtonsHeaderContainer,te):logger$1.warn("Panoramax draggable mode requires a container element")}this.collapsed||this.buttonPanoramaxShow.click(),this.auto&&this.addEventsListeners(ee)}else this.cleanupPhotoViewer(),this.setCollapsed(!0);super.setMap(ee),ee&&this.options.position&&this.setPosition(this.options.position),ee&&this.options.gutter===!1&&this.getContainer().classList.add("gpf-button-no-gutter")}getContainer(){return this.container}getCollapsed(){return this.collapsed}setCollapsed(ee){ee!==void 0&&(ee&&this.collapsed||!ee&&!this.collapsed||(this.buttonPanoramaxShow&&this.buttonPanoramaxShow.click(),this.collapsed=ee))}initialize(ee){this.uid=ee.id||SelectorID.generate(),this.options={collapsed:!0,draggable:!1,panel:!1,auto:!0,hover:!0,displayable:!1,gutter:!1,position:"bottom-left",group:!0,layer:{url:"https://api.panoramax.xyz/api/map/style.json",source:"geovisio",name:"Panoramax"},background:{active:!1,url:"https://data.geopf.fr/annexes/ressources/vectorTiles/styles/PLAN.IGN/gris.json",name:"Background"},buttonsWindow:{display:!0,target:null,position:"bottom-left",order:["filters","contributions","hover","background","layerswitcher","styles"],filters:{display:!0,label:"Effacer les filtres",description:"Réinitialiser les filtres",exclusive:!0,content:{dates:!0,types:!0,periodes:!0}},hover:{display:!0,label:"Aperçu au survol",description:"Afficher un aperçu de l'image au survol"},contributions:{display:!0,label:"Contribuer",description:"Partager vos photos sur Panoramax",link:"https://panoramax.fr/comment-participer-a-panoramax"},styles:{display:!1,label:"Rendu de la carte",description:"Personnaliser le rendu de la carte",content:["Classique","Type de camera","Date de prise de vue"]},background:{display:!0,label:"Fond de carte",description:"Afficher ou masquer un fond de carte de référence"},layerswitcher:{display:!0,label:"Couches Panoramax",description:"Afficher ou masquer les différentes couches Panoramax"}},visualizationWindow:{display:!0,target:null,position:"bottom-left",size:"medium"},viewer:{endpoint:"https://explore.panoramax.fr/api",share:{url:"https://explore.panoramax.fr/",type:"panoramax"},widgets:["btnBack","btnClose","btnZoom","btnFullscreen","cmpPictureLegend","cmpMinimap"],pnxOptions:{class:"",widgets:!0,psvOptions:{}}},interactions:{grid:{active:!0,actions:["zoom"]},sequences:{active:!0,actions:["zoom"]},pictures:{active:!0,actions:["preview"]}}},Helper.assign(this.options.layer,ee.layer),Helper.assign(this.options.background,ee.background),Helper.assign(this.options.visualizationWindow,ee.visualizationWindow),Helper.assign(this.options.interactions,ee.interactions),Helper.assign(this.options.viewer,ee.viewer),Helper.assign(this.options.buttonsWindow,ee.buttonsWindow),["collapsed","draggable","panel","auto","hover","gutter","position","displayable"].forEach(te=>{Object.prototype.hasOwnProperty.call(ee,te)&&(this.options[te]=ee[te])}),logger$1.debug("options",this.options),this.collapsed=this.options.collapsed,this.draggable=this.options.draggable,this.auto=this.options.auto,this.hover=this.options.hover,this.displayable=this.options.displayable,this.buttonPanoramaxShow=null,this.panelPanoramaxViewerContainer=null,this.panelPanoramaxButtonsContainer=null,this.panelPanoramaxButtonsHeaderContainer=null,this.btnPanoramaxOptions=null,this.panelPanoramaxOptions=null,this._onPanoramaxOptionsReposition=null,this.panelPanoramaxFilters=null,this.btnPanoramaxResetFilters=null,this.btnPanoramaxContributions=null,this.btnPanoramaxHover=null,this.btnPanoramaxStyles=null,this.btnPanoramaxBackgroun
1090d=null,this.eventActived=!1,this.eventsListeners={},this.isResetEventPropagation=!1,this.PANORAMAX_LAYERS_TYPES=["grid","sequences","pictures"],this.READY_PANORAMAX_EVENT="pnx:ready",this.OPENED_PANORAMAX_EVENT="pnx:opened",this.CLOSED_PANORAMAX_EVENT="pnx:closed",this.CLICKED_DATA_PANORAMAX_CB="pnx:data:clicked",this.HOVERED_DATA_PANORAMAX_CB="pnx:data:hovered",this.LAYER_PANORAMAX_REMOVE_CB="pnx:layer:removed",this.FILTER_INIT_PANORAMAX_EVENT="pnx:filter:init",this.FILTER_DATES_PANORAMAX_EVENT="pnx:filter:dates",this.FILTER_PERIODE_PANORAMAX_EVENT="pnx:filter:periode",this.FILTER_TYPE_PANORAMAX_EVENT="pnx:filter:type",this.FILTER_RENDER_PANORAMAX_EVENT="pnx:filter:render",this.FULLSCREEN_PANORAMAX_EVENT="pnx:fullscreen",this.CHANGE_PICTURE_PANORAMAX_EVENT="change:picture",this.CHANGE_SEQUENCE_PANORAMAX_EVENT="change:sequence",this.DISPLAY_PHOTO_PANORAMAX_EVENT="change:display",this.photoViewerPanoramax=null,this.layerPanoramax=null,this.backgroundPanoramax=null,this.groupPanoramax=null,this.originalStyleLayerPanoramax=null,this.previewMarkerOverlay=null,this.previewPopupOverlay=null,this.previewPopupElement=null,this.selectedFeature=null,this.mapViewportSyncListener=null,this.photoViewerMiniMap=null,this.photoViewerPictureLoadedListener=null,this.photoViewerPictureRotatedListener=null,this.photoViewerPictureLoadedTarget=null}initContainer(){var ee=this._createMainContainerElement(),te=this.buttonPanoramaxShow=this._createShowWidgetPictoElement();ee.appendChild(te);var st=this.panelPanoramaxViewerContainer=this._createWidgetPanelViewerElement(this.options.panel);this.preventPointerMoveOnMap(this.panelPanoramaxViewerContainer);var ot=this._createWidgetPanelViewerDivElement();st.appendChild(ot);var ct=this.resolveTargetElement(this.options.visualizationWindow.target);ct?ct.appendChild(st):ee.appendChild(st);var ut=this.panelPanoramaxButtonsContainer=this._createWidgetPanelButtonsElement(),dt=this._createWidgetPanelButtonsDivElement();ut.appendChild(dt),this.preventPointerMoveOnMap(ut);var ht=this._createWidgetButtonsElement();dt.appendChild(ht),this.btnPanoramaxOptions=this._createButtonOptionsElement(),ht.appendChild(this.btnPanoramaxOptions),this.panelPanoramaxOptions=this._createWidgetPanelOptionsElement(),ht.appendChild(this.panelPanoramaxOptions),this.preventPointerMoveOnMap(this.panelPanoramaxOptions);var ft=this.panelPanoramaxButtonsHeaderContainer=this._createPanelHeaderElement({icon:"equalizer-line",title:"Options Panoramax",btnClassForClose:"GPpanoramaxButtonOptions"});this.panelPanoramaxOptions.appendChild(ft);let pt=this._createPanelBodyElement();if(this.panelPanoramaxOptions.appendChild(pt),this.options.buttonsWindow.display)for(const vt of this.options.buttonsWindow.order)switch(vt){case"filters":this.options.buttonsWindow.filters.display&&(this.panelPanoramaxFilters=this._createWidgetPanelFiltersElement(this.options.buttonsWindow.filters),this.btnPanoramaxResetFilters=this._createButtonResetFiltersElement(this.options.buttonsWindow.filters),this.panelPanoramaxFilters.lastChild.appendChild(this.btnPanoramaxResetFilters),this.options.buttonsWindow.contributions.display&&(this.btnPanoramaxContributions=this._createButtonContributionsElement(this.options.buttonsWindow.contributions),this.panelPanoramaxFilters.lastChild.appendChild(this.btnPanoramaxContributions)),pt.appendChild(this.panelPanoramaxFilters));break;case"contributions":this.options.buttonsWindow.contributions.display&&!this.options.buttonsWindow.filters.display&&(this.btnPanoramaxContributions=this._createButtonContributionsElement(this.options.buttonsWindow.contributions),pt.appendChild(this.btnPanoramaxContributions));break;case"hover":this.options.buttonsWindow.hover.display&&(this.btnPanoramaxHover=this._createButtonChoiceHoverElement(this.options.hover,this.options.buttonsWindow.hover),pt.appendChild(this.btnPanoramaxHover));break;case"layerswitcher":this.options.buttonsWindow.layerswitcher.display&&(this.btnPanoramaxLayerswitcher=this._createButtonChoiceDisplayLayerElement(this.displayable,this.options.buttonsWindow.layerswitcher),pt.appendChild(this.btnPanoramaxLayerswitcher));break;case"styles":this.options.buttonsWindow.styles.display&&(this.btnPanoramaxStyles=this._createButtonChoiceStyleElement(this.options.buttonsWindow.styles),pt.appendChild(this.btnPanoramaxStyles));break;case"background":this.options.buttonsWindow.background.display&&(this.btnPanoramaxBackgroun
1090d=this._createButtonChoiceBackgroundElement(this.options.background.active,this.options.buttonsWindow.background),pt.appendChild(this.btnPanoramaxBackground));break}var mt=this.resolveTargetElement(this.options.buttonsWindow.target);if(mt?mt.appendChild(ut):ee.appendChild(ut),this.panelPanoramaxOptions){var yt=this.panelPanoramaxButtonsContainer.parentElement||ee;yt.appendChild(this.panelPanoramaxOptions)}return logger$1.log(ee),ee}resolveTargetElement(ee){if(!ee)return null;if(ee instanceof HTMLElement)return ee;if(typeof ee!="string")return logger$1.warn("Unsupported Panoramax target option type:",typeof ee),null;var te=ee.trim();if(!te)return null;var st=null;if(te.charAt(0)==="#"?st=document.getElementById(te.slice(1)):st=document.getElementById(te),!st)try{st=document.querySelector(te)}catch(ot){return logger$1.warn("Invalid Panoramax target selector:",te,ot),null}return st||logger$1.warn("Panoramax target not found:",te),st}onPointerMoveDebounced(ee){return((st,ot)=>{let ct=null,ut=!1;const dt=function(...ht){ut||(clearTimeout(ct),ct=setTimeout(()=>{ut||(st.apply(this,ht),ct=null)},ot))};return dt.cancel=()=>{ct!==null&&(clearTimeout(ct),ct=null)},dt.destroy=()=>{dt.cancel(),ut=!0},dt})(ee,10)}addEventsListeners(ee){var te=this;this.eventsListeners[this.CLICKED_DATA_PANORAMAX_CB]=function(ot){if(!te.eventActived||!te.selectedFeature)return;let ct=te._transformToPanoramaxFeature(te.selectedFeature);var ut=ct.properties.first_sequence||null,dt=ct.properties.id||null,ht=ct.properties.layer||ct.properties["mvt:layer"]||null;if(ht!=="pictures"){if(ht==="grid"&&te.options.interactions.grid.active&&te.options.interactions.grid.actions.includes("zoom")){var ft=ot.map.getView().getZoom(),pt=ft+4;ot.map.getView().animate({center:ct.pointerCoordinate||ct.coordinates,zoom:pt,duration:500})}if(ht==="sequences"&&te.options.interactions.sequences.active&&te.options.interactions.sequences.actions.includes("zoom")){var ft=ot.map.getView().getZoom(),pt=17;ft<pt?ot.map.getView().animate({center:ct.pointerCoordinate||ct.coordinates,zoom:pt,duration:500}):ot.map.getView().animate({center:ct.pointerCoordinate||ct.coordinates,duration:500})}return}else{if(!ut&&!dt){logger$1.warn("No sequenceId or pictureId found for the clicked feature");return}te.displayPhotoViewer(ut,dt)}},ee.on("click",this.eventsListeners[this.CLICKED_DATA_PANORAMAX_CB]);const st=function(ot){if(!te.hover||!te.eventActived||ot.dragging)return;var ct={layerFilter:ft=>ft===te.layerPanoramax,hitTolerance:0};const ut=[];ot.map.forEachFeatureAtPixel(ot.pixel,ft=>{ut.push(ft)},ct);var dt=ot.map.getTargetElement();if(dt&&(dt.style.cursor=ut.length>0?"pointer":""),ut.length===0){te.resetPreview();return}let ht=ut[0];if(ot.map.getView().getZoom()>=17){const ft=ut.find(pt=>(pt.get("mvt:layer")||pt.get("layer"))==="pictures");ft&&(ht=ft)}ht.pointerCoordinate=ot.coordinate,te.displayPreview(ht)};this.eventsListeners[this.HOVERED_DATA_PANORAMAX_CB]=this.onPointerMoveDebounced(st),ee.on("pointermove",this.eventsListeners[this.HOVERED_DATA_PANORAMAX_CB]),this.eventsListeners[this.LAYER_PANORAMAX_REMOVE_CB]=ot=>{var ct=ot.element;(ct===te.groupPanoramax||ct===te.layerPanoramax)&&te.setCollapsed(!0)},ee.getLayers().on("remove",this.eventsListeners[this.LAYER_PANORAMAX_REMOVE_CB]),this.eventsListeners[this.CHANGE_PICTURE_PANORAMAX_EVENT]=ot=>{},this.on("change:picture",this.eventsListeners[this.CHANGE_PICTURE_PANORAMAX_EVENT]),this.eventsListeners[this.CHANGE_SEQUENCE_PANORAMAX_EVENT]=ot=>{},this.on("change:sequence",this.eventsListeners[this.CHANGE_SEQUENCE_PANORAMAX_EVENT]),this.eventsListeners[this.DISPLAY_PHOTO_PANORAMAX_EVENT]=async ot=>{var ct=te.get("display");logger$1.debug("display photo panoramax",ct);const ut=te.get("sequence"),dt=te.get("picture");ct&&dt&&ut?te.photoViewerPanoramax?te.displayPhotoViewer(ut,dt):te.once(te.READY_PANORAMAX_EVENT,()=>{te.displayPhotoViewer(te.get("sequence"),te.get("picture"))}):te.hidePhotoViewer()},this.on("change:display",this.eventsListeners[this.DISPLAY_PHOTO_PANORAMAX_EVENT])}removeEventsListeners(ee){if(ee){this.resetPreview(),this.eventsListeners[this.CLICKED_DATA_PANORAMAX_CB]&&(ee.un("click",this.eventsListeners[this.CLICKED_DATA_PANORAMAX_CB]),delete this.eventsListeners[this.CLICKED_DATA_PANORAMAX_CB]),this.eventsListeners[this.HOVERED_DATA_PANORAMAX_CB]&&(this.eventsListeners[this.HOVERED_DATA_PANORAMAX_CB].destroy&&this.eventsListeners[this.HOVERED_DATA_PANORAMAX_CB].destroy(),ee.un("pointermove",this.eventsListeners[this.HOVERED_DATA_PANORAMAX_CB]),delete this.eventsListeners[this.HOVERED_DATA_PANORAMAX_CB]);var te=ee.getTargetElement();te&&(te.style.cursor=""),this.eventsListeners[this.LAYER_PANORAMAX_REMOVE_CB]&&(ee.getLayers().un("remove",this.eventsListeners[this.LAYER_PANORAMAX_REMOVE_CB]),delete this.eventsListeners[this.LAYER_PANORAMAX_REMOVE_CB]),this.eventsListeners[this.CHANGE_PICTURE_PANORAMAX_EVENT]&&(this.un("change:picture",this.eventsListeners[this.CHANGE_PICTURE_PANORAMAX_EVENT]),delete this.eventsListeners[this.CHANGE_PICTURE_PANORAMAX_EVENT]),this.eventsListeners[this.CHANGE_SEQUENCE_PANORAMAX_EVENT]&&(this.un("change:sequence",this.eventsListeners[this.CHANGE_SEQUENCE_PANORAMAX_EVENT]),delete this.eventsListeners[this.CHANGE_SEQUENCE_PANORAMAX_EVENT]),this.eventsListeners[this.DISPLAY_PHOTO_PANORAMAX_EVENT]&&(this.un("change:display",this.eventsListeners[this.DISPLAY_PHOTO_PANORAMAX_EVENT]),delete this.eventsListeners[this.DISPLAY_PHOTO_PANORAMAX_EVENT])}}preventPointerMoveOnMap(ee){ee.addEventListener("pointermove",this.stopImmediatePropagation)}allowPointerMoveOnMap(ee){ee.removeEventListener("pointermove",this.stopImmediatePropagation)}stopImmediatePropagation(ee){ee.stopImmediatePropagation()}reset(){if(this.options.group&&this.resetGroupLayer(),this.resetBackgroun
1090d(),this.resetLayer(),this.resetButtons(),this.resetVisualizationWindow(),this.resetPhotoViewer(),this.resetPreview(),this.resetAllGroupFilters({isReset:!0}),this.eventActived=!1,!this.auto){var ee=this.getMap();this.removeEventsListeners(ee)}}resetGroupLayer(){logger$1.debug("resetGroupLayer");var ee=this.getMap();this.groupPanoramax&&(ee.removeLayer(this.groupPanoramax),this.groupPanoramax=null)}resetLayer(){logger$1.debug("resetLayer");var ee=this.getMap();ee&&this.layerPanoramax&&(ee.removeLayer(this.layerPanoramax),this.groupPanoramax&&this.groupPanoramax.getLayers().remove(this.layerPanoramax),this.layerPanoramax=null)}resetBackground(){logger$1.debug("resetBackground");var ee=this.getMap();ee&&this.backgroundPanoramax&&(ee.removeLayer(this.backgroundPanoramax),this.groupPanoramax&&this.groupPanoramax.getLayers().remove(this.backgroundPanoramax),this.backgroundPanoramax=null)}resetButtons(){this.unbindFiltersPanelPositioning(),this.panelPanoramaxOptions&&this.panelPanoramaxOptions.classList.replace("gpf-visible","gpf-hidden"),this.btnPanoramaxOptions&&this.btnPanoramaxOptions.setAttribute("aria-pressed","false"),this.hideButtonsPanel()}resetPhotoViewer(){this.photoViewerPanoramax&&(this.photoViewerPanoramax.getAttribute("sequence")&&this.photoViewerPanoramax.setAttribute("sequence",""),this.photoViewerPanoramax.getAttribute("picture")&&this.photoViewerPanoramax.setAttribute("picture",""),typeof this.photoViewerPanoramax.select=="function"&&this.photoViewerPanoramax.select(),this.hidePhotoViewer())}cleanupPhotoViewer(){if(this.photoViewerPanoramax){if(this.photoViewerPanoramax.parentElement)try{this.photoViewerPanoramax.parentElement.removeChild(this.photoViewerPanoramax)}catch(ee){logger$1.warn("Error removing photo viewer from DOM during cleanup",ee)}this.photoViewerPanoramax=null,this.photoViewerPictureLoadedListener=null,this.photoViewerPictureRotatedListener=null,this.photoViewerPictureLoadedTarget=null}}resetVisualizationWindow(){this.stopMapViewportSync()}resetPreview(){var ee=this.getMap();ee&&(this.previewMarkerOverlay&&(ee.removeOverlay(this.previewMarkerOverlay),this.previewMarkerOverlay=null),this.previewPopupOverlay&&(ee.removeOverlay(this.previewPopupOverlay),this.previewPopupOverlay=null),this.previewPopupElement=null,this.selectedFeature=null)}async load(){try{this.options.group&&this.setLayerGroup(),this.eventActived=!0,this.auto||this.addEventsListeners(this.getMap()),await this.setBackground(this.options.background),await this.setLayer(this.options.layer),await this.initButtons(),await this.initFilters(),await this.initVisualizationWindow(),await this.initPhotoViewer()}catch(ee){logger$1.error("Error loading Panoramax content",ee)}}async waitForMapboxVectorLayerReady(ee){return new Promise((te,st)=>{if(!ee){st(new Error("Layer is not defined"));return}var ot=ee.getSource&&ee.getSource();if(ot&&ot.getState&&ot.getState()==="ready"){te(ee);return}if(ot&&ot.getState&&ot.getState()==="error"){st(new Error("Error loading layer source"));return}ee.once("sourceready",()=>{te(ee)}),ee.once("error",ct=>{st(ct&&ct.error?ct.error:new Error("Error loading layer style"))})})}async getStyleJsonFromMapboxVectorLayer(ee){if(!ee)return null;var te=this.getMap();if(!te)return null;var st=ee.get("mapbox-style");if(!st)try{const ct=await fetch(ee.styleUrl);if(!ct.ok)throw new Error("HTTP "+ct.status+" while fetching style");st=await ct.json(),ee.set("mapbox-style",st);var ot=ee.getSource&&ee.getSource();ot&&(ot.set("mapbox-source",ee.get("mapbox-source")),ot.set("mapbox-style",ee.get("mapbox-style")),ot.set("mapbox-layers",ee.get("mapbox-layers")))}catch(ct){logger$1.warn("Unable to cache Panoramax layer style JSON",ct)}return this.originalStyleLayerPanoramax=st?JSON.parse(JSON.stringify(st)):null,st}setLayerGroup(){var ee=this.getMap();ee&&(this.groupPanoramax||(this.groupPanoramax=new LayerGroup,this.groupPanoramax.gpResultLayerId="panoramax:group",this.groupPanoramax.set("display",this.displayable),this.groupPanoramax.setProperties({title:"Panoramax",description:"Couche de données Panoramax"}),ee.addLayer(this.groupPanoramax)))}async setLayer(ee){logger$1.debug("initLayer");var te=this.getMap();if(te){var st=ee.minZoom||9,ot=ee.maxZoom||21,ct=new MapboxVectorLayer({styleUrl:ee.url,source:ee.source,declutter:!0,minZoom:st,maxZoom:
1090ot});ct.styleUrl=ee.url,ct.gpResultLayerId="panoramax:layer",this.options.group&&this.setLayerGroup(),this.groupPanoramax?this.groupPanoramax.getLayers().push(ct):te.addLayer(ct),te.getView().getZoom()<st&&te.getView().animate({zoom:st+.5});try{return await this.waitForMapboxVectorLayerReady(ct),await this.getStyleJsonFromMapboxVectorLayer(ct),ct.set("title",ee.name),ct.set("description","Couche de données Panoramax"),ct.set("display",this.displayable),this.layerPanoramax=ct,ct}catch(ut){throw logger$1.error("Error loading Panoramax layer style",ut),te.removeLayer(ct),this.layerPanoramax=null,ut}}}async setBackground(ee){if(logger$1.debug("initBackground"),!!ee.active){var te=this.getMap();if(te){var st=ee.minZoom||9,ot=ee.maxZoom||21,ct=new MapboxVectorLayer({styleUrl:ee.url,declutter:!0,minZoom:st,maxZoom:ot});ct.styleUrl=ee.url,ct.gpResultLayerId="panoramax:background",this.groupPanoramax?this.groupPanoramax.getLayers().insertAt(0,ct):te.addLayer(ct);try{if(await this.waitForMapboxVectorLayerReady(ct),this.backgroundPanoramax=ct,this.backgroundPanoramax.set("title",ee.name),this.backgroundPanoramax.set("display",this.displayable),this.layerPanoramax){const ut=this.layerPanoramax.getZIndex()??0;this.backgroundPanoramax.setZIndex(ut+1)}return ct}catch(ut){throw logger$1.error("Error loading Panoramax background layer style",ut),te.removeLayer(ct),this.backgroundPanoramax=null,ut}}}}async initButtons(){return new Promise((ee,te)=>{logger$1.debug("initButtons"),this.showButtonsPanel(),ee()})}async initFilters(){return new Promise((ee,te)=>{if(logger$1.debug("initFilters"),this.options.buttonsWindow&&this.options.buttonsWindow.filters){var st=this.options.buttonsWindow.filters.content||{};st.types&&typeof st.types=="object"&&st.types.value&&this.applyGroupFilter("group-filter-types",{value:st.types.value}),st.periodes,st.dates,st.renders}ee()})}async initVisualizationWindow(){return new Promise((ee,te)=>{logger$1.debug("initVisualizationWindow"),this.setSizeWindow(this.options.visualizationWindow.size),ee()})}async initPhotoViewer(){var ee=this;return new Promise((te,st)=>{logger$1.debug("initPhotoViewer"),ee.photoViewerPanoramax?typeof ee.photoViewerPanoramax.onceReady=="function"&&ee.photoViewerPanoramax.onceReady().then(()=>{ee.bindMiniMapToPhotoViewer(),ee.dispatchEvent(ee.READY_PANORAMAX_EVENT)}):(ee.photoViewerPanoramax=ee.createPhotoViewer(),ee.photoViewerPanoramax.onceReady().then(()=>{console.debug("Panoramax photo viewer is ready",ee.photoViewerPanoramax),ee.bindMiniMapToPhotoViewer()}),ee.photoViewerPanoramax.addEventListener("ready",()=>{console.debug("Panoramax photo viewer is ready",ee),ee.removeWidgetPlayer(),ee.removeWidgetAnnotationsSwitch(),ee.removeWidgetPictureLegendDrawer(),ee.dispatchEvent(ee.READY_PANORAMAX_EVENT)}),ee.photoViewerPanoramax.addEventListener("broken",()=>{console.warn("Panoramax photo viewer is broken")})),te()})}showButtonsPanel(){this.panelPanoramaxButtonsContainer.firstChild.classList.replace("gpf-hidden","gpf-visible")}hideButtonsPanel(){this.panelPanoramaxButtonsContainer.firstChild.classList.replace("gpf-visible","gpf-hidden")}createPhotoViewer(){if(!this.panelPanoramaxViewerContainer)return null;var ee=this.panelPanoramaxViewerContainer.querySelector("pnx-photo-viewer");if(!ee){ee=document.createElement("pnx-photo-viewer"),ee.id="pnx-photo-viewer-"+this.uid,ee.className="pnx-photo-viewer-container",ee.style="width: 100%; height: 100%",ee["psv-options"]=this.options.viewer.pnxOptions.psvOptions,ee.setAttribute("endpoint",this.options.viewer.endpoint),ee.setAttribute("url-parameters","false");var te=this.options.viewer.widgets&&Array.isArray(this.options.viewer.widgets)?this.options.viewer.widgets:null;te&&(te.includes("btnBack")&&!te.includes("cmpPictureLegend")&&this.addWidget(this.createWidgetBtnBack(),ee),te.includes("btnClose")&&this.addWidget(this.createWidgetBtnClose(),ee),te.includes("btnZoom")&&this.addWidget(this.createWidgetBtnZoom(),ee),te.includes("btnFullscreen")&&this.addWidget(this.createWidgetBtnFullScreen(),ee),te.includes("cmpPictureLegend")&&this.addWidget(this.createWidgetCmpPictureLegend(this.options.viewer.share),ee),te.includes("cmpMinimap")&&this.addWidget(this.createWidgetCmpMinimap(),ee));var st=this.panelPanoramaxViewerContainer.lastChild;if(this.options.visualizationWindow.target){var ot=this.resolveTargetElement(this.options.visualizationWindow.target);ot&&(st=ot)}st&&st.appendChild(ee)}return ee}displayPhotoViewer(ee,te){if(!this.photoViewerPanoramax){logger$1.warn("Panoramax photo viewer is not available");return}typeof this.photoViewerPanoramax.select=="function"?this.photoViewerPanoramax.select(ee,te,!0):(ee&&this.photoViewerPanoramax.setAttribute("sequence",ee),te&&this.photoViewerPanoramax.setAttribute("picture",te)),this.resetPreview(),this.showPhotoViewer(),this.hideButtonsPanel(),this.unset("picture",!0),this.unset("sequence",!0),this.unset("display",!0)}
1090showPhotoViewer(){if(this.panelPanoramaxViewerContainer.classList.replace("gpf-hidden","gpf-visible"),this.panelPanoramaxViewerContainer.lastChild.classList.replace("gpf-hidden","gpf-visible"),!this.photoViewerPanoramax){logger$1.warn("Panoramax photo viewer is not available");return}this.photoViewerPanoramax.classList.replace("gpf-hidden","gpf-visible");let ee=this.photoViewerPanoramax.querySelector(".pnx-photo-viewer-fullscreen-button");ee.querySelectorAll("span")[0].removeAttribute("hidden"),ee.querySelectorAll("span")[1].setAttribute("hidden",!0)}hidePhotoViewer(){if(this.panelPanoramaxViewerContainer.classList.replace("gpf-visible","gpf-hidden"),this.panelPanoramaxViewerContainer.lastChild.classList.replace("gpf-visible","gpf-hidden"),this.stopMapViewportSync(),!this.photoViewerPanoramax){logger$1.warn("Panoramax photo viewer is not available");return}this.photoViewerPanoramax.classList.replace("gpf-visible","gpf-hidden")}bindMiniMapToPhotoViewer(){if(!(!this.photoViewerPanoramax||!this.photoViewerPanoramax.psv)){var ee=this.photoViewerPanoramax.psv;this.photoViewerPictureLoadedTarget&&this.photoViewerPictureLoadedTarget!==ee&&this.photoViewerPictureLoadedListener&&this.photoViewerPictureRotatedListener&&(this.photoViewerPictureLoadedTarget.removeEventListener("view-rotated",this.photoViewerPictureRotatedListener),this.photoViewerPictureLoadedTarget.removeEventListener("picture-loaded",this.photoViewerPictureLoadedListener),this.photoViewerPictureLoadedTarget=null),!(this.photoViewerPictureLoadedTarget===ee&&this.photoViewerPictureLoadedListener&&this.photoViewerPictureRotatedListener)&&(this.photoViewerPictureLoadedListener||(this.photoViewerPictureLoadedListener=()=>{if(!this.photoViewerMiniMap)return;var te=this.photoViewerPanoramax&&this.photoViewerPanoramax.psv?this.photoViewerPanoramax.psv:null,st=te&&typeof te.getPictureMetadata=="function"?te.getPictureMetadata():null,ot=st&&Array.isArray(st.gps)?st.gps:null;typeof this.photoViewerMiniMap.setPhotoCoordinates=="function"?this.photoViewerMiniMap.setPhotoCoordinates(ot):this.photoViewerMiniMap.pictureCoordinates=ot;let ct=te.getPosition().yaw*(180/Math.PI);ct+=te.getPictureOriginalHeading(),typeof this.photoViewerMiniMap.setPhotoHeading=="function"?this.photoViewerMiniMap.setPhotoHeading(ct):this.photoViewerMiniMap.pictureHeading=ct}),ee.addEventListener("picture-loaded",this.photoViewerPictureLoadedListener),this.photoViewerPictureRotatedListener||(this.photoViewerPictureRotatedListener=()=>{if(!this.photoViewerMiniMap)return;var te=this.photoViewerPanoramax&&this.photoViewerPanoramax.psv?this.photoViewerPanoramax.psv:null;if(!te)return;let st=te.getPosition().yaw*(180/Math.PI);st+=te.getPictureOriginalHeading(),typeof this.photoViewerMiniMap.setPhotoHeading=="function"?this.photoViewerMiniMap.setPhotoHeading(st):this.photoViewerMiniMap.pictureHeading=st}),ee.addEventListener("view-rotated",this.photoViewerPictureRotatedListener),this.photoViewerPictureLoadedTarget=ee)}}addWidget(ee,te){ee&&te&&te.appendChild(ee)}createWidgetBtnBack(){var ee=`
1091        <svg
1092            xmlns="http://www.w3.org/2000/svg"
1093            aria-hidden="true"
1094            focusable="false"
1095            class="pnx-btn-svg"
1096            role="img"
1097            viewBox="0 0 24 24"
1098        >
1099            <path fill="currentColor" fill-rule="evenodd" clip-rule="evenodd" d="M7.828 11H20V13H7.828L13.192 18.364L11.778 19.778L4 12L11.778 4.22205L13.192 5.63605L7.828 11Z" />
1100        </svg>`,te=document.createElement("pnx-button");return te.className="pnx-photo-viewer-back-button",te.setAttribute("slot","top-left"),te.setAttribute("kind","superflat"),te.setAttribute("size","md"),te.title="Retour",te.innerHTML=ee,te.addEventListener("click",()=>{this.onClickPnxViewerWidgetBack()}),te}createWidgetBtnClose(){var ee=`
1101        <svg
1102            xmlns="http://www.w3.org/2000/svg"
1103            aria-hidden="true"
1104            focusable="false"
1105            class="pnx-btn-svg"
1106            role="img"
1107            viewBox="0 0 24 24"
1108        >
1109            <path fill="currentColor" d="m12 10.6 4.95-4.96 1.4 1.4L13.42 12l4.96 4.95-1.4 1.4L12 13.42l-4.95 4.96-1.4-1.4L10.58 12 5.63 7.05l1.4-1.4z"/>
1110        </svg>`,te=document.createElement("pnx-button");return te.classList.add("pnx-photo-viewer-close-button","pnx-mobile-hidden"),te.setAttribute("slot","top-right"),te.setAttribute("kind","superflat"),te.setAttribute("size","md"),te.title="Fermer",te.innerHTML=ee,te.addEventListener("click",()=>{this.onClickPnxViewerWidgetBack()}),te}createWidgetBtnZoom(){var ee=document.createElement("pnx-widget-zoom");return ee.className="pnx-photo-viewer-zoom-button",ee.setAttribute("slot","bottom-right"),ee.setAttribute("kind","superflat"),ee.setAttribute("size","md"),ee.addEventListener("click",te=>{this.onClickPnxViewerWidgetZoom(te)}),ee}createWidgetBtnFullScreen(){let ee=this.panelPanoramaxViewerContainer;if(!ee)return;var te=`
1111        <svg
1112            xmlns="http://www.w3.org/2000/svg"
1113            aria-hidden="true"
1114            focusable="false"
1115            class="pnx-btn-svg"
1116            role="img"
1117            viewBox="0 0 24 24"
1118        >
1119            <path fill="currentColor" d="M8 3V5H4V9H2V3H8ZM2 21V15H4V19H8V21H2ZM22 21H16V19H20V15H22V21ZM22 9H20V5H16V3H22V9Z" />
1120        </svg>`;let st=`
1121        <svg
1122            xmlns="http://www.w3.org/2000/svg"
1123            aria-hidden="true"
1124            focusable="false"
1125            class="pnx-btn-svg"
1126            role="img"
1127            viewBox="0 0 24 24"
1128        >
1129            <path fill="currentColor" d="M18 7H22V9H16V3H18V7ZM8 9H2V7H6V3H8V9ZM18 17V21H16V15H22V17H18ZM8 15V21H6V17H2V15H8Z" />
1130        </svg>`;var ot=document.createElement("pnx-button");return ot.className="pnx-photo-viewer-fullscreen-button",ot.setAttribute("slot","bottom-right"),ot.setAttribute("kind","superflat"),ot.setAttribute("size","md"),ot.title="Plein écran",ot.innerHTML=`
1131            <span>${te}</span>
1132            <span hidden>${st}</span>
1133        `,ot.addEventListener("click",ct=>{this.onClickPnxViewerWidgetFullScreen(ct),ee._pnxFullscreen?(ot.querySelectorAll("span")[1].removeAttribute("hidden"),ot.querySelectorAll("span")[0].setAttribute("hidden",!0)):(ot.querySelectorAll("span")[0].removeAttribute("hidden"),ot.querySelectorAll("span")[1].setAttribute("hidden",!0))}),ot}createWidgetCmpPictureLegend(ee){var te=document.createElement("gpf-picture-legend-widget");return te.setAttribute("slot","top-left"),te.share=ee,te.addEventListener("close",()=>{this.onClickPnxViewerWidgetBack()}),te}createWidgetCmpMinimap(){const ee={name:"GEOGRAPHICALGRIDSYSTEMS.PLANIGNV2",globalConstraint:{maxScaleDenominator:5590822640287179e-7,minScaleDenominator:1066.364791924893,bbox:{left:-179.9,right:179.9,top:85,bottom:-85}},params:{url:"https://data.geopf.fr/wmts",styles:"normal",version:"1.0.0",format:"image/png",projection:"EPSG:3857",minScale:1066.364791924893,maxScale:5590822640287179e-7,extent:{left:-179.9,right:179.9,top:85,bottom:-85},legends:[{format:"image/jpeg",url:"https://data.geopf.fr/annexes/ressources/legendes/LEGEND.jpg",minScaleDenominator:"200"}],title:"Plan IGN",description:`<p>Cartographie multi-échelles sur le territoire national, issue des bases de données vecteur de l’IGN, mis à jour régulièrement et réalisée selon un processus entièrement automatisé.</p>
1134`,tileMatrixSetLimits:{0:{minTileRow:"0",maxTileRow:"0",minTileCol:"0",maxTileCol:"0"},1:{minTileRow:"0",maxTileRow:"1",minTileCol:"0",maxTileCol:"1"},2:{minTileRow:"0",maxTileRow:"3",minTileCol:"0",maxTileCol:"3"},3:{minTileRow:"0",maxTileRow:"7",minTileCol:"0",maxTileCol:"7"},4:{minTileRow:"0",maxTileRow:"15",minTileCol:"0",maxTileCol:"15"},5:{minTileRow:"0",maxTileRow:"31",minTileCol:"0",maxTileCol:"31"},6:{minTileRow:"0",maxTileRow:"63",minTileCol:"0",maxTileCol:"63"},7:{minTileRow:"0",maxTileRow:"127",minTileCol:"0",maxTileCol:"127"},8:{minTileRow:"0",maxTileRow:"255",minTileCol:"0",maxTileCol:"255"},9:{minTileRow:"0",maxTileRow:"511",minTileCol:"0",maxTileCol:"511"},10:{minTileRow:"1",maxTileRow:"1022",minTileCol:"0",maxTileCol:"1023"},11:{minTileRow:"3",maxTileRow:"2044",minTileCol:"0",maxTileCol:"2047"},12:{minTileRow:"6",maxTileRow:"4089",minTileCol:"1",maxTileCol:"4094"},13:{minTileRow:"13",maxTileRow:"8178",minTileCol:"2",maxTileCol:"8189"},14:{minTileRow:"26",maxTileRow:"16357",minTileCol:"4",maxTileCol:"16379"},15:{minTileRow:"53",maxTileRow:"32714",minTileCol:"9",maxTileCol:"32758"},16:{minTileRow:"107",maxTileRow:"65428",minTileCol:"18",maxTileCol:"65517"},17:{minTileRow:"214",maxTileRow:"130857",minTileCol:"36",maxTileCol:"131035"},18:{minTileRow:"429",maxTileRow:"261714",minTileCol:"72",maxTileCol:"262071"},19:{minTileRow:"858",maxTileRow:"523429",minTileCol:"145",maxTileCol:"524142"}},TMSLink:"PM_0_19",matrixIds:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19"],tileMatrices:{0:{matrixId:"0",matrixHeight:1,matrixWidth:1,scaleDenominator:5590822640287179e-7,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},1:{matrixId:"1",matrixHeight:2,matrixWidth:2,scaleDenominator:27954113201435894e-8,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},2:{matrixId:"2",matrixHeight:4,matrixWidth:4,scaleDenominator:1397705660071793e-7,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},3:{matrixId:"3",matrixHeight:8,matrixWidth:8,scaleDenominator:6988528300358965e-8,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},4:{matrixId:"4",matrixHeight:16,matrixWidth:16,scaleDenominator:3494264150179486e-8,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},5:{matrixId:"5",matrixHeight:32,matrixWidth:32,scaleDenominator:1747132075089743e-8,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},6:{matrixId:"6",matrixHeight:64,matrixWidth:64,scaleDenominator:8735660375448715e-9,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},7:{matrixId:"7",matrixHeight:128,matrixWidth:128,scaleDenominator:4.3678301877243575e6,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},8:{matrixId:"8",matrixHeight:256,matrixWidth:256,scaleDenominator:2.1839150938621787e6,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},9:{matrixId:"9",matrixHeight:512,matrixWidth:512,scaleDenominator:1.0919575469310894e6,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},10:{matrixId:"10",matrixHeight:1024,matrixWidth:1024,scaleDenominator:545978.7734655464,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},11:{matrixId:"11",matrixHeight:2048,matrixWidth:2048,scaleDenominator:272989.38673277217,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},12:{matrixId:"12",matrixHeight:4096,matrixWidth:4096,scaleDenominator:136494.69336638608,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},13:{matrixId:"13",matrixHeight:8192,matrixWidth:8192,scaleDenominator:68247.34668319322,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},14:{matrixId:"14",matrixHeight:16384,matrixWidth:16384,scaleDenominator:34123.673341596535,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},15:{matrixId:"15",matrixHeight:32768,matrixWidth:32768,scaleDenominator:17061.83667079829,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},16:{matrixId:"16",matrixHeight:65536,matrixWidth:65536,scaleDenominator:8530.918335399145,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},17:{matrixId:"17",matrixHeight:131072,matrixWidth:131072,scaleDenominator:4265.459167699572,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},18:{matrixId:"18",matrixHeight:262144,matrixWidth:262144,scaleDenominator:2132.7295838497826,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}},19:{matrixId:"19",matrixHeight:524288,matrixWidth:524288,scaleDenominator:1066.364791924893,tileHeight:256,tileWidth:256,topLeftCorner:{x:-200375083427892e-7,y:200375083427892e-7}}},nativeResolutions:["156543.0339280410","78271.51696402048","39135.75848201023","19567.87924100
1134512","9783.939620502561","4891.969810251280","2445.984905125640","1222.992452562820","611.4962262814100","305.7481131407048","152.8740565703525","76.43702828517624","38.21851414258813","19.10925707129406","9.554628535647032","4.777314267823516","2.388657133911758","1.194328566955879","0.5971642834779395","0.2985821417389697"]}};var te=document.createElement("pnx-mini-map");return te.className="pnx-photo-viewer-mini-map",te.setAttribute("slot","bottom-left"),te.map=this.getMap(),te.options={layers:[new LayerWMTS({layer:"GEOGRAPHICALGRIDSYSTEMS.PLANIGNV2",configuration:ee}),this.layerPanoramax],width:48,height:48,disableOverviewDragging:!0,disableOverviewBBox:!0},te.addEventListener("toggle",st=>{st.detail.status?this.photoViewerPanoramax.classList.add("pnx-photo-viewer-container--minimap-open"):this.photoViewerPanoramax.classList.remove("pnx-photo-viewer-container--minimap-open")}),this.photoViewerMiniMap=te,te}removeWidgetAnnotationsSwitch(){if(!this.photoViewerPanoramax){logger$1.warn("Panoramax photo viewer is not available");return}var ee=this.photoViewerPanoramax.querySelector("pnx-annotations-switch");ee&&ee.remove()}removeWidgetPictureLegendDrawer(){if(!this.photoViewerPanoramax){logger$1.warn("Panoramax photo viewer is not available");return}var ee=this.photoViewerPanoramax.querySelector("pnx-bottom-drawer");ee&&ee.remove()}removeWidgetPlayer(){if(!this.photoViewerPanoramax){logger$1.warn("Panoramax photo viewer is not available");return}var ee=this.photoViewerPanoramax.querySelector("pnx-widget-player");ee&&ee.remove()}setMarker(ee){if(!(!ee||ee.length<2)){var te=this.getMap();if(te){var st=[ee[0],ee[1]];if(!this.previewMarkerOverlay){var ot=document.createElement("span");ot.className="pnx-preview-marker",this.previewMarkerOverlay=new Overlay({element:ot,positioning:"center-center",stopEvent:!1}),te.addOverlay(this.previewMarkerOverlay),this.preventPointerMoveOnMap(ot)}this.previewMarkerOverlay.setPosition(st)}}}setPopup(ee,te=""){if(!(!ee||ee.length<2)){var st=this.getMap();if(st){var ot=[ee[0],ee[1]];this.previewPopupElement||(this.previewPopupElement=document.createElement("div"),this.previewPopupElement.className="pnx-popup-content"),this.previewPopupElement.innerHTML=te,this.previewPopupOverlay||(this.previewPopupOverlay=new Overlay({element:this.previewPopupElement,positioning:"bottom-center",stopEvent:!1}),st.addOverlay(this.previewPopupOverlay),this.preventPointerMoveOnMap(this.previewPopupElement)),this.previewPopupOverlay.setPosition(ot)}}}displayPreview(ee){let te=ee.getProperties();var st=te.layer||te["mvt:layer"];this.selectedFeature=ee;var ot=this._transformToPanoramaxFeature(ee);switch(st){case"grid":this.options.interactions.grid.active&&this.options.interactions.grid.actions.includes("preview")&&this.displayPreviewGrid(ot.coordinates,ot.properties);break;case"sequences":this.options.interactions.sequences.active&&this.options.interactions.sequences.actions.includes("preview")&&this.displayPreviewSequence(ot.coordinates,ot.properties);break;case"pictures":this.options.interactions.pictures.active&&this.options.interactions.pictures.actions.includes("preview")&&this.displayPreviewPicture(ot.coordinates,ot.properties);break;default:logger$1.warn("Unknown feature type :",st)}}_transformToPanoramaxFeature(ee){return{coordinates:ee.getFlatCoordinates(),extent:ee.getExtent(),pointerCoordinate:ee.pointerCoordinate,properties:ee.getProperties()}}_escape(ee){return ee==null?"":String(ee).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/\"/g,"&quot;").replace(/'/g,"&#39;")}displayPreviewGrid(ee,te){var st=this._escape(te.nb_pictures),ot=this._escape(te.nb_360_pictures),ct=this._escape(te.nb_flat_pictures),ut="pnx-preview-grid-popup",dt=`
1135            <ul class="${ut}">
1136                <li><strong>nombre de photos :</strong> ${st||"-"}</li>
1137                <li><strong>nombre de photos 360° :</strong> ${ot||"-"}</li>
1138                <li><strong>nombre de photos plates :</strong> ${ct||"-"}</li>
1139            </ul>
1140        `;this.setPopup(ee,dt),this.setMarker(ee)}displayPreviewSequence(ee,te){var st=te.id,ot=this._escape(st),ct=this._escape(te.date||te.created_at||te.datetime),ut=this._escape(te.type),dt=st?encodeURIComponent(st):"",ht=(this.options.viewer.endpoint||"https://explore.panoramax.fr/api").replace(/\/+$/,""),ft="pnx-preview-sequence-popup",pt=dt?`<img src="${ht}/collections/${dt}/thumb.jpg" alt="" class="pnx-preview-picture-popup__img" width="240">`:"",mt=`
1141            <p class="${ft}">
1142                <samp>
1143                    <strong>ID :</strong> <small>${ot||"-"}</small> <br>
1144                    date : ${ct||"-"} <br>
1145                    type : ${ut||"-"}
1146                </samp>
1147                ${pt}
1148            </p>
1149        `;this.setPopup(ee,mt),this.setMarker(ee)}displayPreviewPicture(ee,te){var st=te.id,ot=this._escape(st),ct=this._escape(te.ts||te.datetime||te.created_at),ut=this._escape(te.type),dt=st?encodeURIComponent(st):"",ht=(this.options.viewer.endpoint||"https://explore.panoramax.fr/api").replace(/\/+$/,""),ft="pnx-preview-picture-popup",pt=dt?`<img src="${ht}/pictures/${dt}/thumb.jpg" alt="" class="pnx-preview-picture-popup__img" width="240">`:"",mt=`
1150            <p class="${ft}">
1151                <samp>
1152                    <strong>ID :</strong> ${ot||"-"} <br>
1153                    date : ${ct||"-"} <br>
1154                    type : ${ut||"-"}
1155                </samp>
1156                ${pt}
1157            </p>
1158        `;this.setPopup(ee,mt),this.setMarker(ee)}setSizeWindow(ee){var te=this.panelPanoramaxViewerContainer;if(te)switch(te.classList.remove("pnx-visualization-window-size-small","pnx-visualization-window-size-medium","pnx-visualization-window-size-large","pnx-visualization-window-size-fullscreen","pnx-visualization-window-size-fullscreen-map"),ee){case"small":te.classList.add("pnx-visualization-window-size-small"),this.stopMapViewportSync(),te._pnxFullscreen=!1;break;case"medium":te.classList.add("pnx-visualization-window-size-medium"),this.stopMapViewportSync(),te._pnxFullscreen=!1;break;case"large":te.classList.add("pnx-visualization-window-size-large"),this.stopMapViewportSync(),te._pnxFullscreen=!1;break;case"fullscreen":te.classList.add("pnx-visualization-window-size-fullscreen"),te._pnxFullscreen=!0,this.stopMapViewportSync();break;case"fullscreen-map":te.classList.add("pnx-visualization-window-size-fullscreen-map"),te._pnxFullscreen=!1,this.startMapViewportSync();break;default:logger$1.warn("Unknown visualization window size :",ee),te.classList.add("pnx-visualization-window-size-medium"),this.stopMapViewportSync();break}}startMapViewportSync(){var ee=this;if(!this.mapViewportSyncListener){var st=this.getMap(),te=()=>{if(!(!ee.panelPanoramaxViewerContainer||!st)){var ot=st.getViewport(),ct=ot.getBoundingClientRect();ee.panelPanoramaxViewerContainer.style.setProperty("--pnx-map-top",ct.top+"px"),ee.panelPanoramaxViewerContainer.style.setProperty("--pnx-map-left",ct.left+"px"),ee.panelPanoramaxViewerContainer.style.setProperty("--pnx-map-width",ct.width+"px"),ee.panelPanoramaxViewerContainer.style.setProperty("--pnx-map-height",ct.height+"px")}};te(),this.mapViewportSyncListener=te,window.addEventListener("resize",this.mapViewportSyncListener),window.addEventListener("scroll",this.mapViewportSyncListener);var st=this.getMap();st&&st.on("change:size",this.mapViewportSyncListener)}}stopMapViewportSync(){if(this.mapViewportSyncListener){window.removeEventListener("resize",this.mapViewportSyncListener),window.removeEventListener("scroll",this.mapViewportSyncListener);var ee=this.getMap();ee&&ee.un("change:size",this.mapViewportSyncListener),this.mapViewportSyncListener=null}}_getMapboxLayerByType(ee){if(!ee||!this.PANORAMAX_LAYERS_TYPES.includes(ee)||!this.layerPanoramax)return null;var te=this.layerPanoramax.get("mapbox-layers"),st=this.layerPanoramax.get("mapbox-style");if(!Array.isArray(te)||!st||!Array.isArray(st.layers))return null;var ot=te.find(ut=>ut.includes(ee));if(!ot)return null;var ct=st.layers.find(ut=>ut.id===ot);return ct||null}_addFilterTypeToMapboxLayer(ee,te){var st=this.options.buttonsWindow.filters.exclusive;if(st||!ee)ee=["all",["==",["get","type"],te]];else if(Array.isArray(ee)){var ot=ee.findIndex(ct=>Array.isArray(ct)&&ct[0]==="=="&&ct[1][1]==="type");ot!==-1?ee[ot]=["==",["get","type"],te]:ee.push(["==",["get","type"],te])}else ee=["all",["==",["get","type"],te]];return ee}_addFilterDateToMapboxLayer(ee,te,st,ot){var ct=this.options.buttonsWindow.filters.exclusive,ut=[];if(st&&st instanceof Date&&ut.push([">=",["get",te],st.toISOString().split("T")[0]]),ot&&ot instanceof Date&&ut.push(["<=",["get",te],ot.toISOString().split("T")[0]]),ut.length>0){if(ct||!ee)ut.length===2&&ut.unshift("all"),ee=ut;else if(Array.isArray(ee)){var dt=ee.findIndex(ft=>Array.isArray(ft)&&ft[0]===">="&&ft[1][1]===te),ht=ee.findIndex(ft=>Array.isArray(ft)&&ft[0]==="<="&&ft[1][1]===te);dt!==-1?ee[dt]=ut[0]:ee.push(ut[0]),ht!==-1?ee[ht]=ut[1]:ee.push(ut[1])}}else return null;return ee}filterCameraToMapboxLayer(ee){var te=[];for(let ot=0;ot<this.PANORAMAX_LAYERS_TYPES.length;ot++){const ct=this.PANORAMAX_LAYERS_TYPES[ot];var st=this._getMapboxLayerByType(ct);st&&(ct==="pictures"?ee==="flat"||ee==="equirectangular"?st.filter=this._addFilterTypeToMapboxLayer(st.filter,ee):st.filter&&Array.isArray(st.filter)&&(st.filter=st.filter.filter(ut=>!(Array.isArray(ut)&&ut[0]==="=="&&ut[1][1]==="type")),Array.isArray(st.filter)&&st.filter.length===1&&st.filter[0]==="all"&&delete st.filter):ct==="sequences"&&(ee==="flat"||ee==="equirectangular"?st.filter=this._addFilterTypeToMapboxLayer(st.filter,ee):st.filter&&Array.isArray(st.filter)&&(st.filter=st.filter.filter(ut=>!(Array.isArray(ut)&&ut[0]==="=="&&ut[1][1]==="type")),Array.isArray(st.filter)&&st.filter.length===1&&st.filter[0]==="all"&&delete st.filter)),te.push(st))}return te}filterDateToMapboxLayer(ee,te){var st=[];for(let dt=0;dt<this.PANORAMAX_LAYERS_TYPES.length;dt++){const ht=this.PANORAMAX_LAYERS_TYPES[dt];var ot=this._getMapboxLayerByType(ht);if(ot){if(ht==="pictures"){var ct=this._addFilterDateToMapboxLayer(ot.filter,"ts",ee,te);ct?ot.filter=ct:ot.filter&&Array.isArray(ot.filter)&&(ot.filter=ot.filter.filter(ft=>!(Array.isArray(ft)&&(ft[0]===">="||ft[0]==="<=")&&ft[1][1]==="ts")),Array.isArray(ot.filter)&&ot.filter.length===1&&ot.filter[0]==="all"&&delete ot.filter)}else if(ht==="sequences"){var ut=this._addFilterDateToMapboxLayer(ot.filter,"date",ee,te);ut?ot.filter=ut:ot.filter&&Array.isArray(ot.filter)&&(ot.filter=ot.filter.filter(ft=>!(Array.isArray(ft)&&(ft[0]===">="||ft[0]==="<=")&&ft[1][1]==="date")),Array.isArray(ot.filter)&&ot.filter.length===1&&ot.filter[0]==="all"&&delete ot.filter)}st.push(ot)}}return st}filterPeriodeToMapboxLayer(ee){var te=null,st=null;if(typeof ee=="number"&&!isNaN(ee)&&ee>0){var ot=new Date;te=subMonths(new Date,ee),st=ot}return this.filterDateToMapboxLayer(te,st)}filterRenderToMapboxLayer(ee){var te=[];return te}resetAllGroupFilters(ee={}){["group-filter-dates","group-filter-periodes","group-filter-types","group-filter-renders"].forEach(st=>{this.resetGroupFilter(st,ee)})}resetGroupFilter(ee,te={}){var st=te.silent===!0,ot=this.panelPanoramaxOptions.elements,ct=ot[ee];ct&&(this.isResetEventPropagation=te.isReset===!0,Array.from(ct).forEach(ut=>{ut.type==="input"||ut.type==="radio"?(ut.checked=ut.dataset.default==="true",!st&&ut.checked&&ut.dispatchEvent(new Event("change",{bubbles:!0}
1158))):ut.type==="button"?ut.setAttribute("aria-pressed","false"):ut.type==="date"&&(ut.value="",st||ut.dispatchEvent(new Event("change",{bubbles:!0})))}),this.isResetEventPropagation=!1)}applyGroupFilter(ee,te={}){var st=te.silent===!0,ot=te.value,ct=this.panelPanoramaxOptions.elements,ut=ct[ee];if(ut){switch(this.isResetEventPropagation=te.isReset===!0,ee){case"group-filter-types":ot!==void 0&&Array.from(ut).forEach(dt=>{if(dt.type==="input"||dt.type==="radio"){var ht=this.panelPanoramaxOptions.querySelector("label[for='"+dt.id+"']"),ft=ht.innerText;dt.checked=ft===ot||String(dt.value)===String(ot)}}),Array.from(ut).forEach(dt=>{(dt.type==="input"||dt.type==="radio")&&dt.checked&&!st&&dt.dispatchEvent(new Event("change",{bubbles:!0}))});break}this.isResetEventPropagation=!1}}async applyFilters(ee){if(logger$1.debug("applyFilters",ee),!this.layerPanoramax)return logger$1.warn("Panoramax layer not available"),Promise.reject(new Error("Panoramax layer not available"));if(!Array.isArray(ee))return logger$1.warn("No Mapbox layers provided"),Promise.reject(new Error("No Mapbox layers provided"));var te=this.getMap();if(!te)return logger$1.warn("Map not available"),Promise.reject(new Error("Map not available"));var st=this.layerPanoramax.get("mapbox-style");if(!st||!Array.isArray(st.layers))return logger$1.warn("Panoramax layer style not available"),Promise.reject(new Error("Panoramax layer style not available"));st.id&&delete st.id,st.layers=ee;try{return await applyStyle(this.layerPanoramax,st,{updateSource:!1}),this.layerPanoramax.changed(),te.renderSync(),ee}catch(ot){throw logger$1.error("Error applying filters to Panoramax layer",ot),ot}}updateFiltersPanelPosition(){if(!(!this.panelPanoramaxOptions||!this.panelPanoramaxButtonsContainer)){var ee=this.panelPanoramaxButtonsContainer.getBoundingClientRect();this.panelPanoramaxOptions.style.left=ee.left+"px",this.panelPanoramaxOptions.style.top="",this.panelPanoramaxOptions.style.bottom=window.innerHeight-ee.top+6+"px"}}bindFiltersPanelPositioning(){this._onPanoramaxOptionsReposition||(this._onPanoramaxOptionsReposition=this.updateFiltersPanelPosition.bind(this),window.addEventListener("resize",this._onPanoramaxOptionsReposition),window.addEventListener("scroll",this._onPanoramaxOptionsReposition,!0))}unbindFiltersPanelPositioning(){this._onPanoramaxOptionsReposition&&(window.removeEventListener("resize",this._onPanoramaxOptionsReposition),window.removeEventListener("scroll",this._onPanoramaxOptionsReposition,!0),this._onPanoramaxOptionsReposition=null)}onShowPanoramaxClick(ee){logger$1.debug("onShowPanoramaxClick",ee);var te=this.buttonPanoramaxShow.ariaPressed;te==="true"?this.onPanelOpen():this.onPanelClose(),this.collapsed=te!=="true",this.dispatchEvent("change:collapsed"),this.collapsed?this.reset():this.load().then(()=>{this.dispatchEvent(this.OPENED_PANORAMAX_EVENT)}).catch(st=>{logger$1.error("Error loading Panoramax content",st)})}onClosePanoramaxClick(ee){var te=this.panelPanoramaxViewerContainer;te&&(this.buttonPanoramaxShow.click(),this.setSizeWindow(this.options.visualizationWindow.size||"medium"),this.dispatchEvent({type:this.CLOSED_PANORAMAX_EVENT}),this.dispatchEvent({type:this.FULLSCREEN_PANORAMAX_EVENT,data:{fullscreen:!1}}),ee.preventDefault())}onReturnPanoramaxClick(ee){var te=this.panelPanoramaxViewerContainer;te&&(this.hidePhotoViewer(),this.showButtonsPanel(),this.setSizeWindow(this.options.visualizationWindow.size||"medium"),this.dispatchEvent({type:this.CLOSED_PANORAMAX_EVENT}),this.dispatchEvent({type:this.FULLSCREEN_PANORAMAX_EVENT,data:{fullscreen:!1}}))}onToggleChoiceHoverPanoramaxClick(ee){logger$1.debug(ee),this.hover=!this.hover,this.resetPreview()}onOpenPanoramaxOptionsClick(ee){if(logger$1.debug(ee),!(!this.panelPanoramaxOptions||!this.btnPanoramaxOptions)){var te=this.panelPanoramaxOptions,st=this.btnPanoramaxOptions,ot=st.getAttribute("aria-pressed")==="true";if(!ot){te.classList.replace("gpf-visible","gpf-hidden"),this.unbindFiltersPanelPositioning();return}te.classList.replace("gpf-hidden","gpf-visible")}}onResetPanoramaxFiltersClick(ee){var te=this.originalStyleLayerPanoramax.layers;this.applyFilters(te).then(()=>{this.resetAllGroupFilters()}).then(()=>{this.dispatchEvent(this.FILTER_INIT_PANORAMAX_EVENT)}).catch(st=>
1158{logger$1.error("Error applying initial Panoramax filters",st)})}onChangePanoramaxFilterByType(ee,te){if(logger$1.debug("onChangePanoramaxFilterByType",ee),!(!ee||!ee.target)&&!this.isResetEventPropagation){var st=(te||"").toLowerCase(),ot=null;st==="classique"?ot="flat":(st==="360°"||st==="360")&&(ot="equirectangular");var ct=this.filterCameraToMapboxLayer(ot),ut=this;this.applyFilters(ct).then(dt=>{if(!ut.options.buttonsWindow.filters.exclusive){var ht=ut.layerPanoramax.get("mapbox-style");ht.layers=dt,ut.layerPanoramax.set("mapbox-style",ht),logger$1.debug("Panoramax mapbox-style updated")}ut.dispatchEvent({type:ut.FILTER_TYPE_PANORAMAX_EVENT,data:{value:st,mapboxLayers:dt}})}).then(()=>{ut.options.buttonsWindow.filters.exclusive&&(ut.resetGroupFilter("group-filter-periodes",{silent:!0}),ut.resetGroupFilter("group-filter-dates",{silent:!0}),ut.resetGroupFilter("group-filter-render",{silent:!0}))}).catch(dt=>{logger$1.error("Error applying Panoramax type filter",dt)})}}onClickPanoramaxFilterByPeriode(ee){if(logger$1.debug("onClickPanoramaxFilterByPeriode",ee),!(!ee||!ee.target)&&!this.isResetEventPropagation){var te=parseInt(ee.target.value,10);ee.target.ariaPressed==="false"&&(te=null);var st=this.filterPeriodeToMapboxLayer(te),ot=this;this.applyFilters(st).then(ct=>{if(!ot.options.buttonsWindow.filters.exclusive){var ut=ot.layerPanoramax.get("mapbox-style");ut.layers=ct,ot.layerPanoramax.set("mapbox-style",ut),logger$1.debug("Panoramax mapbox-style updated")}ot.dispatchEvent({type:ot.FILTER_PERIODE_PANORAMAX_EVENT,data:{value:te,mapboxLayers:ct}})}).then(()=>{ot.options.buttonsWindow.filters.exclusive&&(ot.resetGroupFilter("group-filter-types",{silent:!0}),ot.resetGroupFilter("group-filter-render",{silent:!0})),ot.resetGroupFilter("group-filter-dates",{silent:!0})}).catch(ct=>{logger$1.error("Error applying Panoramax predefined date filter",ct)})}}onChangePanoramaxFilterByDates(ee){if(logger$1.debug("onChangePanoramaxFilterByDates",ee),!this.isResetEventPropagation){var te=document.getElementById(this._addUID("GPpanoramaxFilterDateStart")),st=document.getElementById(this._addUID("GPpanoramaxFilterDateEnd"));if(!(!te||!st)){var ot=null,ct=te.value,ut=st.value;if(!ct&&!ut)ot=this.filterDateToMapboxLayer(null,null);else{var dt=new Date(ct),ht=new Date(ut);if(isNaN(dt.getTime())||isNaN(ht.getTime()))return;ot=this.filterDateToMapboxLayer(dt,ht)}var ft=this;this.applyFilters(ot).then(pt=>{if(!ft.options.buttonsWindow.filters.exclusive){var mt=ft.layerPanoramax.get("mapbox-style");mt.layers=pt,ft.layerPanoramax.set("mapbox-style",mt)}ft.dispatchEvent({type:ft.FILTER_DATES_PANORAMAX_EVENT,data:{startDate:ct,endDate:ut,mapboxLayers:pt}})}).then(()=>{ft.options.buttonsWindow.filters.exclusive&&(ft.resetGroupFilter("group-filter-types",{silent:!0}),ft.resetGroupFilter("group-filter-render",{silent:!0})),ft.resetGroupFilter("group-filter-periodes",{silent:!0})}).catch(pt=>{logger$1.error("Error applying Panoramax start/end date filter",pt)})}}}onToggleChoiceBackgroundPanoramaxClick(ee){logger$1.debug(ee),this.options.background.active=!this.options.background.active,this.options.background.active?this.setBackground(this.options.background).then(()=>{logger$1.log("background layer loaded !")}).catch(te=>{console.error(te)}):this.resetBackground()}onToggleChoiceDisplayLayerPanoramaxClick(ee){logger$1.debug(ee),this.displayable=!this.displayable,this.groupPanoramax&&this.groupPanoramax.set("display",this.displayable),this.layerPanoramax&&this.layerPanoramax.set("display",this.displayable),this.backgroundPanoramax&&this.backgroundPanoramax.set("display",this.displayable)}onSelectPanoramaxRenderClick(ee){if(logger$1.debug(ee),!(!ee||!ee.target)){var te=ee.target.value,st=this.filterRenderToMapboxLayer(te);this.applyFilters(st).then(ot=>{this.dispatchEvent({type:this.FILTER_RENDER_PANORAMAX_EVENT,data:{value:te,mapboxLayers:ot}})}).catch(ot=>{logger$1.error("Error applying Panoramax render",ot)})}}onClickPnxViewerWidgetBack(ee){this.onReturnPanoramaxClick(ee)}onClickPnxViewerWidgetClose(ee){this.onClosePanoramaxClick(ee)}onClickPnxViewerWidgetFullScreen(ee){var te=this.panelPanoramaxViewerContainer;te&&(te._pnxFullscreen?this.setSizeWindow("fullscreen-map"):this.setSizeWindow("fullscreen"),this.dispatchEvent({type:this.FULLSCREEN_PANORAMAX_EVENT,data:{fullscreen:te._pnxFullscreen}}))}onClickPnxViewerWidgetZoom(ee){}}Object.assign(Panoramax.prototype,PanelDOM);Object.assign(Panoramax.prototype,PanoramaxDOM);Object.assign(Panoramax.prototype,Widget);window.ol&&window.ol.control&&(window.ol.control.Panoramax=Panoramax);var ajv={exports:{}},core$1={},validate={},boolSchema={},errors={},codegen={},code$1={},hasRequiredCode$1;function requireCode$1(){return hasRequiredCode$1||(hasRequiredCode$1=1,(function(ne){Object.defineProperty(ne,"__esMo
1158dule",{value:!0}),ne.regexpCode=ne.getEsmExportName=ne.getProperty=ne.safeStringify=ne.stringify=ne.strConcat=ne.addCodeArg=ne.str=ne._=ne.nil=ne._Code=ne.Name=ne.IDENTIFIER=ne._CodeOrName=void 0;class ee{}ne._CodeOrName=ee,ne.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class te extends ee{constructor(Ot){if(super(),!ne.IDENTIFIER.test(Ot))throw new Error("CodeGen: name must be a valid identifier");this.str=Ot}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}ne.Name=te;class st extends ee{constructor(Ot){super(),this._items=typeof Ot=="string"?[Ot]:Ot}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;const Ot=this._items[0];return Ot===""||Ot==='""'}get str(){var Ot;return(Ot=this._str)!==null&&Ot!==void 0?Ot:this._str=this._items.reduce((kt,Nt)=>`${kt}${Nt}`,"")}get names(){var Ot;return(Ot=this._names)!==null&&Ot!==void 0?Ot:this._names=this._items.reduce((kt,Nt)=>(Nt instanceof te&&(kt[Nt.str]=(kt[Nt.str]||0)+1),kt),{})}}ne._Code=st,ne.nil=new st("");function ot(Mt,...Ot){const kt=[Mt[0]];let Nt=0;for(;Nt<Ot.length;)dt(kt,Ot[Nt]),kt.push(Mt[++Nt]);return new st(kt)}ne._=ot;const ct=new st("+");function ut(Mt,...Ot){const kt=[vt(Mt[0])];let Nt=0;for(;Nt<Ot.length;)kt.push(ct),dt(kt,Ot[Nt]),kt.push(ct,vt(Mt[++Nt]));return ht(kt),new st(kt)}ne.str=ut;function dt(Mt,Ot){Ot instanceof st?Mt.push(...Ot._items):Ot instanceof te?Mt.push(Ot):Mt.push(mt(Ot))}ne.addCodeArg=dt;function ht(Mt){let Ot=1;for(;Ot<Mt.length-1;){if(Mt[Ot]===ct){const kt=ft(Mt[Ot-1],Mt[Ot+1]);if(kt!==void 0){Mt.splice(Ot-1,3,kt);continue}Mt[Ot++]="+"}Ot++}}function ft(Mt,Ot){if(Ot==='""')return Mt;if(Mt==='""')return Ot;if(typeof Mt=="string")return Ot instanceof te||Mt[Mt.length-1]!=='"'?void 0:typeof Ot!="string"?`${Mt.slice(0,-1)}${Ot}"`:Ot[0]==='"'?Mt.slice(0,-1)+Ot.slice(1):void 0;if(typeof Ot=="string"&&Ot[0]==='"'&&!(Mt instanceof te))return`"${Mt}${Ot.slice(1)}`}function pt(Mt,Ot){return Ot.emptyStr()?Mt:Mt.emptyStr()?Ot:ut`${Mt}${Ot}`}ne.strConcat=pt;function mt(Mt){return typeof Mt=="number"||typeof Mt=="boolean"||Mt===null?Mt:vt(Array.isArray(Mt)?Mt.join(","):Mt)}function yt(Mt){return new st(vt(Mt))}ne.stringify=yt;function vt(Mt){return JSON.stringify(Mt).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}ne.safeStringify=vt;function _t(Mt){return typeof Mt=="string"&&ne.IDENTIFIER.test(Mt)?new st(`.${Mt}`):ot`[${Mt}]`}ne.getProperty=_t;function bt(Mt){if(typeof Mt=="string"&&ne.IDENTIFIER.test(Mt))return new st(`${Mt}`);throw new Error(`CodeGen: invalid export name: ${Mt}, use explicit $id name mapping`)}ne.getEsmExportName=bt;function xt(Mt){return new st(Mt.toString())}ne.regexpCode=xt})(code$1)),code$1}var scope={},hasRequiredScope;function requireScope(){return hasRequiredScope||(hasRequiredScope=1,(function(ne){Object.defineProperty(ne,"__esModule",{value:!0}),ne.ValueScope=ne.ValueScopeName=ne.Scope=ne.varKinds=ne.UsedValueState=void 0;const ee=requireCode$1();class te extends Error{constructor(ft){super(`CodeGen: "code" for ${ft} not defined`),this.value=ft.value}}var st;(function(ht){ht[ht.Started=0]="Started",ht[ht.Completed=1]="Completed"})(st||(ne.UsedValueState=st={})),ne.varKinds={const:new ee.Name("const"),let:new ee.Name("let"),var:new ee.Name("var")};class ot{constructor({prefixes:ft,parent:pt}={}){this._names={},this._prefixes=ft,this._parent=pt}toName(ft){return ft instanceof ee.Name?ft:this.name(ft)}name(ft){return new ee.Name(this._newName(ft))}_newName(ft){const pt=this._names[ft]||this._nameGroup(ft);return`${ft}${pt.index++}`}_nameGroup(ft){var pt,mt;if(!((mt=(pt=this._parent)===null||pt===void 0?void 0:pt._prefixes)===null||mt===void 0)&&mt.has(ft)||this._prefixes&&!this._prefixes.has(ft))throw new Error(`CodeGen: prefix "${ft}" is not allowed in this scope`);return this._names[ft]={prefix:ft,index:0}}}ne.Scope=ot;class ct extends ee.Name{constructor(ft,pt){super(pt),this.prefix=ft}setValue(ft,{property:pt,itemIndex:mt}){this.value=ft,this.scopePath=(0,ee._)`.${new ee.Name(pt)}[${mt}]`}}ne.ValueScopeName=ct;const ut=(0,ee._)`\n`;class dt extends ot{constructor(ft){super(ft),this._values={},this._scope=ft.scope,this.opts={...ft,_n:ft.lines?ut:ee.nil}}get(){return this._scope}name(ft){return new ct(ft,this._newName(ft))}value(ft,pt){var mt;if(pt.ref===void 0)throw new Error("CodeGen: ref must be passed in value");const yt=this.toName(ft),{prefix:vt}=yt,_t=(mt=pt.key)!==null&&mt!==void 0?mt:pt.ref;let bt=this._values[vt];if(bt){const Ot=bt.get(_t);if(Ot)return Ot}else bt=this._values[vt]=new Map;bt.set(_t,yt);const xt=this._scope[vt]||(this._scope[vt]=[]),Mt=xt.length;
1158return xt[Mt]=pt.ref,yt.setValue(pt,{property:vt,itemIndex:Mt}),yt}getValue(ft,pt){const mt=this._values[ft];if(mt)return mt.get(pt)}scopeRefs(ft,pt=this._values){return this._reduceValues(pt,mt=>{if(mt.scopePath===void 0)throw new Error(`CodeGen: name "${mt}" has no value`);return(0,ee._)`${ft}${mt.scopePath}`})}scopeCode(ft=this._values,pt,mt){return this._reduceValues(ft,yt=>{if(yt.value===void 0)throw new Error(`CodeGen: name "${yt}" has no value`);return yt.value.code},pt,mt)}_reduceValues(ft,pt,mt={},yt){let vt=ee.nil;for(const _t in ft){const bt=ft[_t];if(!bt)continue;const xt=mt[_t]=mt[_t]||new Map;bt.forEach(Mt=>{if(xt.has(Mt))return;xt.set(Mt,st.Started);let Ot=pt(Mt);if(Ot){const kt=this.opts.es5?ne.varKinds.var:ne.varKinds.const;vt=(0,ee._)`${vt}${kt} ${Mt} = ${Ot};${this.opts._n}`}else if(Ot=yt==null?void 0:yt(Mt))vt=(0,ee._)`${vt}${Ot}${this.opts._n}`;else throw new te(Mt);xt.set(Mt,st.Completed)})}return vt}}ne.ValueScope=dt})(scope)),scope}var hasRequiredCodegen;function requireCodegen(){return hasRequiredCodegen||(hasRequiredCodegen=1,(function(ne){Object.defineProperty(ne,"__esModule",{value:!0}),ne.or=ne.and=ne.not=ne.CodeGen=ne.operators=ne.varKinds=ne.ValueScopeName=ne.ValueScope=ne.Scope=ne.Name=ne.regexpCode=ne.stringify=ne.getProperty=ne.nil=ne.strConcat=ne.str=ne._=void 0;const ee=requireCode$1(),te=requireScope();var st=requireCode$1();Object.defineProperty(ne,"_",{enumerable:!0,get:function(){return st._}}),Object.defineProperty(ne,"str",{enumerable:!0,get:function(){return st.str}}),Object.defineProperty(ne,"strConcat",{enumerable:!0,get:function(){return st.strConcat}}),Object.defineProperty(ne,"nil",{enumerable:!0,get:function(){return st.nil}}),Object.defineProperty(ne,"getProperty",{enumerable:!0,get:function(){return st.getProperty}}),Object.defineProperty(ne,"stringify",{enumerable:!0,get:function(){return st.stringify}}),Object.defineProperty(ne,"regexpCode",{enumerable:!0,get:function(){return st.regexpCode}}),Object.defineProperty(ne,"Name",{enumerable:!0,get:function(){return st.Name}});var ot=requireScope();Object.defineProperty(ne,"Scope",{enumerable:!0,get:function(){return ot.Scope}}),Object.defineProperty(ne,"ValueScope",{enumerable:!0,get:function(){return ot.ValueScope}}),Object.defineProperty(ne,"ValueScopeName",{enumerable:!0,get:function(){return ot.ValueScopeName}}),Object.defineProperty(ne,"varKinds",{enumerable:!0,get:function(){return ot.varKinds}}),ne.operators={GT:new ee._Code(">"),GTE:new ee._Code(">="),LT:new ee._Code("<"),LTE:new ee._Code("<="),EQ:new ee._Code("==="),NEQ:new ee._Code("!=="),NOT:new ee._Code("!"),OR:new ee._Code("||"),AND:new ee._Code("&&"),ADD:new ee._Code("+")};class ct{optimizeNodes(){return this}optimizeNames(qt,ii){return this}}class ut extends ct{constructor(qt,ii,wn){super(),this.varKind=qt,this.name=ii,this.rhs=wn}render({es5:qt,_n:ii}){const wn=qt?te.varKinds.var:this.varKind,ni=this.rhs===void 0?"":` = ${this.rhs}`;return`${wn} ${this.name}${ni};`+ii}optimizeNames(qt,ii){if(qt[this.name.str])return this.rhs&&(this.rhs=Qt(this.rhs,qt,ii)),this}get names(){return this.rhs instanceof ee._CodeOrName?this.rhs.names:{}}}class dt extends ct{constructor(qt,ii,wn){super(),this.lhs=qt,this.rhs=ii,this.sideEffects=wn}render({_n:qt}){return`${this.lhs} = ${this.rhs};`+qt}optimizeNames(qt,ii){if(!(this.lhs instanceof ee.Name&&!qt[this.lhs.str]&&!this.sideEffects))return this.rhs=Qt(this.rhs,qt,ii),this}get names(){const qt=this.lhs instanceof ee.Name?{}:{...this.lhs.names};return Jt(qt,this.rhs)}}class ht extends dt{constructor(qt,ii,wn,ni){super(qt,wn,ni),this.op=ii}render({_n:qt}){return`${this.lhs} ${this.op}= ${this.rhs};`+qt}}class ft extends ct{constructor(qt){super(),this.label=qt,this.names={}}render({_n:qt}){return`${this.label}:`+qt}}class pt extends ct{constructor(qt){super(),this.label=qt,this.names={}}render({_n:qt}){return`break${this.label?` ${this.label}`:""};`+qt}}class mt extends ct{constructor(qt){super(),this.error=qt}render({_n:qt}){return`throw ${this.error};`+qt}get names(){return this.error.names}}class yt extends ct{constructor(qt){super(),this.code=qt}render({_n:qt}){return`${this.code};`+qt}optimizeNodes(){return`${this.code}`?this:void 0}
1158optimizeNames(qt,ii){return this.code=Qt(this.code,qt,ii),this}get names(){return this.code instanceof ee._CodeOrName?this.code.names:{}}}class vt extends ct{constructor(qt=[]){super(),this.nodes=qt}render(qt){return this.nodes.reduce((ii,wn)=>ii+wn.render(qt),"")}optimizeNodes(){const{nodes:qt}=this;let ii=qt.length;for(;ii--;){const wn=qt[ii].optimizeNodes();Array.isArray(wn)?qt.splice(ii,1,...wn):wn?qt[ii]=wn:qt.splice(ii,1)}return qt.length>0?this:void 0}optimizeNames(qt,ii){const{nodes:wn}=this;let ni=wn.length;for(;ni--;){const Cn=wn[ni];Cn.optimizeNames(qt,ii)||(oi(qt,Cn.names),wn.splice(ni,1))}return wn.length>0?this:void 0}get names(){return this.nodes.reduce((qt,ii)=>Wt(qt,ii.names),{})}}class _t extends vt{render(qt){return"{"+qt._n+super.render(qt)+"}"+qt._n}}class bt extends vt{}class xt extends _t{}xt.kind="else";class Mt extends _t{constructor(qt,ii){super(ii),this.condition=qt}render(qt){let ii=`if(${this.condition})`+super.render(qt);return this.else&&(ii+="else "+this.else.render(qt)),ii}optimizeNodes(){super.optimizeNodes();const qt=this.condition;if(qt===!0)return this.nodes;let ii=this.else;if(ii){const wn=ii.optimizeNodes();ii=this.else=Array.isArray(wn)?new xt(wn):wn}if(ii)return qt===!1?ii instanceof Mt?ii:ii.nodes:this.nodes.length?this:new Mt(ai(qt),ii instanceof Mt?[ii]:ii.nodes);if(!(qt===!1||!this.nodes.length))return this}optimizeNames(qt,ii){var wn;if(this.else=(wn=this.else)===null||wn===void 0?void 0:wn.optimizeNames(qt,ii),!!(super.optimizeNames(qt,ii)||this.else))return this.condition=Qt(this.condition,qt,ii),this}get names(){const qt=super.names;return Jt(qt,this.condition),this.else&&Wt(qt,this.else.names),qt}}Mt.kind="if";class Ot extends _t{}Ot.kind="for";class kt extends Ot{constructor(qt){super(),this.iteration=qt}render(qt){return`for(${this.iteration})`+super.render(qt)}optimizeNames(qt,ii){if(super.optimizeNames(qt,ii))return this.iteration=Qt(this.iteration,qt,ii),this}get names(){return Wt(super.names,this.iteration.names)}}class Nt extends Ot{constructor(qt,ii,wn,ni){super(),this.varKind=qt,this.name=ii,this.from=wn,this.to=ni}render(qt){const ii=qt.es5?te.varKinds.var:this.varKind,{name:wn,from:ni,to:Cn}=this;return`for(${ii} ${wn}=${ni}; ${wn}<${Cn}; ${wn}++)`+super.render(qt)}get names(){const qt=Jt(super.names,this.from);return Jt(qt,this.to)}}class Gt extends Ot{constructor(qt,ii,wn,ni){super(),this.loop=qt,this.varKind=ii,this.name=wn,this.iterable=ni}render(qt){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(qt)}optimizeNames(qt,ii){if(super.optimizeNames(qt,ii))return this.iterable=Qt(this.iterable,qt,ii),this}get names(){return Wt(super.names,this.iterable.names)}}class Bt extends _t{constructor(qt,ii,wn){super(),this.name=qt,this.args=ii,this.async=wn}render(qt){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(qt)}}Bt.kind="func";class Ut extends vt{render(qt){return"return "+super.render(qt)}}Ut.kind="return";class Vt extends _t{render(qt){let ii="try"+super.render(qt);return this.catch&&(ii+=this.catch.render(qt)),this.finally&&(ii+=this.finally.render(qt)),ii}optimizeNodes(){var qt,ii;return super.optimizeNodes(),(qt=this.catch)===null||qt===void 0||qt.optimizeNodes(),(ii=this.finally)===null||ii===void 0||ii.optimizeNodes(),this}optimizeNames(qt,ii){var wn,ni;return super.optimizeNames(qt,ii),(wn=this.catch)===null||wn===void 0||wn.optimizeNames(qt,ii),(ni=this.finally)===null||ni===void 0||ni.optimizeNames(qt,ii),this}get names(){const qt=super.names;return this.catch&&Wt(qt,this.catch.names),this.finally&&Wt(qt,this.finally.names),qt}}class Ht extends _t{constructor(qt){super(),this.error=qt}render(qt){return`catch(${this.error})`+super.render(qt)}}Ht.kind="catch";class zt extends _t{render(qt){return"finally"+super.render(qt)}}zt.kind="finally";class jt{constructor(qt,ii={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...ii,_n:ii.lines?`
1159`:""},this._extScope=qt,this._scope=new te.Scope({parent:qt}),this._nodes=[new bt]}toString(){return this._root.render(this.opts)}name(qt){return this._scope.name(qt)}scopeName(qt){return this._extScope.name(qt)}scopeValue(qt,ii){const wn=this._extScope.value(qt,ii);return(this._values[wn.prefix]||(this._values[wn.prefix]=new Set)).add(wn),wn}getScopeValue(qt,ii){return this._extScope.getValue(qt,ii)}scopeRefs(qt){return this._extScope.scopeRefs(qt,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(qt,ii,wn,ni){const Cn=this._scope.toName(ii);return wn!==void 0&&ni&&(this._constants[Cn.str]=wn),this._leafNode(new ut(qt,Cn,wn)),Cn}const(qt,ii,wn){return this._def(te.varKinds.const,qt,ii,wn)}let(qt,ii,wn){return this._def(te.varKinds.let,qt,ii,wn)}var(qt,ii,wn){return this._def(te.varKinds.var,qt,ii,wn)}assign(qt,ii,wn){return this._leafNode(new dt(qt,ii,wn))}add(qt,ii){return this._leafNode(new ht(qt,ne.operators.ADD,ii))}code(qt){return typeof qt=="function"?qt():qt!==ee.nil&&this._leafNode(new yt(qt)),this}object(...qt){const ii=["{"];for(const[wn,ni]of qt)ii.length>1&&ii.push(","),ii.push(wn),(wn!==ni||this.opts.es5)&&(ii.push(":"),(0,ee.addCodeArg)(ii,ni));return ii.push("}"),new ee._Code(ii)}
1159if(qt,ii,wn){if(this._blockNode(new Mt(qt)),ii&&wn)this.code(ii).else().code(wn).endIf();else if(ii)this.code(ii).endIf();else if(wn)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(qt){return this._elseNode(new Mt(qt))}else(){return this._elseNode(new xt)}endIf(){return this._endBlockNode(Mt,xt)}_for(qt,ii){return this._blockNode(qt),ii&&this.code(ii).endFor(),this}for(qt,ii){return this._for(new kt(qt),ii)}forRange(qt,ii,wn,ni,Cn=this.opts.es5?te.varKinds.var:te.varKinds.let){const Ln=this._scope.toName(qt);return this._for(new Nt(Cn,Ln,ii,wn),()=>ni(Ln))}forOf(qt,ii,wn,ni=te.varKinds.const){const Cn=this._scope.toName(qt);if(this.opts.es5){const Ln=ii instanceof ee.Name?ii:this.var("_arr",ii);return this.forRange("_i",0,(0,ee._)`${Ln}.length`,Un=>{this.var(Cn,(0,ee._)`${Ln}[${Un}]`),wn(Cn)})}return this._for(new Gt("of",ni,Cn,ii),()=>wn(Cn))}forIn(qt,ii,wn,ni=this.opts.es5?te.varKinds.var:te.varKinds.const){if(this.opts.ownProperties)return this.forOf(qt,(0,ee._)`Object.keys(${ii})`,wn);const Cn=this._scope.toName(qt);return this._for(new Gt("in",ni,Cn,ii),()=>wn(Cn))}endFor(){return this._endBlockNode(Ot)}label(qt){return this._leafNode(new ft(qt))}break(qt){return this._leafNode(new pt(qt))}return(qt){const ii=new Ut;if(this._blockNode(ii),this.code(qt),ii.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(Ut)}try(qt,ii,wn){if(!ii&&!wn)throw new Error('CodeGen: "try" without "catch" and "finally"');const ni=new Vt;if(this._blockNode(ni),this.code(qt),ii){const Cn=this.name("e");this._currNode=ni.catch=new Ht(Cn),ii(Cn)}return wn&&(this._currNode=ni.finally=new zt,this.code(wn)),this._endBlockNode(Ht,zt)}throw(qt){return this._leafNode(new mt(qt))}block(qt,ii){return this._blockStarts.push(this._nodes.length),qt&&this.code(qt).endBlock(ii),this}endBlock(qt){const ii=this._blockStarts.pop();if(ii===void 0)throw new Error("CodeGen: not in self-balancing block");const wn=this._nodes.length-ii;if(wn<0||qt!==void 0&&wn!==qt)throw new Error(`CodeGen: wrong number of nodes: ${wn} vs ${qt} expected`);return this._nodes.length=ii,this}func(qt,ii=ee.nil,wn,ni){return this._blockNode(new Bt(qt,ii,wn)),ni&&this.code(ni).endFunc(),this}endFunc(){return this._endBlockNode(Bt)}optimize(qt=1){for(;qt-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(qt){return this._currNode.nodes.push(qt),this}_blockNode(qt){this._currNode.nodes.push(qt),this._nodes.push(qt)}_endBlockNode(qt,ii){const wn=this._currNode;if(wn instanceof qt||ii&&wn instanceof ii)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${ii?`${qt.kind}/${ii.kind}`:qt.kind}"`)}_elseNode(qt){const ii=this._currNode;if(!(ii instanceof Mt))throw new Error('CodeGen: "else" without "if"');return this._currNode=ii.else=qt,this}get _root(){return this._nodes[0]}get _currNode(){const qt=this._nodes;return qt[qt.length-1]}set _currNode(qt){const ii=this._nodes;ii[ii.length-1]=qt}}ne.CodeGen=jt;function Wt(ti,qt){for(const ii in qt)ti[ii]=(ti[ii]||0)+(qt[ii]||0);return ti}function Jt(ti,qt){return qt instanceof ee._CodeOrName?Wt(ti,qt.names):ti}function Qt(ti,qt,ii){if(ti instanceof ee.Name)return wn(ti);if(!ni(ti))return ti;return new ee._Code(ti._items.reduce((Cn,Ln)=>(Ln instanceof ee.Name&&(Ln=wn(Ln)),Ln instanceof ee._Code?Cn.push(...Ln._items):Cn.push(Ln),Cn),[]));function wn(Cn){const Ln=ii[Cn.str];return Ln===void 0||qt[Cn.str]!==1?Cn:(delete qt[Cn.str],Ln)}function ni(Cn){return Cn instanceof ee._Code&&Cn._items.some(Ln=>Ln instanceof ee.Name&&qt[Ln.str]===1&&ii[Ln.str]!==void 0)}}function oi(ti,qt){for(const ii in qt)ti[ii]=(ti[ii]||0)-(qt[ii]||0)}function ai(ti){return typeof ti=="boolean"||typeof ti=="number"||ti===null?!ti:(0,ee._)`!${Kt(ti)}`}ne.not=ai;const xn=Zt(ne.operators.AND);function An(...ti){return ti.reduce(xn)}ne.and=An;const Nn=Zt(ne.operators.OR);function Xt(...ti){return ti.reduce(Nn)}ne.or=Xt;function Zt(ti){return(qt,ii)=>qt===ee.nil?ii:ii===ee.nil?qt:(0,ee._)`${Kt(qt)} ${ti} ${Kt(ii)}`}function Kt(ti){return ti instanceof ee.Name?ti:(0,ee._)`(${ti})`}})(codegen)),codegen}var util={},hasRequiredUtil;
1159function requireUtil(){if(hasRequiredUtil)return util;hasRequiredUtil=1,Object.defineProperty(util,"__esModule",{value:!0}),util.checkStrictMode=util.getErrorPath=util.Type=util.useFunc=util.setEvaluated=util.evaluatedPropsToName=util.mergeEvaluated=util.eachItem=util.unescapeJsonPointer=util.escapeJsonPointer=util.escapeFragment=util.unescapeFragment=util.schemaRefOrVal=util.schemaHasRulesButRef=util.schemaHasRules=util.checkUnknownRules=util.alwaysValidSchema=util.toHash=void 0;const ne=requireCodegen(),ee=requireCode$1();function te(Gt){const Bt={};for(const Ut of Gt)Bt[Ut]=!0;return Bt}util.toHash=te;function st(Gt,Bt){return typeof Bt=="boolean"?Bt:Object.keys(Bt).length===0?!0:(ot(Gt,Bt),!ct(Bt,Gt.self.RULES.all))}util.alwaysValidSchema=st;function ot(Gt,Bt=Gt.schema){const{opts:Ut,self:Vt}=Gt;if(!Ut.strictSchema||typeof Bt=="boolean")return;const Ht=Vt.RULES.keywords;for(const zt in Bt)Ht[zt]||Nt(Gt,`unknown keyword: "${zt}"`)}util.checkUnknownRules=ot;function ct(Gt,Bt){if(typeof Gt=="boolean")return!Gt;for(const Ut in Gt)if(Bt[Ut])return!0;return!1}util.schemaHasRules=ct;function ut(Gt,Bt){if(typeof Gt=="boolean")return!Gt;for(const Ut in Gt)if(Ut!=="$ref"&&Bt.all[Ut])return!0;return!1}util.schemaHasRulesButRef=ut;function dt({topSchemaRef:Gt,schemaPath:Bt},Ut,Vt,Ht){if(!Ht){if(typeof Ut=="number"||typeof Ut=="boolean")return Ut;if(typeof Ut=="string")return(0,ne._)`${Ut}`}return(0,ne._)`${Gt}${Bt}${(0,ne.getProperty)(Vt)}`}util.schemaRefOrVal=dt;function ht(Gt){return mt(decodeURIComponent(Gt))}util.unescapeFragment=ht;function ft(Gt){return encodeURIComponent(pt(Gt))}util.escapeFragment=ft;function pt(Gt){return typeof Gt=="number"?`${Gt}`:Gt.replace(/~/g,"~0").replace(/\//g,"~1")}util.escapeJsonPointer=pt;function mt(Gt){return Gt.replace(/~1/g,"/").replace(/~0/g,"~")}util.unescapeJsonPointer=mt;function yt(Gt,Bt){if(Array.isArray(Gt))for(const Ut of Gt)Bt(Ut);else Bt(Gt)}util.eachItem=yt;function vt({mergeNames:Gt,mergeToName:Bt,mergeValues:Ut,resultToName:Vt}){return(Ht,zt,jt,Wt)=>{const Jt=jt===void 0?zt:jt instanceof ne.Name?(zt instanceof ne.Name?Gt(Ht,zt,jt):Bt(Ht,zt,jt),jt):zt instanceof ne.Name?(Bt(Ht,jt,zt),zt):Ut(zt,jt);return Wt===ne.Name&&!(Jt instanceof ne.Name)?Vt(Ht,Jt):Jt}}util.mergeEvaluated={props:vt({mergeNames:(Gt,Bt,Ut)=>Gt.if((0,ne._)`${Ut} !== true && ${Bt} !== undefined`,()=>{Gt.if((0,ne._)`${Bt} === true`,()=>Gt.assign(Ut,!0),()=>Gt.assign(Ut,(0,ne._)`${Ut} || {}`).code((0,ne._)`Object.assign(${Ut}, ${Bt})`))}),mergeToName:(Gt,Bt,Ut)=>Gt.if((0,ne._)`${Ut} !== true`,()=>{Bt===!0?Gt.assign(Ut,!0):(Gt.assign(Ut,(0,ne._)`${Ut} || {}`),bt(Gt,Ut,Bt))}),mergeValues:(Gt,Bt)=>Gt===!0?!0:{...Gt,...Bt},resultToName:_t}),items:vt({mergeNames:(Gt,Bt,Ut)=>Gt.if((0,ne._)`${Ut} !== true && ${Bt} !== undefined`,()=>Gt.assign(Ut,(0,ne._)`${Bt} === true ? true : ${Ut} > ${Bt} ? ${Ut} : ${Bt}`)),mergeToName:(Gt,Bt,Ut)=>Gt.if((0,ne._)`${Ut} !== true`,()=>Gt.assign(Ut,Bt===!0?!0:(0,ne._)`${Ut} > ${Bt} ? ${Ut} : ${Bt}`)),mergeValues:(Gt,Bt)=>Gt===!0?!0:Math.max(Gt,Bt),resultToName:(Gt,Bt)=>Gt.var("items",Bt)})};function _t(Gt,Bt){if(Bt===!0)return Gt.var("props",!0);const Ut=Gt.var("props",(0,ne._)`{}`);return Bt!==void 0&&bt(Gt,Ut,Bt),Ut}util.evaluatedPropsToName=_t;function bt(Gt,Bt,Ut){Object.keys(Ut).forEach(Vt=>Gt.assign((0,ne._)`${Bt}${(0,ne.getProperty)(Vt)}`,!0))}util.setEvaluated=bt;const xt={};function Mt(Gt,Bt){return Gt.scopeValue("func",{ref:Bt,code:xt[Bt.code]||(xt[Bt.code]=new ee._Code(Bt.code))})}util.useFunc=Mt;var Ot;(function(Gt){Gt[Gt.Num=0]="Num",Gt[Gt.Str=1]="Str"})(Ot||(util.Type=Ot={}));function kt(Gt,Bt,Ut){if(Gt instanceof ne.Name){const Vt=Bt===Ot.Num;return Ut?Vt?(0,ne._)`"[" + ${Gt} + "]"`:(0,ne._)`"['" + ${Gt} + "']"`:Vt?(0,ne._)`"/" + ${Gt}`:(0,ne._)`"/" + ${Gt}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return Ut?(0,ne.getProperty)(Gt).toString():"/"+pt(Gt)}util.getErrorPath=kt;function Nt(Gt,Bt,Ut=Gt.opts.strictSchema){if(Ut){if(Bt=`strict mode: ${Bt}`,Ut===!0)throw new Error(Bt);Gt.self.logger.warn(Bt)}}return util.checkStrictMode=Nt,util}var names={},hasRequiredNames;function requireNames(){if(hasRequiredNames)return names;hasRequiredNames=1,Object.defineProperty(names,"__esModule",{value:!0});const ne=requireCodegen(),ee={data:new ne.Name("data"),valCxt:new ne.Name("valCxt"),instancePath:new ne.Name("instancePath"),parentData:new ne.Name("parentData"),parentDataProperty:new ne.Name("parentDataProperty"),rootData:new ne.Name("rootData"),dynamicAnchors:new ne.Name("dynamicAnchors"),vErrors:new ne.Name("vErrors"),errors:new ne.Name("errors"),this:new ne.Name("this"),self:new ne.Name("self"),scope:new ne.Name("scope"),json:new ne.Name("json"),jsonPos:new ne.Name("jsonPos"),jsonLen:new ne.Name("jsonLen"),jsonPart:new ne.Name("jsonPart")};return names.default=ee,names}var hasRequiredErrors;function requireErrors(){return hasRequiredErrors||(hasRequiredErrors=1,(function(ne){Object.defineProperty(ne,"__esMo
1159dule",{value:!0}),ne.extendErrors=ne.resetErrorsCount=ne.reportExtraError=ne.reportError=ne.keyword$DataError=ne.keywordError=void 0;const ee=requireCodegen(),te=requireUtil(),st=requireNames();ne.keywordError={message:({keyword:xt})=>(0,ee.str)`must pass "${xt}" keyword validation`},ne.keyword$DataError={message:({keyword:xt,schemaType:Mt})=>Mt?(0,ee.str)`"${xt}" keyword must be ${Mt} ($data)`:(0,ee.str)`"${xt}" keyword is invalid ($data)`};function ot(xt,Mt=ne.keywordError,Ot,kt){const{it:Nt}=xt,{gen:Gt,compositeRule:Bt,allErrors:Ut}=Nt,Vt=mt(xt,Mt,Ot);kt??(Bt||Ut)?ht(Gt,Vt):ft(Nt,(0,ee._)`[${Vt}]`)}ne.reportError=ot;function ct(xt,Mt=ne.keywordError,Ot){const{it:kt}=xt,{gen:Nt,compositeRule:Gt,allErrors:Bt}=kt,Ut=mt(xt,Mt,Ot);ht(Nt,Ut),Gt||Bt||ft(kt,st.default.vErrors)}ne.reportExtraError=ct;function ut(xt,Mt){xt.assign(st.default.errors,Mt),xt.if((0,ee._)`${st.default.vErrors} !== null`,()=>xt.if(Mt,()=>xt.assign((0,ee._)`${st.default.vErrors}.length`,Mt),()=>xt.assign(st.default.vErrors,null)))}ne.resetErrorsCount=ut;function dt({gen:xt,keyword:Mt,schemaValue:Ot,data:kt,errsCount:Nt,it:Gt}){if(Nt===void 0)throw new Error("ajv implementation error");const Bt=xt.name("err");xt.forRange("i",Nt,st.default.errors,Ut=>{xt.const(Bt,(0,ee._)`${st.default.vErrors}[${Ut}]`),xt.if((0,ee._)`${Bt}.instancePath === undefined`,()=>xt.assign((0,ee._)`${Bt}.instancePath`,(0,ee.strConcat)(st.default.instancePath,Gt.errorPath))),xt.assign((0,ee._)`${Bt}.schemaPath`,(0,ee.str)`${Gt.errSchemaPath}/${Mt}`),Gt.opts.verbose&&(xt.assign((0,ee._)`${Bt}.schema`,Ot),xt.assign((0,ee._)`${Bt}.data`,kt))})}ne.extendErrors=dt;function ht(xt,Mt){const Ot=xt.const("err",Mt);xt.if((0,ee._)`${st.default.vErrors} === null`,()=>xt.assign(st.default.vErrors,(0,ee._)`[${Ot}]`),(0,ee._)`${st.default.vErrors}.push(${Ot})`),xt.code((0,ee._)`${st.default.errors}++`)}function ft(xt,Mt){const{gen:Ot,validateName:kt,schemaEnv:Nt}=xt;Nt.$async?Ot.throw((0,ee._)`new ${xt.ValidationError}(${Mt})`):(Ot.assign((0,ee._)`${kt}.errors`,Mt),Ot.return(!1))}const pt={keyword:new ee.Name("keyword"),schemaPath:new ee.Name("schemaPath"),params:new ee.Name("params"),propertyName:new ee.Name("propertyName"),message:new ee.Name("message"),schema:new ee.Name("schema"),parentSchema:new ee.Name("parentSchema")};function mt(xt,Mt,Ot){const{createErrors:kt}=xt.it;return kt===!1?(0,ee._)`{}`:yt(xt,Mt,Ot)}function yt(xt,Mt,Ot={}){const{gen:kt,it:Nt}=xt,Gt=[vt(Nt,Ot),_t(xt,Ot)];return bt(xt,Mt,Gt),kt.object(...Gt)}function vt({errorPath:xt},{instancePath:Mt}){const Ot=Mt?(0,ee.str)`${xt}${(0,te.getErrorPath)(Mt,te.Type.Str)}`:xt;return[st.default.instancePath,(0,ee.strConcat)(st.default.instancePath,Ot)]}function _t({keyword:xt,it:{errSchemaPath:Mt}},{schemaPath:Ot,parentSchema:kt}){let Nt=kt?Mt:(0,ee.str)`${Mt}/${xt}`;return Ot&&(Nt=(0,ee.str)`${Nt}${(0,te.getErrorPath)(Ot,te.Type.Str)}`),[pt.schemaPath,Nt]}function bt(xt,{params:Mt,message:Ot},kt){const{keyword:Nt,data:Gt,schemaValue:Bt,it:Ut}=xt,{opts:Vt,propertyName:Ht,topSchemaRef:zt,schemaPath:jt}=Ut;kt.push([pt.keyword,Nt],[pt.params,typeof Mt=="function"?Mt(xt):Mt||(0,ee._)`{}`]),Vt.messages&&kt.push([pt.message,typeof Ot=="function"?Ot(xt):Ot]),Vt.verbose&&kt.push([pt.schema,Bt],[pt.parentSchema,(0,ee._)`${zt}${jt}`],[st.default.data,Gt]),Ht&&kt.push([pt.propertyName,Ht])}})(errors)),errors}var hasRequiredBoolSchema;function requireBoolSchema(){if(hasRequiredBoolSchema)return boolSchema;hasRequiredBoolSchema=1,Object.defineProperty(boolSchema,"__esModule",{value:!0}),boolSchema.boolOrEmptySchema=boolSchema.topBoolOrEmptySchema=void 0;const ne=requireErrors(),ee=requireCodegen(),te=requireNames(),st={message:"boolean schema is false"};function ot(dt){const{gen:ht,schema:ft,validateName:pt}=dt;ft===!1?ut(dt,!1):typeof ft=="object"&&ft.$async===!0?ht.return(te.default.data):(ht.assign((0,ee._)`${pt}.errors`,null),ht.return(!0))}boolSchema.topBoolOrEmptySchema=ot;function ct(dt,ht){const{gen:ft,schema:pt}=dt;pt===!1?(ft.var(ht,!1),ut(dt)):ft.var(ht,!0)}boolSchema.boolOrEmptySchema=ct;function ut(dt,ht){const{gen:ft,data:pt}=dt,mt={gen:ft,keyword:"false schema",data:pt,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:dt};(0,ne.reportError)(mt,st,void 0,ht)}return boolSchema}var dataType={},rules={},hasRequiredRules;function requireRules(){if(hasRequiredRules)return rules;hasRequiredRules=1,Object.defineProperty(rules,"__esModule",{value:!0}),rules.getRules=rules.isJSONType=void 0;const ne=["string","number","integer","boolean","null","object","array"],ee=new Set(ne);function te(ot){return typeof ot=="string"&&ee.has(ot)}rules.isJSONType=te;function st(){const ot={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...ot,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},ot.number,ot.string,ot.array,ot.object],post:{rules:[]},all:{},keywords:{}}}return rules.getRules=st,rules}var applicability={},hasRequiredApplicability;function requireApplicability(){if(hasRequiredApplicability)return applicability;hasRequiredApplicability=1,Object.defineProperty(applicability,"__esModule",{value:!0}),applicability.shouldUseRule=applicability.shouldUseGroup=applicability.schemaHasRulesForType=void 0;function ne({schema:st,self:ot},ct){const ut=ot.RULES.types[ct];return ut&&ut!==!0&&ee(st,ut)}applicability.schemaHasRulesForType=ne;function ee(st,ot){return ot.rules.some(ct=>te(st,ct))}applicability.shouldUseGroup=ee;function te(st,ot){var ct;return st[ot.keyword]!==void 0||((ct=ot.definition.implements)===null||ct===void 0?void 0:ct.some(ut=>st[ut]!==void 0))}return applicability.shouldUseRule=te,applicability}var hasRequiredDataType;
1159function requireDataType(){if(hasRequiredDataType)return dataType;hasRequiredDataType=1,Object.defineProperty(dataType,"__esModule",{value:!0}),dataType.reportTypeError=dataType.checkDataTypes=dataType.checkDataType=dataType.coerceAndCheckDataType=dataType.getJSONTypes=dataType.getSchemaTypes=dataType.DataType=void 0;const ne=requireRules(),ee=requireApplicability(),te=requireErrors(),st=requireCodegen(),ot=requireUtil();var ct;(function(Ot){Ot[Ot.Correct=0]="Correct",Ot[Ot.Wrong=1]="Wrong"})(ct||(dataType.DataType=ct={}));function ut(Ot){const kt=dt(Ot.type);if(kt.includes("null")){if(Ot.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!kt.length&&Ot.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');Ot.nullable===!0&&kt.push("null")}return kt}dataType.getSchemaTypes=ut;function dt(Ot){const kt=Array.isArray(Ot)?Ot:Ot?[Ot]:[];if(kt.every(ne.isJSONType))return kt;throw new Error("type must be JSONType or JSONType[]: "+kt.join(","))}dataType.getJSONTypes=dt;function ht(Ot,kt){const{gen:Nt,data:Gt,opts:Bt}=Ot,Ut=pt(kt,Bt.coerceTypes),Vt=kt.length>0&&!(Ut.length===0&&kt.length===1&&(0,ee.schemaHasRulesForType)(Ot,kt[0]));if(Vt){const Ht=_t(kt,Gt,Bt.strictNumbers,ct.Wrong);Nt.if(Ht,()=>{Ut.length?mt(Ot,kt,Ut):xt(Ot)})}return Vt}dataType.coerceAndCheckDataType=ht;const ft=new Set(["string","number","integer","boolean","null"]);function pt(Ot,kt){return kt?Ot.filter(Nt=>ft.has(Nt)||kt==="array"&&Nt==="array"):[]}function mt(Ot,kt,Nt){const{gen:Gt,data:Bt,opts:Ut}=Ot,Vt=Gt.let("dataType",(0,st._)`typeof ${Bt}`),Ht=Gt.let("coerced",(0,st._)`undefined`);Ut.coerceTypes==="array"&&Gt.if((0,st._)`${Vt} == 'object' && Array.isArray(${Bt}) && ${Bt}.length == 1`,()=>Gt.assign(Bt,(0,st._)`${Bt}[0]`).assign(Vt,(0,st._)`typeof ${Bt}`).if(_t(kt,Bt,Ut.strictNumbers),()=>Gt.assign(Ht,Bt))),Gt.if((0,st._)`${Ht} !== undefined`);for(const jt of Nt)(ft.has(jt)||jt==="array"&&Ut.coerceTypes==="array")&&zt(jt);Gt.else(),xt(Ot),Gt.endIf(),Gt.if((0,st._)`${Ht} !== undefined`,()=>{Gt.assign(Bt,Ht),yt(Ot,Ht)});function zt(jt){switch(jt){case"string":Gt.elseIf((0,st._)`${Vt} == "number" || ${Vt} == "boolean"`).assign(Ht,(0,st._)`"" + ${Bt}`).elseIf((0,st._)`${Bt} === null`).assign(Ht,(0,st._)`""`);return;case"number":Gt.elseIf((0,st._)`${Vt} == "boolean" || ${Bt} === null
1160              || (${Vt} == "string" && ${Bt} && ${Bt} == +${Bt})`).assign(Ht,(0,st._)`+${Bt}`);return;case"integer":Gt.elseIf((0,st._)`${Vt} === "boolean" || ${Bt} === null
1161              || (${Vt} === "string" && ${Bt} && ${Bt} == +${Bt} && !(${Bt} % 1))`).assign(Ht,(0,st._)`+${Bt}`);return;case"boolean":Gt.elseIf((0,st._)`${Bt} === "false" || ${Bt} === 0 || ${Bt} === null`).assign(Ht,!1).elseIf((0,st._)`${Bt} === "true" || ${Bt} === 1`).assign(Ht,!0);return;case"null":Gt.elseIf((0,st._)`${Bt} === "" || ${Bt} === 0 || ${Bt} === false`),Gt.assign(Ht,null);return;case"array":Gt.elseIf((0,st._)`${Vt} === "string" || ${Vt} === "number"
1162              || ${Vt} === "boolean" || ${Bt} === null`).assign(Ht,(0,st._)`[${Bt}]`)}}}function yt({gen:Ot,parentData:kt,parentDataProperty:Nt},Gt){Ot.if((0,st._)`${kt} !== undefined`,()=>Ot.assign((0,st._)`${kt}[${Nt}]`,Gt))}function vt(Ot,kt,Nt,Gt=ct.Correct){const Bt=Gt===ct.Correct?st.operators.EQ:st.operators.NEQ;let Ut;switch(Ot){case"null":return(0,st._)`${kt} ${Bt} null`;case"array":Ut=(0,st._)`Array.isArray(${kt})`;break;case"object":Ut=(0,st._)`${kt} && typeof ${kt} == "object" && !Array.isArray(${kt})`;break;case"integer":Ut=Vt((0,st._)`!(${kt} % 1) && !isNaN(${kt})`);break;case"number":Ut=Vt();break;default:return(0,st._)`typeof ${kt} ${Bt} ${Ot}`}return Gt===ct.Correct?Ut:(0,st.not)(Ut);function Vt(Ht=st.nil){return(0,st.and)((0,st._)`typeof ${kt} == "number"`,Ht,Nt?(0,st._)`isFinite(${kt})`:st.nil)}}dataType.checkDataType=vt;function _t(Ot,kt,Nt,Gt){if(Ot.length===1)return vt(Ot[0],kt,Nt,Gt);let Bt;const Ut=(0,ot.toHash)(Ot);if(Ut.array&&Ut.object){const Vt=(0,st._)`typeof ${kt} != "object"`;Bt=Ut.null?Vt:(0,st._)`!${kt} || ${Vt}`,delete Ut.null,delete Ut.array,delete Ut.object}else Bt=st.nil;Ut.number&&delete Ut.integer;for(const Vt in Ut)Bt=(0,st.and)(Bt,vt(Vt,kt,Nt,Gt));return Bt}dataType.checkDataTypes=_t;const bt={message:({schema:Ot})=>`must be ${Ot}
1162`,params:({schema:Ot,schemaValue:kt})=>typeof Ot=="string"?(0,st._)`{type: ${Ot}}`:(0,st._)`{type: ${kt}}`};function xt(Ot){const kt=Mt(Ot);(0,te.reportError)(kt,bt)}dataType.reportTypeError=xt;function Mt(Ot){const{gen:kt,data:Nt,schema:Gt}=Ot,Bt=(0,ot.schemaRefOrVal)(Ot,Gt,"type");return{gen:kt,keyword:"type",data:Nt,schema:Gt.type,schemaCode:Bt,schemaValue:Bt,parentSchema:Gt,params:{},it:Ot}}return dataType}var defaults={},hasRequiredDefaults;function requireDefaults(){if(hasRequiredDefaults)return defaults;hasRequiredDefaults=1,Object.defineProperty(defaults,"__esModule",{value:!0}),defaults.assignDefaults=void 0;const ne=requireCodegen(),ee=requireUtil();function te(ot,ct){const{properties:ut,items:dt}=ot.schema;if(ct==="object"&&ut)for(const ht in ut)st(ot,ht,ut[ht].default);else ct==="array"&&Array.isArray(dt)&&dt.forEach((ht,ft)=>st(ot,ft,ht.default))}defaults.assignDefaults=te;function st(ot,ct,ut){const{gen:dt,compositeRule:ht,data:ft,opts:pt}=ot;if(ut===void 0)return;const mt=(0,ne._)`${ft}${(0,ne.getProperty)(ct)}`;if(ht){(0,ee.checkStrictMode)(ot,`default is ignored for: ${mt}`);return}let yt=(0,ne._)`${mt} === undefined`;pt.useDefaults==="empty"&&(yt=(0,ne._)`${yt} || ${mt} === null || ${mt} === ""`),dt.if(yt,(0,ne._)`${mt} = ${(0,ne.stringify)(ut)}`)}return defaults}var keyword={},code={},hasRequiredCode;function requireCode(){if(hasRequiredCode)return code;hasRequiredCode=1,Object.defineProperty(code,"__esModule",{value:!0}),code.validateUnion=code.validateArray=code.usePattern=code.callValidateCode=code.schemaProperties=code.allSchemaProperties=code.noPropertyInData=code.propertyInData=code.isOwnProperty=code.hasPropFunc=code.reportMissingProp=code.checkMissingProp=code.checkReportMissingProp=void 0;const ne=requireCodegen(),ee=requireUtil(),te=requireNames(),st=requireUtil();function ot(Ot,kt){const{gen:Nt,data:Gt,it:Bt}=Ot;Nt.if(pt(Nt,Gt,kt,Bt.opts.ownProperties),()=>{Ot.setParams({missingProperty:(0,ne._)`${kt}`},!0),Ot.error()})}code.checkReportMissingProp=ot;function ct({gen:Ot,data:kt,it:{opts:Nt}},Gt,Bt){return(0,ne.or)(...Gt.map(Ut=>(0,ne.and)(pt(Ot,kt,Ut,Nt.ownProperties),(0,ne._)`${Bt} = ${Ut}`)))}code.checkMissingProp=ct;function ut(Ot,kt){Ot.setParams({missingProperty:kt},!0),Ot.error()}code.reportMissingProp=ut;function dt(Ot){return Ot.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,ne._)`Object.prototype.hasOwnProperty`})}code.hasPropFunc=dt;function ht(Ot,kt,Nt){return(0,ne._)`${dt(Ot)}.call(${kt}, ${Nt})`}code.isOwnProperty=ht;function ft(Ot,kt,Nt,Gt){const Bt=(0,ne._)`${kt}${(0,ne.getProperty)(Nt)} !== undefined`;return Gt?(0,ne._)`${Bt} && ${ht(Ot,kt,Nt)}`:Bt}code.propertyInData=ft;function pt(Ot,kt,Nt,Gt){const Bt=(0,ne._)`${kt}${(0,ne.getProperty)(Nt)} === undefined`;return Gt?(0,ne.or)(Bt,(0,ne.not)(ht(Ot,kt,Nt))):Bt}code.noPropertyInData=pt;function mt(Ot){return Ot?Object.keys(Ot).filter(kt=>kt!=="__proto__"):[]}code.allSchemaProperties=mt;function yt(Ot,kt){return mt(kt).filter(Nt=>!(0,ee.alwaysValidSchema)(Ot,kt[Nt]))}code.schemaProperties=yt;function vt({schemaCode:Ot,data:kt,it:{gen:Nt,topSchemaRef:Gt,schemaPath:Bt,errorPath:Ut},it:Vt},Ht,zt,jt){const Wt=jt?(0,ne._)`${Ot}, ${kt}, ${Gt}${Bt}`:kt,Jt=[[te.default.instancePath,(0,ne.strConcat)(te.default.instancePath,Ut)],[te.default.parentData,Vt.parentData],[te.default.parentDataProperty,Vt.parentDataProperty],[te.default.rootData,te.default.rootData]];Vt.opts.dynamicRef&&Jt.push([te.default.dynamicAnchors,te.default.dynamicAnchors]);const Qt=(0,ne._)`${Wt}, ${Nt.object(...Jt)}`;return zt!==ne.nil?(0,ne._)`${Ht}.call(${zt}, ${Qt})`:(0,ne._)`${Ht}(${Qt})`}code.callValidateCode=vt;const _t=(0,ne._)`new RegExp`;function bt({gen:Ot,it:{opts:kt}},Nt){const Gt=kt.unicodeRegExp?"u":"",{regExp:Bt}=kt.code,Ut=Bt(Nt,Gt);return Ot.scopeValue("pattern",{key:Ut.toString(),ref:Ut,code:(0,ne._)`${Bt.code==="new RegExp"?_t:(0,st.useFunc)(Ot,Bt)}(${Nt}, ${Gt})`})}code.usePattern=bt;function xt(Ot){const{gen:kt,data:Nt,keyword:Gt,it:Bt}=Ot,Ut=kt.name("valid");if(Bt.allErrors){const Ht=kt.let("valid",!0);return Vt(()=>kt.assign(Ht,!1)),Ht}return kt.var(Ut,!0),Vt(()=>kt.break()),Ut;
1162function Vt(Ht){const zt=kt.const("len",(0,ne._)`${Nt}.length`);kt.forRange("i",0,zt,jt=>{Ot.subschema({keyword:Gt,dataProp:jt,dataPropType:ee.Type.Num},Ut),kt.if((0,ne.not)(Ut),Ht)})}}code.validateArray=xt;function Mt(Ot){const{gen:kt,schema:Nt,keyword:Gt,it:Bt}=Ot;if(!Array.isArray(Nt))throw new Error("ajv implementation error");if(Nt.some(zt=>(0,ee.alwaysValidSchema)(Bt,zt))&&!Bt.opts.unevaluated)return;const Vt=kt.let("valid",!1),Ht=kt.name("_valid");kt.block(()=>Nt.forEach((zt,jt)=>{const Wt=Ot.subschema({keyword:Gt,schemaProp:jt,compositeRule:!0},Ht);kt.assign(Vt,(0,ne._)`${Vt} || ${Ht}`),Ot.mergeValidEvaluated(Wt,Ht)||kt.if((0,ne.not)(Vt))})),Ot.result(Vt,()=>Ot.reset(),()=>Ot.error(!0))}return code.validateUnion=Mt,code}var hasRequiredKeyword;function requireKeyword(){if(hasRequiredKeyword)return keyword;hasRequiredKeyword=1,Object.defineProperty(keyword,"__esModule",{value:!0}),keyword.validateKeywordUsage=keyword.validSchemaType=keyword.funcKeywordCode=keyword.macroKeywordCode=void 0;const ne=requireCodegen(),ee=requireNames(),te=requireCode(),st=requireErrors();function ot(yt,vt){const{gen:_t,keyword:bt,schema:xt,parentSchema:Mt,it:Ot}=yt,kt=vt.macro.call(Ot.self,xt,Mt,Ot),Nt=ft(_t,bt,kt);Ot.opts.validateSchema!==!1&&Ot.self.validateSchema(kt,!0);const Gt=_t.name("valid");yt.subschema({schema:kt,schemaPath:ne.nil,errSchemaPath:`${Ot.errSchemaPath}/${bt}`,topSchemaRef:Nt,compositeRule:!0},Gt),yt.pass(Gt,()=>yt.error(!0))}keyword.macroKeywordCode=ot;function ct(yt,vt){var _t;const{gen:bt,keyword:xt,schema:Mt,parentSchema:Ot,$data:kt,it:Nt}=yt;ht(Nt,vt);const Gt=!kt&&vt.compile?vt.compile.call(Nt.self,Mt,Ot,Nt):vt.validate,Bt=ft(bt,xt,Gt),Ut=bt.let("valid");yt.block$data(Ut,Vt),yt.ok((_t=vt.valid)!==null&&_t!==void 0?_t:Ut);function Vt(){if(vt.errors===!1)jt(),vt.modifying&&ut(yt),Wt(()=>yt.error());else{const Jt=vt.async?Ht():zt();vt.modifying&&ut(yt),Wt(()=>dt(yt,Jt))}}function Ht(){const Jt=bt.let("ruleErrs",null);return bt.try(()=>jt((0,ne._)`await `),Qt=>bt.assign(Ut,!1).if((0,ne._)`${Qt} instanceof ${Nt.ValidationError}`,()=>bt.assign(Jt,(0,ne._)`${Qt}.errors`),()=>bt.throw(Qt))),Jt}function zt(){const Jt=(0,ne._)`${Bt}.errors`;return bt.assign(Jt,null),jt(ne.nil),Jt}function jt(Jt=vt.async?(0,ne._)`await `:ne.nil){const Qt=Nt.opts.passContext?ee.default.this:ee.default.self,oi=!("compile"in vt&&!kt||vt.schema===!1);bt.assign(Ut,(0,ne._)`${Jt}${(0,te.callValidateCode)(yt,Bt,Qt,oi)}`,vt.modifying)}function Wt(Jt){var Qt;bt.if((0,ne.not)((Qt=vt.valid)!==null&&Qt!==void 0?Qt:Ut),Jt)}}keyword.funcKeywordCode=ct;function ut(yt){const{gen:vt,data:_t,it:bt}=yt;vt.if(bt.parentData,()=>vt.assign(_t,(0,ne._)`${bt.parentData}[${bt.parentDataProperty}]`))}function dt(yt,vt){const{gen:_t}=yt;_t.if((0,ne._)`Array.isArray(${vt})`,()=>{_t.assign(ee.default.vErrors,(0,ne._)`${ee.default.vErrors} === null ? ${vt} : ${ee.default.vErrors}.concat(${vt})`).assign(ee.default.errors,(0,ne._)`${ee.default.vErrors}.length`),(0,st.extendErrors)(yt)},()=>yt.error())}function ht({schemaEnv:yt},vt){if(vt.async&&!yt.$async)throw new Error("async keyword in sync schema")}function ft(yt,vt,_t){if(_t===void 0)throw new Error(`keyword "${vt}" failed to compile`);return yt.scopeValue("keyword",typeof _t=="function"?{ref:_t}:{ref:_t,code:(0,ne.stringify)(_t)})}function pt(yt,vt,_t=!1){return!vt.length||vt.some(bt=>bt==="array"?Array.isArray(yt):bt==="object"?yt&&typeof yt=="object"&&!Array.isArray(yt):typeof yt==bt||_t&&typeof yt>"u")}keyword.validSchemaType=pt;function mt({schema:yt,opts:vt,self:_t,errSchemaPath:bt},xt,Mt){if(Array.isArray(xt.keyword)?!xt.keyword.includes(Mt):xt.keyword!==Mt)throw new Error("ajv implementation error");const Ot=xt.dependencies;if(Ot!=null&&Ot.some(kt=>!Object.prototype.hasOwnProperty.call(yt,kt)))throw new Error(`parent schema must have dependencies of ${Mt}: ${Ot.join(",")}`);if(xt.validateSchema&&!xt.validateSchema(yt[Mt])){const Nt=`keyword "${Mt}" value is invalid at path "${bt}": `+_t.errorsText(xt.validateSchema.errors);if(vt.validateSchema==="log")_t.logger.error(Nt);else throw new Error(Nt)}}return keyword.validateKeywordUsage=mt,keyword}var subschema={},hasRequiredSubschema;function requireSubschema(){if(hasRequiredSubschema)return subschema;hasRequiredSubschema=1,Object.defineProperty(subschema,"__esModule",{value:!0}),subschema.extendSubschemaMode=subschema.extendSubschemaData=subschema.getSubschema=void 0;const ne=requireCodegen(),ee=requireUtil();function te(ct,{keyword:ut,schemaProp:dt,schema:ht,schemaPath:ft,errSchemaPath:pt,topSchemaRef:mt}){if(ut!==void 0&&ht!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(ut!==void 0){const yt=ct.schema[ut];return dt===void 0?{schema:yt,schemaPath:(0,ne._)`${ct.schemaPath}${(0,ne.getProperty)(ut)}`,errSchemaPath:`${ct.errSchemaPath}/${ut}`}:{schema:yt[dt],schemaPath:(0,ne._)`${ct.schemaPath}${(0,ne.getProperty)(ut)}${(0,ne.getProperty)(dt)}`,errSchemaPath:`${ct.errSchemaPath}/${ut}/${(0,ee.escapeFragment)(dt)}`}}if(ht!==void 0){if(ft===void 0||pt===void 0||mt===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:ht,schemaPath:ft,topSchemaRef:mt,errSchemaPath:pt}}throw new Error('either "keyword" or "schema" must be passed')}
1162subschema.getSubschema=te;function st(ct,ut,{dataProp:dt,dataPropType:ht,data:ft,dataTypes:pt,propertyName:mt}){if(ft!==void 0&&dt!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen:yt}=ut;if(dt!==void 0){const{errorPath:_t,dataPathArr:bt,opts:xt}=ut,Mt=yt.let("data",(0,ne._)`${ut.data}${(0,ne.getProperty)(dt)}`,!0);vt(Mt),ct.errorPath=(0,ne.str)`${_t}${(0,ee.getErrorPath)(dt,ht,xt.jsPropertySyntax)}`,ct.parentDataProperty=(0,ne._)`${dt}`,ct.dataPathArr=[...bt,ct.parentDataProperty]}if(ft!==void 0){const _t=ft instanceof ne.Name?ft:yt.let("data",ft,!0);vt(_t),mt!==void 0&&(ct.propertyName=mt)}pt&&(ct.dataTypes=pt);function vt(_t){ct.data=_t,ct.dataLevel=ut.dataLevel+1,ct.dataTypes=[],ut.definedProperties=new Set,ct.parentData=ut.data,ct.dataNames=[...ut.dataNames,_t]}}subschema.extendSubschemaData=st;function ot(ct,{jtdDiscriminator:ut,jtdMetadata:dt,compositeRule:ht,createErrors:ft,allErrors:pt}){ht!==void 0&&(ct.compositeRule=ht),ft!==void 0&&(ct.createErrors=ft),pt!==void 0&&(ct.allErrors=pt),ct.jtdDiscriminator=ut,ct.jtdMetadata=dt}return subschema.extendSubschemaMode=ot,subschema}var resolve={},fastDeepEqual,hasRequiredFastDeepEqual;function requireFastDeepEqual(){return hasRequiredFastDeepEqual||(hasRequiredFastDeepEqual=1,fastDeepEqual=function ne(ee,te){if(ee===te)return!0;if(ee&&te&&typeof ee=="object"&&typeof te=="object"){if(ee.constructor!==te.constructor)return!1;var st,ot,ct;if(Array.isArray(ee)){if(st=ee.length,st!=te.length)return!1;for(ot=st;ot--!==0;)if(!ne(ee[ot],te[ot]))return!1;return!0}if(ee.constructor===RegExp)return ee.source===te.source&&ee.flags===te.flags;if(ee.valueOf!==Object.prototype.valueOf)return ee.valueOf()===te.valueOf();if(ee.toString!==Object.prototype.toString)return ee.toString()===te.toString();if(ct=Object.keys(ee),st=ct.length,st!==Object.keys(te).length)return!1;for(ot=st;ot--!==0;)if(!Object.prototype.hasOwnProperty.call(te,ct[ot]))return!1;for(ot=st;ot--!==0;){var ut=ct[ot];if(!ne(ee[ut],te[ut]))return!1}return!0}return ee!==ee&&te!==te}),fastDeepEqual}var jsonSchemaTraverse={exports:{}},hasRequiredJsonSchemaTraverse;function requireJsonSchemaTraverse(){if(hasRequiredJsonSchemaTraverse)return jsonSchemaTraverse.exports;hasRequiredJsonSchemaTraverse=1;var ne=jsonSchemaTraverse.exports=function(st,ot,ct){typeof ot=="function"&&(ct=ot,ot={}),ct=ot.cb||ct;var ut=typeof ct=="function"?ct:ct.pre||function(){},dt=ct.post||function(){};ee(ot,ut,dt,st,"",st)};ne.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0},ne.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0},ne.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0},ne.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0};function ee(st,ot,ct,ut,dt,ht,ft,pt,mt,yt){if(ut&&typeof ut=="object"&&!Array.isArray(ut)){ot(ut,dt,ht,ft,pt,mt,yt);for(var vt in ut){var _t=ut[vt];if(Array.isArray(_t)){if(vt in ne.arrayKeywords)for(var bt=0;bt<_t.length;bt++)ee(st,ot,ct,_t[bt],dt+"/"+vt+"/"+bt,ht,dt,vt,ut,bt)}else if(vt in ne.propsKeywords){if(_t&&typeof _t=="object")for(var xt in _t)ee(st,ot,ct,_t[xt],dt+"/"+vt+"/"+te(xt),ht,dt,vt,ut,xt)}else(vt in ne.keywords||st.allKeys&&!(vt in ne.skipKeywords))&&ee(st,ot,ct,_t,dt+"/"+vt,ht,dt,vt,ut)}ct(ut,dt,ht,ft,pt,mt,yt)}}function te(st){return st.replace(/~/g,"~0").replace(/\//g,"~1")}return jsonSchemaTraverse.exports}var hasRequiredResolve;function requireResolve(){if(hasRequiredResolve)return resolve;hasRequiredResolve=1,Object.defineProperty(resolve,"__esModule",{value:!0}),resolve.getSchemaRefs=resolve.resolveUrl=resolve.normalizeId=resolve._getFullPath=resolve.getFullPath=resolve.inlineRef=void 0;const ne=requireUtil(),ee=requireFastDeepEqual(),te=requireJsonSchemaTraverse(),st=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function ot(bt,xt=!0){return typeof bt=="boolean"?!0:xt===!0?!ut(bt):xt?dt(bt)<=xt:!1}resolve.inlineRef=ot;const ct=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function ut(bt){for(const xt in bt){if(ct.has(xt))return!0;const Mt=bt[xt];
1162if(Array.isArray(Mt)&&Mt.some(ut)||typeof Mt=="object"&&ut(Mt))return!0}return!1}function dt(bt){let xt=0;for(const Mt in bt){if(Mt==="$ref")return 1/0;if(xt++,!st.has(Mt)&&(typeof bt[Mt]=="object"&&(0,ne.eachItem)(bt[Mt],Ot=>xt+=dt(Ot)),xt===1/0))return 1/0}return xt}function ht(bt,xt="",Mt){Mt!==!1&&(xt=mt(xt));const Ot=bt.parse(xt);return ft(bt,Ot)}resolve.getFullPath=ht;function ft(bt,xt){return bt.serialize(xt).split("#")[0]+"#"}resolve._getFullPath=ft;const pt=/#\/?$/;function mt(bt){return bt?bt.replace(pt,""):""}resolve.normalizeId=mt;function yt(bt,xt,Mt){return Mt=mt(Mt),bt.resolve(xt,Mt)}resolve.resolveUrl=yt;const vt=/^[a-z_][-a-z0-9._]*$/i;function _t(bt,xt){if(typeof bt=="boolean")return{};const{schemaId:Mt,uriResolver:Ot}=this.opts,kt=mt(bt[Mt]||xt),Nt={"":kt},Gt=ht(Ot,kt,!1),Bt={},Ut=new Set;return te(bt,{allKeys:!0},(zt,jt,Wt,Jt)=>{if(Jt===void 0)return;const Qt=Gt+jt;let oi=Nt[Jt];typeof zt[Mt]=="string"&&(oi=ai.call(this,zt[Mt])),xn.call(this,zt.$anchor),xn.call(this,zt.$dynamicAnchor),Nt[jt]=oi;function ai(An){const Nn=this.opts.uriResolver.resolve;if(An=mt(oi?Nn(oi,An):An),Ut.has(An))throw Ht(An);
1162Ut.add(An);let Xt=this.refs[An];return typeof Xt=="string"&&(Xt=this.refs[Xt]),typeof Xt=="object"?Vt(zt,Xt.schema,An):An!==mt(Qt)&&(An[0]==="#"?(Vt(zt,Bt[An],An),Bt[An]=zt):this.refs[An]=Qt),An}function xn(An){if(typeof An=="string"){if(!vt.test(An))throw new Error(`invalid anchor "${An}"`);ai.call(this,`#${An}`)}}}),Bt;function Vt(zt,jt,Wt){if(jt!==void 0&&!ee(zt,jt))throw Ht(Wt)}function Ht(zt){return new Error(`reference "${zt}" resolves to more than one schema`)}}return resolve.getSchemaRefs=_t,resolve}var hasRequiredValidate;function requireValidate(){if(hasRequiredValidate)return validate;hasRequiredValidate=1,Object.defineProperty(validate,"__esModule",{value:!0}),validate.getData=validate.KeywordCxt=validate.validateFunctionCode=void 0;const ne=requireBoolSchema(),ee=requireDataType(),te=requireApplicability(),st=requireDataType(),ot=requireDefaults(),ct=requireKeyword(),ut=requireSubschema(),dt=requireCodegen(),ht=requireNames(),ft=requireResolve(),pt=requireUtil(),mt=requireErrors();function yt(Pn){if(Gt(Pn)&&(Ut(Pn),Nt(Pn))){xt(Pn);return}vt(Pn,()=>(0,ne.topBoolOrEmptySchema)(Pn))}validate.validateFunctionCode=yt;function vt({gen:Pn,validateName:Mn,schema:Yt,schemaEnv:ri,opts:Sn},On){Sn.code.es5?Pn.func(Mn,(0,dt._)`${ht.default.data}, ${ht.default.valCxt}`,ri.$async,()=>{Pn.code((0,dt._)`"use strict"; ${Ot(Yt,Sn)}`),bt(Pn,Sn),Pn.code(On)}):Pn.func(Mn,(0,dt._)`${ht.default.data}, ${_t(Sn)}`,ri.$async,()=>Pn.code(Ot(Yt,Sn)).code(On))}function _t(Pn){return(0,dt._)`{${ht.default.instancePath}="", ${ht.default.parentData}, ${ht.default.parentDataProperty}, ${ht.default.rootData}=${ht.default.data}${Pn.dynamicRef?(0,dt._)`, ${ht.default.dynamicAnchors}={}`:dt.nil}}={}`}function bt(Pn,Mn){Pn.if(ht.default.valCxt,()=>{Pn.var(ht.default.instancePath,(0,dt._)`${ht.default.valCxt}.${ht.default.instancePath}`),Pn.var(ht.default.parentData,(0,dt._)`${ht.default.valCxt}.${ht.default.parentData}`),Pn.var(ht.default.parentDataProperty,(0,dt._)`${ht.default.valCxt}.${ht.default.parentDataProperty}`),Pn.var(ht.default.rootData,(0,dt._)`${ht.default.valCxt}.${ht.default.rootData}`),Mn.dynamicRef&&Pn.var(ht.default.dynamicAnchors,(0,dt._)`${ht.default.valCxt}.${ht.default.dynamicAnchors}`)},()=>{Pn.var(ht.default.instancePath,(0,dt._)`""`),Pn.var(ht.default.parentData,(0,dt._)`undefined`),Pn.var(ht.default.parentDataProperty,(0,dt._)`undefined`),Pn.var(ht.default.rootData,ht.default.data),Mn.dynamicRef&&Pn.var(ht.default.dynamicAnchors,(0,dt._)`{}`)})}function xt(Pn){const{schema:Mn,opts:Yt,gen:ri}=Pn;vt(Pn,()=>{Yt.$comment&&Mn.$comment&&Jt(Pn),zt(Pn),ri.let(ht.default.vErrors,null),ri.let(ht.default.errors,0),Yt.unevaluated&&Mt(Pn),Vt(Pn),Qt(Pn)})}function Mt(Pn){const{gen:Mn,validateName:Yt}=Pn;Pn.evaluated=Mn.const("evaluated",(0,dt._)`${Yt}.evaluated`),Mn.if((0,dt._)`${Pn.evaluated}.dynamicProps`,()=>Mn.assign((0,dt._)`${Pn.evaluated}.props`,(0,dt._)`undefined`)),Mn.if((0,dt._)`${Pn.evaluated}.dynamicItems`,()=>Mn.assign((0,dt._)`${Pn.evaluated}.items`,(0,dt._)`undefined`))}function Ot(Pn,Mn){const Yt=typeof Pn=="object"&&Pn[Mn.schemaId];return Yt&&(Mn.code.source||Mn.code.process)?(0,dt._)`/*# sourceURL=${Yt} */`:dt.nil}function kt(Pn,Mn){if(Gt(Pn)&&(Ut(Pn),Nt(Pn))){Bt(Pn,Mn);return}(0,ne.boolOrEmptySchema)(Pn,Mn)}function Nt({schema:Pn,self:Mn}){if(typeof Pn=="boolean")return!Pn;for(const Yt in Pn)if(Mn.RULES.all[Yt])return!0;return!1}function Gt(Pn){return typeof Pn.schema!="boolean"}function Bt(Pn,Mn){const{schema:Yt,gen:ri,opts:Sn}=Pn;Sn.$comment&&Yt.$comment&&Jt(Pn),jt(Pn),Wt(Pn);const On=ri.const("_errs",ht.default.errors);Vt(Pn,On),ri.var(Mn,(0,dt._)`${On} === ${ht.default.errors}`)}function Ut(Pn){(0,pt.checkUnknownRules)(Pn),Ht(Pn)}function Vt(Pn,Mn){if(Pn.opts.jtd)return ai(Pn,[],!1,Mn);const Yt=(0,ee.getSchemaTypes)(Pn.schema),ri=(0,ee.coerceAndCheckDataType)(Pn,Yt);ai(Pn,Yt,!ri,Mn)}function Ht(Pn){const{schema:Mn,errSchemaPath:Yt,opts:ri,self:Sn}=Pn;Mn.$ref&&ri.ignoreKeywordsWithRef&&(0,pt.schemaHasRulesButRef)(Mn,Sn.RULES)&&Sn.logger.warn(`$ref: keywords ignored in schema at path "${Yt}"`)}function zt(Pn){const{schema:Mn,opts:Yt}=Pn;Mn.default!==void 0&&Yt.useDefaults&&Yt.strictSchema&&(0,pt.checkStrictMode)(Pn,"default is ignored in the schema root")}function jt(Pn){const Mn=Pn.schema[Pn.opts.schemaId];Mn&&(Pn.baseId=(0,ft.resolveUrl)(Pn.opts.uriResolver,Pn.baseId,Mn))}function Wt(Pn){if(Pn.schema.$async&&!Pn.schemaEnv.$async)throw new Error("async schema in sync schema")}function Jt({gen:Pn,schemaEnv:Mn,schema:Yt,errSchemaPath:ri,opts:Sn}){const On=Yt.$comment;if(Sn.$comment===!0)Pn.code((0,dt._)`${ht.default.self}.logger.log(${On})`);else if(typeof Sn.$comment=="function"){const Rn=(0,dt.str)`${ri}/$comment`,Bn=Pn.scopeValue("root",{ref:Mn.root});Pn.code((0,dt._)`${ht.default.self}.opts.$comment(${On}, ${Rn}, ${Bn}.schema)`)}}function Qt(Pn){const{gen:Mn,schemaEnv:Yt,validateName:ri,ValidationError:Sn,opts:On}=Pn;Yt.$async?Mn.if((0,dt._)`${ht.default.errors} === 0`,()=>Mn.return(ht.default.data),()=>Mn.throw((0,dt._)`new ${Sn}(${ht.default.vErrors})`)):(Mn.assign((0,dt._)`${ri}.errors`,ht.default.vErrors),On.unevaluated&&oi(Pn),Mn.return((0,dt._)`${ht.default.errors} === 0`))}function oi({gen:Pn,evaluated:Mn,props:Yt,items:ri}){Yt instanceof dt.Name&&Pn.assign((0,dt._)`${Mn}.props`,Yt),ri instanceof dt.Name&&Pn.assign((0,dt._)`${Mn}.items`,ri)}function ai(Pn,Mn,Yt,ri){const{gen:Sn,schema:On,data:Rn,allErrors:Bn,opts:Vn,self:Wn}=Pn,{RULES:Gn}=Wn;if(On.$ref&&(Vn.ignoreKeywordsWithRef||!(0,pt.schemaHasRulesButRef)(On,Gn))){Sn.block(()=>ni(Pn,"$ref",Gn.all.$ref.definition));return}Vn.jtd||An(Pn,Mn),Sn.block(()=>{for(const kn of Gn.rules)Hn(kn);Hn(Gn.post)});function Hn(kn){(0,te.shouldUseGroup)(On,kn)&&(kn.type?(Sn.if((0,st.checkDataType)(kn.type,Rn,Vn.strictNumbers)),xn(Pn,kn),Mn.length===1&&Mn[0]===kn.type&&Yt&&(Sn.else(),(0,st.reportTypeError)(Pn)),Sn.endIf()):xn(Pn,kn),Bn||Sn.if((0,dt._)`${ht.default.errors} === ${ri||0}`))}}function xn(Pn,Mn){const{gen:Yt,schema:ri,opts:{useDefaults:Sn}}=Pn;Sn&&(0,ot.assignDefaults)(Pn,Mn.type),Yt.block(()=>
1162{for(const On of Mn.rules)(0,te.shouldUseRule)(ri,On)&&ni(Pn,On.keyword,On.definition,Mn.type)})}function An(Pn,Mn){Pn.schemaEnv.meta||!Pn.opts.strictTypes||(Nn(Pn,Mn),Pn.opts.allowUnionTypes||Xt(Pn,Mn),Zt(Pn,Pn.dataTypes))}function Nn(Pn,Mn){if(Mn.length){if(!Pn.dataTypes.length){Pn.dataTypes=Mn;return}Mn.forEach(Yt=>{ti(Pn.dataTypes,Yt)||ii(Pn,`type "${Yt}" not allowed by context "${Pn.dataTypes.join(",")}"`)}),qt(Pn,Mn)}}function Xt(Pn,Mn){Mn.length>1&&!(Mn.length===2&&Mn.includes("null"))&&ii(Pn,"use allowUnionTypes to allow union type keyword")}function Zt(Pn,Mn){const Yt=Pn.self.RULES.all;for(const ri in Yt){const Sn=Yt[ri];if(typeof Sn=="object"&&(0,te.shouldUseRule)(Pn.schema,Sn)){const{type:On}=Sn.definition;On.length&&!On.some(Rn=>Kt(Mn,Rn))&&ii(Pn,`missing type "${On.join(",")}" for keyword "${ri}"`)}}}function Kt(Pn,Mn){return Pn.includes(Mn)||Mn==="number"&&Pn.includes("integer")}function ti(Pn,Mn){return Pn.includes(Mn)||Mn==="integer"&&Pn.includes("number")}function qt(Pn,Mn){const Yt=[];for(const ri of Pn.dataTypes)ti(Mn,ri)?Yt.push(ri):Mn.includes("integer")&&ri==="number"&&Yt.push("integer");Pn.dataTypes=Yt}function ii(Pn,Mn){const Yt=Pn.schemaEnv.baseId+Pn.errSchemaPath;Mn+=` at "${Yt}" (strictTypes)`,(0,pt.checkStrictMode)(Pn,Mn,Pn.opts.strictTypes)}class wn{constructor(Mn,Yt,ri){if((0,ct.validateKeywordUsage)(Mn,Yt,ri),this.gen=Mn.gen,this.allErrors=Mn.allErrors,this.keyword=ri,this.data=Mn.data,this.schema=Mn.schema[ri],this.$data=Yt.$data&&Mn.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,pt.schemaRefOrVal)(Mn,this.schema,ri,this.$data),this.schemaType=Yt.schemaType,this.parentSchema=Mn.schema,this.params={},this.it=Mn,this.def=Yt,this.$data)this.schemaCode=Mn.gen.const("vSchema",Un(this.$data,Mn));else if(this.schemaCode=this.schemaValue,!(0,ct.validSchemaType)(this.schema,Yt.schemaType,Yt.allowUndefined))throw new Error(`${ri} value must be ${JSON.stringify(Yt.schemaType)}`);("code"in Yt?Yt.trackErrors:Yt.errors!==!1)&&(this.errsCount=Mn.gen.const("_errs",ht.default.errors))}result(Mn,Yt,ri){this.failResult((0,dt.not)(Mn),Yt,ri)}failResult(Mn,Yt,ri){this.gen.if(Mn),ri?ri():this.error(),Yt?(this.gen.else(),Yt(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(Mn,Yt){this.failResult((0,dt.not)(Mn),void 0,Yt)}fail(Mn){if(Mn===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(Mn),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(Mn){if(!this.$data)return this.fail(Mn);const{schemaCode:Yt}=this;this.fail((0,dt._)`${Yt} !== undefined && (${(0,dt.or)(this.invalid$data(),Mn)})`)}error(Mn,Yt,ri){if(Yt){this.setParams(Yt),this._error(Mn,ri),this.setParams({});return}this._error(Mn,ri)}_error(Mn,Yt){(Mn?mt.reportExtraError:mt.reportError)(this,this.def.error,Yt)}$dataError(){(0,mt.reportError)(this,this.def.$dataError||mt.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,mt.resetErrorsCount)(this.gen,this.errsCount)}ok(Mn){this.allErrors||this.gen.if(Mn)}setParams(Mn,Yt){Yt?Object.assign(this.params,Mn):this.params=Mn}block$data(Mn,Yt,ri=dt.nil){this.gen.block(()=>{this.check$data(Mn,ri),Yt()})}check$data(Mn=dt.nil,Yt=dt.nil){if(!this.$data)return;const{gen:ri,schemaCode:Sn,schemaType:On,def:Rn}=this;ri.if((0,dt.or)((0,dt._)`${Sn} === undefined`,Yt)),Mn!==dt.nil&&ri.assign(Mn,!0),(On.length||Rn.validateSchema)&&(ri.elseIf(this.invalid$data()),this.$dataError(),Mn!==dt.nil&&ri.assign(Mn,!1)),ri.else()}invalid$data(){const{gen:Mn,schemaCode:Yt,schemaType:ri,def:Sn,it:On}=this;return(0,dt.or)(Rn(),Bn());function Rn(){if(ri.length){if(!(Yt instanceof dt.Name))throw new Error("ajv implementation error");const Vn=Array.isArray(ri)?ri:[ri];return(0,dt._)`${(0,st.checkDataTypes)(Vn,Yt,On.opts.strictNumbers,st.DataType.Wrong)}`}return dt.nil}function Bn(){if(Sn.validateSchema){const Vn=Mn.scopeValue("validate$data",{ref:Sn.validateSchema});return(0,dt._)`!${Vn}(${Yt})`}return dt.nil}}subschema(Mn,Yt){const ri=(0,ut.getSubschema)(this.it,Mn);(0,ut.extendSubschemaData)(ri,this.it,Mn),(0,ut.extendSubschemaMode)(ri,Mn);const Sn={...this.it,...ri,items:void 0,props:void 0};return kt(Sn,Yt),Sn}mergeEvaluated(Mn,Yt){const{it:ri,gen:Sn}=this;ri.opts.unevaluated&&(ri.props!==!0&&Mn.props!==void 0&&(ri.props=pt.mergeEvaluated.props(Sn,Mn.props,ri.props,Yt)),ri.items!==!0&&Mn.items!==void 0&&(ri.items=pt.mergeEvaluated.items(Sn,Mn.items,ri.items,Yt)))}mergeValidEvaluated(Mn,Yt){const{it:ri,gen:Sn}=this;if(ri.opts.unevaluated&&(ri.props!==!0||ri.items!==!0))return Sn.if(Yt,()=>this.mergeEvaluated(Mn,dt.Name)),!0}}validate.KeywordCxt=wn;function ni(Pn,Mn,Yt,ri){const Sn=new wn(Pn,Yt,Mn);"code"in Yt?Yt.code(Sn,ri):Sn.$data&&Yt.validate?(0,ct.funcKeywordCode)(Sn,Yt):"macro"in Yt?(0,ct.macroKeywordCode)(Sn,Yt):(Yt.compile||Yt.validate)&&(0,ct.funcKeywordCode)(Sn,Yt)}const Cn=/^\/(?:[^~]|~0|~1)*$/,Ln=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function Un(Pn,{dataLevel:Mn,dataNames:Yt,dataPathArr:ri}){let Sn,On;if(Pn==="")return ht.default.rootData;if(Pn[0]==="/"){if(!Cn.test(Pn))throw new Error(`Invalid JSON-pointer: ${Pn}`);
1162Sn=Pn,On=ht.default.rootData}else{const Wn=Ln.exec(Pn);if(!Wn)throw new Error(`Invalid JSON-pointer: ${Pn}`);const Gn=+Wn[1];if(Sn=Wn[2],Sn==="#"){if(Gn>=Mn)throw new Error(Vn("property/index",Gn));return ri[Mn-Gn]}if(Gn>Mn)throw new Error(Vn("data",Gn));if(On=Yt[Mn-Gn],!Sn)return On}let Rn=On;const Bn=Sn.split("/");for(const Wn of Bn)Wn&&(On=(0,dt._)`${On}${(0,dt.getProperty)((0,pt.unescapeJsonPointer)(Wn))}`,Rn=(0,dt._)`${Rn} && ${On}`);return Rn;function Vn(Wn,Gn){return`Cannot access ${Wn} ${Gn} levels up, current level is ${Mn}`}}return validate.getData=Un,validate}var validation_error={},hasRequiredValidation_error;function requireValidation_error(){if(hasRequiredValidation_error)return validation_error;hasRequiredValidation_error=1,Object.defineProperty(validation_error,"__esModule",{value:!0});class ne extends Error{constructor(te){super("validation failed"),this.errors=te,this.ajv=this.validation=!0}}return validation_error.default=ne,validation_error}var ref_error={},hasRequiredRef_error;function requireRef_error(){if(hasRequiredRef_error)return ref_error;
1162hasRequiredRef_error=1,Object.defineProperty(ref_error,"__esModule",{value:!0});const ne=requireResolve();class ee extends Error{constructor(st,ot,ct,ut){super(ut||`can't resolve reference ${ct} from id ${ot}`),this.missingRef=(0,ne.resolveUrl)(st,ot,ct),this.missingSchema=(0,ne.normalizeId)((0,ne.getFullPath)(st,this.missingRef))}}return ref_error.default=ee,ref_error}var compile={},hasRequiredCompile;function requireCompile(){if(hasRequiredCompile)return compile;hasRequiredCompile=1,Object.defineProperty(compile,"__esModule",{value:!0}),compile.resolveSchema=compile.getCompilingSchema=compile.resolveRef=compile.compileSchema=compile.SchemaEnv=void 0;const ne=requireCodegen(),ee=requireValidation_error(),te=requireNames(),st=requireResolve(),ot=requireUtil(),ct=requireValidate();class ut{constructor(Mt){var Ot;this.refs={},this.dynamicAnchors={};let kt;typeof Mt.schema=="object"&&(kt=Mt.schema),this.schema=Mt.schema,this.schemaId=Mt.schemaId,this.root=Mt.root||this,this.baseId=(Ot=Mt.baseId)!==null&&Ot!==void 0?Ot:(0,st.normalizeId)(kt==null?void 0:kt[Mt.schemaId||"$id"]),this.schemaPath=Mt.schemaPath,this.localRefs=Mt.localRefs,this.meta=Mt.meta,this.$async=kt==null?void 0:kt.$async,this.refs={}}}compile.SchemaEnv=ut;function dt(xt){const Mt=pt.call(this,xt);if(Mt)return Mt;const Ot=(0,st.getFullPath)(this.opts.uriResolver,xt.root.baseId),{es5:kt,lines:Nt}=this.opts.code,{ownProperties:Gt}=this.opts,Bt=new ne.CodeGen(this.scope,{es5:kt,lines:Nt,ownProperties:Gt});let Ut;xt.$async&&(Ut=Bt.scopeValue("Error",{ref:ee.default,code:(0,ne._)`require("ajv/dist/runtime/validation_error").default`}));const Vt=Bt.scopeName("validate");xt.validateName=Vt;const Ht={gen:Bt,allErrors:this.opts.allErrors,data:te.default.data,parentData:te.default.parentData,parentDataProperty:te.default.parentDataProperty,dataNames:[te.default.data],dataPathArr:[ne.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:Bt.scopeValue("schema",this.opts.code.source===!0?{ref:xt.schema,code:(0,ne.stringify)(xt.schema)}:{ref:xt.schema}),validateName:Vt,ValidationError:Ut,schema:xt.schema,schemaEnv:xt,rootId:Ot,baseId:xt.baseId||Ot,schemaPath:ne.nil,errSchemaPath:xt.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,ne._)`""`,opts:this.opts,self:this};let zt;try{this._compilations.add(xt),(0,ct.validateFunctionCode)(Ht),Bt.optimize(this.opts.code.optimize);const jt=Bt.toString();zt=`${Bt.scopeRefs(te.default.scope)}return ${jt}`,this.opts.code.process&&(zt=this.opts.code.process(zt,xt));const Jt=new Function(`${te.default.self}`,`${te.default.scope}`,zt)(this,this.scope.get());if(this.scope.value(Vt,{ref:Jt}),Jt.errors=null,Jt.schema=xt.schema,Jt.schemaEnv=xt,xt.$async&&(Jt.$async=!0),this.opts.code.source===!0&&(Jt.source={validateName:Vt,validateCode:jt,scopeValues:Bt._values}),this.opts.unevaluated){const{props:Qt,items:oi}=Ht;Jt.evaluated={props:Qt instanceof ne.Name?void 0:Qt,items:oi instanceof ne.Name?void 0:oi,dynamicProps:Qt instanceof ne.Name,dynamicItems:oi instanceof ne.Name},Jt.source&&(Jt.source.evaluated=(0,ne.stringify)(Jt.evaluated))}return xt.validate=Jt,xt}catch(jt){throw delete xt.validate,delete xt.validateName,zt&&this.logger.error("Error compiling schema, function code:",zt),jt}finally{this._compilations.delete(xt)}}compile.compileSchema=dt;function ht(xt,Mt,Ot){var kt;Ot=(0,st.resolveUrl)(this.opts.uriResolver,Mt,Ot);const Nt=xt.refs[Ot];if(Nt)return Nt;let Gt=yt.call(this,xt,Ot);if(Gt===void 0){const Bt=(kt=xt.localRefs)===null||kt===void 0?void 0:kt[Ot],{schemaId:Ut}=this.opts;Bt&&(Gt=new ut({schema:Bt,schemaId:Ut,root:xt,baseId:Mt}))}if(Gt!==void 0)return xt.refs[Ot]=ft.call(this,Gt)}compile.resolveRef=ht;function ft(xt){return(0,st.inlineRef)(xt.schema,this.opts.inlineRefs)?xt.schema:xt.validate?xt:dt.call(this,xt)}function pt(xt){for(const Mt of this._compilations)if(mt(Mt,xt))return Mt}compile.getCompilingSchema=pt;function mt(xt,Mt){return xt.schema===Mt.schema&&xt.root===Mt.root&&xt.baseId===Mt.baseId}function yt(xt,Mt){let Ot;for(;typeof(Ot=this.refs[Mt])=="string";)Mt=Ot;return Ot||this.schemas[Mt]||vt.call(this,xt,Mt)}function vt(xt,Mt){const Ot=this.opts.uriResolver.parse(Mt),kt=(0,st._getFullPath)(this.opts.uriResolver,Ot);let Nt=(0,st.getFullPath)(this.opts.uriResolver,xt.baseId,void 0);if(Object.keys(xt.schema).length>0&&kt===Nt)return bt.call(this,Ot,xt);const Gt=(0,st.normalizeId)(kt),Bt=this.refs[Gt]||this.schemas[Gt];if(typeof Bt=="string"){const Ut=vt.call(this,xt,Bt);return typeof(Ut==null?void 0:Ut.schema)!="object"?void 0:bt.call(this,Ot,Ut)}if(typeof(Bt==null?void 0:Bt.schema)=="object"){if(Bt.validate||dt.call(this,Bt),Gt===(0,st.normalizeId)(Mt)){const{schema:Ut}=Bt,{schemaId:Vt}=this.opts,Ht=Ut[Vt];return Ht&&(Nt=(0,st.resolveUrl)(this.opts.uriResolver,Nt,Ht)),new ut({schema:Ut,schemaId:Vt,root:xt,baseId:Nt})}return bt.call(this,Ot,Bt)}}compile.resolveSchema=vt;const _t=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function bt(xt,{baseId:Mt,schema:Ot,root:kt}){var Nt;if(((Nt=xt.fragment)===null||Nt===void 0?void 0:Nt[0])!=="/")return;for(const Ut of xt.fragment.slice(1).split("/")){if(typeof Ot=="boolean")return;const Vt=Ot[(0,ot.unescapeFragment)(Ut)];if(Vt===void 0)return;Ot=Vt;const Ht=typeof Ot=="object"&&Ot[this.opts.schemaId];!_t.has(Ut)&&Ht&&(Mt=(0,st.resolveUrl)(this.opts.uriResolver,Mt,Ht))}let Gt;if(typeof Ot!="boolean"&&Ot.$ref&&!(0,ot.schemaHasRulesButRef)(Ot,this.RULES)){const Ut=(0,st.resolveUrl)(this.opts.uriResolver,Mt,Ot.$ref);Gt=vt.call(this,kt,Ut)}const{schemaId:Bt}=this.opts;
1162if(Gt=Gt||new ut({schema:Ot,schemaId:Bt,root:kt,baseId:Mt}),Gt.schema!==Gt.root.schema)return Gt}return compile}const $id$7="https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",description="Meta-schema for $data reference (JSON AnySchema extension proposal)",type$7="object",required$5=["$data"],properties$6={$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},additionalProperties$4=!1,require$$9={$id:$id$7,description,type:type$7,required:required$5,properties:properties$6,additionalProperties:additionalProperties$4};var uri={},fastUri={exports:{}},utils,hasRequiredUtils;function requireUtils(){if(hasRequiredUtils)return utils;hasRequiredUtils=1;const ne=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),ee=RegExp.prototype.test.bind(/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u),te=RegExp.prototype.test.bind(/^\d*$/u),st=RegExp.prototype.test.bind(/^[\da-f]{2}$/iu),ot=RegExp.prototype.test.bind(/^[\da-z\-._~]$/iu),ct=RegExp.prototype.test.bind(/^[A-Za-z0-9\-._~!$&'()*+,;=:@/]$/u),ut=RegExp.prototype.test.bind(/^[A-Za-z0-9\-._~!$&'()*+,;=:@/?]$/u),dt=RegExp.prototype.test.bind(/^[A-Za-z0-9\-._~!$&'()*+,;=:]$/u),ht=new Array(256);{const Xt="0123456789ABCDEF";for(let Zt=0;Zt<256;Zt++)ht[Zt]="%"+Xt[Zt>>4]+Xt[Zt&15]}function ft(Xt){return Xt<2048?ht[192|Xt>>6]+ht[128|Xt&63]:Xt<65536?ht[224|Xt>>12]+ht[128|Xt>>6&63]+ht[128|Xt&63]:ht[240|Xt>>18]+ht[128|Xt>>12&63]+ht[128|Xt>>6&63]+ht[128|Xt&63]}function pt(Xt){let Zt="",Kt=0,ti=0;for(ti=0;ti<Xt.length;ti++)if(Kt=Xt[ti].charCodeAt(0),Kt!==48){if(!(Kt>=48&&Kt<=57||Kt>=65&&Kt<=70||Kt>=97&&Kt<=102))return"";Zt+=Xt[ti];break}for(ti+=1;ti<Xt.length;ti++){if(Kt=Xt[ti].charCodeAt(0),!(Kt>=48&&Kt<=57||Kt>=65&&Kt<=70||Kt>=97&&Kt<=102))return"";Zt+=Xt[ti]}return Zt}const mt=RegExp.prototype.test.bind(/^[\dA-Fa-f]{1,4}$/),yt=RegExp.prototype.test.bind(/^[vV][\dA-Fa-f]+\.[A-Za-z\d\-._~!$&'()*+,;=:]+$/),vt=RegExp.prototype.test.bind(/^[A-Za-z\d\-._~]$/),_t=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function bt(Xt){if(Xt.length===0)return!1;for(let Zt=0;Zt<Xt.length;Zt++)if(!vt(Xt[Zt])){if(Xt[Zt]==="%"&&Zt+2<Xt.length&&st(Xt.slice(Zt+1,Zt+3))){Zt+=2;continue}return!1}return!0}function xt(Xt){let Zt=-1,Kt=0,ti=-1,qt=0;for(let ni=0;ni<Xt.length;ni++)Xt[ni]==="0"?(ti===-1&&(ti=ni),qt++,qt>Kt&&(Kt=qt,Zt=ti)):(ti=-1,qt=0);if(Kt<2)return Xt.join(":");const ii=Xt.slice(0,Zt).join(":"),wn=Xt.slice(Zt+Kt).join(":");return ii+"::"+wn}function Mt(Xt){const Zt=Xt.indexOf("::");if(Zt!==-1&&Xt.indexOf("::",Zt+1)!==-1)return;const Kt=Zt===-1?Xt.split(":"):Xt.slice(0,Zt).split(":"),ti=Zt===-1?[]:Xt.slice(Zt+2).split(":");Zt!==-1&&(Kt.length===1&&Kt[0]===""&&(Kt.length=0),ti.length===1&&ti[0]===""&&(ti.length=0));const qt=Kt.concat(ti);let ii=0;for(let ni=0;ni<qt.length;ni++){const Cn=qt[ni];if(Cn==="")return;if(Cn.indexOf(".")!==-1){if(ni!==qt.length-1||Zt!==-1&&ti.length===0||!ee(Cn))return;ii+=2;continue}if(!mt(Cn))return;qt[ni]=parseInt(Cn,16).toString(16),ii++}if(Zt===-1)return ii!==8?void 0:xt(qt);if(ii>=8)return;const wn=qt.slice(0,Kt.length);for(let ni=ii;ni<8;ni++)wn.push("0");for(let ni=Kt.length;ni<qt.length;ni++)wn.push(qt[ni]);return xt(wn)}function Ot(Xt){const Zt=Xt[0]==="["&&Xt[Xt.length-1]==="]";if((Xt[0]==="["||Xt[Xt.length-1]==="]")&&!Zt)return{host:Xt,isIPV6:!1,error:!0};let ti=Zt?Xt.slice(1,-1):Xt;if(Zt&&yt(ti))return ti=ti.toLowerCase(),{host:`[${ti}]`,escapedHost:ti,isIPV6:!1,isIPVFuture:!0};if(kt(ti,":")<2)return{host:Xt,isIPV6:!1,error:Zt};let qt="";const ii=ti.indexOf("%");if(ii!==-1){const ni=ti.slice(ii,ii+3).toLowerCase()==="%25"?3:1;if(qt=ti.slice(ii+ni),!bt(qt))return{host:Xt,isIPV6:!1,error:!0};ti=ti.slice(0,ii)}const wn=Mt(ti);return wn===void 0?{host:Xt,isIPV6:!1,error:!0}:{host:wn+(qt?"%"+qt:""),escapedHost:wn+(qt?"%25"+qt:""),isIPV6:!0}}function kt(Xt,Zt){let Kt=0;for(let ti=0;ti<Xt.length;ti++)Xt[ti]===Zt&&Kt++;return Kt}function Nt(Xt){let Zt=Xt;const Kt=[];let ti=-1,qt=0;for(;qt=Zt.length;){if(qt===1){if(Zt===".")break;if(Zt==="/"){Kt.push("/");break}else{Kt.push(Zt);break}}else if(qt===2){if(Zt[0]==="."){if(Zt[1]===".")break;if(Zt[1]==="/"){Zt=Zt.slice(2);continue}}else if(Zt[0]==="/"&&(Zt[1]==="."||Zt[1]==="/")){Kt.push("/");break}}else if(qt===3&&Zt==="/.."){Kt.length!==0&&Kt.pop(),Kt.push("/");break}if(Zt[0]==="."){if(Zt[1]==="."){if(Zt[2]==="/"){Zt=Zt.slice(3);continue}}else if(Zt[1]==="/"){Zt=Zt.slice(2);continue}}else if(Zt[0]==="/"&&Zt[1]==="."){if(Zt[2]==="/"){Zt=Zt.slice(2);continue}else if(Zt[2]==="."&&Zt[3]==="/"){Zt=Zt.slice(3),Kt.length!==0&&Kt.pop();continue}}if((ti=Zt.indexOf("/",1))===-1){Kt.push(Zt);break}else Kt.push(Zt.slice(0,ti)),Zt=Zt.slice(ti)}return Kt.join("")}const Gt={"@":"%40","/":"%2F","?":"%3F","#":"%23",":":"%3A"},Bt=/[@/?#:]/g,Ut=/[@/?#]/g;function Vt(Xt,Zt){const Kt=Zt?Ut:Bt;return Kt.lastIndex=0,Xt.replace(Kt,ti=>Gt[ti])}function Ht(Xt,Zt=!1){if(Xt.indexOf("%")===-1)return Xt;let Kt="";for(let ti=0;ti<Xt.length;ti++){if(Xt[ti]==="%"&&ti+2<Xt.length){const qt=Xt.slice(ti+1,ti+3);if(st(qt)){const ii=qt.toUpperCase(),wn=String.fromCharCode(parseInt(ii,16));Zt&&ot(wn)?Kt+=wn:Kt+="%"+ii,ti+=2;continue}}Kt+=Xt[ti]}return Kt}function zt(Xt){let Zt="";for(let Kt=0;Kt<Xt.length;Kt++){const ti=Xt[Kt];if(ti==="%"&&Kt+2<Xt.length){const qt=Xt.slice(Kt+1,Kt+3);if(st(qt)){const ii=qt.toUpperCase(),wn=String.fromCharCode(parseInt(ii,16));wn!=="."&&ot(wn)?Zt+=wn:Zt+="%"+ii,Kt+=2;continue}}if(ct(ti))Zt+=ti;else{const qt=Xt.charCodeAt(Kt);if(qt<128)Zt+=ai(qt)?ti:ht[qt];else if(qt<55296||qt>57343)Zt+=ft(qt);else if(qt<=56319&&Kt+1<Xt.length){const ii=Xt.charCodeAt(Kt+1);ii>=56320&&ii<=57343?(Zt+=ft(65536+(qt-55296<<10)+(ii-56320)),Kt++):Zt+=ft(65533)}else Zt+=ft(65533)}}return Zt}function jt(Xt,Zt=!1){let Kt="",ti=Zt&&Xt[0]!=="/";for(let qt=0;qt<Xt.length;qt++){const ii=Xt[qt];if(ii==="%"&&qt+2<Xt.length){const wn=Xt.slice(qt+1,qt+3);if(st(wn)){Kt+="%"+wn.toUpperCase(),qt+=2;continue}}if(ii==="/"&&(ti=!1),ct(ii)&&(ii!==":"||!ti))Kt+=ii;else{const wn=Xt.charCodeAt(qt);if(wn<128)Kt+=ht[wn];else if(wn<55296||wn>57343)Kt+=ft(wn);else if(wn<=56319&&qt+1<Xt.length){const ni=Xt.charCodeAt(qt+1);ni>=56320&&ni<=57343?(Kt+=ft(65536+(wn-55296<<10)+(ni-56320)),qt++):Kt+=ft(65533)}else Kt+=ft(65533)}}return Kt}function Wt(Xt,Zt){let Kt="";for(let ti=0;ti<Xt.length;ti++){const qt=Xt[ti];if(qt==="%"&&ti+2<Xt.length){const ii=Xt.slice(ti+1,ti+3);if(st(ii)){Kt+="%"+ii.toUpperCase(),ti+=2;continue}}if(Zt(qt))Kt+=qt;else{const ii=Xt.charCodeAt(ti);if(ii<128)Kt+=ht[ii];else if(ii<55296||ii>57343)Kt+=ft(ii);else if(ii<=56319&&ti+1<Xt.length){const wn=Xt.charCodeAt(ti+1);wn>=56320&&wn<=57343?(Kt+=ft(65536+(ii-55296<<10)+(wn-56320)),ti++):Kt+=ft(65533)}else Kt+=ft(65533)}}return Kt}function Jt(Xt){return Wt(Xt,dt)}function Qt(Xt){return Wt(Xt,ut)}function oi(Xt){return Wt(Xt,ut)}function ai(Xt){return Xt>=48&&Xt<=57||Xt>=65&&Xt<=90||Xt>=97&&Xt<=122||Xt===42||Xt===43||Xt===45||Xt===46||Xt===47||Xt===64||Xt===95}function xn(Xt){let Zt="";for(let Kt=0;Kt<Xt.length;Kt++){const ti=Xt[Kt];if(ti==="%"&&Kt+2<Xt.length){const qt=Xt.slice(Kt+1,Kt+3);if(st(qt)){const ii=qt.toUpperCase(),wn=String.fromCharCode(parseInt(ii,16));ot(wn)?Zt+=wn:Zt+="%"+ii,Kt+=2;continue}}if(ut(ti))Zt+=ti;else{const qt=Xt.charCodeAt(Kt);if(qt<128)Zt+=ai(qt)?ti:ht[qt];else if(qt<55296||qt>57343)Zt+=ft(qt);else if(qt<=56319&&Kt+1<Xt.length){const ii=Xt.charCodeAt(Kt+1);ii>=56320&&ii<=57343?(Zt+=ft(65536+(qt-55296<<10)+(ii-56320)),Kt++):Zt+=ft(65533)}else Zt+=ft(65533)}}return Zt}function An(Xt){let Zt="";for(let Kt=0;Kt<Xt.length;Kt++){if(Xt[Kt]==="%"&&Kt+2<Xt.length){const ti=Xt.slice(Kt+1,Kt+3);if(st(ti)){Zt+="%"+ti.toUpperCase(),Kt+=2;continue}}Zt+=escape(Xt[Kt])}return Zt}function Nn(Xt){const Zt=[];
1162if(Xt.userinfo!==void 0&&(Zt.push(Jt(Xt.userinfo)),Zt.push("@")),Xt.host!==void 0){let Kt=Xt.host;if(!ee(Kt)){let ti=Ot(Kt);ti.isIPV6!==!0&&ti.isIPVFuture!==!0&&(Kt=Ht(Kt,!0),ti=Ot(Kt)),ti.isIPV6===!0||ti.isIPVFuture===!0?Kt=`[${ti.escapedHost}]`:Kt=Vt(Kt,!1)}Zt.push(Kt)}if(typeof Xt.port=="number"||typeof Xt.port=="string"){const Kt=String(Xt.port);if(!te(Kt))throw new TypeError("URI port is malformed.");Zt.push(":"),Zt.push(Kt)}return Zt.length?Zt.join(""):void 0}return utils={nonSimpleDomain:_t,recomposeAuthority:Nn,reescapeHostDelimiters:Vt,normalizePercentEncoding:Ht,normalizePathEncoding:zt,serializePathEncoding:jt,normalizeQueryFragmentEncoding:xn,encodeUserinfo:Jt,encodeQuery:Qt,encodeFragment:oi,escapePreservingEscapes:An,removeDotSegments:Nt,isIPv4:ee,isUUID:ne,normalizeIPv6:Ot,stringArrayToHexStripped:pt},utils}var schemes,hasRequiredSchemes;function requireSchemes(){if(hasRequiredSchemes)return schemes;hasRequiredSchemes=1;const{isUUID:ne}=requireUtils(),ee=/^([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-./:;=@]|%[\da-f]{2})+)$/iu,te=["http","https","ws","wss","urn","urn:uuid"];function st(Gt){return te.indexOf(Gt)!==-1}function ot(Gt){return Gt.secure===!0?!0:Gt.secure===!1?!1:Gt.scheme?Gt.scheme.length===3&&(Gt.scheme[0]==="w"||Gt.scheme[0]==="W")&&(Gt.scheme[1]==="s"||Gt.scheme[1]==="S")&&(Gt.scheme[2]==="s"||Gt.scheme[2]==="S"):!1}function ct(Gt){return Gt.host||(Gt.error=Gt.error||"HTTP URIs must have a host."),Gt}function ut(Gt){const Bt=String(Gt.scheme).toLowerCase()==="https";return(Gt.port===(Bt?443:80)||Gt.port==="")&&(Gt.port=void 0),Gt.path||(Gt.path="/"),Gt}function dt(Gt){return Gt.secure=ot(Gt),Gt.resourceName=(Gt.path||"/")+(Gt.query?"?"+Gt.query:""),Gt.path=void 0,Gt.query=void 0,Gt}function ht(Gt){if((Gt.port===(ot(Gt)?443:80)||Gt.port==="")&&(Gt.port=void 0),typeof Gt.secure=="boolean"&&(Gt.scheme=Gt.secure?"wss":"ws",Gt.secure=void 0),Gt.resourceName){const Bt=Gt.resourceName.indexOf("?"),Ut=Bt===-1?Gt.resourceName:Gt.resourceName.slice(0,Bt);Gt.path=Ut&&Ut!=="/"?Ut:void 0,Gt.query=Bt===-1?void 0:Gt.resourceName.slice(Bt+1),Gt.resourceName=void 0}return Gt.fragment=void 0,Gt}function ft(Gt,Bt){if(!Gt.path)return Gt.error="URN can not be parsed",Gt;const Ut=Gt.path.match(ee);if(Ut&&Ut[0]===Gt.path){const Vt=Bt.scheme||Gt.scheme||"urn";Gt.nid=Ut[1].toLowerCase(),Gt.nss=Ut[2];const Ht=`${Vt}:${Bt.nid||Gt.nid}`,zt=Nt(Ht);Gt.path=void 0,zt&&(Gt=zt.parse(Gt,Bt))}else Gt.error=Gt.error||"URN can not be parsed.";return Gt}function pt(Gt,Bt){if(Gt.nid===void 0)throw new Error("URN without nid cannot be serialized");const Ut=Bt.scheme||Gt.scheme||"urn",Vt=Gt.nid.toLowerCase(),Ht=`${Ut}:${Bt.nid||Vt}`,zt=Nt(Ht);zt&&(Gt=zt.serialize(Gt,Bt));const jt=Gt,Wt=Gt.nss;return jt.path=`${Vt||Bt.nid}:${Wt}`,Bt.skipEscape=!0,jt}function mt(Gt,Bt){const Ut=Gt;return Ut.uuid=Ut.nss,Ut.nss=void 0,!Bt.tolerant&&(!Ut.uuid||!ne(Ut.uuid))&&(Ut.error=Ut.error||"UUID is not valid."),Ut}function yt(Gt){const Bt=Gt;return Bt.nss=(Gt.uuid||"").toLowerCase(),Bt}const vt={scheme:"http",domainHost:!0,parse:ct,serialize:ut},_t={scheme:"https",domainHost:vt.domainHost,parse:ct,serialize:ut},bt={scheme:"ws",domainHost:!0,parse:dt,serialize:ht},xt={scheme:"wss",domainHost:bt.domainHost,parse:bt.parse,serialize:bt.serialize},kt={http:vt,https:_t,ws:bt,wss:xt,urn:{scheme:"urn",parse:ft,serialize:pt,skipNormalize:!0},"urn:uuid":{scheme:"urn:uuid",parse:mt,serialize:yt,skipNormalize:!0}};Object.setPrototypeOf(kt,null);function Nt(Gt){return Gt&&(kt[Gt]||kt[Gt.toLowerCase()])||void 0}return schemes={wsIsSecure:ot,SCHEMES:kt,isValidSchemeName:st,getSchemeHandler:Nt},schemes}var hasRequiredFastUri;function requireFastUri(){if(hasRequiredFastUri)return fastUri.exports;hasRequiredFastUri=1;const{normalizeIPv6:ne,removeDotSegments:ee,recomposeAuthority:te,normalizePercentEncoding:st,normalizePathEncoding:ot,serializePathEncoding:ct,normalizeQueryFragmentEncoding:ut,encodeQuery:dt,encodeFragment:ht,reescapeHostDelimiters:ft,isIPv4:pt,nonSimpleDomain:mt}=requireUtils(),{SCHEMES:yt,getSchemeHandler:vt}=requireSchemes(),_t=/^[A-Za-z][A-Za-z0-9+.-]*$/u,bt="URI scheme is malformed.";function xt(Xt){const Zt=unescape(String(Xt));if(!_t.test(Zt))throw new TypeError(bt);return Zt}function Mt(Xt,Zt){return typeof Xt=="string"?Xt=ai(Xt,Zt):typeof Xt=="object"&&(Xt=oi(Gt(Xt,Zt),Zt)),Xt}
1162function Ot(Xt,Zt,Kt){const ti=Kt?Object.assign({scheme:"null"},Kt):{scheme:"null"},{parsed:qt,malformedAuthorityOrPort:ii,malformedPercentEncoding:wn,malformedSchemeSpecific:ni,malformedHost:Cn,malformedScheme:Ln}=Qt(Xt,ti),{parsed:Un,malformedAuthorityOrPort:Pn,malformedPercentEncoding:Mn,malformedSchemeSpecific:Yt,malformedHost:ri,malformedScheme:Sn}=Qt(Zt,ti);if(ii||Pn||wn||Mn||ni||Yt||Cn||ri||Ln||Sn)throw new Error(qt.error||Un.error||"URI is malformed.");const On=kt(qt,Un,ti,!0),Rn=vt(Kt&&Kt.scheme||On.scheme),Bn=On.host,Vn=Bn!==void 0&&Bn!==""&&(pt(Bn)||ne(Bn).isIPV6);Jt(On,Kt||{},Rn,Vn);const Wn=Bn&&Bn.indexOf("%")!==-1&&!new RegExp("\\P{ASCII}","u").test(Bn);if(On.error&&!Wn)throw new Error(On.error);return ti.skipEscape=!0,Gt(On,ti)}function kt(Xt,Zt,Kt,ti){const qt={};return ti||(Xt=oi(Gt(Xt,Kt),Kt),Zt=oi(Gt(Zt,Kt),Kt)),Kt=Kt||{},!Kt.tolerant&&Zt.scheme?(qt.scheme=Zt.scheme,qt.userinfo=Zt.userinfo,qt.host=Zt.host,qt.port=Zt.port,qt.path=ee(Zt.path||""),qt.query=Zt.query):(Zt.userinfo!==void 0||Zt.host!==void 0||Zt.port!==void 0?(qt.userinfo=Zt.userinfo,qt.host=Zt.host,qt.port=Zt.port,qt.path=ee(Zt.path||""),qt.query=Zt.query):(Zt.path?(Zt.path[0]==="/"?qt.path=ee(Zt.path):((Xt.userinfo!==void 0||Xt.host!==void 0||Xt.port!==void 0)&&!Xt.path?qt.path="/"+Zt.path:Xt.path?qt.path=Xt.path.slice(0,Xt.path.lastIndexOf("/")+1)+Zt.path:qt.path=Zt.path,qt.path=ee(qt.path)),qt.query=Zt.query):(qt.path=Xt.path,Zt.query!==void 0?qt.query=Zt.query:qt.query=Xt.query),qt.userinfo=Xt.userinfo,qt.host=Xt.host,qt.port=Xt.port),qt.scheme=Xt.scheme),qt.fragment=Zt.fragment,qt}function Nt(Xt,Zt,Kt){const ti=An(Xt,Kt),qt=An(Zt,Kt);return ti!==void 0&&qt!==void 0&&ti===qt}function Gt(Xt,Zt){const Kt={host:Xt.host,scheme:Xt.scheme,userinfo:Xt.userinfo,port:Xt.port,path:Xt.path,query:Xt.query,nid:Xt.nid,nss:Xt.nss,uuid:Xt.uuid,fragment:Xt.fragment,reference:Xt.reference,resourceName:Xt.resourceName,secure:Xt.secure,error:""},ti=Object.assign({},Zt),qt=[];Kt.scheme&&(Kt.scheme=xt(Kt.scheme));const ii=vt(ti.scheme||Kt.scheme);ii&&ii.serialize&&ii.serialize(Kt,ti);const wn=Kt.userinfo!==void 0||Kt.host!==void 0||Kt.port!==void 0,ni=!ti.skipEscape&&Kt.scheme===void 0&&!wn;Kt.path!==void 0&&(ti.skipEscape?Kt.path=st(Kt.path):Kt.path=ct(Kt.path,ni)),ti.reference!=="suffix"&&Kt.scheme&&(Kt.scheme=xt(Kt.scheme),qt.push(Kt.scheme,":"));const Cn=te(Kt);if(Cn!==void 0&&(ti.reference!=="suffix"&&qt.push("//"),qt.push(Cn),Kt.path&&Kt.path[0]!=="/"&&qt.push("/")),Kt.path!==void 0){let Ln=Kt.path;!ti.absolutePath&&(!ii||!ii.absolutePath)&&(Ln=ee(Ln)),ni&&(Ln=ct(Ln,!0)),Cn===void 0&&Ln[0]==="/"&&Ln[1]==="/"&&(Ln="/%2F"+Ln.slice(2)),qt.push(Ln)}return Kt.query!==void 0&&qt.push("?",dt(Kt.query)),Kt.fragment!==void 0&&qt.push("#",ht(Kt.fragment)),qt.join("")}const Bt=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u,Ut=/^(?:[^#/:?]+:)?\/\/([^/?#]*)/,Vt=/^(?:[^#/:?]+:)?([/\\\t\n\r]*)/;function Ht(Xt,Zt){if(Zt[2]!==void 0&&Xt.path&&Xt.path[0]!=="/")return'URI path must start with "/" when authority is present.';if(typeof Xt.port=="number"&&(Xt.port<0||Xt.port>65535))return"URI port is malformed."}function zt(Xt){if(Xt===void 0)return!1;let Zt=Xt.indexOf("%");for(;Zt!==-1;){if(Zt+2>=Xt.length||!/^[\da-f]{2}$/iu.test(Xt.slice(Zt+1,Zt+3)))return!0;Zt=Xt.indexOf("%",Zt+3)}return!1}function jt(Xt){return Xt[0]==="["&&Xt[Xt.length-1]==="]"}function Wt(Xt){const Zt=Xt[4];return zt(Xt[3])||Zt!==void 0&&!jt(Zt)&&zt(Zt)||zt(Xt[6])||zt(Xt[7])||zt(Xt[8])}function Jt(Xt,Zt,Kt,ti){if(!Zt.unicodeSupport&&(!Kt||!Kt.unicodeSupport)&&Xt.host&&!jt(Xt.host)&&(Zt.domainHost||Kt&&Kt.domainHost)&&ti===!1&&mt(Xt.host))try{Xt.host=new URL("http://"+Xt.host).hostname}catch(qt){return Xt.error=Xt.error||"Host's domain name can not be converted to ASCII: "+qt,!0}return!1}function Qt(Xt,Zt){const Kt=Object.assign({},Zt),ti={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0};let qt=!1,ii=!1,wn=!1,ni=!1,Cn=!1,Ln=!1,Un=!1;Kt.reference==="suffix"&&(Kt.scheme?Xt=Kt.scheme+":"+Xt:Xt="//"+Xt);const Pn=Xt.match(Ut);Pn!==null&&Pn[1].indexOf("\\")!==-1&&(ti.error="URI authority must not contain a literal backslash.",qt=!0);const Mn=Xt.match(Vt);if(Mn!==null){const ri=Mn[1],Sn=ri.replace(/[\t\n\r]/g,"");Sn.length>=2&&(Sn.slice(0,2)!=="//"?(ti.error=ti.error||"URI authority must not contain a literal backslash.",qt=!0):ri.length!==Sn.length&&(ti.error=ti.error||"URI authority introducer must not contain whitespace.",qt=!0))}const Yt=Xt.match(Bt);if(Yt){if(ti.scheme=Yt[1],ti.userinfo=Yt[3],ti.host=Yt[4],ti.port=parseInt(Yt[5],10),ti.path=Yt[6]||"",ti.query=Yt[7],ti.fragment=Yt[8],ti.scheme!==void 0){const On=unescape(ti.scheme);_t.test(On)?ti.scheme=On.toLowerCase():(ti.error=ti.error||bt,Ln=!0)}ii=Wt(Yt),ii&&(ti.error=ti.error||"URI contains malformed percent-encoding."),isNaN(ti.port)&&(ti.port=Yt[5]);const ri=Ht(ti,Yt);if(ri!==void 0&&(ti.error=ti.error||ri,qt=!0),ti.host)if(pt(ti.host)===!1){const Rn=jt(ti.host),Bn=ti.host.indexOf("[")!==-1||ti.host.indexOf("]")!==-1,Vn=ne(ti.host);Un=Vn.isIPV6||Vn.isIPVFuture===!0,Cn=Bn&&(!Rn||Vn.error===!0),ti.host=Un?Vn.host:Vn.host.toLowerCase(),Cn&&(ti.error=ti.error||"URI host is malformed.",qt=!0)}else Un=!0;ti.scheme===void 0&&ti.userinfo===void 0&&ti.host===void 0&&ti.port===void 0&&ti.query===void 0&&!ti.path?ti.reference="same-document":ti.scheme===void 0?ti.reference="relative":ti.fragment===void 0?ti.reference="absolute":ti.reference="uri",Kt.reference&&Kt.reference!=="suffix"&&Kt.reference!==ti.reference&&(ti.error=ti.error||"URI is not a "+Kt.reference+" reference.");const Sn=vt(Kt.scheme||ti.scheme);if(Cn||(ni=Jt(ti,Kt,Sn,Un)),Xt.indexOf("%")!==-1&&ti.host!==void 0&&!Cn){let On=Un?ti.host:st(ti.host,!0);Un||(On=st(On.toLowerCase())),ti.host=ft(On,Un)}(!Sn||Sn&&!Sn.skipNormalize)&&(ti.path&&(ti.path=ot(ti.path)),ti.query&&(ti.query=ut(ti.query)),ti.fragment&&(ti.fragment=ut(ti.fragment))),Sn&&Sn.parse&&(Sn.parse(ti,Kt),Sn===yt.urn&&ti.nid===void 0&&(wn=!0))}else ti.error=ti.error||"URI can not be parsed.";return{parsed:ti,malformedAuthorityOrPort:qt,malformedPercentEncoding:ii,malformedSchemeSpecific:wn,malformedHost:ni,malformedScheme:Ln}}function oi(Xt,Zt){return Qt(Xt,Zt).parsed}function ai(Xt,Zt){return xn(Xt,Zt).normalized}function xn(Xt,Zt){const{parsed:Kt,malformedAuthorityOrPort:ti,malformedPercentEncoding:qt,malformedSchemeSpecific:ii,malformedHost:wn,malformedScheme:ni}=Qt(Xt,Zt);return{normalized:ti||qt||ii||wn||ni?Xt:Gt(Kt,Zt),malformedAuthorityOrPort:ti,malformedPercentEncoding:qt,malformedSchemeSpecific:ii,malformedHost:wn,malformedScheme:ni}}function An(Xt,Zt){if(typeof Xt!="string"&&typeof Xt!="object")return;let Kt;try{Kt=typeof Xt=="string"?Xt:Gt(Xt,Zt)}catch{return}const{normalized:ti,malformedAuthorityOrPort:qt,malformedPercentEncoding:ii,malformedSchemeSpecific:wn,malformedHost:ni,malformedScheme:Cn}=xn(Kt,Zt);return qt||ii||wn||ni||Cn?void 0:ti}
1162const Nn={SCHEMES:yt,normalize:Mt,resolve:Ot,resolveComponent:kt,equal:Nt,serialize:Gt,parse:oi};return fastUri.exports=Nn,fastUri.exports.default=Nn,fastUri.exports.fastUri=Nn,fastUri.exports}var hasRequiredUri;function requireUri(){if(hasRequiredUri)return uri;hasRequiredUri=1,Object.defineProperty(uri,"__esModule",{value:!0});const ne=requireFastUri();return ne.code='require("ajv/dist/runtime/uri").default',uri.default=ne,uri}var hasRequiredCore$1;function requireCore$1(){return hasRequiredCore$1||(hasRequiredCore$1=1,(function(ne){Object.defineProperty(ne,"__esModule",{value:!0}),ne.CodeGen=ne.Name=ne.nil=ne.stringify=ne.str=ne._=ne.KeywordCxt=void 0;var ee=requireValidate();Object.defineProperty(ne,"KeywordCxt",{enumerable:!0,get:function(){return ee.KeywordCxt}});var te=requireCodegen();Object.defineProperty(ne,"_",{enumerable:!0,get:function(){return te._}}),Object.defineProperty(ne,"str",{enumerable:!0,get:function(){return te.str}}),Object.defineProperty(ne,"stringify",{enumerable:!0,get:function(){return te.stringify}}),Object.defineProperty(ne,"nil",{enumerable:!0,get:function(){return te.nil}}),Object.defineProperty(ne,"Name",{enumerable:!0,get:function(){return te.Name}}),Object.defineProperty(ne,"CodeGen",{enumerable:!0,get:function(){return te.CodeGen}});const st=requireValidation_error(),ot=requireRef_error(),ct=requireRules(),ut=requireCompile(),dt=requireCodegen(),ht=requireResolve(),ft=requireDataType(),pt=requireUtil(),mt=require$$9,yt=requireUri(),vt=(Xt,Zt)=>new RegExp(Xt,Zt);vt.code="new RegExp";const _t=["removeAdditional","useDefaults","coerceTypes"],bt=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),xt={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated 
1162ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},Mt={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},Ot=200;function kt(Xt){var Zt,Kt,ti,qt,ii,wn,ni,Cn,Ln,Un,Pn,Mn,Yt,ri,Sn,On,Rn,Bn,Vn,Wn,Gn,Hn,kn,er,Tn;const Dn=Xt.strict,$n=(Zt=Xt.code)===null||Zt===void 0?void 0:Zt.optimize,jn=$n===!0||$n===void 0?1:$n||0,zn=(ti=(Kt=Xt.code)===null||Kt===void 0?void 0:Kt.regExp)!==null&&ti!==void 0?ti:vt,Jn=(qt=Xt.uriResolver)!==null&&qt!==void 0?qt:yt.default;return{strictSchema:(wn=(ii=Xt.strictSchema)!==null&&ii!==void 0?ii:Dn)!==null&&wn!==void 0?wn:!0,strictNumbers:(Cn=(ni=Xt.strictNumbers)!==null&&ni!==void 0?ni:Dn)!==null&&Cn!==void 0?Cn:!0,strictTypes:(Un=(Ln=Xt.strictTypes)!==null&&Ln!==void 0?Ln:Dn)!==null&&Un!==void 0?Un:"log",strictTuples:(Mn=(Pn=Xt.strictTuples)!==null&&Pn!==void 0?Pn:Dn)!==null&&Mn!==void 0?Mn:"log",strictRequired:(ri=(Yt=Xt.strictRequired)!==null&&Yt!==void 0?Yt:Dn)!==null&&ri!==void 0?ri:!1,code:Xt.code?{...Xt.code,optimize:jn,regExp:zn}:{optimize:jn,regExp:zn},loopRequired:(Sn=Xt.loopRequired)!==null&&Sn!==void 0?Sn:Ot,loopEnum:(On=Xt.loopEnum)!==null&&On!==void 0?On:Ot,meta:(Rn=Xt.meta)!==null&&Rn!==void 0?Rn:!0,messages:(Bn=Xt.messages)!==null&&Bn!==void 0?Bn:!0,inlineRefs:(Vn=Xt.inlineRefs)!==null&&Vn!==void 0?Vn:!0,schemaId:(Wn=Xt.schemaId)!==null&&Wn!==void 0?Wn:"$id",addUsedSchema:(Gn=Xt.addUsedSchema)!==null&&Gn!==void 0?Gn:!0,validateSchema:(Hn=Xt.validateSchema)!==null&&Hn!==void 0?Hn:!0,validateFormats:(kn=Xt.validateFormats)!==null&&kn!==void 0?kn:!0,unicodeRegExp:(er=Xt.unicodeRegExp)!==null&&er!==void 0?er:!0,int32range:(Tn=Xt.int32range)!==null&&Tn!==void 0?Tn:!0,uriResolver:Jn}}class Nt{constructor(Zt={}){this.schemas={},this.refs={},this.formats=Object.create(null),this._compilations=new Set,this._loading={},this._cache=new Map,Zt=this.opts={...Zt,...kt(Zt)};const{es5:Kt,lines:ti}=this.opts.code;this.scope=new dt.ValueScope({scope:{},prefixes:bt,es5:Kt,lines:ti}),this.logger=Wt(Zt.logger);const qt=Zt.validateFormats;Zt.validateFormats=!1,this.RULES=(0,ct.getRules)(),Gt.call(this,xt,Zt,"NOT SUPPORTED"),Gt.call(this,Mt,Zt,"DEPRECATED","warn"),this._metaOpts=zt.call(this),Zt.formats&&Vt.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),Zt.keywords&&Ht.call(this,Zt.keywords),typeof Zt.meta=="object"&&this.addMetaSchema(Zt.meta),Ut.call(this),Zt.validateFormats=qt}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:Zt,meta:Kt,schemaId:ti}=this.opts;let qt=mt;ti==="id"&&(qt={...mt},qt.id=qt.$id,delete qt.$id),Kt&&Zt&&this.addMetaSchema(qt,qt[ti],!1)}defaultMeta(){const{meta:Zt,schemaId:Kt}=this.opts;return this.opts.defaultMeta=typeof Zt=="object"?Zt[Kt]||Zt:void 0}validate(Zt,Kt){let ti;if(typeof Zt=="string"){if(ti=this.getSchema(Zt),!ti)throw new Error(`no schema with key or ref "${Zt}"`)}else ti=this.compile(Zt);const qt=ti(Kt);return"$async"in ti||(this.errors=ti.errors),qt}compile(Zt,Kt){const ti=this._addSchema(Zt,Kt);return ti.validate||this._compileSchemaEnv(ti)}compileAsync(Zt,Kt){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");const{loadSchema:ti}=this.opts;return qt.call(this,Zt,Kt);async function qt(Un,Pn){await ii.call(this,Un.$schema);const Mn=this._addSchema(Un,Pn);return Mn.validate||wn.call(this,Mn)}async function ii(Un){Un&&!this.getSchema(Un)&&await qt.call(this,{$ref:Un},!0)}async function wn(Un){try{return this._compileSchemaEnv(Un)}catch(Pn){if(!(Pn instanceof ot.default))throw Pn;return ni.call(this,Pn),await Cn.call(this,Pn.missingSchema),wn.call(this,Un)}}function ni({missingSchema:Un,missingRef:Pn}){if(this.refs[Un])throw new Error(`AnySchema ${Un} is loaded but ${Pn} cannot be resolved`)}async function Cn(Un){const Pn=await Ln.call(this,Un);this.refs[Un]||await ii.call(this,Pn.$schema),this.refs[Un]||this.addSchema(Pn,Un,Kt)}async function Ln(Un){const Pn=this._loading[Un];if(Pn)return Pn;try{return await(this._loading[Un]=ti(Un))}finally{delete this._loading[Un]}}}addSchema(Zt,Kt,ti,qt=this.opts.validateSchema){if(Array.isArray(Zt)){for(const wn of Zt)this.addSchema(wn,void 0,ti,qt);return this}let ii;if(typeof Zt=="object"){const{schemaId:wn}=this.opts;if(ii=Zt[wn],ii!==void 0&&typeof ii!="string")throw new Error(`schema ${wn} must be string`)}return Kt=(0,ht.normalizeId)(Kt||ii),this._checkUnique(Kt),this.schemas[Kt]=this._addSchema(Zt,ti,Kt,qt,!0),this}addMetaSchema(Zt,Kt,ti=this.opts.validateSchema){return this.addSchema(Zt,Kt,!0,ti),this}validateSchema(Zt,Kt){if(typeof Zt=="boolean")return!0;let ti;if(ti=Zt.$schema,ti!==void 0&&typeof ti!="string")throw new Error("$schema must be a string");if(ti=ti||this.opts.defaultMeta||this.defaultMeta(),!ti)return this.logger.warn("meta-schema not available"),this.errors=null,!0;const qt=this.validate(ti,Zt);
1162if(!qt&&Kt){const ii="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(ii);else throw new Error(ii)}return qt}getSchema(Zt){let Kt;for(;typeof(Kt=Bt.call(this,Zt))=="string";)Zt=Kt;if(Kt===void 0){const{schemaId:ti}=this.opts,qt=new ut.SchemaEnv({schema:{},schemaId:ti});if(Kt=ut.resolveSchema.call(this,qt,Zt),!Kt)return;this.refs[Zt]=Kt}return Kt.validate||this._compileSchemaEnv(Kt)}removeSchema(Zt){if(Zt instanceof RegExp)return this._removeAllSchemas(this.schemas,Zt),this._removeAllSchemas(this.refs,Zt),this;switch(typeof Zt){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{const Kt=Bt.call(this,Zt);return typeof Kt=="object"&&this._cache.delete(Kt.schema),delete this.schemas[Zt],delete this.refs[Zt],this}case"object":{const Kt=Zt;this._cache.delete(Kt);let ti=Zt[this.opts.schemaId];return ti&&(ti=(0,ht.normalizeId)(ti),delete this.schemas[ti],delete this.refs[ti]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(Zt){for(const Kt of Zt)this.addKeyword(Kt);return this}addKeyword(Zt,Kt){let ti;if(typeof Zt=="string")ti=Zt,typeof Kt=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),Kt.keyword=ti);else if(typeof Zt=="object"&&Kt===void 0){if(Kt=Zt,ti=Kt.keyword,Array.isArray(ti)&&!ti.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(Qt.call(this,ti,Kt),!Kt)return(0,pt.eachItem)(ti,ii=>oi.call(this,ii)),this;xn.call(this,Kt);const qt={...Kt,type:(0,ft.getJSONTypes)(Kt.type),schemaType:(0,ft.getJSONTypes)(Kt.schemaType)};return(0,pt.eachItem)(ti,qt.type.length===0?ii=>oi.call(this,ii,qt):ii=>qt.type.forEach(wn=>oi.call(this,ii,qt,wn))),this}getKeyword(Zt){const Kt=this.RULES.all[Zt];return typeof Kt=="object"?Kt.definition:!!Kt}removeKeyword(Zt){const{RULES:Kt}=this;delete Kt.keywords[Zt],delete Kt.all[Zt];for(const ti of Kt.rules){const qt=ti.rules.findIndex(ii=>ii.keyword===Zt);qt>=0&&ti.rules.splice(qt,1)}return this}addFormat(Zt,Kt){return typeof Kt=="string"&&(Kt=new RegExp(Kt)),this.formats[Zt]=Kt,this}errorsText(Zt=this.errors,{separator:Kt=", ",dataVar:ti="data"}={}){return!Zt||Zt.length===0?"No errors":Zt.map(qt=>`${ti}${qt.instancePath} ${qt.message}`).reduce((qt,ii)=>qt+Kt+ii)}$dataMetaSchema(Zt,Kt){const ti=this.RULES.all;Zt=JSON.parse(JSON.stringify(Zt));for(const qt of Kt){const ii=qt.split("/").slice(1);let wn=Zt;for(const ni of ii)wn=wn[ni];for(const ni in ti){const Cn=ti[ni];if(typeof Cn!="object")continue;const{$data:Ln}=Cn.definition,Un=wn[ni];Ln&&Un&&(wn[ni]=Nn(Un))}}return Zt}_removeAllSchemas(Zt,Kt){for(const ti in Zt){const qt=Zt[ti];(!Kt||Kt.test(ti))&&(typeof qt=="string"?delete Zt[ti]:qt&&!qt.meta&&(this._cache.delete(qt.schema),delete Zt[ti]))}}_addSchema(Zt,Kt,ti,qt=this.opts.validateSchema,ii=this.opts.addUsedSchema){let wn;const{schemaId:ni}=this.opts;if(typeof Zt=="object")wn=Zt[ni];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof Zt!="boolean")throw new Error("schema must be object or boolean")}let Cn=this._cache.get(Zt);if(Cn!==void 0)return Cn;ti=(0,ht.normalizeId)(wn||ti);const Ln=ht.getSchemaRefs.call(this,Zt,ti);return Cn=new ut.SchemaEnv({schema:Zt,schemaId:ni,meta:Kt,baseId:ti,localRefs:Ln}),this._cache.set(Cn.schema,Cn),ii&&!ti.startsWith("#")&&(ti&&this._checkUnique(ti),this.refs[ti]=Cn),qt&&this.validateSchema(Zt,!0),Cn}_checkUnique(Zt){if(this.schemas[Zt]||this.refs[Zt])throw new Error(`schema with key or id "${Zt}" already exists`)}_compileSchemaEnv(Zt){if(Zt.meta?this._compileMetaSchema(Zt):ut.compileSchema.call(this,Zt),!Zt.validate)throw new Error("ajv implementation error");return Zt.validate}_compileMetaSchema(Zt){const Kt=this.opts;this.opts=this._metaOpts;try{ut.compileSchema.call(this,Zt)}finally{this.opts=Kt}}}Nt.ValidationError=st.default,Nt.MissingRefError=ot.default,ne.default=Nt;function Gt(Xt,Zt,Kt,ti="error"){for(const qt in Xt){const ii=qt;ii in Zt&&this.logger[ti](`${Kt}: option ${qt}. ${Xt[ii]}`)}}function Bt(Xt){return Xt=(0,ht.normalizeId)(Xt),this.schemas[Xt]||this.refs[Xt]}function Ut(){const Xt=this.opts.schemas;if(Xt)if(Array.isArray(Xt))this.addSchema(Xt);else for(const Zt in Xt)this.addSchema(Xt[Zt],Zt)}function Vt(){for(const Xt in this.opts.formats){const Zt=this.opts.formats[Xt];Zt&&this.addFormat(Xt,Zt)}}function Ht(Xt){if(Array.isArray(Xt)){this.addVocabulary(Xt);return}this.logger.warn("keywords option as map is deprecated, pass array");for(const Zt in Xt){const Kt=Xt[Zt];Kt.keyword||(Kt.keyword=Zt),this.addKeyword(Kt)}}function zt(){const Xt={...this.opts};for(const Zt of _t)delete Xt[Zt];return Xt}const jt={log(){},warn(){},error(){}};function Wt(Xt){if(Xt===!1)return jt;if(Xt===void 0)return console;if(Xt.log&&Xt.warn&&Xt.error)return Xt;throw new Error("logger must implement log, warn and error methods")}const Jt=/^[a-z_$][a-z0-9_$:-]*$/i;function Qt(Xt,Zt){const{RULES:Kt}=this;if((0,pt.eachItem)(Xt,ti=>{if(Kt.keywords[ti])throw new Error(`Keyword ${ti} is already defined`);if(!Jt.test(ti))throw new Error(`Keyword ${ti}
1162 has invalid name`)}),!!Zt&&Zt.$data&&!("code"in Zt||"validate"in Zt))throw new Error('$data keyword must have "code" or "validate" function')}function oi(Xt,Zt,Kt){var ti;const qt=Zt==null?void 0:Zt.post;if(Kt&&qt)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:ii}=this;let wn=qt?ii.post:ii.rules.find(({type:Cn})=>Cn===Kt);if(wn||(wn={type:Kt,rules:[]},ii.rules.push(wn)),ii.keywords[Xt]=!0,!Zt)return;const ni={keyword:Xt,definition:{...Zt,type:(0,ft.getJSONTypes)(Zt.type),schemaType:(0,ft.getJSONTypes)(Zt.schemaType)}};Zt.before?ai.call(this,wn,ni,Zt.before):wn.rules.push(ni),ii.all[Xt]=ni,(ti=Zt.implements)===null||ti===void 0||ti.forEach(Cn=>this.addKeyword(Cn))}function ai(Xt,Zt,Kt){const ti=Xt.rules.findIndex(qt=>qt.keyword===Kt);ti>=0?Xt.rules.splice(ti,0,Zt):(Xt.rules.push(Zt),this.logger.warn(`rule ${Kt} is not defined`))}function xn(Xt){let{metaSchema:Zt}=Xt;Zt!==void 0&&(Xt.$data&&this.opts.$data&&(Zt=Nn(Zt)),Xt.validateSchema=this.compile(Zt,!0))}const An={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function Nn(Xt){return{anyOf:[Xt,An]}}})(core$1)),core$1}var draft7={},core={},id={},hasRequiredId;function requireId(){if(hasRequiredId)return id;hasRequiredId=1,Object.defineProperty(id,"__esModule",{value:!0});const ne={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};return id.default=ne,id}var ref={},hasRequiredRef;function requireRef(){if(hasRequiredRef)return ref;hasRequiredRef=1,Object.defineProperty(ref,"__esModule",{value:!0}),ref.callRef=ref.getValidate=void 0;const ne=requireRef_error(),ee=requireCode(),te=requireCodegen(),st=requireNames(),ot=requireCompile(),ct=requireUtil(),ut={keyword:"$ref",schemaType:"string",code(ft){const{gen:pt,schema:mt,it:yt}=ft,{baseId:vt,schemaEnv:_t,validateName:bt,opts:xt,self:Mt}=yt,{root:Ot}=_t;if((mt==="#"||mt==="#/")&&vt===Ot.baseId)return Nt();const kt=ot.resolveRef.call(Mt,Ot,vt,mt);if(kt===void 0)throw new ne.default(yt.opts.uriResolver,vt,mt);if(kt instanceof ot.SchemaEnv)return Gt(kt);return Bt(kt);function Nt(){if(_t===Ot)return ht(ft,bt,_t,_t.$async);const Ut=pt.scopeValue("root",{ref:Ot});return ht(ft,(0,te._)`${Ut}.validate`,Ot,Ot.$async)}function Gt(Ut){const Vt=dt(ft,Ut);ht(ft,Vt,Ut,Ut.$async)}function Bt(Ut){const Vt=pt.scopeValue("schema",xt.code.source===!0?{ref:Ut,code:(0,te.stringify)(Ut)}:{ref:Ut}),Ht=pt.name("valid"),zt=ft.subschema({schema:Ut,dataTypes:[],schemaPath:te.nil,topSchemaRef:Vt,errSchemaPath:mt},Ht);ft.mergeEvaluated(zt),ft.ok(Ht)}}};function dt(ft,pt){const{gen:mt}=ft;return pt.validate?mt.scopeValue("validate",{ref:pt.validate}):(0,te._)`${mt.scopeValue("wrapper",{ref:pt})}.validate`}ref.getValidate=dt;function ht(ft,pt,mt,yt){const{gen:vt,it:_t}=ft,{allErrors:bt,schemaEnv:xt,opts:Mt}=_t,Ot=Mt.passContext?st.default.this:te.nil;yt?kt():Nt();function kt(){if(!xt.$async)throw new Error("async schema referenced by sync schema");const Ut=vt.let("valid");vt.try(()=>{vt.code((0,te._)`await ${(0,ee.callValidateCode)(ft,pt,Ot)}`),Bt(pt),bt||vt.assign(Ut,!0)},Vt=>{vt.if((0,te._)`!(${Vt} instanceof ${_t.ValidationError})`,()=>vt.throw(Vt)),Gt(Vt),bt||vt.assign(Ut,!1)}),ft.ok(Ut)}function Nt(){ft.result((0,ee.callValidateCode)(ft,pt,Ot),()=>Bt(pt),()=>Gt(pt))}function Gt(Ut){const Vt=(0,te._)`${Ut}.errors`;vt.assign(st.default.vErrors,(0,te._)`${st.default.vErrors} === null ? ${Vt} : ${st.default.vErrors}.concat(${Vt})`),vt.assign(st.default.errors,(0,te._)`${st.default.vErrors}.length`)}function Bt(Ut){var Vt;if(!_t.opts.unevaluated)return;const Ht=(Vt=mt==null?void 0:mt.validate)===null||Vt===void 0?void 0:Vt.evaluated;if(_t.props!==!0)if(Ht&&!Ht.dynamicProps)Ht.props!==void 0&&(_t.props=ct.mergeEvaluated.props(vt,Ht.props,_t.props));else{const zt=vt.var("props",(0,te._)`${Ut}.evaluated.props`);_t.props=ct.mergeEvaluated.props(vt,zt,_t.props,te.Name)}if(_t.items!==!0)if(Ht&&!Ht.dynamicItems)Ht.items!==void 0&&(_t.items=ct.mergeEvaluated.items(vt,Ht.items,_t.items));else{const zt=vt.var("items",(0,te._)`${Ut}.evaluated.items`);_t.items=ct.mergeEvaluated.items(vt,zt,_t.items,te.Name)}}}return ref.callRef=ht,ref.default=ut,ref}var hasRequiredCore;function requireCore(){if(hasRequiredCore)return core;
1162hasRequiredCore=1,Object.defineProperty(core,"__esModule",{value:!0});const ne=requireId(),ee=requireRef(),te=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",ne.default,ee.default];return core.default=te,core}var validation={},limitNumber={},hasRequiredLimitNumber;function requireLimitNumber(){if(hasRequiredLimitNumber)return limitNumber;hasRequiredLimitNumber=1,Object.defineProperty(limitNumber,"__esModule",{value:!0});const ne=requireCodegen(),ee=ne.operators,te={maximum:{okStr:"<=",ok:ee.LTE,fail:ee.GT},minimum:{okStr:">=",ok:ee.GTE,fail:ee.LT},exclusiveMaximum:{okStr:"<",ok:ee.LT,fail:ee.GTE},exclusiveMinimum:{okStr:">",ok:ee.GT,fail:ee.LTE}},st={message:({keyword:ct,schemaCode:ut})=>(0,ne.str)`must be ${te[ct].okStr} ${ut}`,params:({keyword:ct,schemaCode:ut})=>(0,ne._)`{comparison: ${te[ct].okStr}, limit: ${ut}}`},ot={keyword:Object.keys(te),type:"number",schemaType:"number",$data:!0,error:st,code(ct){const{keyword:ut,data:dt,schemaCode:ht}=ct;ct.fail$data((0,ne._)`${dt} ${te[ut].fail} ${ht} || isNaN(${dt})`)}};return limitNumber.default=ot,limitNumber}var multipleOf={},hasRequiredMultipleOf;function requireMultipleOf(){if(hasRequiredMultipleOf)return multipleOf;hasRequiredMultipleOf=1,Object.defineProperty(multipleOf,"__esModule",{value:!0});const ne=requireCodegen(),te={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:{message:({schemaCode:st})=>(0,ne.str)`must be multiple of ${st}`,params:({schemaCode:st})=>(0,ne._)`{multipleOf: ${st}}`},code(st){const{gen:ot,data:ct,schemaCode:ut,it:dt}=st,ht=dt.opts.multipleOfPrecision,ft=ot.let("res"),pt=ht?(0,ne._)`Math.abs(Math.round(${ft}) - ${ft}) > 1e-${ht}`:(0,ne._)`${ft} !== parseInt(${ft})`;st.fail$data((0,ne._)`(${ut} === 0 || (${ft} = ${ct}/${ut}, ${pt}))`)}};return multipleOf.default=te,multipleOf}var limitLength={},ucs2length={},hasRequiredUcs2length;function requireUcs2length(){if(hasRequiredUcs2length)return ucs2length;hasRequiredUcs2length=1,Object.defineProperty(ucs2length,"__esModule",{value:!0});function ne(ee){const te=ee.length;let st=0,ot=0,ct;for(;ot<te;)st++,ct=ee.charCodeAt(ot++),ct>=55296&&ct<=56319&&ot<te&&(ct=ee.charCodeAt(ot),(ct&64512)===56320&&ot++);return st}return ucs2length.default=ne,ne.code='require("ajv/dist/runtime/ucs2length").default',ucs2length}var hasRequiredLimitLength;function requireLimitLength(){if(hasRequiredLimitLength)return limitLength;hasRequiredLimitLength=1,Object.defineProperty(limitLength,"__esModule",{value:!0});const ne=requireCodegen(),ee=requireUtil(),te=requireUcs2length(),ot={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:{message({keyword:ct,schemaCode:ut}){const dt=ct==="maxLength"?"more":"fewer";return(0,ne.str)`must NOT have ${dt} than ${ut} characters`},params:({schemaCode:ct})=>(0,ne._)`{limit: ${ct}}`},code(ct){const{keyword:ut,data:dt,schemaCode:ht,it:ft}=ct,pt=ut==="maxLength"?ne.operators.GT:ne.operators.LT,mt=ft.opts.unicode===!1?(0,ne._)`${dt}.length`:(0,ne._)`${(0,ee.useFunc)(ct.gen,te.default)}(${dt})`;ct.fail$data((0,ne._)`${mt} ${pt} ${ht}`)}};return limitLength.default=ot,limitLength}var pattern={},hasRequiredPattern;function requirePattern(){if(hasRequiredPattern)return pattern;hasRequiredPattern=1,Object.defineProperty(pattern,"__esModule",{value:!0});const ne=requireCode(),ee=requireUtil(),te=requireCodegen(),ot={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:{message:({schemaCode:ct})=>(0,te.str)`must match pattern "${ct}"`,params:({schemaCode:ct})=>(0,te._)`{pattern: ${ct}}`},code(ct){const{gen:ut,data:dt,$data:ht,schema:ft,schemaCode:pt,it:mt}=ct,yt=mt.opts.unicodeRegExp?"u":"";if(ht){const{regExp:vt}
1162=mt.opts.code,_t=vt.code==="new RegExp"?(0,te._)`new RegExp`:(0,ee.useFunc)(ut,vt),bt=ut.let("valid");ut.try(()=>ut.assign(bt,(0,te._)`${_t}(${pt}, ${yt}).test(${dt})`),()=>ut.assign(bt,!1)),ct.fail$data((0,te._)`!${bt}`)}else{const vt=(0,ne.usePattern)(ct,ft);ct.fail$data((0,te._)`!${vt}.test(${dt})`)}}};return pattern.default=ot,pattern}var limitProperties={},hasRequiredLimitProperties;function requireLimitProperties(){if(hasRequiredLimitProperties)return limitProperties;hasRequiredLimitProperties=1,Object.defineProperty(limitProperties,"__esModule",{value:!0});const ne=requireCodegen(),te={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:{message({keyword:st,schemaCode:ot}){const ct=st==="maxProperties"?"more":"fewer";return(0,ne.str)`must NOT have ${ct} than ${ot} properties`},params:({schemaCode:st})=>(0,ne._)`{limit: ${st}}`},code(st){const{keyword:ot,data:ct,schemaCode:ut}=st,dt=ot==="maxProperties"?ne.operators.GT:ne.operators.LT;st.fail$data((0,ne._)`Object.keys(${ct}).length ${dt} ${ut}`)}};return limitProperties.default=te,limitProperties}var required$4={},hasRequiredRequired;function requireRequired(){if(hasRequiredRequired)return required$4;hasRequiredRequired=1,Object.defineProperty(required$4,"__esModule",{value:!0});const ne=requireCode(),ee=requireCodegen(),te=requireUtil(),ot={keyword:"required",type:"object",schemaType:"array",$data:!0,error:{message:({params:{missingProperty:ct}})=>(0,ee.str)`must have required property '${ct}'`,params:({params:{missingProperty:ct}})=>(0,ee._)`{missingProperty: ${ct}}`},code(ct){const{gen:ut,schema:dt,schemaCode:ht,data:ft,$data:pt,it:mt}=ct,{opts:yt}=mt;if(!pt&&dt.length===0)return;const vt=dt.length>=yt.loopRequired;if(mt.allErrors?_t():bt(),yt.strictRequired){const Ot=ct.parentSchema.properties,{definedProperties:kt}=ct.it;for(const Nt of dt)if((Ot==null?void 0:Ot[Nt])===void 0&&!kt.has(Nt)){const Gt=mt.schemaEnv.baseId+mt.errSchemaPath,Bt=`required property "${Nt}" is not defined at "${Gt}" (strictRequired)`;(0,te.checkStrictMode)(mt,Bt,mt.opts.strictRequired)}}function _t(){if(vt||pt)ct.block$data(ee.nil,xt);else for(const Ot of dt)(0,ne.checkReportMissingProp)(ct,Ot)}function bt(){const Ot=ut.let("missing");if(vt||pt){const kt=ut.let("valid",!0);ct.block$data(kt,()=>Mt(Ot,kt)),ct.ok(kt)}else ut.if((0,ne.checkMissingProp)(ct,dt,Ot)),(0,ne.reportMissingProp)(ct,Ot),ut.else()}function xt(){ut.forOf("prop",ht,Ot=>{ct.setParams({missingProperty:Ot}),ut.if((0,ne.noPropertyInData)(ut,ft,Ot,yt.ownProperties),()=>ct.error())})}function Mt(Ot,kt){ct.setParams({missingProperty:Ot}),ut.forOf(Ot,ht,()=>{ut.assign(kt,(0,ne.propertyInData)(ut,ft,Ot,yt.ownProperties)),ut.if((0,ee.not)(kt),()=>{ct.error(),ut.break()})},ee.nil)}}};return required$4.default=ot,required$4}var limitItems={},hasRequiredLimitItems;function requireLimitItems(){if(hasRequiredLimitItems)return limitItems;hasRequiredLimitItems=1,Object.defineProperty(limitItems,"__esModule",{value:!0});const ne=requireCodegen(),te={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:{message({keyword:st,schemaCode:ot}){const ct=st==="maxItems"?"more":"fewer";return(0,ne.str)`must NOT have ${ct} than ${ot} items`},params:({schemaCode:st})=>(0,ne._)`{limit: ${st}}`},code(st){const{keyword:ot,data:ct,schemaCode:ut}=st,dt=ot==="maxItems"?ne.operators.GT:ne.operators.LT;st.fail$data((0,ne._)`${ct}.length ${dt} ${ut}`)}};return limitItems.default=te,limitItems}var uniqueItems={},equal={},hasRequiredEqual;function requireEqual(){if(hasRequiredEqual)return equal;hasRequiredEqual=1,Object.defineProperty(equal,"__esModule",{value:!0});const ne=requireFastDeepEqual();return ne.code='require("ajv/dist/runtime/equal").default',equal.default=ne,equal}var hasRequiredUniqueItems;function requireUniqueItems(){if(hasRequiredUniqueItems)return uniqueItems;hasRequiredUniqueItems=1,Object.defineProperty(uniqueItems,"__esModule",{value:!0});const ne=requireDataType(),ee=requireCodegen(),te=requireUtil(),st=requireEqual(),ct={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:{message:({params:{i:ut,j:dt}})=>(0,ee.str)`must NOT have duplicate items (items ## ${dt} and ${ut} are identical)`,params:({params:{i:ut,j:dt}})=>(0,ee._)`{i: ${ut}, j: ${dt}}`}
1162,code(ut){const{gen:dt,data:ht,$data:ft,schema:pt,parentSchema:mt,schemaCode:yt,it:vt}=ut;if(!ft&&!pt)return;const _t=dt.let("valid"),bt=mt.items?(0,ne.getSchemaTypes)(mt.items):[];ut.block$data(_t,xt,(0,ee._)`${yt} === false`),ut.ok(_t);function xt(){const Nt=dt.let("i",(0,ee._)`${ht}.length`),Gt=dt.let("j");ut.setParams({i:Nt,j:Gt}),dt.assign(_t,!0),dt.if((0,ee._)`${Nt} > 1`,()=>(Mt()?Ot:kt)(Nt,Gt))}function Mt(){return bt.length>0&&!bt.some(Nt=>Nt==="object"||Nt==="array")}function Ot(Nt,Gt){const Bt=dt.name("item"),Ut=(0,ne.checkDataTypes)(bt,Bt,vt.opts.strictNumbers,ne.DataType.Wrong),Vt=dt.const("indices",(0,ee._)`{}`);dt.for((0,ee._)`;${Nt}--;`,()=>{dt.let(Bt,(0,ee._)`${ht}[${Nt}]`),dt.if(Ut,(0,ee._)`continue`),bt.length>1&&dt.if((0,ee._)`typeof ${Bt} == "string"`,(0,ee._)`${Bt} += "_"`),dt.if((0,ee._)`typeof ${Vt}[${Bt}] == "number"`,()=>{dt.assign(Gt,(0,ee._)`${Vt}[${Bt}]`),ut.error(),dt.assign(_t,!1).break()}).code((0,ee._)`${Vt}[${Bt}] = ${Nt}`)})}function kt(Nt,Gt){const Bt=(0,te.useFunc)(dt,st.default),Ut=dt.name("outer");dt.label(Ut).for((0,ee._)`;${Nt}--;`,()=>dt.for((0,ee._)`${Gt} = ${Nt}; ${Gt}--;`,()=>dt.if((0,ee._)`${Bt}(${ht}[${Nt}], ${ht}[${Gt}])`,()=>{ut.error(),dt.assign(_t,!1).break(Ut)})))}}};return uniqueItems.default=ct,uniqueItems}var _const={},hasRequired_const;function require_const(){if(hasRequired_const)return _const;hasRequired_const=1,Object.defineProperty(_const,"__esModule",{value:!0});const ne=requireCodegen(),ee=requireUtil(),te=requireEqual(),ot={keyword:"const",$data:!0,error:{message:"must be equal to constant",params:({schemaCode:ct})=>(0,ne._)`{allowedValue: ${ct}}`},code(ct){const{gen:ut,data:dt,$data:ht,schemaCode:ft,schema:pt}=ct;ht||pt&&typeof pt=="object"?ct.fail$data((0,ne._)`!${(0,ee.useFunc)(ut,te.default)}(${dt}, ${ft})`):ct.fail((0,ne._)`${pt} !== ${dt}`)}};return _const.default=ot,_const}var _enum={},hasRequired_enum;function require_enum(){if(hasRequired_enum)return _enum;
1162hasRequired_enum=1,Object.defineProperty(_enum,"__esModule",{value:!0});const ne=requireCodegen(),ee=requireUtil(),te=requireEqual(),ot={keyword:"enum",schemaType:"array",$data:!0,error:{message:"must be equal to one of the allowed values",params:({schemaCode:ct})=>(0,ne._)`{allowedValues: ${ct}}`},code(ct){const{gen:ut,data:dt,$data:ht,schema:ft,schemaCode:pt,it:mt}=ct;if(!ht&&ft.length===0)throw new Error("enum must have non-empty array");const yt=ft.length>=mt.opts.loopEnum;let vt;const _t=()=>vt??(vt=(0,ee.useFunc)(ut,te.default));let bt;if(yt||ht)bt=ut.let("valid"),ct.block$data(bt,xt);else{if(!Array.isArray(ft))throw new Error("ajv implementation error");const Ot=ut.const("vSchema",pt);bt=(0,ne.or)(...ft.map((kt,Nt)=>Mt(Ot,Nt)))}ct.pass(bt);function xt(){ut.assign(bt,!1),ut.forOf("v",pt,Ot=>ut.if((0,ne._)`${_t()}(${dt}, ${Ot})`,()=>ut.assign(bt,!0).break()))}function Mt(Ot,kt){const Nt=ft[kt];return typeof Nt=="object"&&Nt!==null?(0,ne._)`${_t()}(${dt}, ${Ot}[${kt}])`:(0,ne._)`${dt} === ${Nt}`}}};return _enum.default=ot,_enum}var hasRequiredValidation;function requireValidation(){if(hasRequiredValidation)return validation;hasRequiredValidation=1,Object.defineProperty(validation,"__esModule",{value:!0});const ne=requireLimitNumber(),ee=requireMultipleOf(),te=requireLimitLength(),st=requirePattern(),ot=requireLimitProperties(),ct=requireRequired(),ut=requireLimitItems(),dt=requireUniqueItems(),ht=require_const(),ft=require_enum(),pt=[ne.default,ee.default,te.default,st.default,ot.default,ct.default,ut.default,dt.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},ht.default,ft.default];return validation.default=pt,validation}var applicator={},additionalItems={},hasRequiredAdditionalItems;function requireAdditionalItems(){if(hasRequiredAdditionalItems)return additionalItems;hasRequiredAdditionalItems=1,Object.defineProperty(additionalItems,"__esModule",{value:!0}),additionalItems.validateAdditionalItems=void 0;const ne=requireCodegen(),ee=requireUtil(),st={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:{message:({params:{len:ct}})=>(0,ne.str)`must NOT have more than ${ct} items`,params:({params:{len:ct}})=>(0,ne._)`{limit: ${ct}}`},code(ct){const{parentSchema:ut,it:dt}=ct,{items:ht}=ut;if(!Array.isArray(ht)){(0,ee.checkStrictMode)(dt,'"additionalItems" is ignored when "items" is not an array of schemas');return}ot(ct,ht)}};function ot(ct,ut){const{gen:dt,schema:ht,data:ft,keyword:pt,it:mt}=ct;mt.items=!0;const yt=dt.const("len",(0,ne._)`${ft}.length`);if(ht===!1)ct.setParams({len:ut.length}),ct.pass((0,ne._)`${yt} <= ${ut.length}`);else if(typeof ht=="object"&&!(0,ee.alwaysValidSchema)(mt,ht)){const _t=dt.var("valid",(0,ne._)`${yt} <= ${ut.length}`);dt.if((0,ne.not)(_t),()=>vt(_t)),ct.ok(_t)}function vt(_t){dt.forRange("i",ut.length,yt,bt=>{ct.subschema({keyword:pt,dataProp:bt,dataPropType:ee.Type.Num},_t),mt.allErrors||dt.if((0,ne.not)(_t),()=>dt.break())})}}return additionalItems.validateAdditionalItems=ot,additionalItems.default=st,additionalItems}var prefixItems={},items$1={},hasRequiredItems;function requireItems(){if(hasRequiredItems)return items$1;hasRequiredItems=1,Object.defineProperty(items$1,"__esModule",{value:!0}),items$1.validateTuple=void 0;const ne=requireCodegen(),ee=requireUtil(),te=requireCode(),st={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(ct){const{schema:ut,it:dt}=ct;if(Array.isArray(ut))return ot(ct,"additionalItems",ut);dt.items=!0,!(0,ee.alwaysValidSchema)(dt,ut)&&ct.ok((0,te.validateArray)(ct))}};function ot(ct,ut,dt=ct.schema){const{gen:ht,parentSchema:ft,data:pt,keyword:mt,it:yt}=ct;bt(ft),yt.opts.unevaluated&&dt.length&&yt.items!==!0&&(yt.items=ee.mergeEvaluated.items(ht,dt.length,yt.items));const vt=ht.name("valid"),_t=ht.const("len",(0,ne._)`${pt}.length`);dt.forEach((xt,Mt)=>{(0,ee.alwaysValidSchema)(yt,xt)||(ht.if((0,ne._)`${_t} > ${Mt}`,()=>ct.subschema({keyword:mt,schemaProp:Mt,dataProp:Mt},vt)),ct.ok(vt))});function bt(xt){const{opts:Mt,errSchemaPath:Ot}=yt,kt=dt.length,Nt=kt===xt.minItems&&(kt===xt.maxItems||xt[ut]===!1);if(Mt.strictTuples&&!Nt){const Gt=`"${mt}" is ${kt}-tuple, but minItems or maxItems/${ut} are not specified or different at path "${Ot}"`;(0,ee.checkStrictMode)(yt,Gt,Mt.strictTuples)}}}return items$1.validateTuple=ot,items$1.default=st,items$1}var hasRequiredPrefixItems;function requirePrefixItems(){if(hasRequiredPrefixItems)return prefixItems;hasRequiredPrefixItems=1,Object.defineProperty(prefixItems,"__esModule",{value:!0});const ne=requireItems(),ee={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:te=>(0,ne.validateTuple)(te,"items")};return prefixItems.default=ee,prefixItems}var items2020={},hasRequiredItems2020;
1162function requireItems2020(){if(hasRequiredItems2020)return items2020;hasRequiredItems2020=1,Object.defineProperty(items2020,"__esModule",{value:!0});const ne=requireCodegen(),ee=requireUtil(),te=requireCode(),st=requireAdditionalItems(),ct={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:{message:({params:{len:ut}})=>(0,ne.str)`must NOT have more than ${ut} items`,params:({params:{len:ut}})=>(0,ne._)`{limit: ${ut}}`},code(ut){const{schema:dt,parentSchema:ht,it:ft}=ut,{prefixItems:pt}=ht;ft.items=!0,!(0,ee.alwaysValidSchema)(ft,dt)&&(pt?(0,st.validateAdditionalItems)(ut,pt):ut.ok((0,te.validateArray)(ut)))}};return items2020.default=ct,items2020}var contains={},hasRequiredContains;function requireContains(){if(hasRequiredContains)return contains;hasRequiredContains=1,Object.defineProperty(contains,"__esModule",{value:!0});const ne=requireCodegen(),ee=requireUtil(),st={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:{message:({params:{min:ot,max:ct}})=>ct===void 0?(0,ne.str)`must contain at least ${ot} valid item(s)`:(0,ne.str)`must contain at least ${ot} and no more than ${ct} valid item(s)`,params:({params:{min:ot,max:ct}})=>ct===void 0?(0,ne._)`{minContains: ${ot}}`:(0,ne._)`{minContains: ${ot}, maxContains: ${ct}}`},code(ot){const{gen:ct,schema:ut,parentSchema:dt,data:ht,it:ft}=ot;let pt,mt;const{minContains:yt,maxContains:vt}=dt;ft.opts.next?(pt=yt===void 0?1:yt,mt=vt):pt=1;const _t=ct.const("len",(0,ne._)`${ht}.length`);if(ot.setParams({min:pt,max:mt}),mt===void 0&&pt===0){(0,ee.checkStrictMode)(ft,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(mt!==void 0&&pt>mt){(0,ee.checkStrictMode)(ft,'"minContains" > "maxContains" is always invalid'),ot.fail();return}if((0,ee.alwaysValidSchema)(ft,ut)){let kt=(0,ne._)`${_t} >= ${pt}`;mt!==void 0&&(kt=(0,ne._)`${kt} && ${_t} <= ${mt}`),ot.pass(kt);return}ft.items=!0;const bt=ct.name("valid");mt===void 0&&pt===1?Mt(bt,()=>ct.if(bt,()=>ct.break())):pt===0?(ct.let(bt,!0),mt!==void 0&&ct.if((0,ne._)`${ht}.length > 0`,xt)):(ct.let(bt,!1),xt()),ot.result(bt,()=>ot.reset());function xt(){const kt=ct.name("_valid"),Nt=ct.let("count",0);Mt(kt,()=>ct.if(kt,()=>Ot(Nt)))}function Mt(kt,Nt){ct.forRange("i",0,_t,Gt=>{ot.subschema({keyword:"contains",dataProp:Gt,dataPropType:ee.Type.Num,compositeRule:!0},kt),Nt()})}function Ot(kt){ct.code((0,ne._)`${kt}++`),mt===void 0?ct.if((0,ne._)`${kt} >= ${pt}`,()=>ct.assign(bt,!0).break()):(ct.if((0,ne._)`${kt} > ${mt}`,()=>ct.assign(bt,!1).break()),pt===1?ct.assign(bt,!0):ct.if((0,ne._)`${kt} >= ${pt}`,()=>ct.assign(bt,!0)))}}};return contains.default=st,contains}var dependencies={},hasRequiredDependencies;function requireDependencies(){return hasRequiredDependencies||(hasRequiredDependencies=1,(function(ne){Object.defineProperty(ne,"__esModule",{value:!0}),ne.validateSchemaDeps=ne.validatePropertyDeps=ne.error=void 0;const ee=requireCodegen(),te=requireUtil(),st=requireCode();ne.error={message:({params:{property:ht,depsCount:ft,deps:pt}})=>{const mt=ft===1?"property":"properties";return(0,ee.str)`must have ${mt} ${pt} when property ${ht} is present`},params:({params:{property:ht,depsCount:ft,deps:pt,missingProperty:mt}})=>(0,ee._)`{property: ${ht},
1163    missingProperty: ${mt},
1164    depsCount: ${ft},
1165    deps: ${pt}}`};const ot={keyword:"dependencies",type:"object",schemaType:"object",error:ne.error,code(ht){const[ft,pt]=ct(ht);ut(ht,ft),dt(ht,pt)}};function ct({schema:ht}){const ft={},pt={};for(const mt in ht){if(mt==="__proto__")continue;const yt=Array.isArray(ht[mt])?ft:pt;yt[mt]=ht[mt]}return[ft,pt]}function ut(ht,ft=ht.schema){const{gen:pt,data:mt,it:yt}=ht;if(Object.keys(ft).length===0)return;const vt=pt.let("missing");for(const _t in ft){const bt=ft[_t];if(bt.length===0)continue;const xt=(0,st.propertyInData)(pt,mt,_t,yt.opts.ownProperties);ht.setParams({property:_t,depsCount:bt.length,deps:bt.join(", ")}),yt.allErrors?pt.if(xt,()=>{for(const Mt of bt)(0,st.checkReportMissingProp)(ht,Mt)}):(pt.if((0,ee._)`${xt} && (${(0,st.checkMissingProp)(ht,bt,vt)})`),(0,st.reportMissingProp)(ht,vt),pt.else())}}ne.validatePropertyDeps=ut;function dt(ht,ft=ht.schema){const{gen:pt,data:mt,keyword:yt,it:vt}=ht,_t=pt.name("valid");for(const bt in ft)(0,te.alwaysValidSchema)(vt,ft[bt])||(pt.if((0,st.propertyInData)(pt,mt,bt,vt.opts.ownProperties),()=>{const xt=ht.subschema({keyword:yt,schemaProp:bt},_t);ht.mergeValidEvaluated(xt,_t)},()=>pt.var(_t,!0)),ht.ok(_t))}ne.validateSchemaDeps=dt,ne.default=ot})(dependencies)),dependencies}var propertyNames={},hasRequiredPropertyNames;function requirePropertyNames(){if(hasRequiredPropertyNames)return propertyNames;hasRequiredPropertyNames=1,Object.defineProperty(propertyNames,"__esModule",{value:!0});const ne=requireCodegen(),ee=requireUtil(),st={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:{message:"property name must be valid",params:({params:ot})=>(0,ne._)`{propertyName: ${ot.propertyName}}`}
1165,code(ot){const{gen:ct,schema:ut,data:dt,it:ht}=ot;if((0,ee.alwaysValidSchema)(ht,ut))return;const ft=ct.name("valid");ct.forIn("key",dt,pt=>{ot.setParams({propertyName:pt}),ot.subschema({keyword:"propertyNames",data:pt,dataTypes:["string"],propertyName:pt,compositeRule:!0},ft),ct.if((0,ne.not)(ft),()=>{ot.error(!0),ht.allErrors||ct.break()})}),ot.ok(ft)}};return propertyNames.default=st,propertyNames}var additionalProperties$3={},hasRequiredAdditionalProperties;function requireAdditionalProperties(){if(hasRequiredAdditionalProperties)return additionalProperties$3;hasRequiredAdditionalProperties=1,Object.defineProperty(additionalProperties$3,"__esModule",{value:!0});const ne=requireCode(),ee=requireCodegen(),te=requireNames(),st=requireUtil(),ct={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:{message:"must NOT have additional properties",params:({params:ut})=>(0,ee._)`{additionalProperty: ${ut.additionalProperty}}`},code(ut){const{gen:dt,schema:ht,parentSchema:ft,data:pt,errsCount:mt,it:yt}=ut;if(!mt)throw new Error("ajv implementation error");const{allErrors:vt,opts:_t}=yt;if(yt.props=!0,_t.removeAdditional!=="all"&&(0,st.alwaysValidSchema)(yt,ht))return;const bt=(0,ne.allSchemaProperties)(ft.properties),xt=(0,ne.allSchemaProperties)(ft.patternProperties);Mt(),ut.ok((0,ee._)`${mt} === ${te.default.errors}`);function Mt(){dt.forIn("key",pt,Bt=>{!bt.length&&!xt.length?Nt(Bt):dt.if(Ot(Bt),()=>Nt(Bt))})}function Ot(Bt){let Ut;if(bt.length>8){const Vt=(0,st.schemaRefOrVal)(yt,ft.properties,"properties");Ut=(0,ne.isOwnProperty)(dt,Vt,Bt)}else bt.length?Ut=(0,ee.or)(...bt.map(Vt=>(0,ee._)`${Bt} === ${Vt}`)):Ut=ee.nil;return xt.length&&(Ut=(0,ee.or)(Ut,...xt.map(Vt=>(0,ee._)`${(0,ne.usePattern)(ut,Vt)}.test(${Bt})`))),(0,ee.not)(Ut)}function kt(Bt){dt.code((0,ee._)`delete ${pt}[${Bt}]`)}function Nt(Bt){if(_t.removeAdditional==="all"||_t.removeAdditional&&ht===!1){kt(Bt);return}if(ht===!1){ut.setParams({additionalProperty:Bt}),ut.error(),vt||dt.break();return}if(typeof ht=="object"&&!(0,st.alwaysValidSchema)(yt,ht)){const Ut=dt.name("valid");_t.removeAdditional==="failing"?(Gt(Bt,Ut,!1),dt.if((0,ee.not)(Ut),()=>{ut.reset(),kt(Bt)})):(Gt(Bt,Ut),vt||dt.if((0,ee.not)(Ut),()=>dt.break()))}}function Gt(Bt,Ut,Vt){const Ht={keyword:"additionalProperties",dataProp:Bt,dataPropType:st.Type.Str};Vt===!1&&Object.assign(Ht,{compositeRule:!0,createErrors:!1,allErrors:!1}),ut.subschema(Ht,Ut)}}};return additionalProperties$3.default=ct,additionalProperties$3}var properties$5={},hasRequiredProperties;function requireProperties(){if(hasRequiredProperties)return properties$5;hasRequiredProperties=1,Object.defineProperty(properties$5,"__esModule",{value:!0});const ne=requireValidate(),ee=requireCode(),te=requireUtil(),st=requireAdditionalProperties(),ot={keyword:"properties",type:"object",schemaType:"object",code(ct){const{gen:ut,schema:dt,parentSchema:ht,data:ft,it:pt}=ct;pt.opts.removeAdditional==="all"&&ht.additionalProperties===void 0&&st.default.code(new ne.KeywordCxt(pt,st.default,"additionalProperties"));const mt=(0,ee.allSchemaProperties)(dt);for(const xt of mt)pt.definedProperties.add(xt);pt.opts.unevaluated&&mt.length&&pt.props!==!0&&(pt.props=te.mergeEvaluated.props(ut,(0,te.toHash)(mt),pt.props));const yt=mt.filter(xt=>!(0,te.alwaysValidSchema)(pt,dt[xt]));if(yt.length===0)return;const vt=ut.name("valid");for(const xt of yt)_t(xt)?bt(xt):(ut.if((0,ee.propertyInData)(ut,ft,xt,pt.opts.ownProperties)),bt(xt),pt.allErrors||ut.else().var(vt,!0),ut.endIf()),ct.it.definedProperties.add(xt),ct.ok(vt);function _t(xt){return pt.opts.useDefaults&&!pt.compositeRule&&dt[xt].default!==void 0}function bt(xt){ct.subschema({keyword:"properties",schemaProp:xt,dataProp:xt},vt)}}};return properties$5.default=ot,properties$5}var patternProperties={},hasRequiredPatternProperties;function requirePatternProperties(){if(hasRequiredPatternProperties)return patternProperties;hasRequiredPatternProperties=1,Object.defineProperty(patternProperties,"__esModule",{value:!0});const ne=requireCode(),ee=requireCodegen(),te=requireUtil(),st=requireUtil(),ot={keyword:"patternProperties",type:"object",schemaType:"object",code(ct){const{gen:ut,schema:dt,data:ht,parentSchema:ft,it:pt}=ct,{opts:mt}=pt,yt=(0,ne.allSchemaProperties)(dt),vt=yt.filter(Nt=>(0,te.alwaysValidSchema)(pt,dt[Nt]));if(yt.length===0||vt.length===yt.length&&(!pt.opts.unevaluated||pt.props===!0))return;const _t=mt.strictSchema&&!mt.allowMatchingProperties&&ft.properties,bt=ut.name("valid");pt.props!==!0&&!(pt.props instanceof ee.Name)&&(pt.props=(0,st.evaluatedPropsToName)(ut,pt.props));const{props:xt}=pt;Mt();function Mt(){for(const Nt of yt)_t&&Ot(Nt),pt.allErrors?kt(Nt):(ut.var(bt,!0),kt(Nt),ut.if(bt))}function Ot(Nt){for(const Gt in _t)new RegExp(Nt).test(Gt)&&(0,te.checkStrictMode)(pt,`property ${Gt} matches pattern ${Nt} (use allowMatchingProperties)`)}function kt(Nt){ut.forIn("key",ht,Gt=>{ut.if((0,ee._)`${(0,ne.usePattern)(ct,Nt)}.test(${Gt})`,()=>{const Bt=vt.includes(Nt);Bt||ct.subschema({keyword:"patternProperties",schemaProp:Nt,dataProp:Gt,dataPropType:st.Type.Str},bt),pt.opts.unevaluated&&xt!==!0?ut.assign((0,ee._)`${xt}[${Gt}]`,!0):!Bt&&!pt.allErrors&&ut.if((0,ee.not)(bt),()=>ut.break())})})}}};return patternProperties.default=ot,patternProperties}var not={},hasRequiredNot;function requireNot(){if(hasRequiredNot)return not;
1165hasRequiredNot=1,Object.defineProperty(not,"__esModule",{value:!0});const ne=requireUtil(),ee={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(te){const{gen:st,schema:ot,it:ct}=te;if((0,ne.alwaysValidSchema)(ct,ot)){te.fail();return}const ut=st.name("valid");te.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},ut),te.failResult(ut,()=>te.reset(),()=>te.error())},error:{message:"must NOT be valid"}};return not.default=ee,not}var anyOf={},hasRequiredAnyOf;function requireAnyOf(){if(hasRequiredAnyOf)return anyOf;hasRequiredAnyOf=1,Object.defineProperty(anyOf,"__esModule",{value:!0});const ee={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:requireCode().validateUnion,error:{message:"must match a schema in anyOf"}};return anyOf.default=ee,anyOf}var oneOf={},hasRequiredOneOf;function requireOneOf(){if(hasRequiredOneOf)return oneOf;hasRequiredOneOf=1,Object.defineProperty(oneOf,"__esModule",{value:!0});const ne=requireCodegen(),ee=requireUtil(),st={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:{message:"must match exactly one schema in oneOf",params:({params:ot})=>(0,ne._)`{passingSchemas: ${ot.passing}}`},code(ot){const{gen:ct,schema:ut,parentSchema:dt,it:ht}=ot;if(!Array.isArray(ut))throw new Error("ajv implementation error");if(ht.opts.discriminator&&dt.discriminator)return;const ft=ut,pt=ct.let("valid",!1),mt=ct.let("passing",null),yt=ct.name("_valid");ot.setParams({passing:mt}),ct.block(vt),ot.result(pt,()=>ot.reset(),()=>ot.error(!0));function vt(){ft.forEach((_t,bt)=>{let xt;(0,ee.alwaysValidSchema)(ht,_t)?ct.var(yt,!0):xt=ot.subschema({keyword:"oneOf",schemaProp:bt,compositeRule:!0},yt),bt>0&&ct.if((0,ne._)`${yt} && ${pt}`).assign(pt,!1).assign(mt,(0,ne._)`[${mt}, ${bt}]`).else(),ct.if(yt,()=>{ct.assign(pt,!0),ct.assign(mt,bt),xt&&ot.mergeEvaluated(xt,ne.Name)})})}}};return oneOf.default=st,oneOf}var allOf={},hasRequiredAllOf;function requireAllOf(){if(hasRequiredAllOf)return allOf;hasRequiredAllOf=1,Object.defineProperty(allOf,"__esModule",{value:!0});const ne=requireUtil(),ee={keyword:"allOf",schemaType:"array",code(te){const{gen:st,schema:ot,it:ct}=te;if(!Array.isArray(ot))throw new Error("ajv implementation error");const ut=st.name("valid");ot.forEach((dt,ht)=>{if((0,ne.alwaysValidSchema)(ct,dt))return;const ft=te.subschema({keyword:"allOf",schemaProp:ht},ut);te.ok(ut),te.mergeEvaluated(ft)})}};return allOf.default=ee,allOf}var _if={},hasRequired_if;function require_if(){if(hasRequired_if)return _if;
1165hasRequired_if=1,Object.defineProperty(_if,"__esModule",{value:!0});const ne=requireCodegen(),ee=requireUtil(),st={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:{message:({params:ct})=>(0,ne.str)`must match "${ct.ifClause}" schema`,params:({params:ct})=>(0,ne._)`{failingKeyword: ${ct.ifClause}}`},code(ct){const{gen:ut,parentSchema:dt,it:ht}=ct;dt.then===void 0&&dt.else===void 0&&(0,ee.checkStrictMode)(ht,'"if" without "then" and "else" is ignored');const ft=ot(ht,"then"),pt=ot(ht,"else");if(!ft&&!pt)return;const mt=ut.let("valid",!0),yt=ut.name("_valid");if(vt(),ct.reset(),ft&&pt){const bt=ut.let("ifClause");ct.setParams({ifClause:bt}),ut.if(yt,_t("then",bt),_t("else",bt))}else ft?ut.if(yt,_t("then")):ut.if((0,ne.not)(yt),_t("else"));ct.pass(mt,()=>ct.error(!0));function vt(){const bt=ct.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},yt);ct.mergeEvaluated(bt)}function _t(bt,xt){return()=>{const Mt=ct.subschema({keyword:bt},yt);ut.assign(mt,yt),ct.mergeValidEvaluated(Mt,mt),xt?ut.assign(xt,(0,ne._)`${bt}`):ct.setParams({ifClause:bt})}}}};function ot(ct,ut){const dt=ct.schema[ut];return dt!==void 0&&!(0,ee.alwaysValidSchema)(ct,dt)}return _if.default=st,_if}var thenElse={},hasRequiredThenElse;function requireThenElse(){if(hasRequiredThenElse)return thenElse;hasRequiredThenElse=1,Object.defineProperty(thenElse,"__esModule",{value:!0});const ne=requireUtil(),ee={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:te,parentSchema:st,it:ot}){st.if===void 0&&(0,ne.checkStrictMode)(ot,`"${te}" without "if" is ignored`)}};return thenElse.default=ee,thenElse}var hasRequiredApplicator;function requireApplicator(){if(hasRequiredApplicator)return applicator;hasRequiredApplicator=1,Object.defineProperty(applicator,"__esModule",{value:!0});const ne=requireAdditionalItems(),ee=requirePrefixItems(),te=requireItems(),st=requireItems2020(),ot=requireContains(),ct=requireDependencies(),ut=requirePropertyNames(),dt=requireAdditionalProperties(),ht=requireProperties(),ft=requirePatternProperties(),pt=requireNot(),mt=requireAnyOf(),yt=requireOneOf(),vt=requireAllOf(),_t=require_if(),bt=requireThenElse();function xt(Mt=!1){const Ot=[pt.default,mt.default,yt.default,vt.default,_t.default,bt.default,ut.default,dt.default,ct.default,ht.default,ft.default];return Mt?Ot.push(ee.default,st.default):Ot.push(ne.default,te.default),Ot.push(ot.default),Ot}return applicator.default=xt,applicator}var format$1={},format={},hasRequiredFormat$1;function requireFormat$1(){if(hasRequiredFormat$1)return format;hasRequiredFormat$1=1,Object.defineProperty(format,"__esModule",{value:!0});const ne=requireCodegen(),te={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:{message:({schemaCode:st})=>(0,ne.str)`must match format "${st}"`,params:({schemaCode:st})=>(0,ne._)`{format: ${st}}`},code(st,ot){const{gen:ct,data:ut,$data:dt,schema:ht,schemaCode:ft,it:pt}=st,{opts:mt,errSchemaPath:yt,schemaEnv:vt,self:_t}=pt;if(!mt.validateFormats)return;dt?bt():xt();function bt(){const Mt=ct.scopeValue("formats",{ref:_t.formats,code:mt.code.formats}),Ot=ct.const("fDef",(0,ne._)`${Mt}[${ft}]`),kt=ct.let("fType"),Nt=ct.let("format");ct.if((0,ne._)`typeof ${Ot} == "object" && !(${Ot} instanceof RegExp)`,()=>ct.assign(kt,(0,ne._)`${Ot}.type || "string"`).assign(Nt,(0,ne._)`${Ot}.validate`),()=>ct.assign(kt,(0,ne._)`"string"`).assign(Nt,Ot)),st.fail$data((0,ne.or)(Gt(),Bt()));function Gt(){return mt.strictSchema===!1?ne.nil:(0,ne._)`${ft} && !${Nt}`}function Bt(){const Ut=vt.$async?(0,ne._)`(${Ot}.async ? await ${Nt}(${ut}) : ${Nt}(${ut}))`:(0,ne._)`${Nt}(${ut})`,Vt=(0,ne._)`(typeof ${Nt} == "function" ? ${Ut} : ${Nt}.test(${ut}))`;return(0,ne._)`${Nt} && ${Nt} !== true && ${kt} === ${ot} && !${Vt}`}}function xt(){const Mt=_t.formats[ht];if(!Mt){Gt();return}if(Mt===!0)return;const[Ot,kt,Nt]=Bt(Mt);Ot===ot&&st.pass(Ut());function Gt(){if(mt.strictSchema===!1){_t.logger.warn(Vt());return}throw new Error(Vt());function Vt(){return`unknown format "${ht}" ignored in schema at path "${yt}"`}}function Bt(Vt){const Ht=Vt instanceof RegExp?(0,ne.regexpCode)(Vt):mt.code.formats?(0,ne._)`${mt.code.formats}
1165${(0,ne.getProperty)(ht)}`:void 0,zt=ct.scopeValue("formats",{key:ht,ref:Vt,code:Ht});return typeof Vt=="object"&&!(Vt instanceof RegExp)?[Vt.type||"string",Vt.validate,(0,ne._)`${zt}.validate`]:["string",Vt,zt]}function Ut(){if(typeof Mt=="object"&&!(Mt instanceof RegExp)&&Mt.async){if(!vt.$async)throw new Error("async format in sync schema");return(0,ne._)`await ${Nt}(${ut})`}return typeof kt=="function"?(0,ne._)`${Nt}(${ut})`:(0,ne._)`${Nt}.test(${ut})`}}}};return format.default=te,format}var hasRequiredFormat;function requireFormat(){if(hasRequiredFormat)return format$1;hasRequiredFormat=1,Object.defineProperty(format$1,"__esModule",{value:!0});const ee=[requireFormat$1().default];return format$1.default=ee,format$1}var metadata={},hasRequiredMetadata;function requireMetadata(){return hasRequiredMetadata||(hasRequiredMetadata=1,Object.defineProperty(metadata,"__esModule",{value:!0}),metadata.contentVocabulary=metadata.metadataVocabulary=void 0,metadata.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],metadata.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]),metadata}var hasRequiredDraft7;function requireDraft7(){if(hasRequiredDraft7)return draft7;hasRequiredDraft7=1,Object.defineProperty(draft7,"__esModule",{value:!0});const ne=requireCore(),ee=requireValidation(),te=requireApplicator(),st=requireFormat(),ot=requireMetadata(),ct=[ne.default,ee.default,(0,te.default)(),st.default,ot.metadataVocabulary,ot.contentVocabulary];return draft7.default=ct,draft7}var discriminator={},types={},hasRequiredTypes;function requireTypes(){if(hasRequiredTypes)return types;hasRequiredTypes=1,Object.defineProperty(types,"__esModule",{value:!0}),types.DiscrError=void 0;var ne;return(function(ee){ee.Tag="tag",ee.Mapping="mapping"})(ne||(types.DiscrError=ne={})),types}var hasRequiredDiscriminator;function requireDiscriminator(){if(hasRequiredDiscriminator)return discriminator;hasRequiredDiscriminator=1,Object.defineProperty(discriminator,"__esModule",{value:!0});const ne=requireCodegen(),ee=requireTypes(),te=requireCompile(),st=requireRef_error(),ot=requireUtil(),ut={keyword:"discriminator",type:"object",schemaType:"object",error:{message:({params:{discrError:dt,tagName:ht}})=>dt===ee.DiscrError.Tag?`tag "${ht}" must be string`:`value of tag "${ht}" must be in oneOf`,params:({params:{discrError:dt,tag:ht,tagName:ft}})=>(0,ne._)`{error: ${dt}, tag: ${ft}, tagValue: ${ht}}`},code(dt){const{gen:ht,data:ft,schema:pt,parentSchema:mt,it:yt}=dt,{oneOf:vt}=mt;if(!yt.opts.discriminator)throw new Error("discriminator: requires discriminator option");const _t=pt.propertyName;if(typeof _t!="string")throw new Error("discriminator: requires propertyName");if(pt.mapping)throw new Error("discriminator: mapping is not supported");if(!vt)throw new Error("discriminator: requires oneOf keyword");const bt=ht.let("valid",!1),xt=ht.const("tag",(0,ne._)`${ft}${(0,ne.getProperty)(_t)}`);ht.if((0,ne._)`typeof ${xt} == "string"`,()=>Mt(),()=>dt.error(!1,{discrError:ee.DiscrError.Tag,tag:xt,tagName:_t})),dt.ok(bt);function Mt(){const Nt=kt();ht.if(!1);for(const Gt in Nt)ht.elseIf((0,ne._)`${xt} === ${Gt}`),ht.assign(bt,Ot(Nt[Gt]));ht.else(),dt.error(!1,{discrError:ee.DiscrError.Mapping,tag:xt,tagName:_t}),ht.endIf()}function Ot(Nt){const Gt=ht.name("valid"),Bt=dt.subschema({keyword:"oneOf",schemaProp:Nt},Gt);return dt.mergeEvaluated(Bt,ne.Name),Gt}function kt(){var Nt;const Gt={},Bt=Vt(mt);let Ut=!0;for(let jt=0;jt<vt.length;jt++){let Wt=vt[jt];if(Wt!=null&&Wt.$ref&&!(0,ot.schemaHasRulesButRef)(Wt,yt.self.RULES)){const Qt=Wt.$ref;if(Wt=te.resolveRef.call(yt.self,yt.schemaEnv.root,yt.baseId,Qt),Wt instanceof te.SchemaEnv&&(Wt=Wt.schema),Wt===void 0)throw new st.default(yt.opts.uriResolver,yt.baseId,Qt)}const Jt=(Nt=Wt==null?void 0:Wt.properties)===null||Nt===void 0?void 0:Nt[_t];
1165if(typeof Jt!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${_t}"`);Ut=Ut&&(Bt||Vt(Wt)),Ht(Jt,jt)}if(!Ut)throw new Error(`discriminator: "${_t}" must be required`);return Gt;function Vt({required:jt}){return Array.isArray(jt)&&jt.includes(_t)}function Ht(jt,Wt){if(jt.const)zt(jt.const,Wt);else if(jt.enum)for(const Jt of jt.enum)zt(Jt,Wt);else throw new Error(`discriminator: "properties/${_t}" must have "const" or "enum"`)}function zt(jt,Wt){if(typeof jt!="string"||jt in Gt)throw new Error(`discriminator: "${_t}" values must be unique strings`);Gt[jt]=Wt}}}};return discriminator.default=ut,discriminator}const $schema$6="http://json-schema.org/draft-07/schema#",$id$6="http://json-schema.org/draft-07/schema#",title$1="Core schema meta-schema",definitions={schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},type$6=["object","boolean"],properties$4={$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},require$$3={$schema:$schema$6,$id:$id$6,title:title$1,definitions,type:type$6,properties:properties$4,default:!0};var hasRequiredAjv;function requireAjv(){return hasRequiredAjv||(hasRequiredAjv=1,(function(ne,ee){Object.defineProperty(ee,"__esMo
1165dule",{value:!0}),ee.MissingRefError=ee.ValidationError=ee.CodeGen=ee.Name=ee.nil=ee.stringify=ee.str=ee._=ee.KeywordCxt=ee.Ajv=void 0;const te=requireCore$1(),st=requireDraft7(),ot=requireDiscriminator(),ct=require$$3,ut=["/properties"],dt="http://json-schema.org/draft-07/schema";class ht extends te.default{_addVocabularies(){super._addVocabularies(),st.default.forEach(_t=>this.addVocabulary(_t)),this.opts.discriminator&&this.addKeyword(ot.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const _t=this.opts.$data?this.$dataMetaSchema(ct,ut):ct;this.addMetaSchema(_t,dt,!1),this.refs["http://json-schema.org/schema"]=dt}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(dt)?dt:void 0)}}ee.Ajv=ht,ne.exports=ee=ht,ne.exports.Ajv=ht,Object.defineProperty(ee,"__esModule",{value:!0}),ee.default=ht;var ft=requireValidate();Object.defineProperty(ee,"KeywordCxt",{enumerable:!0,get:function(){return ft.KeywordCxt}});var pt=requireCodegen();Object.defineProperty(ee,"_",{enumerable:!0,get:function(){return pt._}}),Object.defineProperty(ee,"str",{enumerable:!0,get:function(){return pt.str}}),Object.defineProperty(ee,"stringify",{enumerable:!0,get:function(){return pt.stringify}}),Object.defineProperty(ee,"nil",{enumerable:!0,get:function(){return pt.nil}}),Object.defineProperty(ee,"Name",{enumerable:!0,get:function(){return pt.Name}}),Object.defineProperty(ee,"CodeGen",{enumerable:!0,get:function(){return pt.CodeGen}});var mt=requireValidation_error();Object.defineProperty(ee,"ValidationError",{enumerable:!0,get:function(){return mt.default}});var yt=requireRef_error();Object.defineProperty(ee,"MissingRefError",{enumerable:!0,get:function(){return yt.default}})})(ajv,ajv.exports)),ajv.exports}var ajvExports=requireAjv();const Ajv=getDefaultExportFromCjs(ajvExports);var dist={exports:{}},formats={},hasRequiredFormats;function requireFormats(){return hasRequiredFormats||(hasRequiredFormats=1,(function(ne){Object.defineProperty(ne,"__esModule",{value:!0}),ne.formatNames=ne.fastFormats=ne.fullFormats=void 0;function ee(jt,Wt){return{validate:jt,compare:Wt}}ne.fullFormats={date:ee(ct,ut),time:ee(ht(!0),ft),"date-time":ee(yt(!0),vt),"iso-time":ee(ht(),pt),"iso-date-time":ee(yt(),_t),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:Mt,"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,"uri-template":/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,url:/^(?:https?|ftp):\/\/(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)(?:\.(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)$/,ipv6:/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i,regex:zt,uuid:/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,"json-pointer":/^(?:\/(?:[^~/]|~0|~1)*)*$/,"json-pointer-uri-fragment":/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,"relative-json-pointer":/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,byte:kt,int32:{type:"number",validate:Bt},int64:{type:"number",validate:Ut},float:{type:"number",validate:Vt},double:{type:"number",validate:Vt},password:!0,binary:!0},ne.fastFormats={...ne.fullFormats,date:ee(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,ut),time:ee(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,ft),"date-time":ee(/^\d\d\d\d-[0-1]\d-[0-3]\dt(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,vt),"iso-time":ee(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,pt),"iso-date-time":ee(/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,_t),uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i},ne.formatNames=Object.keys(ne.fullFormats);function te(jt){return jt%4===0&&(jt%100!==0||jt%400===0)}const st=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,ot=[0,31,28,31,30,31,30,31,31,30,31,30,31];function ct(jt){const Wt=st.exec(jt);if(!Wt)return!1;const Jt=+Wt[1],Qt=+Wt[2],oi=+Wt[3];return Qt>=1&&Qt<=12&&oi>=1&&oi<=(Qt===2&&te(Jt)?29:ot[Qt])}function ut(jt,Wt){if(jt&&Wt)return jt>Wt?1:jt<Wt?-1:0}const dt=/^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i;function ht(jt){return function(Jt){const Qt=dt.exec(Jt);if(!Qt)return!1;const oi=+Qt[1],ai=+Qt[2],xn=+Qt[3],An=Qt[4],Nn=Qt[5]==="-"?-1:1,Xt=+(Qt[6]||0),Zt=+(Qt[7]||0);if(Xt>23||Zt>59||jt&&!An)return!1;if(oi<=23&&ai<=59&&xn<60)return!0;const Kt=ai-Zt*Nn,ti=oi-Xt*Nn-(Kt<0?1:0);return(ti===23||ti===-1)&&(Kt===59||Kt===-1)&&xn<61}}function ft(jt,Wt){if(!(jt&&Wt))return;const Jt=new Date("2020-01-01T"+jt).valueOf(),Qt=new Date("2020-01-01T"+Wt).valueOf();if(Jt&&Qt)return Jt-Qt}function pt(jt,Wt){if(!(jt&&Wt))return;const Jt=dt.exec(jt),Qt=dt.exec(Wt);
1165if(Jt&&Qt)return jt=Jt[1]+Jt[2]+Jt[3],Wt=Qt[1]+Qt[2]+Qt[3],jt>Wt?1:jt<Wt?-1:0}const mt=/t|\s/i;function yt(jt){const Wt=ht(jt);return function(Qt){const oi=Qt.split(mt);return oi.length===2&&ct(oi[0])&&Wt(oi[1])}}function vt(jt,Wt){if(!(jt&&Wt))return;const Jt=new Date(jt).valueOf(),Qt=new Date(Wt).valueOf();if(Jt&&Qt)return Jt-Qt}function _t(jt,Wt){if(!(jt&&Wt))return;const[Jt,Qt]=jt.split(mt),[oi,ai]=Wt.split(mt),xn=ut(Jt,oi);if(xn!==void 0)return xn||ft(Qt,ai)}const bt=/\/|:/,xt=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;function Mt(jt){return bt.test(jt)&&xt.test(jt)}const Ot=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function kt(jt){return Ot.lastIndex=0,Ot.test(jt)}const Nt=-2147483648,Gt=2**31-1;function Bt(jt){return Number.isInteger(jt)&&jt<=Gt&&jt>=Nt}function Ut(jt){return Number.isInteger(jt)}function Vt(){return!0}const Ht=/[^\\]\\Z/;function zt(jt){if(Ht.test(jt))return!1;try{return new RegExp(jt),!0}catch{return!1}}})(formats)),formats}var limit={},hasRequiredLimit;function requireLimit(){return hasRequiredLimit||(hasRequiredLimit=1,(function(ne){Object.defineProperty(ne,"__esModule",{value:!0}),ne.formatLimitDefinition=void 0;const ee=requireAjv(),te=requireCodegen(),st=te.operators,ot={formatMaximum:{okStr:"<=",ok:st.LTE,fail:st.GT},formatMinimum:{okStr:">=",ok:st.GTE,fail:st.LT},formatExclusiveMaximum:{okStr:"<",ok:st.LT,fail:st.GTE},formatExclusiveMinimum:{okStr:">",ok:st.GT,fail:st.LTE}},ct={message:({keyword:dt,schemaCode:ht})=>(0,te.str)`should be ${ot[dt].okStr} ${ht}`,params:({keyword:dt,schemaCode:ht})=>(0,te._)`{comparison: ${ot[dt].okStr}, limit: ${ht}}`};ne.formatLimitDefinition={keyword:Object.keys(ot),type:"string",schemaType:"string",$data:!0,error:ct,code(dt){const{gen:ht,data:ft,schemaCode:pt,keyword:mt,it:yt}=dt,{opts:vt,self:_t}=yt;if(!vt.validateFormats)return;const bt=new ee.KeywordCxt(yt,_t.RULES.all.format.definition,"format");bt.$data?xt():Mt();function xt(){const kt=ht.scopeValue("formats",{ref:_t.formats,code:vt.code.formats}),Nt=ht.const("fmt",(0,te._)`${kt}[${bt.schemaCode}]`);dt.fail$data((0,te.or)((0,te._)`typeof ${Nt} != "object"`,(0,te._)`${Nt} instanceof RegExp`,(0,te._)`typeof ${Nt}.compare != "function"`,Ot(Nt)))}function Mt(){const kt=bt.schema,Nt=_t.formats[kt];if(!Nt||Nt===!0)return;if(typeof Nt!="object"||Nt instanceof RegExp||typeof Nt.compare!="function")throw new Error(`"${mt}": format "${kt}" does not define "compare" function`);const Gt=ht.scopeValue("formats",{key:kt,ref:Nt,code:vt.code.formats?(0,te._)`${vt.code.formats}${(0,te.getProperty)(kt)}`:void 0});dt.fail$data(Ot(Gt))}function Ot(kt){return(0,te._)`${kt}.compare(${ft}, ${pt}) ${ot[mt].fail} 0`}},dependencies:["format"]};const ut=dt=>(dt.addKeyword(ne.formatLimitDefinition),dt);ne.default=ut})(limit)),limit}var hasRequiredDist;function requireDist(){return hasRequiredDist||(hasRequiredDist=1,(function(ne,ee){Object.defineProperty(ee,"__esMo
1165dule",{value:!0});const te=requireFormats(),st=requireLimit(),ot=requireCodegen(),ct=new ot.Name("fullFormats"),ut=new ot.Name("fastFormats"),dt=(ft,pt={keywords:!0})=>{if(Array.isArray(pt))return ht(ft,pt,te.fullFormats,ct),ft;const[mt,yt]=pt.mode==="fast"?[te.fastFormats,ut]:[te.fullFormats,ct],vt=pt.formats||te.formatNames;return ht(ft,vt,mt,yt),pt.keywords&&(0,st.default)(ft),ft};dt.get=(ft,pt="full")=>{const yt=(pt==="fast"?te.fastFormats:te.fullFormats)[ft];if(!yt)throw new Error(`Unknown format "${ft}"`);return yt};function ht(ft,pt,mt,yt){var vt,_t;(vt=(_t=ft.opts.code).formats)!==null&&vt!==void 0||(_t.formats=(0,ot._)`require("ajv-formats/dist/formats").${yt}`);for(const bt of pt)ft.addFormat(bt,mt[bt])}ne.exports=ee=dt,Object.defineProperty(ee,"__esModule",{value:!0}),ee.default=dt})(dist,dist.exports)),dist.exports}var distExports=requireDist();const addFormats=getDefaultExportFromCjs(distExports),$id$5="catalog",$schema$5="http://json-schema.org/draft-07/schema#",jsdoc="schema.jsdoc",title="Generated schema for configuration service",type$5="object",properties$3={generalOptions:{type:"object",properties:{apiKeys:{type:"object",properties:{$apikey:{type:"array",items:{}}},required:[]}},required:["apiKeys"]},layers:{type:"object",properties:{"$GEOPORTAIL:OGC:WMTS":{type:"object",properties:{name:{type:"string"},title:{type:"string"},description:{type:"string"},globalConstraint:{type:"object",properties:{maxScaleDenominator:{type:"number"},minScaleDenominator:{type:"number"},bbox:{type:"object",properties:{left:{type:"number"},right:{type:"number"},top:{type:"number"},bottom:{type:"number"}},required:["left","right","top","bottom"]}},required:["maxScaleDenominator","minScaleDenominator","bbox"]},serviceParams:{type:"object",properties:{id:{type:"string"},version:{type:"string"},serverUrl:{type:"object",properties:{$apikey:{type:"string"}},required:["$apikey"]}},required:["id","version","serverUrl"]},defaultProjection:{type:"string"},wmtsOptions:{type:"object",properties:{tileMatrixSetLink:{type:"string"},tileMatrixSetLimits:{type:"object",properties:{$level:{type:"object",properties:{minTileRow:{type:"string"},maxTileRow:{type:"string"},minTileCol:{type:"string"},maxTileCol:{type:"string"}},required:["minTileRow","maxTileRow","minTileCol","maxTileCol"]}},required:["$level"]}},required:["tileMatrixSetLink","tileMatrixSetLimits"]},styles:{type:"array",items:{type:"object",properties:{name:{type:"string"},title:{type:"string"},current:{type:"boolean"},url:{}},required:["name","title","current","url"]}},legends:{type:"array",items:{type:"object",properties:{format:{type:"string"},url:{type:"string"},minScaleDenominator:{type:"string"}},required:["format","url","minScaleDenominator"]}},formats:{type:"array",items:{type:"object",properties:{name:{type:"string"},current:{type:"boolean"}},required:["name","current"]}}},required:["name","title","description","globalConstraint","serviceParams","defaultProjection","wmtsOptions","styles","legends","formats"]},"$GEOPORTAIL:OGC:WMS":{type:"object",properties:{name:{type:"string"},title:{type:"string"},description:{type:"string"},globalConstraint:{type:"object",properties:{minScaleDenominator:{type:"number"},maxScaleDenominator:{type:"number"},bbox:{type:"object",properties:{left:{type:"number"},right:{type:"number"},top:{type:"number"},bottom:{type:"number"}},required:["left","right","top","bottom"]}},required:["minScaleDenominator","maxScaleDenominator","bbox"]},serviceParams:{type:"object",properties:{id:{type:"string"},version:{type:"string"},serverUrl:{type:"object",properties:{$apikey:{type:"string"}},required:["$apikey"]}},required:["id","version","serverUrl"]},defaultProjection:{type:"string"},queryable:{type:"boolean"},metadata:{type:"array",items:{}},styles:{type:"array",items:{type:"object",properties:{name:{type:"string"},title:{type:"string"}},required:["name","title"]}},legends:{type:"array",items:{type:"object",properties:{format:{type:"string"},url:{type:"string"}},required:["format","url"]}},formats:{type:"array",items:{type:"object",properties:{name:{type:"string"},current:{type:"boolean"}},required:["name","current"]}}},required:["name","title","description","globalConstraint","serviceParams","defaultProjection","query
1165able","metadata","styles","legends","formats"]},"$GEOPORTAIL:GPP:TMS":{type:"object",properties:{hidden:{type:"boolean"},queryable:{type:"boolean"},serviceParams:{type:"object",properties:{id:{type:"string"},version:{type:"string"},serverUrl:{type:"object",properties:{$apikey:{type:"string"}},required:["$apikey"]}},required:["id","version","serverUrl"]},name:{type:"string"},title:{type:"string"},description:{type:"string"},formats:{type:"array",items:{type:"object",properties:{current:{type:"boolean"},name:{type:"string"}},required:["current","name"]}},styles:{type:"array",items:{type:"object",properties:{name:{type:"string"},title:{type:"string"},current:{type:"boolean"},url:{type:"string"}},required:["name","title","current","url"]}},globalConstraint:{type:"object",properties:{crs:{type:"string"},bbox:{type:"object",properties:{left:{type:"number"},right:{type:"number"},top:{type:"number"},bottom:{type:"number"}},required:["left","right","top","bottom"]},minScaleDenominator:{},maxScaleDenominator:{}},required:["crs","bbox","minScaleDenominator","maxScaleDenominator"]},layerId:{type:"string"},defaultProjection:{type:"string"}},required:["hidden","queryable","serviceParams","name","title","description","formats","styles","globalConstraint","layerId","defaultProjection"]}},required:[]},tileMatrixSets:{type:"object",properties:{$tmsid:{type:"object",properties:{projection:{type:"string"},nativeResolutions:{type:"array",items:{type:"string"}},tileMatrices:{type:"object",properties:{$level:{type:"object",properties:{matrixId:{type:"string"},matrixHeight:{type:"number"},matrixWidth:{type:"number"},scaleDenominator:{type:"number"},tileHeight:{type:"number"},tileWidth:{type:"number"},topLeftCorner:{type:"object",properties:{x:{type:"number"},y:{type:"number"}},required:["x","y"]}},required:["matrixId","matrixHeight","matrixWidth","scaleDenominator","tileHeight","tileWidth","topLeftCorner"]}},required:["$level"]}},required:["projection","nativeResolutions","tileMatrices"]}},required:[]}},required$3=["generalOptions","layers","tileMatrixSets"],CatalogSchema={$id:$id$5,$schema:$schema$5,jsdoc,title,type:type$5,properties:properties$3,required:required$3},$id$4="territories",$schema$4="http://json-schema.org/draft-07/schema#",type$4="array",items={type:"object",required:["id","title","description","zoom","thumbnail","icon"],oneOf:[{required:["bbox"]},{required:["point"]}],properties:{id:{type:"string",description:"Code du territoire"},title:{type:"string",description:"Nom affiché du territoire"},description:{type:"string"},zoom:{type:["integer","null"],minimum:0},bbox:{type:"array",minItems:4,maxItems:4,items:{type:"number"},description:"Bounding box au format [minX, minY, maxX, maxY]"},point:{type:"array",minItems:2,maxItems:2,items:{type:"number"},description:"Coordonnées"},thumbnail:{anyOf:[{type:"string",format:"uri"},{type:"string"}]},icon:{anyOf:[{type:"string",format:"uri"},{type:"string"}]}},additionalProperties:!1},TerrotoriesSchema={$id:$id$4,$schema:$schema$4,type:type$4,items},$id$3="layer-wmts",$schema$3="http://json-schema.org/draft-07/schema#",type$3="object",required$2=["name","globalConstraint","params"],properties$2={name:{type:"string"},globalConstraint:{type:"object",required:["maxScaleDenominator","minScaleDenominator","bbox"],properties:{maxScaleDenominator:{type:"number"},minScaleDenominator:{type:"number"},bbox:{type:"object",required:["left","right","top","bottom"],properties:{left:{type:"number"},right:{type:"number"},top:{type:"number"},bottom:{type:"number"}},additionalProperties:!1}},additionalProperties:!1},params:{type:"object",required:["url","styles","version","format","projection","minScale","maxScale","extent","legends","title","description","tileMatrixSetLimits","TMSLink","matrixIds","tileMatrices","nativeResolutions"],properties:{url:{type:"string",format:"uri"},styles:{type:"string"},version:{type:"string"},format:{type:"string"},projection:{type:"string"},minScale:{type:"number"},maxScale:{type:"number"},extent:{type:"object",required:["left","right","top","bottom"],properties:{left:{type:"number"},right:{type:"number"},top:{type:"number"},bottom:{type:"number"}},additionalProperties:!1},legends:{type:"array",items:{type:"object",required:["format","url","minScaleDenominator"],properties:{format:{type:"string"},url:{type:"string"},minScaleDenominator:{type:["string","number"]}},additionalProperties:!1}},title:{type:"string"},description:{type:"string"},tileMatrixSetLimits:{type:"object",patternProperties:{"^[0-9]+$":{type:"object",required:["minTileRow","maxTileRow","minTileCol","maxTileCol"],properties:{minTileRow:{type:"string"},maxTileRow:{type:"string"},minTileCol:{type:"string"},maxTileCol:{type:"string"}},additionalProperties:!1}},additionalProperties:!1},TMSLink:{type:"string"},matrixIds:{type:"array",items:{type:"string"}},tileMatrices:{type:"object",patternProperties:{"^[0-9]+$":{type:"object",required:["matrixId","matrixHeight","matrixWidth","scaleDenominator","tileHeight","tileWidth","topLeftCorner"],properties:{matrixId:{type:"string"},matrixHeight:{type:"integer"},matrixWidth:{type:"integer"},scaleDenominator:{type:"number"},tileHeight:{type:"integer"},tileWidth:{type:"integer"},topLeftCorner:{type:"object",required:["x","y"],properties:{x:{type:"number"},y:{type:"number"}},additionalProperties:!1}},additionalProperties:!1}},additionalProperties:!1},nativeResolutions:{type:"array",items:{type:"string"}}},additionalProperties:!1}},additionalProperties$2=!1,LayerWmtsSchema={$id:$id$3,$schema:$schema$3,type:type$3,required:required$2,properties:properties$2,additionalProperties:additionalProperties$2},$id$2="layer-wms",$schema$2="http://json-schema.org/draft-07/schema#",type$2="object",required$1=["name","title","description","globalConstraint","serviceParams","defaultProjection","query
1165able","metadata","styles","legends","formats","producer","thematic","base","key","position","opacity","visible","grayscale","params"],properties$1={name:{type:"string"},title:{type:"string"},description:{type:"string"},globalConstraint:{type:"object",required:["minScaleDenominator","maxScaleDenominator","bbox"],properties:{minScaleDenominator:{type:"number"},maxScaleDenominator:{type:"number"},bbox:{type:"object",required:["left","right","top","bottom"],properties:{left:{type:"number"},right:{type:"number"},top:{type:"number"},bottom:{type:"number"}},additionalProperties:!1}},additionalProperties:!1},serviceParams:{type:"object",required:["id","version","serverUrl"],properties:{id:{type:"string"},version:{type:"string"},serverUrl:{type:"object",required:["full"],properties:{full:{type:"string",format:"uri"}},additionalProperties:!1}},additionalProperties:!1},defaultProjection:{type:"string"},queryable:{type:"boolean"},metadata:{type:"array",items:{}},styles:{type:"array",items:{type:"object",required:["name","title"],properties:{name:{type:"string"},title:{type:"string"}},additionalProperties:!1}},legends:{type:"array",items:{type:"object",required:["format","url"],properties:{format:{type:"string"},url:{type:"string",format:"uri"}},additionalProperties:!1}},formats:{type:"array",items:{type:"object",required:["name","current"],properties:{name:{type:"string"},current:{type:"boolean"}},additionalProperties:!1}},producer:{type:"array",items:{type:"string"}},thematic:{type:"array",items:{type:"string"}},base:{type:"boolean"},key:{type:"string"},position:{type:"integer"},opacity:{type:"number"},visible:{type:"boolean"},grayscale:{type:"boolean"},params:{type:"object",required:["url","styles","version","format","projection","minScale","maxScale","extent","legends","title","description"],properties:{url:{type:"string",format:"uri"},styles:{type:"string"},version:{type:"string"},format:{type:"string"},projection:{type:"string"},minScale:{type:"number"},maxScale:{type:"number"},extent:{type:"object",required:["left","right","top","bottom"],properties:{left:{type:"number"},right:{type:"number"},top:{type:"number"},bottom:{type:"number"}},additionalProperties:!1},legends:{type:"array",items:{type:"object",required:["format","url"],properties:{format:{type:"string"},url:{type:"string",format:"uri"}},additionalProperties:!1}},title:{type:"string"},description:{type:"string"}},additionalProperties:!1}},additionalProperties$1=!1,LayerWmsSchema={$id:$id$2,$schema:$schema$2,type:type$2,required:required$1,properties:properties$1,additionalProperties:additionalProperties$1},$id$1="layer-wfs",$schema$1="http://json-schema.org/draft-07/schema#",type$1="object",LayerWfsSchema={$id:$id$1,$schema:$schema$1,type:type$1},$id="layer-tms",$schema="http://json-schema.org/draft-07/schema#",type="object",required=["name","title","description","params","formats","styles","globalConstraint"],properties={hidden:{type:"boolean"},queryable:{type:"boolean"},serviceParams:{type:"object",required:["id","version","serverUrl"],properties:{id:{type:"string"},version:{type:"string"},serverUrl:{type:"object",required:["full"],properties:{full:{type:"string",format:"uri"}},additionalProperties:!1}},additionalProperties:!1},name:{type:"string"},title:{type:"string"},description:{type:"string"},formats:{type:"array",items:{type:"object",required:["name","current"],properties:{name:{type:"string"},current:{type:"boolean"}},additionalProperties:!1}},styles:{type:"array",items:{type:"object",required:["name","title","url"],properties:{name:{type:"string"},title:{type:"string"},current:{type:"boolean"},url:{type:"string",format:"uri"}},additionalProperties:!1}},globalConstraint:{type:"object",required:["crs","bbox","minScaleDenominator","maxScaleDenominator"],properties:{crs:{type:"string"},bbox:{type:"object",required:["left","right","top","bottom"],properties:{left:{type:"number"},right:{type:"number"},top:{type:"number"},bottom:{type:"number"}},additionalProperties:!1},minScaleDenominator:{type:"number"},maxScaleDenominator:{type:"number"}},additionalProperties:!1},defaultProjection:{type:"string"},thematic:{type:"array",items:{type:"string"}},base:{type:"boolean"},producer:{type:"array",items:{type:"string"}},key:{type:"string"},position:{type:"integer"},opacity:{type:"number"},visible:{type:"boolean"},grayscale:{type:"boolean"},params:{type:"object",required:["url","styles","version","format","projection","minScale","maxScale","extent","title","description"],properties:{url:{type:"string",format:"uri"},styles:{type:"string"},version:{type:"string"},format:{type:"string"},projection:{type:"string"},minScale:{type:"number"},maxScale:{type:"number"},extent:{type:"object",required:["left","right","top","bottom"],properties:{left:{type:"number"},right:{type:"number"},top:{type:"number"},bottom:{type:"number"}},additionalProperties:!1},title:{type:"string"},description:{type:"string"}},additionalProperties:!1}},additionalProperties=!1,LayerTmsSchema={$id,$schema,type,required,properties,additionalProperties};class JsonValidatorUtils{constructor(){this.ajv=new Ajv({strict:!1,allErrors:!0}),addFormats(this.ajv,{mode:"fast",formats:["uri"],keywords:!0}),this.schemas={},this.loadSchemas()}loadSchemas(){this.ajv.addSchema(CatalogSchema,CatalogSchema.$id),this.schemas[CatalogSchema.$id]=CatalogSchema,this.ajv.addSchema(TerrotoriesSchema,TerrotoriesSchema.$id),this.schemas[TerrotoriesSchema.$id]=TerrotoriesSchema,this.ajv.addSchema(LayerWmtsSchema,LayerWmtsSchema.$id),this.schemas[LayerWmtsSchema.$id]=LayerWmtsSchema,this.ajv.addSchema(LayerWmsSchema,LayerWmsSchema.$id),this.schemas[LayerWmsSchema.$id]=LayerWmsSchema,this.ajv.addSchema(LayerWfsSchema,LayerWfsSchema.$id),this.schemas[LayerWfsSchema.$id]=LayerWfsSchema,this.ajv.addSchema(LayerTmsSchema,LayerTmsSchema.$id),this.schemas[LayerTmsSchema.$id]=LayerTmsSchema}validate(ee,te){if(!this.schemas[ee])throw new Error(`Aucun schéma trouvé pour le type "${ee}"`);const st=this.ajv.getSchema(ee);return st(te)?{valid:!0}:{valid:!1,errors:st.errors}}}window.Gp&&(window.Gp.JsonValidatorUtils=JsonValidatorUtils);let isMobile=useMatchMedia("SM");const useControls={Catalog:{id:"Catalog",active:!0,disable:!0,analytic:!0,default:!0,icon:"fr-icon-feedback-line"},LayerSwitcher:{id:"LayerSwitcher",active:!0,disable:!0,analytic:!0,default:!0,icon:"fr-icon-stack-line"},MeasureLength:{id:"MeasureLength",active:!0,disable:!1,analytic:!0,default:!0,icon:"ri:ruler-line"},MeasureArea:{id:"MeasureArea",active:!0,disable:!1,analytic:!0,default:!0,icon:"ri:custom-size"},Drawing:{id:"Drawing",active:!0,disable:!1,analytic:!0,default:!0,icon:"ri:pencil-line"},Route:{id:"Route",active:!0,disable:!1,analytic:!0,default:!0,icon:"ri:route-line"}
1165,Isocurve:{id:"Isocurve",active:!0,disable:!1,analytic:!0,default:!0,icon:"ri:map-pin-time-line"},ReverseGeocode:{id:"ReverseGeocode",active:!0,disable:!1,analytic:!0,default:!0,icon:"ri:signpost-line"},MousePosition:{id:"MousePosition",active:!0,disable:!1,analytic:!1,default:!0,icon:"gpf:coordonnee"},ElevationPath:{id:"ElevationPath",active:!0,disable:!1,analytic:!1,default:!0,icon:"ri:line-chart-line"},MeasureAzimuth:{id:"MeasureAzimuth",active:!0,disable:!1,analytic:!0,default:!0,icon:"ri:compasses-2-line"},ControlList:{id:"ControlList",active:!0,disable:!0,analytic:!0,default:!0,icon:"ri:list-check"},OverviewMap:{id:"OverviewMap",active:!1,disable:!1,analytic:!0,default:!1,icon:"ri:navigation-line"},SearchEngine:{id:"SearchEngine",active:!0,disable:!0,analytic:!1,default:!0,icon:"ri:search-line"},ScaleLine:{id:"ScaleLine",active:!0,disable:!0,analytic:!1,default:!0,icon:""},GetFeatureInfo:{id:"GetFeatureInfo",active:!0,disable:!0,analytic:!0,default:!0,icon:"gpf:getfeature-line"},Legends:{id:"Legends",active:!0,disable:!0,analytic:!0,default:!0,icon:"ri:list-indefinite"},Zoom:{id:"Zoom",active:!0,disable:!1,analytic:!1,default:!isMobile.value,icon:"ri:zoom-in-line"},FullScreen:{id:"FullScreen",active:!0,disable:!1,analytic:!1,default:!0,icon:"ri:fullscreen-line"},Share:{id:"Share",active:!0,disable:!0,analytic:!0,default:!0,icon:"ri:map-2-line"},Print:{id:"Print",active:!0,disable:!0,analytic:!0,default:!0,icon:"fr-icon-printer-line"},Territories:{id:"Territories",active:!0,disable:!1,analytic:!0,default:!0,icon:"fr-icon-france-line"},LayerImport:{id:"LayerImport",active:!0,disable:!0,analytic:!0,default:!0,icon:"ri:file-upload-line"},ContextMenu:{id:"ContextMenu",active:!0,disable:!0,analytic:!0,default:!0,icon:"ri:menu-2-line"},Reporting:{id:"Reporting",active:!0,disable:!0,analytic:!0,default:!0,icon:"fr-icon-feedback-line"},Panoramax:{id:"Panoramax",active:!0,disable:!1,analytic:!0,default:!0,icon:"gpf:panoramax"}};function useDefaultControls(){var ne=[];for(var ee in useControls)(useControls[ee].default===!0||useControls[ee].active===!0&&useControls[ee].disable===!0)&&ne.push(useControls[ee].id);return ne}function useControlsMenuOptions(){return[{label:"Mesurer une distance",id:"measureLength",name:useControls.MeasureLength.id,disabled:useControls.MeasureLength.disable,icon:"ri:ruler-line",group:"Mesure"},{label:"Mesurer une surface",id:"measureArea",name:useControls.MeasureArea.id,disabled:useControls.MeasureArea.disable,icon:"ri:custom-size",group:"Mesure"},{label:"Mesurer un angle",id:"measureAzimuth",name:useControls.MeasureAzimuth.id,disabled:useControls.MeasureAzimuth.disable,icon:"ri:compasses-2-line",group:"Mesure"},{label:"Coordonnées du curseur",id:"mousePosition",name:useControls.MousePosition.id,disabled:useControls.MousePosition.disable,icon:"gpf:coordonnee",group:"Mesure"},{label:"Profil altimétrique",id:"elevationPath",name:useControls.ElevationPath.id,hint:"Afficher l’altitude le long d’un trajet",disabled:useControls.ElevationPath.disable,icon:"ri:line-chart-line",group:"Mesure"},{label:"Annoter la carte",id:"drawing",name:useControls.Drawing.id,hint:"Ajouter des points, lignes, formes ou textes directement sur la carte",disabled:useControls.Drawing.disable,icon:"ri:pencil-line",group:"Dessin"},{label:"Itinéraire",id:"route",name:useControls.Route.id,disabled:useControls.Route.disable,icon:"ri:route-line",group:"Déplacements"},{label:"Trouver une adresse",id:"reverseGeocode",name:useControls.ReverseGeocode.id,hint:"Obtenir l’adresse ou le nom d’un lieu à partir d’un point ou d’une zone sur la carte",disabled:useControls.ReverseGeocode.disable,icon:"ri:signpost-line",group:"Déplacements"},{label:"Zone selon temps de trajet",id:"isocurve",name:useControls.Isocurve.id,hint:"Afficher la zone que l’on peut atteindre en un temps donné depuis un point de départ",disabled:useControls.Isocurve.disable,icon:"ri:map-pin-time-line",group:"Déplacements"},{label:"Mini carte",id:"overview",name:useControls.OverviewMap.id,hint:"Aperçu de la zone pour se répérer facilement",disabled:useControls.OverviewMap.disable,icon:"ri:navigation-line",group:"Affichage"},{label:"Sélecteur de territoires",id:"territories",name:useControls.Territories.id,disabled:useControls.Territories.disable,icon:"fr-icon-france-line",group:"Affichage"},{label:"Zoom",id:"zoom",name:useControls.Zoom.id,disabled:useControls.Zoom.disable,icon:"ri:zoom-in-line",group:"Affichage"},{label:"Plein écran",id:"fullscreen",name:useControls.FullScreen.id,disabled:useControls.FullScreen.disable,icon:"ri:fullscreen-line"},{label:"Barre de Recherche",id:"searchEngine",name:useControls.SearchEngine.id,hint:"Barre de recherche sur la carte",disabled:useControls.SearchEngine.disable},{label:"Scale Line",id:"scaleLine",name:useControls.ScaleLine.id,disabled:useControls.ScaleLine.disable},{label:"Gestionnaire de couches",id:"layerSwitcher",name:useControls.LayerSwitcher.id,disabled:useControls.LayerSwitcher.disable,icon:"fr-icon-stack-line"}
1165,{label:"GetFeatureInfo",id:"getFeatureInfo",name:useControls.GetFeatureInfo.id,disabled:useControls.GetFeatureInfo.disable,icon:"gpf:getfeature-line"},{label:"Légendes",id:"legends",name:useControls.Legends.id,disabled:useControls.Legends.disable,icon:"ri:list-indefinite"},{label:"Partager une carte",id:"share",name:useControls.Share.id,disabled:useControls.Share.disable,icon:"ri:map-2-line"},{label:"Importer des données",id:"layerImport",name:useControls.LayerImport.id,disabled:useControls.LayerImport.disable,icon:"ri:file-upload-line"},{label:"Imprimer une carte",id:"print",name:useControls.Print.id,disabled:useControls.Print.disable,icon:"fr-icon-printer-line"},{label:"Liste des controles",id:"controlList",name:useControls.ControlList.id,disabled:useControls.ControlList.disable,icon:"ri:list-check"},{label:"Menu contextuel",id:"contextMenu",name:useControls.ContextMenu.id,disabled:useControls.ContextMenu.disable,icon:"ri:menu-2-line"},{label:"Signaler une anomalie",id:"reporting",name:useControls.Reporting.id,disabled:useControls.Reporting.disable,icon:"fr-icon-feedback-line"},{label:"Catalogue",id:"catalog",name:useControls.Catalog.id,disabled:useControls.Catalog.disable,icon:"ri:map-2-line"},{label:"Visionneuse Panoramax",id:"panoramax",name:useControls.Panoramax.id,disabled:useControls.Panoramax.disable,hint:"Explorez les lieux photographiés et visionnez les photos",icon:"gpf:panoramax",group:"Affichage"}].filter(ne=>Object.keys(useControls).includes(ne.name)).filter(ne=>!ne.disabled)}function useControlsExtensionPosition(){return{shareOptions:"top-left",printOptions:"top-right",territoriesOptions:"bottom-left",layerSwitcherOptions:"top-right",legendsOptions:"bottom-left",getFeatureInfoOptions:"top-left",overviewMapOptions:"bottom-left",zoomOptions:"bottom-right",controlListOptions:"top-right",isocurveOptions:"top-right",routeOptions:"top-right",reverseGeocodeOptions:"top-right",fullscreenOptions:"bottom-right",measureLengthOptions:"top-right",measureAreaOptions:"top-right",measureAzimuthOptions:"top-right",elevationPathOptions:"top-right",layerImportOptions:"top-left",mousePositionOptions:"top-right",drawingOptions:"top-right",reportingOptions:"top-left",catalogOptions:"top-right",panoramaxOptions:"bottom-left"}}function useControlsPosition(){let ne=[],ee=[];return useControlsExtensionPosition().shareOptions.includes("left")&&ne.push(useControls.Share.id),useControlsExtensionPosition().shareOptions.includes("right")&&ee.push(useControls.Share.id),useControlsExtensionPosition().printOptions.includes("left")&&ne.push(useControls.Print.id),useControlsExtensionPosition().printOptions.includes("right")&&ee.push(useControls.Print.id),useControlsExtensionPosition().layerSwitcherOptions.includes("left")&&ne.push(useControls.LayerSwitcher.id),useControlsExtensionPosition().layerSwitcherOptions.includes("right")&&ee.push(useControls.LayerSwitcher.id),useControlsExtensionPosition().legendsOptions.includes("left")&&ne.push(useControls.Legends.id),useControlsExtensionPosition().legendsOptions.includes("right")&&ee.push(useControls.Legends.id),useControlsExtensionPosition().routeOptions.includes("left")&&ne.push(useControls.Route.id),useControlsExtensionPosition().routeOptions.includes("right")&&ee.push(useControls.Route.id),useControlsExtensionPosition().isocurveOptions.includes("left")&&ne.push(useControls.Isocurve.id),useControlsExtensionPosition().isocurveOptions.includes("right")&&ee.push(useControls.Isocurve.id),useControlsExtensionPosition().reverseGeocodeOptions.includes("left")&&ne.push(useControls.ReverseGeocode.id),useControlsExtensionPosition().reverseGeocodeOptions.includes("right")&&ee.push(useControls.ReverseGeocode.id),useControlsExtensionPosition().drawingOptions.includes("left")&&ne.push(useControls.Drawing.id),useControlsExtensionPosition().drawingOptions.includes("right")&&ee.push(useControls.Drawing.id),useControlsExtensionPosition().getFeatureInfoOptions.includes("left")&&ne.push(useControls.GetFeatureInfo.id),useControlsExtensionPosition().getFeatureInfoOptions.includes("right")&&ee.push(useControls.GetFeatureInfo.id),useControlsExtensionPosition().territoriesOptions.includes("left")&&ne.push(useControls.Territories.id),useControlsExtensionPosition().territoriesOptions.includes("right")&&ee.push(useControls.Territories.id),useControlsExtensionPosition().measureLengthOptions.includes("left")&&ne.push(useControls.MeasureLength.id),useControlsExtensionPosition().measureLengthOptions.includes("right")&&ee.push(useControls.MeasureLength.id),useControlsExtensionPosition().measureAreaOptions.includes("left")&&ne.push(useControls.MeasureArea.id),useControlsExtensionPosition().measureAreaOptions.includes("right")&&ee.push(useControls.MeasureArea.id),useControlsExtensionPosition().measureAzimuthOptions.includes("left")&&ne.push(useControls.MeasureAzimuth.id),useControlsExtensionPosition().measureAzimuthOptions.includes("right")&&ee.push(useControls.MeasureAzimuth.id),useControlsExtensionPosition().mousePositionOptions.includes("left")&&ne.push(useControls.MousePosition.id),useControlsExtensionPosition().mousePositionOptions.includes("right")&&ee.push(useControls.MousePosition.id),useControlsExtensionPosition().elevationPathOptions.includes("left")&&ne.push(useControls.ElevationPath.id
1165),useControlsExtensionPosition().elevationPathOptions.includes("right")&&ee.push(useControls.ElevationPath.id),useControlsExtensionPosition().layerImportOptions.includes("left")&&ne.push(useControls.LayerImport.id),useControlsExtensionPosition().layerImportOptions.includes("right")&&ee.push(useControls.LayerImport.id),useControlsExtensionPosition().controlListOptions.includes("left")&&ne.push(useControls.ControlList.id),useControlsExtensionPosition().controlListOptions.includes("right")&&ee.push(useControls.ControlList.id),useControlsExtensionPosition().reportingOptions.includes("left")&&ne.push(useControls.Reporting.id),useControlsExtensionPosition().reportingOptions.includes("right")&&ee.push(useControls.Reporting.id),useControlsExtensionPosition().catalogOptions.includes("right")&&ee.push(useControls.Catalog.id),useControlsExtensionPosition().catalogOptions.includes("left")&&ne.push(useControls.Catalog.id),useControlsExtensionPosition().panoramaxOptions.includes("right")&&ee.push(useControls.Panoramax.id),useControlsExtensionPosition().panoramaxOptions.includes("left")&&ne.push(useControls.Panoramax.id),{left:ne,right:ee}}function useControlsOptions(){const ne=useDataStore();return{catalog:{id:"22",position:useControlsExtensionPosition().catalogOptions,gutter:!0,listable:!1,titlePrimary:"Catalogue de cartes",layerLabel:"title",layerThumbnail:!0,size:"xl",tabHeightAuto:!1,addToMap:!1,optimisation:"on-demand",search:{display:!1,criteria:["name","title","description","producer","thematic"]},categories:[{title:"Cartes de référence",id:"base",order:!1,featured:!0,filter:{field:"base",value:"true"}},{title:"Toutes les cartes",id:"data",search:!0,items:[{title:"Thème",default:!0,order:!0,section:!0,icon:!0,filter:{field:"thematic",value:"*"}},{title:"Producteur",order:!0,section:!0,icon:!1,filter:{field:"producer",value:"*"}}]}],configuration:{type:"json",data:{layers:ne.getLayers(),topics:ne.getTopics(),featured:ne.getFeatured()}}},overviewMap:{id:"7",collapsed:!1,position:useControlsExtensionPosition().overviewMapOptions,layers:[new LayerWMTS({layer:"GEOGRAPHICALGRIDSYSTEMS.PLANIGNV2",configuration:{...ne.getLayerByName("GEOGRAPHICALGRIDSYSTEMS.PLANIGNV2","WMTS"),params:ne.getLayerParamsByName("GEOGRAPHICALGRIDSYSTEMS.PLANIGNV2","WMTS")}})]}}}var defaultControls=useDefaultControls();const DEFAULT={LAYERS:"GEOGRAPHICALGRIDSYSTEMS.PLANIGNV2$GEOPORTAIL:OGC:WMTS(1;1;1;0)",CONTROLS:defaultControls.toString(),X:289739.8968702704,Y:5859851607344459e-9,LON:2.602777,LAT:46.493888,ZOOM:6},NAMESPACE$1="cartes.gouv.fr",ns$1=(ne=>NAMESPACE$1+"."+ne),useMapStore=defineStore("map",()=>{const ne=inject("emitter");let ee={};try{var te=useUrlParams(),st=DEFAULT.CONTROLS.split(",");const er=te.permalink;er==="yes"&&Object.keys(localStorage).forEach(function(Tn){Tn.startsWith(NAMESPACE$1)});for(const Tn in te)if(Object.prototype.hasOwnProperty.call(te,Tn)){if(Tn==="permalink"||Tn==="redirect")continue;if(Tn==="controls"){var ot=te[Tn].split(",");st.forEach(function(Dn){ot.includes(Dn)||(te[Tn]=te[Tn]+","+Dn)})}var ct=te[Tn];if(Tn==="layers"&&er==="no"){var ut=localStorage.getItem(ns$1(Tn)),dt=ut.split(",").filter(Dn=>Dn!==""),ht=ct.split(",").filter(Dn=>Dn!==""),ft=ht.map(Dn=>Dn.substring(0,Dn.indexOf("(")));dt=dt.filter(Dn=>{var $n=Dn.substring(0,Dn.indexOf("("));return!ft.includes($n)});var pt=dt.map((Dn,$n)=>{var jn=Dn.substring(0,Dn.indexOf("(")),zn=Dn.substring(Dn.indexOf("(")+1,Dn.indexOf(")")),Jn=zn.split(";");return Jn[0]=$n+1,jn+"("+Jn.join(";")+")"}),mt=pt.length+1,yt=ht.map((Dn,$n)=>{var jn=Dn.substring(0,Dn.indexOf("(")),zn=Dn.substring(Dn.indexOf("(")+1,Dn.indexOf(")")),Jn=zn.split(";");return Jn[0]=mt+$n,jn+"("+Jn.join(";")+")"});ct=pt.concat(yt).join(",")}localStorage.setItem(ns$1(Tn),ct)}}catch(er){console.error(er)}setTimeout(()=>{var er=localStorage.getItem(ns$1("geolocation"));if(typeof er=="string"&&er!==""){var Tn=er.split(",");ne.dispatchEvent("searchengineadvanced:geolocation:displayed",{position:Tn})}},500);var vt=useStorage(ns$1("zoom"),DEFAULT.ZOOM),_t=useStorage(ns$1("x"),DEFAULT.X),bt=useStorage(ns$1("y"),DEFAULT.Y),xt=useStorage(ns$1("lon"),DEFAULT.LON),Mt=useStorage(ns$1("lat"),DEFAULT.LAT),Ot=useStorage(ns$1("geolocation"),""),kt=useStorage(ns$1("territories"),""),Nt=useStorage(ns$1("noLoginInformation"),!1),Gt=computed(()=>location.search.includes("fromgpp=1")||location.search.includes("redirect=geoide")),Bt=()=>location.search.includes("permalink=yes"),Ut=computed(()=>{var er="",Tn=location.pathname.slice(-1),Dn=Tn==="/"?location.pathname.slice(0,-1):location.pathname,$n=Dn.replace(/\/logout|\/login/,""),jn=location.origin+$n.replace("/embed","");if(er=`${jn}/?c=${Ht.value}&z=${Math.round(vt.value)}`,Ot.value!==""){var zn=Array.isArray(Ot.value)?Ot.value:Ot.value.split(",");zn=zn.map(Jn=>Number(Jn).toFixed(6)).join(","),er+=`&p=${zn}`}return er+=ai.value.length>0?`&l=${zt.value}&d=${ai.value.replace(/%26s%3D1/g,"")}`:`&l=${zt.value}`,er+"&permalink=yes"}),Vt=computed(()=>{var er="",Tn=location.pathname.slice(-1),Dn=Tn==="/"?location.pathname.slice(0,-1):location.pathname,$n=Dn.replace(/\/logout|\/login/,""),jn=location.origin+($n.includes("/embed")?$n:$n+"/embed");if(er=`${jn}?c=${Ht.value}&z=${Math.round(vt.value)}`,Ot.value!==""){var zn=Array.isArray(Ot.value)?Ot.value:Ot.value.split(",");zn=zn.map(Jn=>Number(Jn).toFixed(6)).join(","),er+=`&p=${zn}`}return er+=ai.value.length>0?`&l=${zt.value}&d=${ai.value.replace(/%26s%3D1/g,"")}`:`&l=${zt.value}`,er+"&permalinkShare=yes"}),Ht=computed(()=>[xt.value.toFixed(6),Mt.value.toFixed(6)]),zt=useStorage(ns$1("layers"),DEFAULT.LAYERS,localStorage,{listenToStorageChanges:!1});if(!zt.value){var jt=DEFAULT.LAYERS.split(",").filter(function(er){return!!er});for(let er=0;er<jt.length;er++){const Tn=/\(.*\)/gm;var Wt=jt[er].replace(Tn,""),Jt=jt[er].match(Tn)||null;Wt&&Zt(Wt,Jt)}}var Qt=useStorage(ns$1("controls"),DEFAULT.CONTROLS,localStorage,{listenToStorageChanges:!1});if(!Qt.value){var oi=DEFAULT.CONTROLS.split(",").filter(function(er){return!!er});for(let er=0;er<oi.length;er++)Rn(oi[er])}var ai=useStorage(ns$1("bookmarks"),"",localStorage,{listenToStorageChanges:!1});ai.value?ai.value=ai.value.replace(/%26s%3D1/g,""):ai.value="",localStorage.setItem(ns$1("center"),Ht.value),localStorage.setItem(ns$1("permalink"),Ut.value),localStorage.setItem(ns$1("permalinkShare"),Vt.value),watch(Ut,()=>{localStorage.setItem(ns$1("permalink"),Ut.value.toString())}),watch(Vt,()=>{localStorage.setItem(ns$1("permalinkShare"),Vt.value.toString())}),watch(Ht,()=>{localStorage.setItem(ns$1("center"),Ht.value.toString())});function xn(){return ee}function An(er){ee=er}function Nn(){return zt.value.split(",").map(function(er){const Tn=/\(.*\)/gm;return er.replace(Tn,"")}).filter(er=>er!=="")}function Xt(){zt.value=""}function Zt(er,Tn){if(er&&!Nn().includes(er)){var Dn=zt.value===""?[]:zt.value.split(",");Dn.push(Tn?er+Tn:er+"(-1;1;1;0)"),zt.value=Dn.toString()}}function Kt(er){const Tn=Nn().indexOf(er);if(Tn!==-1){var Dn=zt.value.split(",");Dn.splice(Tn,1),zt.value=Dn.toString()}}function ti(er,Tn){const Dn=Nn().indexOf(er);if(Dn!==-1){var $n=zt.value.split(","),jn=$n[Dn],zn=jn.substring(jn.indexOf("(")+1,jn.indexOf(")")),Jn=zn.split(";");for(const rs in Tn)if(Object.prototype.hasOwnProperty.call(Tn,rs)){const os=Tn[rs];rs==="position"&&(Jn[0]=os),rs==="opacity"&&(Jn[1]=os),rs==="visible"&&(Jn[2]=+os),rs==="grayscale"&&(Jn[3]=+os),rs==="style"&&(Jn[4]=os)}zt.value=zt.value.replace($n[Dn],er+"("+Jn.join(";")+")")}}function qt(er){if(er){var Tn=[];for(let zn=0;zn<er.length;zn++){const Jn=er[zn],rs=Nn().indexOf(Jn);if(rs!==-1){var Dn=zt.value.split(",")[rs],$n=Dn.substring(Dn.indexOf("(")+1,Dn.indexOf(")")),jn=$n.split(";");jn[0]=zn+1,Dn=Jn+"("+jn.join(";")+")",Tn.push(Dn)}}zt.value=Tn.join(",")}}function ii(er){const Tn=Nn().indexOf(er);if(Tn!==-1){var Dn=zt.value.split(","),$n=Dn[Tn],jn=$n.substring($n.indexOf("(")+1,$n.indexOf(")")),zn=jn.split(";");return{position:Number(zn[0]),opacity:Number(zn[1]),visible:!!Number(zn[2]),grayscale:!!Number(zn[3]),style:zn[4]}}}function wn(){return ai.value.split(",").filter(er=>er!=="")}function ni(){return ai.value.split(",").map(er=>decodeURIComponent(er).split("?")[0]).filter(er=>er!=="")}function Cn(){return ai.value.split(",").map(er=>{var Tn=decodeURIComponent(er).split("?")[1],Dn=new URLSearchParams(Tn),$n=Dn.get("i");return $n||($n=decodeURIComponent(er).split("?")[0].split(".")[0]),$n}).filter(er=>er!=="")}function Ln(er){if(er){var Tn=decodeURIComponent(er).split("?")[0];if(!ni().includes(Tn)){var Dn=ai.value===""?[]:ai.value.split(","),$n=encodeURIComponent(er);Dn.push($n),ai.value=Dn.toString()}}}function Un(er){var Tn=decodeURIComponent(er).split("?")[0];const Dn=ni().indexOf(Tn);if(Dn!==-1){var $n=ai.value.split(",");$n.splice(Dn,1),ai.value=$n.toString()}}function Pn(er){const Tn=Cn().indexOf(er);if(Tn!==-1){var Dn=ai.value.split(",");Dn.splice(Tn,1),ai.value=Dn.toString()}}function Mn(er){var Tn=er.split("?")[0];const Dn=ni().indexOf(Tn);if(Dn!==-1){var $n=ai.value.split(",");$n[Dn]=encodeURIComponent(er),ai.value=$n.toString()}}function Yt(er,Tn){const Dn=Cn().indexOf(er);if(Dn!==-1){var $n=ai.value.split(","),jn=decodeURIComponent($n[Dn]),zn=new URLSearchParams(jn.split("?")[1]);for(const Jn in Tn)if(Object.prototype.hasOwnProperty.call(Tn,Jn)){const rs=Tn[Jn];zn.set(Jn,rs)}$n[Dn]=encodeURIComponent(jn.split("?")[0]+"?"+zn.toString()),ai.value=$n.toString()}}function ri(er){const Tn=new Map;if(ni().indexOf(er.split("?")[0])!==-1){var $n=new URLSearchParams(er.split("?")[1]);
1165$n.forEach((jn,zn)=>{Tn.set(zn,jn)})}return Object.fromEntries(Tn.entries())}function Sn(){return Qt.value.split(",").filter(function(er){return!!er})}function On(){Qt.value=""}function Rn(er){if(!Sn().includes(er)){var Tn=Qt.value===""?[]:Qt.value.split(",");Tn.push(er),Qt.value=Tn.toString()}}function Bn(er){const Tn=Sn().indexOf(er);if(Tn!==-1){var Dn=Qt.value.split(",");Dn.splice(Tn,1),Qt.value=Dn.toString()}}function Vn(){if(!kt.value)return[];try{return JSON.parse(kt.value)}catch{return kt.value="",localStorage.removeItem(ns$1("territories")),[]}}function Wn(){return Vn()}function Gn(er){if(er){var Tn=Vn();Tn.find(Dn=>Dn.id===er.id)||(Tn.push(er),kt.value=JSON.stringify(Tn))}}function Hn(er){if(er){var Tn=Vn(),Dn=Tn.filter($n=>$n.id!==er.id);kt.value=JSON.stringify(Dn)}}function kn(er){!er||er.length===0||(kt.value=JSON.stringify(er))}return{map:ee,layers:zt,controls:Qt,bookmarks:ai,zoom:vt,center:Ht,x:_t,y:bt,lon:xt,lat:Mt,permalink:Ut,permalinkShare:Vt,geolocation:Ot,isRedirect:Gt,isPermalink:Bt,noLoginInformation:Nt,getTerritories:Wn,addTerritory:Gn,removeTerritory:Hn,addTerritories:kn,getMap:xn,setMap:An,getLayers:Nn,cleanLayers:Xt,addLayer:Zt,removeLayer:Kt,updateLayerProperty:ti,updateLayerPosition:qt,getLayerProperty:ii,getBookmarks:wn,getBookmarksByID:Cn,addBookmark:Ln,removeBookmark:Un,removeBookmarkByID:Pn,updateBookmark:Mn,updateBookmarkPropertyByID:Yt,getBookmarkProperty:ri,getControls:Sn,cleanControls:On,addControl:Rn,removeControl:Bn}});function useBaseUrl(){return window.__ENV__.VITE_GPF_BASE_URL_EXTERNAL||location.origin}const _hoisted_1$7={class:"content"},_hoisted_2$5={key:0,class:"checkbox-container fr-mt-2v"},_sfc_main$a={__name:"Alert",props:{type:{type:String,required:!0},title:{type:String,required:!0},small:{type:Boolean,default:!1},dismissible:{type:Boolean,default:!1}},emits:["dismiss"],setup(ne,{emit:ee}){let te=ee,st=ref$1(!1),ot=()=>{st.value=!0,ct.value&&ut()},ct=ref$1(!1),ut=()=>te("dismiss");return(dt,ht)=>{const ft=Dt,pt=Ve$2;return openBlock(),createBlock(pt,{class:normalizeClass({"fr-alert--dismissible":ne.dismissible}),type:ne.type,title:ne.title,small:ne.small,closeable:"",closed:unref(st),onClose:unref(ot)},{default:withCtx(()=>[createBaseVNode("div",_hoisted_1$7,[renderSlot(dt.$slots,"default",{},void 0,!0)]),ne.dismissible?(openBlock(),createElementBlock("div",_hoisted_2$5,[createVNode(ft,{modelValue:unref(ct),"onUpdate:modelValue":ht[0]||(ht[0]=mt=>isRef(ct)?ct.value=mt:ct=mt),class:"fr-mt-8w",value:"valeur 1",name:"checkbox-simple",label:"Ne plus afficher",small:"",inline:""},null,8,["modelValue"])])):createCommentVNode("",!0)]),_:3},8,["class","type","title","small","closed","onClose"])}}},Alert=_export_sfc(_sfc_main$a,[["__scopeId","data-v-c5b04f3e"]]),_hoisted_1$6={class:"alerts"},_hoisted_2$4=["href"],_hoisted_3$2=["href"],_sfc_main$9={__name:"Alerts",setup(ne){let ee=useAppStore(),te=useDataStore(),st=useMapStore(),ot=useServiceStore(),ct=useBaseUrl()+"/explorer-les-carteslogin";const ut=ref$1(!1),dt=computed(()=>ot.authentificateSyncNeeded);watch(dt,yt=>{yt&&(ut.value=!1)});const ht=()=>{ut.value=!0,ot.setAuthentificateSyncNeeded(!1),ee.clearDocumentTemporary()};let ft=computed(()=>te.getAlerts().map(vt=>{let _t=vt.link.url;return _t.startsWith("/")&&(_t=useBaseUrl()+vt.link.url),vt.url=_t,vt})),pt=computed(()=>ft.value.filter(yt=>localStorage.getItem(ee.ns("alerts"))?!JSON.parse(localStorage.getItem(ee.ns("alerts"))).includes(yt.id):!0)),mt=yt=>{let vt=[];localStorage.getItem(ee.ns("alerts"))&&(vt=JSON.parse(localStorage.getItem(ee.ns("alerts"))),vt.length>5&&vt.splice(0,2)),vt.push(yt),localStorage.setItem(ee.ns("alerts"),JSON.stringify(vt))};return(yt,vt)=>(openBlock(),createElementBlock("div",_hoisted_1$6,[unref(st).isRedirect?(openBlock(),createBlock(Alert,{key:0,type:"warning",title:"Iframe obsolète"},{default:withCtx(()=>[...vt[1]||(vt[1]=[createBaseVNode("p",null,[createBaseVNode("strong",null,[createTextVNode(" Attention : le lien vers cette carte créée sur le Géoportail ne sera plus fonctionnel à compter du 31/12/2026. Pour le mettre à jour, rendez vous sur notre "),createBaseVNode("a",{href:"https://ignf.github.io/permalink-converter/",target:"_blank"}
1165,"convertisseur de liens !")])],-1)])]),_:1})):createCommentVNode("",!0),unref(dt)?(openBlock(),createBlock(Alert,{key:1,type:"warning",title:"Connexion requise",closed:unref(ut),onClose:vt[0]||(vt[0]=_t=>ht())},{default:withCtx(()=>[vt[2]||(vt[2]=createBaseVNode("p",null,"Connectez-vous pour enregistrer le document temporaire.",-1)),createBaseVNode("p",null,[createBaseVNode("a",{href:unref(ct)},"Se reconnecter",8,_hoisted_2$4)])]),_:1},8,["closed"])):createCommentVNode("",!0),(openBlock(!0),createElementBlock(Fragment,null,renderList(unref(pt),_t=>(openBlock(),createBlock(Alert,{key:`alert-${_t.id}`,type:_t.severity,title:_t.title,dismissible:"",onDismiss:bt=>unref(mt)(_t.id)},{default:withCtx(()=>[createBaseVNode("p",null,[createBaseVNode("strong",null,toDisplayString(_t.description),1),createTextVNode(" - "+toDisplayString(_t.details)+" ",1),createBaseVNode("a",{href:_t.url,title:"ouvre une nouvelle fenêtre",target:"_blank",class:"fr-notice__link"},toDisplayString(_t.link.label),9,_hoisted_3$2)])]),_:2},1032,["type","title","onDismiss"]))),128))]))}};var Ve="https://cartes.gouv.fr";function C(ne,ee){return`${ne}${ee.startsWith("/")?ee:`/${ee}`}`}function He(ne){return ne||Ve}var Ge=ref$1({});function w(){return{open:ne=>{Ge.value[ne]=!0},close:ne=>{delete Ge.value[ne]},isOpen:ne=>!!Ge.value[ne]}}var Ke=w();function qe(ne={}){let ee=He(ne.baseUrl);return{homeLink:C(ee,"/"),descText:"Cartes.gouv.fr est le service public des cartes et données du territoire français. Porté par l’IGN et ses partenaires, il offre à tous un accès à la référence de la cartographie publique et permet à chacun de créer, d’héberger et de publier ses propres données et représentations.",legalLink:C(ee,"/mentions-legales"),personalDataLink:C(ee,"/donnees-personnelles"),cookiesLink:C(ee,"/cookies"),beforeMandatoryLinks:[{label:"Plan du site",href:C(ee,"/plan-du-site")}],mandatoryLinks:[{label:"Accessibilité : partiellement conforme",href:C(ee,"/accessibilite")},{label:"Mentions légales",href:C(ee,"/mentions-legales")},{label:"Conditions générales d’utilisation",href:C(ee,"/cgu")},{label:"Données personnelles",href:C(ee,"/donnees-personnelles")}],afterMandatoryLinks:[{label:"Gestion des cookies",button:!0,to:"/",onclick:()=>Ke.open("cookies")},{label:"Paramètres d’affichage",button:!0,class:"fr-icon-theme-fill fr-link--icon-left",to:"/",onclick:()=>Ke.open("theme")}],ecosystemLinks:[{label:"info.gouv.fr",href:"https://info.gouv.fr"},{label:"service-public.gouv.fr",href:"https://service-public.gouv.fr"},{label:"legifrance.gouv.fr",href:"https://legifrance.gouv.fr"},{label:"data.gouv.fr",href:"https://data.gouv.fr"}],partners:{title:"Nos partenaires",mainPartner:{href:"https://www.ign.fr/",logo:"https://cartes.gouv.fr/img/footer/partenaires/ign.png",name:"IGN"},subPartners:[{href:"https://www.transformation.gouv.fr/",logo:"https://cartes.gouv.fr/img/footer/partenaires/min_fp.jpg",name:"Ministère de la transformation et de la fonction publiques"},{href:"https://www.ecologie.gouv.fr/",logo:"https://cartes.gouv.fr/img/footer/partenaires/min_ecologie.jpg",name:"Ministère de la Transition Écologique et de la Cohésion des Territoires"},{href:"https://cnig.gouv.fr/",logo:"https://cartes.gouv.fr/img/footer/partenaires/logo-rf-cnig.jpg",name:"Conseil national de l’information géolocalisée"}]},newsletterUrl:C(ee,"/lettre-d-information")}}var Je={class:"mb-6v"},Ye={__name:"CgfrFollow",props:{open:{type:Boolean,default:!1},newsletterUrl:{type:String,default:void 0}},setup(ne){let ee=ne;function te(){window.open(ee.newsletterUrl,"_blank")}return(st,ot)=>(openBlock(),createBlock(unref(Sr),{class:normalizeClass(`${ee.open?"":"fr-hidden-lg"}`)},{default:withCtx(()=>[createBaseVNode("div",Je,[createVNode(unref(mr),{title:"Inscrivez-vous à notre lettre d’information",description:"Retrouvez toutes les actualités directement par courriel chaque trimestre.","button-text":"S’inscrire",placeholder:"Votre email","only-callout":"",onClick:te})]),ot[0]||(ot[0]=createBaseVNode("div",{class:"fr-col"},[createBaseVNode("h3",{class:"fr-h5 fr-follow__title"},"Communauté"),createBaseVNode("p",{class:"fr-text--sm fr-follow__desc"}," Rejoignez la communauté Géoplateforme - cartes.gouv.fr pour suivre les actualités et échanger avec les membres. "),createBaseVNode("a",{class:"fr-link",target:"_blank",href:"https://www.expertises-territoires.fr/jcms/pl1_557493/fr/communaute-geoplateforme-et-cartes-gouv"},"Rejoindre la communauté")],-1))]),_:1},8,["class"]))}},Xe={class:"cgfr-footer"},Ze={__name:"CgfrFooter",props:{compact:{type:Boolean,default:!1},baseUrl:{type:String,default:void 0}},setup(ne){let ee=ne,te=ref$1(!1),st={label:"Plus d’informations",icon:"fr-icon-arrow-up-s-line"},ot={label:"Fermer",icon:"fr-icon-close-line"},ct=computed(()=>te.value?ot:st),ut=()=>{te.value=!te.value;let ft=te.value?document.body.scrollHeight:0;setTimeout(()=>{window.scrollTo({left:0,top:ft,behavior:ft===0?"auto":"smooth"})},0)},dt=useAttrs(),ht=computed(()=>({...qe({baseUrl:ee.baseUrl}),...dt}));return(ft,pt)=>(openBlock(),createElementBlock(Fragment,null,[createVNode(Ye,{open:unref(te),"newsletter-url":ht.value.newsletterUrl},null,8,["open","newsletter-url"]),createBaseVNode("div",Xe,[ne.compact?(openBlock(),createBlock(unref(nt$1),{key:0,class:"btn-toggle","icon-only":!unref(te),label:unref(ct).label,"aria-label":unref(te)?null:unref(ct).label,icon:unref(ct).icon,"icon-right":"",tertiary:"","no-outline":"","aria-expanded":unref(te),"aria-controls":"footer",onClick:ut},null,8,["icon-only","label","aria-label","icon","aria-expanded"])):createCommentVNode("",!0),createVNode(unref(ei),mergeProps(ht.value,{class:{"fr-footer--compact":ne.compact,"fr-footer--compacted":ne.compact&&!unref(te)}}),null,16,["class"])])],64))}},T={__name:"CgfrModal",props:{name:{type:String,required:!0},title:{type:String,required:!0},size:{type:String,default:"md"},actions:{type:Array,default:void 0}},emits:["close"],setup(ne,{emit:ee}){let te=ne,st=ee,ot=w(),ct=computed(()=>ot.isOpen(te.name)),ut=()=>{ot.close(te.name),st("close")};return(dt,ht)=>(openBlock(),createBlock(unref(xo),{opened:ct.value,title:te.title,size:te.size,actions:te.actions,onClose:ut},{default:withCtx(()=>[renderSlot(dt.$slots,"default")]),_:3},8,["opened","title","size","actions"]))}},Qe="data:image/svg+xml,%3csvg%20width='80px'%20height='80px'%20viewBox='0%200%2080%2080'%20xmlns='http://www.w3.org/2000/svg'%3e%3cstyle%3e%20.fr-artw
1165ork-decorative%20{%20fill:%20%23ECECFF;%20}%20.fr-artwork-minor%20{%20fill:%20%23E1000F;%20}%20.fr-artwork-major%20{%20fill:%20%23000091;%20}%20%3c/style%3e%3csymbol%20id='artwork-decorative'%3e%3cpath%20d='M19,72c-0.5514,0-1-0.4486-1-1s0.4486-1,1-1s1,0.4486,1,1S19.5514,72,19,72z%20M31,10c-0.5514,0-1-0.4486-1-1%20c0-0.55145,0.4486-1,1-1s1,0.44855,1,1C32,9.5514,31.5514,10,31,10z%20M67,66c-0.5514,0-1-0.4486-1-1s0.4486-1,1-1s1,0.4486,1,1%20S67.5514,66,67,66z%20M67,16c-0.5514,0-1-0.4486-1-1s0.4486-1,1-1s1,0.4486,1,1S67.5514,16,67,16z%20M9,32c-0.5514,0-1-0.4486-1-1%20s0.4486-1,1-1s1,0.4486,1,1S9.5514,32,9,32z'/%3e%3c/symbol%3e%3csymbol%20id='artwork-minor'%3e%3cpath%20d='M32.4453,44.1679c0.4595-0.3063,1.0804-0.1821,1.3867,0.2774C35.3156,46.6706,38.5061,48,41,48%20c0.5523,0,1,0.4477,1,1s-0.4477,1-1,1c-3.1061,0-6.931-1.5937-8.8321-4.4453C31.8616,45.0952,31.9858,44.4743,32.4453,44.1679z'/%3e%3c/symbol%3e%3csymbol%20id='artwork-major'%3e%3cpath%20d='M39.00671,20.04651L39,19.92981v-5.47369c0-0.55225,0.44769-1,1-1c0.51282,0,0.93549,0.38611,0.99329,0.88336%20L41,14.45612v5.47369c0,0.55231-0.44769,1-1,1C39.48718,20.92981,39.06451,20.54382,39.00671,20.04651z%20M19.37927,39H14%20l-0.11658,0.00671C13.38599,39.06451,13,39.48718,13,40c0,0.55231,0.44769,1,1,1h5.37927l0.11664-0.00671%20c0.49738-0.0578,0.88336-0.48047,0.88336-0.99329C20.37927,39.44769,19.93158,39,19.37927,39z%20M66,39h-5.37927l-0.11664,0.00671%20c-0.49738,0.0578-0.88336,0.48047-0.88336,0.99329c0,0.55231,0.44769,1,1,1H66l0.11658-0.00671C66.61401,40.93549,67,40.51282,67,40%20C67,39.44769,66.55231,39,66,39z%20M40,59.07019c-0.55231,0-1,0.44769-1,1v5.47369l0.00671,0.11664%20c0.0578,0.49725,0.48047,0.88336,0.99329,0.88336c0.55231,0,1-0.44769,1-1v-5.47369l-0.00671-0.11658%20C40.93549,59.45618,40.51282,59.07019,40,59.07019z%20M24.04541,53.89557l-1.79309,1.82452l-0.0824,0.09503%20c-0.30164,0.3949-0.26892,0.96185,0.09467,1.31915c0.39392,0.38715,1.02704,0.38159,1.41412-0.01227l1.79309-1.82458l0.0824-0.09491%20c0.30157-0.3949,0.26898-0.96191-0.0946-1.31921C25.06561,53.49622,24.4325,53.50171,24.04541,53.89557z%20M55.95459,24.27991%20l1.79309-1.82458l0.0824-0.09491c0.30164-0.3949,0.26892-0.96191-0.09467-1.31921c-0.39392-0.38721-1.02704-0.38159-1.41412,0.01233%20l-1.79321,1.82446L54.4458,22.9729c-0.30157,0.39502-0.26898,0.96191,0.0946,1.31927%20C54.93439,24.67932,55.5675,24.67383,55.95459,24.27991z%20M23.67871,21.05353l-0.09338-0.08405%20c-0.38971-0.30847-0.95715-0.28571-1.32074,0.07172c-0.39386,0.38708-0.39941,1.0202-0.01227,1.41412l1.79309,1.82458%20l0.09351,0.08398c0.38959,0.30841,0.95697,0.28558,1.32068-0.07172c0.39392-0.38708,0.39941-1.02026,0.01221-1.41418%20L23.67871,21.05353z%20M55.95459,53.89557l-0.09351-0.08398c-0.38959-0.30847-0.95697-0.28571-1.32068,0.07172%20c-0.39392,0.38708-0.39941,1.0202-0.01233,1.41412l1.79321,1.82458l0.09338,0.08398%20c0.38971,0.30841,0.95715,0.28558,1.32074-0.07172c0.39386-0.38708,0.39941-1.02026,0.01227-1.41418L55.95459,53.89557z%20M40,26%20c-7.73199,0-14,6.26801-14,14c0,1.91528,0.38538,3.77838,1.12323,5.50281c0.21716,0.50781,0.80499,0.74329,1.31268,0.52606%20c0.50781-0.21729,0.74329-0.80499,0.52606-1.31274C28.33002,43.2392,28,41.64362,28,40c0-6.62738,5.37262-12,12-12s12,5.37262,12,12%20s-5.37262,12-12,12c-3.5495,0-6.84521-1.54871-9.11212-4.19141c-0.35956-0.41907-0.99091-0.46747-1.4101-0.10791%20c-0.41919,0.35962-0.46747,0.99091-0.10791,1.4101C32.01282,52.19177,35.86072,54,40,54c7.73199,0,14-6.26801,14-14%20S47.73199,26,40,26z'/%3e%3c/symbol%3e%3cuse%20class='fr-artwork-decorative'%20href='%23artwork-decorative'/%3e%3cuse%20class='fr-artwork-minor'%20href='%23artwork-minor'/%3e%3cuse%20class='fr-artwork-major'%20href='%23artwork-major'/%3e%3c/svg%3e",$e="data:image/svg+xml,%3csvg%20width='80px'%20height='80px'%20viewBox='0%200%2080%2080'%20xmlns='http://www.w3.org/2000/svg'%3e%3cstyle%3e%20.fr-artwork-decorative%20{%20fill:%20%23ECECFF;%20}%20.fr-artwork-minor%20{%20fill:%20%23E1000F;%20}%20.fr-artwork-major%20{%20fill:%20%23000091;%20}%20%3c/style%3e%3csymbol%20id='artwork-decorative'%3e%3cpath%20d='M67,16c-0.5514,0-1-0.4486-1-1s0.4486-1,1-1s1,0.4486,1,1S67.5514,16,67,16z%2
11650M19,72c-0.5514,0-1-0.4486-1-1%20s0.4486-1,1-1s1,0.4486,1,1S19.5514,72,19,72z%20M31,10c-0.5514,0-1-0.4486-1-1c0-0.55145,0.4486-1,1-1s1,0.44855,1,1%20C32,9.5514,31.5514,10,31,10z%20M69,60c-0.5514,0-1-0.4486-1-1s0.4486-1,1-1s1,0.4486,1,1S69.5514,60,69,60z%20M45,70%20c-0.5514,0-1-0.4486-1-1s0.4486-1,1-1s1,0.4486,1,1S45.5514,70,45,70z%20M9,32c-0.5514,0-1-0.4486-1-1s0.4486-1,1-1s1,0.4486,1,1%20S9.5514,32,9,32z'/%3e%3c/symbol%3e%3csymbol%20id='artwork-minor'%3e%3cpath%20d='M41,30c-0.5523,0-1,0.4477-1,1s0.4477,1,1,1s1-0.4477,1-1S41.5523,30,41,30z%20M59,38c-0.5523,0-1,0.4477-1,1%20s0.4477,1,1,1s1-0.4477,1-1S59.5523,38,59,38z%20M55,38c0.5523,0,1,0.4477,1,1c0,0.5128-0.386,0.9355-0.8834,0.9933L55,40h-2%20c-0.5523,0-1-0.4477-1-1c0-0.5128,0.386-0.9355,0.8834-0.9933L53,38H55z%20M48,31c0-0.5523-0.4477-1-1-1h-2l-0.1166,0.0067%20C44.386,30.0645,44,30.4872,44,31c0,0.5523,0.4477,1,1,1h2l0.1166-0.0067C47.614,31.9355,48,31.5128,48,31z'/%3e%3c/symbol%3e%3csymbol%20id='artwork-major'%3e%3cpath%20d='M59.90668,47.08899c-2.4024,7.6662-9.49188,12.91333-17.52948,12.91333%20c-10.14819,0-18.37512-8.26733-18.37512-18.46643c0-7.85461,4.93793-14.82916,12.2738-17.42346%20c1.87921-0.66461,3.32355,1.68457,1.9613,3.1073c-2.30841,2.41095-3.5921,5.59399-3.5921,8.95575%20c0,6.76794,5.2041,12.37939,11.8927,12.89435c0.5506,0.04236,0.96271,0.52319,0.92035,1.07379%20c-0.04242,0.55066-0.52325,0.96271-1.07385,0.92029c-7.72986-0.59503-13.7392-7.07483-13.7392-14.88843%20c0-3.61078,1.28583-7.04816,3.61322-9.75067l0.22668-0.25684L36.2854,26.2464c-6.06519,2.4425-10.13849,8.30981-10.2796,14.9339%20l-0.00372,0.35559c0,9.09668,7.33374,16.46643,16.37512,16.46643c6.92578,0,13.0639-4.375,15.39703-10.84619l0.06879-0.19916%20l-0.19684,0.18811c-1.96747,1.82373-4.37738,3.07861-6.99451,3.63629l-0.39404,0.07843%20c-0.54303,0.1004-1.0647-0.25842-1.1651-0.80151c-0.10052-0.54309,0.25836-1.0647,0.80145-1.16516%20c2.62329-0.48511,5.02313-1.77515,6.89282-3.70404C58.17792,43.75378,60.4975,45.2038,59.90668,47.08899z%20M15,58%20c-0.55231,0-1,0.44769-1,1s0.44769,1,1,1s1-0.44769,1-1S15.55231,58,15,58z%20M55,28h2l0.11658-0.00671%20C57.61401,27.93549,58,27.51282,58,27c0-0.55231-0.44769-1-1-1h-2l-0.11658,0.00671C54.38599,26.06451,54,26.48718,54,27%20C54,27.55231,54.44769,28,55,28z%20M23,58h-4l-0.11658,0.00671C18.38599,58.06451,18,58.48718,18,59c0,0.55231,0.44769,1,1,1h4%20l0.11658-0.00671C23.61401,59.93549,24,59.51282,24,59C24,58.44769,23.55231,58,23,58z'/%3e%3c/symbol%3e%3cuse%20class='fr-artwork-decorative'%20href='%23artwork-decorative'/%3e%3cuse%20class='fr-artwork-minor'%20href='%23artwork-minor'/%3e%3cuse%20class='fr-artwork-major'%20href='%23artwork-major'/%3e%3c/svg%3e",et="data:image/svg+xml,%3csvg%20width='80px'%20height='80px'%20viewBox='0%200%2080%2080'%20xmlns='http://www.w3.org/2000/svg'%3e%3cstyle%3e%20.fr-artwork-decorative%20{%20fill:%20%23ECECFF;%20}%20.fr-artwork-minor%20{%20fill:%20%23E1000F;%20}%20.fr-artwork-major%20{%20fill:%20%23000091;%20}%20%3c/style%3e%3csymbol%20id='artwork-decorative'%3e%3cpath%20d='M19,70%20C19.5514001,70%2020,70.4485529%2020,71%20C20,71.5514001%2019.5514001,72%2019,72%20C18.4485999,72%2
1165018,71.5514001%2018,71%20C18,70.4485529%2018.4485999,70%2019,70%20Z%20M67,64%20C67.5514001,64%2068,64.4485529%2068,65%20C68,65.5514001%2067.5514001,66%2067,66%20C66.4485999,66%2066,65.5514001%2066,65%20C66,64.4485529%2066.4485999,64%2067,64%20Z%20M9,30%20C9.55140011,30%2010,30.4485529%2010,31%20C10,31.5514001%209.55140011,32%209,32%20C8.44859989,32%208,31.5514001%208,31%20C8,30.4485529%208.44859989,30%209,30%20Z%20M67,14%20C67.5514001,14%2068,14.4485529%2068,15%20C68,15.5514001%2067.5514001,16%2067,16%20C66.4485999,16%2066,15.5514001%2066,15%20C66,14.4485529%2066.4485999,14%2067,14%20Z%20M31,8%20C31.5514001,8%2032,8.4485529%2032,9%20C32,9.55140011%2031.5514001,10%2031,10%20C30.4485999,10%2030,9.55140011%2030,9%20C30,8.4485529%2030.4485999,8%2031,8%20Z'/%3e%3c/symbol%3e%3csymbol%20id='artwork-minor'%3e%3cpath%20d='M53.3022726,46.2179257%20C55.3885453,46.936287%2056.5004356,49.216%2055.7820743,51.3022726%20C55.0636806,53.3886394%2052.7840392,54.5004491%2050.6977274,53.7820743%20C50.1755319,53.602268%2049.8979706,53.0331831%2050.077777,52.5109876%20C50.2575833,51.9887921%2050.8266682,51.7112308%2051.3488637,51.8910372%20C52.3907982,52.249804%2053.5322608,51.6930984%2053.8910372,50.6511363%20C54.2497858,49.6092547%2053.693018,48.4677115%2052.6511363,48.1089628%20C51.6566129,47.766521%2050.5712822,48.2582583%2050.1626523,49.2098362%20L50.1089628,49.3488637%20C49.9291565,49.8710592%2049.3600716,50.1486204%2048.8378761,49.9688141%20C48.3156806,49.7890078%2048.0381194,49.2199229%2048.2179257,48.6977274%20C48.936287,46.6114547%2051.216,45.4995644%2053.3022726,46.2179257%20Z%20M38.5,28.669873%20C38.9782926,28.9460154%2039.1421678,29.5576058%2038.8660254,30.0358984%20C38.589883,30.514191%2037.9782926,30.6780662%2037.5,30.4019238%20C36.0681241,29.5752299%2034.2286395,30.0680863%2033.4019238,31.5%20C32.5752659,32.9318134%2033.0681866,34.7714184%2034.5,35.5980762%20C35.8806772,36.3952106%2037.6405381,35.9653389%2038.5056944,34.6497985%20L38.5980762,34.5%20C38.8742186,34.0217074%2039.485809,33.8578322%2039.9641016,34.1339746%20C40.4423942,34.410117%2040.6062694,35.0217074%2040.330127,35.5%20C38.9511844,37.8883986%2035.8883986,38.7090696%2033.5,37.330127%20C31.1116014,35.9511844%2030.2909304,32.8883986%2031.669873,30.5%20C33.0488807,28.1114885%2036.1115515,27.2909016%2038.5,28.669873%20Z'/%3e%3c/symbol%3e%3csymbol%20id='artwork-major'%3e%3cpath%20d='M50.5269163,36%20L53.5540023,36.0032389%20L53.7118701,36.0192783%20C54.3753311,36.1274837%2054.8790978,36.6703501%2054.9433179,37.3329606%20L54.9502497,37.4766667%20L54.9497575,38.2556283%20L54.9532792,38.3854402%20C54.9875177,38.9145788%2055.3096144,39.382001%2055.8267415,39.6222821%20L56.3589595,39.844704%20L56.5621006,39.9350857%20C57.0656241,40.1674193%2057.6606238,40.0869%2058.0907067,39.7364583%20L58.2037206,39.6342233%20L58.8471015,38.997722%20L58.9852821,38.8885185%20C59.5267013,38.5169979%2060.2481195,38.5499976%2060.7557927,38.9616%20L60.8689745,39.0632942%20L63.0104308,41.2110039%20L63.1194248,41.3491972%20C63.4896568,41.8900627%2063.4559877,42.6107511%2063.0451874,43.1176458%20L62.9437048,43.2306472%20L62.3901112,43.7843068%20L62.2968996,43.8824937%20C61.9210294,44.3112114%2061.83203,44.9307116%2062.0794292,45.4630067%20C62.1416541,45.5999195%2062.2025296,45.7417574%2062.2585933,45.8800043%20L62.3850421,46.1999382%20C62.592844,46.6683149%2063.0518718,46.9931671%2063.5729012,47.0432494%20L63.7163952,47.0499972%20L64.6040023,47.0532389%20L64.7618701,47.0692783%20C65.4253311,47.1774837%2065.9290978,47.7203501%2065.9933179,48.3829606%20L66.0002497,48.5266667%20L65.9970108,51.5537526%20L65.9809713,51.7116204
1165%20C65.872766,52.3750815%2065.3298996,52.8788481%2064.667289,52.9430683%20L64.523583,52.95%20L63.7365451,52.9497286%20L63.6094235,52.9521258%20C63.0904558,52.9816915%2062.6219675,53.3001544%2062.3862368,53.7926193%20L62.3278544,53.9311556%20L62.2508328,54.1252243%20C62.1934649,54.2657259%2062.131514,54.4093807%2062.0639497,54.5578426%20C61.8311982,55.0584646%2061.9124725,55.6552321%2062.2664354,56.0870197%20L62.3697005,56.2004934%20L63.0025276,56.8402218%20L63.1117312,56.9784024%20C63.4832518,57.5198216%2063.4502521,58.2412399%2063.0395501,58.7480111%20L62.9380802,58.8609684%20L60.7865874,61.0127194%20L60.648353,61.121455%20C60.1082614,61.489879%2059.3884174,61.4549792%2058.8824007,61.0447687%20L58.7696025,60.9434552%20L58.2173234,60.3911577%20L58.1186946,60.2978947%20C57.6881955,59.9217242%2057.0705235,59.8326208%2056.5405632,60.0776413%20C56.4018439,60.1407088%2056.2593996,60.2018853%2056.1207711,60.2581239%20L55.8003115,60.3847924%20C55.3319348,60.5925943%2055.0070825,61.0516221%2054.9570002,61.5726515%20L54.9502525,61.7161455%20L54.9470108,62.6037526%20L54.9309713,62.7616204%20C54.822766,63.4250815%2054.2798996,63.9288481%2053.617289,63.9930683%20L53.473583,64%20L50.446497,63.9967611%20L50.2886292,63.9807217%20C49.6251682,63.8725163%2049.1214016,63.3296499%2049.0571814,62.6670394%20L49.0502497,62.5233333%20L49.0506864,61.7425515%20L49.0474287,61.6136831%20C49.0143929,61.0881812%2048.6948222,60.6214355%2048.1850394,60.3812533%20L47.6456538,60.1554598%20L47.4550671,60.0707939%20C46.9503443,59.8465767%2046.7229496,59.2556541%2046.9471668,58.7509313%20C47.1553685,58.2822601%2047.67976,58.0527137%2048.1577202,58.2018334%20L48.2670294,58.243031%20L48.4380512,58.3192539%20L48.7675653,58.4586647%20C49.9988471,58.9035022%2050.8670988,60.0026782%2051.025895,61.3128347%20L51.0450218,61.5213902%20L51.0502497,61.713%20L51.0510482,62%20L52.9510482,62%20L52.9502542,61.7179547%20C52.947898,60.4181183%2053.6746528,59.2298089%2054.8335881,58.6328238%20L55.0201261,58.543547%20L55.4518576,58.3706599%20L55.7070001,58.2596392%20C56.8828827,57.7159348%2058.256889,57.8766006%2059.2913304,58.6760659%20L59.4605009,58.8152136%20L59.6077976,58.9539483%20L59.8160482,59.161%20L61.1560482,57.816%20L60.9581805,57.6173861%20C59.9734634,56.6414238%2059.6690044,55.1748408%2060.1662772,53.9103085%20L60.2468962,53.7222306%20L60.3247381,53.5466329%20L60.3954684,53.3785509%20L60.4592624,53.2186543%20C60.9107173,51.9857289%2062.019827,51.1188074%2063.3310999,50.9707838%20L63.5292501,50.9540161%20L63.7132497,50.95%20L64.0010482,50.95%20L64.0010482,49.05%20L63.7182043,49.0499955%20C62.418368,49.0523517%2061.2300585,48.3255968%2060.6330735,47.1666616%20L60.5437967,46.9801236%20L60.4072555,46.6368285%20L60.2622302,46.2982998%20C59.7148042,45.1206701%2059.8751609,43.7419394%2060.6770336,42.7072309%20L60.8166076,42.5380583%20L60.954198,42.392452%20L61.1620482,42.185%20L59.8220482,40.845%20L59.6185319,41.0478372%20C58.6430973,42.0261823%2057.1834106,42.3280047%2055.9243169,41.8365952%20L55.7370429,41.7569199%20L55.565375,41.680409%20L55.2502523,41.5462205%20C54.0092431,41.1052888%2053.1330729,40.0008246%2052.9742566,38.6809273%20L52.9558583,38.4813829%20L52.9502497,38.287%20L52.9510482,38%20L51.0510482,38%20L51.0502452,38.2820453%20C51.0526014,39.5818817%2050.3258465,40.7701911%2049.1669112,41.3671762%20L48.9803732,41.456453%20L48.8147473,41.5231668%20C48.6358223,41.591382%2048.4578067,41.6656823%2048.2876871,41.7430257%20C47.7849237,41.9716028%2047.1920552,41.749331%2046.9634781,41.2465677%20C46.734901,40.7438043%2046.9571729,40.1509358%2047.4599362,39.9223587%20C47.5986554,39.8592912%2047.7410997,39.7981147%2047.8797282,39.7418761%20L48.2001879,39.6152076%20C48.6685646,39.4074057%2048.9934168,38.9483779%2049.0434991,38.4273485%20L49.0502468,38.2838545%20L49.0534885,37.3962474%20L49.069528,37.2383796%20C49.1777334,36.5749185%2049.7205998,36.0711519%2050.3832103,36.0069317%20L50.5269163,36%20Z%20M33.8581608,16%20L37.7371625,16.0032584%20L37.9176113,16.0211833%20C38.6463562,16.1403961%2039.1981521,16.7397383%2039.26428,17.46885%20L39.2709385,17.6162988%20L39.2704493,18.6327298%20L39.2754594,18.8103929%20C39.3274609,19.6164841%2039.8237342,20.3256808%2040.5968816,20.6700753%20L40.7667329,20.7381928%20L41.2594907,20.9461661%20L41.5176435,21.0613421%20C42.2806266,21.4144609%2043.1828145,21.2837852%2043.8237609,20.7375933%20L43.9569621,20.6142171%20L44.7664431,19.8093926%20L44.923613,19.6840677%20C45.5190799,19.2742218%2046.3147462,19.3130205%2046.870756,19.7712979%20L46.9860725,19.8759102%20L49.728071,22.6324778%20L49.8525671,22.7898567%20C50.2581512,23.3841625%2050.2189677,24.1774175%2049.7641453,24.7325824%20L49.6603322,24.8477428%20L48.9406848,25.5698476%20L48.8136739,25.7043714%20C48.252714,26.3461408%2048.1200453,27.2724083%2048.4870326,28.0643545%20C48.5655546,28.2376489%2048.6424175,28.4172825%2048.7137876,28.5938545%20L48.8798937,29.0147398%20C49.1963649,29.7302133%2049.8981601,30.2197092%2050.6890543,30.2805263%20L50.8597874,30.2869233%20L51.9809387,30.2901854%20L52.0806084,30.2982512%20C52.6310936,30.3427992%2053.0412367,30.825169%2052.9966887,31.3756541%20C52.9553226,31.8868189%2052.5364471,32.2769745%2052.0360695,32.2944353%20L51.9192857,32.2917343%20L51.9002738,32.286927%20L50.8616021,32.2869217%20C49.2832256,32.2897914%2047.8416367,31.3988119%2047.1302302,29.9884359%20L47.0378019,29.7929277%20L46.9539291,29.5842089%20C46.8940128,29.4265752%2046.8304323,29.2691851%2046.7659444,29.1182791%20L46.6688769,28.8975632%20C46.0047812,27.4646243%2046.2057961,25.785289%2047.1860352,24.5374225%20L47.331361,24.3621643%20L47.5026703,24.180164%20L47.9779471,23.704%20L45.8399471,21.56%20L45.3739098,22.0256896%20C44.1904786,23.2162477%2042.4149967,23.5785501%2040.8881838,22.9674739%20L40.6905136,22.8822362%20L40.4638827,22.7809945%20L40.0425463,22.6016159%20C38.5401476,22.0661952%2037.4819362,20.7223234%2037.29769,19.1253346%20L37.278023,18.9060467%20L37.2709385,18.6640068%20L37.2709471,18%20L34.2439471,18%20L34.243718,18.6581372%20C34.2465746,20.2387516%2033.3590502,21.6834123%2031.9523231,22.3971641%20L31.7573133,22.4899076%20L31.5491027,22.5740826%20C31.391621,22.6343043%2031.2346867,22.6981017%2031.0826953,22.7635157%20L30.8589647,22.8626042%20C29.4299128,23.5253707%2027.7580036,23.3229805%2026.5123648,22.3413977%20L26.3373884,22.1958802%20L26.154146,22.0229364%20L25.6859471,21.554%20L23.5459471,23.7%20L24.0079068,24.1646821%20C25.2013888,25.3511366%2025.5650836,27.1368813%2024.9534569,28.6637684%20L24.8681364,28.8613891%20L24.7674036,29.0882717%20L24.5823568,29.528057%20C24.0428198,31.0259851%2022.7033494,32.0798703%2021.1154822,32.2610379%20L20.897467,32.280293%20L20.6589281,32.286927%20L19.9999471,32.287%20L19.9999471,35.33%20L20.6530598,35.3293772%20C22.2314362,35.3265074%2023.6730252,36.2174869%2024.3844316,37.6278629%20L24.47686,37.8233711%20L24.5607327,38.0320899%20C24.620649,38.1897236%2024.6842296,38.3471137%2024.7487174,38.4980197%20L24.845785,38.7187356%20C25.5098806,40.1516745%2025.3088658,41.8310098%2024.3286266,43.0788763%20L24.1833009,43.2541346%20L24.011986,43.4361404%20L23.5399471,43.912%20L25.6799471,46.058%20L26.1455,45.5906092%20C27.3289312,44.4000511%2029.1044131,44.0377487%2030.6311287,44.6487816%20L31.0548613,44.8349986%20L31.4930074,45.0204846%20C32.9873547,45.5619979%2034.0375152,46.9047609%2034.2179407,48.4949704%20L34.2371133,48.7132988%20L34.2439471,49%20L38.0019471,49%20L38.0032128,48.4462735%20L38.0192522,48.2884057%20C38.1274576,47.6249446%2038.670324,47.121178%2039.3329345,47.0569578%20L39.4766405,47.0500261%20L40.2574224,47.0504629%20L40.3862908,47.0472052%20C4
11650.9117927,47.0141693%2041.3785384,46.6945987%2041.6187206,46.1848159%20L41.844514,45.6454303%20L41.9362738,45.4392369%20C42.1690253,44.9386148%2042.0877511,44.3418474%2041.7337882,43.9100598%20L41.630523,43.7965861%20L40.9976959,43.1568576%20L40.8884924,43.0186771%20C40.5169718,42.4772578%2040.5499714,41.7558396%2040.9615739,41.2481664%20L41.0632681,41.1349846%20L43.2098989,38.9944226%20L43.2756708,38.939828%20C43.7006311,38.5870856%2044.3310837,38.6456297%2044.6838261,39.0705899%20C45.0094345,39.4628609%2044.9845976,40.030226%2044.6446071,40.3926333%20L44.5530642,40.4787452%20L44.5557006,40.4709898%20L42.8453675,42.1828874%20L43.042043,42.3796934%20C44.0267602,43.3556557%2044.3312191,44.8222387%2043.8370696,46.0798231%20L43.68072,46.4378276%20L43.5413091,46.7673417%20C43.0964717,47.9986235%2041.9972957,48.8668753%2040.6871392,49.0256714%20L40.4785837,49.0447982%20L40.2869739,49.0500261%20L40.0003675,49.0508874%20L40.0003675,50.9508874%20L40.2820192,50.9500306%20C41.5818555,50.9476744%2042.770165,51.6744293%2043.3671501,52.8333645%20L43.4564269,53.0199026%20L43.5231407,53.1855285%20C43.5685005,53.304505%2043.6166404,53.4233123%2043.6651805,53.5366009%20L43.7379933,53.7017263%20C44.2854193,54.879356%2044.1250627,56.2580867%2043.32319,57.2927952%20L43.1836159,57.4619678%20L43.0460199,57.6075797%20L42.8403675,57.8138874%20L44.5491495,59.522522%20C44.9096326,59.8830068%2044.9373607,60.450238%2044.6323348,60.8425284%20L44.5491459,60.9367355%20C44.188661,61.2972186%2043.6214299,61.3249467%2043.2291395,61.0199208%20L43.1349324,60.9367319%20L40.9946969,58.7904943%20L40.8853386,58.6524627%20C40.5130639,58.111439%2040.5449796,57.3900921%2040.9563133,56.8813703%20L41.0579605,56.7679262%20L41.6101124,56.2157194%20L41.7033239,56.1175324%20C42.0791941,55.6888147%2042.1681935,55.0693145%2041.9207943,54.5370194%20C41.8585694,54.4001066%2041.797694,54.2582688%2041.7416302,54.1200219%20L41.6151815,53.8000879%20C41.4073795,53.3317112%2040.9483518,53.006859%2040.4273224,52.9567767%20L40.2838284,52.950029%20L39.3962212,52.9467872%20L39.2383534,52.9307478%20C38.5748924,52.8225424%2038.0711258,52.279676%2038.0069056,51.6170655%20L37.9999739,51.4733595%20L37.9999471,51%20L33.2437234,51%20C32.7308875,51%2032.3082162,50.6139598%2032.2504511,50.1166211%20L32.2437234,50%20L32.2441575,48.9817543%20L32.2395058,48.8053138%20C32.189302,48.0043017%2031.6969049,47.2960375%2030.9327468,46.9508731%20L30.7649011,46.8825654%20L30.2604424,46.6703304%20L30.0017663,46.5549567%20C29.2387832,46.201838%2028.3365953,46.3325136%2027.6956489,46.8787056%20L27.5624477,47.0020817%20L26.7529667,47.8069062%20L26.5957968,47.9322311%20C26.0003298,48.342077%2025.2046636,48.3032783%2024.6486537,47.8450009%20L24.5333373,47.7403887%20L21.7925568,44.9852941%20L21.6675448,44.827967%20C21.2596077,44.2333195%2021.2968586,43.4393854%2021.7522194,42.8822761%20L21.8561865,42.7666794%20L22.573977,42.0464512%20L22.700988,41.9119274%20C23.2619479,41.270158%2023.3946166,40.3438905%2023.0276292,39.5519444%20C22.9491073,39.3786499%2022.8722444,39.1990163%2022.8008742,39.0224443%20L22.6347682,38.601559%20C22.318297,37.8860855%2021.6165017,37.3965896%2020.8256076,37.3357725%20L20.6548744,37.3293755%20L19.5337231,37.3261134%20L19.3532743,37.3081885%20C18.6245294,37.1889758%2018.0727334,36.5896335%2018.0066056,35.8605218%20L17.9999471,35.713073%20L18.0031665,31.8230478%20L18.0209514,31.6427622%20C18.1394895,30.9137443%2018.7374837,30.3599829%2019.4668605,30.2936105%20L19.6143845,30.286927%20L20.6292872,30.2873664%20L20.8048954,30.2827145%20C21.6012148,30.2325019%2022.3064478,29.7391791%2022.6506521,28.9722301%20L22.7187859,28.8037575%20L22.9303275,28.2978926%20L23.0465264,28.0358928%20C23.4024847,27.2679474%2023.2677458,26.3517786%2022.7111657,25.7050647%20L22.5942455,25.5794384%20L21.7966351,24.7722817%20L21.6718233,24.6148161%20C21.2647426,24.0197778%2021.3031857,23.2257628%2021.7588758,22.6697752%20L21.8628998,22.5544376%20L24.6101235,19.8049758%20L24.7672181,19.6795421%20C25.3622468,19.2693965%2026.1576935,19.3072445%2026.7150191,19.7651446%20L26.8306415,19.8696852%20L27.5467976,20.5878371%20L27.6814234,20.7152194%20C28.3219344,21.276594%2029.2390001,21.4092877%2030.0233168,21.0455595%20C30.1984928,20.9656759%2030.3784403,20.8881594%2030.5550079,20.8163318%20L30.9751272,20.6495126%20C31.6878991,20.3323232%2032.1766082,19.6272899%2032.2373325,18.8317018%20L32.2437197,18.6599409%20L32.2469428,17.5361208%20L32.2647276,17.3558352%20C32.3832657,16.6268173%2032.98126,16.0730559%2033.7106368,16.0066835%20L33.8581608,16%20Z%20M65,30%20C65.5522847,30%2066,30.4477153%2066,31%20C66,31.5128358%2065.6139598,31.9355072%2065.1166211,31.9932723%20L65,32%20L61,32%20C60.4477153,32%2060,31.5522847%2060,31%20C60,30.4871642%2060.3860402,30.0644928%2060.8833789,30.0067277%20L61,30%20L65,30%20Z%20M57,30%20C57.5514001,30%2058,30.4485999%2058,31%20C58,31.5514471%2057.5514001,32%2057,32%20C56.4485999,32%2056,31.5514471%2056,31%20C56,30.4485999%2056.4485999,30%2057,30%20Z'/%3e%3c/symbol%3e%3cuse%20class='fr-artw
1165ork-major'%20href='%23artwork-major'/%3e%3cuse%20class='fr-artwork-minor'%20href='%23artwork-minor'/%3e%3cuse%20class='fr-artwork-major'%20href='%23artwork-major'/%3e%3c/svg%3e",tt={__name:"CgfrModalTheme",setup(ne){let ee=w(),{setScheme:te,scheme:st}=Ce$1(),ot=ref$1(st.value),ct=()=>{te(ot.value)},ut=[{label:"Thème clair",value:"light",id:"fr-radios-theme-light",name:"fr-radios-theme",img:Qe},{label:"Thème sombre",id:"fr-radios-theme-dark",value:"dark",name:"fr-radios-theme",img:$e},{label:"Système",id:"fr-radios-theme-system",value:"system",name:"fr-radios-theme",hint:"Utilise les paramètres sytème.",img:et}];return(dt,ht)=>unref(ee).isOpen("theme")?(openBlock(),createBlock(T,{key:0,name:"theme",title:"Paramètres d’affichage"},{default:withCtx(()=>[createVNode(unref(Xs),{modelValue:ot.value,"onUpdate:modelValue":[ht[0]||(ht[0]=ft=>ot.value=ft),ct],legend:"Choisissez un thème pour personnaliser l’apparence du site.",name:"fr-radios-theme",options:ut},null,8,["modelValue"])]),_:1})):createCommentVNode("",!0)}},nt="/donnees-personnelles",rt={__name:"CgfrModalCookies",emits:["accept-consent","refuse-consent","close-consent"],setup(ne,{emit:ee}){let te=ee,st=w(),ot=ref$1(null),ct=()=>{te("accept-consent"),st.close("cookies")},ut=()=>{te("refuse-consent"),st.close("cookies")};return onUpdated(()=>{if(ot.value){var dt=ot.value.querySelector('button[title="Refuser tous les cookies"]');console.log(dt),dt.classList.add("fr-btn--secondary"),ot.value.querySelector("ul").classList.replace("fr-btns-group--inline-reverse","fr-btns-group--inline")}}),(dt,ht)=>unref(st).isOpen("cookies")?(openBlock(),createBlock(T,{key:0,name:"cookies",title:"Panneau de gestion des cookies"},{default:withCtx(()=>[ht[3]||(ht[3]=createBaseVNode("div",{id:"my-consent-description"},[createBaseVNode("h5",null,"Eulerian Analytics"),createBaseVNode("p",null," En cliquant sur « Tout accepter », vous consentez à l’utilisation des cookies pour nous aider à améliorer notre site web en collectant et en rapportant des informations sur votre utilisation grâce à Eulerian Analytics. "),createBaseVNode("p",null," Si vous n’êtes pas d’accord, veuillez cliquer sur « Tout refuser ». Votre expérience de navigation ne sera pas affectée. ")],-1)),createBaseVNode("div",null,[createBaseVNode("p",{id:"my-consent-buttons",ref_key:"refConsent",ref:ot},[createVNode(unref(Rt),{onAcceptAll:ht[0]||(ht[0]=ft=>ct()),onRefuseAll:ht[1]||(ht[1]=ft=>ut())},{default:withCtx(()=>[ht[2]||(ht[2]=createTextVNode(" Préférences pour tous les services. ",-1)),createBaseVNode("a",{href:nt},"Données personnelles et cookies")]),_:1})],512)])]),_:1})):createCommentVNode("",!0)}},it=[],at=[];(()=>{let ne="lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,3b,f,,w,1j,,,,4,8,4,,3,7,a,2,t,,1m,,,,2,4,8,,9,,a,2,q,,2,2,1l,,4,2,4,2,2,3,3,,u,2,3,,b,2,1l,,4,5,,2,4,,k,2,m,6,,,1m,,,2,,4,8,,7,3,a,2,u,,1n,,,,c,,9,,14,,3,,1l,3,5,3,,4,7,2,b,2,t,,1m,,2,,2,,3,,5,2,7,2,b,2,s,2,1l,2,,,2,4,8,,9,,a,2,t,,20,,4,,2,3,,,8,,29,,2,7,c,8,2q,,2,9,b,6,22,2,r,,,,,,1j,e,,5,,2,5,b,,10,9,,2u,4,,6,,2,2,2,p,2,4,3,g,4,d,,2,2,6,,f,,jj,3,qa,3,t,3,t,2,u,2,1s,2,,7,8,,2,b,9,,19,3,3b,2,y,,3a,3,4,2,9,,6,3,63,2,2,,1m,,,7,,,,,2,8,6,a,2,,1c,h,1r,4,1c,7,,,5,,14,9,c,2,w,4,2,2,,3,1k,,,2,3,,,3,1m,8,2,2,48,3,,d,,7,4,,6,,3,2,5i,1m,,5,ek,,5f,x,2da,3,3x,,2o,w,fe,6,2x,2,n9w,4,,a,w,2,28,2,7k,,3,,4,,p,2,5,,47,2,q,i,d,,12,8,p,b,1a,3,1c,,2,4,2,2,13,,1v,6,2,2,2,2,c,,8,,1b,,1f,,,3,2,2,5,2,,,16,2,8,,6m,,2,,4,,fn4,,kh,g,g,g,a6,2,gt,,6a,,45,5,1ae,3,,2,5,4,14,3,4,,4l,2,fx,4,ar,2,49,b,4w,,1i,f,1k,3,1d,4,2,2,1x,3,10,5,,8,1q,,c,2,1g,9,a,4,2,,2n,3,2,,,2,6,,4g,,3,8,l,2,1l,2,,,,,m,,e,7,3,5,5f,8,2,3,,,n,,29,,2,6,,,2,,,2,,2,6j,,2,4,6,2,,2,r,2,2d,8,2,,,2,2y,,,,2,6,,,2t,3,2,4,,5,77,9,,2,6t,,a,2,,,4,,40,4,2,2,4,,w,a,14,6,2,4,8,,9,6,2,3,1a,d,,2,ba,7,,6,,,2a,m,2,7,,2,,2,3e,6,3,,,2,,7,,,20,2,3,,,,9n,2,f0b,5,1n,7,t4,,1r,4,29,,f5k,2,43q,,,3,4,5,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,79,7,c5,4,15s,7,31,7,240,5,gx7k,2o,3k,6o".split(",").map(ee=>ee?parseInt(ee,36):1);for(let ee=0,te=0;ee<ne.length;ee++)(ee%2?at:it).push(te+=ne[ee])})();
vendor: 11,207 bytes, line 1165
1165var M=(function(ne){return ne[ne.Simple=0]="Simple",ne[ne.TrackDel=1]="TrackDel",ne[ne.TrackBefore=2]="TrackBefore",ne[ne.TrackAfter=3]="TrackAfter",ne})(M||(M={})),tn;try{tn=RegExp("[\\p{Alphabetic}\\p{Number}_]","u")}catch{}M.TrackDel;function on(ne,ee){return ne==ee||ne.constructor==ee.constructor&&ne.eq(ee)}var sn=class Ku{constructor(ee,te,st){this.from=ee,this.to=te,this.value=st}static create(ee,te,st){return new Ku(ee,te,st)}};function cn(ne,ee){return ne.from-ee.from||ne.value.startSide-ee.value.startSide}var ln=class Yu{constructor(ee,te,st,ot){this.from=ee,this.to=te,this.value=st,this.maxPoint=ot}get length(){return this.to[this.to.length-1]}findIndex(ee,te,st,ot=0){let ct=st?this.to:this.from;for(let ut=ot,dt=ct.length;;){if(ut==dt)return ut;let ht=ut+dt>>1,ft=ct[ht]-ee||(st?this.value[ht].endSide:this.value[ht].startSide)-te;if(ht==ut)return ft>=0?ut:dt;ft>=0?dt=ht:ut=ht+1}}between(ee,te,st,ot){for(let ct=this.findIndex(te,-1e9,!0),ut=this.findIndex(st,1e9,!1,ct);ct<ut;ct++)if(ot(this.from[ct]+ee,this.to[ct]+ee,this.value[ct])===!1)return!1}map(ee,te){let st=[],ot=[],ct=[],ut=-1,dt=-1;for(let ht=0;ht<this.value.length;ht++){let ft=this.value[ht],pt=this.from[ht]+ee,mt=this.to[ht]+ee,yt,vt;if(pt==mt){let _t=te.mapPos(pt,ft.startSide,ft.mapMode);if(_t==null||(yt=vt=_t,ft.startSide!=ft.endSide&&(vt=te.mapPos(pt,ft.endSide),vt<yt)))continue}else if(yt=te.mapPos(pt,ft.startSide),vt=te.mapPos(mt,ft.endSide),yt>vt||yt==vt&&ft.startSide>0&&ft.endSide<=0)continue;(vt-yt||ft.endSide-ft.startSide)<0||(ut<0&&(ut=yt),ft.point&&(dt=Math.max(dt,vt-yt)),st.push(ft),ot.push(yt-ut),ct.push(vt-ut))}return{mapped:st.length?new Yu(ot,ct,st,dt):null,pos:ut}}},Q=class Ko{constructor(ee,te,st,ot){this.chunkPos=ee,this.chunk=te,this.nextLayer=st,this.maxPoint=ot}static create(ee,te,st,ot){return new Ko(ee,te,st,ot)}get length(){let ee=this.chunk.length-1;return ee<0?0:Math.max(this.chunkEnd(ee),this.nextLayer.length)}get size(){if(this.isEmpty)return 0;let ee=this.nextLayer.size;for(let te of this.chunk)ee+=te.value.length;return ee}chunkEnd(ee){return this.chunkPos[ee]+this.chunk[ee].length}update(ee){let{add:te=[],sort:st=!1,filterFrom:ot=0,filterTo:ct=this.length}=ee,ut=ee.filter;if(te.length==0&&!ut)return this;if(st&&(te=te.slice().sort(cn)),this.isEmpty)return te.length?Ko.of(te):this;let dt=new pn(this,null,-1).goto(0),ht=0,ft=[],pt=new dn;for(;dt.value||ht<te.length;)if(ht<te.length&&(dt.from-te[ht].from||dt.startSide-te[ht].value.startSide)>=0){let mt=te[ht++];pt.addInner(mt.from,mt.to,mt.value)||ft.push(mt)}else dt.rangeIndex==1&&dt.chunkIndex<this.chunk.length&&(ht==te.length||this.chunkEnd(dt.chunkIndex)<te[ht].from)&&(!ut||ot>this.chunkEnd(dt.chunkIndex)||ct<this.chunkPos[dt.chunkIndex])&&pt.addChunk(this.chunkPos[dt.chunkIndex],this.chunk[dt.chunkIndex])?dt.nextChunk():((!ut||ot>dt.to||ct<dt.from||ut(dt.from,dt.to,dt.value))&&(pt.addInner(dt.from,dt.to,dt.value)||ft.push(sn.create(dt.from,dt.to,dt.value))),dt.next());return pt.finishInner(this.nextLayer.isEmpty&&!ft.length?Ko.empty:this.nextLayer.update({add:ft,filter:ut,filterFrom:ot,filterTo:ct}))}map(ee){if(ee.empty||this.isEmpty)return this;let te=[],st=[],ot=-1;for(let ut=0;ut<this.chunk.length;ut++){let dt=this.chunkPos[ut],ht=this.chunk[ut],ft=ee.touchesRange(dt,dt+ht.length);if(ft===!1)ot=Math.max(ot,ht.maxPoint),te.push(ht),st.push(ee.mapPos(dt));else if(ft===!0){let{mapped:pt,pos:mt}=ht.map(dt,ee);pt&&(ot=Math.max(ot,pt.maxPoint),te.push(pt),st.push(mt))}}let ct=this.nextLayer.map(ee);return te.length==0?ct:new Ko(st,te,ct||Ko.empty,ot)}between(ee,te,st){if(!this.isEmpty){for(let ot=0;ot<this.chunk.length;ot++){let ct=this.chunkPos[ot],ut=this.chunk[ot];if(te>=ct&&ee<=ct+ut.length&&ut.between(ct,ee-ct,te-ct,st)===!1)return}this.nextLayer.between(ee,te,st)}}iter(ee=0){return mn.from([this]).goto(ee)}get isEmpty(){return this.nextLayer==this}static iter(ee,te=0){return mn.from(ee).goto(te)}static compare(ee,te,st,ot,ct=-1){let ut=ee.filter(mt=>mt.maxPoint>0||!mt.isEmpty&&mt.maxPoint>=ct),dt=te.filter(mt=>mt.maxPoint>0||!mt.isEmpty&&mt.maxPoint>=ct),ht=fn(ut,dt,st),ft=new $(ut,ht,ct),pt=new $(dt,ht,ct);st.iterGaps((mt,yt,vt)=>gn(ft,mt,pt,yt,vt,ot)),st.empty&&st.length==0&&gn(ft,0,pt,0,0,ot)}static eq(ee,te,st=0,ot){ot??(ot=999999999);let ct=ee.filter(pt=>!pt.isEmpty&&te.indexOf(pt)<0),ut=te.filter(pt=>!pt.isEmpty&&ee.indexOf(pt)<0);if(ct.length!=ut.length)return!1;if(!ct.length)return!0;let dt=fn(ct,ut),ht=new $(ct,dt,0).goto(st),ft=new $(ut,dt,0).goto(st);for(;;){if(ht.to!=ft.to||!_n(ht.active,ft.active)||ht.point&&(!ft.point||!on(ht.point,ft.point)))return!1;if(ht.to>ot)return!0;ht.next(),ft.next()}}static spans(ee,te,st,ot,ct=-1){let ut=new $(ee,null,ct).goto(te),dt=te,ht=ut.openStart;for(;;){let ft=Math.min(ut.to,st);if(ut.point){let pt=ut.activeForPoint(ut.to),mt=ut.pointFrom<te?pt.length+1:ut.point.startSide<0?pt.length:Math.min(pt.length,ht);ot.point(dt,ft,ut.point,pt,mt,ut.pointRank),ht=Math.min(ut.openEnd(ft),pt.length)}else ft>dt&&(ot.span(dt,ft,ut.active,ht),ht=ut.openEnd(ft));if(ut.to>st)return ht+(ut.point&&ut.to>st?1:0);dt=ut.to,ut.next()}}static of(ee,te=!1){let st=new dn;for(let ot of ee instanceof sn?[ee]:te?un(ee):ee)st.add(ot.from,ot.to,ot.value);return st.finish()}static join(ee){if(!ee.length)return Ko.empty;let te=ee[ee.length-1];for(let st=ee.length-2;st>=0;st--)for(let ot=ee[st];ot!=Ko.empty;ot=ot.nextLayer)te=new Ko(ot.chunkPos,ot.chunk,te,Math.max(ot.maxPoint,te.maxPoint));return te}};Q.empty=new Q([],[],null,-1);function un(ne){if(ne.length>1)for(let ee=ne[0],te=1;te<ne.length;te++){let st=ne[te];if(cn(ee,st)>0)return ne.slice().sort(cn);ee=st}return ne}Q.empty.nextLayer=Q.empty;var dn=class Xu{finishChunk(ee){this.chunks.push(new ln(this.from,this.to,this.value,this.maxPoint)),this.chunkPos.push(this.chunkStart),this.chunkStart=-1,this.setMaxPoint=Math.max(this.setMaxPoint,this.maxPoint),this.maxPoint=-1,ee&&(this.from=[],this.to=[],this.value=[])}constructor(){this.chunks=[],this.chunkPos=[],this.chunkStart=-1,this.last=null,this.lastFrom=-1e9,this.lastTo=-1e9,this.from=[],this.to=[],this.value=[],this.maxPoint=-1,this.setMaxPoint=-1,this.nextLayer=null}add(ee,te,st){this.addInner(ee,te,st)||(this.nextLayer||(this.nextLayer=new Xu)).add(ee,te,st)}addInner(ee,te,st){let ot=ee-this.lastTo||st.startSide-this.last.endSide;if(ot<=0&&(ee-this.lastFrom||st.startSide-this.last.startSide)<0)throw Error("Ranges must be added sorted by `from` position and `startSide`");return ot<0?!1:(this.from.length==250&&this.finishChunk(!0),this.chunkStart<0&&(this.chunkStart=ee),this.from.push(ee-this.chunkStart),this.to.push(te-this.chunkStart),this.last=st,this.lastFrom=ee,this.lastTo=te,this.value.push(st),st.point&&(this.maxPoint=Math.max(this.maxPoint,te-ee)),!0)}addChunk(ee,te){if((ee-this.lastTo||te.value[0].startSide-this.last.endSide)<0)return!1;this.from.length&&this.finishChunk(!0),this.setMaxPoint=Math.max(this.setMaxPoint,te.maxPoint),this.chunks.push(te),this.chunkPos.push(ee);let st=te.value.length-1;return this.last=te.value[st],this.lastFrom=te.from[st]+ee,this.lastTo=te.to[st]+ee,!0}finish(){return this.finishInner(Q.empty)}finishInner(ee){if(this.from.length&&this.finishChunk(!1),this.chunks.length==0)return ee;let te=Q.create(this.chunkPos,this.chunks,this.nextLayer?this.nextLayer.finishInner(ee):ee,this.setMaxPoint);return this.from=null,te}};function fn(ne,ee,te){let st=new Map;for(let ct of ne)for(let ut=0;ut<ct.chunk.length;ut++)ct.chunk[ut].maxPoint<=0&&st.set(ct.chunk[ut],ct.chunkPos[ut]);let ot=new Set;for(let ct of ee)for(let ut=0;ut<ct.chunk.length;ut++){let dt=st.get(ct.chunk[ut]);dt!=null&&(te?te.mapPos(dt):dt)==ct.chunkPos[ut]&&!(te!=null&&te.touchesRange(dt,dt+ct.chunk[ut].length))&&ot.add(ct.chunk[ut])}return ot}var pn=class{constructor(ne,ee,te,st=0){this.layer=ne,this.skip=ee,this.minPoint=te,this.rank=st}get startSide(){return this.value?this.value.startSide:0}get endSide(){return this.value?this.value.endSide:0}goto(ne,ee=-1e9){return this.chunkIndex=this.rangeIndex=0,this.gotoInner(ne,ee,!1),this}gotoInner(ne,ee,te){for(;this.chunkIndex<this.layer.chunk.length;){let st=this.layer.chunk[this.chunkIndex];if(!(this.skip&&this.skip.has(st)||this.layer.chunkEnd(this.chunkIndex)<ne||st.maxPoint<this.minPoint))break;this.chunkIndex++,te=!1}if(this.chunkIndex<this.layer.chunk.length){let st=this.layer.chunk[this.chunkIndex].findIndex(ne-this.layer.chunkPos[this.chunkIndex],ee,!0);(!te||this.rangeIndex<st)&&this.setRangeIndex(st)}this.next()}forward(ne,ee){(this.to-ne||this.endSide-ee)<0&&this.gotoInner(ne,ee,!0)}next(){for(;;)if(this.chunkIndex==this.layer.chunk.length){this.from=this.to=1e9,this.value=null;break}else{let ne=this.layer.chunkPos[this.chunkIndex],ee=this.layer.chunk[this.chunkIndex],te=ne+ee.from[this.rangeIndex];if(this.from=te,this.to=ne+ee.to[this.rangeIndex],this.value=ee.value[this.rangeIndex],this.setRangeIndex(this.rangeIndex+1),this.minPoint<0||this.value.point&&this.to-this.from>=this.minPoint)break}}setRangeIndex(ne){if(ne==this.layer.chunk[this.chunkIndex].value.length){if(this.chunkIndex++,this.skip)for(;this.chunkIndex<this.layer.chunk.length&&this.skip.has(this.layer.chunk[this.chunkIndex]);)this.chunkIndex++;this.rangeIndex=0}else this.rangeIndex=ne}nextChunk(){this.chunkIndex++,this.rangeIndex=0,this.next()}compare(ne){return this.from-ne.from||this.startSide-ne.startSide||this.rank-ne.rank||this.to-ne.to||this.endSide-ne.endSide}},mn=class Zu{constructor(ee){this.heap=ee}static from(ee,te=null,st=-1){let ot=[];for(let ct=0;ct<ee.length;ct++)for(let ut=ee[ct];!ut.isEmpty;ut=ut.nextLayer)ut.maxPoint>=st&&ot.push(new pn(ut,te,st,ct));return ot.length==1?ot[0]:new Zu(ot)}get startSide(){return this.value?this.value.startSide:0}goto(ee,te=-1e9){for(let st of this.heap)st.goto(ee,te);for(let st=this.heap.length>>1;st>=0;st--)hn(this.heap,st);return this.next(),this}forward(ee,te){for(let st of this.heap)st.forward(ee,te);for(let st=this.heap.length>>1;st>=0;st--)hn(this.heap,st);(this.to-ee||this.value.endSide-te)<0&&this.next()}next(){if(this.heap.length==0)this.from=this.to=1e9,this.value=null,this.rank=-1;else{let ee=this.heap[0];this.from=ee.from,this.to=ee.to,this.value=ee.value,this.rank=ee.rank,ee.value&&ee.next(),hn(this.heap,0)}}};function hn(ne,ee){for(let te=ne[ee];;){let st=(ee<<1)+1;if(st>=ne.length)break;let ot=ne[st];if(st+1<ne.length&&ot.compare(ne[st+1])>=0&&(ot=ne[st+1],st++),te.compare(ot)<0)break;ne[st]=te,ne[ee]=ot,ee=st}}var $=class{constructor(ne,ee,te){this.minPoint=te,this.active=[],this.activeTo=[],this.activeRank=[],this.minActive=-1,this.point=null,this.pointFrom=0,this.pointRank=0,this.to=-1e9,this.endSide=0,this.openStart=-1,this.cursor=mn.from(ne,ee,te)}goto(ne,ee=-1e9){return this.cursor.goto(ne,ee),this.active.length=this.activeTo.length=this.activeRank.length=0,this.minActive=-1,this.to=ne,this.endSide=ee,this.openStart=-1,this.next(),this}forward(ne,ee){for(;this.minActive>-1&&(this.activeTo[this.minActive]-ne||this.active[this.minActive].endSide-ee)<0;)this.removeActive(this.minActive);this.cursor.forward(ne,ee)}removeActive(ne){vn(this.active,ne),vn(this.activeTo,ne),vn(this.activeRank,ne),this.minActive=bn(this.active,this.activeTo)}
1165addActive(ne){let ee=0,{value:te,to:st,rank:ot}=this.cursor;for(;ee<this.activeRank.length&&(ot-this.activeRank[ee]||st-this.activeTo[ee])>0;)ee++;yn(this.active,ee,te),yn(this.activeTo,ee,st),yn(this.activeRank,ee,ot),ne&&yn(ne,ee,this.cursor.from),this.minActive=bn(this.active,this.activeTo)}next(){let ne=this.to,ee=this.point;this.point=null;let te=this.openStart<0?[]:null;for(;;){let st=this.minActive;if(st>-1&&(this.activeTo[st]-this.cursor.from||this.active[st].endSide-this.cursor.startSide)<0){if(this.activeTo[st]>ne){this.to=this.activeTo[st],this.endSide=this.active[st].endSide;break}this.removeActive(st),te&&vn(te,st)}else if(this.cursor.value)if(this.cursor.from>ne){this.to=this.cursor.from,this.endSide=this.cursor.startSide;break}else{let ot=this.cursor.value;if(!ot.point)this.addActive(te),this.cursor.next();else if(ee&&this.cursor.to==this.to&&this.cursor.from<this.cursor.to)this.cursor.next();else{this.point=ot,this.pointFrom=this.cursor.from,this.pointRank=this.cursor.rank,this.to=this.cursor.to,this.endSide=ot.endSide,this.cursor.next(),this.forward(this.to,this.endSide);break}}else{this.to=this.endSide=1e9;break}}if(te){this.openStart=0;for(let st=te.length-1;st>=0&&te[st]<ne;st--)this.openStart++}}activeForPoint(ne){if(!this.active.length)return this.active;let ee=[];for(let te=this.active.length-1;te>=0&&!(this.activeRank[te]<this.pointRank);te--)(this.activeTo[te]>ne||this.activeTo[te]==ne&&this.active[te].endSide>=this.point.endSide)&&ee.push(this.active[te]);return ee.reverse()}openEnd(ne){let ee=0;for(let te=this.activeTo.length-1;te>=0&&this.activeTo[te]>ne;te--)ee++;return ee}};function gn(ne,ee,te,st,ot,ct){ne.goto(ee),te.goto(st);let ut=st+ot,dt=st,ht=st-ee,ft=!!ct.boundChange;for(let pt=!1;;){let mt=ne.to+ht-te.to,yt=mt||ne.endSide-te.endSide,vt=yt<0?ne.to+ht:te.to,_t=Math.min(vt,ut);if(ne.point||te.point?(ne.point&&te.point&&on(ne.point,te.point)&&_n(ne.activeForPoint(ne.to),te.activeForPoint(te.to))||ct.comparePoint(dt,_t,ne.point,te.point),pt=!1):(pt&&ct.boundChange(dt),_t>dt&&!_n(ne.active,te.active)&&ct.compareRange(dt,_t,ne.active,te.active),ft&&_t<ut&&(mt||ne.openEnd(vt)!=te.openEnd(vt))&&(pt=!0)),vt>ut)break;dt=vt,yt<=0&&ne.next(),yt>=0&&te.next()}}function _n(ne,ee){if(ne.length!=ee.length)return!1;for(let te=0;te<ne.length;te++)if(ne[te]!=ee[te]&&!on(ne[te],ee[te]))return!1;return!0}function vn(ne,ee){for(let te=ee,st=ne.length-1;te<st;te++)ne[te]=ne[te+1];ne.pop()}function yn(ne,ee,te){for(let st=ne.length-1;st>=ee;st--)ne[st+1]=ne[st];ne[ee]=te}function bn(ne,ee){let te=-1,st=1e9;for(let ot=0;ot<ee.length;ot++)(ee[ot]-st||ne[ot].endSide-ne[te].endSide)<0&&(te=ot,st=ee[ot]);return te}const openModals=ref$1(new Map);function useModals(){return{open:st=>{typeof st=="string"&&openModals.value.set(st,!0)},close:st=>{typeof st=="string"&&openModals.value.delete(st)},isOpen:st=>typeof st!="string"?!1:openModals.value.get(st)===!0}}const _hoisted_1$5={key:0,class:"fr-mt-2v fr-ml-4v"},_sfc_main$8={__name:"Modal",props:{name:{type:String,required:!0},title:{type:String,required:!0},size:{type:String,default:"md"},dismissible:{type:Boolean,default:!1}},setup(ne){let ee=useAppStore(),te=useModals(),st=ne,ot=()=>{te.close(st.name),ct.value&&ut(st.name)};onBeforeUnmount(()=>{ot()});let ct=ref$1(!1),ut=dt=>{let ht=[];localStorage.getItem(ee.ns("modals"))&&(ht=JSON.parse(localStorage.getItem(ee.ns("modals")))),ht.includes(dt)||ht.push(dt),localStorage.setItem(ee.ns("modals"),JSON.stringify(ht))};return(dt,ht)=>{const ft=Dt,pt=xo;return openBlock(),createBlock(pt,{opened:"",title:ne.title,size:ne.size,onClose:unref(ot)},{default:withCtx(()=>[renderSlot(dt.$slots,"default"),ne.dismissible?(openBlock(),createElementBlock("div",_hoisted_1$5,[createVNode(ft,{modelValue:unref(ct),"onUpdate:modelValue":ht[0]||(ht[0]=mt=>isRef(ct)?ct.value=mt:ct=mt),class:"fr-mt-8w",value:"valeur 1",name:"checkbox-simple",label:"Ne plus afficher",small:"",inline:""},null,8,["modelValue"])])):createCommentVNode("",!0)]),_:3},8,["title","size","onClose"])}}};/*!
1166 * vue-router v4.6.4
1167 * (c) 2025 Eduardo San Martin Morote
1168 * @license MIT
1169 */const isBrowser=typeof document<"u";function isRouteComponent(ne){return typeof ne=="object"||"displayName"in ne||"props"in ne||"__vccOpts"in ne}function isESModule(ne){return ne.__esModule||ne[Symbol.toStringTag]==="Module"||ne.default&&isRouteComponent(ne.default)}const assign=Object.assign;function applyToParams(ne,ee){const te={};for(const st in ee){const ot=ee[st];te[st]=isArray(ot)?ot.map(ne):ne(ot)}return te}const noop=()=>{},isArray=Array.isArray;function mergeOptions(ne,ee){const te={};for(const st in ne)te[st]=st in ee?ee[st]:ne[st];return te}const HASH_RE=/#/g,AMPERSAND_RE=/&/g,SLASH_RE=/\//g,EQUAL_RE=/=/g,IM_RE=/\?/g,PLUS_RE=/\+/g,ENC_BRACKET_OPEN_RE=/%5B/g,ENC_BRACKET_CLOSE_RE=/%5D/g,ENC_CARET_RE=/%5E/g,ENC_BACKTICK_RE=/%60/g,ENC_CURLY_OPEN_RE=/%7B/g,ENC_PIPE_RE=/%7C/g,ENC_CURLY_CLOSE_RE=/%7D/g,ENC_SPACE_RE=/%20/g;function commonEncode(ne){return ne==null?"":encodeURI(""+ne).replace(ENC_PIPE_RE,"|").replace(ENC_BRACKET_OPEN_RE,"[").replace(ENC_BRACKET_CLOSE_RE,"]")}function encodeHash(ne){return commonEncode(ne).replace(ENC_CURLY_OPEN_RE,"{").replace(ENC_CURLY_CLOSE_RE,"}").replace(ENC_CARET_RE,"^")}function encodeQueryValue(ne){return commonEncode(ne).replace(PLUS_RE,"%2B").replace(ENC_SPACE_RE,"+").replace(HASH_RE,"%23").replace(AMPERSAND_RE,"%26").replace(ENC_BACKTICK_RE,"`").replace(ENC_CURLY_OPEN_RE,"{").replace(ENC_CURLY_CLOSE_RE,"}").replace(ENC_CARET_RE,"^")}function encodeQueryKey(ne){return encodeQueryValue(ne).replace(EQUAL_RE,"%3D")}function encodePath(ne){return commonEncode(ne).replace(HASH_RE,"%23").replace(IM_RE,"%3F")}function encodeParam(ne){return encodePath(ne).replace(SLASH_RE,"%2F")}function decode(ne){if(ne==null)return null;try{return decodeURIComponent(""+ne)}catch{}return""+ne}const TRAILING_SLASH_RE=/\/$/,removeTrailingSlash=ne=>ne.replace(TRAILING_SLASH_RE,"");function parseURL(ne,ee,te="/"){let st,ot={},ct="",ut="";const dt=ee.indexOf("#");let ht=ee.indexOf("?");return ht=dt>=0&&ht>dt?-1:ht,ht>=0&&(st=ee.slice(0,ht),ct=ee.slice(ht,dt>0?dt:ee.length),ot=ne(ct.slice(1))),dt>=0&&(st=st||ee.slice(0,dt),ut=ee.slice(dt,ee.length)),st=resolveRelativePath(st??ee,te),{fullPath:st+ct+ut,path:st,query:ot,hash:decode(ut)}}function stringifyURL(ne,ee){const te=ee.query?ne(ee.query):"";
vendor: 29,473 bytes, lines 1169-1173
1169return ee.path+(te&&"?")+te+(ee.hash||"")}function stripBase(ne,ee){return!ee||!ne.toLowerCase().startsWith(ee.toLowerCase())?ne:ne.slice(ee.length)||"/"}function isSameRouteLocation(ne,ee,te){const st=ee.matched.length-1,ot=te.matched.length-1;return st>-1&&st===ot&&isSameRouteRecord(ee.matched[st],te.matched[ot])&&isSameRouteLocationParams(ee.params,te.params)&&ne(ee.query)===ne(te.query)&&ee.hash===te.hash}function isSameRouteRecord(ne,ee){return(ne.aliasOf||ne)===(ee.aliasOf||ee)}function isSameRouteLocationParams(ne,ee){if(Object.keys(ne).length!==Object.keys(ee).length)return!1;for(var te in ne)if(!isSameRouteLocationParamsValue(ne[te],ee[te]))return!1;return!0}function isSameRouteLocationParamsValue(ne,ee){return isArray(ne)?isEquivalentArray(ne,ee):isArray(ee)?isEquivalentArray(ee,ne):(ne==null?void 0:ne.valueOf())===(ee==null?void 0:ee.valueOf())}function isEquivalentArray(ne,ee){return isArray(ee)?ne.length===ee.length&&ne.every((te,st)=>te===ee[st]):ne.length===1&&ne[0]===ee}function resolveRelativePath(ne,ee){if(ne.startsWith("/"))return ne;if(!ne)return ee;const te=ee.split("/"),st=ne.split("/"),ot=st[st.length-1];(ot===".."||ot===".")&&st.push("");let ct=te.length-1,ut,dt;for(ut=0;ut<st.length;ut++)if(dt=st[ut],dt!==".")if(dt==="..")ct>1&&ct--;else break;return te.slice(0,ct).join("/")+"/"+st.slice(ut).join("/")}const START_LOCATION_NORMALIZED={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0};let NavigationType=(function(ne){return ne.pop="pop",ne.push="push",ne})({}),NavigationDirection=(function(ne){return ne.back="back",ne.forward="forward",ne.unknown="",ne})({});function normalizeBase(ne){if(!ne)if(isBrowser){const ee=document.querySelector("base");ne=ee&&ee.getAttribute("href")||"/",ne=ne.replace(/^\w+:\/\/[^\/]+/,"")}else ne="/";return ne[0]!=="/"&&ne[0]!=="#"&&(ne="/"+ne),removeTrailingSlash(ne)}const BEFORE_HASH_RE=/^[^#]+#/;function createHref(ne,ee){return ne.replace(BEFORE_HASH_RE,"#")+ee}function getElementPosition(ne,ee){const te=document.documentElement.getBoundingClientRect(),st=ne.getBoundingClientRect();return{behavior:ee.behavior,left:st.left-te.left-(ee.left||0),top:st.top-te.top-(ee.top||0)}}const computeScrollPosition=()=>({left:window.scrollX,top:window.scrollY});function scrollToPosition(ne){let ee;if("el"in ne){const te=ne.el,st=typeof te=="string"&&te.startsWith("#"),ot=typeof te=="string"?st?document.getElementById(te.slice(1)):document.querySelector(te):te;if(!ot)return;ee=getElementPosition(ot,ne)}else ee=ne;"scrollBehavior"in document.documentElement.style?window.scrollTo(ee):window.scrollTo(ee.left!=null?ee.left:window.scrollX,ee.top!=null?ee.top:window.scrollY)}function getScrollKey(ne,ee){return(history.state?history.state.position-ee:-1)+ne}const scrollPositions=new Map;function saveScrollPosition(ne,ee){scrollPositions.set(ne,ee)}function getSavedScrollPosition(ne){const ee=scrollPositions.get(ne);return scrollPositions.delete(ne),ee}function isRouteLocation(ne){return typeof ne=="string"||ne&&typeof ne=="object"}function isRouteName(ne){return typeof ne=="string"||typeof ne=="symbol"}let ErrorTypes=(function(ne){return ne[ne.MATCHER_NOT_FOUND=1]="MATCHER_NOT_FOUND",ne[ne.NAVIGATION_GUARD_REDIRECT=2]="NAVIGATION_GUARD_REDIRECT",ne[ne.NAVIGATION_ABORTED=4]="NAVIGATION_ABORTED",ne[ne.NAVIGATION_CANCELLED=8]="NAVIGATION_CANCELLED",ne[ne.NAVIGATION_DUPLICATED=16]="NAVIGATION_DUPLICATED",ne})({});const NavigationFailureSymbol=Symbol("");ErrorTypes.MATCHER_NOT_FOUND+"",ErrorTypes.NAVIGATION_GUARD_REDIRECT+"",ErrorTypes.NAVIGATION_ABORTED+"",ErrorTypes.NAVIGATION_CANCELLED+"",ErrorTypes.NAVIGATION_DUPLICATED+"";function createRouterError(ne,ee){return assign(new Error,{type:ne,[NavigationFailureSymbol]:!0},ee)}function isNavigationFailure(ne,ee){return ne instanceof Error&&NavigationFailureSymbol in ne&&(ee==null||!!(ne.type&ee))}const propertiesToLog=["params","query","hash"];function stringifyRoute(ne){if(typeof ne=="string")return ne;if(ne.path!=null)return ne.path;const ee={};for(const te of propertiesToLog)te in ne&&(ee[te]=ne[te]);return JSON.stringify(ee,null,2)}function parseQuery(ne){const ee={};if(ne===""||ne==="?")return ee;const te=(ne[0]==="?"?ne.slice(1):ne).split("&");for(let st=0;st<te.length;++st){const ot=te[st].replace(PLUS_RE," "),ct=ot.indexOf("="),ut=decode(ct<0?ot:ot.slice(0,ct)),dt=ct<0?null:decode(ot.slice(ct+1));if(ut in ee){let ht=ee[ut];isArray(ht)||(ht=ee[ut]=[ht]),ht.push(dt)}else ee[ut]=dt}return ee}function stringifyQuery(ne){let ee="";for(let te in ne){const st=ne[te];if(te=encodeQueryKey(te),st==null){st!==void 0&&(ee+=(ee.length?"&":"")+te);continue}(isArray(st)?st.map(ot=>ot&&encodeQueryValue(ot)):[st&&encodeQueryValue(st)]).forEach(ot=>{ot!==void 0&&(ee+=(ee.length?"&":"")+te,ot!=null&&(ee+="="+ot))})}return ee}function normalizeQuery(ne){const ee={};for(const te in ne){const st=ne[te];st!==void 0&&(ee[te]=isArray(st)?st.map(ot=>ot==null?null:""+ot):st==null?st:""+st)}return ee}const matchedRouteKey=Symbol(""),viewDepthKey=Symbol(""),routerKey=Symbol(""),routeLocationKey=Symbol(""),routerViewLocationKey=Symbol("");function useCallbacks(){let ne=[];function ee(st){return ne.push(st),()=>{const ot=ne.indexOf(st);ot>-1&&ne.splice(ot,1)}}function te(){ne=[]}return{add:ee,list:()=>ne.slice(),reset:te}}function guardToPromiseFn(ne,ee,te,st,ot,ct=ut=>ut()){const ut=st&&(st.enterCallbacks[ot]=st.enterCallbacks[ot]||[]);return()=>new Promise((dt,ht)=>{const ft=yt=>{yt===!1?ht(createRouterError(ErrorTypes.NAVIGATION_ABORTED,{from:te,to:ee})):yt instanceof Error?ht(yt):isRouteLocation(yt)?ht(createRouterError(ErrorTypes.NAVIGATION_GUARD_REDIRECT,{from:ee,to:yt})):(ut&&st.enterCallbacks[ot]===ut&&typeof yt=="function"&&ut.push(yt),dt())},pt=ct(()=>ne.call(st&&st.instances[ot],ee,te,ft));let mt=Promise.resolve(pt);ne.length<3&&(mt=mt.then(ft)),mt.catch(yt=>ht(yt))})}function extractComponentsGuards(ne,ee,te,st,ot=ct=>ct()){const ct=[];for(const ut of ne)for(const dt in ut.components){let ht=ut.components[dt];if(!(ee!=="beforeRouteEnter"&&!ut.instances[dt]))if(isRouteComponent(ht)){const ft=(ht.__vccOpts||ht)[ee];ft&&ct.push(guardToPromiseFn(ft,te,st,ut,dt,ot))}else{let ft=ht();ct.push(()=>ft.then(pt=>{if(!pt)throw new Error(`Couldn't resolve component "${dt}" at "${ut.path}"`);const mt=isESModule(pt)?pt.default:pt;ut.mods[dt]=pt,ut.components[dt]=mt;const yt=(mt.__vccOpts||mt)[ee];return yt&&guardToPromiseFn(yt,te,st,ut,dt,ot)()}))}}return ct}function extractChangingRecords(ne,ee){const te=[],st=[],ot=[],ct=Math.max(ee.matched.length,ne.matched.length);for(let ut=0;ut<ct;ut++){const dt=ee.matched[ut];dt&&(ne.matched.find(ft=>isSameRouteRecord(ft,dt))?st.push(dt):te.push(dt));const ht=ne.matched[ut];ht&&(ee.matched.find(ft=>isSameRouteRecord(ft,ht))||ot.push(ht))}return[te,st,ot]}/*!
1170 * vue-router v4.6.4
1171 * (c) 2025 Eduardo San Martin Morote
1172 * @license MIT
1173 */let createBaseLocation=()=>location.protocol+"//"+location.host;function createCurrentLocation(ne,ee){const{pathname:te,search:st,hash:ot}=ee,ct=ne.indexOf("#");if(ct>-1){let ut=ot.includes(ne.slice(ct))?ne.slice(ct).length:1,dt=ot.slice(ut);return dt[0]!=="/"&&(dt="/"+dt),stripBase(dt,"")}return stripBase(te,ne)+st+ot}function useHistoryListeners(ne,ee,te,st){let ot=[],ct=[],ut=null;const dt=({state:yt})=>{const vt=createCurrentLocation(ne,location),_t=te.value,bt=ee.value;let xt=0;if(yt){if(te.value=vt,ee.value=yt,ut&&ut===_t){ut=null;return}xt=bt?yt.position-bt.position:0}else st(vt);ot.forEach(Mt=>{Mt(te.value,_t,{delta:xt,type:NavigationType.pop,direction:xt?xt>0?NavigationDirection.forward:NavigationDirection.back:NavigationDirection.unknown})})};function ht(){ut=te.value}function ft(yt){ot.push(yt);const vt=()=>{const _t=ot.indexOf(yt);_t>-1&&ot.splice(_t,1)};return ct.push(vt),vt}function pt(){if(document.visibilityState==="hidden"){const{history:yt}=window;if(!yt.state)return;yt.replaceState(assign({},yt.state,{scroll:computeScrollPosition()}),"")}}function mt(){for(const yt of ct)yt();ct=[],window.removeEventListener("popstate",dt),window.removeEventListener("pagehide",pt),document.removeEventListener("visibilitychange",pt)}return window.addEventListener("popstate",dt),window.addEventListener("pagehide",pt),document.addEventListener("visibilitychange",pt),{pauseListeners:ht,listen:ft,destroy:mt}}function buildState(ne,ee,te,st=!1,ot=!1){return{back:ne,current:ee,forward:te,replaced:st,position:window.history.length,scroll:ot?computeScrollPosition():null}}function useHistoryStateNavigation(ne){const{history:ee,location:te}=window,st={value:createCurrentLocation(ne,te)},ot={value:ee.state};ot.value||ct(st.value,{back:null,current:st.value,forward:null,position:ee.length-1,replaced:!0,scroll:null},!0);function ct(ht,ft,pt){const mt=ne.indexOf("#"),yt=mt>-1?(te.host&&document.querySelector("base")?ne:ne.slice(mt))+ht:createBaseLocation()+ne+ht;try{ee[pt?"replaceState":"pushState"](ft,"",yt),ot.value=ft}catch(vt){console.error(vt),te[pt?"replace":"assign"](yt)}}function ut(ht,ft){ct(ht,assign({},ee.state,buildState(ot.value.back,ht,ot.value.forward,!0),ft,{position:ot.value.position}),!0),st.value=ht}function dt(ht,ft){const pt=assign({},ot.value,ee.state,{forward:ht,scroll:computeScrollPosition()});ct(pt.current,pt,!0),ct(ht,assign({},buildState(st.value,ht,null),{position:pt.position+1},ft),!1),st.value=ht}return{location:st,state:ot,push:dt,replace:ut}}function createWebHistory(ne){ne=normalizeBase(ne);const ee=useHistoryStateNavigation(ne),te=useHistoryListeners(ne,ee.state,ee.location,ee.replace);function st(ct,ut=!0){ut||te.pauseListeners(),history.go(ct)}const ot=assign({location:"",base:ne,go:st,createHref:createHref.bind(null,ne)},ee,te);return Object.defineProperty(ot,"location",{enumerable:!0,get:()=>ee.location.value}),Object.defineProperty(ot,"state",{enumerable:!0,get:()=>ee.state.value}),ot}let TokenType=(function(ne){return ne[ne.Static=0]="Static",ne[ne.Param=1]="Param",ne[ne.Group=2]="Group",ne})({});var TokenizerState=(function(ne){return ne[ne.Static=0]="Static",ne[ne.Param=1]="Param",ne[ne.ParamRegExp=2]="ParamRegExp",ne[ne.ParamRegExpEnd=3]="ParamRegExpEnd",ne[ne.EscapeNext=4]="EscapeNext",ne})(TokenizerState||{});const ROOT_TOKEN={type:TokenType.Static,value:""},VALID_PARAM_RE=/[a-zA-Z0-9_]/;function tokenizePath(ne){if(!ne)return[[]];if(ne==="/")return[[ROOT_TOKEN]];if(!ne.startsWith("/"))throw new Error(`Invalid path "${ne}"`);function ee(vt){throw new Error(`ERR (${te})/"${ft}": ${vt}`)}let te=TokenizerState.Static,st=te;const ot=[];let ct;function ut(){ct&&ot.push(ct),ct=[]}let dt=0,ht,ft="",pt="";function mt(){ft&&(te===TokenizerState.Static?ct.push({type:TokenType.Static,value:ft}):te===TokenizerState.Param||te===TokenizerState.ParamRegExp||te===TokenizerState.ParamRegExpEnd?(ct.length>1&&(ht==="*"||ht==="+")&&ee(`A repeatable param (${ft}) must be alone in its segment. eg: '/:ids+.`),ct.push({type:TokenType.Param,value:ft,regexp:pt,repeatable:ht==="*"||ht==="+",optional:ht==="*"||ht==="?"})):ee("Invalid state to consume buffer"),ft="")}function yt(){ft+=ht}for(;dt<ne.length;){if(ht=ne[dt++],ht==="\\"&&te!==TokenizerState.ParamRegExp){st=te,te=TokenizerState.EscapeNext;continue}switch(te){case TokenizerState.Static:ht==="/"?(ft&&mt(),ut()):ht===":"?(mt(),te=TokenizerState.Param):yt();break;case TokenizerState.EscapeNext:yt(),te=st;break;case TokenizerState.Param:ht==="("?te=TokenizerState.ParamRegExp:VALID_PARAM_RE.test(ht)?yt():(mt(),te=TokenizerState.Static,ht!=="*"&&ht!=="?"&&ht!=="+"&&dt--);break;case TokenizerState.ParamRegExp:ht===")"?pt[pt.length-1]=="\\"?pt=pt.slice(0,-1)+ht:te=TokenizerState.ParamRegExpEnd:pt+=ht;break;case TokenizerState.ParamRegExpEnd:mt(),te=TokenizerState.Static,ht!=="*"&&ht!=="?"&&ht!=="+"&&dt--,pt="";break;default:ee("Unknown state");break}}return te===TokenizerState.ParamRegExp&&ee(`Unfinished custom RegExp for param "${ft}"`),mt(),ut(),ot}const BASE_PARAM_PATTERN="[^/]+?",BASE_PATH_PARSER_OPTIONS={sensitive:!1,strict:!1,start:!0,end:!0};var PathScore=(function(ne){return ne[ne._multiplier=10]="_multiplier",ne[ne.Root=90]="Root",ne[ne.Segment=40]="Segment",ne[ne.SubSegment=30]="SubSegment",ne[ne.Static=40]="Static",ne[ne.Dynamic=20]="Dynamic",ne[ne.BonusCustomRegExp=10]="BonusCustomRegExp",ne[ne.BonusWildcard=-50]="BonusWildcard",ne[ne.BonusRepeatable=-20]="BonusRepeatable",ne[ne.BonusOptional=-8]="BonusOptional",ne[ne.BonusStrict=.7000000000000001]="BonusStrict",ne[ne.BonusCaseSensitive=.25]="BonusCaseSensitive",ne})(PathScore||{});const REGEX_CHARS_RE=/[.+*?^${}()[\]/\\]/g;function tokensToParser(ne,ee){const te=assign({},BASE_PATH_PARSER_OPTIONS,ee),st=[];let ot=te.start?"^":"";const ct=[];for(const ft of ne){const pt=ft.length?[]:[PathScore.Root];te.strict&&!ft.length&&(ot+="/");for(let mt=0;mt<ft.length;mt++){const yt=ft[mt];let vt=PathScore.Segment+(te.sensitive?PathScore.BonusCaseSensitive:0);if(yt.type===TokenType.Static)mt||(ot+="/"),ot+=yt.value.replace(REGEX_CHARS_RE,"\\$&"),vt+=PathScore.Static;else if(yt.type===TokenType.Param){const{value:_t,repeatable:bt,optional:xt,regexp:Mt}=yt;ct.push({name:_t,repeatable:bt,optional:xt});const Ot=Mt||BASE_PARAM_PATTERN;if(Ot!==BASE_PARAM_PATTERN){vt+=PathScore.BonusCustomRegExp;try{`${Ot}`}catch(Nt){throw new Error(`Invalid custom RegExp for param "${_t}" (${Ot}): `+Nt.message)}}let kt=bt?`((?:${Ot})(?:/(?:${Ot}))*)`:`(${Ot})`;mt||(kt=xt&&ft.length<2?`(?:/${kt})`:"/"+kt),xt&&(kt+="?"),ot+=kt,vt+=PathScore.Dynamic,xt&&(vt+=PathScore.BonusOptional),bt&&(vt+=PathScore.BonusRepeatable),Ot===".*"&&(vt+=PathScore.BonusWildcard)}pt.push(vt)}st.push(pt)}if(te.strict&&te.end){const ft=st.length-1;st[ft][st[ft].length-1]+=PathScore.BonusStrict}te.strict||(ot+="/?"),te.end?ot+="$":te.strict&&!ot.endsWith("/")&&(ot+="(?:/|$)");const ut=new RegExp(ot,te.sensitive?"":"i");function dt(ft){const pt=ft.match(ut),mt={};if(!pt)return null;for(let yt=1;yt<pt.length;yt++){const vt=pt[yt]||"",_t=ct[yt-1];mt[_t.name]=vt&&_t.repeatable?vt.split("/"):vt}return mt}function ht(ft){let pt="",mt=!1;for(const yt of ne){(!mt||!pt.endsWith("/"))&&(pt+="/"),mt=!1;for(const vt of yt)if(vt.type===TokenType.Static)pt+=vt.value;else if(vt.type===TokenType.Param){const{value:_t,repeatable:bt,optional:xt}=vt,Mt=_t in ft?ft[_t]:"";if(isArray(Mt)&&!bt)throw new Error(`Provided param "${_t}" is an array but it is not repeatable (* or + modifiers)`);const Ot=isArray(Mt)?Mt.join("/"):Mt;if(!Ot)if(xt)yt.length<2&&(pt.endsWith("/")?pt=pt.slice(0,-1):mt=!0);else throw new Error(`Missing required param "${_t}"`);pt+=Ot}}return pt||"/"}return{re:ut,score:st,keys:ct,parse:dt,stringify:ht}}function compareScoreArray(ne,ee){let te=0;for(;te<ne.length&&te<ee.length;){const st=ee[te]-ne[te];if(st)return st;te++}return ne.length<ee.length?ne.length===1&&ne[0]===PathScore.Static+PathScore.Segment?-1:1:ne.length>ee.length?ee.length===1&&ee[0]===PathScore.Static+PathScore.Segment?1:-1:0}function comparePathParserScore(ne,ee){let te=0;const st=ne.score,ot=ee.score;for(;te<st.length&&te<ot.length;){const ct=compareScoreArray(st[te],ot[te]);if(ct)return ct;te++}if(Math.abs(ot.length-st.length)===1){if(isLastScoreNegative(st))return 1;if(isLastScoreNegative(ot))return-1}return ot.length-st.length}function isLastScoreNegative(ne){const ee=ne[ne.length-1];return ne.length>0&&ee[ee.length-1]<0}const PATH_PARSER_OPTIONS_DEFAULTS={strict:!1,end:!0,sensitive:!1};function createRouteRecordMatcher(ne,ee,te){const st=tokensToParser(tokenizePath(ne.path),te),ot=assign(st,{record:ne,parent:ee,children:[],alias:[]});return ee&&!ot.record.aliasOf==!ee.record.aliasOf&&ee.children.push(ot),ot}function createRouterMatcher(ne,ee){const te=[],st=new Map;ee=mergeOptions(PATH_PARSER_OPTIONS_DEFAULTS,ee);function ot(mt){return st.get(mt)}function ct(mt,yt,vt){const _t=!vt,bt=normalizeRouteRecord(mt);bt.aliasOf=vt&&vt.record;const xt=mergeOptions(ee,mt),Mt=[bt];if("alias"in mt){const Nt=typeof mt.alias=="string"?[mt.alias]:mt.alias;for(const Gt of Nt)Mt.push(normalizeRouteRecord(assign({},bt,{components:vt?vt.record.components:bt.components,path:Gt,aliasOf:vt?vt.record:bt})))}let Ot,kt;for(const Nt of Mt){const{path:Gt}=Nt;if(yt&&Gt[0]!=="/"){const Bt=yt.record.path,Ut=Bt[Bt.length-1]==="/"?"":"/";Nt.path=yt.record.path+(Gt&&Ut+Gt)}if(Ot=createRouteRecordMatcher(Nt,yt,xt),vt?vt.alias.push(Ot):(kt=kt||Ot,kt!==Ot&&kt.alias.push(Ot),_t&&mt.name&&!isAliasRecord(Ot)&&ut(mt.name)),isMatchable(Ot)&&ht(Ot),bt.children){const Bt=bt.children;for(let Ut=0;Ut<Bt.length;Ut++)ct(Bt[Ut],Ot,vt&&vt.children[Ut])}vt=vt||Ot}return kt?()=>{ut(kt)}:noop}function ut(mt){if(isRouteName(mt)){const yt=st.get(mt);yt&&(st.delete(mt),te.splice(te.indexOf(yt),1),yt.children.forEach(ut),yt.alias.forEach(ut))}else{const yt=te.indexOf(mt);yt>-1&&(te.splice(yt,1),mt.record.name&&st.delete(mt.record.name),mt.children.forEach(ut),mt.alias.forEach(ut))}}function dt(){return te}function ht(mt){const yt=findInsertionIndex(mt,te);te.splice(yt,0,mt),mt.record.name&&!isAliasRecord(mt)&&st.set(mt.record.name,mt)}function ft(mt,yt){let vt,_t={},bt,xt;if("name"in mt&&mt.name){if(vt=st.get(mt.name),!vt)throw createRouterError(ErrorTypes.MATCHER_NOT_FOUND,{location:mt});xt=vt.record.name,_t=assign(pickParams(yt.params,vt.keys.filter(kt=>!kt.optional).concat(vt.parent?vt.parent.keys.filter(kt=>kt.optional):[]).map(kt=>kt.name)),mt.params&&pickParams(mt.params,vt.keys.map(kt=>kt.name))),bt=vt.stringify(_t)}else if(mt.path!=null)bt=mt.path,vt=te.find(kt=>kt.re.test(bt)),vt&&(_t=vt.parse(bt),xt=vt.record.name);else{if(vt=yt.name?st.get(yt.name):te.find(kt=>kt.re.test(yt.path)),!vt)throw createRouterError(ErrorTypes.MATCHER_NOT_FOUND,{location:mt,currentLocation:yt});xt=vt.record.name,_t=assign({},yt.params,mt.params),bt=vt.stringify(_t)}const Mt=[];let Ot=vt;for(;Ot;)Mt.unshift(Ot.record),Ot=Ot.parent;return{name:xt,path:bt,params:_t,matched:Mt,meta:mergeMetaFields(Mt)}}ne.forEach(mt=>ct(mt));function pt(){te.length=0,st.clear()}return{addRoute:ct,resolve:ft,removeRoute:ut,clearRoutes:pt,getRoutes:dt,getRecordMatcher:ot}}function pickParams(ne,ee){const te={};for(const st of ee)st in ne&&(te[st]=ne[st]);return te}function normalizeRouteRecord(ne){const ee={path:ne.path,redirect:ne.redirect,name:ne.name,meta:ne.meta||{},aliasOf:ne.aliasOf,beforeEnter:ne.beforeEnter,props:normalizeRecordProps(ne),children:ne.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in ne?ne.components||null:ne.component&&{default:ne.component}};return Object.defineProperty(ee,"mods",{value:{}}),ee}function normalizeRecordProps(ne){const ee={},te=ne.props||!1;if("component"in ne)ee.default=te;else for(const st in ne.components)ee[st]=typeof te=="object"?te[st]:te;return ee}function isAliasRecord(ne){for(;ne;){if(ne.record.aliasOf)return!0;ne=ne.parent}return!1}function mergeMetaFields(ne){return ne.reduce((ee,te)=>assign(ee,te.meta),{})}function findInsertionIndex(ne,ee){let te=0,st=ee.length;for(;te!==st;){const ct=te+st>>1;comparePathParserScore(ne,ee[ct])<0?st=ct:te=ct+1}const ot=getInsertionAncestor(ne);return ot&&(st=ee.lastIndexOf(ot,st-1)),st}function getInsertionAncestor(ne){let ee=ne;for(;ee=ee.parent;)if(isMatchable(ee)&&comparePathParserScore(ne,ee)===0)return ee}function isMatchable({record:ne}){return!!(ne.name||ne.components&&Object.keys(ne.components).length||ne.redirect)}function useLink(ne){const ee=inject(routerKey),te=inject(routeLocationKey),st=computed(()=>{const ht=unref(ne.to);return ee.resolve(ht)}),ot=computed(()=>{const{matched:ht}=st.value,{length:ft}=ht,pt=ht[ft-1],mt=te.matched;if(!pt||!mt.length)return-1;const yt=mt.findIndex(isSameRouteRecord.bind(null,pt));if(yt>-1)return yt;const vt=getOriginalPath(ht[ft-2]);return ft>1&&getOriginalPath(pt)===vt&&mt[mt.length-1].path!==vt?mt.findIndex(isSameRouteRecord.bind(null,ht[ft-2])):yt}),ct=computed(()=>ot.value>-1&&includesParams(te.params,st.value.params)),ut=computed(()=>ot.value>-1&&ot.value===te.matched.length-1&&isSameRouteLocationParams(te.params,st.value.params));function dt(ht={}){if(guardEvent(ht)){const ft=ee[unref(ne.replace)?"replace":"push"](unref(ne.to)).catch(noop);return ne.viewTransition&&typeof document<"u"&&"startViewTransition"in document&&document.startViewTransition(()=>ft),ft}return Promise.resolve()}return{route:st,href:computed(()=>st.value.href),isActive:ct,isExactActive:ut,navigate:dt}}function preferSingleVNode(ne){return ne.length===1?ne[0]:ne}const RouterLinkImpl=defineComponent({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"},viewTransition:Boolean},useLink,setup(ne,{slots:ee}){const te=reactive(useLink(ne)),{options:st}=inject(routerKey),ot=computed(()=>({[getLinkClass(ne.activeClass,st.linkActiveClass,"router-link-active")]:te.isActive,[getLinkClass(ne.exactActiveClass,st.linkExactActiveClass,"router-link-exact-active")]:te.isExactActive}));return()=>{const ct=ee.default&&preferSingleVNode(ee.default(te));return ne.custom?ct:h$3("a",{"aria-current":te.isExactActive?ne.ariaCurrentValue:null,href:te.href,onClick:te.navigate,class:ot.value},ct)}}}),RouterLink=RouterLinkImpl;function guardEvent(ne){if(!(ne.metaKey||ne.altKey||ne.ctrlKey||ne.shiftKey)&&!ne.defaultPrevented&&!(ne.button!==void 0&&ne.button!==0)){if(ne.currentTarget&&ne.currentTarget.getAttribute){const ee=ne.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(ee))return}return ne.preventDefault&&ne.preventDefault(),!0}}function includesParams(ne,ee){for(const te in ee){const st=ee[te],ot=ne[te];if(typeof st=="string"){if(st!==ot)return!1}else if(!isArray(ot)||ot.length!==st.length||st.some((ct,ut)=>ct.valueOf()!==ot[ut].valueOf()))return!1}return!0}function getOriginalPath(ne){return ne?ne.aliasOf?ne.aliasOf.path:ne.path:""}const getLinkClass=(ne,ee,te)=>ne??ee??te,RouterViewImpl=defineComponent({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(ne,{attrs:ee,slots:te}){const st=inject(routerViewLocationKey),ot=computed(()=>ne.route||st.value),ct=inject(viewDepthKey,0),ut=computed(()=>{let ft=unref(ct);const{matched:pt}=ot.value;let mt;for(;(mt=pt[ft])&&!mt.components;)ft++;return ft}),dt=computed(()=>ot.value.matched[ut.value]);provide(viewDepthKey,computed(()=>ut.value+1)),provide(matchedRouteKey,dt),provide(routerViewLocationKey,ot);const ht=ref$1();return watch(()=>[ht.value,dt.value,ne.name],([ft,pt,mt],[yt,vt,_t])=>{pt&&(pt.instances[mt]=ft,vt&&vt!==pt&&ft&&ft===yt&&(pt.leaveGuards.size||(pt.leaveGuards=vt.leaveGuards),pt.updateGuards.size||(pt.updateGuards=vt.updateGuards))),ft&&pt&&(!vt||!isSameRouteRecord(pt,vt)||!yt)&&(pt.enterCallbacks[mt]||[]).forEach(bt=>bt(ft))},{flush:"post"}),()=>{const ft=ot.value,pt=ne.name,mt=dt.value,yt=mt&&mt.components[pt];if(!yt)return normalizeSlot(te.default,{Component:yt,route:ft});const vt=mt.props[pt],_t=vt?vt===!0?ft.params:typeof vt=="function"?vt(ft):vt:null,xt=h$3(yt,assign({},_t,ee,{onVnodeUnmounted:Mt=>{Mt.component.isUnmounted&&(mt.instances[pt]=null)},ref:ht}));return normalizeSlot(te.default,{Component:xt,route:ft})||xt}}});function normalizeSlot(ne,ee){if(!ne)return null;const te=ne(ee);return te.length===1?te[0]:te}const RouterView=RouterViewImpl;function createRouter(ne){const ee=createRouterMatcher(ne.routes,ne),te=ne.parseQuery||parseQuery,st=ne.stringifyQuery||stringifyQuery,ot=ne.history,ct=useCallbacks(),ut=useCallbacks(),dt=useCallbacks(),ht=shallowRef(START_LOCATION_NORMALIZED);let ft=START_LOCATION_NORMALIZED;isBrowser&&ne.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const pt=applyToParams.bind(null,ni=>""+ni),mt=applyToParams.bind(null,encodeParam),yt=applyToParams.bind(null,decode);function vt(ni,Cn){let Ln,Un;return isRouteName(ni)?(Ln=ee.getRecordMatcher(ni),Un=Cn):Un=ni,ee.addRoute(Un,Ln)}function _t(ni){const Cn=ee.getRecordMatcher(ni);Cn&&ee.removeRoute(Cn)}function bt(){return ee.getRoutes().map(ni=>ni.record)}function xt(ni){return!!ee.getRecordMatcher(ni)}function Mt(ni,Cn){if(Cn=assign({},Cn||ht.value),typeof ni=="string"){const ri=parseURL(te,ni,Cn.path),Sn=ee.resolve({path:ri.path},Cn),On=ot.createHref(ri.fullPath);return assign(ri,Sn,{params:yt(Sn.params),hash:decode(ri.hash),redirectedFrom:void 0,href:On})}let Ln;if(ni.path!=null)Ln=assign({},ni,{path:parseURL(te,ni.path,Cn.path).path});else{const ri=assign({},ni.params);for(const Sn in ri)ri[Sn]==null&&delete ri[Sn];Ln=assign({},ni,{params:mt(ri)}),Cn.params=mt(Cn.params)}const Un=ee.resolve(Ln,Cn),Pn=ni.hash||"";Un.params=pt(yt(Un.params));const Mn=stringifyURL(st,assign({},ni,{hash:encodeHash(Pn),path:Un.path})),Yt=ot.createHref(Mn);return assign({fullPath:Mn,hash:Pn,query:st===stringifyQuery?normalizeQuery(ni.query):ni.query||{}},Un,{redirectedFrom:void 0,href:Yt})}function Ot(ni){return typeof ni=="string"?parseURL(te,ni,ht.value.path):assign({},ni)}function kt(ni,Cn){if(ft!==ni)return createRouterError(ErrorTypes.NAVIGATION_CANCELLED,{from:Cn,to:ni})}function Nt(ni){return Ut(ni)}function Gt(ni){return Nt(assign(Ot(ni),{replace:!0}))}function Bt(ni,Cn){const Ln=ni.matched[ni.matched.length-1];if(Ln&&Ln.redirect){const{redirect:Un}=Ln;let Pn=typeof Un=="function"?Un(ni,Cn):Un;return typeof Pn=="string"&&(Pn=Pn.includes("?")||Pn.includes("#")?Pn=Ot(Pn):{path:Pn},Pn.params={}),assign({query:ni.query,hash:ni.hash,params:Pn.path!=null?{}:ni.params},Pn)}}function Ut(ni,Cn){const Ln=ft=Mt(ni),Un=ht.value,Pn=ni.state,Mn=ni.force,Yt=ni.replace===!0,ri=Bt(Ln,Un);if(ri)return Ut(assign(Ot(ri),{state:typeof ri=="object"?assign({},Pn,ri.state):Pn,force:Mn,replace:Yt}),Cn||Ln);const Sn=Ln;Sn.redirectedFrom=Cn;let On;return!Mn&&isSameRouteLocation(st,Un,Ln)&&(On=createRouterError(ErrorTypes.NAVIGATION_DUPLICATED,{to:Sn,from:Un}),Zt(Un,Un,!0,!1)),(On?Promise.resolve(On):zt(Sn,Un)).catch(Rn=>isNavigationFailure(Rn)?isNavigationFailure(Rn,ErrorTypes.NAVIGATION_GUARD_REDIRECT)?Rn:Xt(Rn):An(Rn,Sn,Un)).then(Rn=>{if(Rn){if(isNavigationFailure(Rn,ErrorTypes.NAVIGATION_GUARD_REDIRECT))return Ut(assign({replace:Yt},Ot(Rn.to),{state:typeof Rn.to=="object"?assign({},Pn,Rn.to.state):Pn,force:Mn}),Cn||Sn)}else Rn=Wt(Sn,Un,!0,Yt,Pn);return jt(Sn,Un,Rn),Rn})}function Vt(ni,Cn){const Ln=kt(ni,Cn);return Ln?Promise.reject(Ln):Promise.resolve()}function Ht(ni){const Cn=qt.values().next().value;return Cn&&typeof Cn.runWithContext=="function"?Cn.runWithContext(ni):ni()}function zt(ni,Cn){let Ln;const[Un,Pn,Mn]=extractChangingRecords(ni,Cn);Ln=extractComponentsGuards(Un.reverse(),"beforeRouteLeave",ni,Cn);for(const ri of Un)ri.leaveGuards.forEach(Sn=>{Ln.push(guardToPromiseFn(Sn,ni,Cn))});const Yt=Vt.bind(null,ni,Cn);return Ln.push(Yt),wn(Ln).then(()=>{Ln=[];for(const ri of ct.list())Ln.push(guardToPromiseFn(ri,ni,Cn));return Ln.push(Yt),wn(Ln)}).then(()=>{Ln=extractComponentsGuards(Pn,"beforeRouteUpdate",ni,Cn);for(const ri of Pn)ri.updateGuards.forEach(Sn=>{Ln.push(guardToPromiseFn(Sn,ni,Cn))});return Ln.push(Yt),wn(Ln)}).then(()=>{Ln=[];for(const ri of Mn)if(ri.beforeEnter)if(isArray(ri.beforeEnter))for(const Sn of ri.beforeEnter)Ln.push(guardToPromiseFn(Sn,ni,Cn));else Ln.push(guardToPromiseFn(ri.beforeEnter,ni,Cn));return Ln.push(Yt),wn(Ln)}).then(()=>(ni.matched.forEach(ri=>ri.enterCallbacks={}),Ln=extractComponentsGuards(Mn,"beforeRouteEnter",ni,Cn,Ht),Ln.push(Yt),wn(Ln))).then(()=>{Ln=[];for(const ri of ut.list())Ln.push(guardToPromiseFn(ri,ni,Cn));return Ln.push(Yt),wn(Ln)}).catch(ri=>isNavigationFailure(ri,ErrorTypes.NAVIGATION_CANCELLED)?ri:Promise.reject(ri))}function jt(ni,Cn,Ln){dt.list().forEach(Un=>Ht(()=>Un(ni,Cn,Ln)))}function Wt(ni,Cn,Ln,Un,Pn){const Mn=kt(ni,Cn);if(Mn)return Mn;const Yt=Cn===START_LOCATION_NORMALIZED,ri=isBrowser?history.state:{};Ln&&(Un||Yt?ot.replace(ni.fullPath,assign({scroll:Yt&&ri&&ri.scroll},Pn)):ot.push(ni.fullPath,Pn)),ht.value=ni,Zt(ni,Cn,Ln,Yt),Xt()}let Jt;function Qt(){Jt||(Jt=ot.listen((ni,Cn,Ln)=>{if(!ii.listening)return;const Un=Mt(ni),Pn=Bt(Un,ii.currentRoute.value);if(Pn){Ut(assign(Pn,{replace:!0,force:!0}),Un).catch(noop);return}ft=Un;const Mn=ht.value;isBrowser&&saveScrollPosition(getScrollKey(Mn.fullPath,Ln.delta),computeScrollPosition()),zt(Un,Mn).catch(Yt=>isNavigationFailure(Yt,ErrorTypes.NAVIGATION_ABORTED|ErrorTypes.NAVIGATION_CANCELLED)?Yt:isNavigationFailure(Yt,ErrorTypes.NAVIGATION_GUARD_REDIRECT)?(Ut(assign(Ot(Yt.to),{force:!0}),Un).then(ri=>{isNavigationFailure(ri,ErrorTypes.NAVIGATION_ABORTED|ErrorTypes.NAVIGATION_DUPLICATED)&&!Ln.delta&&Ln.type===NavigationType.pop&&ot.go(-1,!1)}).catch(noop),Promise.reject()):(Ln.delta&&ot.go(-Ln.delta,!1),An(Yt,Un,Mn))).then(Yt=>{Yt=Yt||Wt(Un,Mn,!1),Yt&&(Ln.delta&&!isNavigationFailure(Yt,ErrorTypes.NAVIGATION_CANCELLED)?ot.go(-Ln.delta,!1):Ln.type===NavigationType.pop&&isNavigationFailure(Yt,ErrorTypes.NAVIGATION_ABORTED|ErrorTypes.NAVIGATION_DUPLICATED)&&ot.go(-1,!1)),jt(Un,Mn,Yt)}).catch(noop)}))}let oi=useCallbacks(),ai=useCallbacks(),xn;function An(ni,Cn,Ln){Xt(ni);const Un=ai.list();return Un.length?Un.forEach(Pn=>Pn(ni,Cn,Ln)):console.error(ni),Promise.reject(ni)}function Nn(){return xn&&ht.value!==START_LOCATION_NORMALIZED?Promise.resolve():new Promise((ni,Cn)=>{oi.add([ni,Cn])})}function Xt(ni){return xn||(xn=!ni,Qt(),oi.list().forEach(([Cn,Ln])=>ni?Ln(ni):Cn()),oi.reset()),ni}function Zt(ni,Cn,Ln,Un){const{scrollBehavior:Pn}=ne;if(!isBrowser||!Pn)return Promise.resolve();
1173const Mn=!Ln&&getSavedScrollPosition(getScrollKey(ni.fullPath,0))||(Un||!Ln)&&history.state&&history.state.scroll||null;return nextTick().then(()=>Pn(ni,Cn,Mn)).then(Yt=>Yt&&scrollToPosition(Yt)).catch(Yt=>An(Yt,ni,Cn))}const Kt=ni=>ot.go(ni);let ti;const qt=new Set,ii={currentRoute:ht,listening:!0,addRoute:vt,removeRoute:_t,clearRoutes:ee.clearRoutes,hasRoute:xt,getRoutes:bt,resolve:Mt,options:ne,push:Nt,replace:Gt,go:Kt,back:()=>Kt(-1),forward:()=>Kt(1),beforeEach:ct.add,beforeResolve:ut.add,afterEach:dt.add,onError:ai.add,isReady:Nn,install(ni){ni.component("RouterLink",RouterLink),ni.component("RouterView",RouterView),ni.config.globalProperties.$router=ii,Object.defineProperty(ni.config.globalProperties,"$route",{enumerable:!0,get:()=>unref(ht)}),isBrowser&&!ti&&ht.value===START_LOCATION_NORMALIZED&&(ti=!0,Nt(ot.location).catch(Un=>{}));const Cn={};for(const Un in START_LOCATION_NORMALIZED)Object.defineProperty(Cn,Un,{get:()=>ht.value[Un],enumerable:!0});ni.provide(routerKey,ii),ni.provide(routeLocationKey,shallowReactive(Cn)),ni.provide(routerViewLocationKey,ht);const Ln=ni.unmount;qt.add(ni),ni.unmount=function(){qt.delete(ni),qt.size<1&&(ft=START_LOCATION_NORMALIZED,Jt&&Jt(),Jt=null,ht.value=START_LOCATION_NORMALIZED,ti=!1,xn=!1),Ln()}}};function wn(ni){return ni.reduce((Cn,Ln)=>Cn.then(()=>Ht(Ln)),Promise.resolve())}return ii}function useRouter(){return inject(routerKey)}function useRoute(ne){return inject(routeLocationKey)}const _hoisted_1$4={key:0,class:"fr-consent-banner"},_hoisted_2$3={id:"my-consent"},__default__={},_sfc_main$7=Object.assign(__default__,{__name:"ModalConsent",setup(ne){const ee=useRouter(),te=useRoute(),st=useEulerian(),ot=useModals(),ct=st.hasKey(),ut=()=>te.path.includes("/embed"),dt=ref$1(!ct&&!ut());watch(()=>te.path,()=>{ut()&&(dt.value=!1)},{immediate:!0});const ht="À propos des cookies sur cartes.gouv.fr",ft=useBaseUrl()+"/donnees-personnelles",pt=()=>{dt.value=!1,ee.push({path:"/"}),st.resume()},mt=()=>{st.start(),pt()},yt=()=>{st.stop(),pt()},vt=()=>{st.stop(),pt(),ot.open("consentCustom")};return(_t,bt)=>{const xt=Rt,Mt=nt$1;return unref(dt)?(openBlock(),createElementBlock("div",_hoisted_1$4,[createBaseVNode("h2",{class:"fr-h6"},toDisplayString(ht)),createBaseVNode("p",_hoisted_2$3,[createVNode(xt,{onAcceptAll:bt[0]||(bt[0]=Ot=>mt()),onRefuseAll:bt[1]||(bt[1]=Ot=>yt()),onCustomize:bt[2]||(bt[2]=Ot=>vt())},{default:withCtx(()=>[bt[3]||(bt[3]=createTextVNode(" Bienvenue ! Nous utilisons des cookies pour améliorer votre expérience et les services disponibles sur ce site. Pour en savoir plus, visitez la page ",-1)),createBaseVNode("a",{href:ft},"Données personnelles et cookies"),bt[4]||(bt[4]=createTextVNode(". Vous pouvez, à tout moment, avoir le contrôle sur les cookies que vous souhaitez activer. Préférences pour tous les services. ",-1))]),_:1})]),createVNode(Mt,{id:"fr-consent-modal-hidden-control-button",class:"fr-hidden",onClick:pt})])):createCommentVNode("",!0)}}}),_hoisted_1$3={class:"fr-container"},_hoisted_2$2={class:"fr-grid-row logo-row"},_hoisted_3$1=["src"],_hoisted_4$1={class:"fr-grid-row content"},_hoisted_5$1={class:"icon vicon purple-glycine"},logoText="République Française",_sfc_main$6={__name:"ModalWelcome",setup(ne){const ee=window.__ENV__.VITE_GPF_SERVICE_STATIC==="true",te=useBaseUrl(),st=ref$1({scale:1.25,name:"ri:map-2-line"});return(ot,ct)=>{const ut=Fr,dt=$$3;return openBlock(),createElementBlock("div",_hoisted_1$3,[createBaseVNode("div",_hoisted_2$2,[createVNode(ut,{"logo-text":logoText,"data-testid":"header-logo",class:"maxwidth"}),createBaseVNode("img",{src:ee?`${unref(te)}/img/header/cartes-gouv-logo.svg`:`${unref(te)}/annexes/ressources/header/cartes-gouv-logo.svg`,alt:""},null,8,_hoisted_3$1)]),createBaseVNode("div",_hoisted_4$1,[ct[1]||(ct[1]=createBaseVNode("h2",{class:"fr-modal__title fr-h2"}," Bienvenue sur cartes.gouv.fr ",-1)),ct[2]||(ct[2]=createBaseVNode("p",null,"Retrouvez ici la référence de la cartographie publique pour explorer, connaître et piloter le territoire :",-1)),createBaseVNode("div",null,[createBaseVNode("span",_hoisted_5$1,[createVNode(dt,normalizeProps(guardReactiveProps(unref(st))),null,16)]),ct[0]||(ct[0]=createTextVNode("Accédez à une vaste bibliothèque de cartes et de données",-1))]),ct[3]||(ct[3]=createBaseVNode("div",null,[createBaseVNode("span",{class:"icon yellow-tournesol"},[createBaseVNode("i",{class:"fr-icon-brush-line"})]),createTextVNode("Créez et partagez vos propres cartes")],-1)),ct[4]||(ct[4]=createBaseVNode("div",null,[createBaseVNode("span",{class:"icon green-archipel"},[createBaseVNode("i",{class:"fr-icon-database-line"})]),createTextVNode("Hébergez vos données et vos cartes en toute autonomie")],-1))])])}}},ModalWelcome=_export_sfc(_sfc_main$6,[["__scopeId","data-v-9a5b9
1173cca"]]),ROUTE_NAMES={MAP:"Carte",EMBED:"Carte embarquée",LOGIN:"Se connecter",LOGOUT:"Se deconnecter",BOOKMARKS:"Favoris",PLAN:"Plan"},_hoisted_1$2={class:"fr-container fr-container--fluid fr-container-md"},_sfc_main$5={__name:"Modals",setup(ne){let ee=useAppStore(),te=useModals();const st=useRoute(),ot=()=>st.name===ROUTE_NAMES.EMBED,ct=useEulerian(),ut=ft=>{window.location.href=useBaseUrl()+ft};function dt(){ct.start(),ct.resume()}function ht(){ct.stop(),ct.resume()}return onMounted(()=>{let ft=[];localStorage.getItem(ee.ns("modals"))&&(ft=JSON.parse(localStorage.getItem(ee.ns("modals")))),!ft.includes("welcome")&&!ot()&&te.open("welcome")}),(ft,pt)=>(openBlock(),createElementBlock("div",_hoisted_1$2,[createVNode(unref(tt)),createVNode(_sfc_main$7),createVNode(unref(rt),{onAcceptConsent:dt,onRefuseConsent:ht,onCloseConsent:ft.OnCloseConsent},null,8,["onCloseConsent"]),unref(te).isOpen("welcome")?(openBlock(),createBlock(_sfc_main$8,{key:0,name:"welcome",size:"lg",title:"",dismissible:"",actions:[{label:"Accéder aux cartes",onClick(){unref(te).close("welcome")}},{label:"En savoir plus",secondary:!0,onClick(){ut("/decouvrir")}}]},{default:withCtx(()=>[createVNode(ModalWelcome)]),_:1},8,["actions"])):createCommentVNode("",!0)]))}},NAMESPACE="cartes.gouv.fr",ns=(ne=>NAMESPACE+"."+ne),useDomStore=defineStore("dom",()=>{var ne=ref$1(),ee=ref$1(),te=ref$1(),st=ref$1(),ot=useStorage(ns("isHeaderCompact"),!1);let ct=ref$1(!1);function ut(){return ee.value}function dt(_t){ee.value=_t}function ht(){return ne.value}function ft(_t){ne.value=_t}function pt(){return te.value}function mt(_t){te.value=_t}function yt(){return st.value}function vt(_t){st.value=_t}return{isHeaderCompact:ot,isFullscreenPanoramax:ct,menuCatalogueButton:ne,leftControlMenu:te,rightControlMenu:st,BookmarksButton:ee,getmenuCatalogueButton:ht,setmenuCatalogueButton:ft,getBookmarksButton:ut,setBookmarksButton:dt,getrightControlMenu:yt,setrightControlMenu:vt,getleftControlMenu:pt,setleftControlMenu:mt}}),headerParams=ref$1({});function useHeaderParams(){return headerParams.value={serviceTitle:"cartes.gouv.fr",serviceDescription:"Notre territoire commun",logoText:["république","française"],afterQuickLinks:[{title:"Aide",icon:"ri-question-fill",links:[{text:"Questions Fréquentes",to:useBaseUrl()+"/aide/fr/",target:"_blank",icon:"fr-icon-question-mark"},{text:"Guide d'utilisation",to:useBaseUrl()+"/aide/fr/guides-utilisateur/visualiseur-cartographique/generalites-visualiseur/",target:"_blank",icon:"fr-icon-book-2-line"},{text:"Niveau de service",to:useBaseUrl()+"/aide/fr/niveau-de-service/",target:"_blank",icon:"fr-icon-rfid-line"},{text:"Nous contacter",to:useBaseUrl()+"/nous-ecrire",target:"_blank",icon:"fr-icon-mail-line"}]},{title:"Services",icon:"ri-grid-fill",links:[{text:"Explorer les cartes",to:useBaseUrl()+"/explorer-les-cartes",icon:"fr-icon-road-map-line"},{text:"Rechercher une donnée",to:useBaseUrl()+"/rechercher-une-donnee/search",icon:"fr-icon-search-line"},{text:"Publier une donnée",to:useBaseUrl()+"/publier-une-donnee",icon:"fr-icon-database-line"},{text:"Découvrir cartes.gouv.fr ",to:useBaseUrl()+"/decouvrir",target:"",button:!0}]}]},window.__ENV__.IAM_DISABLE==="0"&&headerParams.value.afterQuickLinks.push({title:"Mon espace",icon:"ri-account-circle-fill",connexionMenu:!0,links:[{text:"Tableau de bord",to:useBaseUrl()+"/tableau-de-bord",icon:"fr-icon-dashboard-3-line"},{text:"Mon compte",to:useBaseUrl()+"/mon-compte",icon:"fr-icon-user-line"}]}),headerParams}const AUTO_SSO_ATTEMPTED_KEY="auth:auto-sso-attempted",IAM_CHECK_SSO_DISABLE=window.__ENV__.IAM_CHECK_SSO_DISABLE,IAM_CHECK_SSO_TYPE=window.__ENV__.IAM_CHECK_SSO_TYPE,IAM_CHECK_SSO_AUTO_AUTH=window.__ENV__.IAM_CHECK_SSO_AUTO_AUTH;function useAuthentication(ne={}){const ee=useRouter(),te=distExports$1.useLogger(),st=ne.service??inject("services"),ot=ne.serviceStore??useServiceStore(),ct=ne.onLogin??(()=>{}),ut=ne.onLogout??(()=>{}),dt=ne.onError??(_t=>{console.error("Authentication error :",_t)});if(!st)throw new Error('Missing "services" injection for useAuthentication().');const ht=ref$1(!1),ft=()=>{sessionStorage.removeItem(AUTO_SSO_ATTEMPTED_KEY)},pt=()=>{sessionStorage.setItem(AUTO_SSO_ATTEMPTED_KEY,"1")}
1173,mt=()=>sessionStorage.getItem(AUTO_SSO_ATTEMPTED_KEY)==="1",yt=async()=>{if(mt())return!1;let bt=!1;try{console.debug("Checking Keycloak session..."),bt=await st.checkKeycloakSession(IAM_CHECK_SSO_TYPE),console.debug(`Keycloak session check : ${bt} !`)}catch(xt){return pt(),console.warn("Keycloak session check failed, disabling auto-SSO retry for this tab session.",xt),!1}return bt?(pt(),console.debug("Keycloak session detected, redirecting to /login for silent auto-auth."),IAM_CHECK_SSO_AUTO_AUTH==="1"&&await ee.push({path:"/login",query:{from:"auto-sso"}}),!0):!1};return{authenticated:ht,checkAuthentication:async()=>{ht.value=!!st.authenticated;try{const _t=await st.resolveAccessStatus();if(_t!=="no-auth"&&(te.debug(`Access validated : ${_t} !`),ot.setAuthentificateSyncNeeded(!1),ee.replace({path:"/",query:void 0})),_t==="login"){te.debug("User connected."),ft(),ht.value=!0,ct();return}if(_t==="logout"){te.debug("User disconnected."),ft(),ht.value=!1,ut();return}if(st.isAuthenticatedLocally()){te.debug("User already authentificate locally, checking session validity...");const bt=await st.validateAuthentication();if(te.debug(`Checking session validity : ${bt} !`),ht.value=!!bt,!bt){console.warn("Session locale invalide ou expirée, déconnexion locale silencieuse."),st.authenticated=!1,typeof st.saveStore=="function"&&st.saveStore(),ht.value=!1,ut();return}if(bt){te.debug("Session locale valide, synchronisation des documents...");try{const xt=await st.getDocuments(),Mt=typeof st.getEmitter=="function"?st.getEmitter():null;Mt&&Mt.dispatchEvent("service:documents:loaded",{bubbles:!0,detail:xt})}catch(xt){console.warn("Unable to refresh documents after page reload:",xt)}}te.debug("validateAuthentication() finished !")}else{if(IAM_CHECK_SSO_DISABLE!=="1"&&await yt())return;ht.value=!1}}catch(_t){console.warn(_t),dt(_t)}finally{te.debug("resolveAccessStatus() finished !")}}}}const _hoisted_1$1=["id","aria-label"],_hoisted_2$1={class:"fr-nav__item"},_hoisted_3=["href"],_hoisted_4=["id"],_hoisted_5={class:"fr-menu__list"},_hoisted_6={class:"fr-container fr-pt-2v"},_hoisted_7={class:"fr-grid-row fr-grid-row--left"},_hoisted_8={class:"fr-description__info fr-text--xs"},_hoisted_9={class:"fr-grid-row fr-grid-row--left"},_hoisted_10={class:"fr-mb-2v fr-description__info fr-text--xs fr-text-mention--grey"},_hoisted_11=["id"],_hoisted_12={class:"fr-grid-row fr-grid-row--center w100"},_hoisted_13=["href","target"],_hoisted_14=["id","href","target"],_hoisted_15={class:"flex"},_hoisted_16={class:"fr-grid-row fr-grid-row--center w100"},_hoisted_17={class:"fr-m-3v fr-icon-logout-box-r-line fr-btn fr-btn--tertiary fr-btn--icon-left w100 justify-center"},_hoisted_18=["href"],_hoisted_19=["href"],_sfc_main$4={__name:"CustomNavigationMenu",props:{id:{type:String,default:()=>Z$2("menu")},menu:{type:Object,default:()=>({})},expandedId:{type:String,default:""},authenticated:{type:Boolean,default:!1}},emits:["toggleId"],setup(ne,{emit:ee}){const te=distExports$1.useLogger(),st=ne,ot=ee,ct=bt=>ot("toggleId",bt),ut=ref$1(null),{collapse:dt,cssExpanded:ht,doExpand:ft}=J$1(),pt=computed(()=>st.id===st.expandedId);watch(pt,(bt,xt)=>{bt!==xt&&ft(bt)});var mt=inject("services");const yt=ref$1(mt.user),vt="/explorer-les-cartes";return inject("emitter").addEventListener("service:user:loaded",bt=>{te.debug("service:user:loaded event received:",bt),yt.value=bt.detail}),watch(()=>st.authenticated,bt=>{bt||(yt.value={})}),onBeforeMount(()=>{te.debug(`NavigationMenu (${st.id}) mounted.`)}),onMounted(()=>{pt.value&&ft(!0)}),onBeforeUnmount(()=>{}),(bt,xt)=>{const Mt=nt$1,Ot=Qo;return openBlock(),createElementBlock("nav",{id:ne.menu.title.trim().toLowerCase().replaceAll(" ","-"),class:"fr-nav",role:"navigation","aria-label":ne.menu.title},[createBaseVNode("div",_hoisted_2$1,[ne.menu.connexionMenu&&!ne.authenticated?(openBlock(),createBlock(Mt,{key:0,ref_key:"button",ref:ut,icon:"ri-account-circle-fill",class:"fr-nav__btn fr-nav__btn-no-dropdown"},{default:withCtx(()=>[createBaseVNode("a",{href:unref(vt)+"/login"},"Se connecter",8,_hoisted_3)]),_:1}
1173,512)):(openBlock(),createBlock(Mt,{key:1,ref_key:"button",ref:ut,label:ne.menu.title,icon:ne.menu.icon,class:"fr-nav__btn","aria-expanded":pt.value,"aria-controls":ne.id,onClick:xt[0]||(xt[0]=withModifiers(kt=>ct(ne.id),["stop"]))},null,8,["label","icon","aria-expanded","aria-controls"])),createBaseVNode("div",{id:ne.id,ref_key:"collapse",ref:dt,class:normalizeClass(["fr-collapse fr-menu fr-access_menu",{"fr-collapse--expanded":unref(ht)}]),"data-testid":"navigation-menu"},[createBaseVNode("ul",_hoisted_5,[ne.menu.connexionMenu&&ne.authenticated&&yt.value?(openBlock(),createBlock(Ot,{key:0},{default:withCtx(()=>[createBaseVNode("div",_hoisted_6,[createBaseVNode("div",_hoisted_7,[createBaseVNode("div",_hoisted_8,[createBaseVNode("b",null,toDisplayString(yt.value.first_name)+" "+toDisplayString(yt.value.last_name),1)])]),createBaseVNode("div",_hoisted_9,[createBaseVNode("div",_hoisted_10,toDisplayString(yt.value.email),1)])])]),_:1})):createCommentVNode("",!0),(openBlock(!0),createElementBlock(Fragment,null,renderList(ne.menu.links,(kt,Nt)=>(openBlock(),createBlock(Ot,{key:Nt,onClick:xt[1]||(xt[1]=withModifiers(Gt=>ct(ne.expandedId),["stop"]))},{default:withCtx(()=>[kt.button?(openBlock(),createElementBlock("div",{key:0,id:Nt,class:"w100"},[createBaseVNode("div",_hoisted_12,[createBaseVNode("a",{href:kt.to,target:kt.target,class:"fr-m-3v fr-btn w100 justify-center link__as__fr-primary-btn"},toDisplayString(kt.text),9,_hoisted_13)])],8,_hoisted_11)):(openBlock(),createElementBlock("a",{key:1,id:Nt,href:kt.to,target:kt.target,class:normalizeClass(["fr-link--icon-left fr-access__link fr-nav__link flex-start",kt.icon])},toDisplayString(kt.text),11,_hoisted_14))]),_:2},1024))),128)),ne.menu.connexionMenu?(openBlock(),createBlock(Ot,{key:1},{default:withCtx(()=>[createBaseVNode("div",_hoisted_15,[createBaseVNode("div",_hoisted_16,[createBaseVNode("button",_hoisted_17,[xt[2]||(xt[2]=createBaseVNode("i",{class:"ri-logout-box-line"},null,-1)),ne.authenticated?(openBlock(),createElementBlock("a",{key:0,href:unref(vt)+"/logout"},"Se déconnecter",8,_hoisted_18)):(openBlock(),createElementBlock("a",{key:1,href:unref(vt)+"/login"},"Se connecter",8,_hoisted_19))])])])]),_:1})):createCommentVNode("",!0)])],10,_hoisted_4)])],8,_hoisted_1$1)}}},CustomNavigationMenu=_export_sfc(_sfc_main$4,[["__scopeId","data-v-c8a0fafb"]]),_sfc_main$3={__name:"CustomNavigation",props:{id:{type:String,default:()=>Z$2("nav")},navItems:{type:Array,default:()=>[]},label:{type:String,default:"Menu principal"}},setup(ne){const ee=ne,te=distExports$1.useLogger(),st=useAppStore(),ot=inject("emitter"),ct=ref$1(void 0),ut=_t=>{if(_t!==ct.value?(document.addEventListener("click",ht),document.addEventListener("keydown",ft)):(document.removeEventListener("click",ht),document.removeEventListener("keydown",ft)),_t===ct.value){ct.value=void 0;return}ct.value=_t},dt=_t=>{if(_t!==document.getElementById(ee.id)){if(!(_t!=null&&_t.parentNode)){ut(ct.value);return}dt(_t.parentNode)}},ht=_t=>{dt(_t.target)},ft=_t=>{_t.key==="Escape"&&ut(ct.value)},pt=()=>{const bt=st.getDocumentTemporary();if(bt){const xt=JSON.parse(bt);setTimeout(()=>{ot.dispatchEvent("document:restore",{data:xt,componentName:"CustomNavigation"})},500)}},mt=useServiceStore(),{authenticated:yt,checkAuthentication:vt}=useAuthentication({onLogin:()=>{pt()},onLogout:()=>{st.clearDocumentTemporary()}});return onBeforeMount(()=>{te.debug(`Navigation (${ee.id}) before mount.`)}),onMounted(()=>{te.debug(`Navigation (${ee.id}) mounted.`),vt().then(()=>mt.setAuthentificated(yt.value))}),onUnmounted(()=>{document.removeEventListener("click",ht),document.removeEventListener("keydown",ft)}),(_t,bt)=>(openBlock(!0),createElementBlock(Fragment,null,renderList(ne.navItems,(xt,Mt)=>(openBlock(),createBlock(CustomNavigationMenu,{id:xt.id,key:Mt,menu:xt,authenticated:unref(yt),"expanded-id":ct.value,onToggleId:bt[0]||(bt[0]=Ot=>ut(Ot))},null,8,["id","menu","authenticated","expanded-id"]))),128))}},_sfc_main$2={__name:"CustomHeader",setup(ne){const ee=window.__ENV__.VITE_GPF_SERVICE_STATIC==="true",te=useBaseUrl(),st=useDomStore(),{theme:ot}=Ce$1(),ct=useMatchMedia("LG");let ut=computed(()=>{let ht=ot.value==="light"?"":"-dark";return ee?`${te}/img/header/cartes-gouv-logo${ht}.svg`:`${te}/annexes/ressources/header/cartes-gouv-logo${ht}.svg`});const dt=useHeaderParams();return onMounted(()=>
1173{let ht=document.querySelector(".fr-header__service-title .fr-badge");ht&&(ht.classList.remove("fr-badge--green-emeraude"),ht.classList.add("fr-badge--purple-glycine"),ht.innerHTML=`
1174      <span class="fr-icon-road-map-fill fr-ml-n1v" style="transform:scale(0.5)"></span>
1175      Explorer
1176    `)}),dt.value.quickLinks=[{label:"",to:"/"}],(ht,ft)=>{const pt=ro;return openBlock(),createBlock(pt,{"service-title":unref(dt).serviceTitle,"show-beta":!0,"service-description":unref(st).isHeaderCompact?!1:unref(dt).serviceDescription,"logo-text":unref(st).isHeaderCompact?[]:unref(dt).logoText,"quick-links":unref(dt).quickLinks,"operator-img-src":unref(ut),"language-selector":unref(dt).languageSelector,class:normalizeClass({"fr-header--compact":unref(st).isHeaderCompact})},{"after-quick-links":withCtx(()=>[createVNode(_sfc_main$3,{id:"main-navigation",label:"Menu principal","nav-items":unref(dt).afterQuickLinks},null,8,["nav-items"]),unref(ct)?(openBlock(),createBlock(unref(Ze),{key:0})):createCommentVNode("",!0)]),_:1},8,["service-title","service-description","logo-text","quick-links","operator-img-src","language-selector","class"])}}},_hoisted_1={class:"futur-map-container Map"},_hoisted_2={key:1,class:"CustomFooter"},_sfc_main$1=defineComponent({__name:"Main",setup(ne){const ee=useAppStore(),te=useDomStore(),st=useRoute(),{theme:ot}=Ce$1(),ct=computed(()=>st.name===ROUTE_NAMES.EMBED),ut=useMatchMedia("LG"),dt={warning:markRaw(NotificationWarning),success:markRaw(NotificationSuccess),info:markRaw(NotificationInfo),error:markRaw(NotificationError),close:markRaw(NotificationClose)},ht={"--nv-radius":"0","--nv-width":"350px","--nv-border-width":"1px","--nv-icon-size":"30px","--nv-success-accent":"#18753c","--nv-success-border":"#18753c","--nv-error-accent":"#ce0500","--nv-error-border":"#ce0500","--nv-warning-accent":"#b34000","--nv-warning-border":"#b34000","--nv-info-accent":"#0063cb","--nv-info-border":"#0063cb"},ft=computed(()=>ot.value&&ot.value==="dark"?{...darkTheme,...ht}:{...lightTheme,...ht});return onMounted(()=>{console.info("✓ 🚀 Application démarrée"),ee.detectFirstOpen()}),(pt,mt)=>{const yt=resolveComponent("router-view");return openBlock(),createElementBlock(Fragment,null,[!unref(ct)&&!unref(te).isFullscreenPanoramax?(openBlock(),createBlock(_sfc_main$2,{key:0,class:"CustomHeader"})):createCommentVNode("",!0),createVNode(unref(_sfc_main$e$1),null,{default:withCtx(vt=>[createVNode(unref(_sfc_main$1$1),{item:vt,icons:dt,theme:unref(ft)},null,8,["item","theme"])]),_:1}),createVNode(_sfc_main$9,{class:"Alerts"}),createBaseVNode("div",_hoisted_1,[createVNode(yt)]),unref(te).isFullscreenPanoramax?createCommentVNode("",!0):(openBlock(),createElementBlock("div",_hoisted_2,[!unref(ut)&&!unref(ct)?(openBlock(),createBlock(unref(Ze),{key:0,compact:""})):createCommentVNode("",!0)])),createVNode(_sfc_main$5)],64)}}}),_sfc_main=defineComponent({__name:"App",setup(ne){return(ee,te)=>(openBlock(),createBlock(_sfc_main$1))}}),MAIN_TITLE="cartes.gouv.fr | Explorer les cartes",routes=[{path:"/",name:ROUTE_NAMES.MAP,component:()=>__vitePreload(()=>import("./Load-DTmuDwdQ.js").then(ne=>ne.L),__vite__mapDeps([0,1,2]))},{path:"/embed",name:ROUTE_NAMES.EMBED,component:()=>__vitePreload(()=>import("./Embed-DViUOxwZ.js"),__vite__mapDeps([3,1,2]))}
1176,{path:"/login",name:ROUTE_NAMES.LOGIN,component:()=>__vitePreload(()=>import("./Login-LSx8Dd6G.js"),[])},{path:"/logout",name:ROUTE_NAMES.LOGOUT,component:()=>__vitePreload(()=>import("./Logout-CKAPXFne.js"),[])},{path:"/bookmarks",name:ROUTE_NAMES.BOOKMARKS,component:()=>__vitePreload(()=>import("./Bookmarks-PtXkUdws.js"),[])},{path:"/plan/:slug(.*)*",name:ROUTE_NAMES.PLAN,component:()=>__vitePreload(()=>import("./Plan-qiT4Q95X.js"),__vite__mapDeps([4,2])),props:!0},{path:"/photo/:slug(.*)*",name:"Photo",component:()=>__vitePreload(()=>import("./Photo-yVaa9D5L.js"),__vite__mapDeps([5,2])),props:!0}],router=createRouter({history:createWebHistory("/explorer-les-cartes"),routes});router.beforeEach(ne=>(typeof requestIdleCallback=="function"?requestIdleCallback(()=>{updateTitle(ne)}):updateTitle(ne),ne.fullPath==="/accueil"?handleAccueilRedirect(ne):!0));function updateTitle(ne){const ee=ne.meta.title?`${ne.meta.title} - `:"";document.title=`${ee}${MAIN_TITLE}`}function handleAccueilRedirect(ne){if(!window.location.href.includes("/accueil")){const ee=router.resolve(ne.fullPath);return window.open(ee.href),!1}return!0}const collections=[{prefix:"gpf",width:24,height:24,icons:{coordonnee:{body:'<path d="M19.96 21L19.43 16.23L18.02 17.64L12.99 12.61V6.75H14.99L11.99 3L8.99 6.75H10.99V12.6L5.94 17.64L4.53 16.23L4 21L8.77 20.47L7.36 19.06L11.98 14.43L16.6 19.06L15.19 20.47L19.96 21Z" fill="currentColor"/>'},"getfeature-fill":{body:'<path d="M11 18.43C11 18.21 11.01 18 11.03 17.78L9.06 16.8L9 16.83V4.24L14.94 7.21L15 7.18V12.11C15.91 11.68 16.92 11.43 18 11.43C19.49 11.43 20.87 11.9 22 12.69V2.76C22 2.69 21.99 2.63 21.96 2.56C21.85 2.31 21.56 2.19 21.3 2.3L15 5L9 2L2 5V21.24C2 21.31 2.01 21.37 2.04 21.44C2.15 21.69 2.44 21.81 2.7 21.7L9 19L11.21 20.11C11.08 19.57 11 19.01 11 18.43Z" fill="currentColor"/><path fill-rule="evenodd" clip-rule="evenodd" d="M18.77 20.29V21.89H17.17V20.29H18.77ZM18.34 13.91C19.8 14.1 20.86 15.4 20.77 16.87C20.67 18.34 19.45 19.49 17.98 19.49H17.18V17.89H17.98C18.61 17.89 19.14 17.4 19.18 16.77C19.22 16.14 18.77 15.58 18.14 15.5C17.51 15.42 16.93 15.83 16.81 16.45L15.24 16.14C15.53 14.69 16.89 13.72 18.35 13.91H18.34Z" fill="currentColor"/>'},"getfeature-line":{body:'<path d="M11 18.43C11 18.21 11.01 18 11.03 17.78L10 17.26V4.74L14 6.74V12.69C14.6 12.27 15.28 11.94 16 11.72V6.75L20 5.04V11.73C20.72 11.95 21.4 12.27 22 12.7V2.76C22 2.69 21.99 2.63 21.96 2.56C21.85 2.31 21.56 2.19 21.3 2.3L15 5L9 2L2 5V21.24C2 21.31 2.01 21.37 2.04 21.44C2.15 21.69 2.44 21.81 2.7 21.7L9 19L11.21 20.11C11.08 19.57 11 19.01 11 18.43ZM8 17.25L4 18.96V6.32L8 4.61V17.26V17.25Z" fill="currentColor"/><path fill-rule="evenodd" clip-rule="evenodd" d="M18.77 20.29V21.89H17.17V20.29H18.77ZM18.34 13.91C19.8 14.1 20.86 15.4 20.77 16.87C20.67 18.34 19.45 19.49 17.98 19.49H17.18V17.89H17.98C18.61 17.89 19.14 17.4 19.18 16.77C19.22 16.14 18.77 15.58 18.14 15.5C17.51 15.42 16.93 15.83 16.81 16.45L15.24 16.14C15.53 14.69 16.89 13.72 18.35 13.91H18.34Z" fill="currentColor"/>'},panoramax:{body:`<path d="M5.41102 10.5708C5.39582 10.5708 5.38062 10.5708 5.36542 10.5708L4.52945 10.3236C4.46865 10.3082 4.42305 10.2464 4.42305 10.1691V9.02575C4.42305 8.9794 4.45345 8.93305 4.48385 8.90215C4.52945 8.87125 4.57505 8.87125 4.62065 8.8867L5.45662 9.19571C5.51742 9.21116 5.56302 9.27296 5.56302 9.33476V10.4163C5.56302 10.4627 5.54782 10.509 5.50222 10.5399C5.47182 10.5554 5.44142 10.5708 5.41102 10.5708ZM4.72704 10.0455L5.25903 10.2V9.42747L4.72704 9.22661V10.0455Z" fill="currentColor"/>
1177        <path d="M5.41102 12.7339C5.39582 12.7339 5.39582 12.7339 5.38062 12.7339L4.54465 12.5485C4.46865 12.533 4.42305 12.4712 4.42305 12.394V11.2506C4.42305 11.2043 4.43825 11.1579 4.48385 11.127C4.51425 11.0961 4.57505 11.0807 4.62065 11.0961L5.45662 11.3124C5.51742 11.3279 5.57822 11.3897 5.57822 11.467V12.5794C5.57822 12.6257 5.56302 12.6721 5.51742 12.703C5.47182 12.7185 5.44142 12.7339 5.41102 12.7339ZM4.72704 12.2704L5.25903 12.394V11.5906L4.72704 11.4515V12.2704Z" fill="currentColor"/>
1178        <path d="M6.79417 13.0584C6.77897 13.0584 6.76377 13.0584 6.76377 13.0584L5.9278 12.8575C5.85181 12.8421 5.80621 12.7803 5.80621 12.703V11.5751C5.80621 11.5288 5.82141 11.4824 5.867 11.4515C5.9126 11.4206 5.9582 11.4052 6.0038 11.4206L6.83977 11.6369C6.90057 11.6524 6.96137 11.7142 6.96137 11.7914V12.9039C6.96137 12.9502 6.94617 12.9966 6.90057 13.0275C6.85497 13.0429 6.82457 13.0584 6.79417 13.0584ZM6.1102 12.5794L6.64218 12.703V11.8996L6.1102 11.7605V12.5794Z" fill="currentColor"/>
1179        <path d="M8.72451 12.5639C8.70931 12.5639 8.69411 12.5639 8.67891 12.5639L7.69094 12.224C7.63015 12.2086 7.59975 12.1468 7.59975 12.1004V11.3897C7.59975 11.3433 7.61495 11.297 7.66055 11.2815C7.69094 11.2506 7.73654 11.2506 7.78214 11.2661L8.77011 11.6369C8.81571 11.6524 8.86131 11.7142 8.86131 11.7605V12.4403C8.86131 12.4867 8.84611 12.5176 8.80051 12.5485C8.78531 12.5485 8.75491 12.5639 8.72451 12.5639ZM7.87334 11.9923L8.60291 12.2395V11.8378L7.87334 11.5597V11.9923Z" fill="currentColor"/>
1180        <path d="M9.37809 14.0781C9.36289 14.0781 9.36289 14.0781 9.34769 14.0781L8.39012 13.8464C8.32932 13.8309 8.28372 13.7846 8.28372 13.7227V12.9966C8.28372 12.9502 8.29892 12.9193 8.32932 12.8884C8.35972 12.85
118075 8.40532 12.8575 8.45092 12.873L9.40849 13.1356C9.46929 13.1511 9.49968 13.1974 9.49968 13.2592V13.9545C9.49968 14.0009 9.48448 14.0318 9.45409 14.0627C9.43889 14.0627 9.40849 14.0781 9.37809 14.0781ZM8.55732 13.5991L9.25649 13.7691V13.3519L8.55732 13.1665V13.5991Z" fill="currentColor"/>
1181        <path d="M6.79417 11.0034C6.77897 11.0034 6.76377 11.0034 6.74857 11.0034L5.8974 10.7717C5.83661 10.7562 5.79101 10.6944 5.79101 10.6172V9.47382C5.79101 9.42747 5.82141 9.38112 5.85181 9.35022C5.8974 9.31931 5.943 9.31931 5.9886 9.33476L6.83977 9.64378C6.90057 9.65923 6.94617 9.72103 6.94617 9.78283V10.8489C6.94617 10.8953 6.93097 10.9416 6.88537 10.9725C6.85497 10.988 6.82457 11.0034 6.79417 11.0034ZM6.095 10.4936L6.64218 10.6481V9.89099L6.095 9.69013V10.4936Z" fill="currentColor"/>
1182        <path d="M10.5788 14.2326C10.3813 14.2326 10.2293 14.0472 10.2293 13.8309C10.2293 13.6146 10.3813 13.4292 10.5788 13.4292C10.7764 13.4292 10.9284 13.6146 10.9284 13.8309C10.9284 14.0472 10.7764 14.2326 10.5788 14.2326ZM10.5788 13.6455C10.5029 13.6455 10.4421 13.7227 10.4421 13.8309C10.4421 13.9391 10.5029 14.0163 10.5788 14.0163C10.6548 14.0163 10.7156 13.9391 10.7156 13.8309C10.7156 13.7227 10.6548 13.6455 10.5788 13.6455Z" fill="currentColor"/>
1183        <path d="M18.6194 10.5708C18.589 10.5708 18.5586 10.5554 18.5282 10.5399C18.4826 10.509 18.4674 10.4627 18.4674 10.4163V9.33476C18.4674 9.27296 18.513 9.21116 18.5738 9.19571L19.4098 8.8867C19.4554 8.87125 19.501 8.87125 19.5465 8.90215C19.5921 8.93305 19.6073 8.9794 19.6073 9.02575V10.1691C19.6073 10.2309 19.5618 10.2927 19.501 10.3236L18.665 10.5708C18.6498 10.5708 18.6346 10.5708 18.6194 10.5708ZM18.7714 9.44292V10.2155L19.3034 10.0609V9.25751L18.7714 9.44292Z" fill="currentColor"/>
1184        <path d="M18.6194 12.7339C18.589 12.7339 18.5586 12.7185 18.5282 12.703C18.4978 12.6721 18.4674 12.6257 18.4674 12.5794V11.467C18.4674 11.3897 18.513 11.3279 18.589 11.3124L19.425 11.0961C19.4706 11.0807 19.5162 11.0961 19.5618 11.127C19.5921 11.1579 19.6225 11.2043 19.6225 11.2506V12.394C19.6225 12.4712 19.577 12.533 19.501 12.5485L18.665 12.7339C18.6346 12.7339 18.6346 12.7339 18.6194 12.7339ZM18.7714 11.5906V12.394L19.3034 12.2704V11.4515L18.7714 11.5906Z" fill="currentColor"/>
1185        <path d="M17.2514 13.0584C17.221 13.0584 17.1906 13.0429 17.1602 13.0275C17.1298 12.9966 17.0994 12.9502 17.0994 12.9039V11.7914C17.0994 11.7142 17.145 11.6524 17.221 11.6369L18.057 11.4206C18.1026 11.4052 18.1482 11.4206 18.1938 11.4515C18.2242 11.4824 18.2546 11.5288 18.2546 11.5751V12.703C18.2546 12.7803 18.209 12.8421 18.133 12.8575L17.297 13.0584C17.2818 13.0584 17.2666 13.0584 17.2514 13.0584ZM17.4034 11.915V12.7185L17.9354 12.5949V11.7914L17.4034 11.915Z" fill="currentColor"/>
1186        <path d="M15.3059 12.5639C15.2755 12.5639 15.2451 12.5485 15.2299 12.533C15.1995 12.5021 15.1691 12.4712 15.1691 12.4249V11.7451C15.1691 11.6833 15.1995 11.6369 15.2603 11.6215L16.2635 11.2506C16.3091 11.2352 16.3547 11.2352 16.3851 11.2661C16.4155 11.297 16.4459 11.3279 16.4459 11.3742V12.085C16.4459 12.1468 16.4155 12.1931 16.3547 12.2086L15.3515 12.5485C15.3363 12.5639 15.3211 12.5639 15.3059 12.5639ZM15.4427 11.8378V12.2395L16.1875 11.9923V11.5751L15.4427 11.8378Z" fill="currentColor"/>
1187        <path d="M14.5915 14.0627C14.5611 14.0318 14.5459 14.0009 14.5459 13.9545V13.2592C14.5459 13.1974 14.5915 13.1511 14.6371 13.1356L15.5947 12.873C15.6403 12.8575 15.6707 12.873 15.7163 12.8884C15.7467 12.9193 15.7619 12.9502 15.7619 12.9966V13.7227C15.7619 13.7845 15.7163 13.8464 15.6555 13.8464L14.6979 14.0781C14.6827 14.0936 14.6067 14.0781 14.5915 14.0627ZM14.8043 13.3674V13.7845L15.5035 13.6146V13.1665L14.8043 13.3674Z" fill="currentColor"/>
1188        <path d="M17.2514 11.0034C17.221 11.0034 17.1906 10.988 17.1602 10.9725C17.1298 10.9416 17.0994 10.8953 17.0994 10.8489V9.78283C17.0994 9.72103 17.145 9.65923 17.2058 9.64378L18.0418 9.33476C18.0874 9.31931 18.133 9.31931 18.1786 9.35022C18.2242 9.38112 18.2394 9.42747 18.2394 9.47382V10.6172C18.2394 10.6944 18.1938 10.7408 18.133 10.7717L17.297 11.0034C17.2818 11.0034 17.2666 11.0034 17.2514 11.0034ZM17.4034 9.89099V10.6481L17.9354 10.4936V9.69013L17.4034 9.89099Z" fill="currentColor"/>
1189        <path d="M13.4668 14.2326C13.2692 14.2326 13.1172 14.0472 13.1172 13.8309C13.1172 13.6146 13.2692 13.4292 13.4668 13.4292C13.6643 13.4292 13.8163 13.6146 13.8163 13.8309C13.8163 14.0472 13.6643 14.2326 13.4668 14.2326ZM13.4668 13.6455C13.3908 13.6455 13.33 13.7227 13.33 13.8309C13.33 13.9391 13.3908 14.0163 13.4668 14.0163C13.5428 14.0163 13.6036 13.9391 13.6036 13.8309C13.6036 13.7227 13.5428 13.6455 13.4668 13.6455Z" fill="currentColor"/>
1190        <path d="M23.9848 5.61116C23.9848 5.58026 23.9848 5.56481 23.9848 5.53391C23.9544 5.45665 23.8632 5.4103 23.7872 5.4412L22.936 5.76567V6.24464L23.6808 5.88927V18.2498H22.936V18.5588H23.8328C23.924 18.5588 23.9848 18.497 24 18.4043V5.64206C24 5.64206 24 5.62661 23.9848 5.61116Z" fill="currentColor"/>
1191        <path d="M20.1545 7.15622V6.83176L19.3946 7.12532C19.3794 7.12532 19.3794 7.14077 19.3642 7.14077C19.3642 7.14077 16.765 8.76309 16.7194 8.79399C16.6738 8.82489 16.6282 8.87124 16.6282 8.93305V9.81373L14.1203 11.3279C14.0747 11.3433 14.0443 11.4051 14.0443 11.4515L14.0291 12.1931L12.6612 13.012C12.5852 13.0584 
119112.6156 13.1665 12.6156 13.2438C12.6156 13.321 12.6156 14.9279 12.6156 14.9279L12.038 14.7116C12.0076 14.6961 11.962 14.6961 11.9316 14.7116L11.4148 14.9279C11.4148 14.9279 11.4148 13.2592 11.4148 13.2438C11.4148 13.1511 11.43 13.0738 11.354 13.0275L9.98607 12.2086L9.97087 11.467C9.97087 11.4206 9.94047 11.3742 9.89487 11.3433L7.40215 9.84463V8.93305C7.40215 8.87124 7.37175 8.82489 7.31096 8.79399L7.11336 8.70129L4.11906 6.86266C4.10386 6.86266 4.10386 6.84721 4.08866 6.84721L3.87587 6.75451V7.09442L3.96707 7.14077L4.68145 7.60429L4.10386 7.34163C4.08866 7.34163 4.08866 7.34163 4.08866 7.34163L3.87587 7.21803V18.5897H4.01267C4.05827 18.5897 4.08866 18.5742 4.13426 18.5433C4.17986 18.5124 11.9924 15.0361 11.9924 15.0361C11.9924 15.0361 19.9417 18.5742 19.9873 18.5897C20.0329 18.6051 20.1545 18.5897 20.1545 18.5897V7.26438L18.7714 7.8824L19.501 7.41888L20.1545 7.15622ZM6.26219 17.23L5.09183 17.7554V13.9236L6.26219 14.1399V17.23ZM7.08297 16.8438L6.56618 17.0755V14.0163C6.56618 13.9391 6.52058 13.8773 6.44459 13.8618L4.97024 13.5991C4.92464 13.5837 4.87904 13.5991 4.84864 13.63C4.80304 13.6609 4.78784 13.7073 4.78784 13.7536V17.879L4.17986 18.1571V7.71245L6.91577 8.9485L7.08297 9.0412V16.8438ZM7.40215 10.2L8.48132 10.8489L7.40215 10.37V10.2ZM8.22293 14.4798L8.86131 14.5725L8.87651 16.0403L8.23813 16.3185L8.22293 14.4798ZM9.63648 12.6876C9.63648 12.703 9.63648 12.7339 9.63648 12.7494V15.7004L9.1197 15.9322L9.1045 14.4644C9.1045 14.3871 9.0589 14.3408 8.9981 14.3253L8.10133 14.1863C8.05573 14.1863 8.02533 14.1863 7.99493 14.2172C7.96453 14.2481 7.94934 14.279 7.94934 14.3253L7.96454 16.4421L7.40215 16.6893V10.6944L9.63648 11.6987V12.6876ZM9.94047 12.5485L10.2141 12.7185L9.94047 12.6258V12.5485ZM10.7004 15.2369L10.4421 15.3605V14.6343L10.7004 14.6652V15.2369ZM11.1108 15.0515L10.9132 15.1288V14.5416C10.9132 14.4798 10.8676 14.4335 10.8068 14.4335L10.3357 14.4026C10.3053 14.4026 10.2749 14.418 10.2597 14.4335C10.2445 14.4489 10.2293 14.4798 10.2293 14.5107V15.4532L9.94047 15.5768V12.9657L11.1108 13.3674V15.0515ZM13.5883 15.3296L13.33 15.206V14.6343L13.5883 14.6189V15.3296ZM14.0899 15.5614L13.7859 15.4223V14.5107C13.7859 14.4798 13.7707 14.4489 13.7555 14.4335C13.7403 14.418 13.7099 14.4026 13.6795 14.4026L13.2084 14.4335C13.1476 14.4335 13.102 14.4798 13.102 14.5416V15.1133L12.9196 15.0361V13.3365L14.0899 12.9502V15.5614ZM14.0899 12.6412L13.5731 12.8112L14.0899 12.5021V12.6412ZM15.7467 16.303L15.1083 16.0094L15.1235 14.5262L15.7619 14.4335L15.7467 16.303ZM16.6282 16.7047L16.0051 16.4266L16.0203 14.2944C16.0203 14.2481 16.0051 14.2172 15.9747 14.1863C15.9443 14.1554 15.9139 14.1554 15.8683 14.1554L14.9715 14.2944C14.9107 14.3099 14.8651 14.3717 14.8651 14.4335L14.8499 15.9013L14.3939 15.7004V11.6987L16.6282 10.6944V16.7047ZM16.6282 10.37L15.3211 10.9571L16.6282 10.1691V10.37ZM17.7074 17.2146V14.0936L18.8778 13.8927V17.7245L17.7074 17.2146ZM19.8353 7.7279V18.1725L19.1818 17.879V13.7227C19.1818 13.6764 19.1514 13.63 19.121 13.5991C19.0906 13.5682 19.045 13.5528 18.9994 13.5682L17.525 13.8309C17.449 13.8464 17.4034 13.9082 17.4034 13.9854V17.0755L16.9474 16.8747L16.9322 9.05665L19.8353 7.7279Z" fill="currentColor"/>
1192        <path d="M0.319189 5.90472L1.04877 6.24464V5.82747L0.395187 5.59571L0.227993 5.51846C0.167195 5.503 0.121596 5.503 0.0759976 5.53391C0.0303992 5.54936 0 5.61116 0 5.65751V18.4197C0 18.5124 0.0607982 18.5742 0.151995 18.5742H1.04877V18.2652H0.319189V5.90472Z" fill="currentColor"/>
1193        <path d="M21.5529 8.67039C21.0817 8.67039 20.7017 8.28412 20.7017 7.80515V4.73047H17.0842C16.613 4.73047 16.2331 4.34421 16.2331 3.86524C16.2331 3.38627 16.613 3 17.0842 3H21.5529C22.0241 3 22.4041 3.38627 22.4041 3.86524V7.80515C22.4041 8.28412 22.0241 8.67039 21.5529 8.67039Z" fill="currentColor"/>
1194        <path d="M6.90057 21H2.43192C1.96073 21 1.58075 20.6137 1.58075 20.1348V16.1948C1.58075 15.7159 1.96073 15.3296 2.43192 15.3296C2.9031 15.3296 3.28309 15.7159 3.28309 16.1948V19.2695H6.90057C7.37175 19.2695 7.75174 19.6558 7.75174 20.1348C7.75174 20.6137 7.37175 21 6.90057 21Z" fill="currentColor"/>
1195        <path d="M2.43192 8.67039C1.96073 8.67039 1.58075 8.28412 1.58075 7.80515V3.86524C1.58075 3.38627 1.96073 3 2.43192 3H6.90057C7.37175 3 7.75174 3.38627 7.75174 3.86524C7.75174 4.34421 7.37175 4.73047 6.90057 4.73047H3.28309V7.80515C3.28309 8.28412 2.9031 8.67039 2.43192 8.67039Z" fill="currentColor"/>
1196        <path d="M21.5529 21H17.0842C16.613 21 16.2331 20.6137 16.2331 20.1348C16.2331 19.6558 16.613 19.2695 17.0842 19.2695H20.7017V16.1948C20.7017 15.7159 21.0817 15.3296 21.5529 15.3296C22.0241 15.3296 22.4041 15.7159 22.4041 16.1948V20.1348C22.4041 20.6137 22.0241 21 21.5529 21Z" fill="currentColor"/>
1197        `}}},{prefix:"ri",width:24,height:24,icons:{"account-circle-fill":{body:'<path fill="
1197currentColor" d="M12 2c5.52 0 10 4.48 10 10s-4.48 10-10 10S2 17.52 2 12S6.48 2 12 2M6.023 15.416C7.491 17.606 9.695 19 12.16 19s4.669-1.393 6.136-3.584A8.97 8.97 0 0 0 12.16 13a8.97 8.97 0 0 0-6.137 2.416M12 11a3 3 0 1 0 0-6a3 3 0 0 0 0 6"/>'},"arrow-right-line":{body:'<path fill="currentColor" d="m16.172 11l-5.364-5.364l1.414-1.414L20 12l-7.778 7.778l-1.414-1.414L16.172 13H4v-2z"/>'},"bookmark-line":{body:'<path fill="currentColor" d="M5 2h14a1 1 0 0 1 1 1v19.143a.5.5 0 0 1-.766.424L12 18.03l-7.234 4.536A.5.5 0 0 1 4 22.143V3a1 1 0 0 1 1-1m13 2H6v15.432l6-3.761l6 3.761z"/>'},"check-line":{body:'<path fill="currentColor" d="m10 15.17l9.192-9.191l1.414 1.414L10 17.999l-6.364-6.364l1.414-1.414z"/>'},"close-line":{body:'<path fill="currentColor" d="m12 10.587l4.95-4.95l1.414 1.414l-4.95 4.95l4.95 4.95l-1.415 1.414l-4.95-4.95l-4.949 4.95l-1.414-1.415l4.95-4.95l-4.95-4.95L7.05 5.638z"/>'},"cloud-line":{body:'<path fill="currentColor" d="M12 2a7 7 0 0 1 6.992 7.339A6 6 0 0 1 17 21H7A6 6 0 0 1 5.008 9.339A7 7 0 0 1 12 2m0 2a5 5 0 0 0-4.994 5.243l.07 1.488l-1.404.494A4.002 4.002 0 0 0 7 19h10a4 4 0 1 0-3.796-5.265l-1.898-.633A6 6 0 0 1 17 9a5 5 0 0 0-5-5"/>'},"compasses-2-line":{body:'<path fill="currentColor" d="M16.33 13.497a6.99 6.99 0 0 0 2.67-5.5h2a8.99 8.99 0 0 1-3.661 7.246l2.527 4.378a2 2 0 0 1-.732 2.732l-3.527-6.108a9 9 0 0 1-3.607.752a9 9 0 0 1-3.607-.752l-3.527 6.108a2 2 0 0 1-.732-2.732l5.064-8.77A4.002 4.002 0 0 1 11 4.123V1.997h2v2.126a4.002 4.002 0 0 1 1.803 6.728zm-1.73 1.001l-1.528-2.646
1197a4 4 0 0 1-2.142 0l-1.528 2.646a7 7 0 0 0 2.599.499a7 7 0 0 0 2.599-.499M12 9.997a2 2 0 1 0 0-4a2 2 0 0 0 0 4"/>'},"custom-size":{body:'<path fill="currentColor" d="M8 3h7V.5L18.5 4L15 7.5V5H8v2.5L4.5 4L8 .5zM3 17V6.5h2V17a2 2 0 0 0 2 2h10.5v2H7a4 4 0 0 1-4-4m18-1V9h2.5L20 5.5L16.5 9H19v7h-2.5l3.5 3.5l3.5-3.5z"/>'},"drag-drop-fill":{body:'<path fill="currentColor" d="M14 6h2v2h5a1 1 0 0 1 1 1v7.5L16 13l.036 8.062l2.223-2.15L20.041 22H9a1 1 0 0 1-1-1v-5H6v-2h2V9a1 1 0 0 1 1-1h5zm8 11.338V21a1 1 0 0 1-.048.307l-1.96-3.394zM4 14v2H2v-2zm0-4v2H2v-2zm0-4v2H2V6zm0-4v2H2V2zm4 0v2H6V2zm4 0v2h-2V2zm4 0v2h-2V2z"/>'},"drag-drop-line":{body:'<path fill="currentColor" d="m16 13l6.964 4.062l-2.973.85l2.125 3.681l-1.732 1l-2.125-3.68l-2.223 2.15zm-2-7h2v2h5a1 1 0 0 1 1 1v4h-2v-3H10v10h4v2H9a1 1 0 0 1-1-1v-5H6v-2h2V9a1 1 0 0 1 1-1h5zM4 14v2H2v-2zm0-4v2H2v-2zm0-4v2H2V6zm0-4v2H2V2zm4 0v2H6V2zm4 0v2h-2V2zm4 0v2h-2V2z"/>'},draggable:{body:'<path fill="currentColor" d="M8.5 7a1.5 1.5 0 1 0 0-3a1.5 1.5 0 0 0 0 3m0 6.5a1.5 1.5 0 1 0 0-3a1.5 1.5 0 0 0 0 3m1.5 5a1.5 1.5 0 1 1-3 0a1.5 1.5 0 0 1 3 0M15.5 7a1.5 1.5 0 1 0 0-3a1.5 1.5 0 0 0 0 3m1.5 5a1.5 1.5 0 1 1-3 0a1.5 1.5 0 0 1 3 0m-1.5 8a1.5 1.5 0 1 0 0-3a1.5 1.5 0 0 0 0 3"/>'},"earth-fill":{body:'<path fill="currentColor" d="M12 2c5.523 0 10 4.477 10 10s-4.477 10-10 10S2 17.523 2 12S6.477 2 12 2m4.004 10.878c-.345-.525-.594-.903-1.542-.753c-1.79.284-1.989.597-2.074 1.113l-.024.156l-.025.166c-.097.683-.094.941.22 1.27c1.265 1.328 2.023 2.285 2.253 2.845c.112.273.4 1.1.202 1.918a8.2 8.2 0 0 0 3.151-2.237c.11-.374.19-.84.19-1.404v-.105c0-.922 0-1.343-.652-1.716a7 7 0 0 0-.645-.325c-.367-.167-.61-.276-.938-.756q-.06-.085-.116-.172M12 3.833c-2.317 0-4.41.966-5.896 2.516c.177.123.331.296.437.534c.204.457.204.928.204 1.345c0 .328 0 .64.105.865c.144.308.766.44 1.315.554c.197.042.399.084.583.135c.506.14.898.595 1.211.96c.13.151.323.374.42.43c.05-.036.211-.211.29-.498c.062-.22.044-.414-.045-.52c-.56-.66-.529-1.93-.356-2.399c.272-.739 1.122-.684 1.744-.644c.232.015.45.03.614.009c.622-.078.814-1.025.949-1.21c.292-.4 1.186-1.003 1.74-1.375A8.1 8.1 0 0 0 12 3.833"/>'},"earth-line":{body:'<path fill="currentColor" d="M6.235 6.453a8 8 0 0 0 8.817 12.944c.115-.75-.137-1.47-.24-1.722c-.23-.56-.988-1.517-2.253-2.844c-.338-.355-.316-.627-.195-1.437l.013-.091c.082-.554.22-.882 2.085-1.178c.948-.15 1.197.228 1.542.753l.116.172c.328.48.571.59.938.756c.165.075.37.17.645.325c.652.373.652.794.652 1.716v.105c0 .391-.038.735-.098 1.034a8.002 8.002 0 0 0-3.105-12.341c-.553.373-1.312.902-1.577 1.265c-.135.185-.327 1.132-.95 1.21c-.162.02-.381.006-.613-.009c-.622-.04-1.472-.095-1.744.644c-.173.468-.203 1.74.356 2.4c.09.105.107.3.046.519c-.08.287-.241.462-.292.498c-.096-.056-.288-.279-.419-.43c-.313-.366-.705-.82-1.211-.96c-.184-.051-.386-.093-.583-.135c-.549-.115-1.17-.246-1.315-.554c-.106-.226-.105-.537-.105-.865c0-.417 0-.888-.204-1.345a1.3 1.3 0 0 0-.306-.43M12 22C6.477 22 2 17.523 2 12S6.477 2 12 2s10 4.477 10 10s-4.477 10-10 10"/>'},"file-copy-fill":{body:'<path fill="currentColor" d="M7 6V3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v14a1 1 0 0 1-1 1h-3v3c0 .552-.45 1-1.007 1H4.007A1 1 0 0 1 3 21l.003-14c0-.552.45-1 1.006-1zm2 0h8v10h2V4H9z"/>'},"file-copy-line":{body:'<path fill="currentColor" d="M7 6V3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v14a1 1 0 0 1-1 1h-3v3c0 .552-.45 1-1.007 1H4.007A1 1 0 0 1 3 21l.003-14c0-.552.45-1 1.006-1zM5.002 8L5 20h10V8zM9 6h8v10h2V4H9z"/>'},"file-upload-fill":{body:'<path fill="currentColor" d="m16 2l5 5v14.008a.993.993 0 0 1-.993.992H3.993A1 1 0 0 1 3 21.008V2.992C3 2.444 3.445 2 3.993 2zm-3 10h3l-4-4l-4 4h3v4h2z"/>'},"file-upload-line":{body:'<path fill="currentColor" d="M15 4H5v16h14V8h-4zM3 2.992C3 2.444 3.447 2 3.999 2H16l5 5v13.993A1 1 0 0 1 20.007 22H3.993A1 1 0 0 1 3 21.008zM13 12v4h-2v-4H8l4-4l4 4z"/>'},"flower-fill":{body:'<path fill="currentColor" d="M12.455 2.309L12 2.076l-.455.233a12 12 0 0 0-3.09 2.265A14 14 0 0 1 12 7.202a14 14 0 0 1 3.544-2.628a12 12 0 0 0-3.089-2.265m-1.756 6.425a11.98 11.98 0 0 0-6.518-3.536L3 4.98V13a9 9 0 0 0 5.697 8.374A14 14 0 0 1 8 17c0-3.092 1.002-5.95 2.7-8.266M21 4.981l-1.18.217C14.232 6.224 10 11.117 10 17c0 1.536.29 3.007.817 4.36l.24.615c.314.01.629.025.943.025a9 9 0 0 0 9-9z"/>'}
1197,"flower-line":{body:'<path fill="currentColor" d="m12 2.076l.455.233a12.05 12.05 0 0 1 4.402 3.846a12 12 0 0 1 2.962-.957L21 4.98V13a9 9 0 0 1-18 0V4.98l1.18.218c1.041.19 2.035.516 2.963.957a12.05 12.05 0 0 1 4.402-3.846zm-3.122 5.09A12.1 12.1 0 0 1 12 10.363a12.1 12.1 0 0 1 3.122-3.199A10.1 10.1 0 0 0 12 4.337a10.1 10.1 0 0 0-3.122 2.828m2.021 5.268a10.05 10.05 0 0 0-3.908-4.102A10 10 0 0 0 5 7.457V13c0 3.29 2.27 6.05 5.329 6.8A12 12 0 0 1 10 17c0-1.617.32-3.159.9-4.566m1.554 7.552A7 7 0 0 0 19 13V7.457A10 10 0 0 0 12 17c0 1.042.159 2.045.453 2.987"/>'},"fullscreen-exit-fill":{body:'<path fill="currentColor" d="M18 7h4v2h-6V3h2zM8 9H2V7h4V3h2zm10 8v4h-2v-6h6v2zM8 15v6H6v-4H2v-2z"/>'},"fullscreen-exit-line":{body:'<path fill="currentColor" d="M18 7h4v2h-6V3h2zM8 9H2V7h4V3h2zm10 8v4h-2v-6h6v2zM8 15v6H6v-4H2v-2z"/>'},"fullscreen-fill":{body:'<path fill="currentColor" d="M16 3h6v6h-2V5h-4zM2 3h6v2H4v4H2zm18 16v-4h2v6h-6v-2zM4 19h4v2H2v-6h2z"/>'},"fullscreen-line":{body:'<path fill="currentColor" d="M8 3v2H4v4H2V3zM2 21v-6h2v4h4v2zm20 0h-6v-2h4v-4h2zm0-12h-2V5h-4V3h6z"/>'},"function-add-fill":{body:'<path fill="currentColor" d="M4 3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h6a1 1 0 0 0 1-1V4a1 1 0 0 0-1-1zm0 10a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h6a1 1 0 0 0 1-1v-6a1 1 0 0 0-1-1zm10 0a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h6a1 1 0 0 0 1-1v-6a1 1 0 0 0-1-1zm2-2V8h-3V6h3V3h2v3h3v2h-3v3z"/>'},"function-add-line":{body:'<path fill="currentColor" d="M4 3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h6a1 1 0 0 0 1-1V4a1 1 0 0 0-1-1zm0 10a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h6a1 1 0 0 0 1-1v-6a1 1 0 0 0-1-1zm10 0a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h6a1 1 0 0 0 1-1v-6a1 1 0 0 0-1-1zm1 6v-4h4v4zM5 9V5h4v4zm0 10v-4h4v4zm11-8V8h-3V6h3V3h2v3h3v2h-3v3z"/>'},"grid-fill":{body:'<path fill="currentColor" d="M14 10v4h-4v-4zm2 0h5v4h-5zm-2 11h-4v-5h4zm2 0v-5h5v4a1 1 0 0 1-1 1zM14 3v5h-4V3zm2 0h4a1 1 0 0 1 1 1v4h-5zm-8 7v4H3v-4zm0 11H4a1 1 0 0 1-1-1v-4h5zM8 3v5
1197H3V4a1 1 0 0 1 1-1z"/>'},"layout-top-line":{body:'<path fill="currentColor" d="M21 3a1 1 0 0 1 1 1v16a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1zM4 10v9h16v-9zm0-2h16V5H4z"/>'},"line-chart-line":{body:'<path fill="currentColor" d="M5 3v16h16v2H3V3zm15.293 3.293l1.414 1.414L16 13.414l-3-2.999l-4.293 4.292l-1.414-1.414L13 7.586l3 2.999z"/>'},"list-check":{body:'<path fill="currentColor" d="M8 4h13v2H8zm-5-.5h3v3H3zm0 7h3v3H3zm0 7h3v3H3zM8 11h13v2H8zm0 7h13v2H8z"/>'},"list-indefinite":{body:'<path fill="currentColor" d="M13 4h8v2h-8zm0 7h8v2h-8zm0 7h8v2h-8zm-6.5 1a2 2 0 1 1 0-4a2 2 0 0 1 0 4m0 2a4 4 0 1 0 0-8a4 4 0 0 0 0 8M5 6v3h3V6zM3 4h7v7H3z"/>'},"map-2-fill":{body:'<path fill="currentColor" d="m2 5l7-3l6 3l6.303-2.701a.5.5 0 0 1 .697.46V19l-7 3l-6-3l-6.303 2.701a.5.5 0 0 1-.697-.46zm13 14.764V7.176l-.065.028L9 4.236v12.588l.065-.028z"/>'},"map-2-line":{body:'<path fill="currentColor" d="m2 5l7-3l6 3l6.303-2.701a.5.5 0 0 1 .697.46V19l-7 3l-6-3l-6.303 2.701a.5.5 0 0 1-.697-.46zm14 14.395l4-1.714V5.033l-4 1.714zm-2-.131V6.736l-4-2v12.528zm-6-2.011V4.605L4 6.319v12.648z"/>'},"map-pin-5-fill":{body:'<path fill="currentColor" d="M17.657 15.657L12 21.314l-5.657-5.657a8 8 0 1 1 11.314 0M5 22h14v2H5z"/>'},"map-pin-5-line":{body:'<path fill="currentColor" d="m12 18.485l4.243-4.242a6 6 0 1 0-8.486 0zm5.657-2.828L12 21.314l-5.657-5.657a8 8 0 1 1 11.314 0M5 22h14v2H5z"/>'},"map-pin-add-fill":{body:'<path fill="currentColor" d="M18.364 17.364L12 23.728l-6.364-6.364a9 9 0 1 1 12.728 0M11 10H8v2h3v3h2v-3h3v-2h-3V7h-2z"/>'},"map-pin-add-line":{body:'<path fill="currentColor" d="m12 20.9l4.95-4.95a7 7 0 1 0-9.9 0zm0 2.828l-6.364-6.364a9 9 0 1 1 12.728 0zM11 10V7h2v3h3v2h-3v3h-2v-3H8v-2z"/>'},"map-pin-time-fill":{body:'<path fill="currentColor" d="M13 11V6h-2v7h6v-2zm5.364 6.364L12 23.728l-6.364-6.364a9 9 0 1 1 12.728 0"/>'},"map-pin-time-line":{body:'<path fill="currentColor" d="M16.95 15.95a7 7 0 1 0-9.9 0L12 20.9zM12 23.728l-6.364-6.364a9 9 0 1 1 12.728 0zM13 11h4v2h-6V6h2z"/>'},"menu-2-line":{body:'<path fill="currentColor" d="M3 4h18v2H3zm0 7h12v2H3zm0 7h18v2H3z"/>'},"menu-add-fill":{body:'<path fill="currentColor" d="m18 15l-.001 3H21v2h-3.001L18 23h-2l-.001-3H13v-2h2.999L16 15zm-7 3v2H3v-2zm10-7v2H3v-2zm0-7v2H3V4z"/>'},"menu-search-fill":{body:'<path fill="currentColor" d="M18.618 13.032a5.5 5.5 0 1 1 1.414-1.414l2.675 2.675l-1.414 1.414zM3 4h5v2H3zm0 7h5v2H3zm0 7h18v2H3z"/>'},"menu-search-line":{body:'<path fill="currentColor" d="M15.5 5a3.5 3.5 0 1 0 0 7a3.5 3.5 0 0 0 0-7M10 8.5a5.5 5.5 0 1 1 10.032 3.117l2.675 2.676l-1.414 1.414l-2.675-2.675A5.5 5.5 0 0 1 10 8.5M3 4h5v2H3zm0 7h5v2H3zm18 7v2H3v-2z"/>'},"navigation-fill":{body:'<path fill="currentColor" d="m2.9 2.3l18.805 6.268a.5.5 0 0 1 .028.939L13 13l-4.425 8.85a.5.5 0 0 1-.928-.086L2.261 2.912a.5.5 0 0 1 .638-.612"/>'},"navigation-line":{body:'<path fill="currentColor" d="m4.965 5.096l3.546 12.41l3.04-6.08l5.637-2.255zM2.899 2.3l18.806 6.268a.5.5 0 0 1 .028.939L13 13l-4.425 8.85a.5.5 0 0 1-.928-.086L2.261 2.91a.5.5 0 0 1 .638-.611"/>'},"pencil-line":{body:'<path fill="currentColor" d="m15.728 9.576l-1.414-1.414L5 17.476v1.414h1.414zm1.414-1.414l1.414-1.414l-1.414-1.414l-1.414 1.414zm-9.9 12.728H3v-4.243L16.435 3.212a1 1 0 0 1 1.414 0l2.829 2.829a1 1 0 0 1 0 1.414z"/>'},"play-list-add-fill":{body:'<path fill="currentColor" d="M2 18h10v2H2zm0-7h20v2H2zm0-7h20v2H2zm16 14v-3h2v3h3v2h-3v3h-2v-3h-3v-2z"/>'},"play-list-add-line":{body:'<path fill="currentColor" d="M2 18h10v2H2zm0-7h20v2H2zm0-7h20v2H2zm16 14v-3h2v3h3v2h-3v3h-2v-3h-3v-2z"/>'},"question-fill":{body:'<path fill="currentColor" d="M12 22C6.477 22 2 17.523 2 12S6.477 2 12 2s10 4.477 10 10s-4.477 10-10 10m-1-7v2h2v-2zm2-1.645A3.502 3.502 0 0 0 12 6.5a3.5 3.5 0 0 0-3.433 2.813l1.962.393A1.5 1.5 0 1 1 12 11.5a1 1 0 0 0-1 1V14h2z"/>'},"route-fill":{body:'<path fill="currentColor" d="M4 15V8.5a4.5 4.5 0 0 1 9 0v7a2.5 2.5 0 0 0 5 0V8.83a3.001 3.001 0 1 1 2 0v6.67a4.5 4.5 0 1 1-9 0v-7a2.5 2.5 0 0 0-5 0V15h3l-4 5l-4-5z"/>'},"route-line":{body:'<path fill="currentColor" d="M4 15V8.5a4.5 4.5 0 0 1 9 0v7a2.5 2.5 0 0 0 5 0V8.83a3.001 3.001 0 1 1 2 0v6.67a4.5 4.5 0 1 1-9 0v-7a2.5 2.5 0 0 0-5 0V15h3l-4 5l-4-5zm15-8a1 1 0 1 0 0-2a1 1 0 0 0 0 2"/>'}
1197,"ruler-line":{body:'<path fill="currentColor" d="m6.343 14.728l-2.828 2.829l3.535 3.535L20.485 7.657L16.95 4.121l-2.121 2.122l1.414 1.414l-1.414 1.414l-1.415-1.414l-2.121 2.121l2.121 2.122L12 13.314l-2.12-2.121l-2.122 2.12l1.415 1.415l-1.415 1.414zM17.657 2l4.95 4.95a1 1 0 0 1 0 1.414l-14.85 14.85a1 1 0 0 1-1.414 0l-4.95-4.95a1 1 0 0 1 0-1.415L16.243 2a1 1 0 0 1 1.414 0"/>'},"settings-5-line":{body:'<path fill="currentColor" d="M2.212 14.06a9.95 9.95 0 0 1 .001-4.12c1.11.131 2.079-.236 2.396-1.001s-.109-1.71-.986-2.402a9.95 9.95 0 0 1 2.913-2.914c.692.878 1.637 1.303 2.402.986s1.133-1.286 1.002-2.396a9.95 9.95 0 0 1 4.12 0c-.131 1.11.236 2.08 1.001 2.396c.765.317 1.71-.108 2.402-.985a9.9 9.9 0 0 1 2.914 2.912c-.878.692-1.303 1.638-.986 2.403s1.286 1.132 2.396 1.001a9.95 9.95 0 0 1 0 4.12c-1.11-.13-2.08.237-2.396 1.002c-.317.764.108 1.71.985 2.402a9.95 9.95 0 0 1-2.912 2.914c-.693-.878-1.638-1.304-2.403-.987s-1.132 1.286-1.001 2.397a9.9 9.9 0 0 1-4.12-.001c.13-1.11-.237-2.079-1.002-2.396s-1.71.109-2.402.986a9.9 9.9 0 0 1-2.914-2.913c.878-.692 1.304-1.637.987-2.402s-1.286-1.133-2.397-1.002M4 12.21c1.1.305 2.007 1.002 2.456 2.086c.45 1.085.3 2.22-.262 3.212q.145.153.298.298c.993-.563 2.127-.712 3.212-.262c1.084.449 1.781 1.356 2.085 2.456q.21.006.42 0c.305-1.1 1.002-2.007 2.087-2.456c1.084-.45 2.219-.3 3.212.262q.152-.145.297-.298c-.562-.993-.711-2.127-.262-3.212c.45-1.084 1.357-1.781 2.456-2.085q.006-.21 0-.421c-1.1-.304-2.007-1.001-2.456-2.086c-.45-1.084-.3-2.22.262-3.212a8 8 0 0 0-.297-.297c-.993.562-2.128.711-3.212.262C13.21 6.007 12.514 5.1 12.21 4a8 8 0 0 0-.42 0c-.305 1.1-1.002 2.008-2.086 2.457c-1.085.45-2.22.3-3.212-.262q-.153.144-.298.297c.563.993.712 2.128.262 3.212S5.1 11.485 4 11.79q-.006.21 0 .42M12 15a3 3 0 1 1 0-6a3 3 0 0 1 0 6m0-2a1 1 0 1 0 0-2a1 1 0 0 0 0 2"/>'},"share-2-fill":{body:'<path fill="currentColor" d="M18.414 9L12 2.586L5.586 9H11v7h2V9zM3 14v4a3 3 0 0 0 3 3h12a3 3 0 0 0 3-3v-4h-2v4a1 1 0 0 1-1 1H6a1 1 0 0 1-1-1v-4z"/>'},"share-2-line":{body:'<path fill="currentColor" d="m12 2.586l6.207 6.207l-1.414 1.414L13 6.414V16h-2V6.414l-3.793 3.793l-1.414-1.414zM3 18v-4h2v4a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-4h2v4a3 3 0 0 1-3 3H6a3 3 0 0 1-3-3"/>'},"shining-2-fill":{body:'<path fill="currentColor" d="M12 .5L16 8l7.5 4l-7.5 4l-4 7.5L8 16L.5 12L8 8z"/>'},"shining-2-line":{body:'<path fill="currentColor" d="m16 8l7.5 4l-7.5 4l-4 7.5L8 16L.5 12L8 8l4-7.5zm3.25 4l-4.728-2.522L12 4.75L9.478 9.478L4.75 12l4.728 2.522L12 19.25l2.522-4.728z"/>'},"signpost-fill":{body:'<path fill="currentColor" d="M12 5V2h-2v3H4a1 1 0 0 0-1 1v8a1 1 0 0 0 1 1h13.414l4.293-4.293a1 1 0 0 0 0-1.414L17.414 5zm0 12h-2v5h2z"/>'},"signpost-line":{body:'<path fill="currentColor" d="M12 5h5.414l4.293 4.293a1 1 0 0 1 0 1.414L17.414 15H12v7h-2v-7H4a1 1 0 0 1-1-1V6a1 1 0 0 1 1-1h6V2h2zm4.586 8l3-3l-3-3H5v6z"/>'},text:{body:'<path fill="currentColor" d="M13 6v15h-2V6H5V4h14v2z"/>'},"tools-line":{body:'<path fill="currentColor" d="M5.33 3.272a3.5 3.5 0 0 1 4.254 4.962l10.709 10.71l-1.414 1.414l-10.71-10.71a3.502 3.502 0 0 1-4.962-4.255L5.444 7.63a1.5 1.5 0 0 0 2.121-2.121zm10.367 1.883l3.182-1.768l1.414 1.415l-1.768 3.182l-1.768.353l-2.12 2.121l-1.415-1.414l2.121-2.121zm-6.718 8.132l1.415 1.414l-5.304 5.303a1 1 0 0 1-1.492-1.327l.078-.087z"/>'},"tree-fill":{body:'<path fill="currentColor" d="M18 7q0 .393-.05.774A6 6 0 0 1 13 18.658V22h-2v-3.6a5.5 5.5 0 0 1-6.517-8.657A8 8 0 0 0 6.286 12.6l1.428-1.4A6 6 0 0 1 6 7a6 6 0 1 1 12 0"/>'},"tree-line":{body:'<path fill="currentColor" d="M6 7a6 6 0 1 1 11.95.775A6 6 0 0 1 15 19h-2v3h-2v-3H8.5A5.5 5.5 0 0 1 6.191 8.507A6 6 0 0 1 6 7m1.01 3.332A3.502 3.502 0 0 0 8.5 17H15a4 4 0 0 0 1.454-7.728l-.841-.328C15.79 8.304 16 7.672 16 7a4 4 0 1 0-6.4 3.2l-1.2 1.6a6 6 0 0 1-1.39-1.468"/>'},"zoom-in-line":{body:'<path fill="currentColor" d="m18.031 16.617l4.283 4.282l-1.415 1.415l-4.282-4.283A8.96 8.96 0 0 1 11 20c-4.968 0-9-4.032-9-9s4.032-9 9-9s9 4.032 9 9a8.96 8.96 0 0 1-1.969 5.617m-2.006-.742A6.98 6.98 0 0 0 18 11c0-3.867-3.133-7-7-7s-7 3.133-7 7s3.133 7 7 7a6.98 6.98 0 0 0 4.875-1.975zM10 10V7h2v3h3v2h-3v3h-2v-3H7v-2z"/>'}}}],registeredIconCollections=()=>{for(const ne of collections)addCollection(ne)};registeredIconCollections();async function waitingPrepareApp(){if(window.__ENV__.VITE_HTTP_MOCK_REQUEST==="1"){const{worker:ne}=await __vitePreload(async()=>{const{worker:ee}=await import("./browser-DdvK91tO.js");return{worker:ee}},[]);return ne.start({serviceWorker:{url:"/explorer-les-cartes/mockServiceWorker.js"},onUnhandledRequest(ee,te){ee.url.includes("data.geopf.fr")||ee.url.includes("acwg.cartes.gouv.fr")||te.warning()}})}return Promise.resolve()}const storage=localStorage.getItem("service"),services=createServices(storage?JSON.parse(storage).connexion:{}),eulerian=createEulerian({verbose:!1,domain:"acwg.cartes.gouv.fr",site:{environment:"production",entity:"IGN"}}
1197),logger=distExports$1.createLogger({enabled:!0,level:"error",callerInfo:!0}),pinia=createPinia(),notivue=createNotivue$1({position:"bottom-center",limit:3,enqueue:!0,avoidDuplicates:!1,notifications:{global:{duration:2e3}}}),bus=createBusEvent(),store=storePlugin({stores:["service"],storage:localStorage});pinia.use(store);const app=createApp(_sfc_main);app.use(pinia);app.use(router);app.use(logger);app.use(eulerian);app.use(notivue);app.use(bus);app.use(services);waitingPrepareApp().then(async()=>{await router.isReady(),app.mount("#app")});export{$$3 as $,computed as A,useControlsMenuOptions as B,renderList as C,inject as D,withCtx as E,Fragment as F,createTextVNode as G,rt$1 as H,push$1 as I,nextTick as J,xo as K,distExports$1 as L,useClipboard as M,onBeforeMount as N,useTemplateRef as O,ServiceError as P,wa as Q,il as R,Sa as S,Ol as T,onUnmounted as U,useEulerian as V,useRouter as W,Xs as X,normalizeStyle as Y,Dt as Z,_export_sfc as _,useModel as a,Drawing as a$,useMatchMedia as a0,useDataStore as a1,Dc as a2,VectorTileLayer as a3,VectorSource as a4,VectorLayer as a5,TileLayer as a6,__vitePreload as a7,useCssVars as a8,reactive as a9,GeoportalOverviewMap as aA,useControlsOptions as aB,GeoportalZoom as aC,LayerSwitcher as aD,transformExtent as aE,Legends as aF,sanitizeHtml as aG,Style$1 as aH,Text as aI,Fill as aJ,Stroke as aK,Icon as aL,Marker as aM,GPX$1 as aN,GPX as aO,KML$1 as aP,KML as aQ,GeoJSON$1 as aR,GeoJSON as aS,MVT as aT,Feature as aU,VectorTile as aV,WMTSTileGrid as aW,WMTS$1 as aX,TileWMS as aY,get$3 as aZ,applyStyle as a_,useElementSize as aa,yc as ab,ln$1 as ac,defineComponent as ad,useAppStore as ae,provide as af,Suspense as ag,Map$1 as ah,View as ai,fromLonLat as aj,defaults$3 as ak,MouseWheelZoom as al,shiftKeyOnly as am,toLonLat as an,CRS as ao,shallowRef as ap,InseeAdvancedSearch as aq,LocationAdvancedSearch as ar,CoordinateAdvancedSearch as as,ParcelAdvancedSearch as at,SearchEngineAdvanced as au,onBeforeUpdate as av,Control as aw,CLASS_UNSELECTABLE as ax,getPointResolution as ay,METERS_PER_UNIT$1 as az,createBaseVNode as b,ButtonExport as b0,Isocurve as b1,Route as b2,MeasureLength as b3,MeasureArea as b4,MeasureAzimuth as b5,MousePosition as b6,ElevationPath as b7,Territories as b8,GetFeatureInfo as b9,LayerImport as ba,ControlList as bb,ContextMenu as bc,GeoportalFullScreen as bd,ReverseGeocode as be,useBaseUrl as bf,transform$1 as bg,Reporting as bh,Catalog as bi,Panoramax as bj,LoggerByDefault as bk,useControls as bl,useControlsExtensionPosition as bm,LayerMapBox as bn,LayerWMTS as bo,LayerWMS as bp,toRaw as bq,withAsyncContext as br,Ve$2 as bs,useRoute as bt,useUrlParams as bu,commonjsGlobal as bv,getDefaultExportFromCjs as bw,purify_es as bx,createElementBlock as c,createVNode as d,normalizeClass as e,createCommentVNode as f,ref$1 as g,useMapStore as h,useDomStore as i,useControlsPosition as j,onMounted as k,unref as l,mergeModels as m,nt$1 as n,openBlock as o,watch as p,onUpdated as q,renderSlot as r,createBlock as s,toDisplayString as t,useServiceStore as u,vShow as v,withDirectives as w,mergeProps as x,isRef as y,eu as z};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.