UNPKG

@ulb-darmstadt/shacl-form

Version:
1 lines 1.72 MB
class k2{constructor(z,X){this.predicate=z.predicate,this.datatype=z.datatype,X&&(this.stylesheet=new CSSStyleSheet,this.stylesheet.replaceSync(X))}createViewer(z,X){return z.config.theme.createViewer(z.label,X,z)}}function wg(S){return S&&S.__esModule&&Object.prototype.hasOwnProperty.call(S,"default")?S.default:S}const qd="http://www.w3.org/1999/02/22-rdf-syntax-ns#",Hd="http://www.w3.org/2001/XMLSchema#",im="http://www.w3.org/2000/10/swap/",B2={xsd:{decimal:`${Hd}decimal`,boolean:`${Hd}boolean`,double:`${Hd}double`,integer:`${Hd}integer`,string:`${Hd}string`},rdf:{type:`${qd}type`,nil:`${qd}nil`,first:`${qd}first`,rest:`${qd}rest`,langString:`${qd}langString`},owl:{sameAs:"http://www.w3.org/2002/07/owl#sameAs"},r:{forSome:`${im}reify#forSome`,forAll:`${im}reify#forAll`},log:{implies:`${im}log#implies`,isImpliedBy:`${im}log#isImpliedBy`}},{rdf:N2,xsd:Uu}=B2;let Kd,V2=0;const ro={namedNode:kv,blankNode:Bv,variable:Vv,literal:Nv,defaultGraph:q2,quad:mg,triple:mg,fromTerm:Xd,fromQuad:Uv};class ha{constructor(z){this.id=z}get value(){return this.id}equals(z){return z instanceof ha?this.id===z.id:!!z&&this.termType===z.termType&&this.value===z.value}hashCode(){return 0}toJSON(){return{termType:this.termType,value:this.value}}}class Ov extends ha{get termType(){return"NamedNode"}}class Yd extends ha{get termType(){return"Literal"}get value(){return this.id.substring(1,this.id.lastIndexOf('"'))}get language(){const z=this.id;let X=z.lastIndexOf('"')+1;return X<z.length&&z[X++]==="@"?z.substr(X).toLowerCase():""}get datatype(){return new Ov(this.datatypeString)}get datatypeString(){const z=this.id,X=z.lastIndexOf('"')+1,fe=X<z.length?z[X]:"";return fe==="^"?z.substr(X+2):fe!=="@"?Uu.string:N2.langString}equals(z){return z instanceof Yd?this.id===z.id:!!z&&!!z.datatype&&this.termType===z.termType&&this.value===z.value&&this.language===z.language&&this.datatype.value===z.datatype.value}toJSON(){return{termType:this.termType,value:this.value,language:this.language,datatype:{termType:"NamedNode",value:this.datatypeString}}}}class U2 extends ha{constructor(z){super(`_:${z}`)}get termType(){return"BlankNode"}get value(){return this.id.substr(2)}}class j2 extends ha{constructor(z){super(`?${z}`)}get termType(){return"Variable"}get value(){return this.id.substr(1)}}class G2 extends ha{constructor(){return super(""),Kd||this}get termType(){return"DefaultGraph"}equals(z){return this===z||!!z&&this.termType===z.termType}}Kd=new G2;class Fv extends ha{constructor(z,X,fe,ye){super(""),this._subject=z,this._predicate=X,this._object=fe,this._graph=ye||Kd}get termType(){return"Quad"}get subject(){return this._subject}get predicate(){return this._predicate}get object(){return this._object}get graph(){return this._graph}toJSON(){return{termType:this.termType,subject:this._subject.toJSON(),predicate:this._predicate.toJSON(),object:this._object.toJSON(),graph:this._graph.toJSON()}}equals(z){return!!z&&this._subject.equals(z.subject)&&this._predicate.equals(z.predicate)&&this._object.equals(z.object)&&this._graph.equals(z.graph)}}function kv(S){return new Ov(S)}function Bv(S){return new U2(S||`n3-${V2++}`)}function Nv(S,z){if(typeof z=="string")return new Yd(`"${S}"@${z.toLowerCase()}`);let X=z?z.value:"";return X===""&&(typeof S=="boolean"?X=Uu.boolean:typeof S=="number"&&(Number.isFinite(S)?X=Number.isInteger(S)?Uu.integer:Uu.double:(X=Uu.double,Number.isNaN(S)||(S=S>0?"INF":"-INF")))),X===""||X===Uu.string?new Yd(`"${S}"`):new Yd(`"${S}"^^${X}`)}function Vv(S){return new j2(S)}function q2(){return Kd}function mg(S,z,X,fe){return new Fv(S,z,X,fe)}function Xd(S){if(S instanceof ha)return S;switch(S.termType){case"NamedNode":return kv(S.value);case"BlankNode":return Bv(S.value);case"Variable":return Vv(S.value);case"DefaultGraph":return Kd;case"Literal":return Nv(S.value,S.language||S.datatype);case"Quad":return Uv(S);default:throw new Error(`Unexpected termType: ${S.termType}`)}}function Uv(S){if(S instanceof Fv)return S;if(S.termType!=="Quad")throw new Error(`Unexpected termType: ${S.termType}`);return mg(Xd(S.subject),Xd(S.predicate),Xd(S.object),Xd(S.graph))}const dl="http://www.w3.org/ns/shacl#",jv="http://www.w3.org/2001/XMLSchema#",Gv="http://www.w3.org/1999/02/22-rdf-syntax-ns#",qv="http://www.w3.org/2000/01/rdf-schema#",Tg="http://www.w3.org/2004/02/skos/core#",H2="http://www.w3.org/2002/07/owl#",$2="http://purl.org/dc/terms/",Z2="http://xmlns.com/foaf/0.1/",W2=ro.namedNode("loaded-shapes"),X2=ro.namedNode("loaded-data"),_g=ro.namedNode(Gv+"type");ro.namedNode($2+"conformsTo");const vv=ro.namedNode(qv+"subClassOf");ro.namedNode(H2+"imports");const Y2=ro.namedNode(Tg+"broader"),J2=ro.namedNode(Tg+"narrower");ro.namedNode(dl+"NodeShape");ro.namedNode(dl+"IRI");ro.namedNode(dl+"property");ro.namedNode(dl+"class");ro.namedNode(dl+"targetClass");ro.namedNode(dl+"nodeKind");ro.namedNode(jv+"string");function hg(S,z,X=dl,fe){let ye="";const Ie=K2(S,z,X,fe);return Ie&&(ye=Ie.value),ye}function K2(S,z,X=dl,fe){let ye;const Ie=X+z;if(fe?.length){for(const et of fe)for(const s of S)if(s.predicate.value===Ie){if(s.object.id.endsWith(`@${et}`))return s.object;s.object.id.indexOf("@")<0?ye=s.object:ye||(ye=s.object)}}else for(const et of S)if(et.predicate.value===Ie)return et.object;return ye}function Hv(S,z){return hg(S,"prefLabel",Tg,z)||hg(S,"label",qv,z)||hg(S,"name",Z2,z)}function $v(S,z,X){const fe=[];for(const ye of S)fe.push({value:ye,label:Hv(z.getQuads(ye,null,null,null),X),children:[]});return fe}function Zv(S,z,X,fe,ye=new Set){for(const Ie of z.owlImports)ye.has(Ie.id)||(ye.add(Ie.id),fe.push(...X.getSubjects(_g,S,Ie)));z.parent&&Zv(S,z.parent,X,fe,ye)}function Wv(S,z){if(z.shaclIn){const X=z.config.lists[z.shaclIn];return $v(X?.length?X:[],z.config.store,z.config.languages)}else{const X=z.config.store.getSubjects(_g,S,W2);X.push(...z.config.store.getSubjects(_g,S,X2)),Zv(S,z,z.config.store,X);const fe=new Map,ye=new Map;for(const et of X)fe.set(et.id,{value:et,label:Hv(z.config.store.getQuads(et,null,null,null),z.config.languages),children:[]});for(const et of X){for(const s of z.config.store.getObjects(et,Y2,null))fe.has(s.id)&&ye.set(et.id,s.id);for(const s of z.config.store.getObjects(et,J2,null))fe.has(s.id)&&ye.set(s.id,et.id);for(const s of z.config.store.getObjects(et,vv,null))fe.has(s.id)&&ye.set(et.id,s.id)}for(const[et,s]of ye.entries())fe.get(s)?.children?.push(fe.get(et));const Ie=[];for(const[et,s]of fe.entries())ye.has(et)||Ie.push(s);for(const et of z.config.store.getSubjects(vv,S,null))Ie.push(...Wv(et,z));return Ie}}function Q2(S,z,X){{const fe=S.minCount!==void 0&&S.minCount>0;if(S.class)return S.config.theme.createListEditor(S.label,z,fe,Wv(S.class,S),S);if(S.shaclIn){const ye=S.config.lists[S.shaclIn];if(ye?.length){const Ie=$v(ye,S.config.store,S.config.languages);return S.config.theme.createListEditor(S.label,z,fe,Ie,S)}else console.error("list not found:",S.shaclIn,"existing lists:",S.config.lists)}if(S.datatype?.value===`${Gv}langString`||S.languageIn?.length)return S.config.theme.createLangStringEditor(S.label,z,fe,S);switch(S.datatype?.value.replace(jv,"")){case"integer":case"float":case"double":case"decimal":return S.config.theme.createNumberEditor(S.label,z,fe,S);case"date":case"dateTime":return S.config.theme.createDateEditor(S.label,z,fe,S);case"boolean":return S.config.theme.createBooleanEditor(S.label,z,fe,S);case"base64Binary":return S.config.theme.createFileEditor(S.label,z,fe,S)}return S.config.theme.createTextEditor(S.label,z,fe,S)}}var sm={exports:{}},eT=sm.exports,bv;function tT(){return bv||(bv=1,function(S,z){(function(X,fe){S.exports=fe()})(eT,function(){var X,fe,ye;function Ie(s,zt){if(!X)X=zt;else if(!fe)fe=zt;else{var It="self.onerror = function() { console.error('An error occurred while parsing the WebWorker bundle. This is most likely due to improper transpilation by Babel; please see https://docs.mapbox.com/mapbox-gl-js/guides/install/#transpiling'); }; var sharedChunk = {}; ("+X+")(sharedChunk); ("+fe+")(sharedChunk); self.onerror = null;",_i={};X(_i),ye=zt(_i),typeof window<"u"&&window&&window.URL&&window.URL.createObjectURL&&(ye.workerUrl=window.URL.createObjectURL(new Blob([It],{type:"text/javascript"})))}}Ie(["exports"],function(s){var zt=1e-6,It=typeof Float32Array<"u"?Float32Array:Array;function _i(r,e){var i=e[0],o=e[1],a=e[2],u=e[3],h=i*u-a*o;return h?(r[0]=u*(h=1/h),r[1]=-o*h,r[2]=-a*h,r[3]=i*h,r):null}function xr(){var r=new It(9);return It!=Float32Array&&(r[1]=0,r[2]=0,r[3]=0,r[5]=0,r[6]=0,r[7]=0),r[0]=1,r[4]=1,r[8]=1,r}function dt(r,e){var i=e[0],o=e[1],a=e[2],u=e[3],h=e[4],f=e[5],_=e[6],g=e[7],v=e[8];return r[0]=h*v-f*g,r[1]=a*g-o*v,r[2]=o*f-a*h,r[3]=f*_-u*v,r[4]=i*v-a*_,r[5]=a*u-i*f,r[6]=u*g-h*_,r[7]=o*_-i*g,r[8]=i*h-o*u,r}function Ot(r,e,i){var o=e[0],a=e[1],u=e[2],h=e[3],f=e[4],_=e[5],g=e[6],v=e[7],b=e[8],w=i[0],A=i[1],C=i[2],R=i[3],D=i[4],B=i[5],G=i[6],j=i[7],H=i[8];return r[0]=w*o+A*h+C*g,r[1]=w*a+A*f+C*v,r[2]=w*u+A*_+C*b,r[3]=R*o+D*h+B*g,r[4]=R*a+D*f+B*v,r[5]=R*u+D*_+B*b,r[6]=G*o+j*h+H*g,r[7]=G*a+j*f+H*v,r[8]=G*u+j*_+H*b,r}function Zt(){var r=new It(16);return It!=Float32Array&&(r[1]=0,r[2]=0,r[3]=0,r[4]=0,r[6]=0,r[7]=0,r[8]=0,r[9]=0,r[11]=0,r[12]=0,r[13]=0,r[14]=0),r[0]=1,r[5]=1,r[10]=1,r[15]=1,r}function Ct(r){return r[0]=1,r[1]=0,r[2]=0,r[3]=0,r[4]=0,r[5]=1,r[6]=0,r[7]=0,r[8]=0,r[9]=0,r[10]=1,r[11]=0,r[12]=0,r[13]=0,r[14]=0,r[15]=1,r}function vr(r,e){var i=e[0],o=e[1],a=e[2],u=e[3],h=e[4],f=e[5],_=e[6],g=e[7],v=e[8],b=e[9],w=e[10],A=e[11],C=e[12],R=e[13],D=e[14],B=e[15],G=i*f-o*h,j=i*_-a*h,H=i*g-u*h,se=o*_-a*f,ie=o*g-u*f,ne=a*g-u*_,ue=v*R-b*C,de=v*D-w*C,Re=v*B-A*C,_e=b*D-w*R,Le=b*B-A*R,We=w*B-A*D,Oe=G*We-j*Le+H*_e+se*Re-ie*de+ne*ue;return Oe?(r[0]=(f*We-_*Le+g*_e)*(Oe=1/Oe),r[1]=(a*Le-o*We-u*_e)*Oe,r[2]=(R*ne-D*ie+B*se)*Oe,r[3]=(w*ie-b*ne-A*se)*Oe,r[4]=(_*Re-h*We-g*de)*Oe,r[5]=(i*We-a*Re+u*de)*Oe,r[6]=(D*H-C*ne-B*j)*Oe,r[7]=(v*ne-w*H+A*j)*Oe,r[8]=(h*Le-f*Re+g*ue)*Oe,r[9]=(o*Re-i*Le-u*ue)*Oe,r[10]=(C*ie-R*H+B*G)*Oe,r[11]=(b*H-v*ie-A*G)*Oe,r[12]=(f*de-h*_e-_*ue)*Oe,r[13]=(i*_e-o*de+a*ue)*Oe,r[14]=(R*j-C*se-D*G)*Oe,r[15]=(v*se-b*j+w*G)*Oe,r):null}function Ni(r,e,i){var o=e[0],a=e[1],u=e[2],h=e[3],f=e[4],_=e[5],g=e[6],v=e[7],b=e[8],w=e[9],A=e[10],C=e[11],R=e[12],D=e[13],B=e[14],G=e[15],j=i[0],H=i[1],se=i[2],ie=i[3];return r[0]=j*o+H*f+se*b+ie*R,r[1]=j*a+H*_+se*w+ie*D,r[2]=j*u+H*g+se*A+ie*B,r[3]=j*h+H*v+se*C+ie*G,r[4]=(j=i[4])*o+(H=i[5])*f+(se=i[6])*b+(ie=i[7])*R,r[5]=j*a+H*_+se*w+ie*D,r[6]=j*u+H*g+se*A+ie*B,r[7]=j*h+H*v+se*C+ie*G,r[8]=(j=i[8])*o+(H=i[9])*f+(se=i[10])*b+(ie=i[11])*R,r[9]=j*a+H*_+se*w+ie*D,r[10]=j*u+H*g+se*A+ie*B,r[11]=j*h+H*v+se*C+ie*G,r[12]=(j=i[12])*o+(H=i[13])*f+(se=i[14])*b+(ie=i[15])*R,r[13]=j*a+H*_+se*w+ie*D,r[14]=j*u+H*g+se*A+ie*B,r[15]=j*h+H*v+se*C+ie*G,r}function jr(r,e,i){var o,a,u,h,f,_,g,v,b,w,A,C,R=i[0],D=i[1],B=i[2];return e===r?(r[12]=e[0]*R+e[4]*D+e[8]*B+e[12],r[13]=e[1]*R+e[5]*D+e[9]*B+e[13],r[14]=e[2]*R+e[6]*D+e[10]*B+e[14],r[15]=e[3]*R+e[7]*D+e[11]*B+e[15]):(a=e[1],u=e[2],h=e[3],f=e[4],_=e[5],g=e[6],v=e[7],b=e[8],w=e[9],A=e[10],C=e[11],r[0]=o=e[0],r[1]=a,r[2]=u,r[3]=h,r[4]=f,r[5]=_,r[6]=g,r[7]=v,r[8]=b,r[9]=w,r[10]=A,r[11]=C,r[12]=o*R+f*D+b*B+e[12],r[13]=a*R+_*D+w*B+e[13],r[14]=u*R+g*D+A*B+e[14],r[15]=h*R+v*D+C*B+e[15]),r}function qr(r,e,i){var o=i[0],a=i[1],u=i[2];return r[0]=e[0]*o,r[1]=e[1]*o,r[2]=e[2]*o,r[3]=e[3]*o,r[4]=e[4]*a,r[5]=e[5]*a,r[6]=e[6]*a,r[7]=e[7]*a,r[8]=e[8]*u,r[9]=e[9]*u,r[10]=e[10]*u,r[11]=e[11]*u,r[12]=e[12],r[13]=e[13],r[14]=e[14],r[15]=e[15],r}function ns(r,e,i){var o=Math.sin(i),a=Math.cos(i),u=e[4],h=e[5],f=e[6],_=e[7],g=e[8],v=e[9],b=e[10],w=e[11];return e!==r&&(r[0]=e[0],r[1]=e[1],r[2]=e[2],r[3]=e[3],r[12]=e[12],r[13]=e[13],r[14]=e[14],r[15]=e[15]),r[4]=u*a+g*o,r[5]=h*a+v*o,r[6]=f*a+b*o,r[7]=_*a+w*o,r[8]=g*a-u*o,r[9]=v*a-h*o,r[10]=b*a-f*o,r[11]=w*a-_*o,r}function Fo(r,e,i){var o=Math.sin(i),a=Math.cos(i),u=e[0],h=e[1],f=e[2],_=e[3],g=e[8],v=e[9],b=e[10],w=e[11];return e!==r&&(r[4]=e[4],r[5]=e[5],r[6]=e[6],r[7]=e[7],r[12]=e[12],r[13]=e[13],r[14]=e[14],r[15]=e[15]),r[0]=u*a-g*o,r[1]=h*a-v*o,r[2]=f*a-b*o,r[3]=_*a-w*o,r[8]=u*o+g*a,r[9]=h*o+v*a,r[10]=f*o+b*a,r[11]=_*o+w*a,r}function os(r,e,i){var o=Math.sin(i),a=Math.cos(i),u=e[0],h=e[1],f=e[2],_=e[3],g=e[4],v=e[5],b=e[6],w=e[7];return e!==r&&(r[8]=e[8],r[9]=e[9],r[10]=e[10],r[11]=e[11],r[12]=e[12],r[13]=e[13],r[14]=e[14],r[15]=e[15]),r[0]=u*a+g*o,r[1]=h*a+v*o,r[2]=f*a+b*o,r[3]=_*a+w*o,r[4]=g*a-u*o,r[5]=v*a-h*o,r[6]=b*a-f*o,r[7]=w*a-_*o,r}function da(r,e){return r[0]=e[0],r[1]=0,r[2]=0,r[3]=0,r[4]=0,r[5]=e[1],r[6]=0,r[7]=0,r[8]=0,r[9]=0,r[10]=e[2],r[11]=0,r[12]=0,r[13]=0,r[14]=0,r[15]=1,r}function yo(r,e,i){var o,a,u,h=i[0],f=i[1],_=i[2],g=Math.hypot(h,f,_);return g<zt?null:(h*=g=1/g,f*=g,_*=g,o=Math.sin(e),a=Math.cos(e),r[0]=h*h*(u=1-a)+a,r[1]=f*h*u+_*o,r[2]=_*h*u-f*o,r[3]=0,r[4]=h*f*u-_*o,r[5]=f*f*u+a,r[6]=_*f*u+h*o,r[7]=0,r[8]=h*_*u+f*o,r[9]=f*_*u-h*o,r[10]=_*_*u+a,r[11]=0,r[12]=0,r[13]=0,r[14]=0,r[15]=1,r)}function ss(r,e){var i=e[0],o=e[1],a=e[2],u=e[3],h=i+i,f=o+o,_=a+a,g=i*h,v=o*h,b=o*f,w=a*h,A=a*f,C=a*_,R=u*h,D=u*f,B=u*_;return r[0]=1-b-C,r[1]=v+B,r[2]=w-D,r[3]=0,r[4]=v-B,r[5]=1-g-C,r[6]=A+R,r[7]=0,r[8]=w+D,r[9]=A-R,r[10]=1-g-b,r[11]=0,r[12]=0,r[13]=0,r[14]=0,r[15]=1,r}Math.hypot||(Math.hypot=function(){for(var r=0,e=arguments.length;e--;)r+=arguments[e]*arguments[e];return Math.sqrt(r)});var vc=Ni;function Si(){var r=new It(3);return It!=Float32Array&&(r[0]=0,r[1]=0,r[2]=0),r}function pa(r){var e=new It(3);return e[0]=r[0],e[1]=r[1],e[2]=r[2],e}function Kr(r){return Math.hypot(r[0],r[1],r[2])}function Sr(r,e,i){var o=new It(3);return o[0]=r,o[1]=e,o[2]=i,o}function br(r,e,i,o){return r[0]=e,r[1]=i,r[2]=o,r}function er(r,e,i){return r[0]=e[0]+i[0],r[1]=e[1]+i[1],r[2]=e[2]+i[2],r}function Mn(r,e,i){return r[0]=e[0]-i[0],r[1]=e[1]-i[1],r[2]=e[2]-i[2],r}function fl(r,e,i){return r[0]=e[0]*i[0],r[1]=e[1]*i[1],r[2]=e[2]*i[2],r}function ko(r,e,i){return r[0]=Math.min(e[0],i[0]),r[1]=Math.min(e[1],i[1]),r[2]=Math.min(e[2],i[2]),r}function oo(r,e,i){return r[0]=Math.max(e[0],i[0]),r[1]=Math.max(e[1],i[1]),r[2]=Math.max(e[2],i[2]),r}function Ji(r,e,i){return r[0]=e[0]*i,r[1]=e[1]*i,r[2]=e[2]*i,r}function dn(r,e,i,o){return r[0]=e[0]+i[0]*o,r[1]=e[1]+i[1]*o,r[2]=e[2]+i[2]*o,r}function fa(r,e){var i=e[0]-r[0],o=e[1]-r[1],a=e[2]-r[2];return i*i+o*o+a*a}function bc(r){var e=r[0],i=r[1],o=r[2];return e*e+i*i+o*o}function as(r,e){return r[0]=-e[0],r[1]=-e[1],r[2]=-e[2],r}function Wi(r,e){var i=e[0],o=e[1],a=e[2],u=i*i+o*o+a*a;return u>0&&(u=1/Math.sqrt(u)),r[0]=e[0]*u,r[1]=e[1]*u,r[2]=e[2]*u,r}function mr(r,e){return r[0]*e[0]+r[1]*e[1]+r[2]*e[2]}function Ir(r,e,i){var o=e[0],a=e[1],u=e[2],h=i[0],f=i[1],_=i[2];return r[0]=a*_-u*f,r[1]=u*h-o*_,r[2]=o*f-a*h,r}function vn(r,e,i,o){var a=e[0],u=e[1],h=e[2];return r[0]=a+o*(i[0]-a),r[1]=u+o*(i[1]-u),r[2]=h+o*(i[2]-h),r}function _r(r,e,i){var o=e[0],a=e[1],u=e[2],h=i[3]*o+i[7]*a+i[11]*u+i[15];return r[0]=(i[0]*o+i[4]*a+i[8]*u+i[12])/(h=h||1),r[1]=(i[1]*o+i[5]*a+i[9]*u+i[13])/h,r[2]=(i[2]*o+i[6]*a+i[10]*u+i[14])/h,r}function ls(r,e,i){var o=e[0],a=e[1],u=e[2];return r[0]=o*i[0]+a*i[3]+u*i[6],r[1]=o*i[1]+a*i[4]+u*i[7],r[2]=o*i[2]+a*i[5]+u*i[8],r}function cs(r,e,i){var o=i[0],a=i[1],u=i[2],h=e[0],f=e[1],_=e[2],g=a*_-u*f,v=u*h-o*_,b=o*f-a*h,w=a*b-u*v,A=u*g-o*b,C=o*v-a*g,R=2*i[3];return v*=R,b*=R,A*=2,C*=2,r[0]=h+(g*=R)+(w*=2),r[1]=f+v+A,r[2]=_+b+C,r}function ml(r){return r[0]=0,r[1]=0,r[2]=0,r}function so(r,e){return r[0]===e[0]&&r[1]===e[1]&&r[2]===e[2]}var gr=Mn,bn=fl,us=Kr;function _l(){var r=new It(4);return It!=Float32Array&&(r[0]=0,r[1]=0,r[2]=0,r[3]=0),r}function Bo(r,e,i){return r[0]=e[0]*i,r[1]=e[1]*i,r[2]=e[2]*i,r[3]=e[3]*i,r}function Bn(r,e){var i=e[0],o=e[1],a=e[2],u=e[3],h=i*i+o*o+a*a+u*u;return h>0&&(h=1/Math.sqrt(h)),r[0]=i*h,r[1]=o*h,r[2]=a*h,r[3]=u*h,r}function Pn(r,e,i){var o=e[0],a=e[1],u=e[2],h=e[3];return r[0]=i[0]*o+i[4]*a+i[8]*u+i[12]*h,r[1]=i[1]*o+i[5]*a+i[9]*u+i[13]*h,r[2]=i[2]*o+i[6]*a+i[10]*u+i[14]*h,r[3]=i[3]*o+i[7]*a+i[11]*u+i[15]*h,r}function No(){var r=new It(4);return It!=Float32Array&&(r[0]=0,r[1]=0,r[2]=0),r[3]=1,r}function Vo(r){return r[0]=0,r[1]=0,r[2]=0,r[3]=1,r}function Us(r,e,i){i*=.5;var o=e[0],a=e[1],u=e[2],h=e[3],f=Math.sin(i),_=Math.cos(i);return r[0]=o*_+h*f,r[1]=a*_+u*f,r[2]=u*_-a*f,r[3]=h*_-o*f,r}function ma(r,e,i){i*=.5;var o=e[0],a=e[1],u=e[2],h=e[3],f=Math.sin(i),_=Math.cos(i);return r[0]=o*_-u*f,r[1]=a*_+h*f,r[2]=u*_+o*f,r[3]=h*_-a*f,r}Si(),_l();var wn,Nn,gl,Uo=Bn,_a=(wn=Si(),Nn=Sr(1,0,0),gl=Sr(0,1,0),function(r,e,i){var o=mr(e,i);return o<-.999999?(Ir(wn,Nn,e),us(wn)<1e-6&&Ir(wn,gl,e),Wi(wn,wn),function(a,u,h){h*=.5;var f=Math.sin(h);a[0]=f*u[0],a[1]=f*u[1],a[2]=f*u[2],a[3]=Math.cos(h)}(r,wn,Math.PI),r):o>.999999?(r[0]=0,r[1]=0,r[2]=0,r[3]=1,r):(Ir(wn,e,i),r[0]=wn[0],r[1]=wn[1],r[2]=wn[2],r[3]=1+o,Uo(r,r))});function on(){var r=new It(2);return It!=Float32Array&&(r[0]=0,r[1]=0),r}function Vn(r,e){var i=new It(2);return i[0]=r,i[1]=e,i}function hs(r,e,i){return r[0]=e[0]+i[0],r[1]=e[1]+i[1],r}function jo(r,e,i){return r[0]=e[0]-i[0],r[1]=e[1]-i[1],r}function ds(r,e,i){return r[0]=e[0]*i,r[1]=e[1]*i,r}function ps(r){return Math.hypot(r[0],r[1])}function ga(r,e){var i=e[0],o=e[1],a=i*i+o*o;return a>0&&(a=1/Math.sqrt(a)),r[0]=e[0]*a,r[1]=e[1]*a,r}function Xi(r,e){return r[0]*e[0]+r[1]*e[1]}No(),No(),xr();var yl,xl,Un=jo;function vl(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}on();var qu=function(){if(xl)return yl;function r(e,i,o,a){this.cx=3*e,this.bx=3*(o-e)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*i,this.by=3*(a-i)-this.cy,this.ay=1-this.cy-this.by,this.p1x=e,this.p1y=i,this.p2x=o,this.p2y=a}return xl=1,yl=r,r.prototype={sampleCurveX:function(e){return((this.ax*e+this.bx)*e+this.cx)*e},sampleCurveY:function(e){return((this.ay*e+this.by)*e+this.cy)*e},sampleCurveDerivativeX:function(e){return(3*this.ax*e+2*this.bx)*e+this.cx},solveCurveX:function(e,i){if(i===void 0&&(i=1e-6),e<0)return 0;if(e>1)return 1;for(var o=e,a=0;a<8;a++){var u=this.sampleCurveX(o)-e;if(Math.abs(u)<i)return o;var h=this.sampleCurveDerivativeX(o);if(Math.abs(h)<1e-6)break;o-=u/h}var f=0,_=1;for(o=e,a=0;a<20&&(u=this.sampleCurveX(o),!(Math.abs(u-e)<i));a++)e>u?f=o:_=o,o=.5*(_-f)+f;return o},solve:function(e,i){return this.sampleCurveY(this.solveCurveX(e,i))}},yl}(),ya=vl(qu);function Ge(r,e){this.x=r,this.y=e}function Go(r,e){if(Array.isArray(r)){if(!Array.isArray(e)||r.length!==e.length)return!1;for(let i=0;i<r.length;i++)if(!Go(r[i],e[i]))return!1;return!0}if(typeof r=="object"&&r!==null&&e!==null){if(typeof e!="object"||Object.keys(r).length!==Object.keys(e).length)return!1;for(const i in r)if(!Go(r[i],e[i]))return!1;return!0}return r===e}Ge.prototype={clone(){return new Ge(this.x,this.y)},add(r){return this.clone()._add(r)},sub(r){return this.clone()._sub(r)},multByPoint(r){return this.clone()._multByPoint(r)},divByPoint(r){return this.clone()._divByPoint(r)},mult(r){return this.clone()._mult(r)},div(r){return this.clone()._div(r)},rotate(r){return this.clone()._rotate(r)},rotateAround(r,e){return this.clone()._rotateAround(r,e)},matMult(r){return this.clone()._matMult(r)},unit(){return this.clone()._unit()},perp(){return this.clone()._perp()},round(){return this.clone()._round()},mag(){return Math.sqrt(this.x*this.x+this.y*this.y)},equals(r){return this.x===r.x&&this.y===r.y},dist(r){return Math.sqrt(this.distSqr(r))},distSqr(r){const e=r.x-this.x,i=r.y-this.y;return e*e+i*i},angle(){return Math.atan2(this.y,this.x)},angleTo(r){return Math.atan2(this.y-r.y,this.x-r.x)},angleWith(r){return this.angleWithSep(r.x,r.y)},angleWithSep(r,e){return Math.atan2(this.x*e-this.y*r,this.x*r+this.y*e)},_matMult(r){const e=r[2]*this.x+r[3]*this.y;return this.x=r[0]*this.x+r[1]*this.y,this.y=e,this},_add(r){return this.x+=r.x,this.y+=r.y,this},_sub(r){return this.x-=r.x,this.y-=r.y,this},_mult(r){return this.x*=r,this.y*=r,this},_div(r){return this.x/=r,this.y/=r,this},_multByPoint(r){return this.x*=r.x,this.y*=r.y,this},_divByPoint(r){return this.x/=r.x,this.y/=r.y,this},_unit(){return this._div(this.mag()),this},_perp(){const r=this.y;return this.y=this.x,this.x=-r,this},_rotate(r){const e=Math.cos(r),i=Math.sin(r),o=i*this.x+e*this.y;return this.x=e*this.x-i*this.y,this.y=o,this},_rotateAround(r,e){const i=Math.cos(r),o=Math.sin(r),a=e.y+o*(this.x-e.x)+i*(this.y-e.y);return this.x=e.x+i*(this.x-e.x)-o*(this.y-e.y),this.y=a,this},_round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},constructor:Ge},Ge.convert=function(r){if(r instanceof Ge)return r;if(Array.isArray(r))return new Ge(+r[0],+r[1]);if(r.x!==void 0&&r.y!==void 0)return new Ge(+r.x,+r.y);throw new Error("Expected [x, y] or {x, y} point format")};const Hu=Math.PI/180,bl=180/Math.PI;function pi(r){return r*Hu}function we(r){return r*bl}const N=[[0,0],[1,0],[1,1],[0,1]];function V(r){if(r<=0)return 0;if(r>=1)return 1;const e=r*r,i=e*r;return 4*(r<.5?i:3*(r-e)+i-.75)}function Y(r,e,i,o){const a=new ya(r,e,i,o);return function(u){return a.solve(u)}}const ae=Y(.25,.1,.25,1);function J(r,e,i){return Math.min(i,Math.max(e,r))}function he(r,e,i){return(i=J((i-r)/(e-r),0,1))*i*(3-2*i)}function Se(r,e,i){const o=i-e,a=((r-e)%o+o)%o+e;return a===e?i:a}function pe(r,e,i){if(!r.length)return i(null,[]);let o=r.length;const a=new Array(r.length);let u=null;r.forEach((h,f)=>{e(h,(_,g)=>{_&&(u=_),a[f]=g,--o==0&&i(u,a)})})}function Te(r,...e){for(const i of e)for(const o in i)r[o]=i[o];return r}let Ye=1;function Fe(){return Ye++}function bt(r){return r<=1?1:Math.pow(2,Math.ceil(Math.log(r)/Math.LN2))}function Rt(r,e){r.forEach(i=>{e[i]&&(e[i]=e[i].bind(e))})}function Ft(r,e,i){const o={};for(const a in r)o[a]=e.call(this,r[a],a,r);return o}function Qt(r,e,i){const o={};for(const a in r)e.call(this,r[a],a,r)&&(o[a]=r[a]);return o}function Wt(r){return Array.isArray(r)?r.map(Wt):typeof r=="object"&&r?Ft(r,Wt):r}function ei(r,e){for(let i=0;i<r.length;i++)if(e.indexOf(r[i])>=0)return!0;return!1}const Oi={};function ti(r){Oi[r]||(typeof console<"u"&&console.warn(r),Oi[r]=!0)}function dr(r,e,i){return(i.y-r.y)*(e.x-r.x)>(e.y-r.y)*(i.x-r.x)}function Br(r){let e=0;for(let i,o,a=0,u=r.length,h=u-1;a<u;h=a++)i=r[a],o=r[h],e+=(o.x-i.x)*(i.y+o.y);return e}function Rr([r,e,i]){const o=pi(e+90),a=pi(i);return{x:r*Math.cos(o)*Math.sin(a),y:r*Math.sin(o)*Math.sin(a),z:r*Math.cos(a),azimuthal:e,polar:i}}function Ri(r){return(typeof self<"u"||r!==void 0)&&typeof WorkerGlobalScope<"u"&&(r!==void 0?r:self)instanceof WorkerGlobalScope}function gi(r){const e={};if(r.replace(/(?:^|(?:\s*\,\s*))([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,(i,o,a,u)=>{const h=a||u;return e[o]=!h||h.toLowerCase(),""}),e["max-age"]){const i=parseInt(e["max-age"],10);isNaN(i)?delete e["max-age"]:e["max-age"]=i}return e}let ur=null;function sr(r,e){return[r[4*e],r[4*e+1],r[4*e+2],r[4*e+3]]}function tr(r,e,i,o){for(;e<i;){const a=e+i>>1;r[a]<o?e=a+1:i=a}return e}function Hr(r,e,i,o){for(;e<i;){const a=e+i>>1;r[a]<=o?e=a+1:i=a}return e}function Tn(r){return r>0?1/(1.001-r):1+r}function sn(r){return r>0?1-1/(1.001-r):-r}function wl(r,e,i){return(r-e.min)*(i.max-i.min)/(e.max-e.min)+i.min}const Yr={API_URL:"https://api.mapbox.com",get API_URL_REGEX(){return/^((https?:)?\/\/)?([^\/]+\.)?mapbox\.c(n|om)(\/|\?|$)/i},get API_TILEJSON_REGEX(){return/^((https?:)?\/\/)?([^\/]+\.)?mapbox\.c(n|om)(\/v[0-9]*\/.*\.json.*$)/i},get API_SPRITE_REGEX(){return/^((https?:)?\/\/)?([^\/]+\.)?mapbox\.c(n|om)(\/styles\/v[0-9]*\/)(.*\/sprite.*\..*$)/i},get API_FONTS_REGEX(){return/^((https?:)?\/\/)?([^\/]+\.)?mapbox\.c(n|om)(\/fonts\/v[0-9]*\/)(.*\.pbf.*$)/i},get API_STYLE_REGEX(){return/^((https?:)?\/\/)?([^\/]+\.)?mapbox\.c(n|om)(\/styles\/v[0-9]*\/)(.*$)/i},get API_CDN_URL_REGEX(){return/^((https?:)?\/\/)?api\.mapbox\.c(n|om)(\/mapbox-gl-js\/)(.*$)/i},get EVENTS_URL(){if(!Yr.API_URL)return null;try{const r=new URL(Yr.API_URL);return r.hostname==="api.mapbox.cn"?"https://events.mapbox.cn/events/v2":r.hostname==="api.mapbox.com"?"https://events.mapbox.com/events/v2":null}catch{return null}},SESSION_PATH:"/map-sessions/v1",FEEDBACK_URL:"https://apps.mapbox.com/feedback",TILE_URL_VERSION:"v4",RASTER_URL_PREFIX:"raster/v1",RASTERARRAYS_URL_PREFIX:"rasterarrays/v1",REQUIRE_ACCESS_TOKEN:!0,ACCESS_TOKEN:null,DEFAULT_STYLE:"mapbox://styles/mapbox/standard",MAX_PARALLEL_IMAGE_REQUESTS:16,DRACO_URL:"https://api.mapbox.com/mapbox-gl-js/draco_decoder_gltf_v1.5.6.wasm",MESHOPT_URL:"https://api.mapbox.com/mapbox-gl-js/meshopt_base_v0.20.wasm",MESHOPT_SIMD_URL:"https://api.mapbox.com/mapbox-gl-js/meshopt_simd_v0.20.wasm",BUILDING_GEN_URL:"https://api.mapbox.com/mapbox-gl-js/building-gen/building_gen_v1.2.1.wasm",GLYPHS_URL:"mapbox://fonts/mapbox/{fontstack}/{range}.pbf",TILES3D_URL_PREFIX:"3dtiles/v1"};function fs(r){return Yr.API_URL_REGEX.test(r)}function wc(r){return Yr.API_SPRITE_REGEX.test(r)}let Tl,El,Tc,Ec,js,Sl;function Sc(){return Tl==null&&(Tl=self.OffscreenCanvas&&new OffscreenCanvas(1,1).getContext("2d")&&typeof self.createImageBitmap=="function"),Tl}const xo={now:()=>Ec!==void 0?Ec:performance.now(),setNow(r){Ec=r},restoreNow(){Ec=void 0},frame(r){const e=requestAnimationFrame(r);return{cancel:()=>cancelAnimationFrame(e)}},getImageData(r,e=0){const{width:i,height:o}=r;js||(js=document.createElement("canvas"));const a=js.getContext("2d",{willReadFrequently:!0});if(!a)throw new Error("failed to create canvas 2d context");return(i>js.width||o>js.height)&&(js.width=i,js.height=o),a.clearRect(-e,-e,i+2*e,o+2*e),a.drawImage(r,0,0,i,o),a.getImageData(-e,-e,i+2*e,o+2*e)},resolveURL:r=>(El||(El=document.createElement("a")),El.href=r,El.href),get devicePixelRatio(){return window.devicePixelRatio},get prefersReducedMotion(){return!!window.matchMedia&&(Tc==null&&(Tc=window.matchMedia("(prefers-reduced-motion: reduce)")),Tc.matches)},hasCanvasFingerprintNoise(){if(Sl!==void 0)return Sl;if(!Sc())return Sl=!1,!1;const r=new OffscreenCanvas(85,1),e=r.getContext("2d",{willReadFrequently:!0});let i=0;for(let a=0;a<r.width;++a)e.fillStyle=`rgba(${i++},${i++},${i++}, 255)`,e.fillRect(a,0,1,1);const o=e.getImageData(0,0,r.width,r.height);i=0;for(let a=0;a<o.data.length;++a)if(a%4!=3&&i++!==o.data[a])return Sl=!0,!0;return Sl=!1,!1}};function jn(r,e){const i=r.indexOf("?");if(i<0)return`${r}?${new URLSearchParams(e).toString()}`;const o=new URLSearchParams(r.slice(i));for(const a in e)o.set(a,e[a]);return`${r.slice(0,i)}?${o.toString()}`}function ao(r,e={persistentParams:[]}){const i=r.indexOf("?");if(i<0)return r;const o=new URLSearchParams,a=new URLSearchParams(r.slice(i));for(const h of e.persistentParams){const f=a.get(h);f&&o.set(h,f)}const u=o.toString();return`${r.slice(0,i)}${u.length>0?`?${u}`:""}`}const qo="mapbox-tiles";let vo=500,Ho=50;const Il=["language","worldview","jobid"];let Io,Al;function Gs(){try{return caches}catch{}}function xa(){const r=Gs();r&&Io==null&&(Io=r.open(qo))}let $u=1/0;const Zu={supported:!1,testSupport:function(r){!Cl&&qs&&(va?rp(r):En=r)}};let En,qs,Cl=!1,va=!1;const ip=typeof self<"u"?self:{};function rp(r){const e=r.createTexture();r.bindTexture(r.TEXTURE_2D,e);try{if(r.texImage2D(r.TEXTURE_2D,0,r.RGBA,r.RGBA,r.UNSIGNED_BYTE,qs),r.isContextLost())return;Zu.supported=!0}catch{}r.deleteTexture(e),Cl=!0}ip.document&&(qs=ip.document.createElement("img"),qs.onload=function(){En&&rp(En),En=null,va=!0},qs.onerror=function(){Cl=!0,En=null},qs.src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA=");const Ml={Unknown:"Unknown",Style:"Style",Source:"Source",Tile:"Tile",Glyphs:"Glyphs",SpriteImage:"SpriteImage",SpriteJSON:"SpriteJSON",Iconset:"Iconset",Image:"Image",Model:"Model"};typeof Object.freeze=="function"&&Object.freeze(Ml);class li extends Error{constructor(e,i,o){i===401&&fs(o)&&(e+=": you may have provided an invalid Mapbox access token. See https://docs.mapbox.com/api/overview/#access-tokens-and-token-scopes"),super(e),this.status=i,this.url=o}toString(){return`${this.name}: ${this.message} (${this.status}): ${this.url}`}}const Ic=Ri()?()=>self.worker.referrer:()=>(location.protocol==="blob:"?parent:self).location.href,ba=function(r,e){if(!(/^file:/.test(i=r.url)||/^file:/.test(Ic())&&!/^\w+:/.test(i))){if(self.fetch&&self.Request&&self.AbortController&&Request.prototype.hasOwnProperty("signal"))return function(o,a){const u=new AbortController,h=new Request(o.url,{method:o.method||"GET",body:o.body,credentials:o.credentials,headers:o.headers,referrer:Ic(),referrerPolicy:o.referrerPolicy,signal:u.signal});let f=!1,_=!1;const g=(v=h.url).indexOf("sku=")>0&&fs(v);var v;o.type==="json"&&h.headers.set("Accept","application/json");const b=(A,C,R)=>{if(_)return;if(A&&A.message!=="SecurityError"&&ti(A.toString()),C&&R)return w(C);const D=Date.now();fetch(h).then(B=>{if(B.ok){const G=g?B.clone():null;return w(B,G,D)}return a(new li(B.statusText,B.status,o.url))}).catch(B=>{B.name!=="AbortError"&&a(new Error(`${B.message} ${o.url}`))})},w=(A,C,R)=>{(o.type==="arrayBuffer"?A.arrayBuffer():o.type==="json"?A.json():A.text()).then(D=>{_||(C&&R&&function(B,G,j){if(xa(),Io==null)return;const H=gi(G.headers.get("Cache-Control")||"");if(H["no-store"])return;const se={status:G.status,statusText:G.statusText,headers:new Headers};G.headers.forEach((ue,de)=>se.headers.set(de,ue)),H["max-age"]&&se.headers.set("Expires",new Date(j+1e3*H["max-age"]).toUTCString());const ie=se.headers.get("Expires");if(!ie||new Date(ie).getTime()-j<42e4)return;let ne=ao(B.url,{persistentParams:Il});if(G.status===206){const ue=B.headers.get("Range");if(!ue)return;se.status=200,ne=jn(ne,{range:ue})}(function(ue,de){if(Al===void 0)try{new Response(new ReadableStream),Al=!0}catch{Al=!1}Al?de(ue.body):ue.blob().then(de).catch(Re=>ti(Re.message))})(G,ue=>{const de=new Response((Re=G.status)!==200&&Re!==404&&[101,103,204,205,304].includes(Re)?null:ue,se);var Re;xa(),Io?.then(_e=>_e.put(ne,de)).catch(_e=>ti(_e.message))})}(h,C,R),f=!0,a(null,D,A.headers.get("Cache-Control"),A.headers.get("Expires")))}).catch(D=>{_||a(new Error(D.message))})};return g?function(A,C){if(xa(),Io==null)return C(null);Io.then(R=>{let D=ao(A.url,{persistentParams:Il});const B=A.headers.get("Range");B&&(D=jn(D,{range:B})),R.match(D).then(G=>{const j=function(H){if(!H)return!1;const se=new Date(H.headers.get("Expires")||0),ie=gi(H.headers.get("Cache-Control")||"");return Number(se)>Date.now()&&!ie["no-cache"]}(G);R.delete(D).catch(C),j&&R.put(D,G.clone()).catch(C),C(null,G,j)}).catch(C)}).catch(C)}(h,b):b(null,null),{cancel:()=>{_=!0,f||u.abort()}}}(r,e);if(Ri(self)&&self.worker.actor)return self.worker.actor.send("getResource",r,e,void 0,!0)}var i;return function(o,a){const u=new XMLHttpRequest;u.open(o.method||"GET",o.url,!0),o.type==="arrayBuffer"&&(u.responseType="arraybuffer");for(const h in o.headers)u.setRequestHeader(h,o.headers[h]);return o.type==="json"&&(u.responseType="text",u.setRequestHeader("Accept","application/json")),u.withCredentials=o.credentials==="include",u.onerror=()=>{a(new Error(u.statusText))},u.onload=()=>{if((u.status>=200&&u.status<300||u.status===0)&&u.response!==null){let h=u.response;if(o.type==="json")try{h=JSON.parse(u.response)}catch(f){return a(f)}a(null,h,u.getResponseHeader("Cache-Control"),u.getResponseHeader("Expires"))}else a(new li(u.statusText,u.status,o.url))},u.send(o.body),{cancel:()=>u.abort()}}(r,e)},Pl=function(r,e){return ba(Te(r,{type:"arrayBuffer"}),e)};function _m(r){const e=document.createElement("a");return e.href=r,e.protocol===location.protocol&&e.host===location.host}const Rl="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=";let Hs,ms;Hs=[],ms=0;const zl=function(r,e){if(Zu.supported&&(r.headers||(r.headers={}),r.headers.accept="image/webp,*/*"),ms>=Yr.MAX_PARALLEL_IMAGE_REQUESTS){const u={requestParameters:r,callback:e,cancelled:!1,cancel(){this.cancelled=!0}};return Hs.push(u),u}ms++;let i=!1;const o=()=>{if(!i)for(i=!0,ms--;Hs.length&&ms<Yr.MAX_PARALLEL_IMAGE_REQUESTS;){const u=Hs.shift(),{requestParameters:h,callback:f,cancelled:_}=u;_||(u.cancel=zl(h,f).cancel)}},a=Pl(r,(u,h,f,_)=>{o(),u?e(u):h&&(self.createImageBitmap?function(g,v){const b=new Blob([new Uint8Array(g)],{type:"image/png"});createImageBitmap(b).then(w=>{v(null,w)}).catch(w=>{v(new Error(`Could not load image because of ${w.message}. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported.`))})}(h,(g,v)=>e(g,v,f,_)):function(g,v){const b=new Image;b.onload=()=>{v(null,b),URL.revokeObjectURL(b.src),b.onload=null,requestAnimationFrame(()=>{b.src=Rl})},b.onerror=()=>v(new Error("Could not load image. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported."));const w=new Blob([new Uint8Array(g)],{type:"image/png"});b.src=g.byteLength?URL.createObjectURL(w):Rl}(h,(g,v)=>e(g,v,f,_)))});return{cancel:()=>{a.cancel(),o()}}};var np,Ac,op,wa={exports:{}},$s={exports:{}},sp={exports:{}},Ll=function(){if(op)return wa.exports;op=1;var r=(np||(np=1,$s.exports=function(i,o){var a,u,h,f,_,g,v,b;for(u=i.length-(a=3&i.length),h=o,_=3432918353,g=461845907,b=0;b<u;)v=255&i.charCodeAt(b)|(255&i.charCodeAt(++b))<<8|(255&i.charCodeAt(++b))<<16|(255&i.charCodeAt(++b))<<24,++b,h=27492+(65535&(f=5*(65535&(h=(h^=v=(65535&(v=(v=(65535&v)*_+(((v>>>16)*_&65535)<<16)&4294967295)<<15|v>>>17))*g+(((v>>>16)*g&65535)<<16)&4294967295)<<13|h>>>19))+((5*(h>>>16)&65535)<<16)&4294967295))+((58964+(f>>>16)&65535)<<16);switch(v=0,a){case 3:v^=(255&i.charCodeAt(b+2))<<16;case 2:v^=(255&i.charCodeAt(b+1))<<8;case 1:h^=v=(65535&(v=(v=(65535&(v^=255&i.charCodeAt(b)))*_+(((v>>>16)*_&65535)<<16)&4294967295)<<15|v>>>17))*g+(((v>>>16)*g&65535)<<16)&4294967295}return h^=i.length,h=2246822507*(65535&(h^=h>>>16))+((2246822507*(h>>>16)&65535)<<16)&4294967295,h=3266489909*(65535&(h^=h>>>13))+((3266489909*(h>>>16)&65535)<<16)&4294967295,(h^=h>>>16)>>>0}),$s.exports),e=(Ac||(Ac=1,sp.exports=function(i,o){for(var a,u=i.length,h=o^u,f=0;u>=4;)a=1540483477*(65535&(a=255&i.charCodeAt(f)|(255&i.charCodeAt(++f))<<8|(255&i.charCodeAt(++f))<<16|(255&i.charCodeAt(++f))<<24))+((1540483477*(a>>>16)&65535)<<16),h=1540483477*(65535&h)+((1540483477*(h>>>16)&65535)<<16)^(a=1540483477*(65535&(a^=a>>>24))+((1540483477*(a>>>16)&65535)<<16)),u-=4,++f;switch(u){case 3:h^=(255&i.charCodeAt(f+2))<<16;case 2:h^=(255&i.charCodeAt(f+1))<<8;case 1:h=1540483477*(65535&(h^=255&i.charCodeAt(f)))+((1540483477*(h>>>16)&65535)<<16)}return h=1540483477*(65535&(h^=h>>>13))+((1540483477*(h>>>16)&65535)<<16),(h^=h>>>15)>>>0}),sp.exports);return wa.exports=r,wa.exports.murmur3=r,wa.exports.murmur2=e,wa.exports}(),Ta=vl(Ll);class $o{constructor(e,...i){Te(this,i[0]||{}),this.type=e}}class Gn extends $o{constructor(e,i={}){super("error",Te({error:e},i))}}function Wu(r,e,i){i[r]&&i[r].indexOf(e)!==-1||(i[r]=i[r]||[],i[r].push(e))}function Xu(r,e,i){if(i&&i[r]){const o=i[r].indexOf(e);o!==-1&&i[r].splice(o,1)}}class Zs{on(e,i){return this._listeners=this._listeners||{},Wu(e,i,this._listeners),this}off(e,i){return Xu(e,i,this._listeners),Xu(e,i,this._oneTimeListeners),this}once(e,i){return i?(this._oneTimeListeners=this._oneTimeListeners||{},Wu(e,i,this._oneTimeListeners),this):new Promise(o=>{this.once(e,o)})}fire(e,i){const o=typeof e=="string"?new $o(e,i):e,a=o.type;if(this.listens(a)){o.target=this;const u=this._listeners&&this._listeners[a]?this._listeners[a].slice():[];for(const _ of u)_.call(this,o);const h=this._oneTimeListeners&&this._oneTimeListeners[a]?this._oneTimeListeners[a].slice():[];for(const _ of h)Xu(a,_,this._oneTimeListeners),_.call(this,o);const f=this._eventedParent;f&&(Te(o,typeof this._eventedParentData=="function"?this._eventedParentData():this._eventedParentData),f.fire(o))}else o instanceof Gn&&console.error(o.error);return this}listens(e){return!!(this._listeners&&this._listeners[e]&&this._listeners[e].length>0||this._oneTimeListeners&&this._oneTimeListeners[e]&&this._oneTimeListeners[e].length>0||this._eventedParent&&this._eventedParent.listens(e))}setEventedParent(e,i){return this._eventedParent=e,this._eventedParentData=i,this}}class Rn{constructor(e){typeof e=="string"?this.name=e:(this.name=e.name,this.iconsetId=e.iconsetId)}static from(e){return new Rn(e)}static toString(e){return e.iconsetId?`${e.name}${e.iconsetId}`:e.name}static parse(e){const[i,o]=e.split("");return new Rn({name:i,iconsetId:o})}static isEqual(e,i){return e.name===i.name&&e.iconsetId===i.iconsetId}toString(){return Rn.toString(this)}serialize(){return{name:this.name,iconsetId:this.iconsetId}}}var Yu,Cc={},Ju=function(){if(Yu)return Cc;Yu=1;var r={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],rebeccapurple:[102,51,153,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};function e(u){return(u=Math.round(u))<0?0:u>255?255:u}function i(u){return e(u[u.length-1]==="%"?parseFloat(u)/100*255:parseInt(u))}function o(u){return(h=u[u.length-1]==="%"?parseFloat(u)/100:parseFloat(u))<0?0:h>1?1:h;var h}function a(u,h,f){return f<0?f+=1:f>1&&(f-=1),6*f<1?u+(h-u)*f*6:2*f<1?h:3*f<2?u+(h-u)*(2/3-f)*6:u}try{Cc.parseCSSColor=function(u){var h,f=u.replace(/ /g,"").toLowerCase();if(f in r)return r[f].slice();if(f[0]==="#")return f.length===4?(h=parseInt(f.substr(1),16))>=0&&h<=4095?[(3840&h)>>4|(3840&h)>>8,240&h|(240&h)>>4,15&h|(15&h)<<4,1]:null:f.length===7&&(h=parseInt(f.substr(1),16))>=0&&h<=16777215?[(16711680&h)>>16,(65280&h)>>8,255&h,1]:null;var _=f.indexOf("("),g=f.indexOf(")");if(_!==-1&&g+1===f.length){var v=f.substr(0,_),b=f.substr(_+1,g-(_+1)).split(","),w=1;switch(v){case"rgba":if(b.length!==4)return null;w=o(b.pop());case"rgb":return b.length!==3?null:[i(b[0]),i(b[1]),i(b[2]),w];case"hsla":if(b.length!==4)return null;w=o(b.pop());case"hsl":if(b.length!==3)return null;var A=(parseFloat(b[0])%360+360)%360/360,C=o(b[1]),R=o(b[2]),D=R<=.5?R*(C+1):R+C-R*C,B=2*R-D;return[e(255*a(B,D,A+1/3)),e(255*a(B,D,A)),e(255*a(B,D,A-1/3)),w];default:return null}}return null}}catch{}return Cc}();class wi{constructor(e,i,o,a=1){this.r=e,this.g=i,this.b=o,this.a=a}static parse(e){if(!e)return;if(e instanceof wi)return e;if(typeof e!="string")return;const i=Ju.parseCSSColor(e);return i?new wi(i[0]/255,i[1]/255,i[2]/255,i[3]):void 0}toString(){const[e,i,o,a]=[this.r,this.g,this.b,this.a];return`rgba(${Math.round(255*e)},${Math.round(255*i)},${Math.round(255*o)},${a})`}toNonPremultipliedRenderColor(e){const{r:i,g:o,b:a,a:u}=this;return new Ea(e,i,o,a,u)}toPremultipliedRenderColor(e){const{r:i,g:o,b:a,a:u}=this;return new ap(e,i*u,o*u,a*u,u)}clone(){return new wi(this.r,this.g,this.b,this.a)}}class Dl{constructor(e,i,o,a,u,h=!1){if(this.premultiplied=!1,this.premultiplied=h,e){const f=e.image.height,_=f*f;this.premultiplied?(i=u===0?0:i/u*(f-1),o=u===0?0:o/u*(f-1),a=u===0?0:a/u*(f-1)):(i*=f-1,o*=f-1,a*=f-1);const g=Math.floor(i),v=Math.floor(o),b=Math.floor(a),w=Math.ceil(i),A=Math.ceil(o),C=Math.ceil(a),R=i-g,D=o-v,B=a-b,G=e.image.data,j=4*(g+v*_+b*f),H=4*(g+v*_+C*f),se=4*(g+A*_+b*f),ie=4*(g+A*_+C*f),ne=4*(w+v*_+b*f),ue=4*(w+v*_+C*f),de=4*(w+A*_+b*f),Re=4*(w+A*_+C*f);if(j<0||Re>=G.length)throw new Error("out of range");this.r=wt(wt(wt(G[j],G[H],B),wt(G[se],G[ie],B),D),wt(wt(G[ne],G[ue],B),wt(G[de],G[Re],B),D),R)/255*(this.premultiplied?u:1),this.g=wt(wt(wt(G[j+1],G[H+1],B),wt(G[se+1],G[ie+1],B),D),wt(wt(G[ne+1],G[ue+1],B),wt(G[de+1],G[Re+1],B),D),R)/255*(this.premultiplied?u:1),this.b=wt(wt(wt(G[j+2],G[H+2],B),wt(G[se+2],G[ie+2],B),D),wt(wt(G[ne+2],G[ue+2],B),wt(G[de+2],G[Re+2],B),D),R)/255*(this.premultiplied?u:1),this.a=u}else this.r=i,this.g=o,this.b=a,this.a=u}toArray(){const{r:e,g:i,b:o,a}=this;return[255*e,255*i,255*o,a]}toHslaArray(){let{r:e,g:i,b:o,a}=this;if(this.premultiplied){if(a===0)return[0,0,0,0];e/=a,i/=a,o/=a}const u=Math.min(Math.max(e,0),1),h=Math.min(Math.max(i,0),1),f=Math.min(Math.max(o,0),1),_=Math.min(u,h,f),g=Math.max(u,h,f),v=(_+g)/2;if(_===g)return[0,0,100*v,a];const b=g-_,w=v>.5?b/(2-g-_):b/(g+_);let A=0;return g===u?A=(h-f)/b+(h<f?6:0):g===h?A=(f-u)/b+2:g===f&&(A=(u-h)/b+4),A*=60,[Math.min(Math.max(A,0),360),Math.min(Math.max(100*w,0),100),Math.min(Math.max(100*v,0),100),a]}toArray01(){const{r:e,g:i,b:o,a}=this;return[e,i,o,a]}toArray01Scaled(e){const{r:i,g:o,b:a}=this;return[i*e,o*e,a*e]}toArray01Linear(){const{r:e,g:i,b:o,a}=this;return[Math.pow(e,2.2),Math.pow(i,2.2),Math.pow(o,2.2),a]}}class Ea extends Dl{constructor(e,i,o,a,u){super(e,i,o,a,u,!1)}}class ap extends Dl{constructor(e,i,o,a,u){super(e,i,o,a,u,!0)}}function wt(r,e,i){return r*(1-i)+e*i}function lp(r,e,i){return r.map((o,a)=>wt(o,e[a],i))}wi.black=new wi(0,0,0,1),wi.white=new wi(1,1,1,1),wi.transparent=new wi(0,0,0,0),wi.red=new wi(1,0,0,1),wi.blue=new wi(0,0,1,1);var Ol=Object.freeze({__proto__:null,array:lp,color:function(r,e,i){return new wi(wt(r.r,e.r,i),wt(r.g,e.g,i),wt(r.b,e.b,i),wt(r.a,e.a,i))},number:wt});function Ws(r,...e){for(const i of e)for(const o in i)r[o]=i[o];return r}class qn extends Error{constructor(e,i){super(i),this.message=i,this.key=e}}class Ku{constructor(e,i=[]){this.parent=e,this.bindings={};for(const[o,a]of i)this.bindings[o]=a}concat(e){return new Ku(this,e)}get(e){if(this.bindings[e])return this.bindings[e];if(this.parent)return this.parent.get(e);throw new Error(`${e} not found in scope.`)}has(e){return!!this.bindings[e]||!!this.parent&&this.parent.has(e)}}const Sa={kind:"null"},xt={kind:"number"},vi={kind:"string"},bi={kind:"boolean"},zn={kind:"color"},Zo={kind:"object"},Ti={kind:"value"},Mc={kind:"collator"},Fl={kind:"formatted"},kl={kind:"resolvedImage"};function an(r,e){return{kind:"array",itemType:r,N:e}}function zr(r){if(r.kind==="array"){const e=zr(r.itemType);return typeof r.N=="number"?`array<${e}, ${r.N}>`:r.itemType.kind==="value"?"array":`array<${e}>`}return r.kind}const gm=[Sa,xt,vi,bi,zn,Fl,Zo,an(Ti),kl];function Ia(r,e){if(e.kind==="error")return null;if(r.kind==="array"){if(e.kind==="array"&&(e.N===0&&e.itemType.kind==="value"||!Ia(r.itemType,e.itemType))&&(typeof r.N!="number"||r.N===e.N))return null}else{if(r.kind===e.kind)return null;if(r.kind==="value"){for(const i of gm)if(!Ia(i,e))return null}}return`Expected ${zr(r)} but found ${zr(e)} instead.`}function _s(r,e){return e.some(i=>i.kind===r.kind)}function Bl(r,e){return e.some(i=>i==="null"?r===null:i==="array"?Array.isArray(r):i==="object"?r&&!Array.isArray(r)&&typeof r=="object":i===typeof r)}function Pc(r,e){return r.kind==="array"&&e.kind==="array"?r.N===e.N&&Pc(r.itemType,e.itemType):r.kind===e.kind}class Nl{constructor(e,i,o){this.sensitivity=e?i?"variant":"case":i?"accent":"base",this.locale=o,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})}compare(e,i){return this.collator.compare(e,i)}resolvedLocale(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale}}class Rc{constructor(e,i,o,a,u){this.text=e.normalize?e.normalize():e,this.image=i,this.scale=o,this.fontStack=a,this.textColor=u}}class pn{constructor(e){this.sections=e}static fromString(e){return new pn([new Rc(e,null,null,null,null)])}isEmpty(){return this.sections.length===0||!this.sections.some(e=>e.text.length!==0||!!e.image&&e.image.hasPrimary())}static factory(e){return e instanceof pn?e:pn.fromString(e)}toString(){return this.sections.length===0?"":this.sections.map(e=>e.text).join("")}serialize(){const e=["format"];for(const i of this.sections){if(i.image){const a=i.image.getPrimary().id.toString();e.push(["image",a]);continue}e.push(i.text);const o={};i.fontStack&&(o["text-font"]=["literal",i.fontStack.split(",")]),i.scale&&(o["font-scale"]=i.scale),i.textColor&&(o["text-color"]=["rgba"].concat(i.textColor.toNonPremultipliedRenderColor(null).toArray())),e.push(o)}return e}}class Wo{constructor(e,i={}){if(this.id=Rn.from(e),this.options=Object.assign({},i),i.transform){const{a:o,b:a,c:u,d:h,e:f,f:_}=i.transform;this.options.transform=new DOMMatrix([o,a,u,h,f,_])}else this.options.transform=new DOMMatrix([1,0,0,1,0,0])}toString(){const{a:e,b:i,c:o,d:a,e:u,f:h}=this.options.transform;return JSON.stringify({name:this.id.name,iconsetId:this.id.iconsetId,params:this.options.params,transform:{a:e,b:i,c:o,d:a,e:u,f:h}})}static parse(e){let i,o,a,u;try{({name:i,iconsetId:o,params:a,transform:u}=JSON.parse(e)||{})}catch{return null}if(!i)return null;const{a:h,b:f,c:_,d:g,e:v,f:b}=u||{};return new Wo({name:i,iconsetId:o},{params:a,transform:new DOMMatrix([h,f,_,g,v,b])})}scaleSelf(e,i){return this.options.transform.scaleSelf(e,i),this}}class Sn{constructor(e,i,o,a,u=!1){this.primaryId=Rn.from(e),this.primaryOptions=i,o&&(this.secondaryId=Rn.from(o)),this.secondaryOptions=a,this.available=u}toString(){return this.primaryId&&this.secondaryId?`[${this.primaryId.name},${this.secondaryId.name}]`:this.primaryId.name}hasPrimary(){return!!this.primaryId}getPrimary(){return new Wo(this.primaryId,this.primaryOptions)}hasSecondary(){return!!this.secondaryId}getSecondary(){return this.secondaryId?new Wo(this.secondaryId,this.secondaryOptions):null}static from(e){return typeof e=="string"?Sn.build({name:e}):e}static build(e,i,o,a){return!e||typeof e=="object"&&!("name"in e)?null:new Sn(e,o,i,a)}}function Xs(r,e,i,o){return typeof r=="number"&&r>=0&&r<=255&&typeof e=="number"&&e>=0&&e<=255&&typeof i=="number"&&i>=0&&i<=255?o===void 0||typeof o=="number"&&o>=0&&o<=1?null:`Invalid rgba value [${[r,e,i,o].join(", ")}]: 'a' must be between 0 and 1.`:`Invalid rgba value [${(typeof o=="number"?[r,e,i,o]:[r,e,i]).join(", ")}]: 'r', 'g', and 'b' must be between 0 and 255.`}function jt(r){if(r===null||typeof r=="string"||typeof r=="boolean"||typeof r=="number"||r instanceof wi||r instanceof Nl||r instanceof pn||r instanceof Sn)return!0;if(Array.isArray(r)){for(const e of r)if(!jt(e))return!1;return!0}if(typeof r=="object"){for(const e in r)if(!jt(r[e]))return!1;return!0}return!1}function ct(r){if(r===null)return Sa;if(typeof r=="string")return vi;if(typeof r=="boolean")return bi;if(typeof r=="number")return xt;if(r instanceof wi)return zn;if(r instanceof Nl)return Mc;if(r instanceof pn)return Fl;if(r instanceof Sn)return kl;if(Array.isArray(r)){const e=r.length;let i;for(const o of r){const a=ct(o);if(i){if(i===a)continue;i=Ti;break}i=a}return an(i||Ti,e)}return Zo}function lo(r){const e=typeof r;return r===null?"":e==="string"||e==="number"||e==="boolean"?String(r):r instanceof pn||r instanceof Sn||r instanceof wi?r.toString():JSON.stringi