Useanidentitypropertyfunctioninstead:\`{ "type": "identity", "property": ${JSON.stringify(A[1])} }\`.`)];constk=[];returni.layerType==="symbol"&&(m==="text-field"&&o&&!o.glyphs&&k.push(newAe(r,f,'use of "text-field" requires a style "glyphs" property')),m==="text-font"&&Rt(bn(f))&&Ut(f.type)==="identity"&&k.push(newAe(r,f,'"text-font" does not support identity functions'))),k.concat(a({key:i.key,value:f,valueSpec:S,style:o,styleSpec:d,expressionContext:"property",propertyType:e,propertyKey:m}))}functiondl(i){returnpl(i,"paint")}functionfl(i){returnpl(i,"layout")}functionml(i){lete=[];constr=i.value,a=i.key,o=i.style,d=i.styleSpec;r.type||r.ref||e.push(newAe(a,r,'either "type" or "ref" is required'));letf=Ut(r.type);constm=Ut(r.ref);if(r.id){consty=Ut(r.id);for(letv=0;v<i.arrayIndex;v++){constS=o.layers[v];Ut(S.id)===y&&e.push(newAe(a,r.id,`duplicate layer id "${r.id}", previously used at line ${S.id.__line__}`))}}if("ref"inr){lety;["type","source","source-layer","filter","layout"].forEach((v=>{vinr&&e.push(newAe(a,r[v],`"${v}" is prohibited for ref layers`))})),o.layers.forEach((v=>{Ut(v.id)===m&&(y=v)})),y?y.ref?e.push(newAe(a,r.ref,"ref cannot reference another ref layer")):f=Ut(y.type):e.push(newAe(a,r.ref,`ref layer "${m}" not found`))}elseif(f!=="background")if(r.source){consty=o.sources&&o.sources[r.source],v=y&&Ut(y.type);y?v==="vector"&&f==="raster"?e.push(newAe(a,r.source,`layer "${r.id}" requires a raster source`)):v!=="raster-dem"&&f==="hillshade"?e.push(newAe(a,r.source,`layer "${r.id}" requires a raster-dem source`)):v==="raster"&&f!=="raster"?e.push(newAe(a,r.source,`layer "${r.id}" requires a vector source`)):v!=="vector"||r["source-layer"]?v==="raster-dem"&&f!=="hillshade"?e.push(newAe(a,r.source,"raster-dem source can only be used with layer type 'hillshade'.")):f!=="line"||!r.paint||!r.paint["line-gradient"]||v==="geojson"&&y.lineMetrics||e.push(newAe(a,r,`layer "${r.id}" specifies a line-gradient, which requires a GeoJSON source with \`lineMetrics\` enabled.`)):e.push(newAe(a,r,`layer "${r.id}" must specify a "source-layer"`)):e.push(newAe(a,r.source,`source "${r.source}" not found`))}elsee.push(newAe(a,r,'missing required property "source"'));returne=e.concat(Di({key:a,value:r,valueSpec:d.layer,style:i.style,styleSpec:i.styleSpec,validateSpec:i.validateSpec,objectElementValidators:{"*":()=>[],type:()=>i.validateSpec({key:`${a}.type`,value:r.type,valueSpec:d.layer.type,style:i.style,styleSpec:i.styleSpec,validateSpec:i.validateSpec,object:r,objectKey:"type"}),filter:Xn,layout:y=>Di({layer:r,key:y.key,value:y.value,style:y.style,styleSpec:y.styleSpec,validateSpec:y.validateSpec,objectElementValidators:{"*":v=>fl(vr({layerType:f},v))}}),paint:y=>Di({layer:r,key:y.key,value:y.value,style:y.style,styleSpec:y.styleSpec,validateSpec:y.validateSpec,objectElementValidators:{"*":v=>dl(vr({layerType:f},v))}})}})),e}functionwr(i){conste=i.value,r=i.key,a=yt(e);returna!=="string"?[newAe(r,e,`string expected, ${a} found`)]:[]}constba={promoteId:function({key:i,value:e}){if(yt(e)==="string")returnwr({key:i,value:e});{constr=[];for(constaine)r.push(...wr({key:`${i}.${a}`,value:e[a]}));returnr}}};functionGi(i){conste=i.value,r=i.key,a=i.styleSpec,o=i.style,d=i.validateSpec;if(!e.type)return[newAe(r,e,'"type" is required')];constf=Ut(e.type);letm;switch(f){case"vector":case"raster":returnm=Di({key:r,value:e,valueSpec:a[`source_${f.replace("-","_")}`],style:i.style,styleSpec:a,objectElementValidators:ba,validateSpec:d}),m;case"raster-dem":returnm=(function(y){varv;constS=(v=y.sourceName)!==null&&v!==void0?v:"",A=y.value,k=y.styleSpec,z=k.source_raster_dem,D=y.style;letO=[];constq=yt(A);if(A===void0)returnO;if(q!=="object")returnO.push(newAe("source_raster_dem",A,`object expected, ${q} found`)),O;constH=Ut(A.encoding)==="custom",re=["redFactor","greenFactor","blueFactor","baseShift"],Y=y.value.encoding?`"${y.value.encoding}"`:"Default";for(constaeinA)!H&&re.includes(ae)?O.push(newAe(ae,A[ae],`In "${S}": "${ae}" is only valid when "encoding" is se
<divclass="maplibregl-mobile-message">${typeofthis._cooperativeGestures!="boolean"&&this._cooperativeGestures.mobileHelpText?this._cooperativeGestures.mobileHelpText:"Use two fingers to move the map"}</div>
`;return l.replace(/\n$/,"")}var Ud=Vd,$d=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],jd=["scalar","sequence","mapping"];function qd(h){var w={};return h!==null&&Object.keys(h).forEach(function(E){h[E].forEach(function(L){w[String(L)]=E})}),w}function Zd(h,w){if(w=w||{},Object.keys(w).forEach(function(E){if($d.indexOf(E)===-1)throw new Ui('Unknown option "'+E+'" is met in definition of "'+h+'" YAML type.')}),this.options=w,this.tag=h,this.kind=w.kind||null,this.resolve=w.resolve||function(){return!0},this.construct=w.construct||function(E){return E},this.instanceOf=w.instanceOf||null,this.predicate=w.predicate||null,this.represent=w.represent||null,this.representName=w.representName||null,this.defaultStyle=w.defaultStyle||null,this.multi=w.multi||!1,this.styleAliases=qd(w.styleAliases||null),jd.indexOf(this.kind)===-1)throw new Ui('Unknown kind "'+this.kind+'" is specified for "'+h+'" YAML type.')}var bi=Zd;function Tu(h,w){var E=[];return h[w].forEach(function(L){var F=E.length;E.forEach(function(Q,K){Q.tag===L.tag&&Q.kind===L.kind&&Q.multi===L.multi&&(F=K)}),E[F]=L}),E}function Gd(){var h={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},w,E;function L(F){F.multi?(h.multi[F.kind].push(F),h.multi.fallback.push(F)):h[F.kind][F.tag]=h.fallback[F.tag]=F}for(w=0,E=arguments.length;w<E;w+=1)arguments[w].forEach(L);return h}function tc(h){return this.extend(h)}tc.prototype.extend=function(w){var E=[],L=[];if(w instanceof bi)L.push(w);else if(Array.isArray(w))L=L.concat(w);else if(w&&(Array.isArray(w.implicit)||Array.isArray(w.explicit)))w.implicit&&(E=E.concat(w.implicit)),w.explicit&&(L=L.concat(w.explicit));else throw new Ui("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");E.forEach(function(Q){if(!(Q instanceof bi))throw new Ui("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(Q.loadKind&&Q.loadKind!=="scalar")throw new Ui("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(Q.multi)throw new Ui("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),L.forEach(function(Q){if(!(Q instanceof bi))throw new Ui("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var F=Object.create(tc.prototype);return F.implicit=(this.implicit||[]).concat(E),F.explicit=(this.explicit||[]).concat(L),F.compiledImplicit=Tu(F,"implicit"),F.compiledExplicit=Tu(F,"explicit"),F.compiledTypeMap=Gd(F.compiledImplicit,F.compiledExplicit),F};var Iu=tc,Au=new bi("tag:yaml.org,2002:str",{kind:"scalar",construct:function(h){return h!==null?h:""}}),Cu=new bi("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(h){return h!==null?h:[]}}),ku=new bi("tag:yaml.org,2002:map",{kind:"mapping",construct:function(h){return h!==null?h:{}}}),Eu=new Iu({explicit:[Au,Cu,ku]});function Hd(h){if(h===null)return!0;var w=h.length;return w===1&&h==="~"||w===4&&(h==="null"||h==="Null"||h==="NULL")}function Wd(){return null}function Xd(h){return h===null}var Mu=new bi("tag:yaml.org,2002:null",{kind:"scalar",resolve:Hd,construct:Wd,predicate:Xd,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"},empty:function(){return""}},defaultStyle:"lowercase"});function Kd(h){if(h===null)return!1;var w=h.length;return w===4&&(h==="true"||h==="True"||h==="TRUE")||w===5&&(h==="false"||h==="False"||h==="FALSE")}function Yd(h){return h==="true"||h==="True"||h==="TRUE"}function Jd(h){return Object.prototype.toString.call(h)==="[object Boolean]"}var Pu=new bi("tag:yaml.org,2002:bool",{kind:"scalar",resolve:Kd,construct:Yd,predicate:Jd,represent:{lowercase:function(h){return h?"true":"false"},uppercase:function(h){return h?"TRUE":"FALSE"},camelcase:function(h){return h?"True":"False"}},defaultStyle:"lowercase"});functio
`:h===118?"\v":h===102?"\f":h===114?"\r":h===101?"\x1B":h===32?" ":h===34?'"':h===47?"/":h===92?"\\":h===78?"":h===95?"":h===76?"\u2028":h===80?"\u2029":""}function Bf(h){return h<=65535?String.fromCharCode(h):String.fromCharCode((h-65536>>10)+55296,(h-65536&1023)+56320)}function Yu(h,w,E){w==="__proto__"?Object.defineProperty(h,w,{configurable:!0,enumerable:!0,writable:!0,value:E}):h[w]=E}for(var Ju=new Array(256),Qu=new Array(256),La=0;La<256;La++)Ju[La]=Ku(La)?1:0,Qu[La]=Ku(La);function Of(h,w){this.input=h,this.filename=w.filename||null,this.schema=w.schema||rc,this.onWarning=w.onWarning||null,this.legacy=w.legacy||!1,this.json=w.json||!1,this.listener=w.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=h.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}function eh(h,w){var E={name:h.filename,buffer:h.input.slice(0,-1),position:h.position,line:h.line,column:h.position-h.lineStart};return E.snippet=Ud(E),new Ui(w,E)}function Xe(h,w){throw eh(h,w)}function $o(h,w){h.onWarning&&h.onWarning.call(null,eh(h,w))}var th={YAML:function(w,E,L){var F,Q,K;w.version!==null&&Xe(w,"duplication of %YAML directive"),L.length!==1&&Xe(w,"YAML directive accepts exactly one argument"),F=/^([0-9]+)\.([0-9]+)$/.exec(L[0]),F===null&&Xe(w,"ill-formed argument of the YAML directive"),Q=parseInt(F[1],10),K=parseInt(F[2],10),Q!==1&&Xe(w,"unacceptable YAML version of the document"),w.version=L[0],w.checkLineBreaks=K<2,K!==1&&K!==2&&$o(w,"unsupported YAML version of the document")},TAG:function(w,E,L){var F,Q;L.length!==2&&Xe(w,"TAG directive accepts exactly two arguments"),F=L[0],Q=L[1],Hu.test(F)||Xe(w,"ill-formed tag handle (first argument) of the TAG directive"),Dn.call(w.tagMap,F)&&Xe(w,'there is a previously declared suffix for "'+F+'" tag handle'),Wu.test(Q)||Xe(w,"ill-formed tag prefix (second argument) of the TAG directive");try{Q=decodeURIComponent(Q)}catch{Xe(w,"tag prefix is malformed: "+Q)}w.tagMap[F]=Q}};function Ln(h,w,E,L){var F,Q,K,l;if(w<E){if(l=h.input.slice(w,E),L)for(F=0,Q=l.length;F<Q;F+=1)K=l.charCodeAt(F),K===9||32<=K&&K<=1114111||Xe(h,"expected valid JSON character");else Pf.test(l)&&Xe(h,"the stream contains non-printable characters");h.result+=l}}function ih(h,w,E,L){var F,Q,K,l;for(li.isObject(E)||Xe(h,"cannot merge mappings; the provided source object is unacceptable"),F=Object.keys(E),K=0,l=F.length;K<l;K+=1)Q=F[K],Dn.call(w,Q)||(Yu(w,Q,E[Q]),L[Q]=!0)}function Fa(h,w,E,L,F,Q,K,l,le){var W,Se;if(Array.isArray(F))for(F=Array.prototype.slice.call(F),W=0,Se=F.length;W<Se;W+=1)Array.isArray(F[W])&&Xe(h,"nested arrays are not supported inside keys"),typeof F=="object"&&Xu(F[W])==="[object Object]"&&(F[W]="[object Object]");if(typeof F=="object"&&Xu(F)==="[object Object]"&&(F="[object Object]"),F=String(F),w===null&&(w={}),L==="tag:yaml.org,2002:merge")if(Array.isArray(Q))for(W=0,Se=Q.length;W<Se;W+=1)ih(h,w,Q[W],E);else ih(h,w,Q,E);else!h.json&&!Dn.call(E,F)&&Dn.call(w,F)&&(h.line=K||h.line,h.lineStart=l||h.lineStart,h.position=le||h.position,Xe(h,"duplicated mapping key")),Yu(w,F,Q),delete E[F];return w}function ac(h){var w;w=h.input.charCodeAt(h.position),w===10?h.position++:w===13?(h.position++,h.input.charCodeAt(h.position)===10&&h.position++):Xe(h,"a line break is expected"),h.line+=1,h.lineStart=h.position,h.firstTabInLine=-1}function oi(h,w,E){for(var L=0,F=h.input.charCodeAt(h.position);F!==0;){for(;oa(F);)F===9&&h.firstTabInLine===-1&&(h.firstTabInLine=h.position),F=h.input.charCodeAt(++h.position);if(w&&F===35)do F=h.input.charCodeAt(++h.position);while(F!==10&&F!==13&&F!==0);if(qr(F))for(ac(h),F=h.input.charCodeAt(h.position),L++,h.lineIndent=0;F===32;)h.lineIndent++,F=h.input.charCodeAt(++h.position);else break}return E!==-1&&L!==0&&h.lineIndent<E&&$o(h,"deficient indentation"),L}function jo(h){var w=h.position,E;return E=h.input.charCodeAt(w),!!((E===45||E===46)&&E===h.input.charCodeAt(w+1)&&E===h.input.charCodeAt(w+2)&&(w+=3,E=h.input.charCodeAt(w),E===0||Qi(E)))}function sc(h,w
`,w-1))}function Nf(h,w,E){var L,F,Q,K,l,le,W,Se,de=h.kind,ge=h.result,we;if(we=h.input.charCodeAt(h.position),Qi(we)||Da(we)||we===35||we===38||we===42||we===33||we===124||we===62||we===39||we===34||we===37||we===64||we===96||(we===63||we===45)&&(F=h.input.charCodeAt(h.position+1),Qi(F)||E&&Da(F)))return!1;for(h.kind="scalar",h.result="",Q=K=h.position,l=!1;we!==0;){if(we===58){if(F=h.input.charCodeAt(h.position+1),Qi(F)||E&&Da(F))break}else if(we===35){if(L=h.input.charCodeAt(h.position-1),Qi(L))break}else{if(h.position===h.lineStart&&jo(h)||E&&Da(we))break;if(qr(we))if(le=h.line,W=h.lineStart,Se=h.lineIndent,oi(h,!1,-1),h.lineIndent>=w){l=!0,we=h.input.charCodeAt(h.position);continue}else{h.position=K,h.line=le,h.lineStart=W,h.lineIndent=Se;break}}l&&(Ln(h,Q,K,!1),sc(h,h.line-le),Q=K=h.position,l=!1),oa(we)||(K=h.position+1),we=h.input.charCodeAt(++h.position)}return Ln(h,Q,K,!1),h.result?!0:(h.kind=de,h.result=ge,!1)}function Vf(h,w){var E,L,F;if(E=h.input.charCodeAt(h.position),E!==39)return!1;for(h.kind="scalar",h.result="",h.position++,L=F=h.position;(E=h.input.charCodeAt(h.position))!==0;)if(E===39)if(Ln(h,L,h.position,!0),E=h.input.charCodeAt(++h.position),E===39)L=h.position,h.position++,F=h.position;else return!0;else qr(E)?(Ln(h,L,F,!0),sc(h,oi(h,!1,w)),L=F=h.position):h.position===h.lineStart&&jo(h)?Xe(h,"unexpected end of the document within a single quoted scalar"):(h.position++,F=h.position);Xe(h,"unexpected end of the stream within a single quoted scalar")}function Uf(h,w){var E,L,F,Q,K,l;if(l=h.input.charCodeAt(h.position),l!==34)return!1;for(h.kind="scalar",h.result="",h.position++,E=L=h.position;(l=h.input.charCodeAt(h.position))!==0;){if(l===34)return Ln(h,E,h.position,!0),h.position++,!0;if(l===92){if(Ln(h,E,h.position,!0),l=h.input.charCodeAt(++h.position),qr(l))oi(h,!1,w);else if(l<256&&Ju[l])h.result+=Qu[l],h.position++;else if((K=Ff(l))>0){for(F=K,Q=0;F>0;F--)l=h.input.charCodeAt(++h.position),(K=Lf(l))>=0?Q=(Q<<4)+K:Xe(h,"expected hexadecimal character");h.result+=Bf(Q),h.position++}else Xe(h,"unknown escape sequence");E=L=h.position}else qr(l)?(Ln(h,E,L,!0),sc(h,oi(h,!1,w)),E=L=h.position):h.position===h.lineStart&&jo(h)?Xe(h,"unexpected end of the document within a double quoted scalar"):(h.position++,L=h.position)}Xe(h,"unexpected end of the stream within a double quoted scalar")}function $f(h,w){var E=!0,L,F,Q,K=h.tag,l,le=h.anchor,W,Se,de,ge,we,Ze=Object.create(null),Qe,tt,We,et;if(et=h.input.charCodeAt(h.position),et===91)Se=93,we=!1,l=[];else if(et===123)Se=125,we=!0,l={};else return!1;for(h.anchor!==null&&(h.anchorMap[h.anchor]=l),et=h.input.charCodeAt(++h.position);et!==0;){if(oi(h,!0,w),et=h.input.charCodeAt(h.position),et===Se)return h.position++,h.tag=K,h.anchor=le,h.kind=we?"mapping":"sequence",h.result=l,!0;E?et===44&&Xe(h,"expected the node content, but found ','"):Xe(h,"missed comma between flow collection entries"),tt=Qe=We=null,de=ge=!1,et===63&&(W=h.input.charCodeAt(h.position+1),Qi(W)&&(de=ge=!0,h.position++,oi(h,!0,w))),L=h.line,F=h.lineStart,Q=h.position,Ra(h,w,Vo,!1,!0),tt=h.tag,Qe=h.result,oi(h,!0,w),et=h.input.charCodeAt(h.position),(ge||h.line===L)&&et===58&&(de=!0,et=h.input.charCodeAt(++h.position),oi(h,!0,w),Ra(h,w,Vo,!1,!0),We=h.result),we?Fa(h,l,Ze,tt,Qe,We,L,F,Q):de?l.push(Fa(h,null,Ze,tt,Qe,We,L,F,Q)):l.push(Qe),oi(h,!0,w),et=h.input.charCodeAt(h.position),et===44?(E=!0,et=h.input.charCodeAt(++h.position)):E=!1}Xe(h,"unexpected end of the stream within a flow collection")}function jf(h,w){var E,L,F=nc,Q=!1,K=!1,l=w,le=0,W=!1,Se,de;if(de=h.input.charCodeAt(h.position),de===124)L=!1;else if(de===62)L=!0;else return!1;for(h.kind="scalar",h.result="";de!==0;)if(de=h.input.charCodeAt(++h.position),de===43||de===45)nc===F?F=de===43?Gu:Mf:Xe(h,"repeat of a chomping mode identifier");else if((Se=Rf(de))>=0)Se===0?Xe(h,"bad explicit indentation width of a block scalar; it cannot be less than one"):K?Xe(h,"repeat of an indentation width identifier"):(l=w+Se-1,K=!0);else break;if(oa(de)){do de=h.input.charCodeAt(++h.position);while(oa(de));if(de===35)do de=h.input.charCod
`,Q?1+le:le),Q=!0,K=!0,le=0,E=h.position;!qr(de)&&de!==0;)de=h.input.charCodeAt(++h.position);Ln(h,E,h.position,!1)}return!0}function rh(h,w){var E,L=h.tag,F=h.anchor,Q=[],K,l=!1,le;if(h.firstTabInLine!==-1)return!1;for(h.anchor!==null&&(h.anchorMap[h.anchor]=Q),le=h.input.charCodeAt(h.position);le!==0&&(h.firstTabInLine!==-1&&(h.position=h.firstTabInLine,Xe(h,"tab characters must not be used in indentation")),!(le!==45||(K=h.input.charCodeAt(h.position+1),!Qi(K))));){if(l=!0,h.position++,oi(h,!0,-1)&&h.lineIndent<=w){Q.push(null),le=h.input.charCodeAt(h.position);continue}if(E=h.line,Ra(h,w,Zu,!1,!0),Q.push(h.result),oi(h,!0,-1),le=h.input.charCodeAt(h.position),(h.line===E||h.lineIndent>w)&&le!==0)Xe(h,"bad indentation of a sequence entry");else if(h.lineIndent<w)break}return l?(h.tag=L,h.anchor=F,h.kind="sequence",h.result=Q,!0):!1}function qf(h,w,E){var L,F,Q,K,l,le,W=h.tag,Se=h.anchor,de={},ge=Object.create(null),we=null,Ze=null,Qe=null,tt=!1,We=!1,et;if(h.firstTabInLine!==-1)return!1;for(h.anchor!==null&&(h.anchorMap[h.anchor]=de),et=h.input.charCodeAt(h.position);et!==0;){if(!tt&&h.firstTabInLine!==-1&&(h.position=h.firstTabInLine,Xe(h,"tab characters must not be used in indentation")),L=h.input.charCodeAt(h.position+1),Q=h.line,(et===63||et===58)&&Qi(L))et===63?(tt&&(Fa(h,de,ge,we,Ze,null,K,l,le),we=Ze=Qe=null),We=!0,tt=!0,F=!0):tt?(tt=!1,F=!0):Xe(h,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),h.position+=1,et=L;else{if(K=h.line,l=h.lineStart,le=h.position,!Ra(h,E,qu,!1,!0))break;if(h.line===Q){for(et=h.input.charCodeAt(h.position);oa(et);)et=h.input.charCodeAt(++h.position);if(et===58)et=h.input.charCodeAt(++h.position),Qi(et)||Xe(h,"a whitespace character is expected after the key-value separator within a block mapping"),tt&&(Fa(h,de,ge,we,Ze,null,K,l,le),we=Ze=Qe=null),We=!0,tt=!1,F=!1,we=h.tag,Ze=h.result;else if(We)Xe(h,"can not read an implicit mapping pair; a colon is missed");else return h.tag=W,h.anchor=Se,!0}else if(We)Xe(h,"can not read a block mapping entry; a multiline key may not be an implicit key");else return h.tag=W,h.anchor=Se,!0}if((h.line===Q||h.lineIndent>w)&&(tt&&(K=h.line,l=h.lineStart,le=h.position),Ra(h,w,Uo,!0,F)&&(tt?Ze=h.result:Qe=h.result),tt||(Fa(h,de,ge,we,Ze,Qe,K,l,le),we=Ze=Qe=null),oi(h,!0,-1),et=h.input.charCodeAt(h.position)),(h.line===Q||h.lineIndent>w)&&et!==0)Xe(h,"bad indentation of a mapping entry");else if(h.lineIndent<w)break}return tt&&Fa(h,de,ge,we,Ze,null,K,l,le),We&&(h.tag=W,h.anchor=Se,h.kind="mapping",h.result=de),We}function Zf(h){var w,E=!1,L=!1,F,Q,K;if(K=h.input.charCodeAt(h.position),K!==33)return!1;if(h.tag!==null&&Xe(h,"duplication of a tag property"),K=h.input.charCodeAt(++h.position),K===60?(E=!0,K=h.input.charCodeAt(++h.position)):K===33?(L=!0,F="!!",K=h.input.charCodeAt(++h.position)):F="!",w=h.position,E){do K=h.input.charCodeAt(++h.position);while(K!==0&&K!==62);h.position<h.length?(Q=h.input.slice(w,h.position),K=h.input.charCodeAt(++h.position)):Xe(h,"unexpected end of the stream within a verbatim tag")}else{for(;K!==0&&!Qi(K);)K===33&&(L?Xe(h,"tag suffix cannot contain exclamation marks"):(F=h.input.slice(w-1,h.position+1),Hu.test(F)||Xe(h,"named tag handle cannot contain such characters"),L=!0,w=h.position+1)),K=h.input.charCodeAt(++h.position);Q=h.input.slice(w,h.position),Df.test(Q)&&Xe(h,"tag suffix cannot contain flow indicator characters")}Q&&!Wu.test(Q)&&Xe(h,"tag name cannot contain such characters: "+Q);try{Q=decodeURIComponent(Q)}catch{Xe(h,"tag name is malformed: "+Q)}return E?h.tag=Q:Dn.call(h.tagMap,F)?h.tag=h.tagMap[F]+Q:F==="!"?h.tag="!"+Q:F==="!!"?h.tag="tag:yaml.org,2002:"+Q:Xe(h,'undeclared tag handle "'+F+'"'),!0}function Gf(h){var w,E;if(E=h.input.charCodeAt(h.position),E!==38)return!1;for(h.anchor!==null&&Xe(h,"duplication of an anchor property"),E=h.input.charCodeAt(++h.position),w=h.position;E!==0&&!Qi(E)&&!Da(E);)E=h.input.charCodeAt(++h.position);return h.position===w&&Xe(h,"name of an anchor node must contain at least one character"),h.anchor=h.input.slice(w,h.positi
`),h.charCodeAt(0)===65279&&(h=h.slice(1)));var E=new Of(h,w),L=h.indexOf("\0");for(L!==-1&&(E.position=L,Xe(E,"null byte is not allowed in input")),E.input+="\0";E.input.charCodeAt(E.position)===32;)E.lineIndent+=1,E.position+=1;for(;E.position<E.length-1;)Wf(E);return E.documents}function Xf(h,w,E){w!==null&&typeof w=="object"&&typeof E>"u"&&(E=w,w=null);var L=nh(h,E);if(typeof w!="function")return L;for(var F=0,Q=L.length;F<Q;F+=1)w(L[F])}function Kf(h,w){var E=nh(h,w);if(E.length!==0){if(E.length===1)return E[0];throw new Ui("expected a single document in the stream, but found more")}}var Yf=Xf,Jf=Kf,ah={loadAll:Yf,load:Jf},sh=Object.prototype.toString,oh=Object.prototype.hasOwnProperty,oc=65279,Qf=9,Cs=10,em=13,tm=32,im=33,rm=34,lc=35,nm=37,am=38,sm=39,om=42,lh=44,lm=45,qo=58,cm=61,um=62,hm=63,pm=64,ch=91,uh=93,dm=96,hh=123,fm=124,ph=125,Mi={};Mi[0]="\\0",Mi[7]="\\a",Mi[8]="\\b",Mi[9]="\\t",Mi[10]="\\n",Mi[11]="\\v",Mi[12]="\\f",Mi[13]="\\r",Mi[27]="\\e",Mi[34]='\\"',Mi[92]="\\\\",Mi[133]="\\N",Mi[160]="\\_",Mi[8232]="\\L",Mi[8233]="\\P";var mm=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],gm=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function _m(h,w){var E,L,F,Q,K,l,le;if(w===null)return{};for(E={},L=Object.keys(w),F=0,Q=L.length;F<Q;F+=1)K=L[F],l=String(w[K]),K.slice(0,2)==="!!"&&(K="tag:yaml.org,2002:"+K.slice(2)),le=h.compiledTypeMap.fallback[K],le&&oh.call(le.styleAliases,l)&&(l=le.styleAliases[l]),E[K]=l;return E}function ym(h){var w,E,L;if(w=h.toString(16).toUpperCase(),h<=255)E="x",L=2;else if(h<=65535)E="u",L=4;else if(h<=4294967295)E="U",L=8;else throw new Ui("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+E+li.repeat("0",L-w.length)+w}var xm=1,ks=2;function vm(h){this.schema=h.schema||rc,this.indent=Math.max(1,h.indent||2),this.noArrayIndent=h.noArrayIndent||!1,this.skipInvalid=h.skipInvalid||!1,this.flowLevel=li.isNothing(h.flowLevel)?-1:h.flowLevel,this.styleMap=_m(this.schema,h.styles||null),this.sortKeys=h.sortKeys||!1,this.lineWidth=h.lineWidth||80,this.noRefs=h.noRefs||!1,this.noCompatMode=h.noCompatMode||!1,this.condenseFlow=h.condenseFlow||!1,this.quotingType=h.quotingType==='"'?ks:xm,this.forceQuotes=h.forceQuotes||!1,this.replacer=typeof h.replacer=="function"?h.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function dh(h,w){for(var E=li.repeat(" ",w),L=0,F=-1,Q="",K,l=h.length;L<l;)F=h.indexOf(`
`+h.slice(K+1):le+=h.slice(F),le.slice(1)}function Cm(h){for(var w="",E=0,L,F=0;F<h.length;E>=65536?F+=2:F++)E=Ms(h,F),L=Mi[E],!L&&Es(E)?(w+=h[F],E>=65536&&(w+=h[F+1])):w+=L||ym(E);return w}function km(h,w,E){var L="",F=h.tag,Q,K,l;for(Q=0,K=E.length;Q<K;Q+=1)l=E[Q],h.replacer&&(l=h.replacer.call(E,String(Q),l)),(ln(h,w,l,!1,!1)||typeof l>"u"&&ln(h,w,null,!1,!1))&&(L!==""&&(L+=","+(h.condenseFlow?"":" ")),L+=h.dump);h.tag=F,h.dump="["+L+"]"}function Sh(h,w,E,L){var F="",Q=h.tag,K,l,le;for(K=0,l=E.length;K<l;K+=1)le=E[K],h.replacer&&(le=h.replacer.call(E,String(K),le)),(ln(h,w+1,le,!0,!0,!1,!0)||typeof le>"u"&&ln(h,w+1,null,!0,!0,!1,!0))&&((!L||F!=="")&&(F+=cc(h,w)),h.dump&&Cs===h.dump.charCodeAt(0)?F+="-":F+="- ",F+=h.dump);h.tag=Q,h.dump=F||"[]"}function Em(h,w,E){var L="",F=h.tag,Q=Object.keys(E),K,l,le,W,Se;for(K=0,l=Q.length;K<l;K+=1)Se="",L!==""&&(Se+=", "),h.condenseFlow&&(Se+='"'),le=Q[K],W=E[le],h.replacer&&(W=h.replacer.call(E,le,W)),ln(h,w,le,!1,!1)&&(h.dump.length>1024&&(Se+="? "),Se+=h.dump+(h.condenseFlow?'"':"")+":"+(h.condenseFlow?"":" "),ln(h,w,W,!1,!1)&&(Se+=h.dump,L+=Se));h.tag=F,h.dump="{"+L+"}"}function Mm(h,w,E,L){var F="",Q=h.tag,K=Object.keys(E),l,le,W,Se,de,ge;if(h.sortKeys===!0)K.sort();else if(typeof h.sortKeys=="function")K.sort(h.sortKeys);else if(h.sortKeys)throw new Ui("sortKeys must be a boolean or a function");for(l=0,le=K.length;l<le;l+=1)ge="",(!L||F!=="")&&(ge+=cc(h,w)),W=K[l],Se=E[W],h.replacer&&(Se=h.replacer.call(E,W,Se)),ln(h,w+1,W,!0,!0,!0)&&(de=h.tag!==null&&h.tag!=="?"||h.dump&&h.dump.length>1024,de&&(h.dump&&Cs===h.dump.charCodeAt(0)?ge+="?":ge+="? "),ge+=h.dump,de&&(ge+=cc(h,w)),ln(h,w+1,Se,!0,de)&&(h.dump&&Cs===h.dump.charCodeAt(0)?ge+=":":ge+=": ",ge+=h.dump,F+=ge));h.tag=Q,h.dump=F||"{}"}function Th(h,w,E){var L,F,Q,K,l,le;for(F=E?h.explicitTypes:h.implicitTypes,Q=0,K=F.length;Q<K;Q+=1)if(l=F[Q],(l.instanceOf||l.predicate)&&(!l.instanceOf||typeof w=="object"&&w instanceof l.instanceOf)&&(!l.predicate||l.predicate(w))){if(E?l.multi&&l.representName?h.tag=l.representName(w):h.tag=l.tag:h.tag="?",l.represent){if(le=h.styleMap[l.tag]||l.defaultStyle,sh.call(l.represent)==="[object Function]")L=l.represent(w,le);else if(oh.call(l.represent,le))L=l.represent[le](w,le);else throw new Ui("!<"+l.tag+'> tag resolver accepts not "'+le+'" style');h.dump=L}return!0}return!1}function ln(h,w,E,L,F,Q,K){h.tag=null,h.dump=E,Th(h,E,!1)||Th(h,E,!0);var l=sh.call(h.dump),le=L,W;L&&(L=h.flowLevel<0||h.flowLevel>w);var Se=l==="[object Object]"||l==="[object Array]",de,ge;if(Se&&(de=h.duplicates.indexOf(E),ge=de!==-1),(h.tag!==null&&h.tag!=="?"||ge||h.indent!==2&&w>0)&&(F=!1),ge&&h.usedDuplicates[de])h.dump="*ref_"+de;else{if(Se&&ge&&!h.usedDuplicates[de]&&(h.usedDuplicates[de]=!0),l==="[object Object]")L&&Object.keys(h.dump).length!==0?(Mm(h,w,h.dump,F),ge&&(h.dump="&ref_"+de+h.dump)):(Em(h,w,h.dump),ge&&(h.dump="&ref_"+de+" "+h.dump));else if(l==="[object Array]")L&&h.dump.length!==0?(h.noArrayIndent&&!K&&w>0?Sh(h,w-1,h.dump,F):Sh(h,w,h.dump,F),ge&&(h.dump="&ref_"+de+h.dump)):(km(h,w,h.dump),ge&&(h.dump="&ref_"+de+" "+h.dump));else if(l==="[object String]")h.tag!=="?"&&Im(h,h.dump,w,Q,le);else{if(l==="[object Undefined]")return!1;if(h.skipInvalid)return!1;throw new Ui("unacceptable kind of an object to dump "+l)}h.tag!==null&&h.tag!=="?"&&(W=encodeURI(h.tag[0]==="!"?h.tag.slice(1):h.tag).replace(/!/g,"%21"),h.tag[0]==="!"?W="!"+W:W.slice(0,18)==="tag:yaml.org,2002:"?W="!!"+W.slice(18):W="!<"+W+">",h.dump=W+" "+h.dump)}return!0}function Pm(h,w){var E=[],L=[],F,Q;for(hc(h,E,L),F=0,Q=L.length;F<Q;F+=1)w.duplicates.push(E[L[F]]);w.usedDuplicates=new Array(Q)}function hc(h,w,E){var L,F,Q;if(h!==null&&typeof h=="object")if(F=w.indexOf(h),F!==-1)E.indexOf(F)===-1&&E.push(F);else if(w.push(h),Array.isArray(h))for(F=0,Q=h.length;F<Q;F+=1)hc(h[F],w,E);else for(L=Object.keys(h),F=0,Q=L.length;F<Q;F+=1)hc(h[L[F]],w,E)}function zm(h,w){w=w||{};var E=new vm(w);E.noRefs||Pm(h,E);var L=h;return E.replacer&&(L=E.replacer.call({"":L},"",L)),ln(E,0,L,!0,!0)?E.dump+`
`:""}var Dm=zm,Lm={dump:Dm};function pc(h,w){return function(){throw new Error("Function yaml."+h+" is removed in js-yaml 4. Use yaml."+w+" instead, which is now safe by default.")}}var Fm=bi,Rm=Iu,Bm=Eu,Om=Lu,Nm=Fu,Vm=rc,Um=ah.load,$m=ah.loadAll,jm=Lm.dump,qm=Ui,Zm={binary:Vu,float:Du,map:ku,null:Mu,pairs:$u,set:ju,timestamp:Ou,bool:Pu,int:zu,merge:Nu,omap:Uu,seq:Cu,str:Au},Gm=pc("safeLoad","load"),Hm=pc("safeLoadAll","loadAll"),Wm=pc("safeDump","dump"),Ih={Type:Fm,Schema:Rm,FAILSAFE_SCHEMA:Bm,JSON_SCHEMA:Om,CORE_SCHEMA:Nm,DEFAULT_SCHEMA:Vm,load:Um,loadAll:$m,dump:jm,YAMLException:qm,types:Zm,safeLoad:Gm,safeLoadAll:Hm,safeDump:Wm};function Xm(h={}){const{defaultCenter:w={lat:43.836699,lon:4.360054},defaultZoom:E=13,onSave:L=()=>{}}=h,F=Vue.ref({...w}),Q=Vue.ref(E),K=Vue.ref(null);Vue.onBeforeUnmount(()=>{K.value&&clearTimeout(K.value)});function l(Se){if(!Se||Se.trim()==="")return null;try{const de=Ih.load(Se);if(de)return de.center&&(F.value={lat:de.center.lat,lon:de.center.lon}),de.zoom!==void 0&&(Q.value=de.zoom),de}catch(de){return console.error("Error loading map data:",de),null}return null}function le(){const Se={background:{type:"osm"},center:{lat:F.value.lat,lon:F.value.lon},zoom:Q.value},de=Ih.dump(Se,{indent:2,lineWidth:-1,noRefs:!0});return L(de),de}function W(Se=300){K.value&&clearTimeout(K.value),K.value=setTimeout(()=>{le()},Se)}return{center:F,zoom:Q,loadMapData:l,saveMapData:le,debouncedSave:W}}const Km={components:{MapPreview:md,MarkerList:Cd},props:{value:String,name:String,label:String,help:String,disabled:Boolean,defaultCenter:{type:Array,default:()=>[43.836699,4.360054]},defaultZoom:{type:Number,default:13},maxMarkers:{type:Number,default:50},mode:{type:String,default:"multi",validator:h=>["multi","single"].includes(h)},latitude:{type:[Number,String],default:null},longitude:{type:[Number,String],default:null}},setup(h,{emit:w}){const E=Vue.ref(!1),L=Vue.ref(null),F=Vue.ref(null),Q=Vue.computed(()=>{var ci;if(h.mode==="single")return null;const dt=window.location.pathname.match(/\/panel\/pages\/(.+)/);if(dt)return dt[1].replace(/\+/g,"/");const mt=(ci=h.name)==null?void 0:ci.match(/pages\/([^/]+)/);return mt?mt[1].replace(/\+/g,"/"):(console.warn("Could not extract page ID, using default"),"map/carte")}),K=h.mode==="multi"?kd(Q.value):{markers:Vue.ref([]),loading:Vue.ref(!1),error:Vue.ref(null)},{center:l,zoom:le,loadMapData:W,debouncedSave:Se}=Xm({defaultCenter:{lat:h.defaultCenter[0],lon:h.defaultCenter[1]},defaultZoom:h.defaultZoom,onSave:dt=>w("input",dt)}),de=Vue.computed(()=>h.mode==="single"?h.latitude!==null&&h.longitude!==null?[{id:"single-marker",position:{lat:parseFloat(h.latitude),lon:parseFloat(h.longitude)},title:"Current position"}]:[]:K.markers.value),ge=Vue.computed(()=>h.mode==="single"?!1:de.value.length<h.maxMarkers);Vue.onMounted(async()=>{if(h.mode==="multi")try{await K.fetchMarkers()}catch(dt){console.error("Failed to load markers:",dt)}else h.mode==="single"&&h.latitude!==null&&h.longitude!==null&&(l.value={lat:parseFloat(h.latitude),lon:parseFloat(h.longitude)});h.value&&h.mode==="multi"&&W(h.value),await Vue.nextTick(),E.value=!0}),Vue.watch([l,le],()=>{h.mode==="multi"&&Se()},{deep:!0}),Vue.watch(()=>[h.latitude,h.longitude],([dt,mt])=>{h.mode==="single"&&dt!==null&&mt!==null&&L.value&&L.value.centerOnPosition&&L.value.centerOnPosition(parseFloat(dt),parseFloat(mt))});function we(){return L.value&&L.value.getCurrentCenter?L.value.getCurrentCenter():{lat:l.value.lat,lon:l.value.lon}}async function Ze(){if(!ge.value||h.mode==="single")return;const dt=we(),mt={lat:dt.lat,lon:dt.lon||dt.lng};try{await K.createMarker(mt)}catch(ci){console.error("Failed to create marker:",ci)}}async function Qe(dt){if(!(!ge.value||h.mode==="single"))try{await K.createMarker({lat:dt.lat,lon:dt.lng})}catch(mt){console.error("Failed to create marker:",mt)}}function tt(dt){F.value=dt;const mt=de.value.find(ci=>ci.id===dt);mt&&L.value&&L.value.centerOnPosition&&L.value.centerOnPosition(mt.position.lat,mt.position.lon)}async function We({markerId:dt,position:mt}){var ci;if(h.mode==="single"){const jt